Package: screen-message Version: 0.11-1 Tags: patch Please make screen-message ignore trailing newlines when reading the text from stdin. This makes invokations such as `echo "Hello" | sm` do the right thing.
Patch attached. Regards, -- Chris Lamb, UK [EMAIL PROTECTED] GPG: 0x634F9A20
diff -urNad screen-message-0.11.orig/sm.c screen-message-0.11/sm.c --- screen-message-0.11.orig/sm.c 2008-08-12 04:30:53.000000000 +0100 +++ screen-message-0.11/sm.c 2008-08-12 04:31:20.000000000 +0100 @@ -178,6 +178,11 @@ while ((num = fread (buf, 1, sizeof(buf), stdin)) > 0) { g_string_append_len(input, buf, num); } + + // remove trailing newline, if any + if ((input->len > 0) && (input->str[input->len - 1] == '\n')) { + g_string_truncate(input, input->len - 1); + } } else { int i;
signature.asc
Description: PGP signature