comparison src/redisplay-tty.c @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 501cfd01ee6d
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
51 other conflicts as well on some systems, so screw it: we'll just 51 other conflicts as well on some systems, so screw it: we'll just
52 re-declare the routines we use and assume the code in this file is 52 re-declare the routines we use and assume the code in this file is
53 invoking them correctly. */ 53 invoking them correctly. */
54 /* # include <curses.h> */ 54 /* # include <curses.h> */
55 /* # include <term.h> */ 55 /* # include <term.h> */
56 #ifdef __cplusplus 56 EXTERN_C int tgetent (const char *, const char *);
57 extern "C" { 57 EXTERN_C int tgetflag (const char *);
58 #endif 58 EXTERN_C int tgetnum (const char *);
59 extern int tgetent (const char *, const char *); 59 EXTERN_C char *tgetstr (const char *, char **);
60 extern int tgetflag (const char *); 60 EXTERN_C void tputs (const char *, int, void (*)(int));
61 extern int tgetnum (const char *); 61
62 extern char *tgetstr (const char *, char **);
63 extern void tputs (const char *, int, void (*)(int));
64 #ifdef __cplusplus
65 }
66 #endif
67 #define FORCE_CURSOR_UPDATE(c) send_string_to_tty_console (c, 0, 0) 62 #define FORCE_CURSOR_UPDATE(c) send_string_to_tty_console (c, 0, 0)
68 #define OUTPUTN(c, a, n) \ 63 #define OUTPUTN(c, a, n) \
69 do { \ 64 do { \
70 cmputc_console = c; \ 65 cmputc_console = c; \
71 FORCE_CURSOR_UPDATE (c); \ 66 FORCE_CURSOR_UPDATE (c); \
1057 doing this after all the tgetstr()s and adjusting all the 1052 doing this after all the tgetstr()s and adjusting all the
1058 pointers. */ 1053 pointers. */
1059 CONSOLE_TTY_DATA (c)->term_entry_buffer = (char *) xmalloc (2044); 1054 CONSOLE_TTY_DATA (c)->term_entry_buffer = (char *) xmalloc (2044);
1060 bufptr = CONSOLE_TTY_DATA (c)->term_entry_buffer; 1055 bufptr = CONSOLE_TTY_DATA (c)->term_entry_buffer;
1061 1056
1062 #if !defined(WIN32) 1057 #ifdef SIGTTOU
1063 /* SIGTT* don't exist under win32 */ 1058 /* SIGTT* don't exist under win32 */
1064 EMACS_BLOCK_SIGNAL (SIGTTOU); 1059 EMACS_BLOCK_SIGNAL (SIGTTOU);
1065 #endif 1060 #endif
1066 status = tgetent (entry_buffer, terminal_type); 1061 status = tgetent (entry_buffer, terminal_type);
1067 #if !defined(WIN32) 1062 #ifdef SIGTTOU
1068 EMACS_UNBLOCK_SIGNAL (SIGTTOU); 1063 EMACS_UNBLOCK_SIGNAL (SIGTTOU);
1069 #endif 1064 #endif
1070 #if 0 1065 #if 0
1071 if (status < 0) 1066 if (status < 0)
1072 return TTY_UNABLE_OPEN_DATABASE; 1067 return TTY_UNABLE_OPEN_DATABASE;