Release 970101
Wed Jan 1 15:36:17 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/listbox.c]
Use FindFirstFile/FindNextFile in LISTBOX_Directory.
* [files/dos_fs.c]
Rewrote FindFirstFile/FindNextFile to use DOSFS_FindNext().
* [files/file.c] [files/directory.c]
Use Win32 kernel objects and handles for file handles.
Unified SearchPath() and OpenFile().
* [loader/builtin.c]
Moved to if1632/ directory.
* [tools/build.c] [debugger/*] [miscemu/*]
Win16 register functions now receive the same CONTEXT * structure
as Win32 functions.
* [include/sigcontext.h] [miscemu/instr.c]
Added new macros to get register values from the SIGCONTEXT
structure (only used for instruction emulation now).
* [scheduler/process.c] [scheduler/thread.c] (New files)
Allocate process and thread structures.
* [scheduler/process.c] [win32/k32obj.c]
Added Win32 kernel objects and handles management.
* [loader/task.c]
Create a Win32 process and thread for every Win16 task.
* [misc/commdlg.c] [misc/shell.c] [windows/msgbox.c]
Built-in resources are now in Win32 format. This also avoids
16-bit callbacks for built-in dialogs.
* [misc/lzexpand.c]
Differentiate between 16-bit and 32-bit file handles.
* [miscemu/int*.c]
Moved all int emulation to msdos/ directory.
* [msdos/*]
New directory msdos/ contains all MS-DOS emulation code that can
also be used for Winelib; this should enable Winelib apps to use
DOS3Call and related functions.
* [rc/winerc.c]
A few bug fixes for Win32 resource format.
* [windows/winpos.c]
Hack in WINPOS_ReorderOwnerPopups() to avoid X crashed (still not
right though).
Sun Dec 29 17:47:55 1996 O. Flebbe <flebbe@science-computing.uni-tuebingen.de>
* [loader/pe_image.c]
Make sure BSS of a PE_Image is zero.
Sat Dec 28 22:15:34 1996 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/scroll.c]
ScrollWindowEx() rewrite, ScrollDC() fix.
* [windows/nonclient.c] [controls/menu.c]
Fixed Alt-Space crashes in dialogs.
* [windows/event.c] [windows/message.c]
Some changes in mouse message generation.
Thu Dec 26 09:25:24 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [debugger/stabs.c]
Dummy DEBUG_ReadExecutableDbgInfo provided for !__ELF__ case.
Tue Dec 24 00:59:05 MET 1996 Martin Buck <martin-2.buck@student.uni-ulm.de>
* [windows/event.c]
Changed XK_Page_{Up,Down} to XK_{Prior,Next} for X11R5
compatibility.
diff --git a/files/profile.c b/files/profile.c
index 2f08849..393fe48 100644
--- a/files/profile.c
+++ b/files/profile.c
@@ -5,7 +5,6 @@
* Copyright 1996 Alexandre Julliard
*/
-#define NO_TRANSITION_TYPES /* This file is Win32-clean */
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -14,7 +13,6 @@
#include "windows.h"
#include "dos_fs.h"
#include "heap.h"
-#include "xmalloc.h"
#include "stddebug.h"
#include "debug.h"
@@ -139,16 +137,16 @@
for ( ; section; section = next_section)
{
- if (section->name) free( section->name );
+ if (section->name) HeapFree( SystemHeap, 0, section->name );
for (key = section->key; key; key = next_key)
{
next_key = key->next;
- if (key->name) free( key->name );
- if (key->value) free( key->value );
- free( key );
+ if (key->name) HeapFree( SystemHeap, 0, key->name );
+ if (key->value) HeapFree( SystemHeap, 0, key->value );
+ HeapFree( SystemHeap, 0, key );
}
next_section = section->next;
- free( section );
+ HeapFree( SystemHeap, 0, section );
}
}
@@ -167,7 +165,7 @@
PROFILESECTION **prev_section;
PROFILEKEY *key, **prev_key;
- first_section = (PROFILESECTION *)xmalloc( sizeof(*section) );
+ first_section = HEAP_xalloc( SystemHeap, 0, sizeof(*section) );
first_section->name = NULL;
first_section->key = NULL;
first_section->next = NULL;
@@ -192,8 +190,8 @@
{
*p2 = '\0';
p++;
- section = (PROFILESECTION *)xmalloc( sizeof(*section));
- section->name = xstrdup( p );
+ section = HEAP_xalloc( SystemHeap, 0, sizeof(*section) );
+ section->name = HEAP_strdupA( SystemHeap, 0, p );
section->key = NULL;
section->next = NULL;
*prev_section = section;
@@ -209,9 +207,9 @@
*p2++ = '\0';
while (*p2 && isspace(*p2)) p2++;
}
- key = (PROFILEKEY *)xmalloc( sizeof(*key) );
- key->name = xstrdup( p );
- key->value = p2 ? xstrdup( p2 ) : NULL;
+ key = HEAP_xalloc( SystemHeap, 0, sizeof(*key) );
+ key->name = HEAP_strdupA( SystemHeap, 0, p );
+ key->value = HEAP_strdupA( SystemHeap, 0, p2 );
key->next = NULL;
*prev_key = key;
prev_key = &key->next;
@@ -268,9 +266,9 @@
{
PROFILEKEY *to_del = *key;
*key = to_del->next;
- if (to_del->name) free( to_del->name );
- if (to_del->value) free( to_del->value );
- free( to_del );
+ if (to_del->name) HeapFree( SystemHeap, 0, to_del->name );
+ if (to_del->value) HeapFree( SystemHeap, 0, to_del->value);
+ HeapFree( SystemHeap, 0, to_del );
return TRUE;
}
key = &(*key)->next;
@@ -302,8 +300,8 @@
key = &(*key)->next;
}
if (!create) return NULL;
- *key = (PROFILEKEY *)xmalloc( sizeof(PROFILEKEY) );
- (*key)->name = xstrdup( key_name );
+ *key = HEAP_xalloc( SystemHeap, 0, sizeof(PROFILEKEY) );
+ (*key)->name = HEAP_strdupA( SystemHeap, 0, key_name );
(*key)->value = NULL;
(*key)->next = NULL;
return *key;
@@ -311,11 +309,11 @@
section = &(*section)->next;
}
if (!create) return NULL;
- *section = (PROFILESECTION *)xmalloc( sizeof(PROFILESECTION) );
- (*section)->name = xstrdup(section_name);
+ *section = HEAP_xalloc( SystemHeap, 0, sizeof(PROFILESECTION) );
+ (*section)->name = HEAP_strdupA( SystemHeap, 0, section_name );
(*section)->next = NULL;
- (*section)->key = (PROFILEKEY *)xmalloc( sizeof(PROFILEKEY) );
- (*section)->key->name = xstrdup( key_name );
+ (*section)->key = HEAP_xalloc( SystemHeap, 0, sizeof(PROFILEKEY) );
+ (*section)->key->name = HEAP_strdupA( SystemHeap, 0, key_name );
(*section)->key->value = NULL;
(*section)->key->next = NULL;
return (*section)->key;
@@ -400,10 +398,10 @@
/* Flush the previous profile */
- newdos_name = xstrdup( dos_name );
+ newdos_name = HEAP_strdupA( SystemHeap, 0, dos_name );
PROFILE_FlushFile();
PROFILE_Free( CurProfile.section );
- if (CurProfile.dos_name) free( CurProfile.dos_name );
+ if (CurProfile.dos_name) HeapFree( SystemHeap, 0, CurProfile.dos_name );
CurProfile.section = NULL;
CurProfile.dos_name = newdos_name;
@@ -528,6 +526,7 @@
key_name, TRUE );
dprintf_profile( stddeb, "PROFILE_SetString('%s','%s','%s'): ",
section_name, key_name, value );
+ if (!key) return FALSE;
if (key->value)
{
if (!strcmp( key->value, value ))
@@ -536,10 +535,10 @@
return TRUE; /* No change needed */
}
dprintf_profile( stddeb, "replacing '%s'\n", key->value );
- free( key->value );
+ HeapFree( SystemHeap, 0, key->value );
}
else dprintf_profile( stddeb, "creating key\n" );
- key->value = xstrdup( value );
+ key->value = HEAP_strdupA( SystemHeap, 0, value );
CurProfile.changed = TRUE;
}
return TRUE;