mirror of
https://github.com/eRgo35/dots.git
synced 2025-12-16 15:36:11 +01:00
moving software to separate submodules part 1
This commit is contained in:
16
desktop/.dmenu/patch/numbers.c
Normal file
16
desktop/.dmenu/patch/numbers.c
Normal file
@@ -0,0 +1,16 @@
|
||||
static char numbers[NUMBERSBUFSIZE] = "";
|
||||
|
||||
static void
|
||||
recalculatenumbers()
|
||||
{
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user