Skip to contentSkip to conversation

fix line-wrapping

PATCH In review Hollis Blanchard 3 participants 5 messages Nov 8, 2005 – Nov 9, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix line-wrapping

This patch fixes the line-wrapping problems we've been having on PPC. I rearranged grub_ofconsole_getwh() slightly to avoid excessive indentation. I will apply soon unless people criticize my ChangeLog entry. ;)

-Hollis

Index: ChangeLog
===================================================================
RCS file: /cvsroot/grub/grub2/ChangeLog,v
retrieving revision 1.193

ChangeLog +9 -0
diff -u -p -r1.193 ChangeLog
@@ -1,3 +1,12 @@
+2005-11-03  Hollis Blanchard  <[email protected]>
+
+	* term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
+	(grub_ofconsole_height): Likewise.
+	(grub_ofconsole_putchar): If grub_curr_x exceeds console width,
+	manually insert a '\n'.
+	(grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
+	`grub_ofconsole_height'.  Return early if these are already set.
+
 2005-11-07  Vincent Pelletier  <[email protected]>
 
 	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add

Index: term/ieee1275/ofconsole.c
===================================================================
RCS file: /cvsroot/grub/grub2/term/ieee1275/ofconsole.c,v retrieving revision 1.7

ieee1275/ofconsole.c +43 -38

106 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Hollis Blanchard

This patch fixes the line-wrapping problems we've been having on PPC. I rearranged grub_ofconsole_getwh() slightly to avoid excessive indentation. I will apply soon unless people criticize my ChangeLog entry. ;)

Great! This was a very annoying bug.

Quoted 8 lines

Index: ChangeLog
===================================================================
RCS file: /cvsroot/grub/grub2/ChangeLog,v
retrieving revision 1.193
diff -u -p -r1.193 ChangeLog

ChangeLog line 6

Quoted 6 lines
ChangeLog +6 -0
@@ -1,3 +1,12 @@
+2005-11-03  Hollis Blanchard  <[email protected]>
+
+	* term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
+	(grub_ofconsole_height): Likewise.
+	(grub_ofconsole_putchar): If grub_curr_x exceeds console width,
+	manually insert a '\n'.

This won't work if the width can not be read from the firmware. IIRC the pegasos has such bug. I should have a look at that...

Feel free to apply the patch. :-)

Thanks,
Marco

#2 lore raw
Quoted 11 lines · Marco Gerards
Quoted 9 lines · Hollis Blanchard

Index: ChangeLog
===================================================================
RCS file: /cvsroot/grub/grub2/ChangeLog,v
retrieving revision 1.193
diff -u -p -r1.193 ChangeLog

ChangeLog +1 -0
@@ -1,3 +1,12 @@
+2005-11-03  Hollis Blanchard  <[email protected]>
Quoted 8 lines

ChangeLog line 6

Quoted 5 lines
ChangeLog +5 -0
+
+	* term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
+	(grub_ofconsole_height): Likewise.
+	(grub_ofconsole_putchar): If grub_curr_x exceeds console width,
+	manually insert a '\n'.

This won't work if the width can not be read from the firmware. IIRC the pegasos has such bug. I should have a look at that...

Well, if the firmware does not reveal the size of the console, it defaults to 80x24 (that's in existing code). I can't think of any better behavior for this case. The patch stills "works"... :)

Quoted 1 line

Feel free to apply the patch. :-)

Ok, will do.

-Hollis

#3 lore raw
In reply to Hollis Blanchard
Quoted 4 lines · Hollis Blanchard

This patch fixes the line-wrapping problems we've been having on PPC. I rearranged grub_ofconsole_getwh() slightly to avoid excessive indentation. I will apply soon unless people criticize my ChangeLog entry. ;)

Well I don't like it for .. for .. I don't why! Its the wrong color !

:-)

Thanks for the update. I look forward to the next build of GRUB2 on my Genesi ODW unit here. I am still looking over my "stuff" for getting the GRUB2 menu to look nice with old fashioned line drawing chars.

Dennis

#4 lore raw
Quoted 6 lines · Dennis Clarke
Quoted 4 lines · Hollis Blanchard

This patch fixes the line-wrapping problems we've been having on PPC. I rearranged grub_ofconsole_getwh() slightly to avoid excessive indentation. I will apply soon unless people criticize my ChangeLog entry. ;)

Quoted 8 lines

Well I don't like it for .. for .. I don't why! Its the wrong color !

:-)

Thanks for the update. I look forward to the next build of GRUB2 on my Genesi ODW unit here. I am still looking over my "stuff" for getting the GRUB2 menu to look nice with old fashioned line drawing chars.

The problem with this that it is easy to fix, but hard to fix the right way... So if you fix it, please be careful if it does not break something else.

--
Marco