aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Xpm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/extras/Xpm/lib')
-rw-r--r--nx-X11/extras/Xpm/lib/Imakefile185
-rw-r--r--nx-X11/extras/Xpm/lib/Makefile.AmigaGCC92
-rw-r--r--nx-X11/extras/Xpm/lib/Makefile.noX112
-rw-r--r--nx-X11/extras/Xpm/lib/Smakefile89
-rw-r--r--nx-X11/extras/Xpm/lib/Xpm-def.cpp37
-rw-r--r--nx-X11/extras/Xpm/lib/amigax.c385
-rw-r--r--nx-X11/extras/Xpm/lib/amigax.h151
-rw-r--r--nx-X11/extras/Xpm/lib/descrip.mms82
-rw-r--r--nx-X11/extras/Xpm/lib/make.com169
-rw-r--r--nx-X11/extras/Xpm/lib/rgbtab.h292
-rw-r--r--nx-X11/extras/Xpm/lib/simx.c293
-rw-r--r--nx-X11/extras/Xpm/lib/simx.h139
12 files changed, 0 insertions, 2026 deletions
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 <Library.tmpl>
-#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 <config.h>
-#endif
-#include "XpmI.h"
-#include "amigax.h"
-
-#include <graphics/gfxbase.h>
-#include <intuition/screens.h>
-
-#include <proto/exec.h>
-
-
-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 <intuition/screens.h>
-
-#include <proto/exec.h>
-#include <proto/graphics.h>
-
-
-#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 <config.h>
-#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 */