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

📄 buffer.c

📁 h.248协议源码
💻 C
字号:
#ifdef __cplusplus
extern "C" {
#endif



/*

NOTICE:
This document contains information that is proprietary to RADVision LTD..
No part of this publication may be reproduced in any form whatsoever without 
written prior approval by RADVision LTD..

RADVision LTD. reserves the right to revise this publication and make changes 
without obligation to notify any person of such revisions or changes.

*/ 

#include <string.h>
#include "buffer.h"

RvBool buffAddToBuffer(RV_BUFFER* to, RV_BUFFER* from, RvUint32 offset)
{
    if (from->length + offset <= to->length)
    {
        memcpy((RvUint8*)to->buffer + offset, from->buffer, from->length);

        return rvTrue;
    }

    return rvFalse;
}

RvBool buffValid(RV_BUFFER *buff, RvUint32 size)
{
    return (size <= buff->length  &&  buff->buffer);
}

RV_BUFFER  buffCreate(void* data,int size)
{
    RV_BUFFER buff;
    buff.buffer = (unsigned char*)data;
    buff.length = size;
    return buff;
}
#ifdef __cplusplus
}              
#endif



⌨️ 快捷键说明

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