Skip to content
Permalink
Browse files

Merge jake-b's ObjCBridging changes

  • Loading branch information...
panicsteve committed May 25, 2016
1 parent 0012dc7 commit daa48928159140b023ee883e47997ce5c58613bb
Showing with 790 additions and 473 deletions.
  1. +112 −0 Emulator/NativeCalls/TObjCBridgeCalls.h
  2. +211 −0 Emulator/NativeCalls/TObjCBridgeCalls.mm
  3. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/Install & Remove Scripts.text
  4. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/FilesInBuild
  5. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Makefile
  6. 0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Makeout
  7. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/NSandDDKIncludes.h
  8. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/ObjCBridge.a
  9. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/ObjCBridge.cp
  10. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/ObjCBridge.exp
  11. BIN Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects/ObjCBridge Module.ntkc
  12. BIN Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects/ObjCBridge Module.sym
  13. BIN Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects/ObjCBridge.a.o
  14. BIN Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects/ObjCBridge.cp.o
  15. BIN Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects/ObjCBridge.exp.o
  16. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/Objects_m.h
  17. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/UserGlobals_m.h
  18. +1 −0 Packages/iOS Transport/iOS Sharing_NCT/ObjCBridge Module/UserTasks_m.h
  19. 0 Packages/iOS Transport/iOS Sharing_NCT/Resources.RSRC
  20. BIN Packages/iOS Transport/iOS Sharing_NCT/iOS Transport
  21. BIN Packages/iOS Transport/iOS Sharing_NCT/iOS Transport.pkg
  22. BIN Packages/iOS Transport/iOS Sharing_NCT/iOSTransport.t
  23. BIN Packages/iOS Transport/iOS Transport.pkg
  24. +31 −358 _Build_/Xcode/Einstein.xcodeproj/project.pbxproj
  25. +4 −4 _Build_/Xcode/Einstein.xcodeproj/xcshareddata/xcschemes/EinsteinDev (Matthias).xcscheme
  26. +0 −91 _Build_/Xcode/Einstein.xcodeproj/xcshareddata/xcschemes/iOSEinstein (NIBs).xcscheme
  27. +4 −4 ...tein.xcodeproj/xcshareddata/xcschemes/{iOSEinstein (Storyboards).xcscheme → iOSEinstein.xcscheme}
  28. +320 −0 _Tests_/TObjCBridgeTests.mm
  29. +0 −11 app/TCocoaMonitorController.mm
  30. +3 −0 app/iEinstein/Classes/iEinsteinAppDelegate.h
  31. +35 −0 app/iEinstein/Classes/iEinsteinAppDelegate.mm
  32. +1 −0 app/iEinstein/Classes/iEinsteinView.h
  33. +38 −3 app/iEinstein/Classes/iEinsteinView.mm
  34. +3 −2 app/iEinstein/Launch Screen.xib
  35. +18 −0 app/iEinstein/Settings.bundle/Root.plist
@@ -0,0 +1,112 @@
// ==============================
// File: TObjCBridgeCalls.h
// Project: Einstein
//
// Copyright 2015 by Jake Bordens
//
// 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// ==============================
// $Id$
// ==============================

#ifndef _TOBJCBRIDGECALLS_H
#define _TOBJCBRIDGECALLS_H

#include <K/Defines/KDefinitions.h>

#include "NativeCallsDefines.h"

class TMemory;

///
/// Class for native calls, the first step towards virtualization.
///
/// \author Paul Guyot <pguyot@kallisys.net>
/// \version $Revision: 150 $
///
/// \test aucun test dŽfini.
///
class TObjCBridgeCalls
{
public:
///
/// Constructor from an interface to memory.
///
TObjCBridgeCalls( TMemory* inMemoryIntf );

///
/// Destructor.
///
~TObjCBridgeCalls( void );


#if TARGET_IOS || TARGET_OS_OPENSTEP

///
/// Returns the number of bits of the host running the emulator.
/// Used by the client OS to determine the size needed to hold object pointers.
///
KUInt32 HostGetCPUArchitecture();

///
/// Create an NSInvocation object.
/// The selector string is of the form "+classMethod:" or "-instanceMethod:"
///
KUInt32 HostMakeNSInvocation(KUInt32 objPtrAddrOut,
KUInt32 classNamePtrAddress,
KUInt32 selectorStringPtrAddress);

///
/// Given an NSInvocation object, set the target object
///
KUInt32 HostSetInvocationTarget(KUInt32 invocationObjectAddr,
KUInt32 targetObjectAddr);

/// Set a parameter on an NSInvocation object
KUInt32 HostSetInvocationArgument_Object(KUInt32 invocationObjectAddr,
KUInt32 objectAddr,
KUInt32 index);

///
/// Given an NSInvocation object, perform the invocation as configured.
///
KUInt32 HostInvoke(KUInt32 invocationObjectAddr);

///
/// Get return value Object from an NSInvocation
///
KUInt32 HostGetInvocationReturn_Object(KUInt32 returnObjectAddr,
KUInt32 invocationObjectAddr);


///
/// Release an object. If using ARC, then use __bridge_transfer to release
/// Otherwise, actually release the object.
///
KUInt32 HostReleaseObject(KUInt32 objectToRelease);

KUInt32 HostMakeNSString(KUInt32 returnObjAddr, KUInt32 cStringAddr);

/// \name Variables
TMemory* mMemoryIntf; ///< Interface to memory.

#endif // TARGET_IOS
};

#endif // _TNATIVEIOSCALLS_H

// ===================================================== //
// Old programmers never die, they just become managers. //
// ===================================================== //
@@ -0,0 +1,211 @@
// ==============================
// File: TObjCBridgeCalls.cp
// Project: Einstein
//
// Copyright 2015 by Jake Bordens.
//
// 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// ==============================
// $Id$
// ==============================

#include <K/Defines/KDefinitions.h>
#include "TObjCBridgeCalls.h"
#import <Foundation/Foundation.h>

// POSIX & Co.
#include <stdio.h>
#include <limits.h>
#include <errno.h>
#include <sys/types.h>
#include <string.h>

// Einstein
#include "TMemory.h"

// Helper functions
inline void WriteObjectToEmulatorMemory(TMemory* mMemoryIntf, KUInt32 address, id object);
inline id ReadObjectFromEmulatorMemory(TMemory* mMemoryIntf, KUInt32 address);
NSString* ReadUTF16(TMemory* memoryIntf, KUInt32 address);

// -------------------------------------------------------------------------- //
// * TNativeiOSCalls( TMemory* )
// -------------------------------------------------------------------------- //
TObjCBridgeCalls::TObjCBridgeCalls( TMemory* inMemoryIntf )
:
mMemoryIntf( inMemoryIntf )
{
// Initialization
}

#if TARGET_IOS || TARGET_OS_OPENSTEP

KUInt32 TObjCBridgeCalls::HostGetCPUArchitecture() {
return sizeof(void*);
}


KUInt32 TObjCBridgeCalls::HostMakeNSInvocation(KUInt32 objPtrAddrOut,
KUInt32 classNamePtrAddress,
KUInt32 selectorStringPtrAddress) {

// Get the first (16-bit) character from the selector to determine
// if it is an instance or class member
char classOrInstanceCharacter[2];
mMemoryIntf->FastReadBuffer(selectorStringPtrAddress, 2, (KUInt8*)&classOrInstanceCharacter);

// classOrInstanceCharacter should be '\0+' or '\0-' -- make sure the first character is \0
if (classOrInstanceCharacter[0] != '\0')
return -1;

NSString* className = ReadUTF16(mMemoryIntf, classNamePtrAddress);
NSString* selectorName = ReadUTF16(mMemoryIntf, selectorStringPtrAddress+2);
Class classObj = NSClassFromString(className);

SEL selector = NSSelectorFromString(selectorName);
NSInvocation* invocation = nil;
if (classOrInstanceCharacter[1] == '+') {
//This is class Method

NSMethodSignature* signature = [classObj methodSignatureForSelector:selector];
if (signature == nil) return -1;
invocation = [NSInvocation invocationWithMethodSignature:signature];
invocation.selector = selector;
invocation.target = classObj;
} else if (classOrInstanceCharacter[1] == '-') {
//This is an instance Method
NSMethodSignature* signature = [classObj instanceMethodSignatureForSelector:selector];
if (signature == nil) return -1;
invocation = [NSInvocation invocationWithMethodSignature:signature];
invocation.selector = selector;
//Target to be set by a later setTarget call.
}

if (invocation == nil)
return -1;

WriteObjectToEmulatorMemory(mMemoryIntf, objPtrAddrOut, invocation);
return 0;
}

KUInt32 TObjCBridgeCalls::HostSetInvocationTarget(KUInt32 invocationObjectAddr,
KUInt32 targetObjectAddr) {

NSInvocation* invocation = ReadObjectFromEmulatorMemory(mMemoryIntf, invocationObjectAddr);

invocation.target = ReadObjectFromEmulatorMemory(mMemoryIntf, targetObjectAddr);

return 0;
}

KUInt32 TObjCBridgeCalls::HostSetInvocationArgument_Object(KUInt32 invocationObjectAddr,
KUInt32 objectAddr,
KUInt32 index) {

NSInvocation* invocation = ReadObjectFromEmulatorMemory(mMemoryIntf, invocationObjectAddr);

id object = ReadObjectFromEmulatorMemory(mMemoryIntf, objectAddr);
[invocation setArgument:&object atIndex:index];

return 0;
}

KUInt32 TObjCBridgeCalls::HostInvoke(KUInt32 invocationObjectAddr) {

NSInvocation* invocation = ReadObjectFromEmulatorMemory(mMemoryIntf, invocationObjectAddr);
[invocation invoke];

return 0;
}

KUInt32 TObjCBridgeCalls::HostGetInvocationReturn_Object(KUInt32 returnObjectAddr,
KUInt32 invocationObjectAddr) {

NSInvocation* invocation = ReadObjectFromEmulatorMemory(mMemoryIntf, invocationObjectAddr);

// See http://stackoverflow.com/questions/22018272 for why this needs to be __unsafe_unretained
id __unsafe_unretained returnObj;
[invocation getReturnValue:&returnObj];
WriteObjectToEmulatorMemory(mMemoryIntf, returnObjectAddr, returnObj);

return 0;

}

KUInt32 TObjCBridgeCalls::HostReleaseObject(KUInt32 objectToReleaseAddr) {
// Not using the helper function ReadObjectFromEmulatorMemory here, because
// It uses the __bridge cast which is a no-op from an ARC perspective.
// We want a __bridge_transfer cast which decrements the counter (release).
void* objectPtr;
mMemoryIntf->FastReadBuffer(objectToReleaseAddr, sizeof(id), (KUInt8*)&objectPtr);

id object = (__bridge_transfer id)objectPtr;
#if !__has_feature(objc_arc)
[object release];
#endif
object = nil;

return 0;
}

KUInt32 TObjCBridgeCalls::HostMakeNSString(KUInt32 returnObjAddr, KUInt32 cStringAddr) {

NSString* string = ReadUTF16(mMemoryIntf, cStringAddr);
WriteObjectToEmulatorMemory(mMemoryIntf, returnObjAddr, string);

return 0;
}

// Helper function to pull a NSString from the emulator's memory.
// There's probably a faster way to do this.
NSString* ReadUTF16(TMemory* memoryIntf, KUInt32 address) {
UInt16 buffer;
NSMutableData* data = [[NSMutableData alloc] init];
while (1) {
memoryIntf->FastReadBuffer(address, 2, (KUInt8*)&buffer);
if (buffer==0) break;
[data appendBytes:&buffer length:2];
address += 2;
}
NSString* returnVal = [[NSString alloc] initWithData:data encoding:NSUTF16BigEndianStringEncoding];
#if !__has_feature(objc_arc)
[returnVal autorelease];
[data release];
#endif

return returnVal;

}

inline void WriteObjectToEmulatorMemory(TMemory* mMemoryIntf, KUInt32 address, id object) {
#if !__has_feature(objc_arc)
[object retain];
#endif
void* objectPtr = ((__bridge_retained void*)object);
mMemoryIntf->FastWriteBuffer(address, sizeof(id), (KUInt8*)&objectPtr);
}

inline id ReadObjectFromEmulatorMemory(TMemory* mMemoryIntf, KUInt32 address) {
void* objectPtr;
mMemoryIntf->FastReadBuffer(address, sizeof(id), (KUInt8*)&objectPtr);
return (__bridge id)objectPtr;
}

#endif

// =========================================================================== //
// Jakes-MBP:Einstein jake$ fortune //
// -bash: fortune: command not found //
// =========================================================================== //
@@ -0,0 +1 @@
SetPartFrameSlot( 'theTransport, GetLayout("iOSTransport.t"));InstallScript := func(partFrame,removeFrame) begin // We created a reference to our protoTransport object using // SetPartFrameSlot. See the "iOSTransport.t" layout's beforeScript. RegTransport( kAppSymbol, partFrame.theTransport ); end;RemoveScript := func(removeFrame) begin UnRegTransport(kAppSymbol); end;SetPartFrameSlot( 'DeletionScript, func() begin // If the user scrubs out the package, this function will be called. // We do NOT want to do this during debugging because it will be called often. // When you download a new version with NTK, it will delete the old one // and call it's DeletionScript. Note that DeleteTransport removes the preferences // for the transport! Here, you might want to delete your temporary data (in our // case, we might delete our temp soups entirely) if NOT kDebugOn then DeleteTransport(kAppSymbol) end);
@@ -0,0 +1 @@
# NCT project created on Sunday, November 22, 2015 7:02:04 PM # by Newton C++ Tools #NTKCodeModuleLocalFunctionSetFile="ObjCBridge.exp"LocalLinkOptions="-debug"LocalARMCppOptions="-W -gf "# add more lines like those below for other include directories needed by your project source files.-i "{DDK_Includes-dir}"-i "{DDK_Libraries-dir}"-ic "{DDK_Includes-dir}CLibrary"-ic "{DDK_Includes-dir}CommAPI"-ic "{DDK_Includes-dir}Communications"-ic "{DDK_Includes-dir}Frames"-ic "{DDK_Includes-dir}HAL"-ic "{DDK_Includes-dir}OS600"-ic "{DDK_Includes-dir}Packages"-ic "{DDK_Includes-dir}Power"-ic "{DDK_Includes-dir}QD"-ic "{DDK_Includes-dir}Toolbox"-ic "{DDK_Includes-dir}UtilityClasses"-ic "{DDK_Includes-dir}PCMCIA"-i "{NCT_Includes}"-ic "{NCT_Includes}Utilities"-ic "{NCT_Includes}Frames"-srcdirs ':'# add lines here with the names of your source files# ARMCpp will compile files named with the suffix .cp# ARMCpp -ansic will compile files named with the suffix .c# ARMAsm will compile files named with the suffix .aObjCBridge.aObjCBridge.cp"{Objects-dir}ObjCBridge.exp.o""{NCT_Libraries}Newton Public APIs.o"Makefile
@@ -0,0 +1 @@
# This makefile was produced at 2:08:50 PM on Mon, Nov 30, 2015# by (PPC) MakeMake 2.0d48 (3/12/1996) by Rick Holzgrafe, scott douglass, Jeff Holcomb.MAKEFILE = MakefileObjects-dir = :{NCT-ObjectOut}:LIB = {NCT-lib} {NCT-lib-options} {LocalLibOptions} LINK = {NCT-link}LINKOPTS = {NCT-link-options} -rel {LocalLinkOptions} Asm = {NCT-asm} {NCT-asm-options} {LocalAsmOptions}CFront = {NCT-cfront} {NCT-cfront-options} {LocalCFrontOptions}CFrontC = {NCT-cfront-c} {NCT-cfront-c-options} {LocalCfrontCOptions}C = {NCT-ARMc} {NCT-ARMc-options} ARMCPlus = {NCT-ARMCpp} {NCT-ARMCpp-options} {LocalARMCppOptions}Pram = {NCT-pram} {NCT-pram-options} {LocalPRAMOptions} SETFILE = {NCT-setfile-cmd}SETFILEOPTS = -a C LocalFunctionSetFile = ObjCBridge.expLocalLinkOptions = -debugLocalARMCppOptions = -W -gf COUNT = CountCOUNTOPTS = CTAGS = CTagsCTAGSOPTS = -local -updateDELETE = DeleteDELETEOPTS = -iFILES = FilesFILESOPTS = -lLIBOPTS = PRINT = PrintPRINTOPTS = REZ = Rez"{Objects-dir}" Ä :TARGETS = "{Objects-dir}ObjCBridge Module.ntkc"OBJS = "{Objects-dir}ObjCBridge.a.o" "{Objects-dir}ObjCBridge.cp.o"LIBS = "{Objects-dir}ObjCBridge.exp.o" "{NCT_Libraries}Newton Public APIs.o"EXDEPS = MakefileAOptions = -i "{DDK_Includes-dir}" -i "{DDK_Libraries-dir}" -i "{NCT_Includes}"COptions = -i "{DDK_Includes-dir}" -i "{DDK_Libraries-dir}" ¶ -i "{DDK_Includes-dir}CLibrary" -i "{DDK_Includes-dir}CommAPI" ¶ -i "{DDK_Includes-dir}Communications" -i "{DDK_Includes-dir}Frames" ¶ -i "{DDK_Includes-dir}HAL" -i "{DDK_Includes-dir}OS600" ¶ -i "{DDK_Includes-dir}Packages" -i "{DDK_Includes-dir}Power" ¶ -i "{DDK_Includes-dir}QD" -i "{DDK_Includes-dir}Toolbox" ¶ -i "{DDK_Includes-dir}UtilityClasses" -i "{DDK_Includes-dir}PCMCIA" ¶ -i "{NCT_Includes}" -i "{NCT_Includes}Utilities" -i "{NCT_Includes}Frames" ¶ {NCT_DebugSwitch} {LocalCOptions}POptions = -i "{DDK_Includes-dir}" -i "{DDK_Libraries-dir}" -i "{NCT_Includes}"ROptions = -i "{DDK_Includes-dir}" -i "{DDK_Libraries-dir}" -i "{NCT_Includes}" ¶ -a"{Objects-dir}ObjCBridge Module.ntkc" ÄÄ {OBJS} {LIBS} {EXDEPS} {LINK} {LINKOPTS} -o {Targ} {OBJS} {LIBS} Rename -y {Targ} "{Objects-dir}ObjCBridge Module.sym" {NCT-AIFtoNTK} {LocalAIFtoNTKOptions} -via "{LocalFunctionSetFile}" -o {Targ} "{Objects-dir}ObjCBridge Module.sym" Rez "{NCTTools}NCTIcons.r" -i "{RIncludes}" -append -o {Targ} SendAE -e "NTK BILD" -t "Newton Toolkit" || Set Status 0"{Objects-dir}ObjCBridge Module.ntkc" ÄÄ {OBJS} {LIBS} {EXDEPS} {SETFILE} {SETFILEOPTS} {Targ}clean Ä {DELETE} {DELETEOPTS} {OBJS}clobber Ä clean {DELETE} {DELETEOPTS} {TARGETS}files Ä {FILES} {FILESOPTS} {TARGETS} {MAKEFILE} "{NCTTools}NCTBuildMakefile.Post" ¶ {OBJS}print Ä {PRINT} {PRINTOPTS} {MAKEFILE} "{NCTTools}NCTBuildMakefile.Post"tags Ä {CTAGS} {CTAGSOPTS} {NewerDeps} -i "{DDK_Includes-dir}" ¶ -i "{DDK_Libraries-dir}" -i "{DDK_Includes-dir}CLibrary" ¶ -i "{DDK_Includes-dir}CommAPI" -i "{DDK_Includes-dir}Communications" ¶ -i "{DDK_Includes-dir}Frames" -i "{DDK_Includes-dir}HAL" ¶ -i "{DDK_Includes-dir}OS600" -i "{DDK_Includes-dir}Packages" ¶ -i "{DDK_Includes-dir}Power" -i "{DDK_Includes-dir}QD" ¶ -i "{DDK_Includes-dir}Toolbox" -i "{DDK_Includes-dir}UtilityClasses" ¶ -i "{DDK_Includes-dir}PCMCIA" -i "{NCT_Includes}" ¶ -i "{NCT_Includes}Utilities" -i "{NCT_Includes}Frames""{Objects-dir}ObjCBridge.a.o" Ä ¶ ObjCBridge.a"{Objects-dir}ObjCBridge.cp.o" Ä ¶ ObjCBridge.cp "{DDK_Includes-dir}CLibrary:stdio.h" ¶ "{NCT_Includes}Frames:NewtonScript.h" ¶ "{DDK_Includes-dir}Frames:objects.h" ¶ "{DDK_Includes-dir}Frames:ConfigFrames.h" ¶ "{DDK_Includes-dir}ConfigGlobal.h" "{DDK_Includes-dir}Newton.h" ¶ "{DDK_Includes-dir}CLibrary:stdlib.h" ¶ "{DDK_Includes-dir}CLibrary:string.h" ¶ "{DDK_Includes-dir}CLibrary:stddef.h" "{DDK_Includes-dir}NewtonTypes.h" ¶ "{DDK_Includes-dir}NewtonWidgets.h" "{DDK_Includes-dir}NewtonTime.h" ¶ "{DDK_Includes-dir}Toolbox:CompMath.h" ¶ "{DDK_Includes-dir}Toolbox:ConfigToolbox.h" ¶ "{DDK_Includes-dir}NewtonMemory.h" ¶ "{DDK_Includes-dir}NewtonExceptions.h" ¶ "{DDK_Includes-dir}CLibrary:setjmp.h" "{DDK_Includes-dir}NewtonDebug.h" ¶ "{DDK_Includes-dir}OS600:OSErrors.h" "{DDK_Includes-dir}NewtErrors.h" ¶ NSandDDKIncludes.h UserGlobals_m.h ¶ "{DDK_Includes-dir}OS600:KernelTypes.h" ¶ "{DDK_Includes-dir}OS600:ConfigOS600.h" ¶ "{DDK_Includes-dir}OS600:LongTime.h" "{DDK_Includes-dir}NewtConfig.h" ¶ "{DDK_Includes-dir}HammerConfigBits.h" UserTasks_m.h ¶ "{DDK_Includes-dir}OS600:sharedTypes.h" ¶ "{DDK_Includes-dir}OS600:UserObjects.h" ¶ "{DDK_Includes-dir}OS600:UserGlobals.h" ¶ "{DDK_Includes-dir}OS600:UserPorts.h" ¶ "{DDK_Includes-dir}OS600:UserSharedMem.h" Objects_m.h ¶ "{NCT_Includes}NewtonErrors.h"Makefile Ä FilesInBuild Alert "Sorry, you need to re-build your Makefile because the ÒFilesInBuildÓ has been changed.¶nPlease select the ÒBuild Project MakefileÓ menu item." ; Exit 2 .cp.o Ä .cp {ARMCPlus} {depDir}{Default}.cp {COptions} -o {targDir}{Default}.cp.o.c.o Ä .c {C} {depDir}{Default}.c -o {targDir}{Default}.c.o {COptions}.exp.o Ä .exp "{NCTTools}"NCTBuildMain {depDir}{Default}.exp "{{CPlusScratch}}"{Default}.exp.a {Asm} "{{CplusScratch}}"{Default}.exp.a -o {targDir}{Default}.exp.o ; Delete -i "{{CPlusScratch}}"{Default}.exp.a.a.o Ä .a {Asm} {depDir}{Default}.a -o {targDir}{Default}.a.o {AOptions}.pf.part Ä .pf {Pram} {depDir}{Default}.pf -o {targDir}{Default}.pf.part
No changes.
@@ -0,0 +1 @@
// =========== Header ===========// File: NSandDDKIncludes.h// Project: (Library)// Written by: Paul Guyot (pguyot@kallisys.net)//// Created on: 05/01/2001// Internal version: 1//// Copyright: © 2001 by Paul Guyot.// All rights reserved worldwide.// ===========// =========== Change History ===========// 05/01/2001 v1 [PG] Creation of the file// ===========#ifndef __NSANDDDKINCLUDES__#define __NSANDDDKINCLUDES__class TSendSystemEvent; // bug in SystemEvents.h#include "UserGlobals_m.h"#include "UserTasks_m.h"#include "Objects_m.h"#ifndef __NEWTON_H #include <Newton.h>#endif// The NewtonErrors define kNoMemory once again.#undef kNoMemory#include <NewtonErrors.h>#ifndef WITH_LOCKED_BINARYextern Ptr LockedBinaryPtr(RefArg obj);extern void UnlockRefArg(RefArg obj);#define WITH_LOCKED_BINARY(obj, ptr_var) \ unwind_protect { \ void* ptr_var = LockedBinaryPtr(obj);#define END_WITH_LOCKED_BINARY(obj) \ } \ on_unwind { \ UnlockRefArg(obj); \ } \ end_unwind;#endif//____________________________________________________________________// Object Class Functionsextern Ref ClassOf(RefArg obj);extern Boolean IsArray(RefArg ref);extern Boolean IsBinary(RefArg ref);extern Boolean IsFrame(RefArg ref);extern Boolean IsFunction(RefArg ref); extern Boolean IsNumber(RefArg ref);extern Boolean IsReadOnly(RefArg obj);extern Boolean IsReal(RefArg ref);extern Boolean IsString(RefArg ref);extern Boolean IsSymbol(RefArg obj);extern void SetClass(RefArg obj, RefArg theClass);extern Boolean IsMagicPtr(RefArg r); extern Boolean IsRealPtr(RefArg r); #endif // __NSANDDDKINCLUDES__// ======================================== //// Ask not for whom the <CONTROL-G> tolls. //// ======================================== //

0 comments on commit daa4892

Please sign in to comment.
You can’t perform that action at this time.