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

 
 

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

Submitted by:  Boris Kolpackov <bosk>
Submitted on:  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:  Bruno Haible <haible>
Open/Closed:  Closed Operating System:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    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.3