Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Barbero2015-09-25 15:40:29 +0000
committerArun Thondapu2015-12-21 19:08:35 +0000
commit435dd2d09782e46095f4599e32318316a5459ab0 (patch)
tree274e1f3a797c7a9511c9040c8eefda664d717cf1 /features
parent15d56969726892d8f960f4b0562575446c550957 (diff)
downloadrt.equinox.framework-435dd2d09782e46095f4599e32318316a5459ab0.tar.gz
rt.equinox.framework-435dd2d09782e46095f4599e32318316a5459ab0.tar.xz
rt.equinox.framework-435dd2d09782e46095f4599e32318316a5459ab0.zip
Bug 383545 - Rename *Carbon* files to *Cocoa*
Change-Id: Ibfabae9b359217acc27adf8d49a923b5a496e0d6 Signed-off-by: Mikael Barbero <mikael@eclipse.org>
Diffstat (limited to 'features')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c (renamed from features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbon.c)130
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c (renamed from features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonCommon.c)39
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaMain.c (renamed from features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonMain.c)24
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/make_cocoa.mak13
4 files changed, 99 insertions, 107 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbon.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
index 61bdb8eb3..244e2b385 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
@@ -2,17 +2,18 @@
* Copyright (c) 2000, 2015 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
+ * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Andre Weinand (OTI Labs)
* David Green - OpenJDK bsd port integration
* Rapicorp, Inc - Default the configuration to Application Support (bug 461725)
+ * Mikael Barbero - Rename *Carbon* files to *Cocoa* (bug 383545)
*/
-
-/* MacOS X Carbon specific logic for displaying the splash screen. */
+
+/* MacOS X Cocoa specific logic for displaying the splash screen. */
#include "eclipseOS.h"
#include "eclipseCommon.h"
@@ -24,14 +25,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <CoreServices/CoreServices.h>
-#ifdef COCOA
#include <Cocoa/Cocoa.h>
-#else
-#include <Carbon/Carbon.h>
-#include "NgCommon.h"
-#include "NgImageData.h"
-#include "NgWinBMPFileFormat.h"
-#endif
#include <mach-o/dyld.h>
#define startupJarName "startup.jar"
@@ -77,9 +71,9 @@ static const char* jvmLocations[] = {
"../lib/" JAVA_ARCH "/client",
"../lib/" JAVA_ARCH "/server",
"../lib/client",
- "../lib/server",
+ "../lib/server",
"../jre/lib/" JAVA_ARCH "/client",
- "../jre/lib/" JAVA_ARCH "/server",
+ "../jre/lib/" JAVA_ARCH "/server",
"../jre/lib/client",
"../jre/lib/server",
NULL
@@ -132,7 +126,7 @@ static NSWindow* window = nil;
[window setBackgroundColor: [NSColor colorWithPatternImage: image]];
[window makeKeyAndOrderFront: nil];
dispatchMessages();
- result = 0;
+ result = 0;
}
}
[pool release];
@@ -155,7 +149,7 @@ static NSWindow* window = nil;
while ((event = [application nextEventMatchingMask: 0 untilDate: nil inMode: NSDefaultRunLoopMode dequeue: TRUE]) != nil) {
[application sendEvent: event];
}
- [pool release];
+ [pool release];
}
@end
@@ -174,12 +168,12 @@ static NSWindow* window = nil;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
int count = [event numberOfItems];
int index = 1;
-
+
if (!files) {
files = [NSMutableArray arrayWithCapacity:count];
[files retain];
}
-
+
for (index = 1; index<=count; index++) {
CFURLRef url = NULL;
NSAppleEventDescriptor *desc = [event descriptorAtIndex:index], *coerceDesc;
@@ -197,7 +191,7 @@ static NSWindow* window = nil;
CFRelease(url);
}
}
-
+
if (!timerOpenDocuments) {
timerOpenDocuments = [NSTimer scheduledTimerWithTimeInterval: 1.0
target: self
@@ -306,7 +300,7 @@ void takeDownSplash() {
[KeyWindow performSelectorOnMainThread: @selector(shutdown) withObject: nil waitUntilDone: 0];
}
[pool release];
-}
+}
void dispatchMessages() {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -336,14 +330,14 @@ static OSStatus drawProc (EventHandlerCallRef eventHandlerCallRef, EventRef even
if (image) {
ControlRef control;
CGContextRef context;
-
+
GetEventParameter(eventRef, kEventParamDirectObject, typeControlRef, NULL, 4, NULL, &control);
GetEventParameter(eventRef, kEventParamCGContextRef, typeCGContextRef, NULL, 4, NULL, &context);
-
+
HIRect rect;
HIViewGetBounds(control, &rect);
HIViewDrawCGImage(context, &rect, image);
- }
+ }
return result;
}
@@ -356,7 +350,7 @@ void loadImageFns()
{
static int initialized = 0;
static CFBundleRef bundle = NULL;
-
+
if (!initialized) {
if (!bundle) bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Carbon"));
if (bundle) createAtIndex = (CGImageSourceCreateImageAtIndex_FUNC)CFBundleGetFunctionPointerForName(bundle, CFSTR("CGImageSourceCreateImageAtIndex"));
@@ -369,7 +363,7 @@ static OSStatus appleEventProc(EventHandlerCallRef inCaller, EventRef theEvent,
EventRecord eventRecord;
Boolean release = false;
EventQueueRef queue;
-
+
queue = GetCurrentEventQueue();
if (IsEventInQueue (queue, theEvent)) {
RetainEvent (theEvent);
@@ -400,13 +394,13 @@ static void timerProc(EventLoopTimerRef timer, void *userData) {
RemoveEventHandler(appHandler);
AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments, NewAEEventHandlerUPP(openDocumentsProc), false);
}
-
+
static pascal OSErr openDocumentsProc(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) {
AEDescList docList;
FSRef theFSRef;
long index;
long count = 0;
-
+
AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, &docList);
AECountItems(&docList, &count);
for(index = 1; index <= count; index++) {
@@ -414,8 +408,8 @@ static pascal OSErr openDocumentsProc(const AppleEvent *theAppleEvent, AppleEven
CFURLRef url = CFURLCreateFromFSRef(kCFAllocatorDefault, &theFSRef);
CFStringRef pathName = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
if (!files) {
- files = CFArrayCreateMutable(kCFAllocatorDefault, count, &kCFTypeArrayCallBacks);
- InstallEventLoopTimer(GetMainEventLoop(), 1, 1, NewEventLoopTimerUPP(timerProc), NULL, NULL);
+ files = CFArrayCreateMutable(kCFAllocatorDefault, count, &kCFTypeArrayCallBacks);
+ InstallEventLoopTimer(GetMainEventLoop(), 1, 1, NewEventLoopTimerUPP(timerProc), NULL, NULL);
}
CFArrayAppendValue(files, pathName);
CFRelease(pathName);
@@ -437,12 +431,12 @@ int showSplash( const _TCHAR* featureImage )
EventTypeSpec draw = {kEventClassControl, kEventControlDraw};
EventTypeSpec dispose = {kEventClassWindow, kEventWindowDispose};
ControlRef root;
-
+
if(window != NULL)
return 0; /*already showing */
if (featureImage == NULL)
return ENOENT;
-
+
loadImageFns();
if (createWithURL && createAtIndex) {
CFStringRef imageString = CFStringCreateWithCString(kCFAllocatorDefault, featureImage, kCFStringEncodingUTF8);
@@ -456,15 +450,15 @@ int showSplash( const _TCHAR* featureImage )
CFRelease(url);
}
}
- CFRelease(imageString);
+ CFRelease(imageString);
} else {
image = loadBMPImage(featureImage);
}
-
- /*If the splash image data could not be loaded, return an error.*/
+
+ /*If the splash image data could not be loaded, return an error.*/
if (image == NULL)
return ENOENT;
-
+
w = CGImageGetWidth(image);
h = CGImageGetHeight(image);
@@ -477,17 +471,17 @@ int showSplash( const _TCHAR* featureImage )
wRect.top+= (deviceHeight-h)/3;
wRect.right= wRect.left + w;
wRect.bottom= wRect.top + h;
-
+
attributes = kWindowStandardHandlerAttribute | kWindowCompositingAttribute;
attributes &= GetAvailableWindowAttributes(kSheetWindowClass);
CreateNewWindow(kSheetWindowClass, attributes, &wRect, &window);
if (window != NULL) {
GetRootControl(window, &root);
- wRect.left = wRect.top = 0;
+ wRect.left = wRect.top = 0;
wRect.right = w;
wRect.bottom = h;
CreateUserPaneControl(window, &wRect, kControlSupportsEmbedding | kControlSupportsFocus | kControlGetsFocusOnClick, &pane);
- HIViewAddSubview(root, pane);
+ HIViewAddSubview(root, pane);
InstallEventHandler(GetControlEventTarget(pane), (EventHandlerUPP)drawProc, 1, &draw, NULL, NULL);
InstallEventHandler(GetWindowEventTarget(window), (EventHandlerUPP)disposeProc, 1, &dispose, NULL, NULL);
@@ -506,20 +500,20 @@ void takeDownSplash() {
if(image){
CGImageRelease(image);
image = NULL;
- }
-}
+ }
+}
void dispatchMessages() {
EventRef event;
EventTargetRef target;
-
+
target = GetEventDispatcherTarget();
while( ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &event) == noErr ) {
SendEventToEventTarget(event, target);
ReleaseEvent(event);
}
}
-#endif
+#endif
void installAppleEventHandler() {
#ifdef COCOA
@@ -527,9 +521,9 @@ void installAppleEventHandler() {
AppleEventDelegate *appleEventDelegate = [[AppleEventDelegate alloc] init];
[NSApplication sharedApplication];
NSAppleEventManager *manager = [NSAppleEventManager sharedAppleEventManager];
- [manager setEventHandler:appleEventDelegate
- andSelector:@selector(handleOpenDocuments:withReplyEvent:)
- forEventClass:kCoreEventClass
+ [manager setEventHandler:appleEventDelegate
+ andSelector:@selector(handleOpenDocuments:withReplyEvent:)
+ forEventClass:kCoreEventClass
andEventID:kAEOpenDocuments];
[manager setEventHandler:appleEventDelegate
andSelector:@selector(handleGetURL:withReplyEvent:)
@@ -537,7 +531,7 @@ void installAppleEventHandler() {
andEventID:kAEGetURL];
// [appleEventDelegate release];
[pool release];
-#else
+#else
EventTypeSpec kEvents[] = { {kEventClassAppleEvent, kEventAppleEvent} };
InstallApplicationEventHandler(NewEventHandlerUPP(appleEventProc), GetEventTypeCount(kEvents), kEvents, 0, &appHandler);
AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, NewAEEventHandlerUPP(openDocumentsProc), 0, false);
@@ -549,7 +543,7 @@ jlong getSplashHandle() {
}
/* Get the window system specific VM arguments */
-char** getArgVM( char* vm )
+char** getArgVM( char* vm )
{
char** result;
@@ -629,13 +623,13 @@ char * findVMLibrary( char* command ) {
char *start, *end;
char *version, *result, *cmd;
int length;
-
+
/*check first to see if command already points to the library */
if (strcmp(command, JAVA_FRAMEWORK) == 0) {
return JAVA_FRAMEWORK;
}
-
- /* select a version to use based on the command */
+
+ /* select a version to use based on the command */
start = strstr(command, "/Versions/");
if (start != NULL){
start += 10;
@@ -645,14 +639,14 @@ char * findVMLibrary( char* command ) {
version = malloc(length + 1);
strncpy(version, start, length);
version[length] = 0;
-
+
/*only set a version if it starts with a number */
if(strtol(version, NULL, 10) != 0 || version[0] == '0') {
setenv("JAVA_JVM_VERSION", version, 1);
}
-
+
free(version);
- }
+ }
}
cmd = command;
if (strstr(cmd, "/JavaVM.framework/") != NULL && (strstr(cmd, "/Current/") != NULL || strstr(cmd, "/A/") != NULL)) {
@@ -705,7 +699,7 @@ static char * findLib(char * command) {
while (jvmLocations[++i] != NULL) {
sprintf(location, "%s%c%s", jvmLocations[i], dirSeparator, jvmLib);
/*fprintf(stderr,"checking path: %s\n",path);*/
- if (stat(path, &stats) == 0 && (stats.st_mode & S_IFREG) != 0)
+ if (stat(path, &stats) == 0 && (stats.st_mode & S_IFREG) != 0)
{ /* found it */
return path;
}
@@ -751,14 +745,14 @@ static void adjustLibraryPath(char * vmLibrary) {
}
c = concatStrings(paths);
-
+
/* set the value for LD_LIBRARY_PATH */
length = strlen(ldPath);
newPath = malloc((_tcslen(c) + length + 1) * sizeof(_TCHAR));
_stprintf(newPath, _T_ECLIPSE("%s%s"), c, ldPath);
setenv(LIB_PATH_VAR, newPath, 1);
free(newPath);
-
+
/* set the value for DYLD_FALLBACK_LIBRARY_PATH */
length = strlen(dylibPath);
newPath = malloc((_tcslen(c) + length + 1) * sizeof(_TCHAR));
@@ -766,7 +760,7 @@ static void adjustLibraryPath(char * vmLibrary) {
setenv(DYLD_FALLBACK_VAR, newPath, 1);
free(newPath);
free(c);
-
+
for (i = 0; i < numPaths; i++)
free(paths[i]);
free(paths);
@@ -804,7 +798,7 @@ JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[],
}
#ifndef COCOA
-void disposeData(void *info, void *data, size_t size)
+void disposeData(void *info, void *data, size_t size)
{
DisposePtr(data);
}
@@ -817,7 +811,7 @@ void disposeData(void *info, void *data, size_t size)
*
* returned value: the PixMapHandle newly created if successful. 0 otherwise.
*/
-static CGImageRef loadBMPImage (const char *bmpPathname) {
+static CGImageRef loadBMPImage (const char *bmpPathname) {
ng_stream_t in;
ng_bitmap_image_t image;
ng_err_t err= ERR_OK;
@@ -846,14 +840,14 @@ static CGImageRef loadBMPImage (const char *bmpPathname) {
NgError (ERR_NG, "Error unsupported depth - only support 24 bit");
return 0;
}
-
+
int width= (int)NgBitmapImageWidth(&image);
int height= (int)NgBitmapImageHeight(&image);
int rowBytes= width * 4;
int alphainfo = kCGImageAlphaNoneSkipFirst | (NgIsMSB() ? 0 : kCGBitmapByteOrder32Little);
data = (UBYTE1*)NewPtr(rowBytes * height);
CGDataProviderRef provider = CGDataProviderCreateWithData(0, data, rowBytes * height, (CGDataProviderReleaseDataCallback)disposeData);
-
+
ref = CGImageCreate(width, height, 8, 32, width * 4, CGColorSpaceCreateDeviceRGB(), alphainfo, provider, NULL, 1, 0);
CGDataProviderRelease(provider);
@@ -878,39 +872,39 @@ void processVMArgs(char **vmargs[] )
int pid = 0, pidLength = 1, temp = 0;
char * name = NULL, *icon = NULL;
char * c;
-
+
if( *vmargs == NULL)
return;
-
+
while( (*vmargs)[++i] != NULL ) {
/*-Xdock:icon -> APP_ICON_<pid>*/
if(_tcsncmp((*vmargs)[i], DOCK_ICON_PREFIX, _tcslen(DOCK_ICON_PREFIX)) == 0) {
icon = (*vmargs)[i] + _tcslen(DOCK_ICON_PREFIX);
- }
+ }
/*-Xdock:name -> APP_NAME_<pid>*/
else if(_tcsncmp((*vmargs)[i], DOCK_NAME_PREFIX, _tcslen(DOCK_NAME_PREFIX)) == 0) {
name = (*vmargs)[i] + _tcslen(DOCK_NAME_PREFIX);
}
- if (name != NULL && icon != NULL)
+ if (name != NULL && icon != NULL)
break;
}
-
+
if (name == NULL && icon == NULL)
return; /* don't need to do anything */
-
+
temp = pid = getpid();
/* how many digits in pid? */
while (temp > 9) {
pidLength++;
temp /= 10;
}
-
+
if (name != NULL) {
c = malloc( (_tcslen(APP_NAME_PATTERN) + pidLength + 1) * sizeof(char*));
_stprintf( c, APP_NAME_PATTERN, pid );
setenv(c, name, 1);
}
-
+
if (icon != NULL) {
c = malloc( (_tcslen(icon) + _tcslen(APP_ICON_PATTERN) + pidLength + 1) * sizeof(char*));
_stprintf( c, APP_ICON_PATTERN, pid );
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonCommon.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c
index 75369f148..130c225e0 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonCommon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c
@@ -2,14 +2,15 @@
* Copyright (c) 2006, 2015 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
+ * 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
+ * Mikael Barbero
*******************************************************************************/
-
+
#include "eclipseCommon.h"
#include "eclipseOS.h"
@@ -17,11 +18,7 @@
#include <dlfcn.h>
#include <unistd.h>
#include <CoreServices/CoreServices.h>
-#ifdef COCOA
#include <Cocoa/Cocoa.h>
-#else
-#include <Carbon/Carbon.h>
-#endif
#include <mach-o/dyld.h>
char dirSeparator = '/';
@@ -50,7 +47,7 @@ static void init() {
/* Initialize Window System
*
- * Initialize Carbon.
+ * Initialize Cocoa.
*/
int initWindowSystem( int* pArgc, char* argv[], int showSplash )
{
@@ -58,10 +55,10 @@ int initWindowSystem( int* pArgc, char* argv[], int showSplash )
/*debug("install dir: %s\n", homeDir);*/
if (homeDir != NULL)
chdir(homeDir);
-
+
if (showSplash)
init();
-
+
return 0;
}
@@ -72,7 +69,7 @@ void displayMessage(char *title, char *message)
/* try to break the message into a first sentence and the rest */
char *pos= strstr(message, ". ");
- if (pos != NULL) {
+ if (pos != NULL) {
char *to, *from, *buffer= calloc(pos-message+2, sizeof(char));
/* copy and replace line separators with blanks */
for (to= buffer, from= message; from <= pos; from++, to++) {
@@ -86,9 +83,9 @@ void displayMessage(char *title, char *message)
} else {
inError= CFStringCreateWithCString(kCFAllocatorDefault, message, kCFStringEncodingUTF8);
}
-
+
init();
-
+
#ifdef COCOA
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSAlert* alert = [NSAlert alertWithMessageText: (NSString*)(inDescription != nil ? inError : nil) defaultButton: nil alternateButton: nil otherButton: nil informativeTextWithFormat: (NSString*)(inDescription != nil ? inDescription : inError)];
@@ -148,7 +145,7 @@ void * loadLibrary( char * library ){
free(bundle);
void * result= dlopen(library, RTLD_NOW);
- if(result == 0)
+ if(result == 0)
printf("%s\n",dlerror());
return result;
}
@@ -161,7 +158,7 @@ void unloadLibrary( void * handle ){
else
dlclose(handle);
}
-
+
/* Find the given symbol in the shared library
*/
void * findSymbol( void * handle, char * symbol ){
@@ -180,16 +177,16 @@ char * resolveSymlinks( char * path ) {
CFStringRef string;
FSRef fsRef;
Boolean isFolder, wasAliased;
-
+
if(path == NULL)
return path;
-
+
string = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, string, kCFURLPOSIXPathStyle, false);
CFRelease(string);
if(url == NULL)
return path;
-
+
if(CFURLGetFSRef(url, &fsRef)) {
if( FSResolveAliasFile(&fsRef, true, &isFolder, &wasAliased) == noErr) {
resolved = CFURLCreateFromFSRef(kCFAllocatorDefault, &fsRef);
@@ -206,7 +203,7 @@ char * resolveSymlinks( char * path ) {
CFRelease(resolved);
}
}
- }
- CFRelease(url);
+ }
+ CFRelease(url);
return result;
-} \ No newline at end of file
+}
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonMain.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaMain.c
index 51cafc275..62b93fed5 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCarbonMain.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaMain.c
@@ -1,13 +1,14 @@
/*
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2015 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
+ * 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
+ * Mikael Barbero
*/
#include "eclipseCommon.h"
@@ -24,7 +25,6 @@
#include <unistd.h>
#include <CoreServices/CoreServices.h>
-#include <Carbon/Carbon.h>
#include <mach-o/dyld.h>
@@ -75,14 +75,14 @@ int main( int argc, char* argv[] ) {
strncpy(fgAppPackagePath, argv[0], l);
fgAppPackagePath[l]= '\0'; // terminate result
}
-
+
/* Get the main bundle for the app */
CFBundleRef mainBundle= CFBundleGetMainBundle();
if (mainBundle != NULL) {
-
+
/* Get an instance of the info plist.*/
CFDictionaryRef bundleInfoDict= CFBundleGetInfoDictionary(mainBundle);
-
+
/* If we succeeded, look for our property. */
if (bundleInfoDict != NULL) {
CFArrayRef ar= CFDictionaryGetValue(bundleInfoDict, CFSTR("Eclipse"));
@@ -149,7 +149,7 @@ static void dumpArgs(char *tag, int argc, char* argv[]) {
/*
* Expand $APP_PACKAGE, $JAVA_HOME, and does tilde expansion.
-
+
A word beginning with an unquoted tilde character (~) is
subject to tilde expansion. All the characters up to a
slash (/) or the end of the word are treated as a username
@@ -159,10 +159,10 @@ static void dumpArgs(char *tag, int argc, char* argv[]) {
user's home directory).
*/
static char *expandShell(char *arg, const char *appPackage, const char *javaRoot) {
-
+
if (index(arg, '~') == NULL && index(arg, '$') == NULL)
return arg;
-
+
char *buffer= strdup("");
char c, lastChar= ' ';
const char *cp= arg;
@@ -186,7 +186,7 @@ static char *expandShell(char *arg, const char *appPackage, const char *javaRoot
}
if (dir != NULL)
buffer= append(buffer, dir);
-
+
} else if (c == '$') {
int l= strlen(APP_PACKAGE);
if (appPackage != NULL && strncmp(cp, APP_PACKAGE, l) == 0) {
@@ -234,4 +234,4 @@ static char *appendc(char *buffer, char c) {
buffer[bl++]= c;
buffer[bl]= '\0';
return buffer;
-} \ No newline at end of file
+}
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 0d267a094..2f9fd1335 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
@@ -1,5 +1,5 @@
#**********************************************************************
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2015 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
@@ -7,6 +7,7 @@
#
# Contributors:
# Kevin Cornell (Rational Software Corporation)
+# Mikael Barbero
#**********************************************************************
include ../make_version.mak
# Makefile for creating the Cocoa eclipse launcher program.
@@ -25,9 +26,9 @@ endif
PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so
# Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.o eclipseCarbonMain.o
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseCarbonCommon.o
-DLL_OBJS = eclipse.o eclipseCarbon.o eclipseUtil.o eclipseJNI.o eclipseShm.o
+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)
@@ -49,8 +50,8 @@ all: $(EXEC) $(DLL)
eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
$(CC) $(CFLAGS) -c ../eclipse.c -o $@
-eclipseCarbonMain.o : eclipseCarbonMain.c
- $(CC) $(CFLAGS) -c eclipseCarbonMain.c -o $@
+eclipseCocoaMain.o : eclipseCocoaMain.c
+ $(CC) $(CFLAGS) -c eclipseCocoaMain.c -o $@
eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h eclipseMain.c ../eclipseMain.c
$(CC) $(CFLAGS) -c eclipseMain.c -o $@

Back to the top