Ticket #7007: bcp.patch
File bcp.patch, 2.8 KB (added by , 10 years ago) |
---|
-
licence_info.cpp
702 702 , 703 703 "<P>The code has no license terms, it has been explicity placed in the\n" 704 704 "public domain by it's author(s).</P>" 705 705 ) 706 706 , 707 707 }; 708 return std::pair<const license_info*, int>(licenses, s izeof(licenses)/sizeof(licenses[0]));708 return std::pair<const license_info*, int>(licenses, static_cast<int>(sizeof(licenses)/sizeof(licenses[0]))); 709 709 } 710 710 711 711 std::string format_authors_name(const std::string& name) 712 712 { 713 713 // put name into a consistent format, so that we don't get too much 714 714 // of a proliferation of names (lots of versions of the same basic form). -
scan_cvs_path.cpp
28 28 // 29 29 static const char* file_list[] = { "CVS/Entries", "CVS/Entries.Log" }; 30 30 static const boost::regex file_expression("^(?:A\\s+)?/([^/\\n]+)/[^/\\n]*/[^/\\n]*/[^k/\\n]*(kb[^/\\n]*)?/[^/\\n]*"); 31 31 static const boost::regex dir_expression("^(?:A\\s+)?D/([^/\\n]+)/"); 32 32 static const int file_subs[] = {1,2,}; 33 33 34 for( int entry = 0; entry < sizeof(file_list)/sizeof(file_list[0]); ++entry)34 for(size_t entry = 0; entry < sizeof(file_list)/sizeof(file_list[0]); ++entry) 35 35 { 36 36 fs::path entries(m_boost_path / p / file_list[entry]); 37 37 if(fs::exists(entries)) 38 38 { 39 39 fileview view(entries); 40 40 boost::regex_token_iterator<const char*> i(view.begin(), view.end(), dir_expression, 1); -
scan_licence.cpp
24 24 fileview::const_iterator 25 25 context_before_license(const fileview& v, fileview::const_iterator start, 26 26 int context_lines = 3) 27 27 { 28 28 char last_char = '\0'; 29 29 while (start != v.begin() && context_lines >= 0) { 30 if ( *start == '\r' || *start == '\n'31 && ( last_char == *start || (last_char != '\r' && last_char != '\n')))30 if (((*start == '\r') || (*start == '\n')) 31 && ((last_char == *start) || ((last_char != '\r') && (last_char != '\n')))) 32 32 --context_lines; 33 33 34 34 last_char = *start; 35 35 --start; 36 36 } 37 37 … … 45 45 fileview::const_iterator 46 46 context_after_license(const fileview& v, fileview::const_iterator end, 47 47 int context_lines = 3) 48 48 { 49 49 char last_char = '\0'; 50 50 while (end != v.end() && context_lines >= 0) { 51 if ( *end == '\r' || *end == '\n'52 && ( last_char == *end || (last_char != '\r' && last_char != '\n')))51 if (((*end == '\r') || (*end == '\n')) 52 && ((last_char == *end) || ((last_char != '\r') && (last_char != '\n')))) 53 53 --context_lines; 54 54 55 55 last_char = *end; 56 56 ++end; 57 57 } 58 58