diff options
| author | Richard M. Stallman | 1998-01-09 23:21:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-01-09 23:21:17 +0000 |
| commit | 0869c141aaa1ed145c151c530197a2fe41656b08 (patch) | |
| tree | 75fa1595a23532dc6098388f7434c964a4e4be03 /src | |
| parent | 9f2a85b225039eee88b2f76b51106abb2da3a135 (diff) | |
| download | emacs-0869c141aaa1ed145c151c530197a2fe41656b08.tar.gz emacs-0869c141aaa1ed145c151c530197a2fe41656b08.zip | |
(xmenu_show): Use size_byte of strings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 533526f5c4e..77a367a8ac9 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2559,7 +2559,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2559 | j++; | 2559 | j++; |
| 2560 | continue; | 2560 | continue; |
| 2561 | } | 2561 | } |
| 2562 | width = XSTRING (item)->size; | 2562 | width = XSTRING (item)->size_byte; |
| 2563 | if (width > maxwidth) | 2563 | if (width > maxwidth) |
| 2564 | maxwidth = width; | 2564 | maxwidth = width; |
| 2565 | 2565 | ||
| @@ -2582,7 +2582,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2582 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; | 2582 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; |
| 2583 | if (!NILP (descrip)) | 2583 | if (!NILP (descrip)) |
| 2584 | { | 2584 | { |
| 2585 | int gap = maxwidth - XSTRING (item_name)->size; | 2585 | int gap = maxwidth - XSTRING (item_name)->size_byte; |
| 2586 | #ifdef C_ALLOCA | 2586 | #ifdef C_ALLOCA |
| 2587 | Lisp_Object spacer; | 2587 | Lisp_Object spacer; |
| 2588 | spacer = Fmake_string (make_number (gap), make_number (' ')); | 2588 | spacer = Fmake_string (make_number (gap), make_number (' ')); |
| @@ -2594,14 +2594,14 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2594 | to reduce gc needs. */ | 2594 | to reduce gc needs. */ |
| 2595 | item_data | 2595 | item_data |
| 2596 | = (unsigned char *) alloca (maxwidth | 2596 | = (unsigned char *) alloca (maxwidth |
| 2597 | + XSTRING (descrip)->size + 1); | 2597 | + XSTRING (descrip)->size_byte + 1); |
| 2598 | bcopy (XSTRING (item_name)->data, item_data, | 2598 | bcopy (XSTRING (item_name)->data, item_data, |
| 2599 | XSTRING (item_name)->size); | 2599 | XSTRING (item_name)->size_byte); |
| 2600 | for (j = XSTRING (item_name)->size; j < maxwidth; j++) | 2600 | for (j = XSTRING (item_name)->size; j < maxwidth; j++) |
| 2601 | item_data[j] = ' '; | 2601 | item_data[j] = ' '; |
| 2602 | bcopy (XSTRING (descrip)->data, item_data + j, | 2602 | bcopy (XSTRING (descrip)->data, item_data + j, |
| 2603 | XSTRING (descrip)->size); | 2603 | XSTRING (descrip)->size_byte); |
| 2604 | item_data[j + XSTRING (descrip)->size] = 0; | 2604 | item_data[j + XSTRING (descrip)->size_byte] = 0; |
| 2605 | #endif | 2605 | #endif |
| 2606 | } | 2606 | } |
| 2607 | else | 2607 | else |