mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
17 lines
364 B
C
17 lines
364 B
C
static char numbers[NUMBERSBUFSIZE] = "";
|
|
|
|
static void
|
|
recalculatenumbers(void)
|
|
{
|
|
unsigned int numer = 0, denom = 0;
|
|
struct item *item;
|
|
if (matchend) {
|
|
numer++;
|
|
for (item = matchend; item && item->left; item = item->left)
|
|
numer++;
|
|
}
|
|
for (item = items; item && item->text; item++)
|
|
denom++;
|
|
snprintf(numbers, NUMBERSBUFSIZE, "%d/%d", numer, denom);
|
|
}
|