Changeset 161 for trunk/src


Ignore:
Timestamp:
12/07/09 12:01:22 (15 years ago)
Author:
tim
Message:

added support for UTF-16LE key names

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup-recover.c

    r160 r161  
    127127  /* XXX: Add command line option to choose output encoding */
    128128  if(vk->data != NULL
    129      && !regfi_interpret_data(f, "US-ASCII//TRANSLIT", vk->type, vk->data))
     129     && !regfi_interpret_data(f, REGFI_ENCODING_ASCII, vk->type, vk->data))
    130130  {
    131131    fprintf(stderr, "WARN: Error occurred while interpreting data for VK record"
     
    271271      else
    272272      {
    273         if(cur_ancestor->key_type & REGFI_NK_FLAG_ROOT)
     273        if(cur_ancestor->flags & REGFI_NK_FLAG_ROOT)
    274274          virt_offset = REGFI_OFFSET_NONE;
    275275        else
  • trunk/src/reglookup.c

    r160 r161  
    191191{
    192192  const REGFI_ITER_POSITION* cur;
     193  const REGFI_NK_REC* tmp_key;
    193194  uint32 buf_left = 127;
    194195  uint32 buf_len = buf_left+1;
     
    198199  char* new_buf;
    199200  char* name;
    200   const char* cur_name;
    201201  void_stack_iterator* iter;
    202202 
     
    226226    cur = void_stack_iterator_next(iter);
    227227    if (cur == NULL)
    228       cur_name = i->cur_key->keyname;
    229     else
    230       cur_name = cur->nk->keyname;
     228      tmp_key = i->cur_key;
     229    else
     230      tmp_key = cur->nk;
     231
     232    if(tmp_key->keyname == NULL)
     233      name = quote_buffer(i->cur_key->keyname_raw, i->cur_key->name_length,
     234                          key_special_chars);
     235    else
     236      name = quote_string(tmp_key->keyname, key_special_chars);
    231237
    232238    buf[buf_len-buf_left-1] = '/';
    233239    buf_left -= 1;
    234     name = quote_string(cur_name, key_special_chars);
    235240    name_len = strlen(name);
    236241    if(name_len+1 > buf_left)
     
    617622
    618623  /* XXX: add command line option to choose output encoding */
    619   iter = regfi_iterator_new(f, 0);
     624  iter = regfi_iterator_new(f, REGFI_ENCODING_ASCII);
    620625  if(iter == NULL)
    621626  {
Note: See TracChangeset for help on using the changeset viewer.