fixes entering bootload messages to be less scary
[RRG-proxmark3.git] / client / src / jansson_path.h
blob88c0ad626d7c26ba0f12bf64113ce7aaf94e8549
1 //-----------------------------------------------------------------------------
2 // Borrowed initially from
3 // https://github.com/rogerz/jansson/blob/json_path/src/path.c
4 // Copyright (c) 2012 Rogerz Zhang <rogerz.zhang@gmail.com>
5 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // See LICENSE.txt for the text of the license.
18 //-----------------------------------------------------------------------------
20 #ifndef JANSSON_PATH_H
21 #define JANSSON_PATH_H
23 //#include <stdio.h>
24 #include <stdlib.h> /* for size_t */
25 //#include <stdarg.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 json_t *json_path_get(const json_t *json, const char *path);
32 int json_path_set_new(json_t *json, const char *path, json_t *value, size_t flags, json_error_t *error);
34 static JSON_INLINE
35 int json_path_set(json_t *json, const char *path, json_t *value, size_t flags, json_error_t *error) {
36 return json_path_set_new(json, path, json_incref(value), flags, error);
39 #ifdef __cplusplus
41 #endif
42 #endif