helpGNU gperf perfect hash fn generator - 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: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bosk (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup