rndm_luser /volume.c

One of the resource configurations depends on this.
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define MIXER_DEV "/dev/mixer"
#define MIXER_MAX_VOL 25700

static const char *_SOUND_DEVICE_LABELS[] = SOUND_DEVICE_LABELS;

static void percent_bar(const char *, int);
static int mixer_read(int *vols);


int
main(int argc, char **argv) {
    int i, vols[SOUND_MIXER_NRDEVICES];

    if (mixer_read(vols) < 0) {
        fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
        return EXIT_FAILURE;
    }

    for (i=0; i10) j = 10;
    printf("%10s %5d%% [", label, n);
    for (i=0; j>0; --j, ++i) putc('=', stdout);
    for (; i<10; ++i) putc(' ', stdout);
    puts("]");
}