comparison src/scroll.c @ 421:1cc29824b3f1

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Fri, 25 Oct 1991 18:59:47 +0000
parents 81130da351be
children 413127b220ef
comparison
equal deleted inserted replaced
420:ba5889c7de72 421:1cc29824b3f1
445 will not be involved in actual motion. */ 445 will not be involved in actual motion. */
446 int limit = to; 446 int limit = to;
447 int offset; 447 int offset;
448 int height = SCREEN_HEIGHT (screen); 448 int height = SCREEN_HEIGHT (screen);
449 449
450 if (amount > 0) 450 if (amount == 0)
451 limit += amount; 451 return 0;
452
452 if (! scroll_region_ok) 453 if (! scroll_region_ok)
453 limit = height; 454 limit = height;
454 455 else if (amount > 0)
455 if (amount == 0) 456 limit += amount;
456 return 0;
457 457
458 if (amount < 0) 458 if (amount < 0)
459 { 459 {
460 int temp = to; 460 int temp = to;
461 to = from + amount; 461 to = from + amount;
485 register int i; 485 register int i;
486 register int screen_height = SCREEN_HEIGHT (screen); 486 register int screen_height = SCREEN_HEIGHT (screen);
487 register int insert_overhead = ov1 * 10; 487 register int insert_overhead = ov1 * 10;
488 register int next_insert_cost = ovn * 10; 488 register int next_insert_cost = ovn * 10;
489 489
490 for (i = 0; i <= screen_height; i++) 490 for (i = 0; i < screen_height; i++)
491 { 491 {
492 mf[screen_height - i] = next_insert_cost / 10; 492 mf[screen_height - i] = next_insert_cost / 10;
493 next_insert_cost += pfn; 493 next_insert_cost += pfn;
494 ov[screen_height - i] = (insert_overhead + next_insert_cost) / 10; 494 ov[screen_height - i] = (insert_overhead + next_insert_cost) / 10;
495 insert_overhead += pf1; 495 insert_overhead += pf1;