Relicense to ISC License.
[routeros-api.git] / src / ros_parse.h
1 /**
2  * librouteros - src/ros_parse.h
3  * Copyright (C) 2009  Florian octo Forster
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  * PERFORMANCE OF THIS SOFTWARE.
16  *
17  * Authors:
18  *   Florian octo Forster <octo at verplant.org>
19  **/
20
21 #ifndef ROS_PARSE_H
22 #define ROS_PARSE_H 1
23
24 _Bool sstrtob (const char *str);
25
26 unsigned int sstrtoui (const char *str);
27 uint64_t sstrtoui64 (const char *str);
28
29 double sstrtod (const char *str);
30
31 int sstrto_rx_tx_counters (const char *str, uint64_t *rx, uint64_t *tx);
32
33 uint64_t _sstrtodate (const char *str, _Bool have_hour);
34 #define sstrtodate(str) _sstrtodate((str), 0)
35
36 #endif /* ROS_PARSE_H */
37
38 /* vim: set ts=2 sw=2 noet fdm=marker : */