I'm trying to make a C program which can take both stdin and files then prints it to stdout.
This program will have an option parser to manage a defined set of options :
i.e: -x, -y, -z / or combined: -zx
Let's say we have the following functions :
- get_stdin -> get standard input and put it on stdout
- get_file -> get file contents and put it on stdout
How would one write this following pseudocode ?
ft_array =
[
( STDIN, &get_stdin );
( FILE, &get_file );
]