demo ncurses: + opt nb_loops
This commit is contained in:
parent
790e06c4cc
commit
ace7312470
@ -117,12 +117,15 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
int opt;
|
||||
int demonum = 0;
|
||||
int nb_loops = 200;
|
||||
|
||||
/* set some default values */
|
||||
verbosity = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "vy:")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "n:vy:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'n': nb_loops = atoi(optarg); break;
|
||||
|
||||
case 'v': verbosity++; break;
|
||||
|
||||
case 'y': demonum = atoi(optarg); break;
|
||||
@ -143,9 +146,9 @@ keypad(stdscr, TRUE); /* acces aux touches 'curseur' */
|
||||
fond_ecran(" Demonstrator ");
|
||||
|
||||
switch (demonum) {
|
||||
case 0: demo_vumetres(666, 0); break;
|
||||
case 1: demo_waterfall(666, 0); break;
|
||||
case 2: demo_7segments(4567, 0); break;
|
||||
case 0: demo_vumetres(nb_loops, 0); break;
|
||||
case 1: demo_waterfall(nb_loops, 0); break;
|
||||
case 2: demo_7segments(nb_loops, 0); break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user