diff options
| author | Paul Eggert | 2011-03-08 21:46:35 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-08 21:46:35 -0800 |
| commit | b024a9466a0e238e053d0464f4a4f9b19d04648b (patch) | |
| tree | 3483eb4a4d2b0180f5f0ec8d7c17b2ec81b039ca /src | |
| parent | e6ca6543685fded0d1b3322dd06d0fa70d3e2a44 (diff) | |
| download | emacs-b024a9466a0e238e053d0464f4a4f9b19d04648b.tar.gz emacs-b024a9466a0e238e053d0464f4a4f9b19d04648b.zip | |
* term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to the .h file
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/term.c | 12 | ||||
| -rw-r--r-- | src/tparam.h | 6 |
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; | |||
| 1306 | static KBOARD *term_get_fkeys_kboard; | 1306 | static KBOARD *term_get_fkeys_kboard; |
| 1307 | static Lisp_Object term_get_fkeys_1 (void); | 1307 | static Lisp_Object term_get_fkeys_1 (void); |
| 1308 | 1308 | ||
| 1309 | /* Rework termcap API to accept const pointer args. */ | ||
| 1310 | static inline int my_tgetflag (const char *x) { return tgetflag ((char *) x); } | ||
| 1311 | static inline int my_tgetnum (const char *x) { return tgetnum ((char *) x); } | ||
| 1312 | static 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 | ||
| 24 | void tputs (const char *, int, int (*) (int)); | 24 | void tputs (const char *, int, int (*) (int)); |
| 25 | int tgetent (char *, const char *); | 25 | int tgetent (char *, const char *); |
| 26 | int tgetflag (char *id); | 26 | int tgetflag (const char *); |
| 27 | int tgetnum (char *id); | 27 | int tgetnum (const char *); |
| 28 | char *tgetstr (char *, char **); | 28 | char *tgetstr (const char *, char **); |
| 29 | char *tgoto (const char *, int, int); | 29 | char *tgoto (const char *, int, int); |
| 30 | 30 | ||
| 31 | char *tparam (const char *, char *, int, int, int, int, int); | 31 | char *tparam (const char *, char *, int, int, int, int, int); |