static void
process_args(int argc, char *argv[])
{
- char c, *cp, *endptr;
+ char *cp, *endptr;
int i, index, offset, tmpend, rc;
char tmp[16];
FILE * seed_file;
*++cp = ':';
}
- while ((c = getopt_long(argc,argv, shortOpts, longOpts,&index)) != -1) {
- switch (c) {
+ while ((rc = getopt_long(argc,argv, shortOpts, longOpts,&index)) != -1) {
+ switch (rc) {
case OPEN:
openflags &= ~(O_CREAT|O_EXCL);
case CREATE:
"specified: --%s\n",
longOpts[index].name);
}
- mode = c;
+ mode = rc;
cmd = (char *)longOpts[index].name;
break;
case NOEXCL:
"--lookup, --open, or --stat.\n",
(char *)longOpts[index].name);
}
- order = c;
+ order = rc;
break;
case IGNORE:
++ignore;
int main(int argc, char *argv[])
{
- char c;
- int i, iterations = 1;
+ int i, iterations = 1, c;
setbuf(stdout, 0);
setbuf(stderr, 0);
int main(int argc, char ** argv)
{
- long i, c, count, iter = LONG_MAX, mode = 0, offset;
- long int start, length = LONG_MAX, last, rc = 0;
+ long i, count, iter = LONG_MAX, mode = 0, offset;
+ long int start, length = LONG_MAX, last;
char parent[4096], *t;
char *prog = argv[0], *base;
- int seed = 0;
+ int seed = 0, rc;
int fd = -1;
- while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
+ while ((rc = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
char *e;
- switch (c) {
+ switch (rc) {
case 'r':
seed = strtoul(optarg, &e, 0);
if (*e) {
case 'e':
case 'l':
case 's':
- mode = c;
+ mode = rc;
break;
case '0':
case '1':
case '8':
case '9':
if (length == LONG_MAX)
- length = c - '0';
+ length = rc - '0';
else
- length = length * 10 + (c - '0');
+ length = length * 10 + (rc - '0');
break;
case 'h':
usage(prog, stdout);
void *changelog_priv;
struct changelog_rec *rec;
long long startrec = 0, endrec = 0;
- char c, *mdd;
+ char *mdd;
struct option long_opts[] = {
{"follow", no_argument, 0, 'f'},
{0, 0, 0, 0}
int rc, follow = 0;
optind = 0;
- while ((c = getopt_long(argc, argv, short_opts,
+ while ((rc = getopt_long(argc, argv, short_opts,
long_opts, NULL)) != -1) {
- switch (c) {
+ switch (rc) {
case 'f':
follow++;
break;
{"rec", required_argument, 0, 'r'},
{0, 0, 0, 0}
};
- char c, short_opts[] = "cl:r:";
+ char short_opts[] = "cl:r:";
char *device, *fid, *path;
long long recno = -1;
int linkno = -1;
int rc;
optind = 0;
- while ((c = getopt_long(argc, argv, short_opts,
+
+ while ((rc = getopt_long(argc, argv, short_opts,
long_opts, NULL)) != -1) {
- switch (c) {
+ switch (rc) {
case 'c':
printcur++;
break;
return CMD_HELP;
}
}
-
device = argv[optind++];
fid = argv[optind++];
if (optind != argc)
FILE *countfile = NULL;
char filecount[PATH_MAX];
unsigned long dir_num = 0, dir_num_orig = 0;/* starting directory */
- char c;
+ int c;
progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/') + 1 : argv[0];
- while ((c = (char)getopt_long(argc, argv, "t:rwvplo:h",
+ while ((c = getopt_long(argc, argv, "t:rwvplo:h",
longopts, NULL)) != -1) {
switch (c) {
case 'c':
int main(int argc, char *argv[])
{
- char c;
int newsize;
int numtargets = 0;
int rc = 0;
if ((rc = lr_init_status()) != 0)
return rc;
- while ((c = getopt_long(argc, argv, "as:t:m:u:l:vx:zc:ry:n:d:",
+ while ((rc = getopt_long(argc, argv, "as:t:m:u:l:vx:zc:ry:n:d:",
long_opts, NULL)) >= 0) {
- switch (c) {
+ switch (rc) {
case 'a':
/* Assume absolute paths */
abort_on_err++;