void print_efficiency( const std::string &type, int expected_mass, const std::string &terrain, const int delay, const bool smooth ) { printf( "Testing %s on %s with %s: ", type.c_str(), terrain.c_str(), ( delay < 0 ) ? "no resets" : "resets every 5 turns" ); print_stats( find_inner( type, expected_mass, terrain, delay, smooth ) ); }
/* Prepare to extract 'control.tar.gz' or 'data.tar.gz' from the outer package * archive, returning a `struct archive *` for the enclosed file. On error, * return NULL. */ static struct archive *extract_outer(const char *filename, const char *arname) { int r; struct archive *inner; struct archive *outer; outer = open_outer(filename); if (!outer) return NULL; r = find_inner(outer, arname); if (r < 0) goto err_cleanup; inner = open_inner(outer); if (!inner) goto err_cleanup; return inner; err_cleanup: archive_read_free(outer); return NULL; }