diff loader/registry.c @ 128:28091b3caff9

DLL loader updated from avifile-0.60beta4
author arpi_esp
date Sun, 18 Mar 2001 01:01:03 +0000
parents 3b5f5d1c5041
children 82a9977f7e04
line wrap: on
line diff
--- a/loader/registry.c	Sun Mar 18 00:31:18 2001 +0000
+++ b/loader/registry.c	Sun Mar 18 01:01:03 2001 +0000
@@ -11,7 +11,8 @@
 #include <wine/winerror.h>
 
 #include <registry.h>
-
+//#undef TRACE
+//#define TRACE printf
 struct reg_value
 {
 	int type;
@@ -147,7 +148,6 @@
 static reg_handle_t* find_handle_by_name(const char* name)
 {
 	reg_handle_t* t;
-//        printf("REGISTRY: find_handle_by_name(%s)\n",name);
 	for(t=head; t; t=t->prev)
 	{
 		if(!strcmp(t->name, name))
@@ -160,7 +160,6 @@
 static struct reg_value* find_value_by_name(const char* name)
 {
 	int i;
-//        printf("REGISTRY: find_value_by_name(%s)\n",name);
 	for(i=0; i<reg_size; i++)
 		if(!strcmp(regs[i].name, name))
 			return regs+i;
@@ -169,7 +168,6 @@
 static reg_handle_t* find_handle(int handle)
 {
 	reg_handle_t* t;
-//        printf("REGISTRY: find_handle(%d)\n",handle);
 	for(t=head; t; t=t->prev)
 	{
 		if(t->handle==handle)
@@ -263,7 +261,7 @@
 
 static void init_registry()
 {
-//	printf("Initializing registry\n");
+	printf("Initializing registry\n");
 	open_registry();
 	insert_handle(HKEY_LOCAL_MACHINE, "HKLM");
 	insert_handle(HKEY_CURRENT_USER, "HKCU");
@@ -393,11 +391,11 @@
 	{
 		int qw=45708;
 		v=insert_reg_value(key, name, DIR, &qw, 4);
-		*status=REG_CREATED_NEW_KEY;
+		if (status) *status=REG_CREATED_NEW_KEY;
 //		return 0;
 	}
 	else
-		*status=REG_OPENED_EXISTING_KEY;
+		if (status) *status=REG_OPENED_EXISTING_KEY;
 
 	t=insert_handle(generate_handle(), fullname);
 	*newkey=t->handle;