xref: /freebsd/contrib/wpa/src/utils/config.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
1 /*
2  * Configuration parsing
3  * Copyright (c) 2003-2019, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef UTILS_CONFIG_H
10 #define UTILS_CONFIG_H
11 
12 /**
13  * wpa_config_get_line - Read the next configuration file line
14  * @s: Buffer for the line
15  * @size: The buffer length
16  * @stream: File stream to read from
17  * @line: Pointer to a variable storing the file line number
18  * @_pos: Buffer for the pointer to the beginning of data on the text line or
19  * %NULL if not needed (returned value used instead)
20  * Returns: Pointer to the beginning of data on the text line or %NULL if no
21  * more text lines are available.
22  *
23  * This function reads the next non-empty line from the configuration file and
24  * removes comments. The returned string is guaranteed to be null-terminated.
25  */
26 char * wpa_config_get_line(char *s, int size, FILE *stream, int *line,
27 			   char **_pos);
28 
29 #endif /* UTILS_CONFIG_H */
30