bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: pgawk doesn't give execution counts of delete array


From: Aharon Robbins
Subject: Re: pgawk doesn't give execution counts of delete array
Date: Sun, 15 Feb 2009 22:43:23 +0200

Greetings. Re this:

> Date: Sun, 15 Feb 2009 12:13:10 +0100
> From: Hermann Peifer <address@hidden>
> To: address@hidden
> Subject: pgawk doesn't give execution counts of delete array
>
> Here a random example:
>
> $ cat awkprof.out
>         # gawk profile, created Sun Feb 15 12:12:04 2009
>
>         # Rule(s)
>
>   7283  {
>   7283          A[NR] = $0
>                 delete A
>   7283          print $0
>         }
>
> I'm using gawk-stable from CVS.
>
> Regards, Hermann

Thanks for the report. This is indeed a bug.

The fix is below. It will be in CVS shortly.

Thanks!

Arnold
--------------------------------------------------------------------
Sun Feb 15 22:39:30 2009  Arnold D. Robbins  <address@hidden>

        * profile.c (pp_delete): Print tree->exec_count to actually get
        the value printed. Thanks to Hermann Peifer <address@hidden>
        for reporting the bug.

Index: profile.c
===================================================================
RCS file: /d/mongo/cvsrep/gawk-stable/profile.c,v
retrieving revision 1.8
diff -u -r1.8 profile.c
--- profile.c   27 Jan 2009 20:01:13 -0000      1.8
+++ profile.c   15 Feb 2009 20:39:21 -0000
@@ -988,7 +988,7 @@
 
        array = tree->lnode;
        subscript = tree->rnode;
-       indent(array->exec_count);
+       indent(tree->exec_count);
        if (array->type == Node_param_list)
                fprintf(prof_fp, "delete %s", fparms[array->param_cnt]);
        else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]