diff --git a/bsp/microchip/common/applications/lwip_demo.c b/bsp/microchip/common/applications/lwip_demo.c index 85c6a97d93..697f580249 100644 --- a/bsp/microchip/common/applications/lwip_demo.c +++ b/bsp/microchip/common/applications/lwip_demo.c @@ -76,7 +76,7 @@ static void tcpclient(void *arg) /* 创建一个socket,类型是SOCKET_STREAM,TCP类型 */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { - /* Failed on creatinf socket */ + /* Failed on creating socket */ /* 创建socket失败 */ LOG_E("Create socket error"); goto __exit; @@ -91,7 +91,7 @@ static void tcpclient(void *arg) /* 连接到服务端 */ if (connect(sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) { - /*Failed on connecting to server*/ + /* Failed on connecting to server */ /* 连接失败 */ LOG_E("Connect fail!"); goto __exit; @@ -123,14 +123,14 @@ static void tcpclient(void *arg) } else if (bytes_received == 0) { - /* Print warning message when recv function return 0 */ + /* Print warning message when recv function returns 0 */ /* 打印recv函数返回值为0的警告信息 */ - LOG_W("Received warning, recv function return 0."); + LOG_W("Received warning, recv function returns 0."); continue; } else { - /* Receive data sucessfully and append '\0' at the end of message */ + /* Receive data successfully and append '\0' at the end of message */ /* 有接收到数据,把末端清零 */ recv_data[bytes_received] = '\0'; @@ -160,9 +160,9 @@ static void tcpclient(void *arg) } else if (ret == 0) { - /* Print warning message when send function return 0 */ + /* Print warning message when send function returns 0 */ /* 打印send函数返回值为0的警告信息 */ - LOG_W("Send warning, send function return 0."); + LOG_W("Send warning, send function returns 0."); } } diff --git a/components/net/lwip/lwip-1.4.1/src/core/tcp_in.c b/components/net/lwip/lwip-1.4.1/src/core/tcp_in.c index 4ec971ac0f..dc2a59444d 100644 --- a/components/net/lwip/lwip-1.4.1/src/core/tcp_in.c +++ b/components/net/lwip/lwip-1.4.1/src/core/tcp_in.c @@ -665,7 +665,7 @@ tcp_process(struct tcp_pcb *pcb) pcb->nrtx = 0; } - /* Call the user specified function to call when sucessfully + /* Call the user specified function to call when successfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); if (err == ERR_ABRT) { diff --git a/components/net/lwip/lwip-1.4.1/src/include/lwip/tcp_impl.h b/components/net/lwip/lwip-1.4.1/src/include/lwip/tcp_impl.h index 173de44e44..4c2c8baec7 100644 --- a/components/net/lwip/lwip-1.4.1/src/include/lwip/tcp_impl.h +++ b/components/net/lwip/lwip-1.4.1/src/include/lwip/tcp_impl.h @@ -186,7 +186,7 @@ PACK_STRUCT_END /** Flags used on input processing, not on pcb->flags */ #define TF_RESET (u8_t)0x08U /* Connection was reset. */ -#define TF_CLOSED (u8_t)0x10U /* Connection was sucessfully closed. */ +#define TF_CLOSED (u8_t)0x10U /* Connection was successfully closed. */ #define TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ diff --git a/components/net/lwip/lwip-2.0.3/doc/mqtt_client.txt b/components/net/lwip/lwip-2.0.3/doc/mqtt_client.txt index 3e67defdc5..9d2ed0d767 100644 --- a/components/net/lwip/lwip-2.0.3/doc/mqtt_client.txt +++ b/components/net/lwip/lwip-2.0.3/doc/mqtt_client.txt @@ -148,7 +148,7 @@ void example_publish(mqtt_client_t *client, void *arg) } } -/* Called when publish is complete either with sucess or failure */ +/* Called when publish is complete either with success or failure */ static void mqtt_pub_request_cb(void *arg, err_t result) { if(result != ERR_OK) { diff --git a/components/net/lwip/lwip-2.1.2/doc/mqtt_client.txt b/components/net/lwip/lwip-2.1.2/doc/mqtt_client.txt index 7fd93a8edf..81c6d20abd 100644 --- a/components/net/lwip/lwip-2.1.2/doc/mqtt_client.txt +++ b/components/net/lwip/lwip-2.1.2/doc/mqtt_client.txt @@ -148,7 +148,7 @@ void example_publish(mqtt_client_t *client, void *arg) } } -/* Called when publish is complete either with sucess or failure */ +/* Called when publish is complete either with success or failure */ static void mqtt_pub_request_cb(void *arg, err_t result) { if(result != ERR_OK) { diff --git a/documentation/network/network.md b/documentation/network/network.md index 3499cec4f8..c9a137f4b1 100644 --- a/documentation/network/network.md +++ b/documentation/network/network.md @@ -605,7 +605,7 @@ void tcpclient(int argc, char**argv) else if (bytes_received == 0) { /* Print the recv function returns a warning message with a value of 0 */ - rt_kprintf("\nReceived warning,recv function return 0.\r\n"); + rt_kprintf("\nReceived warning,recv function returns 0.\r\n"); continue; } @@ -643,7 +643,7 @@ void tcpclient(int argc, char**argv) else if (ret == 0) { /* Print the send function returns a warning message with a value of 0 */ - rt_kprintf("\n Send warning,send function return 0.\r\n"); + rt_kprintf("\n Send warning,send function returns 0.\r\n"); } } return; diff --git a/examples/network/tcpclient.c b/examples/network/tcpclient.c index 97ea690b6e..453910ec90 100644 --- a/examples/network/tcpclient.c +++ b/examples/network/tcpclient.c @@ -72,7 +72,7 @@ static void tcpclient(void *arg) /* 创建一个socket,类型是SOCKET_STREAM,TCP类型 */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { - /* Failed on creatinf socket */ + /* Failed on creating socket */ /* 创建socket失败 */ LOG_E("Create socket error"); goto __exit; @@ -87,7 +87,7 @@ static void tcpclient(void *arg) /* 连接到服务端 */ if (connect(sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) { - /*Failed on connecting to server*/ + /* Failed on connecting to server */ /* 连接失败 */ LOG_E("Connect fail!"); goto __exit; @@ -119,14 +119,14 @@ static void tcpclient(void *arg) } else if (bytes_received == 0) { - /* Print warning message when recv function return 0 */ + /* Print warning message when recv function returns 0 */ /* 打印recv函数返回值为0的警告信息 */ - LOG_W("Received warning, recv function return 0."); + LOG_W("Received warning, recv function returns 0."); continue; } else { - /* Receive data sucessfully and append '\0' at the end of message */ + /* Receive data successfully and append '\0' at the end of message */ /* 有接收到数据,把末端清零 */ recv_data[bytes_received] = '\0'; @@ -156,9 +156,9 @@ static void tcpclient(void *arg) } else if (ret == 0) { - /* Print warning message when send function return 0 */ + /* Print warning message when send function returns 0 */ /* 打印send函数返回值为0的警告信息 */ - LOG_W("Send warning, send function return 0."); + LOG_W("Send warning, send function returns 0."); } } diff --git a/examples/network/tcpsendpacket.c b/examples/network/tcpsendpacket.c index da8bc4f524..f608f5173f 100644 --- a/examples/network/tcpsendpacket.c +++ b/examples/network/tcpsendpacket.c @@ -76,7 +76,7 @@ void tcp_senddata(const char *url, int port, int length) else if (result == 0) { /* 打印send函数返回值为0的警告信息 */ - rt_kprintf("\n Send warning,send function return 0.\r\n"); + rt_kprintf("\n Send warning,send function returns 0.\r\n"); } } } diff --git a/examples/network/tcpserver.c b/examples/network/tcpserver.c index ff89595c15..6ec5f0e7a3 100644 --- a/examples/network/tcpserver.c +++ b/examples/network/tcpserver.c @@ -106,7 +106,7 @@ static void tcpserv(void *arg) /* Accept a request from client and the function is blocking */ /* 接受一个客户端连接socket的请求,这个函数调用是阻塞式的 */ connected = accept(sock, (struct sockaddr *)&client_addr, &sin_size); - /* Return the socket connected sucessfully */ + /* Return the socket connected successfully */ /* 返回的是连接成功的socket */ if (connected < 0) { @@ -139,13 +139,13 @@ static void tcpserv(void *arg) } else if (bytes_received == 0) { - /* Print warning message when recv function return 0 */ + /* Print warning message when recv function returns 0 */ /* 打印recv函数返回值为0的警告信息 */ - LOG_W("Received warning, recv function return 0."); + LOG_W("Received warning, recv function returns 0."); continue; } else - { /* Receive data sucessfully and append '\0' at the end of message */ + { /* Receive data successfully and append '\0' at the end of message */ /* 有接收到数据,把末端清零 */ recv_data[bytes_received] = '\0'; if (strcmp(recv_data, "q") == 0 || strcmp(recv_data, "Q") == 0) @@ -184,9 +184,9 @@ static void tcpserv(void *arg) } else if (ret == 0) { - /* Print warning message when send function return 0 */ + /* Print warning message when send function returns 0 */ /* 打印send函数返回值为0的警告信息 */ - LOG_W("Send warning, send function return 0."); + LOG_W("Send warning, send function returns 0."); } } } diff --git a/examples/network/udpclient.c b/examples/network/udpclient.c index 3ad27c76ff..d2ac265e27 100644 --- a/examples/network/udpclient.c +++ b/examples/network/udpclient.c @@ -50,7 +50,7 @@ static void udpclient(void *arg) /* 创建一个socket,类型是SOCK_DGRAM,UDP类型 */ if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { - /* Failed on creatinf socket */ + /* Failed on creating socket */ LOG_E("Create socket error"); return; } @@ -71,7 +71,7 @@ static void udpclient(void *arg) /* 发送数据到服务远端 */ sendto(sock, send_data, rt_strlen(send_data), 0, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)); - /* Thread sllep for 1 second */ + /* Thread sleep for 1 second */ /* 线程休眠一段时间 */ rt_thread_mdelay(1000); /* count decrease 1 */ diff --git a/examples/network/udpserver.c b/examples/network/udpserver.c index 33442a72ed..89a17f2cc3 100644 --- a/examples/network/udpserver.c +++ b/examples/network/udpserver.c @@ -107,7 +107,7 @@ static void udpserv(void *paramemter) } else if (bytes_read == 0) { - LOG_W("Received warning, recv function return 0."); + LOG_W("Received warning, recv function returns 0."); continue; } else diff --git a/examples/utest/README.md b/examples/utest/README.md index bde3bd4b80..6e24632b7c 100644 --- a/examples/utest/README.md +++ b/examples/utest/README.md @@ -2,7 +2,7 @@ ## 简介 -为了保证某一部分代码的质量,通常可以通过编写测试用例的方式,验证此代码的功能。为了保证 RT-Thread 相关仓库的代码质量,我们基于 utest 框架搭建了一套简易的自动化测试环境。有兴趣,有精力的小伙伴可以利用这套机制完善自己的代码检查。如果有意愿让社区上更多的小伙伴收益,也可以在提交代码的时候,把对应的测试用例也提交上来。 +为了保证某一部分代码的质量,通常可以通过编写测试用例的方式,验证此代码的功能。为了保证 RT-Thread 相关仓库的代码质量,我们基于 utest 框架搭建了一套简易的自动化测试环境。有兴趣,有精力的小伙伴可以利用这套机制完善自己的代码检查。如果有意愿让社区上更多的小伙伴受益,也可以在提交代码的时候,把对应的测试用例也提交上来。 ## 目录结构 @@ -15,7 +15,7 @@ ### 1. 编写测试用例 -参考已有的测试用例在 [examples\utest\testcases](./testcases) 目录下添加自己的测试用例。测试用例的编写方法参考文档中心《utest 测试框架》章节。 +参考已有的测试用例在 [examples\utest\testcases](./testcases) 目录下添加自己的测试用例。测试用例的编写方法参考文档中心[《utest 测试框架》章节](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/utest/utest)。 ### 2. 本地测试 @@ -70,4 +70,4 @@ CONFIG_RT_USING_MEMHEAP=y - {UTEST: "components/utest", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "utest_self/self.conf", SD_FILE: "sd.bin"} ``` -3. 向 RT-Thread 主仓库提交合并请求。 \ No newline at end of file +3. 向 RT-Thread 主仓库提交合并请求。 diff --git a/examples/utest/testcases/posix/pthread_h/functions/testfrmw/threads_scenarii.c b/examples/utest/testcases/posix/pthread_h/functions/testfrmw/threads_scenarii.c index 3f5a9845cf..f4976388e0 100644 --- a/examples/utest/testcases/posix/pthread_h/functions/testfrmw/threads_scenarii.c +++ b/examples/utest/testcases/posix/pthread_h/functions/testfrmw/threads_scenarii.c @@ -246,7 +246,7 @@ static void scenar_init(void) " PTHREAD_CREATE_JOINABLE"); } #if VERBOSE > 4 - output("Detach state was set sucessfully\n"); + output("Detach state was set successfully\n"); #endif /* Sched related attributes */ @@ -269,7 +269,7 @@ static void scenar_init(void) UNRESOLVED(ret, "Unable to set inheritsched" " attribute"); #if VERBOSE > 4 - output("inheritsched state was set sucessfully\n"); + output("inheritsched state was set successfully\n"); #endif } #if VERBOSE > 4 @@ -292,7 +292,7 @@ static void scenar_init(void) " sched policy"); #if VERBOSE > 4 if (scenarii[i].schedpolicy) - output("Sched policy was set sucessfully\n"); + output("Sched policy was set successfully\n"); else output("Sched policy untouched\n"); #endif @@ -323,7 +323,7 @@ static void scenar_init(void) "Failed to set the sched param"); #if VERBOSE > 4 - output("Sched param was set sucessfully to %i\n", + output("Sched param was set successfully to %i\n", sp.sched_priority); } else { output("Sched param untouched\n"); diff --git a/examples/utest/testcases/posix/stdio_h/functions/fclose_tc.c b/examples/utest/testcases/posix/stdio_h/functions/fclose_tc.c index c182283bbd..fef2235d4b 100644 --- a/examples/utest/testcases/posix/stdio_h/functions/fclose_tc.c +++ b/examples/utest/testcases/posix/stdio_h/functions/fclose_tc.c @@ -16,7 +16,7 @@ static int fclose_entry(void) } else { - printf("fclose sucess \n"); + printf("fclose success \n"); } return 0; } diff --git a/tools/sconsui.py b/tools/sconsui.py index 2def194cfa..998643b6b6 100644 --- a/tools/sconsui.py +++ b/tools/sconsui.py @@ -291,7 +291,7 @@ class SconsUI(): setting.close() tkMessageBox.showinfo("RT-Thread SCons UI", - "Save setting sucessfully") + "Save setting successfully") def setup_building_ui(self, frame): padding = ttk.Frame(frame)