Thread (25 messages) flat view 25 messages, 7 authors, 2016-08-13

Re: [PATCH/RFC] recv_sideband: Band #2 always goes to stderr

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:46:22

Possibly related (same subject, not in this thread)

On Tue, 10 Mar 2009, Johannes Sixt wrote:
Johannes Schindelin schrieb:
quoted
I think, indeed, that you can avoid the memcpy() by using %.*s.  The 
private buffer is only used to make sure that the text is written in one 
go anyway (i.e. that two sidebands messages are not written to the same 
line because they use multiple calls to fprintf()/fwrite() per line), 
right?
It must be something like that, yes. ;)
It is a bit more complex than that.

Messages received over sideband #2 may have two kinds of line break 
characters: \r or \n.  We also have a string suffix which is used to 
clear the remaining of the screen line in those cases where a previous 
line is overwritten and the previous line was longer.  That may happen 
if the previous line was terminated with \r.  In that case, the string 
suffix _must_ be inserted before the line break character for obvious 
reasons.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help