代码拉取完成,页面将自动刷新
/*
* 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_ */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。