mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-13 12:31:25 +00:00
Misc tweaks
This commit is contained in:
parent
6e978810db
commit
0663141589
@ -94,6 +94,10 @@ int json_createFromFile(const char *filePath, INOUT JSON_s *parsedData) {
|
|||||||
char *jsonString = NULL;
|
char *jsonString = NULL;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
if (!filePath) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!parsedData) {
|
if (!parsedData) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -241,7 +245,7 @@ bool json_mapCopyStringValue(const JSON_s *map, const char *key, INOUT char **va
|
|||||||
return foundMatch;
|
return foundMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool json_mapParseLongValue(const JSON_s *map, const char *key, INOUT long *val, const int base) {
|
bool json_mapParseLongValue(const JSON_s *map, const char *key, INOUT long *val, const long base) {
|
||||||
bool foundMatch = false;
|
bool foundMatch = false;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -33,8 +33,8 @@ int json_createFromFile(const char *filePath, INOUT JSON_s *parsedData);
|
|||||||
// get string value for key in map JSON, returns true upon success and strdup()'d value in *val
|
// get string value for key in map JSON, returns true upon success and strdup()'d value in *val
|
||||||
bool json_mapCopyStringValue(const JSON_s *map, const char *key, INOUT char **val);
|
bool json_mapCopyStringValue(const JSON_s *map, const char *key, INOUT char **val);
|
||||||
|
|
||||||
// get int value for key in map JSON, returns true upon success
|
// get long value for key in map JSON, returns true upon success
|
||||||
bool json_mapParseLongValue(const JSON_s *dict, const char *key, INOUT long *val, const int base);
|
bool json_mapParseLongValue(const JSON_s *dict, const char *key, INOUT long *val, const long base);
|
||||||
|
|
||||||
// get float value for key in map JSON, returns true upon success
|
// get float value for key in map JSON, returns true upon success
|
||||||
bool json_mapParseFloatValue(const JSON_s *dict, const char *key, INOUT float *val);
|
bool json_mapParseFloatValue(const JSON_s *dict, const char *key, INOUT float *val);
|
||||||
@ -42,10 +42,11 @@ bool json_mapParseFloatValue(const JSON_s *dict, const char *key, INOUT float *v
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// array functions
|
// array functions
|
||||||
|
|
||||||
//bool json_arrayCopytStringValueAtIndex(const JSON_s *array, unsigned long index, INOUT const char **val);
|
//bool json_arrayCopyStringValueAtIndex(const JSON_s *array, unsigned long index, INOUT const char **val);
|
||||||
//bool json_arrayParseIntValueAtIndex(const JSON_s *array, unsigned long index, INOUT const int *val);
|
//bool json_arrayParseLongValueAtIndex(const JSON_s *array, unsigned long index, INOUT const long *val);
|
||||||
//bool json_arrayParseFloatValueAtIndex(const JSON_s *array, unsigned long index, INOUT const float *val);
|
//bool json_arrayParseFloatValueAtIndex(const JSON_s *array, unsigned long index, INOUT const float *val);
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
// destroys internal allocated memory (if any)
|
// destroys internal allocated memory (if any)
|
||||||
void json_destroy(JSON_s *parsedData);
|
void json_destroy(JSON_s *parsedData);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user