[an error occurred while processing this directive]
|
word fat_dir_tounicode(byte d)
{
word ret;
/* Code page 855 (Windows) */
ret = (word)d;
if (d >= 0xC0)
{
ret += (0x0410 - 0xC0);
}
else if (d == 0xA8)
{
ret = 0x0401;
}
else if (d == 0xB8)
{
ret = 0x0451;
}
return(ret);
}
byte fat_dir_fromunicode(word d)
{
byte ret;
/* Code page 855 (Windows) */
if ((d >= 0x0410) && (d <= 0x044F))
{
ret = (byte)(d - 0x0410 + 0xC0);
}
else if (d == 0x0401)
{
ret = 0xA8;
}
else if (d == 0x0451)
{
ret = 0xB8;
}
else if (!(d & 0xFF00))
{
ret = (byte)d;
}
else
{
ret = '*';
}
return(ret);
}