]> code.delx.au - gnu-emacs/blobdiff - src/cm.h
Update copyright year to 2016
[gnu-emacs] / src / cm.h
index 02345d06600e4b4c0bf4fcba898d7f55a7183980..c109c473f8ddea36d28bde5cd5ddae4fb19b6513 100644 (file)
--- a/src/cm.h
+++ b/src/cm.h
@@ -1,6 +1,5 @@
 /* Cursor motion calculation definitions for GNU Emacs
-   Copyright (C) 1985, 1989, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
+   Copyright (C) 1985, 1989, 2001-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -17,7 +16,10 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Holds the minimum and maximum costs for the parametrized capabilities.  */
+#ifndef EMACS_CM_H
+#define EMACS_CM_H
+
+/* Holds the minimum and maximum costs for the parameterized capabilities.  */
 struct parmcap
   {
     int mincost, maxcost;
@@ -36,41 +38,41 @@ struct cm
     int cm_curX;                       /* Current column */
 
     /* Capabilities from termcap */
-    char *cm_up;               /* up (up) */
-    char *cm_down;             /* down (do) */
-    char *cm_left;             /* left (le) */
-    char *cm_right;            /* right (nd) */
-    char *cm_home;             /* home (ho) */
-    char *cm_cr;               /* carriage return (cr) */
-    char *cm_ll;               /* last line (ll) */
-    char *cm_tab;              /* tab (ta) */
-    char *cm_backtab;          /* backtab (bt) */
+    const char *cm_up;         /* up (up) */
+    const char *cm_down;       /* down (do) */
+    const char *cm_left;       /* left (le) */
+    const char *cm_right;      /* right (nd) */
+    const char *cm_home;       /* home (ho) */
+    const char *cm_cr;         /* carriage return (cr) */
+    const char *cm_ll;         /* last line (ll) */
+    const char *cm_tab;                /* tab (ta) */
+    const char *cm_backtab;    /* backtab (bt) */
     char *cm_abs;              /* absolute (cm) */
-    char *cm_habs;             /* horizontal absolute (ch) */
-    char *cm_vabs;             /* vertical absolute (cv) */
-#if 0
-    char *cm_ds;               /* "don't send" string (ds) */
+    const char *cm_habs;       /* horizontal absolute (ch) */
+    const char *cm_vabs;       /* vertical absolute (cv) */
+#if false
+    const char *cm_ds;         /* "don't send" string (ds) */
 #endif
-    char *cm_multiup;          /* multiple up (UP) */
-    char *cm_multidown;                /* multiple down (DO) */
-    char *cm_multileft;                /* multiple left (LE) */
-    char *cm_multiright;       /* multiple right (RI) */
+    const char *cm_multiup;    /* multiple up (UP) */
+    const char *cm_multidown;  /* multiple down (DO) */
+    const char *cm_multileft;  /* multiple left (LE) */
+    const char *cm_multiright; /* multiple right (RI) */
     int cm_cols;               /* number of cols on screen (co) */
     int cm_rows;               /* number of rows on screen (li) */
     int cm_tabwidth;           /* tab width (it) */
-    unsigned int cm_autowrap:1;        /* autowrap flag (am) */
-    unsigned int cm_magicwrap:1; /* VT-100: cursor stays in last col but
+    bool_bf cm_autowrap : 1;   /* autowrap flag (am) */
+    bool_bf cm_magicwrap : 1;  /* VT-100: cursor stays in last col but
                                    will cm_wrap if next char is
                                    printing (xn) */
-    unsigned int cm_usetabs:1; /* if set, use tabs */
-    unsigned int cm_losewrap:1;        /* if reach right margin, forget cursor
+    bool_bf cm_usetabs : 1;    /* if set, use tabs */
+    bool_bf cm_losewrap : 1;   /* if reach right margin, forget cursor
                                   location */
-    unsigned int cm_autolf:1;  /* \r performs a \r\n (rn) */
+    bool_bf cm_autolf : 1;     /* \r performs a \r\n (rn) */
 
-    /* Parametrized capabilities.  This needs to be a struct since
+    /* Parameterized capabilities.  This needs to be a struct since
        the costs are accessed through pointers.  */
 
-#if 0
+#if false
     struct parmcap cc_abs;     /* absolute (cm) */
     struct parmcap cc_habs;    /* horizontal absolute (ch) */
     struct parmcap cc_vabs;    /* vertical absolute (cv) */
@@ -80,7 +82,7 @@ struct cm
     struct parmcap cc_multiright; /* multiple right (RI) */
 #endif
 
-    /* Costs for the non-parametrized capabilities */
+    /* Costs for the non-parameterized capabilities */
     int cc_up;                 /* cost for up */
     int cc_down;               /* etc. */
     int cc_left;
@@ -97,8 +99,6 @@ struct cm
     int cc_vabs;
   };
 
-extern char PC;                        /* Pad character */
-
 /* Shorthand */
 #ifndef NoCMShortHand
 #define curY(tty)              (tty)->Wcm->cm_curY
@@ -142,7 +142,7 @@ extern char PC;                     /* Pad character */
 #define MultiDownCost(tty)     (tty)->Wcm->cc_multidown
 #define MultiLeftCost(tty)     (tty)->Wcm->cc_multileft
 #define MultiRightCost(tty)    (tty)->Wcm->cc_multiright
-#endif
+#endif /* NoCMShortHand */
 
 #define cmat(tty,row,col)      (curY(tty) = (row), curX(tty) = (col))
 #define cmplus(tty,n)                                              \
@@ -158,17 +158,16 @@ extern char PC;                   /* Pad character */
 #define losecursor(tty)         (curX(tty) = -1, curY(tty) = -1)
 
 extern int cost;
-extern int evalcost ();
+extern int evalcost (int c);
 
 #define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
 
 extern struct tty_display_info *current_tty;
-extern void cmcheckmagic P_ ((struct tty_display_info *));
-extern int cmputc P_ ((int));
-extern void cmcostinit P_ ((struct tty_display_info *));
-extern void cmgoto P_ ((struct tty_display_info *, int, int));
-extern void Wcm_clear P_ ((struct tty_display_info *));
-extern int Wcm_init P_ ((struct tty_display_info *));
-
-/* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b
-   (do not change this comment) */
+extern void cmcheckmagic (struct tty_display_info *);
+extern int cmputc (int);
+extern void cmcostinit (struct tty_display_info *);
+extern void cmgoto (struct tty_display_info *, int, int);
+extern void Wcm_clear (struct tty_display_info *);
+extern int Wcm_init (struct tty_display_info *);
+
+#endif /* EMACS_CM_H */