2 Star 2 Fork 1

觉皇/bsdiff_embeded

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vfile.h 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
觉皇 提交于 2023-11-18 09:54 +08:00 . 首次提交
/*
* vfile.h
*
* Created on: 2023419
* Author: hello
*/
#ifndef VFILE_H_
#define VFILE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if defined(_WIN32) || defined(_LINUX)
#define USE_C_STD_LIB
#endif
#ifdef USE_C_STD_LIB
#include <sys/stat.h>
#endif
#ifndef size_t
typedef unsigned int size_t;
#endif
#ifdef USE_C_STD_LIB
typedef FILE vfile;
#else
typedef struct
{
const char* fname;
uint32_t size;
uint32_t offset;
}vfile;
#endif
vfile* vfopen(const char* fname, const char* mode);
size_t vfwrite(const void *buf, size_t size, size_t count, vfile* vf);
size_t vfread(void* buf, size_t size, size_t count, vfile* vf);
int vfseek(vfile* vf, long offset, int origin);
int vfclose(vfile* vf);
size_t vfsize(const char* fname);
long vftell(vfile* vf);
#ifdef __cplusplus
}
#endif
#endif /* VFILE_H_ */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jhembed/bsdiff_embeded.git
git@gitee.com:jhembed/bsdiff_embeded.git
jhembed
bsdiff_embeded
bsdiff_embeded
main

搜索帮助