2019-10-30 15:31:38 +11:00
|
|
|
/*
|
|
|
|
* NcLooper test des fonctions fichier (???)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
2019-11-01 01:47:54 +11:00
|
|
|
#include <ctype.h>
|
|
|
|
|
2019-11-04 04:58:21 +11:00
|
|
|
#include "../nclooper.h"
|
|
|
|
#include "smpllist.h"
|
2019-11-01 01:47:54 +11:00
|
|
|
#include "ffuncs.h"
|
2019-10-30 15:31:38 +11:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
|
2019-11-01 01:47:54 +11:00
|
|
|
int verbosity;
|
2019-10-30 15:31:38 +11:00
|
|
|
|
2019-11-04 04:58:21 +11:00
|
|
|
SampleRef the_samples[26];
|
2019-10-30 15:31:38 +11:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
void help(int k)
|
|
|
|
{
|
|
|
|
puts("Test des fonctions de gestion des fichiers");
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int foo;
|
|
|
|
int opt;
|
|
|
|
char *listname = "samples.list";
|
|
|
|
|
2019-11-04 04:58:21 +11:00
|
|
|
while ((opt = getopt(argc, argv, "hl:v")) != -1) {
|
2019-10-30 15:31:38 +11:00
|
|
|
switch(opt) {
|
|
|
|
case 'h': help(0); break;
|
|
|
|
case 'v': verbosity++; break;
|
2019-11-04 04:58:21 +11:00
|
|
|
case 'l': listname = optarg; break;
|
2019-10-30 15:31:38 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if DEBUG_LEVEL
|
|
|
|
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
|
|
|
|
#endif
|
|
|
|
|
2019-11-04 04:58:21 +11:00
|
|
|
foo = lecture_liste_des_samples(listname, the_samples);
|
|
|
|
fprintf(stderr,"retour lecture liste '%s' -> %d\n", listname, foo);
|
|
|
|
|
2019-12-24 04:01:10 +11:00
|
|
|
affiche_liste_des_samples(the_samples);
|
2019-10-30 15:31:38 +11:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/* --------------------------------------------------------------------- */
|