int main(int argc, char **argv) {
int option, enable_x11, mesg_yes;
+ const char *argv0;
int ptm, pts;
char *name;
enable_x11 = 0;
mesg_yes = 0;
+ argv0 = argv[0];
+
/*
* Glibc violates POSIX by default and skips over non-option arguments and
* parses later arguments which look like options as well. But we want to
mesg_yes = 1;
break;
case 'h':
- usage(argv[0]);
+ usage(argv0);
break;
case 'v':
printf("%s%s\n",
break;
default:
fprintf(stderr, "%s: unknown option '%s'!\n\n",
- argv[0], argv[optind - 1]);
- usage(argv[0]);
+ argv0, argv[optind - 1]);
+ usage(argv0);
break;
}
}
/* No arguments remaining, abort. */
if (!argv[optind]) {
- usage(argv[0]);
+ usage(argv0);
}
/* Arguments for notification program. */
argv += optind;