1
/* Copyright © 2005-2006 Roger Leigh <rleigh@debian.org>
3
* schroot is free software; you can redistribute it and/or modify it
4
* under the terms of the GNU General Public License as published by
5
* the Free Software Foundation; either version 2 of the License, or
6
* (at your option) any later version.
8
* schroot is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18
*********************************************************************/
22
#include "sbuild-parse-value.h"
24
using namespace sbuild;
27
sbuild::parse_value (std::string const& value,
30
if (value == "true" || value == "yes" || value == "1")
32
else if (value == "false" || value == "no" || value == "0")
36
log_debug(DEBUG_NOTICE) << "parse error" << std::endl;
37
throw parse_error(parse_error::BAD_VALUE, value);
40
log_debug(DEBUG_NOTICE) << "value=" << parsed_value << std::endl;
44
sbuild::parse_value (std::string const& value,
45
std::string& parsed_value)
48
log_debug(DEBUG_NOTICE) << "value=" << parsed_value << std::endl;