summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
authordehroox <dehrexd@gmail.com>2025-09-01 14:08:15 +0800
committerdehroox <dehrexd@gmail.com>2025-09-02 21:05:32 +0800
commitfc9b4122b2a5869eea52def7752c884343f8d87a (patch)
treeafd85912a8c5c7dbe81cda1be7d7d3ff02f9a7df /src/sxwm.c
parent345c5d5964007c2d7abed8bc563c0ad99e604b50 (diff)
make printing more consistent
Diffstat (limited to 'src/sxwm.c')
-rw-r--r--src/sxwm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index 57be734..e507a83 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -1106,7 +1106,7 @@ void hdl_map_req(XEvent *xev)
}
if (open_windows == MAX_CLIENTS) {
- printf("sxwm: max clients reached, ignoring map request\n");
+ fprintf(stderr, "sxwm: max clients reached, ignoring map request\n");
return;
}
@@ -1458,13 +1458,13 @@ Bool is_child_proc(pid_t parent_pid, pid_t child_pid)
snprintf(path, sizeof(path), "/proc/%d/stat", current_pid);
f = fopen(path, "r");
if (!f) {
- printf("sxwm: could not open %s\n", path);
+ fprintf(stderr, "sxwm: could not open %s\n", path);
return False;
}
int ppid = 0;
if (fscanf(f, "%*d %*s %*c %d", &ppid) != 1) {
- printf("sxwm: failed to read ppid from %s\n", path);
+ fprintf(stderr, "sxwm: failed to read ppid from %s\n", path);
fclose(f);
return False;
}
@@ -1476,7 +1476,7 @@ Bool is_child_proc(pid_t parent_pid, pid_t child_pid)
if (ppid <= 1) {
/* Reached init or kernel */
- printf("sxwm: reached init/kernel, no relationship found\n");
+ fprintf(stderr, "sxwm: reached init/kernel, no relationship found\n");
break;
}
current_pid = ppid;
@@ -1720,7 +1720,7 @@ void quit(void)
XFreeCursor(dpy, cursor_move);
XFreeCursor(dpy, cursor_normal);
XFreeCursor(dpy, cursor_resize);
- printf("quitting...\n");
+ puts("quitting...");
running = False;
}
@@ -3014,7 +3014,7 @@ void xev_case(XEvent *xev)
evtable[xev->type](xev);
}
else {
- printf("sxwm: invalid event type: %d\n", xev->type);
+ fprintf(stderr, "sxwm: invalid event type: %d\n", xev->type);
}
}
@@ -3037,7 +3037,7 @@ int main(int ac, char **av)
}
}
setup();
- printf("sxwm: starting...\n");
+ puts("sxwm: starting...");
run();
return 0;
}