int boinc_zip( int bZipType, const std::string szFileZip, const std::string szFileIn ) { ZipFileList tempvec; tempvec.push_back(szFileIn); return boinc_zip(bZipType, szFileZip, &tempvec); }
// same, but with char[] instead of string // int boinc_zip(int bZipType, const char* szFileZip, const char* szFileIn) { string strFileZip, strFileIn; strFileZip.assign(szFileZip); strFileIn.assign(szFileIn); ZipFileList tempvec; tempvec.push_back(strFileIn); return boinc_zip(bZipType, strFileZip, &tempvec); }
// get the list of output files to zip // void get_zip_inputs(ZipFileList &files) { vector<string> initial_files; char fname[256]; read_initial_file_list(initial_files); DIRREF d = dir_open("."); while (!dir_scan(fname, d, sizeof(fname))) { string filename = string(fname); if (in_vector(filename, initial_files)) continue; for (unsigned int i=0; i<zip_patterns.size(); i++) { regmatch match; if (re_exec_w(zip_patterns[i], fname, 1, &match) == 1) { files.push_back(filename); break; } } } }