[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gawk-stable] bug: fatal error when getline from directory
From: |
Paolo |
Subject: |
Re: [gawk-stable] bug: fatal error when getline from directory |
Date: |
Mon, 5 Jan 2009 23:27:40 +0100 |
User-agent: |
Mutt/1.3.28i |
On Mon, Jan 05, 2009 at 10:20:03PM +0200, Eli Zaretskii wrote:
> disagree with Posix, I thought something less complex will do;
> evidently, it doesn't.
yup, I'm ever more confused
> > then awk couldn't process eg b64-encoded
> > email msgs
>
> Not true: you are confusing text with its encoding.
oh, I see ... dazed & confused.
> I/O is core Gawk functionality; you cannot extend it around the design
> limitations of that.
really? what about '/inet/' extension?
@Aharon:
pls see attached diffs, it's just a POC for '/dir/' extension - I
know it'd be in extension/, likely not portable etc., and likely won't
ever make it into official code - but just for fun and perhaps future ref,
eg:
$./gawk 'BEGIN{r=1
$ while (r==1) {
$ r=getline < "/tmp"; print "r="r" -"$0"- ERRNO=" ERRNO
$ }
$ }'
r=-1 -- ERRNO=Is a directory
$./gawk 'BEGIN{r=1
$ while (r==1) {
$ r=getline < "/tmp/xrdb.wdm.log"; print "r="r" -"$0"- ERRNO=" ERRNO
$ }
$ }'
r=1 ---help- ERRNO=0
r=1 -- ERRNO=0
r=0 -- ERRNO=0
$./gawk 'BEGIN{r=1
$ while (r==1) {
$ r=getline < "/dir//tmp/rd.c"; print "r="r" -"$0"- ERRNO=" ERRNO
$ }
$ }'
gawk: warning: could not open `/dir//tmp/rd.c', mode `r'
r=-1 -- ERRNO=Not a directory
$./gawk 'BEGIN{r=1
$ while (r==1) {
$ r=getline < "/dir//tmp"; print "r="r" -"$0"- ERRNO=" ERRNO
$ }
$ }'
r=1 -.- ERRNO=0
r=1 -..- ERRNO=0
r=1 -rd- ERRNO=0
r=1 -.clean- ERRNO=0
r=1 -orbit-central- ERRNO=0
r=1 -rd.c- ERRNO=0
r=1 -mc-amsis- ERRNO=0
r=1 -xrdb.wdm.amsis.log- ERRNO=0
r=1 -xrdb.wdm.log- ERRNO=0
r=1 -gconfd-central- ERRNO=0
r=1 -lost+found- ERRNO=0
r=1 -.X11-unix- ERRNO=0
r=1 -.X0-lock- ERRNO=0
r=1 -.font-unix- ERRNO=0
r=1 -xrdb.wdm..log- ERRNO=0
r=1 -hsperfdata_central- ERRNO=0
r=0 -hsperfdata_central- ERRNO=0
not too bad eh? ;-P
[Warning: it's a quick hack, unvetted code]
> As is arguing with you, since you evidently disagree with anything and
> anyone but yourself.
weak arguments, if any
--
paolo
gawk_io.c+dirext.diff
Description: Text document
gawk_awk.h+dirext.diff
Description: Text document
- Re: [gawk-stable] bug: fatal error when getline from directory, (continued)
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Andreas Schwab, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eric Blake, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Andrew J. Schorr, 2009/01/05
- Re: [gawk-stable] bug: fatal error when getline from directory, John Cowan, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/05
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/05
- Re: [gawk-stable] bug: fatal error when getline from directory,
Paolo <=
- Re: [gawk-stable] bug: fatal error when getline from directory, Andrew J. Schorr, 2009/01/05
Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/03
Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/03
Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/05
Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/05
Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/06