GNU libmicrohttpd  1.0.1
mhd_str_types.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2015-2022 Karlson2k (Evgeny Grin)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
26 #ifndef MHD_STR_TYPES_H
27 #define MHD_STR_TYPES_H 1
28 
29 #ifndef MHD_STATICSTR_LEN_
33 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro) / sizeof(char) - 1)
34 #endif /* ! MHD_STATICSTR_LEN_ */
35 
40 {
41  const char *const str;
42  const size_t len;
43 };
44 
49 {
50  const char *str;
51  size_t len;
52 };
53 
58 {
59  char *str;
60  size_t len;
61 };
62 
66 #define _MHD_S_STR_W_LEN(str) { str, MHD_STATICSTR_LEN_(str) }
67 
68 #endif /* MHD_STR_TYPES_H */
const char *const str
Definition: mhd_str_types.h:41
const size_t len
Definition: mhd_str_types.h:42
const char * str
Definition: mhd_str_types.h:50