mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Remove info() and die()
This commit is contained in:
parent
22f5073ebd
commit
20fd8f59a7
11 changed files with 26 additions and 51 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue