mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidyups ... non functional.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14961 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1ba5b88acd
commit
dda2ce15f6
13 changed files with 48 additions and 41 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-11-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSObject.m: use NSString implementation of
|
||||
([descriptionWithLocale:indent:to:])
|
||||
|
||||
2002-11-07 02:21 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSString.m: (-makeImmutableCopyOnFail:): Set isa to correct
|
||||
|
|
|
@ -253,11 +253,11 @@ static SEL oatSel;
|
|||
static SEL remSel;
|
||||
|
||||
static IMP infImp;
|
||||
static void (*addImp)();
|
||||
static unsigned (*cntImp)();
|
||||
static void (*insImp)();
|
||||
static void (*addImp)(NSMutableArray*,SEL,id);
|
||||
static unsigned (*cntImp)(NSArray*,SEL);
|
||||
static void (*insImp)(NSMutableArray*,SEL,id,unsigned);
|
||||
static IMP oatImp;
|
||||
static void (*remImp)();
|
||||
static void (*remImp)(NSMutableArray*,SEL,unsigned);
|
||||
|
||||
#define NEWINFO(Z,O,L) ((*infImp)(infCls, infSel, (Z), (O), (L)))
|
||||
#define ADDOBJECT(O) ((*addImp)(_infoArray, addSel, (O)))
|
||||
|
@ -265,7 +265,7 @@ static void (*remImp)();
|
|||
#define OBJECTAT(I) ((*oatImp)(_infoArray, oatSel, (I)))
|
||||
#define REMOVEAT(I) ((*remImp)(_infoArray, remSel, (I)))
|
||||
|
||||
static void _setup()
|
||||
static void _setup(void)
|
||||
{
|
||||
if (infCls == 0)
|
||||
{
|
||||
|
@ -286,11 +286,13 @@ static void _setup()
|
|||
|
||||
a = [NSMutableArray allocWithZone: NSDefaultMallocZone()];
|
||||
a = [a initWithCapacity: 1];
|
||||
addImp = (void (*)())[a methodForSelector: addSel];
|
||||
cntImp = (unsigned (*)())[a methodForSelector: cntSel];
|
||||
insImp = (void (*)())[a methodForSelector: insSel];
|
||||
addImp = (void (*)(NSMutableArray*,SEL,id))[a methodForSelector: addSel];
|
||||
cntImp = (unsigned (*)(NSArray*,SEL))[a methodForSelector: cntSel];
|
||||
insImp = (void (*)(NSMutableArray*,SEL,id,unsigned))
|
||||
[a methodForSelector: insSel];
|
||||
oatImp = [a methodForSelector: oatSel];
|
||||
remImp = (void (*)())[a methodForSelector: remSel];
|
||||
remImp = (void (*)(NSMutableArray*,SEL,unsigned))
|
||||
[a methodForSelector: remSel];
|
||||
RELEASE(a);
|
||||
d = [NSDictionary new];
|
||||
blank = cacheAttributes(d);
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) -Wall \
|
||||
-Wcast-align \
|
||||
#-Wstrict-prototypes \
|
||||
#-Wpointer-arith \
|
||||
#-Wcast-qual \
|
||||
#-Wwrite-strings \
|
||||
#-Wstrict-prototypes \
|
||||
#-Wmissing-prototypes \
|
||||
#-Wmissing-declarations \
|
||||
#-Wredundant-decls \
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
- (id) initWithBytes: (const void*)value objCType: (const char*)type
|
||||
{
|
||||
typedef __typeof__(data) _dt;
|
||||
data = *(_dt*)value;
|
||||
data = *(const _dt*)value;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
@class GSDictionary;
|
||||
@class GSMutableDictionary;
|
||||
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists(void);
|
||||
|
||||
static Class NSArray_class;
|
||||
static Class NSDictionaryClass;
|
||||
static Class NSMutableDictionaryClass;
|
||||
|
@ -738,7 +740,6 @@ compareIt(id o1, id o2, void* context)
|
|||
*/
|
||||
- (BOOL) writeToFile: (NSString *)path atomically: (BOOL)useAuxiliaryFile
|
||||
{
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists();
|
||||
NSDictionary *loc;
|
||||
NSString *desc;
|
||||
|
||||
|
@ -774,7 +775,6 @@ compareIt(id o1, id o2, void* context)
|
|||
*/
|
||||
- (BOOL) writeToURL: (NSURL *)url atomically: (BOOL)useAuxiliaryFile
|
||||
{
|
||||
extern BOOL GSMacOSXCompatiblePropertyLists();
|
||||
NSDictionary *loc;
|
||||
NSString *desc;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ static void
|
|||
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
||||
{
|
||||
BOOL a;
|
||||
extern const char* GSArgZero();
|
||||
extern const char* GSArgZero(void);
|
||||
|
||||
_NSUncaughtExceptionHandler = _preventRecursion;
|
||||
#if 1
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <Foundation/NSScanner.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
|
||||
extern BOOL GSMacOSXCompatibleGeometry(); // Compatibility mode
|
||||
extern BOOL GSMacOSXCompatibleGeometry(void); // Compatibility mode
|
||||
|
||||
static Class NSStringClass = 0;
|
||||
static Class NSScannerClass = 0;
|
||||
|
@ -53,7 +53,7 @@ static BOOL (*scanStringImp)(NSScanner*, SEL, NSString*, NSString**);
|
|||
static id (*scannerImp)(Class, SEL, NSString*);
|
||||
|
||||
static inline void
|
||||
setupCache()
|
||||
setupCache(void)
|
||||
{
|
||||
if (NSStringClass == 0)
|
||||
{
|
||||
|
|
|
@ -392,7 +392,7 @@ static void endNCTable(NCTable *t)
|
|||
TEST_RELEASE(t->_lock);
|
||||
}
|
||||
|
||||
static NCTable *newNCTable()
|
||||
static NCTable *newNCTable(void)
|
||||
{
|
||||
NCTable *t;
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ typedef struct {
|
|||
@end
|
||||
|
||||
static NotificationQueueList*
|
||||
currentList()
|
||||
currentList(void)
|
||||
{
|
||||
NotificationQueueList *list;
|
||||
NSMutableDictionary *d;
|
||||
|
|
|
@ -769,12 +769,12 @@ static BOOL double_release_check_enabled = NO;
|
|||
{
|
||||
if (self == [NSObject class])
|
||||
{
|
||||
extern void GSBuildStrings(); // See externs.m
|
||||
extern const char* GSSetLocaleC(); // See GSLocale.m
|
||||
extern void GSBuildStrings(void); // See externs.m
|
||||
extern const char* GSSetLocaleC(const char*); // See GSLocale.m
|
||||
|
||||
#ifdef __MINGW__
|
||||
// See libgnustep-base-entry.m
|
||||
extern void gnustep_base_socket_init();
|
||||
extern void gnustep_base_socket_init(void);
|
||||
gnustep_base_socket_init();
|
||||
#endif
|
||||
|
||||
|
@ -2018,24 +2018,24 @@ static BOOL double_release_check_enabled = NO;
|
|||
}
|
||||
|
||||
/**
|
||||
* The default (NSObject) implementation of this method simply calls
|
||||
* the -descriptionWithLocale:indent: method and appends
|
||||
* the value returned by that method to the output object.
|
||||
* Uses the [NSString] implementation.
|
||||
*/
|
||||
- (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
NSString *tmp = [(id)self descriptionWithLocale: aLocale];
|
||||
|
||||
[tmp descriptionWithLocale: aLocale indent: level to: output];
|
||||
}
|
||||
|
||||
+ (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
NSString *tmp = [(id)self descriptionWithLocale: aLocale];
|
||||
|
||||
[tmp descriptionWithLocale: aLocale indent: level to: output];
|
||||
}
|
||||
|
||||
- (BOOL) _dealloc
|
||||
|
|
|
@ -615,7 +615,7 @@ int main(int argc, char *argv[], char *env[])
|
|||
[gnustep_global_lock lock];
|
||||
if (host == nil)
|
||||
{
|
||||
extern NSTimeInterval GSTimeNow();
|
||||
extern NSTimeInterval GSTimeNow(void);
|
||||
|
||||
pid = [self processIdentifier];
|
||||
start = (unsigned long)GSTimeNow();
|
||||
|
@ -869,7 +869,7 @@ GSEnvironmentFlag(const char *name, BOOL def)
|
|||
* methods/functions which might cause a recursive exception.
|
||||
*/
|
||||
const char*
|
||||
GSArgZero()
|
||||
GSArgZero(void)
|
||||
{
|
||||
if (_gnu_arg_zero == 0)
|
||||
return "";
|
||||
|
|
|
@ -44,7 +44,7 @@ static BOOL (*scanStringImp)(NSScanner*, SEL, NSString*, NSString**);
|
|||
static id (*scannerImp)(Class, SEL, NSString*);
|
||||
|
||||
static inline void
|
||||
setupCache()
|
||||
setupCache(void)
|
||||
{
|
||||
if (NSStringClass == 0)
|
||||
{
|
||||
|
|
|
@ -112,11 +112,11 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
NSMutableData *data;
|
||||
void (*appImp)(); // Append to data.
|
||||
void* (*datImp)(); // Bytes pointer.
|
||||
unsigned int (*lenImp)(); // Length of data.
|
||||
void (*serImp)(); // Serialize integer.
|
||||
void (*setImp)(); // Set length of data.
|
||||
void (*appImp)(NSData*,SEL,const void*,unsigned);
|
||||
void* (*datImp)(NSMutableData*,SEL); // Bytes pointer.
|
||||
unsigned int (*lenImp)(NSData*,SEL); // Length of data.
|
||||
void (*serImp)(NSMutableData*,SEL,int); // Serialize integer.
|
||||
void (*setImp)(NSMutableData*,SEL,unsigned); // Set length of data.
|
||||
unsigned count; // String counter.
|
||||
GSIMapTable_t map; // For uniquing.
|
||||
BOOL shouldUnique; // Do we do uniquing?
|
||||
|
@ -135,11 +135,11 @@ initSerializerInfo(_NSSerializerInfo* info, NSMutableData *d, BOOL u)
|
|||
|
||||
c = GSObjCClass(d);
|
||||
info->data = d;
|
||||
info->appImp = (void (*)())get_imp(c, appSel);
|
||||
info->datImp = (void* (*)())get_imp(c, datSel);
|
||||
info->lenImp = (unsigned int (*)())get_imp(c, lenSel);
|
||||
info->serImp = (void (*)())get_imp(c, serSel);
|
||||
info->setImp = (void (*)())get_imp(c, setSel);
|
||||
info->appImp = (void (*)(NSData*,SEL,const void*,unsigned))get_imp(c, appSel);
|
||||
info->datImp = (void* (*)(NSMutableData*,SEL))get_imp(c, datSel);
|
||||
info->lenImp = (unsigned int (*)(NSData*,SEL))get_imp(c, lenSel);
|
||||
info->serImp = (void (*)(NSMutableData*,SEL,int))get_imp(c, serSel);
|
||||
info->setImp = (void (*)(NSMutableData*,SEL,unsigned))get_imp(c, setSel);
|
||||
info->shouldUnique = u;
|
||||
(*info->appImp)(d, appSel, &info->shouldUnique, 1);
|
||||
if (u)
|
||||
|
|
Loading…
Reference in a new issue