mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
Most, if not all, of the fixes needed to get qwaq building.
This is pretty much just changing [] to * and moving [N] to the other side of the variable name.
This commit is contained in:
parent
92799650c0
commit
d6b10c99aa
16 changed files with 80 additions and 80 deletions
|
@ -23,7 +23,7 @@
|
||||||
unsigned count; ///< The number of objects currently contained
|
unsigned count; ///< The number of objects currently contained
|
||||||
unsigned capacity; ///< The number of objects that can be held right now
|
unsigned capacity; ///< The number of objects that can be held right now
|
||||||
unsigned granularity; ///< The number of pointers allocated at a time (based on initial capacity)
|
unsigned granularity; ///< The number of pointers allocated at a time (based on initial capacity)
|
||||||
id [] _objs; ///< A primitive array of pointers to objects
|
id *_objs; ///< A primitive array of pointers to objects
|
||||||
}
|
}
|
||||||
|
|
||||||
///\name Creating arrays
|
///\name Creating arrays
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
/**
|
/**
|
||||||
Returns a copy of \a array, retaining its contents.
|
Returns a copy of \a array, retaining its contents.
|
||||||
*/
|
*/
|
||||||
+ (id) arrayWithArray: (Array [])array;
|
+ (id) arrayWithArray: (Array *)array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Create an array containing only \a anObject .
|
Create an array containing only \a anObject .
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
\warning Do not supply a primitive array containing fewer than \a count
|
\warning Do not supply a primitive array containing fewer than \a count
|
||||||
objects.
|
objects.
|
||||||
*/
|
*/
|
||||||
+ (id) arrayWithObjects: (id [])objs
|
+ (id) arrayWithObjects: (id *)objs
|
||||||
count: (unsigned)cnt;
|
count: (unsigned)cnt;
|
||||||
//\}
|
//\}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
/**
|
/**
|
||||||
Initialize the receiver with objects from \a array.
|
Initialize the receiver with objects from \a array.
|
||||||
*/
|
*/
|
||||||
- (id) initWithArray: (Array [])array;
|
- (id) initWithArray: (Array *)array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initialize the receiver with objects from \a array.
|
Initialize the receiver with objects from \a array.
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
\param array The array to duplicate
|
\param array The array to duplicate
|
||||||
\param flag if #YES, copies the contents instead of retaining them.
|
\param flag if #YES, copies the contents instead of retaining them.
|
||||||
*/
|
*/
|
||||||
- (id) initWithArray: (Array [])array
|
- (id) initWithArray: (Array *)array
|
||||||
copyItems: (BOOL)flag;
|
copyItems: (BOOL)flag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
/**
|
/**
|
||||||
Initialize the receiver with a primitive array of objects.
|
Initialize the receiver with a primitive array of objects.
|
||||||
*/
|
*/
|
||||||
- (id) initWithObjects: (id [])objs
|
- (id) initWithObjects: (id *)objs
|
||||||
count: (unsigned)count;
|
count: (unsigned)count;
|
||||||
//\}
|
//\}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
|
|
||||||
\warning The destination buffer must be large enough to hold all contents.
|
\warning The destination buffer must be large enough to hold all contents.
|
||||||
*/
|
*/
|
||||||
- (BOOL) getObjects: (id [])aBuffer
|
- (BOOL) getObjects: (id *)aBuffer
|
||||||
range: (Range)aRange;
|
range: (Range)aRange;
|
||||||
#endif
|
#endif
|
||||||
//\}
|
//\}
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
/**
|
/**
|
||||||
Adds each object in \a array to the receiver, retaining it.
|
Adds each object in \a array to the receiver, retaining it.
|
||||||
*/
|
*/
|
||||||
- (void) addObjectsFromArray: (Array [])array;
|
- (void) addObjectsFromArray: (Array *)array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds a single object to an array
|
Adds a single object to an array
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
|
|
||||||
\note If \a array and self are the same object, this method has no effect.
|
\note If \a array and self are the same object, this method has no effect.
|
||||||
*/
|
*/
|
||||||
- (void) setArray: (Array [])array;
|
- (void) setArray: (Array *)array;
|
||||||
//\}
|
//\}
|
||||||
|
|
||||||
///\name Removing Objects
|
///\name Removing Objects
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
Finds and removes all objects from the receiver that are equal to any
|
Finds and removes all objects from the receiver that are equal to any
|
||||||
objects in array \a anArray.
|
objects in array \a anArray.
|
||||||
*/
|
*/
|
||||||
- (void) removeObjectsInArray: (Array [])anArray;
|
- (void) removeObjectsInArray: (Array *)anArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Finds and removes all objects from the receiver that are \b exactly equal
|
Finds and removes all objects from the receiver that are \b exactly equal
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
@interface AutoreleasePool: Object
|
@interface AutoreleasePool: Object
|
||||||
{
|
{
|
||||||
Array[] array; ///< a list of objects awaiting release
|
Array *array; ///< a list of objects awaiting release
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
withObject: (id)anObject
|
withObject: (id)anObject
|
||||||
withObject: (id)anotherObject;
|
withObject: (id)anotherObject;
|
||||||
- (BOOL) respondsToSelector: (SEL)aSelector;
|
- (BOOL) respondsToSelector: (SEL)aSelector;
|
||||||
- (BOOL) conformsToProtocol: (Protocol [])aProtocol;
|
- (BOOL) conformsToProtocol: (Protocol *)aProtocol;
|
||||||
|
|
||||||
- (id) retain;
|
- (id) retain;
|
||||||
- (id) autorelease;
|
- (id) autorelease;
|
||||||
|
|
|
@ -12,14 +12,14 @@ struct obj_method_description {
|
||||||
{
|
{
|
||||||
@private
|
@private
|
||||||
string protocol_name;
|
string protocol_name;
|
||||||
struct obj_protocol_list [] protocol_list;
|
struct obj_protocol_list *protocol_list;
|
||||||
struct obj_method_description_list [] instance_methods, class_methods;
|
struct obj_method_description_list *instance_methods, *class_methods;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (string) name;
|
- (string) name;
|
||||||
- (BOOL) conformsTo: (Protocol [])aProtocolObject;
|
- (BOOL) conformsTo: (Protocol *)aProtocolObject;
|
||||||
- (struct obj_method_description []) descriptionForInstanceMethod: (SEL)aSel;
|
- (struct obj_method_description *) descriptionForInstanceMethod: (SEL)aSel;
|
||||||
- (struct obj_method_description []) descriptionForClassMethod: (SEL)aSel;
|
- (struct obj_method_description *) descriptionForClassMethod: (SEL)aSel;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif//__ruamoko_Protocol_h
|
#endif//__ruamoko_Protocol_h
|
||||||
|
|
|
@ -25,7 +25,7 @@ typedef enum {QFDictionary, QFArray, QFBinary, QFString} pltype_t; // possible t
|
||||||
@extern plitem_t PL_RemoveObjectAtIndex (plitem_t array_item, integer index);
|
@extern plitem_t PL_RemoveObjectAtIndex (plitem_t array_item, integer index);
|
||||||
@extern plitem_t PL_NewDictionary ();
|
@extern plitem_t PL_NewDictionary ();
|
||||||
@extern plitem_t PL_NewArray ();
|
@extern plitem_t PL_NewArray ();
|
||||||
@extern plitem_t PL_NewData (void []data, integer len);
|
@extern plitem_t PL_NewData (void *data, integer len);
|
||||||
@extern plitem_t PL_NewString (string str);
|
@extern plitem_t PL_NewString (string str);
|
||||||
@extern void PL_Free (plitem_t pl);
|
@extern void PL_Free (plitem_t pl);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define __ruamoko_qfile_h
|
#define __ruamoko_qfile_h
|
||||||
|
|
||||||
struct _qfile_t {};
|
struct _qfile_t {};
|
||||||
typedef struct _qfile_t [] QFile;
|
typedef struct _qfile_t *QFile;
|
||||||
|
|
||||||
@extern integer Qrename (string old, string new);
|
@extern integer Qrename (string old, string new);
|
||||||
@extern integer Qremove (string path);
|
@extern integer Qremove (string path);
|
||||||
|
@ -10,10 +10,10 @@ typedef struct _qfile_t [] QFile;
|
||||||
@extern void Qclose (QFile file);
|
@extern void Qclose (QFile file);
|
||||||
@extern string Qgetline (QFile file);
|
@extern string Qgetline (QFile file);
|
||||||
@extern string Qreadstring (QFile file, integer len);
|
@extern string Qreadstring (QFile file, integer len);
|
||||||
@extern integer Qread (QFile file, void [] buf, integer count);
|
@extern integer Qread (QFile file, void *buf, integer count);
|
||||||
@extern integer Qwrite (QFile file, void [] buf, integer count);
|
@extern integer Qwrite (QFile file, void *buf, integer count);
|
||||||
@extern integer Qputs (QFile file, string str);
|
@extern integer Qputs (QFile file, string str);
|
||||||
//@extern integer Qgets (QFile file, void [] buf, integer count);
|
//@extern integer Qgets (QFile file, void *buf, integer count);
|
||||||
@extern integer Qgetc (QFile file);
|
@extern integer Qgetc (QFile file);
|
||||||
@extern integer Qputc (QFile file, integer c);
|
@extern integer Qputc (QFile file, integer c);
|
||||||
@extern integer Qseek (QFile file, integer offset, integer whence);
|
@extern integer Qseek (QFile file, integer offset, integer whence);
|
||||||
|
|
|
@ -24,17 +24,17 @@ typedef enum {
|
||||||
@extern IMP obj_msg_lookup (id receiver, SEL op);
|
@extern IMP obj_msg_lookup (id receiver, SEL op);
|
||||||
@extern IMP obj_msg_lookup_super (Super class, SEL op);
|
@extern IMP obj_msg_lookup_super (Super class, SEL op);
|
||||||
@extern @param obj_msg_sendv (id receiver, SEL op, @va_list args);
|
@extern @param obj_msg_sendv (id receiver, SEL op, @va_list args);
|
||||||
@extern (void []) obj_malloc (integer size);
|
@extern void *obj_malloc (integer size);
|
||||||
@extern (void []) obj_atomic_malloc (integer size);
|
@extern void *obj_atomic_malloc (integer size);
|
||||||
@extern (void []) obj_valloc (integer size);
|
@extern void *obj_valloc (integer size);
|
||||||
@extern (void []) obj_realloc (void [] mem, integer size);
|
@extern void *obj_realloc (void *mem, integer size);
|
||||||
@extern (void []) obj_calloc (integer nelem, integer size);
|
@extern void *obj_calloc (integer nelem, integer size);
|
||||||
@extern void obj_free (void [] mem);
|
@extern void obj_free (void *mem);
|
||||||
//(void []) obj_get_uninstalled_dtable (void);
|
//(void *) obj_get_uninstalled_dtable (void);
|
||||||
|
|
||||||
@extern Class obj_get_class (string name);
|
@extern Class obj_get_class (string name);
|
||||||
@extern Class obj_lookup_class (string name);
|
@extern Class obj_lookup_class (string name);
|
||||||
//Class obj_next_class (void [][] enum_stage);
|
//Class obj_next_class (void **enum_stage);
|
||||||
|
|
||||||
@extern string sel_get_name (SEL selector);
|
@extern string sel_get_name (SEL selector);
|
||||||
@extern string sel_get_type (SEL selector);
|
@extern string sel_get_type (SEL selector);
|
||||||
|
@ -46,8 +46,8 @@ typedef enum {
|
||||||
//@extern SEL sel_register_typed_name (string name, string type);
|
//@extern SEL sel_register_typed_name (string name, string type);
|
||||||
@extern BOOL sel_is_mapped (SEL aSel);
|
@extern BOOL sel_is_mapped (SEL aSel);
|
||||||
|
|
||||||
@extern Method []class_get_class_method (Class class, SEL aSel);
|
@extern Method *class_get_class_method (Class class, SEL aSel);
|
||||||
@extern Method []class_get_instance_method (Class class, SEL aSel);
|
@extern Method *class_get_instance_method (Class class, SEL aSel);
|
||||||
@extern Class class_pose_as (Class imposter, Class superclass);
|
@extern Class class_pose_as (Class imposter, Class superclass);
|
||||||
@extern id class_create_instance (Class class);
|
@extern id class_create_instance (Class class);
|
||||||
@extern string class_get_class_name (Class class);
|
@extern string class_get_class_name (Class class);
|
||||||
|
@ -58,10 +58,10 @@ typedef enum {
|
||||||
@extern BOOL class_is_class (Class class);
|
@extern BOOL class_is_class (Class class);
|
||||||
@extern BOOL class_is_meta_class (Class class);
|
@extern BOOL class_is_meta_class (Class class);
|
||||||
@extern void class_set_version (Class class, integer version);
|
@extern void class_set_version (Class class, integer version);
|
||||||
@extern (void []) class_get_gc_object_type (Class class);
|
@extern void *class_get_gc_object_type (Class class);
|
||||||
@extern void class_ivar_set_gcinvisible (Class class, string ivarname, BOOL gcInvisible);
|
@extern void class_ivar_set_gcinvisible (Class class, string ivarname, BOOL gcInvisible);
|
||||||
|
|
||||||
@extern IMP method_get_imp (Method []method);
|
@extern IMP method_get_imp (Method *method);
|
||||||
@extern IMP get_imp (Class class, SEL sel);
|
@extern IMP get_imp (Class class, SEL sel);
|
||||||
|
|
||||||
@extern id object_copy (id object);
|
@extern id object_copy (id object);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __ruamoko_script_h
|
#ifndef __ruamoko_script_h
|
||||||
#define __ruamoko_script_h
|
#define __ruamoko_script_h
|
||||||
|
|
||||||
typedef struct rua_script [] script_t;
|
typedef struct rua_script *script_t;
|
||||||
|
|
||||||
@extern script_t Script_New (void);
|
@extern script_t Script_New (void);
|
||||||
@extern void Script_Delete (script_t script);
|
@extern void Script_Delete (script_t script);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{
|
{
|
||||||
if (count == capacity) {
|
if (count == capacity) {
|
||||||
capacity += granularity;
|
capacity += granularity;
|
||||||
_objs = (id [])obj_realloc (_objs, capacity * @sizeof (id));
|
_objs = (id *)obj_realloc (_objs, capacity * @sizeof (id));
|
||||||
}
|
}
|
||||||
_objs[count++] = anObject;
|
_objs[count++] = anObject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
return [[[self alloc] initWithCapacity: cap] autorelease];
|
return [[[self alloc] initWithCapacity: cap] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) arrayWithArray: (Array [])array
|
+ (id) arrayWithArray: (Array *)array
|
||||||
{
|
{
|
||||||
return [[array copy] autorelease];
|
return [[array copy] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) arrayWithObject: (id)anObject
|
+ (id) arrayWithObject: (id)anObject
|
||||||
{
|
{
|
||||||
Array [] newArray = (Array [])[self arrayWithCapacity: STANDARD_CAPACITY];
|
Array *newArray = (Array *)[self arrayWithCapacity: STANDARD_CAPACITY];
|
||||||
|
|
||||||
[newArray addObject: anObject];
|
[newArray addObject: anObject];
|
||||||
return newArray;
|
return newArray;
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
return [newArray autorelease];
|
return [newArray autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) arrayWithObjects: (id []) objs count: (unsigned)cnt
|
+ (id) arrayWithObjects: (id *) objs count: (unsigned)cnt
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
id newArray = [self array];
|
id newArray = [self array];
|
||||||
|
@ -82,11 +82,11 @@
|
||||||
if (granularity > ARRAY_MAX_GRANULARITY)
|
if (granularity > ARRAY_MAX_GRANULARITY)
|
||||||
granularity = ARRAY_MAX_GRANULARITY;
|
granularity = ARRAY_MAX_GRANULARITY;
|
||||||
|
|
||||||
_objs = (id []) obj_malloc (capacity * @sizeof (id));
|
_objs = (id *) obj_malloc (capacity * @sizeof (id));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithArray: (Array [])array
|
- (id) initWithArray: (Array *)array
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
local unsigned i;
|
local unsigned i;
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithArray: (Array [])array
|
- (id) initWithArray: (Array *)array
|
||||||
copyItems: (BOOL)copy
|
copyItems: (BOOL)copy
|
||||||
{
|
{
|
||||||
local unsigned i;
|
local unsigned i;
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithObjects: (id []) objs count: (unsigned)cnt
|
- (id) initWithObjects: (id *) objs count: (unsigned)cnt
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
|
|
||||||
|
@ -235,13 +235,13 @@
|
||||||
{
|
{
|
||||||
if (count == capacity) {
|
if (count == capacity) {
|
||||||
capacity += granularity;
|
capacity += granularity;
|
||||||
_objs = (id [])obj_realloc (_objs, capacity * @sizeof (id));
|
_objs = (id *)obj_realloc (_objs, capacity * @sizeof (id));
|
||||||
}
|
}
|
||||||
_objs[count] = [anObject retain];
|
_objs[count] = [anObject retain];
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addObjectsFromArray: (Array [])array
|
- (void) addObjectsFromArray: (Array *)array
|
||||||
{
|
{
|
||||||
local unsigned i;
|
local unsigned i;
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@
|
||||||
[self error: "-insertObject:atIndex: index out of range"];
|
[self error: "-insertObject:atIndex: index out of range"];
|
||||||
|
|
||||||
if (count == capacity) { // at capacity, expand
|
if (count == capacity) { // at capacity, expand
|
||||||
_objs = (id [])obj_realloc (_objs, capacity * @sizeof (id));
|
_objs = (id *)obj_realloc (_objs, capacity * @sizeof (id));
|
||||||
capacity += granularity;
|
capacity += granularity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@
|
||||||
[tmp release];
|
[tmp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setArray: (Array [])array
|
- (void) setArray: (Array *)array
|
||||||
{
|
{
|
||||||
if (self == array)
|
if (self == array)
|
||||||
return;
|
return;
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
} while (i);
|
} while (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) removeObjectsInArray: (Array [])array
|
- (void) removeObjectsInArray: (Array *)array
|
||||||
{
|
{
|
||||||
local unsigned i = [array count];
|
local unsigned i = [array count];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "Array.h"
|
#include "Array.h"
|
||||||
#include "Array+Private.h"
|
#include "Array+Private.h"
|
||||||
|
|
||||||
@static Array[] poolStack;
|
@static Array *poolStack;
|
||||||
|
|
||||||
@implementation AutoreleasePool
|
@implementation AutoreleasePool
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "AutoreleasePool.h"
|
#include "AutoreleasePool.h"
|
||||||
|
|
||||||
void (obj_module_t [] msg) __obj_exec_class = #0;
|
void (obj_module_t *msg) __obj_exec_class = #0;
|
||||||
void (id object, integer code, string fmt, ...) obj_error = #0;
|
void (id object, integer code, string fmt, ...) obj_error = #0;
|
||||||
void (id object, integer code, string fmt, @va_list args) obj_verror = #0;
|
void (id object, integer code, string fmt, @va_list args) obj_verror = #0;
|
||||||
//obj_error_handler (objc_error_handler func) obj_set_error_handler = #0;
|
//obj_error_handler (objc_error_handler func) obj_set_error_handler = #0;
|
||||||
IMP (id receiver, SEL op) obj_msg_lookup = #0;
|
IMP (id receiver, SEL op) obj_msg_lookup = #0;
|
||||||
IMP (Super class, SEL op) obj_msg_lookup_super = #0;
|
IMP (Super class, SEL op) obj_msg_lookup_super = #0;
|
||||||
id (id receiver, SEL op, ...) obj_msgSend = #0;
|
id (id receiver, SEL op, ...) obj_msgSend = #0;
|
||||||
id (Super[] class, SEL op, ...) obj_msgSend_super = #0;
|
id (Super*class, SEL op, ...) obj_msgSend_super = #0;
|
||||||
@param (id receiver, SEL op, @va_list args) obj_msg_sendv = #0;
|
@param (id receiver, SEL op, @va_list args) obj_msg_sendv = #0;
|
||||||
(void []) (integer size) obj_malloc = #0;
|
void *obj_malloc (integer size) = #0;
|
||||||
(void []) (integer size) obj_atomic_malloc = #0;
|
void *obj_atomic_malloc (integer size) = #0;
|
||||||
(void []) (integer size) obj_valloc = #0;
|
void *obj_valloc (integer size) = #0;
|
||||||
(void []) (void [] mem, integer size) obj_realloc = #0;
|
void *obj_realloc (void *mem, integer size) = #0;
|
||||||
(void []) (integer nelem, integer size) obj_calloc = #0;
|
void *obj_calloc (integer nelem, integer size) = #0;
|
||||||
void (void [] mem) obj_free = #0;
|
void (void *mem) obj_free = #0;
|
||||||
//(void []) (void) obj_get_uninstalled_dtable = #0;
|
//(void *) (void) obj_get_uninstalled_dtable = #0;
|
||||||
|
|
||||||
Class (string name) obj_get_class = #0;
|
Class (string name) obj_get_class = #0;
|
||||||
Class (string name) obj_lookup_class = #0;
|
Class (string name) obj_lookup_class = #0;
|
||||||
//Class (void [][] enum_stage) obj_next_class = #0;
|
//Class (void **enum_stage) obj_next_class = #0;
|
||||||
|
|
||||||
string (SEL selector) sel_get_name = #0;
|
string (SEL selector) sel_get_name = #0;
|
||||||
string (SEL selector) sel_get_type = #0;
|
string (SEL selector) sel_get_type = #0;
|
||||||
|
@ -32,8 +32,8 @@ SEL (string name) sel_register_name = #0;
|
||||||
//SEL (string name, string type) sel_register_typed_name = #0;
|
//SEL (string name, string type) sel_register_typed_name = #0;
|
||||||
BOOL (SEL aSel) sel_is_mapped = #0;
|
BOOL (SEL aSel) sel_is_mapped = #0;
|
||||||
|
|
||||||
Method [](Class class, SEL aSel) class_get_class_method = #0;
|
Method *class_get_class_method (Class class, SEL aSel) = #0;
|
||||||
Method [](Class class, SEL aSel) class_get_instance_method = #0;
|
Method *class_get_instance_method (Class class, SEL aSel) = #0;
|
||||||
Class (Class imposter, Class superclass) class_pose_as = #0;
|
Class (Class imposter, Class superclass) class_pose_as = #0;
|
||||||
id (Class class) class_create_instance = #0;
|
id (Class class) class_create_instance = #0;
|
||||||
string (Class class) class_get_class_name = #0;
|
string (Class class) class_get_class_name = #0;
|
||||||
|
@ -44,10 +44,10 @@ integer (Class class) class_get_version = #0;
|
||||||
BOOL (Class class) class_is_class = #0;
|
BOOL (Class class) class_is_class = #0;
|
||||||
BOOL (Class class) class_is_meta_class = #0;
|
BOOL (Class class) class_is_meta_class = #0;
|
||||||
void (Class class, integer version) class_set_version = #0;
|
void (Class class, integer version) class_set_version = #0;
|
||||||
(void []) (Class class) class_get_gc_object_type = #0;
|
void *class_get_gc_object_type (Class class) = #0;
|
||||||
void (Class class, string ivarname, BOOL gcInvisible) class_ivar_set_gcinvisible = #0;
|
void (Class class, string ivarname, BOOL gcInvisible) class_ivar_set_gcinvisible = #0;
|
||||||
|
|
||||||
IMP (Method []method) method_get_imp = #0;
|
IMP (Method *method) method_get_imp = #0;
|
||||||
IMP (Class class, SEL sel) get_imp = #0;
|
IMP (Class class, SEL sel) get_imp = #0;
|
||||||
|
|
||||||
id (id object) object_copy = #0;
|
id (id object) object_copy = #0;
|
||||||
|
@ -206,7 +206,7 @@ BOOL (id object) object_is_meta_class = #0;
|
||||||
return (class_get_instance_method ([self class], aSelector) != nil);
|
return (class_get_instance_method ([self class], aSelector) != nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) conformsToProtocol: (Protocol [])aProtocol
|
- (BOOL) conformsToProtocol: (Protocol *)aProtocol
|
||||||
{
|
{
|
||||||
return [[self class] conformsToProtocol: aProtocol];
|
return [[self class] conformsToProtocol: aProtocol];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#include "Protocol.h"
|
#include "Protocol.h"
|
||||||
|
|
||||||
struct obj_protocol_list {
|
struct obj_protocol_list {
|
||||||
struct obj_protocol_list [] next;
|
struct obj_protocol_list *next;
|
||||||
integer count;
|
integer count;
|
||||||
Protocol[] [1] list;
|
Protocol *list[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct obj_method_description_list {
|
struct obj_method_description_list {
|
||||||
integer count;
|
integer count;
|
||||||
struct obj_method_description [1] list;
|
struct obj_method_description list[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
@implementation Protocol
|
@implementation Protocol
|
||||||
|
@ -17,10 +17,10 @@ struct obj_method_description_list {
|
||||||
return protocol_name;
|
return protocol_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) conformsTo: (Protocol [])aProtocolObject
|
- (BOOL) conformsTo: (Protocol *)aProtocolObject
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
local struct obj_protocol_list [] proto_list;
|
local struct obj_protocol_list *proto_list;
|
||||||
|
|
||||||
if (aProtocolObject.protocol_name == protocol_name)
|
if (aProtocolObject.protocol_name == protocol_name)
|
||||||
return YES;
|
return YES;
|
||||||
|
@ -35,12 +35,12 @@ struct obj_method_description_list {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (struct obj_method_description []) descriptionForInstanceMethod: (SEL)aSel
|
- (struct obj_method_description *) descriptionForInstanceMethod: (SEL)aSel
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
local struct obj_protocol_list [] proto_list;
|
local struct obj_protocol_list *proto_list;
|
||||||
local string name = sel_get_name (aSel);
|
local string name = sel_get_name (aSel);
|
||||||
local struct obj_method_description [] result;
|
local struct obj_method_description *result;
|
||||||
|
|
||||||
for (i = 0; i < instance_methods.count; i++) {
|
for (i = 0; i < instance_methods.count; i++) {
|
||||||
if (instance_methods.list[i].name == name)
|
if (instance_methods.list[i].name == name)
|
||||||
|
@ -58,12 +58,12 @@ struct obj_method_description_list {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (struct obj_method_description []) descriptionForClassMethod: (SEL)aSel
|
- (struct obj_method_description *) descriptionForClassMethod: (SEL)aSel
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
local struct obj_protocol_list [] proto_list;
|
local struct obj_protocol_list *proto_list;
|
||||||
local string name = sel_get_name (aSel);
|
local string name = sel_get_name (aSel);
|
||||||
local struct obj_method_description [] result;
|
local struct obj_method_description *result;
|
||||||
|
|
||||||
for (i = 0; i < class_methods.count; i++) {
|
for (i = 0; i < class_methods.count; i++) {
|
||||||
if (class_methods.list[i].name == name)
|
if (class_methods.list[i].name == name)
|
||||||
|
|
|
@ -17,6 +17,6 @@ integer PL_A_InsertObjectAtIndex (plitem_t array_item, plitem_t item, integer in
|
||||||
plitem_t PL_RemoveObjectAtIndex (plitem_t array_item, integer index) = #0;
|
plitem_t PL_RemoveObjectAtIndex (plitem_t array_item, integer index) = #0;
|
||||||
plitem_t PL_NewDictionary (void) = #0;
|
plitem_t PL_NewDictionary (void) = #0;
|
||||||
plitem_t PL_NewArray (void) = #0;
|
plitem_t PL_NewArray (void) = #0;
|
||||||
plitem_t PL_NewData (void []data, integer len) = #0;
|
plitem_t PL_NewData (void *data, integer len) = #0;
|
||||||
plitem_t PL_NewString (string str) = #0;
|
plitem_t PL_NewString (string str) = #0;
|
||||||
void PL_Free (plitem_t pl) = #0;
|
void PL_Free (plitem_t pl) = #0;
|
||||||
|
|
|
@ -6,10 +6,10 @@ QFile (string path, string mode) Qopen = #0;
|
||||||
void (QFile file) Qclose = #0;
|
void (QFile file) Qclose = #0;
|
||||||
string (QFile file) Qgetline = #0;
|
string (QFile file) Qgetline = #0;
|
||||||
string (QFile file, integer length) Qreadstring = #0;
|
string (QFile file, integer length) Qreadstring = #0;
|
||||||
integer (QFile file, void [] buf, integer count) Qread = #0;
|
integer (QFile file, void *buf, integer count) Qread = #0;
|
||||||
integer (QFile file, void [] buf, integer count) Qwrite = #0;
|
integer (QFile file, void *buf, integer count) Qwrite = #0;
|
||||||
integer (QFile file, string str) Qputs = #0;
|
integer (QFile file, string str) Qputs = #0;
|
||||||
//integer (QFile file, void [] buf, integer count) Qgets = #0;
|
//integer (QFile file, void *buf, integer count) Qgets = #0;
|
||||||
integer (QFile file) Qgetc = #0;
|
integer (QFile file) Qgetc = #0;
|
||||||
integer (QFile file, integer c) Qputc = #0;
|
integer (QFile file, integer c) Qputc = #0;
|
||||||
integer (QFile file, integer offset, integer whence) Qseek = #0;
|
integer (QFile file, integer offset, integer whence) Qseek = #0;
|
||||||
|
|
|
@ -3,7 +3,7 @@ integer () errno = #0;
|
||||||
string (integer err) strerror = #0;
|
string (integer err) strerror = #0;
|
||||||
integer (...) open = #0; // string path, float flags[, float mode]
|
integer (...) open = #0; // string path, float flags[, float mode]
|
||||||
integer (integer handle) close = #0;
|
integer (integer handle) close = #0;
|
||||||
string (integer handle, integer count, integer []result) read = #0;
|
string (integer handle, integer count, integer *result) read = #0;
|
||||||
integer (integer handle, string buffer, integer count) write = #0;
|
integer (integer handle, string buffer, integer count) write = #0;
|
||||||
integer (integer handle, integer pos, integer whence) seek = #0;
|
integer (integer handle, integer pos, integer whence) seek = #0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue