Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | 2b6fa2618f76 |
children | 79c6ff3eef26 |
comparison
equal
deleted
inserted
replaced
866:613552a02607 | 867:804517e16990 |
---|---|
370 reset_command_builder_event_chain (builder); | 370 reset_command_builder_event_chain (builder); |
371 if (with_echo_buf) | 371 if (with_echo_buf) |
372 { | 372 { |
373 /* #### This badly needs to be turned into a Dynarr */ | 373 /* #### This badly needs to be turned into a Dynarr */ |
374 builder->echo_buf_length = 300; /* #### Kludge */ | 374 builder->echo_buf_length = 300; /* #### Kludge */ |
375 builder->echo_buf = xnew_array (Intbyte, builder->echo_buf_length); | 375 builder->echo_buf = xnew_array (Ibyte, builder->echo_buf_length); |
376 builder->echo_buf[0] = 0; | 376 builder->echo_buf[0] = 0; |
377 } | 377 } |
378 else | 378 else |
379 { | 379 { |
380 builder->echo_buf_length = 0; | 380 builder->echo_buf_length = 0; |
750 Lisp_Object event) | 750 Lisp_Object event) |
751 { | 751 { |
752 /* This function can GC */ | 752 /* This function can GC */ |
753 DECLARE_EISTRING_MALLOC (buf); | 753 DECLARE_EISTRING_MALLOC (buf); |
754 Bytecount buf_index = command_builder->echo_buf_index; | 754 Bytecount buf_index = command_builder->echo_buf_index; |
755 Intbyte *e; | 755 Ibyte *e; |
756 Bytecount len; | 756 Bytecount len; |
757 | 757 |
758 if (buf_index < 0) | 758 if (buf_index < 0) |
759 { | 759 { |
760 buf_index = 0; /* We're echoing now */ | 760 buf_index = 0; /* We're echoing now */ |
857 /**********************************************************************/ | 857 /**********************************************************************/ |
858 | 858 |
859 static void | 859 static void |
860 maybe_kbd_translate (Lisp_Object event) | 860 maybe_kbd_translate (Lisp_Object event) |
861 { | 861 { |
862 Emchar c; | 862 Ichar c; |
863 int did_translate = 0; | 863 int did_translate = 0; |
864 | 864 |
865 if (XEVENT_TYPE (event) != key_press_event) | 865 if (XEVENT_TYPE (event) != key_press_event) |
866 return; | 866 return; |
867 if (!HASH_TABLEP (Vkeyboard_translate_table)) | 867 if (!HASH_TABLEP (Vkeyboard_translate_table)) |
3341 if (XEVENT_TYPE (builder->most_current_event) == key_press_event | 3341 if (XEVENT_TYPE (builder->most_current_event) == key_press_event |
3342 && !NILP (Vretry_undefined_key_binding_unshifted)) | 3342 && !NILP (Vretry_undefined_key_binding_unshifted)) |
3343 { | 3343 { |
3344 Lisp_Object terminal = builder->most_current_event; | 3344 Lisp_Object terminal = builder->most_current_event; |
3345 struct key_data *key = &XEVENT (terminal)->event.key; | 3345 struct key_data *key = &XEVENT (terminal)->event.key; |
3346 Emchar c = 0; | 3346 Ichar c = 0; |
3347 if ((key->modifiers & XEMACS_MOD_SHIFT) | 3347 if ((key->modifiers & XEMACS_MOD_SHIFT) |
3348 || (CHAR_OR_CHAR_INTP (key->keysym) | 3348 || (CHAR_OR_CHAR_INTP (key->keysym) |
3349 && ((c = XCHAR_OR_CHAR_INT (key->keysym)), | 3349 && ((c = XCHAR_OR_CHAR_INT (key->keysym)), |
3350 c >= 'A' && c <= 'Z'))) | 3350 c >= 'A' && c <= 'Z'))) |
3351 { | 3351 { |
3430 if (XEVENT_TYPE (builder->most_current_event) == key_press_event | 3430 if (XEVENT_TYPE (builder->most_current_event) == key_press_event |
3431 && !NILP (Vcomposed_character_default_binding)) | 3431 && !NILP (Vcomposed_character_default_binding)) |
3432 { | 3432 { |
3433 Lisp_Object keysym = | 3433 Lisp_Object keysym = |
3434 XEVENT (builder->most_current_event)->event.key.keysym; | 3434 XEVENT (builder->most_current_event)->event.key.keysym; |
3435 if (CHARP (keysym) && !emchar_ascii_p (XCHAR (keysym))) | 3435 if (CHARP (keysym) && !ichar_ascii_p (XCHAR (keysym))) |
3436 return Vcomposed_character_default_binding; | 3436 return Vcomposed_character_default_binding; |
3437 } | 3437 } |
3438 #endif | 3438 #endif |
3439 | 3439 |
3440 return Qnil; | 3440 return Qnil; |
3900 int buf_index = command_builder->echo_buf_index; | 3900 int buf_index = command_builder->echo_buf_index; |
3901 Bytecount len = XSTRING_LENGTH (prompt); | 3901 Bytecount len = XSTRING_LENGTH (prompt); |
3902 | 3902 |
3903 if (len + buf_index + 1 <= command_builder->echo_buf_length) | 3903 if (len + buf_index + 1 <= command_builder->echo_buf_length) |
3904 { | 3904 { |
3905 Intbyte *echo = command_builder->echo_buf + buf_index; | 3905 Ibyte *echo = command_builder->echo_buf + buf_index; |
3906 memcpy (echo, XSTRING_DATA (prompt), len); | 3906 memcpy (echo, XSTRING_DATA (prompt), len); |
3907 echo[len] = 0; | 3907 echo[len] = 0; |
3908 } | 3908 } |
3909 maybe_echo_keys (command_builder, 1); | 3909 maybe_echo_keys (command_builder, 1); |
3910 } | 3910 } |
4614 !XEVENT (event)->event.key.modifiers) | 4614 !XEVENT (event)->event.key.modifiers) |
4615 { | 4615 { |
4616 Lisp_Object keysym = XEVENT (event)->event.key.keysym; | 4616 Lisp_Object keysym = XEVENT (event)->event.key.keysym; |
4617 if (CHARP (XEVENT (event)->event.key.keysym)) | 4617 if (CHARP (XEVENT (event)->event.key.keysym)) |
4618 { | 4618 { |
4619 Emchar ch = XCHAR (keysym); | 4619 Ichar ch = XCHAR (keysym); |
4620 Intbyte str[MAX_EMCHAR_LEN]; | 4620 Ibyte str[MAX_ICHAR_LEN]; |
4621 Bytecount len = set_charptr_emchar (str, ch); | 4621 Bytecount len = set_itext_ichar (str, ch); |
4622 Lstream_write (XLSTREAM (Vdribble_file), str, len); | 4622 Lstream_write (XLSTREAM (Vdribble_file), str, len); |
4623 } | 4623 } |
4624 else if (string_char_length (XSYMBOL (keysym)->name) == 1) | 4624 else if (string_char_length (XSYMBOL (keysym)->name) == 1) |
4625 /* one-char key events are printed with just the key name */ | 4625 /* one-char key events are printed with just the key name */ |
4626 Fprinc (keysym, Vdribble_file); | 4626 Fprinc (keysym, Vdribble_file); |