aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-03-08 21:46:35 -0800
committerPaul Eggert2011-03-08 21:46:35 -0800
commitb024a9466a0e238e053d0464f4a4f9b19d04648b (patch)
tree3483eb4a4d2b0180f5f0ec8d7c17b2ec81b039ca
parente6ca6543685fded0d1b3322dd06d0fa70d3e2a44 (diff)
downloademacs-b024a9466a0e238e053d0464f4a4f9b19d04648b.tar.gz
emacs-b024a9466a0e238e053d0464f4a4f9b19d04648b.zip
* term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to the .h file
-rw-r--r--src/ChangeLog1
-rw-r--r--src/term.c12
-rw-r--r--src/tparam.h6
3 files changed, 3 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8bbc818ec7d..89f4bbb3db9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -106,7 +106,6 @@
106 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): 106 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
107 (turn_on_face, init_tty): Likewise. 107 (turn_on_face, init_tty): Likewise.
108 * termchar.h (struct tty_display_info): Likewise. 108 * termchar.h (struct tty_display_info): Likewise.
109 * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers.
110 109
111 * term.c (term_mouse_position): Rename local to avoid shadowing. 110 * term.c (term_mouse_position): Rename local to avoid shadowing.
112 111
diff --git a/src/term.c b/src/term.c
index 9531cce5f9f..e9e880a0c7f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1306,18 +1306,6 @@ static char **term_get_fkeys_address;
1306static KBOARD *term_get_fkeys_kboard; 1306static KBOARD *term_get_fkeys_kboard;
1307static Lisp_Object term_get_fkeys_1 (void); 1307static Lisp_Object term_get_fkeys_1 (void);
1308 1308
1309/* Rework termcap API to accept const pointer args. */
1310static inline int my_tgetflag (const char *x) { return tgetflag ((char *) x); }
1311static inline int my_tgetnum (const char *x) { return tgetnum ((char *) x); }
1312static inline char *my_tgetstr (const char *x, char **a)
1313{ return tgetstr ((char *) x, a); }
1314#undef tgetflag
1315#undef tgetnum
1316#undef tgetstr
1317#define tgetflag my_tgetflag
1318#define tgetnum my_tgetnum
1319#define tgetstr my_tgetstr
1320
1321/* Find the escape codes sent by the function keys for Vinput_decode_map. 1309/* Find the escape codes sent by the function keys for Vinput_decode_map.
1322 This function scans the termcap function key sequence entries, and 1310 This function scans the termcap function key sequence entries, and
1323 adds entries to Vinput_decode_map for each function key it finds. */ 1311 adds entries to Vinput_decode_map for each function key it finds. */
diff --git a/src/tparam.h b/src/tparam.h
index 11c9ae68aad..3cd3e6053cc 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -23,9 +23,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 23
24void tputs (const char *, int, int (*) (int)); 24void tputs (const char *, int, int (*) (int));
25int tgetent (char *, const char *); 25int tgetent (char *, const char *);
26int tgetflag (char *id); 26int tgetflag (const char *);
27int tgetnum (char *id); 27int tgetnum (const char *);
28char *tgetstr (char *, char **); 28char *tgetstr (const char *, char **);
29char *tgoto (const char *, int, int); 29char *tgoto (const char *, int, int);
30 30
31char *tparam (const char *, char *, int, int, int, int, int); 31char *tparam (const char *, char *, int, int, int, int, int);