From b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 Feb 2015 15:02:49 +0100 Subject: massive reduction of unneeded files --- nx-X11/extras/Xpm/CHANGES | 957 -------------------------------- nx-X11/extras/Xpm/COPYRIGHT | 31 -- nx-X11/extras/Xpm/FAQ.html | 344 ------------ nx-X11/extras/Xpm/FILES | 68 --- nx-X11/extras/Xpm/Imakefile | 73 --- nx-X11/extras/Xpm/Makefile.noX | 70 --- nx-X11/extras/Xpm/README.AMIGA | 10 - nx-X11/extras/Xpm/README.MSW | 127 ----- nx-X11/extras/Xpm/README.XFree86 | 4 - nx-X11/extras/Xpm/README.html | 303 ---------- nx-X11/extras/Xpm/cxpm/Imakefile | 66 --- nx-X11/extras/Xpm/cxpm/Makefile.noX | 64 --- nx-X11/extras/Xpm/cxpm/cxpm.c | 155 ------ nx-X11/extras/Xpm/cxpm/cxpm.man | 49 -- nx-X11/extras/Xpm/doc/xpm.PS.gz | Bin 49010 -> 0 bytes nx-X11/extras/Xpm/lib/Imakefile | 185 ------ nx-X11/extras/Xpm/lib/Makefile.AmigaGCC | 92 --- nx-X11/extras/Xpm/lib/Makefile.noX | 112 ---- nx-X11/extras/Xpm/lib/Smakefile | 89 --- nx-X11/extras/Xpm/lib/Xpm-def.cpp | 37 -- nx-X11/extras/Xpm/lib/amigax.c | 385 ------------- nx-X11/extras/Xpm/lib/amigax.h | 151 ----- nx-X11/extras/Xpm/lib/descrip.mms | 82 --- nx-X11/extras/Xpm/lib/make.com | 169 ------ nx-X11/extras/Xpm/lib/rgbtab.h | 292 ---------- nx-X11/extras/Xpm/lib/simx.c | 293 ---------- nx-X11/extras/Xpm/lib/simx.h | 139 ----- nx-X11/extras/Xpm/namecvt | 60 -- nx-X11/extras/Xpm/sxpm/Imakefile | 98 ---- nx-X11/extras/Xpm/sxpm/Makefile.noX | 69 --- nx-X11/extras/Xpm/sxpm/plaid.xpm | 34 -- nx-X11/extras/Xpm/sxpm/plaid_ext.xpm | 43 -- nx-X11/extras/Xpm/sxpm/plaid_mask.xpm | 35 -- nx-X11/extras/Xpm/sxpm/sxpm.c | 709 ----------------------- nx-X11/extras/Xpm/sxpm/sxpm.man | 132 ----- 35 files changed, 5527 deletions(-) delete mode 100644 nx-X11/extras/Xpm/CHANGES delete mode 100644 nx-X11/extras/Xpm/COPYRIGHT delete mode 100644 nx-X11/extras/Xpm/FAQ.html delete mode 100644 nx-X11/extras/Xpm/FILES delete mode 100644 nx-X11/extras/Xpm/Imakefile delete mode 100644 nx-X11/extras/Xpm/Makefile.noX delete mode 100644 nx-X11/extras/Xpm/README.AMIGA delete mode 100644 nx-X11/extras/Xpm/README.MSW delete mode 100644 nx-X11/extras/Xpm/README.XFree86 delete mode 100644 nx-X11/extras/Xpm/README.html delete mode 100644 nx-X11/extras/Xpm/cxpm/Imakefile delete mode 100644 nx-X11/extras/Xpm/cxpm/Makefile.noX delete mode 100644 nx-X11/extras/Xpm/cxpm/cxpm.c delete mode 100644 nx-X11/extras/Xpm/cxpm/cxpm.man delete mode 100644 nx-X11/extras/Xpm/doc/xpm.PS.gz delete mode 100644 nx-X11/extras/Xpm/lib/Imakefile delete mode 100644 nx-X11/extras/Xpm/lib/Makefile.AmigaGCC delete mode 100644 nx-X11/extras/Xpm/lib/Makefile.noX delete mode 100644 nx-X11/extras/Xpm/lib/Smakefile delete mode 100644 nx-X11/extras/Xpm/lib/Xpm-def.cpp delete mode 100644 nx-X11/extras/Xpm/lib/amigax.c delete mode 100644 nx-X11/extras/Xpm/lib/amigax.h delete mode 100644 nx-X11/extras/Xpm/lib/descrip.mms delete mode 100644 nx-X11/extras/Xpm/lib/make.com delete mode 100644 nx-X11/extras/Xpm/lib/rgbtab.h delete mode 100644 nx-X11/extras/Xpm/lib/simx.c delete mode 100644 nx-X11/extras/Xpm/lib/simx.h delete mode 100644 nx-X11/extras/Xpm/namecvt delete mode 100644 nx-X11/extras/Xpm/sxpm/Imakefile delete mode 100644 nx-X11/extras/Xpm/sxpm/Makefile.noX delete mode 100644 nx-X11/extras/Xpm/sxpm/plaid.xpm delete mode 100644 nx-X11/extras/Xpm/sxpm/plaid_ext.xpm delete mode 100644 nx-X11/extras/Xpm/sxpm/plaid_mask.xpm delete mode 100644 nx-X11/extras/Xpm/sxpm/sxpm.c delete mode 100644 nx-X11/extras/Xpm/sxpm/sxpm.man (limited to 'nx-X11/extras/Xpm') diff --git a/nx-X11/extras/Xpm/CHANGES b/nx-X11/extras/Xpm/CHANGES deleted file mode 100644 index b90e6cdd7..000000000 --- a/nx-X11/extras/Xpm/CHANGES +++ /dev/null @@ -1,957 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/**************************************************************************\ -* * -* HISTORY of user-visible changes * -* * -\**************************************************************************/ - -3.4k (98/03/18) - - ENHANCEMENTS: - - A new program called cxpm is provided to check on XPM files and help - figuring out where the file might be invalid. - - The FAQ and README are now in HTML. - - BUGS CORRECTED: - - A bug in writing pixmaps out on an 32 bit depth visual and MSBFirst - machine. - - patch from Uwe Langenkamp - - A severe bug in parsing the pixels section when an unknown character - is encountered. - -3.4j (96/12/31) - - ENHANCEMENTS: - - The XPM library can now be built under Amiga DOS. This entirely comes - from: Lorens Younes - See the README.AMIGA file for details. - - Changes for MSW: big performance improvement in ParseAndPutPixels(), - fixed creation of the mask in SetColor() - - patch from Jan Wielemaker - - makefiles are provided for VMS - - given by Martin P.J. Zinser m.zinser@gsi.de - - Imakefiles reworked to get smoother builds and fixes from: - - Paul DuBois dubois@primate.wisc.edu - - Larry Schwimmer schwim@cyclone.stanford.edu - - thanks to some code rearrangement the library is smaller (the size - reduction goes from 4 to 7% depending on the system) - - BUGS CORRECTED: - - A severe bug (introduced in 3.4i as part of the sprintf - optimization) in code writing XPM extensions to a buffer - XpmCreateBufferFromImage/Pixmap. - - The XpmAttributes definition in xpm.h was declaring nalloc_colors to - be Bool, it's an int. - -3.4i (96/09/13) - - NEW FEATURES: - - The XPM library now allows the application to pass its own color - allocation/free functions. For this matter the following was done: - The XpmAttributes structure has three new fields alloc_color, - free_color, and color_closure. The following new valuemasks were - added XpmAllocColorFunc, XpmFreeColorsFunc, XpmColorClosure. And - two new types were defined XpmAllocColorFunc and XpmFreeColorsFunc. - See documentation for details. - - ENHANCEMENTS: - - Windows NT support. It should compile and run fine based on the X - Consortium X11R6 distribution. - - The README file contains information to compile on Solaris with gcc. - - Part of the code has been optimized by using the value returned by - sprintf instead of calling strlen. Add the flag -DVOID_SPRINTF - if on your system sprintf returns void. - - patch from Thomas Ott thommy@rz.fh-augsburg.de - - BUGS CORRECTED: - - XpmFree is now a real function (simply calling free by default). - - CHANGES TO THE DOC: - - The documentation describes the new XpmAttributes fields and their - use. - -3.4h (96/02/01) - - NEW FEATURES: - - The XpmAttributes has a new member called 'alloc_close_colors' which - lets the caller specify whether close colors should be allocated - using XAllocColor or not. This is especially useful when one uses a - private colormap full of read/write cells. - The xpm.h header file define a new bitmap flag called - XpmAllocCloseColors to use along with this new slot. - - Dale Pease peased@bigbird.cso.gtegsc.com - - The XpmAttributes has a new member called 'bitmap_format' which lets - the caller specify the format of 1 bit depth images (XYBitmap or - ZPixmap). The xpm.h header file define a new bitmap flag called - XpmBitmapFormat to use along with this new field. - - ENHANCEMENTS: - - XpmReadFileTo[Image/Pixmap], XpmCreate[Image/Pixmap]FromData, - XpmCreateImageFromDataFromBuffer functions do no longer use a - temporary XpmImage object, which reduces a lot the amount of memory - used. On the other hand it can take a little more time, but given the - following figures (based on sxpm) it is a real good trade-off. - - Reading a 22x22 pixmap with 5 colors no time change is detected - using time: - real 0.3 - user 0.1 - sys 0.1 - - Reading a 1279x1023 pixmap with 14 colors (quite extreme case for - XPM!) the time goes from: - real 1.9 - user 0.8 - sys 0.8 - - to: - real 2.2 - user 1.8 - sys 0.3 - - Reading the 22x22 pixmap with 5 colors the memory usage (under - purify) goes from: - 255256 code - 55496 data/bss - 163848 heap (peak use) - 4248 stack - to: - 271240 code - 55472 data/bss - 159752 heap (peak use) - 4224 stack - - And reading the 1279x1023 pixmap with 14 colors it goes from: - 255256 code - 55496 data/bss - 6705160 heap (peak use) - 4280 stack - to: - 271240 code - 55472 data/bss - 1732616 heap (peak use) - 4264 stack - - This clearly shows that while for small pixmaps there is no real - difference on both sides, for large pixmaps this makes a huge - difference about the amount of memory used and it is not much - slower. - - Note that you can still get the old behavior using both - XpmReadFileToXpmImage and XpmCreate[Image/Pixmap]FromXpmImage instead - of XpmReadFileTo[Image/Pixmap]. Once more XPM gives you the choice! - - BUGS CORRECTED: - - when defined locally the global symbols strcasecmp and strdup are - now called xpmstrcasecmp and xpmstrdup to avoid any possible - conflict. - - VMS has a bogus file system which requires a work around in - XpmReadFileToBuffer. - - patch from Bob.Deen@jpl.nasa.gov - - the type of the exactColors attribute has been changed from unsigned - int to Bool. - - CHANGES TO THE DOC: - - the documentation describes the new XpmAttributes fields - alloc_close_colors and bitmap_format. - -3.4g (95/10/08) - - ENHANCEMENTS: - - The XpmAttributes structure has now two new slots: alloc_pixels and - nalloc_pixels in order to provide an easy way to free allocated - colors. The new bitmask XpmReturnAllocPixels should be used to - request this data through the valuemask. Unless you really know why, - you should use this instead of XpmReturnPixels, pixels, and npixels. - - the XPM1 format parsing has been improved. - - patch from Chuck Thompson - - compilers defining _STDC_ to something different from 1 are now - considered as ANSI compilers. - - the README file provides now more info on how to build XPM depending - on the system. - - BUGS CORRECTED: - - a bug introduced in 3.4f in the XPM1 format parsing function. - - fix from Chuck Thompson - - the hashtable was not free when the color parsing failed. - - patch from ackley@cs.unm.edu (David Ackley) - - the close color mechanism wasn't used if one of the closeness - parameter was null. Now only one needs to be different from 0. - Lorens Younes d93-hyo@nada.kth.se - - parsing of long comments failed with a segmentation fault. - - CHANGES TO THE DOC: - - the documentation describes the new XpmAttributes fields - alloc_pixels and nalloc_pixels and how they are used. - -3.4f (95/05/29) - - ENHANCEMENTS: - - Defines IMAKE_DEFINES in the top Imakefile so one can easily avoid - building the shared library. - - Add some information about the installation process in the README. - - filenames are surrounded with quotes when calling gzip or compress in - order to allow spaces within filenames. - - William Parn - - the compilation and the shared library building should be smoother - on Alpha OSF/1. - - patch from Dale Moore - - BUGS CORRECTED: - - a segmentation fault occurring in some weird case. - -3.4e (95/03/01) - - ENHANCEMENTS: - - The top Imakefile passes CDEBUGFLAGS and DEFINES to subdirs. Thus - only this Imakefile should need to be edited by users. - - FAQ includes the answer to the question "How can I get a non - rectangular icon using XPM ?" - - VMS support updated - - patch from Martin P.J. Zinser m.zinser@gsi.de - - BUGS CORRECTED: - - XpmCreateImageFromXpmImage() called from XpmReadFileToPixmap() could - lead to a segmentation fault since free was called on a memory block - size variable instead of the block itself. Note: this bug has been - introduced in 3.4d. - -3.4d (95/01/31) - - ENHANCEMENTS: - - sxpm now supports a -version option command. - - BUGS CORRECTED: - - the list of pixels returned in XpmAttributes was wrong when two - colors were defined as None in the read XPM - - Lionel.Mallet@sophia.inria.fr - - the parser was skipping whitespace reading extensions strings. This - has been fixed so extensions lines are now returned exactly as they - are. - - some compilation control added for the dec alpha with X11R5 (LONG64) - - patch from Fredrik Lundh - - when writing an XPM file, '-' characters are replaced with '_' - characters in the array name, in order to get a valid C syntax name. - - XYPixmap format images were not correctly handled. - - XPM1 file with names using multiple '_' characters are now handled - correctly. - - todd@erda.rl.af.mil (Todd Gleason) - -3.4c (94/06/06) - - Yes, this is kind of quick. But this is because no code has been modified, - this is just a new packaging to make the whole stuff more suitable to the - X development team's requests for inclusion in the R6 contrib. - - ENHANCEMENTS: - - Several filenames were too long to fit without any conflict on DOS - and CD-ROM filesystems. They have been renamed. - - Imakefiles use XCOMM for comments instead of the # character. - - the Postscript documentation file doc/xpm.ps is now distributed as - doc/xpm.PS.gz and allows browsing with tools such as ghostview. - - Besides, parts of lib/misc.c have been moved to several new files, - and some functions of data.c have been moved to other files in - order to get a better link profile. - - I've also added a FAQ hoping this will prevent people from - continuously filling my mailbox with the same questions. - - sxpm.c includes instead of "xpm.h" and BUILDINCTOP is - used in Makefiles as expected. - - Everything can be done simply using "xmkmf -a" and "make". - -3.4b (94/05/24) - - ENHANCEMENTS: - - XPM can now be built under MS Windows. Yes, this is possible and this - entirely comes from: - - Hermann Dunkel - See the README.MSW file for details. - - - building the shared library now depends on the SharedLibXpm variable - and no longer on the SharedLibX variable which is private to the X - Window System project. - - patch from Stephen Gildea - Other variables can now be set for the various locations needed. - - - lib/parse.c does no longer use a 256x256 array in the stack but - malloc it instead. - - - The Copyright notice which has been re-written from the X11R6's one - should be clearer and is now present in every file. - - BUGS CORRECTED: - - lib/xpmP.h does no longer define a Boolean type which conflicts with - the Intrinsic definition. Instead the type Bool defined in Xlib is - used. - - neumann@watson.ibm.com (Gustaf Neumann) - -3.4a (94/03/29) - - BUGS CORRECTED: - - passing NULL as shapemask_return to XpmReadFileToPixmap and similar - functions was leading to a bus error. - - Dean Luick - -3.4 (94/03/14) - - IMPORTANT NOTE: - This version is not compatible with 3.3. Fortunately most people should - only need to recompile. - I apology for this but CDE/Motif have put heavy pressure to go that - way. The point is that I designed and released Xpm 3.3 in order to let - OSF include a clean version of Xpm in Motif 2.0. This new version was - not fully compatible with 3.2 but I thought it didn't matter since this - was going to be the first version used within Motif. Unfortunately CDE - was already using xpm-3.2 internally and requires both source and - binary backward compatibility. By the way I must say they didn't drop - us a single line to let us know they were using it and thus were - expecting stability. All this could have been avoided... - - However, since I had to go for a not compatible version I took this as - an opportunity to modify the lower level API, which was new in 3.3 and - which was somewhat clumsy, in order to provide yet a better API. - - The library has been modified to have both source and binary backward - compatibility with xpm-3.2. This implies it is not either source or - binary compatible with 3.3. The fields related to the 3.2 XpmInfos - mechanism have been put back into the XpmAttributes structure. The new - 3.3 XpmInfos struct has been renamed as XpmInfo to avoid conflict with - the old 3.2 flag which is back too. All the semantic related to the - XpmAttributes infos fields is back as well. - - So this new version provides a high level API which is fully - compatible with 3.2 and still provides the 3.3 lower level API - (XpmImage) with the XpmInfos struct renamed as XpmInfo. This leads to - some redundancy but this was the best I could do to satisfy both - CDE/Motif people who needed the backward compatibility and myself (who - always tries to provide you with the best ;-). - - Tests have been successfully performed with pixmap-2.1, pixmap-2.4, and - sxpm. - - ENHANCEMENTS: - - The colorTable member of the XpmAttributes structure is now an - (XpmColor*) in order to be compatible with an XpmImage colorTable. - However in order to be backward compatible this field is cast to - (XpmColor **), which is equivalent to (char ***), when it is used - with the old flags XpmInfos and XpmReturnInfos. To handle the new - type the new flags XpmColorTable and XpmReturnColorTable have been - defined. - - The XpmInfo struct has been extended to avoid having to deal with an - XpmAttributes at the lower level. The idea is that all the data - stored in an Xpm file can be retrieve through both an XpmImage and - an XpmInfo struct. See the documentation for details. - - XpmUndefPixel is defined and exported by xpm.h in order to let - clients providing their own colorTable when writing out an Xpm file. - See the documentation for details. - - in sxpm/sxpm.c, set attribute XtNinput to True on toplevel widget. - Windows that don't "take" input, never get focus, as mandated by - the ICCM. - patch from Henrique Martins - - lib/Imakefile modified to build the shared library under IRIX 5. - patch from simon@lia.di.epfl.ch (Simon Leinen) - - NEW FEATURES: - - a new function and a new define should help client figuring out with - which Xpm library version they are working. These are - XpmIncludeVersion and XpmLibraryVersion(). - -3.3 (93/12/20) - - NEW FEATURES: - - XPM1 files are now supported. - - a new function is provided to get an error string related to the - returned error code. - - suggested by Detlef Schmier - - ENHANCEMENTS: - - gzip and gunzip are called with the -q option (quiet) - - patch from Chris P. Ross - - the parser is again more flexible about the way the strings are - distributed on lines. Actually a single line XPM file can be read. - - the documentation should be clearer about shapemask generation and - XpmAttributes valuemask. - - BUGS CORRECTED: - - reading some binary file was leading to a bus error. - - patch from Detlef Schmier - - the ? character is no longer used when writing an XPM file in order - to avoid possible ANSI trigraphs. - -3.3alpha (93/08/13) - - NEW FEATURES: - - a new level interface is provided to allow applications to do either - icon editing or data caching. - The XpmAttributes has been changed but most applications will just - need to be recompiled. - - new structures are provided to deal with the new lower level: - XpmImage, XpmColor, XpmInfos. - - - a separate distribution called xpm-contrib is available. This - includes the converters which used to be part of this distribution - plus: - two new applications: - * nexpm to draw a pixmap in *any* existing window from - Ralph Betza - * xpmview to display a list of Xpm files from - Jean Michel Leon - - a hacky string to pixmap converter, provided by - Robert H. Forsman Jr. - - The Xpm editor called pixmap will also be part of this contrib. - This does not mean it is the best pixmap editor one can find - but it is the only one that I know of which tries to handle - all the features of this format. - - ENHANCEMENTS: - - the code to build XImage data has been optimized by - jules@x.co.uk (Julian Gosnell) - the old code is still available when compiling with the - -DWITHOUT_SPEEDUPS flag. - - - closecolor code was not re-entrant - - dbl@visual.com (David B. Lewis) - - fix gzip filename (*.gz and no longer *.z). - - Jason Patterson - - sxpm has 2 new options: - -nom to do not display the mask if there is one - -cp to override a color value with a given - pixel, i.e. sxpm plaid.xpm -cp red 4 - - also the '-s' adn '-p' options have been renamed to '-sc' and '-sp'. - - - xpm.h defines XpmFormat, XpmVersion, and XpmRevision numbers. - - BUGS CORRECTED: - - closecolor minor fix - - Jason Patterson - -3.2g (93/04/26) - - ENHANCEMENTS: - - much faster close colors - - piping from/to compressed files now handles GNU's gzip (.z) format - - added XpmColorKey attribute - ability to specify which visual's - colors to use (ie: now it's possible to read in a pixmap in a - color visual, but use the colors specified for monochrome). - - added -mono, -grey4, -grey and -color options to sxpm to demonstrate - the XpmColorKey attribute. - - Jason Patterson - - BUGS CORRECTED: - - fixed bug where redefining "None" as a pixel stopped mask generation - - minor SVR4 defines for - - fixed annoying closecolor bug related to read/write color cells - - fixed minor bug in color value -> pixel overloading - - manual updated to include new red/green/blue closeness attributes - - Jason Patterson - - - the top Imakefile was missing the depend target - - sxpm/Imakefile fixed so that -L../lib is set before the standard - library location. - - Vivek Khera - - - lib/xpmP.h now defines bcopy as memcpy for VMS (required by recent - versions of VMS) - - J. Daniel Smith - - - the lib/Imakefile didn't work with X11R4. - - -3.2f (93/03/17) - - NEW FEATURES: - - the library provides four new functions to deal with Xpm files - loaded in memory as single character strings buffers: - - XpmCreateImageFromBuffer - XpmCreatePixmapFromBuffer - XpmCreateBufferFromImage - XpmCreateBufferFromPixmap - - - in addition, as a convenience, two functions are provided to copy a - file in a buffer and to write a file from a buffer: - - XpmReadFileToBuffer - XpmWriteFileFromBuffer - - ENHANCEMENTS: - - Files are now dispatched in the following sub-directories: - lib, sxpm, and doc. - - Imakefiles will let you build a shared library as well as the static - one (with either X11R4 or X11R5). - - The documentation has been ported from LaTeX to FrameMaker and is - now included in the distribution in its PostScript form (doc/xpm.ps). - Source files are available on request. - Also the documentation has been reorganized and includes a table of - contents and an index of the functions (the number of functions - increasing this became a requisite). - - BUGS CORRECTED: - - Many warnings have been fixed - patch from Daniel Dardailler - daniel@osf.org - -3.2e (93/02/05) - - ENHANCEMENTS: - - use XpmMalloc, XpmRealloc, XpmCalloc, and XpmFree which are defines - in xpmP.h. This should help people wanting to use their own functions. - - BUGS CORRECTED: - - Intrinsic.h is no longer included. - - bzero is defined as memset on SYSV and SVR4. - - some memory initialization bug concerning XpmAttributes. - -3.2d (93/01/27) - - ENHANCEMENTS: - - compile on Solaris 2.0 - - patch from Clint Jeffery - - BUGS CORRECTED: - - shape masks are now set correctly for LSBFirst (Decs). - - pixmaps are now set correctly for 2 bit displays (Nexts). - - patch from Josef Leherbauer - - isspace was called on getc which fails when EOF is returned. - - Marelli Paolo - -3.2c (92/12/29) - - ENHANCEMENTS: - - parsing optimized for single and double characters color - - patch originally from Martin Brunecky - marbru@build1.auto-trol.com - - BUGS CORRECTED: - - XpmFreeExtensions was calling free on some argument without checking - it was not NULL. - - strdup was not correctly defined for systems which do not provide - it. - Hans-Peter Lichtin - - some bug in XpmCrDataFI.c - - Sven Delmas garfield@avalanche.cs.tu-berlin.de - - NOTE: - - there is still a bug with the creation of the clipmask on display of - depth 2 but I can't find a fix because unfortunately I don't have such - a rendering system and nobody gets the time to investigate for me. - -3.2b (92/10/19) - - ENHANCEMENTS: - - Create XpmReadFileToData and XpmWriteFileFromData - - Dan Greening - - added "close colors" support and ability to redefine color values - as pixels at load time, as well as color names - - Jason Patterson - - errors while parsing or allocating colors now revert to other - visual defaults, creating pixmap/image as expected, and returning - XpmSuccess. The old behavior of XpmColorError being returned and no - pixmap/image being created can be retained by setting the - exactColors attribute. - - Jason Patterson - - BUGS CORRECTED: - - SVR4 defines for including instead of - - Jason Patterson - - attributes->extensions and attributes->nextensions fields were not - set correctly when no extensions present in file. - - Simon_Scott Cornish - -3.2a (92/08/17) - - ENHANCEMENTS: - - use the mock lisp hashing function instead of the gnu emacs one, - it is faster in some cases and never slower (I've not found any case). - - BUGS CORRECTED: - - function prototypes for ansi compilers. - - some memory initialization bugs (purify is just great for this). - - empty strings in extensions are now correctly handled. - -3.2 (92/07/06) - - NEW FEATURES: - - both format and functions handle extensions data. This allow people - to store additional data related to a pixmap. See documentation for - detail. - - sxpm supports the new option '-c' to use a private colormap. This is - useful when displaying pixmaps using a lot of colors. - - sxpm supports the new option '-v' (verbose) to get possible - extensions print out on standard error. - - ENHANCEMENTS: - - most of the code has been reworked to be improved and thus almost - every function is faster. It takes less than 6 seconds of real time on - a sun4 to display, with sxpm, a 487x635 pixmap using 213 colors, while - it takes 32 seconds with the old library! It takes 18 seconds to - display a 1279x1023 screen dump using 14 colors while xwud takes 10 - seconds. - Of course performance improvements are not always that great, they - depend on the size and number of colors but I'm sure everybody will - appreciate ;-) - I know how to improve it more but this will require changes in the - architecture so this is not for now. Some optimizations have been - contributed by gregor@kafka.saic.com (gregg hanna) and - jnc@csl.biosci.arizona.edu (John N. Calley). - - the Imakefile is modified to let you install sxpm - Rainer Klute - - - xpmP.h declares popen for Sequent platforms - Clinton Jeffery - - - XpmWriteFileFromImage/Pixmap rather than truncating the pixmap name - to the first dot changes dots to underscores to get a valid C syntax - name. - - - BUGS CORRECTED: - - there was a bug in the image creation function for some 24 bits - displays. It is fixed. - - allocated color pixels are now freed when an error occurs - - nusser@dec1.wu-wien.ac.at (Stefan Nusser) - - CHANGES TO THE DOC: - - the documentation describes the new XpmExtension structure and how - to use it with read and write functions. - -3.1 (92/02/03) - - ENHANCEMENTS: - - sxpm now have more standard options (mainly suggested by - Rainer Sinkwitz ): - - Usage: sxpm [options...] - Where options are: - - [-d host:display] Display to connect to. - [-g geom] Geometry of window. - [-hints] Set ResizeInc for window. - [-icon filename] Set pixmap for iconWindow. - [-s symbol_name color_name] Overwrite color defaults. - [-p symbol_name pixel_value] Overwrite color defaults. - [-plaid] Read the included plaid pixmap. - [filename] Read from file 'filename', and from - standard input if 'filename' is '-'. - [-o filename] Write to file 'filename', and to standard - output if 'filename' is '-'. - [-nod] Don't display in window. - [-rgb filename] Search color names in the rgb text file - 'filename'. - - if no input is specified sxpm reads from standard input. - - - - Xpm functions and Ppm converters now deal with multiword colornames. - patches from Rainer Sinkwitz . - - -3.0 (91/10/03) - - Functions name and defines have been modified again (sorry for that) - as follows: - - XpmReadPixmapFile XpmReadFileToPixmap - XpmWritePixmapFile XpmWriteFileFromPixmap - - XpmPixmapColorError XpmColorError - XpmPixmapSuccess XpmSuccess - XpmPixmapOpenFailed XpmOpenFailed - XpmPixmapFileInvalid XpmFileInvalid - XpmPixmapNoMemory XpmNoMemory - XpmPixmapColorFailed XpmColorFailed - - To update code using Xpm you can use the included shell script called - rename with the sed commands files name-3.0b-3.0c and name-3.0c-3.0. - Old names still valid though. - - NEW FEATURES: - - four new functions to work with images instead of pixmaps: - - XpmReadFileToImage - XpmWriteFileFromImage - XpmCreateImageFromData - XpmCreateDataFromImage - - ENHANCEMENTS: - Algorithms to create and scan images and pixmaps are based on the - MIT's R5 code, thus they are much cleaner than old ones and should - avoid any problem with any visual (yes, I trust MIT folks :-) - - BUGS CORRECTED: - Imakefile use INCDIR instead of ROOTDIR. - - CHANGES TO THE DOC: - - the documentation presents the four new functions. - -3.0c (91/09/18) - - In answer to request of people functions, types and defines names have - been changed as follows: - - XCreatePixmapFromData XpmCreatePixmapFromData - XCreateDataFromPixmap XpmCreateDataFromPixmap - XReadPixmapFile XpmReadPixmapFile - XWritePixmapFile XpmWritePixmapFile - XFreeXpmAttributes XpmFreeAttributes - - PixmapColorError XpmPixmapColorError - PixmapSuccess XpmPixmapSuccess - PixmapOpenFailed XpmPixmapOpenFailed - PixmapFileInvalid XpmPixmapFileInvalid - PixmapNoMemory XpmPixmapNoMemory - PixmapColorFailed XpmPixmapColorFailed - - ColorSymbol XpmColorSymbol - - Generally speaking every public name begins with 'Xpm' and every - private one with 'xpm'. This should avoid any possible conflict. - - Some files have also be renamed accordingly. - - NEW FEATURES: - - support for VMS and two new options for sxpm: icon and hints (see - manual for details) Richard Hess - - DEFINES in Imakefile and Makefile.noXtree allows you to set the - following: - - ZPIPE for un/compressing piped feature (default is on) - NEED_STRCASECMP for system which doesn't provide one (default - is off) - - - xpmtoppm.c has is own strstr function which is used if NEED_STRSTR - is defined when compiling - Hugues.Leroy@irisa.fr (Hugues Leroy). - - BUGS CORRECTED: - - many bugs have been fixed, especially for ansi compilers - - Doyle C. Davidson (doyle@doyled.b23b.ingr.com) and - Clifford D. Morrison (cdm%bigdaddy%edsr@uunet.UU.NET) - - parser is again a little more improved - -3.0b (91/09/12) - - This is a complete new version with a new API and where files and - structures have been renamed. So this should be taken as a new - starting release. - This release should be quickly followed by the 3.0 because I'm planning - to send it for X11R5 contrib which ends October 5th. - - NEW FEATURES: - - support for transparent color. - - support for hotspot. - - a new function: XCreateDataFromPixmap to create an XPM data from a - pixmap in order to be able to create a new pixmap from this data using - the XCreatePixmapFromData function later on. - - a new structure: XpmAttributes which replace the XpmInfo structure - and which leads to a much simpler API with less arguments. - - arguments such as visual, colormap and depth are optional, default - values are taken if omitted. - - parsing and allocating color failures don't simply break anymore. If - another default color can be found it is used and a PixmapColorError - is returned. In case no color can be found then it breaks and returns - PixmapColorFailed. - - for this reason the ErrorStatus codes are redefined as follows: - - null if full success - positive if partial success - negative if failure - - with: - #define PixmapColorError 1 - #define PixmapSuccess 0 - #define PixmapOpenFailed -1 - #define PixmapFileInvalid -2 - #define PixmapNoMemory -3 - #define PixmapColorFailed -4 - - - sxpm prints out a warning when a requested color could not be parsed - or alloc'ed, and an error when none has been found. - - sxpm handles pixmap with transparent color. For this purpose the - plaid_mask.xpm is added to the distribution. - - BUGS CORRECTED: - - I've again improved the memory management. - - the parser is also improved. - - when writing a pixmap to a file the variable name could be - "plaid.xpm" which is not valid in C. Now the extension name is cut off - to give "plaid" as variable name. - - reading multiple words colornames such as "peach puff" where leading - to non readable Xpm files. They are now skipped to have only single - word colorname. Lionel Mallet (mallet@ipvpel.unipv.it). - - parser was triggered by the "/" character inside string. - Doyle C. Davidson (doyle@doyled.b23b.ingr.com). This is corrected. - - sxpm maps the window only if the option "-nod" is not selected. - - CHANGES TO THE DOC: - - the documentation presents the new API and features. - -3.0a (91/04/10) - - This is an alpha version because it supports the new version of XPM, - but the library interface is still the same. Indeed it will change in - future release to get rid of obsolete stuff such as the type argument - of the XWritePixmapFile function. - - ******************************* WARNING ********************************* - The format is not anymore XPM2, it is XPM version 3 which is XPM2 - limited to the C syntax with the key word "XPM" in place of "XPM2 C". - The interface library has not changed yet but the type argument of - XWritePixmapFile and the type member of XpmInfo are not used anymore. - Meanwhile the library which is now called libXpm.a is backward - compatible as XPM2 files can be read. But the XWritePixmapFile - function only writes out XPM version 3 files. - ************************************************************************* - - NEW FEATURES: - - the library doesn't use global variables anymore, thus it should be - able to share it. - - sxpm has been rewritten on top of Xt, it can be used to convert - files from XPM2 to XPM version 3. - - xpm1to2c.perl has been upgraded to the new XPM version and renamed - as xpm1to3.perl - - ppmtoxpm2.c and ppmtoxpm2.1 have been upgraded too and renamed - ppmtoxpm.c and ppmtoxpm.1. In addition the xpmtoppm.c and xpmtoppm.1 - of the pbmplus package have been upgraded too. xpmtoppm can thus - convert XPM version 1 and 3 to a portable pixmap. These files should - replace the original ones which are part of the pbmplus package. See - the ppm.README file for more details. - - the library contains RCS variables which allows you to get revision - numbers with ident (which is part of the RCS package). The Id number - is an internal rcs number for my eyes only. The official one is found - in Version. - - BUGS CORRECTED: - - the memory management has been much improved in order to avoid - memory leaks. - - the XImage building algorithm has been changed to support correctly - different visual depths. There is special code to handle depths 1, 4, - 6, 8, 24, and 32 to build the image and send it in one whack, and - other depths are supported by building the image with XPutPixel which - is slow but sure. - - similar algorithms are used to read pixmaps and write them out. - - CHANGES TO THE DOC: - - the documentation presents the new XPM format. - - -2.8 (90/12/19) - - ******************************* WARNING ********************************* - Since the last release two structures have been modified and have now - bigger sizes, so ANY CODE USING THE libXPM2 NEEDS TO BE RECOMPILED. - ************************************************************************* - - NEW FEATURES: - - the ColorSymbol struct contains the new member 'pixel' which allow - to override default colors by giving a pixel value (in such a case - symbol value must be set to NULL), - - the XpmInfo struct contains the new member 'rgb_fname' in which one - can specify an rgb text file name while writing a pixmap with the - XWritePixmapFile function (otherwise this member should be set to - NULL). This way colorname will be searched and written out if found - instead of the RGB value, - - Imakefile originally provided by stolcke@ICSI.Berkeley.EDU, - - the old Makefile is now distributed as Makefile.noXtree and presents - install targets, - - the demo application is renamed sxpm (Show XPM), creates a window of - the size of the pixmap if no geometry is specified, prints out - messages instead of status when an error occurs, handles the new - option -p for overriding colors by giving a pixel value (not really - useful but is just here to show this new feature), handles the new - option -rgb for specifying an rgb text file, and ends on - keypress as buttonpress, - - defines for SYSV have been provided by Paul Breslaw - , - - the distribution includes a new directory called converters which - contains xpm1to2 and xpm1to2c perl converters and a ppmtoxpm2 - converter provided by Paul Breslaw who upgraded the original ppmtoxpm - written by Mark W. Snitily . - - CHANGES TO THE DOC: - - this file is created and will give old users a quick reference to - changes made from one release to the next one, - - documentation is changed to present the new ColorSymbol structure - and the way to override colors by giving a pixel value, and to present - the new XpmInfo structure and how to use it, - - a man page for sxpm is added to the distrib, - - the README file talks about sxpm and no more demo, and have - reference to the different converters. - -2.7 (90/11/12) - - NEW FEATURES: - - XReadPixmapFile reads from stdin if filename is NULL, - - XWritePixmapFile writes to stdin if filename is NULL, - - the demo application handles the new option -nod for no displaying - the pixmap in a window (useful when used as converter). - - CHANGES TO THE DOC: - - documentation about the new feature. - -2.6 (90/10/29) - - NEW FEATURES: - - from nazgul@alphalpha.com (Kee Hinckley): changes to make the - library usable as C++ code, and on Apollo without any warning. - - BUGS CORRECTED: - - from nazgul@alphalpha.com (Kee Hinckley): the xpm include files was - declaring XWritePixmapFile as taking in arg a Pixmap pointer instead - of a Pixmap. - -2.5 (90/10/17) - - BUGS CORRECTED: - - XWritePixmapFile was not closing the file while ending normally. - -2.4 (90/09/06) - - NEW FEATURES: - - XReadPixmapFile reads from a piped uncompress if the given filename - ends by .Z or if filename.Z exists, - - XWritePixmapFile writes to a piped compress if the given filename - ends by .Z. - - BUGS CORRECTED: - - demo now deals with window manager. - - CHANGES TO THE DOC: - - documentation about compressed files management. - -2.3 (90/08/30) - - BUGS CORRECTED: - - handle monochrome display correctly, - - comments can be empty. - -2.2 (90/08/27) - - BUGS CORRECTED: - - when reading some invalid free was dumping core on some machine. - -2.1 (90/08/24) - - First distribution of XPM2. - diff --git a/nx-X11/extras/Xpm/COPYRIGHT b/nx-X11/extras/Xpm/COPYRIGHT deleted file mode 100644 index 446fa4cd8..000000000 --- a/nx-X11/extras/Xpm/COPYRIGHT +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -Arnaud LE HORS BULL Research FRANCE -- Koala Project - (XPM - X PixMap format version 2 & 3) - Internet: lehors@sophia.inria.fr -Surface Mail: Arnaud LE HORS, INRIA - Sophia Antipolis, - 2004, route des Lucioles, 06565 Valbonne Cedex -- FRANCE - Voice phone: (33) 93.65.77.71, Fax: (33) 93 65 77 66, Telex: 97 00 50 F diff --git a/nx-X11/extras/Xpm/FAQ.html b/nx-X11/extras/Xpm/FAQ.html deleted file mode 100644 index 18d4ee6ff..000000000 --- a/nx-X11/extras/Xpm/FAQ.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - -FAQ XPM - - - -

The XPM
-Frequently Asked Questions

-

-This article contains the answers to some Frequently Asked Questions about the -XPM format and/or library. If you don't find the answer to your problem here, -then you can mail either to lehors@sophia.inria.fr or to the mailing list -xpm-talk@sophia.inria.fr. - - -

Contents

- -
    -
  1. How do I convert my images to or from XPM ? -
  2. Why are my XPM files said to be invalid ? -
  3. Why does my program core dumps using XPM ? -
  4. Why does my program core dumps using XPM with a widget ? -
  5. How can I get a non rectangular icon using XPM ? -
  6. What exactly triggers the creation of a mask when using XPM ? -
  7. How should I use the mask ? -
  8. Is there a string to pixmap converter somewhere ? -
  9. How can I edit XPM icons ? -
  10. Is there a collection of icons somewhere ? -
  11. The documentation fails to print out. Why ? -
  12. Copyright -
- - -

1. How do I convert my images to or from XPM ?

-

- Netpbm is surely the best image conversion package that I know of. It defines - formats for color, gray and monochrome images and provides a set of filters. - Thus a GIF image can be converted to XPM with something like: -

- $ giftoppm youricon.gif | ppmtoxpm > youricon.xpm -

- The latest release can be found at least from wuarchive.wustl.edu - (128.252.135.4), directory /graphics/graphics/packages/NetPBM - - -

2. Why are my XPM files said to be invalid ?

-

- There are three official versions of the XPM format. The XPM library since - version 3.3 can read all them but writes out only XPM 3. Also the small - program called sxpm which is part of the XPM library package can be used to - automatically translate XPM 1 and 2 files to XPM 3 with a command such as: -

- $ sxpm -nod yourxpm1or2file -o yourxpm3file -

- Also, the XPM format defines "None" to be the color name meaning - "transparent", but IXI used to hack the XPM library in its early days to - handle transparency as "#Transparent". This makes IXI format not compatible - with the official XPM format, and so not readable neither by the official XPM - library nor any of the programs built on top of it. -

- The only solutions are either to stick on IXI programs which can deal with - their format or convert your files to the standard XPM format. This can be - done simply by changing "#Transparent" to "None". - - -

3. Why does my program core dumps using XPM ?

-

- Be sure the XpmAttributes structure you pass by reference has a valid - valuemask. You can give NULL instead if you don't want to use an - XpmAttributes but if you do, you MUST initialize its valuemask component to - some valid value, at least 0, otherwise unpredictable errors can occur. -

- So instead of doing something like: -

-      XpmAttributes attrib;
-
-      XpmReadFileToPixmap(dpy, d, filename, &pixmap, &mask, &attrib);
-
-

- you should do: -

-      XpmAttributes attrib;
-
-      attrib.valuemask = 0;
-      XpmReadFileToPixmap(dpy, d, filename, &pixmap, &mask, &attrib);
-
- - -

4. Why does my program core dumps using XPM with a widget ?

-
    -
  • First the XPM library is Xlib level, so don't pass your widget as a - Drawable parameter. A Drawable is either a Window or a Pixmap. The widget's - window can do the job but: - -
  • Then a widget only gets a Window when realized, so passing XtWindow(widget) - with a not yet realized widget is wrong. Either realize you widget first or - use another window. Since the Drawable parameter is only used to specify - the screen to which the pixmap must be created on, most of the time the - default root window is just fine. -
- - -

5. How can I get a non rectangular icon using XPM ?

-

- The X Window System does not support transparent color. However there are - several ways you can use to get the same visual effect using XPM: -

    -
  • First you can use the None color to get a shape mask and use it as - explained below (question 7). - -
  • Second you can define a symbolic color name such as "mask" in the XPM - format file, then use the color overriding mechanism to set this symbolic - color to the color of the underlying object. Note that in this case the XPM - library won't create a shape mask, and that if the color of the underlying - object is changed then you'll have to create a new pixmap. -
- - -

6. What exactly triggers the creation of a mask when using XPM ?

-

- Basically a mask is created if "None" is used as one of the color of the - pixmap. Be aware that this is not only true if it is used in the XPM of the - pixmap since the colors can be overridden at load time. So a mask is created - if the "None" color is used at load time, coming either from the XPM - definition or the color overriding. - - -

7. How should I use the mask ?

-

- There are basically two ways of using the mask: -

    -
  • Use the mask as a shapemask with the X11 Nonrectangular Saphe Window - Extension. Typically this is what should be done when the icon is used in a - desktop. - -
  • Use the mask as a clipmask in the GC you pass to XCopyArea when drawing the - pixmap. So the "transparent" pixels being not actually drawn will get the - underlying pixels colors. -
- - -

8. Is there a string to pixmap converter for Motif ?

-

- Yes, Motif 2.0 or later does support XPM pixmaps as well as XBM bitmaps. - - -

9. How can I edit XPM icons ?

-

- As listed below several editors either commercial or not are supporting the - XPM format. However, pixmap is the one I would recommend since it is freely - available and, being fully dedicated to XPM, it allows to edit all the - special things, such as the symbolic color names, which makes XPM different - from all the other image formats. Pixmap can always be found by ftp from - ftp.x.org (contrib) and avahi.inria.fr (pub/pixmap). -

-Last Update: 3 August 1994 - - -
XPM Icon Editors
ProgramInfosSource/AuthorPlatformsSAXPMcost -
pixmap -Lionel Malletsourceyes3NC - -
pixt -J. Michael Flanerysourceyes1NC - -
pixed
    -
  • part of X.desktop -
  • current version doesn't work on 24-plane displays -
-
IXIMany UNIXno3N/A - -
olpixmap
    -
  • packaged with the OLIT (OpenLook) toolkit -
-
USLSun, SVR4.2, UnixWareno1N/A - -
xfedor
    -
  • only uses XLIB -
  • doesn't work on 24-plane displays -
-
Daniel Dardaillersourceyes3NC - -
SCOpaint
    -
  • included with the ODT package -
-
SCO/Wing EngODTyes2.8N/A - -
pme.icn
    -
  • written in the Icon language -
-
Icon Projectsourceyes3NC - -
PixEditT
    -
  • there is currently no support for editing the colormap -
-
Free Widget Foundationsourceyes3NC - -
xscribble -Robert Forsmansourceyes?NC - -
vueicon
    -
  • included with Vue3.0 -
-
Hewlett-PackardHPyes3N/A - -
iconedit V3 SunSoftSparc/Sun3yes2N/A - -
Pixmap Editor
    -
  • this is a Widget, not a complete program -
-
ICS?yes?? - -
ezX Sunrise Softwarey???N/A - -
XPaint
    -
  • full featured, works on all displays -
  • current release is 2.1.1 (last update January 1994) -
-
David Koblassourceyes3NC - -
Phoenix -ohtcolor@niksula.hut.fisourceyes3NC - -
pixed
    -
  • pixed is part of the TeleUSE UIMS -
  • More info is available from service@ignite.alsys.com -
-
AlsysMany UNIXyes3N/A - -
display -John Cristysourceyes3NC -
- -

-SA - Stand Alone program
-NC - No Charge (i.e. free); most programs are copyrighted.
-XPM - XPM format supported
-source - built from source code; likely works on all standard X platforms
-N/A - icon editor is normally distributed with other software - -

-Send updates, additions, corrections, etc. to dan@bristol.com - - -

10. Is there a collection of icons somewhere ?

-

- At least there is one freely available: Anthony's X Icon Library. You can - found it on several ftp servers, such as server.berkeley.edu/pub/AIcons. It - contains only small icons (less than about 100x100 pixels in size) which are - stored in groups in a logical way. Color icons are stored in XPM format and - Black & White icons in XBM. - - -

11. The documentation fails to print out. Why ?

-

- The PostScript documentation file is formatted for US letter paper. Frame - Maker tries very hard to ensure that you have the right paper and punts if - you don't. However, you can easily work around this problem by applying the - following patch. If for some reason applying the patch fails, you can still - do it by hand. Just locate the corresponding block in the PS file and remove - the lines with a leading '-' character. - By the way, this applies to any doc generated by Frame Maker. The - corresponding block might be slightly different depending on which version of - Frame Maker was used, but it is still easy to locate. - -

-*** xpm.PS      Wed Sep 11 15:47:43 1996
---- xpm-A4.PS   Thu Nov 21 09:27:28 1996
-***************
-*** 647,668 ****
-        0 ne /edown exch def 
-        /yscale exch def
-        /xscale exch def
--       FMLevel1 {
--               manualfeed {setmanualfeed} if
--               /FMdicttop countdictstack 1 add def 
--               /FMoptop count def 
--               setpapername 
--               manualfeed {true} {papersize} ifelse 
--               {manualpapersize} {false} ifelse 
--               {desperatepapersize} {false} ifelse 
--               { (Can't select requested paper size for Frame print job!) FMFAILURE } if
--               count -1 FMoptop {pop pop} for
--               countdictstack -1 FMdicttop {pop end} for 
--               }
--               {{1 dict dup /PageSize [paperwidth paperheight]put setpagedevice}stopped
--               { (Can't select requested paper size for Frame print job!) FMFAILURE } if
--                {1 dict dup /ManualFeed manualfeed put setpagedevice } stopped pop }
--       ifelse 
-        
-        FMPColor {
-                currentcolorscreen
---- 647,652 ----
-
- - -
-

Copyright (C) 1989-95 GROUPE BULL

-

-Permission is hereby granted, free of charge, to 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 -GROUPE BULL 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 GROUPE BULL shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from GROUPE BULL. - - diff --git a/nx-X11/extras/Xpm/FILES b/nx-X11/extras/Xpm/FILES deleted file mode 100644 index e1bf3fa15..000000000 --- a/nx-X11/extras/Xpm/FILES +++ /dev/null @@ -1,68 +0,0 @@ -CHANGES -COPYRIGHT -FAQ.html -FILES -Imakefile -Makefile.noX -README.html -README.AMIGA -README.MSW -namecvt -lib -lib/Imakefile -lib/Makefile.noX -lib/Makefile.AmigaGCC -lib/Smakefile -lib/Attrib.c -lib/CrBufFrI.c -lib/CrBufFrP.c -lib/CrDatFrI.c -lib/CrDatFrP.c -lib/CrIFrBuf.c -lib/CrIFrDat.c -lib/CrIFrP.c -lib/CrPFrBuf.c -lib/CrPFrDat.c -lib/CrPFrI.c -lib/Image.c -lib/Info.c -lib/RdFToBuf.c -lib/RdFToDat.c -lib/RdFToI.c -lib/RdFToP.c -lib/WrFFrBuf.c -lib/WrFFrDat.c -lib/WrFFrI.c -lib/WrFFrP.c -lib/amigax.h -lib/amigax.c -lib/create.c -lib/data.c -lib/descrip.mms -lib/hashtab.c -lib/make.com -lib/misc.c -lib/parse.c -lib/rgb.c -lib/rgbtab.h -lib/scan.c -lib/simx.h -lib/simx.c -lib/xpm.h -lib/XpmI.h -lib/Xpm-def.cpp -doc -doc/xpm.PS -sxpm -sxpm/Imakefile -sxpm/Makefile.noX -sxpm/plaid.xpm -sxpm/plaid_ext.xpm -sxpm/plaid_mask.xpm -sxpm/sxpm.c -sxpm/sxpm.man -cxpm -cxpm/Imakefile -cxpm/Makefile.noX -cxpm/cxpm.c -cxpm/cxpm.man diff --git a/nx-X11/extras/Xpm/Imakefile b/nx-X11/extras/Xpm/Imakefile deleted file mode 100644 index 32e423ea3..000000000 --- a/nx-X11/extras/Xpm/Imakefile +++ /dev/null @@ -1,73 +0,0 @@ -XCOMM -XCOMM -XCOMM Copyright (C) 1989-95 GROUPE BULL -XCOMM -XCOMM Permission is hereby granted, free of charge, to any person obtaining a -XCOMM copy of this software and associated documentation files -XCOMM (the "Software"), to deal in the Software without restriction, including -XCOMM without limitation the rights to use, copy, modify, merge, publish, -XCOMM distribute, sublicense, and/or sell copies of the Software, and to permit -XCOMM persons to whom the Software is furnished to do so, subject to the -XCOMM following conditions: -XCOMM The above copyright notice and this permission notice shall be included -XCOMM in all copies or substantial portions of the Software. -XCOMM -XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -XCOMM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -XCOMM IN NO EVENT SHALL GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -XCOMM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -XCOMM FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -XCOMM DEALINGS IN THE SOFTWARE. -XCOMM -XCOMM Except as contained in this notice, the name of GROUPE BULL shall not be -XCOMM used in advertising or otherwise to promote the sale, use or other -XCOMM dealings in this Software without prior written authorization from -XCOMM GROUPE BULL. -XCOMM - -XCOMM -XCOMM XPM Imakefile - Arnaud LE HORS -XCOMM - - -XCOMM You may need to modify the following DEFINES variable as follows: -XCOMM if your system doesn't provide strcasecmp add -DNEED_STRCASECMP -XCOMM if your system doesn't provide strdup add -DNEED_STRDUP -XCOMM if your system doesn't provide pipe add -DNO_ZPIPE -XCOMM if on your system sprintf doesn't return the number of bytes transmitted -XCOMM add -DVOID_SPRINTF - -#if defined(UltrixArchitecture) || \ - (defined(MipsArchitecture) && !defined(SGIArchitecture)) -STRDUPDEF = -DNEED_STRDUP -#else -# if defined(Win32Architecture) || (defined(HasStrcasecmp) && !HasStrcasecmp) -STRCASECMPDEF = -DNEED_STRCASECMP -# else -# if defined(SunArchitecture) && !defined(SVR4Architecture) -SPRINTFDEF = -DVOID_SPRINTF -# endif -# endif -#endif -#if defined(Win32Architecture) -ZPIPEDEF = -DNO_ZPIPE -#endif - -DEFINES = $(STRDUPDEF) $(STRCASECMPDEF) $(SPRINTFDEF) $(ZPIPEDEF) - -XCOMM You can uncomment the following line to avoid building the shared lib -XCOMM IMAKE_DEFINES = -DSharedLibXpm=NO - - -XCOMM -XCOMM Normally the following part should not need to be edited -XCOMM - -#define IHaveSubdirs -#define PassCDebugFlags "CDEBUGFLAGS=$(CDEBUGFLAGS)" "DEFINES=$(DEFINES)" - - SUBDIRS = lib sxpm cxpm - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/extras/Xpm/Makefile.noX b/nx-X11/extras/Xpm/Makefile.noX deleted file mode 100644 index aa94a2c26..000000000 --- a/nx-X11/extras/Xpm/Makefile.noX +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (C) 1989-95 GROUPE BULL -# -# Permission is hereby granted, free of charge, to 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 -# GROUPE BULL 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 GROUPE BULL shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from GROUPE BULL. -# - -# -# XPM Makefile - Arnaud LE HORS -# - -# NOTE: if the build fails on your system using this Makefile, you need to check -# and possibly edit each of the Makefile in the subdirs lib, sxpm, and cxpm. - -SUBDIRS= lib sxpm cxpm - -MAKE=make -MFLAGS=-f Makefile.noX -INSTALL= install -c -CURRENT_DIR=. - -all:: - @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ - for i in $(SUBDIRS) ;\ - do \ - (cd $$i ; echo "making" all "in $(CURRENT_DIR)/$$i..."; \ - $(MAKE) $(MFLAGS) all); \ - done -clean:: - @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ - for i in $(SUBDIRS) ;\ - do \ - (cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \ - $(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \ - done - - -install:: - @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ - for i in $(SUBDIRS) ;\ - do \ - (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \ - $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' INSTALL='$(INSTALL)' install); \ - done - -install.man:: - @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ - for i in $(SUBDIRS) ;\ - do \ - (cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \ - $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.man); \ - done diff --git a/nx-X11/extras/Xpm/README.AMIGA b/nx-X11/extras/Xpm/README.AMIGA deleted file mode 100644 index 7a40137dd..000000000 --- a/nx-X11/extras/Xpm/README.AMIGA +++ /dev/null @@ -1,10 +0,0 @@ -The XPM library for Amiga works best with AmigaOS 3.x, but will work -(with limited color support) with earlier OS versions too. It can be -compiled with both SAS/C and GCC (makefiles are included). - -All functions except the Xpm*Pixmap* functions are supported. - -I have also written some Amiga-specific utility functions (not -included). Contact me if you would like to have them too. - --Lorens Younes (d93-hyo@nada.kth.se) diff --git a/nx-X11/extras/Xpm/README.MSW b/nx-X11/extras/Xpm/README.MSW deleted file mode 100644 index f6315256e..000000000 --- a/nx-X11/extras/Xpm/README.MSW +++ /dev/null @@ -1,127 +0,0 @@ - -README.MSW hedu@cul-ipn.uni-kiel.de 5/94 - - The XPM library for MS-Windows - -Motivated by the wxWindows library, which is a (freely available) toolkit -for developing multi-platform, graphical applications from the same body -of C++ code, I wanted to have XPM pixmaps for MS-windows. Instead of rewriting -a XPM-parser I managed to port the XPM-library-code to MS-windows. -Thanks to Anaud Le Hors this became a part of the official XPM-library. - -Until now it's only used together with wxWindows. And even there it's more -a kind of beta. But it should be possible to run it as a simple libxpm.a -without wxWindows. - -The key is a transformation of some X types plus some basic X functions. -There is not yet a special MSW-API, so you should know the X types used. - -The following is done in simx.h: - -typedef HDC Display; -typedef COLORREF Pixel; - -typedef struct { - Pixel pixel; - BYTE red, green, blue; -} XColor; - -typedef struct { - HBITMAP bitmap; - unsigned int width; - unsigned int height; - unsigned int depth; -} XImage; - -With these defines and the according functions from simx.c you can call -XPM-functions the way it's done under X windows. It can look like this: - - ErrorStatus=XpmCreateImageFromData(&dc, data, - &ximage,(XImage **)NULL, &xpmAttr); - ms_bitmap = ximage->bitmap; - // releases the malloc,but do not destroy the bitmap - XImageFree(ximage); - -Supported functions are the Xpm*Image* but not the Xpm*Pixmap*. - -DRAWBACKS: -The main drawback is the missing support for Colormaps! There was nothing for -it in wxWindows, so I did not know how to deal with Colormaps. - -The size of the pixmaps is bounded by malloc() (width*height*2 < 64K). - -Close colors do not look that close. But that seems to be the window system. - -Neither a special API for MSW nor a special MSW documentation other than this. -(I can only point you to wxxpm as an example , see below.) - -INSTALLATION: -There is not yet a makefile with it. Simply take all the *.c files -into your project except the files related to Pixmap operations: *P*.c. -!!!You MUST set FOR_MSW on the preprocessor options!!! -(You might uncomment NEED_STRCASECMP in xpm.h if it's in your lib) -This should compile into libxpm.a. Good luck... - -FTP: -wxWindows is currently available from the Artificial Intelligence -Applications Institute (University of Edinburgh) by anonymous FTP. - skye.aiai.ed.ac.uk pub/wxwin/ -or read http://burray.aiai.ed.ac.uk/aiai/aiai.html - -wxxpm, XPM support for wxWindows, the latest version is available at - yoda.cul-ipn.uni-kiel.de pub/wxxpm/ - and maybe in the contrib or tools of wxWindows - -Please contact me if you have suggestions, comments or problems! - -================================================================ -Some fixes and comments by Jan Wielemaker (jan@swi.psy.uva.nl), -Oct 24, 1996: - - * Please try not to disturb me on this, XPM is not my - piece of cake. - - * Hermann Dunkel has appearently moved in virtual space. - -Changes: - - * I've used the xpm package under NT 4.0 and MSVC++ 4.2. - - * I've made a big performance improvement in - ParseAndPutPixels(), fixed creation of the mask in - SetColor() in create.c. I looked into XCreateImage() - in simx.c, but commented out my improvement for reasons - you'll find there. If you know what is going on, statement - (1) does not apply to you. - -Comments on installation: - - * Donot include the to/from pixmap files into the project. - These are the ones containing a capital P somewhere in their - name. You can also first include all, and then remove all - the files you get errors on :-) - - * The DC that is requested should be a valid memory DC, thus - CreateCompatibleDC(NULL) provides a good generic one, but - GetDC(NULL) doesn't! This costed me some time. - - * The real difficulty is using the mask, mostly due to the - bad documentation. If 95 or NT is your target, use: - - MaskBlt(context.hdc, // Destination DC - x, y, w, h, // Destination area - mhdc, // Memory DC with the image selected - sx, sy, // Source X,Y - msk, // HBITMAP of the mask - sx, sy, // Mask X,Y - MAKEROP4(SRCPAINT, SRCCOPY)); // The magic op code. -================================================================ - - --- - ////|\\\\ \\\\\\ Hermann Dunkel - O O ////// IPN Uni Kiel, Germany - | \\\\\\ Tel: +49 431 / 880 3144 - \___/ ////// E-mail: hedu@cul-ipn.uni-kiel.de - \_/ \\\\\\ X.400 : c=de;a=d400;p=uni-kiel;ou=nw-didaktik;s=dunkel - diff --git a/nx-X11/extras/Xpm/README.XFree86 b/nx-X11/extras/Xpm/README.XFree86 deleted file mode 100644 index a3400206f..000000000 --- a/nx-X11/extras/Xpm/README.XFree86 +++ /dev/null @@ -1,4 +0,0 @@ -When importing version A.Bc of Xpm, use: - - cvs import -m "Xpm version A.Bc" xc/extras/Xpm XPM XPM-A_Bc - diff --git a/nx-X11/extras/Xpm/README.html b/nx-X11/extras/Xpm/README.html deleted file mode 100644 index 6711f23b3..000000000 --- a/nx-X11/extras/Xpm/README.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - -XPM README - - - -

XPM README

- -

Contents

- -
    -
  1. What Is XPM? -
  2. Where to get XPM? -
  3. Documentation -
  4. Installation -
      -
    1. With imake -
    2. Without imake -
    -
  5. SXPM -
  6. CXPM -
  7. Other Tools -
  8. Discussion -
  9. Copyright -
- - -

1. What Is XPM?

-

-XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files. -

-Here is provided a library containing a set of four functions, similar to the -X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData, -XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap for -respectively including, storing, reading and writing this format, plus four -other: XpmCreateImageFromData, XpmCreateDataFromImage, XpmReadFileToImage and -XpmWriteFileFromImage for working with images instead of pixmaps. -

-This new version provides a C includable format, defaults for different types -of display: monochrome/color/grayscale, hotspot coordinates and symbol names -for colors for overriding default colors when creating the pixmap. It provides -a mechanism for storing information while reading a file which is re-used -while writing. This way comments, default colors and symbol names aren't lost. -It also handles "transparent pixels" by returning a shape mask in addition to -the created pixmap. -

-See the XPM Manual for details. - - -

2. Where to get XPM?

-

-New XPM updates are announced on the comp.windows.x newsgroup, and on the -"xpm-talk" list and you can always consult the XPM Home page at http://www.inria.fr/koala/lehors/xpm.html -

The latest "official" XPM release can always be found at: -
Boston, USA: ftp://ftp.x.org/contrib -
Sophia Antipolis, France: ftp://koala.inria.fr/pub/xpm - - -

3. Documentation

-

-Old users might read the CHANGES file for a history -of changes interesting the user. -

-Read the doc. The documentation is in PostScript format (doc/xpm.PS) and has been produced with -FrameMaker. The source files are available on request. -

-A FAQ (Frequently Asked Questions) is also provided, -so if you experience any problem you should have a look at this file. - - -

4. Installation

-

-To obtain the XPM library, first uncompress and untar the compressed tar file -in an appropriate directory. -

-Then you can either compile XPM via "imake" or in a stand-alone way. - -

4.1. With imake

-

- Imakefiles are provided to build both shared and unshared libraries. - However, building a shared lib is very OS dependent and often requires - specific files which are not available. Also config files are often not - set correctly for this task. So if it fails you can avoid trying to - build one and simply build the static library instead. In order to do - so you should edit the top Imakefile to add -DSharedLibXpm=NO to the - definition of IMAKE_DEFINES as described. -

- The compilation and installation of the library and the sxpm program - should only require you to edit the top Imakefile. But you should do so - in order to specify the locations where the various files should be - installed and to set the DEFINES variable accordingly to your system. -

- On Solaris 2.* the compilation works only in the native svr4 - environment, avoid the bsd one or it won't compile. Especially you - should be using /opt/SUNWspro/bin/cc and not /usr/ucb/cc. - Also since the compiler is no longer part of the OS distribution a lot - of people use gcc instead. This is fine, but be aware that the imake - tool you get as part of the X Window System on a solaris box is - configured for cc. Therefore the compilation using the generated - Makefiles will not succeed unless you have changed the default - configuration. An easy work around is to directly edit the generated - lib/Makefile to change '-K pic' to '-fpic'. Fixing your imake - configuration would be better though. -

- On Linux, if you do not use ELF yet you'd better get the binary - distribution available from sunsite. Because it's really a pain to - build a shared lib and the current XPM distribution doesn't contain - the jump files you would need to do so. On the other hand people have - had no problems building it using ELF. -

- Then execute the following command: -

-		xmkmf -a
-
-

- or if this option is not supported by your version of xmkmf: -

-		xmkmf
-		make Makefiles
-		make includes
-		make depend		(optional)
-
-

- Then simply execute: -

-		make
-
-

- which will build the XPM library and the sxpm application. - Then do: -

-	     	make install
-		make install.man
-
-

- which will install the library and the sxpm program and man page. -

- If it fails, be sure you have set the DEFINES correctly in the top - Imakefile to suit your machine. - -

NOTE ON USING IMAKE:

-

- Building the XPM distribution with imake requires to have imake - correctly installed and configured on your - system. I do my best at tweaking the Imakefiles so they work with - as many imake flavors people might have as possible but there is - nothing I can do against wrong imake configurations. So if your - build fails using imake, don't send me email for advice. Get your - imake configuration fixed or forget about it! - - -

4.2. Without imake

-

- A set of makefiles is provided for those who do not have imake - available on their system. However, this is only provided as a - convenience and you should be considered as a starting point and not as - something ready to use. These makefiles, called Makefile.noX, will most - likely require some editing in order be set accordingly to your system. -

- Once this setting is done, you should be able to compile XPM, by - executing the following command: -

-	        make -f Makefile.noX
-
-

- Then to install it, do: -

-		make -f Makefile.noX install
-
- - -

5. SXPM

-

-In addition to the library the sxpm tool is provided to show XPM file and -convert them from XPM1 or XPM2 to XPM version 3. If you have previously done -'make' or 'make all' you should already have it, otherwise just do: -

-		      cd sxpm; make
-
-

-This application shows you most of the features of XPM and its source can be -used to quickly see how to use the provided functions. -

-By executing 'sxpm -help' you will get the usage. -

-Executing 'sxpm -plaid' will show a demo of the XpmCreatePixmapFromData -function. The pixmap is created from the static variable plaid defined in the -sxpm.c file. sxpm will end when you press the key 'q' in the created window. -

-Executing 'sxpm -plaid -sc lines_in_mix blue' will show the feature of -overriding color symbols giving a colorname, executing 'sxpm -plaid -sp -lines_in_mix 1' will show overriding giving a pixel value, and executing 'sxpm --plaid -cp red 0' will show overriding giving a color value. -

-Then you should try 'sxpm -plaid -o output' to get an output file using the -XpmWriteFileFromPixmap function. -

-You can now try 'sxpm -plaid -o - -nod -rgb /usr/lib/X11/rgb.txt' to directly -get the pixmap printed out on the standard output with colornames instead of -rgb values. -

-Then you should try 'sxpm plaid.xpm' to use the XpmReadFileToPixmap function, -and 'cat plaid_mask.xpm|sxpm' to see how "transparent pixels" are handled. -

-The XpmCreatePixmapFromData function is on purpose called without any XpmInfos -flag to show the utility of this one. Indeed, compare the color section of the -two files foo and bar obtained from 'sxpm -nod -plaid -o foo' and 'sxpm -nod -plaid.xpm -o bar'. All the default colors and also the comments have been -restored. -

-To end look at plaid_ext.xpm and try "sxpm -nod plaid_ext.xpm -v" to see how -extensions are handled. -

-Of course, other combinations are allowed and should be tried. Thus, 'sxpm -plaid.xpm -o output -nod' will show you how to convert a file from XPM1 or XPM2 -to a XPM version 3 using sxpm. -

-See the manual page for more detail. - - -

6. CXPM

-

-The cxpm tool is provided to help you figure out whether an XPM file is correct -or not with regard to its format. If you have previously done 'make' or -'make all' you should already have it, otherwise just do: -

-		      cd cxpm; make
-
-

-The related man page will tell you everything about it but here is a simple -example of what it does: -

-$ ./cxpm bogus_pixmap
-Xpm Error: Invalid XPM file.
-Error found line 3 near character 5
-
-

-It is pretty limited but at least, unlike sxpm, it gives you some hint on where -the error occured within the file. - - -

7. Other Tools

-

-Several converters dealing with XPM and a pixmap editor can be found in the -xpm-contrib distribution. Also I recommend the use of netpbm to do any kind of -general image operations such as scaling, resizing, dithering, and to convert -from and to any other image format. - -

8. Discussion

-

-There is a mailing list to discuss about XPM which is xpm-talk@sophia.inria.fr. -Any request to subscribe should be sent to xpm-talk-request@sophia.inria.fr. -The archive of the xpm-talk list is available through the web at -http://zenon.inria.fr/koala/xpm-talk-hypermail -and through ftp at ftp://koala.inria.fr/pub/xpm/xpm-talk-archive -

-Please mail any bug reports or modifications done, comments, suggestions, -requests for updates or patches to port on another machine to: - -

Email: lehors@sophia.inria.fr -
Phone: +33 (0)4 93 65 78 89 -
Surface Mail:
-Arnaud Le Hors
-Inria BP.93
-2004, Route des lucioles
-06902 Sophia Antipolis Cedex
-FRANCE - - -


-

Copyright (C) 1989-95 GROUPE BULL

-

-Permission is hereby granted, free of charge, to 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 -GROUPE BULL 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 GROUPE BULL shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from GROUPE BULL. - diff --git a/nx-X11/extras/Xpm/cxpm/Imakefile b/nx-X11/extras/Xpm/cxpm/Imakefile deleted file mode 100644 index 97ac8e66f..000000000 --- a/nx-X11/extras/Xpm/cxpm/Imakefile +++ /dev/null @@ -1,66 +0,0 @@ -XCOMM -XCOMM -XCOMM Copyright (C) 1998 Arnaud LE HORS -XCOMM -XCOMM Permission is hereby granted, free of charge, to any person obtaining a -XCOMM copy of this software and associated documentation files -XCOMM (the "Software"), to deal in the Software without restriction, including -XCOMM without limitation the rights to use, copy, modify, merge, publish, -XCOMM distribute, sublicense, and/or sell copies of the Software, and to permit -XCOMM persons to whom the Software is furnished to do so, subject to the -XCOMM following conditions: -XCOMM The above copyright notice and this permission notice shall be included -XCOMM in all copies or substantial portions of the Software. -XCOMM -XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -XCOMM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -XCOMM IN NO EVENT SHALL Arnaud LE HORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -XCOMM OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -XCOMM ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -XCOMM OTHER DEALINGS IN THE SOFTWARE. -XCOMM -XCOMM Except as contained in this notice, the name of Arnaud LE HORS shall not -XCOMM be used in advertising or otherwise to promote the sale, use or other -XCOMM dealings in this Software without prior written authorization from -XCOMM Arnaud LE HORS. -XCOMM - -XCOMM -XCOMM XPM Imakefile - Arnaud LE HORS -XCOMM - -XCOMM default locations -#ifndef XpmBinDir -#define XpmBinDir $(BINDIR) -#endif -#ifndef XpmManDir -#define XpmManDir $(MANDIR) -#endif -#ifndef XpmIncDir -#define XpmIncDir $(BUILDINCTOP) -#endif - - XPMBINDIR = XpmBinDir - XPMMANDIR = XpmManDir - XPMINCDIR = XpmIncDir - - INCLUDES = -I$(BUILDINCDIR) -I$(XPMINCDIR) - -#ifdef OsNameDefines -OS_NAME_DEFINES = OsNameDefines -#endif - - SRCS = cxpm.c - OBJS = cxpm.o - -#if (ProjectX < 6) -AllTarget(cxpm) -#else -AllTarget(ProgramTargetName(cxpm)) -#endif -NormalProgramTarget(cxpm,$(OBJS),$(DEPLIB),$(LOCAL_LIBRARIES),) -InstallProgram(cxpm,$(XPMBINDIR)) -InstallManPage(cxpm,$(XPMMANDIR)) -DependTarget() -LintTarget() diff --git a/nx-X11/extras/Xpm/cxpm/Makefile.noX b/nx-X11/extras/Xpm/cxpm/Makefile.noX deleted file mode 100644 index 9b51755f5..000000000 --- a/nx-X11/extras/Xpm/cxpm/Makefile.noX +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 1998 Arnaud LE HORS -# -# Permission is hereby granted, free of charge, to 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 -# Arnaud LE HORS 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 Arnaud LE HORS shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from Arnaud LE HORS. -# - -# -# XPM Makefile - Arnaud LE HORS -# - -# where the program will be installed -DESTBINDIR=/usr/local/bin/X11 -# where the man page will be installed -MANDIR=/usr/local/man/manl - -CC = cc -RM = rm -f -# on sysV, define this as cp. -INSTALL = install -c - -CDEBUGFLAGS= -O - -INCLUDES= -I.. - -OBJS= cxpm.o - -CFLAGS= $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES) - -all: cxpm - -clean: - $(RM) *.o cxpm - -cxpm: cxpm.o - $(CC) $(CFLAGS) cxpm.o -o cxpm - -install: - $(INSTALL) -m 0755 cxpm $(DESTBINDIR) - -install.man: - $(INSTALL) -m 0644 cxpm.man $(MANDIR)/cxpm.l - -# Other dependencies. -cxpm.o: ../lib/XpmI.h ../lib/data.c ../lib/parse.c ../lib/RdFToI.c \ - ../lib/hashtab.c ../lib/misc.c ../lib/Attrib.c ../lib/Image.c diff --git a/nx-X11/extras/Xpm/cxpm/cxpm.c b/nx-X11/extras/Xpm/cxpm/cxpm.c deleted file mode 100644 index 6a7cd9db3..000000000 --- a/nx-X11/extras/Xpm/cxpm/cxpm.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 1998 Arnaud LE HORS - * - * Permission is hereby granted, free of charge, to 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 - * Arnaud LE HORS 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 Arnaud LE HORS shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Arnaud LE HORS. - */ -/* $XFree86: xc/extras/Xpm/cxpm/cxpm.c,v 1.2 2001/08/01 00:44:34 tsi Exp $ */ - -/*****************************************************************************\ -* cxpm.c: * -* * -* Check XPM File program * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#define CXPMPROG - -#include "XpmI.h" - -#undef xpmGetC -#define xpmGetC(data) sGetc(data, data->stream.file) -#define Getc sGetc -#define Ungetc sUngetc - - -/* - * special getc and ungetc counting read lines and characters - * note that 's' could stand both for "special" and "slow" ;-) - */ -static int -sGetc(data, file) - xpmData *data; - FILE *file; -{ - int c = getc(data->stream.file); - if (c == '\n') { - data->lineNum++; - data->charNum = 0; - } else { - data->charNum++; - } - return c; -} - -static void -sUngetc(data, c, file) - xpmData *data; - int c; - FILE *file; -{ - ungetc(c, data->stream.file); - if (c == '\n') { - data->lineNum--; - data->charNum = 0; - } else { - data->charNum--; - } -} - -/* include all the code we need (yeah, I know, quite ugly...) */ -#include "data.c" -#include "parse.c" -#include "RdFToI.c" /* only for OpenReadFile and xpmDataClose */ -#include "hashtab.c" -#include "misc.c" -#include "Attrib.c" -#include "Image.c" - -void -ErrorMessage(ErrorStatus, data) - int ErrorStatus; - xpmData *data; - -{ - char *error = NULL; - - switch (ErrorStatus) { - case XpmSuccess: - return; - case XpmOpenFailed: - error = "Cannot open file"; - break; - case XpmFileInvalid: - error = "Invalid XPM file"; - break; - case XpmNoMemory: - error = "Not enough memory"; - break; - case XpmColorFailed: - error = "Failed to parse color"; - break; - } - - if (error) { - fprintf(stderr, "Xpm Error: %s.\n", error); - if (ErrorStatus == XpmFileInvalid && data) - fprintf(stderr, "Error found line %d near character %d\n", - data->lineNum + 1, - data->charNum + 1); - exit(1); - } -} - -int -main(argc, argv) - int argc; - char **argv; -{ - XpmImage image; - char *filename; - int ErrorStatus; - xpmData data; - - if (argc > 1) { - if (!strcmp(argv[1], "-?") || !strncmp(argv[1], "-h", 2)) { - fprintf(stderr, "Usage: %s [filename]\n", argv[0]); - exit(1); - } - filename = argv[1]; - } else { - filename = NULL; - } - - xpmInitXpmImage(&image); - - if ((ErrorStatus = OpenReadFile(filename, &data)) != XpmSuccess) - ErrorMessage(ErrorStatus, NULL); - - ErrorStatus = xpmParseData(&data, &image, NULL); - ErrorMessage(ErrorStatus, &data); - - xpmDataClose(&data); - XpmFreeXpmImage(&image); - - exit(0); -} diff --git a/nx-X11/extras/Xpm/cxpm/cxpm.man b/nx-X11/extras/Xpm/cxpm/cxpm.man deleted file mode 100644 index 21d63fd21..000000000 --- a/nx-X11/extras/Xpm/cxpm/cxpm.man +++ /dev/null @@ -1,49 +0,0 @@ -.\"Copyright (C) 1998 Arnaud LE HORS -.\" -.\"Permission is hereby granted, free of charge, to 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 -.\"Arnaud LE HORS 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 Arnaud LE HORS shall not be -.\"used in advertising or otherwise to promote the sale, use or other dealings -.\"in this Software without prior written authorization from Arnaud LE HORS. -.\" -.nr )S 12 -.TH CXPM 1 -.PD -.ad b -.SH NAME -cxpm \- Check an XPM (X PixMap) file - XPM 1, 2, or 3. -.SH SYNOPSIS -\fBcxpm\fR -[\|\fIfilename\fP\|] -.SH DESCRIPTION -.PP -The \fBcxpm\fP program can be used to check the format of any XPM (version 1, 2, -or 3) file. On error, unlike \fBsxpm\fR, \fBcxpm\fR prints out an error message -indicating where the parser choked. This should help finding out what's wrong -with an XPM file but do not expect too much from it though. This is not even -close from being some kind of lint program for XPM. First, it stops at the -first error it encounters - so several fix and retry cycles may be necessary to -get your file to parse successfully. Second, \fBcxpm\fP only cares about -the format. If, for instance, your pixmap uses too many colors for your system -you still may experience difficulties displaying it. Be warned. -.PP -When no \fIfilename\fP is given \fBcxpm\fR reads from the standard input. -.SH AUTHOR -Arnaud Le Hors (lehors@sophia.inria.fr) -.br -Copyright (C) 1998 by Arnaud LE HORS. diff --git a/nx-X11/extras/Xpm/doc/xpm.PS.gz b/nx-X11/extras/Xpm/doc/xpm.PS.gz deleted file mode 100644 index 40e25de9d..000000000 Binary files a/nx-X11/extras/Xpm/doc/xpm.PS.gz and /dev/null differ diff --git a/nx-X11/extras/Xpm/lib/Imakefile b/nx-X11/extras/Xpm/lib/Imakefile deleted file mode 100644 index 427960743..000000000 --- a/nx-X11/extras/Xpm/lib/Imakefile +++ /dev/null @@ -1,185 +0,0 @@ -XCOMM -XCOMM Copyright (C) 1989-95 GROUPE BULL -XCOMM -XCOMM Permission is hereby granted, free of charge, to any person obtaining a -XCOMM copy of this software and associated documentation files -XCOMM (the "Software"), to deal in the Software without restriction, including -XCOMM without limitation the rights to use, copy, modify, merge, publish, -XCOMM distribute, sublicense, and/or sell copies of the Software, and to permit -XCOMM persons to whom the Software is furnished to do so, subject to the -XCOMM following conditions: -XCOMM The above copyright notice and this permission notice shall be included -XCOMM in all copies or substantial portions of the Software. -XCOMM -XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -XCOMM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -XCOMM IN NO EVENT SHALL GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -XCOMM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -XCOMM FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -XCOMM DEALINGS IN THE SOFTWARE. -XCOMM -XCOMM Except as contained in this notice, the name of GROUPE BULL shall not be -XCOMM used in advertising or otherwise to promote the sale, use or other -XCOMM dealings in this Software without prior written authorization from -XCOMM GROUPE BULL. -XCOMM - -XCOMM -XCOMM XPM Imakefile - Arnaud LE HORS -XCOMM - -XCOMM default locations -#ifndef XpmLibDir -#define XpmLibDir $(USRLIBDIR) -#endif -#ifndef XpmIncDir -#define XpmIncDir $(INCDIR) -#endif - -XCOMM If not already set in top dir, -XCOMM you can uncomment the following line to avoid building the shared lib -XCOMM #define SharedLibXpm NO -XCOMM SGI requires a specification file for shared library that we don't have -#ifndef SharedLibXpm -# define SharedLibXpm (HasSharedLibraries && \ - !(defined(SGIArchitecture) && !SystemV4)) -#endif - -#ifndef NormalLibXpm -#define NormalLibXpm (!SharedLibXpm || ForceNormalLib) -#endif - -#if defined(RsArchitecture) || defined(Win32Architecture) -REQUIREDLIBS = $(XLIB) -#endif - -XCOMM on Dec Alpha we need to define the following to build the shared library -#ifdef AlphaArchitecture -REQUIREDLIBS = $(LDPRELIB) $(XLIB) -SO_REQLIBS = -lX11 -lc -#endif - -XCOMM If DEFINES has not been defined in top dir, this can be done here. -XCOMM You may need to modify the following DEFINES variable as follows: -XCOMM if your system doesn't provide strcasecmp add -DNEED_STRCASECMP -XCOMM if your system doesn't provide strdup add -DNEED_STRDUP -XCOMM if your system doesn't provide pipe add -DNO_ZPIPE -XCOMM if on your system sprintf doesn't return the number of bytes transmitted -XCOMM add -DVOID_SPRINTF - -#if defined(UltrixArchitecture) || \ - (defined(MipsArchitecture) && !defined(SGIArchitecture)) -STRDUPDEF = -DNEED_STRDUP -#else -# if defined(Win32Architecture) || (defined(HasStrcasecmp) && !HasStrcasecmp) -STRCASECMPDEF = -DNEED_STRCASECMP -# else -# if defined(SunArchitecture) && !defined(SVR4Architecture) -SPRINTFDEF = -DVOID_SPRINTF -# endif -# endif -#endif -#if defined(Win32Architecture) -ZPIPEDEF = -DNO_ZPIPE -#endif - -DEFINES = $(STRDUPDEF) $(STRCASECMPDEF) $(SPRINTFDEF) $(ZPIPEDEF) - -XCOMM -XCOMM Normally the following part should not need to be edited -XCOMM - -XPMLIBDIR = XpmLibDir -XPMINCDIR = XpmIncDir - -XCOMM get the version numbers from the xpm include file -#define XPM_NUMBERS -#include "xpm.h" -SOXPMLIBREV = XpmVersion./**/XpmRevision - -HEADERS = xpm.h - SRCS = data.c create.c misc.c rgb.c scan.c parse.c hashtab.c \ - CrBufFrI.c CrDatFrP.c CrPFrBuf.c RdFToI.c WrFFrI.c \ - CrBufFrP.c CrIFrBuf.c CrPFrDat.c RdFToP.c WrFFrP.c \ - CrDatFrI.c CrIFrDat.c RdFToDat.c WrFFrDat.c \ - Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c - - OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \ - CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o \ - CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o \ - CrDatFrI.o CrIFrDat.o RdFToDat.o WrFFrDat.o \ - Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o - - INCLUDES = -I. - LINTLIBS = $(LINTXTOLL) $(LINTXLIB) - -#ifdef OsNameDefines -OS_NAME_DEFINES = OsNameDefines -#endif - -#define DoSharedLib SharedLibXpm -#define DoNormalLib NormalLibXpm - -#if (ProjectX < 5) - STD_DEFINES = LibraryDefines - CDEBUGFLAGS = LibraryCDebugFlags -#else -#define LibName Xpm -#define SoRev SOXPMLIBREV -#define IncSubdir X11 -/* we have to cheat on Library.tmpl to get what we want... */ -#define INCDIR XPMINCDIR -#define USRLIBDIR XPMLIBDIR -#define SHLIBDIR XPMLIBDIR -#include -#undef INCDIR -#undef USRLIBDIR -#undef SHLIBDIR -#endif - -#if (ProjectX < 6) - - INSTALLFLAGS = $(INSTINCFLAGS) - -#if (ProjectX < 5) - -#if DoSharedLib -SharedLibraryObjectRule() -NormalSharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS)) -InstallSharedLibrary(Xpm,$(SOXPMLIBREV),$(XPMLIBDIR)) -#else -NormalLibraryObjectRule() -#endif -NormalLibraryTarget(Xpm,$(OBJS)) -InstallLibrary(Xpm,$(XPMLIBDIR)) - -#else /* (ProjectX < 5) */ - -LibraryObjectRule() - -#if DoSharedLib -# if DoNormalLib -SharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS),shared,..) -# else -SharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS),.,.) -#endif -InstallSharedLibrary(Xpm,$(SOXPMLIBREV),$(XPMLIBDIR)) -#endif -#if DoNormalLib -NormalLibraryTarget(Xpm,$(OBJS)) -InstallLibrary(Xpm,$(XPMLIBDIR)) -#endif - -#endif /* (ProjectX < 5) */ - -InstallMultiple($(HEADERS),$(XPMINCDIR)) -BuildIncludes($(HEADERS),.,.) - -LintLibraryTarget(Xpm,$(SRCS)) -InstallLintLibrary(Xpm,$(LINTLIBDIR)) -NormalLintTarget($(SRCS)) - -#endif /* (ProjectX < 6) */ - -DependTarget() diff --git a/nx-X11/extras/Xpm/lib/Makefile.AmigaGCC b/nx-X11/extras/Xpm/lib/Makefile.AmigaGCC deleted file mode 100644 index b8aa50f8a..000000000 --- a/nx-X11/extras/Xpm/lib/Makefile.AmigaGCC +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright (C) 1996 Lorens Younes -# -# Permission is hereby granted, free of charge, to 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 -# Lorens Younes 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 Lorens Younes shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from Lorens Younes. -# - -# -# XPM Amiga GCC Makefile - Lorens Younes (d93-hyo@nada.kth.se) -# - -CC = gcc -AR = ar r -RANLIB = ranlib -RM = rm -f -INSTALL = install -c -MKDIRHIER = mkdir -LN = ln -s -CHMOD = chmod - -CDEBUGFLAGS = -O -DEFINES = -DNO_ZPIPE -DAMIGA - -DESTBINDIR= /projects/bin -DESTLIBDIR= /projects/lib -DESTINCLUDEDIR= /projects/include - -OBJS= data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \ - WrFFrI.o RdFToI.o CrIFrDat.o CrDatFrI.o \ - CrIFrBuf.o CrBufFrI.o \ - RdFToDat.o WrFFrDat.o \ - Attrib.o Image.o Info.o RdFToBuf.o WrFFrBuf.o \ - amigax.o - -CFLAGS = $(CDEBUGFLAGS) $(DEFINES) - -all: libXpm.a - -clean: - -$(RM) *.o libXpm.a - -libXpm.a: $(OBJS) - $(AR) $@ $(OBJS) - $(RANLIB) $@ - -install: - $(INSTALL) -m 0664 libXpm.a $(DESTLIBDIR) - cd $(DESTLIBDIR); $(RANLIB) libXpm.a - -$(MKDIRHIER) $(DESTINCLUDEDIR) - -$(CHMOD) ugo+rx $(DESTINCLUDEDIR) - $(INSTALL) -m 0444 xpm.h $(DESTINCLUDEDIR) - -# Other dependencies. -CrBufFrI.o: XpmI.h xpm.h amigax.h -CrDatFI.o: XpmI.h xpm.h amigax.h -CrIFrBuf.o: XpmI.h xpm.h amigax.h -CrIFrDat.o: XpmI.h xpm.h amigax.h -RdFToDat.o: XpmI.h xpm.h amigax.h -RdFToI.o: XpmI.h xpm.h amigax.h -WrFFrDat.o: XpmI.h xpm.h amigax.h -WrFFrI.o: XpmI.h xpm.h amigax.h -create.o: XpmI.h xpm.h amigax.h -data.o: XpmI.h xpm.h amigax.h -hashtab.o: XpmI.h xpm.h amigax.h -misc.o: XpmI.h xpm.h amigax.h -parse.o: XpmI.h xpm.h amigax.h -rgb.o: XpmI.h xpm.h amigax.h -scan.o: XpmI.h xpm.h amigax.h -Attrib.o: XpmI.h xpm.h amigax.h -Image.o: XpmI.h xpm.h amigax.h -Info.o: XpmI.h xpm.h amigax.h -RdFToBuf.o: XpmI.h xpm.h amigax.h -WrFFrBuf.o: XpmI.h xpm.h amigax.h -amigax.o: XpmI.h xpm.h amigax.h diff --git a/nx-X11/extras/Xpm/lib/Makefile.noX b/nx-X11/extras/Xpm/lib/Makefile.noX deleted file mode 100644 index 89edfd78f..000000000 --- a/nx-X11/extras/Xpm/lib/Makefile.noX +++ /dev/null @@ -1,112 +0,0 @@ -# -# Copyright (C) 1989-95 GROUPE BULL -# -# Permission is hereby granted, free of charge, to 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 -# GROUPE BULL 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 GROUPE BULL shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from GROUPE BULL. -# - -# -# XPM Makefile - Arnaud LE HORS -# - -# if your system doesn't provide strcasecmp add -DNEED_STRCASECMP -# if your system doesn't provide strdup add -DNEED_STRDUP -# if your system doesn't provide pipe add -DNO_ZPIPE -# if on your system sprintf doesn't return the number of bytes transmitted -# add -DVOID_SPRINTF -DEFINES = - -# where the library will be installed -DESTLIBDIR=/usr/local/lib/X11 -# where the include file (pxm.h) will be installed -DESTINCLUDEDIR=/usr/local/include/X11 - -CC = cc -AR = ar r -RANLIB = ranlib -RM = rm -f -# on sysV, define this as cp. -INSTALL = install -c -MKDIRHIER = mkdir -LN = ln -s - -CDEBUGFLAGS= -O - -OBJS= data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \ - WrFFrP.o RdFToP.o CrPFrDat.o CrDatFrP.o \ - WrFFrI.o RdFToI.o CrIFrDat.o CrDatFrI.o \ - CrIFrBuf.o CrPFrBuf.o CrBufFrI.o CrBufFrP.o \ - RdFToDat.o WrFFrDat.o \ - Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o - -CFLAGS= $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) - -all: ../X11/xpm.h libXpm.a - -clean: - $(RM) *.o libXpm.a - -libXpm.a: $(OBJS) - $(AR) libXpm.a $(OBJS) - $(RANLIB) libXpm.a - -install: - $(INSTALL) -m 0664 libXpm.a $(DESTLIBDIR) - cd $(DESTLIBDIR); $(RANLIB) libXpm.a - -mkdir $(DESTINCLUDEDIR) - -chmod ugo+rx $(DESTINCLUDEDIR) - $(INSTALL) -m 0444 xpm.h $(DESTINCLUDEDIR) - -../X11/xpm.h: xpm.h - @if [ -d ../X11 ]; then set +x; \ - else (set -x; $(MKDIRHIER) ../X11); fi - $(RM) ../X11/xpm.h; \ - $(LN) ../lib/xpm.h ../X11 - -# Other dependencies. -CrBufFrI.o: XpmI.h xpm.h -CrBufFrP.o: XpmI.h xpm.h -CrDatFI.o: XpmI.h xpm.h -CrDatFP.o: XpmI.h xpm.h -CrIFrBuf.o: XpmI.h xpm.h -CrIFrDat.o: XpmI.h xpm.h -CrPFrBuf.o: XpmI.h xpm.h -CrPFrDat.o: XpmI.h xpm.h -RdFToDat.o: XpmI.h xpm.h -RdFToI.o: XpmI.h xpm.h -RdFToP.o: XpmI.h xpm.h -WrFFrDat.o: XpmI.h xpm.h -WrFFrI.o: XpmI.h xpm.h -WrFFrP.o: XpmI.h xpm.h -create.o: XpmI.h xpm.h -data.o: XpmI.h xpm.h -hashtab.o: XpmI.h xpm.h -misc.o: XpmI.h xpm.h -parse.o: XpmI.h xpm.h -rgb.o: XpmI.h xpm.h -scan.o: XpmI.h xpm.h -Attrib.o: XpmI.h xpm.h -CrIFrP.o: XpmI.h xpm.h -CrPFrI.o: XpmI.h xpm.h -Image.o: XpmI.h xpm.h -Info.o: XpmI.h xpm.h -RdFToBuf.o: XpmI.h xpm.h -WrFFrBuf.o: XpmI.h xpm.h diff --git a/nx-X11/extras/Xpm/lib/Smakefile b/nx-X11/extras/Xpm/lib/Smakefile deleted file mode 100644 index 3702680f4..000000000 --- a/nx-X11/extras/Xpm/lib/Smakefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 1996 Lorens Younes -# -# Permission is hereby granted, free of charge, to 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 -# Lorens Younes 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 Lorens Younes shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from Lorens Younes. -# - -# -# XPM Makefile for SAS/C - Lorens Younes (d93-hyo@nada.kth.se) -# - -CC= sc:c/sc -OML= sc:c/oml -RM= c:delete -CP= c:copy -MKDIR= c:makedir - -CDEBUGFLAGS= opt optsched utillib -DEFINES= def=NO_ZPIPE def=NEED_STRCASECMP def=AMIGA - -DESTBINDIR= Projects:bin -DESTLIBDIR= Projects:lib -DESTINCLUDEDIR= Projects:include - -OBJS= data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \ - WrFFrI.o RdFToI.o CrIFrDat.o CrDatFrI.o \ - CrIFrBuf.o CrBufFrI.o \ - RdFToDat.o WrFFrDat.o \ - Attrib.o Image.o Info.o RdFToBuf.o WrFFrBuf.o \ - amigax.o - -CFLAGS= $(CDEBUGFLAGS) $(DEFINES) ansi nochkabort errrexx noicons nostkchk\ - verbose ignore=85+100+154+161+304 - -all: xpm.lib - -clean: - -$(RM) \#?.o \#?.lib \#?.lnk - -xpm.lib: $(OBJS) - $(OML) $@ r $(OBJS) - -install: - -$(MKDIR) $(DESTLIBDIR) - $(CP) xpm.lib $(DESTLIBDIR) - -$(MKDIR) $(DESTINCLUDEDIR) - $(CP) xpm.h $(DESTINCLUDEDIR) - $(CP) amigax.h $(DESTINCLUDEDIR) - -# Other dependencies. -CrBufFrI.o: XpmI.h xpm.h amigax.h -CrDatFI.o: XpmI.h xpm.h amigax.h -CrIFrBuf.o: XpmI.h xpm.h amigax.h -CrIFrDat.o: XpmI.h xpm.h amigax.h -RdFToDat.o: XpmI.h xpm.h amigax.h -RdFToI.o: XpmI.h xpm.h amigax.h -WrFFrDat.o: XpmI.h xpm.h amigax.h -WrFFrI.o: XpmI.h xpm.h amigax.h -create.o: XpmI.h xpm.h amigax.h -data.o: XpmI.h xpm.h amigax.h -hashtab.o: XpmI.h xpm.h amigax.h -misc.o: XpmI.h xpm.h amigax.h -parse.o: XpmI.h xpm.h amigax.h -rgb.o: XpmI.h xpm.h amigax.h -scan.o: XpmI.h xpm.h amigax.h -Attrib.o: XpmI.h xpm.h amigax.h -Image.o: XpmI.h xpm.h amigax.h -Info.o: XpmI.h xpm.h amigax.h -RdFToBuf.o: XpmI.h xpm.h amigax.h -WrFFrBuf.o: XpmI.h xpm.h amigax.h -amigax.o: XpmI.h xpm.h amigax.h diff --git a/nx-X11/extras/Xpm/lib/Xpm-def.cpp b/nx-X11/extras/Xpm/lib/Xpm-def.cpp deleted file mode 100644 index 51802949d..000000000 --- a/nx-X11/extras/Xpm/lib/Xpm-def.cpp +++ /dev/null @@ -1,37 +0,0 @@ -LIBRARY Xpm -VERSION LIBRARY_VERSION -EXPORTS - XpmAttributesSize - XpmCreateBufferFromImage - XpmCreateBufferFromPixmap - XpmCreateBufferFromXpmImage - XpmCreateDataFromImage - XpmCreateDataFromPixmap - XpmCreateDataFromXpmImage - XpmCreateImageFromBuffer - XpmCreateImageFromData - XpmCreateImageFromXpmImage - XpmCreatePixmapFromBuffer - XpmCreatePixmapFromData - XpmCreatePixmapFromXpmImage - XpmCreateXpmImageFromBuffer - XpmCreateXpmImageFromData - XpmCreateXpmImageFromImage - XpmCreateXpmImageFromPixmap - XpmFree - XpmFreeAttributes - XpmFreeExtensions - XpmFreeXpmImage - XpmFreeXpmInfo - XpmGetErrorString - XpmLibraryVersion - XpmReadFileToBuffer - XpmReadFileToData - XpmReadFileToImage - XpmReadFileToPixmap - XpmReadFileToXpmImage - XpmWriteFileFromBuffer - XpmWriteFileFromData - XpmWriteFileFromImage - XpmWriteFileFromPixmap - XpmWriteFileFromXpmImage diff --git a/nx-X11/extras/Xpm/lib/amigax.c b/nx-X11/extras/Xpm/lib/amigax.c deleted file mode 100644 index eb3bc3a4c..000000000 --- a/nx-X11/extras/Xpm/lib/amigax.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright (C) 19896 Lorens Younes - * - * Permission is hereby granted, free of charge, to 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 - * Lorens Younes 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 Lorens Younes shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Lorens Younes. - */ - -/*****************************************************************************\ -* amigax.c: * -* * -* XPM library * -* Emulates some Xlib functionality for Amiga. * -* * -* Developed by Lorens Younes (d93-hyo@nada.kth.se) 7/95 * -* Revised 4/96 * -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "XpmI.h" -#include "amigax.h" - -#include -#include - -#include - - -static struct RastPort * -AllocRastPort (unsigned int, unsigned int, unsigned int); -static void -FreeRastPort (struct RastPort *, unsigned int,unsigned int); - - -static struct RastPort * -AllocRastPort ( - unsigned int width, - unsigned int height, - unsigned int depth) -{ - struct RastPort *rp; - - rp = XpmMalloc (sizeof (*rp)); - if (rp != NULL) - { - InitRastPort (rp); - if (GfxBase->LibNode.lib_Version >= 39) - { - rp->BitMap = AllocBitMap (width, height, depth, BMF_CLEAR, NULL); - if (rp->BitMap == NULL) - { - FreeRastPort (rp, width, height); - return NULL; - } - } - else - { - unsigned int i; - - rp->BitMap = XpmMalloc (sizeof (*rp->BitMap)); - if (rp->BitMap == NULL) - { - FreeRastPort (rp, width, height); - return NULL; - } - - InitBitMap (rp->BitMap, depth, width, height); - for (i = 0; i < depth; ++i) - rp->BitMap->Planes[i] = NULL; - for (i = 0; i < depth; ++i) - { - rp->BitMap->Planes[i] = (PLANEPTR)AllocRaster (width, height); - if (rp->BitMap->Planes[i] == NULL) - { - FreeRastPort (rp, width, height); - return NULL; - } - } - } - } - - return rp; -} - - -static void -FreeRastPort ( - struct RastPort *rp, - unsigned int width, - unsigned int height) -{ - if (rp != NULL) - { - if (rp->BitMap != NULL) - { - WaitBlit (); - if (GfxBase->LibNode.lib_Version >= 39) - FreeBitMap (rp->BitMap); - else - { - unsigned int i; - - for (i = 0; i < rp->BitMap->Depth; ++i) - { - if (rp->BitMap->Planes[i] != NULL) - FreeRaster (rp->BitMap->Planes[i], width, height); - } - XpmFree (rp->BitMap); - } - } - XpmFree (rp); - } -} - - -XImage * -AllocXImage ( - unsigned int width, - unsigned int height, - unsigned int depth) -{ - XImage *img; - - img = XpmMalloc (sizeof (*img)); - if (img != NULL) - { - img->width = width; - img->height = height; - img->rp = AllocRastPort (img->width, img->height, depth); - if (img->rp == NULL) - { - FreeXImage (img); - return NULL; - } - } - - return img; -} - - -int -FreeXImage ( - XImage *ximage) -{ - if (ximage != NULL) - { - FreeRastPort (ximage->rp, ximage->width, ximage->height); - XpmFree (ximage); - } - - return Success; -} - - -int -XPutPixel ( - XImage *ximage, - int x, - int y, - unsigned long pixel) -{ - SetAPen (ximage->rp, pixel); - WritePixel (ximage->rp, x, y); - - return Success; -} - - -Status -AllocBestPen ( - Colormap colormap, - XColor *screen_in_out, - unsigned long precision, - Bool fail_if_bad) -{ - if (GfxBase->LibNode.lib_Version >= 39) - { - unsigned long r, g, b; - - r = screen_in_out->red * 0x00010001; - g = screen_in_out->green * 0x00010001; - b = screen_in_out->blue * 0x00010001; - screen_in_out->pixel = ObtainBestPen (colormap, r, g, b, - OBP_Precision, precision, - OBP_FailIfBad, fail_if_bad, - TAG_DONE); - if (screen_in_out->pixel == -1) - return False; - - QueryColor (colormap, screen_in_out); - } - else - { - XColor nearest, trial; - long nearest_delta, trial_delta; - int num_cells, i; - - num_cells = colormap->Count; - nearest.pixel = 0; - QueryColor (colormap, &nearest); - nearest_delta = ((((screen_in_out->red >> 8) - (nearest.red >> 8)) - * ((screen_in_out->red >> 8) - (nearest.red >> 8))) - + - (((screen_in_out->green >> 8) - (nearest.green >> 8)) - * ((screen_in_out->green >> 8) - (nearest.green >> 8))) - + - (((screen_in_out->blue >> 8) - (nearest.blue >> 8)) - * ((screen_in_out->blue >> 8) - (nearest.blue >> 8)))); - for (i = 1; i < num_cells; i++) - { - /* precision and fail_if_bad is ignored under pre V39 */ - trial.pixel = i; - QueryColor (colormap, &trial); - trial_delta = ((((screen_in_out->red >> 8) - (trial.red >> 8)) - * ((screen_in_out->red >> 8) - (trial.red >> 8))) - + - (((screen_in_out->green >> 8) - (trial.green >> 8)) - * ((screen_in_out->green >> 8) - (trial.green >> 8))) - + - (((screen_in_out->blue >> 8) - (trial.blue >> 8)) - * ((screen_in_out->blue >> 8) - (trial.blue >> 8)))); - if (trial_delta < nearest_delta) - { - nearest = trial; - nearest_delta = trial_delta; - } - } - screen_in_out->pixel = nearest.pixel; - screen_in_out->red = nearest.red; - screen_in_out->green = nearest.green; - screen_in_out->blue = nearest.blue; - } - - return True; -} - - -int -FreePens ( - Colormap colormap, - unsigned long *pixels, - int npixels) -{ - if (GfxBase->LibNode.lib_Version >= 39) - { - int i; - - for (i = 0; i < npixels; i++) - ReleasePen (colormap, pixels[i]); - } - - return Success; -} - - -Status -ParseColor ( - char *spec, - XColor *exact_def_return) -{ - int spec_length; - - if (spec == 0) - return False; - - spec_length = strlen(spec); - if (spec[0] == '#') - { - int hexlen; - char hexstr[10]; - - hexlen = (spec_length - 1) / 3; - if (hexlen < 1 || hexlen > 4 || hexlen * 3 != spec_length - 1) - return False; - - hexstr[hexlen] = '\0'; - strncpy (hexstr, spec + 1, hexlen); - exact_def_return->red = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen); - strncpy (hexstr, spec + 1 + hexlen, hexlen); - exact_def_return->green = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen); - strncpy (hexstr, spec + 1 + 2 * hexlen, hexlen); - exact_def_return->blue = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen); - - return True; - } - else - { - FILE *rgbf; - int items, red, green, blue; - char line[512], name[512]; - Bool success = False; - - rgbf = fopen ("LIBS:rgb.txt", "r"); - if (rgbf == NULL) - return False; - - while (fgets(line, sizeof (line), rgbf) && !success) - { - items = sscanf (line, "%d %d %d %[^\n]\n", - &red, &green, &blue, name); - if (items != 4) - continue; - - if (red < 0 || red > 0xFF - || green < 0 || green > 0xFF - || blue < 0 || blue > 0xFF) - { - continue; - } - - if (0 == xpmstrcasecmp (spec, name)) - { - exact_def_return->red = red * 0x0101; - exact_def_return->green = green * 0x0101; - exact_def_return->blue = blue * 0x0101; - success = True; - } - } - fclose (rgbf); - - return success; - } -} - - -int -QueryColor ( - Colormap colormap, - XColor *def_in_out) -{ - if (GfxBase->LibNode.lib_Version >= 39) - { - unsigned long rgb[3]; - - GetRGB32 (colormap, def_in_out->pixel, 1, rgb); - def_in_out->red = rgb[0] >> 16; - def_in_out->green = rgb[1] >> 16; - def_in_out->blue = rgb[2] >> 16; - } - else - { - unsigned short rgb; - - rgb = GetRGB4 (colormap, def_in_out->pixel); - def_in_out->red = ((rgb >> 8) & 0xF) * 0x1111; - def_in_out->green = ((rgb >> 4) & 0xF) * 0x1111; - def_in_out->blue = (rgb & 0xF) * 0x1111; - } - - return Success; -} - - -int -QueryColors ( - Colormap colormap, - XColor *defs_in_out, - int ncolors) -{ - int i; - - for (i = 0; i < ncolors; i++) - QueryColor (colormap, &defs_in_out[i]); - - return Success; -} diff --git a/nx-X11/extras/Xpm/lib/amigax.h b/nx-X11/extras/Xpm/lib/amigax.h deleted file mode 100644 index 213ed7619..000000000 --- a/nx-X11/extras/Xpm/lib/amigax.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 1996 Lorens Younes - * - * Permission is hereby granted, free of charge, to 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 - * Lorens Younes 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 Lorens Younes shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Lorens Younes. - */ - -/*****************************************************************************\ -* amigax.h: * -* * -* XPM library * -* Emulates some Xlib functionality for Amiga. * -* * -* Developed by Lorens Younes (d93-hyo@nada.kth.se) 7/95 * -* Revised 4/96 * -\*****************************************************************************/ - -#ifndef AMIGA_X -#define AMIGA_X - - -#include - -#include -#include - - -#define Success 0 - -/* really never used */ -#define ZPixmap 2 - -#define Bool int -#define Status int -#define True 1 -#define False 0 - -typedef struct ColorMap *Colormap; - -typedef void *Visual; - -typedef struct { - int width, height; - struct RastPort *rp; -} XImage; - -typedef struct { - unsigned long pixel; - unsigned short red, green, blue; -} XColor; - -typedef struct Screen Display; - - -#define XGrabServer(dpy) (Forbid ()) -#define XUngrabServer(dpy) (Permit ()) - -#define XDefaultScreen(dpy) (0) -#define XDefaultVisual(dpy, scr) (NULL) -#define XDefaultColormap(dpy, scr) (dpy->ViewPort.ColorMap) -#define XDefaultDepth(dpy, scr) (dpy->RastPort.BitMap->Depth) - -#define XCreateImage(dpy, vi, depth, format, offset, data, width, height, pad, bpl) \ - (AllocXImage (width, height, depth)) -#define XDestroyImage(img) (FreeXImage (img)) - -#define XAllocColor(dpy, cm, xc) \ - (AllocBestPen (cm, xc, PRECISION_EXACT, True)) -#define XFreeColors(dpy, cm, pixels, npixels, planes) \ - (FreePens (cm, pixels, npixels)) -#define XParseColor(dpy, cm, spec, exact_def_return) \ - (ParseColor (spec, exact_def_return)) -#define XQueryColor(dpy, cm, def_in_out) \ - (QueryColor(cm, def_in_out)) -#define XQueryColors(dpy, cm, defs_in_out, ncolors) \ - (QueryColors(cm, defs_in_out, ncolors)) - - -XImage * -AllocXImage ( - unsigned int width, - unsigned int height, - unsigned int depth); - - -int -FreeXImage ( - XImage *ximage); - - -int -XPutPixel ( - XImage *ximage, - int x, - int y, - unsigned long pixel); - - -Status -AllocBestPen ( - Colormap colormap, - XColor *screen_in_out, - unsigned long precision, - Bool fail_if_bad); - - -int -FreePens ( - Colormap colormap, - unsigned long *pixels, - int npixels); - - -Status -ParseColor ( - char *spec, - XColor *exact_def_return); - - -int -QueryColor ( - Colormap colormap, - XColor *def_in_out); - - -int -QueryColors ( - Colormap colormap, - XColor *defs_in_out, - int ncolors); - - -#endif /* AMIGA_X */ diff --git a/nx-X11/extras/Xpm/lib/descrip.mms b/nx-X11/extras/Xpm/lib/descrip.mms deleted file mode 100644 index 701884e73..000000000 --- a/nx-X11/extras/Xpm/lib/descrip.mms +++ /dev/null @@ -1,82 +0,0 @@ -cc_defs = /define=(NEED_STRCASECMP,NEED_STRDUP,NO_ZPIPE) -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - -OBJS=\ -data.obj,\ -create.obj,\ -misc.obj,\ -rgb.obj,\ -scan.obj,\ -parse.obj,\ -hashtab.obj,\ -WrFFrP.obj,\ -RdFToP.obj,\ -CrPFrDat.obj,\ -CrDatFrP.obj,\ -WrFFrI.obj,\ -RdFToI,\ -CrIFrDat.obj,\ -CrDatFrI.obj,\ -CrIFrBuf.obj,\ -CrPFrBuf.obj,\ -CrBufFrI.obj,\ -CrBufFrP.obj,\ -RdFToDat.obj,\ -WrFFrDat.obj,\ -Attrib.obj,\ -CrIFrP.obj,\ -CrPFrI.obj,\ -Image.obj,\ -Info.obj,\ -RdFToBuf.obj,\ -WrFFrBuf.obj - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : libXpm.olb sxpm.exe - @ library/compress libxpm.olb - -libXpm.olb : libXpm.olb($(OBJS)) - @ write sys$output " Libxpm available" - -sxpm.exe : sxpm.obj libXpm.olb - @ link sxpm,sxpm/opt -clean : - delete *.obj;*,libXpm.olb;* - - -# Other dependencies. -CrBufFrI.obj : XpmI.h xpm.h -CrBufFrP.obj : XpmI.h xpm.h -CrDatFI.obj : XpmI.h xpm.h -CrDatFP.obj : XpmI.h xpm.h -CrIFrBuf.obj : XpmI.h xpm.h -CrIFrDat.obj : XpmI.h xpm.h -CrPFrBuf.obj : XpmI.h xpm.h -CrPFrDat.obj : XpmI.h xpm.h -RdFToDat.obj : XpmI.h xpm.h -RdFToI.obj : XpmI.h xpm.h -RdFToP.obj : XpmI.h xpm.h -WrFFrDat.obj : XpmI.h xpm.h -WrFFrI.obj : XpmI.h xpm.h -WrFFrP.obj : XpmI.h xpm.h -create.obj : XpmI.h xpm.h -data.obj : XpmI.h xpm.h -hashtab.obj : XpmI.h xpm.h -misc.obj : XpmI.h xpm.h -parse.obj : XpmI.h xpm.h -rgb.obj : XpmI.h xpm.h -scan.obj : XpmI.h xpm.h -Attrib.obj : XpmI.h xpm.h -CrIFrP.obj : XpmI.h xpm.h -CrPFrI.obj : XpmI.h xpm.h -Image.obj : XpmI.h xpm.h -Info.obj : XpmI.h xpm.h -RdFToBuf.obj : XpmI.h xpm.h -WrFFrBuf.obj : XpmI.h xpm.h - -sxpm.obj : [-.sxpm]sxpm.c xpm.h diff --git a/nx-X11/extras/Xpm/lib/make.com b/nx-X11/extras/Xpm/lib/make.com deleted file mode 100644 index db70cc2c0..000000000 --- a/nx-X11/extras/Xpm/lib/make.com +++ /dev/null @@ -1,169 +0,0 @@ -$!---------------make.com for xpmlib---------------------------------------- -$! make xpmlib under VMS -$! -$ Make = "" -$! -$! Where are we? -$! -$ here = f$directory() -$ disk = f$trnlnm("SYS$DISK") -$ path = "''disk'"+ "''here'" -$ xpath = "''path'" - "SXPM]" + "lib]" -$ if f$trnlnm("X11").eqs."" then define x11 decw$include,'xpath -$! -$! Check for MMK/MMS -$! -$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" -$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" -$! -$! Look for the compiler used -$! -$ ccopt = "/define=(NEED_STRCASECMP,NEED_STRDUP,NO_ZPIPE)" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ comp = "__vaxc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$! -$! Produce linker-options file according to X-Release and compiler used -$! -$ open/write optf sxpm.opt -$ write optf "libxpm.olb/lib" -$ write optf "sys$share:decw$xextlibshr.exe/share" -$ write optf "sys$share:decw$xlibshr.exe/share" -$ @sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version -$ if f$extract(4,3,decw$version).eqs."1.1" -$ then -$ write optf "sys$share:decw$xtshr.exe/share" -$ endif -$ if f$extract(4,3,decw$version).eqs."1.2" -$ then -$ write optf "sys$share:decw$xtlibshrr5.exe/share" -$ endif -$ close optf -$! -$! Build the thing plain or with 'Make' -$! -$ write sys$output "Compiling XPMlib sources ..." -$ if (Make .eqs. "") -$ then -$ 'Make'/Macro = ('comp') -$ else -$ CALL MAKE CrBufFrI.OBJ "CC ''CCOPT' CrBufFrI" - - CrBufFrI.c XpmI.h xpm.h -$ CALL MAKE CrBufFrP.OBJ "CC ''CCOPT' CrBufFrP" - - CrBufFrP.c XpmI.h xpm.h -$ CALL MAKE CrDatFI.OBJ "CC ''CCOPT' CrDatFrI" - - CrDatFrI.c XpmI.h xpm.h -$ CALL MAKE CrDatFP.OBJ "CC ''CCOPT' CrDatFrP" - - CrDatFrP.c XpmI.h xpm.h -$ CALL MAKE CrIFrBuf.OBJ "CC ''CCOPT' CrIFrBuf" - - CrIFrBuf.c XpmI.h xpm.h -$ CALL MAKE CrIFrDat.OBJ "CC ''CCOPT' CrIFrDat" - - CrIFrDat.c XpmI.h xpm.h -$ CALL MAKE CrPFrBuf.OBJ "CC ''CCOPT' CrPFrBuf" - - CrPFrBuf.c XpmI.h xpm.h -$ CALL MAKE CrPFrDat.OBJ "CC ''CCOPT' CrPFrDat" - - CrPFrDat.c XpmI.h xpm.h -$ CALL MAKE RdFToDat.OBJ "CC ''CCOPT' RdFToDat" - - RdFToDat.c XpmI.h xpm.h -$ CALL MAKE RdFToI.OBJ "CC ''CCOPT' RdFToI" - - RdFToI.c XpmI.h xpm.h -$ CALL MAKE RdFToP.OBJ "CC ''CCOPT' RdFToP" - - RdFToP.c XpmI.h xpm.h -$ CALL MAKE WrFFrDat.OBJ "CC ''CCOPT' WrFFrDat" - - WrFFrDat.c XpmI.h xpm.h -$ CALL MAKE WrFFrI.OBJ "CC ''CCOPT' WrFFrI" - - WrFFrI.c XpmI.h xpm.h -$ CALL MAKE WrFFrP.OBJ "CC ''CCOPT' WrFFrP" - - WrFFrP.c XpmI.h xpm.h -$ CALL MAKE create.OBJ "CC ''CCOPT' create" - - create.c XpmI.h xpm.h -$ CALL MAKE data.OBJ "CC ''CCOPT' data" - - data.c XpmI.h xpm.h -$ CALL MAKE hashtab.OBJ "CC ''CCOPT' hashtab" - - hashtab.c XpmI.h xpm.h -$ CALL MAKE misc.OBJ "CC ''CCOPT' misc" - - misc.c XpmI.h xpm.h -$ CALL MAKE parse.OBJ "CC ''CCOPT' parse" - - parse.c XpmI.h xpm.h -$ CALL MAKE rgb.OBJ "CC ''CCOPT' rgb" - - rgb.c XpmI.h xpm.h -$ CALL MAKE scan.OBJ "CC ''CCOPT' scan" - - scan.c XpmI.h xpm.h -$ CALL MAKE Attrib.OBJ "CC ''CCOPT' Attrib" - - Attrib.c XpmI.h xpm.h -$ CALL MAKE CrIFrP.OBJ "CC ''CCOPT' CrIFrP" - - CrIFrP.c XpmI.h xpm.h -$ CALL MAKE CrPFrI.OBJ "CC ''CCOPT' CrPFrI" - - CrPFrI.c XpmI.h xpm.h -$ CALL MAKE Image.OBJ "CC ''CCOPT' Image" - - Image.c XpmI.h xpm.h -$ CALL MAKE Info.OBJ "CC ''CCOPT' Info" - - Info.c XpmI.h xpm.h -$ CALL MAKE RdFToBuf.OBJ "CC ''CCOPT' RdFToBuf" - - RdFToBuf.c XpmI.h xpm.h -$ CALL MAKE WrFFrBuf.OBJ "CC ''CCOPT' WrFFrBuf" - - WrFFrBuf.c XpmI.h xpm.h -$ write sys$output "Building XPMlib ..." -$ CALL MAKE LIBXPM.OLB "lib/crea libxpm.olb *.obj" *.OBJ -$ CALL MAKE SXPM.OBJ "CC ''CCOPT' [-.sxpm]sxpm" - - [-.sxpm]sxpm.c xpm.h -$ write sys$output "Linking SXPM ..." -$ CALL MAKE SXPM.EXE "LINK sxpm,sxpm.opt/OPT" sxpm.OBJ -$ endif -$ write sys$output "XPMlib build completed" -$ sxpm :=="$''path'sxpm.exe" -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/nx-X11/extras/Xpm/lib/rgbtab.h b/nx-X11/extras/Xpm/lib/rgbtab.h deleted file mode 100644 index 3b7518491..000000000 --- a/nx-X11/extras/Xpm/lib/rgbtab.h +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* rgbtab.h * -* * -* A hard coded rgb.txt. To keep it short I removed all colornames with * -* trailing numbers, Blue3 etc, except the GrayXX. Sorry Grey-lovers I prefer * -* Gray ;-). But Grey is recognized on lookups, only on save Gray will be * -* used, maybe you want to do some substitue there too. * -* * -* To save memory the RGBs are coded in one long value, as done by the RGB * -* macro. * -* * -* Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de) * -\*****************************************************************************/ - - -typedef struct { - char *name; - COLORREF rgb; /* it's unsigned long */ -} rgbRecord; - -/* -#define myRGB(r,g,b) \ - ((unsigned long)r<<16|(unsigned long)g<<8|(unsigned long)b) -*/ -#define myRGB(r,g,b) RGB(r,g,b) /* MSW has this macro */ - - -static rgbRecord theRGBRecords[] = -{ - {"AliceBlue", myRGB(240, 248, 255)}, - {"AntiqueWhite", myRGB(250, 235, 215)}, - {"Aquamarine", myRGB(50, 191, 193)}, - {"Azure", myRGB(240, 255, 255)}, - {"Beige", myRGB(245, 245, 220)}, - {"Bisque", myRGB(255, 228, 196)}, - {"Black", myRGB(0, 0, 0)}, - {"BlanchedAlmond", myRGB(255, 235, 205)}, - {"Blue", myRGB(0, 0, 255)}, - {"BlueViolet", myRGB(138, 43, 226)}, - {"Brown", myRGB(165, 42, 42)}, - {"burlywood", myRGB(222, 184, 135)}, - {"CadetBlue", myRGB(95, 146, 158)}, - {"chartreuse", myRGB(127, 255, 0)}, - {"chocolate", myRGB(210, 105, 30)}, - {"Coral", myRGB(255, 114, 86)}, - {"CornflowerBlue", myRGB(34, 34, 152)}, - {"cornsilk", myRGB(255, 248, 220)}, - {"Cyan", myRGB(0, 255, 255)}, - {"DarkGoldenrod", myRGB(184, 134, 11)}, - {"DarkGreen", myRGB(0, 86, 45)}, - {"DarkKhaki", myRGB(189, 183, 107)}, - {"DarkOliveGreen", myRGB(85, 86, 47)}, - {"DarkOrange", myRGB(255, 140, 0)}, - {"DarkOrchid", myRGB(139, 32, 139)}, - {"DarkSalmon", myRGB(233, 150, 122)}, - {"DarkSeaGreen", myRGB(143, 188, 143)}, - {"DarkSlateBlue", myRGB(56, 75, 102)}, - {"DarkSlateGray", myRGB(47, 79, 79)}, - {"DarkTurquoise", myRGB(0, 166, 166)}, - {"DarkViolet", myRGB(148, 0, 211)}, - {"DeepPink", myRGB(255, 20, 147)}, - {"DeepSkyBlue", myRGB(0, 191, 255)}, - {"DimGray", myRGB(84, 84, 84)}, - {"DodgerBlue", myRGB(30, 144, 255)}, - {"Firebrick", myRGB(142, 35, 35)}, - {"FloralWhite", myRGB(255, 250, 240)}, - {"ForestGreen", myRGB(80, 159, 105)}, - {"gainsboro", myRGB(220, 220, 220)}, - {"GhostWhite", myRGB(248, 248, 255)}, - {"Gold", myRGB(218, 170, 0)}, - {"Goldenrod", myRGB(239, 223, 132)}, - {"Gray", myRGB(126, 126, 126)}, - {"Gray0", myRGB(0, 0, 0)}, - {"Gray1", myRGB(3, 3, 3)}, - {"Gray10", myRGB(26, 26, 26)}, - {"Gray100", myRGB(255, 255, 255)}, - {"Gray11", myRGB(28, 28, 28)}, - {"Gray12", myRGB(31, 31, 31)}, - {"Gray13", myRGB(33, 33, 33)}, - {"Gray14", myRGB(36, 36, 36)}, - {"Gray15", myRGB(38, 38, 38)}, - {"Gray16", myRGB(41, 41, 41)}, - {"Gray17", myRGB(43, 43, 43)}, - {"Gray18", myRGB(46, 46, 46)}, - {"Gray19", myRGB(48, 48, 48)}, - {"Gray2", myRGB(5, 5, 5)}, - {"Gray20", myRGB(51, 51, 51)}, - {"Gray21", myRGB(54, 54, 54)}, - {"Gray22", myRGB(56, 56, 56)}, - {"Gray23", myRGB(59, 59, 59)}, - {"Gray24", myRGB(61, 61, 61)}, - {"Gray25", myRGB(64, 64, 64)}, - {"Gray26", myRGB(66, 66, 66)}, - {"Gray27", myRGB(69, 69, 69)}, - {"Gray28", myRGB(71, 71, 71)}, - {"Gray29", myRGB(74, 74, 74)}, - {"Gray3", myRGB(8, 8, 8)}, - {"Gray30", myRGB(77, 77, 77)}, - {"Gray31", myRGB(79, 79, 79)}, - {"Gray32", myRGB(82, 82, 82)}, - {"Gray33", myRGB(84, 84, 84)}, - {"Gray34", myRGB(87, 87, 87)}, - {"Gray35", myRGB(89, 89, 89)}, - {"Gray36", myRGB(92, 92, 92)}, - {"Gray37", myRGB(94, 94, 94)}, - {"Gray38", myRGB(97, 97, 97)}, - {"Gray39", myRGB(99, 99, 99)}, - {"Gray4", myRGB(10, 10, 10)}, - {"Gray40", myRGB(102, 102, 102)}, - {"Gray41", myRGB(105, 105, 105)}, - {"Gray42", myRGB(107, 107, 107)}, - {"Gray43", myRGB(110, 110, 110)}, - {"Gray44", myRGB(112, 112, 112)}, - {"Gray45", myRGB(115, 115, 115)}, - {"Gray46", myRGB(117, 117, 117)}, - {"Gray47", myRGB(120, 120, 120)}, - {"Gray48", myRGB(122, 122, 122)}, - {"Gray49", myRGB(125, 125, 125)}, - {"Gray5", myRGB(13, 13, 13)}, - {"Gray50", myRGB(127, 127, 127)}, - {"Gray51", myRGB(130, 130, 130)}, - {"Gray52", myRGB(133, 133, 133)}, - {"Gray53", myRGB(135, 135, 135)}, - {"Gray54", myRGB(138, 138, 138)}, - {"Gray55", myRGB(140, 140, 140)}, - {"Gray56", myRGB(143, 143, 143)}, - {"Gray57", myRGB(145, 145, 145)}, - {"Gray58", myRGB(148, 148, 148)}, - {"Gray59", myRGB(150, 150, 150)}, - {"Gray6", myRGB(15, 15, 15)}, - {"Gray60", myRGB(153, 153, 153)}, - {"Gray61", myRGB(156, 156, 156)}, - {"Gray62", myRGB(158, 158, 158)}, - {"Gray63", myRGB(161, 161, 161)}, - {"Gray64", myRGB(163, 163, 163)}, - {"Gray65", myRGB(166, 166, 166)}, - {"Gray66", myRGB(168, 168, 168)}, - {"Gray67", myRGB(171, 171, 171)}, - {"Gray68", myRGB(173, 173, 173)}, - {"Gray69", myRGB(176, 176, 176)}, - {"Gray7", myRGB(18, 18, 18)}, - {"Gray70", myRGB(179, 179, 179)}, - {"Gray71", myRGB(181, 181, 181)}, - {"Gray72", myRGB(184, 184, 184)}, - {"Gray73", myRGB(186, 186, 186)}, - {"Gray74", myRGB(189, 189, 189)}, - {"Gray75", myRGB(191, 191, 191)}, - {"Gray76", myRGB(194, 194, 194)}, - {"Gray77", myRGB(196, 196, 196)}, - {"Gray78", myRGB(199, 199, 199)}, - {"Gray79", myRGB(201, 201, 201)}, - {"Gray8", myRGB(20, 20, 20)}, - {"Gray80", myRGB(204, 204, 204)}, - {"Gray81", myRGB(207, 207, 207)}, - {"Gray82", myRGB(209, 209, 209)}, - {"Gray83", myRGB(212, 212, 212)}, - {"Gray84", myRGB(214, 214, 214)}, - {"Gray85", myRGB(217, 217, 217)}, - {"Gray86", myRGB(219, 219, 219)}, - {"Gray87", myRGB(222, 222, 222)}, - {"Gray88", myRGB(224, 224, 224)}, - {"Gray89", myRGB(227, 227, 227)}, - {"Gray9", myRGB(23, 23, 23)}, - {"Gray90", myRGB(229, 229, 229)}, - {"Gray91", myRGB(232, 232, 232)}, - {"Gray92", myRGB(235, 235, 235)}, - {"Gray93", myRGB(237, 237, 237)}, - {"Gray94", myRGB(240, 240, 240)}, - {"Gray95", myRGB(242, 242, 242)}, - {"Gray96", myRGB(245, 245, 245)}, - {"Gray97", myRGB(247, 247, 247)}, - {"Gray98", myRGB(250, 250, 250)}, - {"Gray99", myRGB(252, 252, 252)}, - {"Green", myRGB(0, 255, 0)}, - {"GreenYellow", myRGB(173, 255, 47)}, - {"honeydew", myRGB(240, 255, 240)}, - {"HotPink", myRGB(255, 105, 180)}, - {"IndianRed", myRGB(107, 57, 57)}, - {"ivory", myRGB(255, 255, 240)}, - {"Khaki", myRGB(179, 179, 126)}, - {"lavender", myRGB(230, 230, 250)}, - {"LavenderBlush", myRGB(255, 240, 245)}, - {"LawnGreen", myRGB(124, 252, 0)}, - {"LemonChiffon", myRGB(255, 250, 205)}, - {"LightBlue", myRGB(176, 226, 255)}, - {"LightCoral", myRGB(240, 128, 128)}, - {"LightCyan", myRGB(224, 255, 255)}, - {"LightGoldenrod", myRGB(238, 221, 130)}, - {"LightGoldenrodYellow", myRGB(250, 250, 210)}, - {"LightGray", myRGB(168, 168, 168)}, - {"LightPink", myRGB(255, 182, 193)}, - {"LightSalmon", myRGB(255, 160, 122)}, - {"LightSeaGreen", myRGB(32, 178, 170)}, - {"LightSkyBlue", myRGB(135, 206, 250)}, - {"LightSlateBlue", myRGB(132, 112, 255)}, - {"LightSlateGray", myRGB(119, 136, 153)}, - {"LightSteelBlue", myRGB(124, 152, 211)}, - {"LightYellow", myRGB(255, 255, 224)}, - {"LimeGreen", myRGB(0, 175, 20)}, - {"linen", myRGB(250, 240, 230)}, - {"Magenta", myRGB(255, 0, 255)}, - {"Maroon", myRGB(143, 0, 82)}, - {"MediumAquamarine", myRGB(0, 147, 143)}, - {"MediumBlue", myRGB(50, 50, 204)}, - {"MediumForestGreen", myRGB(50, 129, 75)}, - {"MediumGoldenrod", myRGB(209, 193, 102)}, - {"MediumOrchid", myRGB(189, 82, 189)}, - {"MediumPurple", myRGB(147, 112, 219)}, - {"MediumSeaGreen", myRGB(52, 119, 102)}, - {"MediumSlateBlue", myRGB(106, 106, 141)}, - {"MediumSpringGreen", myRGB(35, 142, 35)}, - {"MediumTurquoise", myRGB(0, 210, 210)}, - {"MediumVioletRed", myRGB(213, 32, 121)}, - {"MidnightBlue", myRGB(47, 47, 100)}, - {"MintCream", myRGB(245, 255, 250)}, - {"MistyRose", myRGB(255, 228, 225)}, - {"moccasin", myRGB(255, 228, 181)}, - {"NavajoWhite", myRGB(255, 222, 173)}, - {"Navy", myRGB(35, 35, 117)}, - {"NavyBlue", myRGB(35, 35, 117)}, - {"OldLace", myRGB(253, 245, 230)}, - {"OliveDrab", myRGB(107, 142, 35)}, - {"Orange", myRGB(255, 135, 0)}, - {"OrangeRed", myRGB(255, 69, 0)}, - {"Orchid", myRGB(239, 132, 239)}, - {"PaleGoldenrod", myRGB(238, 232, 170)}, - {"PaleGreen", myRGB(115, 222, 120)}, - {"PaleTurquoise", myRGB(175, 238, 238)}, - {"PaleVioletRed", myRGB(219, 112, 147)}, - {"PapayaWhip", myRGB(255, 239, 213)}, - {"PeachPuff", myRGB(255, 218, 185)}, - {"peru", myRGB(205, 133, 63)}, - {"Pink", myRGB(255, 181, 197)}, - {"Plum", myRGB(197, 72, 155)}, - {"PowderBlue", myRGB(176, 224, 230)}, - {"purple", myRGB(160, 32, 240)}, - {"Red", myRGB(255, 0, 0)}, - {"RosyBrown", myRGB(188, 143, 143)}, - {"RoyalBlue", myRGB(65, 105, 225)}, - {"SaddleBrown", myRGB(139, 69, 19)}, - {"Salmon", myRGB(233, 150, 122)}, - {"SandyBrown", myRGB(244, 164, 96)}, - {"SeaGreen", myRGB(82, 149, 132)}, - {"seashell", myRGB(255, 245, 238)}, - {"Sienna", myRGB(150, 82, 45)}, - {"SkyBlue", myRGB(114, 159, 255)}, - {"SlateBlue", myRGB(126, 136, 171)}, - {"SlateGray", myRGB(112, 128, 144)}, - {"snow", myRGB(255, 250, 250)}, - {"SpringGreen", myRGB(65, 172, 65)}, - {"SteelBlue", myRGB(84, 112, 170)}, - {"Tan", myRGB(222, 184, 135)}, - {"Thistle", myRGB(216, 191, 216)}, - {"tomato", myRGB(255, 99, 71)}, - {"Transparent", myRGB(0, 0, 1)}, - {"Turquoise", myRGB(25, 204, 223)}, - {"Violet", myRGB(156, 62, 206)}, - {"VioletRed", myRGB(243, 62, 150)}, - {"Wheat", myRGB(245, 222, 179)}, - {"White", myRGB(255, 255, 255)}, - {"WhiteSmoke", myRGB(245, 245, 245)}, - {"Yellow", myRGB(255, 255, 0)}, - {"YellowGreen", myRGB(50, 216, 56)}, - NULL -}; - -static int numTheRGBRecords = 234; diff --git a/nx-X11/extras/Xpm/lib/simx.c b/nx-X11/extras/Xpm/lib/simx.c deleted file mode 100644 index 97b3b5f03..000000000 --- a/nx-X11/extras/Xpm/lib/simx.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* simx.c: 0.1a * -* * -* This emulates some Xlib functionality for MSW. It's not a general solution, * -* it is close related to XPM-lib. It is only intended to satisfy what is need * -* there. Thus allowing to read XPM files under MS windows. * -* * -* Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de) * -\*****************************************************************************/ - -#ifdef FOR_MSW - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "xpm.h" -#include "xpmi.h" /* for XpmMalloc */ - -/* - * On DOS size_t is only 2 bytes, thus malloc(size_t s) can only malloc - * 64K. BUT an expression data=malloc(width*height) may result in an - * overflow. So this function takes a long as input, and returns NULL if the - * request is larger than 64K, is size_t is only 2 bytes. - * - * This requires casts like XpmMalloc( (long)width*(long(height)), else it - * might have no effect at all. - */ - -void * -boundCheckingMalloc(long s) -{ - if (sizeof(size_t) == sizeof(long)) { /* same size, just do it */ - return (malloc((size_t) s)); - } else { - if (sizeof(size_t) == 2) { - if (s > 0xFFFF) - return (NULL); /* to large, size_t with 2 bytes - * only allows 16 bits */ - else - return (malloc((size_t) s)); - } else { /* it's not a long, not 2 bytes, - * what is it ??? */ - return (malloc((size_t) s)); - } - } -} -void * -boundCheckingCalloc(long num, long s) -{ - if (sizeof(size_t) == sizeof(long)) { /* same size, just do it */ - return (calloc((size_t) num, (size_t) s)); - } else { - if (sizeof(size_t) == 2) { - if (s > 0xFFFF || num * s > 0xFFFF) - return (NULL); /* to large, size_t with 2 bytes - * only allows 16 bits */ - else - return (calloc((size_t) num, (size_t) s)); - } else { /* it's not a long, not 2 bytes, - * what is it ??? */ - return (calloc((size_t) num, (size_t) s)); - } - } -} -void * -boundCheckingRealloc(void *p, long s) -{ - if (sizeof(size_t) == sizeof(long)) { /* same size, just do it */ - return (realloc(p, (size_t) s)); - } else { - if (sizeof(size_t) == 2) { - if (s > 0xFFFF) - return (NULL); /* to large, size_t with 2 bytes - * only allows 16 bits */ - else - return (realloc(p, (size_t) s)); - } else { /* it's not a long, not 2 bytes, - * what is it ??? */ - return (realloc(p, (size_t) s)); - } - } -} - -/* static Visual theVisual = { 0 }; */ -Visual * -XDefaultVisual(Display *display, Screen *screen) -{ - return (NULL); /* struct could contain info about - * MONO, GRAY, COLOR */ -} - -Screen * -XDefaultScreen(Display *d) -{ - return (NULL); -} - -/* I get only 1 plane but 8 bits per pixel, - so I think BITSPIXEL should be depth */ -int -XDefaultDepth(Display *display, Screen *screen) -{ - int d, b; - - b = GetDeviceCaps(*display, BITSPIXEL); - d = GetDeviceCaps(*display, PLANES); - return (b); -} - -Colormap * -XDefaultColormap(Display *display, Screen *screen) -{ - return (NULL); -} - -/* convert hex color names, - wrong digits (not a-f,A-F,0-9) are treated as zero */ -static int -hexCharToInt(c) -{ - int r; - - if (c >= '0' && c <= '9') - r = c - '0'; - else if (c >= 'a' && c <= 'f') - r = c - 'a' + 10; - else if (c >= 'A' && c <= 'F') - r = c - 'A' + 10; - else - r = 0; - - return (r); -} - -static int -rgbFromHex(char *hex, int *r, int *g, int *b) -{ - int len; - - if (hex == NULL || hex[0] != '#') - return (0); - - len = strlen(hex); - if (len == 3 + 1) { - *r = hexCharToInt(hex[1]); - *g = hexCharToInt(hex[2]); - *b = hexCharToInt(hex[3]); - } else if (len == 6 + 1) { - *r = hexCharToInt(hex[1]) * 16 + hexCharToInt(hex[2]); - *g = hexCharToInt(hex[3]) * 16 + hexCharToInt(hex[4]); - *b = hexCharToInt(hex[5]) * 16 + hexCharToInt(hex[6]); - } else if (len == 12 + 1) { - /* it's like c #32329999CCCC */ - /* so for now only take two digits */ - *r = hexCharToInt(hex[1]) * 16 + hexCharToInt(hex[2]); - *g = hexCharToInt(hex[5]) * 16 + hexCharToInt(hex[6]); - *b = hexCharToInt(hex[9]) * 16 + hexCharToInt(hex[10]); - } else - return (0); - - return (1); -} - -/* Color related functions */ -int -XParseColor(Display *d, Colormap *cmap, char *name, XColor *color) -{ - int r, g, b; /* only 8 bit values used */ - int okay; - -/* TODO: use colormap via PALETTE */ - /* parse name either in table or #RRGGBB #RGB */ - if (name == NULL) - return (0); - - if (name[0] == '#') { /* a hex string */ - okay = rgbFromHex(name, &r, &g, &b); - } else { - okay = xpmGetRGBfromName(name, &r, &g, &b); - } - - if (okay) { - color->pixel = RGB(r, g, b); - color->red = (BYTE) r; - color->green = (BYTE) g; - color->blue = (BYTE) b; - return (1); - } else - return (0); /* --> ColorError */ -} - - -int -XAllocColor(Display *d, Colormap cmap, XColor *color) -{ -/* colormap not used yet so color->pixel is the real COLORREF (RBG) and not an - index in some colormap as in X */ - return (1); -} -void -XQueryColors(Display *display, Colormap *colormap, - XColor *xcolors, int ncolors) -{ -/* under X this fills the rgb values to given .pixel */ -/* since there no colormap use FOR_MSW (not yet!!), rgb is plain encoded */ - XColor *xc = xcolors; - int i; - - for (i = 0; i < ncolors; i++, xc++) { - xc->red = GetRValue(xc->pixel); - xc->green = GetGValue(xc->pixel); - xc->blue = GetBValue(xc->pixel); - } - return; -} -int -XFreeColors(Display *d, Colormap cmap, - unsigned long pixels[], int npixels, unsigned long planes) -{ - /* no colormap yet */ - return (0); /* correct ??? */ -} - -/* XImage functions */ -XImage * -XCreateImage(Display *d, Visual *v, - int depth, int format, - int x, int y, int width, int height, - int pad, int foo) -{ - XImage *img = (XImage *) XpmMalloc(sizeof(XImage)); - - if (img) { - /*JW: This is what it should be, but the picture comes out - just black!? It appears to be doing monochrome reduction, - but I've got no clue why. Using CreateBitmap() is supposed - to be slower, but otherwise ok - if ( depth == GetDeviceCaps(*d, BITSPIXEL) ) { - img->bitmap = CreateCompatibleBitmap(*d, width, height); - } else*/ { - img->bitmap = CreateBitmap(width, height, 1 /* plane */ , - depth /* bits per pixel */ , NULL); - } - img->width = width; - img->height = height; - img->depth = depth; - } - return (img); - -} - -void -XImageFree(XImage *img) -{ - if (img) { - XpmFree(img); - } -} -void -XDestroyImage(XImage *img) -{ - if (img) { - DeleteObject(img->bitmap); /* check return ??? */ - XImageFree(img); - } -} - -#endif diff --git a/nx-X11/extras/Xpm/lib/simx.h b/nx-X11/extras/Xpm/lib/simx.h deleted file mode 100644 index 001cfdb4e..000000000 --- a/nx-X11/extras/Xpm/lib/simx.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ - -/*****************************************************************************\ -* simx.h: 0.1a * -* * -* This emulates some Xlib functionality for MSW. It's not a general solution, * -* it is close related to XPM-lib. It is only intended to satisfy what is need * -* there. Thus allowing to read XPM files under MS windows. * -* * -* Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de) * -\*****************************************************************************/ - - -#ifndef _SIMX_H -#define _SIMX_H - -#ifdef FOR_MSW - -#include "windows.h" /* MS windows GDI types */ - -/* - * minimal portability layer between ansi and KR C - */ -/* this comes from xpm.h, and is here again, to avoid complicated - includes, since this is included from xpm.h */ -/* these defines get undefed at the end of this file */ -#if __STDC__ || defined(__cplusplus) || defined(c_plusplus) - /* ANSI || C++ */ -#define FUNC(f, t, p) extern t f p -#define LFUNC(f, t, p) static t f p -#else /* k&R */ -#define FUNC(f, t, p) extern t f() -#define LFUNC(f, t, p) static t f() -#endif - - -FUNC(boundCheckingMalloc, void *, (long s)); -FUNC(boundCheckingCalloc, void *, (long num, long s)); -FUNC(boundCheckingRealloc, void *, (void *p, long s)); - -/* define MSW types for X window types, - I don't know much about MSW, but the following defines do the job */ - -typedef HDC Display; /* this should be similar */ -typedef void *Screen; /* not used */ -typedef void *Visual; /* not used yet, is for GRAY, COLOR, - * MONO */ - -typedef void *Colormap; /* should be COLORPALETTE, not done - * yet */ - -typedef COLORREF Pixel; - -#define PIXEL_ALREADY_TYPEDEFED /* to let xpm.h know about it */ - -typedef struct { - Pixel pixel; - BYTE red, green, blue; -} XColor; - -typedef struct { - HBITMAP bitmap; - unsigned int width; - unsigned int height; - unsigned int depth; -} XImage; - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif -/* some replacements for X... functions */ - -/* XDefaultXXX */ - FUNC(XDefaultVisual, Visual *, (Display *display, Screen *screen)); - FUNC(XDefaultScreen, Screen *, (Display *d)); - FUNC(XDefaultColormap, Colormap *, (Display *display, Screen *screen)); - FUNC(XDefaultDepth, int, (Display *d, Screen *s)); - -/* color related */ - FUNC(XParseColor, int, (Display *, Colormap *, char *, XColor *)); - FUNC(XAllocColor, int, (Display *, Colormap *, XColor *)); - FUNC(XQueryColors, void, (Display *display, Colormap *colormap, - XColor *xcolors, int ncolors)); - FUNC(XFreeColors, int, (Display *d, Colormap cmap, - unsigned long pixels[], - int npixels, unsigned long planes)); -/* XImage */ - FUNC(XCreateImage, XImage *, (Display *, Visual *, int depth, int format, - int x, int y, int width, int height, - int pad, int foo)); - -/* free and destroy bitmap */ - FUNC(XDestroyImage, void /* ? */ , (XImage *)); -/* free only, bitmap remains */ - FUNC(XImageFree, void, (XImage *)); -#if defined(__cplusplus) || defined(c_plusplus) -} /* end of extern "C" */ -#endif /* cplusplus */ - -#define ZPixmap 1 /* not really used */ -#define XYBitmap 1 /* not really used */ - -#ifndef True -#define True 1 -#define False 0 -#endif -#ifndef Bool -typedef BOOL Bool; /* take MSW bool */ -#endif -/* make these local here, simx.c gets the same from xpm.h */ -#undef LFUNC -#undef FUNC - -#endif /* def FOR_MSW */ - -#endif /* _SIMX_H */ diff --git a/nx-X11/extras/Xpm/namecvt b/nx-X11/extras/Xpm/namecvt deleted file mode 100644 index 0bb610406..000000000 --- a/nx-X11/extras/Xpm/namecvt +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# create two scripts to convert the filenames of the XPM distribution -# run this in the xpm toplevel directory -# after that you have the following two scripts -# cvtux2dos will copy the files into fordos/ -# cvtdos2ux will copy from fromdos/ to new/ -# -# Written by HeDu 5/94 (hedu@cul-ipn.uni-kiel.de) -# - -echo "Making cvtux2dos and cvtdos2ux..." - -cp /dev/null cvtux2dos -echo "#!/bin/sh" > cvtux2dos -echo "echo Making dos hierarchy..." >> cvtux2dos -echo "mkdir fordos" >> cvtux2dos -echo "mkdir fordos/lib" >> cvtux2dos -echo "mkdir fordos/doc" >> cvtux2dos - -cp /dev/null cvtdos2ux -echo "#!/bin/sh" > cvtdos2ux -echo "echo Making unix hierarchy..." >> cvtdos2ux -echo "mkdir new" >> cvtdos2ux -echo "mkdir new/lib" >> cvtdos2ux -echo "mkdir new/doc" >> cvtdos2ux - -for i in CHANGES FAQ FILES README README.MSW \ - lib/CrBufFrI.c lib/CrBufFrP.c lib/CrDatFrI.c \ - lib/CrDatFrP.c lib/CrIFrBuf.c lib/CrIFrDat.c \ - lib/CrPFrBuf.c lib/CrPFrDat.c lib/RdFToDat.c \ - lib/RdFToI.c lib/RdFToP.c lib/WrFFrDat.c \ - lib/WrFFrI.c lib/WrFFrP.c \ - lib/create.c lib/data.c lib/misc.c lib/parse.c \ - lib/rgb.c lib/rgbtab.h lib/scan.c lib/hashtab.c \ - lib/simx.h lib/simx.c lib/xpm.h lib/XpmI.h \ - lib/Attrib.c lib/Image.c lib/Info.c \ - lib/CrIFrP.c lib/CrPFrI.c lib/RdFToBuf.c lib/WrFFrBuf.c \ - namecvt -do - # fold to lower case - # so they are fine for DOS, sigh - new=`echo $i | tr '[A-Z]' '[a-z]'` - echo "cp $i fordos/$new" >> cvtux2dos - echo "cp fromdos/$new new/$i" >> cvtdos2ux -done - -# special ones -echo "cp COPYRIGHT fordos/copyrigh.t" >> cvtux2dos -echo "cp fromdos/copyrigh.t new/COPYRIGHT" >> cvtdos2ux -echo "cp doc/xpm.PS.gz fordos/doc/xpm_ps.gz" >> cvtux2dos -echo "cp fromdos/doc/xpm_ps.gz new/doc/xpm.PS.gz" >> cvtdos2ux -# -echo "echo done." >> cvtux2dos -echo "echo done." >> cvtdos2ux - -chmod +x cvtux2dos -chmod +x cvtdos2ux - -echo "done." diff --git a/nx-X11/extras/Xpm/sxpm/Imakefile b/nx-X11/extras/Xpm/sxpm/Imakefile deleted file mode 100644 index 5474c777a..000000000 --- a/nx-X11/extras/Xpm/sxpm/Imakefile +++ /dev/null @@ -1,98 +0,0 @@ -XCOMM -XCOMM -XCOMM Copyright (C) 1989-95 GROUPE BULL -XCOMM -XCOMM Permission is hereby granted, free of charge, to any person obtaining a -XCOMM copy of this software and associated documentation files -XCOMM (the "Software"), to deal in the Software without restriction, including -XCOMM without limitation the rights to use, copy, modify, merge, publish, -XCOMM distribute, sublicense, and/or sell copies of the Software, and to permit -XCOMM persons to whom the Software is furnished to do so, subject to the -XCOMM following conditions: -XCOMM The above copyright notice and this permission notice shall be included -XCOMM in all copies or substantial portions of the Software. -XCOMM -XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -XCOMM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -XCOMM IN NO EVENT SHALL GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -XCOMM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -XCOMM FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -XCOMM DEALINGS IN THE SOFTWARE. -XCOMM -XCOMM Except as contained in this notice, the name of GROUPE BULL shall not be -XCOMM used in advertising or otherwise to promote the sale, use or other -XCOMM dealings in this Software without prior written authorization from -XCOMM GROUPE BULL. -XCOMM - -XCOMM -XCOMM XPM Imakefile - Arnaud LE HORS -XCOMM - -XCOMM default locations -#ifndef XpmLibDir -#define XpmLibDir $(USRLIBDIR) -#endif -#ifndef XpmBinDir -#define XpmBinDir $(BINDIR) -#endif -#ifndef XpmManDir -#define XpmManDir $(MANDIR) -#endif -#ifndef XpmIncDir -#define XpmIncDir $(BUILDINCTOP) -#endif - - XPMLIBDIR = XpmLibDir - XPMBINDIR = XpmBinDir - XPMMANDIR = XpmManDir - XPMINCDIR = XpmIncDir - - XPMLIB = -lXpm - INCLUDES = -I$(BUILDINCDIR) -I$(XPMINCDIR) - DEPLIBS = $(DEPXTOOLLIB) $(DEPXLIB) - -#ifdef Win32Architecture -LOCAL_LIBRARIES = ../lib/Xpm.lib $(XTOOLLIB) $(XLIB) -#else -LOCAL_LIBRARIES = -L../lib -L$(XPMLIBDIR) $(XPMLIB) $(XTOOLLIB) $(XLIB) -#endif - -XCOMM try hard to set things so we'll find the shared lib once installed -LD_RUN_PATH = $(USRLIBDIR):$(XPMLIBDIR) -USRLIBDIRPATH = $(USRLIBDIR):$(XPMLIBDIR) - -#if ProjectX < 603 -# ifdef HPArchitecture -EXTRA_LOAD_FLAGS = -Wl,+s,+b,$(USRLIBDIRPATH) -# endif -# if defined(SunArchitecture) && defined(SVR4Architecture) -EXTRA_LOAD_FLAGS = -R$(USRLIBDIRPATH) -# endif -# if defined(AlphaArchitecture) || defined (SGIArchitecture) -EXTRA_LOAD_FLAGS = -Wl,-rpath,$(USRLIBDIRPATH) -# endif -#endif - -#ifdef OsNameDefines -OS_NAME_DEFINES = OsNameDefines -#endif - - SRCS = sxpm.c - OBJS = sxpm.o - -#if (ProjectX < 6) -AllTarget(sxpm) -#else -AllTarget(ProgramTargetName(sxpm)) -#endif -NormalProgramTarget(sxpm,$(OBJS),$(DEPLIB),$(LOCAL_LIBRARIES),) -InstallProgram(sxpm,$(XPMBINDIR)) -InstallManPage(sxpm,$(XPMMANDIR)) -DependTarget() -LintTarget() - -clean:: - $(RM) sxpmout.xpm - diff --git a/nx-X11/extras/Xpm/sxpm/Makefile.noX b/nx-X11/extras/Xpm/sxpm/Makefile.noX deleted file mode 100644 index 74847e666..000000000 --- a/nx-X11/extras/Xpm/sxpm/Makefile.noX +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright (C) 1989-95 GROUPE BULL -# -# Permission is hereby granted, free of charge, to 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 -# GROUPE BULL 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 GROUPE BULL shall not be -# used in advertising or otherwise to promote the sale, use or other dealings -# in this Software without prior written authorization from GROUPE BULL. -# - -# -# XPM Makefile - Arnaud LE HORS -# - -# where the program will be installed -DESTBINDIR=/usr/local/bin/X11 -# where the man page will be installed -MANDIR=/usr/local/man/manl - -# where the X11 libs are -XLIBDIRS= -L/usr/X11/lib - -LIBDIRS= -L../lib -LIBS= -lXpm -lXext -lXt -lX11 - -CC = cc -RM = rm -f -# on sysV, define this as cp. -INSTALL = install -c - -CDEBUGFLAGS= -O - -INCLUDES= -I.. - -OBJS= sxpm.o - -CFLAGS= $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES) - -all: sxpm - -clean: - $(RM) *.o sxpm - -sxpm: sxpm.o - $(CC) $(CFLAGS) sxpm.o $(LIBDIRS) $(XLIBDIRS) $(LIBS) -o sxpm - -install: - $(INSTALL) -m 0755 sxpm $(DESTBINDIR) - -install.man: - $(INSTALL) -m 0644 sxpm.man $(MANDIR)/sxpm.l - -# Other dependencies. -sxpm.o: ../lib/xpm.h diff --git a/nx-X11/extras/Xpm/sxpm/plaid.xpm b/nx-X11/extras/Xpm/sxpm/plaid.xpm deleted file mode 100644 index b0e9200fe..000000000 --- a/nx-X11/extras/Xpm/sxpm/plaid.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char * plaid[] = { -/* plaid pixmap - * width height ncolors chars_per_pixel */ -"22 22 4 2 ", -/* colors */ -" c red m white s light_color ", -"Y c green m black s lines_in_mix ", -"+ c yellow m white s lines_in_dark ", -"x m black s dark_color ", -/* pixels */ -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -"Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -"x x x x x x x x x x x x x x x x x x x x x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x " -} ; diff --git a/nx-X11/extras/Xpm/sxpm/plaid_ext.xpm b/nx-X11/extras/Xpm/sxpm/plaid_ext.xpm deleted file mode 100644 index 8538952ea..000000000 --- a/nx-X11/extras/Xpm/sxpm/plaid_ext.xpm +++ /dev/null @@ -1,43 +0,0 @@ -/* XPM */ -static char * plaid[] = { -/* plaid pixmap - * width height ncolors chars_per_pixel */ -"22 22 4 2 XPMEXT", -/* colors */ -" c red m white s light_color ", -"Y c green m black s lines_in_mix ", -"+ c yellow m white s lines_in_dark ", -"x m black s dark_color ", -/* pixels */ -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -"Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x x x x x x x x x x x x x ", -"x x x x x x x x x x x x + x x x x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -"x x x x x x x x x x x x x x x x x x x x x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -" x x x Y x x ", -" x x x x Y x x x ", -"XPMEXT ext1 data1", -"XPMEXT ext2", -"data2_1", -"data2_2", -"XPMEXT ext3", -"data3", -"XPMEXT", -"data4", -"XPMENDEXT" -} ; diff --git a/nx-X11/extras/Xpm/sxpm/plaid_mask.xpm b/nx-X11/extras/Xpm/sxpm/plaid_mask.xpm deleted file mode 100644 index 167d33857..000000000 --- a/nx-X11/extras/Xpm/sxpm/plaid_mask.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char * plaid[] = { -/* plaid pixmap - * width height ncolors chars_per_pixel */ -"22 22 5 2", -/* colors */ -". c red m white s light_color ", -"Y c green m black s lines_in_mix ", -"+ c yellow m white s lines_in_dark ", -"x m black s dark_color ", -" c none s mask ", -/* pixels */ -" x x x x x + x x x x x ", -" . x x x x x x x x x x x ", -" . x x x x x x + x x x x x ", -" . x . x x x x x x x x x x x ", -" . x . x x x x x x + x x x x x ", -" Y Y Y Y Y + x + x + x + x + x + ", -" x x . x . x x x x x x + x x x x x ", -" . x . x . x . x x x x x x x x x x x ", -" . x x x . x . x x x x x x + x x x x x ", -" . x . x . x . x . x x x x x x x x x x x ", -" . x . x x x . x . x x x x x x + x x x x x ", -". . . . . x . . . . . x . x . x Y x . x . x ", -". . . . . x . . . . . . x . x . Y . x . x . ", -". . . . . x . . . . . x . x . x Y x . x . x ", -". . . . . x . . . . . . x . x . Y . x . x . ", -". . . . . x . . . . . x . x . x Y x . x . x ", -"x x x x x x x x x x x x x x x x x x x x x x ", -". . . . . x . . . . . x . x . x Y x . x . x ", -". . . . . x . . . . . . x . x . Y . x . x . ", -". . . . . x . . . . . x . x . x Y x . x . x ", -". . . . . x . . . . . . x . x . Y . x . x . ", -". . . . . x . . . . . x . x . x Y x . x . x " -} ; diff --git a/nx-X11/extras/Xpm/sxpm/sxpm.c b/nx-X11/extras/Xpm/sxpm/sxpm.c deleted file mode 100644 index 9d0b42e43..000000000 --- a/nx-X11/extras/Xpm/sxpm/sxpm.c +++ /dev/null @@ -1,709 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to 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 - * GROUPE BULL 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 GROUPE BULL shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from GROUPE BULL. - */ -/* $XFree86: xc/extras/Xpm/sxpm/sxpm.c,v 1.2 2001/08/01 00:44:34 tsi Exp $ */ - -/*****************************************************************************\ -* sxpm.c: * -* * -* Show XPM File program * -* * -* Developed by Arnaud Le Hors * -\*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -#ifdef VMS -#include -#else -#include -#endif - -#include - -/* XPM */ -/* plaid pixmap */ -static char *plaid[] = { - /* width height ncolors chars_per_pixel */ - "22 22 4 2 XPMEXT", - /* colors */ - " c red m white s light_color", - "Y c green m black s lines_in_mix", - "+ c yellow m white s lines_in_dark", - "x m black s dark_color", - /* pixels */ - "x x x x x x x x x x x x + x x x x x ", - " x x x x x x x x x x x x x x x x ", - "x x x x x x x x x x x x + x x x x x ", - " x x x x x x x x x x x x x x x x ", - "x x x x x x x x x x x x + x x x x x ", - "Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ", - "x x x x x x x x x x x x + x x x x x ", - " x x x x x x x x x x x x x x x x ", - "x x x x x x x x x x x x + x x x x x ", - " x x x x x x x x x x x x x x x x ", - "x x x x x x x x x x x x + x x x x x ", - " x x x x Y x x x ", - " x x x Y x x ", - " x x x x Y x x x ", - " x x x Y x x ", - " x x x x Y x x x ", - "x x x x x x x x x x x x x x x x x x x x x x ", - " x x x x Y x x x ", - " x x x Y x x ", - " x x x x Y x x x ", - " x x x Y x x ", - " x x x x Y x x x ", - "bullshit", - "XPMEXT ext1 data1", - "XPMEXT ext2", - "data2_1", - "data2_2", - "XPMEXT", - "foo", - "", - "XPMEXT ext3", - "data3", - "XPMENDEXT" -}; - -#define win XtWindow(topw) -#define dpy XtDisplay(topw) -#define root XRootWindowOfScreen(XtScreen(topw)) -#define xrdb XtDatabase(dpy) -static Colormap colormap; - -void Usage(); -void ErrorMessage(); -void Punt(); -void VersionInfo(); - -#ifdef __STDC__ -void kinput(Widget widget, char *tag, XEvent *xe, Boolean *b); -#else -void kinput(); -#endif - -#define IWIDTH 50 -#define IHEIGHT 50 - -typedef struct _XpmIcon { - Pixmap pixmap; - Pixmap mask; - XpmAttributes attributes; -} XpmIcon; - -static char **command; -static Widget topw; -static XpmIcon view, icon; -static XrmOptionDescRec options[] = { - {"-hints", ".hints", XrmoptionNoArg, (XtPointer) "True"}, - {"-icon", ".icon", XrmoptionSepArg, (XtPointer) NULL}, -}; - -int -main(argc, argv) - int argc; - char **argv; -{ - int ErrorStatus; - unsigned int verbose = 0; /* performs verbose output */ - unsigned int stdinf = 1; /* read from stdin */ - unsigned int stdoutf = 0; /* write to stdout */ - unsigned int nod = 0; /* no display */ - unsigned int nom = 0; /* no mask display */ - unsigned int incResize = 0; - unsigned int resize = 0; - unsigned int w_rtn; - unsigned int h_rtn; - char *input = NULL; - char *output = NULL; - char *iconFile = NULL; - unsigned int numsymbols = 0; - XpmColorSymbol symbols[10]; - char *stype; - XrmValue val; - unsigned long valuemask = 0; - int n; - Arg args[4]; - -#ifdef Debug - char **data; - char *buffer; -#endif - - topw = XtInitialize(argv[0], "Sxpm", - options, XtNumber(options), &argc, argv); - - if (!topw) { - fprintf(stderr, "Sxpm Error... [ Undefined DISPLAY ]\n"); - exit(1); - } - colormap = XDefaultColormapOfScreen(XtScreen(topw)); - - /* - * geometry management - */ - - if (XrmGetResource(xrdb, NULL, "sxpm.geometry", &stype, &val) - || XrmGetResource(xrdb, NULL, "Sxpm.geometry", &stype, &val)) { - - int flags; - int x_rtn; - int y_rtn; - char *geo = NULL; - - geo = (char *) val.addr; - flags = XParseGeometry(geo, &x_rtn, &y_rtn, - (unsigned int *) &w_rtn, - (unsigned int *) &h_rtn); - - if (!((WidthValue & flags) && (HeightValue & flags))) - resize = 1; - - } else - resize = 1; - - n = 0; - if (resize) { - w_rtn = 0; - h_rtn = 0; - XtSetArg(args[n], XtNwidth, 1); - n++; - XtSetArg(args[n], XtNheight, 1); - n++; - } - XtSetArg(args[n], XtNmappedWhenManaged, False); - n++; - XtSetArg(args[n], XtNinput, True); - n++; - XtSetValues(topw, args, n); - - if ((XrmGetResource(xrdb, "sxpm.hints", "", &stype, &val) - || XrmGetResource(xrdb, "Sxpm.hints", "", &stype, &val)) - && !strcmp((char *) val.addr, "True")) { - /* gotcha */ - incResize = 1; - resize = 1; - } - - /* - * icon management - */ - - if (XrmGetResource(xrdb, "sxpm.icon", "", &stype, &val) - || XrmGetResource(xrdb, "Sxpm.icon", "", &stype, &val)) { - iconFile = (char *) val.addr; - } - if (iconFile) { - - XColor color, junk; - Pixel bpix; - Window iconW; - - if (XAllocNamedColor(dpy, colormap, "black", &color, &junk)) - bpix = color.pixel; - else - bpix = XBlackPixelOfScreen(XtScreen(topw)); - - iconW = XCreateSimpleWindow(dpy, root, 0, 0, - IWIDTH, IHEIGHT, 1, bpix, bpix); - - icon.attributes.valuemask = XpmReturnAllocPixels; - ErrorStatus = XpmReadFileToPixmap(dpy, root, iconFile, &icon.pixmap, - &icon.mask, &icon.attributes); - ErrorMessage(ErrorStatus, "Icon"); - - XSetWindowBackgroundPixmap(dpy, iconW, icon.pixmap); - - n = 0; - XtSetArg(args[n], XtNbackground, bpix); - n++; - XtSetArg(args[n], XtNiconWindow, iconW); - n++; - XtSetValues(topw, args, n); - } - - /* - * arguments parsing - */ - - command = argv; - for (n = 1; n < argc; n++) { - if (strcmp(argv[n], "-plaid") == 0) { - stdinf = 0; - continue; - } - if (argv[n][0] != '-') { - stdinf = 0; - input = argv[n]; - continue; - } - if ((strlen(argv[n]) == 1) && (argv[n][0] == '-')) - /* stdin */ - continue; - if (strcmp(argv[n], "-o") == 0) { - if (n < argc - 1) { - if ((strlen(argv[n + 1]) == 1) && (argv[n + 1][0] == '-')) - stdoutf = 1; - else - output = argv[n + 1]; - n++; - continue; - } else - Usage(); - } - if (strcmp(argv[n], "-nod") == 0) { - nod = 1; - continue; - } - if (strcmp(argv[n], "-nom") == 0) { - nom = 1; - continue; - } - if (strcmp(argv[n], "-sc") == 0) { - if (n < argc - 2) { - valuemask |= XpmColorSymbols; - symbols[numsymbols].name = argv[++n]; - symbols[numsymbols++].value = argv[++n]; - continue; - } else - Usage(); - } - if (strcmp(argv[n], "-sp") == 0) { - if (n < argc - 2) { - valuemask |= XpmColorSymbols; - symbols[numsymbols].name = argv[++n]; - symbols[numsymbols].value = NULL; - symbols[numsymbols++].pixel = atol(argv[++n]); - continue; - } - } - if (strcmp(argv[n], "-cp") == 0) { - if (n < argc - 2) { - valuemask |= XpmColorSymbols; - symbols[numsymbols].name = NULL; - symbols[numsymbols].value = argv[++n]; - symbols[numsymbols++].pixel = atol(argv[++n]); - continue; - } - } - if (strcmp(argv[n], "-mono") == 0) { - valuemask |= XpmColorKey; - view.attributes.color_key = XPM_MONO; - continue; - } - if (strcmp(argv[n], "-gray4") == 0 || strcmp(argv[n], "-grey4") == 0) { - valuemask |= XpmColorKey; - view.attributes.color_key = XPM_GRAY4; - continue; - } - if (strcmp(argv[n], "-gray") == 0 || strcmp(argv[n], "-grey") == 0) { - valuemask |= XpmColorKey; - view.attributes.color_key = XPM_GRAY; - continue; - } - if (strcmp(argv[n], "-color") == 0) { - valuemask |= XpmColorKey; - view.attributes.color_key = XPM_COLOR; - continue; - } - if (strncmp(argv[n], "-closecolors", 6) == 0) { - valuemask |= XpmCloseness; - view.attributes.closeness = 40000; - continue; - } - if (strcmp(argv[n], "-rgb") == 0) { - if (n < argc - 1) { - valuemask |= XpmRgbFilename; - view.attributes.rgb_fname = argv[++n]; - continue; - } else - Usage(); - - } - if (strncmp(argv[n], "-version", 4) == 0) { - VersionInfo(); - exit(0); - } - if (strcmp(argv[n], "-v") == 0) { - verbose = 1; - continue; - } - if (strcmp(argv[n], "-pcmap") == 0) { - valuemask |= XpmColormap; - continue; - } - Usage(); - } - - XtRealizeWidget(topw); - if (valuemask & XpmColormap) { - colormap = XCreateColormap(dpy, win, - DefaultVisual(dpy, DefaultScreen(dpy)), - AllocNone); - view.attributes.colormap = colormap; - XSetWindowColormap(dpy, win, colormap); - } - view.attributes.colorsymbols = symbols; - view.attributes.numsymbols = numsymbols; - view.attributes.valuemask = valuemask; - -#ifdef Debug - /* this is just to test the XpmCreateDataFromPixmap function */ - - view.attributes.valuemask |= XpmReturnAllocPixels; - view.attributes.valuemask |= XpmReturnExtensions; - ErrorStatus = XpmCreatePixmapFromData(dpy, win, plaid, - &view.pixmap, &view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "Plaid"); - - ErrorStatus = XpmCreateDataFromPixmap(dpy, &data, view.pixmap, view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "Data"); - if (verbose && view.attributes.nextensions) { - unsigned int i, j; - - for (i = 0; i < view.attributes.nextensions; i++) { - fprintf(stderr, "Xpm extension : %s\n", - view.attributes.extensions[i].name); - for (j = 0; j < view.attributes.extensions[i].nlines; j++) - fprintf(stderr, "\t\t%s\n", - view.attributes.extensions[i].lines[j]); - } - } - XFreePixmap(dpy, view.pixmap); - if (view.mask) - XFreePixmap(dpy, view.mask); - - XFreeColors(dpy, colormap, - view.attributes.alloc_pixels, - view.attributes.nalloc_pixels, 0); - - XpmFreeAttributes(&view.attributes); - view.attributes.valuemask = valuemask; -#endif - - if (input || stdinf) { - view.attributes.valuemask |= XpmReturnInfos; - view.attributes.valuemask |= XpmReturnAllocPixels; - view.attributes.valuemask |= XpmReturnExtensions; - -#ifdef Debug - XpmFree(data); - - /* - * this is just to test the XpmCreatePixmapFromBuffer and - * XpmCreateBufferFromPixmap functions - */ - ErrorStatus = XpmReadFileToBuffer(input, &buffer); - ErrorMessage(ErrorStatus, "CreateBufferFromFile"); - - ErrorStatus = XpmCreatePixmapFromBuffer(dpy, win, buffer, - &view.pixmap, &view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "CreatePixmapFromBuffer"); - XpmFree(buffer); - ErrorStatus = XpmCreateBufferFromPixmap(dpy, &buffer, - view.pixmap, view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "CreateBufferFromPixmap"); - ErrorStatus = XpmWriteFileFromBuffer("buffer_output", buffer); - ErrorMessage(ErrorStatus, "WriteFileFromBuffer"); - XpmFree(buffer); - if (view.pixmap) { - XFreePixmap(dpy, view.pixmap); - if (view.mask) - XFreePixmap(dpy, view.mask); - - XFreeColors(dpy, colormap, view.attributes.alloc_pixels, - view.attributes.nalloc_pixels, 0); - - XpmFreeAttributes(&view.attributes); - } - ErrorStatus = XpmReadFileToData(input, &data); - ErrorMessage(ErrorStatus, "ReadFileToData"); - ErrorStatus = XpmCreatePixmapFromData(dpy, win, data, - &view.pixmap, &view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "CreatePixmapFromData"); - ErrorStatus = XpmWriteFileFromData("sxpmout.xpm", data); - ErrorMessage(ErrorStatus, "WriteFileFromData"); - XpmFree(data); - XpmFreeAttributes(&view.attributes); -#endif - ErrorStatus = XpmReadFileToPixmap(dpy, win, input, - &view.pixmap, &view.mask, - &view.attributes); - ErrorMessage(ErrorStatus, "Read"); - if (verbose && view.attributes.nextensions) { - unsigned int i, j; - - for (i = 0; i < view.attributes.nextensions; i++) { - fprintf(stderr, "Xpm extension : %s\n", - view.attributes.extensions[i].name); - for (j = 0; j < view.attributes.extensions[i].nlines; j++) - fprintf(stderr, "\t\t%s\n", - view.attributes.extensions[i].lines[j]); - } - } - } else { -#ifdef Debug - ErrorStatus = XpmCreatePixmapFromData(dpy, win, data, - &view.pixmap, &view.mask, - &view.attributes); - XpmFree(data); -#else - ErrorStatus = XpmCreatePixmapFromData(dpy, win, plaid, - &view.pixmap, &view.mask, - &view.attributes); -#endif - ErrorMessage(ErrorStatus, "Plaid"); - } - if (output || stdoutf) { - ErrorStatus = XpmWriteFileFromPixmap(dpy, output, view.pixmap, - view.mask, &view.attributes); - ErrorMessage(ErrorStatus, "Write"); - } - if (!nod) { - - /* - * manage display if requested - */ - - XSizeHints size_hints; - char *xString = NULL; - - if (w_rtn && h_rtn - && ((w_rtn < view.attributes.width) - || h_rtn < view.attributes.height)) { - resize = 1; - } - if (resize) { - XtResizeWidget(topw, - view.attributes.width, view.attributes.height, 1); - } - if (incResize) { - size_hints.flags = USSize | PMinSize | PResizeInc; - size_hints.height = view.attributes.height; - size_hints.width = view.attributes.width; - size_hints.height_inc = view.attributes.height; - size_hints.width_inc = view.attributes.width; - } else - size_hints.flags = PMinSize; - - size_hints.min_height = view.attributes.height; - size_hints.min_width = view.attributes.width; - XSetWMNormalHints(dpy, win, &size_hints); - - if (input) { - xString = (char *) XtMalloc((sizeof(char) * strlen(input)) + 20); - sprintf(xString, "Sxpm: %s", input); - XStoreName(dpy, win, xString); - XSetIconName(dpy, win, xString); - } else if (stdinf) { - XStoreName(dpy, win, "Sxpm: stdin"); - XSetIconName(dpy, win, "Sxpm: stdin"); - } else { - XStoreName(dpy, win, "Sxpm"); - XSetIconName(dpy, win, "Sxpm"); - } - - XtAddEventHandler(topw, KeyPressMask, False, - (XtEventHandler) kinput, NULL); - XSetWindowBackgroundPixmap(dpy, win, view.pixmap); - - if (view.mask && !nom) - XShapeCombineMask(dpy, win, ShapeBounding, 0, 0, - view.mask, ShapeSet); - - XClearWindow(dpy, win); - XtMapWidget(topw); - if (xString) - XtFree(xString); - XtMainLoop(); - } - Punt(0); - - /* Muffle gcc */ - return 0; -} - -void -Usage() -{ - fprintf(stderr, "\nUsage: %s [options...]\n", command[0]); - fprintf(stderr, "Where options are:\n\ -\n\ -[-d host:display] Display to connect to.\n\ -[-g geom] Geometry of window.\n\ -[-hints] Set ResizeInc for window.\n\ -[-icon filename] Set pixmap for iconWindow.\n\ -[-plaid] Read the included plaid pixmap.\n\ -[filename] Read from file 'filename', and from standard\n\ - input if 'filename' is '-'.\n\ -[-o filename] Write to file 'filename', and to standard\n\ - output if 'filename' is '-'.\n\ -[-pcmap] Use a private colormap.\n\ -[-closecolors] Try to use `close' colors.\n\ -[-nod] Don't display in window.\n\ -[-nom] Don't use clip mask if any.\n\ -[-mono] Use the colors specified for a monochrome visual.\n\ -[-grey4] Use the colors specified for a 4 greyscale visual.\n\ -[-grey] Use the colors specified for a greyscale visual.\n\ -[-color] Use the colors specified for a color visual.\n\ -[-sc symbol color] Override color defaults.\n\ -[-sp symbol pixel] Override color defaults.\n\ -[-cp color pixel] Override color defaults.\n\ -[-rgb filename] Search color names in the rgb text file 'filename'.\n\ -[-v] Verbose - print out extensions.\n\ -[-version] Print out program's version number\n\ - and library's version number if different.\n\ -if no input is specified sxpm reads from standard input.\n\ -\n"); - exit(0); -} - - -void -ErrorMessage(ErrorStatus, tag) - int ErrorStatus; - char *tag; -{ - char *error = NULL; - char *warning = NULL; - - switch (ErrorStatus) { - case XpmSuccess: - return; - case XpmColorError: - warning = "Could not parse or alloc requested color"; - break; - case XpmOpenFailed: - error = "Cannot open file"; - break; - case XpmFileInvalid: - error = "Invalid XPM file"; - break; - case XpmNoMemory: - error = "Not enough memory"; - break; - case XpmColorFailed: - error = "Failed to parse or alloc some color"; - break; - } - - if (warning) - fprintf(stderr, "%s Xpm Warning: %s.\n", tag, warning); - - if (error) { - fprintf(stderr, "%s Xpm Error: %s.\n", tag, error); - Punt(1); - } -} - -void -Punt(i) - int i; -{ - if (icon.pixmap) { - XFreePixmap(dpy, icon.pixmap); - if (icon.mask) - XFreePixmap(dpy, icon.mask); - - XFreeColors(dpy, colormap, - icon.attributes.alloc_pixels, - icon.attributes.nalloc_pixels, 0); - - XpmFreeAttributes(&icon.attributes); - } - if (view.pixmap) { - XFreePixmap(dpy, view.pixmap); - if (view.mask) - XFreePixmap(dpy, view.mask); - - XFreeColors(dpy, colormap, - view.attributes.alloc_pixels, - view.attributes.nalloc_pixels, 0); - - XpmFreeAttributes(&view.attributes); - } - exit(i); -} - -void -kinput(widget, tag, xe, b) - Widget widget; - char *tag; - XEvent *xe; - Boolean *b; -{ - char c = '\0'; - - XLookupString(&(xe->xkey), &c, 1, NULL, NULL); - if (c == 'q' || c == 'Q') - Punt(0); -} - -/* - * small function to extract various version numbers from the given global - * number (following the rule described in xpm.h). - */ -void -GetNumbers(num, format_return, libmajor_return, libminor_return) - int num; - int *format_return; - int *libmajor_return; - char *libminor_return; -{ - *format_return = num / 10000; - *libmajor_return = (num % 10000) / 100; - *libminor_return = 'a' + (num % 10000) % 100 - 1; -} - -void -VersionInfo() -{ - int format, libmajor; - char libminor; - - GetNumbers(XpmIncludeVersion, &format, &libmajor, &libminor); - fprintf(stderr, "sxpm version: %d.%d%c\n", - format, libmajor, libminor); - /* - * if we are linked to an XPM library different from the one we've been - * compiled with, print its own number too. - */ - if (XpmIncludeVersion != XpmLibraryVersion()) { - GetNumbers(XpmLibraryVersion(), &format, &libmajor, &libminor); - fprintf(stderr, "using the XPM library version: %d.%d%c\n", - format, libmajor, libminor); - } -} diff --git a/nx-X11/extras/Xpm/sxpm/sxpm.man b/nx-X11/extras/Xpm/sxpm/sxpm.man deleted file mode 100644 index 9d727fa32..000000000 --- a/nx-X11/extras/Xpm/sxpm/sxpm.man +++ /dev/null @@ -1,132 +0,0 @@ -.\"Copyright (C) 1989-95 GROUPE BULL -.\" -.\"Permission is hereby granted, free of charge, to 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 -.\"GROUPE BULL 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 GROUPE BULL shall not be -.\"used in advertising or otherwise to promote the sale, use or other dealings -.\"in this Software without prior written authorization from GROUPE BULL. -.\" -.\" $XFree86$ -.nr )S 12 -.TH SXPM 1 -.PD -.ad b -.SH NAME -sxpm \- Show an XPM (X PixMap) file and/or convert XPM 1 or 2 files to XPM 3. -.SH SYNOPSIS -\fBsxpm\fR -[\|\fB-d\fR displayname\|] -[\|\fB-g\fR geometry\|] -[\|\fB-hints\fR\|] -[\|\fB-icon\fR filename\|] -[\|\fB-plaid\| | \|\fRfilename\| | \|-\|] -[\|\fB-o\fR filename\| | \|\fB-o\fR -\|] -[\|\fB-pcmap\fR\|] -[\|\fB-closecolors\fR\|] -[\|\fB-nod\fR\|] -[\|\fB-nom\fR\|] -[\|\fB-mono | -grey4 | -grey | -color\fR\|] -[\|\fB-sc\fR symbol color\|] -[\|\fB-sp\fR symbol pixel\|] -[\|\fB-cp\fR color pixel\|] -[\|\fB-rgb\fR filename\|] -[\|\fB-v\fR\|] -.SH DESCRIPTION -.PP -The \fIsxpm\fP program can be used to view any XPM (version 1, 2, or 3) file -and/or to convert a file from XPM1 or XPM2 to XPM version 3. If \fIsxpm\fP is -run with any dummy option specified, the usage is displayed. If no geometry is -specified, the show window will have the size of the read pixmap. Pressing the -key Q in the window will quit the program. -.SH OPTIONS -.TP 8 -.B \-d \fIdisplay\fP -Specifies the display to connect to. -.TP 8 -.B \-g \fIgeom\fP -Window geometry (default is pixmap's size). -.TP 8 -.B \-hints -Set ResizeInc for window. -.TP 8 -.B \-icon \fIfilename\fP -Set icon to pixmap created from the file \fIfilename\fP. -.TP 8 -.B \-plaid -Show the plaid pixmap which is stored as data\fP. -.TP 8 -.B \fIfilename\fP -Read from the file \fIfilename\fP and from standard input if \fIfilename\fP is '-'. -If no input is specified sxpm reads from standard input. -.TP 8 -.B \-o \fIfilename\fP -Write to the file \fIfilename\fP (overwrite if it already exists) and to -standard output if \fIfilename\fP is '-'. -.TP 8 -.B \-mono -Use the colors specified for a monochrome visual. -.TP 8 -.B \-grey4 -Use the colors specified for a 4 color greyscale visual. -.TP 8 -.B \-grey -Use the colors specified for a greyscale visual. -.TP 8 -.B \-color -Use the colors specified for a color visual. -.TP 8 -.B \-pcmap -Use a private colormap. -.TP 8 -.B \-closecolors -Try to use "close colors" before reverting to other visuals. -.TP 8 -.B \-nod -Do not display the pixmap in a window. (Useful when using as converter) -.TP 8 -.B \-nom -Do not use the clipmask if there is any. -.TP 8 -.B \-sc \fIsymbol colorname\fP -Override default color to \fIsymbol\fP to \fIcolorname\fP. -.TP 8 -.B \-sp \fIsymbol pixelvalue\fP -Override default color to \fIsymbol\fP to \fIpixelvalue\fP. -.TP 8 -.B \-cp \fIcolorname pixelvalue\fP -Override default color to \fIcolorname\fP to \fIpixelvalue\fP. -.TP 8 -.B \-rgb \fIfilename\fP -Search color names in the file \fIfilename\fP and write them out instead of -the rgb values. -.TP 8 -.B \-v -Verbose - to print out extensions (stderr). - - -.SH KNOWN BUGS -Some window managers may not accept a pixmap which is not a bitmap as icon -because this does not respect ICCCM, many of the well known ones will accept -it though. - -.SH AUTHOR -Arnaud Le Hors (lehors@sophia.inria.fr) -.br -Bull Research France -.br -Copyright (C) 1989-95 by Groupe Bull. -- cgit v1.2.3