diff options
| author | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
| commit | cafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch) | |
| tree | 7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /src/termcap.c | |
| parent | a08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff) | |
| parent | 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff) | |
| download | emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip | |
Merge from trunk
Diffstat (limited to 'src/termcap.c')
| -rw-r--r-- | src/termcap.c | 18 |
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 | ||
| 67 | static char * | 71 | static char * |
| 68 | find_capability (register char *bp, register char *cap) | 72 | find_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 | ||
| 78 | int | 82 | int |
| 79 | tgetnum (char *cap) | 83 | tgetnum (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 | ||
| 87 | int | 91 | int |
| 88 | tgetflag (char *cap) | 92 | tgetflag (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 | ||
| 99 | char * | 103 | char * |
| 100 | tgetstr (char *cap, char **area) | 104 | tgetstr (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) | |||
| 263 | char PC; | 267 | char PC; |
| 264 | 268 | ||
| 265 | void | 269 | void |
| 266 | tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) | 270 | tputs (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 | ||
| 357 | int | 361 | int |
| 358 | tgetent (char *bp, char *name) | 362 | tgetent (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 | { |