}
#endif /* HAVE_NS */
-int
-menu_item_width (const char *str)
+ptrdiff_t
+menu_item_width (const unsigned char *str)
{
- int len;
- const char *p;
+ ptrdiff_t len;
+ const unsigned char *p;
for (len = 0, p = str; *p; )
{
if (XINT (pos) <= col
/* We use <= so the blank between 2 items on a TTY is
considered part of the previous item. */
- && col <= XINT (pos) + menu_item_width (SSDATA (str)))
+ && col <= XINT (pos) + menu_item_width (SDATA (str)))
{
item = AREF (items, i);
return item;