Mercurial > emacs
comparison src/scroll.c @ 3356:09759a9653c5
(calculate_scrolling): Defend against negative baud_rate.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 May 1993 19:04:07 +0000 |
parents | e94a593c3952 |
children | 1fc792473491 |
comparison
equal
deleted
inserted
replaced
3355:e0c2e8a2ef75 | 3356:09759a9653c5 |
---|---|
105 | 105 |
106 /* Discourage long scrolls on fast lines. | 106 /* Discourage long scrolls on fast lines. |
107 Don't scroll nearly a full frame height unless it saves | 107 Don't scroll nearly a full frame height unless it saves |
108 at least 1/4 second. */ | 108 at least 1/4 second. */ |
109 int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); | 109 int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); |
110 | |
111 if (baud_rate <= 0) | |
112 extra_cost = 1; | |
110 | 113 |
111 /* initialize the top left corner of the matrix */ | 114 /* initialize the top left corner of the matrix */ |
112 matrix->writecost = 0; | 115 matrix->writecost = 0; |
113 matrix->insertcost = INFINITY; | 116 matrix->insertcost = INFINITY; |
114 matrix->deletecost = INFINITY; | 117 matrix->deletecost = INFINITY; |