Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Add a couple of macro definitions for dealing with sh...



details:   https://anonhg.NetBSD.org/src/rev/4d6030886398
branches:  trunk
changeset: 1025516:4d6030886398
user:      kre <kre%NetBSD.org@localhost>
date:      Wed Nov 10 15:58:38 2021 +0000

description:
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.

diffstat:

 bin/sh/output.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 3fd2eda0ea0c -r 4d6030886398 bin/sh/output.h
--- a/bin/sh/output.h   Wed Nov 10 15:56:39 2021 +0000
+++ b/bin/sh/output.h   Wed Nov 10 15:58:38 2021 +0000
@@ -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 @@
 #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



Home | Main Index | Thread Index | Old Index