maingperf - Support: sr #106450, cannot get NUL bytes into keywords...

 
 

sr #106450: cannot get NUL bytes into keywords with -l

Submitter:  Boris Kolpackov <bosk>
Submitted:  Tue 22 Jul 2008 03:36:39 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Works For Me
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 03 Dec 2016 11:13:57 AM UTC, comment #1: 

You need to enclose the keywords in double-quotes, as documented in https://www.gnu.org/software/gperf/manual/gperf.html#Keywords .

Bruno Haible <haible>
Group administrator
Tue 22 Jul 2008 03:36:39 PM UTC, original submission:  

Hi,

Reading through the manual, particularly section 3.3, "Use of NUL bytes":
http://www.gnu.org/software/gperf/manual/gperf.html#Binary-Strings

It is my understanding that with -l option I should be able to specify NUL bytes in keyowrds using \x00 or \000 notation. Howevere, this does not seem to be working with gperf 3.0.3. For example, with the following keywords:

\x00abc
\000cde

I get the foollowing generated code:

  static unsigned char lengthtable[] =
    {
       0,  0,  0,  0,  0,  0,  0,  7,  7
    };
  static const char * wordlist[] =
    {
      "", "", "", "", "", "", "",
      "\\x00abc",
      "\\000cde"
    };

It appears that gperf simply escapes \ without interpreting the value. Is there something that I am doing wrong?

Thanks,
Boris

Boris Kolpackov <bosk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by bosk (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-03 haible StatusNone Works For Me
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code