Tool g_isdorder compiles but is not well tested. Several bugs still need to be fixed.