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