diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-06-08 03:19:00 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-06-08 03:19:00 +0000 |
commit | e826a55f3551fc41e004d3bf580b701c9ea90095 (patch) | |
tree | 819152caa0cf964aa7dd228a6567a573699f7632 /usr.bin/yacc/defs.h | |
parent | 59a548f3383db52de88f7e3290c836dd19566df4 (diff) |
add open_write_error() to bail on fopen(3) failing to open for write, gains
more descriptive error messages, eg:
"cannot open target file y.tab.h for writing" as opposed to a generic error.
based on Alexander von Gernler <grunk@pestilenz.org>, ok deraadt
Diffstat (limited to 'usr.bin/yacc/defs.h')
-rw-r--r-- | usr.bin/yacc/defs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h index 8a4a4de99a5..9708a43c065 100644 --- a/usr.bin/yacc/defs.h +++ b/usr.bin/yacc/defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: defs.h,v 1.10 2003/06/03 02:56:24 millert Exp $ */ +/* $OpenBSD: defs.h,v 1.11 2005/06/08 03:18:59 pvalchev Exp $ */ /* $NetBSD: defs.h,v 1.6 1996/03/19 03:21:30 jtc Exp $ */ /* @@ -323,6 +323,7 @@ extern void done(int); extern void no_space(void); extern void open_error(char *); +extern void open_write_error(char *); extern void unexpected_EOF(void); extern void print_pos(char *, char *); extern void syntax_error(int, char *, char *); |