diff options
author | lum <lum@cvs.openbsd.org> | 2012-05-25 04:56:59 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2012-05-25 04:56:59 +0000 |
commit | 8ecc578aab55dc7c3cf258dd3e511048fd7cddab (patch) | |
tree | 6a1080875817be80fe02e750e3601c784f3e9772 /usr.bin/mg/def.h | |
parent | 0de601c280f7774e627bbabcfdf5bcdd1787959c (diff) |
Remove static FILE pointer used for handling files in fileio.c. Pass
by reference instead. This allows the mg startup file to open other
files without unexpected things happening.
Discussed with Sunil Nimmagadda.
Diffstat (limited to 'usr.bin/mg/def.h')
-rw-r--r-- | usr.bin/mg/def.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h index 9bd52408d29..6d6a7bd56e1 100644 --- a/usr.bin/mg/def.h +++ b/usr.bin/mg/def.h @@ -1,4 +1,4 @@ -/* $OpenBSD: def.h,v 1.120 2012/04/12 04:47:59 lum Exp $ */ +/* $OpenBSD: def.h,v 1.121 2012/05/25 04:56:58 lum Exp $ */ /* This file is in the public domain. */ @@ -349,7 +349,7 @@ int filewrite(int, int); int filesave(int, int); int buffsave(struct buffer *); int makebkfile(int, int); -int writeout(struct buffer *, char *); +int writeout(FILE **, struct buffer *, char *); void upmodes(struct buffer *); size_t xbasename(char *, const char *, size_t); @@ -430,12 +430,12 @@ int getxtra(struct list *, struct list *, int, int); void free_file_list(struct list *); /* fileio.c */ -int ffropen(const char *, struct buffer *); -void ffstat(struct buffer *); -int ffwopen(const char *, struct buffer *); -int ffclose(struct buffer *); -int ffputbuf(struct buffer *); -int ffgetline(char *, int, int *); +int ffropen(FILE **, const char *, struct buffer *); +void ffstat(FILE *, struct buffer *); +int ffwopen(FILE **, const char *, struct buffer *); +int ffclose(FILE *, struct buffer *); +int ffputbuf(FILE *, struct buffer *); +int ffgetline(FILE *, char *, int, int *); int fbackupfile(const char *); char *adjustname(const char *, int); char *startupfile(char *); |