declare constant strings as constant, and move values from source files into externs.m

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20092 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
arobert 2004-09-19 23:19:53 +00:00
parent fabb191ef1
commit 24c11fe90e
13 changed files with 69 additions and 55 deletions

View file

@ -42,14 +42,6 @@
#include "../Tools/gdnc.h"
/*
* Global variables for distributed notification center types.
*/
NSString *NSLocalNotificationCenterType =
@"NSLocalNotificationCenterType";
NSString *GSNetworkNotificationCenterType =
@"GSNetworkNotificationCenterType";
@interface NSDistributedNotificationCenter (Private)
- (void) _connect;

View file

@ -100,7 +100,6 @@
#define NOFILE 256
#endif
NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification";
static NSRecursiveLock *tasksLock = nil;
static NSMapTable *activeTasks = 0;

View file

@ -51,8 +51,6 @@ function may be incorrect
#include "Foundation/NSValue.h"
#include "Foundation/NSZone.h"
NSString *NSURLFileScheme = @"file";
/*
* Structure describing a URL.
* All the char* fields may be NULL pointers, except path, which

View file

@ -33,22 +33,6 @@
#include "Foundation/NSRunLoop.h"
#include "Foundation/NSUndoManager.h"
/* Public notifications */
NSString *NSUndoManagerCheckpointNotification =
@"NSUndoManagerCheckpointNotification";
NSString *NSUndoManagerDidOpenUndoGroupNotification =
@"NSUndoManagerDidOpenUndoGroupNotification";
NSString *NSUndoManagerDidRedoChangeNotification =
@"NSUndoManagerDidRedoChangeNotification";
NSString *NSUndoManagerDidUndoChangeNotification =
@"NSUndoManagerDidUndoChangeNotification";
NSString *NSUndoManagerWillCloseUndoGroupNotification =
@"NSUndoManagerWillCloseUndoGroupNotification";
NSString *NSUndoManagerWillRedoChangeNotification =
@"NSUndoManagerWillRedoChangeNotification";
NSString *NSUndoManagerWillUndoChangeNotification =
@"NSUndoManagerWillUndoChangeNotification";
/*
* Private class for grouping undo/redo actions.

View file

@ -30,6 +30,14 @@
#include "GSPrivate.h"
/*
PENDING some string constants are scattered about in the class impl
files and should be moved here
furthermore, the test for this in Testing/exported-strings.m
needs to be updated
*/
/* Global lock to be used by classes when operating on any global
data that invoke other methods which also access global; thus,
creating the potential for deadlock. */
@ -44,6 +52,12 @@ NSString *NSConnectionDidDieNotification = @"NSConnectionDidDieNotification";
NSString *NSConnectionDidInitializeNotification = @"NSConnectionDidInitializeNotification";
/*
* NSDistributedNotificationCenter types.
*/
NSString *NSLocalNotificationCenterType = @"NSLocalNotificationCenterType";
NSString *GSNetworkNotificationCenterType = @"GSNetworkNotificationCenterType";
/*
* NSThread Notifications
*/
@ -63,10 +77,29 @@ NSString *InPortClientBecameInvalidNotification = @"InPortClientBecameInvalidNot
NSString *InPortAcceptedClientNotification = @"InPortAcceptedClientNotification";
NSString *NSPortDidBecomeInvalidNotification = @"NSPortDidBecomeInvalidNotification";
/* NSTask notifications */
NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification";
/* NSUndoManager notifications */
NSString *NSUndoManagerCheckpointNotification = @"NSUndoManagerCheckpointNotification";
NSString *NSUndoManagerDidOpenUndoGroupNotification = @"NSUndoManagerDidOpenUndoGroupNotification";
NSString *NSUndoManagerDidRedoChangeNotification = @"NSUndoManagerDidRedoChangeNotification";
NSString *NSUndoManagerDidUndoChangeNotification = @"NSUndoManagerDidUndoChangeNotification";
NSString *NSUndoManagerWillCloseUndoGroupNotification = @"NSUndoManagerWillCloseUndoGroupNotification";
NSString *NSUndoManagerWillRedoChangeNotification = @"NSUndoManagerWillRedoChangeNotification";
NSString *NSUndoManagerWillUndoChangeNotification = @"NSUndoManagerWillUndoChangeNotification";
/* NSURL constants */
NSString *NSURLFileScheme = @"file";
/* RunLoop modes */
NSString *NSConnectionReplyMode = @"NSConnectionReplyMode";
@ -221,6 +254,7 @@ GSBuildStrings()
*/
[NSStringClass performSelector: @selector(initialize)];
GS_REPLACE_CONSTANT_STRING(GSNetworkNotificationCenterType);
GS_REPLACE_CONSTANT_STRING(InPortAcceptedClientNotification);
GS_REPLACE_CONSTANT_STRING(InPortClientBecameInvalidNotification);
GS_REPLACE_CONSTANT_STRING(NSAMPMDesignation);
@ -252,6 +286,7 @@ GSBuildStrings()
GS_REPLACE_CONSTANT_STRING(NSLaterTimeDesignations);
GS_REPLACE_CONSTANT_STRING(NSLoadedClasses);
GS_REPLACE_CONSTANT_STRING(NSLocale);
GS_REPLACE_CONSTANT_STRING(NSLocalNotificationCenterType);
GS_REPLACE_CONSTANT_STRING(NSMonthNameArray);
GS_REPLACE_CONSTANT_STRING(NSNegativeCurrencyFormatString);
GS_REPLACE_CONSTANT_STRING(NSNextDayDesignations);
@ -265,12 +300,21 @@ GSBuildStrings()
GS_REPLACE_CONSTANT_STRING(NSShortTimeDateFormatString);
GS_REPLACE_CONSTANT_STRING(NSShortWeekDayNameArray);
GS_REPLACE_CONSTANT_STRING(NSShowNonLocalizedStrings);
GS_REPLACE_CONSTANT_STRING(NSTaskDidTerminateNotification);
GS_REPLACE_CONSTANT_STRING(NSThisDayDesignations);
GS_REPLACE_CONSTANT_STRING(NSThousandsSeparator);
GS_REPLACE_CONSTANT_STRING(NSThreadDidStartNotification);
GS_REPLACE_CONSTANT_STRING(NSThreadWillExitNotification);
GS_REPLACE_CONSTANT_STRING(NSTimeDateFormatString);
GS_REPLACE_CONSTANT_STRING(NSTimeFormatString);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerCheckpointNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidOpenUndoGroupNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidRedoChangeNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerDidUndoChangeNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillCloseUndoGroupNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillRedoChangeNotification);
GS_REPLACE_CONSTANT_STRING(NSUndoManagerWillUndoChangeNotification);
GS_REPLACE_CONSTANT_STRING(NSURLFileScheme);
GS_REPLACE_CONSTANT_STRING(NSUserDefaultsDidChangeNotification);
GS_REPLACE_CONSTANT_STRING(NSWeekDayNameArray);
GS_REPLACE_CONSTANT_STRING(NSWillBecomeMultiThreadedNotification);