Removes trailing whitespace.

This commit is contained in:
Krzysztof Gabis 2016-04-23 12:11:25 +02:00
parent 473c7f3d8d
commit 5c4a11b036
3 changed files with 92 additions and 92 deletions

View File

@ -713,14 +713,14 @@ static JSON_Value * parse_null_value(const char **string) {
}
/* Serialization */
#define APPEND_STRING(str) do { written = append_string(buf, (str)); \
if (written < 0) { return -1; } \
if (buf != NULL) { buf += written; } \
#define APPEND_STRING(str) do { written = append_string(buf, (str));\
if (written < 0) { return -1; }\
if (buf != NULL) { buf += written; }\
written_total += written; } while(0)
#define APPEND_INDENT(level) do { written = append_indent(buf, (level)); \
if (written < 0) { return -1; } \
if (buf != NULL) { buf += written; } \
#define APPEND_INDENT(level) do { written = append_indent(buf, (level));\
if (written < 0) { return -1; }\
if (buf != NULL) { buf += written; }\
written_total += written; } while(0)
static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int level, int is_pretty, char *num_buf)

View File

@ -104,7 +104,7 @@ int json_value_equals(const JSON_Value *a, const JSON_Value *b);
JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value);
/*
* JSON Object
* JSON Objec
*/
JSON_Value * json_object_get_value (const JSON_Object *object, const char *name);
const char * json_object_get_string (const JSON_Object *object, const char *name);
@ -125,7 +125,7 @@ double json_object_dotget_number (const JSON_Object *object, const char *
int json_object_dotget_boolean(const JSON_Object *object, const char *name); /* returns -1 on fail */
/* Functions to get available names */
size_t json_object_get_count(const JSON_Object *object);
size_t json_object_get_count (const JSON_Object *object);
const char * json_object_get_name (const JSON_Object *object, size_t index);
JSON_Value * json_object_get_value_at(const JSON_Object *object, size_t index);

View File

@ -31,8 +31,8 @@
#include <string.h>
#include <math.h>
#define TEST(A) printf("%-72s-",#A); \
if(A){puts(" OK");tests_passed++;} \
#define TEST(A) printf("%-72s-",#A);\
if(A){puts(" OK");tests_passed++;}\
else{puts(" FAIL");tests_failed++;}
#define STREQ(A, B) ((A) && (B) ? strcmp((A), (B)) == 0 : 0)
#define EPSILON 0.000001