Displaying 2 results from an estimated 2 matches for "desiredmatches".
2010 Apr 19
1
[PATCH matahari] Removes all code for the previous CPUWrapper class.
...y sensitive
- * to the output format of /proc/cpuinfo.
- *
- * Throws a runtime error if file io is unsuccessful.
- */
-void CPUWrapper::fillCPUInfo(vector<CPUWrapper*> &cpus, ManagementAgent *agent)
-{
- string line;
- string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)";
- int desiredmatches = 3; // Match string and two captured substrings
- int matchArraySize = desiredmatches * 3;
- int results[matchArraySize]; // pcre requires this much
- const char *pcre_err;
- int pcre_err_offset;
- pcre *regex;
-
- regex = pcre_compile(regexstr.c_str(), // input
-...
2010 Mar 15
0
[PATCH] Updated the list of ignored files and fixed whitespace issues.
...CRE_NOTEMPTY, // options bitvector
results, // Results vector
matchArraySize // Vector size
- );
+ );
if (match == desiredmatches) {
- string key = line.substr(results[2],
+ string key = line.substr(results[2],
results[3] - results[2]);
- string value = line.substr(results[4],
+ str...