converted more tests from Perl to C II