From: Paul Eggert Date: Wed, 9 Mar 2011 05:46:35 +0000 (-0800) Subject: * term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to the .h file X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~605^2^2~37 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b024a9466a0e238e053d0464f4a4f9b19d04648b;p=emacs.git * term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to the .h file --- diff --git a/src/ChangeLog b/src/ChangeLog index 8bbc818ec7d..89f4bbb3db9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -106,7 +106,6 @@ (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): (turn_on_face, init_tty): Likewise. * termchar.h (struct tty_display_info): Likewise. - * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers. * term.c (term_mouse_position): Rename local to avoid shadowing. 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; static KBOARD *term_get_fkeys_kboard; static Lisp_Object term_get_fkeys_1 (void); -/* Rework termcap API to accept const pointer args. */ -static inline int my_tgetflag (const char *x) { return tgetflag ((char *) x); } -static inline int my_tgetnum (const char *x) { return tgetnum ((char *) x); } -static inline char *my_tgetstr (const char *x, char **a) -{ return tgetstr ((char *) x, a); } -#undef tgetflag -#undef tgetnum -#undef tgetstr -#define tgetflag my_tgetflag -#define tgetnum my_tgetnum -#define tgetstr my_tgetstr - /* Find the escape codes sent by the function keys for Vinput_decode_map. This function scans the termcap function key sequence entries, and 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 . */ void tputs (const char *, int, int (*) (int)); int tgetent (char *, const char *); -int tgetflag (char *id); -int tgetnum (char *id); -char *tgetstr (char *, char **); +int tgetflag (const char *); +int tgetnum (const char *); +char *tgetstr (const char *, char **); char *tgoto (const char *, int, int); char *tparam (const char *, char *, int, int, int, int, int);