ref: 980c12a177a929e6cbee92aaeb1a1e5e25f8bab2
parent: 786c84213d4744dd7ae1cc49eab8c69a39cf02ac
author: Sigrid Haflínudóttir <[email protected]>
date: Sun May 17 12:58:37 EDT 2020
simpler /dev/text truncation
--- a/main.c
+++ b/main.c
@@ -192,13 +192,9 @@
if(wait){
if(pl >= 0 || (pl = plumbopen("gemini", OREAD)) >= 0){
if((m = plumbrecv(pl)) != nil){
- int text;
url = strdup(m->data);
plumbfree(m);
- if((text = open("/dev/text", OWRITE|OTRUNC)) >= 0){
- write(text, "", 0);
- close(text);
- }
+ close(open("/dev/text", OWRITE|OTRUNC));
}else{
exits(nil);
}