~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Source/externs.m

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/** All of the external data
2
2
   Copyright (C) 1997 Free Software Foundation, Inc.
3
 
   
 
3
 
4
4
   Written by:  Scott Christley <scottc@net-community.com>
5
5
   Date: August 1997
6
 
   
 
6
 
7
7
   This file is part of the GNUstep Base Library.
8
8
 
9
9
   This library is free software; you can redistribute it and/or
10
10
   modify it under the terms of the GNU Library General Public
11
11
   License as published by the Free Software Foundation; either
12
12
   version 2 of the License, or (at your option) any later version.
13
 
   
 
13
 
14
14
   This library is distributed in the hope that it will be useful,
15
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
17
   Library General Public License for more details.
18
 
   
 
18
 
19
19
   You should have received a copy of the GNU Library General Public
20
20
   License along with this library; if not, write to the Free
21
21
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
22
 
   */ 
23
 
 
24
 
#include <config.h>
25
 
#include <Foundation/NSString.h>
26
 
 
27
 
 
28
 
#include <Foundation/NSArray.h>
29
 
#include <Foundation/NSException.h>
30
 
#include <Foundation/NSMapTable.h>
31
 
#include "NSCallBacks.h"
32
 
#include <Foundation/NSHashTable.h>
 
22
   */
 
23
 
 
24
#include "config.h"
 
25
#include "Foundation/NSString.h"
 
26
 
 
27
 
 
28
#include "Foundation/NSArray.h"
 
29
#include "Foundation/NSException.h"
 
30
 
 
31
#include "GSPrivate.h"
 
32
 
 
33
/*
 
34
 PENDING some string constants are scattered about in the class impl
 
35
         files and should be moved here
 
36
         furthermore, the test for this in Testing/exported-strings.m
 
37
         needs to be updated
 
38
*/
 
39
 
33
40
 
34
41
/* Global lock to be used by classes when operating on any global
35
42
   data that invoke other methods which also access global; thus,
38
45
NSRecursiveLock *gnustep_global_lock = nil;
39
46
 
40
47
/*
41
 
 * Connection Notification Strings.
42
 
 */
43
 
NSString *NSConnectionDidDieNotification;
44
 
 
45
 
NSString *NSConnectionDidInitializeNotification;
46
 
 
 
48
 * NSConnection Notification Strings.
 
49
 */
 
50
NSString *NSConnectionDidDieNotification = @"NSConnectionDidDieNotification";
 
51
 
 
52
NSString *NSConnectionDidInitializeNotification = @"NSConnectionDidInitializeNotification";
 
53
 
 
54
 
 
55
/*
 
56
 * NSDistributedNotificationCenter types.
 
57
 */
 
58
NSString *NSLocalNotificationCenterType = @"NSLocalNotificationCenterType";
 
59
NSString *GSNetworkNotificationCenterType = @"GSNetworkNotificationCenterType";
47
60
 
48
61
/*
49
62
 * NSThread Notifications
50
63
 */
51
 
NSString *NSWillBecomeMultiThreadedNotification;
52
 
 
53
 
NSString *NSThreadDidStartNotification;
54
 
 
55
 
NSString *NSThreadWillExitNotification;
 
64
NSString *NSWillBecomeMultiThreadedNotification = @"NSWillBecomeMultiThreadedNotification";
 
65
 
 
66
NSString *NSThreadDidStartNotification = @"NSThreadDidStartNotification";
 
67
 
 
68
NSString *NSThreadWillExitNotification = @"NSThreadWillExitNotification";
56
69
 
57
70
 
58
71
/*
59
72
 * Port Notifications
60
73
 */
61
 
NSString *PortBecameInvalidNotification;
62
 
 
63
 
NSString *InPortClientBecameInvalidNotification;
64
 
 
65
 
NSString *InPortAcceptedClientNotification;
66
 
 
67
 
 
68
 
NSString *NSPortDidBecomeInvalidNotification;
69
 
 
70
 
 
 
74
NSString *PortBecameInvalidNotification = @"PortBecameInvalidNotification";
 
75
 
 
76
NSString *InPortClientBecameInvalidNotification = @"InPortClientBecameInvalidNotification";
 
77
 
 
78
NSString *InPortAcceptedClientNotification = @"InPortAcceptedClientNotification";
 
79
 
 
80
NSString *NSPortDidBecomeInvalidNotification = @"NSPortDidBecomeInvalidNotification";
 
81
 
 
82
/* NSTask notifications */
 
83
NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification";
 
84
 
 
85
/* NSUndoManager notifications */
 
86
NSString *NSUndoManagerCheckpointNotification = @"NSUndoManagerCheckpointNotification";
 
87
 
 
88
NSString *NSUndoManagerDidOpenUndoGroupNotification = @"NSUndoManagerDidOpenUndoGroupNotification";
 
89
 
 
90
NSString *NSUndoManagerDidRedoChangeNotification = @"NSUndoManagerDidRedoChangeNotification";
 
91
 
 
92
NSString *NSUndoManagerDidUndoChangeNotification = @"NSUndoManagerDidUndoChangeNotification";
 
93
 
 
94
NSString *NSUndoManagerWillCloseUndoGroupNotification = @"NSUndoManagerWillCloseUndoGroupNotification";
 
95
 
 
96
NSString *NSUndoManagerWillRedoChangeNotification = @"NSUndoManagerWillRedoChangeNotification";
 
97
 
 
98
NSString *NSUndoManagerWillUndoChangeNotification = @"NSUndoManagerWillUndoChangeNotification";
 
99
 
 
100
 
 
101
/* NSURL constants */
 
102
NSString *NSURLFileScheme = @"file";
71
103
 
72
104
/* RunLoop modes */
73
 
NSString *NSDefaultRunLoopMode;
74
 
 
75
 
NSString *NSConnectionReplyMode;
76
 
 
77
 
 
78
 
 
79
 
/* Exceptions */
80
 
NSString * const NSCharacterConversionException;
81
 
 
82
 
NSString * const NSFailedAuthenticationException;
83
 
 
84
 
NSString * const NSGenericException;
85
 
 
86
 
NSString * const NSInconsistentArchiveException;
87
 
 
88
 
NSString * const NSInternalInconsistencyException;
89
 
 
90
 
NSString * const NSInvalidArgumentException;
91
 
 
92
 
NSString * const NSMallocException;
93
 
 
94
 
NSString * const NSPortTimeoutException;
95
 
 
96
 
NSString * const NSRangeException;
97
 
 
98
 
 
99
 
/* Exception handler */
 
105
NSString *NSConnectionReplyMode = @"NSConnectionReplyMode";
 
106
 
 
107
 
 
108
 
 
109
/**
 
110
 * Last-resort exception handler, a function taking an NSException and
 
111
 * returning void.  Set with NSSetUncaughtExceptionHandler().
 
112
 */
100
113
NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
101
114
 
102
115
/* NSBundle */
103
 
NSString *NSBundleDidLoadNotification;
104
 
 
105
 
NSString *NSShowNonLocalizedStrings;
106
 
 
107
 
NSString *NSLoadedClasses;
 
116
NSString *NSBundleDidLoadNotification = @"NSBundleDidLoadNotification";
 
117
 
 
118
NSString *NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings";
 
119
 
 
120
NSString *NSLoadedClasses = @"NSLoadedClasses";
108
121
 
109
122
 
110
123
/* Stream */
111
 
NSString *StreamException;
112
 
 
113
 
 
114
 
/*
115
 
 * File attributes names
116
 
 */
117
 
 
118
 
/* File Attributes */
119
 
 
120
 
NSString *NSFileDeviceIdentifier;
121
 
 
122
 
NSString *NSFileGroupOwnerAccountName;
123
 
 
124
 
NSString *NSFileGroupOwnerAccountNumber;
125
 
 
126
 
NSString *NSFileModificationDate;
127
 
 
128
 
NSString *NSFileOwnerAccountName;
129
 
 
130
 
NSString *NSFileOwnerAccountNumber;
131
 
 
132
 
NSString *NSFilePosixPermissions;
133
 
 
134
 
NSString *NSFileReferenceCount;
135
 
 
136
 
NSString *NSFileSize;
137
 
 
138
 
NSString *NSFileSystemFileNumber;
139
 
 
140
 
NSString *NSFileSystemNumber;
141
 
 
142
 
NSString *NSFileType;
143
 
 
144
 
 
145
 
/* File Types */
146
 
 
147
 
NSString *NSFileTypeDirectory;
148
 
 
149
 
NSString *NSFileTypeRegular;
150
 
 
151
 
NSString *NSFileTypeSymbolicLink;
152
 
 
153
 
NSString *NSFileTypeSocket;
154
 
 
155
 
NSString *NSFileTypeFifo;
156
 
 
157
 
NSString *NSFileTypeCharacterSpecial;
158
 
 
159
 
NSString *NSFileTypeBlockSpecial;
160
 
 
161
 
NSString *NSFileTypeUnknown;
162
 
 
163
 
 
164
 
/* FileSystem Attributes */
165
 
 
166
 
NSString *NSFileSystemSize;
167
 
 
168
 
NSString *NSFileSystemFreeSize;
169
 
 
170
 
NSString *NSFileSystemNodes;
171
 
 
172
 
NSString *NSFileSystemFreeNodes;
 
124
NSString *StreamException = @"StreamException";
 
125
 
173
126
 
174
127
 
175
128
/* Standard domains */
176
 
NSString *NSArgumentDomain;
177
 
 
178
 
NSString *NSGlobalDomain;
179
 
 
180
 
NSString *NSRegistrationDomain;
 
129
NSString *NSArgumentDomain = @"NSArgumentDomain";
 
130
 
 
131
NSString *NSGlobalDomain = @"NSGlobalDomain";
 
132
 
 
133
NSString *NSRegistrationDomain = @"NSRegistrationDomain";
181
134
 
182
135
 
183
136
/* Public notification */
184
 
NSString *NSUserDefaultsDidChangeNotification;
 
137
NSString *NSUserDefaultsDidChangeNotification = @"NSUserDefaultsDidChangeNotification";
185
138
 
186
139
 
187
140
/* Keys for language-dependent information */
188
 
NSString *NSWeekDayNameArray;
189
 
 
190
 
NSString *NSShortWeekDayNameArray;
191
 
 
192
 
NSString *NSMonthNameArray;
193
 
 
194
 
NSString *NSShortMonthNameArray;
195
 
 
196
 
NSString *NSTimeFormatString;
197
 
 
198
 
NSString *NSDateFormatString;
199
 
 
200
 
NSString *NSShortDateFormatString;
201
 
 
202
 
NSString *NSTimeDateFormatString;
203
 
 
204
 
NSString *NSShortTimeDateFormatString;
205
 
 
206
 
NSString *NSCurrencySymbol;
207
 
 
208
 
NSString *NSDecimalSeparator;
209
 
 
210
 
NSString *NSThousandsSeparator;
211
 
 
212
 
NSString *NSInternationalCurrencyString;
213
 
 
214
 
NSString *NSCurrencyString;
215
 
 
216
 
NSString *NSNegativeCurrencyFormatString;
217
 
 
218
 
NSString *NSPositiveCurrencyFormatString;
219
 
 
220
 
NSString *NSDecimalDigits;
221
 
 
222
 
NSString *NSAMPMDesignation;
223
 
 
224
 
 
225
 
NSString *NSHourNameDesignations;
226
 
 
227
 
NSString *NSYearMonthWeekDesignations;
228
 
 
229
 
NSString *NSEarlierTimeDesignations;
230
 
 
231
 
NSString *NSLaterTimeDesignations;
232
 
 
233
 
NSString *NSThisDayDesignations;
234
 
 
235
 
NSString *NSNextDayDesignations;
236
 
 
237
 
NSString *NSNextNextDayDesignations;
238
 
 
239
 
NSString *NSPriorDayDesignations;
240
 
 
241
 
NSString *NSDateTimeOrdering;
 
141
NSString *NSWeekDayNameArray = @"NSWeekDayNameArray";
 
142
 
 
143
NSString *NSShortWeekDayNameArray = @"NSShortWeekDayNameArray";
 
144
 
 
145
NSString *NSMonthNameArray = @"NSMonthNameArray";
 
146
 
 
147
NSString *NSShortMonthNameArray = @"NSShortMonthNameArray";
 
148
 
 
149
NSString *NSTimeFormatString = @"NSTimeFormatString";
 
150
 
 
151
NSString *NSDateFormatString = @"NSDateFormatString";
 
152
 
 
153
NSString *NSShortDateFormatString = @"NSShortDateFormatString";
 
154
 
 
155
NSString *NSTimeDateFormatString = @"NSTimeDateFormatString";
 
156
 
 
157
NSString *NSShortTimeDateFormatString = @"NSShortTimeDateFormatString";
 
158
 
 
159
NSString *NSCurrencySymbol = @"NSCurrencySymbol";
 
160
 
 
161
NSString *NSDecimalSeparator = @"NSDecimalSeparator";
 
162
 
 
163
NSString *NSThousandsSeparator = @"NSThousandsSeparator";
 
164
 
 
165
NSString *NSInternationalCurrencyString = @"NSInternationalCurrencyString";
 
166
 
 
167
NSString *NSCurrencyString = @"NSCurrencyString";
 
168
 
 
169
NSString *NSNegativeCurrencyFormatString = @"NSNegativeCurrencyFormatString";
 
170
 
 
171
NSString *NSPositiveCurrencyFormatString = @"NSPositiveCurrencyFormatString";
 
172
 
 
173
NSString *NSDecimalDigits = @"NSDecimalDigits";
 
174
 
 
175
NSString *NSAMPMDesignation = @"NSAMPMDesignation";
 
176
 
 
177
 
 
178
NSString *NSHourNameDesignations = @"NSHourNameDesignations";
 
179
 
 
180
NSString *NSYearMonthWeekDesignations = @"NSYearMonthWeekDesignations";
 
181
 
 
182
NSString *NSEarlierTimeDesignations = @"NSEarlierTimeDesignations";
 
183
 
 
184
NSString *NSLaterTimeDesignations = @"NSLaterTimeDesignations";
 
185
 
 
186
NSString *NSThisDayDesignations = @"NSThisDayDesignations";
 
187
 
 
188
NSString *NSNextDayDesignations = @"NSNextDayDesignations";
 
189
 
 
190
NSString *NSNextNextDayDesignations = @"NSNextNextDayDesignations";
 
191
 
 
192
NSString *NSPriorDayDesignations = @"NSPriorDayDesignations";
 
193
 
 
194
NSString *NSDateTimeOrdering = @"NSDateTimeOrdering";
242
195
 
243
196
 
244
197
/* These are in OPENSTEP 4.2 */
245
 
NSString *NSLanguageCode;
246
 
 
247
 
NSString *NSLanguageName;
248
 
 
249
 
NSString *NSFormalName;
 
198
NSString *NSLanguageCode = @"NSLanguageCode";
 
199
 
 
200
NSString *NSLanguageName = @"NSLanguageName";
 
201
 
 
202
NSString *NSFormalName = @"NSFormalName";
250
203
 
251
204
/* For GNUstep */
252
 
NSString *NSLocale;
 
205
NSString *NSLocale = @"NSLocale";
253
206
 
254
207
 
255
208
/*
256
209
 * Keys for the NSDictionary returned by [NSConnection -statistics]
257
210
 */
258
211
/* These in OPENSTEP 4.2 */
259
 
NSString *NSConnectionRepliesReceived;
260
 
 
261
 
NSString *NSConnectionRepliesSent;
262
 
 
263
 
NSString *NSConnectionRequestsReceived;
264
 
 
265
 
NSString *NSConnectionRequestsSent;
 
212
NSString *NSConnectionRepliesReceived = @"NSConnectionRepliesReceived";
 
213
 
 
214
NSString *NSConnectionRepliesSent = @"NSConnectionRepliesSent";
 
215
 
 
216
NSString *NSConnectionRequestsReceived = @"NSConnectionRequestsReceived";
 
217
 
 
218
NSString *NSConnectionRequestsSent = @"NSConnectionRequestsSent";
266
219
 
267
220
/* These Are GNUstep extras */
268
 
NSString *NSConnectionLocalCount;
269
 
 
270
 
NSString *NSConnectionProxyCount;
271
 
 
272
 
/*
273
 
 * Keys for NSURLHandle
274
 
 */
275
 
NSString *NSHTTPPropertyStatusCodeKey;
276
 
 
277
 
NSString *NSHTTPPropertyStatusReasonKey;
278
 
 
279
 
NSString *NSHTTPPropertyServerHTTPVersionKey;
280
 
 
281
 
NSString *NSHTTPPropertyRedirectionHeadersKey;
282
 
 
283
 
NSString *NSHTTPPropertyErrorPageDataKey;
284
 
 
285
 
/* These are GNUstep extras */
286
 
NSString *GSHTTPPropertyMethodKey;
287
 
 
288
 
NSString *GSHTTPPropertyProxyHostKey;
289
 
 
290
 
NSString *GSHTTPPropertyProxyPortKey;
291
 
 
 
221
NSString *NSConnectionLocalCount = @"NSConnectionLocalCount";
 
222
 
 
223
NSString *NSConnectionProxyCount = @"NSConnectionProxyCount";
292
224
 
293
225
/* Class description notification */
294
 
NSString *NSClassDescriptionNeededForClassNotification;
 
226
NSString *NSClassDescriptionNeededForClassNotification = @"NSClassDescriptionNeededForClassNotification";
295
227
 
296
228
 
297
229
/*
298
 
 *      Setup function called when NSString is initialised.
299
 
 *      We make all the constant strings not be constant strings so they can
300
 
 *      cache their hash values and be used much more efficiently as keys in
301
 
 *      dictionaries etc.
 
230
 * Optimization function called when NSObject is initialised.
 
231
 * We replace all the constant strings so they can
 
232
 * cache their hash values and be used much more efficiently as keys in
 
233
 * dictionaries etc.
 
234
 * We initialize with constant strings so that
 
235
 * code executed before NSObject +initialize calls us,
 
236
 * will have valid values.
302
237
 */
 
238
 
303
239
void
304
240
GSBuildStrings()
305
241
{
306
 
  static Class  SClass = 0;
 
242
  static Class  NSStringClass = 0;
307
243
 
308
 
  if (SClass == 0)
 
244
  if (NSStringClass == 0)
309
245
    {
310
 
      SClass = [NSString class];
 
246
      NSStringClass = [NSString class];
 
247
 
311
248
      /*
312
249
       * Ensure that NSString is initialized ... because we are called
313
250
       * from [NSObject +initialize] which might be executing as a
314
251
       * result of a call to [NSString +initialize] !
 
252
       * Use performSelector: to avoid compiler warning about clash of
 
253
       * return value types in two different versions of initialize.
315
254
       */
316
 
      [SClass initialize];
317
 
      InPortAcceptedClientNotification
318
 
        = [[SClass alloc] initWithCString:
319
 
        "InPortAcceptedClientNotification"];
320
 
      InPortClientBecameInvalidNotification
321
 
        = [[SClass alloc] initWithCString:
322
 
        "InPortClientBecameInvalidNotification"];
323
 
      NSAMPMDesignation
324
 
        = [[SClass alloc] initWithCString: "NSAMPMDesignation"];
325
 
      NSArgumentDomain
326
 
        = [[SClass alloc] initWithCString: "NSArgumentDomain"];
327
 
      NSBundleDidLoadNotification
328
 
        = [[SClass alloc] initWithCString: "NSBundleDidLoadNotification"];
329
 
      *(NSString**)&NSCharacterConversionException
330
 
        = [[SClass alloc] initWithCString:
331
 
        "NSCharacterConversionException"];
332
 
      NSConnectionDidDieNotification
333
 
        = [[SClass alloc] initWithCString:
334
 
        "NSConnectionDidDieNotification"];
335
 
      NSConnectionDidInitializeNotification
336
 
        = [[SClass alloc] initWithCString:
337
 
        "NSConnectionDidInitializeNotification"];
338
 
      NSConnectionLocalCount
339
 
        = [[SClass alloc] initWithCString: "NSConnectionLocalCount"];
340
 
      NSConnectionProxyCount
341
 
        = [[SClass alloc] initWithCString: "NSConnectionProxyCount"];
342
 
      NSConnectionRepliesReceived
343
 
        = [[SClass alloc] initWithCString: "NSConnectionRepliesReceived"];
344
 
      NSConnectionRepliesSent
345
 
        = [[SClass alloc] initWithCString: "NSConnectionRepliesSent"];
346
 
      NSConnectionReplyMode
347
 
        = [[SClass alloc] initWithCString: "NSConnectionReplyMode"];
348
 
      NSConnectionRequestsReceived
349
 
        = [[SClass alloc] initWithCString: "NSConnectionRequestsReceived"];
350
 
      NSConnectionRequestsSent
351
 
        = [[SClass alloc] initWithCString: "NSConnectionRequestsSent"];
352
 
      NSCurrencyString
353
 
        = [[SClass alloc] initWithCString: "NSCurrencyString"];
354
 
      NSCurrencySymbol
355
 
        = [[SClass alloc] initWithCString: "NSCurrencySymbol"];
356
 
      NSDateFormatString
357
 
        = [[SClass alloc] initWithCString: "NSDateFormatString"];
358
 
      NSDateTimeOrdering
359
 
        = [[SClass alloc] initWithCString: "NSDateTimeOrdering"];
360
 
      NSDecimalDigits
361
 
        = [[SClass alloc] initWithCString: "NSDecimalDigits"];
362
 
      NSDecimalSeparator
363
 
        = [[SClass alloc] initWithCString: "NSDecimalSeparator"];
364
 
      NSDefaultRunLoopMode
365
 
        = [[SClass alloc] initWithCString: "NSDefaultRunLoopMode"];
366
 
      NSEarlierTimeDesignations
367
 
        = [[SClass alloc] initWithCString: "NSEarlierTimeDesignations"];
368
 
      NSFailedAuthenticationException
369
 
        = [[SClass alloc] initWithCString:
370
 
        "NSFailedAuthenticationException"];
371
 
      NSFileDeviceIdentifier
372
 
        = [[SClass alloc] initWithCString: "NSFileDeviceIdentifier"];
373
 
      NSFileGroupOwnerAccountName
374
 
        = [[SClass alloc] initWithCString: "NSFileGroupOwnerAccountName"];
375
 
      NSFileGroupOwnerAccountNumber
376
 
        = [[SClass alloc] initWithCString: "NSFileGroupOwnerAccountNumber"];
377
 
      NSFileModificationDate
378
 
        = [[SClass alloc] initWithCString: "NSFileModificationDate"];
379
 
      NSFileOwnerAccountName
380
 
        = [[SClass alloc] initWithCString: "NSFileOwnerAccountName"];
381
 
      NSFileOwnerAccountNumber
382
 
        = [[SClass alloc] initWithCString: "NSFileOwnerAccountNumber"];
383
 
      NSFilePosixPermissions
384
 
        = [[SClass alloc] initWithCString: "NSFilePosixPermissions"];
385
 
      NSFileReferenceCount
386
 
        = [[SClass alloc] initWithCString: "NSFileReferenceCount"];
387
 
      NSFileSize
388
 
        = [[SClass alloc] initWithCString: "NSFileSize"];
389
 
      NSFileSystemFileNumber
390
 
        = [[SClass alloc] initWithCString: "NSFileSystemFileNumber"];
391
 
      NSFileSystemFreeNodes
392
 
        = [[SClass alloc] initWithCString: "NSFileSystemFreeNodes"];
393
 
      NSFileSystemFreeSize
394
 
        = [[SClass alloc] initWithCString: "NSFileSystemFreeSize"];
395
 
      NSFileSystemNodes
396
 
        = [[SClass alloc] initWithCString: "NSFileSystemNodes"];
397
 
      NSFileSystemNumber
398
 
        = [[SClass alloc] initWithCString: "NSFileSystemNumber"];
399
 
      NSFileSystemSize
400
 
        = [[SClass alloc] initWithCString: "NSFileSystemSize"];
401
 
      NSFileType
402
 
        = [[SClass alloc] initWithCString: "NSFileType"];
403
 
      NSFileTypeBlockSpecial
404
 
        = [[SClass alloc] initWithCString: "NSFileTypeBlockSpecial"];
405
 
      NSFileTypeCharacterSpecial
406
 
        = [[SClass alloc] initWithCString: "NSFileTypeCharacterSpecial"];
407
 
      NSFileTypeDirectory
408
 
        = [[SClass alloc] initWithCString: "NSFileTypeDirectory"];
409
 
      NSFileTypeFifo
410
 
        = [[SClass alloc] initWithCString: "NSFileTypeFifo"];
411
 
      NSFileTypeRegular
412
 
        = [[SClass alloc] initWithCString: "NSFileTypeRegular"];
413
 
      NSFileTypeSocket
414
 
        = [[SClass alloc] initWithCString: "NSFileTypeSocket"];
415
 
      NSFileTypeSymbolicLink
416
 
        = [[SClass alloc] initWithCString: "NSFileTypeSymbolicLink"];
417
 
      NSFileTypeUnknown
418
 
        = [[SClass alloc] initWithCString: "NSFileTypeUnknown"];
419
 
      NSFormalName
420
 
        = [[SClass alloc] initWithCString: "NSFormalName"];
421
 
      *(NSString**)&NSGenericException
422
 
        = [[SClass alloc] initWithCString: "NSGenericException"];
423
 
      NSGlobalDomain
424
 
        = [[SClass alloc] initWithCString: "NSGlobalDomain"];
425
 
      NSHourNameDesignations
426
 
        = [[SClass alloc] initWithCString: "NSHourNameDesignations"];
427
 
      NSInconsistentArchiveException
428
 
        = [[SClass alloc] initWithCString:
429
 
        "NSInconsistentArchiveException"];
430
 
      *(NSString**)&NSInternalInconsistencyException
431
 
        = [[SClass alloc] initWithCString:
432
 
        "NSInternalInconsistencyException"];
433
 
      NSInternationalCurrencyString
434
 
        = [[SClass alloc] initWithCString: "NSInternationalCurrencyString"];
435
 
      *(NSString**)&NSInvalidArgumentException
436
 
        = [[SClass alloc] initWithCString: "NSInvalidArgumentException"];
437
 
      NSLanguageCode
438
 
        = [[SClass alloc] initWithCString: "NSLanguageCode"];
439
 
      NSLanguageName
440
 
        = [[SClass alloc] initWithCString: "NSLanguageName"];
441
 
      NSLaterTimeDesignations
442
 
        = [[SClass alloc] initWithCString: "NSLaterTimeDesignations"];
443
 
      NSLoadedClasses
444
 
        = [[SClass alloc] initWithCString: "NSLoadedClasses"];
445
 
      NSLocale
446
 
        = [[SClass alloc] initWithCString: "NSLocale"];
447
 
      *(NSString**)&NSMallocException
448
 
        = [[SClass alloc] initWithCString: "NSMallocException"];
449
 
      NSMonthNameArray
450
 
        = [[SClass alloc] initWithCString: "NSMonthNameArray"];
451
 
      NSNegativeCurrencyFormatString
452
 
        = [[SClass alloc] initWithCString:
453
 
        "NSNegativeCurrencyFormatString"];
454
 
      NSNextDayDesignations
455
 
        = [[SClass alloc] initWithCString: "NSNextDayDesignations"];
456
 
      NSNextNextDayDesignations
457
 
        = [[SClass alloc] initWithCString: "NSNextNextDayDesignations"];
458
 
      NSPortDidBecomeInvalidNotification
459
 
        = [[SClass alloc] initWithCString:
460
 
        "NSPortDidBecomeInvalidNotification"];
461
 
      NSPortTimeoutException
462
 
        = [[SClass alloc] initWithCString: "NSPortTimeoutException"];
463
 
      NSPositiveCurrencyFormatString
464
 
        = [[SClass alloc] initWithCString:
465
 
        "NSPositiveCurrencyFormatString"];
466
 
      NSPriorDayDesignations
467
 
        = [[SClass alloc] initWithCString: "NSPriorDayDesignations"];
468
 
      *(NSString**)&NSRangeException
469
 
        = [[SClass alloc] initWithCString: "NSRangeException"];
470
 
      NSRegistrationDomain
471
 
        = [[SClass alloc] initWithCString: "NSRegistrationDomain"];
472
 
      NSShortDateFormatString
473
 
        = [[SClass alloc] initWithCString: "NSShortDateFormatString"];
474
 
      NSShortMonthNameArray
475
 
        = [[SClass alloc] initWithCString: "NSShortMonthNameArray"];
476
 
      NSShortTimeDateFormatString
477
 
        = [[SClass alloc] initWithCString: "NSShortTimeDateFormatString"];
478
 
      NSShortWeekDayNameArray
479
 
        = [[SClass alloc] initWithCString: "NSShortWeekDayNameArray"];
480
 
      NSShowNonLocalizedStrings
481
 
        = [[SClass alloc] initWithCString: "NSShowNonLocalizedStrings"];
482
 
      NSThisDayDesignations
483
 
        = [[SClass alloc] initWithCString: "NSThisDayDesignations"];
484
 
      NSThousandsSeparator
485
 
        = [[SClass alloc] initWithCString: "NSThousandsSeparator"];
486
 
      NSThreadDidStartNotification
487
 
        = [[SClass alloc] initWithCString: "NSThreadDidStartNotification"];
488
 
      NSThreadWillExitNotification
489
 
        = [[SClass alloc] initWithCString: "NSThreadWillExitNotification"];
490
 
      NSTimeDateFormatString
491
 
        = [[SClass alloc] initWithCString: "NSTimeDateFormatString"];
492
 
      NSTimeFormatString
493
 
        = [[SClass alloc] initWithCString: "NSTimeFormatString"];
494
 
      NSUserDefaultsDidChangeNotification
495
 
        = [[SClass alloc] initWithCString:
496
 
        "NSUserDefaultsDidChangeNotification"];
497
 
      NSWeekDayNameArray
498
 
        = [[SClass alloc] initWithCString: "NSWeekDayNameArray"];
499
 
      NSWillBecomeMultiThreadedNotification
500
 
        = [[SClass alloc] initWithCString:
501
 
        "NSWillBecomeMultiThreadedNotification"];
502
 
      NSYearMonthWeekDesignations
503
 
        = [[SClass alloc] initWithCString: "NSYearMonthWeekDesignations"];
504
 
      PortBecameInvalidNotification
505
 
        = [[SClass alloc] initWithCString: "PortBecameInvalidNotification"];
506
 
      StreamException
507
 
        = [[SClass alloc] initWithCString: "StreamException"];
508
 
 
509
 
      NSHTTPPropertyStatusCodeKey
510
 
        = [[SClass alloc] initWithCString: "HTTPPropertyStatusCodeKey"];
511
 
      NSHTTPPropertyStatusReasonKey
512
 
        = [[SClass alloc] initWithCString: "HTTPPropertyStatusReasonKey"];
513
 
      NSHTTPPropertyServerHTTPVersionKey
514
 
        = [[SClass alloc] initWithCString: "HTTPPropertyServerHTTPVersionKey"];
515
 
      NSHTTPPropertyRedirectionHeadersKey
516
 
        = [[SClass alloc] initWithCString: "HTTPPropertyRedirectionHeadersKey"];
517
 
      NSHTTPPropertyErrorPageDataKey
518
 
        = [[SClass alloc] initWithCString: "HTTPPropertyErrorPageDataKey"];
519
 
 
520
 
      GSHTTPPropertyMethodKey
521
 
        = [[SClass alloc] initWithCString: "GSHTTPPropertyMethodKey"];
522
 
      GSHTTPPropertyProxyHostKey
523
 
        = [[SClass alloc] initWithCString: "GSHTTPPropertyProxyHostKey"];
524
 
      GSHTTPPropertyProxyPortKey
525
 
        = [[SClass alloc] initWithCString: "GSHTTPPropertyProxyPortKey"];
526
 
 
527
 
      NSClassDescriptionNeededForClassNotification
528
 
        = [[SClass alloc] initWithCString:
529
 
        "NSClassDescriptionNeededForClassNotification"];
 
255
      [NSStringClass performSelector: @selector(initialize)];
 
256
 
 
257
      GS_REPLACE_CONSTANT_STRING(GSNetworkNotificationCenterType);
 
258
      GS_REPLACE_CONSTANT_STRING(InPortAcceptedClientNotification);
 
259
      GS_REPLACE_CONSTANT_STRING(InPortClientBecameInvalidNotification);
 
260
      GS_REPLACE_CONSTANT_STRING(NSAMPMDesignation);
 
261
      GS_REPLACE_CONSTANT_STRING(NSArgumentDomain);
 
262
      GS_REPLACE_CONSTANT_STRING(NSBundleDidLoadNotification);
 
263
      GS_REPLACE_CONSTANT_STRING(NSClassDescriptionNeededForClassNotification);
 
264
      GS_REPLACE_CONSTANT_STRING(NSConnectionDidDieNotification);
 
265
      GS_REPLACE_CONSTANT_STRING(NSConnectionDidInitializeNotification);
 
266
      GS_REPLACE_CONSTANT_STRING(NSConnectionLocalCount);
 
267
      GS_REPLACE_CONSTANT_STRING(NSConnectionProxyCount);
 
268
      GS_REPLACE_CONSTANT_STRING(NSConnectionRepliesReceived);
 
269
      GS_REPLACE_CONSTANT_STRING(NSConnectionRepliesSent);
 
270
      GS_REPLACE_CONSTANT_STRING(NSConnectionReplyMode);
 
271
      GS_REPLACE_CONSTANT_STRING(NSConnectionRequestsReceived);
 
272
      GS_REPLACE_CONSTANT_STRING(NSConnectionRequestsSent);
 
273
      GS_REPLACE_CONSTANT_STRING(NSCurrencyString);
 
274
      GS_REPLACE_CONSTANT_STRING(NSCurrencySymbol);
 
275
      GS_REPLACE_CONSTANT_STRING(NSDateFormatString);
 
276
      GS_REPLACE_CONSTANT_STRING(NSDateTimeOrdering);
 
277
      GS_REPLACE_CONSTANT_STRING(NSDecimalDigits);
 
278
      GS_REPLACE_CONSTANT_STRING(NSDecimalSeparator);
 
279
      GS_REPLACE_CONSTANT_STRING(NSEarlierTimeDesignations);
 
280
      GS_REPLACE_CONSTANT_STRING(NSFormalName);
 
281
      GS_REPLACE_CONSTANT_STRING(NSGlobalDomain);
 
282
      GS_REPLACE_CONSTANT_STRING(NSHourNameDesignations);
 
283
      GS_REPLACE_CONSTANT_STRING(NSInternationalCurrencyString);
 
284
      GS_REPLACE_CONSTANT_STRING(NSLanguageCode);
 
285
      GS_REPLACE_CONSTANT_STRING(NSLanguageName);
 
286
      GS_REPLACE_CONSTANT_STRING(NSLaterTimeDesignations);
 
287
      GS_REPLACE_CONSTANT_STRING(NSLoadedClasses);
 
288
      GS_REPLACE_CONSTANT_STRING(NSLocale);
 
289
      GS_REPLACE_CONSTANT_STRING(NSLocalNotificationCenterType);
 
290
      GS_REPLACE_CONSTANT_STRING(NSMonthNameArray);
 
291
      GS_REPLACE_CONSTANT_STRING(NSNegativeCurrencyFormatString);
 
292
      GS_REPLACE_CONSTANT_STRING(NSNextDayDesignations);
 
293
      GS_REPLACE_CONSTANT_STRING(NSNextNextDayDesignations);
 
294
      GS_REPLACE_CONSTANT_STRING(NSPortDidBecomeInvalidNotification);
 
295
      GS_REPLACE_CONSTANT_STRING(NSPositiveCurrencyFormatString);
 
296
      GS_REPLACE_CONSTANT_STRING(NSPriorDayDesignations);
 
297
      GS_REPLACE_CONSTANT_STRING(NSRegistrationDomain);
 
298
      GS_REPLACE_CONSTANT_STRING(NSShortDateFormatString);
 
299
      GS_REPLACE_CONSTANT_STRING(NSShortMonthNameArray);
 
300
      GS_REPLACE_CONSTANT_STRING(NSShortTimeDateFormatString);
 
301
      GS_REPLACE_CONSTANT_STRING(NSShortWeekDayNameArray);
 
302
      GS_REPLACE_CONSTANT_STRING(NSShowNonLocalizedStrings);
 
303
      GS_REPLACE_CONSTANT_STRING(NSTaskDidTerminateNotification);
 
304
      GS_REPLACE_CONSTANT_STRING(NSThisDayDesignations);
 
305
      GS_REPLACE_CONSTANT_STRING(NSThousandsSeparator);
 
306
      GS_REPLACE_CONSTANT_STRING(NSThreadDidStartNotification);
 
307
      GS_REPLACE_CONSTANT_STRING(NSThreadWillExitNotification);
 
308
      GS_REPLACE_CONSTANT_STRING(NSTimeDateFormatString);
 
309
      GS_REPLACE_CONSTANT_STRING(NSTimeFormatString);
 
310
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerCheckpointNotification);
 
311
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidOpenUndoGroupNotification);
 
312
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidRedoChangeNotification);
 
313
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidUndoChangeNotification);
 
314
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillCloseUndoGroupNotification);
 
315
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillRedoChangeNotification);
 
316
      GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillUndoChangeNotification);
 
317
      GS_REPLACE_CONSTANT_STRING(NSURLFileScheme);
 
318
      GS_REPLACE_CONSTANT_STRING(NSUserDefaultsDidChangeNotification);
 
319
      GS_REPLACE_CONSTANT_STRING(NSWeekDayNameArray);
 
320
      GS_REPLACE_CONSTANT_STRING(NSWillBecomeMultiThreadedNotification);
 
321
      GS_REPLACE_CONSTANT_STRING(NSYearMonthWeekDesignations);
 
322
      GS_REPLACE_CONSTANT_STRING(PortBecameInvalidNotification);
 
323
      GS_REPLACE_CONSTANT_STRING(StreamException);
530
324
    }
531
325
}
532
326
 
533
327
 
534
328
 
535
 
/* These are to increase readabilty locally. */
536
 
typedef unsigned int (*NSMT_hash_func_t)(NSMapTable *, const void *);
537
 
typedef BOOL (*NSMT_is_equal_func_t)(NSMapTable *, const void *, const void *);
538
 
typedef void (*NSMT_retain_func_t)(NSMapTable *, const void *);
539
 
typedef void (*NSMT_release_func_t)(NSMapTable *, const void *);
540
 
typedef NSString *(*NSMT_describe_func_t)(NSMapTable *, const void *);
541
 
 
542
 
 
543
 
/* Standard MapTable callbacks */
544
 
const NSMapTableKeyCallBacks NSIntMapKeyCallBacks = 
545
 
{
546
 
  (NSMT_hash_func_t) _NS_int_hash,
547
 
  (NSMT_is_equal_func_t) _NS_int_is_equal,
548
 
  (NSMT_retain_func_t) _NS_int_retain,
549
 
  (NSMT_release_func_t) _NS_int_release,
550
 
  (NSMT_describe_func_t) _NS_int_describe,
551
 
  NSNotAnIntMapKey
552
 
};
553
 
 
554
 
const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks = 
555
 
{
556
 
  (NSMT_hash_func_t) _NS_non_owned_void_p_hash,
557
 
  (NSMT_is_equal_func_t) _NS_non_owned_void_p_is_equal,
558
 
  (NSMT_retain_func_t) _NS_non_owned_void_p_retain,
559
 
  (NSMT_release_func_t) _NS_non_owned_void_p_release,
560
 
  (NSMT_describe_func_t) _NS_non_owned_void_p_describe,
561
 
  NSNotAPointerMapKey
562
 
};
563
 
 
564
 
const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks = 
565
 
{
566
 
  (NSMT_hash_func_t) _NS_non_owned_void_p_hash,
567
 
  (NSMT_is_equal_func_t) _NS_non_owned_void_p_is_equal,
568
 
  (NSMT_retain_func_t) _NS_non_owned_void_p_retain,
569
 
  (NSMT_release_func_t) _NS_non_owned_void_p_release,
570
 
  (NSMT_describe_func_t) _NS_non_owned_void_p_describe,
571
 
  NSNotAPointerMapKey
572
 
};
573
 
 
574
 
const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks = 
575
 
{
576
 
  (NSMT_hash_func_t) _NS_non_retained_id_hash,
577
 
  (NSMT_is_equal_func_t) _NS_non_retained_id_is_equal,
578
 
  (NSMT_retain_func_t) _NS_non_retained_id_retain,
579
 
  (NSMT_release_func_t) _NS_non_retained_id_release,
580
 
  (NSMT_describe_func_t) _NS_non_retained_id_describe,
581
 
  NSNotAPointerMapKey
582
 
};
583
 
 
584
 
const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks = 
585
 
{
586
 
  (NSMT_hash_func_t) _NS_id_hash,
587
 
  (NSMT_is_equal_func_t) _NS_id_is_equal,
588
 
  (NSMT_retain_func_t) _NS_id_retain,
589
 
  (NSMT_release_func_t) _NS_id_release,
590
 
  (NSMT_describe_func_t) _NS_id_describe,
591
 
  NSNotAPointerMapKey
592
 
};
593
 
 
594
 
const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks = 
595
 
{
596
 
  (NSMT_hash_func_t) _NS_owned_void_p_hash,
597
 
  (NSMT_is_equal_func_t) _NS_owned_void_p_is_equal,
598
 
  (NSMT_retain_func_t) _NS_owned_void_p_retain,
599
 
  (NSMT_release_func_t) _NS_owned_void_p_release,
600
 
  (NSMT_describe_func_t) _NS_owned_void_p_describe,
601
 
  NSNotAPointerMapKey
602
 
};
603
 
 
604
 
const NSMapTableValueCallBacks NSIntMapValueCallBacks = 
605
 
{
606
 
  (NSMT_retain_func_t) _NS_int_retain,
607
 
  (NSMT_release_func_t) _NS_int_release,
608
 
  (NSMT_describe_func_t) _NS_int_describe
609
 
};
610
 
 
611
 
const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks = 
612
 
{
613
 
  (NSMT_retain_func_t) _NS_non_owned_void_p_retain,
614
 
  (NSMT_release_func_t) _NS_non_owned_void_p_release,
615
 
  (NSMT_describe_func_t) _NS_non_owned_void_p_describe
616
 
};
617
 
 
618
 
const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks = 
619
 
{
620
 
  (NSMT_retain_func_t) _NS_non_retained_id_retain,
621
 
  (NSMT_release_func_t) _NS_non_retained_id_release,
622
 
  (NSMT_describe_func_t) _NS_non_retained_id_describe
623
 
};
624
 
 
625
 
const NSMapTableValueCallBacks NSObjectMapValueCallBacks = 
626
 
{
627
 
  (NSMT_retain_func_t) _NS_id_retain,
628
 
  (NSMT_release_func_t) _NS_id_release,
629
 
  (NSMT_describe_func_t) _NS_id_describe
630
 
};
631
 
 
632
 
const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks = 
633
 
{
634
 
  (NSMT_retain_func_t) _NS_owned_void_p_retain,
635
 
  (NSMT_release_func_t) _NS_owned_void_p_release,
636
 
  (NSMT_describe_func_t) _NS_owned_void_p_describe
637
 
};
638
 
 
639
 
/* These are to increase readabilty locally. */
640
 
typedef unsigned int (*NSHT_hash_func_t)(NSHashTable *, const void *);
641
 
typedef BOOL (*NSHT_isEqual_func_t)(NSHashTable *, const void *, const void *);
642
 
typedef void (*NSHT_retain_func_t)(NSHashTable *, const void *);
643
 
typedef void (*NSHT_release_func_t)(NSHashTable *, const void *);
644
 
typedef NSString *(*NSHT_describe_func_t)(NSHashTable *, const void *);
645
 
 
646
 
/**** Function Prototypes ****************************************************/
647
 
/** Standard NSHashTable callbacks... **/
648
 
     
649
 
const NSHashTableCallBacks NSIntHashCallBacks =
650
 
{
651
 
  (NSHT_hash_func_t) _NS_int_hash,
652
 
  (NSHT_isEqual_func_t) _NS_int_is_equal,
653
 
  (NSHT_retain_func_t) _NS_int_retain,
654
 
  (NSHT_release_func_t) _NS_int_release,
655
 
  (NSHT_describe_func_t) _NS_int_describe
656
 
};
657
 
 
658
 
const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks = 
659
 
{
660
 
  (NSHT_hash_func_t) _NS_non_owned_void_p_hash,
661
 
  (NSHT_isEqual_func_t) _NS_non_owned_void_p_is_equal,
662
 
  (NSHT_retain_func_t) _NS_non_owned_void_p_retain,
663
 
  (NSHT_release_func_t) _NS_non_owned_void_p_release,
664
 
  (NSHT_describe_func_t) _NS_non_owned_void_p_describe
665
 
};
666
 
 
667
 
const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks = 
668
 
{
669
 
  (NSHT_hash_func_t) _NS_non_retained_id_hash,
670
 
  (NSHT_isEqual_func_t) _NS_non_retained_id_is_equal,
671
 
  (NSHT_retain_func_t) _NS_non_retained_id_retain,
672
 
  (NSHT_release_func_t) _NS_non_retained_id_release,
673
 
  (NSHT_describe_func_t) _NS_non_retained_id_describe
674
 
};
675
 
 
676
 
const NSHashTableCallBacks NSObjectHashCallBacks = 
677
 
{
678
 
  (NSHT_hash_func_t) _NS_id_hash,
679
 
  (NSHT_isEqual_func_t) _NS_id_is_equal,
680
 
  (NSHT_retain_func_t) _NS_id_retain,
681
 
  (NSHT_release_func_t) _NS_id_release,
682
 
  (NSHT_describe_func_t) _NS_id_describe
683
 
};
684
 
 
685
 
const NSHashTableCallBacks NSOwnedPointerHashCallBacks = 
686
 
{
687
 
  (NSHT_hash_func_t) _NS_owned_void_p_hash,
688
 
  (NSHT_isEqual_func_t) _NS_owned_void_p_is_equal,
689
 
  (NSHT_retain_func_t) _NS_owned_void_p_retain,
690
 
  (NSHT_release_func_t) _NS_owned_void_p_release,
691
 
  (NSHT_describe_func_t) _NS_owned_void_p_describe
692
 
};
693
 
 
694
 
const NSHashTableCallBacks NSPointerToStructHashCallBacks = 
695
 
{
696
 
  (NSHT_hash_func_t) _NS_int_p_hash,
697
 
  (NSHT_isEqual_func_t) _NS_int_p_is_equal,
698
 
  (NSHT_retain_func_t) _NS_int_p_retain,
699
 
  (NSHT_release_func_t) _NS_int_p_release,
700
 
  (NSHT_describe_func_t) _NS_int_p_describe
701
 
};
702
 
 
 
329
/* For bug in gcc 3.1. See NSByteOrder.h */
 
330
void _gcc3_1_hack(void){}