Ignore:
Timestamp:
Jul 13, 2020, 8:07:55 PM (4 years ago)
Author:
coas-nagasima
Message:

ntshellアプリはnewlibを使うよう変更し、syscallの実装部分と区別がつくよう更新。

Location:
EcnlProtoTool/trunk/ntshell/ntshell/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/ntshell/ntshell/core/ntshell.c

    r331 r442  
    108108 * @param HANDLE A pointer of the handle.
    109109 */
    110 #define PROMPT_WRITE(HANDLE)            SERIAL_WRITE((HANDLE), (HANDLE)->prompt, ntlibc_strlen((HANDLE)->prompt))
     110#define PROMPT_WRITE(HANDLE)            SERIAL_WRITE((HANDLE), (HANDLE)->prompt, strlen((HANDLE)->prompt))
    111111
    112112/**
     
    115115 * @param HANDLE A pointer of the handle.
    116116 */
    117 #define PROMPT_NEWLINE(HANDLE)          SERIAL_WRITE((HANDLE), NTSHELL_PROMPT_NEWLINE, ntlibc_strlen(NTSHELL_PROMPT_NEWLINE))
     117#define PROMPT_NEWLINE(HANDLE)          SERIAL_WRITE((HANDLE), NTSHELL_PROMPT_NEWLINE, strlen(NTSHELL_PROMPT_NEWLINE))
    118118
    119119/**
     
    400400                                 * Found the suggestion.
    401401                                 */
    402                                 int n = ntlibc_strlen((const char *)buf);
     402                                int n = strlen((const char *)buf);
    403403                                VTSEND_ERASE_LINE(ntshell);
    404404                                VTSEND_CURSOR_HEAD(ntshell);
     
    430430                         * Found the suggestion.
    431431                         */
    432                         int n = ntlibc_strlen((const char *)buf);
     432                        int n = strlen((const char *)buf);
    433433                        VTSEND_ERASE_LINE(ntshell);
    434434                        VTSEND_CURSOR_HEAD(ntshell);
     
    442442                         * Recall the previous input text string.
    443443                         */
    444                         int n = ntlibc_strlen(SUGGEST_SOURCE(ntshell));
     444                        int n = strlen(SUGGEST_SOURCE(ntshell));
    445445                        VTSEND_ERASE_LINE(ntshell);
    446446                        VTSEND_CURSOR_HEAD(ntshell);
     
    485485        UNUSED_VARIABLE(ch);
    486486        text_editor_get_text(GET_EDITOR(ntshell), buf, sizeof(buf));
    487         len = ntlibc_strlen((const char *)buf);
     487        len = strlen((const char *)buf);
    488488        VTSEND_CURSOR_HEAD(ntshell);
    489489        PROMPT_WRITE(ntshell);
     
    607607        p->func_callback = func_callback;
    608608        p->extobj = extobj;
    609         ntlibc_strcpy(p->prompt, NTSHELL_PROMPT_DEFAULT);
     609        strcpy(p->prompt, NTSHELL_PROMPT_DEFAULT);
    610610
    611611        p->vtrecv.user_data = p;
     
    667667        }
    668668
    669         ntlibc_strcpy(p->prompt, prompt);
     669        strcpy(p->prompt, prompt);
    670670}
    671671
  • EcnlProtoTool/trunk/ntshell/ntshell/core/text_history.c

    r331 r442  
    146146        char *buf, const int siz)
    147147{
    148         const int text_len = ntlibc_strlen((const char *)text);
     148        const int text_len = strlen((const char *)text);
    149149        int found = 0;
    150150        int i;
     
    152152                int target = (p->rp + i) % TEXTHISTORY_DEPTH;
    153153                char *txtp = p->history + (TEXTHISTORY_MAXLEN * target);
    154                 const int target_len = ntlibc_strlen((const char *)txtp);
     154                const int target_len = strlen((const char *)txtp);
    155155                int comp_len = (target_len < text_len) ? target_len : text_len;
    156                 if ((ntlibc_strncmp(
     156                if ((strncmp(
    157157                        (const char *)txtp,
    158158                        (const char *)text, comp_len) == 0) && (comp_len > 0)) {
    159159                        if (found == index) {
    160                                 if (siz <= ntlibc_strlen(txtp)) {
     160                                if (siz <= strlen(txtp)) {
    161161                                        return -1;
    162162                                }
    163                                 ntlibc_strcpy((char *)buf, (char *)txtp);
     163                                strcpy((char *)buf, (char *)txtp);
    164164                                return 0;
    165165                        }
Note: See TracChangeset for help on using the changeset viewer.