FloatImg4PythonBinding/tools/cumulfimgs.c

35 lines
780 B
C
Raw Normal View History

2019-07-03 18:51:42 +02:00
#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;
}
/* --------------------------------------------------------------------- */