summary refs log tree commit diff stats
path: root/results/scraper/box64/787
blob: bf720ae820a67efe8445c01cb6216d39f2fb84d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Wrapping fopencookie
This function is used by [an old game](https://www.gog.com/zh/game/beneath_a_steel_sky) running on ScummVM, and it takes a struct `cookie_io_functions_t` as an argument.

```
typedef struct {
   cookie_read_function_t  *read;
   cookie_write_function_t *write;
   cookie_seek_function_t  *seek;
   cookie_close_function_t *close;
} cookie_io_functions_t;

FILE *fopencookie(void *restrict cookie, const char *restrict mode,
                  cookie_io_functions_t io_funcs);
```
IIUC, A struct of this size will be directly passed through the stack, and it needs to be reconstructed on the fly when calling the native libs. The callback functions also need to be properly wrapped (i.e. `GOM`). Wrapper infra doesn't have support for this kind of function it seems.

> A simple program for testing this function: https://ksco.cool/SAi4