/* * DD2 Monitoring * * ncurses linear vumeter display */ /********************************************************************** DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. **********************************************************************/ #include #include #include #include #include #include "ecran.h" extern int verbosity; /* ---------------------------------------------------------------- */ int vumetre_0(WINDOW *win, int lig, int col, float val, int larg) { int foo, posc, c; char ligne[100]; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %d %d %f %d )\n", __func__, win, lig, col, val, larg); #endif posc = (int)(val * (float)(larg-5)); sprintf(ligne, "%6.3f", val); mvwaddstr(win, lig, 0, ligne); for (foo=0; foo>> %s ( %p %d %d %f %d )\n", __func__, win, lig, col, val, larg); #endif posc = (int)(val * (float)larg); sprintf(ligne, "%6.3f", val); mvwaddstr(win, lig, 2, ligne); for (foo=0; foo