Bug#337529: useless bugreport

2009-01-05 Thread matthieu castet

Hi,


Steffen Schuler wrote:

This bugreport is rather useless:

1.) The contents of /tmp/p is missing. (It can't be the empty file.)

Some copy and paste error.

$cat /tmp/p
0x111
0x112
0x222




2.) The sample [1] below from the bug report only proves that gawk works 
correctly.
   When interpreting hexadecimal constants in the source code, these 
constants

   must be prefixed by 0x.

And that's the problem. /tmp/p got prefixed with 0x, but it doesn't work.
   Hexadecimal strings can be translated to internal numbers with 
strtonum(str)

passing strtonum give the correct output [2].
But that make mawk fails.




3.) The word A in the source code can't be a hexadecimal constant, because
   of the missing prefix 0x. It is simply a variable.


Thanks

Matthieu

[2]
$cat /tmp/p | gawk '{printf "rr " strtonum($1)-A "\n";A=strtonum($1) }'
rr 273
rr 1
rr 272
0x111
0x112
0x222


Bug#337529: useless bugreport

2009-01-04 Thread Steffen Schuler

This bugreport is rather useless:

1.) The contents of /tmp/p is missing. (It can't be the empty file.)

2.) The sample [1] below from the bug report only proves that gawk works 
correctly.
   When interpreting hexadecimal constants in the source code, these 
constants

   must be prefixed by 0x.
   Hexadecimal strings can be translated to internal numbers with 
strtonum(str)

   and there is also the gawk-option --non-decimal-data to translate
   hexadecimal text in the input, which must be handled with great caution
   according to the man-page.

3.) The word A in the source code can't be a hexadecimal constant, because
   of the missing prefix 0x. It is simply a variable.

4.) The numbers in /tmp/p1 are surely decimal numbers.

5.) gawk works correctly on this piped input.

--
Steffen

-
[1] sample:

$cat /tmp/p1
111
112
222

$cat /tmp/p1 | gawk '{printf "rr " $1-A "\n";A=$1 }'
rr 111
rr 1
rr 110





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org