]> code.delx.au - gnu-emacs/blobdiff - src/w32reg.c
Merge changes from emacs-23 branch.
[gnu-emacs] / src / w32reg.c
index 56e3b42917b9772b5ee08a2a77e235ecda1636e7..77667eb7dc9eabbfb91c1bbd9aff351b729f9d53 100644 (file)
@@ -1,6 +1,6 @@
 /* Emulate the X Resource Manager through the registry.
    Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+                 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -20,6 +20,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Written by Kevin Gallo */
 
 #include <config.h>
+#include <setjmp.h>
 #include "lisp.h"
 #include "w32term.h"
 #include "blockinput.h"
@@ -57,9 +58,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 */
 
 static char *
-w32_get_rdb_resource (rdb, resource)
-     char *rdb;
-     char *resource;
+w32_get_rdb_resource (char *rdb, char *resource)
 {
   char *value = rdb;
   int len = strlen (resource);
@@ -76,10 +75,8 @@ w32_get_rdb_resource (rdb, resource)
   return NULL;
 }
 
-LPBYTE
-w32_get_string_resource (name, class, dwexptype)
-     char *name, *class;
-     DWORD dwexptype;
+static LPBYTE
+w32_get_string_resource (char *name, char *class, DWORD dwexptype)
 {
   LPBYTE lpvalue = NULL;
   HKEY hrootkey = NULL;
@@ -146,9 +143,7 @@ w32_get_string_resource (name, class, dwexptype)
    database RDB. */
 
 char *
-x_get_string_resource (rdb, name, class)
-     XrmDatabase rdb;
-     char *name, *class;
+x_get_string_resource (XrmDatabase rdb, char *name, char *class)
 {
   if (rdb)
     {
@@ -160,6 +155,10 @@ x_get_string_resource (rdb, name, class)
         return resource;
     }
 
+  if (inhibit_x_resources)
+    /* --quick was passed, so this is a no-op.  */
+    return NULL;
+
   return (w32_get_string_resource (name, class, REG_SZ));
 }