added of2g_get_length.c