Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature')
-rw-r--r--features/org.eclipse.equinox.executable.feature/.cdtproject14
-rw-r--r--features/org.eclipse.equinox.executable.feature/.cproject16
-rw-r--r--features/org.eclipse.equinox.executable.feature/.project2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak12
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/.cvsignore4
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.c178
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.h95
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgImage.c246
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgImage.h54
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.c490
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.h170
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.c367
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.h34
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/build.sh164
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/build.xml20
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.c336
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.h96
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifCommon.c219
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifInit.c179
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifShim.c17
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/make_aix.mak104
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_PA_RISC.mak94
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_ia64_32.mak101
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/make_linux.mak108
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/motif/make_solaris.mak104
26 files changed, 3 insertions, 3223 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/.cdtproject b/features/org.eclipse.equinox.executable.feature/.cdtproject
index 1f97f1385..8640d918c 100644
--- a/features/org.eclipse.equinox.executable.feature/.cdtproject
+++ b/features/org.eclipse.equinox.executable.feature/.cdtproject
@@ -86,20 +86,6 @@
<stopOnError>false</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
</target>
-<target name="linux-all" targetID="org.eclipse.cdt.make.MakeTargetBuilder" path="library/motif">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak JAVA_HOME=/usr/java/1.5 DEFAULT_WS=motif</buildArguments>
-<buildTarget>all</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="clean" targetID="org.eclipse.cdt.make.MakeTargetBuilder" path="library/motif">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak</buildArguments>
-<buildTarget>clean</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
<target name="linux-all" targetID="org.eclipse.cdt.make.MakeTargetBuilder" path="library/gtk">
<buildCommand>make</buildCommand>
<buildArguments>-f make_linux.mak JAVA_HOME=/usr/java/1.5</buildArguments>
diff --git a/features/org.eclipse.equinox.executable.feature/.cproject b/features/org.eclipse.equinox.executable.feature/.cproject
index a7f3cb985..ed9f3ee00 100644
--- a/features/org.eclipse.equinox.executable.feature/.cproject
+++ b/features/org.eclipse.equinox.executable.feature/.cproject
@@ -62,22 +62,6 @@
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
- <target name="linux-all" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
- <buildCommand>make</buildCommand>
- <buildArguments>-f make_linux.mak JAVA_HOME=/usr/java/1.5 DEFAULT_WS=motif MOTIF_HOME=/eclipse/motif21</buildArguments>
- <buildTarget>all</buildTarget>
- <stopOnError>false</stopOnError>
- <useDefaultCommand>false</useDefaultCommand>
- <runAllBuilders>true</runAllBuilders>
- </target>
- <target name="clean" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
- <buildCommand>make</buildCommand>
- <buildArguments>-f make_linux.mak</buildArguments>
- <buildTarget>clean</buildTarget>
- <stopOnError>false</stopOnError>
- <useDefaultCommand>false</useDefaultCommand>
- <runAllBuilders>true</runAllBuilders>
- </target>
</buildTargets>
</storageModule>
</cconfiguration>
diff --git a/features/org.eclipse.equinox.executable.feature/.project b/features/org.eclipse.equinox.executable.feature/.project
index d55d462a6..fcef345d9 100644
--- a/features/org.eclipse.equinox.executable.feature/.project
+++ b/features/org.eclipse.equinox.executable.feature/.project
@@ -59,7 +59,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.environment</key>
- <value>DEFAULT_OS=${system_property:osgi.os}|DEFAULT_OS_ARCH=${system_property:osgi.arch}|X11_HOME=/usr/X11R6|DEFAULT_WS=${system_property:osgi.ws}|JAVA_HOME=${system_property:java.home}/..|MOTIF_HOME=/usr/X11|PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/share/pkgconfig|</value>
+ <value>DEFAULT_OS=${system_property:osgi.os}|DEFAULT_OS_ARCH=${system_property:osgi.arch}|X11_HOME=/usr/X11R6|DEFAULT_WS=${system_property:osgi.ws}|JAVA_HOME=${system_property:java.home}/..|PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/share/pkgconfig|</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak b/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak
index 59a23e8d7..bb3949b18 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak
@@ -29,7 +29,6 @@ PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
MAIN_OBJS = eclipseMain.o eclipseCocoaMain.o
COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseCocoaCommon.o
DLL_OBJS = eclipse.o eclipseCocoa.o eclipseUtil.o eclipseJNI.o eclipseShm.o
-#NgImageData.o NgWinBMPFileFormat.o NgCommon.o
EXEC = $(PROGRAM_OUTPUT)
DLL = $(PROGRAM_LIBRARY)
@@ -43,7 +42,7 @@ CFLAGS = -O -s \
-DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
-DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- -I.. -I../motif $(JAVA_HEADERS)
+ -I.. $(JAVA_HEADERS)
all: $(EXEC) $(DLL)
@@ -71,15 +70,6 @@ eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
$(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
-NgCommon.o: ../motif/NgCommon.c
- $(CC) $(CFLAGS) -c ../motif/NgCommon.c -o $@
-
-NgWinBMPFileFormat.o: ../motif/NgWinBMPFileFormat.c
- $(CC) $(CFLAGS) -c ../motif/NgWinBMPFileFormat.c -o $@
-
-NgImageData.o: ../motif/NgImageData.c
- $(CC) $(CFLAGS) -c ../motif/NgImageData.c -o $@
-
$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
$(CC) -o $(EXEC) $(ARCHS) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index 1e7fc2054..d2ca613fc 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -64,7 +64,7 @@
* -vm <javaVM> the Java VM to be used
* -os <opSys> the operating system being run on
* -arch <osArch> the hardware architecture of the OS: x86, sparc, hp9000
- * -ws <gui> the window system to be used: win32, motif, gtk, ...
+ * -ws <gui> the window system to be used: win32, gtk, cocoa, ...
* -nosplash do not display the splash screen. The java application will
* not receive the -showsplash command.
* -showsplash <bitmap> show the given bitmap in the splash screen.
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/.cvsignore b/features/org.eclipse.equinox.executable.feature/library/motif/.cvsignore
deleted file mode 100644
index e64b3dbf5..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.o
-eclipse
-eclipse_*.so
-libeclipse-motif.so
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.c b/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.c
deleted file mode 100644
index 2f4e525b0..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include <stdlib.h>
-#include <string.h>
-#include "NgCommon.h"
-
-/* Non-zero = big-endian architecture */
-static BYTE4 hostIsMSB = 0;
-
-/* Store last error msg */
-#define MAX_MSG_SIZE 100
-char errorMsg[MAX_MSG_SIZE];
-
-/* Library initialization */
-void NgInit()
-{
- BYTE4 result = (BYTE4) 'A';
-
- /* determine the byte ordering of the host machine */
- hostIsMSB = (BYTE4) (*((char *) &result) != 'A');
-
- errorMsg[0] = 0;
-}
-
-/**
- * Memory allocation routine
- */
-void *NgMalloc (UBYTE4 size)
-{
- return malloc (size);
-}
-
-/**
- * Memory allocation routine
- */
-void NgFree (void *memblock)
-{
- if (memblock != NULL)
- free (memblock);
-}
-
-void NgMemSet (void *dest, UBYTE1 c, BYTE4 count)
-{
- memset (dest, c, count);
-}
-
-void NgMemCpy (void *dest, void *src, BYTE4 count)
-{
- memcpy (dest, src, count);
-}
-
-/**
- * Error Reporting
- */
-
-ng_err_t NgError (ng_err_t error_type, char* msg) {
- if (msg != NULL)
- {
- /* Store a copy of the last error msg - truncate if necessary */
- size_t size = strlen (msg);
- if (size >= MAX_MSG_SIZE) size = MAX_MSG_SIZE - 1;
- NgMemCpy (errorMsg, msg, size);
- errorMsg[size] = 0;
- }
- return error_type;
-}
-
-const char *NgGetLastErrorMsg()
-{
- return errorMsg;
-}
-
-/**
- * Stream manipulation routines
- */
-ng_err_t NgStreamInit (ng_stream_t *stream, char *fullname)
-{
- stream->file = fopen (fullname, "rb");
- stream->size = 0;
- stream->pos = 0;
- if (stream->file == NULL) return NgError (ERR_NG, "Can't open file");
- return ERR_OK;
-}
-
-void NgStreamClose (ng_stream_t *stream)
-{
- if (stream->file != NULL)
- {
- fclose (stream->file);
- stream->file = NULL;
- }
- stream->size = -1;
-}
-
-char NgStreamEof (ng_stream_t *stream)
-{
- return stream->size == -1;
-}
-
-BYTE4 NgStreamGetPosition (ng_stream_t *stream)
-{
- return stream->pos;
-}
-
-BYTE4 NgStreamSkip (ng_stream_t *stream, BYTE4 nbr)
-{
- if (stream->size == -1) return 0;
- if (fseek (stream->file, nbr, SEEK_CUR))
- {
- NgStreamClose (stream);
- return 0;
- }
- stream->pos += nbr;
- return nbr;
-}
-
-BYTE4 NgStreamRead (ng_stream_t *stream, char *buffer, BYTE4 nbr)
-{
- size_t cnt;
- if (stream->size == -1) return 0;
- cnt = fread (buffer, sizeof (char), nbr, stream->file);
- if (cnt != nbr)
- {
- NgStreamClose (stream);
- return 0;
- }
- stream->pos += nbr;
- return nbr;
-}
-
-BYTE1 NgIsMSB()
-{
- return hostIsMSB != 0;
-}
-
-UBYTE2 SystemToLittleEndianUBYTE2 (UBYTE2 value)
-{
- return hostIsMSB ? ((value&0xFF) << 8)|((value&0xFF00)>>8) : value;
-}
-
-UBYTE4 SystemToLittleEndianUBYTE4 (UBYTE4 value)
-{
- return hostIsMSB ? ((value&0xFF000000L)>>24)|((value&0xFF0000L)>>8) | ((value&0xFF00L)<<8) | ((value&0xFFL)<<24) : value;
-}
-
-UBYTE2 SystemToBigEndianUBYTE2 (UBYTE2 value)
-{
- return hostIsMSB ? value : ((value&0xFF) << 8)|((value&0xFF00)>>8);
-}
-
-UBYTE2 LittleEndianToSystemUBYTE2 (UBYTE2 value)
-{
- return hostIsMSB ? ((value&0xFF) << 8)|((value&0xFF00)>>8) : value;
-}
-
-UBYTE4 LittleEndianToSystemUBYTE4 (UBYTE4 value)
-{
- return hostIsMSB ? ((value&0xFF000000L)>>24)|((value&0xFF0000L)>>8) | ((value&0xFF00L)<<8) | ((value&0xFFL)<<24) : value;
-}
-
-UBYTE2 BigEndianToSystemUBYTE2 (UBYTE2 value)
-{
- return hostIsMSB ? value : ((value&0xFF) << 8)|((value&0xFF00)>>8);
-}
-
-UBYTE4 BigEndianToSystemUBYTE4 (UBYTE4 value)
-{
- return hostIsMSB ? value : ((value&0xFF000000L)>>24)|((value&0xFF0000L)>>8)|((value&0xFF00L)<<8) | ((value&0xFFL)<<24);
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.h b/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.h
deleted file mode 100644
index 31252d753..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgCommon.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef __NG_COMMON_H
-#define __NG_COMMON_H
-
-#include <memory.h>
-#include <stdio.h>
-
-typedef char BYTE1;
-typedef unsigned char UBYTE1;
-typedef short BYTE2;
-typedef unsigned short UBYTE2;
-typedef long BYTE4;
-typedef unsigned long UBYTE4;
-
-/* error reporting */
-#define ERR_OK 1
-#define ERR_SUBSCRIPT_OUT_OF_RANGE -1
-#define ERR_INVALID_BIT_COUNT -2
-#define ERR_NG -4
-
-typedef BYTE4 ng_err_t;
-ng_err_t NgError (ng_err_t error_type, char* msg);
-const char *NgGetLastErrorMsg();
-
-/**
- * NgInit
- * Must be called prior to using the image decoders
- */
-void NgInit();
-
-/* memory management */
-void *NgMalloc (UBYTE4 size);
-void NgFree (void *memblock);
-void NgMemSet (void *dest, UBYTE1 c, BYTE4 count);
-void NgMemCpy (void *dest, void *src, BYTE4 count);
-
-/* stream api */
-typedef struct {
- FILE *file;
- BYTE4 size;
- BYTE4 pos;
-} ng_stream_t;
-
-/**
- * Init a stream given the path and name of a file
- * Note. NgStreamClose should be called to release
- * the related OS resource.
- */
-ng_err_t NgStreamInit (ng_stream_t *stream, char *fullname);
-
-/**
- * Close any OS resource managed the given stream.
- * In particular, close the file if the stream is using one.
- */
-void NgStreamClose (ng_stream_t *stream);
-
-char NgStreamEof (ng_stream_t *stream);
-
-BYTE4 NgStreamGetPosition (ng_stream_t *stream);
-/**
- * Skips nbr bytes.
- * Return nbr if all bytes were skipped.
- * If nbr bytes can't be skipped, the stream is closed
- * (NgStreamEof returns 1). 0 is returned.
- */
-BYTE4 NgStreamSkip (ng_stream_t *stream, BYTE4 nbr);
-/**
- * Copies nbr bytes to buffer from stream.
- * Returns nbr if all bytes were copied.
- * If nbr bytes can't be read, no bytes are copied. The stream
- * is closed (NgStreamEof returns 1). 0 is returned.
- */
-BYTE4 NgStreamRead (ng_stream_t *stream, char *buffer, BYTE4 nbr);
-
-/* little/big endian conversion */
-BYTE1 NgIsMSB();
-UBYTE2 SystemToLittleEndianUBYTE2 (UBYTE2);
-UBYTE4 SystemToLittleEndianUBYTE4 (UBYTE4);
-UBYTE2 SystemToBigEndianUBYTE2 (UBYTE2);
-UBYTE2 LittleEndianToSystemUBYTE2 (UBYTE2);
-UBYTE4 LittleEndianToSystemUBYTE4 (UBYTE4);
-UBYTE2 BigEndianToSystemUBYTE2 (UBYTE2);
-UBYTE4 BigEndianToSystemUBYTE4 (UBYTE4);
-
-#endif /* NG_COMMON_H */
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.c b/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.c
deleted file mode 100644
index 056b09de3..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "NgCommon.h"
-#include "NgImageData.h"
-#include "NgImage.h"
-#include "NgWinBMPFileFormat.h"
-#include <dlfcn.h>
-
-struct NG_PTRS ng;
-
-#define FN_TABLE_ENTRY(fn) { (void**)&ng.fn, #fn }
-typedef struct {
- void ** fnPtr;
- char * fnName;
-} FN_TABLE;
-static FN_TABLE x11Functions[] = { FN_TABLE_ENTRY(XCreateGC),
- FN_TABLE_ENTRY(XCreateImage),
- FN_TABLE_ENTRY(XCreatePixmap),
- FN_TABLE_ENTRY(XDefaultColormap),
- FN_TABLE_ENTRY(XDefaultDepthOfScreen),
- FN_TABLE_ENTRY(XDefaultRootWindow),
- FN_TABLE_ENTRY(XDefaultScreen),
- FN_TABLE_ENTRY(XDefaultScreenOfDisplay),
- FN_TABLE_ENTRY(XDefaultVisual),
- FN_TABLE_ENTRY(XFreeGC),
- FN_TABLE_ENTRY(XFreePixmap),
- FN_TABLE_ENTRY(XPutImage),
- FN_TABLE_ENTRY(XQueryColor),
- { NULL, NULL }
- };
-
-static FN_TABLE xtFunctions[] = { FN_TABLE_ENTRY(XtMalloc), {NULL, NULL} };
-
-int NGImageInit() {
- int i = 0;
- void * fn;
-#ifdef AIX
- void * x11Lib = dlopen(X11_LIB, RTLD_LAZY | RTLD_MEMBER);
- void * xtLib = dlopen(XT_LIB, RTLD_LAZY | RTLD_MEMBER);
-#else
- void * x11Lib = dlopen(X11_LIB, RTLD_LAZY);
- void * xtLib = dlopen(XT_LIB, RTLD_LAZY);
-#endif
- /* initialize ptr struct to 0's */
- memset(&ng, 0, sizeof(struct NG_PTRS));
-
-
- if (x11Lib == NULL || xtLib == NULL)
- return -1;
-
- for (i = 0; x11Functions[i].fnName != NULL; i++) {
- fn = dlsym(x11Lib, x11Functions[i].fnName);
- if (fn != 0)
- *(x11Functions[i].fnPtr) = fn;
- else
- return -1;
- }
-
- for (i = 0; xtFunctions[i].fnName != NULL; i++) {
- fn = dlsym(xtLib, xtFunctions[i].fnName);
- if (fn != 0)
- *(xtFunctions[i].fnPtr) = fn;
- else
- return -1;
- }
- return 0;
-}
-/**
- * Return the nbr of entries in the default color palette
- */
-int getNbrColorsXPalette(Display *xDisplay)
-{
- Visual *visual = ng.XDefaultVisual (xDisplay, ng.XDefaultScreen(xDisplay));
- return visual->map_entries;
-}
-
-/**
- * Return the RGB codes of the default palette
- * palette: buffer of size numColors * 3, holding the RGB values
- */
-ng_err_t getXPalette (Display *xDisplay, int numColors, char* palette)
-{
- XColor color;
- int i;
- int index = 0;
- int colormap = ng.XDefaultColormap (xDisplay, ng.XDefaultScreen(xDisplay));
- for (i = 0; i < numColors; i++)
- {
- color.pixel = i;
- ng.XQueryColor (xDisplay, colormap, &color);
- palette[index++] = ((color.red >> 8) & 0xFF);
- palette[index++] = ((color.green >> 8) & 0xFF);
- palette[index++] = ((color.blue >> 8) & 0xFF);
- }
- return ERR_OK;
-}
-
-/**
- * Put a device-independent image of any depth into a drawable of the same size,
- */
-ng_err_t putImage(ng_bitmap_image_t *image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY,
- Display *xDisplay, Visual *visual, int screenDepth,
- int drawable)
-{
-
- XImage *xImagePtr;
- int bufSize;
- int destRedMask = 0, destGreenMask = 0, destBlueMask = 0;
- BYTE1 screenDirect;
- UBYTE1 *srcData = NgBitmapImageImageData(image);
- UBYTE4 srcDepth = NgBitmapImageBitCount(image);
- BYTE4 sbpp, dbpp;
- GC tempGC;
- int numColors = 0;
-
- /* We only support image depth of 24 bits */
- if (srcDepth != 24) return NgError (ERR_NG, "Error unsupported depth - only support 24 bit");
- if (screenDepth <= 8)
- {
- numColors = getNbrColorsXPalette (xDisplay);
- if (numColors == 0)
- return NgError (ERR_NG, "Error pseudo-color mode detected, no colors available");
- numColors = 1 << ng.XDefaultDepthOfScreen (ng.XDefaultScreenOfDisplay (xDisplay));
- screenDirect = 0;
- } else
- {
- destRedMask = visual->red_mask;
- destGreenMask = visual->green_mask;
- destBlueMask = visual->blue_mask;
- screenDirect = 1;
- }
-
- xImagePtr = ng.XCreateImage(xDisplay, visual, screenDepth, ZPixmap, 0, 0, srcWidth, srcHeight, 32, 0);
- if (xImagePtr == NULL) return NgError (ERR_NG, "Error XCreateImage failed");
- bufSize = xImagePtr->bytes_per_line * srcHeight;
-
- xImagePtr->data = (char*) ng.XtMalloc (bufSize);
- sbpp = NgBitmapImageBytesPerRow(image);
- dbpp = xImagePtr->bytes_per_line;
-
- if (screenDirect)
- {
- /* 24 bit source to direct screen destination */
- NgBitmapImageBlitDirectToDirect(srcData, sbpp, srcWidth, srcHeight,
- (UBYTE1*)xImagePtr->data, xImagePtr->bits_per_pixel, dbpp, xImagePtr->byte_order,
- destRedMask, destGreenMask, destBlueMask);
- } else
- {
- /* 24 bit source to palette screen destination */
- char *palette = (char*) NgMalloc (numColors * 3);
- getXPalette (xDisplay, numColors, palette);
- NgBitmapImageBlitDirectToPalette(srcData, sbpp, srcWidth, srcHeight,
- (UBYTE1*)xImagePtr->data, xImagePtr->bits_per_pixel, dbpp, xImagePtr->byte_order,
- (UBYTE1*)palette, numColors);
- NgFree (palette);
- }
-
- tempGC = ng.XCreateGC (xDisplay, drawable, 0, NULL);
- ng.XPutImage(xDisplay, drawable, tempGC, xImagePtr, 0, 0, 0, 0, srcWidth, srcHeight);
-
- XDestroyImage (xImagePtr);
- ng.XFreeGC (xDisplay, tempGC);
- return ERR_OK;
-}
-
-ng_err_t init(ng_bitmap_image_t *image, Display *xDisplay, int screenDepth, int drawable, Pixmap *pixmap)
-{
- ng_err_t err;
- int width = (int)NgBitmapImageWidth(image);
- int height = (int)NgBitmapImageHeight(image);
-
- Visual *visual = ng.XDefaultVisual(xDisplay, ng.XDefaultScreen(xDisplay));
- *pixmap = ng.XCreatePixmap(xDisplay, drawable, width, height, screenDepth);
- if (*pixmap == 0)
- {
- return NgError (ERR_NG, "Error XCreatePixmap failed");
- }
- err = putImage(image, 0, 0, width, height, 0, 0, xDisplay, visual, screenDepth, *pixmap);
- if (err != ERR_OK)
- {
- ng.XFreePixmap (xDisplay, *pixmap);
- return NgError (err, "Error putImage failed");
- }
-
- return ERR_OK;
-}
-
-/**
- * loadBMPImage
- * Create a pixmap representing the given BMP file, for the specified display and screen.
- *
- * display: connection to X server
- * screen: the screen to create the pixmap for
- * bmpPathname: absolute path and name to the bmp file
- *
- * returned value: the pixmap newly created if successful. 0 otherwise.
- */
-Pixmap loadBMPImage (Display *display, Screen *screen, char *bmpPathname) {
- Window drawable;
- ng_stream_t in;
- ng_bitmap_image_t image;
- ng_err_t err = ERR_OK;
- int screenDepth;
- Pixmap pixmap;
-
- /* this must be called before any X functions are used */
- NGImageInit();
- NgInit();
-
- drawable = ng.XDefaultRootWindow (display);
- screenDepth = ng.XDefaultDepthOfScreen (screen);
-
- if (NgStreamInit (&in, bmpPathname) != ERR_OK)
- {
- NgError (ERR_NG, "Error can't open BMP file");
- return 0;
- }
- NgBitmapImageInit (&image);
- err = NgBmpDecoderReadImage (&in, &image);
- NgStreamClose (&in);
-
- if (err != ERR_OK)
- {
- NgBitmapImageFree (&image);
- return 0;
- }
-
- err = init (&image, display, screenDepth, drawable, &pixmap);
- NgBitmapImageFree (&image);
-
- return err == ERR_OK ? pixmap : 0;
-}
-
-const char *getBMPErrorMessage ()
-{
- return NgGetLastErrorMsg ();
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.h b/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.h
deleted file mode 100644
index a12218fb2..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgImage.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef __NG_IMAGE_H
-#define __NG_IMAGE_H
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xos.h>
-#include <X11/Intrinsic.h>
-
-struct NG_PTRS {
- GC (*XCreateGC) (Display*, Drawable, unsigned long, XGCValues*);
- XImage * (*XCreateImage) (Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int);
- Pixmap (*XCreatePixmap) (Display*, Drawable, unsigned int, unsigned int, unsigned int);
- Colormap (*XDefaultColormap) (Display*, int);
- int (*XDefaultDepthOfScreen)(Screen*);
- Window (*XDefaultRootWindow) (Display*);
- int (*XDefaultScreen) (Display*);
- Screen * (*XDefaultScreenOfDisplay)(Display*);
- Visual * (*XDefaultVisual) (Display*, int);
- int (*XFreeGC) (Display*, GC);
- int (*XFreePixmap) (Display*, Pixmap);
- int (*XPutImage) (Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int);
- int (*XQueryColor) (Display*, Colormap, XColor*);
- char * (*XtMalloc) (Cardinal);
-};
-
-/**
- * loadBMPImage
- * Create a pixmap representing the given BMP file, for the specified display and screen.
- *
- * display: connection to X server
- * screen: the screen to create the pixmap for
- * bmpPathname: absolute path and name to the bmp file
- *
- * returned value: the pixmap newly created if successful. 0 otherwise.
- */
-Pixmap loadBMPImage (Display *display, Screen *screen, char *bmpPathname);
-
-/**
- * Return error message describing why the BMP file could not be displayed
- */
-const char *getBMPErrorMessage();
-
-#endif /* NG_IMAGE_H */
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.c b/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.c
deleted file mode 100644
index 96053b305..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.c
+++ /dev/null
@@ -1,490 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "NgImageData.h"
-
-static UBYTE4 RoundRow (UBYTE4 width)
-{
- UBYTE4 result = (width + RowRounding - 1)
- & ~(RowRounding - 1) ;
- return result ;
-}
-
-void NgBitmapImageInit (ng_bitmap_image_t *image)
-{
- NgBitmapImageClearData (image);
-}
-
-void NgBitmapImageFree (ng_bitmap_image_t *image)
-{
- NgFree (image->color_map);
- NgFree (image->image_data);
- NgFree (image->alpha_data);
-}
-
-void NgBitmapImageClearData (ng_bitmap_image_t *image)
-{
- image->bit_count = 0;
- image->image_width = 0;
- image->image_height = 0;
- image->color_count = 0;
- image->color_map = NULL;
- image->image_data = NULL;
- image->alpha_data = NULL;
- image->transparent_pixel = -1;
-}
-
-void NgBitmapImageSetSize(ng_bitmap_image_t *image,
- UBYTE4 color_count,
- UBYTE4 bits,
- UBYTE4 width,
- UBYTE4 height)
-{
- NgFree (image->color_map);
- NgFree (image->image_data);
- NgBitmapImageClearData (image);
-
- switch (bits)
- {
- case 1:
- case 2:
- case 4:
- case 8:
- {
- UBYTE4 bitsize;
- UBYTE4 bytecount;
-
- image->bit_count = bits;
- image->color_count = color_count;
- image->image_width = width;
- image->image_height = height;
-
- image->color_map = (ng_color_map_entry_t *) NgMalloc (sizeof(ng_color_map_entry_t) * image->color_count);
- NgMemSet (image->color_map, 0, sizeof (ng_color_map_entry_t) * image->color_count);
- bitsize = image->bit_count * image->image_width;
- image->row_width = RoundRow ((bitsize + 7)/8);
- bytecount = image->row_width * image->image_height;
- image->image_data = (UBYTE1 *) NgMalloc (bytecount);
- NgMemSet (image->image_data, 0, (BYTE4)bytecount);
- }
- break ;
- case 16:
- {
- image->bit_count = bits;
- image->color_count = color_count;
- image->image_width = width;
- image->image_height = height;
- image->row_width = RoundRow (2 * image->image_width);
- image->image_data = (UBYTE1 *) NgMalloc (image->row_width * image->image_height);
- NgMemSet (image->image_data, 0, image->row_width * image->image_height);
- }
- break;
- case 24:
- {
- image->bit_count = bits;
- image->color_count = color_count;
- image->image_width = width;
- image->image_height = height;
- image->row_width = RoundRow (3 * image->image_width);
- image->image_data = (UBYTE1 *) NgMalloc (image->row_width * image->image_height);
- NgMemSet (image->image_data, 0, image->row_width * image->image_height);
- }
- break;
- case 32:
- {
- image->bit_count = bits;
- image->color_count = color_count;
- image->image_width = width;
- image->image_height = height;
- image->row_width = RoundRow (4 * image->image_width);
- image->image_data = (UBYTE1 *) NgMalloc (image->row_width * image->image_height);
- NgMemSet (image->image_data, 0, image->row_width * image->image_height);
- }
- break ;
- default:
- NgError (ERR_INVALID_BIT_COUNT, NULL);
- }
-}
-
-ng_color_map_entry_t *NgBitmapImageColorMap (ng_bitmap_image_t *image, UBYTE4 index)
-{
- if (index >= image->color_count)
- {
- NgError (ERR_SUBSCRIPT_OUT_OF_RANGE, "Error NgBitmapImageColorMap failed");
- return NULL;
- }
-
- return &image->color_map [index] ;
-}
-
-/* blit constants */
-#define TYPE_INDEX_1_MSB 1
-#define TYPE_INDEX_1_LSB 2
-#define TYPE_INDEX_2 3
-#define TYPE_INDEX_4 4
-#define TYPE_INDEX_8 5
-#define TYPE_GENERIC_24 6
-#define TYPE_GENERIC_8 7
-#define TYPE_GENERIC_16_MSB 8
-#define TYPE_GENERIC_16_LSB 9
-#define TYPE_GENERIC_32_MSB 10
-#define TYPE_GENERIC_32_LSB 11
-
-/**
- * Computes the required channel shift from a mask.
- */
-UBYTE4 getChannelShift(UBYTE4 mask)
-{
- UBYTE4 i;
- if (mask == 0) return 0;
- for (i = 0; ((mask & 1) == 0) && (i < 32); ++i)
- {
- mask >>= 1;
- }
- return i;
-}
-
-/**
- * Computes the required channel width (depth) from a mask.
- */
-UBYTE4 getChannelWidth(UBYTE4 mask, UBYTE4 shift)
-{
- UBYTE4 i;
- if (mask == 0) return 0;
- mask >>= shift;
- for (i = shift; ((mask & 1) != 0) && (i < 32); ++i)
- {
- mask >>= 1;
- }
- return i - shift;
-}
-
-/**
- * Blits a direct palette image into a direct palette image.
- *
- * srcData the source byte array containing image data
- * srcStride the source number of bytes per line
- * srcWidth the width of the source blit region
- * srcHeight the height of the source blit region
- * destData the destination byte array containing image data
- * destDepth the destination depth: one of 8, 16, 24, 32
- * destStride the destination number of bytes per line
- * destOrder the destination byte ordering: 0 for LSB, 1 otherwise
- * ignored if destDepth is not 16 or 32
- * destRedMask the destination red channel mask
- * destGreenMask the destination green channel mask
- * destBlueMask the destination blue channel mask
- *
- * It is assumed that.
- * srcDepth: 24 - BGR ordering (BMP format)
- * no alpha
- * srcX: 0
- * srcY: 0
- * destX: 0
- * destY: 0
- * destWidth: same as srcWidth
- * destHeight: same as srcHeight
- */
-void NgBitmapImageBlitDirectToDirect(
- UBYTE1 *srcData, BYTE4 srcStride,
- BYTE4 srcWidth, BYTE4 srcHeight,
- UBYTE1 *destData, BYTE4 destDepth, BYTE4 destStride, BYTE4 destOrder,
- UBYTE4 destRedMask, UBYTE4 destGreenMask, UBYTE4 destBlueMask)
-{
- BYTE4 srcX = 0, srcY = 0, destX = 0, destY = 0, destWidth = srcWidth, destHeight = srcHeight;
-
- BYTE4 sbpp, stype, spr, dbpp, dtype, dpr, dprxi, dpryi, dp, sp, dy, dx;
- BYTE4 destRedShift, destRedWidth;
- BYTE4 destRedPreShift, destGreenShift, destGreenWidth, destGreenPreShift;
- BYTE4 destBlueShift, destBlueWidth, destBluePreShift;
- UBYTE1 r, g, b;
- UBYTE4 data;
-
- /*** Prepare source-related data ***/
- sbpp = 3;
- stype = TYPE_GENERIC_24;
-
- spr = srcY * srcStride + srcX * sbpp;
-
- /*** Prepare destination-related data ***/
- switch (destDepth)
- {
- case 8:
- dbpp = 1;
- dtype = TYPE_GENERIC_8;
- break;
- case 16:
- dbpp = 2;
- dtype = (destOrder != 0) ? TYPE_GENERIC_16_MSB : TYPE_GENERIC_16_LSB;
- break;
- case 24:
- dbpp = 3;
- dtype = TYPE_GENERIC_24;
- break;
- case 32:
- dbpp = 4;
- dtype = (destOrder != 0) ? TYPE_GENERIC_32_MSB : TYPE_GENERIC_32_LSB;
- break;
- default:
- return;
- }
-
- dpr = destY * destStride + destX * dbpp;
- dprxi = dbpp;
- dpryi = destStride;
-
- /*** Blit ***/
- dp = dpr;
- sp = spr;
-
- /*** Comprehensive blit (apply transformations) ***/
- destRedShift = getChannelShift(destRedMask);
- destRedWidth = getChannelWidth(destRedMask, destRedShift);
- destRedPreShift = 8 - destRedWidth;
- destGreenShift = getChannelShift(destGreenMask);
- destGreenWidth = getChannelWidth(destGreenMask, destGreenShift);
- destGreenPreShift = 8 - destGreenWidth;
- destBlueShift = getChannelShift(destBlueMask);
- destBlueWidth = getChannelWidth(destBlueMask, destBlueShift);
- destBluePreShift = 8 - destBlueWidth;
-
- r = 0; g = 0; b = 0;
- for (dy = destHeight; dy > 0; --dy, sp = spr += srcStride, dp = dpr += dpryi)
- {
- for (dx = destWidth; dx > 0; --dx, dp += dprxi)
- {
- /*** READ NEXT PIXEL ASSUMING BGR ordering (BMP format) ***/
- b = srcData[sp];
- g = srcData[sp + 1];
- r = srcData[sp + 2];
- sp += 3;
- /*** WRITE NEXT PIXEL ***/
- data =
- (r >> destRedPreShift << destRedShift) |
- (g >> destGreenPreShift << destGreenShift) |
- (b >> destBluePreShift << destBlueShift);
- switch (dtype)
- {
- case TYPE_GENERIC_8:
- {
- destData[dp] = (UBYTE1) data;
- } break;
- case TYPE_GENERIC_16_MSB:
- {
- destData[dp] = (UBYTE1) (data >> 8);
- destData[dp + 1] = (UBYTE1) (data & 0xff);
- } break;
- case TYPE_GENERIC_16_LSB:
- {
- destData[dp] = (UBYTE1) (data & 0xff);
- destData[dp + 1] = (UBYTE1) (data >> 8);
- } break;
- case TYPE_GENERIC_24:
- {
- destData[dp] = (UBYTE1) (data >> 16);
- destData[dp + 1] = (UBYTE1) (data >> 8);
- destData[dp + 2] = (UBYTE1) (data & 0xff);
- } break;
- case TYPE_GENERIC_32_MSB:
- {
- destData[dp] = (UBYTE1) (data >> 24);
- destData[dp + 1] = (UBYTE1) (data >> 16);
- destData[dp + 2] = (UBYTE1) (data >> 8);
- destData[dp + 3] = (UBYTE1) (data & 0xff);
- } break;
- case TYPE_GENERIC_32_LSB:
- {
- destData[dp] = (UBYTE1) (data & 0xff);
- destData[dp + 1] = (UBYTE1) (data >> 8);
- destData[dp + 2] = (UBYTE1) (data >> 16);
- destData[dp + 3] = (UBYTE1) (data >> 24);
- } break;
- }
- }
- }
-}
-
-/**
- * Create a simple hash table used when converting direct colors to values in a palette
- * Each bucket stores the RGB codes and the corresponding palette index.
- * The key is made from the RGB values.
- * It is used as a cache. New entries colliding with older ones simply
- * replace them.
- */
-ng_palette_bucket_t *NgRGBIndexCreate ()
-{
- ng_palette_bucket_t *table = (ng_palette_bucket_t *)NgMalloc (RGBIndexTableSize * sizeof (ng_palette_bucket_t));
- NgMemSet (table, 0, RGBIndexTableSize * sizeof (ng_palette_bucket_t));
- return table;
-}
-
-void NgRGBIndexFree (ng_palette_bucket_t *table)
-{
- NgFree (table);
-}
-
-void NgRGBIndexSet (ng_palette_bucket_t *table, UBYTE1 r, UBYTE1 g, UBYTE1 b, UBYTE1 index)
-{
- int i = (r * g * b) % RGBIndexTableSize;
- table[i].blue = b;
- table[i].green = g;
- table[i].red = r;
- table[i].index = index;
- table[i].isSet = 1;
-}
-
-int NgRGBIndexGet (ng_palette_bucket_t *table, UBYTE1 r, UBYTE1 g, UBYTE1 b)
-{
- int i = (r * g * b) % RGBIndexTableSize;
- if (table[i].isSet && table[i].blue == b && table[i].green == g && table[i].red == r)
- return table[i].index;
- return -1;
-}
-
-/**
- * Blits a direct palette image into an index palette image.
- *
- * srcData the source byte array containing image data
- * srcStride the source number of bytes per line
- * srcX the top-left x-coord of the source blit region
- * srcY the top-left y-coord of the source blit region
- * srcWidth the width of the source blit region
- * srcHeight the height of the source blit region
- * destData the destination byte array containing image data
- * destDepth the destination depth: one of 1, 2, 4, 8
- * destStride the destination number of bytes per line
- * destOrder the destination byte ordering: 0 if LSB, 1 otherwise;
- * ignored if destDepth is not 1
- * destX the top-left x-coord of the destination blit region
- * destY the top-left y-coord of the destination blit region
- * destWidth the width of the destination blit region
- * destHeight the height of the destination blit region
- * destColors the destination palette red green blue component intensities
- * destNumColors the number of colors in destColors
- *
- * It is assumed that.
- * srcDepth: 24 - BGR ordering (BMP format)
- * no alpha
- * srcX: 0
- * srcY: 0
- * destX: 0
- * destY: 0
- * destWidth: same as srcWidth
- * destHeight: same as srcHeight
- */
-
-void NgBitmapImageBlitDirectToPalette(
- UBYTE1 *srcData, BYTE4 srcStride,
- BYTE4 srcWidth, BYTE4 srcHeight,
- UBYTE1 *destData, BYTE4 destDepth, BYTE4 destStride, BYTE4 destOrder,
- UBYTE1 *destColors, int destNumColors)
-{
- BYTE4 srcX = 0, srcY = 0, destX = 0, destY = 0, destWidth = srcWidth, destHeight = srcHeight;
- BYTE4 sbpp, spr, dtype, dpr, dp, sp, destPaletteSize, dy, dx, j, dr, dg, db, distance, minDistance;
-
- UBYTE1 r = 0, g = 0, b = 0, index = 0;
- int storedIndex;
- ng_palette_bucket_t *RGBIndexTable;
-
- /*** Prepare source-related data ***/
- sbpp = 3;
- spr = srcY * srcStride + srcX * sbpp;
-
- /*** Prepare destination-related data ***/
- switch (destDepth)
- {
- case 8:
- dtype = TYPE_INDEX_8;
- break;
- case 4:
- destStride <<= 1;
- dtype = TYPE_INDEX_4;
- break;
- case 2:
- destStride <<= 2;
- dtype = TYPE_INDEX_2;
- break;
- case 1:
- destStride <<= 3;
- dtype = (destOrder != 0) ? TYPE_INDEX_1_MSB : TYPE_INDEX_1_LSB;
- break;
- default:
- return;
- }
- dpr = destY * destStride + destX;
-
- dp = dpr;
- sp = spr;
- destPaletteSize = destNumColors;
-
- RGBIndexTable = NgRGBIndexCreate ();
- for (dy = destHeight; dy > 0; --dy, sp = spr += srcStride, dp = dpr += destStride)
- {
- for (dx = destWidth; dx > 0; --dx, dp += 1)
- {
- /*** READ NEXT PIXEL ASSUMING BGR ordering (BMP format) ***/
- b = srcData[sp];
- g = srcData[sp+1];
- r = srcData[sp+2];
- sp += 3;
-
- /*** MAP COLOR TO THE PALETTE ***/
- storedIndex = NgRGBIndexGet (RGBIndexTable, r, g, b);
- if (storedIndex >= 0)
- {
- index = (UBYTE1) storedIndex;
- } else
- {
- for (j = 0, minDistance = 0x7fffffff; j < destPaletteSize; ++j)
- {
- dr = (destColors[j*3] & 0xff) - r;
- dg = (destColors[j*3+1] & 0xff) - g;
- db = (destColors[j*3+2] & 0xff) - b;
- distance = dr * dr + dg * dg + db * db;
- if (distance < minDistance)
- {
- index = (UBYTE1)j;
- if (distance == 0) break;
- minDistance = distance;
- }
- }
- NgRGBIndexSet (RGBIndexTable, r, g, b, index);
- }
-
- /*** WRITE NEXT PIXEL ***/
- switch (dtype) {
- case TYPE_INDEX_8:
- destData[dp] = (UBYTE1) index;
- break;
- case TYPE_INDEX_4:
- if ((dp & 1) != 0) destData[dp >> 1] = ((destData[dp >> 1] & 0xf0) | index);
- else destData[dp >> 1] = ((destData[dp >> 1] & 0x0f) | (index << 4));
- break;
- case TYPE_INDEX_2:
- {
- int shift = 6 - (dp & 3) * 2;
- destData[dp >> 2] = ((destData[dp >> 2] & ~(0x03 << shift)) | (index << shift));
- } break;
- case TYPE_INDEX_1_MSB:
- {
- int shift = 7 - (dp & 7);
- destData[dp >> 3] = ((destData[dp >> 3] & ~(0x01 << shift)) | (index << shift));
- } break;
- case TYPE_INDEX_1_LSB:
- {
- int shift = dp & 7;
- destData[dp >> 3] = ((destData[dp >> 3] & ~(0x01 << shift)) | (index << shift));
- } break;
- }
- }
- }
- NgRGBIndexFree (RGBIndexTable);
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.h b/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.h
deleted file mode 100644
index 2b0f9f4af..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgImageData.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef __NG_IMAGEDATA_H
-#define __NG_IMAGEDATA_H
-
-/**
- * Type ng_bitmap_image_t (C version of SWT ImageData)
- *
- * Unlike ImageData, ng_bitmap_image_t and all its api are 'internal'.
- * The api marked 'public' is in the sense that it can be used
- * by the rest of the native graphic library.
- */
-
-#include "NgCommon.h"
-
-typedef struct ng_bitmap_image_t ng_bitmap_image_t;
-
-typedef struct {
- UBYTE1 blue;
- UBYTE1 green;
- UBYTE1 red;
-} ng_color_map_entry_t;
-
-/* ImageData in SWT expects RGB not BGR */
-enum { RedOffset=0, GreenOffset=1, BlueOffset=2 };
-
-struct ng_bitmap_image_t {
- /* Width in bytes of each row */
- UBYTE4 row_width;
- /* Number of bits per pixel (depth) 1, 2, 4, 8, 16 or 24 */
- UBYTE4 bit_count;
- UBYTE4 image_width;
- UBYTE4 image_height;
- /* image data
- * 24-bit images, 3 bytes per pixel representing RGB values
- * 32 bit images, 4 bytes per pixel representing RGB values + one wasted byte
- * 16 bit images, 2 bytes per pixel
- * rest (1, 2, 4, 8): index into color map
- */
- UBYTE1 *image_data;
- /* alpha data (either NULL or of size image_width*image_height) */
- UBYTE1 *alpha_data;
- /* transparent pixel - default is -1 which means no transparent pixel */
- BYTE4 transparent_pixel;
- /* number of entries in color map */
- UBYTE4 color_count;
- ng_color_map_entry_t *color_map;
-};
-
-/************************************************
- * Public API ng_bitmap_image_t
- ************************************************/
-
-/**
- * Init an image
- */
-void NgBitmapImageInit (ng_bitmap_image_t *);
-
-/**
- * Dispose the resources allocated by the image.
- */
-void NgBitmapImageFree (ng_bitmap_image_t *);
-
-/**
- * Access start of image data
- * return: a pointer to an array of UBYTE1 of size image_row * image_width
- * signature: UBYTE1 *NgBitmapImageImageData (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageImageData(image) ((image)->image_data)
-
-/**
- * signature: UBYTE4 NgBitmapImageWidth (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageWidth(image) ((image)->image_width)
-
-/**
- * signature: UBYTE4 NgBitmapImageHeight (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageHeight(image) ((image)->image_height)
-
-/**
- * signature: UBYTE4 NgBitmapImageBitCount (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageBitCount(image) ((image)->bit_count)
-
-/**
- * signature: UBYTE4 NgBitmapImageColorCount (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageColorCount(image) ((image)->color_count)
-
-/**
- * Access a row of the image
- * row: a value which must be between 0 and image_height-1
- * return: a pointer to the desired row, which is an array of size row_width
- * signature: UBYTE1 *NgBitmapImageGetRow (ng_bitmap_image_t *image, UBYTE4 row)
- */
-#define NgBitmapImageGetRow(image, row) (&image->image_data[row * image->row_width])
-
-/**
- * signature: UBYTE4 NgBitmapImageBytesPerRow (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageBytesPerRow(image) ((image)->row_width)
-
-/**
- * Retrieve an entry from the color map
- * index: a value which must be between 0 and color_count-1
- */
-ng_color_map_entry_t *NgBitmapImageColorMap (ng_bitmap_image_t *, UBYTE4 index);
-
-/**
- * Get the value of the transparent pixel
- * signature: BYTE4 NgBitmapImageGetTransparent (ng_bitmap_image_t *image)
- */
-#define NgBitmapImageGetTransparent(image) ((image)->transparent_pixel)
-
-/**
- * Get the alpha data
- * signature: UBYTE1 *NgBitmapImageGetAlpha (ng_bitmap_image_t* image)
- */
-#define NgBitmapImageGetAlpha(image) ((image)->alpha_data)
-
-void NgBitmapImageBlitDirectToDirect(
- UBYTE1 *srcData, BYTE4 srcStride,
- BYTE4 srcWidth, BYTE4 srcHeight,
- UBYTE1 *destData, BYTE4 destDepth, BYTE4 destStride, BYTE4 destOrder,
- UBYTE4 destRedMask, UBYTE4 destGreenMask, UBYTE4 destBlueMask);
-
-/* Size of hash table used in NgBitmapImageBlitDirectToPalette */
-#define RGBIndexTableSize 103
-
-typedef struct {
- UBYTE1 isSet;
- UBYTE1 blue;
- UBYTE1 green;
- UBYTE1 red;
- UBYTE1 index;
-} ng_palette_bucket_t;
-
-void NgBitmapImageBlitDirectToPalette(
- UBYTE1 *srcData, BYTE4 srcStride,
- BYTE4 srcWidth, BYTE4 srcHeight,
- UBYTE1 *destData, BYTE4 destDepth, BYTE4 destStride, BYTE4 destOrder,
- UBYTE1 *destColors, int destNumColors);
-
-/************************************************
- * Private API ng_bitmap_image_t
- ************************************************/
-
-/* Number of bytes to round each row to */
-#define RowRounding 4
-
-void NgBitmapImageInitialize (ng_bitmap_image_t *);
-void NgBitmapImageClearData (ng_bitmap_image_t *);
-
-void NgBitmapImageSetSize(ng_bitmap_image_t *,
- UBYTE4 color_count,
- UBYTE4 bits,
- UBYTE4 width,
- UBYTE4 height);
-
-#endif /* NG_IMAGEDATA_H */
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.c b/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.c
deleted file mode 100644
index 57989f649..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "NgCommon.h"
-#include "NgWinBMPFileFormat.h"
-
-#define BMPHeaderFixedSize 40
-
-BYTE4 decompressRLE4Data(BYTE1 *src, BYTE4 numBytes, BYTE4 stride, BYTE1 *dest, BYTE4 destSize)
-{
- BYTE4 sp = 0;
- BYTE4 se = numBytes;
- BYTE4 dp = 0;
- BYTE4 de = destSize;
- BYTE4 x = 0, y = 0;
- BYTE4 i;
- while (sp < se)
- {
- int len = src[sp] & 0xFF;
- sp++;
- if (len == 0)
- {
- len = src[sp] & 0xFF;
- sp++;
- switch (len)
- {
- case 0: /* end of line */
- y++;
- x = 0;
- dp = y * stride;
- if (dp >= de)
- return -1;
- break;
- case 1: /* end of bitmap */
- return 1;
- case 2: /* delta */
- x += src[sp] & 0xFF;
- sp++;
- y += src[sp] & 0xFF;
- sp++;
- dp = y * stride + x / 2;
- if (dp >= de)
- return -1;
- break;
- default: /* absolute mode run */
- if ((len & 1) != 0) /* odd run lengths not currently supported */
- return -1;
- x += len;
- len = len / 2;
- if (len > (se - sp))
- return -1;
- if (len > (de - dp))
- return -1;
- for (i = 0; i < len; i++)
- {
- dest[dp] = src[sp];
- dp++;
- sp++;
- }
- if ((sp & 1) != 0)
- sp++; /* word align sp? */
- break;
- }
- } else
- {
- BYTE1 theByte;
- if ((len & 1) != 0)
- return -1;
- x += len;
- len = len / 2;
- theByte = src[sp];
- sp++;
- if (len > (de - dp))
- return -1;
- for (i = 0; i < len; i++)
- {
- dest[dp] = theByte;
- dp++;
- }
- }
- }
- return 1;
-}
-
-BYTE4 decompressRLE8Data(BYTE1 *src, BYTE4 numBytes, BYTE4 stride, BYTE1 *dest, BYTE4 destSize)
-{
- BYTE4 sp = 0;
- BYTE4 se = numBytes;
- BYTE4 dp = 0;
- BYTE4 de = destSize;
- BYTE4 x = 0, y = 0;
- BYTE4 i;
- while (sp < se) {
- int len = src[sp] & 0xFF;
- sp++;
- if (len == 0) {
- len = src[sp] & 0xFF;
- sp++;
- switch (len)
- {
- case 0: /* end of line */
- y++;
- x = 0;
- dp = y * stride;
- if (dp >= de)
- return -1;
- break;
- case 1: /* end of bitmap */
- return 1;
- case 2: /* delta */
- x += src[sp] & 0xFF;
- sp++;
- y += src[sp] & 0xFF;
- sp++;
- dp = y * stride + x;
- if (dp >= de)
- return -1;
- break;
- default: /* absolute mode run */
- if (len > (se - sp))
- return -1;
- if (len > (de - dp))
- return -1;
- for (i = 0; i < len; i++)
- {
- dest[dp] = src[sp];
- dp++;
- sp++;
- }
- if ((sp & 1) != 0)
- sp++; /* word align sp? */
- x += len;
- break;
- }
- } else
- {
- BYTE1 theByte = src[sp];
- sp++;
- if (len > (de - dp))
- return -1;
- for (i = 0; i < len; i++)
- {
- dest[dp] = theByte;
- dp++;
- }
- x += len;
- }
- }
- return 1;
-}
-
-ng_err_t decompressData (BYTE1 *src, BYTE4 numBytes, BYTE1 *dest, BYTE4 destSize, BYTE4 stride, BYTE4 cmp)
-{
- if (cmp == 1)
- {
- /* BMP_RLE8_COMPRESSION */
- if (decompressRLE8Data (src, numBytes, stride, dest, destSize) <= 0)
- return NgError (ERR_NG, "Error decompressRLE8Data failed");
- } else if (cmp == 2)
- {
- /* BMP_RLE4_COMPRESSION */
- if (decompressRLE4Data (src, numBytes, stride, dest, destSize) <= 0)
- return NgError (ERR_NG, "Error decompressRLE4Data failed");
- } else
- {
- return NgError (ERR_NG, "Error decompressData failed - unsupported compression");
- }
- return ERR_OK;
-}
-
-void flipScanLines(BYTE1 *data, BYTE4 numBytes, int stride, int height)
-{
- BYTE4 i1 = 0;
- BYTE4 i2 = (height - 1) * stride;
- BYTE4 i, index;
- for (i = 0; i < height / 2; i++)
- {
- for (index = 0; index < stride; index++)
- {
- BYTE1 b = data[index + i1];
- data[index + i1] = data[index + i2];
- data[index + i2] = b;
- }
- i1 += stride;
- i2 -= stride;
- }
-}
-
-/**
- * BmpDecoderReadImage
- *
- * Decode the content of a bmp file.
- *
- * in : the input stream
- * image : a pointer to a ng_bitmap_image_t
- *
- * return: ERR_OK if the image was correctly built from the input stream
- * ERR_NG otherwise.
- */
-ng_err_t NgBmpDecoderReadImage (ng_stream_t *in, ng_bitmap_image_t *image)
-{
- BYTE4 *fileHeader = (BYTE4*) NgMalloc (5 * sizeof(BYTE4));
- BYTE1 *infoHeader, *data;
- BYTE4 width, height, stride, dataSize, cmp, pos;
- BYTE2 depth;
- BYTE2 d0;
-
- NgStreamRead (in, (char *) &d0, sizeof(BYTE2));
- fileHeader[0] = (BYTE4)LittleEndianToSystemUBYTE2(d0);
- NgStreamRead (in, (char *) &fileHeader[1], sizeof(BYTE4));
- fileHeader[1] = LittleEndianToSystemUBYTE4(fileHeader[1]);
- NgStreamRead (in, (char *) &d0, sizeof(BYTE2));
- fileHeader[2] = (BYTE4)LittleEndianToSystemUBYTE2(d0);
- NgStreamRead (in, (char *) &d0, sizeof(BYTE2));
- fileHeader[3] = (BYTE4)LittleEndianToSystemUBYTE2(d0);
- NgStreamRead (in, (char *) &fileHeader[4], sizeof(BYTE4));
- fileHeader[4] = LittleEndianToSystemUBYTE4(fileHeader[4]);
-
- if (NgStreamEof (in))
- {
- NgFree (fileHeader);
- return NgError (ERR_NG, "Error invalid header file");
- }
- if (fileHeader[0] != 0x4D42)
- {
- NgFree (fileHeader);
- return NgError (ERR_NG, "Error not a BMP file");
- }
-
- infoHeader = (BYTE1*) NgMalloc (BMPHeaderFixedSize * sizeof (BYTE1));
- NgStreamRead (in, infoHeader, BMPHeaderFixedSize * sizeof (BYTE1));
-
- if (NgStreamEof (in))
- {
- NgFree (fileHeader);
- NgFree (infoHeader);
- return NgError (ERR_NG, "Error invalid info header");
- }
-
- NgMemCpy (&width, &infoHeader[4], sizeof (BYTE4));
- width = LittleEndianToSystemUBYTE4(width);
-
- NgMemCpy (&height, &infoHeader[8], sizeof (BYTE4));
- height = LittleEndianToSystemUBYTE4(height);
-
- NgMemCpy (&depth, &infoHeader[14], sizeof (BYTE2));
- depth = LittleEndianToSystemUBYTE2(depth);
-
- stride = (width * depth + 7) / 8;
- stride = (stride + 3) / 4 * 4; /* Round up to 4 byte multiple */
-
- if (depth <= 8)
- {
- BYTE4 i, index;
- BYTE1 *colors;
- BYTE4 numColors;
- NgMemCpy (&numColors, &infoHeader[32], sizeof (BYTE4));
- numColors = LittleEndianToSystemUBYTE4(numColors);
- if (numColors == 0)
- {
- BYTE2 value;
- NgMemCpy (&value, &infoHeader[14], sizeof (BYTE2));
- value = LittleEndianToSystemUBYTE2(value);
- numColors = 1 << value;
- } else
- {
- if (numColors > 256)
- numColors = 256;
- }
- colors = (BYTE1*) NgMalloc (numColors * 4);
- NgStreamRead (in, colors, numColors * 4);
-
- if (NgStreamEof (in))
- {
- NgFree (fileHeader);
- NgFree (infoHeader);
- NgFree (colors);
- return NgError (ERR_NG, "Error invalid palette info");
- }
-
- index = 0;
-
- NgBitmapImageSetSize(image, (UBYTE4)numColors, (UBYTE4)depth,
- (UBYTE4)width, (UBYTE4)height);
-
- for (i = 0; i < numColors; i++)
- {
- ng_color_map_entry_t *color_map = NgBitmapImageColorMap (image, i);
- color_map->blue = colors[index++];
- color_map->green = colors[index++];
- color_map->red = colors[index++];
- index++;
- }
-
- NgFree (colors);
- } else
- {
- /* direct - 16 and 24 bits */
- NgBitmapImageSetSize(image, 0, (UBYTE4)depth,
- (UBYTE4)width, (UBYTE4)height);
- }
-
- pos = NgStreamGetPosition (in);
- if (pos < fileHeader[4])
- {
- NgStreamSkip (in, fileHeader[4] - pos);
- }
-
- dataSize = height * stride;
-
- data = (BYTE1*)NgBitmapImageImageData(image);
- NgMemCpy (&cmp, &infoHeader[16], sizeof (BYTE4));
- cmp = LittleEndianToSystemUBYTE4(cmp);
- if (cmp == 0)
- {
- /* BMP_NO_COMPRESSION */
- BYTE4 cnt;
- cnt = NgStreamRead (in, data, dataSize);
- if (cnt != dataSize)
- {
- NgFree (fileHeader);
- NgFree (infoHeader);
- return NgError (ERR_NG, "Error failed reading uncompressed data");
- }
- } else
- {
- BYTE4 compressedSize;
- BYTE1 *compressed;
- BYTE4 cnt;
- ng_err_t res;
- NgMemCpy (&compressedSize, &infoHeader[20], sizeof (BYTE4));
- compressedSize = LittleEndianToSystemUBYTE4(compressedSize);
- compressed = (BYTE1*) NgMalloc (compressedSize * sizeof (BYTE1));
- cnt = NgStreamRead (in, compressed, compressedSize);
- if (cnt != compressedSize)
- {
- NgFree (fileHeader);
- NgFree (infoHeader);
- NgFree (compressed);
- return NgError (ERR_NG, "Error failed reading compressed data");
- }
- res = decompressData (compressed, compressedSize, data, dataSize, stride, cmp);
- if (res != ERR_OK)
- {
- NgFree (fileHeader);
- NgFree (infoHeader);
- NgFree (compressed);
- return NgError (res, "Error failed data decompression");
- }
-
- NgFree (compressed);
- }
-
- flipScanLines(data, dataSize, stride, height);
-
- NgFree (fileHeader);
- NgFree (infoHeader);
- return ERR_OK;
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.h b/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.h
deleted file mode 100644
index 8ef7dda6b..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/NgWinBMPFileFormat.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef __NG_WINBMPFILEFORMAT_H
-#define __NG_WINBMPFILEFORMAT_H
-
-/**
- * BMP Decoder
- */
-#include "NgCommon.h"
-#include "NgImageData.h"
-
-/**
- * BmpDecoderReadImage
- *
- * Decode the content of a bmp file.
- *
- * in : the input stream
- * image : a pointer to a ng_bitmap_image_t
- *
- * return: ERR_OK if the image was correctly built from the input stream
- * ERR_NG otherwise.
- */
-ng_err_t NgBmpDecoderReadImage (ng_stream_t *in, ng_bitmap_image_t *image);
-
-#endif /* __NG_WINBMPFILEFORMAT_H */
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/build.sh b/features/org.eclipse.equinox.executable.feature/library/motif/build.sh
deleted file mode 100644
index 7bc48e7d6..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/build.sh
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-# Sumit Sarkar (Hewlett-Packard)
-# Martin Oberhuber (Wind River) - [185734] Support building with gcc and debug
-#*******************************************************************************
-#
-# Usage: sh build.sh [<optional switches>] [clean]
-#
-# where the optional switches are:
-# -output <PROGRAM_OUTPUT> - executable filename ("eclipse")
-# -os <DEFAULT_OS> - default Eclipse "-os" value
-# -arch <DEFAULT_OS_ARCH> - default Eclipse "-arch" value
-# -ws <DEFAULT_WS> - default Eclipse "-ws" value
-# -java <JAVA_HOME> - java insgtall for jni headers
-#
-# All other arguments are directly passed to the "make" program.
-# This script can also be invoked with the "clean" argument.
-#
-# Examples:
-# sh build.sh clean
-# sh build.sh -java /usr/j2se OPTFLAG=-g PICFLAG=-fpic
-
-cd `dirname $0`
-
-# Define default values for environment variables used in the makefiles.
-programOutput="eclipse"
-defaultOS=""
-defaultOSArch=""
-defaultWS="motif"
-defaultJava=DEFAULT_JAVA_JNI
-EXEC_DIR=../../../../../rt.equinox.binaries/org.eclipse.equinox.executable
-makefile=""
-javaHome=""
-outputRoot="bin"
-if [ "$OS" = "" ]; then
- OS=`uname -s`
-fi
-if [ "$MODEL" = "" ]; then
- MODEL=`uname -m`
-fi
-
-case $OS in
- "AIX")
- makefile="make_aix.mak"
- defaultOS="aix"
- defaultOSArch="ppc"
- defaultWS="motif"
- MOTIF_HOME=/usr
- OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
- ;;
- "Linux")
- makefile="make_linux.mak"
- defaultOS="linux"
- defaultOSArch="x86"
- defaultWS="motif"
- X11_HOME=/usr/X11R6
- MOTIF_HOME=~/motif21
- OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
- ;;
- "SunOS")
-# PATH=/usr/ccs/bin:/opt/SUNWspro/bin:$PATH
- PATH=/usr/ccs/bin:/export/home/SUNWspro/bin:$PATH
- [ -d /bluebird/teamswt/swt-builddir/build/JRE/SPARC/jdk1.6.0_14 ] && javaHome="/bluebird/teamswt/swt-builddir/build/JRE/SPARC/jdk1.6.0_14"
- outputRoot="contributed"
- export PATH
- makefile="make_solaris.mak"
- defaultOS="solaris"
- defaultOSArch="sparc"
- defaultWS="motif"
- OS="Solaris"
- X11_HOME=/usr/openwin
- MOTIF_HOME=/usr/dt
- OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
- ;;
- "HP-UX")
- X11_HOME=/usr
- MOTIF_HOME=/usr
- case $MODEL in
- "ia64")
- makefile="make_hpux_ia64_32.mak"
- defaultOS="hpux"
- defaultOSArch="ia64_32"
- defaultWS="motif"
- OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
- javaHome="/opt/java1.5"
- defaultJava=DEFAULT_JAVA_EXEC
- PATH=/opt/hp-gcc/bin:$PATH
- export PATH
- ;;
- *)
- makefile="make_hpux_PA_RISC.mak"
- defaultOS="hpux"
- defaultOSArch="PA_RISC"
- defaultWS="motif"
- OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
- ;;
- esac
- ;;
- *)
- echo "Unknown OS -- build aborted"
- ;;
-esac
-
-# Parse the command line arguments and override the default values.
-extraArgs=""
-while [ "$1" != "" ]; do
- if [ "$1" = "-os" ] && [ "$2" != "" ]; then
- defaultOS="$2"
- shift
- elif [ "$1" = "-arch" ] && [ "$2" != "" ]; then
- defaultOSArch="$2"
- shift
- elif [ "$1" = "-ws" ] && [ "$2" != "" ]; then
- defaultWS="$2"
- shift
- elif [ "$1" = "-output" ] && [ "$2" != "" ]; then
- programOutput="$2"
- shift
- elif [ "$1" = "-java" ] && [ "$2" != "" ]; then
- javaHome="$2"
- shift
- else
- extraArgs="$extraArgs $1"
- fi
- shift
-done
-
-# Set up environment variables needed by the makefiles.
-PROGRAM_OUTPUT="$programOutput"
-DEFAULT_OS="$defaultOS"
-DEFAULT_OS_ARCH="$defaultOSArch"
-DEFAULT_WS="$defaultWS"
-JAVA_HOME=$javaHome
-DEFAULT_JAVA=$defaultJava
-
-LIBRARY_DIR="$EXEC_DIR/../org.eclipse.equinox.launcher.$defaultWS.$defaultOS.$defaultOSArch"
-OUTPUT_DIR="$EXEC_DIR/$outputRoot/$defaultWS/$defaultOS/$defaultOSArch"
-
-export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS X11_HOME MOTIF_HOME JAVA_HOME DEFAULT_JAVA LIBRARY_DIR
-
-# If the OS is supported (a makefile exists)
-if [ "$makefile" != "" ]; then
- if [ "$extraArgs" != "" ]; then
- make -f $makefile $extraArgs
- else
- echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS"
- make -f $makefile clean
- case x$CC in
- x*gcc*) make -f $makefile all PICFLAG=-fpic ;;
- *) make -f $makefile all ;;
- esac
- fi
-else
- echo "Unknown OS ($OS) -- build aborted"
-fi
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/build.xml b/features/org.eclipse.equinox.executable.feature/library/motif/build.xml
deleted file mode 100644
index 990298e64..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/build.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project default="build_eclipse" basedir=".">
-
-<target name="build_eclipse">
- <exec dir="." executable="sh">
- <arg line="${basedir}/build.sh"/>
- <arg line="install"/>
- </exec>
-</target>
-
-<target name="clean">
- <tstamp/>
- <exec dir="." executable="sh">
- <arg line="${basedir}/build.sh"/>
- <arg line="clean"/>
- </exec>
-</target>
-
-</project> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.c b/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.c
deleted file mode 100644
index 049cb7837..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Kevin Cornell (Rational Software Corporation)
- *******************************************************************************/
-
-
-/* UNIX/Motif specific logic for displaying the splash screen. */
-#include "eclipseCommon.h"
-#include "eclipseMozilla.h"
-#include "eclipseMotif.h"
-#include "eclipseOS.h"
-#include "eclipseUtil.h"
-#include "NgImage.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#ifdef SOLARIS
-#include <sys/filio.h>
-#endif
-#include <unistd.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <locale.h>
-#include <stdlib.h>
-
-/* Global Variables */
-char* defaultVM = "java";
-char* vmLibrary = "libjvm.so";
-char* shippedVMDir = "jre/bin/";
-
-/* Define the special arguments for the various Java VMs. */
-static char* argVM_JAVA[] = { NULL };
-#if AIX
-static char* argVM_JAVA_AIX131[] = { "-Xquickstart", NULL };
-#endif
-static char* argVM_J9[] = { "-jit", "-mca:1024", "-mco:1024", "-mn:256", "-mo:4096",
- "-moi:16384", "-mx:262144", "-ms:16", "-mr:16", NULL };
-
-/* Define local variables for the main window. */
-extern XtAppContext appContext;
-extern Widget topWindow;
-
-static pid_t jvmProcess = 0;
-static int jvmExitCode;
-
-/* Define local variables for handling the splash window and its image. */
-static Widget shellHandle = 0;
-
-extern void centreShell( Widget widget, Widget expose );
-
-#ifdef NETSCAPE_FIX
-void fixEnvForNetscape();
-#endif /* NETSCAPE_FIX */
-
-void takeDownSplashCB( Widget shell, XtPointer app_data, XtPointer widget_data ) {
- shellHandle = NULL;
-}
-
-/* Show the Splash Window
- *
- * Create the splash window, load the pixmap and display the splash window.
- */
-int showSplash( const char* featureImage )
-{
- int x, y;
- unsigned int width, height, depth, border;
- ArgList args;
- unsigned int nArgs;
- Pixmap splashPixmap = 0;
- Window root;
- Display *xDisplay;
- Screen* screen;
- Widget scrolledHandle, drawingHandle, image;
-
- if (shellHandle != 0)
- return 0; /* already showing splash */
-
- if (initialArgv == NULL)
- initialArgc = 0;
-
- if (initWindowSystem(&initialArgc, initialArgv, 1) != 0) {
- return -1;
- }
-
- xDisplay = motif_XtDisplay(topWindow);
- screen = motif.XDefaultScreenOfDisplay( xDisplay );
- if (featureImage != NULL)
- {
- splashPixmap = loadBMPImage(xDisplay, screen, (char*)featureImage);
- }
- /* If the splash image could not be found, return an error. */
- if (splashPixmap == 0)
- return ENOENT;
-
- motif.XGetGeometry (xDisplay, splashPixmap, &root, &x, &y, &width, &height, &border, &depth);
-
- /* make sure we never pass more than 20 args */
- args = malloc(10 * sizeof(Arg));
-
- nArgs = 0;
- /* Note that XtSetArg is a macro, and the 1st argument will be evaluated twice
- * so increment nArgs on its own */
- motif_XtSetArg(args[nArgs], XmNmwmDecorations, 0); nArgs++;
- motif_XtSetArg(args[nArgs], XmNtitle, getOfficialName()); nArgs++;
- motif_XtSetArg(args[nArgs], XmNwidth, width); nArgs++;
- motif_XtSetArg(args[nArgs], XmNheight, height); nArgs++;
- shellHandle = motif.XtAppCreateShell(getOfficialName(), "", *motif.applicationShellWidgetClass, xDisplay, args, nArgs);
- motif.XtAddCallback(shellHandle, XmNdestroyCallback, (XtCallbackProc) takeDownSplashCB, NULL);
-
- nArgs = 0;
- motif_XtSetArg(args[nArgs++], XmNancestorSensitive, 1);
- scrolledHandle = motif.XmCreateMainWindow(shellHandle, NULL, args, nArgs);
- if(scrolledHandle == 0)
- return -1;
- motif.XtManageChild(scrolledHandle);
-
- nArgs = 0;
- motif_XtSetArg(args[nArgs], XmNancestorSensitive, 1); nArgs++;
- motif_XtSetArg(args[nArgs], XmNborderWidth, 0); nArgs++;
- /*motif_XtSetArg(args[nArgs], XmNbackground, 0xFF00FF); nArgs++; */
- motif_XtSetArg(args[nArgs], XmNmarginWidth, 0); nArgs++;
- motif_XtSetArg(args[nArgs], XmNmarginHeight, 0); nArgs++;
- motif_XtSetArg(args[nArgs], XmNresizePolicy, XmRESIZE_NONE); nArgs++;
- motif_XtSetArg(args[nArgs], XmNtraversalOn, 1); nArgs++;
- drawingHandle = motif.XmCreateDrawingArea(scrolledHandle, NULL, args, nArgs);
- if(drawingHandle == 0)
- return -1;
- motif.XtManageChild(drawingHandle);
-
- nArgs = 0;
- motif_XtSetArg(args[nArgs], XmNlabelType, XmPIXMAP); nArgs++;
- motif_XtSetArg(args[nArgs], XmNlabelPixmap, splashPixmap); nArgs++;
- motif_XtSetArg(args[nArgs], XmNwidth, width); nArgs++;
- motif_XtSetArg(args[nArgs], XmNheight, height); nArgs++;
- motif_XtSetArg(args[nArgs], XmNmarginWidth, 0); nArgs++;
- motif_XtSetArg(args[nArgs], XmNmarginHeight, 0); nArgs++;
- image = motif.XmCreateLabelGadget ( drawingHandle, "", args, nArgs );
- motif.XtManageChild( image );
-
- motif.XtRealizeWidget(shellHandle);
- motif.XtSetMappedWhenManaged(shellHandle, 1);
-
- if(motif_XtIsTopLevelShell(shellHandle))
- motif_XtMapWidget(shellHandle);
- else
- motif.XtPopup(shellHandle, XtGrabNone);
-
- /* Centre the splash screen and display it. */
- centreShell( shellHandle, drawingHandle );
- dispatchMessages();
-
- free(args);
- return 0;
-}
-
-/* Get the window system specific VM arguments */
-char** getArgVM( char* vm )
-{
- char** result;
-
-#ifdef AIX
- char* version;
-#endif
-
- if (isJ9VM( vm ))
- return argVM_J9;
-
- /* Use the default arguments for a standard Java VM */
- result = argVM_JAVA;
-
-#ifdef AIX
- /* Determine whether Java version is 1.3.1 or later */
- version = getVMVersion( vm );
- if (version != NULL)
- {
- if (versionCmp(version, "1.3.1") >= 0)
- result = argVM_JAVA_AIX131;
- free(version);
- }
-#endif
-
- return result;
-}
-
-
-jlong getSplashHandle() {
- return (jlong)shellHandle;
-}
-
-void dispatchMessages() {
- XtInputMask mask;
- if (appContext != NULL && motif.XtAppPending != 0) {
- /* Process any outstanding messages */
- while ((mask = motif.XtAppPending(appContext)) != 0) {
- motif.XtAppProcessEvent(appContext, mask);
- }
- }
-}
-
-void takeDownSplash()
-{
- if (shellHandle != 0)
- {
- motif.XtDestroyWidget( shellHandle );
- /*XFlush( XtDisplay( shellHandle ) );*/
- shellHandle = NULL;
- }
-}
-
-#ifdef NETSCAPE_FIX
-extern char* findCommand( char*);
-static const char* XFILESEARCHPATH = "XFILESEARCHPATH";
-
-void fixEnvForNetscape()
-{
- char* netscapePath = NULL;
- char* netscapeResource = NULL;
- char* ch;
- char* envValue;
- struct stat stats;
-
- /* If netscape appears to be installed */
- netscapePath = findCommand("netscape");
- if (netscapePath != NULL)
- {
- /* Look for the resource file Netscape.ad in the same directory as "netscape". */
- netscapeResource = malloc( strlen(netscapePath) + 50 );
- strcpy( netscapeResource, netscapePath );
- ch = strrchr( netscapeResource, (int) dirSeparator );
- ch =(ch == NULL ? netscapeResource : (ch+1));
- strcpy( ch, "Netscape.ad" );
-
- /* If it does not exist there, try "/opt/netscape/Netscape.ad". */
- if (stat( netscapeResource, &stats ) != 0)
- {
- strcpy( netscapeResource, "/opt/netscape/Netscape.ad" );
- }
-
- /* If the resource file exists */
- if (stat( netscapeResource, &stats ) == 0 && (stats.st_mode & S_IFREG) != 0)
- {
- /* Either define XFILESEARCHPATH or append the Netscape resource file. */
- envValue = getenv( XFILESEARCHPATH );
- if (envValue == NULL)
- {
- ch = malloc( strlen(XFILESEARCHPATH) + strlen(netscapeResource) + 5 );
- sprintf( ch, "%s=%s", XFILESEARCHPATH, netscapeResource );
- }
- else
- {
- ch = malloc( strlen(XFILESEARCHPATH) + strlen(netscapeResource) +
- strlen(envValue) + 5 );
- sprintf( ch, "%s=%s:%s", XFILESEARCHPATH, envValue, netscapeResource );
- }
- putenv( ch );
- free( ch );
- }
-
- /* Clean up. */
- free( netscapePath );
- free( netscapeResource );
- }
-}
-#endif /* NETSCAPE_FIX */
-
-JavaResults* launchJavaVM( char* args[] )
-{
- JavaResults* jvmResults = NULL;
- int exitCode;
-
-#ifdef NETSCAPE_FIX
- fixEnvForNetscape();
-#endif /* NETSCAPE_FIX */
-#ifdef MOZILLA_FIX
- fixEnvForMozilla();
-#endif /* MOZILLA_FIX */
-
-#ifdef LINUX
- {
- /* put the root of eclipse on the LD_LIBRARY_PATH */
- char * ldPath = (char*)getenv(_T_ECLIPSE("LD_LIBRARY_PATH"));
- if (ldPath == NULL)
- ldPath = _T_ECLIPSE("");
- char * root = getProgramDir();
- if (root != NULL) {
- char * newPath = malloc((strlen(root) + strlen(ldPath) + 2) * sizeof(char));
- sprintf(newPath, "%s%c%s", root, pathSeparator, ldPath);
- setenv("LD_LIBRARY_PATH", newPath, 1);
- free(newPath);
- }
- }
-#endif
-
- /* Create a child process for the JVM. */
- jvmProcess = fork();
- if (jvmProcess == 0)
- {
- /* Child process ... start the JVM */
- execv( args[0], args );
-
- /* The JVM would not start ... return error code to parent process. */
- /* TODO, how to distinguish this as a launch problem to the other process? */
- jvmExitCode = errno;
- exit( jvmExitCode );
- }
-
- jvmResults = malloc(sizeof(JavaResults));
- memset(jvmResults, 0, sizeof(JavaResults));
-
- /* If the JVM is still running, wait for it to terminate. */
- if (jvmProcess != 0)
- {
- waitpid(jvmProcess, &exitCode, 0);
- /* TODO, this should really be a runResult if we could distinguish the launch problem above */
- jvmResults->launchResult = ((exitCode & 0x00ff) == 0 ? (exitCode >> 8) : exitCode); /* see wait(2) */
- }
-
- /* Return the exit code from the JVM. */
- return jvmResults;
-}
-
-int reuseWorkbench(_TCHAR** filePath, int timeout) {
- /* not yet implemented on motif */
- return -1;
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.h b/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.h
deleted file mode 100644
index 26b807b8a..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotif.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef ECLIPSE_MOTIF_H
-#define ECLIPSE_MOTIF_H
-
-#include <Xm/XmAll.h>
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/IntrinsicP.h>
-#include <X11/Intrinsic.h>
-#include <X11/Shell.h>
-
-#ifndef NO_XINERAMA_EXTENSIONS
-#include <X11/extensions/Xinerama.h>
-#endif
-
-struct MOTIF_PTRS {
-#ifndef NO_XINERAMA_EXTENSIONS
- Bool (*XineramaIsActive) (Display*);
- XineramaScreenInfo* (*XineramaQueryScreens) (Display*, int*);
-#endif
- Widget (*XmCreateDrawingArea) (Widget, String, ArgList, Cardinal);
- Widget (*XmCreateLabelGadget) (Widget, char *, Arg *, Cardinal);
- Widget (*XmCreateMainWindow) (Widget, char *, ArgList, Cardinal);
- Widget (*XmCreateMessageDialog)(Widget, String, ArgList, Cardinal);
- Widget (*XmMessageBoxGetChild) (Widget, unsigned char);
- void (*XmStringFree) (XmString);
- XmString (*XmStringGenerate) (XtPointer, XmStringTag, XmTextType, XmStringTag);
-
- void (*XtAddCallback) (Widget, String, XtCallbackProc, XtPointer);
- Widget (*XtAppCreateShell) (String, String, WidgetClass, Display*, ArgList, Cardinal);
- void (*XtAppNextEvent) (XtAppContext, XEvent*);
- XtInputMask (*XtAppPending) (XtAppContext);
- void (*XtAppProcessEvent) (XtAppContext, XtInputMask);
- void (*XtDestroyWidget) (Widget);
- Boolean (*XtDispatchEvent) (XEvent*);
- void (*XtGetValues) (Widget, ArgList, Cardinal);
- Widget (*XtInitialize) (String, String, XrmOptionDescRec*, Cardinal, int*, char**);
-#ifdef AIX
- Widget (*eclipseXtInitialize) (String, String, XrmOptionDescRec*, Cardinal, int*, char**);
-#endif
- Boolean (*XtIsManaged) (Widget);
- void (*XtManageChild) (Widget);
- int (*XtMapWidget) (Widget);
- void (*XtPopup) (Widget, XtGrabKind);
- void (*XtRealizeWidget) (Widget);
- Widget (*XtSetLanguageProc) (XtAppContext, XtLanguageProc, XtPointer);
- void (*XtSetMappedWhenManaged)(Widget, Boolean);
- void (*XtSetValues) (Widget, ArgList, Cardinal);
- void (*XtUnmanageChild) (Widget);
- XtAppContext (*XtWidgetToApplicationContext) (Widget);
- Window (*XtWindowOfObject) (Widget);
-
- Screen * (*XDefaultScreenOfDisplay)(Display*);
- int (*XFree) (void*);
- int (*XFlush) (Display*);
- Status (*XGetGeometry) (Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
- int (*XMapWindow) (Display*, Window);
-
- char * _XmStrings;
- char * XtShellStrings;
- char * XtStrings;
- WidgetClass *applicationShellWidgetClass;
-};
-
-extern struct MOTIF_PTRS motif;
-
-#define motif_XtDisplay XtDisplay
-#define motif_XtSetArg XtSetArg
-#define motif_XtWindow XtWindow
-#define motif_XtIsTopLevelShell XtIsTopLevelShell
-#define motif_XtIsRealized(object) (motif.XtWindowOfObject(object) != None)
-#define motif_XtMapWidget(widget) motif.XMapWindow(XtDisplay(widget), XtWindow(widget))
-
-#define _XmStrings motif._XmStrings
-#define XtShellStrings motif.XtShellStrings
-#define XtStrings motif.XtStrings
-
-/* macro resolves to { (void**)&motif.foo, "foo" }, use it to initialize FN_TABLEs */
-#define FN_TABLE_ENTRY(fn) { (void**)&motif.fn, #fn }
-typedef struct {
- void ** fnPtr;
- char * fnName;
-} FN_TABLE;
-
-extern int loadMotif();
-#endif
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifCommon.c b/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifCommon.c
deleted file mode 100644
index 93f21cbd3..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifCommon.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Andrew Niefer
- *******************************************************************************/
-
-#include "eclipseCommon.h"
-#include "eclipseOS.h"
-#include "eclipseMotif.h"
-
-#include <locale.h>
-#include <dlfcn.h>
-#include <stdlib.h>
-
-#define ECLIPSE_ICON 401
-
-char dirSeparator = '/';
-char pathSeparator = ':';
-
-void centreShell( Widget widget, Widget expose );
-
-/* Global Variables */
-XtAppContext appContext = 0;
-Widget topWindow = 0;
-
-/* Define local variables for the main window. */
-static int saveArgc = 0; /* arguments after they were parsed, for window system */
-static char** saveArgv = 0;
-
-int motifInitialized = 0;
-
-/* Display a Message */
-void displayMessage( char* title, char* message )
-{
- char* displayName = NULL;
- Widget msgBox = NULL;
- XmString msg;
- Arg arg[20];
- int nArgs;
- XEvent event;
-
- /* If there is no associated display, or we fail to initialize Xt, just print the error and return. */
- displayName = getenv("DISPLAY");
- if ( displayName == NULL || strlen(displayName) == 0 ||
- (topWindow == 0 && initWindowSystem( &saveArgc, saveArgv, 1 ) != 0) )
- {
- printf("%s:\n%s\n", title, message);
- return;
- }
- msg = motif.XmStringGenerate( message, NULL, XmCHARSET_TEXT, NULL );
-
- /* Output a simple message box. */
- nArgs = 0;
-
- motif_XtSetArg( arg[ nArgs ], XmNdialogType, XmDIALOG_MESSAGE ); nArgs++;
- motif_XtSetArg( arg[ nArgs ], XmNtitle, title ); nArgs++;
- motif_XtSetArg( arg[ nArgs ], XmNmessageString, msg ); nArgs++;
- msgBox = motif.XmCreateMessageDialog( topWindow, getOfficialName(), arg, nArgs );
-
- motif.XtUnmanageChild( motif.XmMessageBoxGetChild( msgBox, XmDIALOG_CANCEL_BUTTON ) );
- motif.XtUnmanageChild( motif.XmMessageBoxGetChild( msgBox, XmDIALOG_HELP_BUTTON ) );
- motif.XtManageChild( msgBox );
- centreShell( msgBox, msgBox );
- if (msg != 0) motif.XmStringFree (msg);
-
- /* Wait for the OK button to be pressed. */
- while (motif_XtIsRealized( msgBox ) && motif.XtIsManaged( msgBox ))
- {
- motif.XtAppNextEvent( appContext, &event );
- motif.XtDispatchEvent( &event );
- }
- motif.XtDestroyWidget( msgBox );
-}
-
-/* Initialize Window System
- *
- * Initialize the Xt and Xlib.
- */
-int initWindowSystem( int* pArgc, char* argv[], int showSplash )
-{
- Arg arg[20];
- char * officialName;
-
- if(motifInitialized == 1)
- return 0;
-
- if (loadMotif() != 0)
- return -1;
-
- /* Save the arguments in case displayMessage() is called in the main launcher. */
- if (saveArgv == 0)
- {
- saveArgc = *pArgc;
- saveArgv = argv;
- }
-
- officialName = getOfficialName();
- if (officialName != NULL)
- setenv("RESOURCE_NAME", getOfficialName(), 1);
-
- /* Create the top level shell that will not be used other than
- to initialize the application.
- */
-#ifdef AIX
- topWindow = motif.eclipseXtInitialize(NULL, officialName, NULL, 0, pArgc, argv);
-#else
- topWindow = motif.XtInitialize(NULL, officialName, NULL, 0, pArgc, argv);
-#endif
- appContext = motif.XtWidgetToApplicationContext(topWindow);
- motif.XtSetLanguageProc (appContext, NULL, NULL);
- motif_XtSetArg( arg[ 0 ], XmNmappedWhenManaged, False );
- motif.XtSetValues( topWindow, arg, 1 );
- motif.XtRealizeWidget( topWindow );
- motifInitialized = 1;
- return 0;
-}
-
-/* Centre the shell on the screen. */
-void centreShell( Widget widget, Widget expose )
-{
- XtAppContext context;
- XEvent event;
- Arg arg[20];
- int nArgs;
- Position x, y;
- Dimension width, height;
- Screen* screen;
- int waiting;
- short screenWidth, screenHeight;
-
-#ifndef NO_XINERAMA_EXTENSIONS
- Display* display;
- int monitorCount;
- XineramaScreenInfo* info;
-#endif
-
- /* Realize the shell to calculate its width/height. */
- motif.XtRealizeWidget( widget );
-
- /* Get the desired dimensions of the shell. */
- nArgs = 0;
- motif_XtSetArg( arg[ nArgs ], XmNwidth, &width ); nArgs++;
- motif_XtSetArg( arg[ nArgs ], XmNheight, &height ); nArgs++;
- motif_XtSetArg( arg[ nArgs ], XmNscreen, &screen ); nArgs++;
- motif.XtGetValues( widget, arg, nArgs );
-
- screenWidth = screen->width;
- screenHeight = screen->height;
-#ifndef NO_XINERAMA_EXTENSIONS
- display = motif_XtDisplay( widget );
- if (motif.XineramaIsActive != 0 && motif.XineramaIsActive( display )) {
- info = motif.XineramaQueryScreens( display, &monitorCount );
- if (info != 0) {
- if (monitorCount > 1) {
- screenWidth = info->width;
- screenHeight = info->height;
- }
- motif.XFree (info);
- }
- }
-#endif
-
- /* Calculate the X and Y position for the shell. */
- x = (screenWidth - width) / 2;
- y = (screenHeight - height) / 2;
-
- /* Set the new shell position and display it. */
- nArgs = 0;
- motif_XtSetArg( arg[ nArgs ], XmNx, x ); nArgs++;
- motif_XtSetArg( arg[ nArgs ], XmNy, y ); nArgs++;
- motif.XtSetValues( widget, arg, nArgs );
- motif_XtMapWidget( widget );
-
- /* Wait for an expose event on the desired widget. This wait loop is required when
- * the startVM command fails and the message box is created before the splash
- * window is displayed. Without this wait, the message box sometimes appears
- * under the splash window and the user cannot see it.
- */
- context = motif.XtWidgetToApplicationContext( widget );
- waiting = True;
- while (waiting)
- {
- motif.XtAppNextEvent( context, &event );
- if (event.xany.type == Expose && event.xany.window == motif_XtWindow( expose ))
- {
- waiting = False;
- }
- motif.XtDispatchEvent( &event );
- }
- motif.XFlush( motif_XtDisplay( widget ) );
-}
-
-/* Load the specified shared library
- */
-void * loadLibrary( char * library ){
- void * result= dlopen(library, RTLD_LAZY);
- if(result == 0)
- printf("%s\n",dlerror());
- return result;
-}
-
-/* Unload the shared library
- */
-void unloadLibrary( void * handle ){
- dlclose(handle);
-}
-
-/* Find the given symbol in the shared library
- */
-void * findSymbol( void * handle, char * symbol ){
- return dlsym(handle, symbol);
-}
-
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifInit.c b/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifInit.c
deleted file mode 100644
index c9ca22e7c..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifInit.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "eclipseMotif.h"
-#include "eclipseCommon.h"
-#include <dlfcn.h>
-#include <stdlib.h>
-
-struct MOTIF_PTRS motif;
-
-/* need to undef these so the FN_TABLE works ok */
-#undef _XmStrings
-#undef XtShellStrings
-#undef XtStrings
-
-/* functions from libXm */
-static FN_TABLE xmFunctions[] = { FN_TABLE_ENTRY(XmCreateDrawingArea),
- FN_TABLE_ENTRY(XmCreateLabelGadget),
- FN_TABLE_ENTRY(XmCreateMainWindow),
- FN_TABLE_ENTRY(XmCreateMessageDialog),
- FN_TABLE_ENTRY(XmMessageBoxGetChild),
- FN_TABLE_ENTRY(XmStringFree),
- FN_TABLE_ENTRY(XmStringGenerate),
- FN_TABLE_ENTRY(_XmStrings), /* not a function */
- { NULL, NULL }
- };
-
-/* functions from libXt */
-static FN_TABLE xtFunctions[] = { FN_TABLE_ENTRY(XtAddCallback),
- FN_TABLE_ENTRY(XtAppCreateShell),
- FN_TABLE_ENTRY(XtAppNextEvent),
- FN_TABLE_ENTRY(XtAppPending),
- FN_TABLE_ENTRY(XtAppProcessEvent),
- FN_TABLE_ENTRY(XtDestroyWidget),
- FN_TABLE_ENTRY(XtDispatchEvent),
- FN_TABLE_ENTRY(XtGetValues),
-#ifndef AIX
- FN_TABLE_ENTRY(XtInitialize),
-#endif
- FN_TABLE_ENTRY(XtIsManaged),
- FN_TABLE_ENTRY(XtManageChild),
- FN_TABLE_ENTRY(XtMapWidget),
- FN_TABLE_ENTRY(XtPopup),
- FN_TABLE_ENTRY(XtRealizeWidget),
- FN_TABLE_ENTRY(XtSetLanguageProc),
- FN_TABLE_ENTRY(XtSetMappedWhenManaged),
- FN_TABLE_ENTRY(XtSetValues),
- FN_TABLE_ENTRY(XtUnmanageChild),
- FN_TABLE_ENTRY(XtWidgetToApplicationContext),
- FN_TABLE_ENTRY(XtWindowOfObject),
- FN_TABLE_ENTRY(XtShellStrings), /* not a function */
- FN_TABLE_ENTRY(XtStrings), /* not a function */
- FN_TABLE_ENTRY(applicationShellWidgetClass), /* not a function */
- { NULL, NULL }
- };
-
-#ifdef AIX
-static FN_TABLE shimFunctions[] = { FN_TABLE_ENTRY(eclipseXtInitialize), {NULL, NULL} };
-#endif
-
-/* functions from libX11 */
-static FN_TABLE x11Functions[] = { FN_TABLE_ENTRY(XDefaultScreenOfDisplay),
- FN_TABLE_ENTRY(XFree),
- FN_TABLE_ENTRY(XFlush),
- FN_TABLE_ENTRY(XGetGeometry),
- FN_TABLE_ENTRY(XMapWindow),
- { NULL, NULL }
- };
-
-#ifndef NO_XINERAMA_EXTENSIONS
-static FN_TABLE xinFunctions[] = { FN_TABLE_ENTRY(XineramaIsActive),
- FN_TABLE_ENTRY(XineramaQueryScreens),
- { NULL, NULL }
- };
-#endif
-
-static int loadMotifSymbols( void * library, FN_TABLE * table) {
- int i = 0;
- void * fn;
- for (i = 0; table[i].fnName != NULL; i++) {
- fn = findSymbol(library, table[i].fnName);
- if (fn != 0) {
- *(table[i].fnPtr) = fn;
- } else {
- *(table[i].fnPtr) = 0;
- return -1;
- }
- }
- return 0;
-}
-
-#ifdef AIX
-void * loadMotifShimLibrary() {
- if (eclipseLibrary != NULL) {
- /* library is the normal eclipse_<ver>.so, look for libeclipse-motif.so beside it */
- _TCHAR* eclipseMotifLib = _T_ECLIPSE("libeclipse-motif.so");
- _TCHAR* path = strdup(eclipseLibrary);
- _TCHAR* c = strrchr(path, '/');
- if (c == NULL) {
- free(path);
- return NULL;
- }
-
- *c = 0;
- c = malloc((strlen(path) + 2 + strlen(eclipseMotifLib)) * sizeof(char));
- _stprintf(c, _T_ECLIPSE("%s/%s"), path, eclipseMotifLib);
- free(path);
- return dlopen(c, RTLD_LAZY);
- }
- return 0;
-}
-#endif
-
-int loadMotif() {
- void * xmLib = NULL, *xtLib = NULL, *x11Lib = NULL, *xinLib = NULL;
-#ifdef AIX
- void * motifShim = NULL;
-#endif
- char * path = getProgramDir();
- int dlFlags = RTLD_LAZY;
-
- /* initialize ptr struct to 0's */
- memset(&motif, 0, sizeof(struct MOTIF_PTRS));
-
-#ifndef AIX
- if (path != NULL) {
- /* look for libXm first in the root of eclipse */
- char * lib = malloc((strlen(path) + strlen(_T_ECLIPSE(XM_LIB)) + 2) * sizeof(char));
- sprintf( lib, "%s%c%s", path, dirSeparator, XM_LIB);
- xmLib = dlopen(lib, dlFlags);
- free(lib);
- }
-#else
- dlFlags |= RTLD_MEMBER;
- motifShim = loadMotifShimLibrary();
- if (motifShim == NULL)
- return -1;
-#endif
-
- if (xmLib == NULL) {
- xmLib = dlopen(XM_LIB, dlFlags);
- }
-
- if (xmLib == NULL) {
- /* bail now, don't load the others, libXm must be loaded first, so leave things for
- * swt to do later */
- return -1;
- }
-
- xtLib = dlopen(XT_LIB, dlFlags);
- x11Lib = dlopen(X11_LIB, dlFlags);
-
- /* printf("XmLib: %s: %x\nXtLib: %s: %x\nX11Lib:%s, %x\n", XM_LIB, xmLib, XT_LIB, xtLib, X11_LIB, x11Lib);*/
-#ifndef NO_XINERAMA_EXTENSIONS
- /* don't fail without Xinerama */
- xinLib = dlopen(XIN_LIB, dlFlags);
- if (xinLib != NULL)
- loadMotifSymbols(xinLib, xinFunctions);
-#endif
- if( xtLib == NULL || x11Lib == NULL)
- return -1;
-
- if (loadMotifSymbols(xmLib, xmFunctions) != 0) return -1;
- if (loadMotifSymbols(xtLib, xtFunctions) != 0) return -1;
- if (loadMotifSymbols(x11Lib, x11Functions) != 0) return -1;
-#ifdef AIX
- if (loadMotifSymbols(motifShim, shimFunctions) !=0) return -1;
-#endif
-
- return 0;
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifShim.c b/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifShim.c
deleted file mode 100644
index 2648ec65e..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/eclipseMotifShim.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <Xm/XmAll.h>
-
-Widget eclipseXtInitialize(String shellName, String appClass, XrmOptionDescRec* options, Cardinal numOptions, int* argc, char** argv) {
- return XtInitialize(shellName, appClass, options, numOptions, argc, argv);
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/make_aix.mak b/features/org.eclipse.equinox.executable.feature/library/motif/make_aix.mak
deleted file mode 100644
index 1d4689e1c..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/make_aix.mak
+++ /dev/null
@@ -1,104 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-#*******************************************************************************
-include ../make_version.mak
-# Makefile for creating the AIX/Motif eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# PROGRAM_LIBRARY - the filename of the output library
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-# X11_HOME - the full path to X11 header files
-# MOTIF_HOME - the full path to Motif header files
-# JAVA_JNI - the full path to the java jni header files
-
-PROGRAM_OUTPUT=eclipse
-PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
-SHIM=libeclipse-motif.so
-
-CC = gcc
-# Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.o
-SHIM_OBJS = eclipseMotifShim.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o eclipseMotifInit.o
-DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseShm.o eclipseNix.o\
- NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
-
-EXEC = $(PROGRAM_OUTPUT)
-DLL = $(PROGRAM_LIBRARY)
-LIBS = -L$(MOTIF_HOME)/lib -ldl
-SHIM_LIBS = -L$(MOTIF_HOME)/lib -lXm -lXt -lX11
-MOTIF_LIBS = -DXM_LIB="\"libXm.a(shr_32.o)\"" -DXT_LIB="\"libXt.a(shr4.o)\"" -DX11_LIB="\"libX11.a(shr4.o)\""
-LFLAGS = -G -bnoentry -bexpall -lm -lc_r -lC_r
-CFLAGS = -O -s \
- -DMOTIF \
- -DNO_XINERAMA_EXTENSIONS \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- $(MOTIF_LIBS) \
- -DAIX \
- -I./ \
- -I../ \
- -I$(MOTIF_HOME)/include \
- -I/usr/java5/include
-
-all: $(EXEC) $(DLL) $(SHIM)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseShm.o: ../eclipseShm.c ../eclipseShm.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
- $(CC) -Wl,-bM:UR -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
- sedmgr -c exempt $(EXEC)
-
-$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
- ld $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
-
-$(SHIM): $(SHIM_OBJS)
- ld $(LFLAGS) -o $(SHIM) $(SHIM_OBJS) $(SHIM_LIBS)
-
-install: all
- cp $(EXEC) $(OUTPUT_DIR)
- cp $(SHIM) $(OUTPUT_DIR)
- cp $(DLL) $(LIBRARY_DIR)
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
-clean:
- rm -f $(EXEC) $(DLL) $(SHIM) $(SHIM_OBJS) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_PA_RISC.mak b/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_PA_RISC.mak
deleted file mode 100644
index 2552b56fc..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_PA_RISC.mak
+++ /dev/null
@@ -1,94 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-#*******************************************************************************
-include ../make_version.mak
-# Makefile for creating the HPUX/Motif eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-# X11_HOME - the full path to X11 header files
-# MOTIF_HOME - the full path to Motif header files
-
-ifeq ($(PROGRAM_OUTPUT),)
- PROGRAM_OUTPUT=eclipse
-endif
-
-PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
-
-# Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o
-DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseNix.o eclipseShm.o\
- NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
-
-EXEC = $(PROGRAM_OUTPUT)
-DLL = $(PROGRAM_LIBRARY)
-LIBS = -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lXm -lXt -lX11 -lpthread
-LFLAGS = -shared -Wl,--export-dynamic
-CFLAGS = -O -s \
- -DNO_XINERAMA_EXTENSIONS \
- -DNETSCAPE_FIX \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- +Z \
- -I./ \
- -I../ \
- -I$(MOTIF_HOME)/include \
- -I$(X11_HOME)/include \
- -I$(JAVA_JNI) \
- +DAportable
-
-all: $(EXEC)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c ../eclipseMain.c -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipse.c -o $@
-
-eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c ../eclipseCommon.c -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@
-
-eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipseJNI.c -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@
-
-eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
- $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
-
-eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c ../eclipseNix.c -o $@
-
-$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
- $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
-
-$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
- $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
-
-install: all
- cp $(EXEC) $(DLL) $(OUTPUT_DIR)
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
-clean:
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_ia64_32.mak b/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_ia64_32.mak
deleted file mode 100644
index 92667dac0..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/make_hpux_ia64_32.mak
+++ /dev/null
@@ -1,101 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-# Sumit Sarkar (Hewlett-Packard)
-#*******************************************************************************
-include ../make_version.mak
-# Makefile for creating the HPUX/Motif eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-# X11_HOME - the full path to X11 header files
-# MOTIF_HOME - the full path to Motif header files
-
-#ifeq ($(PROGRAM_OUTPUT),)
-# PROGRAM_OUTPUT=eclipse
-#endif
-
-DEFAULT_JAVA=DEFAULT_JAVA_EXEC
-PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
-
-# Define the object modules to be compiled and flags.
-CC=gcc
-MAIN_OBJS = eclipseMain.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o eclipseMotifInit.o
-DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseNix.o eclipseShm.o \
- NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
-
-EXEC = $(PROGRAM_OUTPUT)
-DLL = $(PROGRAM_LIBRARY)
-LIBS = -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lpthread
-MOTIF_LIBS = -DXM_LIB="\"libXm.so.1\"" -DXT_LIB="\"libXt.so.1\"" -DX11_LIB="\"libX11.so.1\""
-LFLAGS = -shared -static-libgcc
-# -Wl,--export-dynamic
-CFLAGS = -O -s \
- -DNO_XINERAMA_EXTENSIONS \
- -DNETSCAPE_FIX \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- -D$(DEFAULT_JAVA) \
- -DHPUX \
- $(MOTIF_LIBS) \
- -I./ \
- -I../ \
- -I$(MOTIF_HOME)/include \
- -I$(X11_HOME)/include \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/hp-ux
-
-all: $(EXEC) $(DLL)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipse.c -o $@
-
-eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c ../eclipseMain.c -o $@
-
-eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c ../eclipseCommon.c -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@
-
-eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipseJNI.c -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@
-
-eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
- $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
-
-eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c ../eclipseNix.c -o $@
-
-$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
- $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
-
-$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
- $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
-
-install: all
- cp $(EXEC) $(OUTPUT_DIR)
- cp $(DLL) $(LIBRARY_DIR)
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
-clean:
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/make_linux.mak b/features/org.eclipse.equinox.executable.feature/library/motif/make_linux.mak
deleted file mode 100644
index a29d1b9b6..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/make_linux.mak
+++ /dev/null
@@ -1,108 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-#*******************************************************************************
-include ../make_version.mak
-# Makefile for creating the Linux/Motif eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# PROGRAM_LIBRARY - the filename of the output library
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-# X11_HOME - the full path to X11 header files
-# MOTIF_HOME - the full path to Motif header files
-# JAVA_HOME - JAVA_HOME for the java jni header files
-
-ifeq ($(PROGRAM_OUTPUT),)
- PROGRAM_OUTPUT=eclipse
-endif
-
-PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
-
-ifeq ($(DEFAULT_JAVA),)
- DEFAULT_JAVA=DEFAULT_JAVA_JNI
-endif
-
-# Define the object modules to be compiled and flags.
-CC?=gcc
-MAIN_OBJS = eclipseMain.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o eclipseMotifInit.o
-DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseMozilla.o eclipseShm.o eclipseNix.o \
- NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
-
-EXEC = $(PROGRAM_OUTPUT)
-DLL = $(PROGRAM_LIBRARY)
-LIBS = -Xlinker -rpath -Xlinker . -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lpthread -ldl
-MOTIF_LIBS = -DXM_LIB="\"libXm.so.2\"" -DXT_LIB="\"libXt.so.6\"" -DX11_LIB="\"libX11.so.6\"" -DXIN_LIB="\"libXinerama.so.1\""
-LFLAGS = -shared -fpic -Wl,--export-dynamic
-CFLAGS = -g -s -Wall \
- -DLINUX \
- -DMOTIF \
- -DMOZILLA_FIX \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- $(MOTIF_LIBS) \
- -D$(DEFAULT_JAVA)\
- -fPIC \
- -I./ \
- -I../ \
- -I$(MOTIF_HOME)/include \
- -I$(X11_HOME)/include \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-
-all: $(EXEC) $(DLL)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseMozilla.o: ../eclipseMozilla.c ../eclipseMozilla.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseShm.o: ../eclipseShm.c ../eclipseShm.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
- $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
-
-$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
- $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
-
-install: all
- cp $(EXEC) $(OUTPUT_DIR)
- cp $(DLL) $(LIBRARY_DIR)
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
-clean:
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
diff --git a/features/org.eclipse.equinox.executable.feature/library/motif/make_solaris.mak b/features/org.eclipse.equinox.executable.feature/library/motif/make_solaris.mak
deleted file mode 100644
index 3438ce369..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/motif/make_solaris.mak
+++ /dev/null
@@ -1,104 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-# Martin Oberhuber (Wind River) - [185734] Support building with gcc and debug
-#*******************************************************************************
-include ../make_version.mak
-# Makefile for creating the Solaris/Motif eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-# X11_HOME - the full path to X11 header files
-# MOTIF_HOME - the full path to Motif header files
-# JAVA_HOME - path to java for JNI headers
-
-#ifeq ($(PROGRAM_OUTPUT),)
- PROGRAM_OUTPUT=eclipse
-#endif
-
-PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
-
-# Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o eclipseMotifInit.o
-DLL_OBJS = eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseShm.o eclipseNix.o\
- NgCommon.o NgImage.o NgImageData.o NgWinBMPFileFormat.o
-PICFLAG = -K PIC
-# Optimize and remove all debugging information by default
-OPTFLAG = -O -s
-# OPTFLAG = -g
-
-EXEC = $(PROGRAM_OUTPUT)
-DLL = $(PROGRAM_LIBRARY)
-LIBS = -L$(MOTIF_HOME)/lib -L$(X11_HOME)/lib -lintl -lthread -ldl -lc
-MOTIF_LIBS = -DXM_LIB="\"libXm.so.4\"" -DXT_LIB="\"libXt.so.4\"" -DX11_LIB="\"libX11.so.4\"" -DXIN_LIB="\"libXinerama.so.1\""
-#LFLAGS = -shared -Wl,--export-dynamic
-LFLAGS = -G
-CFLAGS =$(OPTFLAG) \
- -DSOLARIS \
- $(PICFLAG) \
- -DNO_XINERAMA_EXTENSIONS \
- -DNETSCAPE_FIX \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- $(MOTIF_LIBS) \
- -I./ \
- -I../ \
- -I$(MOTIF_HOME)/include \
- -I$(X11_HOME)/include \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/solaris
-
-all: $(EXEC) $(DLL)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipseMain.o: ../eclipseMain.c ../eclipseUnicode.h ../eclipseCommon.h
- $(CC) $(CFLAGS) -c ../eclipseMain.c -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipse.c -o $@
-
-eclipseCommon.o: ../eclipseCommon.c ../eclipseCommon.h ../eclipseUnicode.h
- $(CC) $(CFLAGS) -c ../eclipseCommon.c -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@
-
-eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
- $(CC) $(CFLAGS) -c ../eclipseJNI.c -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@
-
-eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
- $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
-
-eclipseNix.o: ../eclipseNix.c
- $(CC) $(CFLAGS) -c ../eclipseNix.c -o $@
-
-$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
- $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
-
-$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
- $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
-
-install: all
- cp $(EXEC) $(OUTPUT_DIR)
- cp $(DLL) $(LIBRARY_DIR)
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
-
-clean:
- rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)

Back to the top