>>604
> if ( strcmp(dt, "BM") == 0) {
>  MSG("failed!\n", 0, 0, 0);
>  ret_val = BMP_ERROR;
> }
strcmpの戻り値間違えて理解してないか?