utf_ptr2cells(
    char_u	*p)
{
    int		c;

    // Need to convert to a character number.
    if (*p >= 0x80)
    {
	c = utf_ptr2char(p);
	// An illegal byte is displayed as <xx>.
	if (utf_ptr2len(p) == 1 || c == NUL)
	    return 4;
	// If the char is ASCII it must be an overlong sequence.
	if (c < 0x80)
	    return char2cells(c);
	return utf_char2cells(c);
    }
    return 1;
}
utf_ptr2cells(
    char_u	*p)
{
    int		c;

     
    if (*p >= 0x80)
    {
	c = utf_ptr2char(p);
	 
	if (utf_ptr2len(p) == 1 || c == NUL)
	    return 4;
	 
	if (c < 0x80)
	    return char2cells(c);
	return utf_char2cells(c);
    }
    return 1;
}