Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created June 19, 2009 13:32
Show Gist options
  • Select an option

  • Save methodmissing/132614 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/132614 to your computer and use it in GitHub Desktop.
typedef struct OpenFile {
FILE *f; /* stdio ptr for read/write */
FILE *f2; /* additional ptr for rw pipes */
int mode; /* mode flags */
int pid; /* child's pid (for pipes) */
int lineno; /* number of lines read */
char *path; /* pathname for file */
void (*finalize) _((struct OpenFile*,int)); /* finalize proc */
} OpenFile;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment