Mail Archives: cygwin/2000/06/25/13:17:09
Followup to mentioned this problem earlier,
http://sourceware.cygnus.com/ml/cygwin/2000-06/msg00052.html
I was hoping for this new gawk to resolve some of my problems.
I have an in a tcl script embedded awk script, the tcl/tk is 8.0.5 (tar.gz) unpacked with tar zxvf on a binary mounted cygwin fs. Now, the tcl/tk 8.0.5 is compiled using msvc 6.0/sp3. Here's a snippet with the tcl embedded awk code:
TestSuite instproc allmakeawk { } {
set awkCode {
BEGIN {prev=-1; tot_bytes=0; tot_packets=0; forced_total=0; unforced_total=0}
{
if ($5 != prev) {
print " "; print "\"flow ",$5;
prev = $5
}
tot_bytes = $19-$11;
forced_total= $16-$14;
tot_packets = $10;
tot_arrivals = $9;
unforced_total = $14;
if (unforced_total + forced_total > 0) {
if ($14 > 0) {
frac_packets = tot_packets/$14;
}
else { frac_packets = 0;}
if ($17-$15 > 0) {
frac_bytes = tot_bytes/($17-$15);
}
else {frac_bytes = 0;}
if ($13 > 0) {
frac_arrivals = tot_arrivals/$13;
}
else {frac_arrivals = 0;}
if (frac_packets + frac_bytes > 0) {
unforced_total_part = frac_packets * unforced_total / ( unforced_total + forced_total)
forced_total_part = frac_bytes * forced_total / ( unforced_total + forced_total)
print 100.0 * frac_arrivals, 100.0 * ( unforced_total_part +forced_total_part)
}
}
}
}
return $awkCode
}
and here's the first failure output:
ns: _o4 finish_flows test_flows_unforced: awk.exe: cmd. line:4:
print "
awk.exe: cmd. line:4: ^ unterminated string
while executing
"exec awk [$self $awkprocedure_] $flowfile >@ $outdesc"
(procedure "_o4" line 26)
(TestSuite create_flow_graph line 26)
invoked from within
"$self create_flow_graph $testname $flowgraphfile"
(procedure "_o4" line 6)
(TestSuite finish_flows line 6)
invoked from within
"_o4 finish_flows test_flows_unforced"
Now, the problem seems to be related to 'print " "; print "\"flow ",$5;' here.
The next failure is a bit more odd. Here's the second failure output:
ns: _o4 finish_flows test_flows_forced: awk.exe: cmd. line:3: (END OF FILE)
awk.exe: cmd. line:3: parse error
while executing
"exec awk [$self $awkprocedure_] $flowfile >@ $outdesc"
(procedure "_o4" line 26)
(TestSuite create_flow_graph line 26)
invoked from within
"$self create_flow_graph $testname $flowgraphfile"
(procedure "_o4" line 6)
(TestSuite finish_flows line 6)
invoked from within
"_o4 finish_flows test_flows_forced"
Meaning that this problem might be related to 'if ($5 != prev) {'...
I get this behaviour both on win98 and NT 4.0/sp6.
Any ideas? Anyone want to help track this problem down?
TIA,
/ChJ
P.S. The code is from a network simulator, ns-2, from http://www.isi.edu/nsnam
----- Original Message -----
From: "Corinna Vinschen" <vinschen AT cygnus DOT com>
To: <cygwin AT sourceware DOT cygnus DOT com>
Sent: Sunday, June 25, 2000 6:42 PM
Subject: [ANNOUNCEMENT] Updated: gawk-3.0.4
> I've installed a new version of gawk in sourceware:/cygwin/latest/gawk.
>
> Changes:
>
> - Updated from version 3.0.3 to 3.0.4
> - Each open to read a file is now done in textmode.
>
> To update your installation, CREATE AN EMPTY DIRECTORY, cd to it, and
> download the latest version of setup.exe from the cygwin/latest
> directory at a Cygwin mirror site near you. These sites seem to
> be good mirrors (they have the new version of gawk already):
>
> US:
> ftp://ftp.freesoftware.com/pub/sourceware/cygwin/latest/
>
> Europe:
> ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/mirrors/cygnus/latest/
>
> Once you've downloaded setup, type:
>
> setup gawk
>
> Answer the questions as you did when you first installed Cygwin,
> specifying whatever mirror site you used to download the package.
>
> This procedure will only update the gawk package. If you have not
> previously used the new setup.exe program to install a version of
> Cygwin, you probably will need to install the entire Cygwin package for
> correct operation.
>
> Once the setup is complete you may remove this newly created directory.
> It will contain the setup.exe program, a setup log file, and the
> gawk-3.0.4 tar file. None of these are needed for further operation of
> gawk but you can keep them around if you are interested in reinstalling
> everything later. The setup.log file contains diagnostics that will
> be helpful if your installation failed for some reason.
>
> Note that, if you do not use the mirror site above, the gawk files may
> take a while to propagate to other mirror sites.
>
> If you have questions or comments, please send them to the Cygwin
> mailing list at: cygwin AT sourceware DOT cygnus DOT com . I would appreciate
> if you would use this mailing list rather than emailing me directly.
> This includes ideas and comments about the setup utility or Cygwin
> in general.
>
> If you want to make a point or ask a question the Cygwin mailing list is
> the appropriate place.
>
> --
> Corinna Vinschen
> Cygwin Developer
> Cygnus Solutions, a Red Hat company
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -