David 20 Apr 2007

- str_util: don't use std::transform, since it causes problems
        with VC++ express edition

    clientgui/
        sg_SGUIListControl.h
    html/ops/
        db_update.php
    lib/
        str_util.C,h

svn path=/trunk/boinc/; revision=12433
This commit is contained in:
David Anderson 2007-04-20 18:49:40 +00:00
parent 6dac970e5b
commit e8aded2135
6 changed files with 27 additions and 12 deletions

View File

@ -1,7 +1,7 @@
// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Source: http://boinc.berkeley.edu/source_code.php
// Copyright(C) 2002-2006 University of California
// Copyright(C) 2002-2007 University of California
//
// This is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -3852,3 +3852,14 @@ David 20 Apr 2007
tools/
backend_lib.C
make_project
David 20 Apr 2007
- str_util: don't use std::transform, since it causes problems
with VC++ express edition
clientgui/
sg_SGUIListControl.h
html/ops/
db_update.php
lib/
str_util.C,h

View File

@ -46,4 +46,4 @@ private:
CPanelMessages* m_pParentView;
};
#endif
#endif

View File

@ -346,7 +346,7 @@ function update_11_10_2006() {
do_query("ALTER TABLE thread ADD locked TINYINT NOT NULL DEFAULT 0");
}
function update_12_22_2007() {
function update_12_22_2006() {
do_query("ALTER TABLE forum ADD is_dev_blog TINYINT NOT NULL DEFAULT 0");
}
@ -360,6 +360,11 @@ function update_4_07_2007() {
);
}
// modify the following to call the function you want.
// Make sure you do all needed functions, in order.
// (Look at your DB structure using "explain" queries to see
// which ones you need).
//update_4_07_2007();
?>

View File

@ -433,7 +433,7 @@ void canonicalize_master_url(char* url) {
if (buf[n-1] != '/') {
strcat(buf, "/");
}
sprintf(url, "http%s://%s", (bSSL ? "s" : ""), buf); // CMC Here -- add SSL if needed
sprintf(url, "http%s://%s", (bSSL ? "s" : ""), buf);
}
void canonicalize_master_url(string& url) {

View File

@ -70,15 +70,14 @@ inline bool starts_with(std::string const& s, std::string const& prefix) {
return s.substr(0, prefix.size()) == prefix;
}
// http://lists.debian.org/debian-gcc/2002/debian-gcc-200204/msg00092.html
inline void downcase_string(
std::string::iterator begin, std::string::iterator end, std::string::iterator src
) {
transform(begin, end, src, (int(*)(int))tolower);
}
inline void downcase_string(std::string& w) {
downcase_string(w.begin(), w.end(), w.begin());
char buf[1024];
strlcpy(buf, w.c_str(), sizeof(buf));
int n = strlen(buf);
for (int i=0; i<n; i++) {
buf[i] = tolower(buf[i]);
}
w = buf;
}
// convert UNIX time to MySQL timestamp (yyyymmddhhmmss)