Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32344 72102866-910b-0410-8b05-ffd578937521
  • Loading branch information
ngrewe committed Feb 24, 2011
1 parent bb271d0 commit 209cee4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2011-02-24 Niels Grewe <[email protected]>

* Source/NSUserDefaults.m
* Source/NSKeyValueObserving.m:
Fix typos.

2011-02-23 Richard Frith-Macdonald <[email protected]>

* Source\NSCalendarDate.m:
Expand Down
22 changes: 11 additions & 11 deletions Source/NSKeyValueObserving.m
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ - (void) overrideSetterFor: (NSString*)aKey
{
imp = [[GSKVOSetter class]
instanceMethodForSelector: @selector(setterRect:)];
}
}
else
{
imp = 0;
Expand Down Expand Up @@ -613,12 +613,12 @@ - (void) overrideSetterFor: (NSString*)aKey
}
NSEndHashTableEnumeration(&dependentKeyEnum);
}
NSEndMapTableEnumeration(&enumerator);
NSEndMapTableEnumeration(&enumerator);
}

if (!found)
{
NSDebugLLog(@"KVC", @"class %@ not KVC complient for %@",
NSDebugLLog(@"KVC", @"class %@ not KVC compliant for %@",
original, aKey);
/*
[NSException raise: NSInvalidArgumentException
Expand Down Expand Up @@ -959,7 +959,7 @@ - (id) init
observations = [NSMutableArray new];
return self;
}

- (void) notifyForKey: (NSString *)aKey ofInstance: (id)instance prior: (BOOL)f
{
unsigned count;
Expand Down Expand Up @@ -1180,7 +1180,7 @@ - (BOOL) isUnobserved
}

/*
* removes the observer
* removes the observer
*/
- (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath
{
Expand Down Expand Up @@ -1327,7 +1327,7 @@ - (void) finalize
}
if (observedObjectForForwarding)
{
[observedObjectForForwarding removeObserver: self forKeyPath:
[observedObjectForForwarding removeObserver: self forKeyPath:
keyForForwarding];
}
DESTROY(self);
Expand All @@ -1347,7 +1347,7 @@ - (void) observeValueForKeyPath: (NSString *)keyPath
change: (NSDictionary *)change
context: (void *)context
{
if (anObject == observedObjectForUpdate)
if (anObject == observedObjectForUpdate)
{
[self keyPathChanged: nil];
}
Expand Down Expand Up @@ -1381,8 +1381,8 @@ - (void) keyPathChanged: (id)objectToObserve
{
NSMutableDictionary *change;

change = [NSMutableDictionary dictionaryWithObject:
[NSNumber numberWithInt: 1]
change = [NSMutableDictionary dictionaryWithObject:
[NSNumber numberWithInt: 1]
forKey: NSKeyValueChangeKindKey];

if (observedObjectForForwarding != nil)
Expand All @@ -1391,7 +1391,7 @@ - (void) keyPathChanged: (id)objectToObserve

oldValue
= [observedObjectForForwarding valueForKey: keyForForwarding];
[observedObjectForForwarding removeObserver: self forKeyPath:
[observedObjectForForwarding removeObserver: self forKeyPath:
keyForForwarding];
if (oldValue)
{
Expand Down Expand Up @@ -1663,7 +1663,7 @@ - (void) willChangeValueForKey: (NSString*)aKey
if (pathInfo->recursion++ == 0)
{
id old = [pathInfo->change objectForKey: NSKeyValueChangeNewKey];

if (old != nil)
{
/* We have set a value for this key already, so the value
Expand Down
42 changes: 21 additions & 21 deletions Source/NSUserDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ + (void) resetStandardUserDefaults
if (sharedDefaults != nil)
{
NSDictionary *regDefs;

/* To ensure that we don't try to synchronise the old defaults to disk
* after creating the new ones, remove as housekeeping notification
* observer.
Expand All @@ -323,7 +323,7 @@ + (void) resetStandardUserDefaults
*/
[sharedDefaults synchronize];
DESTROY(sharedDefaults->_changedDomains);

regDefs = RETAIN([sharedDefaults->_tempDomains
objectForKey: NSRegistrationDomain]);
setSharedDefaults = NO;
Expand Down Expand Up @@ -491,7 +491,7 @@ + (NSUserDefaults*) standardUserDefaults
* We need to lock and check again before CREATING sharedDefaults if it doesn't exist,
* so that two threads can't create it at once (or call resetStandardUserDefaults at
* the same time).
* By not locking here, we avoid a deadlock that can occur between classLock and _lock. */
* By not locking here, we avoid a deadlock that can occur between classLock and _lock. */
if (setSharedDefaults == YES)
{
IF_NO_GC([sharedDefaults retain];)
Expand Down Expand Up @@ -520,7 +520,7 @@ + (NSUserDefaults*) standardUserDefaults
{
NSString *path = GSDefaultsRootForUser(NSUserName());
NSRange r = [path rangeOfString: @":REGISTRY:"];

if (r.length > 0)
{
sharedDefaults = [[NSUserDefaultsWin32 alloc] init];
Expand Down Expand Up @@ -580,22 +580,22 @@ + (NSUserDefaults*) standardUserDefaults
*
* We iterate over <language>, and for each <language> we iterate over GNUSTEP_LIBRARY.
*/

{
/* These variables are reused for all languages so we set them up
* once here and then reuse them.
*/
NSFileManager *fm = [NSFileManager defaultManager];
NSString *tail = [[[[[@"Libraries"
NSString *tail = [[[[[@"Libraries"
stringByAppendingPathComponent: @"gnustep-base"]
stringByAppendingPathComponent: @"Versions"]
stringByAppendingPathComponent:
stringByAppendingPathComponent:
OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION)]
stringByAppendingPathComponent: @"Resources"]
stringByAppendingPathComponent: @"Languages"];
NSArray *paths = NSSearchPathForDirectoriesInDomains
(NSLibraryDirectory, NSAllDomainsMask, YES);

added_lang = NO;
added_locale = NO;
enumerator = [uL objectEnumerator];
Expand All @@ -616,7 +616,7 @@ + (NSUserDefaults*) standardUserDefaults
break;
}
}

if (path != nil)
{
dict = [NSDictionary dictionaryWithContentsOfFile: path];
Expand All @@ -637,7 +637,7 @@ + (NSUserDefaults*) standardUserDefaults
* C library.
*/
NSString *locale = nil;

#ifdef HAVE_LOCALE_H
#ifdef LC_MESSAGES
locale = GSSetLocale(LC_MESSAGES, nil);
Expand All @@ -659,13 +659,13 @@ + (NSUserDefaults*) standardUserDefaults
* later on.
*/
added_locale = YES;

dict = GSDomainFromDefaultLocale ();
if (dict != nil)
{
[sharedDefaults setVolatileDomain: dict
forName: lang];

/* We do not set added_lang to YES here
* because we want the basic hardcoded defaults
* to be used in that case.
Expand All @@ -676,7 +676,7 @@ + (NSUserDefaults*) standardUserDefaults
}
}
}

if (added_lang == NO)
{
/* No language information found ... probably because the base
Expand Down Expand Up @@ -981,7 +981,7 @@ - (NSString*) description
{
desc = [NSMutableString stringWithFormat: @"%@", [super description]];
[desc appendFormat: @" SearchList: %@", _searchList];
[desc appendFormat: @" Persistant: %@", _persDomains];
[desc appendFormat: @" Persistent: %@", _persDomains];
[desc appendFormat: @" Temporary: %@", _tempDomains];
[_lock unlock];
}
Expand Down Expand Up @@ -1110,7 +1110,7 @@ - (id) objectForKey: (NSString*)defaultName
while ((dN = (*nImp)(enumerator, nextObjectSel)) != nil)
{
NSDictionary *dict;

dict = (*pImp)(_persDomains, objectForKeySel, dN);
if (dict != nil && (object = [dict objectForKey: defaultName]))
break;
Expand Down Expand Up @@ -1662,7 +1662,7 @@ - (void) unlockDefaultsFile
NS_HANDLER
{
NSLog(@"Warning ... someone broke our lock (%@) ... and may have"
@" interfered with updating defaults data in file.",
@" interfered with updating defaults data in file.",
[_defaultsDatabase stringByAppendingPathExtension: @"lck"]);
}
NS_ENDHANDLER
Expand Down Expand Up @@ -1714,7 +1714,7 @@ - (BOOL) synchronize
* If we haven't changed anything, we only need to synchronise if
* the on-disk database has been changed by someone else.
*/

if (_changedDomains == nil)
{
if ([self wantToReadDefaultsSince: _lastSync] == NO)
Expand All @@ -1729,15 +1729,15 @@ - (BOOL) synchronize
{
invalidatedLanguages = YES;
}

if ([self lockDefaultsFile: &wasLocked] == NO)
{
[_lock unlock];
NS_VALRETURN(NO);
}

newDict = [self readDefaults];

if (newDict == nil)
{
if (wasLocked == NO)
Expand Down Expand Up @@ -2084,7 +2084,7 @@ strange parameter (such as `(load "test.scm")`) is
{
plist_val = val;
}

[argDict setObject: plist_val forKey: key];
if (old != nil)
{
Expand Down

0 comments on commit 209cee4

Please sign in to comment.