From af0cf9d2e3a83abe47b2618bae7a4e5e8c4b5bdf Mon Sep 17 00:00:00 2001 From: phyto Date: Wed, 22 May 2019 14:21:57 +0200 Subject: [PATCH] + void help(int k) --- .gitignore | 2 ++ storage/t.c | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d140377..eb0d995 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ viz/curses/t viz/gnuplot/*.png viz/*.a +storage/t + audio/t audio/*.wav diff --git a/storage/t.c b/storage/t.c index 8a4d9c0..9a222b4 100644 --- a/storage/t.c +++ b/storage/t.c @@ -1,7 +1,44 @@ +/* + * phytotron - outil de gestion des datas + */ + #include +#include +#include + +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[]) { -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; } + +/* --------------------------------------------------------------- */ +