|
|
@ -7,7 +7,7 @@ |
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <strings.h> |
|
|
|
#include <string.h> |
|
|
|
#include <getopt.h> |
|
|
|
#include <ncurses.h> |
|
|
|
|
|
|
@ -42,23 +42,22 @@ float coef_w; |
|
|
|
static long iter; |
|
|
|
|
|
|
|
if (0 == (iter%10)) { |
|
|
|
memset(ligne, '-', TL); |
|
|
|
memset(ligne, '.', TL); |
|
|
|
} |
|
|
|
else { |
|
|
|
memset(ligne, ' ', TL); |
|
|
|
} |
|
|
|
for (foo=0; foo<500; foo+=10) { |
|
|
|
ligne[foo] = '|'; |
|
|
|
for (foo=0; foo<500; foo+=20) { |
|
|
|
ligne[foo] = '.'; |
|
|
|
} |
|
|
|
ligne[COLS-4] = '\0'; |
|
|
|
|
|
|
|
iter++; |
|
|
|
|
|
|
|
coef_w = (float)(COLS-2) / 1024.0; |
|
|
|
coef_w = (float)(COLS-3) / 1024.0; |
|
|
|
|
|
|
|
#if TRACE |
|
|
|
sprintf(ligne, "coef_w = %f\n", coef_w); |
|
|
|
waddstr(wf, ligne); waddch(wf, '\n'); |
|
|
|
#if TRACE > 1 |
|
|
|
fprintf(stderr, "COLS = %d, coef_w = %f\n", COLS, coef_w); |
|
|
|
#endif |
|
|
|
|
|
|
|
switch (mode) { |
|
|
@ -76,8 +75,15 @@ switch (mode) { |
|
|
|
tag = "ATOX"[foo]; |
|
|
|
idx = (int)(values[foo]*coef_w); |
|
|
|
ligne[idx] = tag; |
|
|
|
#if TRACE |
|
|
|
fprintf(stderr, "%c %3d ", tag, idx); |
|
|
|
#endif |
|
|
|
} |
|
|
|
ligne[COLS-4] = '\0'; |
|
|
|
#if TRACE |
|
|
|
fprintf(stderr, "\n"); fflush(stderr); |
|
|
|
#endif |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|