NcLooper/main.c

60 lines
1.3 KiB
C
Raw Normal View History

2019-11-03 18:58:21 +01:00
/*
* NcLooper test des fonctions fichier (???)
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include "nclooper.h"
// #include "files/smpllist.h"
// #include "files/ffuncs.h"
/* --------------------------------------------------------------------- */
int verbosity;
SampleRef the_samples[26];
/* --------------------------------------------------------------------- */
void help(int k)
{
puts("NcLooper : version pas finie...");
exit(0);
}
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
int opt;
char *listname = "samples.list";
while ((opt = getopt(argc, argv, "hl:v")) != -1) {
switch(opt) {
case 'h': help(0); break;
case 'v': verbosity++; break;
case 'l': listname = optarg; break;
}
}
#if DEBUG_LEVEL
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
#endif
foo = lecture_liste_des_samples(listname, the_samples);
fprintf(stderr,"retour lecture liste '%s' -> %d\n", listname, foo);
for (foo=0; foo<26; foo++) {
printf("%3d %02x %s\n", foo, the_samples[foo].key,
the_samples[foo].text);
}
return 0;
}
/* --------------------------------------------------------------------- */