emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32reg.c


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/w32reg.c
Date: Tue, 04 Feb 2003 09:03:50 -0500

Index: emacs/src/w32reg.c
diff -c emacs/src/w32reg.c:1.7 emacs/src/w32reg.c:1.8
*** emacs/src/w32reg.c:1.7      Sun May  2 06:28:55 1999
--- emacs/src/w32reg.c  Tue Feb  4 09:03:16 2003
***************
*** 30,36 ****
  
  #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
  
! LPBYTE 
  w32_get_string_resource (name, class, dwexptype)
       char *name, *class;
       DWORD dwexptype;
--- 30,36 ----
  
  #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
  
! LPBYTE
  w32_get_string_resource (name, class, dwexptype)
       char *name, *class;
       DWORD dwexptype;
***************
*** 41,63 ****
    DWORD cbData;
    BOOL ok = FALSE;
    HKEY hive = HKEY_CURRENT_USER;
!   
   trykey:
  
    BLOCK_INPUT;
!   
    /* Check both the current user and the local machine to see if we have
       any resources */
  
    if (RegOpenKeyEx (hive, REG_ROOT, 0, KEY_READ, &hrootkey) == ERROR_SUCCESS)
      {
        char *keyname;
!       
        if (RegQueryValueEx (hrootkey, name, NULL, &dwType, NULL, &cbData) == 
ERROR_SUCCESS
          && dwType == dwexptype)
        {
          keyname = name;
!       } 
        else if (RegQueryValueEx (hrootkey, class, NULL, &dwType, NULL, 
&cbData) == ERROR_SUCCESS
               && dwType == dwexptype)
        {
--- 41,63 ----
    DWORD cbData;
    BOOL ok = FALSE;
    HKEY hive = HKEY_CURRENT_USER;
! 
   trykey:
  
    BLOCK_INPUT;
! 
    /* Check both the current user and the local machine to see if we have
       any resources */
  
    if (RegOpenKeyEx (hive, REG_ROOT, 0, KEY_READ, &hrootkey) == ERROR_SUCCESS)
      {
        char *keyname;
! 
        if (RegQueryValueEx (hrootkey, name, NULL, &dwType, NULL, &cbData) == 
ERROR_SUCCESS
          && dwType == dwexptype)
        {
          keyname = name;
!       }
        else if (RegQueryValueEx (hrootkey, class, NULL, &dwType, NULL, 
&cbData) == ERROR_SUCCESS
               && dwType == dwexptype)
        {
***************
*** 67,83 ****
        {
          keyname = NULL;
        }
!       
        ok = (keyname
            && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
            && RegQueryValueEx (hrootkey, keyname, NULL, NULL, lpvalue, 
&cbData) == ERROR_SUCCESS);
!       
        RegCloseKey (hrootkey);
      }
!   
    UNBLOCK_INPUT;
!   
!   if (!ok) 
      {
        if (lpvalue)
        {
--- 67,83 ----
        {
          keyname = NULL;
        }
! 
        ok = (keyname
            && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
            && RegQueryValueEx (hrootkey, keyname, NULL, NULL, lpvalue, 
&cbData) == ERROR_SUCCESS);
! 
        RegCloseKey (hrootkey);
      }
! 
    UNBLOCK_INPUT;
! 
!   if (!ok)
      {
        if (lpvalue)
        {
***************
*** 90,96 ****
          goto trykey;
        }
        return (NULL);
!     } 
    return (lpvalue);
  }
  
--- 90,96 ----
          goto trykey;
        }
        return (NULL);
!     }
    return (lpvalue);
  }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]