*** empty log message ***

svn path=/trunk/boinc/; revision=2159
This commit is contained in:
Dan Werthimer 2003-08-20 23:11:15 +00:00
parent c1c53af1b2
commit 7ba4ee6347
2 changed files with 32 additions and 0 deletions

View File

@ -240,6 +240,25 @@ int SCHEDULER_OP::init_master_fetch(PROJECT* p) {
return 0; return 0;
} }
inline void trim(STRING256& str)
{
char* last_char = str.text + strlen(str.text);
while (isspace(*(last_char-1)) && last_char > str.text) {
--last_char;
}
*last_char = '\0';
char *first_char = str.text;
if (isspace(*first_char)) {
while (isspace(*first_char))
++first_char;
char* dest = str.text;
while (*first_char) {
*dest++ = *first_char++;
}
*dest = '\0';
}
}
// parse a master file. // parse a master file.
// //
int SCHEDULER_OP::parse_master_file(vector<STRING256> &urls) { int SCHEDULER_OP::parse_master_file(vector<STRING256> &urls) {
@ -257,6 +276,7 @@ int SCHEDULER_OP::parse_master_file(vector<STRING256> &urls) {
project->scheduler_urls.clear(); project->scheduler_urls.clear();
while (fgets(buf, 256, f)) { while (fgets(buf, 256, f)) {
if (parse_str(buf, "<scheduler>", str.text, sizeof(str.text))) { if (parse_str(buf, "<scheduler>", str.text, sizeof(str.text))) {
trim(str);
urls.push_back(str); urls.push_back(str);
} }
} }

View File

@ -482,12 +482,24 @@ SOURCE=..\client\win\res\mess.bmp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\client\win\res\proj.bmp
# End Source File
# Begin Source File
SOURCE=..\client\win\res\result.bmp
# End Source File
# Begin Source File
SOURCE=..\client\win\res\small.ico SOURCE=..\client\win\res\small.ico
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\client\win\res\smallico.ico SOURCE=..\client\win\res\smallico.ico
# End Source File # End Source File
# Begin Source File
SOURCE=..\client\win\res\xfer.bmp
# End Source File
# End Group # End Group
# End Target # End Target
# End Project # End Project