111be35a1SLionel Sambuc /* 211be35a1SLionel Sambuc * Automated Testing Framework (atf) 311be35a1SLionel Sambuc * 411be35a1SLionel Sambuc * Copyright (c) 2008 The NetBSD Foundation, Inc. 511be35a1SLionel Sambuc * All rights reserved. 611be35a1SLionel Sambuc * 711be35a1SLionel Sambuc * Redistribution and use in source and binary forms, with or without 811be35a1SLionel Sambuc * modification, are permitted provided that the following conditions 911be35a1SLionel Sambuc * are met: 1011be35a1SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 1111be35a1SLionel Sambuc * notice, this list of conditions and the following disclaimer. 1211be35a1SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 1311be35a1SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 1411be35a1SLionel Sambuc * documentation and/or other materials provided with the distribution. 1511be35a1SLionel Sambuc * 1611be35a1SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 1711be35a1SLionel Sambuc * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 1811be35a1SLionel Sambuc * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1911be35a1SLionel Sambuc * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2011be35a1SLionel Sambuc * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 2111be35a1SLionel Sambuc * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2211be35a1SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2311be35a1SLionel Sambuc * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2411be35a1SLionel Sambuc * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 2511be35a1SLionel Sambuc * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2611be35a1SLionel Sambuc * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 2711be35a1SLionel Sambuc * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2811be35a1SLionel Sambuc */ 2911be35a1SLionel Sambuc 3011be35a1SLionel Sambuc #if !defined(ATF_C_TEXT_H) 3111be35a1SLionel Sambuc #define ATF_C_TEXT_H 3211be35a1SLionel Sambuc 3311be35a1SLionel Sambuc #include <stdarg.h> 3411be35a1SLionel Sambuc #include <stdbool.h> 3511be35a1SLionel Sambuc 3611be35a1SLionel Sambuc #include <atf-c/error_fwd.h> 37*0a6a1f1dSLionel Sambuc #include <atf-c/defs.h> 3811be35a1SLionel Sambuc 3911be35a1SLionel Sambuc #include "list.h" 4011be35a1SLionel Sambuc 4111be35a1SLionel Sambuc atf_error_t atf_text_for_each_word(const char *, const char *, 4211be35a1SLionel Sambuc atf_error_t (*)(const char *, void *), 4311be35a1SLionel Sambuc void *); 44*0a6a1f1dSLionel Sambuc atf_error_t atf_text_format(char **, const char *, ...) 45*0a6a1f1dSLionel Sambuc ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3); 46*0a6a1f1dSLionel Sambuc atf_error_t atf_text_format_ap(char **, const char *, va_list) 47*0a6a1f1dSLionel Sambuc ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 0); 4811be35a1SLionel Sambuc atf_error_t atf_text_split(const char *, const char *, atf_list_t *); 4911be35a1SLionel Sambuc atf_error_t atf_text_to_bool(const char *, bool *); 5011be35a1SLionel Sambuc atf_error_t atf_text_to_long(const char *, long *); 5111be35a1SLionel Sambuc 5211be35a1SLionel Sambuc #endif /* ATF_C_TEXT_H */ 53