/* 「GR[0-7]」以外の文字列では、0xFFFFを返して終了 */
if(!(strlen(str) == 3 && strncmp(str, "GR", 2) == 0 &&
(*(str+2) >= '0' && *(str+2) <= '0' + (GRSIZE - 1))))
/* 「GR[0-7]」以外の文字列では、0xFFFFを返して終了 */
if(!(strlen(str) == 3 && strncmp(str, "GR", 2) == 0 &&
(*(str+2) >= '0' && *(str+2) <= '0' + (GRSIZE - 1))))