move dosconf to winedos
jhei at iki.fi
Sun Nov 3 13:45:51 CST 2002
György 'Nog' Jeney wrote:
> After applying this patch, please remove msdos/dosconf.c.
> * dlls/winedos/dosconf.c
> * include/callback.h
> * msdos/dpmi.c
> * msdos/dosconf.c (removed)
> * dlls/ntdll/Makefile.in
> * dlls/winedos/winedos.spec
> * dlls/winedos/Makefile.in
> Move dosconf to winedos.
While I appreciate helping me moving stuff to winedos,
this patch has some questionable design choices (and a few bugs, too).
- Condition (!done && !Dosvm.ReadConfig && !DPMI_LoadDosSystem())
in file msdos/int21.c contains 2-3 bugs (depends on how you count,
I shall leave fixing this as an exercise :).
- Moving stuff to winedos is supposed to be because it reduces
amount of code not required in win32 from ntdll (which this patch
does) but also because it reduces dependencies between winedos and ntdll
(this patch adds more dependencies than it removes). Because the
only reason for ntdll needing dosconf is extended control-break checking state
(which is not used by Wine for anything) I think the best would be to
move this code to dlls/winedos/int21.c and either remove it from msdos/int21.c
or replace it with stub that succeeds but does nothing.
- If we really want to add stuff to DOSVM_TABLE, only one function should be necessary.
Either winedos always initializes dosconf or it initializes it when the
first call to DOSVM_TABLE.GetConfig is made.
- Don't use INT21_ReadConfigSys() and Dosvm.GetConfig() pairs. It is better to
refactor these into INT21_GetConfigSys which does both. This makes code more
readable (and even reduces amount of code generated).
Jukka Heinonen <http://www.iki.fi/jhei/>
More information about the wine-devel