]> code.delx.au - gnu-emacs/blobdiff - src/cm.c
#
[gnu-emacs] / src / cm.c
index 555c97c550002352f89b1fb5aa09d90dc592edc4..144baa847b5c1d10cca6ce9b2e6aa4eeda0ad512 100644 (file)
--- a/src/cm.c
+++ b/src/cm.c
@@ -16,7 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 #include <config.h>
@@ -24,16 +25,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "cm.h"
 #include "termhooks.h"
 
+#ifdef HAVE_TERMCAP_H
+#include <termcap.h>
+#else
+extern void tputs P_ ((const char *, int, int (*)(int)));
+extern char *tgoto P_ ((const char *, int, int));
+#endif
+
 #define        BIG     9999            /* 9999 good on VAXen.  For 16 bit machines
                                   use about 2000.... */
 
-char *tgoto ();
-
 extern char *BC, *UP;
 
 int cost;              /* sums up costs */
 
 /* ARGSUSED */
+int
 evalcost (c)
      char c;
 {
@@ -41,6 +48,7 @@ evalcost (c)
   return c;
 }
 
+int
 cmputc (c)
      char c;
 {
@@ -134,6 +142,7 @@ cmcheckmagic ()
  * out of <sgtty.h>.)
  */
 
+void
 cmcostinit ()
 {
     char *p;
@@ -173,7 +182,7 @@ cmcostinit ()
  * actually perform the motion.
  */
 
-static
+static int
 calccost (srcy, srcx, dsty, dstx, doit)
 {
     register int    deltay,
@@ -308,6 +317,7 @@ losecursor ()
 #define        USELL   2
 #define        USECR   3
 
+void
 cmgoto (row, col)
 {
     int     homecost,
@@ -410,6 +420,7 @@ cmgoto (row, col)
    Used before copying into it the info on the actual terminal.
  */
 
+void
 Wcm_clear ()
 {
   bzero (&Wcm, sizeof Wcm);
@@ -424,6 +435,7 @@ Wcm_clear ()
  * Return -2 if size not specified.
  */
 
+int
 Wcm_init ()
 {
 #if 0