]> code.delx.au - gnu-emacs/blobdiff - src/cm.c
Prevent bar cursor overwriting next glyph (bug#16856)
[gnu-emacs] / src / cm.c
index 609632eba11d81f25023bc20b1a4d38246f6cefb..e135889f17c4b5a7377ee0cb7551e4dd168166d9 100644 (file)
--- a/src/cm.c
+++ b/src/cm.c
@@ -1,13 +1,13 @@
 /* Cursor motion subroutines for GNU Emacs.
 /* Cursor motion subroutines for GNU Emacs.
-   Copyright (C) 1985, 1995, 2001-201 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1995, 2001-2016 Free Software Foundation, Inc.
     based primarily on public domain code written by Chris Torek
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
     based primarily on public domain code written by Chris Torek
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,17 +20,13 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 
 #include "lisp.h"
-#include "frame.h"
 #include "cm.h"
 #include "cm.h"
-#include "termhooks.h"
 #include "termchar.h"
 #include "tparam.h"
 
 #include "termchar.h"
 #include "tparam.h"
 
-#define        BIG     9999            /* 9999 good on VAXen.  For 16 bit machines
-                                  use about 2000.... */
+#define        BIG     9999            /* Good on 32-bit hosts.  */
 
 int cost;              /* sums up costs */
 
 
 int cost;              /* sums up costs */
 
@@ -119,7 +115,7 @@ cmcheckmagic (struct tty_display_info *tty)
   if (curX (tty) == FrameCols (tty))
     {
       if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
   if (curX (tty) == FrameCols (tty))
     {
       if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
-       abort ();
+       emacs_abort ();
       if (tty->termscript)
        putc ('\r', tty->termscript);
       putc ('\r', tty->output);
       if (tty->termscript)
        putc ('\r', tty->termscript);
       putc ('\r', tty->output);
@@ -216,7 +212,7 @@ calccost (struct tty_display_info *tty,
     if (doit)
       do
           emacs_tputs (tty, p, 1, cmputc);
     if (doit)
       do
           emacs_tputs (tty, p, 1, cmputc);
-      while (0 < --deltay);
+      while (--deltay > 0);
 x:
     if ((deltax = dstx - srcx) == 0)
        goto done;
 x:
     if ((deltax = dstx - srcx) == 0)
        goto done;
@@ -299,7 +295,7 @@ fail:
     if (doit)
       do
           emacs_tputs (tty, p, 1, cmputc);
     if (doit)
       do
           emacs_tputs (tty, p, 1, cmputc);
-      while (0 < --deltax);
+      while (--deltax > 0);
 done:
     return totalcost;
 }
 done:
     return totalcost;
 }
@@ -325,7 +321,7 @@ cmgoto (struct tty_display_info *tty, int row, int col)
             llcost,
             relcost,
             directcost;
             llcost,
             relcost,
             directcost;
-    int     use IF_LINT (= 0);
+    int use UNINIT;
     char *p;
     const char *dcm;
 
     char *p;
     const char *dcm;