Author: rfm
Date: Mon Feb 29 15:55:50 2016
New Revision: 39428
URL: http://svn.gna.org/viewcvs/gnustep?rev=39428&view=rev
Log:
clarify slightly
Modified:
libs/ec/trunk/EcAlarmDestination.m
libs/ec/trunk/EcProcess.m
Modified: libs/ec/trunk/EcAlarmDestination.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcAlarmDestination.m?rev=39428&r1=39427&r2=39428&view=diff
==============================================================================
--- libs/ec/trunk/EcAlarmDestination.m (original)
+++ libs/ec/trunk/EcAlarmDestination.m Mon Feb 29 15:55:50 2016
@@ -66,12 +66,14 @@
}
else
{
+ EcAlarmSeverity severity = [event perceivedSeverity];
+
[_alarmLock lock];
if (YES == _coalesceOff)
{
[_alarmQueue addObject: event];
}
- else if ([event perceivedSeverity] == EcAlarmSeverityCleared)
+ else if (EcAlarmSeverityCleared == severity)
{
NSUInteger index;
@@ -82,9 +84,10 @@
}
else
{
- EcAlarm *old = [_alarmQueue objectAtIndex: index];
-
- if ([old perceivedSeverity] == EcAlarmSeverityCleared)
+ EcAlarm *old = [_alarmQueue objectAtIndex: index];
+ EcAlarmSeverity oldSeverity = [old perceivedSeverity];
+
+ if (EcAlarmSeverityCleared == oldSeverity)
{
/* Repeated clears may be coalesced with later clears
* being ignored.
@@ -122,10 +125,26 @@
}
else
{
- EcAlarm *old = [_alarmQueue objectAtIndex: index];
-
- if ([old perceivedSeverity] == EcAlarmSeverityCleared)
+ EcAlarm *old = [_alarmQueue objectAtIndex: index];
+ EcAlarmSeverity oldSeverity = [old perceivedSeverity];
+
+ if (EcAlarmSeverityCleared == oldSeverity)
{
+ /* A clear can be replaced by a raised alarm.
+ */
+ [_alarmQueue addObject: event];
+ if (YES == _debug)
+ {
+ NSLog(@"Coalesce %@ by removing %@ (old)",
+ event, old);
+ }
+ [_alarmQueue removeObjectAtIndex: index];
+ }
+ else if (severity < oldSeverity)
+ {
+ /* Lower numeric values are higher severity,
+ * so the new alarm supercedes the old one.
+ */
[_alarmQueue addObject: event];
if (YES == _debug)
{
Modified: libs/ec/trunk/EcProcess.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=39428&r1=39427&r2=39428&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m (original)
+++ libs/ec/trunk/EcProcess.m Mon Feb 29 15:55:50 2016
@@ -3040,15 +3040,15 @@
[self cmdPrintf: @"\nWithout parameters, the defaults command is "];
[self cmdPrintf: @"used to list the current defaults overrides.\n"];
[self cmdPrintf: @"With the 'delete' parameter followed by a name, "];
- [self cmdPrintf: @"the command is used to revert a default.\n"];
+ [self cmdPrintf: @"removes an override.\n"];
[self cmdPrintf: @"With the 'write' parameter followed by a name "];
- [self cmdPrintf: @"and value, the command sets a default.\n"];
+ [self cmdPrintf: @"and value, sets an override.\n"];
[self cmdPrintf: @"With the 'read' parameter followed by a name, "];
- [self cmdPrintf: @"the command is used to show a default.\n"];
+ [self cmdPrintf: @"shows the effective default.\n"];
[self cmdPrintf: @"With the 'revert' parameter, "];
- [self cmdPrintf: @"the command is used to revert all defaults.\n"];
- [self cmdPrintf: @"With the 'list' parameter, theis is used "];
- [self cmdPrintf: @"to list registered (not all) defaults.\n"];
+ [self cmdPrintf: @"the command is used to revert all overides.\n"];
+ [self cmdPrintf: @"With the 'list' parameter, this lists "];
+ [self cmdPrintf: @"registered (not all) defaults/overrides.\n"];
}
else if ([msg count] > 1 && [[msg objectAtIndex: 1] isEqual: @"list"])
{
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs