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;
|
||||
|
||||
do {
|
||||
if (!filePath) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!parsedData) {
|
||||
break;
|
||||
}
|
||||
@ -241,7 +245,7 @@ bool json_mapCopyStringValue(const JSON_s *map, const char *key, INOUT char **va
|
||||
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;
|
||||
|
||||
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
|
||||
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
|
||||
bool json_mapParseLongValue(const JSON_s *dict, const char *key, INOUT long *val, const int base);
|
||||
// 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 long base);
|
||||
|
||||
// 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);
|
||||
@ -42,10 +42,11 @@ bool json_mapParseFloatValue(const JSON_s *dict, const char *key, INOUT float *v
|
||||
// ----------------------------------------------------------------------------
|
||||
// array functions
|
||||
|
||||
//bool json_arrayCopytStringValueAtIndex(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_arrayCopyStringValueAtIndex(const JSON_s *array, unsigned long index, INOUT const char **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);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// destroys internal allocated memory (if any)
|
||||
void json_destroy(JSON_s *parsedData);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user