X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fredisplay-tty.c;h=42d18b925f2da4ef7e2c4d70ada536be07768e1b;hb=8f201410dbfa76a6807953b876316208832770ed;hp=66b9445cac68915dfb83de050d75b822ac691cb6;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89;p=chise%2Fxemacs-chise.git- diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 66b9445..42d18b9 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -56,11 +56,11 @@ Boston, MA 02111-1307, USA. */ #ifdef __cplusplus extern "C" { #endif -extern int tgetent (CONST char *, CONST char *); -extern int tgetflag (CONST char *); -extern int tgetnum (CONST char *); -extern char *tgetstr (CONST char *, char **); -extern void tputs (CONST char *, int, void (*)(int)); +extern int tgetent (const char *, const char *); +extern int tgetflag (const char *); +extern int tgetnum (const char *); +extern char *tgetstr (const char *, char **); +extern void tputs (const char *, int, void (*)(int)); #ifdef __cplusplus } #endif @@ -107,7 +107,7 @@ static void term_get_fkeys (Lisp_Object keymap, char **address); column, so we use emchar_string_displayed_columns(). ****************************************************************************/ static int -tty_text_width (struct frame *f, struct face_cachel *cachel, CONST Emchar *str, +tty_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str, Charcount len) { return emchar_string_displayed_columns (str, len); @@ -333,79 +333,29 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, window, ERROR_ME_NOT, 1); if (IMAGE_INSTANCEP (instance)) - switch (XIMAGE_INSTANCE_TYPE (instance)) - { - case IMAGE_TEXT: + { + switch (XIMAGE_INSTANCE_TYPE (instance)) { - Bufbyte *temptemp; - Lisp_Object string = - XIMAGE_INSTANCE_TEXT_STRING (instance); - Bytecount len = XSTRING_LENGTH (string); - - /* In the unlikely instance that a garbage-collect - occurs during encoding, we at least need to - copy the string. - */ - temptemp = (Bufbyte *) alloca (len); - memcpy (temptemp, XSTRING_DATA (string), len); - { - int i; - - /* Now truncate the first rb->object.dglyph.xoffset - columns. */ - for (i = 0; i < rb->object.dglyph.xoffset;) - { -#ifdef MULE - Emchar ch = charptr_emchar (temptemp); - i += XCHARSET_COLUMNS (CHAR_CHARSET (ch)); -#else - i++; /* telescope this */ -#endif - INC_CHARPTR (temptemp); - } - - /* If we truncated one column too many, then - add a space at the beginning. */ - if (i > rb->object.dglyph.xoffset) - { - assert (i > 0); - *--temptemp = ' '; - i--; - } - len -= i; - } - - tty_output_bufbyte_string (w, dl, temptemp, len, - xpos, findex, 0); - - if (xpos >= cursor_start - && (cursor_start < - xpos + (bufbyte_string_displayed_columns - (temptemp, len)))) - { - cmgoto (f, dl->ypos - 1, cursor_start); - } + case IMAGE_MONO_PIXMAP: + case IMAGE_COLOR_PIXMAP: + case IMAGE_SUBWINDOW: + case IMAGE_WIDGET: + case IMAGE_LAYOUT: + /* just do nothing here */ + break; + + case IMAGE_NOTHING: + /* nothing is as nothing does */ + break; + + case IMAGE_TEXT: + case IMAGE_POINTER: + default: + abort (); } - break; - - case IMAGE_MONO_PIXMAP: - case IMAGE_COLOR_PIXMAP: - case IMAGE_SUBWINDOW: - case IMAGE_WIDGET: - case IMAGE_LAYOUT: - /* just do nothing here */ - break; - - case IMAGE_POINTER: - abort (); - - case IMAGE_NOTHING: - /* nothing is as nothing does */ - break; - - default: - abort (); - } + IMAGE_INSTANCE_OPTIMIZE_OUTPUT + (XIMAGE_INSTANCE (instance)) = 0; + } xpos += rb->width; elt++; @@ -566,7 +516,7 @@ tty_clear_frame (struct frame *f) clear_to_end (f); #else /* #### Not implemented. */ - fprintf (stderr, "Not yet.\n"); + stderr_out ("Not yet.\n"); #endif } tty_turn_off_frame_face (f, Vdefault_face); @@ -1305,8 +1255,8 @@ init_tty_for_redisplay (struct device *d, char *terminal_type) struct fkey_table { - CONST char *cap; - CONST char *name; + const char *cap; + const char *name; }; /* Termcap capability names that correspond directly to X keysyms. @@ -1448,8 +1398,8 @@ term_get_fkeys_1 (Lisp_Object function_key_map) "k;", and if it is present, assuming that "k0" denotes F0, otherwise F10. */ { - CONST char *k_semi = tgetstr ("k;", address); - CONST char *k0 = tgetstr ("k0", address); + const char *k_semi = tgetstr ("k;", address); + const char *k0 = tgetstr ("k0", address); if (k_semi) Fdefine_key (function_key_map, build_ext_string (k_semi, Qbinary),