parent
9c845b5d04
commit
b8d86da9a0
@ -0,0 +1,34 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../floatimg.h"
|
||||
|
||||
int verbosity;
|
||||
/* --------------------------------------------------------------------- */
|
||||
void help(int v)
|
||||
{
|
||||
puts("options :");
|
||||
puts("\t-v\tincrease verbosity");
|
||||
puts("\t-o\tname of output file");
|
||||
|
||||
if (verbosity) { puts(""); fimg_print_version(1); }
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int foo;
|
||||
int opt;
|
||||
char *output_file = "noname.fimg";
|
||||
|
||||
while ((opt = getopt(argc, argv, "ho:v")) != -1) {
|
||||
switch(opt) {
|
||||
case 'h': help(0); break;
|
||||
case 'o': output_file = optarg; break;
|
||||
case 'v': verbosity++; break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
Loading…
Reference in new issue