Remove info() and die()

This commit is contained in:
Johan Malm 2021-07-22 21:30:17 +01:00
parent 22f5073ebd
commit 20fd8f59a7
11 changed files with 26 additions and 51 deletions

View file

@ -85,7 +85,7 @@ find_dir(struct ctx *ctx)
/* handle /etc/xdg... */
ctx->build_path_fn(ctx, NULL, d.path);
if (debug) {
info("%s", ctx->buf);
fprintf(stderr, "%s\n", ctx->buf);
}
if (isdir(ctx->buf)) {
return ctx->buf;
@ -100,7 +100,7 @@ find_dir(struct ctx *ctx)
for (gchar **p = prefixes; *p; p++) {
ctx->build_path_fn(ctx, *p, d.path);
if (debug) {
info("%s", ctx->buf);
fprintf(stderr, "%s\n", ctx->buf);
}
if (isdir(ctx->buf)) {
g_strfreev(prefixes);

View file

@ -3,17 +3,6 @@
#include <stdlib.h>
#include <string.h>
void
info(const char *msg, ...)
{
va_list params;
fprintf(stderr, "[labwc] info: ");
va_start(params, msg);
vfprintf(stderr, msg, params);
va_end(params);
fprintf(stderr, "\n");
}
void
warn(const char *err, ...)
{
@ -25,14 +14,3 @@ warn(const char *err, ...)
fprintf(stderr, "\n");
}
void
die(const char *err, ...)
{
va_list params;
fprintf(stderr, "[labwc] fatal: ");
va_start(params, err);
vfprintf(stderr, err, params);
va_end(params);
fprintf(stderr, "\n");
exit(EXIT_FAILURE);
}