♻ Move utility functions into separate directory
This commit is contained in:
parent
8b8df10e33
commit
7019271bfe
5 changed files with 9 additions and 12 deletions
2
build.sh
2
build.sh
|
@ -1 +1 @@
|
|||
gcc -m64 -o patcher-installer lib/miniz/*.c src/*.c && chmod +x patcher-installer
|
||||
gcc -m64 -o patcher-installer lib/miniz/*.c src/*.c src/*/*.c && chmod +x patcher-installer
|
||||
|
|
|
@ -4,14 +4,8 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "fileReader.h"
|
||||
#include "fileUtilities.h"
|
||||
|
||||
//minimum of two integers
|
||||
#define min(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
||||
|
||||
#include "utils/fileUtilities.h"
|
||||
#include "utils/min.h"
|
||||
|
||||
//Opens the given file at the given offset
|
||||
void initFileReader(char path[], unsigned long offset) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "fileUtilities.h"
|
||||
#include "fileReader.h"
|
||||
#include "../fileReader.h"
|
||||
|
||||
|
||||
//Reads the given amount of bytes from the currently open file into the given buffer.
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "fileReader.h"
|
||||
|
||||
//A structure to store various information needed when reading from a file.
|
||||
struct FILE_INFO {
|
||||
char* name;
|
5
src/utils/min.h
Normal file
5
src/utils/min.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
//minimum of two integers
|
||||
#define min(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
Loading…
Reference in a new issue