mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Add log.c with info() and warn()
This commit is contained in:
parent
5ea1527558
commit
2a17df0f8b
11 changed files with 68 additions and 17 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <glib.h>
|
||||
|
||||
#include "common/dir.h"
|
||||
#include "common/log.h"
|
||||
|
||||
struct dir {
|
||||
const char *prefix;
|
||||
|
|
@ -84,7 +85,7 @@ char *find_dir(struct ctx *ctx)
|
|||
/* handle /etc/xdg... */
|
||||
ctx->build_path_fn(ctx, NULL, d.path);
|
||||
if (debug)
|
||||
fprintf(stderr, "DEBUG: %s\n", ctx->buf);
|
||||
info("%s", ctx->buf);
|
||||
if (isdir(ctx->buf))
|
||||
return ctx->buf;
|
||||
} else {
|
||||
|
|
@ -96,8 +97,7 @@ char *find_dir(struct ctx *ctx)
|
|||
for (gchar **p = prefixes; *p; p++) {
|
||||
ctx->build_path_fn(ctx, *p, d.path);
|
||||
if (debug)
|
||||
fprintf(stderr, "DEBUG: %s\n",
|
||||
ctx->buf);
|
||||
info("%s", ctx->buf);
|
||||
if (isdir(ctx->buf))
|
||||
return ctx->buf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue