mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16704 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1d6f162285
commit
e11c5887a6
15 changed files with 125 additions and 125 deletions
|
@ -557,7 +557,7 @@ main(int argc, char **argv, char **env)
|
|||
NSLog(@"ERROR: The GNUstep Base Library was built\n"
|
||||
@" without an available libxml library. Autogsdoc needs the libxml\n"
|
||||
@" library to function. Aborting");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
defs = [NSUserDefaults standardUserDefaults];
|
||||
|
@ -604,7 +604,7 @@ main(int argc, char **argv, char **env)
|
|||
if (proc == nil)
|
||||
{
|
||||
NSLog(@"unable to get process information!");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -617,7 +617,7 @@ main(int argc, char **argv, char **env)
|
|||
if (files == nil)
|
||||
{
|
||||
NSLog(@"Failed to load files from '%@'", obj);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
firstFile = 0; // Not an argument list ... read from index 0
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"defaults: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
@ -97,7 +97,7 @@ main(int argc, char** argv, char **env)
|
|||
NSLog(@"defaults: unable to find encoding '%@'!\n"
|
||||
@"Known encoding names are -\n%@", n, names);
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
@ -116,7 +116,7 @@ main(int argc, char** argv, char **env)
|
|||
"defaults help\n"
|
||||
" list options fo the defaults command.\n\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
else if ([[args objectAtIndex: i] isEqual: @"plist"])
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ main(int argc, char** argv, char **env)
|
|||
" Checksum = <01014b5b 123a8b20>\n"
|
||||
"}'\n\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if ([[args objectAtIndex: i] isEqual: @"-u"])
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: no name supplied for -u option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
if (user)
|
||||
|
@ -208,7 +208,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: unable to access defaults database!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
/* We don't want this tool in the defaults database - so remove it. */
|
||||
[defs removePersistentDomainForName: [proc processName]];
|
||||
|
@ -217,7 +217,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if ([[args objectAtIndex: i] isEqual: @"read"] ||
|
||||
|
@ -247,7 +247,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
owner = nil;
|
||||
name = [args objectAtIndex: i];
|
||||
|
@ -367,7 +367,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
printf("defaults write: invalid input - nul domain name\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
for (str = start; *str; str++)
|
||||
{
|
||||
|
@ -376,7 +376,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"space in domain name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
owner = [NSString stringWithCString: start];
|
||||
|
@ -403,7 +403,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"nul default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
for (str = start; *str; str++)
|
||||
{
|
||||
|
@ -412,7 +412,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"space in default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
name = [NSString stringWithCString: start];
|
||||
|
@ -448,7 +448,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: fatal error - "
|
||||
"out of memory.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
if (fgets(ptr, BUFSIZ, stdin) == 0)
|
||||
|
@ -456,7 +456,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"no final quote.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
if (*ptr == '\'')
|
||||
|
@ -489,7 +489,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"empty property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -506,7 +506,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"bad property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: no dictionary or key for write!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
name = [args objectAtIndex: i++];
|
||||
if ([args count] > i)
|
||||
|
@ -549,7 +549,7 @@ main(int argc, char** argv, char **env)
|
|||
printf("defaults write: invalid input - "
|
||||
"bad property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -574,7 +574,7 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr,
|
||||
@"defaults write: domain is not a dictionary!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
printf("defaults delete: invalid input\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
owner = [NSString stringWithCString: start];
|
||||
start = ptr;
|
||||
|
@ -636,7 +636,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
printf("defaults delete: invalid input\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
name = [NSString stringWithCString: start];
|
||||
domain = [[defs persistentDomainForName: owner] mutableCopy];
|
||||
|
@ -705,7 +705,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: no arguments for find!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
name = [args objectAtIndex: i];
|
||||
|
||||
|
@ -763,6 +763,6 @@ main(int argc, char** argv, char **env)
|
|||
}
|
||||
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ main(int argc, char** argv)
|
|||
if (proc == nil) {
|
||||
NSLog(@"unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
@ -81,7 +81,7 @@ main(int argc, char** argv)
|
|||
"dread [-u uname] key\n"
|
||||
" read default named 'key' from the global domain.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ main(int argc, char** argv)
|
|||
if ([args count] <= i) {
|
||||
NSLog(@"too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if ([[args objectAtIndex: i] isEqual: @"-u"]) {
|
||||
|
@ -99,14 +99,14 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no name supplied for -u option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
if ([args count] <= i) {
|
||||
NSLog(@"too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if ([[args objectAtIndex: i] isEqual: @"-g"]) {
|
||||
|
@ -117,7 +117,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no key supplied for -g option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
else if ([[args objectAtIndex: i] isEqual: @"-n"]) {
|
||||
|
@ -128,7 +128,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no key supplied for -n option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
else if ([[args objectAtIndex: i] isEqual: @"-o"]) {
|
||||
|
@ -139,7 +139,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no domain name supplied for -o option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
else if ([[args objectAtIndex: i] isEqual: @"-l"]) {
|
||||
|
@ -166,7 +166,7 @@ main(int argc, char** argv)
|
|||
if (defs == nil) {
|
||||
NSLog(@"unable to access defaults database!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
/* We don't want dwrite in the defaults database - so remove it. */
|
||||
[defs removePersistentDomainForName: [proc processName]];
|
||||
|
@ -232,7 +232,7 @@ main(int argc, char** argv)
|
|||
}
|
||||
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ main(int argc, char** argv)
|
|||
if (proc == nil) {
|
||||
NSLog(@"unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
@ -73,7 +73,7 @@ main(int argc, char** argv)
|
|||
" default key pairs to be removed. Domain names and default keys must be\n"
|
||||
" separated by spaces.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no name supplied for -u option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ main(int argc, char** argv)
|
|||
if (defs == nil) {
|
||||
NSLog(@"unable to access defaults database!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if ([args count] == i) {
|
||||
|
@ -123,7 +123,7 @@ main(int argc, char** argv)
|
|||
if (*start == '\0') {
|
||||
printf("dremove: invalid input\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
owner = [NSString stringWithCString: start];
|
||||
start = ptr;
|
||||
|
@ -141,7 +141,7 @@ main(int argc, char** argv)
|
|||
if (*start == '\0') {
|
||||
printf("dremove: invalid input\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
name = [NSString stringWithCString: start];
|
||||
domain = [[defs persistentDomainForName: owner] mutableCopy];
|
||||
|
@ -163,7 +163,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no key supplied for -g option.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
domain = [[defs persistentDomainForName: owner] mutableCopy];
|
||||
if (domain == nil || [domain objectForKey: name] == nil) {
|
||||
|
@ -182,7 +182,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no domain supplied for -o option.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
[defs removePersistentDomainForName: owner];
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ main(int argc, char** argv)
|
|||
NSLog(@"got app name '%s' but no variable name.\n",
|
||||
[[args objectAtIndex: 0] cString]);
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ main(int argc, char** argv)
|
|||
}
|
||||
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ main(int argc, char** argv)
|
|||
if (proc == nil) {
|
||||
NSLog(@"unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
@ -77,7 +77,7 @@ main(int argc, char** argv)
|
|||
" written. Domain names, default keys, and default values must be\n"
|
||||
" separated on each line by spaces.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"no name supplied for -u option!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ main(int argc, char** argv)
|
|||
if (defs == nil) {
|
||||
NSLog(@"unable to access defaults database!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
/* We don't want dwrite in the defaults database - so remove it. */
|
||||
[defs removePersistentDomainForName: [proc processName]];
|
||||
|
@ -130,13 +130,13 @@ main(int argc, char** argv)
|
|||
if (*start == '\0') {
|
||||
printf("dwrite: invalid input - nul domain name\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
for (str = start; *str; str++) {
|
||||
if (isspace(*str)) {
|
||||
printf("dwrite: invalid input - space in domain name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
owner = [NSString stringWithCString: start];
|
||||
|
@ -155,13 +155,13 @@ main(int argc, char** argv)
|
|||
if (*start == '\0') {
|
||||
printf("dwrite: invalid input - nul default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
for (str = start; *str; str++) {
|
||||
if (isspace(*str)) {
|
||||
printf("dwrite: invalid input - space in default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
name = [NSString stringWithCString: start];
|
||||
|
@ -173,7 +173,7 @@ main(int argc, char** argv)
|
|||
if (fgets(ptr, sizeof(buf) - (ptr-buf), stdin) == 0) {
|
||||
printf("dwrite: invalid input - no final quote.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
if (*ptr == '\'') {
|
||||
|
@ -199,7 +199,7 @@ main(int argc, char** argv)
|
|||
if (*start == '\0') {
|
||||
printf("dwrite: invalid input - empty property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
obj = [NSString stringWithCString: start];
|
||||
if (*start == '(' || *start == '{' || *start == '<') {
|
||||
|
@ -208,7 +208,7 @@ main(int argc, char** argv)
|
|||
if (tmp == nil) {
|
||||
printf("dwrite: invalid input - bad property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
else {
|
||||
obj = tmp;
|
||||
|
@ -231,7 +231,7 @@ main(int argc, char** argv)
|
|||
if (isspace(*str)) {
|
||||
printf("dwrite: invalid input - space in default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
value = [args objectAtIndex: ++i];
|
||||
|
@ -245,7 +245,7 @@ main(int argc, char** argv)
|
|||
if (obj == nil) {
|
||||
printf("dwrite: invalid input - bad property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
domain = [[defs persistentDomainForName: owner] mutableCopy];
|
||||
if (domain == nil) {
|
||||
|
@ -257,7 +257,7 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -267,7 +267,7 @@ main(int argc, char** argv)
|
|||
if (isspace(*str)) {
|
||||
printf("dwrite: invalid input - space in domain name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
name = [args objectAtIndex: ++i];
|
||||
|
@ -275,7 +275,7 @@ main(int argc, char** argv)
|
|||
if (isspace(*str)) {
|
||||
printf("dwrite: invalid input - space in default name.\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
value = [args objectAtIndex: ++i];
|
||||
|
@ -289,7 +289,7 @@ main(int argc, char** argv)
|
|||
if (obj == nil) {
|
||||
printf("dwrite: invalid input - bad property list\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
domain = [[defs persistentDomainForName: owner] mutableCopy];
|
||||
if (domain == nil) {
|
||||
|
@ -301,14 +301,14 @@ main(int argc, char** argv)
|
|||
else {
|
||||
NSLog(@"too few arguments supplied!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
[defs synchronize];
|
||||
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
12
Tools/gdnc.m
12
Tools/gdnc.m
|
@ -419,7 +419,7 @@
|
|||
if (connection == conn)
|
||||
{
|
||||
NSLog(@"argh - gdnc server root connection has been destroyed.");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -826,9 +826,9 @@ main(int argc, char** argv, char** env)
|
|||
if (_spawnv(_P_NOWAIT, argv[0], a) == -1)
|
||||
{
|
||||
fprintf(stderr, "gdnc - spawn failed - bye.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
#else
|
||||
if (shouldFork)
|
||||
|
@ -837,7 +837,7 @@ main(int argc, char** argv, char** env)
|
|||
{
|
||||
case -1:
|
||||
fprintf(stderr, "gdnc - fork failed - bye.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
case 0:
|
||||
/*
|
||||
|
@ -851,7 +851,7 @@ main(int argc, char** argv, char** env)
|
|||
break;
|
||||
|
||||
default:
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
#endif /* !MINGW */
|
||||
|
@ -891,6 +891,6 @@ main(int argc, char** argv, char** env)
|
|||
[[NSRunLoop currentRunLoop] run];
|
||||
RELEASE(pool);
|
||||
}
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ gdomap_log (int prio)
|
|||
fprintf (stderr, "exiting.\n");
|
||||
fflush (stderr);
|
||||
}
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -302,7 +302,7 @@ gdomap_log (int prio)
|
|||
{
|
||||
fprintf (stderr, "exiting.\n");
|
||||
fflush (stderr);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1083,7 +1083,7 @@ init_iface()
|
|||
{
|
||||
sprintf(ebuf, "Failed to get a socket. Error %s\n", WSAGetLastError());
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset((void*)InterfaceList, '\0', sizeof(InterfaceList));
|
||||
|
@ -1092,7 +1092,7 @@ init_iface()
|
|||
{
|
||||
sprintf(ebuf, "Failed WSAIoctl. Error %s\n", WSAGetLastError());
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
nNumInterfaces = nBytesReturned / sizeof(INTERFACE_INFO);
|
||||
|
@ -1190,7 +1190,7 @@ init_iface()
|
|||
if ((desc = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
||||
{
|
||||
perror("socket for init_iface");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#if defined(__svr4__)
|
||||
{
|
||||
|
@ -1237,7 +1237,7 @@ init_iface()
|
|||
gdomap_log(LOG_INFO);
|
||||
}
|
||||
close(desc);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/*
|
||||
* We cannot know the number of interfaces in advance, thus we
|
||||
|
@ -1305,7 +1305,7 @@ init_iface()
|
|||
"gdomap to manually set the interface addresses and masks to be used.");
|
||||
gdomap_log(LOG_INFO);
|
||||
close(desc);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
addr[interfaces] =
|
||||
((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr;
|
||||
|
@ -1377,7 +1377,7 @@ init_iface()
|
|||
sprintf(ebuf, "I can't find any network interfaces on this platform - "
|
||||
"use the '-a' flag to load interface details from a file instead.");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1397,7 +1397,7 @@ load_iface(const char* from)
|
|||
{
|
||||
sprintf(ebuf, "Unable to open address config - '%s'", from);
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
while (fgets(buf, sizeof(buf), fptr) != 0)
|
||||
|
@ -1451,7 +1451,7 @@ load_iface(const char* from)
|
|||
{
|
||||
sprintf(ebuf, "No network interfaces found");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
num_iface++;
|
||||
addr = (struct in_addr*)malloc((num_iface+1)*IASIZE);
|
||||
|
@ -1648,7 +1648,7 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to create UDP socket");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else if (debug)
|
||||
{
|
||||
|
@ -1685,7 +1685,7 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to handle UDP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#else /* !__MINGW__ */
|
||||
if ((r = fcntl(udp_desc, F_GETFL, 0)) >= 0)
|
||||
|
@ -1695,14 +1695,14 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to set UDP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(ebuf, "Unable to handle UDP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
@ -1726,7 +1726,7 @@ init_ports()
|
|||
"privilege (poor option and last resort!!!)");
|
||||
gdomap_log(LOG_INFO);
|
||||
}
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1741,7 +1741,7 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to create TCP socket");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else if (debug)
|
||||
{
|
||||
|
@ -1769,7 +1769,7 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to handle TCP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#else /* !__MINGW__ */
|
||||
if ((r = fcntl(tcp_desc, F_GETFL, 0)) >= 0)
|
||||
|
@ -1779,14 +1779,14 @@ init_ports()
|
|||
{
|
||||
sprintf(ebuf, "Unable to set TCP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(ebuf, "Unable to handle TCP socket non-blocking");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif /* __MINGW__ */
|
||||
|
||||
|
@ -1807,13 +1807,13 @@ init_ports()
|
|||
"privilege (poor option and last resort!!!)");
|
||||
gdomap_log(LOG_INFO);
|
||||
}
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (listen(tcp_desc, QUEBACKLOG) < 0)
|
||||
{
|
||||
sprintf(ebuf, "Unable to listen for connections on TCP socket");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2281,7 +2281,7 @@ handle_io()
|
|||
{
|
||||
sprintf(ebuf, "Fatal error on socket.");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2299,7 +2299,7 @@ handle_io()
|
|||
{
|
||||
sprintf(ebuf, "Interrupted in select.");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (rval == 0)
|
||||
|
@ -4178,7 +4178,7 @@ main(int argc, char** argv)
|
|||
printf("Kill with SIGUSR1 to obtain a dump of all known peers\n");
|
||||
printf("in /tmp/gdomap.dump\n");
|
||||
printf("\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
case 'C':
|
||||
printf("\n");
|
||||
|
@ -4223,7 +4223,7 @@ printf(
|
|||
"network interfaces and masks, please send me example code so that I can\n"
|
||||
"implement it in gdomap.\n");
|
||||
printf("\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
case 'L':
|
||||
lookupf = optarg;
|
||||
|
@ -4248,7 +4248,7 @@ printf(
|
|||
fprintf(stderr, "Registration will take place locally.\n");
|
||||
}
|
||||
doregister(optarg, port, ptype);
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
case 'T':
|
||||
if (strcmp(optarg, "tcp_gdo") == 0)
|
||||
|
@ -4282,7 +4282,7 @@ printf(
|
|||
fprintf(stderr, "Operation will take place locally.\n");
|
||||
}
|
||||
unregister(optarg, port, ptype);
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
case 'a':
|
||||
load_iface(optarg);
|
||||
|
@ -4301,7 +4301,7 @@ printf(
|
|||
{
|
||||
fprintf(stderr, "Unable to open probe config - '%s'\n",
|
||||
optarg);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
while (fgets(buf, sizeof(buf), fptr) != 0)
|
||||
{
|
||||
|
@ -4418,7 +4418,7 @@ printf(
|
|||
default:
|
||||
printf("%s - GNU Distributed Objects name server\n", argv[0]);
|
||||
printf("-H for help\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
if (donamesf || lookupf)
|
||||
|
@ -4445,14 +4445,14 @@ printf(
|
|||
if (_spawnv(_P_NOWAIT, argv[0], a) == -1)
|
||||
{
|
||||
fprintf(stderr, "gdomap - spawn '%s' failed - bye.\n", argv[0]);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (debug)
|
||||
{
|
||||
sprintf(ebuf, "initialisation complete.");
|
||||
gdomap_log(LOG_DEBUG);
|
||||
}
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
#else
|
||||
if (nofork == 0)
|
||||
|
@ -4465,7 +4465,7 @@ printf(
|
|||
{
|
||||
case -1:
|
||||
fprintf(stderr, "gdomap - fork failed - bye.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
case 0:
|
||||
/*
|
||||
|
@ -4484,7 +4484,7 @@ printf(
|
|||
sprintf(ebuf, "initialisation complete.");
|
||||
gdomap_log(LOG_DEBUG);
|
||||
}
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4506,21 +4506,21 @@ printf(
|
|||
sprintf(ebuf, "failed to open stdin from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (open("/dev/null", O_WRONLY) != 1)
|
||||
{
|
||||
sprintf(ebuf, "failed to open stdout from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (is_daemon && open("/dev/null", O_WRONLY) != 2)
|
||||
{
|
||||
sprintf(ebuf, "failed to open stderr from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (debug)
|
||||
{
|
||||
|
@ -4560,7 +4560,7 @@ printf(
|
|||
"127.0.0.1 - you need to change the 'MAX_IFACE' constant in gdomap.c and "
|
||||
"rebuild it.");
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4581,7 +4581,7 @@ printf(
|
|||
{
|
||||
sprintf(ebuf, "Unable to open pid file - '%s'", pidfile);
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fprintf(fptr, "%d\n", (int) getpid());
|
||||
fclose(fptr);
|
||||
|
|
|
@ -52,7 +52,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"plmerge: unable to get process information!");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [procinfo arguments];
|
||||
|
@ -62,7 +62,7 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr, @"Usage: %@ input-file [destination-file]\n",
|
||||
[procinfo processName]);
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
sourceName = [args objectAtIndex: 1];
|
||||
|
@ -92,7 +92,7 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr,
|
||||
@"The source property list must contain an NSDictionary.\n");
|
||||
[pool release];
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fileContents = [NSMutableString stringWithCapacity: 200];
|
||||
|
@ -153,5 +153,5 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr, @"Error writing property list to '%@'\n", destName);
|
||||
}
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"pldes: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
|
|
@ -48,7 +48,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"plmerge: unable to get process information!");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [procinfo arguments];
|
||||
|
@ -58,7 +58,7 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr, @"Usage: %@ [destination-file] [input-file ...]\n",
|
||||
[procinfo processName]);
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
destName = [args objectAtIndex: 1];
|
||||
|
@ -81,7 +81,7 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr,
|
||||
@"The destination property list must contain an NSDictionary.\n");
|
||||
[pool release];
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -131,5 +131,5 @@ main(int argc, char** argv, char **env)
|
|||
GSPrintf(stderr, @"Error writing property list to '%@'\n", destName);
|
||||
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"plparse: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
|
|
@ -48,7 +48,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
NSLog(@"plser: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
|
|
@ -118,7 +118,7 @@ main(int argc, char** argv, char **env)
|
|||
{
|
||||
GSPrintf(stderr, @"defaults: unable to get process information!\n");
|
||||
[pool release];
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
args = [proc arguments];
|
||||
|
|
|
@ -72,14 +72,14 @@ main(int argc, char **argv, char **env)
|
|||
NSLog(@"ERROR: The GNUstep Base Library was built\n"
|
||||
@" without an available libxml library. xmlparse needs the libxml\n"
|
||||
@" library to function. Aborting");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
proc = [NSProcessInfo processInfo];
|
||||
if (proc == nil)
|
||||
{
|
||||
NSLog(@"unable to get process information!");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
files = [proc arguments];
|
||||
|
|
Loading…
Reference in a new issue