Module Name: src Committed By: kre Date: Wed Nov 10 15:58:39 UTC 2021
Modified Files: src/bin/sh: output.h Log Message: Add a couple of macro definitions for dealing with shell I/O errors. (Macros akin to stdio's ferror() and clearerr()). NFC: the macros are defined, but not yet used anywhere. Uses coming soonish. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/bin/sh/output.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/sh/output.h diff -u src/bin/sh/output.h:1.27 src/bin/sh/output.h:1.28 --- src/bin/sh/output.h:1.27 Tue Nov 21 03:42:39 2017 +++ src/bin/sh/output.h Wed Nov 10 15:58:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: output.h,v 1.27 2017/11/21 03:42:39 kre Exp $ */ +/* $NetBSD: output.h,v 1.28 2021/11/10 15:58:38 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -105,5 +105,8 @@ void xtrace_pop(void); #define out2c(c) outc(c, out2) #define outxc(c) outc(c, outx) +#define clr_err(file) ((file)->flags &= ~OUTPUT_ERR) +#define io_err(file) ((file)->flags & OUTPUT_ERR) + #define OUTPUT_INCL #endif