Add custom fseek and fread Add test framework gtest and added my custom fread and fseek tests + functions
17 lines
400 B
C++
17 lines
400 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <iostream>
|
|
|
|
typedef struct tftp_custom_file_s {
|
|
const char* data;
|
|
size_t len;
|
|
char*name;
|
|
size_t ofset;
|
|
}tftp_custom_file_t;
|
|
|
|
void tftp_custom_fseek(tftp_custom_file_t* handle, size_t offset, int whence);
|
|
size_t tftp_custom_fread(void* buf, size_t bytes, tftp_custom_file_t* handle); |