c-md/includes/io.h.md

565 B

io.h

Include Guard

#ifndef IO_H
# define IO_H

# include <stdio.h>
# include <stdint.h>

Types

typedef struct s_io
{
	FILE	*in;
	FILE	*out;
}	t_io;

Functions

io_open

Opens input and output streams based on provided file paths.

int8_t
io_open(t_io *io, const char *input_path, const char *output_path);

io_close

Closes the input and output streams if they are not stdin or stdout.

void
io_close(t_io *io);

End Guard

#endif