mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-05-10 16:01:02 +00:00
mkae method names more consistent
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/devmodules/dev-libs/ec@34911 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed1c478c70
commit
06ffe54b11
8 changed files with 54 additions and 54 deletions
0
ChangeLog
Normal file
0
ChangeLog
Normal file
|
@ -58,7 +58,7 @@ inner_main()
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[EcProc prcRun];
|
[EcProc ecRun];
|
||||||
|
|
||||||
[arp release];
|
[arp release];
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ inner_main()
|
||||||
[arp release];
|
[arp release];
|
||||||
arp = [NSAutoreleasePool new];
|
arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
[EcProc prcRun];
|
[EcProc ecRun];
|
||||||
}
|
}
|
||||||
[arp release];
|
[arp release];
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -56,7 +56,7 @@ inner_main()
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[EcProc prcRun];
|
[EcProc ecRun];
|
||||||
|
|
||||||
[arp release];
|
[arp release];
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -729,7 +729,7 @@ static BOOL commandIsRepeat (NSString *string)
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) prcRun
|
- (int) ecRun
|
||||||
{
|
{
|
||||||
NSRunLoop *loop;
|
NSRunLoop *loop;
|
||||||
|
|
||||||
|
|
|
@ -1725,7 +1725,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) prcRun
|
- (int) ecRun
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
@ -1733,7 +1733,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
||||||
*/
|
*/
|
||||||
sink = [[EcAlarmSinkSNMP alarmSinkSNMP] retain];
|
sink = [[EcAlarmSinkSNMP alarmSinkSNMP] retain];
|
||||||
|
|
||||||
result = [super prcRun];
|
result = [super ecRun];
|
||||||
|
|
||||||
[sink shutdown];
|
[sink shutdown];
|
||||||
DESTROY(sink);
|
DESTROY(sink);
|
||||||
|
|
16
EcProcess.h
16
EcProcess.h
|
@ -325,7 +325,7 @@ extern NSString* cmdVersion(NSString *ver);
|
||||||
|
|
||||||
/** Return a short copyright notice ... subclasses should override.
|
/** Return a short copyright notice ... subclasses should override.
|
||||||
*/
|
*/
|
||||||
- (NSString*) prcCopyright;
|
- (NSString*) ecCopyright;
|
||||||
|
|
||||||
/* Call these methods during initialisation of your instance
|
/* Call these methods during initialisation of your instance
|
||||||
* to set up automatic management of connections to servers.
|
* to set up automatic management of connections to servers.
|
||||||
|
@ -639,40 +639,40 @@ extern NSString* cmdVersion(NSString *ver);
|
||||||
/** Records the timestamp of the latest significant input for this process.
|
/** Records the timestamp of the latest significant input for this process.
|
||||||
* If when is nil the current timestmp is used.
|
* If when is nil the current timestmp is used.
|
||||||
*/
|
*/
|
||||||
- (void) prcHadIP: (NSDate*)when;
|
- (void) ecHadIP: (NSDate*)when;
|
||||||
|
|
||||||
/** Records the timestamp of the latest significant output for this process.
|
/** Records the timestamp of the latest significant output for this process.
|
||||||
* If when is nil the current timestmp is used.
|
* If when is nil the current timestmp is used.
|
||||||
*/
|
*/
|
||||||
- (void) prcHadOP: (NSDate*)when;
|
- (void) ecHadOP: (NSDate*)when;
|
||||||
|
|
||||||
/** Called on the first timeout of a new day.<br />
|
/** Called on the first timeout of a new day.<br />
|
||||||
* The argument 'when' is the timestamp of the timeout.
|
* The argument 'when' is the timestamp of the timeout.
|
||||||
*/
|
*/
|
||||||
- (void) prcNewDay: (NSCalendarDate*)when;
|
- (void) ecNewDay: (NSCalendarDate*)when;
|
||||||
|
|
||||||
/** Called on the first timeout of a new hour.<br />
|
/** Called on the first timeout of a new hour.<br />
|
||||||
* The argument 'when' is the timestamp of the timeout.
|
* The argument 'when' is the timestamp of the timeout.
|
||||||
*/
|
*/
|
||||||
- (void) prcNewHour: (NSCalendarDate*)when;
|
- (void) ecNewHour: (NSCalendarDate*)when;
|
||||||
|
|
||||||
/** Called on the first timeout of a new minute.<br />
|
/** Called on the first timeout of a new minute.<br />
|
||||||
* The argument 'when' is the timestamp of the timeout.
|
* The argument 'when' is the timestamp of the timeout.
|
||||||
*/
|
*/
|
||||||
- (void) prcNewMinute: (NSCalendarDate*)when;
|
- (void) ecNewMinute: (NSCalendarDate*)when;
|
||||||
|
|
||||||
/** Return heap memory known not to be leaked ... for use in internal
|
/** Return heap memory known not to be leaked ... for use in internal
|
||||||
* monitoring of memory usage. You should override this ti add in any
|
* monitoring of memory usage. You should override this ti add in any
|
||||||
* heap store you have used and know is not leaked.
|
* heap store you have used and know is not leaked.
|
||||||
*/
|
*/
|
||||||
- (NSUInteger) prcNotLeaked;
|
- (NSUInteger) ecNotLeaked;
|
||||||
|
|
||||||
/** Establishes the receiver as a DO server and runs the runloop.<br />
|
/** Establishes the receiver as a DO server and runs the runloop.<br />
|
||||||
* Returns zero when the run loop completes.<br />
|
* Returns zero when the run loop completes.<br />
|
||||||
* Returns one (immediately) if the receiver is transent.<br />
|
* Returns one (immediately) if the receiver is transent.<br />
|
||||||
* Returns two if unable to register as a DO server.
|
* Returns two if unable to register as a DO server.
|
||||||
*/
|
*/
|
||||||
- (int) prcRun;
|
- (int) ecRun;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
80
EcProcess.m
80
EcProcess.m
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
/* Lock for controlling access to per-process singleton instance.
|
/* Lock for controlling access to per-process singleton instance.
|
||||||
*/
|
*/
|
||||||
static NSRecursiveLock *prcLock = nil;
|
static NSRecursiveLock *ecLock = nil;
|
||||||
|
|
||||||
static BOOL cmdFlagDaemon = NO;
|
static BOOL cmdFlagDaemon = NO;
|
||||||
static BOOL cmdFlagTesting = NO;
|
static BOOL cmdFlagTesting = NO;
|
||||||
|
@ -475,7 +475,7 @@ findAction(NSString *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static NSString*
|
static NSString*
|
||||||
prcCommandHost()
|
ecCommandHost()
|
||||||
{
|
{
|
||||||
NSString *host;
|
NSString *host;
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ prcCommandHost()
|
||||||
}
|
}
|
||||||
|
|
||||||
static NSString*
|
static NSString*
|
||||||
prcCommandName()
|
ecCommandName()
|
||||||
{
|
{
|
||||||
NSString *name;
|
NSString *name;
|
||||||
|
|
||||||
|
@ -1317,16 +1317,16 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) prcCopyright
|
- (NSString*) ecCopyright
|
||||||
{
|
{
|
||||||
return @"";
|
return @"";
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (nil == prcLock)
|
if (nil == ecLock)
|
||||||
{
|
{
|
||||||
prcLock = [NSRecursiveLock new];
|
ecLock = [NSRecursiveLock new];
|
||||||
dateClass = [NSDate class];
|
dateClass = [NSDate class];
|
||||||
cDateClass = [NSCalendarDate class];
|
cDateClass = [NSCalendarDate class];
|
||||||
stringClass = [NSString class];
|
stringClass = [NSString class];
|
||||||
|
@ -1649,8 +1649,8 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
|
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
host = prcCommandHost();
|
host = ecCommandHost();
|
||||||
name = prcCommandName();
|
name = ecCommandName();
|
||||||
|
|
||||||
proxy = [NSConnection
|
proxy = [NSConnection
|
||||||
rootProxyForConnectionWithRegisteredName: name
|
rootProxyForConnectionWithRegisteredName: name
|
||||||
|
@ -1767,7 +1767,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) prcNewDay: (NSCalendarDate*)when
|
- (void) ecNewDay: (NSCalendarDate*)when
|
||||||
{
|
{
|
||||||
NSString *sub;
|
NSString *sub;
|
||||||
|
|
||||||
|
@ -1779,12 +1779,12 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
NSLog(@"%@", [self cmdArchive: sub]);
|
NSLog(@"%@", [self cmdArchive: sub]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) prcNewHour: (NSCalendarDate*)when
|
- (void) ecNewHour: (NSCalendarDate*)when
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) prcNewMinute: (NSCalendarDate*)when
|
- (void) ecNewMinute: (NSCalendarDate*)when
|
||||||
{
|
{
|
||||||
struct mallinfo info;
|
struct mallinfo info;
|
||||||
|
|
||||||
|
@ -1795,7 +1795,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
NSUInteger notLeaked;
|
NSUInteger notLeaked;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
notLeaked = [self prcNotLeaked];
|
notLeaked = [self ecNotLeaked];
|
||||||
|
|
||||||
/* Next slot to record in will be zero.
|
/* Next slot to record in will be zero.
|
||||||
*/
|
*/
|
||||||
|
@ -1876,7 +1876,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) prcHadIP: (NSDate*)when
|
- (void) ecHadIP: (NSDate*)when
|
||||||
{
|
{
|
||||||
if (when == nil)
|
if (when == nil)
|
||||||
{
|
{
|
||||||
|
@ -1885,7 +1885,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
ASSIGN(lastIP, when);
|
ASSIGN(lastIP, when);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) prcHadOP: (NSDate*)when
|
- (void) ecHadOP: (NSDate*)when
|
||||||
{
|
{
|
||||||
if (when == nil)
|
if (when == nil)
|
||||||
{
|
{
|
||||||
|
@ -1894,12 +1894,12 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
ASSIGN(lastOP, when);
|
ASSIGN(lastOP, when);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSUInteger) prcNotLeaked
|
- (NSUInteger) ecNotLeaked
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) prcRun
|
- (int) ecRun
|
||||||
{
|
{
|
||||||
NSConnection *c;
|
NSConnection *c;
|
||||||
|
|
||||||
|
@ -2782,13 +2782,13 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||||
[prcLock lock];
|
[ecLock lock];
|
||||||
if (self == EcProc)
|
if (self == EcProc)
|
||||||
{
|
{
|
||||||
EcProc = nil;
|
EcProc = nil;
|
||||||
cmdIsInitialised = NO;
|
cmdIsInitialised = NO;
|
||||||
}
|
}
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2821,17 +2821,17 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
|
|
||||||
- (id) initWithDefaults: (NSDictionary*) defs
|
- (id) initWithDefaults: (NSDictionary*) defs
|
||||||
{
|
{
|
||||||
[prcLock lock];
|
[ecLock lock];
|
||||||
if (nil != EcProc)
|
if (nil != EcProc)
|
||||||
{
|
{
|
||||||
[self release];
|
[self release];
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
[NSException raise: NSGenericException
|
[NSException raise: NSGenericException
|
||||||
format: @"EcProcess initialiser called more than once"];
|
format: @"EcProcess initialiser called more than once"];
|
||||||
}
|
}
|
||||||
if (nil == (self = [super init]))
|
if (nil == (self = [super init]))
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2882,15 +2882,15 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
prf, prf, prf, prf, prf, prf, prf, prf, prf, prf
|
prf, prf, prf, prf, prf, prf, prf, prf, prf, prf
|
||||||
);
|
);
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([[pinfo arguments] containsObject: @"--version"])
|
if ([[pinfo arguments] containsObject: @"--version"])
|
||||||
{
|
{
|
||||||
NSLog(@"%@ %@", [self prcCopyright], cmdVersion(nil));
|
NSLog(@"%@ %@", [self ecCopyright], cmdVersion(nil));
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2925,14 +2925,14 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
{
|
{
|
||||||
if (0 != setuid(uid))
|
if (0 != setuid(uid))
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"You must be '%@' to run this.", cmdUser);
|
NSLog(@"You must be '%@' to run this.", cmdUser);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"You must be '%@' to run this.", cmdUser);
|
NSLog(@"You must be '%@' to run this.", cmdUser);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -2940,7 +2940,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
GSSetUserName(cmdUser);
|
GSSetUserName(cmdUser);
|
||||||
if (NO == [cmdUser isEqualToString: NSUserName()])
|
if (NO == [cmdUser isEqualToString: NSUserName()])
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"You must be '%@' to run this.", cmdUser);
|
NSLog(@"You must be '%@' to run this.", cmdUser);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3072,7 +3072,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
{
|
{
|
||||||
if ([mgr fileExistsAtPath: str isDirectory: &flag] == NO)
|
if ([mgr fileExistsAtPath: str isDirectory: &flag] == NO)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"Unable to create directory - %@", str);
|
NSLog(@"Unable to create directory - %@", str);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3084,7 +3084,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
}
|
}
|
||||||
if (flag == NO)
|
if (flag == NO)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"The path '%@' is not a directory", str);
|
NSLog(@"The path '%@' is not a directory", str);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3165,7 +3165,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
{
|
{
|
||||||
if ([mgr fileExistsAtPath: str isDirectory: &flag] == NO)
|
if ([mgr fileExistsAtPath: str isDirectory: &flag] == NO)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"Unable to create directory - %@", str);
|
NSLog(@"Unable to create directory - %@", str);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3177,14 +3177,14 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
}
|
}
|
||||||
if (flag == NO)
|
if (flag == NO)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"The path '%@' is not a directory", str);
|
NSLog(@"The path '%@' is not a directory", str);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([mgr changeCurrentDirectoryPath: str] == NO)
|
if ([mgr changeCurrentDirectoryPath: str] == NO)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"Unable to move to directory - %@", str);
|
NSLog(@"Unable to move to directory - %@", str);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3194,7 +3194,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
*/
|
*/
|
||||||
if ([self cmdDataDirectory] == nil)
|
if ([self cmdDataDirectory] == nil)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"Unable to create/access data directory");
|
NSLog(@"Unable to create/access data directory");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3204,7 +3204,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
*/
|
*/
|
||||||
if (cmdLogsDir(nil) == nil)
|
if (cmdLogsDir(nil) == nil)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
NSLog(@"Unable to create/access logs directory");
|
NSLog(@"Unable to create/access logs directory");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3235,7 +3235,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
hdl = [self cmdLogFile: cmdDebugName];
|
hdl = [self cmdLogFile: cmdDebugName];
|
||||||
if (hdl == nil)
|
if (hdl == nil)
|
||||||
{
|
{
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3272,12 +3272,12 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
if (YES == [self cmdIsClient] && nil == [self cmdNewServer])
|
if (YES == [self cmdIsClient] && nil == [self cmdNewServer])
|
||||||
{
|
{
|
||||||
NSLog(@"Giving up - unable to contact '%@' server on '%@'",
|
NSLog(@"Giving up - unable to contact '%@' server on '%@'",
|
||||||
prcCommandName(), prcCommandHost());
|
ecCommandName(), ecCommandHost());
|
||||||
[self release];
|
[self release];
|
||||||
self = nil;
|
self = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[prcLock unlock];
|
[ecLock unlock];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finally, put self in background.
|
* Finally, put self in background.
|
||||||
|
@ -3651,15 +3651,15 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
}
|
}
|
||||||
if (YES == newMinute)
|
if (YES == newMinute)
|
||||||
{
|
{
|
||||||
[self prcNewMinute: now];
|
[self ecNewMinute: now];
|
||||||
}
|
}
|
||||||
if (YES == newHour)
|
if (YES == newHour)
|
||||||
{
|
{
|
||||||
[self prcNewHour: now];
|
[self ecNewHour: now];
|
||||||
}
|
}
|
||||||
if (YES == newDay)
|
if (YES == newDay)
|
||||||
{
|
{
|
||||||
[self prcNewDay: now];
|
[self ecNewDay: now];
|
||||||
}
|
}
|
||||||
if (cmdTimSelector != 0)
|
if (cmdTimSelector != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue