Browse Source

iwym: json.h

pull/1119/head
Hamish Coleman 1 year ago
parent
commit
04ce678969
  1. 6
      include/json.h
  2. 2
      include/n2n.h
  3. 2
      src/json.c
  4. 3
      tools/n2n-portfwd.c
  5. 3
      tools/n2n-route.c

6
include/json.h

@ -27,17 +27,11 @@
#define JSON_H
#include <string.h>
#include <stdlib.h>
#define json_str_is_whitespace(x) x == '\r' || x == '\n' || x == '\t' || x == ' '
#define json_str_is_numeral(x) (x >= '0' && x <= '9') || x == 'e' || x == 'E' \
|| x == '.' || x == '+' || x == '-'
#define json_str_remove_whitespace_calc_offset(x, y) while(json_str_is_whitespace(*x)) { x++; y++; }
struct _jsonobject;
struct _jsonpair;
union _jsonvalue;
typedef enum {
JSON_STRING = 0,

2
include/n2n.h

@ -151,8 +151,6 @@
#include "n2n_port_mapping.h"
#include "json.h"
/* ************************************** */
#include "tf.h"

2
src/json.c

@ -23,6 +23,8 @@
// https://github.com/forkachild/C-Simple-JSON-Parser/issues/3#issuecomment-1073520808
#include <stdlib.h> // for malloc, free, NULL, atof, realloc
#include <string.h> // for memcpy
#include "json.h"

3
tools/n2n-portfwd.c

@ -17,7 +17,8 @@
*/
#include "n2n.h"
#include "json.h" // for _jsonpair, json_object_t, json_free
#include "n2n.h" // for traceEvent, setTraceLevel, getTraceLevel
#define WITH_PORT 1

3
tools/n2n-route.c

@ -17,7 +17,8 @@
*/
#include "n2n.h"
#include "json.h" // for _jsonpair, json_object_t, _jsonvalue
#include "n2n.h" // for inaddrtoa, traceEvent, TRACE_WARNING
#if defined (__linux__) || defined(WIN32) /* currently, Linux and Windows only */

Loading…
Cancel
Save