Subject: Re: PR/33392 CVS commit: src/dist/nawk
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 06/26/2006 18:00:04
The following reply was made to PR bin/33392; it has been noted by GNATS.
From: christos@zoulas.com (Christos Zoulas)
To: Aleksey Cheusov <cheusov@tut.by>, gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: PR/33392 CVS commit: src/dist/nawk
Date: Mon, 26 Jun 2006 13:57:32 -0400
On Jun 26, 8:38pm, cheusov@tut.by (Aleksey Cheusov) wrote:
-- Subject: Re: PR/33392 CVS commit: src/dist/nawk
| > | > | Thanks for applying the patch.
| > | > | Just a minor note:
| > | > | you forgot about xfree(f->gototab[i]) in function 'freefa'.
| > | >
| > | > Thanks,
| > |
| > | You also forgot about chaning type of gototab array from uschar to int,
| > | typing it as uschar is another kind of limiting a number of states.
| > | < uschar **gototab;
| > | > int **gototab;
| >
| > Thanks,
| >
| > I think int is too wide. I made it unsigned short.
|
| "640k is anough for everyone" ;)
| Seriuosly, I often use awk with very large regexps for my work.
| AFAIR, according to theory NFA for regexp
| that looks like (a|b)*(a|b)^n has equivalent DFA with 2^N states, so 65536
| states of DFA may correspond to NFA with only 16 (!!!) terminal
| symbols. IMHO this kind of internal limits is bad. I read
| NetBSD philosophy but reality is that hardware changes fast.
| My 5 years old Athlon-800/384Mb RAM is capable of propressing
| DFAs including more than 2^16 states.
| So, I personally would prefer 'int' type for the states.
I thought that this is limited by NCHARS+3. I will change it.
| P.S.
| I saw HEAD changes in awk code and was surprized that
| lots of snprintf functions was changed to sprintf,
| and strlcpy to strcpy. Is this really ok?
They were not done carefully so bugs were introduced and we decided
to back them out until someone does them carefully.
| P.P.S
| Where is nawk upstream? Who maintains that YYYYMMDD versions?
from /usr/src/doc/3RDPARTY.
Package: nawk
Version: 2005-04-24
Current Vers: 2005-04-24
Maintainer: Brian Kernighan <bwk@bell-labs.com> (Lucent Technologies)
Archive Site: http://cm.bell-labs.com/who/bwk/
Home Page: http://cm.bell-labs.com/who/bwk/