mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Simplify fstk_FindFile usage (#1310)
* Simplify `fstk_FindFile` usage * Use `std::string` for `fstk_FindFile`
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
#include "asm/lexer.hpp"
|
||||
|
||||
@@ -52,12 +53,9 @@ void fstk_AddIncludePath(char const *s);
|
||||
void fstk_SetPreIncludeFile(char const *s);
|
||||
/*
|
||||
* @param path The user-provided file name
|
||||
* @param fullPath The address of a pointer, which will be made to point at the full path
|
||||
* The pointer's value must be a valid argument to `realloc`, including NULL
|
||||
* @param size Current size of the buffer, or 0 if the pointer is NULL
|
||||
* @return True if the file was found, false if no path worked
|
||||
* @return A pointer to the `new`-allocated full path, or NULL if no path worked
|
||||
*/
|
||||
bool fstk_FindFile(char const *path, char **fullPath, size_t *size);
|
||||
std::string *fstk_FindFile(char const *path);
|
||||
|
||||
bool yywrap(void);
|
||||
void fstk_RunInclude(char const *path);
|
||||
|
||||
Reference in New Issue
Block a user