Bug#308720: corrected patch

2005-06-04 Thread Jamie Zawinski
Daniel Hulme wrote:
 
 The last patch I submitted introduced a less severe bug, in that if you
 sent phosphor a line of the exact width, it would ignore all carriage
 returns, not just the first one, so there was no way to have a line of
 the exact width followed by a blank line. Please find attached a
 corrected patch.

I don't think that patch quite works either.  I think a simpler fix is
to just always wrap one column earlier:

-  sprintf (program + strlen(program), oprogram, state-grid_width);
+  sprintf (program + strlen(program), oprogram, state-grid_width-1);


-- 
Jamie Zawinski  [EMAIL PROTECTED]  http://www.jwz.org/
[EMAIL PROTECTED]  http://www.dnalounge.com/
 http://jwz.livejournal.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#308720: corrected patch

2005-05-12 Thread Daniel Hulme
The last patch I submitted introduced a less severe bug, in that if you
sent phosphor a line of the exact width, it would ignore all carriage
returns, not just the first one, so there was no way to have a line of
the exact width followed by a blank line. Please find attached a
corrected patch.

Sorry for any confusion,
Daniel

-- 
Now  as he walked by the sea  of Galilee,  he saw  Simon and Andrew  his
brother casting a spam into the net:  for they were phishers.  And Jesus
said unto them, Come ye after me, and I will make you to become phishers
of men.  And  straightway  they forsook  their  nets,  and followed him.
--- xscreensaver-4.21.orig/hacks/phosphor.c 2005-03-20 22:11:47.0 
+
+++ xscreensaver-4.21/hacks/phosphor.c  2005-05-12 01:06:56.0 +0100
@@ -1020,6 +1020,8 @@
{
  if (c == '\n'  last_c == '\r')
;   /* CRLF -- do nothing */
+ else if (state-cursor_x == 0  last_c != '\r'  last_c != '\n')
+   last_c = c;   /* return after line wrapped - do nothing */
  else
{
  state-cursor_x = 0;


pgpOzdKRCfyC4.pgp
Description: PGP signature