aboutsummaryrefslogtreecommitdiffstats
path: root/src/cm.c
diff options
context:
space:
mode:
authorStefan Monnier2011-03-31 00:24:03 -0400
committerStefan Monnier2011-03-31 00:24:03 -0400
commit40d83b412f584cc02e68d4eac8fd5e6eb769e2fe (patch)
treeb56f27a7e6d75a8c1fd27b00179a27b5efea0a32 /src/cm.c
parentf488fb6528738131ef41859e1f04125f2e50efce (diff)
parent44f230aa043ebb222aa0876b44d70484d5dd38db (diff)
downloademacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.tar.gz
emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.zip
Merge from trunk
Diffstat (limited to 'src/cm.c')
-rw-r--r--src/cm.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/cm.c b/src/cm.c
index 108ee5720f3..42f855f1694 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -27,19 +27,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#include "cm.h" 27#include "cm.h"
28#include "termhooks.h" 28#include "termhooks.h"
29#include "termchar.h" 29#include "termchar.h"
30 30#include "tparam.h"
31
32/* For now, don't try to include termcap.h. On some systems,
33 configure finds a non-standard termcap.h that the main build
34 won't find. */
35extern void tputs (const char *, int, int (*)(int));
36extern char *tgoto (const char *, int, int);
37 31
38#define BIG 9999 /* 9999 good on VAXen. For 16 bit machines 32#define BIG 9999 /* 9999 good on VAXen. For 16 bit machines
39 use about 2000.... */ 33 use about 2000.... */
40 34
41extern char *BC, *UP;
42
43int cost; /* sums up costs */ 35int cost; /* sums up costs */
44 36
45/* ARGSUSED */ 37/* ARGSUSED */
@@ -222,8 +214,9 @@ calccost (struct tty_display_info *tty,
222 } 214 }
223 totalcost = c * deltay; 215 totalcost = c * deltay;
224 if (doit) 216 if (doit)
225 while (--deltay >= 0) 217 do
226 emacs_tputs (tty, p, 1, cmputc); 218 emacs_tputs (tty, p, 1, cmputc);
219 while (0 < --deltay);
227x: 220x:
228 if ((deltax = dstx - srcx) == 0) 221 if ((deltax = dstx - srcx) == 0)
229 goto done; 222 goto done;
@@ -304,8 +297,9 @@ fail:
304 } 297 }
305 totalcost += c * deltax; 298 totalcost += c * deltax;
306 if (doit) 299 if (doit)
307 while (--deltax >= 0) 300 do
308 emacs_tputs (tty, p, 1, cmputc); 301 emacs_tputs (tty, p, 1, cmputc);
302 while (0 < --deltax);
309done: 303done:
310 return totalcost; 304 return totalcost;
311} 305}