aboutsummaryrefslogtreecommitdiffstats
path: root/src/termcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/termcap.c b/src/termcap.c
index 69ce56d93b3..27a20a67ae1 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -25,6 +25,10 @@ Boston, MA 02110-1301, USA. */
25#include <unistd.h> 25#include <unistd.h>
26 26
27#include "lisp.h" 27#include "lisp.h"
28#include "tparam.h"
29#ifdef MSDOS
30#include "msdos.h"
31#endif
28 32
29#ifndef NULL 33#ifndef NULL
30#define NULL (char *) 0 34#define NULL (char *) 0
@@ -65,7 +69,7 @@ static char *tgetst1 (char *ptr, char **area);
65 0 if not found. */ 69 0 if not found. */
66 70
67static char * 71static char *
68find_capability (register char *bp, register char *cap) 72find_capability (register char *bp, register const char *cap)
69{ 73{
70 for (; *bp; bp++) 74 for (; *bp; bp++)
71 if (bp[0] == ':' 75 if (bp[0] == ':'
@@ -76,7 +80,7 @@ find_capability (register char *bp, register char *cap)
76} 80}
77 81
78int 82int
79tgetnum (char *cap) 83tgetnum (const char *cap)
80{ 84{
81 register char *ptr = find_capability (term_entry, cap); 85 register char *ptr = find_capability (term_entry, cap);
82 if (!ptr || ptr[-1] != '#') 86 if (!ptr || ptr[-1] != '#')
@@ -85,7 +89,7 @@ tgetnum (char *cap)
85} 89}
86 90
87int 91int
88tgetflag (char *cap) 92tgetflag (const char *cap)
89{ 93{
90 register char *ptr = find_capability (term_entry, cap); 94 register char *ptr = find_capability (term_entry, cap);
91 return ptr && ptr[-1] == ':'; 95 return ptr && ptr[-1] == ':';
@@ -97,7 +101,7 @@ tgetflag (char *cap)
97 If AREA is null, space is allocated with `malloc'. */ 101 If AREA is null, space is allocated with `malloc'. */
98 102
99char * 103char *
100tgetstr (char *cap, char **area) 104tgetstr (const char *cap, char **area)
101{ 105{
102 register char *ptr = find_capability (term_entry, cap); 106 register char *ptr = find_capability (term_entry, cap);
103 if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) 107 if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
@@ -263,7 +267,7 @@ tgetst1 (char *ptr, char **area)
263char PC; 267char PC;
264 268
265void 269void
266tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) 270tputs (register const char *str, int nlines, int (*outfun) (int))
267{ 271{
268 register int padcount = 0; 272 register int padcount = 0;
269 register int speed; 273 register int speed;
@@ -355,7 +359,7 @@ valid_filename_p (fn)
355 in it, and some other value otherwise. */ 359 in it, and some other value otherwise. */
356 360
357int 361int
358tgetent (char *bp, char *name) 362tgetent (char *bp, const char *name)
359{ 363{
360 register char *termcap_name; 364 register char *termcap_name;
361 register int fd; 365 register int fd;
@@ -442,7 +446,7 @@ tgetent (char *bp, char *name)
442 buf.size = BUFSIZE; 446 buf.size = BUFSIZE;
443 /* Add 1 to size to ensure room for terminating null. */ 447 /* Add 1 to size to ensure room for terminating null. */
444 buf.beg = (char *) xmalloc (buf.size + 1); 448 buf.beg = (char *) xmalloc (buf.size + 1);
445 term = indirect ? indirect : name; 449 term = indirect ? indirect : (char *)name;
446 450
447 if (!bp) 451 if (!bp)
448 { 452 {