Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/ntshell/ntshell/util
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/ntshell/ntshell/util/ntopt.c

    r321 r331  
    131131        int argc;
    132132        char argv[NTOPT_TEXT_MAXLEN];
    133         char *argvp[NTOPT_TEXT_MAXARGS];
     133        char *argvp[1 + NTOPT_TEXT_MAXARGS];
    134134        int i;
    135135        int total;
     
    146146        for (i = 0; i < argc; i++) {
    147147                int len;
    148                 argvp[i] = ntopt_get_text(
     148                argvp[i + 1] = ntopt_get_text(
    149149                        str, i, p, NTOPT_TEXT_MAXLEN - total, &len);
    150150                if (total + len + 1 < NTOPT_TEXT_MAXLEN) {
     
    156156                }
    157157        }
     158        argvp[0] = (char *)argc;
    158159
    159         return func(argc, &argvp[0], extobj);
     160        return func((long *)&argvp[0], extobj);
    160161}
  • EcnlProtoTool/trunk/ntshell/ntshell/util/ntopt.h

    r321 r331  
    5555 * @return A return value.
    5656 */
    57 typedef int (*NTOPT_CALLBACK)(int argc, char **argv, void *extobj);
     57typedef int (*NTOPT_CALLBACK)(long *args, void *extobj);
    5858
    5959#ifdef __cplusplus
  • EcnlProtoTool/trunk/ntshell/ntshell/util/ntstdio.c

    r321 r331  
    241241
    242242        if (handle->xo) {
    243                 handle->xo((unsigned char)c);
     243                handle->xo(handle, (unsigned char)c);
    244244        }
    245245        handle->pos++;
     
    266266void ntstdio_fputs(ntstdio_t *handle, NTSTDIO_XO xo, const char *str)
    267267{
    268         void(*pf)(unsigned char);
     268        NTSTDIO_XO pf;
    269269
    270270        /* Save current output device */
     
    314314        int result;
    315315        va_list arp;
    316         void(*pf)(unsigned char);
     316        NTSTDIO_XO pf;
    317317
    318318        /* Save current output device */
     
    334334        extern void shell_exit(int cd);
    335335
    336         int c = handle->xi();
     336        int c = handle->xi(handle);
    337337        if (handle->option & NTSTDIO_OPTION_LF_CR) {
    338338                if (c == '\r')
     
    362362        for (;;) {
    363363                /* Get a char from the incoming stream */
    364                 c = handle->xi();
     364                c = handle->xi(handle);
    365365                if (!c) {
    366366                        /* End of stream */
     
    398398int ntstdio_fgets(ntstdio_t *handle, NTSTDIO_XI xi, char *buf, int len)
    399399{
    400         unsigned char(*pf)(void);
     400        NTSTDIO_XI pf;
    401401        int n;
    402402
  • EcnlProtoTool/trunk/ntshell/ntshell/util/ntstdio.h

    r321 r331  
    6767#define NTSTDIO_OPTION_LF_CR        (1 << 3)
    6868
    69 typedef unsigned char (*NTSTDIO_XI)(void);
    70 typedef void (*NTSTDIO_XO)(unsigned char c);
     69typedef unsigned char (*NTSTDIO_XI)(struct ntstdio_t *handle);
     70typedef void (*NTSTDIO_XO)(struct ntstdio_t *handle, unsigned char c);
    7171
    72 typedef struct {
    73     NTSTDIO_XI xi;
    74     NTSTDIO_XO xo;
    75     char *outptr;
     72typedef struct ntstdio_t {
     73        NTSTDIO_XI xi;
     74        NTSTDIO_XO xo;
     75        char *outptr;
    7676        int len;
    7777        int pos;
    78     unsigned int option;
     78        unsigned int option;
    7979} ntstdio_t;
    8080
Note: See TracChangeset for help on using the changeset viewer.