From 53c10d503202a3357ef26bb58dfd482f610268a1 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Mon, 5 Apr 1999 06:05:17 +0000 Subject: [PATCH] Using Raw interface to accurately get key names that have special characters like / = Printing int32 values changed key separator in print to be - instead of / git-svn-id: svn://10.0.0.236/trunk@26281 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/tools/registry/regExport.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mozilla/xpcom/tools/registry/regExport.cpp b/mozilla/xpcom/tools/registry/regExport.cpp index ab6bcc68baf..e8bb7044dad 100644 --- a/mozilla/xpcom/tools/registry/regExport.cpp +++ b/mozilla/xpcom/tools/registry/regExport.cpp @@ -147,13 +147,13 @@ void display( nsIRegistry *reg, nsIRegistry::Key root, const char *rootName ) { // Test result. if ( rv == NS_OK ) { // Build complete name. - char *fullName = new char[ PL_strlen(rootName) + PL_strlen(name) + 2 ]; + char *fullName = new char[ PL_strlen(rootName) + PL_strlen(name) + 5 ]; PL_strcpy( fullName, rootName ); - PL_strcat( fullName, "/" ); + PL_strcat( fullName, " - " ); PL_strcat( fullName, name ); // Display contents under this subkey. nsIRegistry::Key key; - rv = reg->GetSubtree( root, name, &key ); + rv = reg->GetSubtreeRaw( root, name, &key ); if ( rv == NS_OK ) { display( reg, key, fullName ); printf( "\n" ); @@ -240,7 +240,16 @@ static void displayValues( nsIRegistry *reg, nsIRegistry::Key root ) { break; case nsIRegistry::Int32: - printf( "\t= Int32" ); + { + int32 val = 0; + rv = reg->GetInt( root, name, &val ); + if (NS_SUCCEEDED(rv)) { + printf( "\t= Int32 [%d, 0x%x]", val, val); + } + else { + printf( "\t Error getting int32 value, rv=%08X", (int)rv); + } + } break; case nsIRegistry::Bytes: