#include "fortune-util.h"
-static void getargs(char *av[])
+static void getargs(char *argv[])
{
- av += optind + 1;
+ argv += optind + 1;
- if (*av)
+ if (*argv)
{
- input_filename = *av;
+ input_filename = *argv;
input_fn_2_data_fn();
}
else
fflush(stdout);
}
-int main(int ac GCC_UNUSED, char **av)
+int main(int argc GCC_UNUSED, char **argv)
{
static STRFILE tbl; /* description table */
- getargs(av);
+ getargs(argv);
if (!(Inf = fopen(input_filename, "r")))
{
perror(input_filename);
* CHUNKSIZE blocks; if the latter, we just write each pointer,
* and then seek back to the beginning to write in the table.
*/
-int main(int ac, char **av)
+int main(int argc, char **argv)
{
char *sp;
FILE *inf, *outf;
bool len_was_set = false;
- getargs(ac, av); /* evalute arguments */
+ getargs(argc, argv); /* evalute arguments */
if (!(inf = fopen(input_filename, "r")))
{
perror(input_filename);
#include "fortune-util.h"
/* ARGSUSED */
-static void getargs(int ac, char *av[])
+static void getargs(int argc, char *argv[])
{
int ch;
- while ((ch = getopt(ac, av, "c:")) != EOF)
+ while ((ch = getopt(argc, argv, "c:")) != EOF)
switch (ch)
{
case 'c':
exit(1);
}
- av += optind;
+ argv += optind;
- if (*av)
+ if (*argv)
{
- input_filename = *av;
+ input_filename = *argv;
input_fn_2_data_fn();
- set_output_filename(*++av);
+ set_output_filename(*++argv);
}
else
{
}
}
-int main(int ac, char **av)
+int main(int argc, char **argv)
{
static STRFILE tbl; /* description table */
- getargs(ac, av);
+ getargs(argc, argv);
if (!(Inf = fopen(input_filename, "r")))
{
perror(input_filename);