40 lines
548 B
Markdown
40 lines
548 B
Markdown
# io.h
|
|
|
|
## Include Guard
|
|
```c
|
|
#ifndef IO_H
|
|
# define IO_H
|
|
|
|
# include <stdio.h>
|
|
# include <stdint.h>
|
|
```
|
|
|
|
## Types
|
|
```c
|
|
typedef struct s_io
|
|
{
|
|
FILE *in;
|
|
FILE *out;
|
|
} t_io;
|
|
```
|
|
|
|
## Functions
|
|
|
|
### [`io_open`](/srcs/io/streams.c.md)
|
|
Opens input and output streams based on provided file paths.
|
|
```c
|
|
int8_t
|
|
io_open(t_io *io, const char *input_path, const char *output_path);
|
|
```
|
|
|
|
### [`io_close`](/srcs/io/streams.c.md)
|
|
Closes the input and output streams if they are not stdin or stdout.
|
|
```c
|
|
void
|
|
io_close(t_io *io);
|
|
```
|
|
|
|
## End Guard
|
|
```c
|
|
#endif
|
|
```
|