[769] in Moira

home help back first fref pref prev next nref lref last post

Re: com_err shouldn't print '\r' after '\n' when printing errors

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Thu Sep 8 12:49:16 1994

Date: Thu, 8 Sep 1994 12:48:53 +0500
From: Theodore Ts'o <tytso@MIT.EDU>
To: "Jonathan I. Kamens" <jik@cam.ov.com>
Cc: krb5-bugs@MIT.EDU, bug-zephyr@MIT.EDU, bugs@MIT.EDU, bug-moira@MIT.EDU
In-Reply-To: [700]

   Date: Fri, 2 Sep 1994 13:58:04 -0400
   From: "Jonathan I. Kamens" <jik@cam.ov.com>

   Com_err shouldn't be printing '\r' after '\n' when it prints errors in
   the com_err_proc function, for two reasons:

   1) The terminal driver handles changing '\n' to "\r\n" when it's
      necessary.
   2) Even if that weren't the case, the '\r' is supposed to come
      *before* the '\n', not after, as the current code does it.

   The patch below just removes the printing of '\r'.

The idea behind printing the \r is so that if the terminal happens to be
in raw mode, the right thing happens even if the terminal driver *isn't*
changing the \n to \r\n.  If it is doing the conversion, the extra \r
should be harmless.  Certainly the ordering of \r\n vs. \n\r shouldn't
matter; that's just a matter of whether you scroll first, and then
return to position 1, or return to position 1 first, and then scroll.

Is the printing of the \r actually causing a problem, or is this only an
aesthetics thing?  It is my belief that printing the \r is actually the
right thing.

						- Ted

home help back first fref pref prev next nref lref last post