libexplain  1.4.D001
libexplain/string_to_thing.h
Go to the documentation of this file.
00001 /*
00002  * libexplain - Explain errno values returned by libc functions
00003  * Copyright (C) 2009, 2012, 2013 Peter Miller
00004  * Written by Peter Miller <pmiller@opensource.org.au>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as
00008  * published by the Free Software Foundation; either version 3 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 #ifndef LIBEXPLAIN_STRING_TO_THING_H
00021 #define LIBEXPLAIN_STRING_TO_THING_H
00022 
00023 #include <libexplain/ac/stddef.h>
00024 #include <libexplain/ac/sys/socket.h>
00025 #include <libexplain/ac/stdio.h>
00026 #include <libexplain/ac/unistd.h>
00027 
00038 size_t explain_parse_size_t_or_die(const char *text);
00039 
00050 ssize_t explain_parse_ssize_t_or_die(const char *text);
00051 
00062 ptrdiff_t explain_parse_ptrdiff_t_or_die(const char *text);
00063 
00074 off_t explain_parse_off_t_or_die(const char *text);
00075 
00086 void *explain_parse_pointer_or_die(const char *text);
00087 
00098 long explain_parse_long_or_die(const char *text);
00099 
00110 unsigned long explain_parse_ulong_or_die(const char *text);
00111 
00122 long long explain_parse_longlong_or_die(const char *text);
00123 
00134 unsigned long long explain_parse_ulonglong_or_die(const char *text);
00135 
00146 socklen_t explain_parse_socklen_t_or_die(const char *text);
00147 
00158 int explain_parse_int_or_die(const char *text);
00159 
00170 unsigned explain_parse_uint_or_die(const char *text);
00171 
00182 double explain_parse_double_or_die(const char *text);
00183 
00194 float explain_parse_float_or_die(const char *text);
00195 
00206 long double explain_parse_long_double_or_die(const char *text);
00207 
00218 uid_t explain_parse_uid_t_or_die(const char *text);
00219 
00230 gid_t explain_parse_gid_t_or_die(const char *text);
00231 
00232 int explain_parse_bool_or_die(const char * text);
00233 
00234 FILE *explain_parse_stream_or_die(const char *text, const char *mode);
00235 
00236 #endif /* LIBEXPLAIN_STRING_TO_THING_H */
00237 /* vim: set ts=8 sw=4 et : */