comparison src/menubar-msw.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 2f8bb876ab1d
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
76 * 76 *
77 */ 77 */
78 78
79 #include <config.h> 79 #include <config.h>
80 #include "lisp.h" 80 #include "lisp.h"
81 #include <limits.h>
82 81
83 #include "buffer.h" 82 #include "buffer.h"
84 #include "commands.h" 83 #include "commands.h"
85 #include "console-msw.h" 84 #include "console-msw.h"
86 #include "elhash.h" 85 #include "elhash.h"
124 maxlen = size of buffer. 123 maxlen = size of buffer.
125 We assume and maintain zero-termination. To be absolutely sure 124 We assume and maintain zero-termination. To be absolutely sure
126 of not hitting an error, maxlen should be >= 2*len + 3. */ 125 of not hitting an error, maxlen should be >= 2*len + 3. */
127 126
128 Bytecount 127 Bytecount
129 msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, 128 mswindows_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len,
130 Bytecount maxlen, Emchar *accel, 129 Bytecount maxlen, Emchar *accel,
131 Lisp_Object error_name) 130 Lisp_Object error_name)
132 { 131 {
133 Bufbyte *ptr; 132 Bufbyte *ptr;
134 133
207 static char buf[MAX_MENUITEM_LENGTH+2]; 206 static char buf[MAX_MENUITEM_LENGTH+2];
208 207
209 /* Left flush part of the string */ 208 /* Left flush part of the string */
210 ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH); 209 ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH);
211 210
212 ll = msw_translate_menu_or_dialog_item ((Bufbyte *) buf, ll, 211 ll = mswindows_translate_menu_or_dialog_item ((Bufbyte *) buf, ll,
213 MAX_MENUITEM_LENGTH, accel, 212 MAX_MENUITEM_LENGTH, accel,
214 XGUI_ITEM (gui_item)->name); 213 XGUI_ITEM (gui_item)->name);
215 214
216 /* Right flush part, unless we're at the top-level where it's not allowed */ 215 /* Right flush part, unless we're at the top-level where it's not allowed */
217 if (!bar_p) 216 if (!bar_p)
666 current_hash_table = Qnil; 665 current_hash_table = Qnil;
667 prune_menubar (f); 666 prune_menubar (f);
668 } 667 }
669 668
670 int 669 int
671 msw_char_is_accelerator (struct frame *f, Emchar ch) 670 mswindows_char_is_accelerator (struct frame *f, Emchar ch)
672 { 671 {
673 Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f); 672 Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f);
674 673
675 assert (HASH_TABLEP (hash)); 674 assert (HASH_TABLEP (hash));
676 /* !!#### not Mule-ized */ 675 /* !!#### not Mule-ized */