This repository has been archived on 2024-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
segatools/util/slurp.h
Haruka 67eda7458b emoney: Add Thinca authentication card stuff (#35)
This PR adds everything that's needed on the segatools side to add E-Money support regarding Thinca authentication cards.

I've also included set-up documentation (with a network side bonus which was as far as I could figure out so far, but I'm pretty certain no more changes to segatools will be needed)

Due to the nature of a custom protcol called TCAP that Thinca uses for networking (see docs), I can't fully test that everything works as I haven't yet bothered to figure that protocol out.

Tested with both APMv3 and FGO.

![https://puu.sh/KeqVj/ccf4bcccbb.png](https://puu.sh/KeqVj/ccf4bcccbb.png)

Reviewed-on: TeamTofuShop/segatools#35
Co-authored-by: Haruka <haruka@noreply.gitea.tendokyu.moe>
Co-committed-by: Haruka <haruka@noreply.gitea.tendokyu.moe>
2025-04-17 17:01:38 +00:00

12 lines
481 B
C

#include <stdbool.h>
/*
* 'slurp' reads the file identified by 'path' into a character buffer
* pointed at by 'buf', optionally adding a terminating NUL if
* 'add_nul' is true. On success, the size of the file is returned; on
* failure, -1 is returned and ERRNO is set by the underlying system
* or library call that failed.
*
* WARNING: 'slurp' malloc()s memory to '*buf' which must be freed by
* the caller.
*/
long wslurp(const wchar_t* path, char **buf, bool add_nul);