⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inet_msg_mem.c

📁 最新MTK手机软件源码
💻 C
📖 第 1 页 / 共 5 页
字号:
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_param_list_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_param_list_struct *val, *val_t, *in_data = (inet_param_list_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_param_list_struct));
    CHECK_INET_PARAM(val, NULL) val_t = val;
    while (in_data)
    {
        if (in_data->object)
        {
            val->object = inet_param_struct_copy_fn(mem_func, in_data->object);
            if (!val->object)
            {
                goto exit_due_to_mem;
            }
        }
        in_data = in_data->next;
        if (in_data)
        {
            if (val->object)
            {
                val->next = inet_malloc(mem_func, sizeof(inet_param_list_struct));
                val = val->next;
                if (!val)
                {
                    goto exit_due_to_mem;
                }
            }
        }
    }
    return val_t;
  exit_due_to_mem:
    inet_param_list_struct_free_fn(mem_func, val_t);
    return NULL;

}


/*****************************************************************************
 * FUNCTION
 *  inet_int_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_int_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_int_struct *val, *in_data = (inet_int_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_int_struct));
    CHECK_INET_PARAM(val, NULL);
    val->value = in_data->value;
    return (void*)val;
}


/*****************************************************************************
 * FUNCTION
 *  inet_int_list_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_int_list_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_int_list_struct *val, *val_t, *in_data = (inet_int_list_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_int_list_struct));

    CHECK_INET_PARAM(val, NULL);
    val_t = val;

    while (in_data)
    {

        val->value = in_data->value;
        in_data = in_data->next;
        if (in_data)
        {
            val->next = inet_malloc(mem_func, sizeof(inet_int_list_struct));
            if (val->next == NULL)
            {
                goto exit_due_to_mem;
            }
            val = val->next;
        }
    }
    return (void*)val_t;
  exit_due_to_mem:
    inet_int_list_struct_free_fn(mem_func, val_t);
    return NULL;

}


/*****************************************************************************
 * FUNCTION
 *  inet_int_param_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_int_param_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_int_param_struct *val, *in_data = (inet_int_param_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_int_param_struct));
    CHECK_INET_PARAM(val, NULL);
    val->value = in_data->value;
    if (in_data->param_list)
    {
        val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
        if (!val->param_list)
        {
            goto exit_due_to_mem;
        }
    }
    return (void*)val;
  exit_due_to_mem:
    inet_int_param_struct_free_fn(mem_func, val);
    return NULL;
}


/*****************************************************************************
 * FUNCTION
 *  inet_int_param_list_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_int_param_list_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_int_param_list_struct *val, *val_t, *in_data = (inet_int_param_list_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_int_param_list_struct));
    CHECK_INET_PARAM(val, NULL);
    val_t = val;
    while (in_data)
    {
        if (in_data->object)
        {
            val->object = inet_int_param_struct_copy_fn(mem_func, in_data->object);
            if (!val->object)
            {
                goto exit_due_to_mem;
            }
        }
        in_data = in_data->next;
        if (in_data)
        {
            if (val->object)
            {
                val->next = inet_malloc(mem_func, sizeof(inet_int_param_list_struct));
                val = val->next;
                if (!val)
                {
                    goto exit_due_to_mem;
                }
            }
        }
    }
    return (void*)val_t;
  exit_due_to_mem:
    inet_int_param_list_struct_free_fn(mem_func, val_t);
    return NULL;
}


/*****************************************************************************
 * FUNCTION
 *  inet_str_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_str_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_str_struct *val, *in_data = (inet_str_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_str_struct));
    CHECK_INET_PARAM(val, NULL);
    if (in_data->value)
    {
        val->value = (kal_char*) inet_msg_strdup(mem_func, in_data->value);
        if (!val->value)
        {
            goto exit_due_to_mem;
        }
    }
    return (void*)val;
  exit_due_to_mem:
    inet_str_struct_free_fn(mem_func, val);
    return NULL;
}


/*****************************************************************************
 * FUNCTION
 *  inet_str_list_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_str_list_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_str_list_struct *val, *val_t, *in_data = (inet_str_list_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_str_list_struct));
    CHECK_INET_PARAM(val, NULL);
    val_t = val;
    while (in_data)
    {
        if (in_data->value)
        {
            val->value = (kal_char*) inet_msg_strdup(mem_func, in_data->value);
            if (!val->value)
            {
                goto exit_due_to_mem;
            }
        }
        in_data = in_data->next;
        if (in_data)
        {
            if (val->value)
            {
                val->next = inet_malloc(mem_func, sizeof(inet_str_list_struct));
                val = val->next;
                if (!val)
                {
                    goto exit_due_to_mem;
                }
            }
        }
    }
    return (void*)val_t;
  exit_due_to_mem:
    inet_str_list_struct_free_fn(mem_func, val_t);
    return NULL;
}


/*****************************************************************************
 * FUNCTION
 *  inet_str_param_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_str_param_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_str_param_struct *val, *in_data = (inet_str_param_struct*) src;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (!in_data || !mem_func)
    {
        return in_data;
    }
    val = inet_malloc(mem_func, sizeof(inet_str_param_struct));
    CHECK_INET_PARAM(val, NULL);
    if (in_data->value)
    {
        val->value = (kal_char*) inet_msg_strdup(mem_func, in_data->value);
        if (!val->value)
        {
            goto exit_due_to_mem;
        }
    }
    if (in_data->param_list)
    {
        val->param_list = inet_param_list_struct_copy_fn(mem_func, in_data->param_list);
        if (!val->param_list)
        {
            goto exit_due_to_mem;
        }
    }
    return (void*)val;
  exit_due_to_mem:
    inet_str_param_struct_free_fn(mem_func, val);
    return NULL;
}


/*****************************************************************************
 * FUNCTION
 *  inet_str_param_list_struct_copy_fn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  mem_func        [?]     
 *  src             [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void *inet_str_param_list_struct_copy_fn(inet_mem_func_struct *mem_func, void *src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    inet_str_param_list_struct *val, *val_t, *in_data = (inet_str_param_list_struct*) src;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -