forked from tTh/FloatImg
35 lines
780 B
C
35 lines
780 B
C
|
#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;
|
||
|
}
|
||
|
/* --------------------------------------------------------------------- */
|