mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-30 21:53:15 +00:00
More trailing whilespace removal
This commit is contained in:
parent
7d961b6c93
commit
b9cf7acb1a
285 changed files with 769 additions and 769 deletions
|
|
@ -66,7 +66,7 @@ ROOTDEPPATH = --dep-path .
|
|||
|
||||
# Common build
|
||||
|
||||
VPATH =
|
||||
VPATH =
|
||||
|
||||
all: .built
|
||||
.PHONY: clean depend distclean
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ philosophy as JSON itself. Simple, dumb, out of the way.
|
|||
|
||||
Some JSON:
|
||||
{
|
||||
"name": "Jack (\"Bee\") Nimble",
|
||||
"name": "Jack (\"Bee\") Nimble",
|
||||
"format": {
|
||||
"type": "rect",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"interlace": false,
|
||||
"type": "rect",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"interlace": false,
|
||||
"frame rate": 24
|
||||
}
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ Finished? Delete the root (this takes care of everything else).
|
|||
That's AUTO mode. If you're going to use Auto mode, you really ought to check pointers
|
||||
before you dereference them. If you want to see how you'd build this struct in code?
|
||||
cJSON *root,*fmt;
|
||||
root=cJSON_CreateObject();
|
||||
root=cJSON_CreateObject();
|
||||
cJSON_AddItemToObject(root, "name", cJSON_CreateString("Jack (\"Bee\") Nimble"));
|
||||
cJSON_AddItemToObject(root, "format", fmt=cJSON_CreateObject());
|
||||
cJSON_AddStringToObject(fmt,"type", "rect");
|
||||
|
|
@ -198,7 +198,7 @@ void parse_object(cJSON *item)
|
|||
int i; for (i=0;i<cJSON_GetArraySize(item);i++)
|
||||
{
|
||||
cJSON *subitem=cJSON_GetArrayItem(item,i);
|
||||
// handle subitem.
|
||||
// handle subitem.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void parse_object(cJSON *item)
|
|||
{
|
||||
// handle subitem
|
||||
if (subitem->child) parse_object(subitem->child);
|
||||
|
||||
|
||||
subitem=subitem->next;
|
||||
}
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ cJSON *Create_array_of_anything(cJSON **items,int num)
|
|||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
and simply: Create_array_of_anything(objects,24);
|
||||
|
||||
cJSON doesn't make any assumptions about what order you create things in.
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ static void create_objects(void)
|
|||
int i;
|
||||
|
||||
/* Our "days of the week" array */
|
||||
|
||||
|
||||
static const char *strings[7] =
|
||||
{
|
||||
"Sunday", "Monday", "Tuesday", "Wednesday",
|
||||
|
|
@ -138,7 +138,7 @@ static void create_objects(void)
|
|||
};
|
||||
|
||||
/* Our matrix: */
|
||||
|
||||
|
||||
static const int numbers[3][3] = { {0, -1, 0}, {1, 0, 0}, {0, 0, 1} };
|
||||
|
||||
/* Our "gallery" item: */
|
||||
|
|
@ -229,10 +229,10 @@ static void create_objects(void)
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* Name:
|
||||
* Name:
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ int json_main(int argc, const char *argv[])
|
|||
" }\n"
|
||||
"}";
|
||||
|
||||
static const char text2[] =
|
||||
static const char text2[] =
|
||||
"[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]";
|
||||
|
||||
static const char text3[] =
|
||||
|
|
@ -261,7 +261,7 @@ int json_main(int argc, const char *argv[])
|
|||
" [1, 0, 0],\n"
|
||||
" [0, 0, 1]\n"
|
||||
"]\n";
|
||||
|
||||
|
||||
static const char text4[] =
|
||||
"{\n"
|
||||
" \"Image\": {\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue