summaryrefslogtreecommitdiffstats
path: root/loader/registry.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-11 22:58:14 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-11 22:58:14 +0000
commitb4caa850133c79a384c470e5575c6159a689d610 (patch)
tree894e4a9d2b8aa8c77c212661f5aedb450b03c6e0 /loader/registry.c
parentd80b170960adeff96ca05397329ee9ca9528c014 (diff)
downloadmpv-b4caa850133c79a384c470e5575c6159a689d610.tar.bz2
mpv-b4caa850133c79a384c470e5575c6159a689d610.tar.xz
avifile merge. kabi: indent changes really suxxxx
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3466 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/registry.c')
-rw-r--r--loader/registry.c52
1 files changed, 28 insertions, 24 deletions
diff --git a/loader/registry.c b/loader/registry.c
index 217448e162..26fd768177 100644
--- a/loader/registry.c
+++ b/loader/registry.c
@@ -1,4 +1,4 @@
-#include <config.h>
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
@@ -12,8 +12,8 @@
#include <wine/winnt.h>
#include <wine/winerror.h>
-#include <ext.h>
-#include <registry.h>
+#include "ext.h"
+#include "registry.h"
//#undef TRACE
//#define TRACE printf
@@ -168,11 +168,10 @@ void free_registry(void)
free(regs);
regs = 0;
}
- if (localregpathname)
- {
+
+ if (localregpathname && localregpathname != regpathname)
free(localregpathname);
- localregpathname = 0;
- }
+ localregpathname = 0;
}
@@ -298,16 +297,21 @@ static void init_registry(void)
// can't be free-ed - it's static and probably thread
// unsafe structure which is stored in glibc
-#ifdef USE_WIN32DLL
- // MPlayer:
- localregpathname = get_path("registry");
+#ifdef MPLAYER
+ regpathname = get_path("registry");
+ localregpathname = regpathname;
#else
- // avifile:
+ // regpathname is an external pointer
+ //
+ // registry.c is holding it's own internal pointer
+ // localregpathname - which is being allocate/deallocated
+
if (localregpathname == 0)
{
const char* pthn = regpathname;
if (!regpathname)
{
+ // avifile - for now reading data from user's home
struct passwd* pwent;
pwent = getpwuid(geteuid());
pthn = pwent->pw_dir;
@@ -402,16 +406,9 @@ long RegQueryValueExA(long key, const char* value, int* reserved, int* type, int
char* c;
TRACE("Querying value %s\n", value);
if(!regs)
- init_registry()
-;
+ init_registry();
+
c=build_keyname(key, value);
- if (strcmp(value, "AudioReserved001")==0)
- {
- printf("Query for AudioReserved001 %p %p count: %d\n", type, data, *count);
- *(int*)type = REG_DWORD;
- *(int*)data = 256;
- return 0;
- }
if(c==NULL)
return 1;
t=find_value_by_name(c);
@@ -446,8 +443,8 @@ long RegCreateKeyExA(long key, const char* name, long reserved,
// TRACE("Creating/Opening key %s\n", name);
TRACE("Creating/Opening key %s\n", name);
if(!regs)
- init_registry()
-;
+ init_registry();
+
fullname=build_keyname(key, name);
if(fullname==NULL)
return 1;
@@ -509,8 +506,8 @@ long RegSetValueExA(long key, const char* name, long v1, long v2, const void* da
char* c;
TRACE("Request to set value %s\n", name);
if(!regs)
- init_registry()
-;
+ init_registry();
+
c=build_keyname(key, name);
if(c==NULL)
return 1;
@@ -518,3 +515,10 @@ long RegSetValueExA(long key, const char* name, long v1, long v2, const void* da
free(c);
return 0;
}
+
+long RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcbName,
+ LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcbClass,
+ LPFILETIME lpftLastWriteTime)
+{
+ return ERROR_NO_MORE_ITEMS;
+}