ref: 8b18d820b4611d8ae9d9804c325f4bade970b445
parent: 83ea4dfd306469d4ddb2050f1c41909e9aa5619e
author: cancel <cancel@cancel.fm>
date: Fri Jan 3 19:45:36 EST 2020
Add popen stderr avoidance Super hacky and weird, but I don't want to write out the fork'n'pipe dance right now.
--- a/cboard.c
+++ b/cboard.c
@@ -6,7 +6,7 @@
Usz field_width, Usz rect_y, Usz rect_x, Usz rect_h,
Usz rect_w) {
(void)field_height;
- FILE* fp = popen("xclip -i -selection clipboard", "w");
+ FILE* fp = popen("xclip -i -selection clipboard 2>/dev/null", "w");
if (!fp)
return Cboard_error_popen_failed;
for (Usz iy = 0; iy < rect_h; iy++) {
@@ -20,7 +20,7 @@
}
Cboard_error cboard_paste(Glyph* gbuffer, Usz height, Usz width, Usz y, Usz x) {
- FILE* fp = popen("xclip -o -selection clipboard", "r");
+ FILE* fp = popen("xclip -o -selection clipboard 2>/dev/null", "r");
Usz start_x = x;
if (!fp)
return Cboard_error_popen_failed;