[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[653] trunk/fuse/fusepb
Brought to you by:
fredm
From: <fr...@us...> - 2010-10-16 09:47:13
|
Revision: 653 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=653&view=rev Author: fredm Date: 2010-10-16 09:47:07 +0000 (Sat, 16 Oct 2010) Log Message: ----------- We don't link and C++ code in any more, so main can move back to Objective-C instead of Objective-C++. Modified Paths: -------------- trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj Added Paths: ----------- trunk/fuse/fusepb/main.m Removed Paths: ------------- trunk/fuse/fusepb/main.mm Modified: trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj =================================================================== --- trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj 2010-10-16 09:43:30 UTC (rev 652) +++ trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj 2010-10-16 09:47:07 UTC (rev 653) @@ -151,7 +151,7 @@ B629532E114FB265007808E0 /* libspectrum.h.in in Resources */ = {isa = PBXBuildFile; fileRef = B6DCBB7A114FA0E700DC9A11 /* libspectrum.h.in */; }; B62B19E10DD31DF500D42AAF /* scalers16.c in Sources */ = {isa = PBXBuildFile; fileRef = B62B19E00DD31DF500D42AAF /* scalers16.c */; }; B62B1A280DD6655800D42AAF /* fuse.c in Sources */ = {isa = PBXBuildFile; fileRef = B62B1A270DD6655800D42AAF /* fuse.c */; }; - B62B1A2A0DD667EC00D42AAF /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = B62B1A290DD667EC00D42AAF /* main.mm */; }; + B62B1A2A0DD667EC00D42AAF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B62B1A290DD667EC00D42AAF /* main.m */; }; B631B9FF10257CA400BE1EE1 /* opus.c in Sources */ = {isa = PBXBuildFile; fileRef = B631B9FD10257CA400BE1EE1 /* opus.c */; }; B631BA0010257CA400BE1EE1 /* opus.h in Headers */ = {isa = PBXBuildFile; fileRef = B631B9FE10257CA400BE1EE1 /* opus.h */; }; B631BA0F1025878600BE1EE1 /* opus.rom in Resources */ = {isa = PBXBuildFile; fileRef = B631BA0E1025878600BE1EE1 /* opus.rom */; }; @@ -418,7 +418,7 @@ B6251C3D0C2EB24500BD5543 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; }; B62B19E00DD31DF500D42AAF /* scalers16.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = scalers16.c; path = scaler/scalers16.c; sourceTree = SOURCE_ROOT; }; B62B1A270DD6655800D42AAF /* fuse.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = fuse.c; sourceTree = "<group>"; }; - B62B1A290DD667EC00D42AAF /* main.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; }; + B62B1A290DD667EC00D42AAF /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; B62F3BCE059F5BF300A7009A /* PokeFinderController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PokeFinderController.h; path = controllers/PokeFinderController.h; sourceTree = "<group>"; }; B62F3BCF059F5BF300A7009A /* PokeFinderController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PokeFinderController.m; path = controllers/PokeFinderController.m; sourceTree = "<group>"; }; B631B9FD10257CA400BE1EE1 /* opus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = opus.c; sourceTree = "<group>"; }; @@ -801,7 +801,7 @@ B66EA7840401075300A864FD /* FuseMenus.m */, B6A7F0E904C9A11D001025EB /* NumberFormatter.h */, B6A7F0EA04C9A11D001025EB /* NumberFormatter.m */, - B62B1A290DD667EC00D42AAF /* main.mm */, + B62B1A290DD667EC00D42AAF /* main.m */, ); name = Classes; sourceTree = "<group>"; @@ -1737,7 +1737,7 @@ B665FD490DD25D8900D21C79 /* upd_fdc.c in Sources */, B62B19E10DD31DF500D42AAF /* scalers16.c in Sources */, B62B1A280DD6655800D42AAF /* fuse.c in Sources */, - B62B1A2A0DD667EC00D42AAF /* main.mm in Sources */, + B62B1A2A0DD667EC00D42AAF /* main.m in Sources */, B684A19A0E93A88200A5B097 /* mempool.c in Sources */, B684A19E0E93A8CD00A5B097 /* event.c in Sources */, B684A1A00E93A8D700A5B097 /* variable.c in Sources */, Copied: trunk/fuse/fusepb/main.m (from rev 649, trunk/fuse/fusepb/main.mm) =================================================================== --- trunk/fuse/fusepb/main.m (rev 0) +++ trunk/fuse/fusepb/main.m 2010-10-16 09:47:07 UTC (rev 653) @@ -0,0 +1,68 @@ +/* main.m: The Free Unix Spectrum Emulator + Copyright (c) 2006-2010 Fredrick Meunier + + $Id: fuse.c,v 1.130 2006/07/28 15:06:14 fredm Exp $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Author contact information: + + E-mail: pak...@sr... + Postal address: 15 Crescent Road, Wokingham, Berks, RG40 2DB, England + +*/ + +#import <Cocoa/Cocoa.h> + +#include <stdlib.h> + +#include "fuse.h" +#include "main.h" +#include "settings.h" + +int ac; +char **av; + +int main(int argc, char *argv[]) +{ + int retval, i; + + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + int error = settings_defaults( &settings_current ); + if( error ) return error; + + /* This is passed if we are launched by double-clicking */ + if ( argc >= 2 && strncmp( argv[1], "-psn", 4 ) == 0 ) { + ac = 1; + } else { + ac = argc; + } + av = (char**) malloc( sizeof(*av) * (ac+1) ); + for( i = 0; i < ac; i++ ) + av[i] = argv[i]; + av[i] = NULL; + + if( settings_current.show_help || + settings_current.show_version ) return 0; + + retval = NSApplicationMain( argc, (const char**)argv ); + + fuse_end(); + + [pool release]; + + return retval; +} Deleted: trunk/fuse/fusepb/main.mm =================================================================== --- trunk/fuse/fusepb/main.mm 2010-10-16 09:43:30 UTC (rev 652) +++ trunk/fuse/fusepb/main.mm 2010-10-16 09:47:07 UTC (rev 653) @@ -1,70 +0,0 @@ -/* main.mm: The Free Unix Spectrum Emulator - Copyright (c) 2006-2009 Fredrick Meunier - - $Id: fuse.c,v 1.130 2006/07/28 15:06:14 fredm Exp $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Author contact information: - - E-mail: pak...@sr... - Postal address: 15 Crescent Road, Wokingham, Berks, RG40 2DB, England - -*/ - -#import <Cocoa/Cocoa.h> - -#include <stdlib.h> - -extern "C" { -#include "fuse.h" -#include "main.h" -#include "settings.h" -} - -int ac; -char **av; - -int main(int argc, char *argv[]) -{ - int retval, i; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - int error = settings_defaults( &settings_current ); - if( error ) return error; - - /* This is passed if we are launched by double-clicking */ - if ( argc >= 2 && strncmp( argv[1], "-psn", 4 ) == 0 ) { - ac = 1; - } else { - ac = argc; - } - av = (char**) malloc( sizeof(*av) * (ac+1) ); - for( i = 0; i < ac; i++ ) - av[i] = argv[i]; - av[i] = NULL; - - if( settings_current.show_help || - settings_current.show_version ) return 0; - - retval = NSApplicationMain( argc, (const char**)argv ); - - fuse_end(); - - [pool release]; - - return retval; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |