ui.hpp revision 4a53e3c2b83c476a93148eaee0272649beb221ca
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// Automated Testing Framework (atf)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// Copyright (c) 2007 The NetBSD Foundation, Inc.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// All rights reserved.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// Redistribution and use in source and binary forms, with or without
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// modification, are permitted provided that the following conditions
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// 1. Redistributions of source code must retain the above copyright
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// notice, this list of conditions and the following disclaimer.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// 2. Redistributions in binary form must reproduce the above copyright
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// notice, this list of conditions and the following disclaimer in the
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// documentation and/or other materials provided with the distribution.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! \brief Formats an error message to fit on screen.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! Given the program's name and an error message, properly formats it to
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! fit on screen.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! The program's name is not stored globally to prevent the usage of this
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! function from inside the library. Making it a explicit parameter
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! restricts its usage to the frontend.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntstd::string format_error(const std::string&, const std::string&);
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt//! \brief Formats an informational message to fit on screen.
bool, size_t = 0);