#include "internal.h"
-static uid_t uid=-1;
-static gid_t gid=-1;
+static uid_t uid = -1;
+static gid_t gid = -1;
static int whichApp;
static char* invocationName=NULL;
static char* theMode=NULL;
if (argc < 2)
usage( appUsage);
- invocationName=*argv;
+ invocationName = *argv;
argc--;
argv++;
}
if ( whichApp == CHMOD_APP ) {
- theMode=*argv;
+ theMode = *argv;
} else {
/* Find the selected group */
}
} else {
if ( (date_fmt == NULL) && (strcmp(*argv, "+")==0) )
- date_fmt=*argv;
+ date_fmt = *argv;
else if (date_str == NULL) {
set_time = 1;
- date_str=*argv;
+ date_str = *argv;
} else {
usage ( date_usage);
}
}
} else {
if ( (date_fmt == NULL) && (strcmp(*argv, "+")==0) )
- date_fmt=*argv;
+ date_fmt = *argv;
else if (date_str == NULL) {
set_time = 1;
- date_str=*argv;
+ date_str = *argv;
} else {
usage ( date_usage);
}
argv++;
if ( argc > 0 && **argv != '-') {
- directory=*argv;
+ directory = *argv;
argc--;
argv++;
}
case 'n':
if (strcmp(*argv, "name")==0) {
if (argc-- > 1) {
- pattern=*(++argv);
- stopit=-TRUE;
+ pattern = *(++argv);
+ stopit=TRUE;
} else {
usage (find_usage);
}
argv++;
if ( argc > 0 && **argv != '-') {
- directory=*argv;
+ directory = *argv;
argc--;
argv++;
}
case 'n':
if (strcmp(*argv, "name")==0) {
if (argc-- > 1) {
- pattern=*(++argv);
- stopit=-TRUE;
+ pattern = *(++argv);
+ stopit=TRUE;
} else {
usage (find_usage);
}
}
#else
- static int log_fd=-1;
+ static int log_fd = -1;
/* Take full control of the log tty, and never close it.
* It's mine, all mine! Muhahahaha! */
device = CONSOLE;
}
else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
- log_fd=-1;
+ log_fd = -1;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
fflush(stderr);
return;
}
#else
- static int log_fd=-1;
+ static int log_fd = -1;
/* Take full control of the log tty, and never close it.
* It's mine, all mine! Muhahahaha! */
device = CONSOLE;
}
else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
- log_fd=-1;
+ log_fd = -1;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
fflush(stderr);
return;
message=buf;
} else {
if (argc>=1) {
- message=*argv;
+ message = *argv;
} else {
fprintf(stderr, "No message\n");
exit( FALSE);
}
} else {
if (device == NULL)
- device=*argv;
+ device = *argv;
else if (directory == NULL)
- directory=*argv;
+ directory = *argv;
else {
goto goodbye;
}
message=buf;
} else {
if (argc>=1) {
- message=*argv;
+ message = *argv;
} else {
fprintf(stderr, "No message\n");
exit( FALSE);
}
} else {
if (device == NULL)
- device=*argv;
+ device = *argv;
else if (directory == NULL)
- directory=*argv;
+ directory = *argv;
else {
goto goodbye;
}