const char *basefile = 0;
char *proddir = 0;
const char *attribute = 0;
+ char *outfile = 0;
/*
* parse arguments
*/
- while ((c = getopt(argc, argv, "Pa:hnxb:r:p:")) >= 0)
+ while ((c = getopt(argc, argv, "Pa:hnxb:r:p:o:")) >= 0)
switch (c)
{
case 'h':
case 'x':
extrapool = 1;
break;
+ case 'o':
+ outfile = optarg;
+ break;
default:
usage(1);
}
+ if (outfile && !freopen(outfile, "w", stdout))
+ {
+ perror(outfile);
+ exit(1);
+ }
+
/*
* ???
*/