Changeset 331 for EcnlProtoTool/trunk/ntshell/ntshell/core/ntshell.c
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/ntshell/core/ntshell.c
r321 r331 33 33 #include <string.h> 34 34 #include "ntshell.h" 35 #include "core/ntlibc.h" 35 36 36 37 int ntshell_exit; … … 107 108 * @param HANDLE A pointer of the handle. 108 109 */ 109 #define PROMPT_WRITE(HANDLE) SERIAL_WRITE((HANDLE), (HANDLE)->prompt, strlen((HANDLE)->prompt))110 #define PROMPT_WRITE(HANDLE) SERIAL_WRITE((HANDLE), (HANDLE)->prompt, ntlibc_strlen((HANDLE)->prompt)) 110 111 111 112 /** … … 114 115 * @param HANDLE A pointer of the handle. 115 116 */ 116 #define PROMPT_NEWLINE(HANDLE) SERIAL_WRITE((HANDLE), NTSHELL_PROMPT_NEWLINE, strlen(NTSHELL_PROMPT_NEWLINE))117 #define PROMPT_NEWLINE(HANDLE) SERIAL_WRITE((HANDLE), NTSHELL_PROMPT_NEWLINE, ntlibc_strlen(NTSHELL_PROMPT_NEWLINE)) 117 118 118 119 /** … … 399 400 * Found the suggestion. 400 401 */ 401 int n = strlen((const char *)buf);402 int n = ntlibc_strlen((const char *)buf); 402 403 VTSEND_ERASE_LINE(ntshell); 403 404 VTSEND_CURSOR_HEAD(ntshell); … … 429 430 * Found the suggestion. 430 431 */ 431 int n = strlen((const char *)buf);432 int n = ntlibc_strlen((const char *)buf); 432 433 VTSEND_ERASE_LINE(ntshell); 433 434 VTSEND_CURSOR_HEAD(ntshell); … … 441 442 * Recall the previous input text string. 442 443 */ 443 int n = strlen(SUGGEST_SOURCE(ntshell));444 int n = ntlibc_strlen(SUGGEST_SOURCE(ntshell)); 444 445 VTSEND_ERASE_LINE(ntshell); 445 446 VTSEND_CURSOR_HEAD(ntshell); … … 484 485 UNUSED_VARIABLE(ch); 485 486 text_editor_get_text(GET_EDITOR(ntshell), buf, sizeof(buf)); 486 len = strlen((const char *)buf);487 len = ntlibc_strlen((const char *)buf); 487 488 VTSEND_CURSOR_HEAD(ntshell); 488 489 PROMPT_WRITE(ntshell); … … 606 607 p->func_callback = func_callback; 607 608 p->extobj = extobj; 608 strcpy(p->prompt, NTSHELL_PROMPT_DEFAULT);609 ntlibc_strcpy(p->prompt, NTSHELL_PROMPT_DEFAULT); 609 610 610 611 p->vtrecv.user_data = p; … … 666 667 } 667 668 668 strcpy(p->prompt, prompt);669 ntlibc_strcpy(p->prompt, prompt); 669 670 } 670 671
Note:
See TracChangeset
for help on using the changeset viewer.