home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / minix / 4821 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.7 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!ascwide!ascgw!uitecgw!nemossan
  2. From: nemossan@uitec.ac.jp (Sakurao NEMOTO)
  3. Newsgroups: comp.os.minix
  4. Subject: BUG or Spec?? TAB-expansion enters infinite-loop.
  5. Keywords: kernel/console.c, TAB expansion, LINEWRAP, multiples of TAB-size
  6. Message-ID: <1503@uitecgw.uitec.ac.jp>
  7. Date: 23 Nov 92 21:30:33 GMT
  8. Organization: Univ. Industrial Tech., Sagamihara, JAPAN
  9. Lines: 27
  10.  
  11. This is  originally posted  by takamiti@mix  to the Forum  "minix" in
  12. Mix, Japanese BBS.
  13.  
  14. =====================================================================
  15. You will see TAB-expansion part in out_char() of kernel/console.c  as
  16. ----------------------------------------------------------------------------
  17. do {
  18.   if (tp->tty_column >= LINE_WIDTH - 1 || tp->tty_rwords >= TTY_RAM_WORDS) {
  19.     out_char(tp, ' ');
  20.   } else {
  21.     tp->tty_ramqueue[tp->tty_rwords++] = one_con_attribute | ' ';
  22.     tp->tty_column++;
  23.   }
  24. } while (tp->tty_column & TAB_MASK);
  25. ----------------------------------------------------------------------------
  26. This is Recursive-routine if there is/are TAB-code after "LINE_WIDTH"
  27. to call out_char() itself.  If (1) LINEWRAP is ON,  or (2) LINE_WIDTH
  28. is multiple of TAB_MASK (8),  it may be OK.   But if LINE_WRAP is OFF
  29. out_char() returns do  nothing,  thus  value of "tty_column"  remains
  30. *UNchanged*,  this leads  to  infinitesimal  "do-while" loop,  unless
  31. LINE_WIDTH is multiples of TAB_MASK.
  32.  
  33. Is this BUG or Spec?  If the latter, we cannot use display other than
  34. column-width of which is multiples of TAB-size, meaning we cannot use
  35. 132-columns etc in LINEWRAP is OFF.
  36. =====================================================================
  37. translated into broken-English by nemossan@mix == nemossan@uitec.ac.jp
  38.