[Top][All Lists]

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

Re: [bug-gawk] tokentab and qsort

From: arnold
Subject: Re: [bug-gawk] tokentab and qsort
Date: Sat, 24 Mar 2018 23:50:18 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Thanks for the note. 


Esteve Sabaté Juncosa <address@hidden> wrote:

> hi, first of all, thanks a lot for maintaining this wonderful language and 
> sorry for my worst english.
> i don't know if it's a bug or it's a using mode that is not contemplated by 
> the project but i explain to you and do what you consider better. i know that 
> i do things that are not related to the standard.
> 1. i've modified the tokcompare() function in awkgram.y in order to use 
> strcasecmp() instead of strcmp(). this allow me to write programs where 
> uppercase and lowercase tokens are equivalent. this let me prevent problems 
> about using a variables with similar names but that differ in case.
> 2. added some new tokens to the token tab.
> 3. i need the tokentab ordered prior to run a program, as if i defined 
> 4. this force to run qsort() on the tokentab.
> 5. any program crashes before start running. the reason i suspect that is the 
> const on the tokentab. if the table is ordered, qsort() doesn't need to 
> change any elements but if you put new elements in an unordered or use 
> strcasecmp() in the compare function, then it has to swap some entries and 
> this makes the crash/core.
> 6. if remove the const attribute for tokentab, everything runs ok.
> I have to say that this has been detected on an amazon aws ec2 instance 
> running an Amazon Linux release 2017.09 64 bits with gcc. This doesn't happen 
> on a mac osx.
> I don't know if this is of your interest but i only report to give you 
> knowledge of this behavior to prevent future changes or modifications.
> again, thanks for all,
> Esteve Sabaté Juncosa
> Partner - CTO
> E. address@hidden<mailto:address@hidden>
> M. +34 678 629 217
> [cid:89778D88-D257-4D85-BF9E-977BB79E9E1A@Home]
> Muntaner, 479-483 6ª planta
> 08021 Barcelona
> T. +34 934 342 310
> www.adqualis.com<http://www.adqualis.com>

reply via email to

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