diff src/cm.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents e121b013d1f0
children c5d627a313b1
line wrap: on
line diff
--- a/src/cm.c	Mon Aug 13 09:54:24 2007 +0200
+++ b/src/cm.c	Mon Aug 13 09:55:28 2007 +0200
@@ -33,8 +33,14 @@
 
 #define	EXPENSIVE 2000
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern char *tgoto (CONST char *cm, int hpos, int vpos);
 extern void tputs (CONST char *, int, void (*)(int));
+#ifdef __cplusplus
+}
+#endif
 
 static void cmgoto_for_real (struct console *c, int row, int col);
 
@@ -215,7 +221,7 @@
     while (--deltay >= 0)
       tputs (motion, 1, cmputc);
 
-calculate_x: 
+calculate_x:
 
   deltax = dstx - srcx;
   if (!deltax)
@@ -246,7 +252,7 @@
     while (--deltax >= 0)
       tputs (motion, 1, cmputc);
 
-done: 
+done:
     return totalcost;
 }
 #endif /* NOT_YET */
@@ -289,7 +295,7 @@
 #if 0
   if (frame_y >= 0 && frame_x >= 0)
     {
-      /* 
+      /*
        * Pick least-cost motions
        */
 
@@ -351,7 +357,7 @@
       dcm = TTY_CM (c).abs;
     }
 
-  /* 
+  /*
    * In the following comparison, the = in <= is because when the costs
    * are the same, it looks nicer (I think) to move directly there.
    */
@@ -374,20 +380,20 @@
 
   switch (use)
     {
-    case USEHOME: 
+    case USEHOME:
       tputs (TTY_CM (c).home, 1, cmputc);
       FRAME_CURSOR_X (f) = 0;
       FRAME_CURSOR_Y (f) = 0;
       break;
 
-    case USELL: 
+    case USELL:
       tputs (TTY_CM (c).low_left, 1, cmputc);
       FRAME_CURSOR_Y (f) = FRAME_HEIGHT (f) - 1;
       FRAME_CURSOR_X (f) = 0;
       break;
 
 #if 0
-    case USECR: 
+    case USECR:
       tputs (Wcm.cm_cr, 1, cmputc);
       if (Wcm.cm_autolf)
 	curY++;