From 87b8f559c8d12af6d593e7c30a78410586f49be7 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Sat, 19 Dec 2009 04:04:25 +0000 Subject: [PATCH] Quick Updates svn path=/trunk/boinc/; revision=19980 --- lib/notice.cpp | 126 ++++++++++++++++++++------------------ win_build/boincmgr.vcproj | 4 ++ 2 files changed, 69 insertions(+), 61 deletions(-) diff --git a/lib/notice.cpp b/lib/notice.cpp index 20cb2f98cc..32cf9c3414 100644 --- a/lib/notice.cpp +++ b/lib/notice.cpp @@ -1,61 +1,65 @@ -// This file is part of BOINC. -// http://boinc.berkeley.edu -// Copyright (C) 2009 University of California -// -// BOINC is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// BOINC is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with BOINC. If not, see . - -#include "error_numbers.h" -#include "notice.h" - -int NOTICE::parse(XML_PARSER& xp) { - char tag[1024]; - bool is_tag; - - while (!xp.get(tag, sizeof(tag), is_tag)) { - if (!is_tag) continue; - if (!strcmp(tag, "/notice")) return 0; - if (xp.parse_int(tag, "seqno", seqno)) continue; - if (xp.parse_str(tag, "title", title, sizeof(title))) continue; - if (xp.parse_string(tag, "description", description)) continue; - if (xp.parse_double(tag, "create_time", create_time)) continue; - if (xp.parse_double(tag, "arrival_time", arrival_time)) continue; - if (xp.parse_bool(tag, "is_private", is_private)) continue; - if (xp.parse_str(tag, "category", category, sizeof(category))) continue; - if (xp.parse_str(tag, "url", url, sizeof(url))) continue; - } - return ERR_XML_PARSE; -} - -void NOTICE::write(MIOFILE& f) { - f.printf( - "\n" - " %d\n" - " %s\n" - " %s\n" - " %f\n" - " %f\n" - " %d\n" - " %s\n" - " %s\n" - "\n", - seqno, - title, - description.c_str(), - create_time, - arrival_time, - is_private?1:0, - category, - url - ); -} +// This file is part of BOINC. +// http://boinc.berkeley.edu +// Copyright (C) 2009 University of California +// +// BOINC is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// BOINC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with BOINC. If not, see . + +#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) +#include "boinc_win.h" +#endif + +#include "error_numbers.h" +#include "notice.h" + +int NOTICE::parse(XML_PARSER& xp) { + char tag[1024]; + bool is_tag; + + while (!xp.get(tag, sizeof(tag), is_tag)) { + if (!is_tag) continue; + if (!strcmp(tag, "/notice")) return 0; + if (xp.parse_int(tag, "seqno", seqno)) continue; + if (xp.parse_str(tag, "title", title, sizeof(title))) continue; + if (xp.parse_string(tag, "description", description)) continue; + if (xp.parse_double(tag, "create_time", create_time)) continue; + if (xp.parse_double(tag, "arrival_time", arrival_time)) continue; + if (xp.parse_bool(tag, "is_private", is_private)) continue; + if (xp.parse_str(tag, "category", category, sizeof(category))) continue; + if (xp.parse_str(tag, "url", url, sizeof(url))) continue; + } + return ERR_XML_PARSE; +} + +void NOTICE::write(MIOFILE& f) { + f.printf( + "\n" + " %d\n" + " %s\n" + " %s\n" + " %f\n" + " %f\n" + " %d\n" + " %s\n" + " %s\n" + "\n", + seqno, + title, + description.c_str(), + create_time, + arrival_time, + is_private?1:0, + category, + url + ); +} diff --git a/win_build/boincmgr.vcproj b/win_build/boincmgr.vcproj index 86d0229f9f..a70c8547bf 100644 --- a/win_build/boincmgr.vcproj +++ b/win_build/boincmgr.vcproj @@ -1356,6 +1356,10 @@ RelativePath="..\lib\notice.cpp" > + +