+ void help(int k)

This commit is contained in:
phyto 2019-05-22 14:21:57 +02:00
parent b986b8407d
commit af0cf9d2e3
2 changed files with 40 additions and 1 deletions

2
.gitignore vendored
View File

@ -26,6 +26,8 @@ viz/curses/t
viz/gnuplot/*.png viz/gnuplot/*.png
viz/*.a viz/*.a
storage/t
audio/t audio/t
audio/*.wav audio/*.wav

View File

@ -1,7 +1,44 @@
/*
* phytotron - outil de gestion des datas
*/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int verbosity;
/* --------------------------------------------------------------- */
void help(int k)
{
puts("options : ");
puts("\t-K\tset the K parameter.");
puts("\t-v\tincrease verbosity.");
exit(0);
}
/* --------------------------------------------------------------- */
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
fprintf(stderr, "storage tool\n"); int opt, foo;
int K = 0;
// char ligne[100];
while ((opt = getopt(argc, argv, "hKv")) != -1) {
switch (opt) {
case 'h': help(0); break;
case 'K': K = atoi(optarg); break;
case 'v': verbosity++; break;
default: break;
}
}
fprintf(stderr, "*** storage tool %s %s\n", __DATE__, __TIME__);
return 0; return 0;
} }
/* --------------------------------------------------------------- */