aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/mlib_setprogname.c
blob: 415ed6451884a7a881476ec0a9a930a1f15e59a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <string.h>

#include "errors.h"

const char *_mlib_errors_progname;

void
mlib_setprogname(const char *s)
{
	const char *p = strrchr(s, '/');
	_mlib_errors_progname = p ? p + 1 : s;
}