Skip to content

Instantly share code, notes, and snippets.

@heronyang
Created August 3, 2019 21:05
Show Gist options
  • Save heronyang/2f042a7ad4142759feb5ce94b9967e38 to your computer and use it in GitHub Desktop.
Save heronyang/2f042a7ad4142759feb5ce94b9967e38 to your computer and use it in GitHub Desktop.
#include "file.h"
void (*open)(char *name, int mode) {/*...*/};
void (*close) {/*...*/};
int (*read)() {/*...*/};
void (*write)(char) {/*...*/};
void (*seek)(long index, int mode) {/*...*/};
struct FILE console = {open, close, read, write, seek};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment