comparison src/cm.c @ 83027:5b06ac722eb1

Cosmetic changes. src/cm.c (calccost, cmgoto): Cosmetic changes. src/keyboard.c (kbd_buffer_get_event, Fcurrent_input_mode): Ditto. src/term.c: Cosmetic changes. src/termchar.h (top_frame): Removed obsolete TODO comment. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-67
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 25 Jan 2004 01:17:40 +0000
parents c66ebcc29777
children a871be7b26a5
comparison
equal deleted inserted replaced
83026:77cfe20c109c 83027:5b06ac722eb1
262 /* 262 /*
263 * Now set tabcost to the cost for using ntabs, and c to the cost 263 * Now set tabcost to the cost for using ntabs, and c to the cost
264 * for using n2tabs, then pick the minimum. 264 * for using n2tabs, then pick the minimum.
265 */ 265 */
266 266
267 /* cost for ntabs + cost for right motion */ 267 /* cost for ntabs + cost for right motion */
268 tabcost = ntabs ? ntabs * tty->Wcm->cc_tab + (dstx - tabx) * tty->Wcm->cc_right 268 tabcost = ntabs ? ntabs * tty->Wcm->cc_tab + (dstx - tabx) * tty->Wcm->cc_right
269 : BIG; 269 : BIG;
270 270
271 /* cost for n2tabs + cost for left motion */ 271 /* cost for n2tabs + cost for left motion */
272 c = n2tabs ? n2tabs * tty->Wcm->cc_tab + (tab2x - dstx) * tty->Wcm->cc_left 272 c = n2tabs ? n2tabs * tty->Wcm->cc_tab + (tab2x - dstx) * tty->Wcm->cc_left
273 : BIG; 273 : BIG;
274 274
275 if (c < tabcost) /* then cheaper to overshoot & back up */ 275 if (c < tabcost) /* then cheaper to overshoot & back up */
276 ntabs = n2tabs, tabcost = c, tabx = tab2x; 276 ntabs = n2tabs, tabcost = c, tabx = tab2x;
394 */ 394 */
395 if (directcost <= relcost) 395 if (directcost <= relcost)
396 { 396 {
397 /* compute REAL direct cost */ 397 /* compute REAL direct cost */
398 cost = 0; 398 cost = 0;
399 p = dcm == tty->Wcm->cm_habs 399 p = (dcm == tty->Wcm->cm_habs
400 ? tgoto (dcm, row, col) 400 ? tgoto (dcm, row, col)
401 : tgoto (dcm, col, row); 401 : tgoto (dcm, col, row));
402 emacs_tputs (tty, p, 1, evalcost); 402 emacs_tputs (tty, p, 1, evalcost);
403 if (cost <= relcost) 403 if (cost <= relcost)
404 { /* really is cheaper */ 404 { /* really is cheaper */
405 emacs_tputs (tty, p, 1, cmputc); 405 emacs_tputs (tty, p, 1, cmputc);
406 curY (tty) = row, curX (tty) = col; 406 curY (tty) = row, curX (tty) = col;