Changeset 72 for trunk


Ignore:
Timestamp:
07/30/06 16:09:07 (18 years ago)
Author:
tim
Message:

Added QWORD type support.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/reglookup.1.docbook

    r64 r72  
    6464            <command>
    6565              NONE, SZ, EXPAND_SZ, BINARY, DWORD, DWORD_BE,
    66               LINK, MULTI_SZ, RSRC_LIST, RSRC_DESC, RSRC_REQ_LIST,
     66              LINK, MULTI_SZ, RSRC_LIST, RSRC_DESC, RSRC_REQ_LIST, QWORD
    6767            </command>
    6868            and
  • trunk/include/regfio.h

    r61 r72  
    6464#define REG_FULL_RESOURCE_DESCRIPTOR   9
    6565#define REG_RESOURCE_REQUIREMENTS_LIST 10
     66#define REG_QWORD                      11 /* 64-bit little endian */
     67/* XXX: Has MS defined a REG_QWORD_BE? */
    6668/* Not a real type in the registry */
    6769#define REG_KEY                        255
  • trunk/lib/regfio.c

    r65 r72  
    2929
    3030/* Registry types mapping */
    31 const unsigned int regfio_num_reg_types = 11;
     31const unsigned int regfio_num_reg_types = 12;
    3232static const char* regfio_type_names[] =
    3333  {"NONE", "SZ", "EXPAND_SZ", "BINARY", "DWORD", "DWORD_BE", "LINK",
    34    "MULTI_SZ", "RSRC_LIST", "RSRC_DESC", "RSRC_REQ_LIST"};
     34   "MULTI_SZ", "RSRC_LIST", "RSRC_DESC", "RSRC_REQ_LIST", "QWORD"};
    3535
    3636
  • trunk/src/reglookup.c

    r71 r72  
    241241
    242242  case REG_DWORD:
    243     ascii_max = sizeof(char)*11;
     243    ascii_max = sizeof(char)*(8+2+1);
    244244    ascii = malloc(ascii_max);
    245245    if(ascii == NULL)
     
    252252
    253253  case REG_DWORD_BE:
    254     ascii_max = sizeof(char)*11;
     254    ascii_max = sizeof(char)*(8+2+1);
    255255    ascii = malloc(ascii_max);
    256256    if(ascii == NULL)
     
    261261    return ascii;
    262262    break;
     263
     264  case REG_QWORD:
     265    ascii_max = sizeof(char)*(16+2+1);
     266    ascii = malloc(ascii_max);
     267    if(ascii == NULL)
     268      return NULL;
     269
     270    snprintf(ascii, ascii_max, "0x%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
     271             datap[7], datap[6], datap[5], datap[4],
     272             datap[3], datap[2], datap[1], datap[0]);
     273    return ascii;
     274    break;
     275   
    263276
    264277  /* XXX: this MULTI_SZ parser is pretty inefficient.  Should be
Note: See TracChangeset for help on using the changeset viewer.