button/common.c: share button_filename() to reduce duplication

This commit is contained in:
Johan Malm 2023-08-21 21:03:46 +01:00 committed by Johan Malm
parent 143714f1c9
commit a8951c4b75
7 changed files with 38 additions and 24 deletions

11
src/button/common.c Normal file
View file

@ -0,0 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <stdio.h>
#include "button/common.h"
#include "common/dir.h"
#include "config/rcxml.h"
void
button_filename(const char *name, char *buf, size_t len)
{
snprintf(buf, len, "%s/%s", theme_dir(rc.theme_name), name);
}