Re: [RFC] Fix printk not handling ANSI escape codes
James Clarke, le Sat 29 Aug 2015 11:42:38 +0100, a écrit : Yes, it should be; since I didn't catch that I'd guess nothing in Mach/Hurd is actually using escape codes. I was trying to decide whether putc should handle escape codes or whether it should be left as outputting raw bytes to the display. As you can see I chose the latter, but do you think that was the right decision? Well, I don't see why we would want to forbid the use of ESC sequences in Mach/Hurd :) Samuel
Re: [RFC] Fix printk not handling ANSI escape codes
James Clarke, le Sat 29 Aug 2015 11:53:57 +0100, a écrit : I never gave that as an option? ? I understand even less. AIUI, before kd_start had esc support; with your patch it doesn't have any more. Probably Mach/Hurd never made use of it, but that's probably not a reason for removing the support, you never know who might want to make use of it someday. Samuel
Re: [RFC] Fix printk not handling ANSI escape codes
Yes, that was a mistake, it should call kd_putc_esc. James On 29 Aug 2015, at 11:55, Samuel Thibault samuel.thiba...@gnu.org wrote: James Clarke, le Sat 29 Aug 2015 11:53:57 +0100, a écrit : I never gave that as an option? ? I understand even less. AIUI, before kd_start had esc support; with your patch it doesn't have any more. Probably Mach/Hurd never made use of it, but that's probably not a reason for removing the support, you never know who might want to make use of it someday. Samuel
Re: [RFC] Fix printk not handling ANSI escape codes
James Clarke, le Sat 29 Aug 2015 11:15:29 +0100, a écrit : @@ -1069,33 +1068,12 @@ kdstart(struct tty *tp) break; if ((tp-t_outq.c_cc = 0) || (ch = getc(tp-t_outq)) == -1) break; - c = ch; /* * Drop priority for long screen updates. ttstart() calls us at * spltty. */ o_pri = splsoftclock(); /* block timeout */ - if (c == (K_ESC)) { ... - } + kd_putc(ch); I don't understand: shouldn't that be kd_putc_esc? Samuel
Re: [RFC] Fix printk not handling ANSI escape codes
Yes, it should be; since I didn't catch that I'd guess nothing in Mach/Hurd is actually using escape codes. I was trying to decide whether putc should handle escape codes or whether it should be left as outputting raw bytes to the display. As you can see I chose the latter, but do you think that was the right decision? James On 29 Aug 2015, at 11:20, Samuel Thibault samuel.thiba...@gnu.org wrote: James Clarke, le Sat 29 Aug 2015 11:15:29 +0100, a écrit : @@ -1069,33 +1068,12 @@ kdstart(struct tty *tp) break; if ((tp-t_outq.c_cc = 0) || (ch = getc(tp-t_outq)) == -1) break; -c = ch; /* * Drop priority for long screen updates. ttstart() calls us at * spltty. */ o_pri = splsoftclock();/* block timeout */ -if (c == (K_ESC)) { ... -} +kd_putc(ch); I don't understand: shouldn't that be kd_putc_esc? Samuel
Re: [RFC] Fix printk not handling ANSI escape codes
I never gave that as an option? James On 29 Aug 2015, at 11:44, Samuel Thibault samuel.thiba...@gnu.org wrote: James Clarke, le Sat 29 Aug 2015 11:42:38 +0100, a écrit : Yes, it should be; since I didn't catch that I'd guess nothing in Mach/Hurd is actually using escape codes. I was trying to decide whether putc should handle escape codes or whether it should be left as outputting raw bytes to the display. As you can see I chose the latter, but do you think that was the right decision? Well, I don't see why we would want to forbid the use of ESC sequences in Mach/Hurd :) Samuel