Selaa lähdekoodia

spelling: Fix examples/* issues.

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
Mario Trangoni 2 vuotta sitten
vanhempi
commit
d9c3087e3e

+ 1 - 1
examples/embedded_c/embedded_c.c

@@ -4,7 +4,7 @@
  * License http://opensource.org/licenses/mit-license.php MIT License
  */
 
-/* Note: This example ommits some error checking and input validation for a
+/* Note: This example omits some error checking and input validation for a
  * better clarity/readability of the code. Example codes undergo less quality
  * management than the main source files of this project. */
 

+ 3 - 3
examples/rest/cJSON/cJSON.c

@@ -126,7 +126,7 @@ typedef struct internal_hooks
 } internal_hooks;
 
 #if defined(_MSC_VER)
-/* work around MSVC error C2322: '...' address of dillimport '...' is not static */
+/* work around MSVC error C2322: '...' address of dllimport '...' is not static */
 static void *internal_malloc(size_t size)
 {
     return malloc(size);
@@ -505,7 +505,7 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
         }
     }
 
-    /* sprintf failed or buffer overrun occured */
+    /* sprintf failed or buffer overrun occurred */
     if ((length < 0) || (length > (int)(sizeof(number_buffer) - 1)))
     {
         return false;
@@ -1556,7 +1556,7 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
         buffer_skip_whitespace(input_buffer);
         if (!parse_string(current_item, input_buffer))
         {
-            goto fail; /* faile to parse name */
+            goto fail; /* failed to parse name */
         }
         buffer_skip_whitespace(input_buffer);
 

+ 2 - 2
examples/rest/cJSON/cJSON.h

@@ -195,7 +195,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void);
 /* Create a string where valuestring references a string so
  * it will not be freed by cJSON_Delete */
 CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string);
-/* Create an object/arrray that only references it's elements so
+/* Create an object/array that only references it's elements so
  * they will not be freed by cJSON_Delete */
 CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child);
 CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child);
@@ -217,7 +217,7 @@ CJSON_PUBLIC(void) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJ
 CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
 CJSON_PUBLIC(void) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item);
 
-/* Remove/Detatch items from Arrays/Objects. */
+/* Remove/Detach items from Arrays/Objects. */
 CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item);
 CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which);
 CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which);

+ 2 - 2
examples/rest/rest.c

@@ -41,7 +41,7 @@ SendJSON(struct mg_connection *conn, cJSON *json_obj)
 	mg_write(conn, json_str, json_str_len);
 
 	/* Add a newline. This is not required, but the result is more
-	 * human-readable in a debuger. */
+	 * human-readable in a debugger. */
 	mg_write(conn, "\n", 1);
 
 	/* Free string allocated by cJSON_Print* */
@@ -213,7 +213,7 @@ ExampleHandler(struct mg_connection *conn, void *cbdata)
 	if ((ret != url_len) || (mcx.num_matches != 2)) {
 		/* Note: Could have done this with a $ at the end of the match
 		 * pattern as well. Then we would have to check for a return value
-		 * of -1 only. Here we use this version as minumum modification
+		 * of -1 only. Here we use this version as minimum modification
 		 * of the existing code. */
 		printf("Match ret: %i\n", (int)ret);
 		mg_send_http_error(conn, 404, "Invalid path: %s\n", url);