aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2012-07-27 12:16:18 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2012-07-27 12:16:18 -0400
commitfbff497e69139d7cd8434112d6f0a36a46350da1 (patch)
treeb1d6af189461d0f30d1363ca839251f1b11c288f /io.c
parent207fc1458c7f168822e454a89f23428c64163427 (diff)
downloadegawk-fbff497e69139d7cd8434112d6f0a36a46350da1.tar.gz
egawk-fbff497e69139d7cd8434112d6f0a36a46350da1.tar.bz2
egawk-fbff497e69139d7cd8434112d6f0a36a46350da1.zip
Issue a warning if the parser take_control_of function fails.
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/io.c b/io.c
index 2f3c5f85..5255f84f 100644
--- a/io.c
+++ b/io.c
@@ -2622,8 +2622,11 @@ find_input_parser(IOBUF *iop)
}
}
- if (ip != NULL)
- ip->take_control_of(& iop->public);
+ if (ip != NULL) {
+ if (! ip->take_control_of(& iop->public))
+ warning(_("input parser `%s' failed to open `%s'."),
+ ip->name, iop->public.name);
+ }
}
/* iop_alloc --- allocate an IOBUF structure for an open fd */