Compare commits

...

2715 Commits

Author SHA1 Message Date
The ReactOS Team
d2b659ffb2 This commit was manufactured by cvs2svn to create branch
'alex_2gb+hdrtests'.

svn path=/branches/alex_2gb+hdrtests/; revision=11194
2004-10-04 21:38:49 +00:00
Alex Ionescu
dc70244c68 Un-hardcoded the 0xC0000000 value, and stuck the define in one single place both for ASM and C code. This define is 0x80000000 by default, but automatically sets itself to 0xC0000000 if 3GB is set to 1 in reactos/config. This option is turned on by default for now, because the Default heap is at 0xA0000000, which doesn't work on a non 3GB system. Lower values seem to crash Win32K but I fill figure out a solution.
svn path=/trunk/; revision=11193
2004-10-04 21:38:49 +00:00
Casper Hornstrup
8646668c58 2004-10-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Support for kernel TARGET_TYPE.
	* ntoskrnl/Makefile: Simplified makefile.

svn path=/trunk/; revision=11192
2004-10-04 20:04:49 +00:00
Gé van Geldorp
841c394e6f Piotr Caban <pio13@poczta.onet.pl>
- Added Polish translation.

svn path=/trunk/; revision=11191
2004-10-04 19:44:11 +00:00
Gé van Geldorp
aec725dce4 Reapply winehq change:
Robert Shearman <rob@codeweavers.com>
- Simplify getting custom icons for a folder by utilising the new
  SHELL32_GetCustomFolderAttribute function.
- Add support for custom shell folders, such as the History folder.
- Always try to initialize folder using IPersistFolder3 interface and
  then fall back on IPersistFolder if not supported.
Ge van Geldorp <gvg@reactos.com>
- Can't pass NULL as default value to GetPrivateProfileString.

svn path=/trunk/; revision=11190
2004-10-04 19:41:31 +00:00
Casper Hornstrup
67a41ff238 2004-10-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Clean autogenerated files.
	* tools/regtests.c: Remove newlines.

svn path=/trunk/; revision=11189
2004-10-04 19:41:28 +00:00
Jens Collin
f539cfcea7 return hardcoded value (1) for SM_CMONITORS.
svn path=/trunk/; revision=11188
2004-10-04 19:23:31 +00:00
Gé van Geldorp
aa496615df Use GetStringTypeW() for implementation of IsCharAlphaNumericW(),
IsCharAlphaW(), IsCharLowerW() and IsCharUpperW()

svn path=/trunk/; revision=11187
2004-10-04 19:22:16 +00:00
Jens Collin
7e15de6d4a defined SM_CMONITORS (80)
svn path=/trunk/; revision=11186
2004-10-04 19:22:02 +00:00
Gé van Geldorp
1736e3772b Implement GetStringTypeA/W() and GetStringTypeExA/W()
svn path=/trunk/; revision=11185
2004-10-04 19:17:58 +00:00
Art Yerkes
2638336b0e Fixed IPStartup prototype and moved DisplayIPPacket out of ifdef.
svn path=/trunk/; revision=11184
2004-10-04 18:32:30 +00:00
Art Yerkes
706ff78e48 Removed unneeded DriverObject parameter to IPStartup.
svn path=/trunk/; revision=11183
2004-10-04 18:31:40 +00:00
Hartmut Birr
49871ae71b - Fixed the setting of the page protection for ntoskrnl.
The image is loaded without the size of the bss section.
  Pages after the bss section may not be changed.

svn path=/trunk/; revision=11182
2004-10-04 17:27:13 +00:00
Martin Fuchs
a573c6ea80 sync with WINE source
svn path=/trunk/; revision=11181
2004-10-04 17:13:03 +00:00
Casper Hornstrup
8ec117a236 Revert:
2004-10-02  Casper S. Hornstrup  <chorns@users.sourceforge.net>

	* ntoskrnl/Makefile: Fix dependencies when PCH is enabled.

2004-10-02  Casper S. Hornstrup  <chorns@users.sourceforge.net>

	* tools/helper.mk: Support for kernel TARGET_TYPE.
	* ntoskrnl/Makefile: Simplified makefile.

svn path=/trunk/; revision=11180
2004-10-04 10:16:59 +00:00
Martin Fuchs
83de11e97e merged corrected version of the Wine commit http://cvs.winehq.org/patch.py?id=13936:
- added choosing fonts
- added file moving

svn path=/trunk/; revision=11179
2004-10-04 09:31:10 +00:00
Art Yerkes
184c8d80f1 First shot at ip lib test app.
svn path=/trunk/; revision=11178
2004-10-04 04:26:00 +00:00
Alex Ionescu
4e21459b33 DBG should be 0 by default. Also, DBG = 1 seems to break ROS (it hangs before ntoskrnl is even loaded.)
svn path=/trunk/; revision=11177
2004-10-04 03:19:07 +00:00
Art Yerkes
3b2388081c Added new targets. ip and oskittcp should now clean with the rest of the
tree.

svn path=/trunk/; revision=11176
2004-10-03 22:55:45 +00:00
Art Yerkes
8eb5ca6ffa Final propogation of TDI_CONNECTION_INFORMATION/TRANSPORT_ADDRESS changes.
svn path=/trunk/; revision=11175
2004-10-03 21:44:43 +00:00
Art Yerkes
bab3b21d32 Propogating TDI address changes.
svn path=/trunk/; revision=11174
2004-10-03 21:16:31 +00:00
Gé van Geldorp
7eb30acddb Rollback last change since it was incorrect.
See http://www.reactos.com/bugzilla/show_bug.cgi?id=36

svn path=/trunk/; revision=11173
2004-10-03 21:03:06 +00:00
Art Yerkes
fc4b179d93 New file buffer.c which contains NDIS_BUFFER and NDIS_PACKET routines.
svn path=/trunk/; revision=11172
2004-10-03 20:39:19 +00:00
Art Yerkes
5394560307 Fixed UDP protocol.
Leaned interface between tcpip and ip lib to not include ndis buffers and
such, as well as datagram request structs.  This both eliminates code
setting up these structs as well as making use of ip lib easier from userland.
Moved ndis buffer routines to tcpip/buffer.c.  They are a bit separate from
the neutral routines functions.

svn path=/trunk/; revision=11171
2004-10-03 20:38:48 +00:00
Art Yerkes
a52618ca99 Fixed use of TA_ADDRESS in favor of TRANSPORT_ADDRESS. This still confuses
me.
write, read: Handle errors correctly.

svn path=/trunk/; revision=11170
2004-10-03 20:36:46 +00:00
Gé van Geldorp
81e60d8ded Move final user stack cleanup to kernelmode
svn path=/trunk/; revision=11169
2004-10-03 18:53:05 +00:00
Gé van Geldorp
9584768301 CVS maintenance
svn path=/trunk/; revision=11168
2004-10-03 18:46:07 +00:00
Gé van Geldorp
91083c72fd Remove faulty debug statement
svn path=/trunk/; revision=11167
2004-10-03 18:22:33 +00:00
Thomas Bluemel
737ea5b737 don't let dlltool mess up c++ mangled exports for crtdll and msvcrt
svn path=/trunk/; revision=11166
2004-10-03 14:24:43 +00:00
Thomas Bluemel
c0f9c7505c fixed GetHandleInformation(), SetHandleInformation() and minor fixes to CloseHandle() and DuplicateHandle()
svn path=/trunk/; revision=11165
2004-10-03 10:05:56 +00:00
Eric Kohl
d8ea61531d Update a new users private shell folder paths when a new user profile is created.
svn path=/trunk/; revision=11164
2004-10-03 09:27:22 +00:00
Alex Ionescu
772a37758e Sorry, forgot these updates for WIN32K to build with new KPCR.
svn path=/trunk/; revision=11163
2004-10-03 03:07:18 +00:00
Alex Ionescu
4d9e3a1cae Corrected KPCR structure, removed IKPCR, set up CurrentThread in proper structure (implemented KPRCB), added some types needed by KPRCB.
svn path=/trunk/; revision=11162
2004-10-03 03:03:54 +00:00
Thomas Bluemel
b26683b0b3 fixed ProcessIdToSessionId()
svn path=/trunk/; revision=11161
2004-10-02 21:14:08 +00:00
Thomas Bluemel
3f75c451d1 don't duplicate tons of code for error handling
svn path=/trunk/; revision=11160
2004-10-02 20:56:54 +00:00
Thomas Bluemel
86b4ec40d4 INF Helper tool for installation of .inf files, by Michael Biggins
svn path=/trunk/; revision=11159
2004-10-02 18:33:12 +00:00
Filip Navara
a73f47bd18 Allocate memory for the handle table from paged pool!
svn path=/trunk/; revision=11158
2004-10-02 16:48:12 +00:00
Filip Navara
8e9f6624d1 Change the ASSERT_IRQL in ExAllocatePagedPoolWithTag from PASSIVE_LEVEL to APC_LEVEL.
svn path=/trunk/; revision=11157
2004-10-02 16:48:05 +00:00
Thomas Bluemel
190c655d90 added stubs for winfax.dll
svn path=/trunk/; revision=11156
2004-10-02 16:43:05 +00:00
Casper Hornstrup
05ee9bbcc3 2004-10-02 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/Makefile: Fix dependencies when PCH is enabled.

svn path=/trunk/; revision=11155
2004-10-02 14:38:37 +00:00
Casper Hornstrup
cf4df378aa 2004-10-02 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Support for kernel TARGET_TYPE.
	* ntoskrnl/Makefile: Simplified makefile.

svn path=/trunk/; revision=11154
2004-10-02 14:03:51 +00:00
Eric Kohl
b8e59707a9 Add common user shell folder key.
svn path=/trunk/; revision=11153
2004-10-02 12:35:12 +00:00
Eric Kohl
d2e9fecf72 Remove default users shell folder paths.
svn path=/trunk/; revision=11152
2004-10-02 12:33:20 +00:00
Eric Kohl
19c3f3e06e Improve creation of shell folder settings.
Todo:
 - Store folder names in resource strings.
 - Update current users shell folder paths when a new profile is created.

svn path=/trunk/; revision=11151
2004-10-02 12:31:28 +00:00
Hartmut Birr
acb1dd91c6 - Made cmt unicode compatible.
- Enabled time counting.
- Improved the waiting of key input events.

svn path=/trunk/; revision=11150
2004-10-02 10:26:48 +00:00
Hartmut Birr
d2a8a1bc51 - Terminate the wait thread if the handle was from a console.
svn path=/trunk/; revision=11149
2004-10-02 10:19:38 +00:00
Hartmut Birr
c8641fc2a3 - Updated the workingset size in the rmap functions.
svn path=/trunk/; revision=11148
2004-10-02 10:16:10 +00:00
Casper Hornstrup
9495493fde 2004-10-02 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/gdiplus/tests/.cvsignore: Ignore _hooks.c and _stubs.S.
	* lib/gdiplus/tests/Makefile (TARGET_OBJECTS): Remove passthrough.o and
	add _hooks.o and _stubs.o.
	* lib/gdiplus/tests/tests/test-1.c: Test API hooking.
	* regtests/shared/regtests.h: Add support for API hooking.
	* tools/helper.mk: Generate stubs.
	* tools/regtests.c: Add support for generating stubs and hooks.
	* lib/gdiplus/tests/passthrough.c: Remove.
	* lib/gdiplus/tests/stubs.tst: New file.

svn path=/trunk/; revision=11147
2004-10-02 08:44:54 +00:00
Hartmut Birr
d12bb0393c - Fixed the definition of SNMP_FUNC_TYPE.
svn path=/trunk/; revision=11146
2004-10-02 08:28:34 +00:00
Art Yerkes
0b03f1a2a9 Sorry i didn't have all the assertions correct in ntoskrnl/mm/pool.c
Now i've moved them to npool.c and ppool.c, where they are shorter.

svn path=/trunk/; revision=11145
2004-10-01 20:51:29 +00:00
Gé van Geldorp
adeb131ada Don't use more than a single page for a TEB (forgotten file)
svn path=/trunk/; revision=11144
2004-10-01 20:29:58 +00:00
Gé van Geldorp
228cddee4a Don't use more than a single page for a TEB
svn path=/trunk/; revision=11143
2004-10-01 20:26:05 +00:00
Hartmut Birr
f6fb22a9ef - Rewrote parts of the Process & Thread time count functions.
svn path=/trunk/; revision=11142
2004-10-01 20:09:57 +00:00
Gé van Geldorp
96bb83f2a9 Handle mapping a view of a section at non-zero file offset
svn path=/trunk/; revision=11141
2004-10-01 20:06:43 +00:00
Art Yerkes
a07571a47c pool.c: assert irql and pool type for PASSIVE_LEVEL and above.
ntoskrnl/ob/security.c:
This function did not either identify the new descriptor as self relative
nor honor the case where self-relative was not set.  Now fixed.
Bug identified by WaxDragon (while loading a cygwin app)

svn path=/trunk/; revision=11140
2004-10-01 04:00:11 +00:00
Art Yerkes
2c3fecda88 Added needed rc file.
svn path=/trunk/; revision=11139
2004-10-01 02:31:05 +00:00
Art Yerkes
9fd341c9ae Zero the new descriptor so that the Dacl, Sacl etc pointers will be zeroed
if not initialized.  cygwin was exercising this.

svn path=/trunk/; revision=11138
2004-10-01 01:28:56 +00:00
Art Yerkes
f45c8f618d It seems there's a subtle difference between mingw32 on windows and on
unixen.  Apparently, include_next does not count repeated include
directories on unixen but does on windows, thus windows users of mingw
saw the build of the ip lib break for not having included
w32api/include/basetsd.h through the include/basetsd.h.  It would
include include/basetsd.h again and (since the include guard in that
file surrounds the include_next), would do nothing the second time.  I guess
I'm the only person who got bit by this difference.

svn path=/trunk/; revision=11137
2004-09-30 22:04:13 +00:00
Emanuele Aliberti
c7eba737e2 Correct spelling errors in some remarks.
svn path=/trunk/; revision=11136
2004-09-30 21:14:24 +00:00
Eric Kohl
639754c6b8 Remove common shell folder settings.
svn path=/trunk/; revision=11135
2004-09-30 20:24:51 +00:00
Eric Kohl
3036e1670c - Add proper file header.
- Create common shell folder registry values in InitializeProfiles().

svn path=/trunk/; revision=11134
2004-09-30 20:23:00 +00:00
Richard Campbell
1de98ec592 rollback change for now
svn path=/trunk/; revision=11133
2004-09-30 16:47:49 +00:00
Art Yerkes
7b91f0c3fb Fixed makefile. Wrong name for ip.a
svn path=/trunk/; revision=11132
2004-09-30 16:30:43 +00:00
Richard Campbell
c831dac0e0 - For now, hardcode the all users profile path until we get better user management code in place
- removed the %USERPROFILE% prefix, this will go in combination with my other fix to hopefully get things working right again.

svn path=/trunk/; revision=11131
2004-09-30 15:39:48 +00:00
Royce Mitchell III
2ab40c2827 You're such a trooper, Marvin
svn path=/trunk/; revision=11130
2004-09-30 13:44:48 +00:00
Gé van Geldorp
e167d42360 You can tune a file system, but you can't tunafish
svn path=/trunk/; revision=11129
2004-09-30 10:07:00 +00:00
Gé van Geldorp
ae3fd2574d Rollback winehq merge since it breaks Explorer
svn path=/trunk/; revision=11128
2004-09-30 06:49:06 +00:00
Art Yerkes
0bccb9dbb0 Most files moved to linkable library drivers/lib/ip, which can be linked
from kernel land, or from userland with the help of drivers/lib/undis.
Hopefully, I'll be able to simulate a sufficient environment with undis
that we'll be able to test most problems with the ip system in userland.
This follows my general priniciple of getting most interesting code into
a place where we can really examine it and work with it.  The interface
to the ip library is still a bit raw.  I was hoping to do a better job
of isolating it and especially digging nt kernel dependencies out into
the remaining framework files (tcpip/dispatch.c, tcpip/fileobjs.c), but
it was taking too long.  Hopefully I can return to that later.

svn path=/trunk/; revision=11127
2004-09-30 06:00:42 +00:00
Art Yerkes
4ec1a851b9 Changes to the interface to componentized ip library. This commit is where
the ambiguously linked library starts being used in km.  There are further
cleanups i need to do, but hopefully having this checked in will help others
who are eager to help work on it.

svn path=/trunk/; revision=11126
2004-09-30 05:44:10 +00:00
Art Yerkes
03a9fe5219 Fixes to interface. Prototypes which were being stubborn. I will have to
figure out how to use these headers better.

svn path=/trunk/; revision=11125
2004-09-30 05:41:09 +00:00
Art Yerkes
e60bec5f2c Undis now builds a dll, carefully skirting the linkage problem i was facing.
I also add more and more correct functions.

svn path=/trunk/; revision=11124
2004-09-30 05:40:15 +00:00
Thomas Bluemel
c8de36191c use ULONG_PTR to calculate pointers
svn path=/trunk/; revision=11122
2004-09-29 08:41:39 +00:00
Gé van Geldorp
b8e45d0e41 Robert Shearman <rob@codeweavers.com>
- Simplify getting custom icons for a folder by utilising the new
  SHELL32_GetCustomFolderAttribute function.
- Add support for custom shell folders, such as the History folder.
- Always try to initialize folder using IPersistFolder3 interface and
  then fall back on IPersistFolder if not supported.

svn path=/trunk/; revision=11121
2004-09-29 07:01:37 +00:00
Art Yerkes
a6797af759 Getting there. Smoothing out the public interface and eliminating useless
types.

svn path=/trunk/; revision=11120
2004-09-29 06:11:27 +00:00
Art Yerkes
4c30d6be10 IP library. These files were moved from tcpip.sys and can be linked with
apps/tests/iptest using the undis library.  We need to make a change to
the way this is built so that we end up with ip.a (userland) and
ipkernel.a.  I'm still deciding how i want to do that.  For our purposes
now, it'll be fine to have it userland only as long as we still have the
option to build it for kernel use by hand to try out.

svn path=/trunk/; revision=11119
2004-09-29 05:10:48 +00:00
Art Yerkes
0f5152aa1c Added a header to lie between undis and net/ndis.h. This header will be used
to wrap and modify ndis definitions if necessary.

svn path=/trunk/; revision=11118
2004-09-29 04:57:26 +00:00
Art Yerkes
107ff56d07 Simple library which captures the remaining link-time dependencies for ip.a
Incomplete as yet.

Open question: how to make ip.a ambiguously linkable without building it
twice in it's present form.  Oskit was relatively simple because the
system dependencies were already isolated.  We need to capture and isolate
system dependencies in ip.a as well.

svn path=/trunk/; revision=11117
2004-09-29 04:54:26 +00:00
Art Yerkes
91a2bfd277 These calls to ExAllocatePool are done at != PASSIVE_LEVEL. Allocate
non-paged-pool.

svn path=/trunk/; revision=11116
2004-09-29 03:36:52 +00:00
Richard Campbell
1fea21808f - Changed a few REG_EXPAND_SZ to REG_SZs as per Windows
svn path=/trunk/; revision=11115
2004-09-29 01:26:35 +00:00
Royce Mitchell III
af06b2d654 sprintf bad
svn path=/trunk/; revision=11114
2004-09-29 00:47:42 +00:00
Gé van Geldorp
79d6604660 NtAllocateVirtualMemory() should return 64k aligned areas (forgotten file)
svn path=/trunk/; revision=11113
2004-09-28 20:58:29 +00:00
Gé van Geldorp
8e7f16e570 Don't return data length if not requested
svn path=/trunk/; revision=11112
2004-09-28 20:40:15 +00:00
Hartmut Birr
8ceb672cc0 - Fixed LdrLookupPageProtection.
svn path=/trunk/; revision=11111
2004-09-28 20:16:24 +00:00
James Tabor
e3bfa4f45a Add advpack.
svn path=/trunk/; revision=11110
2004-09-28 19:49:27 +00:00
Gé van Geldorp
d243b55958 NtAllocateVirtualMemory() should return 64k aligned areas
svn path=/trunk/; revision=11109
2004-09-28 19:49:21 +00:00
Steven Edwards
43787ecece Ported icmp.dll from wine.
svn path=/trunk/; revision=11108
2004-09-28 19:07:56 +00:00
Thomas Bluemel
3ef6e3494f relicense to LGPL
svn path=/trunk/; revision=11107
2004-09-28 16:05:24 +00:00
Thomas Bluemel
fdde8be2a7 avoid compiler warning
svn path=/trunk/; revision=11106
2004-09-28 15:14:04 +00:00
Thomas Bluemel
2d01207958 1. get rid of the global thread list and group threads in processes instead
2. get rid of all reactos-specific fields in the E/KTHREAD structure and make them match the 2k layout
3. identify threads (and later processes) using a client id table (which should propably be replaced by a global handle table instead)
4. disabled thread event pair functions by default (NT4 only) as they require a field in the ETHREAD structure that is not present in later versions

svn path=/trunk/; revision=11105
2004-09-28 15:02:31 +00:00
Eric Kohl
c0e4836b17 - Implement IoFreeErrorLogEntry().
- Fix log size calculation in IopLogWorker().

svn path=/trunk/; revision=11104
2004-09-28 12:51:14 +00:00
Eric Kohl
f665fe8a22 Use FILE_APPEND_DATA access right to write log entries.
svn path=/trunk/; revision=11103
2004-09-28 12:50:23 +00:00
Eric Kohl
f15ffecda4 Support special FILE_WRITE_TO_END_OF_FILE byte offset to append data to a file.
svn path=/trunk/; revision=11102
2004-09-28 10:52:55 +00:00
Eric Kohl
d394870def NtWriteFile must append to file if it was opened with the FILE_APPEND_DATA access.
FILE_WRITE_DATA take precedence over FILE_APPEND_DATA.

svn path=/trunk/; revision=11101
2004-09-28 10:51:05 +00:00
Gé van Geldorp
3d82d976d3 NtSetInformationThread() expects a pointer, not the handle itself
svn path=/trunk/; revision=11100
2004-09-27 20:04:53 +00:00
Eric Kohl
db47f999dd Define FILE_WRITE_TO_END_OF_FILE.
svn path=/trunk/; revision=11094
2004-09-27 11:32:31 +00:00
Gé van Geldorp
46dbd3190e Sylvain Petreolle <spetreolle@yahoo.fr>
- rules.mak is included too late in tools/winebuild/Makefile, which makes
  TARGET, "all:", CLEAN_FILES and HOST_CFLAGS wrong.

svn path=/trunk/; revision=11093
2004-09-27 08:15:07 +00:00
Steven Edwards
73a66a9cc9 Some fixes for MS_VC.
svn path=/trunk/; revision=11092
2004-09-27 04:32:52 +00:00
Steven Edwards
6a64eeeb08 Add a shutdown message.
svn path=/trunk/; revision=11091
2004-09-27 04:12:40 +00:00
Steven Edwards
21d354a1c1 Slightly new and improved stub for GetUserNameA based on the Winehq
code and hacked by Royce and Me.

svn path=/trunk/; revision=11082
2004-09-26 21:15:51 +00:00
Gé van Geldorp
05848ce54b Scream when an unimplemented function is called
svn path=/trunk/; revision=11081
2004-09-26 20:28:22 +00:00
Gé van Geldorp
f427428df7 Stub LookupAccountNameA/W
svn path=/trunk/; revision=11080
2004-09-26 20:26:13 +00:00
Gé van Geldorp
409e2330e1 Call GetProcessHeap() instead of passing it's address
svn path=/trunk/; revision=11079
2004-09-26 19:17:21 +00:00
Hartmut Birr
6375fca5be - Added a little sample which tests the noexecute protection.
svn path=/trunk/; revision=11077
2004-09-26 17:00:15 +00:00
Royce Mitchell III
9d63d77c6e add a little more debug output in case of unhandled exceptions
svn path=/trunk/; revision=11076
2004-09-26 16:54:53 +00:00
Hartmut Birr
1b03d41981 - Detect more cpu features.
- Implemented the noexecute protection for the AMD64 cpu.

svn path=/trunk/; revision=11075
2004-09-26 16:32:18 +00:00
Thomas Bluemel
455470d018 minor fix
svn path=/trunk/; revision=11074
2004-09-26 16:14:05 +00:00
Thomas Bluemel
cc0fabacd1 use Get/SetWindowLongPtr() where appropriate in favor of 64bit compatibility
svn path=/trunk/; revision=11073
2004-09-26 15:55:53 +00:00
Martin Fuchs
d3f70f50f0 introduce XPath syntax to make handling configuration a bit easier
svn path=/trunk/; revision=11071
2004-09-26 15:13:16 +00:00
Hartmut Birr
c8e0c372d9 - Rewrote (copied from ntdll) parts of the relocation and import fixup code.
- Don't load no-load sections at the end of the  driver.
- Don't relocate the relocation section itself.
- Set the correct page protection for section which are executable.
- Added a (dirty) fix for the fireport driver.
- Fixed the detection of the noguiboot option.

svn path=/trunk/; revision=11070
2004-09-26 15:07:44 +00:00
Filip Navara
a2446b3408 - Move shldisp.h to the right place.
- Get rid of the ICOM crap.

svn path=/trunk/; revision=11069
2004-09-26 14:34:23 +00:00
Thomas Bluemel
c28cd9af2c minor fix
svn path=/trunk/; revision=11068
2004-09-26 13:25:42 +00:00
Thomas Bluemel
5ee10c6024 add hid.dll to the build system
svn path=/trunk/; revision=11067
2004-09-26 12:39:30 +00:00
Eric Kohl
a1463efaf0 Delete a boot log from the registry after it was written to the boot log file.
svn path=/trunk/; revision=11066
2004-09-26 11:29:50 +00:00
Thomas Bluemel
1a541c9ebb enable PCH
svn path=/trunk/; revision=11065
2004-09-26 10:43:00 +00:00
Thomas Bluemel
dae8e69f8c fixed typo
svn path=/trunk/; revision=11064
2004-09-26 10:01:09 +00:00
Thomas Bluemel
06fc0007ce added shell extension that enables the user to change compatibility modes for .exe files in the file properties.
svn path=/trunk/; revision=11063
2004-09-26 09:56:23 +00:00
Hartmut Birr
82f36a4a4e - Reselected the drive (master/slave) after a soft reset.
svn path=/trunk/; revision=11062
2004-09-26 09:14:20 +00:00
Art Yerkes
a3091079d6 Fixed each call to use a unique event. This is needed because send, recv,
connect, etc can complete independently even on the same socket.
Fixed connect to pass the status from afd back correctly.  Connect now
fails as expected when we couldn't make a connection.

svn path=/trunk/; revision=11061
2004-09-26 07:55:32 +00:00
Royce Mitchell III
97fcd66fc7 more sayings
svn path=/trunk/; revision=11060
2004-09-26 02:33:31 +00:00
Filip Navara
93f1330753 - Fix RtlFindClearBits to correctly treat the hint.
svn path=/trunk/; revision=11059
2004-09-25 22:59:17 +00:00
Gé van Geldorp
200da8e7da Don't abandon file creation if hTemplateFile is INVALID_HANDLE_VALUE
svn path=/trunk/; revision=11058
2004-09-25 21:44:02 +00:00
Art Yerkes
e1741d6626 Use the recursive mutex to lock the TCP.
svn path=/trunk/; revision=11057
2004-09-25 21:32:56 +00:00
Art Yerkes
1eb1e27110 Added simple recursive mutex adapted from my afd one. Works both above
and below DISPATCH_LEVEL.

svn path=/trunk/; revision=11056
2004-09-25 21:32:18 +00:00
Art Yerkes
3a4c09d746 More experimental detritus. Sorry about that.
svn path=/trunk/; revision=11055
2004-09-25 21:08:53 +00:00
Filip Navara
630b1b2eb3 - Fix usage of RtlFindSetBits and loops in CmiStartLogUpdate and CmiStartHiveUpdate.
svn path=/trunk/; revision=11054
2004-09-25 20:53:29 +00:00
Filip Navara
3823d945f5 - Fix implementation of RtlFindSetBits to be able to return bits that are at lower location than the supplied hint.
svn path=/trunk/; revision=11053
2004-09-25 20:49:57 +00:00
Art Yerkes
91fea9194d Previously checked in with some detritus from some experimental rtl stuff.
Fixed.

svn path=/trunk/; revision=11052
2004-09-25 20:38:46 +00:00
Art Yerkes
3725308f3e Fixed connection locking in tcp.c
Added a work item in lan.c re: dpc callback from the adapter.  This keeps
us from needing mdl functions at dpc level.
Track IRPs to be completed with memtrack.

svn path=/trunk/; revision=11051
2004-09-25 20:24:00 +00:00
Filip Navara
ee0f0ee26f - Remove the incorrect ALIGN macro (missing "* (align)") and replace it with ROUND_UP.
svn path=/trunk/; revision=11050
2004-09-25 19:39:57 +00:00
Gé van Geldorp
fceb614b2b Make some installers happy (well, happier at least)
svn path=/trunk/; revision=11049
2004-09-25 18:22:33 +00:00
Emanuele Aliberti
0f2014b8bb Fixed spelling error.
svn path=/trunk/; revision=11048
2004-09-25 15:46:52 +00:00
Eric Kohl
23a709ca5f - CmiAddValueToKey(): Double the size of the value list cell when it is completely filled. This prevents fragmentation if a key got lots of values.
- CmiDeleteValueFromKey(): Fix corruption of the value list cell when a value is removed from the list.
- Rename the variable VBOffset to ValueCellOffset.

svn path=/trunk/; revision=11047
2004-09-25 15:25:28 +00:00
Eric Kohl
1f82196fd5 - Use ROUND_UP macro instead of explicit calculation.
- Replace fixed values by appropriate constants.
- Replace STATUS_UNSUCCESSFUL by better status codes.

svn path=/trunk/; revision=11046
2004-09-25 12:11:13 +00:00
Gé van Geldorp
95210d36ee - Round up requested amount of memory instead of down
- Simplify space check, old version didn't work because of signed/unsigned issues

svn path=/trunk/; revision=11045
2004-09-25 08:58:44 +00:00
Gé van Geldorp
79c3ba475a SeAccessCheck() returns TRUE on success
svn path=/trunk/; revision=11044
2004-09-25 08:49:06 +00:00
Filip Navara
ee3726520d - Remove duplicate SPI_* definitions.
svn path=/trunk/; revision=11043
2004-09-25 08:21:12 +00:00
Filip Navara
d8db49d056 - Remove duplicate definitions and redundant header file.
svn path=/trunk/; revision=11042
2004-09-25 08:20:16 +00:00
Martin Fuchs
5ee46f4794 compareType refactoring
svn path=/trunk/; revision=11041
2004-09-25 07:55:31 +00:00
Art Yerkes
0089446cc6 cm/regfile.c, ldr/init.c, ldr/loader.c: OBJ_CASE_INSENSITIVE patch I proposed
on the list.  This makes the registry, and dll loading case insensitive when
we are on a case preserving filesystem.

ntoskrnl/ex/power.c: My own contributions to the poweroff message list.

ntoskrnl/mm/npool.c: Fixed bit-rot in whole page alloc.  That's how i found
the bug below.

se/semgr.c, lib/rtl/sd.c:
semgr, when creating a SECURITY_DESCRIPTOR, anded the PRESENT and DEFAULT
flags rather than oring them for group, dacl, and sacl, leading to
RtlLengthSecurityDescriptor giving the wrong length to sdcache.  When
sdcache would copy the security descriptor, it would be too short, and
the bound check from the whole-page allocator would go off.  I fixed this
and made rtl/sd.c use the ROUND_UP macro and RtlLengthSid.  This is cleaner.
It may not be completely correct yet but it no-longer truncates security
descriptors into the cache, which means that the Owner, Group and etc
SIDs should now actually work right when coming from the cache, no matter
what happens in the heap.  They probably seemed to work before simply
because they trashed the ends of their blocks and never moved in the
cache.

svn path=/trunk/; revision=11040
2004-09-25 06:41:16 +00:00
Art Yerkes
906e734ab4 Changed functions RtlClearAllBits and RtlSetAllBits to use SizeOfBitMap
as the number of bits, not the number of bytes in the bitmap.  This was
making the whole page allocator in ntoskrnl/mm/npool.c crash early in
the boot process with whole page allocations on.  This may affect other
things adversely as well.

The documentation for RtlInitializeBitMap is here:
http://www.osronline.com/ddkx/kmarch/k109_5sfm.htm

svn path=/trunk/; revision=11039
2004-09-25 03:20:16 +00:00
Thomas Bluemel
9e91360716 1. implemented GetThreadSelectorEntry()
2. added missing DESCRIPTOR_TABLE_ENTRY structure

svn path=/trunk/; revision=11037
2004-09-24 20:55:58 +00:00
Gé van Geldorp
29df1f045e You can't wait for 0 objects
svn path=/trunk/; revision=11036
2004-09-24 20:26:43 +00:00
Thomas Bluemel
4d0a1d7cea don't skip the detection code
svn path=/trunk/; revision=11035
2004-09-24 20:20:46 +00:00
Thomas Bluemel
9dfe6f1d9c enabled the Wizard97 style
svn path=/trunk/; revision=11034
2004-09-24 20:18:16 +00:00
Eric Kohl
01aff80376 Enable wizard 97 style and add a dummy progress page.
svn path=/trunk/; revision=11033
2004-09-24 18:52:29 +00:00
Thomas Bluemel
109dc19c13 added stub for ObFindHandleForObject() and export it
svn path=/trunk/; revision=11031
2004-09-24 16:18:28 +00:00
Filip Navara
ec73e88d5f - Remove duplicate definitions.
svn path=/trunk/; revision=11030
2004-09-24 16:13:21 +00:00
Gé van Geldorp
df80dc6da3 Implement PathIsCharValidA/W
svn path=/trunk/; revision=11029
2004-09-24 15:17:20 +00:00
Filip Navara
c9da2445aa - Don't validate parents after sending the WM_ERASEBKGND message.
- Fix support for SWP_NOREDRAW flag in SetWindowPos.

svn path=/trunk/; revision=11028
2004-09-24 15:07:38 +00:00
Eric Kohl
78e1dba27f Close the bootlog key if value enumeration or writing to the log file fails.
svn path=/trunk/; revision=11027
2004-09-24 15:00:34 +00:00
Gé van Geldorp
361d78ab88 Merge back commit from winehq
svn path=/trunk/; revision=11026
2004-09-24 12:13:54 +00:00
Gé van Geldorp
b92ba82e5f - SHGetAppCompatFlags() takes 4 bytes of parameters
- QueryInterface will return NULL for the new pointer if it fails

svn path=/trunk/; revision=11025
2004-09-24 11:12:44 +00:00
Eric Kohl
97037edf6b - Print correct ReactOS version in the boot log header.
- Add ntoskrnl.exe and hal.dll to the boot log.

svn path=/trunk/; revision=11024
2004-09-24 10:51:35 +00:00
Art Yerkes
102c8c9a78 Initialize ext so that MCLFREE will be called appropriately.
This macro was freeing (m)->m_data, but m was not a macro parameter.
It compiled because virtually every mbuf * is named m.  Fixed.

svn path=/trunk/; revision=11023
2004-09-24 04:58:17 +00:00
Art Yerkes
d7a6bf353f Also wait in the success, no data case in socket state change.
svn path=/trunk/; revision=11022
2004-09-24 00:56:39 +00:00
Art Yerkes
2c75d67c33 Fix send function as well to properly deallocate the irp on failure on
MmProbeAndLockPages.

svn path=/trunk/; revision=11021
2004-09-24 00:51:31 +00:00
Thomas Bluemel
2eb5ead6ed implemented GetUserDefaultUILanguage()
svn path=/trunk/; revision=11020
2004-09-24 00:36:14 +00:00
Thomas Bluemel
5b552386bc don't attempt to reference NULL objects in NtIsProcessInJob()
svn path=/trunk/; revision=11019
2004-09-23 22:02:39 +00:00
Thomas Bluemel
b50f152bc1 implemented NtIsProcessInJob()
svn path=/trunk/; revision=11018
2004-09-23 21:23:34 +00:00
Emanuele Aliberti
bf3b5cc677 Emanuele Aliberti <ea@reactos.com>
- Some stubs for ts moved in process/session.c.
- Implemented ProcessIdToSessionId.

svn path=/trunk/; revision=11017
2004-09-23 21:01:23 +00:00
Art Yerkes
b0f758cf33 tcp: print error when we can't allocate a bucket.
event: Don't report eof if we have bytes to deliver still.
       Made a mistake moving statuses around.  Requeue the request on
       STATUS_PENDING.

svn path=/trunk/; revision=11016
2004-09-23 20:51:46 +00:00
Art Yerkes
e91d1416ab Write: print bytes returned so we can see it.
Read : notify ourselves that the buffer is empty and reset the pointers.
Tdi  : since the handler part is an inner function, don't return from it
       but instead set Status and return afterward.

svn path=/trunk/; revision=11015
2004-09-23 20:48:40 +00:00
Gé van Geldorp
0a185bdb18 Sync to Wine:
Alexandre Julliard <julliard@winehq.org>
- Store all information about the current dll in a structure instead of
  using global variables to make it easier to reuse the parsing
  routines.
- Added native mode dll support (based on a patch by Marcus Meissner).
- Added support for building a dll from a .def file for cases where we
  don't want to write a full .spec.
- Renamed --spec option to --dll for consistency.
- Removed the Unicode exe modes, and instead detect automatically which
  mode to use based on the existence of main or wmain.
- Automatically detect whether the entry point is main or WinMain
  instead of depending on the subsystem type.
- Do not strip stdcall decoration in spec files.
- Print a warning when DllRegisterServer and similar functions are not
  marked private.
- Fill in the proper offsets in the resource directory instead of
  relying on the compiler to do it.
Jukka Heinonen <jhei@iki.fi>
- Remove support for generating interrupt handlers.
- DPMI programs now handle pending events.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix proc name reported in delay load failure.
Richard Cohen <richard@daijobu.co.uk>
- Remove . from default library search path.
Eric Pouech <pouech-eric@wanadoo.fr>
- added size information about most of the generated thunks (import,
  16/32 relay...)
- marked the wine thunks by inserting specific symbols (to be managed
  by wine's dbghelp)
- removed the stabs generation:
  + mostly used by winedbg, and the previous item will replace it for
    dbghelp
  + still broken for gdb anyway
- enhanced const correctness
Pierre d'Herbemont <stegefin@free.fr>
- Detection of .size instruction.
- Detection of the assembler name prefix.
- Delayed import fix for Darwin and PowerPC Host.
- Be more accurate on Darwin stack size.
- Delay import fix on PowerPC hosts.
Marcus Meissner <meissner@suse.de>
- Use "LD" instead of "ld" in winebuild to be able to use a different ld
  or ld options.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Add a few missing __ASM_NAME macros.

svn path=/trunk/; revision=11014
2004-09-23 20:27:30 +00:00
Casper Hornstrup
219e1cea20 2004-09-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/msafd/makefile (TARGET_CFLAGS): Don't define DBG.
	* lib/msafd/include/debug.h: Redefine ASSERT.

svn path=/trunk/; revision=11013
2004-09-23 20:05:32 +00:00
Thomas Bluemel
f9de66edba remove implemented stubs
svn path=/trunk/; revision=11011
2004-09-23 19:03:26 +00:00
Thomas Bluemel
8fd7d74051 fixed returning a wrong handle count in GetProcessHandleCount()
svn path=/trunk/; revision=11010
2004-09-23 19:01:38 +00:00
Thomas Bluemel
3d915100ab fixed initialization of the object attributes in CreateJobObjectW()
svn path=/trunk/; revision=11009
2004-09-23 18:55:18 +00:00
Thomas Bluemel
808e28016e implemented OpenJobObjectA/W() - untested though
svn path=/trunk/; revision=11008
2004-09-23 18:46:10 +00:00
Martin Fuchs
c39da650dd work around GCC's wide string constant bug
svn path=/trunk/; revision=11007
2004-09-23 18:37:57 +00:00
Thomas Bluemel
51c36121e9 implemented CreateJobObjectA/W() - untested though
svn path=/trunk/; revision=11006
2004-09-23 18:31:51 +00:00
Thomas Bluemel
b85ef6c64a implemented IsProcessInJob(), AssignProcessToJobObject(), QueryInformationJobObject(), SetInformationJobObject() and TerminateJobObject(), all untested though
svn path=/trunk/; revision=11005
2004-09-23 18:02:19 +00:00
Royce Mitchell III
04c8adbef9 add some debug output
svn path=/trunk/; revision=11004
2004-09-23 18:00:29 +00:00
Thomas Bluemel
1c5a999278 export job functions
svn path=/trunk/; revision=11003
2004-09-23 17:03:59 +00:00
Thomas Bluemel
08dea69da5 forgot to add job access rights
svn path=/trunk/; revision=11002
2004-09-23 16:53:25 +00:00
Thomas Bluemel
dcea0ecb49 proper job access mapping
svn path=/trunk/; revision=11001
2004-09-23 16:31:21 +00:00
Martin Fuchs
62c06f1198 encode &quot; and &apos;
svn path=/trunk/; revision=11000
2004-09-23 16:09:15 +00:00
Art Yerkes
d774499bf8 event.c: Don't infinite loop while completing a zero-length read.
tcp.c: Correctly pass on length in recv.

svn path=/trunk/; revision=10999
2004-09-23 14:16:27 +00:00
Royce Mitchell III
0dbb29fa23 small fix to OskitDumpBuffer() - each line should display the address of it's first byte, not the address of the beginning of the dump...
svn path=/trunk/; revision=10998
2004-09-23 12:43:49 +00:00
Royce Mitchell III
2c63cbebbc new version of OskitDumpBuffer() that shows ascii characters, too, for easier debugging
svn path=/trunk/; revision=10997
2004-09-23 12:36:19 +00:00
Eric Kohl
6e00d9b507 Implement boot logging. Add /BOOTLOG to the command line to enable boot logging.
svn path=/trunk/; revision=10996
2004-09-23 11:27:58 +00:00
Art Yerkes
d0135b1184 Fixed the way send and recv are called and return errors.
added some printing.
dllmains: adjusted printing.

svn path=/trunk/; revision=10995
2004-09-23 08:16:16 +00:00
Gé van Geldorp
18318e6e17 Steven Edwards <steven_ed4153@yahoo.com>
- Remove some unneeded include statements.

svn path=/trunk/; revision=10994
2004-09-23 06:48:09 +00:00
Art Yerkes
51580f3182 Fixes: Lock does not need to acquire a spinlock in the non-passive-level
case because we can't contend with outselves in passive level.
Realized subtle bug in select.

Select needs a referenced file object rather than a handle.  Will change
this when i get time.

svn path=/trunk/; revision=10993
2004-09-23 06:42:16 +00:00
Art Yerkes
36cc9bb181 Main changes: reimported uipc_socket.c which had lots of differences with
freebsd.
Fixed: OskitTCPReceive.  Now rely exclusively on uio as suggested.

svn path=/trunk/; revision=10992
2004-09-23 06:39:16 +00:00
Royce Mitchell III
bb9e009623 forgot to save workspace before commiting. removed directory from include path that was only meant to be temporary
svn path=/trunk/; revision=10991
2004-09-23 03:13:35 +00:00
Royce Mitchell III
438e4eae22 oskittcp can now be built with vs6
svn path=/trunk/; revision=10990
2004-09-23 03:02:29 +00:00
Martin Fuchs
696d3bd2b6 remove wStringTableOffset
svn path=/trunk/; revision=10989
2004-09-22 23:00:24 +00:00
Martin Fuchs
8e81012956 configuration dialog to choose between MDI and SDI mode with persistent storage
svn path=/trunk/; revision=10988
2004-09-22 22:57:00 +00:00
Thomas Bluemel
40637ed24b initialize the job management and export PsJobType
svn path=/trunk/; revision=10987
2004-09-22 22:31:46 +00:00
Steven Edwards
ba27e813a3 Fix building mdi test on MS_VC and Mingw
svn path=/trunk/; revision=10986
2004-09-22 22:25:13 +00:00
Steven Edwards
3cf59b7b6c Fix building dnsquery test on MS_VC and Mingw
svn path=/trunk/; revision=10985
2004-09-22 22:13:56 +00:00
Gé van Geldorp
4170c2ae26 Henning Gerhardt <henning.gerhardt@web.de>
- Minor fixes and updates to the German resource files.
Marcelo Duarte <wine-devel@bol.com.br>
- French translation and other adjustments.
- Update localization for Portuguese language.
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.
- Added Italian resources.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated the Spanish shell32 translation and made some corrections to
  other language files.

svn path=/trunk/; revision=10984
2004-09-22 20:50:30 +00:00
Thomas Bluemel
594cfc6a04 1. fixed RtlValidSecurityDescriptor() that attempted to validate nonexisting owner/group SID
2. implemented RtlValidRelativeSecurityDescriptor()

svn path=/trunk/; revision=10983
2004-09-22 20:16:02 +00:00
Steven Edwards
c92d7b8a36 Fix building for building on both Mingw and MS_VC.
svn path=/trunk/; revision=10982
2004-09-22 19:53:14 +00:00
Gé van Geldorp
dab159a4de Robert Shearman <rob@codeweavers.com>
- GetWindowLong -> GetWindowLongPtr.

svn path=/trunk/; revision=10981
2004-09-22 19:46:52 +00:00
Gé van Geldorp
5a585fd014 Ulrich Czekalla <ulrich@codeweavers.com>
- When we send out a notification to a registered window with
  SHCNRF_NewDelivery, we should send a LPNOTIFICATIONLIST and the
  process id of the caller.

svn path=/trunk/; revision=10980
2004-09-22 19:38:54 +00:00
Gé van Geldorp
c2678bf64e Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=10979
2004-09-22 19:24:14 +00:00
Gé van Geldorp
b49b939efd Stefan Leichter <Stefan.Leichter@camLine.com>
- Moved stub of Control_FillCache_RunDLL from ascii to unicode.

svn path=/trunk/; revision=10978
2004-09-22 19:13:36 +00:00
Gé van Geldorp
f505dd6839 Merge back commit from winehq.
Mike McCormack <mike@codeweavers.com>
- Use Heap function in preference to malloc/free.

svn path=/trunk/; revision=10977
2004-09-22 18:47:39 +00:00
Gé van Geldorp
2e87325d12 Huw Davies <huw@codeweavers.com>
- Change dialogs to use MS Shell Dlg rather than Helv or MS Sans Serif.

svn path=/trunk/; revision=10976
2004-09-22 18:10:57 +00:00
Royce Mitchell III
b608a8ac83 don't zero out OtcpEvent structure from InitOskitTCP(), because it has already been initialized at this point. Also added a check for null to avoid crash in ifa_ifwithnet()
svn path=/trunk/; revision=10975
2004-09-22 17:41:52 +00:00
Thomas Bluemel
bebf5b5e5e 1. added EJOB structure
2. implemented PsGetProcessJob(), PsGetJobLock(), PsGetJobSessionId() and PsGetJobUIRestrictionsClass()

svn path=/trunk/; revision=10974
2004-09-22 14:53:26 +00:00
Royce Mitchell III
cd3894b51d clean up/simplify 'type' command some more and don't append command-terminating carriage-return to the output buffer.
svn path=/trunk/; revision=10973
2004-09-22 13:55:07 +00:00
Royce Mitchell III
540291d651 replace problematic stack variable in OskitTCPSend() with properly allocated mbuf, and get rid of a redundant memcpy() in OskitTCPReceiveDatagram().
svn path=/trunk/; revision=10972
2004-09-22 13:35:11 +00:00
Thomas Bluemel
3c9fc0f8ce accidently changed the @unimplemented marks
svn path=/trunk/; revision=10971
2004-09-22 10:58:06 +00:00
Thomas Bluemel
c436cba1b9 don't be silent when calling unimplemented functions
svn path=/trunk/; revision=10970
2004-09-22 10:49:07 +00:00
Thomas Bluemel
6c07abd294 implemented CheckNameLegalDOS8Dot3A/W()
svn path=/trunk/; revision=10969
2004-09-22 09:31:01 +00:00
Gé van Geldorp
2b9416f467 Robert Shearman <rob@codeweavers.com>
- Share version information between DllGetVersion and resource file.

svn path=/trunk/; revision=10968
2004-09-22 05:08:04 +00:00
Gé van Geldorp
9fcfe5a590 Juan Lang <juan_lang@yahoo.com>
- If a folder contains a desktop.ini, check it for the icon location
  before using the default folder icon.

svn path=/trunk/; revision=10967
2004-09-21 22:14:38 +00:00
Thomas Bluemel
cbfc9645ec implemented GetSystemRegistryQuota()
svn path=/trunk/; revision=10966
2004-09-21 22:08:18 +00:00
Thomas Bluemel
5f701004c0 fixed definition of the SYSTEM_REGISTRY_QUOTA_INFORMATION structure
svn path=/trunk/; revision=10965
2004-09-21 22:07:38 +00:00
Thomas Bluemel
1f2ec88e90 implemented GetProcessHandleCount()
svn path=/trunk/; revision=10964
2004-09-21 21:53:45 +00:00
Gé van Geldorp
63b36d9681 Francois Gouget <fgouget@codeweavers.com>
- Fix CSIDL_COMMON_{STARTMENU,PROGRAMS,DESKTOPDIRECTORY} so they all use
  paths in 'All Users' like CSIDL_COMMON_STARTUP.
  The CSIDL_COMMON_PROGRAMS fix solves many menu creation problems.

svn path=/trunk/; revision=10963
2004-09-21 21:13:49 +00:00
Gé van Geldorp
664942baf9 Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Don't leak cache imagelists on exit.

svn path=/trunk/; revision=10962
2004-09-21 20:48:02 +00:00
Gé van Geldorp
ffa3b3d7fd Match whitespace to winehq
svn path=/trunk/; revision=10961
2004-09-21 19:44:19 +00:00
Gé van Geldorp
2ff29d7662 Juan Lang <juan_lang@yahoo.com>
- Correct return value in a couple of error cases.
Marcus Meissner <marcus@jet.franken.de>
- Marked some functions in debughlp as static.
- Do not use REFIID as return, but IID*.

svn path=/trunk/; revision=10960
2004-09-21 19:38:17 +00:00
Gé van Geldorp
a867629b4f Juan Lang <juan_lang@yahoo.com>
- Correct some PIDL types and eliminate some magic numbers in PIDL
  allocation; correct a copy-pasto from a previous patch.

svn path=/trunk/; revision=10959
2004-09-21 19:34:21 +00:00
Thomas Bluemel
e831b21339 implemented CreateMemoryResourceNotification() and QueryMemoryResourceNotification(), but only the kernel32 part
svn path=/trunk/; revision=10958
2004-09-21 19:17:26 +00:00
Gé van Geldorp
d0fa47278d Sync to winehq
svn path=/trunk/; revision=10957
2004-09-21 19:11:35 +00:00
Gé van Geldorp
e74c23bc36 We have our own tray code
svn path=/trunk/; revision=10956
2004-09-21 19:02:01 +00:00
Gé van Geldorp
af135d8b9b Juan Lang <juan_lang@yahoo.com>
- Add stub for ShellDDEInit to let Windows explorer.exe get past the
  beginning.
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Delete the about dialog font when the dialog is closed.
Juan Lang <juan_lang@yahoo.com>
- Added support for DLLVERSIONINFO2 in DllGetVersion.

svn path=/trunk/; revision=10955
2004-09-21 18:55:53 +00:00
Gé van Geldorp
4ac1e6a310 Mike McCormack <mike@codeweavers.com>
- Update path from relative path on loading.

svn path=/trunk/; revision=10954
2004-09-21 18:14:15 +00:00
Thomas Bluemel
bd7af734b8 implemented IsDBCSLeadByte() and IsDBCSLeadByteEx()
svn path=/trunk/; revision=10953
2004-09-21 17:41:24 +00:00
Art Yerkes
fa965094ed Fixed tcptest to not do send recv or close on a socket that's not connected.
This keeps the user from doing something inappropriate.
makefile: add -g back in

svn path=/trunk/; revision=10952
2004-09-21 04:06:15 +00:00
Royce Mitchell III
6f6e411eef bcopy()'s arguments are different order than memcpy()
svn path=/trunk/; revision=10951
2004-09-21 04:00:14 +00:00
Gé van Geldorp
822b8e1a47 Francois Gouget <fgouget@free.fr>
- Make Unicode const strings static so they are not copied to the stack
  each time we enter the function.
Aric Stewart <aric@codeweavers.com>
- In IPersistFile_Save if the exe file is not found, trust the path we
  are given and allow creation of the link.
- Make sure exePath contains the path since it is used later in the
  function as well.
Ge van Geldorp <gvg@reactos.com>
- Match whitespace to winehq

svn path=/trunk/; revision=10950
2004-09-20 21:39:04 +00:00
Hartmut Birr
093f4a09c5 - Implemented the loading of drivers according to the order
of the tag entries in the GroupOrderList key.

svn path=/trunk/; revision=10949
2004-09-20 19:47:25 +00:00
Gé van Geldorp
c9ece8cfa5 Maxime Belleng� <maxime.bellenge@laposte.net>
- Add the IAutoComplete and IAutoComplete2 implementation (but methods
  stubbed for now).

svn path=/trunk/; revision=10948
2004-09-20 19:47:14 +00:00
Gé van Geldorp
6eb55219c8 Merge back commits from winehq
Maxime Bellenge <maxime.bellenge@laposte.net>
- Add the IAutoComplete and IAutoComplete2 implementation (but methods
  stubbed for now).

svn path=/trunk/; revision=10947
2004-09-20 18:55:21 +00:00
Gé van Geldorp
dfd4f0156b Francois Gouget <fgouget@free.fr>
- Fix some field names in CSFV and QCMINFO.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.

svn path=/trunk/; revision=10946
2004-09-20 18:45:00 +00:00
Gé van Geldorp
5a384553bd Robert Shearman <rob@codeweavers.com>
- Add exports for missing ordinals 191-194.
- Stub for SHUpdateImageW.

svn path=/trunk/; revision=10945
2004-09-20 18:32:33 +00:00
Gé van Geldorp
6382d705ab Francois Gouget <fgouget@free.fr>
- Don't export the shell32 SHAllocShared functions by name.
  Implement them by calling out their shlwapi equivalent (which had a
  much more complete implementation anyway).
- Fix the prototype of shlwapi's SHAllocShared().
- Don't crash if lpvData is NULL in SHAllocShared().
- Add a conformance test to shlwapi.

svn path=/trunk/; revision=10944
2004-09-20 18:29:10 +00:00
Gé van Geldorp
cccdc00157 Fork a small change which has little change of being accepted by winehq
svn path=/trunk/; revision=10943
2004-09-20 18:08:37 +00:00
Gé van Geldorp
322da3c44c Vincent Beron <vberon@mecano.gme.usherb.ca>
- Don't hardcode c:\windows paths in msi.dll.
Huw Davies <huw@codeweavers.com>
- Unicodify a load of strings.

svn path=/trunk/; revision=10942
2004-09-20 18:07:54 +00:00
Hartmut Birr
553993dcd2 - Implemented the driver loading by the sequence of tag entries in the GroupOrderList key.
svn path=/trunk/; revision=10941
2004-09-20 18:02:36 +00:00
Hartmut Birr
b23fa198a6 - Added the 'GroupOrderList' key.
- Added entries for some scsi port drivers.
- Added the tag key for the atapi driver.

svn path=/trunk/; revision=10940
2004-09-20 17:57:46 +00:00
Gé van Geldorp
f634e3c46c Return status code
svn path=/trunk/; revision=10939
2004-09-20 17:55:16 +00:00
Gé van Geldorp
67f1b8f671 Martin Fuchs <martin-fuchs@gmx.net>
- make drive letters in PIDLs always uppercase to enable PIDL
  comparison
- Unicodify _ILCreateDrive()

svn path=/trunk/; revision=10938
2004-09-20 17:47:49 +00:00
Gé van Geldorp
e4f5d86770 Martin Fuchs <martin-fuchs@gmx.net>
Return "file not found" error values instead of E_INVALIDARG if
_ILCreateFromPathA() failed to find files.

svn path=/trunk/; revision=10936
2004-09-20 17:42:57 +00:00
Royce Mitchell III
cd1222eced initialize fields that sosend() expects to have valid values
svn path=/trunk/; revision=10935
2004-09-20 15:47:03 +00:00
Gé van Geldorp
db2f0db5f7 Martin Fuchs <martin-fuchs@gmx.net>
- make drive letters in PIDLs always uppercase to enable PIDL
  comparison
- Unicodify _ILCreateDrive()

svn path=/trunk/; revision=10934
2004-09-20 15:36:07 +00:00
Gé van Geldorp
56dec0d9ee Merge back commit from winehq
svn path=/trunk/; revision=10933
2004-09-20 15:07:21 +00:00
Gé van Geldorp
91923bdc1d Mike McCormack <mike@codeweavers.com>
- Clean up messy comment in SHFileOperation.
- Reduce the number of goto labels in SHFileOperation by one.

svn path=/trunk/; revision=10932
2004-09-20 14:52:47 +00:00
Gé van Geldorp
88a015f877 Vitaliy Margolen <wine-patch@kievinfo.com>
- IShellFolder::CompareIDs - return only -1/0/1 in lower 16 bit.

svn path=/trunk/; revision=10931
2004-09-20 14:45:07 +00:00
Gé van Geldorp
8985a9b088 Alexandre Julliard <julliard@winehq.org>
- Don't define BEGIN_INTERFACE in unknwn.h.
Francois Gouget <fgouget@free.fr>
- Add #define COBJMACROS where needed in Wine.
Juan Lang <juan_lang@yahoo.com>
- IShellView seems reasonably complete, change a FIXME to a TRACE to
  speed up open/save dialogs.

Merge back commits from winehq

svn path=/trunk/; revision=10930
2004-09-20 14:38:30 +00:00
Gé van Geldorp
0785062c81 Alexandre Julliard <julliard@winehq.org>
- Get rid of the non-standard ICOM_DEFINE macro.
- Get rid of the non-standard ICOM_VFIELD macro.
- Get rid of the non-standard ICOM_VTABLE macro.
- Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
  macro.
- Removed some more uses of the non-standard ICOM_THIS macro.

svn path=/trunk/; revision=10929
2004-09-20 09:18:52 +00:00
Gé van Geldorp
f7f21544a4 Remove incorrect assert. An APC can be queued to the attached environment,
as long as it is delivered before KeDetachProcess() is called.

svn path=/trunk/; revision=10928
2004-09-20 08:17:44 +00:00
Art Yerkes
2d1b661aa1 Implemented MCLGET for reactos, not dependent on either bsd or oskit
facilities.

svn path=/trunk/; revision=10927
2004-09-20 05:03:28 +00:00
Art Yerkes
03fea0db7d Royce Mitchell pointed out that we could eliminate these ifdefs if we don't
use a uio, and that the uio is not needed because an mbuf can't be partially
accepted.

svn path=/trunk/; revision=10926
2004-09-20 04:18:45 +00:00
Royce Mitchell III
10adf2be06 sosend( ) will not process mbuf if you pass it a uio (according to arty)
svn path=/trunk/; revision=10925
2004-09-20 04:13:46 +00:00
Gé van Geldorp
5124ae5f88 Fix copy/paste error
svn path=/trunk/; revision=10924
2004-09-19 22:07:40 +00:00
Gé van Geldorp
b22290537c Francois Gouget <fgouget@free.fr>
- Moved declarations from undocshell.h to shlobj.h to match the latest
  platform SDK.

svn path=/trunk/; revision=10923
2004-09-19 22:02:28 +00:00
Royce Mitchell III
2613fbbeb9 added 'type' command
svn path=/trunk/; revision=10922
2004-09-19 15:55:35 +00:00
Thomas Bluemel
17cd1043bb 1. implemented SetProcessWorkingSetSize()
2. fixed Set/GetPriorityClass() not to call csrss and use NtSet/QueryInformationProcess() instead

svn path=/trunk/; revision=10921
2004-09-19 14:36:47 +00:00
Thomas Bluemel
b912ada645 don't memcpy TIME structures to FILETIME structures
svn path=/trunk/; revision=10920
2004-09-19 12:45:55 +00:00
Martin Fuchs
fb19ab485e remove explorer references
svn path=/trunk/; revision=10919
2004-09-19 12:33:17 +00:00
Martin Fuchs
00bbf934b7 added Wine translations for winefile:
es.rc, fr.rc, hu.rc, it.rc, nl.rc, pt.rc, ru.rc, si.rc, zh.rc
Thanks to Sylvain Petreolle <spetreolle@yahoo.fr>

svn path=/trunk/; revision=10918
2004-09-19 12:23:31 +00:00
Hartmut Birr
035b22b542 - Call MmFreeSectionSegments if the Bcb reference count is zero (in CcRosReleaseFileCache).
svn path=/trunk/; revision=10917
2004-09-19 12:11:44 +00:00
Gé van Geldorp
06bac7f0b9 Avoid crash
svn path=/trunk/; revision=10916
2004-09-19 11:25:43 +00:00
Gé van Geldorp
510df619d2 Sync to Wine-20040914
svn path=/trunk/; revision=10915
2004-09-19 11:15:58 +00:00
Gé van Geldorp
0645493981 Sync to Wine-20040914:
Robert Reif <reif@earthlink.net>
- Don't try to find alternate formats for non PCM formats.

svn path=/trunk/; revision=10913
2004-09-19 11:13:17 +00:00
Gé van Geldorp
601c767280 Sync to Wine-20040914:
David Kredba <kredba@ibot.cas.cz>
- Added Czech resources.
Robert Reif <reif@earthlink.net>
- Remove wine specific DRV_QUERYDSOUNDGUID message and calculate it in
  dsound.dll (like in 2k/xp).
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix an obvious typo leading to a crash.
Alexandre Julliard
- Function parameters don't need WINE_UNUSED.
Eric Pouech <pouech-eric@wanadoo.fr>
- Implemented the mmTask* functions.

svn path=/trunk/; revision=10912
2004-09-19 11:07:39 +00:00
Emanuele Aliberti
976020b12d .cvsignore updated.
svn path=/trunk/; revision=10911
2004-09-19 10:48:43 +00:00
Gé van Geldorp
7a8404b20f Sync to Wine-20040914:
Hans Leidekker <hans@it.vu.nl>
- Dutch resource translation.
Alexandre Julliard
- Removed some uses of the non-standard ICOM_THIS macro.
- Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
  macro.
Mike McCormack <mike@codeweavers.com>
- Fix some -Wsigned-compare warnings.
- Don't read past end of table in PathFileExistsDefExtW.
- Use the ACP define in MB/WC conversion functions.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implement SHSimulateDrop, MIME_GetExtensionA/W, StrCpyNXA/W,
  SHAnsiToAnsi, SHUnicodeToUnicode.
Francois Gouget <fgouget@free.fr>
- Don't export the shell32 SHAllocShared functions by name.
- Implement them by calling out their shlwapi equivalent (which had a
  much more complete implementation anyway).
- Fix the prototype of shlwapi's SHAllocShared().
- Don't crash if lpvData is NULL in SHAllocShared().
- Add a conformance test to shlwapi.
- Assorted spelling fixes.
Diego Petten= <dgp85@users.sourceforge.net>
- Add support for file:/// urls in PathCreateFromUrl.
- Add support in UrlIs() for URLIS_DIRECTORY and URLIS_FILEURL flags.
James Hawkins <truiken@gmail.com>
- Fix buffer overflow in PathSetDlgItemPathW that led to a trashed
  stack.

svn path=/trunk/; revision=10910
2004-09-19 10:46:48 +00:00
Gé van Geldorp
77b4d47ea6 Sync to Wine-20040914:
Mike McCormack <mike@codeweavers.com>
- Avoid non-standard types in rpcdcep.h.
Alexandre Julliard:
- Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
  macro.
- Removed some uses of the non-standard ICOM_THIS macro.
Francois Gouget <fgouget@free.fr>
- Fix and unify parsing of calling conventions.
- Hack handling of 'struct { } *NDR_SCONTEXT;' so we don't cause a parse
  error as this is a valid C construct.
- Generate type tests for rpcrt4.
- Remove PRPC_BINDING_VECTOR and PUUID_VECTOR, they don't exist on
  Windows.
- Fix the MIDL_STUB_MESSAGE, MIDL_SERVER_INFO and
  MIDL_STUBLESS_PROXY_INFO structs.
- Add NDR_ALLOC_ALL_NODES_CONTEXT, NDR_POINTER_QUEUE_STATE and
  CS_STUB_INFO.

svn path=/trunk/; revision=10909
2004-09-19 10:35:24 +00:00
Gé van Geldorp
414bb6e2c0 Sync to Wine-20040914:
Mike McCormack <mike@codeweavers.com>
- Use buffers rather than linked lists for input and out buffers.
- Stop reading input at a nul byte.
Evan Deaubl <wine@warpedview.com>
- Stop processing input stream when the outermost RTF group is closed.

svn path=/trunk/; revision=10908
2004-09-19 10:28:59 +00:00
Gé van Geldorp
95fadd5bb4 Sync to Wine-20040914:
Huw Davies <huw@codeweavers.com>
- Change dialogs to use MS Shell Dlg rather than Helv or MS Sans Serif.
David Kredba <kredba@ibot.cas.cz>
- Added Czech resources.

svn path=/trunk/; revision=10907
2004-09-19 10:24:48 +00:00
Gé van Geldorp
5693a82971 Sync to Wine-20040914:
Alexandre Julliard:
- Added recursive idl target to allow updating idl files private to a
  dll.
- Get rid of the non-standard ICOM_THIS macro.
- Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
  macro.
- Inline functions don't need WINE_UNUSED.
- Don't define BEGIN_INTERFACE in unknwn.h.
Mike McCormack <mike@codeweavers.com>
- Fix some warnings found with -Wsign-compare.
Francois Gouget <fgouget@free.fr>
- Move the PROPVARIANT declaration from objidl.idl to propidl.idl.
- Move related API declarations from individual C files to propidl.idl.
- Remove uneeded include of propidl.h in the propvariant.c test.
Robert Shearman <rob@codeweavers.com>
- Fix PropVariantCopy for VT_LPSTR and VT_LPWSTR.
- Test case VT_BSTR, VT_LPSTR and VT_LPWSTR.
- Fix PropVariantClear to reject invalid types.
- Don't crash on NULL pointers.
- Add test case.

svn path=/trunk/; revision=10906
2004-09-19 10:20:48 +00:00
Gé van Geldorp
07a136b6e9 Sync to Wine-20040914:
Hans Leidekker <hans@it.vu.nl>
- Dutch resource translation.

svn path=/trunk/; revision=10905
2004-09-19 10:08:06 +00:00
Gé van Geldorp
6a086fc044 Sync to Wine-20040914:
Hans Leidekker <hans@it.vu.nl>
- Dutch resource translation.
David Kredba <kredba@ibot.cas.cz>
- Added Czech resources.

svn path=/trunk/; revision=10904
2004-09-19 10:07:26 +00:00
Gé van Geldorp
6dfffdb082 Sync to Wine-20040913:
Huw Davies <huw@codeweavers.com>
- Change dialogs to use MS Shell Dlg rather than Helv or MS Sans Serif.
- Fix printer selection in PD_PRINTSETUP type dialogs.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Use "MS Shell Dlg" in the Open File dialog templates as in Windows
- Resize child dialog when its controls are moved relatively stc32
  "magic" control.
- Y coordinate of the "magic" static control should be treated
  inclusively.
Jacek Caban <jack@itma.pwr.wroc.pl>
- Polish translation update.
Rein Klazes <rklazes@xs4all.nl>
- Fix a crash saving a file without file name extension and without
  extension filter.
Hans Leidekker <hans@it.vu.nl>
- Fix signed/unsigned comparison warnings.
Alexandre Julliard
- Removed some uses of the non-standard ICOM_THIS macro.
- Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
  macro.
- Get rid of the non-standard CONV_POINT and CONV_RECT functions.

svn path=/trunk/; revision=10903
2004-09-19 10:03:26 +00:00
Gé van Geldorp
a795a4185c Sync to Wine-20040913:
Robert Shearman <rob@codeweavers.com>
- Add 16x16 error, info and warning icons.
- Replace GetWindowLong by GetWindowLongPtr.
- Implement insert marks.
- Rearrange TOOLBAR_INFO.
- Clear data structure after dragging.
- WM_SETCURSOR does not need to be handled as it is not sent whilst
  the window is captured.
- Make uDragListMessage non-static so that we can re-use it
  elsewhere.
- Set class hbrBackground and style to the same as native.
- Set hbrBackground class property to same value as native.
- Use Unicode window functions instead of ANSI.
- Always redraw dialog on changing between pages.
- Set hbrBackground class property to same value as native.
- Remove no longer needed WM_ERASEBKGND handler.
- Use Unicode window functions instead of ANSI.
- Make customization list boxes into drag list boxes.
- Order available buttons in the same way as the native version.
- Obey TBCDRF_NOOFFSET for the button text.
- Make anchor highlighting behave more like native version.
- Don't recalculate toolbar in TOOLBAR_Unkwn460.
- Obey WM_SETREDRAW for the WM_ERASEBKGND message as well as
  WM_PAINT.
- TB_MARKITEM should redraw button.
- Send NM_LDOWN notification.
- NM_RDBLCLK only needs to send a NMHDR structure.
- On mouse notifications returning 0 DefWndProc should be called.
- Fix regression with IE's Menu Bar.
- Implement insert marks.
- Rearrange TOOLBAR_INFO.
- Fix anchor highlighting.
- Remove redundant test in TOOLBAR_DrawButton.
- Status update.
- Remove no longer valid comment.
- Minor coding style cleanups.
- Implement titles.
Hans Leidekker <hans@it.vu.nl>
- Fix signed/unsigned comparison warnings.
Ulrich Czekalla <ulrich@codeweavers.com>
- Forward focus to combobox, otherwise edit control won't get focus.
- The rectangle passed in DRAWITEMSTRUCT is slightly too large as
  compared with Windows.
- Clear tooltip when text is set to NULL.
- Repaint tooltip when item info changes.
Kevin Koltzau <kevin@plop.org>
- Fix bug with chained messages.
- Make SetWindowSubclass behave with SetWindowLong subclasses.
- Allow unlimited number of subclasses.
- Correct issue when SendMessage is called from within a subclass proc.
- Add regression test.
Huw Davies <huw@codeweavers.com>
- Change dialogs to use MS Shell Dlg rather than Helv or MS Sans Serif.
David Kredba <kredba@ibot.cas.cz>
- Added Czech resources.
Vitaliy Margolen <wine-patch@kievinfo.com>
- Send correct tracing notification messages.
Michael Stefaniuc <mstefani@redhat.de>
- Fix hotspot handling
- Remove unused flag from the InternalDrag struct.
Filip Navara <xnavara@volny.cz>
- Status update.
- Fix resizing of wizards.
- Fill the area next to watermark bitmap with window color and subclass
  exterior wizard pages to suppress drawing background.
- Correct displaying of wizard subtitle.
- Do not distinguish exterior wizard pages by their position, but
  instead expect that every page in wizard that doesn't have header is
  exterior.
- Move the property sheet resizing code from PROPSHEET_CreatePage to
  PROPSHEET_SetCurSel. It needs to be executed on every page change
  because the application can modify it during the notifications.
- Draw the Wizard97 header bitmaps before drawing the header strings.
- Center the header bitmap of the new Wizard97 correctly.
- Display the correct wizard title for any wizard type and do not
  change it for reqular property sheets.
- Fix loading wizard title and subtitle from resources.
Mike McCormack <mike@codeweavers.com>
- Calculate the correct size of dialog templates in the propsheet
  control.
Zach Gorman <zach@archetypeauction.com>
- OK button should be default in non-wizard property sheets.
- Propsheet pages need WS_EX_CONTROLPARENT style.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- CreateDCA -> CreateDCW
Vitaliy Margolen <wine-patch@kievinfo.com>
- Make sure TreeView gets redrawn after calling EnsureVisible.

svn path=/trunk/; revision=10902
2004-09-19 09:50:06 +00:00
Gé van Geldorp
4319f1c249 Sync to Wine-20040914:
Hans Leidekker <hans@it.vu.nl>
- Fix signed/unsigned comparison warnings.

svn path=/trunk/; revision=10901
2004-09-19 09:18:36 +00:00
Gé van Geldorp
5d5247de81 Prepare for syncing to Wine-20040914
svn path=/trunk/; revision=10900
2004-09-19 09:11:12 +00:00
Gé van Geldorp
ac1e392aec Fix insertion of APCs where the target thread is attached to another process
svn path=/trunk/; revision=10899
2004-09-18 19:43:00 +00:00
Magnus Olsen
767ca4f4ac fix some compilings warings when you using some optimze settings in gcc compiler
env.c: In function `RtlDestroyEnvironment':
env.c:108: warning: dereferencing type-punned pointer will break strict-aliasing rules
env.c: In function `RtlSetEnvironmentVariable':
env.c:347: warning: dereferencing type-punned pointer will break strict-aliasing rules
env.c:393: warning: dereferencing type-punned pointer will break strict-aliasing rules

svn path=/trunk/; revision=10898
2004-09-18 09:31:53 +00:00
Magnus Olsen
c98cf6b15e fix some compilings warings
svn path=/trunk/; revision=10897
2004-09-18 07:25:53 +00:00
Magnus Olsen
e1dbb4b414 fix last compilings warings from this file.
svn path=/trunk/; revision=10896
2004-09-18 07:10:14 +00:00
Magnus Olsen
b743a5f954 fix last compilings warings from this file.
svn path=/trunk/; revision=10895
2004-09-17 18:37:37 +00:00
Magnus Olsen
5a3f530e45 fix last compilings warings from this file.
svn path=/trunk/; revision=10894
2004-09-17 18:19:52 +00:00
Magnus Olsen
9a099491c4 fix last compilings warings from this file.
svn path=/trunk/; revision=10893
2004-09-17 18:12:17 +00:00
Magnus Olsen
94bcb6fe25 fix last compilings warings from this file.
svn path=/trunk/; revision=10892
2004-09-17 17:54:46 +00:00
Magnus Olsen
a99b01ff0c fix some compings warings not all yet
svn path=/trunk/; revision=10891
2004-09-17 17:47:14 +00:00
Magnus Olsen
7a1f8074b5 fix some compings warings not all yet
svn path=/trunk/; revision=10890
2004-09-17 17:31:08 +00:00
Martin Fuchs
25547e2d8c Handle "." and ".." as special direcory names and move them at the very first beginning of directory listings
svn path=/trunk/; revision=10888
2004-09-17 16:56:46 +00:00
Art Yerkes
1c08e25544 Userland test for lan.sys
svn path=/trunk/; revision=10887
2004-09-17 16:07:41 +00:00
Art Yerkes
77700375d6 Interface for lan.sys
svn path=/trunk/; revision=10886
2004-09-17 15:51:52 +00:00
Art Yerkes
83fc2a9406 Removed arp.h until the arp part is finished.
svn path=/trunk/; revision=10885
2004-09-17 15:51:07 +00:00
Art Yerkes
885107a541 lan.sys is a simple driver providing access to ndis. This stuff is
ripped from tcpip.sys in preparation for a big breakup.

svn path=/trunk/; revision=10884
2004-09-17 15:50:16 +00:00
Gé van Geldorp
865a63875c Restore old DBG and KDBG defaults
svn path=/trunk/; revision=10883
2004-09-17 14:48:20 +00:00
Magnus Olsen
74d54596e4 fix small spelling fault
svn path=/trunk/; revision=10882
2004-09-17 09:25:10 +00:00
Gé van Geldorp
6c4737effa Get rid of .edf files
svn path=/trunk/; revision=10881
2004-09-16 21:31:50 +00:00
Magnus Olsen
01926b2642 my small change to config to add optimze build for a cpu
did break build for shm
it  did need small change in makefile for lpc  now it works agein

sorry all

svn path=/trunk/; revision=10880
2004-09-16 19:22:12 +00:00
Magnus Olsen
f9b6a686e0 my small change to config to add optimze build for a cpu
did break build for nptest
it  did need small change in makefile for lpc  now it works agein

sorry all

svn path=/trunk/; revision=10879
2004-09-16 19:20:57 +00:00
Magnus Olsen
475dcac67e my small change to config to add optimze build for a cpu
did break build for mstest
it  did need small change in makefile for lpc  now it works agein

sorry all

svn path=/trunk/; revision=10878
2004-09-16 19:19:34 +00:00
Magnus Olsen
1106a16497 my small change to config to add optimze build for a cpu
did break build for lpc
it  did need small change in makefile for lpc  now it works agein

sorry all

svn path=/trunk/; revision=10877
2004-09-16 18:47:20 +00:00
Magnus Olsen
e75c574ed1 In config add switch OARCH for optimze build for the cpu you want
for rule.mak
remove hardcoding of optimze build for cpu.
-march=i486 to -march=$(OARCH)

svn path=/trunk/; revision=10876
2004-09-16 17:35:33 +00:00
Gé van Geldorp
8523764fef Add forceifhung flag
svn path=/trunk/; revision=10875
2004-09-16 12:46:43 +00:00
Martin Fuchs
21784c13af add shell32.a
svn path=/trunk/; revision=10874
2004-09-16 12:02:49 +00:00
Eric Kohl
9f8dc789cf Implement NtQueryDefaultUILanguage, NtQueryInstallUILanguage and NtSetDefaultUILanguage.
svn path=/trunk/; revision=10873
2004-09-16 11:47:18 +00:00
Eric Kohl
1672f6069e Sort entries and remove duplicates.
svn path=/trunk/; revision=10872
2004-09-16 11:46:17 +00:00
Gé van Geldorp
d3275bbd8b Get rid of .edf files
svn path=/trunk/; revision=10871
2004-09-16 10:25:18 +00:00
Martin Fuchs
0f892545b8 PaintDesktop(): print system version on desktop background
svn path=/trunk/; revision=10870
2004-09-15 20:53:43 +00:00
Thomas Bluemel
e740fd1758 add function to the header file
svn path=/trunk/; revision=10869
2004-09-15 19:01:23 +00:00
Thomas Bluemel
1388215acb added a few usermode helper functions to work with sparse files
svn path=/trunk/; revision=10868
2004-09-15 18:57:02 +00:00
Thomas Bluemel
bc5e02eafd forgot to commit this file
svn path=/trunk/; revision=10867
2004-09-15 17:06:34 +00:00
Aleksey Bragin
380da77736 Make icon drawing mode corresponding to the current display settings (4,8,16,24,32 bit colors)
By Semyon "Tappak" Novikov.

svn path=/trunk/; revision=10866
2004-09-15 16:03:09 +00:00
Martin Fuchs
57dbd89701 fix RegSetValueEx() call
svn path=/trunk/; revision=10865
2004-09-15 14:25:46 +00:00
Thomas Bluemel
650bd77805 implemented EnableVolumeCompression()
svn path=/trunk/; revision=10864
2004-09-15 13:32:27 +00:00
Martin Fuchs
919419da33 remove direct version output from desktop; instead store the activation flag into the registry
svn path=/trunk/; revision=10863
2004-09-15 10:55:02 +00:00
Martin Fuchs
83a9ed824f add winefile
svn path=/trunk/; revision=10862
2004-09-15 10:16:05 +00:00
Martin Fuchs
384543f280 move winefile into subsys/system
svn path=/trunk/; revision=10861
2004-09-15 10:08:34 +00:00
Hartmut Birr
e3c3fe8e95 - Fixed the length calculation in WriteConsoleOutputAttribute.
svn path=/trunk/; revision=10860
2004-09-14 22:30:56 +00:00
Hartmut Birr
581f980ede - Execute the reset command previous the present test for each unit (master/slave).
svn path=/trunk/; revision=10859
2004-09-14 22:09:06 +00:00
Eric Kohl
5ad00f54e3 - Use Unicode strings instead of WCHAR strings.
- Use FsRtl functions to handle wildcards.

svn path=/trunk/; revision=10858
2004-09-14 21:46:39 +00:00
Gé van Geldorp
5a97f250e7 Check if attached when terminating thread. Suggested by tamlin.
svn path=/trunk/; revision=10857
2004-09-14 18:37:40 +00:00
Thomas Bluemel
7678fed2ef do something in wcsnlen() - but it should be (as strnlen() in this file) not implemented there, just so IsBadStringPtrW() works even though it lacks SEH protection at the moment
svn path=/trunk/; revision=10856
2004-09-14 14:01:25 +00:00
Eric Kohl
4a4dcb92cf Implement SeLockSubjectContext and SeUnlockSubjectContext.
svn path=/trunk/; revision=10855
2004-09-14 11:04:48 +00:00
Thomas Bluemel
2da90fee73 little fix
svn path=/trunk/; revision=10854
2004-09-14 01:30:02 +00:00
Art Yerkes
dff481387d Added WSAStartup.
svn path=/trunk/; revision=10852
2004-09-13 22:59:22 +00:00
Thomas Bluemel
c7f278a12e silence debug message
svn path=/trunk/; revision=10850
2004-09-13 21:37:32 +00:00
Thomas Bluemel
09afb31c28 implemented RtlIpv4AddressToStringA/W and made ntdll export them.
svn path=/trunk/; revision=10848
2004-09-13 20:25:26 +00:00
Gé van Geldorp
2161bebe79 Fix closing of LPC ports
svn path=/trunk/; revision=10847
2004-09-13 19:10:45 +00:00
Jens Collin
32bd722bb4 Fixed small mistake in string handling in my last commit.
svn path=/trunk/; revision=10846
2004-09-13 18:04:09 +00:00
Thomas Bluemel
89c8c187f3 adapted RtlInt64ToUnicodeString() from RtlIntegerToUnicodeString()
svn path=/trunk/; revision=10845
2004-09-13 17:27:23 +00:00
Gé van Geldorp
40016817aa Log error code when freetype fails to initialize
svn path=/trunk/; revision=10844
2004-09-13 17:17:17 +00:00
Thomas Bluemel
30c43d3c95 adapted RtlIntegerToUnicode() from RtlIntegerToChar()
svn path=/trunk/; revision=10843
2004-09-13 16:58:58 +00:00
Eric Kohl
7347219eb4 Rename HANDLE_REP to HANDLE_ENTRY.
svn path=/trunk/; revision=10842
2004-09-13 14:43:50 +00:00
Eric Kohl
b6a00f0a9a RegQueryInfoKeyW returns correct security descriptor size.
svn path=/trunk/; revision=10841
2004-09-13 14:42:37 +00:00
Eric Kohl
44e5201910 - Implement AddAccessAllowedAceEx, AddAccessDeniedAceEx and AddAuditAccessAceEx.
- Add GetCurrentHwProfileW stub.

svn path=/trunk/; revision=10840
2004-09-13 12:14:55 +00:00
Eric Kohl
00443884ee - Return a default security descriptor when someone wants to retrieve the key security.
- Disable debug messages.

svn path=/trunk/; revision=10839
2004-09-13 11:46:07 +00:00
Eric Kohl
f34a907c7a - Fix a typo in RegGetKeySecurity().
- Set missing error values.

svn path=/trunk/; revision=10838
2004-09-13 11:41:26 +00:00
Eric Kohl
14f00f3aeb Implement RegGetKeySecurity.
svn path=/trunk/; revision=10837
2004-09-13 08:51:40 +00:00
Royce Mitchell III
b1958574f7 fix -lstdc++
svn path=/trunk/; revision=10836
2004-09-13 03:14:35 +00:00
Art Yerkes
baa35b140c Fixed -lstdc++.
svn path=/trunk/; revision=10835
2004-09-13 03:12:11 +00:00
Gé van Geldorp
556c9464b6 Make the end a little bit more interesting
svn path=/trunk/; revision=10834
2004-09-12 21:58:01 +00:00
Thomas Bluemel
ba5fcd9590 revert the changes i accidently committed to HEAD
svn path=/trunk/; revision=10831
2004-09-12 19:47:49 +00:00
Gé van Geldorp
d77482d763 Fix external termination of thread while thread is waiting in GetMessage()
svn path=/trunk/; revision=10830
2004-09-12 19:29:23 +00:00
Thomas Bluemel
eed6b713aa rewrote the gdi handle table that behaves similar 2k/XP and works without global locks
svn path=/trunk/; revision=10829
2004-09-12 19:21:08 +00:00
Thomas Bluemel
04ccf93084 reduce debug output
svn path=/trunk/; revision=10828
2004-09-12 18:50:03 +00:00
Jens Collin
5a1180477c Merged with wine. (Fixed const string handling)
svn path=/trunk/; revision=10827
2004-09-12 11:21:30 +00:00
Filip Navara
b7cf80521b - Fix MS2PS rule to work on Windows.
- Include PSEH header in the MS2PS generated files.

svn path=/trunk/; revision=10826
2004-09-12 10:22:31 +00:00
Gé van Geldorp
5334c75998 Add french language to syssetup. Fixes part 2 of bug 401.
Patch by Herv� Poussineau <poussine@freesurf.fr>

svn path=/trunk/; revision=10825
2004-09-12 09:52:48 +00:00
Gé van Geldorp
44d3d874aa Use Wine's language matching algorithm when searching for resources.
Fixes bug 261.

svn path=/trunk/; revision=10823
2004-09-11 17:06:33 +00:00
Eric Kohl
14399d738b - Implement FsRtlLegalAnsiCharacterArray.
- Fix FsRtlDissectDbcs and FsRtlDoesDbcsContainWildCards prototypes.

svn path=/trunk/; revision=10822
2004-09-11 14:49:41 +00:00
Eric Kohl
44c503e1d4 Define LOCALE_SYEARMONTH, DATE_YEARMONTH, DATE_LTRREADING and DATE_RTLREADING.
svn path=/trunk/; revision=10821
2004-09-11 08:48:27 +00:00
Filip Navara
37734f772d - Define NOTHING.
svn path=/trunk/; revision=10820
2004-09-11 03:54:42 +00:00
Filip Navara
6244c47ebf - Define FILE_USE_FILE_POINTER_POSITION and FILE_WRITE_TO_END_OF_FILE.
- Correct prototype of PFAST_IO_UNLOCK_ALL_BY_KEY.

svn path=/trunk/; revision=10819
2004-09-11 03:52:18 +00:00
Filip Navara
4ed49e10fb - Add declaration of FsRtlDissectName.
svn path=/trunk/; revision=10818
2004-09-11 03:51:13 +00:00
Steven Edwards
3585f39f48 We need to import ntdll for DbgPrint
svn path=/trunk/; revision=10817
2004-09-10 23:30:45 +00:00
Steven Edwards
c8686d8770 Added Filips patch allowing for Wine testing output to go to DbgPrint as well as stdout.
svn path=/trunk/; revision=10816
2004-09-10 23:30:23 +00:00
Steven Edwards
bd82ff9f5e Moved interlocked function to rosrtl rather than exporting them from ntdll as windows does not export them from there.
svn path=/trunk/; revision=10815
2004-09-10 23:29:28 +00:00
Steven Edwards
d0cbef2f9f minor bug fix for building with other headers.
svn path=/trunk/; revision=10814
2004-09-10 23:22:22 +00:00
Filip Navara
9a4721af9c Fix the reset sequence in AtapiFindDevices to work correctly in VMware.
svn path=/trunk/; revision=10813
2004-09-10 23:17:45 +00:00
Gé van Geldorp
fb16e656c4 Send CTRL_CLOSE_EVENT to processes attached to a console when that console
is closed. Default handle the event by terminating the process.

svn path=/trunk/; revision=10812
2004-09-10 22:14:52 +00:00
Steven Edwards
5f870e152c removed tests until a proper fix is found.
Sorry about the breakage.

svn path=/trunk/; revision=10811
2004-09-10 15:49:54 +00:00
Steven Edwards
1c6eb466cb Removed the user32 test pending a understanding of how to make our system and Wines play together. It needed to be moved to the user32 module as per Caspers recommendation.
svn path=/trunk/; revision=10810
2004-09-09 23:49:49 +00:00
Steven Edwards
099b821285 These tests pass under ReactOS with curret CVS. Trying to figure out how to make Caspers regression system and Wines system to play nice.
svn path=/trunk/; revision=10809
2004-09-09 23:48:36 +00:00
Hartmut Birr
faaad49380 - Implemented PAE (physical address extension) mapping.
- Added the command line switches /pae and /noexecute for enabling the PAE mapping.

svn path=/trunk/; revision=10808
2004-09-09 20:42:33 +00:00
Hartmut Birr
176e26ac5d - Implemented ExfInterlockedCompareExchange64 and ExfpInterlockedExchange64
svn path=/trunk/; revision=10807
2004-09-09 18:51:17 +00:00
Eric Kohl
a3105b78bf - Use SeQuerySecurityDescriptorInfo() to retrieve an objects security descriptor.
- Disable debug messages.

svn path=/trunk/; revision=10806
2004-09-09 12:20:48 +00:00
Steven Edwards
9071fcfe51 Added user32 regression tests that we pass to the regtests system. Working on reviewing all of the Wine tests we pass and then figuring out a way to merge them in with our testing framework.
svn path=/trunk/; revision=10805
2004-09-09 04:18:30 +00:00
Eric Kohl
b451846efb Add support for setting a security descriptor for a file. Send an
IRP_MJ_SET_SECURITY to the filesystem driver and return
STATUS_SUCCESS if the filesystem driver does not support
this IRP.

svn path=/trunk/; revision=10804
2004-09-08 11:42:56 +00:00
Eric Kohl
539582375e - Fix a typo in NtSetSecurityObject().
svn path=/trunk/; revision=10803
2004-09-08 11:39:59 +00:00
Eric Kohl
1b398faac1 Implement SetFileSecurityA/W.
svn path=/trunk/; revision=10802
2004-09-08 11:36:24 +00:00
Steven Edwards
a19098ac83 Add some resources from Winehq CVS.
svn path=/trunk/; revision=10801
2004-09-07 23:09:54 +00:00
Gé van Geldorp
b1c0463316 Fix compile-time warning, spotted by Sylvain Petreolle <spetreolle@yahoo.fr>
svn path=/trunk/; revision=10800
2004-09-07 14:27:04 +00:00
Eric Kohl
144119a87d Return a security descriptor that grants full access to everyone if a filesystem
driver does not handle IRP_MJ_QUERY_SECURITY.

svn path=/trunk/; revision=10799
2004-09-07 11:51:13 +00:00
Eric Kohl
67e0d5082e IopInvalidDeviceRequest must return STATUS_INVALID_DEVICE_REQUEST.
svn path=/trunk/; revision=10798
2004-09-07 11:48:16 +00:00
Hartmut Birr
d4595781ee - Removed most of the calls to KeAttachProcess/KeDetachProcess.
- Used the kernel map to map page tables from other process's.
  In the future this should be replaced by a per process kernel map (hyperspace map).

svn path=/trunk/; revision=10797
2004-09-07 11:08:16 +00:00
Hartmut Birr
a3d5d79146 - Added the dependency checking for precompiled headers.
svn path=/trunk/; revision=10796
2004-09-07 08:20:06 +00:00
Hartmut Birr
ff08835fad - Replaced the target extension with '.h.gch' if the source extension was '.h'
svn path=/trunk/; revision=10795
2004-09-07 08:14:30 +00:00
Eric Kohl
78d5c83574 Implement GetFileSecurityA/W.
svn path=/trunk/; revision=10794
2004-09-06 22:12:25 +00:00
Thomas Bluemel
ccbc81e0fa 1. make use of precompiled headers everywhere
2. moved some unicode stubs out of the ansi stub file

svn path=/trunk/; revision=10793
2004-09-06 21:15:46 +00:00
Thomas Bluemel
a961785e1d don't copy LARGE_INTEGER structs to FILETIME structs with memcpy, it works but it's confusing as they're different structures that happen to be identical.
svn path=/trunk/; revision=10792
2004-09-06 15:56:25 +00:00
Steven Edwards
b1d9a8f8ff We are not using wpp at this time. We can always add a
more recent copy if we ever need it.

svn path=/trunk/; revision=10791
2004-09-06 15:04:16 +00:00
Eric Kohl
23e7f4df4f Implement ANSI group and item functions.
svn path=/trunk/; revision=10790
2004-09-06 12:00:40 +00:00
Hartmut Birr
873819daac - Check first for an existing directory object in NtCreateDirectoryObject.
svn path=/trunk/; revision=10789
2004-09-05 22:26:17 +00:00
Hartmut Birr
5fa2297ffd - Returned STATUS_OBJECT_NAME_NOT_FOUND if no directory was found in ObReferenceObjectByName.
svn path=/trunk/; revision=10788
2004-09-05 22:25:36 +00:00
Emanuele Aliberti
ad39a9fec5 .cvsignore updated.
svn path=/trunk/; revision=10787
2004-09-05 12:34:25 +00:00
Emanuele Aliberti
55003962a3 Version information added.
.cvsignore updated.

svn path=/trunk/; revision=10786
2004-09-05 12:27:36 +00:00
Art Yerkes
703e2aa5f9 Fixes:
Socket destruction is correct.  When IRPs are left to cancel, the socket
will remain until all pending irps complete.  The DestroySocket function
does this.  It is always safe to call DestroySocket at any time after the
FsContext member of the FileObject has been nulled.

Fixed UDP data delivery in.  UDP send still has a problem but it seems to
be in tcpip.sys more than likely.  I've sliced another 6000 lines out of
tcpip.sys that i will debug as a userspace library and link to tcpip.

Fixed poll reeval (old reported bug fix I hadn't committed yet).

Miscellaneously better sanity in a few rough spots.

svn path=/trunk/; revision=10785
2004-09-05 04:26:30 +00:00
Steven Edwards
2c8687b1a2 disable typedef for socklen_t for the moment.
svn path=/trunk/; revision=10784
2004-09-04 21:44:30 +00:00
Filip Navara
f0120ac1d7 Handle matching of "f0_*.*" expression to "f0_000" file name in FsRtlIsNameInExpression and add relevant regression test.
svn path=/trunk/; revision=10783
2004-09-04 15:02:00 +00:00
Magnus Olsen
67a29489d2 fix compings warings
not all waring have been fix

svn path=/trunk/; revision=10782
2004-09-04 10:51:20 +00:00
Steven Edwards
4074dc813b Added check for socklen_t
svn path=/trunk/; revision=10781
2004-09-03 21:34:48 +00:00
Magnus Olsen
d2e1a6010a fix compings warings
src/types.c: In function `pap_qstring':
src/types.c:99: warning: passing arg 2 of `adns__alloc_interim' as unsigned due to prototype
src/types.c:103: warning: passing arg 3 of `memcpy' as unsigned due to prototype
src/types.c: In function `pap_domain':
src/types.c:352: warning: passing arg 2 of `adns__alloc_interim' as unsigned due to prototype
src/types.c:356: warning: passing arg 3 of `memcpy' as unsigned due to prototype
src/types.c: In function `pap_findaddrs':
src/types.c:422: warning: passing arg 2 of `adns__vbuf_ensure' as signed due to prototype
src/types.c: In function `csp_hostaddr':
src/types.c:573: warning: passing arg 3 of `csp_qstring' as signed due to prototype
src/types.c: In function `icb_ptr':
src/types.c:705: warning: passing arg 3 of `memcmp' as unsigned due to prototype
src/types.c: In function `pa_ptr':
src/types.c:747: warning: passing arg 3 of `memcpy' as unsigned due to prototype
src/types.c:755: warning: passing arg 3 of `memcmp' as unsigned due to prototype
src/types.c:765: warning: passing arg 1 of `htonl' as unsigned due to prototype
src/types.c: In function `pap_mailbox822':
src/types.c:880: warning: passing arg 2 of `adns__alloc_interim' as unsigned due to prototype
src/types.c:881: warning: passing arg 3 of `memcpy' as unsigned due to prototype

svn path=/trunk/; revision=10780
2004-09-03 17:47:29 +00:00
Magnus Olsen
c203723e4f compings warings. and some did have wrong protypes.
0. fix warning: passing arg 1 of `send' as unsigned due to prototype
1. fix warning: passing arg 3 of `memcpy' as unsigned due to prototype
2. fix warning: passing arg 3 of `send' as signed due to prototype
3. fix warning: unused variable `bytes_written'
4. fix warning: dereferencing type-punned
    pointer will break strict-aliasing rules

5. fix warning: dereferencing type-punned
   pointer will break strict-aliasing rules

svn path=/trunk/; revision=10779
2004-09-03 16:49:18 +00:00
Filip Navara
d6740a2c10 - Disable debugging messages.
svn path=/trunk/; revision=10778
2004-09-03 04:44:45 +00:00
Filip Navara
87204d5906 - Revert the I/O port change from my previous patch. I didn't notice we're doing "+ 2" there.
svn path=/trunk/; revision=10777
2004-09-03 04:19:12 +00:00
Filip Navara
2d99115181 Issue soft reset command for identification and not ATAPI reset command which works only for packet based devices like CD-ROM drives and it's use on ATA devices is prohibited by the standard. If an ATAPI device is detected then and only then issue the ATAPI reset command. Also fix the addresses in AtapiClaimHwResources. This might fix bug #406.
svn path=/trunk/; revision=10776
2004-09-03 02:55:50 +00:00
Magnus Olsen
46256f9c81 fix lite more waring when it compiling
svn path=/trunk/; revision=10775
2004-09-03 00:15:04 +00:00
Magnus Olsen
88adadd6c6 fix follow warings msg
Warning: resolving  x by linking to
                DrvCopyContext@12
	DrvCreateContext@4
	DrvCreateLayerContext@8
	DrvDeleteContext@4
	DrvDescribeLayerPlane@20
	DrvDescribePixelFormat@16
	DrvGetLayerPaletteEntries@20
	DrvGetProcAddress@4
	DrvReleaseContext@4
	DrvRealizeLayerPalette@12
	DrvSetContext@12
	DrvSetLayerPaletteEntries@20
	DrvSetPixelFormat@8
	DrvShareLists@8
	DrvSwapBuffers@4
	DrvSwapLayerBuffers@8
	DrvValidateVersion@4

svn path=/trunk/; revision=10774
2004-09-02 23:51:07 +00:00
Magnus Olsen
a40f706f8e change ccflags = -O march=i386 to march=i486
All asm code are writen for i486. so why did we compile it for i386 when it does not work on i386.

svn path=/trunk/; revision=10773
2004-09-02 19:49:44 +00:00
Art Yerkes
198d9eefbc ADNS lib afer eol conversion. Greatlord pointed out that the DOS eols
checked in double when checked out in a certain way on windows.

svn path=/trunk/; revision=10772
2004-09-02 19:03:45 +00:00
Art Yerkes
b880d380cc Added python command app to oskit test.
svn path=/trunk/; revision=10771
2004-09-02 02:33:11 +00:00
Art Yerkes
05cf09a12d Activate dnsapi and adns.
svn path=/trunk/; revision=10770
2004-09-01 23:49:39 +00:00
Filip Navara
0f860fb51e - Disable debugging messages.
svn path=/trunk/; revision=10768
2004-09-01 20:41:07 +00:00
Art Yerkes
8e1426d027 Implement WSHGetWildcardAddress
svn path=/trunk/; revision=10766
2004-09-01 03:39:29 +00:00
Art Yerkes
500044ccc8 Corrected compile error due to different enum used in prototype.
svn path=/trunk/; revision=10765
2004-09-01 02:33:50 +00:00
Art Yerkes
f8b9ad2133 EXT2 should now be allowed in arcnames, etc.
svn path=/trunk/; revision=10764
2004-09-01 00:37:29 +00:00
Filip Navara
d9002d2afe - Allow shared read access to the debug.log file.
svn path=/trunk/; revision=10763
2004-09-01 00:15:08 +00:00
Filip Navara
03d477407b - Don't use ULONG for storing pointers.
svn path=/trunk/; revision=10762
2004-08-31 23:53:40 +00:00
Filip Navara
92b839476c - Don't use ULONG for storing pointers.
svn path=/trunk/; revision=10761
2004-08-31 23:48:02 +00:00
Gé van Geldorp
1d76d6dd93 - Return value of WM_GETTEXTLENGTH is in TCHARs, not in bytes, so there is
no need to convert between Ansi and Unicode (number of characters remains
  the same)
- Allocate Ansi buffer for WM_GETTEXT since MultiByteToWideChar can't handle
  overlapping buffers

svn path=/trunk/; revision=10760
2004-08-31 23:32:01 +00:00
Hartmut Birr
a9bae8fa65 - Removed the member OldProcess from the ETHREAD structure.
svn path=/trunk/; revision=10759
2004-08-31 20:17:18 +00:00
Hartmut Birr
2d0d1ee993 - Allow always shared read for a file which is opened for read only.
svn path=/trunk/; revision=10758
2004-08-31 20:07:06 +00:00
Hartmut Birr
4f6383edcb - Store always offsets on cluster boundaries in FCB->LastOffset.
svn path=/trunk/; revision=10757
2004-08-31 20:02:24 +00:00
Filip Navara
0ebfc36a78 - Fix converting of UTF8 sequences in IntMultiByteToWideCharUTF8.
svn path=/trunk/; revision=10755
2004-08-31 19:54:14 +00:00
Filip Navara
3db1c05c05 - Restoring of character size in VBEResetHw. Patch by Herv� Poussineau.
svn path=/trunk/; revision=10754
2004-08-31 18:28:50 +00:00
Filip Navara
9cc8b8a571 - Use FsRtl routines for wildcard handling.
svn path=/trunk/; revision=10753
2004-08-31 16:08:38 +00:00
Hartmut Birr
b50ad1e5ec - Fixed some wchar to char translations.
svn path=/trunk/; revision=10751
2004-08-31 14:40:50 +00:00
Filip Navara
d4aa975e56 Implement IntWideCharToMultiByteUTF8 since it's needed for saving Explorer configuration. (This change should be ported to the release branch.)
svn path=/trunk/; revision=10748
2004-08-31 07:01:43 +00:00
Filip Navara
67d68774ab - Revise order of PsInitializeThread to insert the thread to the lists after *all* the fields are initialized and while holding the PiThreadListLock lock acquired.
svn path=/trunk/; revision=10747
2004-08-31 06:08:38 +00:00
Steven Edwards
51bdcda011 Removed SeaShell from the tip.
Its in the attic if anyone needs to look at it.

svn path=/trunk/; revision=10746
2004-08-31 02:38:41 +00:00
Filip Navara
37aba5c9fc - Add NET_NIC.inf and syssetup.inf files to bootcd.
svn path=/trunk/; revision=10745
2004-08-30 20:33:36 +00:00
Filip Navara
e78e4ea757 - Close the registry hive file object in CmiInitNonVolatileRegistryHive.
svn path=/trunk/; revision=10744
2004-08-30 19:28:59 +00:00
Art Yerkes
9980d7cf9c Since system services are now provided by the client, we need the
callback struct first.

svn path=/trunk/; revision=10743
2004-08-30 18:12:30 +00:00
Eric Kohl
6277a93862 - Fixed some compiler warnings.
- Detect and report PCI-BIOS.

svn path=/trunk/; revision=10742
2004-08-30 10:53:38 +00:00
Martin Fuchs
3dd13e9ba0 fix tab order
svn path=/trunk/; revision=10741
2004-08-30 06:29:46 +00:00
Martin Fuchs
626e081cd1 Display "ReactOS" instead of "Microsoft Windows NT" for the ROS builded version
svn path=/trunk/; revision=10740
2004-08-30 06:28:54 +00:00
Emanuele Aliberti
d43c07d508 .cvsignore added.
svn path=/trunk/; revision=10739
2004-08-30 05:40:13 +00:00
James Tabor
2173fff654 Added Advpack to build process.
svn path=/trunk/; revision=10738
2004-08-30 04:59:40 +00:00
James Tabor
9f62d71a84 First implementation of advpack.dll.
svn path=/trunk/; revision=10737
2004-08-30 04:49:03 +00:00
Art Yerkes
5f189314eb Test app for oskittcp. Takes datagrams by UDP and send any replies to the
last host/port that contacted it.  I intend to use it to finish isolating
bugs in the main body of tcpip.sys and oskittcp interface.

svn path=/trunk/; revision=10736
2004-08-30 04:47:34 +00:00
Aleksey Bragin
e43bc9a08b Added WintrustAddActionID stub.
Added CRYPT_REGISTER_ACTIONID struct
Added CRYPT_TRUST_REG_ENTRY struct.z ` By Semyon "Tappak" Novikov.

svn path=/trunk/; revision=10735
2004-08-29 20:47:18 +00:00
Art Yerkes
aa3eb8fc7c Oskit can now be linked from userland. This is part one of my plan.
tcpip: provide malloc + free, sleep + wakeup functions
oskittcp: remove functions and headers that imply km and supply them from the
user.
tcp_usrreq: i was printing a possibly free mbuf here.

svn path=/trunk/; revision=10734
2004-08-29 20:04:42 +00:00
Art Yerkes
e78fa73912 This patch adds actually informative messages about what went wrong loading
the registry entries for NLS files, etc.

svn path=/trunk/; revision=10733
2004-08-29 18:29:48 +00:00
Thomas Bluemel
cb968187d0 silence debug messages
svn path=/trunk/; revision=10732
2004-08-29 15:50:53 +00:00
Thomas Bluemel
bc95cf8c84 implemented SetProcessPriorityBoost() and GetProcessPriorityBoost() (only the kernel32 part)
svn path=/trunk/; revision=10731
2004-08-29 14:46:02 +00:00
Thomas Bluemel
001b020926 mark GetSystemWindowsDirectory() as implemented as it does exactly the same as GetWindowsDirectory()
svn path=/trunk/; revision=10730
2004-08-29 12:12:34 +00:00
Filip Navara
a48983fc6d - Use ULONG_PTR instead of ULONG for integer arithmetics on pointers.
svn path=/trunk/; revision=10729
2004-08-28 22:22:39 +00:00
Filip Navara
28c8c91905 - Implement file sharing checks.
svn path=/trunk/; revision=10728
2004-08-28 22:19:12 +00:00
Filip Navara
3a31604b7d - Mapping zero-sized files is prohibited.
svn path=/trunk/; revision=10727
2004-08-28 22:18:24 +00:00
Filip Navara
f81fb98e23 - Simplify CreateFileMapping[AW].
- Fix return value of GlobalReAlloc and GlobalUnlock.

svn path=/trunk/; revision=10726
2004-08-28 22:16:27 +00:00
Filip Navara
b1f6932d44 - RtlReAllocateHeap shouldn't allocate memory if ptr == NULL.
svn path=/trunk/; revision=10725
2004-08-28 22:14:08 +00:00
Filip Navara
034e605634 - Change GlobalDiscard and LocalDiscard to macros.
svn path=/trunk/; revision=10724
2004-08-28 22:09:53 +00:00
Filip Navara
e97f806718 - Simplified version of _lcreat.
svn path=/trunk/; revision=10723
2004-08-28 22:08:54 +00:00
Filip Navara
9008b900fe - Fix handling of INVALID_HANDLE_VALUE case in FindNextFile.
svn path=/trunk/; revision=10722
2004-08-28 22:07:51 +00:00
Filip Navara
20ab7d6b27 - Remove invalid code from CreateToolhelp32Snapshot.
svn path=/trunk/; revision=10721
2004-08-28 22:06:02 +00:00
Gé van Geldorp
16034df8e6 Prevent crash when a thread is terminated while sending a cross-thread
message

svn path=/trunk/; revision=10719
2004-08-28 15:01:46 +00:00
Eric Kohl
5dda152b8d Use '$Windows NT$' signature because setupapi doesn't accept '$ReactOS$' yet.
svn path=/trunk/; revision=10718
2004-08-28 12:42:19 +00:00
Eric Kohl
0251ddf48c - Add preliminary wizard page title and subtitle string resources.
- Use setupapi functions to process syssetup.inf.

svn path=/trunk/; revision=10717
2004-08-28 11:08:50 +00:00
Gé van Geldorp
0d89489d43 Remove NASM_CMD definition since it is already correctly defined in the
top level rules.mak

svn path=/trunk/; revision=10716
2004-08-28 07:27:22 +00:00
James Tabor
1f00798a4b Cvs ingnore file added.
svn path=/trunk/; revision=10715
2004-08-27 23:10:13 +00:00
James Tabor
7f32d07583 Port of Msiexec from Wine.
svn path=/trunk/; revision=10714
2004-08-27 23:08:00 +00:00
James Tabor
e51ac8f476 Port Wine Msiexec to ROS.
svn path=/trunk/; revision=10713
2004-08-27 22:54:29 +00:00
Gé van Geldorp
1f0d87df05 Change nasm to nasmw (to match what's used in the reactos module)
svn path=/trunk/; revision=10712
2004-08-27 20:38:24 +00:00
Art Yerkes
ad74693225 This adds a rule which will trigger automatic conversion between msvc
style and pseh syntactically.  Name any file that should be converted
as foo_msvc.c and put foo.o in TARGET_OBJECTS and the file will be
preprocessed.

I asked some opinions about the naming and everyone seems ok with it.

svn path=/trunk/; revision=10711
2004-08-27 18:24:28 +00:00
Aleksey Bragin
fbd1a52cdf Wintrust lib stub (not imported from Wine). By Semyon "Tappak" Novikov.
svn path=/trunk/; revision=10709
2004-08-27 12:10:27 +00:00
Aleksey Bragin
d4c39be9ba Header file for wintrust lib. By Semyon "Tappak" Novikov.
svn path=/trunk/; revision=10708
2004-08-27 12:06:29 +00:00
Hartmut Birr
1a80e84bb2 - Establish the pde's for the callback stack if the stack was recycled from the list.
svn path=/trunk/; revision=10705
2004-08-27 10:25:46 +00:00
Hartmut Birr
16a24538c2 - Establish the pde for the thread structure within the process
before a switch to the process occurs.

svn path=/trunk/; revision=10704
2004-08-27 10:24:04 +00:00
Filip Navara
aa00673d45 - Complete rewrite of environment variable handling to get rid of memory leaks, heap corruption and spurious pointers.
- Remove some ancient Wine stuff that either wasn't used or didn't work.
- Fix realloc to not call HeapReAlloc for allocating new memory.

svn path=/trunk/; revision=10703
2004-08-27 03:08:23 +00:00
Gregor Anich
0f59361d11 Do not call HalReleaseDisplayOwnership when KDB is entered and screen debugging is not enabled. After an exception the screen will not turn blue but will freeze and be un-frozen when KDB is left (cont) I hope this can not damage old monitors if the card starts producing garbage signals when the driver is suspended - in VMWare it works well.
svn path=/trunk/; revision=10702
2004-08-27 00:14:01 +00:00
Magnus Olsen
2d8bef8799 fix
some waring msg  when it being compile

svn path=/trunk/; revision=10701
2004-08-26 21:08:06 +00:00
Gé van Geldorp
7f48b18098 Bump version number to 0.2.5
svn path=/trunk/; revision=10700
2004-08-26 21:05:42 +00:00
Robert Kopferl
509a299316 changed back to CVS, false br
svn path=/trunk/; revision=10698
2004-08-26 20:36:11 +00:00
Robert Kopferl
9e24ae99ae changed to RC1
svn path=/trunk/; revision=10697
2004-08-26 20:24:40 +00:00
Hartmut Birr
df72452da1 - Changed -Wno-strict-aliasing to -fno-strict-aliasing.
- Reduced optimisation from -O6 to -O3.

svn path=/trunk/; revision=10696
2004-08-26 19:55:20 +00:00
Magnus Olsen
5b63ba578e fix
some waring msg  when it being compile

svn path=/trunk/; revision=10695
2004-08-26 19:53:37 +00:00
Magnus Olsen
7eaa01f5e9 fix
some waring msg  when it being compile
type
redefinition of `LPCOLESTR16'
redefinition of `OLECHAR16'
redefinition of `LPOLESTR16'

svn path=/trunk/; revision=10693
2004-08-26 16:48:46 +00:00
Gregor Anich
87bdedbed2 Change stabs handling of KDB - does no longer allocate a block of memory for each stub entry, instead each .sym file is loaded completely into (non-paged) memory.
svn path=/trunk/; revision=10692
2004-08-26 16:04:50 +00:00
Hartmut Birr
66ff876aa8 - Implemented GetACP() and GetOEMCP().
svn path=/trunk/; revision=10691
2004-08-26 16:03:09 +00:00
Hartmut Birr
3b571ec48d - Added more nls files.
svn path=/trunk/; revision=10690
2004-08-26 16:01:26 +00:00
Magnus Olsen
41b885d24d fix
waring msg  when it being compile

svn path=/trunk/; revision=10689
2004-08-26 15:11:50 +00:00
Gé van Geldorp
9dc1445d4c If SendMessageTimeout() times out, GetLastError() should return 0
svn path=/trunk/; revision=10688
2004-08-26 12:29:37 +00:00
Magnus Olsen
e90a1b168c fix
ntoskrnl so it can be compile with optimze -O2 or higher

svn path=/trunk/; revision=10687
2004-08-26 11:58:33 +00:00
Gé van Geldorp
5b3ce7b494 Fix MSVCRT compile-time error due to duplicate symbol definition
svn path=/trunk/; revision=10686
2004-08-26 07:54:47 +00:00
Gregor Anich
e9706d1315 Change <GL\\gl.h> to "GL/gl.h" include.
svn path=/trunk/; revision=10685
2004-08-26 02:04:48 +00:00
Gregor Anich
94ec82db25 Fix GL/glu.h include...
svn path=/trunk/; revision=10684
2004-08-26 01:54:03 +00:00
Gregor Anich
94d6abb6d2 Fix GL/gl.h include for cross-compiling from linux.
svn path=/trunk/; revision=10683
2004-08-26 01:52:06 +00:00
Gé van Geldorp
93b57832ce Avoid arithmetic overflow
svn path=/trunk/; revision=10682
2004-08-25 22:31:01 +00:00
Casper Hornstrup
6fa3492ab7 2004-08-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/cdmake/cdmake.c: Error out if extension is too long.

svn path=/trunk/; revision=10681
2004-08-25 20:47:22 +00:00
Gregor Anich
a8e8bea6fa Disable SSE - When Mesa with SSE enabled is ran in ReactOS/VMWare it crashes with SIGILL.
svn path=/trunk/; revision=10680
2004-08-25 20:20:09 +00:00
Gregor Anich
ca451d1442 Add OpenGL to the user libraries (glu32, mesa32, opengl32)
svn path=/trunk/; revision=10679
2004-08-25 15:58:12 +00:00
Filip Navara
1e7841a2e8 - Implement CcRepinBcb and CcGetFileObjectFromBcb.
- Partially implement CcUnpinRepinnedBcb, CcPinMappedData,
  CcPinRead, CcPreparePinWrite, CcInitializeCacheMap (Art Yerkes)
  and CcUninitializeCacheMap.
- Fix ReadCacheSegmentChain to handle correctly big request and
  check for MDL request memory overflow.
- Allow passing NULL BCB to CcSetFileSizes.
- Ensure that registry files are opened using lowercase file names.

svn path=/trunk/; revision=10678
2004-08-25 15:08:29 +00:00
Filip Navara
b8648c7bf4 - Do not depend on paths returned by FileNameInformation requests to be NULL terminated.
svn path=/trunk/; revision=10677
2004-08-25 15:04:19 +00:00
Filip Navara
e877ccfb63 - Fix masking out the write flags in IoCheckShareAccess and IoSetShareAccess.
svn path=/trunk/; revision=10676
2004-08-25 15:01:48 +00:00
Gregor Anich
cfc4008f6b Mesa version 6.1 import - Forgot the new Makefile/def file
svn path=/trunk/; revision=10675
2004-08-25 12:43:28 +00:00
Gregor Anich
d0f74a3f67 Mesa version 6.1 import.
svn path=/trunk/; revision=10674
2004-08-25 12:35:24 +00:00
Hartmut Birr
c56daa8b92 - Fixed the back-space-handling in ConioWriteConsole.
svn path=/trunk/; revision=10673
2004-08-25 10:37:14 +00:00
Filip Navara
2f4838080b Fix compilation with GCC 3.4.x
svn path=/trunk/; revision=10672
2004-08-24 18:27:53 +00:00
Filip Navara
0e272062f2 - Add definition of LOCALE_IDEFAULTMACCODEPAGE.
svn path=/trunk/; revision=10671
2004-08-24 17:36:15 +00:00
Filip Navara
489265e774 - Load also the last font file in the font directory.
svn path=/trunk/; revision=10670
2004-08-24 17:29:00 +00:00
Filip Navara
df072d8e25 - Always use non-antialiased font for consoles.
- Minor correction to multibyte character conversion for GUI consoles.
- Support for non-ENABLE_PROCESSED_OUTPUT and non-ENABLE_WRAP_AT_EOL_OUTPUT modes in ConioWriteConsole.
- Other minor fixes to get Wine Kernel32 Console test working.

svn path=/trunk/; revision=10669
2004-08-24 17:25:17 +00:00
Filip Navara
5e458f6f4e - Implementation of GetCPFileNameFromRegistry, GetNlsSectionName and IsValidCodePage.
- Partial implementation of MultiByteToWideChar and WideCharToMultiByte.
- Cleanup buffer allocation in some console functions.

svn path=/trunk/; revision=10668
2004-08-24 17:21:12 +00:00
Filip Navara
29fc781674 - Fix Get[System/Window]Directory[AW] for Buffer == NULL case.
- Fix return value of GetDriveType[AW].

svn path=/trunk/; revision=10667
2004-08-24 17:15:42 +00:00
Filip Navara
ccec5bfedd - Remove dereferencing non-referenced FileObject in error cases.
svn path=/trunk/; revision=10666
2004-08-24 17:08:18 +00:00
Filip Navara
aaa5aaec7e - Fix NtQueryDirectoryObject for empty directories.
svn path=/trunk/; revision=10665
2004-08-24 17:07:27 +00:00
Gé van Geldorp
1230297d02 Add shutdown registry entries
svn path=/trunk/; revision=10664
2004-08-24 09:43:33 +00:00
Hartmut Birr
b78c2817c4 - Check if the given address points into a valid section (in MmUnmapViewOfSection).
- Check if the section isn't deleted straight (in MmUnmapViewOfSection).

svn path=/trunk/; revision=10663
2004-08-23 22:29:43 +00:00
Gé van Geldorp
e208613f37 Implement ConvertSidToStringSidA/w
svn path=/trunk/; revision=10662
2004-08-23 21:16:26 +00:00
James Tabor
a380ffb184 Fixed import unicode names from remote processes.
svn path=/trunk/; revision=10661
2004-08-23 14:28:29 +00:00
Hartmut Birr
34e45ee1c2 - Enabled the declaration of DbgPrint because they is used in DPRINT and CHECKPOINT macros.
svn path=/trunk/; revision=10660
2004-08-22 21:06:36 +00:00
Hartmut Birr
868756af46 - Fixed the compilation as unicode.
- Search only for the file name directly if the name contains a known extension.
- Don't add an extension if the file name contains a known extension.

svn path=/trunk/; revision=10659
2004-08-22 20:55:15 +00:00
Filip Navara
4af77c2b3c - Implement ReadConsoleInputW, PeekConsoleInputW, ReadConsoleOutputW, WriteConsoleOutputW, SetConsoleIcon and GetConsoleWindow.
- Fix input peeking in CSRSS to not return fake events.

svn path=/trunk/; revision=10658
2004-08-22 20:52:28 +00:00
Filip Navara
cce0fb451f - More complete implementation of CharUpperA.
svn path=/trunk/; revision=10657
2004-08-22 20:51:57 +00:00
Filip Navara
270129d009 - Implement NtNotifyChangeDirectoryFile.
- Honour ApcRoutine and ApcContext parameters of NtQueryDirectoryFile.

svn path=/trunk/; revision=10656
2004-08-22 20:51:43 +00:00
Hartmut Birr
1b391b9333 - Fixed the compilation as unicode.
svn path=/trunk/; revision=10655
2004-08-22 20:47:20 +00:00
Hartmut Birr
2f1ea7feae - Added '-Werror' to the compiler options.
svn path=/trunk/; revision=10654
2004-08-22 20:37:05 +00:00
Hartmut Birr
df7a301805 - Fixed some 'dereferencing type-punned pointer will break strict-aliasing rules'
warnings on higher optimisation levels.

svn path=/trunk/; revision=10653
2004-08-22 20:32:32 +00:00
Hartmut Birr
adc7fbb548 - Fixed some pointer increments/decrements.
svn path=/trunk/; revision=10652
2004-08-22 20:13:44 +00:00
Mike Nordell
15ffb673df Safety added to trace output.
svn path=/trunk/; revision=10651
2004-08-22 18:49:11 +00:00
Art Yerkes
c24ef8433f AFD: Fixed handling of cancelling in flight requests when closing the socket.
Closing a socket doesn't crash but still hangs.  Needs work.
oskittcp: corrected problem with send data, trying out slightly different
scheme of dealing with closed socket.
tcpip: added support for SEL_FIN in socket state callback and corrected
support for returning error in TCPReceiveData.

svn path=/trunk/; revision=10650
2004-08-22 18:42:42 +00:00
Art Yerkes
36d2e136c7 Fixed missing unlock in write.
svn path=/trunk/; revision=10649
2004-08-22 02:15:57 +00:00
Mike Nordell
2496ef39ee Fix misplaced STDCALL
svn path=/trunk/; revision=10648
2004-08-21 21:20:08 +00:00
Mike Nordell
c373c9ebb1 Make inline assembler compilable using VC
svn path=/trunk/; revision=10647
2004-08-21 21:14:59 +00:00
Mike Nordell
96b46798d8 Wrong path in comment.
svn path=/trunk/; revision=10646
2004-08-21 21:13:45 +00:00
Mike Nordell
0d5eda7a62 Fix misplaced STDCALL
svn path=/trunk/; revision=10645
2004-08-21 21:09:39 +00:00
Mike Nordell
7095fe07cd Fix misplaced STDCALL
svn path=/trunk/; revision=10644
2004-08-21 20:55:41 +00:00
Mike Nordell
b7e51fe08f Fix arithmetics on void.
svn path=/trunk/; revision=10643
2004-08-21 20:47:28 +00:00
Mike Nordell
cb6798f145 Fix arithmetics on void.
svn path=/trunk/; revision=10642
2004-08-21 20:42:10 +00:00
Mike Nordell
03e25a0998 Fix misplaced STDCALL calling convention specifiers.
svn path=/trunk/; revision=10641
2004-08-21 20:40:27 +00:00
Mike Nordell
1c43621083 Fix import/export linkage mismatches.
svn path=/trunk/; revision=10640
2004-08-21 20:18:07 +00:00
Mike Nordell
f04772cf3e Make code portable to compilers with SEH.
svn path=/trunk/; revision=10639
2004-08-21 20:05:35 +00:00
Art Yerkes
8da48834d5 Fixed eols for pp directives, honor original eols.
svn path=/trunk/; revision=10638
2004-08-21 19:59:52 +00:00
Gé van Geldorp
7f5aece68d Implement EnumDesktopsA/W and EnumWindowStationsA, rewrite of
EnumWindowStationsW

svn path=/trunk/; revision=10637
2004-08-21 19:50:39 +00:00
Art Yerkes
a48867230f Respect line breaks in the original code, making it easier to compare.
svn path=/trunk/; revision=10636
2004-08-21 19:49:22 +00:00
Hartmut Birr
9995491445 - Made the partition list movable if it is necessary.
svn path=/trunk/; revision=10635
2004-08-21 19:30:12 +00:00
Hartmut Birr
0ebfb773cb - Check for a valid layout buffer entry in xHalIoAssignDriveLetters.
svn path=/trunk/; revision=10634
2004-08-21 19:13:22 +00:00
Mike Nordell
fca2504ae6 Linkage specification correctly placed.
svn path=/trunk/; revision=10633
2004-08-21 19:04:47 +00:00
Mike Nordell
dc4796ce53 Make the code legal C (89)
svn path=/trunk/; revision=10632
2004-08-21 19:03:04 +00:00
Mike Nordell
e5c5aaadd2 fix import/export linkage for declaration of MmSystemRangeStart
svn path=/trunk/; revision=10631
2004-08-21 18:45:01 +00:00
Mike Nordell
0804fde9a5 fix misplaced STDCALL
svn path=/trunk/; revision=10630
2004-08-21 15:34:32 +00:00
Mike Nordell
818dcf2277 stop wasting power at shutdown
svn path=/trunk/; revision=10629
2004-08-21 15:29:08 +00:00
Mike Nordell
0f057d10d9 make code C89-compilable again
svn path=/trunk/; revision=10628
2004-08-21 13:21:44 +00:00
Mike Nordell
7ab9404fc9 fix definition of EVENT_TRACE_HEADER
svn path=/trunk/; revision=10627
2004-08-21 13:20:25 +00:00
Mike Nordell
65c3f8c5a6 fix placement of STDCALL for function declarations
svn path=/trunk/; revision=10626
2004-08-21 12:34:58 +00:00
Mike Nordell
51b6704c3b fix placement of STDCALL for function declarations
svn path=/trunk/; revision=10625
2004-08-21 12:12:35 +00:00
Filip Navara
3d98b86904 - Maintain higher internal precision during font rendering.
- Honour bitmap->bitmap_left while rendering.

svn path=/trunk/; revision=10624
2004-08-21 02:22:45 +00:00
Filip Navara
d76b781f65 Minor optimalization to handle allocation algorithm.
svn path=/trunk/; revision=10623
2004-08-20 23:46:21 +00:00
Gé van Geldorp
261286187f Implement NtUserBuildNamesList()
svn path=/trunk/; revision=10622
2004-08-20 22:38:49 +00:00
Gé van Geldorp
847119b3cd Use MmCopyFrom/ToCaller to transfer data in NtQueryDirectoryObject, also
lock list when traversing it

svn path=/trunk/; revision=10621
2004-08-20 22:38:10 +00:00
Filip Navara
b71178e84e - NtQuerySection should check for SECTION_QUERY access right and not SECTION_MAP_READ.
- Fix prototype of NtExtendSection.

svn path=/trunk/; revision=10620
2004-08-20 21:23:49 +00:00
Art Yerkes
5eef6d16e3 Removed ASSERT_KM macro. It's not used any longer.
svn path=/trunk/; revision=10619
2004-08-20 16:26:10 +00:00
Filip Navara
3f9427ed02 Fix few compiler/linker warnings.
svn path=/trunk/; revision=10618
2004-08-20 15:19:38 +00:00
Eric Kohl
26981b72cf - Provide better PCI device descriptions.
- Use public macros to analyze the PCI configuration space.

svn path=/trunk/; revision=10617
2004-08-20 13:33:51 +00:00
Eric Kohl
a5e0bea967 Define more PCI device subclasses.
svn path=/trunk/; revision=10616
2004-08-20 13:29:14 +00:00
Magnus Olsen
ee97250d94 fix
gcc 3.3.x stop comiling and give a error msg
network/icmp.c: In function `SendICMPComplete':
network/icmp.c:28: warning: unused variable `IPPacket'
make[1]: *** [network/icmp.o] Error 1
make: *** [tcpip] Error 2

svn path=/trunk/; revision=10615
2004-08-20 09:44:20 +00:00
Gé van Geldorp
d204e60565 Don't export all make variables by default
Based on work by Hartmut Birr

svn path=/trunk/; revision=10614
2004-08-20 07:02:09 +00:00
Gé van Geldorp
e8936ed5d6 Older binutils don't like the -noname attribute
on forwarded exports

svn path=/trunk/; revision=10613
2004-08-20 06:58:58 +00:00
Filip Navara
57bca780f3 Fix compiler warnings.
svn path=/trunk/; revision=10612
2004-08-20 00:57:55 +00:00
Filip Navara
ed43fa6083 Remove definitions already present in W32API.
svn path=/trunk/; revision=10611
2004-08-20 00:57:42 +00:00
Filip Navara
0d5febe573 Fix syntax errors in .edf file.
svn path=/trunk/; revision=10610
2004-08-20 00:57:41 +00:00
Casper Hornstrup
28a9052b11 2004-08-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Fix ntoskrnl dependency problem.

svn path=/trunk/; revision=10609
2004-08-19 23:11:41 +00:00
Hartmut Birr
147f2a9166 - Changed the sequence of some memory initialisation functions.
svn path=/trunk/; revision=10608
2004-08-19 22:17:47 +00:00
Hartmut Birr
a9797a23d6 - Rewrote MmInitializePageList. It isn't necessary to setup the pde's
for the largest memory configuration at boot time.
- Made the parts of the page directory map inaccessible from user mode
  which are setup at boot time.

svn path=/trunk/; revision=10607
2004-08-19 22:14:31 +00:00
Hartmut Birr
9112fef190 - Fixed a crash which occurs on thread switching if the pde's for the new
process structure are not established within the address space of the old thread.

svn path=/trunk/; revision=10606
2004-08-19 21:56:17 +00:00
Art Yerkes
67781c7635 More notes on oskit. braindumping.
svn path=/trunk/; revision=10605
2004-08-19 21:53:43 +00:00
Hartmut Birr
020f18ca0b - Set the pde's for the kernel stack at thread creation time and not at any task switch.
svn path=/trunk/; revision=10604
2004-08-19 21:51:06 +00:00
Hartmut Birr
30188f2c6c - Replaced MmUpdateStackPageDir by MmUpdatePageDir which can establish
the pde's of a process for any address range within the kernel address range.

svn path=/trunk/; revision=10603
2004-08-19 21:47:51 +00:00
Eric Kohl
7314aec7ff Define PCI subclasses and macros.
svn path=/trunk/; revision=10602
2004-08-19 21:42:44 +00:00
Art Yerkes
9d7db6ee1c oskittcp: new import. less diff output versus pure sources.
no deleted code this time around.  all properly ifdef'd
more use of bsd style adapter structs and adapter queries with provided
support by tcpip.sys.
correct prototypes
some diff output is reformatting

tcpip: some bug fixes, -Wall -Werror on, all prototypes in
remove the need for MaxLLHeaderSize anywhere except lan.c
unify meaning of Header and Data members of IP_PACKET
unify PCHAR types in routines.c
move one more address into the struct, eliminating management and extra
poll alloc in NCE
eliminate wrong use of PIP_INTERFACE as NTE pointer in dispatch functions
other fixes

svn path=/trunk/; revision=10601
2004-08-19 21:39:00 +00:00
Filip Navara
4376799eac - Move out LPCGUID from scsiwmi.h to basetyps.h where it belongs.
- Fix initguid.h to eliminate warnings when compiling C programs.

svn path=/trunk/; revision=10600
2004-08-19 18:16:39 +00:00
Filip Navara
d2f7f5c128 Remove some unused headers or parts of headers.
svn path=/trunk/; revision=10599
2004-08-19 18:12:29 +00:00
Filip Navara
a7693505df Fix syntax error in .def file.
svn path=/trunk/; revision=10598
2004-08-19 18:08:47 +00:00
Casper Hornstrup
4989d6438f 2004-08-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* regtests/shared/regtests.c: Mark test name with |.

svn path=/trunk/; revision=10597
2004-08-19 00:48:18 +00:00
Casper Hornstrup
ab33683488 2004-08-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Depend on roscfg.h.

svn path=/trunk/; revision=10596
2004-08-19 00:39:59 +00:00
Casper Hornstrup
d291ec0ebe 2004-08-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/regtests2xml: New directory.
	* tools/regtests2xml/.cvsignore: New file.
	* tools/regtests2xml/Makefile: Ditto.
	* tools/regtests2xml/regtests2xml.c: Ditto.

svn path=/trunk/; revision=10595
2004-08-19 00:35:15 +00:00
Eric Kohl
87c899380d Report the correct resource flags.
svn path=/trunk/; revision=10594
2004-08-18 22:11:15 +00:00
Eric Kohl
9acd2c65c2 Update resource-related defines.
svn path=/trunk/; revision=10593
2004-08-18 22:06:55 +00:00
Filip Navara
2004f45dcd Replace 0x7ffeffff by MmHighestUserAddress.
svn path=/trunk/; revision=10592
2004-08-18 20:41:03 +00:00
Gé van Geldorp
2db705b1c2 Update to FreeType 2.1.9
svn path=/trunk/; revision=10591
2004-08-18 20:25:11 +00:00
Filip Navara
96bdafef41 - Copy over device object SectorSize and AlignmentRequirement in IoAttachDeviceToDeviceStack.
svn path=/trunk/; revision=10590
2004-08-18 15:09:02 +00:00
Eric Kohl
c9f2fda0b2 Don't retrieve a resource list when a device gets started, use the device nodes resource list.
svn path=/trunk/; revision=10589
2004-08-18 08:33:25 +00:00
Eric Kohl
b299113f7b Fix IRP_MN_QUERY_RESOURCES and implement IRP_MN_QUERY_RESOURCE_REQUIREMENTS.
svn path=/trunk/; revision=10588
2004-08-18 08:25:58 +00:00
Filip Navara
543091ce46 - Fix FsRtlDoesNameContainWildCards loop to take into account the first and lst letter of the expression.
- Dumb implementation of FsRtlIsNameInExpression.

svn path=/trunk/; revision=10587
2004-08-18 02:32:00 +00:00
Filip Navara
f43bd6e656 - Move SectionPageProtection checks from helper routines to NtCreateSection.
- Remove dependency on ReactOS specific FO_FCB_IS_VALID magic and don't access FCB directly, use NtQueryInformationFile instead.
- Fix deleting of section if an early failure during section creation happens and not all structures are initialized yet.

svn path=/trunk/; revision=10586
2004-08-18 02:29:37 +00:00
Filip Navara
04e70454de - Don't increase Irp->AssociatedIrp.IrpCount in IoMakeAssociatedIrp. The caller is responsible for doing it.
- Don't unlock MDLs of associated Irps.

svn path=/trunk/; revision=10585
2004-08-18 02:24:02 +00:00
Filip Navara
5ce987d59f - Set StackPtr->Parameters.Read.Length in IoPageRead.
- Set StackPtr->Parameters.Write.Length in Io[Synchronous]PageWrite.

svn path=/trunk/; revision=10584
2004-08-18 02:21:53 +00:00
Filip Navara
b7ca7786e4 Print in the debug traces if a partition is recognized or not.
svn path=/trunk/; revision=10583
2004-08-18 02:20:00 +00:00
Filip Navara
13fc2fb445 Link to our SDK libraries instead of using the W32API ones.
svn path=/trunk/; revision=10582
2004-08-18 02:16:00 +00:00
Filip Navara
bf2c0b0d8b Fix declaration of FILE_DISPOSITION_INFORMATION.
svn path=/trunk/; revision=10581
2004-08-18 02:13:27 +00:00
Thomas Bluemel
0e686e8470 remove debug output
svn path=/trunk/; revision=10580
2004-08-17 21:52:17 +00:00
Thomas Bluemel
90e663c1bf load the wallpaper on startup and set it
svn path=/trunk/; revision=10579
2004-08-17 21:49:51 +00:00
Thomas Bluemel
c6a9402e60 added very basic support for desktop wallpapers
svn path=/trunk/; revision=10578
2004-08-17 21:47:36 +00:00
Thomas Bluemel
2ac9e121e9 use WM_NOTIFY messages to communicate with the desktop window thread as they can't be sent from processes other than csrss
svn path=/trunk/; revision=10577
2004-08-17 14:57:52 +00:00
Casper Hornstrup
a7f4ff2664 2004-08-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/depend.mk: Don't generate dependencies for implib target.

svn path=/trunk/; revision=10576
2004-08-17 13:53:05 +00:00
Casper Hornstrup
f55fbceea5 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Correct dependencies.
	* tools/Makefile: Silence some annoying messages.
	* tools/config.mk: Ditto.
	* rules.mak (MINIMALDEPENDENCIES): New option; minimal dependencies
	(yes/no). If yes, then components do not depend on all import libraries.
	If no, then they do. Defaults to yes.

svn path=/trunk/; revision=10575
2004-08-16 22:31:05 +00:00
Gé van Geldorp
b236b6a240 Avoid collision with MinGW wctype_t
svn path=/trunk/; revision=10574
2004-08-16 20:02:23 +00:00
Martin Fuchs
7566350740 display version information in about dialog and on the desktop
svn path=/trunk/; revision=10572
2004-08-16 18:49:58 +00:00
Casper Hornstrup
5b9f8a442b 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/include/debug.h (ASSERT): Don't call KeBugCheck.
	* lib/user32/misc/dllmain.c (KeBugCheck): Remove declaration.

svn path=/trunk/; revision=10571
2004-08-16 17:28:46 +00:00
Eric Kohl
3a5f687b18 Implement:
- IRP_MN_READ_CONFIG
  - IRP_MN_WRITE_CONFIG
  - IRP_MN_QUERY_RESOURCES
  - IRP_MN_QUREY_DEVICE_TEXT

Implement (disabled):
  - IRP_MN_QUERY_ID.BusQueryInstanceID

svn path=/trunk/; revision=10570
2004-08-16 09:13:00 +00:00
Casper Hornstrup
ad002d5bd9 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/include/.cvsignore: New file.
	* drivers/net/tcpip/include/precomp.h: New file.
	* drivers/net/tcpip/Makefile (TARGET_PCH): Set to include/precomp.h.
	* drivers/net/tcpip/tests/Makefile (TARGET_PCH): Reset.
	* drivers/net/tcpip/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10569
2004-08-15 23:41:26 +00:00
Casper Hornstrup
455ea22b67 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/ndis/include/.cvsignore: New file.
	* drivers/net/ndis/.cvsignore: Add *.d.
	* drivers/net/ndis/Makefile (TARGET_PCH): Set to include/ndissys.h.
	* drivers/net/ndis/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10568
2004-08-15 23:12:33 +00:00
Casper Hornstrup
7ffd28c060 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/afd/include/.cvsignore: New file.
	* drivers/net/afd/include/tdiconn.h: Don't include <afd.h>.
	* drivers/net/afd/.cvsignore: Add *.d.
	* drivers/net/afd/makefile (TARGET_PCH): Set to include/afd.h.

svn path=/trunk/; revision=10567
2004-08-15 22:51:57 +00:00
Casper Hornstrup
c78a7ee5ec 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/taskmgr/.cvsignore: Add *.gch.
	* subsys/system/taskmgr/precomp.h: New file.
	* subsys/system/taskmgr/makefile (TARGET_PCH): Set to precomp.h.
	* subsys/system/taskmgr/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10566
2004-08-15 22:40:34 +00:00
Casper Hornstrup
ed1baab85f 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/.cvsignore: Add *.gch.
	* subsys/system/usetup/precomp.h: New file.
	* subsys/system/usetup/makefile (TARGET_PCH): Set to precomp.h.
	* subsys/system/usetup/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10565
2004-08-15 22:29:50 +00:00
Casper Hornstrup
74ad04945e 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/cmd/.cvsignore: Add *.gch.
	* subsys/system/cmd/precomp.h: New file.
	* subsys/system/cmd/Makefile (TARGET_PCH): Set to precomp.h.
	* subsys/system/cmd/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10564
2004-08-15 22:15:23 +00:00
Casper Hornstrup
0ded881f1f Simplify precomp.h.
svn path=/trunk/; revision=10563
2004-08-15 21:39:59 +00:00
Casper Hornstrup
e14ef8a1c4 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/include/.cvsignore: New file.
	* lib/user32/Makefile (TARGET_PCH): Set to include/user32.h.
	* lib/user32/*/*.c: Use pre-compiled header.
	* include/wine/debug.h (FIXME): Override previous declaration is needed.

svn path=/trunk/; revision=10562
2004-08-15 21:36:30 +00:00
Gé van Geldorp
a6fc248d31 Handle shell link files contained in double quotes
svn path=/trunk/; revision=10561
2004-08-15 21:01:14 +00:00
Thomas Bluemel
fdf4e54dc9 added missing file
svn path=/trunk/; revision=10560
2004-08-15 20:24:43 +00:00
Casper Hornstrup
231eeedea1 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/userenv/.cvsignore: Add *.gch.
	* lib/userenv/makefile (TARGET_PCH): Set to precomp.h.
	* lib/userenv/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10559
2004-08-15 19:02:40 +00:00
Casper Hornstrup
5d7f1d7e68 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/ws2_32/include/.cvsignore: New file.
	* lib/ws2_32/makefile (TARGET_PCH): Set to include/ws2_32.h.
	* lib/ws2_32/include/[catalog.h, handle.h]: Don't include ws2_32.h.

svn path=/trunk/; revision=10558
2004-08-15 18:53:07 +00:00
Casper Hornstrup
07ceadec8e 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/gdi32/include/.cvsignore: New file.
	* lib/gdi32/.cvsignore: Remove *.gch.

svn path=/trunk/; revision=10557
2004-08-15 18:42:57 +00:00
Casper Hornstrup
a3a8b50447 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/gdi32/.cvsignore: Ignore *.gch.
	* lib/gdi32/include/precomp.h: New file.
	* lib/gdi32/Makefile (TARGET_PCH): Set to include/precomp.h.
	* lib/gdi32/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10556
2004-08-15 18:40:07 +00:00
Casper Hornstrup
84385f6e26 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/msvcrt/.cvsignore: Ignore *.gch.
	* lib/msvcrt/precomp.h: New file.
	* lib/msvcrt/Makefile (TARGET_PCH): Set to precomp.h.
	* lib/msvcrt/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10555
2004-08-15 18:16:39 +00:00
Casper Hornstrup
aa7fdaac83 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/crtdll/.cvsignore: Ignore *.gch.
	* lib/crtdll/precomp.h: New file.
	* lib/crtdll/Makefile (TARGET_PCH): Set to precomp.h.
	* lib/crtdll/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10554
2004-08-15 17:34:28 +00:00
Casper Hornstrup
03664157d6 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/advapi32/.cvsignore: Ignore *.gch.
	* lib/advapi32/advapi32.h: New file.
	* lib/advapi32/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10553
2004-08-15 17:03:15 +00:00
Art Yerkes
0d69d982e0 More info about naming.
svn path=/trunk/; revision=10552
2004-08-15 16:52:13 +00:00
Gero Kuehn
e16725fbe4 improved network control panel
more registry keys for the network configuration
preliminary TCPIP property sheet

svn path=/trunk/; revision=10551
2004-08-15 16:50:30 +00:00
Casper Hornstrup
1bf0775833 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/include/.cvsignore: New file.
	* ntoskrnl/include/ntoskrnl.h: Ditto.
	* ntoskrnl/*/*.c: Use pre-compiled header.
	* ntoskrnl/Makefile: Support pre-compiled header.
	* tools/helper.mk: .pch files are now .gch files.

svn path=/trunk/; revision=10550
2004-08-15 16:39:12 +00:00
Filip Navara
41ca6025bd - Revert to old dependency system.
svn path=/trunk/; revision=10549
2004-08-15 01:44:31 +00:00
Filip Navara
0a2918d47b - Revert to old dependency system.
svn path=/trunk/; revision=10548
2004-08-15 01:23:19 +00:00
Filip Navara
f530a33909 - Minor correction to shut up compiler warning.
svn path=/trunk/; revision=10547
2004-08-15 00:51:51 +00:00
Filip Navara
e2635a47ed - Don't append to existing files.
svn path=/trunk/; revision=10546
2004-08-15 00:51:01 +00:00
Eric Kohl
525f112e0c Try to retrieve the resource list before starting a pnp device.
svn path=/trunk/; revision=10545
2004-08-14 22:47:08 +00:00
Gé van Geldorp
4bf8b7d19b Avoid crash
svn path=/trunk/; revision=10544
2004-08-14 22:36:38 +00:00
Gé van Geldorp
fe0c27e5c2 Sync to Wine-20040813: update status
svn path=/trunk/; revision=10543
2004-08-14 21:02:42 +00:00
Filip Navara
45e78bd69f - Fix dependency tracking for relative paths.
svn path=/trunk/; revision=10542
2004-08-14 20:51:46 +00:00
Steven Edwards
99ef31f67f Get it building. Linking is next
svn path=/trunk/; revision=10541
2004-08-14 20:43:40 +00:00
Gé van Geldorp
d0307c2139 Sync to Wine-20040813:
Alexandre Julliard
- Avoid some non-portable makefile constructs, and get rid of the
  ALTNAMES variable.
Robert Reif <reif@earthlink.net>
- Change MIXER_GetDev to take pointer to returned address pointer and
  return one of 3 possible return values rather than an address or
  NULL.
- Adds *GetDevCapsW bad pointer check.
- Adds waveOutGetDevCapsW test.
Filip Navara <xnavara@volny.cz>
- Implementation of mmTaskCreate. Based on patch by Eric Pouech.
- Fallback implementation in waveOut[Un]PrepareHeader.
Marcelo Duarte <wine-devel@bol.com.br>
- Localization of devenum to Portuguese and minor corrections.

svn path=/trunk/; revision=10539
2004-08-14 20:36:35 +00:00
Gé van Geldorp
82663d1e65 Sync to Wine-20040813:
Ivan Leo Puoti <puoti@inwind.it>
- Added Italian resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update localization for Portuguese language.
Alexandre Julliard
- Get rid of the non-standard ICOM_VTABLE macro.
- Get rid of the non-standard ICOM_VFIELD macro.
- Fixed flags handling in StrIsIntlEqualA/W (spotted by James Hawkins).
Jacek Caban <jack@itma.pwr.wroc.pl>
- Implemented IsOS function.
Francois Gouget <fgouget@free.fr>
- Modify widl to put the C COM macros inside an #ifdef COBJMACROS block
  as is done in the Windows headers.
- Add #define COBJMACROS where needed in Wine.
- Fixes the compilation of the oleaut32/tests/olefont.c and
  urlmon/tests/url.c conformance tests with the Windows headers.
Stefan Leichter <Stefan.Leichter@camLine.com>
- Forward shlwapi.459/460 (SHExpandEnvironmentStringsA/W) to
  kernel32.ExpandEnvironmentStringsA/W.

svn path=/trunk/; revision=10538
2004-08-14 20:24:42 +00:00
Gé van Geldorp
86eb12c5fc Sync to Wine-20040813:
Alexandre Julliard
- Moved ICOM_THIS_MULTI definition out of objbase.h and into the files
  that use it.
- Get rid of the non-standard ICOM_VTABLE macro.
- Get rid of the non-standard ICOM_VFIELD macro.

svn path=/trunk/; revision=10537
2004-08-14 20:09:12 +00:00
Gé van Geldorp
40d3ca1e0b Sync to Wine-20040813:
Mike McCormack <mike@codeweavers.com>
- Remove dead code.
Jacek Caban<jack@itma.pwr.wroc.pl>
- Added EM_SCROLLCARET definition in include/richedit.h and handling in
  WindowProc.

svn path=/trunk/; revision=10536
2004-08-14 20:05:16 +00:00
Gé van Geldorp
73d3df3e28 Sync to Wine-20040813:
Alexandre Julliard
- Avoid some non-portable makefile constructs, and get rid of the
  ALTNAMES variable.
- Get rid of the non-standard ICOM_VTABLE macro.
- Get rid of the non-standard ICOM_VFIELD macro.
- Get rid of the non-standard ICOM_DEFINE macro.
- Moved ICOM_THIS_MULTI definition out of objbase.h and into the files
  that use it.
Mike McCormack <mike@codeweavers.com>
- Added a test for stat'ing a memory based storage file.
- stat on memory storage should return a NULL name, not "".
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
- Modify widl to put the C COM macros inside an #ifdef COBJMACROS block
  as is done in the Windows headers.
- Add #define COBJMACROS where needed in Wine.
- Fixes the compilation of the oleaut32/tests/olefont.c and
  urlmon/tests/url.c conformance tests with the Windows headers.
Mike Hearn <mh@codeweavers.com>
- Implement disconnect for proxies so that stubs are properly
  destroyed.
- Disconnect proxies at COM shutdown to release the corresponding
  stubs.
- Don't marshal IClassFactory into the local server pipe until we have
  connected, otherwise we might end up with stubs that are never used.
- Pass -Embedding switch to EXE servers, more tracing.
- Fix misleading warning ole CoGetClassObject.
- Fix ref counting in StdMarshalImpl_MarshalInterface for case where the
  stub already exists.
- Implement StdMarshal::ReleaseMarshalData.
- Fix infinite loops by checking the return value of _invoke_onereq and
  bailing appropriately.
- Add a comment on the SendReceive behaviour. Improve two others.
- Unref stub after invoking on it.
Robert Shearman <rob@codeweavers.com>
- Remove unneeded STUBMGR_Start call.
- Cleanup compobj_private.h.
- Fix some inaccuracies in a comment and reformat.
- Add static to non-exported marshal functions.
- Remove unused marshal functions.
- Rename several RPC functions.
- Emit fixme for known local wrong behaviour.
- Implement StdMarshal::ReleaseMarshalData.
- Document wrong behaviour for IRunningObjectTable.
- Fix infinite loops by checking the return value of _invoke_onereq and
  bailing appropriately.
- Add a comment on the SendReceive behaviour. Improve two others.
- Set RPC data representation.
Jeroen Janssen <japj@xs4all.nl>
- Updated some MSDN links in the code.

svn path=/trunk/; revision=10535
2004-08-14 20:00:59 +00:00
Gé van Geldorp
0f2899c24b Sync to Wine-20040813:
Ivan Leo Puoti <puoti@inwind.it>
- Added Italian resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update localization for Portuguese language.

svn path=/trunk/; revision=10534
2004-08-14 19:25:03 +00:00
Gé van Geldorp
5dd30e3526 Sync to Wine-20040813:
Alexandre Julliard
- Avoid some non-portable makefile constructs, and get rid of the
  ALTNAMES variable.
- Get rid of the non-standard ICOM_VTABLE macro.
Henning Gerhardt <henning.gerhardt@web.de>
- Minor fixes and updates to the German resource files.
Jacek Caban <jack@itma.pwr.wroc.pl>
- Translation update.
Mike McCormack <mike@codeweavers.com>
- Unicode file dialogs send and receive unicode messages.
Jacek Caban <jack@itma.pwr.wroc.pl>
- Fix a bug in passing parameters to CFn_WMInitDialog and CFn_WMCommand
  in FormatCharDlgProcW.
James Hawkins <truiken@gmail.com>
- Cleanup A->W cross calls.
- Better fix for collate icon behavior.

svn path=/trunk/; revision=10533
2004-08-14 19:21:01 +00:00
Gé van Geldorp
6d0e0e250c Sync to Wine-20040813:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Make pattern brush data const.
Mike McCormack <mike@codeweavers.com>
- Prevent listview from crashing when a null sort function is passed to
  LVM_SORTITEMS.
Filip Navara <xnavara@volny.cz>
- Don't update infoPtr->dwStyle in LISTVIEW_WindowProc. It's already
  handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing.
- Ignore WS_VSCROLL/WS_HSCROLL flags in infoPtr->dwStyle because they're
  not always up-to-date.
- Use correct dialog title for Wizard 97 and correctly display header
  bitmap for old-style Wizard 97.
- Fix TOOLBAR_DrawMasked to correctly use image list mask.
Eric Kohl <eric.kohl@t-online.de>
- Move watermark and header bitmap loading code from
  PROPSHEET_CreatePage into its own function PROPSHEET_LoadWizardBitmaps
  and call this function from property sheet's dialog procedure.
Thomas Weidenmueller <w3seek@reactos.com>
- Correct tooltips behavior.

svn path=/trunk/; revision=10532
2004-08-14 19:12:35 +00:00
Steven Edwards
0b6388b665 Update the README.WINE. It now contains a list of almost
everything we share with Wine. Needs updates and
corrections.

svn path=/trunk/; revision=10531
2004-08-14 16:00:23 +00:00
Hartmut Birr
6657310a77 - Fixed the definition of X86_CR4_PGE.
svn path=/trunk/; revision=10530
2004-08-14 15:17:09 +00:00
Thomas Bluemel
e3e1c39945 a few fixes.
I'm not going to continue working on this due to a lack of knowledge of the security api, so someone else who knows a bit more about them should step in...

svn path=/trunk/; revision=10529
2004-08-14 11:50:25 +00:00
Thomas Bluemel
d07b810759 implemented GI_EnableMouseTracking()
svn path=/trunk/; revision=10528
2004-08-14 10:47:19 +00:00
Filip Navara
108e98c65d - Remove the now unused .edf file.
svn path=/trunk/; revision=10527
2004-08-14 10:23:11 +00:00
Filip Navara
51f265db45 - Forward everything everything we can to MSVCRT and WS2_32.
svn path=/trunk/; revision=10526
2004-08-14 10:22:10 +00:00
Hartmut Birr
ba5235cc90 - Enabled global pages if it is possible.
- Put the kernel map onto a fixed location and establish a page table
  for the first 4MB in the very early boot process.
- Disable the mapping for the page table pages within the bss section.

svn path=/trunk/; revision=10525
2004-08-14 09:17:05 +00:00
Filip Navara
ca1a1af64c - Implementation of GI_message_box.
svn path=/trunk/; revision=10524
2004-08-14 07:15:05 +00:00
Thomas Bluemel
9bab45b05a fixed a few parameters
svn path=/trunk/; revision=10523
2004-08-14 01:03:38 +00:00
Thomas Bluemel
62e97aca3c convert license to LGPL
svn path=/trunk/; revision=10522
2004-08-14 00:50:27 +00:00
Alex Ionescu
1301082015 *CORRECT* version of Defintion file.
svn path=/trunk/; revision=10521
2004-08-14 00:47:33 +00:00
Thomas Bluemel
c90dfac1f8 implementation of __libc_init_memory()
svn path=/trunk/; revision=10520
2004-08-14 00:39:19 +00:00
Alex Ionescu
067e284424 Removed duplicate entries.
svn path=/trunk/; revision=10519
2004-08-14 00:35:09 +00:00
Steven Edwards
e2ebe8412b build with w32api
svn path=/trunk/; revision=10518
2004-08-13 23:31:36 +00:00
Filip Navara
b5ba0a23cf - SkyOS menu functions implementation.
svn path=/trunk/; revision=10517
2004-08-13 20:14:40 +00:00
Filip Navara
74718af76f - Fix GC_destroy for window DCs.
svn path=/trunk/; revision=10516
2004-08-13 17:10:22 +00:00
Thomas Bluemel
0d2d58122c implemented a few window placement functions and more checks for NULL-pointers
svn path=/trunk/; revision=10515
2004-08-13 12:29:19 +00:00
Thomas Bluemel
4d50bed0ad Patch by Filip: Implemented some graphics functions and bugfixes to the windowing functions.
svn path=/trunk/; revision=10514
2004-08-13 11:24:07 +00:00
Richard Campbell
6b30f2a9ed added urlmon to the source tree, doesn't compile due to COM interface issues that i'm not quite interesting in trying to solve at the moment...if someone feels like taking a crack at it, go ahead, firefox needs this dll to be functional. This is from the latest wine CVS.
svn path=/trunk/; revision=10513
2004-08-13 06:14:48 +00:00
Richard Campbell
8063cf6601 added a few stubs to help get urlmon from the wine source tree to compile, there are still a few things left to do before i can bring in URLMon however.
svn path=/trunk/; revision=10512
2004-08-13 05:44:55 +00:00
Alex Ionescu
08fcd22543 Updated EDF file with new stubs in alphabetical order and synched EDF and DEF file.
svn path=/trunk/; revision=10511
2004-08-13 05:06:18 +00:00
Alex Ionescu
760cc9dbc7 Added Dbg Stubs and moved old ones to correct header and files.
svn path=/trunk/; revision=10510
2004-08-13 05:00:35 +00:00
Thomas Bluemel
cd550a1f78 dispatch MSG_QUIT and MSG_GUI_REDRAW messages. Thanks also to Filip.
svn path=/trunk/; revision=10509
2004-08-12 23:38:17 +00:00
Thomas Bluemel
a7d6dcd7c1 started an interface to emulate the skygi windowing but actually use win32 apis
svn path=/trunk/; revision=10508
2004-08-12 19:27:12 +00:00
Alex Ionescu
81ace77431 Added two stubs.
svn path=/trunk/; revision=10507
2004-08-12 16:43:37 +00:00
Alex Ionescu
28ad49e6f7 I/O Manager fixes. Patch by Filip Navara.
svn path=/trunk/; revision=10506
2004-08-12 16:43:12 +00:00
Thomas Bluemel
78f66ec97c an attempt to partially implement ctor_dtor_initialize() and a few more libskygi stubs
svn path=/trunk/; revision=10505
2004-08-12 15:41:36 +00:00
Alex Ionescu
7cf25ed92f Set the thread to the Allocated IRPs created by Io/Nt Query functions that didn't do this. This can cause problems if the thread is ever read on a completed request.
svn path=/trunk/; revision=10504
2004-08-12 06:15:50 +00:00
Alex Ionescu
359fe88806 Fixed/Added Stubs.
Implemented PsRevertThreadToSelf

svn path=/trunk/; revision=10503
2004-08-12 06:04:21 +00:00
Art Yerkes
e9fc7ea7df According to alex_ionescu, callers of IoAllocateIrp should set the
Tail.Overlay.Thread member themselves in the new Irp.  These calls
to IoAllocateIrp were not followed by setting the thread.

svn path=/trunk/; revision=10502
2004-08-12 05:59:25 +00:00
Thomas Bluemel
7dd153e40e Steven Edwards wanted me to commit this.
This adds a vew basic stubs of the SkyOS libraries libsky and libskygi. This actually was an experiment if SkyOS apps run in ReactOS/Win/WINE. It gets a slightly patched (only the optional PE header needs to be set to the right subsys code) version of TicTacToe released in the SkyOS forums. It doesn't crash but also doesn't work yet of course, but it successfully launches and calls the functions as you can see in the debug output.

svn path=/trunk/; revision=10501
2004-08-12 02:50:35 +00:00
James Tabor
cb9fb81c44 Added Lock and Heap Info struc's.
svn path=/trunk/; revision=10500
2004-08-11 21:03:11 +00:00
James Tabor
4e8265f044 Module Library supported now. There is a bug with scanning winlogon that causes a exception. The version.dll data is worng.
svn path=/trunk/; revision=10499
2004-08-11 21:02:12 +00:00
Thomas Bluemel
5d4aa40ac6 Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
Replaced LISTBOX_SetCaretIndex() with LISTBOX_MoveCaret() in
LB_SELECTSTRING handler so that the caret moves to the index and item
is highlighted.

svn path=/trunk/; revision=10498
2004-08-11 10:37:06 +00:00
Eric Kohl
6f267c1f3c Add RtlFormatMessage stub.
svn path=/trunk/; revision=10497
2004-08-11 09:30:23 +00:00
Thomas Bluemel
86f612b5f1 pass LUIDs to RosEnableThreadPrivileges()
svn path=/trunk/; revision=10496
2004-08-11 08:48:20 +00:00
Thomas Bluemel
2f6a9da97d little fix
svn path=/trunk/; revision=10495
2004-08-11 08:32:48 +00:00
Thomas Bluemel
05d68bd490 added RosEnableThreadPrivileges() and RosResetThreadPrivileges() helper functions for easier thread privilege management
svn path=/trunk/; revision=10494
2004-08-11 08:28:13 +00:00
James Tabor
486bb2502f Replaced RtlAllocateHeap with NtAllocateVirtualMemory.
svn path=/trunk/; revision=10493
2004-08-11 03:48:31 +00:00
Thomas Bluemel
ca0c109cec Implemented CreateSecurityPage() to create an empty property sheet.
svn path=/trunk/; revision=10492
2004-08-11 01:21:53 +00:00
Gé van Geldorp
446f5adc02 Fix RtlEqualLuid()
svn path=/trunk/; revision=10491
2004-08-10 23:26:39 +00:00
Gé van Geldorp
794fe5ff6a Allocate new LUID for each logon session
svn path=/trunk/; revision=10490
2004-08-10 21:18:16 +00:00
Gé van Geldorp
78a5367c1d Copy AuthenticationId from existing token when duplicating a token
svn path=/trunk/; revision=10489
2004-08-10 21:11:20 +00:00
Gé van Geldorp
39bfabb1d4 Change debugging statement
svn path=/trunk/; revision=10488
2004-08-10 20:30:35 +00:00
Gé van Geldorp
a696f85479 Implement TokenOrigin class for GetTokenInformation
svn path=/trunk/; revision=10487
2004-08-10 20:13:42 +00:00
Hartmut Birr
03d66eb75a - Fixed the calculation of used non paged pool pages in grow_block.
svn path=/trunk/; revision=10486
2004-08-10 20:00:49 +00:00
Hartmut Birr
2a373c783c - Returned more of the protection bits in MmGetPageProtect.
- Ignore the PAGE_SYSTEM attribute and set the user bit according to the
  given address in MmSetPageProtect and MmCreateVirtualMappingUnsafe.
- Don't change the accessed and dirty bit in MmSetPageProtect.

svn path=/trunk/; revision=10485
2004-08-10 19:57:58 +00:00
Hartmut Birr
a91173016c - Replaced MmGetPageEntry with MmGetPageProtect/MmSetPageProtect in KdbOverwriteInst.
svn path=/trunk/; revision=10484
2004-08-10 19:49:25 +00:00
Eric Kohl
bc751c87d7 Minor fix
svn path=/trunk/; revision=10483
2004-08-10 19:12:40 +00:00
Thomas Bluemel
ffdafcd0c4 Dmitry Timoshkov <dmitry@codeweavers.com>
Fix button behaviour on WM_SETFOCUS/WM_KILLFOCUS with a test case.

svn path=/trunk/; revision=10482
2004-08-10 19:09:37 +00:00
Thomas Bluemel
d0d5ed5109 added aclui.dll to the bootcd
svn path=/trunk/; revision=10481
2004-08-10 17:10:57 +00:00
Thomas Bluemel
8dac27ed6f fixed typo spotted by Royce.
svn path=/trunk/; revision=10480
2004-08-10 16:21:27 +00:00
Thomas Bluemel
7c8662b9af added aclui.dll to the automatic build
svn path=/trunk/; revision=10479
2004-08-10 15:49:55 +00:00
Thomas Bluemel
8fa77f76c9 implemented EditSecurity()
svn path=/trunk/; revision=10478
2004-08-10 15:47:54 +00:00
Thomas Bluemel
87a27e883c little fix
svn path=/trunk/; revision=10477
2004-08-10 15:21:27 +00:00
Filip Navara
29d654749b - Remove forgotten temporary debug message.
svn path=/trunk/; revision=10476
2004-08-10 15:09:14 +00:00
Thomas Bluemel
7a93d2f239 stop animation timer after completion
svn path=/trunk/; revision=10475
2004-08-10 15:08:05 +00:00
Thomas Bluemel
e1c935fafd improved the installation process
svn path=/trunk/; revision=10474
2004-08-10 15:00:22 +00:00
Eric Kohl
e9533d09c4 Sort Rtl* functions.
svn path=/trunk/; revision=10473
2004-08-10 12:07:11 +00:00
Eric Kohl
8f674bc02f Move bitmap functions to the shared rtl library.
svn path=/trunk/; revision=10472
2004-08-10 12:05:20 +00:00
Thomas Bluemel
bfa54c3f9a include the right files
svn path=/trunk/; revision=10471
2004-08-10 12:00:55 +00:00
Eric Kohl
f3320ad230 Move bitmap functions to the shared rtl library.
Implement RtlClearBit, RtlSetBit and RtlTestBit.

svn path=/trunk/; revision=10470
2004-08-10 12:00:09 +00:00
Thomas Bluemel
c4b330cce6 split up headers
svn path=/trunk/; revision=10469
2004-08-10 11:54:43 +00:00
Thomas Bluemel
3a88fe367b Added a few helper functions for easier usage of strings in resources
svn path=/trunk/; revision=10468
2004-08-10 10:57:54 +00:00
Filip Navara
5775259453 - Fixed lots of bugs in NTFS code and added correct update sequence
fixups handling and untested NTFS 3+ sparse file support.

svn path=/trunk/; revision=10467
2004-08-10 09:28:56 +00:00
Emanuele Aliberti
99e5dd3e01 Fixed typographical error.
svn path=/trunk/; revision=10466
2004-08-10 07:25:49 +00:00
Alex Ionescu
5317d303e8 Small fixes to I/O Manager and Implemented IoMakeAssociatedIrp. Parts by Filip Navara.
svn path=/trunk/; revision=10465
2004-08-10 06:26:42 +00:00
Filip Navara
2199f89e4d Fix compiler warnings.
svn path=/trunk/; revision=10464
2004-08-10 01:49:37 +00:00
Thomas Bluemel
757eac9cfb fixed file headers
svn path=/trunk/; revision=10463
2004-08-10 00:12:31 +00:00
Thomas Bluemel
a201e6c460 added stubs for aclui.dll
svn path=/trunk/; revision=10462
2004-08-10 00:09:40 +00:00
Thomas Bluemel
692929e156 added header for aclui.dll
svn path=/trunk/; revision=10461
2004-08-09 23:29:06 +00:00
Gé van Geldorp
0f07e3b53f NtOpenThread should look at the CIDs UniqueThread member only, not at
UniqueProcess. Makes OpenThread() work.

svn path=/trunk/; revision=10460
2004-08-09 22:15:01 +00:00
James Tabor
d81fcdb79e Mostly implemented, Listdlls half way works now.
svn path=/trunk/; revision=10459
2004-08-09 19:55:33 +00:00
James Tabor
082128c460 Adding missing structures for Debug information.
svn path=/trunk/; revision=10458
2004-08-09 19:41:13 +00:00
Gé van Geldorp
354bc795aa Undo test change
svn path=/trunk/; revision=10457
2004-08-09 18:28:28 +00:00
Gé van Geldorp
6e83a89501 Test log_accum.pl
svn path=/trunk/; revision=10456
2004-08-09 18:26:26 +00:00
James Tabor
0b8a58aaa9 Added Debug Buffer Information. Testing with SysInternals.com listdlls.exe.
svn path=/trunk/; revision=10455
2004-08-09 18:17:23 +00:00
Gé van Geldorp
08707afede Add internal flags for ExitWindowsEx()
svn path=/trunk/; revision=10454
2004-08-09 17:54:56 +00:00
Thomas Bluemel
94efe6c3c1 implemented a couple of Hid device functions
svn path=/trunk/; revision=10453
2004-08-09 16:02:43 +00:00
Filip Navara
a17d473fa8 Update porting status for COMCTL32.
svn path=/trunk/; revision=10452
2004-08-09 15:42:04 +00:00
Filip Navara
7949648a6f Thomas Weidenm�ller <w3seek@reactos.org>
Implemented syslink control.

svn path=/trunk/; revision=10451
2004-08-09 15:35:58 +00:00
Filip Navara
1a31bc2b07 Definitions for SysLink control.
svn path=/trunk/; revision=10450
2004-08-09 15:34:50 +00:00
Filip Navara
8aa4fdb954 Marcus Meissner <marcus@jet.franken.de>
Implemented PSM_INDEXTOHWND.

svn path=/trunk/; revision=10449
2004-08-09 15:22:28 +00:00
Filip Navara
87c79ea203 Filip Navara <xnavara@volny.cz>
- Properly calculate caption length when converting multi-byte string
  to wide character one.
- Wizard contents shouldn't be moved by the size of watermark bitmap.
- Fix PSH_WIZARD97_[NEW/OLD] checks.
- Blit the watermark even if PSH_USEHBMWATERMARK flag isn't set and
  blit only the part that fits into the dialog.

svn path=/trunk/; revision=10448
2004-08-09 15:21:57 +00:00
Filip Navara
85be46acc4 Define PBS_MARQUEE and PBM_SETMARQUEE.
svn path=/trunk/; revision=10447
2004-08-09 15:15:20 +00:00
Filip Navara
0b219a650f Filip Navara <xnavara@volny.cz>
Use system metrics values in TOOLBAR_DrawPattern instead of hardcoded
values.

svn path=/trunk/; revision=10446
2004-08-09 15:12:24 +00:00
Filip Navara
a8f3fd698d Thomas Weidenmueller <wine-patches@reactsoft.com>
Added support for PBS_MARQUEE style.

svn path=/trunk/; revision=10445
2004-08-09 15:09:17 +00:00
Filip Navara
4b8b200e80 Dmitry Timoshkov <dmitry@codeweavers.com>
Create toolbar with a not zero default size, it allows applications
which check toolbar size before adding buttons to it work.

svn path=/trunk/; revision=10444
2004-08-09 15:08:23 +00:00
Filip Navara
5152995d4e Filip Navara <xnavara@volny.cz>
Fix CreateMappedBitmap for palette-less bitmaps.

svn path=/trunk/; revision=10443
2004-08-09 15:08:00 +00:00
Filip Navara
d6e606d1b2 Henning Gerhardt <henning.gerhardt@web.de>
Minor fixes and updates to the German resource files.

svn path=/trunk/; revision=10442
2004-08-09 15:07:37 +00:00
Eric Kohl
7bd374681e Sort Zw* functions
svn path=/trunk/; revision=10441
2004-08-09 11:18:08 +00:00
Alex Ionescu
52279b1490 Rundown Protection Implementation. Implemented ExAcquireRundownProtection, ExAcquireRundownProtectionEx, ExInitializeRundownProtection, ExReInitializeRundownProtection, ExReleaseRundownProtection, ExReleaseRundownProtectionEx, ExRundownCompleted, ExWaitForRundownProtectionRelease
svn path=/trunk/; revision=10440
2004-08-09 01:26:10 +00:00
Art Yerkes
846acbcf70 Added a (C) notice.
svn path=/trunk/; revision=10439
2004-08-08 22:07:06 +00:00
Gé van Geldorp
30417399c0 Sync to Wine-20040716
svn path=/trunk/; revision=10438
2004-08-08 21:50:40 +00:00
Art Yerkes
3ffa79d49a Simple preprocessor for converting try ... except to our pseh-style exception
handling.  Should allow us to use source files from open source drivers that
compile with msvc given some care.  Not a complete solution but it eliminates
the most tedious part of the job.

svn path=/trunk/; revision=10437
2004-08-08 21:40:09 +00:00
Gé van Geldorp
c953f01971 Sync to Wine-20040716:
Henning Gerhardt <henning.gerhardt@web.de>
- More German translations.
Hajime Segawa <winetips@sidenet.ddo.jp>
- Added some Japanese translations.
Dimitrie O. Paun <dpaun@rogers.com>
- Lookup driver information in registry and system.ini.
- Make the code inspect the registry/system.ini at call time, rather
  then initialization time.
- Code cleanups.

svn path=/trunk/; revision=10435
2004-08-08 21:36:20 +00:00
Gé van Geldorp
760a5fbb46 Sync to Wine-20040716:
Mike McCormack <mike@codeweavers.com>
- Fix memory allocation problems.
Marcus Meissner <marcus@jet.franken.de>
- Do not assign to casted values.
Alexandre Julliard
- Implemented GetUIVersion (based on a patch by Stefan Leichter).
Stefan Leichter <Stefan.Leichter@camLine.com>
- Removed the crosscalls (unicode to ascii) from GetAcceptLanguagesW.
- Removed todo_wine from GetAcceptLanguagesA tests.
- Added tests for GetAcceptLanguagesA.
Henning Gerhardt <henning.gerhardt@web.de>
- Translated some English resource files into German.
Hajime Segawa <winetips@sidenet.ddo.jp>
- Added some Japanese translations.

svn path=/trunk/; revision=10434
2004-08-08 21:15:48 +00:00
Gé van Geldorp
9811098a69 Sync to Wine-20040716:
Mike Hearn <mh@codeweavers.com>
- Don't ERR on a used connection being destroyed.
- Don't print an extra newline in the olerelay code.
- Remove the RPC connection cache as Windows does not allow multiple
  binds on the same connection.
- Correct connection releases on error path in RPCRT4_OpenBinding.

svn path=/trunk/; revision=10433
2004-08-08 21:07:12 +00:00
Gé van Geldorp
0bc264aea8 Sync to Wine-20040716:
Henning Gerhardt <henning.gerhardt@web.de>
- Translated some English resource files into German.
- More German translations.
Hajime Segawa <winetips@sidenet.ddo.jp>
- Added some Japanese translations.

svn path=/trunk/; revision=10432
2004-08-08 20:49:55 +00:00
Gé van Geldorp
d0bf3394ea Sync to Wine-20040716:
Mike McCormack <mike@codeweavers.com>
- Fix a few serious race conditions in the OLE object pipe server.
- Add some explanations to compobj.c, implement flushing message queue
  on shutdown.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Marcus Meissner <marcus@jet.franken.de>
- IMalloc vtables are static.
- IID_IObjectWithSite is already in libuuid, no need to declare here.
Aric Stewart <aric@codeweavers.com>
- Return an error in CoMarshalInterface if the IUnknown pointer is NULL
  and don't crash.
Ivan Leo Puoti <puoti@inwind.it>
- Removed the winedefault.reg message.
Robert Shearman <rob@codeweavers.com>
- Add static to non-exported marshal functions.
- Remove unused marshal functions.
- Rename several RPC functions.

svn path=/trunk/; revision=10431
2004-08-08 20:42:47 +00:00
Gé van Geldorp
66219a7d31 Sync to Wine-20040716:
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- HeapAlloc for WSTR must allocate len* sizeof(WCHARS).
Henning Gerhardt <henning.gerhardt@web.de>
- Translated some English resource files into German.
JosT Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Added Spanish translation.
Hajime Segawa <winetips@sidenet.ddo.jp>
- Added some Japanese translations.

svn path=/trunk/; revision=10430
2004-08-08 20:33:39 +00:00
Alex Ionescu
9fa7984747 Initial Support for Quota Pool Allocations.
Implemented ExAllocatePoolWithQuota, ExAllocatePoolWithQuotaTag, PsChargePoolQuota, PsChargeProcessNonPagedPoolQuota, PsChargeProcessPagedPoolQuota, PsChargeProcessPoolQuota.
Also implemented a basic ExAllocatePoolWithTagPriority, but needs Special Pool support for Driver Verifier functionality. The allocation works however.

svn path=/trunk/; revision=10429
2004-08-08 20:33:17 +00:00
Gé van Geldorp
823ef8a298 Set explicit base address for notifyhook.dll so it won't get relocated
svn path=/trunk/; revision=10428
2004-08-08 20:26:43 +00:00
Gé van Geldorp
28676c56c8 Sync to Wine-20040716:
Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
- Add the selected extension from file type filter if file name does not
  contain the file extension.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix control coordinates in German and French versions of open file
  dialog.
- Remove duplicate control ids in Catalan, Russian and Ukrainian
  dialogs.
James Hawkins <truiken@gmail.com>
- Fixed collate icon behavior.
- Check for empty PrinterName in PRINTDLG_WMCommandW.

svn path=/trunk/; revision=10427
2004-08-08 20:15:06 +00:00
Gé van Geldorp
1c0c11dcb3 Sync to Wine-20040716:
Mike McCormack <mike@codeweavers.com>
- Create a tooltip on demand in the Listview.
Robert Shearman <rob@codeweavers.com>
- Implemented PSM_HWNDTOINDEX.
- Add stubs for some new property sheet messages.
- Clean up the mask drawing code.
- Improve bitmap not found message.
- Start of balloon tip support.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Don't crash on NULL tab text.
Filip Navara <xnavara@volny.cz>
- Make the pattern drawing in TOOLBAR_DrawPattern look better.

svn path=/trunk/; revision=10425
2004-08-08 20:04:00 +00:00
Gé van Geldorp
a4617084d5 Add some property sheet messages
svn path=/trunk/; revision=10424
2004-08-08 20:02:57 +00:00
Martin Fuchs
09528fb211 german translation of task manager by Klemens Friedl <frik85@hotmail.com>
svn path=/trunk/; revision=10423
2004-08-08 19:16:10 +00:00
Martin Fuchs
4e20a1b256 german translation of welcome.exe by Klemens Friedl <frik85@hotmail.com>
svn path=/trunk/; revision=10422
2004-08-08 19:15:57 +00:00
James Tabor
3c977fea43 Fixed warning messages ans set -Werror in make file.
svn path=/trunk/; revision=10421
2004-08-08 18:46:25 +00:00
Alex Ionescu
32b533c632 Allow alternate SEH construct. Patch by Art Yerkes.
svn path=/trunk/; revision=10420
2004-08-08 18:26:47 +00:00
Thomas Bluemel
a2b32fbcd6 serialize gui switching and switching the focus message queue
svn path=/trunk/; revision=10419
2004-08-08 17:57:34 +00:00
Jens Collin
35b0435a15 Partial merge with wine-code. Solves BZ#230. Executing text-doc from start-Run. Same change sent to wine-patches
svn path=/trunk/; revision=10418
2004-08-08 16:04:00 +00:00
Jens Collin
82cdbd3a97 notepad takes input filename as parameter %1.
svn path=/trunk/; revision=10417
2004-08-08 16:01:07 +00:00
Filip Navara
287525992a - Fix section object dereferencing in NtCreateSection.
svn path=/trunk/; revision=10416
2004-08-08 10:46:20 +00:00
Steven Edwards
6ba86d77fa Added advapi32 test for the registry.
svn path=/trunk/; revision=10415
2004-08-07 22:51:27 +00:00
Steven Edwards
a730cae54d Added vmwinst and imagehlp to the bootcd
(imagehlp allows openoffice setup to work)

svn path=/trunk/; revision=10414
2004-08-07 22:26:00 +00:00
Steven Edwards
7fe2c42738 When doing a debug boot pass /NOGUIBOOT to disable the
splash screen so we can see the /DEBUGPORT=SCREEN
output.

svn path=/trunk/; revision=10413
2004-08-07 20:26:41 +00:00
Filip Navara
e0449489e5 - Faster dependency system.
svn path=/trunk/; revision=10412
2004-08-07 20:23:33 +00:00
Alex Ionescu
cd351f4dc9 Tagged certain functions that were exported both under NT and ROS, but not marked as un/implemented.
svn path=/trunk/; revision=10411
2004-08-07 19:13:27 +00:00
Alex Ionescu
730a1f48e2 Added shared RTL functions to appear in ntoskrnl exports (Since they are in fact exported by ntoskrnl)
svn path=/trunk/; revision=10410
2004-08-07 06:48:49 +00:00
Steven Edwards
592b1ab19b Renamed /DEBUGPORT=FILELOG to
/DEBUGPORT=BOOTLOG to be compatbile with Windows.

svn path=/trunk/; revision=10409
2004-08-07 03:41:31 +00:00
Filip Navara
312d818b93 - Correctly handle ClipCursor(NULL) case.
svn path=/trunk/; revision=10408
2004-08-07 00:25:10 +00:00
Gero Kuehn
17fbcf5e93 added display properties skeleton
svn path=/trunk/; revision=10407
2004-08-07 00:05:23 +00:00
Filip Navara
956358275c - Move code from NtCreateSection to MmCreateSection and adjust it.
- Use MmCreateSection instead of NtCreateSection where possible.

svn path=/trunk/; revision=10406
2004-08-05 19:59:13 +00:00
Alex Ionescu
054fcf9a85 Fixed Names.
svn path=/trunk/; revision=10405
2004-08-05 19:03:24 +00:00
Alex Ionescu
3c1d312107 Added RTL Stubs, Prototypes and Exports.
svn path=/trunk/; revision=10404
2004-08-05 18:17:37 +00:00
Emanuele Aliberti
172a11d61b Report "access denied" errors.
svn path=/trunk/; revision=10403
2004-08-05 12:11:49 +00:00
James Tabor
b1a51402e2 Update query thread times.
svn path=/trunk/; revision=10402
2004-08-05 11:38:01 +00:00
Filip Navara
68a3b15468 - Separate out cluster chain extending functionality from GetNextCluster to GetNextClusterExtend.
- Fix a typo in VfatHasFileSystem.

svn path=/trunk/; revision=10401
2004-08-05 02:48:18 +00:00
Thomas Bluemel
0004f90a07 Reverted my changes to timers
svn path=/trunk/; revision=10400
2004-08-04 22:31:17 +00:00
Martin Fuchs
f34c1d586a fix clean target for new standard makefiles
svn path=/trunk/; revision=10399
2004-08-04 21:42:33 +00:00
Magnus Olsen
f3f6e3172f notifyhook.dll are not in subsys/system/explore mapp it is in subsys/system/explore/notifyhook/ mapp
I did only corrrect the path so make bootcd works agein

svn path=/trunk/; revision=10397
2004-08-04 21:36:28 +00:00
Magnus Olsen
bfa88618a8 Thx to Herv� Poussineau the gcc 3.3.x are working agein
poussine@freesurf.fr

svn path=/trunk/; revision=10396
2004-08-04 19:53:27 +00:00
Filip Navara
f167814f32 - Remove completion routine for VfatReadDisk. IRPs build with IoBuildSynchronousFsdRequest mustn't be freed by IoFreeIrp, because they're still associated with a thread.
- Don't call IoBuildAsynchronousFsdRequest with NULL buffer for read/write requests. It's explicitly prohibited per DDK documentation and causes crashes on Windows (R) NT systems.

svn path=/trunk/; revision=10395
2004-08-04 19:40:45 +00:00
Filip Navara
8db63af2d6 - Correct a comment.
svn path=/trunk/; revision=10394
2004-08-04 18:27:21 +00:00
Filip Navara
0bde909135 - Fix compiling Explorer with precompiled headers.
svn path=/trunk/; revision=10393
2004-08-04 18:22:41 +00:00
Filip Navara
c4811617d1 - Don't allow selecting separators in start menu and avoid nasty refreshing when moving mouse above the left ReactOS Logo bar.
svn path=/trunk/; revision=10392
2004-08-04 18:19:01 +00:00
Emanuele Aliberti
bde15621e5 Register the LPC Port object object in the system name space.
svn path=/trunk/; revision=10390
2004-08-04 12:50:42 +00:00
Eric Kohl
3faddac950 Add missing functions to the .def and .edf files and sort existing entries.
svn path=/trunk/; revision=10389
2004-08-04 12:11:45 +00:00
Alex Ionescu
c23f194bf6 Fix Compiler warning with -O2
svn path=/trunk/; revision=10388
2004-08-04 02:36:53 +00:00
Filip Navara
08f1890738 - Change -fno-strict-aliasing to -Wno-strict-aliasing for optimized builds.
svn path=/trunk/; revision=10387
2004-08-04 02:27:07 +00:00
Filip Navara
f9ee38ed2b - Fix setting of GDT and IDT pointers in KPCR.
svn path=/trunk/; revision=10386
2004-08-04 02:24:40 +00:00
Alex Ionescu
47b5abbd99 Fix Compiler warning with -O2
svn path=/trunk/; revision=10385
2004-08-04 00:45:36 +00:00
Filip Navara
1740e56356 - Destroy associated listview when IShellView is destroyed.
svn path=/trunk/; revision=10384
2004-08-04 00:23:28 +00:00
Filip Navara
a5154371b4 - Use NDIS_DbgPrint instead of DbgPrint for NDIS buffer messages.
svn path=/trunk/; revision=10383
2004-08-04 00:19:11 +00:00
Alex Ionescu
2aa9311ef8 Fix Compiler warning with -O2
svn path=/trunk/; revision=10382
2004-08-04 00:18:01 +00:00
Filip Navara
0cff98313c - Disable debug messages of floppy driver.
svn path=/trunk/; revision=10381
2004-08-04 00:17:49 +00:00
Filip Navara
ba0ae4ebaf - Don't print stack frames in NtContinue if NDEBUG is defined.
svn path=/trunk/; revision=10380
2004-08-04 00:17:14 +00:00
Martin Fuchs
d9f7a83889 move doxygen targets into separate scripts
svn path=/trunk/; revision=10379
2004-08-03 20:05:02 +00:00
Martin Fuchs
49c4d2b4f2 move doxygen targets to separate scripts
svn path=/trunk/; revision=10378
2004-08-03 20:04:49 +00:00
Gregor Anich
57da2ced76 Implement NtUserEnumDisplaySettings/IntEnumDisplaySettings.
svn path=/trunk/; revision=10377
2004-08-03 19:55:58 +00:00
Martin Fuchs
16904f000e readd additional non-standard Makefile targets
svn path=/trunk/; revision=10376
2004-08-03 19:53:03 +00:00
Martin Fuchs
e092a67cea add .cvsignore files for *.o and *.d
svn path=/trunk/; revision=10375
2004-08-03 19:48:00 +00:00
Martin Fuchs
08cf5682c3 get version number to display from RES_STR_PRODUCT_VERSION
svn path=/trunk/; revision=10374
2004-08-03 19:43:45 +00:00
Martin Fuchs
22147c5757 get version number to display from RES_STR_PRODUCT_VERSION
svn path=/trunk/; revision=10372
2004-08-03 19:43:45 +00:00
Alex Ionescu
c5a9f20753 Added Se Stubs, Prototypes and Exports.
svn path=/trunk/; revision=10370
2004-08-03 19:20:39 +00:00
Filip Navara
01767fb5d8 - Execute the implib rule for system applications.
svn path=/trunk/; revision=10369
2004-08-03 14:50:56 +00:00
Eric Kohl
48ff8c0e48 Add wizard watermark and header bitmaps.
svn path=/trunk/; revision=10368
2004-08-03 14:10:49 +00:00
Eric Kohl
f0d259c7bc SeAssignSecurity():
- Inherit SACL.
- Make sure SIDs and ACLs are 4 byte aligned.

svn path=/trunk/; revision=10367
2004-08-03 13:58:56 +00:00
Eric Kohl
437de0500e - Use 'MS Shell Dlg' font in all dialogs.
- Fix some typos in german dialogs.
- Add locale page dialog.
- Store owner name, owner organization and computer name in the registry.

svn path=/trunk/; revision=10366
2004-08-03 13:43:00 +00:00
Martin Fuchs
62d46e8d85 correct TARGET_PCH to 'precomp.h'
svn path=/trunk/; revision=10365
2004-08-02 20:55:26 +00:00
Martin Fuchs
932a73bfc2 context menus for start menus
svn path=/trunk/; revision=10364
2004-08-02 20:00:56 +00:00
Martin Fuchs
62f1a2a671 context menus for qick launch bar
svn path=/trunk/; revision=10363
2004-08-02 19:16:18 +00:00
Filip Navara
efb2135435 - Add TARGET_PCH to Explorer makefile.
- Delete only the one used .pch file and not *.pch in helper.mk.

svn path=/trunk/; revision=10362
2004-08-02 15:51:23 +00:00
Filip Navara
3639da0250 - Use __KeStallExecutionProcessor instead of plain loop in HalCalibratePerformanceCounter since __KeStallExecutionProcessor is safe even for optimized builds.
svn path=/trunk/; revision=10361
2004-08-02 15:09:22 +00:00
Gregor Anich
64a312d97d If initializing the desktop implementation fails, print "Failed to initialize desktop implementation!", not "Failed to initialize window station implementation!"
svn path=/trunk/; revision=10360
2004-08-02 15:07:26 +00:00
Filip Navara
0eb15adf43 - Ignore msacm32.spec.def and Makefile.ros.
svn path=/trunk/; revision=10359
2004-08-02 15:07:09 +00:00
Filip Navara
7193e1d360 - Delete ntoskrnl/ps/i386/*.o on "make clean".
- Standardize Explorer makefile.
- Remove obsolete WINE_MODE and WINE_RC handling from helper.mk.

svn path=/trunk/; revision=10358
2004-08-02 15:04:24 +00:00
Filip Navara
16ac657bde - Fix building of MidiMap and WaveMap audio drivers.
svn path=/trunk/; revision=10357
2004-08-02 14:58:59 +00:00
Martin Fuchs
da6bb56348 update binres tools and fix renaming bug
svn path=/trunk/; revision=10356
2004-08-02 07:59:38 +00:00
Filip Navara
5efcf7ad5c - Remove build generated files from CVS.
svn path=/trunk/; revision=10355
2004-08-02 03:12:04 +00:00
Filip Navara
d6ee3ac209 - Use #include <xxx> for system include files instead of #include "xxx".
svn path=/trunk/; revision=10354
2004-08-02 03:07:36 +00:00
Filip Navara
c7dda4d8da - Remove msvfw32.spec.def as *.spec.def files are generated during the build.
svn path=/trunk/; revision=10353
2004-08-02 03:04:40 +00:00
Filip Navara
aa682a95e1 - Remove #include directives surrounded by #ifndef __REACTOS__.
svn path=/trunk/; revision=10352
2004-08-02 03:03:10 +00:00
Filip Navara
b80f0e34e1 - Remove unused makefiles.
svn path=/trunk/; revision=10351
2004-08-02 03:01:50 +00:00
Filip Navara
cb394360c0 - Get rid of WINE_MODE and WINE_RC usage in makefiles.
svn path=/trunk/; revision=10350
2004-08-02 02:55:08 +00:00
Filip Navara
3c76881837 - Add definition of _tmakepath.
svn path=/trunk/; revision=10349
2004-08-02 02:52:31 +00:00
Filip Navara
39799e45c9 - Make sure all build files and directories are properly deleted on "make clean".
svn path=/trunk/; revision=10348
2004-08-01 23:27:56 +00:00
Filip Navara
03578741a9 - Add *.pch to list of ignored files.
svn path=/trunk/; revision=10347
2004-08-01 22:02:30 +00:00
Filip Navara
a0198bed0d - Ignore all .ico files.
svn path=/trunk/; revision=10346
2004-08-01 22:00:33 +00:00
Filip Navara
4b0c6682d0 - Replace some usages of KEBUGCHECK(0) with correct bug check codes.
svn path=/trunk/; revision=10345
2004-08-01 21:57:35 +00:00
Filip Navara
a9f6cf2b6c - Change all FAT*FindAvailableCluster functions to new functions
FAT*FindAndMarkAvailableCluster which have incorporated the setting of
  EOF marker in the File Allocation Table for the returned cluster.

- Rewritten FAT32CountAvailableClusters, FAT32FindAndMarkAvailableCluster,
  FAT16CountAvailableClusters and FAT16FindAndMarkAvailableCluster for
  better performance. These functions were using one big loop for traversing
  the FAT and had a block of code in the loop for requesting cache manger
  for next chunk of FAT *if necessary* (which commonly wasn't the case).
  Now it's changed to request always a whole FAT chunk and process it at once
  in a nested loop.

- Cache last offset + cluster pair while reading/writing from/to file. This
  ensures almost linear times when doing sequential reads/writes, because the
  whole FAT traversing for the file is not done again for every request.
  Previously there was code for this, but it was neither correctly used
  nor working. It stored the last offset + cluster pair in file CCB structure
  (that is unique for each opened file handle) and not FCB structure (which
  is shared among all instances of the same file). This resulted in
  inconsistent cluster + offset number when the file allocation chain was
  changed (eg. by enlarging/shrinking the file), but since the cached offsets
  weren't actully used it went unnoticed.

- Remove old hack from NextCluster and fix the call to it in VfatAddEntry.
  Not much to say about it, there was an temporary hack in NextCluster and
  with fixed VfatAddEntry it's now no longer needed.

- Add pointers to WriteCluster, FindAndMarkAvailableCluster and
  GetNextCluster functions to device extension (set during mount) and use
  them at appropriate locations. This avoids some nasty if's in the code
  and causes some unnoticable performance improvment in the low-level
  FAT code.

- Lock the directory FCB in VfatAddEntry while modifying it. This should
  propably be done on more places, but it needs more investigations.

- Increase the file cache allocation size in VfatRead/VfatWrite. It boosts
  the overall speed of the driver a lot.

svn path=/trunk/; revision=10344
2004-08-01 21:57:18 +00:00
Martin Fuchs
0f48b872aa correct icon image order
svn path=/trunk/; revision=10343
2004-08-01 21:23:21 +00:00
Martin Fuchs
009b55a91e insert new ramdisk icon from Klemens Friedl
svn path=/trunk/; revision=10342
2004-08-01 20:56:59 +00:00
Thomas Bluemel
f258f3380a fixed popup menu for edit controls
svn path=/trunk/; revision=10341
2004-08-01 19:49:21 +00:00
Jens Collin
ace328553a corrected build error.
svn path=/trunk/; revision=10340
2004-08-01 15:56:15 +00:00
Jens Collin
9bedba895d merged with wine-version of dialogs.c and replaced CreateProcess-call with ShellExecute to be able to launch any file from start-menu
svn path=/trunk/; revision=10339
2004-08-01 15:37:06 +00:00
Thomas Bluemel
f9d899b01f fixed KDBG:=1 builds. Patch by blight
svn path=/trunk/; revision=10338
2004-08-01 11:40:37 +00:00
Martin Fuchs
d0f962adaf display different drive icons depending on the drive type
svn path=/trunk/; revision=10337
2004-08-01 11:26:13 +00:00
Martin Fuchs
09124408c9 integrate new drive icons of Klemens Friedl <frik85@hotmail.com>
(see http://reactosde.funpic.de/mediadetail.php?sec=Graphic%20arts&cat=icons&mdnr=8)

svn path=/trunk/; revision=10336
2004-08-01 11:24:43 +00:00
Martin Fuchs
79e842231c implement IServiceprovider interface
svn path=/trunk/; revision=10334
2004-08-01 09:26:27 +00:00
Hartmut Birr
06b9a76a1b - Stopped the printing of frames after the nice value 'deadbeef' in KeRosDumpStackFrames.
svn path=/trunk/; revision=10333
2004-08-01 07:28:43 +00:00
Hartmut Birr
b36f5c8459 - Changed all internal memory functions to use the page frame number instead of the physical address.
- Allowed MmCreateVirtualMapping to create mappings for more than one page.
- Used invplg to invalidate a single tlb entry.
- Simplified the access to the page tables/directories.

svn path=/trunk/; revision=10332
2004-08-01 07:27:25 +00:00
Hartmut Birr
fd411381da - Changed all internal memory functions to use the page frame number instead of the physical address.
- Allowed MmCreateVirtualMapping to create mappings for more than one page.

svn path=/trunk/; revision=10331
2004-08-01 07:24:59 +00:00
Magnus Olsen
5f1aa6ff61 change back after filps advace
svn path=/trunk/; revision=10330
2004-07-31 15:09:59 +00:00
Magnus Olsen
abcc1f252b DUMMYSTRUCTNAME1, DUMMYSTRUCTNAME1 s1, DUMMYUNIONNAME u1 where missing
did forget change DUMMYUNIONNAME u1 to DUMMYUNIONNAME1 u1

svn path=/trunk/; revision=10329
2004-07-31 14:47:09 +00:00
Eric Kohl
fa3393af0c Implement SeQuerySecurityDescriptorInfo().
svn path=/trunk/; revision=10328
2004-07-31 12:21:19 +00:00
Magnus Olsen
be56bd2bbd DUMMYSTRUCTNAME1, DUMMYSTRUCTNAME1 s1, DUMMYUNIONNAME u1 where missing
svn path=/trunk/; revision=10327
2004-07-31 12:10:32 +00:00
Magnus Olsen
f5848006c0 DUMMYSTRUCTNAME1, DUMMYSTRUCTNAME1 s1, DUMMYSTRUCTNAME1 u1 where missing
svn path=/trunk/; revision=10326
2004-07-31 12:04:23 +00:00
Hartmut Birr
ae9493fada - Used MmStats.NrFreePages instead of MiNrAvailablePages.
svn path=/trunk/; revision=10325
2004-07-31 09:44:36 +00:00
Hartmut Birr
b67cc5006c - Update the page counters in MmGetContinuousPages.
- Add a flag to PHYSICAL_PAGE, to detect if a free page is on the zeroed or on the unzeroed list.

svn path=/trunk/; revision=10324
2004-07-31 09:43:54 +00:00
James Tabor
f811b0ed5c Fix up SystemPageFileInfo and SystemCacheInfo. May not have all the right data.
svn path=/trunk/; revision=10322
2004-07-31 00:14:39 +00:00
James Tabor
1cac450d4c Moved KiTimerSystemAuditing flag to main.c.
svn path=/trunk/; revision=10321
2004-07-30 19:29:18 +00:00
James Tabor
3ba2c74617 Moved KiTimerSystemAuditing flag to main.c so it can set when everything is up and running. Also, turn the time auditing back on.
svn path=/trunk/; revision=10320
2004-07-30 19:28:49 +00:00
James Tabor
b31a0f3811 Implemented OpenThread and GetSystemTimes.
svn path=/trunk/; revision=10319
2004-07-30 19:18:39 +00:00
Thomas Bluemel
26ecba1c13 added "hide on minimize" feature and added context menu to the tray icon
svn path=/trunk/; revision=10318
2004-07-30 13:39:56 +00:00
Thomas Bluemel
61430b7b65 Patch by Filip Navaraf: Removed the mouse class gdi callback
svn path=/trunk/; revision=10317
2004-07-30 09:42:11 +00:00
Thomas Bluemel
6a79a66086 attempt to fix a few message queue and timer bugs
svn path=/trunk/; revision=10316
2004-07-30 09:16:06 +00:00
James Tabor
acb7361211 New Process & Thread time locking and experimental DPC accounting support.
svn path=/trunk/; revision=10315
2004-07-29 23:28:48 +00:00
James Tabor
a769548161 Add ps to system build.
svn path=/trunk/; revision=10314
2004-07-29 22:32:37 +00:00
James Tabor
cd7d90c696 New process listing command.
svn path=/trunk/; revision=10313
2004-07-29 22:31:56 +00:00
James Tabor
a514022aea Fixing Taskmgr and GlobalMemoryStatusEx return numbers.
svn path=/trunk/; revision=10312
2004-07-29 20:37:02 +00:00
Thomas Bluemel
7d74fb9d99 fixed compiling errors with gcc 3.4.x
svn path=/trunk/; revision=10311
2004-07-29 16:46:22 +00:00
Thomas Bluemel
a8c60b138d don't change selection if not capturing the console window
svn path=/trunk/; revision=10310
2004-07-29 13:54:45 +00:00
Thomas Bluemel
310098e324 fixed calculation of selected cells
svn path=/trunk/; revision=10309
2004-07-29 13:43:38 +00:00
Thomas Bluemel
1ee783cd7d fix assertion statement
svn path=/trunk/; revision=10308
2004-07-29 12:03:47 +00:00
Art Yerkes
bc0ec8c03d Fixed includes so that DBG keys on roscfg.h
Fixed subtle bug in miniport.c: if exactly one protocol is registered we
would skip it in MiniIndicateData because we took the .Flink value from the
list head, then compared CurrentEntry->Flink to the list head address.

svn path=/trunk/; revision=10307
2004-07-29 05:00:43 +00:00
Art Yerkes
c14c59021f Accidentally missed one breakpoint from the previous debugging session.
svn path=/trunk/; revision=10306
2004-07-29 04:10:53 +00:00
Art Yerkes
c0dd64494d Fixed memory overwrite due to too-small allocation.
svn path=/trunk/; revision=10305
2004-07-29 04:09:06 +00:00
Thomas Bluemel
b6a9c73c88 allow selecting text with the mouse in gui consoles
svn path=/trunk/; revision=10304
2004-07-28 22:28:50 +00:00
Steven Edwards
c9f548f45a Add all the new fonts to the bootcd.
svn path=/trunk/; revision=10303
2004-07-28 04:20:44 +00:00
Steven Edwards
7c8435a226 patch by Arty to fix casting issue.
I lost the old patch by Filip.

svn path=/trunk/; revision=10302
2004-07-28 04:20:12 +00:00
Steven Edwards
b4cbfd1d28 C++ flags not C Flags
svn path=/trunk/; revision=10301
2004-07-28 04:02:47 +00:00
Magnus Olsen
303ce93000 remove struct _DDSCAPSEX
it are allread in ddraw.h

svn path=/trunk/; revision=10298
2004-07-27 11:47:10 +00:00
Magnus Olsen
1e873b4f31 From wine include files for preption for directx support in reactos
no changes have been made on this file
to sync with wine only copy thuse file from wine when it need.

svn path=/trunk/; revision=10297
2004-07-27 10:46:27 +00:00
Magnus Olsen
c0779f51d4 From wine include files for preption for directx support in reactos
no changes have been made on this file
to sync with wine only copy thuse file from wine when it need.

svn path=/trunk/; revision=10296
2004-07-27 10:30:11 +00:00
Filip Navara
a646b85ed6 * dlls/shell32/shellpath.c: Aric Stewart <aric@codeweavers.com>
Make sure that the size of the buffer passed to RegSetValueExW is in
bytes not WCHARs.

svn path=/trunk/; revision=10291
2004-07-26 17:02:30 +00:00
James Tabor
2fe9583bc7 Patch for fixing EnumThreadWindows.
svn path=/trunk/; revision=10290
2004-07-26 14:58:35 +00:00
Eric Kohl
6b53247ee6 Remove dead code.
svn path=/trunk/; revision=10289
2004-07-26 13:19:34 +00:00
Eric Kohl
9528bf078e Implement SeValidSecurityDescriptor().
svn path=/trunk/; revision=10288
2004-07-26 12:44:40 +00:00
Eric Kohl
66a51a8a25 Implement NtSetSecurityObject().
svn path=/trunk/; revision=10287
2004-07-25 17:06:37 +00:00
Steven Edwards
6e3095a9e1 Cleaned up Taskmgr resources to break each language in
to its own resource file.

Spanish translation by Carlos Garcia Gomez.

svn path=/trunk/; revision=10286
2004-07-25 16:02:48 +00:00
Thomas Bluemel
9953b620f8 fixed compiling
svn path=/trunk/; revision=10285
2004-07-25 15:11:24 +00:00
Eric Kohl
f4fe39f27b Implement NtQuerySecurityObject() for objects that keep the security in the object header.
svn path=/trunk/; revision=10284
2004-07-25 12:39:28 +00:00
Eric Kohl
7d6581aebc Move generic access rights to a common header file and add missing access rights.
svn path=/trunk/; revision=10283
2004-07-25 12:36:45 +00:00
Martin Fuchs
8fb1163c02 recalculate start menu root position for any call
svn path=/trunk/; revision=10281
2004-07-24 20:09:45 +00:00
Thomas Bluemel
ce336586ba implementation of TouchFileTimes(), Thanks to Florian Stinglmayr for submitting a rough draft ;)
svn path=/trunk/; revision=10279
2004-07-24 10:42:55 +00:00
Thomas Bluemel
d7c54ad860 Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
Modified EDIT_WM_Char() to restrict keying in of letters other than
	numbers when ES_NUMBER style is set.

svn path=/trunk/; revision=10278
2004-07-24 09:43:09 +00:00
Art Yerkes
5fd1995681 Parallel commit: See this osr page:
http://www.osr.com/ddk/network/103ndisx_51pu.htm
Fixes problem with reactos ne2000 driver and ndis resulting in random
heap corruption.  The NdisMEthIndicateReceive macro passes the
MiniportAdapterHandle, not the ETH_FILTER from inside it.

svn path=/trunk/; revision=10277
2004-07-24 04:49:33 +00:00
Art Yerkes
a85dce53e9 According to this osr page:
http://www.osr.com/ddk/network/103ndisx_51pu.htm

NdisMEthIndicateReceive passes an NDIS_HANDLE (Specifically,
MiniportAdapterHandle), rather than the ETH_FILTER structure.  God knows why
this wasn't caught before but it did awfully strange stuff including the
occasional crash, and more importantly, seemingly randomly corrupting the
LAN_ADAPTER and IP_INTERFACE structures in tcpip.sys when we landed in
packet receiving in datalink/lan.c.  Fixed now.

svn path=/trunk/; revision=10276
2004-07-24 04:48:01 +00:00
Thomas Bluemel
b477fd3439 ignore dependency files
svn path=/trunk/; revision=10275
2004-07-24 01:37:43 +00:00
Thomas Bluemel
b4c02404fd Sync with wine-20040724
svn path=/trunk/; revision=10274
2004-07-24 01:32:58 +00:00
Filip Navara
96364f9b04 - Fix WS_CAPTION style handling.
svn path=/trunk/; revision=10273
2004-07-24 01:28:15 +00:00
Filip Navara
5ada12c0d9 - Associate Irp with thread in NtSetInformationFile.
svn path=/trunk/; revision=10272
2004-07-24 01:28:04 +00:00
Filip Navara
e99d2b956a - Replace incorrect casts and comparsions by using the HIWORD macro so we get the correct debug info.
svn path=/trunk/; revision=10271
2004-07-24 01:28:01 +00:00
Filip Navara
05f0512081 - Fix OpenFile for OF_CREATE case.
svn path=/trunk/; revision=10270
2004-07-24 01:27:54 +00:00
Thomas Bluemel
8033e5b560 Sync with wine-20040724
svn path=/trunk/; revision=10269
2004-07-24 01:21:34 +00:00
Thomas Bluemel
bfcd174365 Sync with wine-20040724
svn path=/trunk/; revision=10268
2004-07-24 00:55:39 +00:00
Thomas Bluemel
c7c06a5864 Sync with wine-20040724
svn path=/trunk/; revision=10267
2004-07-24 00:45:31 +00:00
Thomas Bluemel
2effacb2e6 Sync with wine-20040724
svn path=/trunk/; revision=10266
2004-07-24 00:40:01 +00:00
Casper Hornstrup
abc9d6261c 2004-07-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile (DLLS): Add gdiplus.
	* apistatus.lst: Add gdiplus.dll.
	* baseaddress.cfg (TARGET_BASE_LIB_GDIPLUS): Declare.
	* bootdata/packages/reactos.dff: Add gdiplus.dll.
	* include/ntos/rtl.h (InsertTailList): Remove dependency on RtlAssert.
	* lib/gdiplus/(gdiplus, include, tests, tests/tests): New directories.
	* lib/gdiplus/(.cvsignore, gdiplus.def, gdiplus.edf, gdiplus.rc,
	makefile): New files.
	* lib/gdiplus/gdiplus/(.cvsignore, *.c): Ditto.
	* lib/gdiplus/include/(debug.h, GdiPlusPrivate.h): Ditto.
	* lib/gdiplus/tests/(.cvsignore, Makefile, passthrough.c): Ditto.
	* lib/gdiplus/tests/tests/(.cvsignore, test-1.c): Ditto.

svn path=/trunk/; revision=10265
2004-07-23 21:54:55 +00:00
Eric Kohl
013e3c728c Implement ObGetObjectSecurity() and ObReleaseObjectSecurity().
svn path=/trunk/; revision=10264
2004-07-23 21:44:10 +00:00
Jason Filby
23cd7fb231 Set TMPF_TRUETYPE flag for TEXTMETRICW variable in NtGdiGetTextMetrics if dealing with a TrueType font
svn path=/trunk/; revision=10263
2004-07-23 20:46:20 +00:00
Jason Filby
6c4e90a9ab Port GetCharacterPlacementW from WINE; copy lpString to lpResults->lpGlyphs if it (destination string) is not null
svn path=/trunk/; revision=10262
2004-07-23 20:41:09 +00:00
Casper Hornstrup
3d3df3bc4e 2004-07-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile, drivers/video/makefile, lib/cpl/Makefile, ntoskrnl/Makefile,
	tools/helper.mk: Add test target.
	* include/ntos/types.h (UINT16, PUINT16): Declare.
	* regtests/kmregtests/tests/mdl-1.c, regtests/kmregtests/tests/mdl-2.c,
	regtests/kmregtests/tests/mm-1.c, subsys/win32k/tests/tests/eng-mem-1.c:
	Simplify tests.
	* regtests/shared/regtests.c: Include <ctype.h> and <stdlib.h>.
	* regtests/shared/regtests.h (DISPATCHER): Declare the whole function.
	* tools/regtests.c: Refactor part of register_test into get_test_name();
	Stub for running tests in the build environment.
	* w32api/include/basetsd.h (INT16, PINT16, UINT16, PUINT16): Declare.
	* lib/user32/misc/exticon.c (UINT16): Remove declaration.

svn path=/trunk/; revision=10261
2004-07-23 20:03:26 +00:00
Casper Hornstrup
ba42192c97 2004-07-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak: Be silent only if VERBOSE=no.

svn path=/trunk/; revision=10260
2004-07-23 19:07:44 +00:00
Casper Hornstrup
6dbdb2b832 2004-07-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak: Do not print "'target' is up to date." messages.

svn path=/trunk/; revision=10259
2004-07-23 17:48:10 +00:00
Eric Kohl
38d792196e Move security information constants.
svn path=/trunk/; revision=10258
2004-07-23 09:26:29 +00:00
James Tabor
b2f73e07c8 Added thread counting with PsEnumThreadsByProcess and thread support in SystemProcessInformation.
svn path=/trunk/; revision=10257
2004-07-23 07:44:26 +00:00
Filip Navara
651d364842 - Fix handling of METHOD_IN_DIRECT IRPs.
svn path=/trunk/; revision=10256
2004-07-22 20:40:17 +00:00
Filip Navara
bdedaa4fe0 - Support for deserialized miniports (experimental).
svn path=/trunk/; revision=10255
2004-07-22 18:54:36 +00:00
Filip Navara
6e64d6266e - Implementation of HalReadDmaCounter.
- Cleaned up implementation of HalGetAdapter. Moved the initialization
  stuff from there to HalpInitDma that is called by HalInitSystem.
- Let HalAllocateCommonBuffer allocated 64K aligned memory.
- Change IoMapTransfer to support auto initialize and single transfer mode,
  16-bit DMA and common buffers.
- Stop DMA transfer in IoFlushAdapterBuffers.

svn path=/trunk/; revision=10254
2004-07-22 18:49:18 +00:00
Eric Kohl
ec5f846d4c - Add security function for file and registry key objects.
- Implement ObAssignSecurity().

svn path=/trunk/; revision=10253
2004-07-22 18:38:08 +00:00
James Tabor
b6e1dfaded Fixing time accounting errors when mult & div into LARGE_INTEGER.
svn path=/trunk/; revision=10252
2004-07-22 17:22:38 +00:00
Filip Navara
46e6b49f21 - Fix handling of METHOD_IN_DIRECT IRPs.
svn path=/trunk/; revision=10251
2004-07-22 16:21:39 +00:00
James Tabor
0b05c8aa29 Fix DosDateTimeToFileTime too.
svn path=/trunk/; revision=10248
2004-07-22 06:28:52 +00:00
James Tabor
b95aac5417 You can not stuff 60 seconds in 5 bits.
svn path=/trunk/; revision=10247
2004-07-22 06:07:02 +00:00
Filip Navara
58adcd8099 - Fix initialization order.
svn path=/trunk/; revision=10246
2004-07-22 02:36:43 +00:00
Filip Navara
c846dde012 - Fix heap corruption on converting ANSI -> UNICODE strings.
svn path=/trunk/; revision=10245
2004-07-22 02:32:53 +00:00
Filip Navara
b4b6a5f134 - Map the GENERIC_* flags depending of the object type in IoCreateFile.
svn path=/trunk/; revision=10244
2004-07-22 02:32:43 +00:00
Filip Navara
d17f542edd Revert this patch:
- Convert the user mode dwDesiredAccess flags in CreateFile to the kernel mode ones that are used by NtCreateFile.

svn path=/trunk/; revision=10243
2004-07-22 02:32:40 +00:00
Eric Kohl
5d44bfe942 Implement simple DACL inheritance.
svn path=/trunk/; revision=10242
2004-07-21 23:38:15 +00:00
Casper Hornstrup
88662ac62e 2004-07-21 Casper S. Hornstrup <chorns@users.sourceforge.net>
* w32api/include/(GdiPlus.h, GdiPlusBase.h, GdiPlusBrush.h, GdiPlusColor.h,
	GdiPlusColorMatrix.h, GdiPlusEffects.h, GdiPlusEnums.h, GdiPlusFlat.h,
	GdiPlusGpStubs.h, GdiPlusGraphics.h, GdiPlusHeaders.h,
	GdiPlusImageAttributes.h, GdiPlusImaging.h GdiPlusInit.h,
	GdiPlusLineCaps.h, GdiPlusMatrix.h, GdiPlusMem.h, GdiPlusMetaFile.h,
	GdiPlusMetaHeader.h, GdiPlusPath.h, GdiPlusPen.h, GdiPlusPixelFormats.h,
	GdiPlusStringFormat.h, GdiPlusTypes.h): New files.

svn path=/trunk/; revision=10241
2004-07-21 20:10:05 +00:00
Martin Fuchs
6dc20a8084 use same startmenu entries height as MS explorer
svn path=/trunk/; revision=10240
2004-07-21 19:05:19 +00:00
Casper Hornstrup
4175709d6c 2004-07-21 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak, iface/addsys/makefile, iface/native/makefile,
	tools/Makefile: Be quiet if VERBOSE=no.
	* tools/helper.mk: Print module name if it was successfully built.
	* tools/regtests.c, tools/wine2ros/wine2ros.c: Be quiet.

svn path=/trunk/; revision=10239
2004-07-21 18:17:50 +00:00
Alex Ionescu
0b9e69fecf Implemented PsGetThreadFreezeCount, PsGetThreadHardErrorsAreDisabled, PsGetThreadId, PsGetThreadProcess, PsGetThreadProcessId, PsGetThreadSessionId, PsGetThreadTeb, PsGetThreadWin32Thread, PsGetCurrentThreadPreviousMode, PsGetCurrentThreadStackBase, PsGetCurrentThreadStackLimit, PsSetThreadHardErrorsAreDisabled, PsSetThreadWin32Thread
svn path=/trunk/; revision=10238
2004-07-21 01:05:26 +00:00
Alex Ionescu
2afa5d7040 Implemented PsGetProcessCreateTimeQuadPart, PsGetProcessDebugPort, PsGetProcessExitProcessCalled, PsGetProcessExitStatus, PsGetProcessId, PsGetProcessImageFileName, PsGetProcessInheritedFromUniqueProcessId, PsGetProcessPeb,
PsGetProcessPriorityClass, PsGetProcessSectionBaseAddress,
PsGetProcessSecurityPort, PsGetProcessWin32Process,
PsGetProcessWin32WindowStation, PsIsProcessBeingDebugged,
PsGetCurrentProcessSessionId, PsGetProcessSessionId, PsSetProcessPriorityClass, PsSetProcessSecurityPort, PsSetProcessWin32Process, PsSetProcessWin32WindowStation

svn path=/trunk/; revision=10237
2004-07-20 23:58:35 +00:00
Hartmut Birr
f8db6a5d2a - Replaced all single pushf/popf inline assembler instructions with a macro
which doesn't change the stack layout.

svn path=/trunk/; revision=10236
2004-07-20 21:25:36 +00:00
Steven Edwards
54ed416bfe added msacm32.dll to the build. This gets Winamp loading.
Cleaned up the list of libs a bit.

svn path=/trunk/; revision=10235
2004-07-20 19:24:39 +00:00
Steven Edwards
55a9f27fef These files are auto-generated.
svn path=/trunk/; revision=10234
2004-07-20 19:14:48 +00:00
Alex Ionescu
27a729d88d Implemented ImageLoad, MapAndLoad, ImageRvaToVa, ImageRvaToSection, ImageDirectoryEntryToData, GetImageUnusedHeaderBytes and BindImageEx
svn path=/trunk/; revision=10233
2004-07-20 16:48:18 +00:00
Eric Kohl
c5ad1ab780 SeAssignSecurity:
- Build a self-relative security descriptor.
- Inherit owner and group SIDs or assign useful default SIDs.
- Copy DACL from explicit secuity descriptor.

svn path=/trunk/; revision=10232
2004-07-20 12:08:04 +00:00
Filip Navara
ce98b463a5 - Fix handling of METHOD_IN_DIRECT IRPs.
svn path=/trunk/; revision=10231
2004-07-20 11:06:47 +00:00
Steven Edwards
3a9f5e2f86 the resources are still in upper case. Adjust the RC to match this to fix the linux build
svn path=/trunk/; revision=10230
2004-07-19 21:51:49 +00:00
Gregor Anich
10b4b57ad4 Don't interpret \\r\\n as 2 newlines.
svn path=/trunk/; revision=10229
2004-07-19 19:40:01 +00:00
Thomas Bluemel
7497d9c86e fixed calculation of memory address
svn path=/trunk/; revision=10228
2004-07-19 17:55:33 +00:00
Eric Kohl
de32ec78dc - Add @implemented tag to NtMakePermanentObject().
- Capture the security context before calling SeAsignSecurity() and release it later.

svn path=/trunk/; revision=10227
2004-07-19 12:48:59 +00:00
Eric Kohl
ae95148c4b SeCaptureSubjectContext() must not crash if no current thread exists.
svn path=/trunk/; revision=10226
2004-07-19 12:45:56 +00:00
Thomas Bluemel
06272913f0 added missing colors
svn path=/trunk/; revision=10225
2004-07-19 12:13:45 +00:00
Thomas Bluemel
ae734f5bd5 fixed file names
svn path=/trunk/; revision=10224
2004-07-19 09:55:26 +00:00
Thomas Bluemel
f1075c6387 fixed file names
svn path=/trunk/; revision=10223
2004-07-19 09:54:46 +00:00
Alex Ionescu
87ea80f6b7 Added Ps Stubs and Prototypes.
svn path=/trunk/; revision=10222
2004-07-19 06:08:21 +00:00
Alex Ionescu
8aab59acbf Added OPTIMIZED Flag to config file to build optimized versions of NTOSKRNL and WIN32K. Disabled by default.
svn path=/trunk/; revision=10221
2004-07-19 04:52:24 +00:00
Art Yerkes
659a6041bc Forgot to add file tilists.h
svn path=/trunk/; revision=10220
2004-07-19 04:30:04 +00:00
Gero Kuehn
42d52c68a5 added preparations for installing .INF files (for class installers) during setup, added Reactos\Inf
svn path=/trunk/; revision=10219
2004-07-19 01:33:48 +00:00
Filip Navara
48316edcd9 - Change IoReportResourceUsage from using UNIMPLEMENTED macro to just print an message that the function is unimplemented.
svn path=/trunk/; revision=10218
2004-07-18 23:52:50 +00:00
Filip Navara
f810ae11e4 - Change length checking semantics of NtEnumerateKey for KeyBasicInformation.
- Correct buffer size calculations.

svn path=/trunk/; revision=10217
2004-07-18 23:52:38 +00:00
Filip Navara
579f24da75 - Properly set last error in WaitForSingleObjectEx.
svn path=/trunk/; revision=10216
2004-07-18 23:52:31 +00:00
Filip Navara
9ec9ff807a - RegEnumValueW should fill in *lpcbData if lpData == NULL.
svn path=/trunk/; revision=10215
2004-07-18 23:52:30 +00:00
Art Yerkes
6a793b2703 Fixed after prototype change.
svn path=/trunk/; revision=10212
2004-07-18 22:53:59 +00:00
Art Yerkes
a01c282993 Changed include for afd.
svn path=/trunk/; revision=10211
2004-07-18 22:50:52 +00:00
Art Yerkes
0f1eb55991 First commit of afd and msafd onto head.
tcpip: Turned off debug info in CVS.

svn path=/trunk/; revision=10210
2004-07-18 22:49:18 +00:00
Gero Kuehn
cd35daab59 added initial version of the network cpl
svn path=/trunk/; revision=10209
2004-07-18 22:37:08 +00:00
Gero Kuehn
5633682080 added registry entries for the network configuration
svn path=/trunk/; revision=10208
2004-07-18 22:25:05 +00:00
Art Yerkes
6ac4bce416 msafd + afd: Changed type of PVOID args to PAFD_WSABUF, avoiding some casts.
Added some tracing.
Converted afd.sys to use METHOD_NEITHER in the correct places.
oskittcp: Added some tracking in tcp_input and tcp_output to help look for
the ack bug.
tcpip: some cleaning.  Realized that an NTE was getting sent to IPReceive as
the Context parameter, but was later treated as IP_INTERFACE.  Changed
prototypes to keep this from happening again.

svn path=/trunk/; revision=10207
2004-07-18 22:03:49 +00:00
Thomas Bluemel
430efd137f don't create read-only files
svn path=/trunk/; revision=10206
2004-07-18 21:39:55 +00:00
Gregor Anich
06dd253e6e Delete read-only files too.
svn path=/trunk/; revision=10205
2004-07-18 21:15:47 +00:00
Alex Ionescu
c49a1aa591 Fixed broken build. Added functions were already defined in /lib/rtl and unecessary in ntoskrnl.
svn path=/trunk/; revision=10204
2004-07-18 17:45:28 +00:00
Magnus Olsen
288862f4dc *** empty log message ***
svn path=/trunk/; revision=10202
2004-07-18 17:38:17 +00:00
Filip Navara
5586cebc70 - Since DirecrSound is not implemented at all we should return error in DirectSoundCreate.
svn path=/trunk/; revision=10201
2004-07-18 17:16:57 +00:00
Filip Navara
cf649ce107 - Convert the user mode dwDesiredAccess flags in CreateFile to the kernel mode ones that are used by NtCreateFile.
svn path=/trunk/; revision=10200
2004-07-18 17:08:29 +00:00
Filip Navara
6a7a2b5854 - Fallback implementation in waveOut[Un]PrepareHeader.
svn path=/trunk/; revision=10199
2004-07-18 17:06:03 +00:00
Thomas Bluemel
a8da150d8b Added and updated some German translations. Patch by Michael Fritscher.
svn path=/trunk/; revision=10198
2004-07-18 16:07:58 +00:00
Thomas Bluemel
e88c525321 cvs maintainance
svn path=/trunk/; revision=10197
2004-07-18 16:00:05 +00:00
Eric Kohl
4962573e85 Use SeAssignSecurity() to build a security descriptor for a new object.
svn path=/trunk/; revision=10196
2004-07-18 13:03:43 +00:00
Martin Fuchs
04642b4ea7 precompiled header support for GCC 3.4.1
svn path=/trunk/; revision=10194
2004-07-18 13:03:06 +00:00
Eric Kohl
9e08323787 Implement most simple code path of SeAssignSecurity().
svn path=/trunk/; revision=10193
2004-07-18 13:02:28 +00:00
Gregor Anich
9ba0b83e50 Added RosRtlDevModeW2A function.
svn path=/trunk/; revision=10192
2004-07-18 12:51:46 +00:00
Martin Fuchs
b96e6b7b0a eliminate useless GCC warning by initializing the entry variable
svn path=/trunk/; revision=10191
2004-07-18 09:31:02 +00:00
Martin Fuchs
4afe092bc0 fix UNICODE string buffer allocation
svn path=/trunk/; revision=10190
2004-07-18 09:20:38 +00:00
Gregor Anich
f7dff7223a Fix EnumDisplaySettingsExA (did not output anything into devmode)
svn path=/trunk/; revision=10189
2004-07-18 00:36:33 +00:00
Gregor Anich
cec39741e7 Added RosRtlDevModeW2A function.
svn path=/trunk/; revision=10188
2004-07-18 00:30:08 +00:00
Filip Navara
5a725770bc - Fixed memory referencing in mmTaskCreate.
svn path=/trunk/; revision=10187
2004-07-17 22:28:23 +00:00
Thomas Bluemel
e5b2c95bf3 simplified assigning DDI functions
svn path=/trunk/; revision=10186
2004-07-17 21:10:25 +00:00
Eric Kohl
491fa2e1ef Assign a security descriptor to the root directory object.
svn path=/trunk/; revision=10185
2004-07-17 20:34:42 +00:00
Eric Kohl
23dac2681b Create missing default DACLs.
svn path=/trunk/; revision=10184
2004-07-17 20:32:11 +00:00
Gregor Anich
349c610706 Removed some comments - previous change didn't fix infinite re-creation of print.c deps for me.
svn path=/trunk/; revision=10183
2004-07-17 17:37:41 +00:00
Filip Navara
70d717f742 - Disable debug messages.
svn path=/trunk/; revision=10182
2004-07-17 17:24:45 +00:00
Filip Navara
9eee1e99ee - RegQueryValueExW shouldn't touch *lpcbData if lpData == NULL.
svn path=/trunk/; revision=10179
2004-07-17 16:09:07 +00:00
Gregor Anich
96e0da3b7b Changed comments a bit, previous version did create print.c dependencies over and over again for me.
svn path=/trunk/; revision=10178
2004-07-17 15:52:43 +00:00
Gregor Anich
1bd5f9a981 Handle return value 0 from ExtEscape as special case (means to use the default driver)
svn path=/trunk/; revision=10177
2004-07-17 15:13:37 +00:00
Gregor Anich
13bc74184a Handle escape to get opengl driver info in IntEngExtEscape to avoid the infinite loop in the UNIMPLEMENTED macro (needed by opengl32.dll)
svn path=/trunk/; revision=10176
2004-07-17 15:12:25 +00:00
Eric Kohl
a3a123ab31 Implement NtMakePermanentObject().
svn path=/trunk/; revision=10175
2004-07-17 12:08:21 +00:00
Alex Ionescu
14f18e7d6d Added exports for new stubs and fixed some issues with recently commited stubs.
svn path=/trunk/; revision=10174
2004-07-17 05:13:05 +00:00
Alex Ionescu
c015d55c31 Added keys for Winsock
svn path=/trunk/; revision=10173
2004-07-17 04:17:32 +00:00
Alex Ionescu
6a9ab71231 Added keys for Winsock
svn path=/trunk/; revision=10172
2004-07-17 04:04:08 +00:00
Alex Ionescu
4762b47e36 Added New System Call Prototypes and Stubs
svn path=/trunk/; revision=10171
2004-07-17 03:07:00 +00:00
Alex Ionescu
e7874284d0 Added Mm Prototypes
svn path=/trunk/; revision=10170
2004-07-17 03:04:45 +00:00
Alex Ionescu
a0e9802e90 Added Mm Stubs
svn path=/trunk/; revision=10169
2004-07-17 03:03:52 +00:00
Gregor Anich
60676902f6 Fix loading of default driver.
svn path=/trunk/; revision=10168
2004-07-17 02:26:33 +00:00
Alex Ionescu
858364e468 Added keys for Winsock
svn path=/trunk/; revision=10167
2004-07-17 01:12:24 +00:00
Gregor Anich
a69987ef04 Add registry entries for the Mesa OpenGL driver.
svn path=/trunk/; revision=10166
2004-07-16 23:53:38 +00:00
Gregor Anich
3351ce053d Fixed more warnings, compiles with -Werror now.
svn path=/trunk/; revision=10165
2004-07-16 23:48:54 +00:00
Steven Edwards
73cbc815c1 moved these docs to a folder. The file names broke the
livecd build

svn path=/trunk/; revision=10164
2004-07-16 23:41:14 +00:00
Filip Navara
cf38bc01b7 - Get rid of linker warnings.
svn path=/trunk/; revision=10163
2004-07-16 23:37:26 +00:00
Gregor Anich
e62f0e4796 Fix warning.
svn path=/trunk/; revision=10162
2004-07-16 23:35:19 +00:00
Gregor Anich
3231bd4977 Remove unused files.
svn path=/trunk/; revision=10161
2004-07-16 23:29:10 +00:00
Alex Ionescu
37b963937e Added keys for Winsock
svn path=/trunk/; revision=10160
2004-07-16 23:28:55 +00:00
Gregor Anich
a535f99338 Fix some warnings.
svn path=/trunk/; revision=10159
2004-07-16 23:21:04 +00:00
Steven Edwards
89746fb06e cleanup
svn path=/trunk/; revision=10157
2004-07-16 23:01:56 +00:00
Steven Edwards
0ff1d5da1c Fix building on Linux
svn path=/trunk/; revision=10156
2004-07-16 22:59:43 +00:00
Gregor Anich
6d2d63a8e1 Fix unknown pragma warnings and gl.h include for linux builds.
svn path=/trunk/; revision=10155
2004-07-16 22:54:48 +00:00
Gregor Anich
794c39610f Fix unknown pragma warnings.
svn path=/trunk/; revision=10154
2004-07-16 22:45:08 +00:00
Steven Edwards
76b091d0f5 added Spanish translation by Carlos Garcia Gomez.
svn path=/trunk/; revision=10152
2004-07-16 22:33:23 +00:00
Gregor Anich
46de716b21 Import Mesa-6.0.1 for use as software OpenGL renderer.
svn path=/trunk/; revision=10151
2004-07-16 22:32:04 +00:00
Steven Edwards
9be76f0f19 added Spanish translation by Carlos Garcia Gomez.
svn path=/trunk/; revision=10150
2004-07-16 22:24:24 +00:00
Gregor Anich
6fc4d22bde Import Mesa-6.0.1 for use as software OpenGL renderer.
svn path=/trunk/; revision=10149
2004-07-16 22:12:43 +00:00
Gregor Anich
a3ce97af9b Import Mesa-6.0.1 for use as software OpenGL renderer.
svn path=/trunk/; revision=10148
2004-07-16 21:50:40 +00:00
Jens Collin
15971f9aa5 ShellExecute is run when executable is not found to open for example Notepad files by typing "myfile.txt".
svn path=/trunk/; revision=10147
2004-07-16 20:39:06 +00:00
Filip Navara
016e6a3f65 - Implementation of mmTaskCreate. Based on patch by Eric Pouech.
svn path=/trunk/; revision=10146
2004-07-16 20:24:59 +00:00
Thomas Bluemel
f82a992ec2 fixed typo
svn path=/trunk/; revision=10145
2004-07-16 20:20:53 +00:00
Eric Kohl
fa2ac0c0ca Fix an old typo.
svn path=/trunk/; revision=10144
2004-07-16 19:54:05 +00:00
Art Yerkes
fbdcc7cb6f Fonts converted by Larry Snyder
Converted suitably licensed X fonts from type 1 to TTF for use in ROS.

svn path=/trunk/; revision=10143
2004-07-16 17:21:05 +00:00
Eric Kohl
9d87061713 Implement security descriptor cache.
svn path=/trunk/; revision=10142
2004-07-16 17:20:23 +00:00
Gregor Anich
243d59c9e6 Fix some bugs, works on Windows and ReactOS with Mesa and NVIDIA driver.
x86 asm version of gl dispatch functions work now too (in gl.c)

svn path=/trunk/; revision=10141
2004-07-16 16:16:16 +00:00
Alex Ionescu
28e3667b69 Fixed prototypes to work in MSVC.
svn path=/trunk/; revision=10139
2004-07-16 13:45:02 +00:00
Filip Navara
3ab4ec1f54 - Handle indexed palettes in IntEngCreateSrcMonoXlate.
svn path=/trunk/; revision=10135
2004-07-15 21:14:51 +00:00
Martin Fuchs
e7d21fa39e ignore unexpected exceptions while extracting icons
svn path=/trunk/; revision=10133
2004-07-15 21:04:02 +00:00
Martin Fuchs
4fd7ec5f63 replace BUFFER_LEN by dynamic allocations
svn path=/trunk/; revision=10132
2004-07-15 20:43:18 +00:00
Filip Navara
3281baa0bf - Minor correction to DIB_32BPP_BitBlt that I broke with my last patch.
svn path=/trunk/; revision=10126
2004-07-15 18:13:22 +00:00
Eric Kohl
64b9c0f3cc Implement RtlAddAuditAccessAceEx().
svn path=/trunk/; revision=10125
2004-07-15 08:15:49 +00:00
James Tabor
b1fb96b44c Clear Partition0 DriveNotReady, for Removable Media.
svn path=/trunk/; revision=10124
2004-07-15 04:04:08 +00:00
Art Yerkes
e6f5d067e0 oskittcp: fixed handling of uio in send.
afd: fixed send.
tcpip: fixed double-complete of send irp.

svn path=/trunk/; revision=10122
2004-07-15 03:21:47 +00:00
Art Yerkes
9ce1fe0ddb Small changes to debug output in catalog, handle, upcall.
ns.c -- getservbyport contributed by Cameron Palmer.

svn path=/trunk/; revision=10121
2004-07-15 02:03:07 +00:00
Steven Edwards
c26b523ad9 added Spanish translation by Carlos Garcia Gomez.
svn path=/trunk/; revision=10120
2004-07-14 22:20:07 +00:00
Steven Edwards
383e5a9c1a Warn rather than bail on HWND_MESSAGE windows
request. This gets the Scintilla Editor from theopencd to work.

svn path=/trunk/; revision=10119
2004-07-14 21:52:23 +00:00
Filip Navara
3baccc96f1 - Accidently commited this file with my last patch. Reverting.
svn path=/trunk/; revision=10118
2004-07-14 21:45:05 +00:00
Filip Navara
219e1664cf - Add FIXME comment to LoadIconImage.
svn path=/trunk/; revision=10117
2004-07-14 20:52:13 +00:00
Filip Navara
dcbabca872 - Change the prototype of DIB_*_BitBlt* functions to take a pointer to a BLTINFO structure instead of many parameters.
- Make DIB_GetSource and DIB_GetSourceIndex macros.
- Add IntEngCreateSrcMonoXlate.
- Change the semantics of IntEngCreate*Xlate functions to treat palette mode == 0 as mode of the passed palette.
- Add XlateBrush and XlatePen to the DC structure.
- Fixed the bad design decision that caused mess when one brush was selected into more than one DC.
- Remove incorrect Int[Get/Set]DCColor implementation (used by [Get/Set]DC[Pen/Brush]Color).
- Get rid of compiler warnings in Win32k.

svn path=/trunk/; revision=10116
2004-07-14 20:48:58 +00:00
Steven Edwards
d0ba990059 Sync msacm32 with Winehq cvs. will merge my tweaks soon.
This gets Winamp5 loading.

svn path=/trunk/; revision=10115
2004-07-14 18:30:54 +00:00
Steven Edwards
d1d2a0a14a Use Bitstream Vera Sans for Helv subsititute. This makes the Run dialog readable. Thanks to Filip Navara.
svn path=/trunk/; revision=10114
2004-07-14 17:47:03 +00:00
Steven Edwards
93cfddbb38 Added licensing page to usetup.
svn path=/trunk/; revision=10112
2004-07-14 16:24:00 +00:00
Eric Kohl
c6ec21e207 - Move access checks from NtAccessCheck() to SeAccessCheck().
- Check for 'take ownership' privilege.

svn path=/trunk/; revision=10111
2004-07-14 14:25:31 +00:00
Gé van Geldorp
6e17c87e59 Split "old-style Win 3.1" file dialog into 16 and 32 bit code
svn path=/trunk/; revision=10110
2004-07-14 06:52:29 +00:00
Filip Navara
cbda303409 - Revert part of my last TLS patch.
svn path=/trunk/; revision=10109
2004-07-14 02:40:45 +00:00
Eric Kohl
91946de006 First experimental implementstion of NtAccessCheck().
This should fix bug #362.

svn path=/trunk/; revision=10108
2004-07-13 16:59:35 +00:00
Eric Kohl
4cc77e37cc Move some access rights so they are usable form kernel-mode.
svn path=/trunk/; revision=10107
2004-07-13 16:57:35 +00:00
Eric Kohl
3e7bd9bd79 RtlImpersonateSelf(): Set impersonation level in call to NtDuplicateToken().
svn path=/trunk/; revision=10106
2004-07-13 11:52:09 +00:00
Eric Kohl
3ed7b52fb9 NtOpenThreadToken() opens the thread token if OpenAsSelf is FALSE.
svn path=/trunk/; revision=10105
2004-07-13 11:48:32 +00:00
Eric Kohl
eda69bc46f NtDuplicateToken() must create and return a handle to the duplicated token.
svn path=/trunk/; revision=10104
2004-07-13 08:43:35 +00:00
James Tabor
6e5edb7df9 Force a rebuild of the partition table if it already exists with a DeviceObject.
svn path=/trunk/; revision=10103
2004-07-13 02:43:06 +00:00
Gé van Geldorp
1605dba90a SetLogonNotifyWindow is now implemented
svn path=/trunk/; revision=10102
2004-07-12 22:34:27 +00:00
Gé van Geldorp
9a26dd9c78 Fix RestartDialog() and RestartDialogEx() prototypes
svn path=/trunk/; revision=10101
2004-07-12 22:07:34 +00:00
Gé van Geldorp
0cffba8389 Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Make ole32 a delay-load import of shell32.
(except that the ReactOS build system doesn't handle delay-load imports
yet, so make it a normal import)

svn path=/trunk/; revision=10100
2004-07-12 22:03:09 +00:00
Gé van Geldorp
bd1c1f6d7b Fix syntax problem for some windres versions
svn path=/trunk/; revision=10099
2004-07-12 22:01:22 +00:00
Gé van Geldorp
935851acb6 Ilya Korniyko <k_ilya@ukr.net>
- Added Ukrainian translations.
Jos� Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated the Spanish shell32 translation and made some corrections to
  other language files.

svn path=/trunk/; revision=10098
2004-07-12 21:26:39 +00:00
Gé van Geldorp
55dc46bf13 Use string resources for ExitWindowsDialog() and RestartDialogEx() to allow
internationalization.

svn path=/trunk/; revision=10097
2004-07-12 20:53:24 +00:00
Gé van Geldorp
aa38cd0cd1 Marcus Meissner <marcus@jet.franken.de>
- Fixed double applet = applet = assignment.
- Removed sic_hdpa only used in 1 C file as static var.
- Make VT_Shell_IMalloc32 and related variables static.

svn path=/trunk/; revision=10096
2004-07-12 20:32:16 +00:00
Gé van Geldorp
a1f4820c31 Shutdown step 1: inform winlogon (forgotten file)
svn path=/trunk/; revision=10095
2004-07-12 20:26:35 +00:00
Gé van Geldorp
4ce7742222 Shutdown step 1: inform winlogon
svn path=/trunk/; revision=10094
2004-07-12 20:09:35 +00:00
Eric Kohl
16a868a4e7 Replace hardcoded values by new constants.
svn path=/trunk/; revision=10092
2004-07-12 19:39:29 +00:00
Thomas Bluemel
11997022fd forgot to export 2 functions
svn path=/trunk/; revision=10091
2004-07-12 16:27:46 +00:00
Thomas Bluemel
32b2a4dc1a implementation of HidD_GetHidGuid()
svn path=/trunk/; revision=10090
2004-07-12 16:04:37 +00:00
Thomas Bluemel
ef8c92364b added stubs for the Hid User Library (hid.dll)
svn path=/trunk/; revision=10089
2004-07-12 15:08:43 +00:00
Eric Kohl
32e7b224da Define missing PNTSTATUS.
svn path=/trunk/; revision=10088
2004-07-12 13:51:29 +00:00
Eric Kohl
72b6ef30e7 Fix NtAccessCheck() prototype.
svn path=/trunk/; revision=10087
2004-07-12 12:05:49 +00:00
Thomas Bluemel
ad9cdc4edc simplified dynamic loading of dlls
svn path=/trunk/; revision=10086
2004-07-12 10:33:04 +00:00
Thomas Bluemel
6535d130b7 removed wrong comments
svn path=/trunk/; revision=10085
2004-07-11 23:08:31 +00:00
Thomas Bluemel
02c02382be do not statically link to ole32.dll, import the functions dynamically instead. This is required since winlogon statically links to userenv.dll and then ole32.dll would automatically be loaded which causes ole32.dll to register a window class before the first window station is created (-> the ole32 window class(es) couldn't be registered). Besides it's bad to have winlogon depend on ole32.dll
svn path=/trunk/; revision=10083
2004-07-11 22:35:07 +00:00
Gé van Geldorp
093e925a66 Use default PATHEXT if none found in environment
svn path=/trunk/; revision=10082
2004-07-11 16:23:12 +00:00
Gé van Geldorp
c8d9ece95d Jens Collin <jens.collin@lakhei.com>
Add PATHEXT env var and use it to locate command

svn path=/trunk/; revision=10081
2004-07-11 16:13:44 +00:00
Eric Kohl
839cdb0644 Add missing security constants.
svn path=/trunk/; revision=10080
2004-07-11 16:09:37 +00:00
Eric Kohl
8d58125bdc Fix typo in SetSecurityDescriptorOwner().
svn path=/trunk/; revision=10079
2004-07-11 13:33:40 +00:00
Thomas Bluemel
f85cea6c2c register the winlogon application directly after startup
svn path=/trunk/; revision=10078
2004-07-11 13:31:28 +00:00
Filip Navara
85cec6dde5 - Fixed locking in NtGdiGetCharWidth32. This caused problems with AbiWord reported by Jason Filby.
svn path=/trunk/; revision=10076
2004-07-11 02:10:48 +00:00
Thomas Bluemel
ce4aa8ef2e added a key security editor (not yet working properly)
svn path=/trunk/; revision=10075
2004-07-10 23:25:17 +00:00
Thomas Bluemel
13eda5be1f added some missing definitions
svn path=/trunk/; revision=10074
2004-07-10 23:23:06 +00:00
Gero Kuehn
b563ceb9af added SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
svn path=/trunk/; revision=10073
2004-07-10 22:27:18 +00:00
Gero Kuehn
948db6b780 fixed PROPSHEETHEADER nPages calculation
svn path=/trunk/; revision=10072
2004-07-10 22:06:40 +00:00
Gero Kuehn
7933210d3c copied HalRequestSoftwareInterrupt from uniproc irql.c to fix SMP builds
svn path=/trunk/; revision=10071
2004-07-10 21:58:35 +00:00
Steven Edwards
14a26ef7bf added expand.exe and msvfw32.dll to the build.
svn path=/trunk/; revision=10070
2004-07-10 21:44:14 +00:00
Gé van Geldorp
c01cec79d9 Roll back __USE_W32API test, add _tsplitpath definition
svn path=/trunk/; revision=10069
2004-07-10 21:23:18 +00:00
Steven Edwards
2396faea94 Added msvfw32 ported from Wine. This fixes bug 388.
svn path=/trunk/; revision=10068
2004-07-10 21:19:46 +00:00
Eric Kohl
e32637bc50 Fix default DACL of the logon token.
svn path=/trunk/; revision=10067
2004-07-10 21:15:26 +00:00
Steven Edwards
43a041190d Removed Microsoft code.
svn path=/trunk/; revision=10066
2004-07-10 21:11:13 +00:00
Hartmut Birr
3768902d9b - Implemented NtQueryVirtualMemory for unallocated regions.
- Fixed some minor bugs in NtQueryVirtualMemory and its related query functions.

svn path=/trunk/; revision=10065
2004-07-10 17:01:03 +00:00
Thomas Bluemel
35f4d34682 export GetSecurityInfo()
svn path=/trunk/; revision=10064
2004-07-10 14:38:24 +00:00
Eric Kohl
5b9cf862e0 Create group SIDs for logon token.
svn path=/trunk/; revision=10063
2004-07-10 13:12:24 +00:00
Eric Kohl
39da3d41f9 Fix RtlEqualSid().
svn path=/trunk/; revision=10062
2004-07-10 13:11:18 +00:00
Hartmut Birr
7f900f8f7e - Fixed the return value in VirtualQueryEx if NtQueryVirtualMemory returns an error.
svn path=/trunk/; revision=10061
2004-07-10 13:08:02 +00:00
Hartmut Birr
95e1a9b247 - Fixed the comparing of video modes in IntInitScreenInfo.
svn path=/trunk/; revision=10060
2004-07-10 13:05:08 +00:00
Gé van Geldorp
4f24993634 FindWindow() should search the threads desktop, not the active one.
svn path=/trunk/; revision=10059
2004-07-09 20:57:38 +00:00
Filip Navara
fe2b1d6967 - Implementation of [NtGdi]GetTextFace[W] and [NtGdi]GetFontData[W].
- Print a message for unimplemented functions in GDI32.dll.

svn path=/trunk/; revision=10058
2004-07-09 20:28:20 +00:00
Thomas Bluemel
549b154510 added skeleton for acledit.dll
svn path=/trunk/; revision=10056
2004-07-09 20:18:49 +00:00
Filip Navara
91995ef4ed - Some application depend on Info->RegionSize set by NtQueryVirtualMemory for iteration. We had a workaround here for this behaviour until a correct implementation is written, but it was limited for addresses lower than 0x70000000. Raise that limit to 0x80000000.
svn path=/trunk/; revision=10055
2004-07-09 20:14:49 +00:00
Filip Navara
79a4726093 - Handle UnsafeRect == NULL case in NtUserGetUpdateRect.
svn path=/trunk/; revision=10054
2004-07-09 20:13:00 +00:00
Filip Navara
35a256ae2b - Since LookupAccountSidA is unimplemented, but returns success, we should at least fill the output parameters with some reasonable values.
svn path=/trunk/; revision=10053
2004-07-09 20:10:45 +00:00
Filip Navara
d45a8c1356 - DrawIcon should return TRUE if it succeeds.
svn path=/trunk/; revision=10052
2004-07-09 20:09:35 +00:00
Filip Navara
a2f7e34792 - Display window icon only if there is any.
svn path=/trunk/; revision=10051
2004-07-09 20:08:48 +00:00
Filip Navara
2915b7de9b - Corrected the obtaining of TLS callbacks address.
svn path=/trunk/; revision=10050
2004-07-09 20:08:05 +00:00
Filip Navara
18168b454a - Fixed dispatching of nested exceptions.
svn path=/trunk/; revision=10049
2004-07-09 20:06:40 +00:00
Filip Navara
b00489100f - Added ordinal numbers.
svn path=/trunk/; revision=10048
2004-07-09 20:04:05 +00:00
Thomas Bluemel
1ef5953679 set the control focus when clicking on it
svn path=/trunk/; revision=10047
2004-07-09 15:53:34 +00:00
Gé van Geldorp
4a76a3915b Fix lib/rosrtl compilation
svn path=/trunk/; revision=10039
2004-07-08 22:05:48 +00:00
Eric Kohl
5b95f50fd4 Register the logon process.
svn path=/trunk/; revision=10037
2004-07-08 14:41:38 +00:00
Eric Kohl
29ced92e4b Fix RegisterLogonProcess().
svn path=/trunk/; revision=10036
2004-07-08 14:36:18 +00:00
Filip Navara
3e78fd6128 - Honor the "Extended" bit in SetKeyState.
svn path=/trunk/; revision=10035
2004-07-08 12:55:01 +00:00
Thomas Bluemel
cf7372bf5a added a very basic timer queue test program
svn path=/trunk/; revision=10034
2004-07-08 10:32:18 +00:00
Art Yerkes
aa565ab062 Fixed OskitTCPSend prototype.
sleep: removed blocking.  not needed anymore.
Made socket non-blocking with respect to oskit.
removed unneeded panic in sbflush.
removed unneeded stats keeping.  This info is better kept by tcpip.sys

svn path=/trunk/; revision=10033
2004-07-08 06:39:30 +00:00
Art Yerkes
494edc04e5 Fixed for TCPIP
Regularized TCPSendData and TCPReceiveData parameters and calling.
Added number of bytes IoStatus for TDI_SEND_DATAGRAM and TDI_SEND as
specified in the OSR entry for TDI_SEND_DATAGRAM.
Fixed IRQL in packet send event.  We now use KeRaiseIrql to make sure we're
in DISPATCH_LEVEL.
Fixed socket state callback for new afd.  Now fully based on io completion.

svn path=/trunk/; revision=10032
2004-07-08 06:36:04 +00:00
Thomas Bluemel
aa11660dd0 fixed debug output
svn path=/trunk/; revision=10031
2004-07-08 00:48:12 +00:00
Thomas Bluemel
76cd746a0f Fixed handling of NULL arguments in ChangeDisplaySettings(Ex)(). Patch by blight.
svn path=/trunk/; revision=10030
2004-07-08 00:46:22 +00:00
Thomas Bluemel
580f2e7a68 1. implemented the timer queue functions of kernel32 (I tested the implementation of CreateTimerQueueTimer() and DeleteTimerQueueTimer() on windows)
2. export the timer queue Rtl* stubs of ntdll

svn path=/trunk/; revision=10029
2004-07-08 00:40:31 +00:00
Gé van Geldorp
8d126dbfc4 Add command-line shutdown/logoff utility
svn path=/trunk/; revision=10028
2004-07-07 22:29:37 +00:00
Eric Kohl
6d616faf61 Add ACCESS_STATE and INITIAL_PRIVILEGE_SET.
svn path=/trunk/; revision=10020
2004-07-07 17:20:35 +00:00
Filip Navara
596469a0b6 - Updated system colors.
svn path=/trunk/; revision=10019
2004-07-07 17:03:32 +00:00
Filip Navara
825a514a46 - Use LinBytesPerScanLine (value for linar framebuffer modes) instead of BytesPerScanLine for VBE 3.0 controllers.
svn path=/trunk/; revision=10018
2004-07-07 16:54:43 +00:00
Filip Navara
e4848fe100 - Return image name in SymGetModuleInfo since some applications use it for determining path. It's still a stub though.
svn path=/trunk/; revision=10017
2004-07-07 16:50:54 +00:00
Thomas Bluemel
680d163578 added missing cvsignore file
svn path=/trunk/; revision=10016
2004-07-07 16:47:43 +00:00
Filip Navara
226251dab1 - Don't create XLATEOBJ for BitBlt and StretchBlt operations that don't use source DC.
svn path=/trunk/; revision=10015
2004-07-07 16:36:08 +00:00
Filip Navara
bce67c86c4 - Fixed ExcludeClipRgn for case when DC contained no clipping region before the call to this function.
svn path=/trunk/; revision=10014
2004-07-07 16:34:33 +00:00
Filip Navara
bf1db388a0 - Handle allocation failure in IntCreateBitmap.
- Don't allow creating surface with BitmapFormat == 0 (Invalid) in IntCreateSurface.

svn path=/trunk/; revision=10013
2004-07-07 16:33:44 +00:00
Filip Navara
eb298d6e01 - Imporved implementation of UnhandledExceptionFilter.
- Moved most of code from _except_handler in process/create.c to UnhandledExceptionFilter and changed _except_handler to call it.

svn path=/trunk/; revision=10012
2004-07-07 16:32:02 +00:00
Filip Navara
be3d5c04da - Fixed NtQueryInformationProcess to return STATUS_NOT_IMPLEMENTED for unimplemented cases.
svn path=/trunk/; revision=10011
2004-07-07 16:28:35 +00:00
Filip Navara
bfb94c6d6f - Fixed RtlUnwind to correctly remove SEH frames and not to call ZwContinue.
svn path=/trunk/; revision=10010
2004-07-07 16:25:00 +00:00
Filip Navara
7a25c2785c - Add VBE video mode registry. (Gerard Gatineau asked for it)
svn path=/trunk/; revision=10009
2004-07-07 16:22:22 +00:00
Eric Kohl
6a871dff66 Implement environment variable dialog.
svn path=/trunk/; revision=10008
2004-07-07 09:42:58 +00:00
Gé van Geldorp
f79ec69b9c Set default (Administrator) privileges when logging on
svn path=/trunk/; revision=10007
2004-07-07 08:41:47 +00:00
Gé van Geldorp
20180bf59f Silence debug messages
svn path=/trunk/; revision=10006
2004-07-07 08:39:54 +00:00
Gé van Geldorp
f390319086 Implement LookupPrivilegeValueW for local machine
svn path=/trunk/; revision=10005
2004-07-06 22:08:48 +00:00
Gé van Geldorp
37635ba853 Make AdjustTokenPrivileges confirm to MSDN-documented behaviour:
- return FALSE on error with appropriate LastError
- return TRUE with LastError == ERROR_NOT_ALL_ASSIGNED if not all
  privileges could be adjusted
- return TRUE with LastError == ERROR_SUCCESS if all privileges
  were successfully adjusted

svn path=/trunk/; revision=10004
2004-07-06 22:07:26 +00:00
Royce Mitchell III
f54f6b9018 fixed typo
svn path=/trunk/; revision=10003
2004-07-05 22:33:14 +00:00
Gé van Geldorp
ad83568979 Patch by Jens Collin <jens.collin@lakhei.com>
Fixes autocompletion, see bug #177

svn path=/trunk/; revision=10002
2004-07-05 22:12:45 +00:00
Hartmut Birr
1b16d86ba8 - Check for a valid buffer on a call to IOCTL_DISK_CHECK_VERIFY.
svn path=/trunk/; revision=10001
2004-07-05 21:44:27 +00:00
Hartmut Birr
405e3b3822 - Removed IOCTL_DISK_CHECK_VERIFY. We must use the port driver to detect the current state of the drive.
svn path=/trunk/; revision=10000
2004-07-05 21:42:05 +00:00
Hartmut Birr
fac1d981b1 - Removed the using of the media change count to recognize a median change.
svn path=/trunk/; revision=9999
2004-07-05 21:39:02 +00:00
Jason Filby
52f4f6acef lstrcpy and lstrcat should return NULL if the string to copy to is NULL instead of crashing; verified by a test app on Windows XP
svn path=/trunk/; revision=9998
2004-07-04 18:11:49 +00:00
Filip Navara
907bf3c0a8 - Fixed NumLock, CapsLock and ScrollLock handling in ConioGetShiftState.
svn path=/trunk/; revision=9997
2004-07-04 17:22:33 +00:00
Filip Navara
91008697a8 - Use absolute value of the color difference when calculating color match rating.
svn path=/trunk/; revision=9996
2004-07-04 17:09:45 +00:00
Filip Navara
dd64375195 - Guard against out of bounds access to KeyboardLayout->pusVSCtoVK in W32kKeyProcessMessage.
- Fixed SetKeyState to correctly index the keyboard state table.

svn path=/trunk/; revision=9995
2004-07-04 17:08:40 +00:00
Filip Navara
78ae714754 - Fix GDI object locking broken by this patch:
http://reactos.com:8080/archives/public/ros-cvs/2004-July/004334.html

svn path=/trunk/; revision=9994
2004-07-04 12:00:40 +00:00
Filip Navara
390647c9fb - Send the cursor to display driver in top-down format.
svn path=/trunk/; revision=9993
2004-07-04 11:18:56 +00:00
Hartmut Birr
5c7b116b28 - Fixed a bug in IoCsqRemoveIrp and IoCsqRemoveNextIrp.
svn path=/trunk/; revision=9992
2004-07-04 08:30:28 +00:00
Gé van Geldorp
62a8ad0e87 Mike McCormack <mike@codeweavers.com>
- Fix a buffer overrun in autocomplete.

svn path=/trunk/; revision=9991
2004-07-04 06:56:41 +00:00
Filip Navara
31456c578a - Don't continue execution if there is no exception handler. It's common that continuing such execution would result in the same exception again and thus creating infinite loop.
svn path=/trunk/; revision=9990
2004-07-04 02:01:02 +00:00
Filip Navara
9ac102fb17 - Support resursive locking of the GDI objects.
- Call EngMovePointer instead of DrvMovePointer if driver DrvSetPointerShape returned SPS_DECLINE.

svn path=/trunk/; revision=9989
2004-07-04 01:23:32 +00:00
Royce Mitchell III
f5d1bff687 small fix to constant we aren't even using, yet, but should
svn path=/trunk/; revision=9988
2004-07-04 00:33:26 +00:00
Filip Navara
05345c056a - Allocate memory from paged pool in EngAllocMem.
svn path=/trunk/; revision=9987
2004-07-03 22:36:27 +00:00
Filip Navara
0c94f9e2c2 - Fixed buffer handling and coordinate translation in IntGdiPolyline.
svn path=/trunk/; revision=9986
2004-07-03 22:36:01 +00:00
Filip Navara
4d9b237e6d - Don't use the "cpu" directive because NASM 0.98 doesn't support it.
svn path=/trunk/; revision=9985
2004-07-03 18:41:56 +00:00
Filip Navara
8fab52126f - Fix errors during optimized build.
svn path=/trunk/; revision=9983
2004-07-03 17:40:27 +00:00
Hartmut Birr
e251c53983 - Fixed a bug, which prevents an opening of files, if the file name contains short path names.
svn path=/trunk/; revision=9982
2004-07-03 17:31:30 +00:00
Hartmut Birr
ba93d9c7b0 - Implemented GuiConsoleHandleClose.
svn path=/trunk/; revision=9981
2004-07-03 17:17:05 +00:00
Hartmut Birr
c973b907c8 - Try to get or to allocate the process data structure in ServerApiPortThread.
- Changed the initialization sequence in CsrServerInitialization.

svn path=/trunk/; revision=9980
2004-07-03 17:15:02 +00:00
Hartmut Birr
9a64b81079 - Allowed multiple calls to CsrClientConnectToServer.
- Removed CsrIsCsrss.

svn path=/trunk/; revision=9979
2004-07-03 17:13:09 +00:00
Gé van Geldorp
60d9c7030d Remove debugging statement
svn path=/trunk/; revision=9978
2004-07-03 14:46:39 +00:00
Filip Navara
0a89ed6e1c [Sorry for too many changes in one patch, but it's nearly impossible to separate it without breaking the functionality]
- Remove the eng/brush.h header and all occurrences of BRUSHINST.
- Remove eng/nls.c and make the NLS functions forward exports to ntoskrnl.
- Remove DDBITMAP definition.
- Overall cleanup of eng/xlate.c.
- Stop processing if exact match is found in ClosestColorMatch.
- Move SURFGDI->PointerStatus to GDIDEVICE structure.
- Remove the GDIDEVICE->DriverLock.
- Replace BITMAP by SURFOBJ in BITMAPOBJ structure and added two new members (Flags and Hooks).
- Replace function pointers to driver functions in SURFGDI with flHooks variable specifying the bitmask of hooked functions.
- Added two new macros: GDIDEV and GDIDEVFUNCS.
- Fixed locking in NtGdiGetBitmapBits.
- Removed IntCopyBitmap and replaced it's usage by BITMAPOBJ_CopyBitmap.
- Fixed setting of SURFOBJ->pvBits and SURFOBJ->pvScan0 in EngCreateBitmap for bottom-up surfaces.
- Fix DPRINTs.
- Remove unused definitions from eng/objects.h.
- Call IntEngBitBlt instead of EngBitBlt from EngCopyBits.
- Correctly set the SURFOBJ->hsurf field.
- Merge Engine surface handling with the GDI one and remove DC->Surface, SURFGDI, BitmapToSurf.
- Support for bottom-up mouse cursors in the Eng* cursor emulation routines.
- Fix locking in error cases of NtGdiRestoreDC (get Primitives demo to start).
- Fix BitmapFormat to return 0 for unknown bit depth.
- Move code from EngCreateBitmap to IntCreateBitmap and use this function in EngCreateBitmap, NtGdiCreateBitmap and DIB_CreateDIBSection.
- New implementation of NtGdiGetDIBits.

svn path=/trunk/; revision=9977
2004-07-03 13:55:37 +00:00
Filip Navara
ac183abd23 - Handle correctly bottom-up surfaces in the VGA driver.
svn path=/trunk/; revision=9976
2004-07-03 13:45:42 +00:00
Gé van Geldorp
40afa3d500 NtCreateKey doesn't create nested keys, but RegCreateKey should. Fixes
issues 2) and 3) of bug #331

svn path=/trunk/; revision=9975
2004-07-02 21:20:51 +00:00
Royce Mitchell III
14377c13f5 small cleanup
svn path=/trunk/; revision=9974
2004-07-02 21:02:54 +00:00
Eric Kohl
8af3ba8548 Add partial implementation of the environment variables dialog.
svn path=/trunk/; revision=9973
2004-07-02 20:28:00 +00:00
Gé van Geldorp
0155d5acde Only accept matching palette
svn path=/trunk/; revision=9972
2004-07-02 20:04:48 +00:00
Royce Mitchell III
b04f8c0e22 oops, if you're going to move a function, get rid of the old one... sorry...
svn path=/trunk/; revision=9971
2004-07-02 12:43:38 +00:00
Gé van Geldorp
386450b018 Fix WinExec return value
svn path=/trunk/; revision=9970
2004-07-02 12:18:04 +00:00
Thomas Bluemel
7bca32fad2 allow changing the cursor position with the mouse
svn path=/trunk/; revision=9969
2004-07-02 08:46:50 +00:00
Art Yerkes
9860c72592 Added installation of services file needed for getservbyname and kin.
The services file was created by Cameron Palmer from the official IANA
list.

svn path=/trunk/; revision=9968
2004-07-02 08:06:47 +00:00
Royce Mitchell III
c76e499296 NtRaiseException fixed to not clobber EAX any more, and both NtContinue and NtRaiseException no longer clobber EDX. kmode SEH works now, but there are likely some lingering bugs. This patch was made possible by the collaborative efforts of myself, kjk_hyperion, Art Yerkes, and Skywing.
svn path=/trunk/; revision=9967
2004-07-02 01:36:25 +00:00
Alex Ionescu
6a225669b5 Services file for WS2_32.dll, created by Cameron Palmer.
svn path=/trunk/; revision=9966
2004-07-02 01:26:29 +00:00
Royce Mitchell III
2275555927 (remove old disabled code)
svn path=/trunk/; revision=9965
2004-07-02 01:23:26 +00:00
Royce Mitchell III
837baf14b4 NtContinue fixed to return failure on invalid params ( not checking for access violations yet ), but not clobber EAX on success. This patch was made possiblel by the collaborative efforts of myself, kjk_hyperion, Art Yerkes, and Skywing.
svn path=/trunk/; revision=9964
2004-07-02 00:47:57 +00:00
Royce Mitchell III
8467d37d7d merge in kjk_hyperion's ZwContinue test
svn path=/trunk/; revision=9963
2004-07-01 23:58:44 +00:00
Thomas Bluemel
d0ea8e8ce1 merge patch from wine by Robert Shearman (http://www.winehq.org/hypermail/wine-patches/2004/06/0108.html)
svn path=/trunk/; revision=9962
2004-07-01 23:56:04 +00:00
Thomas Bluemel
ecae0d0647 some little fixes
svn path=/trunk/; revision=9961
2004-07-01 23:36:57 +00:00
Gé van Geldorp
db3e54f680 Don't reset LastError on success
svn path=/trunk/; revision=9960
2004-07-01 22:36:16 +00:00
Gé van Geldorp
1c2af8076a Handle file names like ./somename in SearchPath()
svn path=/trunk/; revision=9959
2004-07-01 22:35:35 +00:00
Eric Kohl
820eaf8fce Fix a typo. Now the 'Advanced' page shows again.
svn path=/trunk/; revision=9958
2004-07-01 20:27:50 +00:00
Filip Navara
b4dc709c43 CVS maintaince
svn path=/trunk/; revision=9957
2004-07-01 18:12:47 +00:00
KJK::Hyperion
fdd518ddac Merging the KJKHyperion-RtlUnwind branch back into HEAD
svn path=/trunk/; revision=9956
2004-07-01 02:40:23 +00:00
Royce Mitchell III
209e1d7692 cleanup/reformat syscall code, save return value as soon as possible so that eax is freed up, which also simplifies the implementation of KiAfterSystemCallHook(), also removes a couple redundant instructions.
svn path=/trunk/; revision=9955
2004-07-01 01:52:37 +00:00
Steven Edwards
aa33e15965 Merge in Winehq commits. - not enabled yet
svn path=/trunk/; revision=9953
2004-06-30 20:51:45 +00:00
Steven Edwards
6cfb2b5848 Merge in Winehq commits.
svn path=/trunk/; revision=9952
2004-06-30 20:42:18 +00:00
Gé van Geldorp
8eb23c9e6c Fix IFileSystemBindData method order again.
svn path=/trunk/; revision=9951
2004-06-30 20:40:02 +00:00
Steven Edwards
e050a4dd03 Merge in Winehq commits.
svn path=/trunk/; revision=9950
2004-06-30 20:19:25 +00:00
Steven Edwards
458aec49c1 Merge in Winehq commits.
svn path=/trunk/; revision=9949
2004-06-30 19:14:24 +00:00
Steven Edwards
3af5a16e60 Merge in Winehq commits.
svn path=/trunk/; revision=9948
2004-06-30 19:07:22 +00:00
Eric Kohl
3ec9c96584 Add accessibility control panel.
svn path=/trunk/; revision=9947
2004-06-30 12:21:20 +00:00
Eric Kohl
9eefe9985c Add control panel icon.
svn path=/trunk/; revision=9946
2004-06-30 12:20:35 +00:00
Eric Kohl
c9ad0dddb4 - Add accessibility control panel. Patch by <j_anderw@sbox.tugraz.at>
- Use w32api.
- Add control panel icon.

svn path=/trunk/; revision=9945
2004-06-30 12:16:27 +00:00
Eric Kohl
e4d51272be Use w32api.
svn path=/trunk/; revision=9944
2004-06-30 12:11:11 +00:00
Eric Kohl
3845c9019c - Apply patch by <j_anderw@sbox.tugraz.at>.
- User w32api.
- Fix some tchar issues.

svn path=/trunk/; revision=9942
2004-06-30 10:53:05 +00:00
Eric Kohl
885e4ae102 Define PSCB_BUTTONPRESSED.
svn path=/trunk/; revision=9941
2004-06-30 10:49:18 +00:00
Filip Navara
52b944e9fb - Return correct ID for windowless timers in IntSetTimer.
svn path=/trunk/; revision=9940
2004-06-29 23:45:31 +00:00
Gé van Geldorp
a4a1cb1b98 Use DIB bitfields to create palette at > 8 bpp
svn path=/trunk/; revision=9939
2004-06-29 21:09:16 +00:00
Filip Navara
e83551ae34 - Fixed duplicate color conversion in Bitfields/RGB -> Indexed case.
svn path=/trunk/; revision=9937
2004-06-29 20:08:07 +00:00
Filip Navara
c891ec007e - Match the first 16 colors of the Windows (R) XP default palette.
svn path=/trunk/; revision=9936
2004-06-29 20:08:05 +00:00
Thomas Bluemel
70e1b16c27 fixed makefiles
svn path=/trunk/; revision=9935
2004-06-29 19:20:16 +00:00
Filip Navara
0ad9fa72f8 - Fixed list mode traversing.
svn path=/trunk/; revision=9934
2004-06-29 18:12:30 +00:00
Filip Navara
b43bcf2cc1 - Report 1 (Default) instead of 0 (Invalid) as the refresh frequency value.
svn path=/trunk/; revision=9933
2004-06-29 18:12:28 +00:00
Filip Navara
ecd1ebfec8 - Match the first 16 colors of the Windows (R) XP default palette.
svn path=/trunk/; revision=9932
2004-06-29 18:12:27 +00:00
Eric Kohl
91da5e1abe Add substitutions for 'MS Shell Dlg' and 'MS Shell Dlg 2' fonts.
svn path=/trunk/; revision=9931
2004-06-29 17:40:01 +00:00
Gé van Geldorp
653e60385e Fix IFileSystemBindData method order
svn path=/trunk/; revision=9930
2004-06-29 14:08:58 +00:00
Gé van Geldorp
4e347550d4 Fix RestartDialog() prototype
svn path=/trunk/; revision=9929
2004-06-29 13:51:59 +00:00
Gé van Geldorp
80df3c01b8 Minimize Wine porting headers
svn path=/trunk/; revision=9928
2004-06-29 13:47:27 +00:00
Gé van Geldorp
f1a2c7a2d5 Minimize Wine porting headers
svn path=/trunk/; revision=9927
2004-06-29 13:40:40 +00:00
Eric Kohl
b031cfa717 Set short path names for 'temp' and 'tmp' environment variables.
svn path=/trunk/; revision=9926
2004-06-29 12:06:01 +00:00
Eric Kohl
2a6745d9d4 Install control panel app and control panels.
svn path=/trunk/; revision=9925
2004-06-29 12:04:42 +00:00
Eric Kohl
56df203d1b - Load 16x16 and 32x32 icons.
- Use masked image lists.
- Clean-up menu IDs.

svn path=/trunk/; revision=9924
2004-06-29 12:03:56 +00:00
Filip Navara
c2f6de9e7b - Improved implementation of REGION_CreateFrameRgn that gives more correct results.
svn path=/trunk/; revision=9923
2004-06-29 06:08:54 +00:00
Filip Navara
e834678a62 - We don't need to have BuiltInRect member in the ROSRGNDATA structure. Since regions with only one rectangle have this rectange identical to the bounding one, we can use rdh.rcBounds instead and save 16 bytes.
svn path=/trunk/; revision=9921
2004-06-28 21:03:08 +00:00
Filip Navara
cffc8dfe09 - Import RtlImageDirectoryEntryToData from ntoskrnl and don't duplicate it.
svn path=/trunk/; revision=9920
2004-06-28 21:02:49 +00:00
Martin Fuchs
d5f50bdad5 - compatibility to expat version < 1.95.7
- handle missing XML encoding parameter

svn path=/trunk/; revision=9919
2004-06-28 20:38:42 +00:00
Filip Navara
06b882daa5 - Copied implementation of GetShortPathName[AW] from Wine.
svn path=/trunk/; revision=9918
2004-06-28 19:46:17 +00:00
Filip Navara
d9f6abff67 - Removed ReactOS specific hack in ImageList_DrawIndirect since the color conversions in Win32K are fixed now.
svn path=/trunk/; revision=9916
2004-06-28 17:03:46 +00:00
Filip Navara
f2e5d4cd25 - Fixed more color handling issues (mostly incorrect RGB <-> BGR swapping).
svn path=/trunk/; revision=9915
2004-06-28 17:03:35 +00:00
Filip Navara
a630cd560f - Fixed implementation of PALOBJ_cGetColors.
- Cleaned up IntEngCreateXlate and XLATEOBJ_iXlate a bit and fixed some cases (Indexed -> Bitfields/BGR, Bitfields/BGR -> Indexed).
- Removed simple color cache from ClosestColorMatch, because it wasn't thread safe and would return bogus values when more XLATEOBJs are used at once.

svn path=/trunk/; revision=9914
2004-06-28 15:53:17 +00:00
Eric Kohl
6c9226bcbf Don't use fixed size main window.
GetProcAddress() does not accept Unicode procedure names.
Visual improvements.

svn path=/trunk/; revision=9913
2004-06-28 12:05:16 +00:00
Martin Fuchs
3424e4ee4a add explorer-cfg-template.xml for explorer default configuration
svn path=/trunk/; revision=9912
2004-06-28 06:52:41 +00:00
Filip Navara
870260bec7 - Fixed bug in binary search algorithm.
svn path=/trunk/; revision=9909
2004-06-27 14:15:33 +00:00
Filip Navara
f764d79dbb - Fixed compilation.
svn path=/trunk/; revision=9908
2004-06-27 13:58:05 +00:00
Thomas Bluemel
988f8a5efc revert my previous patch
svn path=/trunk/; revision=9906
2004-06-27 12:21:32 +00:00
Eric Kohl
fbe9f7f64f Implement and use LdrProcessRelocationBlock().
svn path=/trunk/; revision=9905
2004-06-27 12:21:14 +00:00
Filip Navara
3bd4ef3363 - Better handling of error cases when no fonts are present in the system.
svn path=/trunk/; revision=9904
2004-06-27 11:24:43 +00:00
Filip Navara
13d400fbd2 - Better handling of error cases in DrawTextW.
svn path=/trunk/; revision=9903
2004-06-27 11:24:06 +00:00
Filip Navara
625c7953e5 - Better handling of error cases in font handling.
svn path=/trunk/; revision=9902
2004-06-27 11:23:57 +00:00
Filip Navara
6f6c0f76ef - Fixed compilation.
svn path=/trunk/; revision=9901
2004-06-27 11:23:57 +00:00
Thomas Bluemel
308a04ade4 don't crash if requested process couldn't be found
svn path=/trunk/; revision=9900
2004-06-27 10:16:59 +00:00
Filip Navara
2bb2c4aae8 - Replaced the old default mode algortihm with video mode list sorting.
- Added check for video mode memory model since we don't support anything but Direct Color and Packed Pixel modes.
- More work in order to support VBE 1.2.
- Fixed retun values in VBEInitialize.

svn path=/trunk/; revision=9899
2004-06-27 07:56:44 +00:00
Alex Ionescu
629da60934 Removed Named Arguments for non-public APIs and added explanations/sources for non-GNU IFS APIs.
svn path=/trunk/; revision=9898
2004-06-27 05:38:54 +00:00
Royce Mitchell III
8d2f559189 fix end-of-lines
svn path=/trunk/; revision=9897
2004-06-27 04:08:57 +00:00
Filip Navara
0ce9ce5756 - Use the Video Port driver Int 10 services instead of using undocumented Ke386CallBios function.
- Power management functions implementation. Based on patch by Magnus Olsen <magnus@itkonsult-olsen.com>.
- First steps towards VBE 1.2 support. Based on patch by Magnus Olsen <magnus@itkonsult-olsen.com>.

svn path=/trunk/; revision=9894
2004-06-26 22:30:34 +00:00
Filip Navara
20ac14caf5 - Added VideoPortQueryPerformanceCounter and VideoPortQueryServices to the import library definition file.
- Fixed minor memory overrun in VideoPortInitialize for older video drivers (< Win NT 5.1).

svn path=/trunk/; revision=9893
2004-06-26 22:30:34 +00:00
Gunnar Dalsnes
c12eca029d make misc/lcformat
svn path=/trunk/; revision=9892
2004-06-26 20:11:18 +00:00
Gunnar Dalsnes
add8be67c2 remove duplicate stuff due to adding lcformat from wine
impl. misc stuff from wine

svn path=/trunk/; revision=9891
2004-06-26 20:10:50 +00:00
Gunnar Dalsnes
def9bd7817 save modlue handle
svn path=/trunk/; revision=9890
2004-06-26 20:07:40 +00:00
Gunnar Dalsnes
2859278f6e Whole file ripped from Wine's dlls\\kernel\\lcformat.c, rev 1.7 and is unchanged except that includes are different. I thought about adding @implemented to each exported function, but this might make merging harder
svn path=/trunk/; revision=9889
2004-06-26 20:02:31 +00:00
Filip Navara
4ba7ff413b - Set the palette for image list DIBs that has 8 or less bits per pixel.
svn path=/trunk/; revision=9888
2004-06-26 18:22:14 +00:00
Filip Navara
9cea7cc06c - Readded the code for unportecting second page while relocating. Some applications like OpenOffice actually depend on it.
svn path=/trunk/; revision=9885
2004-06-26 15:11:14 +00:00
Filip Navara
399da20296 - Rewritten relocation code to not make invalid assumptions (".reloc" section name) and to not unprotect second page (not needed really).
svn path=/trunk/; revision=9884
2004-06-26 14:37:05 +00:00
Filip Navara
e4c1673f80 - Partial implementation of CompareStringW. Fixes bug #378.
svn path=/trunk/; revision=9883
2004-06-26 12:56:11 +00:00
Eric Kohl
9a0d240ea4 Stop at the real end of the relocation table.
svn path=/trunk/; revision=9881
2004-06-26 11:23:32 +00:00
Martin Fuchs
1336676b5e simplified chinese explorer resources by Larry Li <larry@mimios.com> (not for windres)
svn path=/trunk/; revision=9880
2004-06-26 10:43:18 +00:00
Thomas Bluemel
2678ec0387 fixed little gdi handle leak
svn path=/trunk/; revision=9879
2004-06-26 08:09:55 +00:00
Thomas Bluemel
97a29e0c78 fixed binary editing of strings in the ansi version, query and set the value using the unicode version in this case.
svn path=/trunk/; revision=9876
2004-06-25 23:47:04 +00:00
Steven Edwards
75fa578ba6 sndblst fixes based on patch by Sylvain Petreolle.
svn path=/trunk/; revision=9875
2004-06-25 23:30:22 +00:00
Eric Kohl
d5255272ce Fix a typo.
svn path=/trunk/; revision=9874
2004-06-25 19:05:20 +00:00
Eric Kohl
acf32a2988 Fix crash in loader relocation code.
svn path=/trunk/; revision=9872
2004-06-25 18:50:48 +00:00
Thomas Bluemel
2dea234132 re-added files that hyperion accidently deleted from HEAD
svn path=/trunk/; revision=9871
2004-06-25 16:39:41 +00:00
Eric Kohl
4531d96141 Expand user-specific environment variables.
svn path=/trunk/; revision=9870
2004-06-25 11:42:00 +00:00
KJK::Hyperion
07420e3dd3 Moved common SEH routines to Rtl, removed very wrong RtlUnwind implementation from ntoskrnl
svn path=/trunk/; revision=9868
2004-06-25 03:38:51 +00:00
KJK::Hyperion
7fa5587882 Committed in the hope CVS will shut the hell up and let me branch. Still part of the SEH work
svn path=/trunk/; revision=9865
2004-06-25 01:41:20 +00:00
Alex Ionescu
2708010986 Added Ke Stub Prototypes
svn path=/trunk/; revision=9864
2004-06-24 21:03:56 +00:00
Gé van Geldorp
f477796b79 Fix some forgotten EngCreateBitmap() calls
svn path=/trunk/; revision=9863
2004-06-24 19:43:49 +00:00
KJK::Hyperion
730275c800 Moved common SEH code to Rtl
svn path=/trunk/; revision=9862
2004-06-24 19:30:21 +00:00
Eric Kohl
4e65adddb3 Set user specific TEMP and TMP environment variables.
svn path=/trunk/; revision=9861
2004-06-24 14:49:26 +00:00
Eric Kohl
41871db16c Create user specific temp directory.
svn path=/trunk/; revision=9860
2004-06-24 14:48:33 +00:00
Thomas Bluemel
9f03850ba7 fixed redefinition of some constants for SystemParametersInfo()
svn path=/trunk/; revision=9859
2004-06-24 11:02:56 +00:00
Thomas Bluemel
3977da5dc6 1.fixed return type for NtSystemParametersInfo()
2. added missing definitions (NT5.1+) for SystemParametersInfo() to w32api

svn path=/trunk/; revision=9858
2004-06-24 09:44:06 +00:00
Gé van Geldorp
008c89dfce Remove duplicate "All Users" path component
svn path=/trunk/; revision=9857
2004-06-24 09:19:52 +00:00
Gé van Geldorp
87cc4ce95f Create temp directory
svn path=/trunk/; revision=9856
2004-06-24 09:17:33 +00:00
Eric Kohl
a36e6dca3b Cosmetic fixes.
svn path=/trunk/; revision=9855
2004-06-24 08:54:41 +00:00
Eric Kohl
3a3a3cc0aa Fix line breaks.
svn path=/trunk/; revision=9854
2004-06-24 08:54:03 +00:00
Gé van Geldorp
a3e366fdf9 Mirror PRKAPC_STATE found in ntoskrnl/include/internal/ps.h
svn path=/trunk/; revision=9853
2004-06-24 07:19:57 +00:00
Alex Ionescu
5bcda093f3 Added new files for Ke Stubs
svn path=/trunk/; revision=9852
2004-06-23 22:32:45 +00:00
Alex Ionescu
0f47167023 Added Ke Stubs
svn path=/trunk/; revision=9851
2004-06-23 22:32:24 +00:00
Alex Ionescu
c800cdda6e Added Ke Stub Prototypes
svn path=/trunk/; revision=9850
2004-06-23 22:21:26 +00:00
Alex Ionescu
3d29c6de30 Added Ldr Stub Prototypes
svn path=/trunk/; revision=9849
2004-06-23 22:21:03 +00:00
Alex Ionescu
5dc4ab6ba9 Added Ex Stub
svn path=/trunk/; revision=9848
2004-06-23 21:50:59 +00:00
Alex Ionescu
7f48bb36d7 Added New Io File for stubs
svn path=/trunk/; revision=9846
2004-06-23 21:43:45 +00:00
Alex Ionescu
3074af46ff Added Io Stub Prototypes
svn path=/trunk/; revision=9845
2004-06-23 21:43:19 +00:00
Alex Ionescu
f66364821f Added Io Stubs
svn path=/trunk/; revision=9844
2004-06-23 21:42:50 +00:00
Alex Ionescu
2b0f40b581 Added Ex Stubs
svn path=/trunk/; revision=9843
2004-06-23 21:37:06 +00:00
Alex Ionescu
d039c1362d Added new files for Ex Stubs
svn path=/trunk/; revision=9842
2004-06-23 21:03:43 +00:00
Alex Ionescu
68f96d4b10 Added Ex Prototypes
svn path=/trunk/; revision=9841
2004-06-23 21:02:35 +00:00
Alex Ionescu
62a4509b5f Added Ex Stubs
svn path=/trunk/; revision=9840
2004-06-23 21:01:28 +00:00
Hartmut Birr
b8b9f846b6 - Improved removable media support.
svn path=/trunk/; revision=9839
2004-06-23 20:23:59 +00:00
Alex Ionescu
83f7c0f126 Added Lpc Stubs
svn path=/trunk/; revision=9838
2004-06-23 19:49:21 +00:00
Alex Ionescu
517e96313d Added Ldr Stubs
svn path=/trunk/; revision=9837
2004-06-23 19:49:11 +00:00
Alex Ionescu
cd97bd13da Added Ldr Stub Prototypes
svn path=/trunk/; revision=9836
2004-06-23 19:48:53 +00:00
Alex Ionescu
96523ea314 Fixed KeRaiseUserException to return old EIP.
svn path=/trunk/; revision=9835
2004-06-23 19:48:39 +00:00
Alex Ionescu
814c815bc1 Fixed KeRaiseUserException to return old EIP.
svn path=/trunk/; revision=9834
2004-06-23 19:42:14 +00:00
Thomas Bluemel
7ebb752f56 fixed handling of variable arguments and free memory allocated by FormatMessage(). Thanks to Michael Fritscher for spotting this bug.
svn path=/trunk/; revision=9833
2004-06-23 19:32:17 +00:00
Thomas Bluemel
a1c2b75227 don't use the pointer if it's NULL...
svn path=/trunk/; revision=9831
2004-06-23 15:38:07 +00:00
Thomas Bluemel
94c3ee3a6a little fixes
svn path=/trunk/; revision=9830
2004-06-23 15:30:21 +00:00
Eric Kohl
411068e4cc Implement the ability to write the bootcode to a floppy disk.
svn path=/trunk/; revision=9829
2004-06-23 14:09:55 +00:00
Gé van Geldorp
80dcdcc7f6 Remove debugging statement
svn path=/trunk/; revision=9826
2004-06-23 07:40:45 +00:00
Gé van Geldorp
4d08b708f4 Handle RLE bottom-up dibs
svn path=/trunk/; revision=9825
2004-06-23 07:31:22 +00:00
Alex Ionescu
61d1eb4f34 Added reason for copyimage fixme, declared as unimplemented, and added variable to only display dbgprint once.
svn path=/trunk/; revision=9824
2004-06-23 05:04:30 +00:00
Alex Ionescu
657b2275c7 KD Stubs Added.
svn path=/trunk/; revision=9823
2004-06-23 00:49:43 +00:00
Alex Ionescu
be03c322b3 DBG/KD Types and Prototypes Added.
svn path=/trunk/; revision=9822
2004-06-23 00:49:22 +00:00
Alex Ionescu
76321fa025 FSRTL Stubs Added.
svn path=/trunk/; revision=9821
2004-06-23 00:42:21 +00:00
Alex Ionescu
9467b632c1 FSRTL Types and Prototypes Added.
svn path=/trunk/; revision=9820
2004-06-23 00:41:55 +00:00
Alex Ionescu
f737c1e98a DBG Stubs Added.
svn path=/trunk/; revision=9819
2004-06-23 00:15:59 +00:00
Alex Ionescu
ba71f37690 CM (Registry Manager) Stubs added (Registry Callbacks)
svn path=/trunk/; revision=9818
2004-06-23 00:12:41 +00:00
Gé van Geldorp
9130d5d683 Update version number to 0.2.x
svn path=/trunk/; revision=9817
2004-06-22 23:27:48 +00:00
Gé van Geldorp
47e5aeceab Convert between RGBQUAD and PALETTEENTRY
svn path=/trunk/; revision=9814
2004-06-22 20:08:17 +00:00
Eric Kohl
a8b5ba5a72 Add missing IOCTL codes.
svn path=/trunk/; revision=9812
2004-06-22 14:00:36 +00:00
Royce Mitchell III
2e89468648 small bugfix - debug/release inconsistency - found by Thomas Weidenmueller
svn path=/trunk/; revision=9811
2004-06-22 12:43:49 +00:00
Richard Campbell
55dc4a9268 very basic makefile for vs2003 (and the free tools). Please note that some programs don't compile properly, will take a look at this later.
svn path=/trunk/; revision=9810
2004-06-22 10:46:09 +00:00
Vizzini
c7ce024b3a minor debug message fix
svn path=/trunk/; revision=9809
2004-06-22 03:02:33 +00:00
KJK::Hyperion
362995c318 Does ntoskrnl really need its own makefile?
svn path=/trunk/; revision=9808
2004-06-21 21:07:29 +00:00
Hartmut Birr
7b96a26e57 - Enabled the command queueing (in DiskClassCreateDeviceObject).
- Do always reread the partition table in DiskBuildPartitionTable,
  because DiskBuildPartitionTable is only called for removable media's.
- If there is no partition table available, set the disk data entries
  for this volume to the super floppy format (in DiskBuildPartitionTable).

svn path=/trunk/; revision=9807
2004-06-21 21:03:12 +00:00
Hartmut Birr
7d5a8e2e07 - Reduced the necessary size of inquiry data to 4 byte.
- Incremented the active irp counters in SpiAddActiveIrp,
  because the valid value is necessary in this function while starting new irp's.
- Do not set the command queueing enable flag in SpiAddActiveIrp,
  because this is the job of a driver above scsiport.

svn path=/trunk/; revision=9806
2004-06-21 21:00:37 +00:00
Hartmut Birr
924522f57c - Fixed the access to an uninitialized variable in IntCreateClass.
svn path=/trunk/; revision=9805
2004-06-21 20:56:53 +00:00
KJK::Hyperion
bfce2bcf20 Another PSEH fix
svn path=/trunk/; revision=9804
2004-06-21 20:55:16 +00:00
Martin Fuchs
d9954bc076 disable explorer sidebar in SDI mode
svn path=/trunk/; revision=9803
2004-06-21 19:32:49 +00:00
Thomas Bluemel
8d5c063840 use FormatMessage() to print some error messages. Patch by Michael Fritscher.
svn path=/trunk/; revision=9801
2004-06-21 18:57:22 +00:00
Thomas Bluemel
ae0bc4e939 1. fixed compiler warning
2. German resource update by Michael Fritscher

svn path=/trunk/; revision=9800
2004-06-21 18:32:36 +00:00
Royce Mitchell III
d82a66b206 gone with the wind - sorry for that, I guess CVS isn't feeling well today
svn path=/trunk/; revision=9799
2004-06-21 18:22:59 +00:00
Eric Kohl
edd6cd0190 Fixed icon masks.
svn path=/trunk/; revision=9798
2004-06-21 17:11:00 +00:00
Royce Mitchell III
84fff6f7f2 cvsignore maintainance
svn path=/trunk/; revision=9797
2004-06-21 16:58:28 +00:00
Eric Kohl
6d403cae78 Detect parallel ports.
svn path=/trunk/; revision=9796
2004-06-21 12:23:01 +00:00
Eric Kohl
62e0fe6b5e Stop dumping PnP nodes at an empty node.
svn path=/trunk/; revision=9795
2004-06-21 12:12:01 +00:00
Thomas Bluemel
a10440fe8a merged focus handling code from wine
svn path=/trunk/; revision=9794
2004-06-21 10:24:52 +00:00
Thomas Bluemel
208898d3cd added support for deleting values
svn path=/trunk/; revision=9793
2004-06-21 08:47:38 +00:00
Thomas Bluemel
aed08f7da3 moved several strings to the application resources
svn path=/trunk/; revision=9792
2004-06-21 07:48:11 +00:00
Martin Fuchs
1f85769d05 capture mode while scrolling start menus
svn path=/trunk/; revision=9791
2004-06-21 06:46:44 +00:00
Alex Ionescu
c8fb75517f Added two new Cache Manager files added for the stubs.
svn path=/trunk/; revision=9790
2004-06-21 04:12:59 +00:00
Alex Ionescu
821f740fc7 Added Stubs for Cache Manager functions in their appropriate file.
svn path=/trunk/; revision=9789
2004-06-21 04:11:44 +00:00
Art Yerkes
1fe3a2d6c3 Switched the sense of the onlyLoopback flag in getNumNonLoopbackAdapters
and kin.  I had the sense of needing only loopback adapters or all adapters
inverted.

Our info ioctl still misidentifies the adapters with respect to loopback
and not.

svn path=/trunk/; revision=9788
2004-06-21 02:21:16 +00:00
Thomas Bluemel
16ea2c47a7 fixed scrollbar issues
svn path=/trunk/; revision=9787
2004-06-21 01:30:34 +00:00
Gunnar Dalsnes
bb74619906 remove unused stub SetCriticalSectionSpinCount (it's forwarded to ntdll)
svn path=/trunk/; revision=9786
2004-06-20 23:42:07 +00:00
Gunnar Dalsnes
00eec04d6e added comment to FreeSid
svn path=/trunk/; revision=9785
2004-06-20 23:39:07 +00:00
Gunnar Dalsnes
2a54e31ff6 added RtlpDuplicateUnicodeString
fixed RtlFreeSid return type

svn path=/trunk/; revision=9784
2004-06-20 23:37:52 +00:00
Gunnar Dalsnes
3b854207b7 forgot to change some memory allocator calls
added RtlpDuplicateUnicodeString

svn path=/trunk/; revision=9783
2004-06-20 23:35:14 +00:00
Gunnar Dalsnes
da670920b9 forgot to change some memory allocators calls
added comment to RtlFreeSid and changed its retval

svn path=/trunk/; revision=9782
2004-06-20 23:30:47 +00:00
Gunnar Dalsnes
75a50813aa moved encode|image|splaytee into rtl
svn path=/trunk/; revision=9781
2004-06-20 23:27:21 +00:00
Gunnar Dalsnes
d26418fb30 moved into rtl
svn path=/trunk/; revision=9780
2004-06-20 23:25:34 +00:00
Gunnar Dalsnes
13e51e12a9 move rtl/version|image|encode into rtl
svn path=/trunk/; revision=9779
2004-06-20 23:22:06 +00:00
Thomas Bluemel
77ea00dd50 some little fixes
svn path=/trunk/; revision=9778
2004-06-20 22:52:39 +00:00
Gé van Geldorp
b24bc6c8de Prefer non-topmost windows when activating another window
svn path=/trunk/; revision=9776
2004-06-20 22:27:19 +00:00
Gé van Geldorp
db14b748c7 Don't activate invisible windows
svn path=/trunk/; revision=9774
2004-06-20 22:25:14 +00:00
Martin Fuchs
84970bfa09 scroll mode for very long start menus
svn path=/trunk/; revision=9773
2004-06-20 21:42:59 +00:00
Thomas Bluemel
c7eb76e4d3 some minor fixes to the hex edit control
svn path=/trunk/; revision=9771
2004-06-20 19:26:59 +00:00
Thomas Bluemel
ceaaf3d4fc fixed compiling issues
svn path=/trunk/; revision=9770
2004-06-20 18:48:46 +00:00
Thomas Bluemel
c86604cbe4 display hex dump of the binary data
svn path=/trunk/; revision=9769
2004-06-20 18:36:31 +00:00
Royce Mitchell III
8350c577cb fixed that stupid run dialog not defaulting to the combobox.... finally! patch submitted to wine also already.
svn path=/trunk/; revision=9768
2004-06-20 16:43:58 +00:00
Filip Navara
1c4f8bd790 - Fix video mode list traversing. Reported by Royce Mitchel III.
svn path=/trunk/; revision=9767
2004-06-20 16:37:15 +00:00
Gé van Geldorp
10400889eb Activate window on non-client click too
svn path=/trunk/; revision=9765
2004-06-20 16:27:14 +00:00
Filip Navara
2541337d8b - Add HwResetHw implementation that uses VBE set mode call to restore video mode.
svn path=/trunk/; revision=9764
2004-06-20 16:06:12 +00:00
Filip Navara
6467833ecc - Fixed very stupid bug with pointer handling in NtUserBuildHwndList.
svn path=/trunk/; revision=9763
2004-06-20 16:06:05 +00:00
Filip Navara
b688080896 - Cleaned up IntVideoPortResetDisplayParameters a bit.
svn path=/trunk/; revision=9762
2004-06-20 16:05:47 +00:00
Royce Mitchell III
7d0c7ca853 much nicer-looking 8-bit versions of drives.ico and desktop.ico - the wine project is welcome to have this change if they want it.
svn path=/trunk/; revision=9761
2004-06-20 14:12:00 +00:00
Thomas Bluemel
e17ebf0811 some more work on the hex edit control (added messages for loading/changing the buffer)
svn path=/trunk/; revision=9760
2004-06-20 13:35:03 +00:00
Filip Navara
c75be21c00 - Call the "load default cursor" callback. Fixes bug #358.
svn path=/trunk/; revision=9753
2004-06-20 12:34:20 +00:00
Thomas Bluemel
8cbe40b0ad some work on editing binary registry values (not working yet)
svn path=/trunk/; revision=9752
2004-06-20 12:21:47 +00:00
Eric Kohl
17bdc6a18d Add display type (VGA or VESA) selection.
svn path=/trunk/; revision=9751
2004-06-20 12:18:08 +00:00
Martin Fuchs
637a86a286 fix opening explorer sub folders in MDI mode - problem spotted and debugged by Ge van Geldorp
svn path=/trunk/; revision=9749
2004-06-20 12:10:45 +00:00
Gé van Geldorp
bbfafe3c22 Reserve ordinals 90 and 91. Fixes bug 182.
svn path=/trunk/; revision=9747
2004-06-20 10:39:21 +00:00
Gé van Geldorp
2e60fd207a Handle ordinals which are not exported
svn path=/trunk/; revision=9745
2004-06-20 10:36:17 +00:00
Filip Navara
39d8412f56 - Use raw size for image sections if virtual size isn't specified. Patch by Nathan Lineback <lineback@toastytech.com> from BugZilla #364.
svn path=/trunk/; revision=9744
2004-06-20 10:21:48 +00:00
Filip Navara
9fc35cab4e - Handle correctly "Unknown" media type in VfatHasFileSystem. This gets the floppy disk driver working.
svn path=/trunk/; revision=9743
2004-06-20 09:52:58 +00:00
Eric Kohl
b23ea08f8a Detect display controller. Distinguish VGA and VBE display devices.
svn path=/trunk/; revision=9742
2004-06-20 09:12:10 +00:00
Vizzini
aeb397b5ab various bugfixes to IoQueryDeviceDescription and friends. The floppy driver now loads and finds the drive properly.
svn path=/trunk/; revision=9741
2004-06-20 04:50:02 +00:00
Vizzini
0064a17a7c clarified a misleading comment
svn path=/trunk/; revision=9740
2004-06-20 03:36:44 +00:00
Vizzini
6993ae4ae2 fixed a bug in IoCsqRemoveNextIrp (missing break)
svn path=/trunk/; revision=9739
2004-06-20 03:29:29 +00:00
Royce Mitchell III
bda771abc0 much nicer-looking 8-bit versions of mycomputer.ico - the wine project is welcome to have this change if they want it.
svn path=/trunk/; revision=9738
2004-06-20 03:06:31 +00:00
Thomas Bluemel
4c4f493412 some fixes to be able to create a unicode build
svn path=/trunk/; revision=9737
2004-06-20 02:22:44 +00:00
Vizzini
841ace6796 backed out bugified patch
svn path=/trunk/; revision=9736
2004-06-20 02:10:07 +00:00
Thomas Bluemel
491f067798 added support to edit REG_MULTI_SZ strings.
svn path=/trunk/; revision=9735
2004-06-20 01:07:26 +00:00
Filip Navara
963c2bcf6e - Allocate memory from PagedPool instead of NonPagedPool where possible.
- Backported font initialization code with fixed memory leaks from my unfinished font handling rewrite patch.

svn path=/trunk/; revision=9734
2004-06-20 00:45:37 +00:00
Filip Navara
ce56ff1648 - Fixed memory corruption in IopInitializeBuiltinDriver.
[Should be ported to 0.2.3 release branch too.]

svn path=/trunk/; revision=9733
2004-06-20 00:44:55 +00:00
Thomas Bluemel
46f51fc218 display REG_NONE and REG_MULTI_SZ values
svn path=/trunk/; revision=9732
2004-06-19 23:12:58 +00:00
Filip Navara
566b3a9f38 - Increment the number of free pages in MmFreeMemory.
svn path=/trunk/; revision=9731
2004-06-19 22:42:41 +00:00
Filip Navara
a3de47e17a - Fixed NtUserDestroyWindow to correctly destroy owned windows. Fixes bugs #342 and #350.
[Should be ported to 0.2.3 release branch too.]

svn path=/trunk/; revision=9730
2004-06-19 20:18:09 +00:00
Filip Navara
0b27c9bbe9 - Force importing _vsnprintf from MSVCRT. The NTDLL version doesn't support %f specifiers.
svn path=/trunk/; revision=9728
2004-06-19 17:58:37 +00:00
Richard Campbell
b793f5ef6d very basic makefile for vs2003 (and the free tools). Please note that some programs don't compile properly, will take a look at this later.
svn path=/trunk/; revision=9726
2004-06-19 12:40:41 +00:00
Vizzini
4444a6885d patch by Tom (tmkpl@poczta.onet.pl)
to clean up return val checking of some mdl calls

svn path=/trunk/; revision=9725
2004-06-19 08:53:35 +00:00
Filip Navara
5d2036782e - Fixed compilation problems with MinGW runtime 3.3.
svn path=/trunk/; revision=9724
2004-06-19 08:52:40 +00:00
Filip Navara
e19a20e71e - Callbacks implementation. A little modified patch by Alex Ionescu (alex@relsoft.net).
svn path=/trunk/; revision=9723
2004-06-19 08:48:01 +00:00
Vizzini
bb2c3e3a72 fixed an extremely irritating bug in an enum
svn path=/trunk/; revision=9722
2004-06-19 08:47:59 +00:00
Filip Navara
88f213ea72 - Corrected shell paths.
svn path=/trunk/; revision=9721
2004-06-19 07:56:16 +00:00
Vizzini
2a5689bb0b added support for setting Component Information for the ISA bus; fixed a minor bug
svn path=/trunk/; revision=9720
2004-06-19 06:03:37 +00:00
Steven Edwards
0cbe4f2842 added stubs for the Cache Manager by Alex Ionescu.
svn path=/trunk/; revision=9719
2004-06-19 05:04:33 +00:00
Art Yerkes
5954327e76 Change from unclegarlic: Don't overwrite packet length.
svn path=/trunk/; revision=9718
2004-06-19 02:03:33 +00:00
Gero Kuehn
fa242a9267 changed from control.cpp to control.c, changed \ to / in control.c
svn path=/trunk/; revision=9717
2004-06-19 00:11:44 +00:00
KJK::Hyperion
03c4c34d21 Attempt to fix PSEH compilation for kernel-mode targets. Arty please test this
svn path=/trunk/; revision=9716
2004-06-18 22:33:06 +00:00
Gero Kuehn
038cca4d58 initial checkin of the non-shell-namespace-based control panel and software add/remove cpl
svn path=/trunk/; revision=9715
2004-06-18 20:43:44 +00:00
Filip Navara
86c4140124 - Get this test compilable.
svn path=/trunk/; revision=9714
2004-06-18 17:37:02 +00:00
Steven Edwards
6f53b7dbce Added font enumeratiion demo
svn path=/trunk/; revision=9713
2004-06-18 17:26:59 +00:00
Filip Navara
81d4e43dda - VideoPortInt10 should copy back the output registers to caller.
svn path=/trunk/; revision=9712
2004-06-18 17:20:49 +00:00
Martin Fuchs
751d25b2ea eliminate GCC warning
svn path=/trunk/; revision=9709
2004-06-18 16:59:47 +00:00
Martin Fuchs
24fdd29e94 eliminate GCC warning
svn path=/trunk/; revision=9707
2004-06-18 16:44:59 +00:00
Martin Fuchs
be7a6c466b re-enable DesktopWindow::OnDefaultCommand to open explorer windows on desktop double clicks
svn path=/trunk/; revision=9706
2004-06-18 16:36:00 +00:00
Filip Navara
26c98df753 - Map correct amount of the video memory.
svn path=/trunk/; revision=9705
2004-06-18 16:26:51 +00:00
Filip Navara
80799cc3c8 Changelog:
- Don't change DC origin in NtGdiOffsetViewportOrgEx
- Update transformation matrix in NtGdiSetViewportExtEx,
  NtGdiSetWindowExtEx, NtGdiSetWindowOrgEx, NtGdiOffsetWindowOrgEx
- When creating new DC initialize the Viewport/Window extensions.
- Transform logical coordinates to device ones in NtGdiExtTextOut
  and NtGdiLineTo.

svn path=/trunk/; revision=9703
2004-06-18 15:18:58 +00:00
Gero Kuehn
9ba82f014d added SetFocus call for the username dialog
svn path=/trunk/; revision=9702
2004-06-17 21:23:50 +00:00
Eric Kohl
78f151b9d3 Add missing nls settings for Great Britain.
This fixes bug #344.

svn path=/trunk/; revision=9700
2004-06-17 18:29:44 +00:00
Gé van Geldorp
2d902a8146 Remove obsolete ide and (old) floppy drivers
svn path=/trunk/; revision=9698
2004-06-17 13:28:53 +00:00
Eric Kohl
c792e5b04c Fix typos.
svn path=/trunk/; revision=9696
2004-06-17 10:49:51 +00:00
Eric Kohl
06e579a944 Compile advapi32 using w32api.
svn path=/trunk/; revision=9695
2004-06-17 09:07:12 +00:00
Art Yerkes
0766c089ec This makes RtlUnicodeStringToInteger work like the win2k version. Basically
this function never checks the validity of the input string and only returns
an error when the Base argument is set incorrectly.

This fixes the bug while booting vmware with the pcnet card on.

svn path=/trunk/; revision=9694
2004-06-17 03:47:39 +00:00
Eric Kohl
7d375e8c48 Add some missing error codes.
svn path=/trunk/; revision=9693
2004-06-16 22:13:19 +00:00
Filip Navara
4e81faa948 - Bump version number to 0.2.4.
svn path=/trunk/; revision=9691
2004-06-16 21:42:24 +00:00
Eric Kohl
f38668e736 Add keyboard detection.
svn path=/trunk/; revision=9690
2004-06-16 20:21:20 +00:00
Gé van Geldorp
0a30ec98a3 Update porting status
svn path=/trunk/; revision=9688
2004-06-16 18:50:19 +00:00
Gé van Geldorp
b3e8303421 Sync to Wine-20040615:
Robert Reif <reif@earthlink.net>
- Added some trace and debug printing.
- Fixed a problem were a trace accesses a data member that may be
  outside of the actual data structure passed in.
- Added some more debug traces.
- Don't try to map the mapper device.
Mike McCormack <mike@codeweavers.com>
- Fix PlaySound.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- Fixed missing inversion in bit manipulation.
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.

svn path=/trunk/; revision=9686
2004-06-16 18:48:46 +00:00
Gé van Geldorp
a41cfac6b9 Sync to Wine-20040615:
Robert Reif <reif@earthlink.net>
- Added tracing to all functions.
- Added error explanations.
- Changed debug channel from msacm to wavemap so not confused with
  msacm.
- Handle case where partial structure update requested.
- Minor white space cleanup.
- Returns proper error code when trying to get caps when no devices
  present.
- Fixed a bug where wrong a return value was returned when mapping is
  not possible.

svn path=/trunk/; revision=9685
2004-06-16 18:40:05 +00:00
Gé van Geldorp
fd397eeccd Sync to Wine-20040615:
Hans Leidekker <hans@it.vu.nl>
- Link to ntdll.
Raphael Junqueira <fenix@club-internet.fr>
- Stub for SHFlushSFCacheWrap.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Stefan Leichter <Stefan.Leichter@camLine.com>
- Moved stub of StopWatch from ascii to unicode.

svn path=/trunk/; revision=9684
2004-06-16 18:27:33 +00:00
Gé van Geldorp
2b3293eb3a Sync to Wine-20040615:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix ref count on standard proxy creation.
- Release channel buffer in StdMarshal_UnmarshalInterface, since we no
  longer use it and the proxy should have taken a reference on it.
- Add a few comments.
Eric Pouech <pouech-eric@wanadoo.fr>
- GetModuleFileName[AW] doesn't terminate the string if the buffer is
  too small.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.

svn path=/trunk/; revision=9683
2004-06-16 18:21:24 +00:00
Gé van Geldorp
129d08fec4 Sync to Wine-20040615:
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.

svn path=/trunk/; revision=9682
2004-06-16 18:13:23 +00:00
Filip Navara
4addf164b6 - Disable the "Floppy count: x" debug message.
svn path=/trunk/; revision=9681
2004-06-16 16:59:27 +00:00
Gé van Geldorp
92599b546e Sync to Wine-20040615:
Marcus Meissner <marcus@jet.franken.de>
- Revert broken strict aliasing fix.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix ref count on standard proxy creation.
- Release channel buffer in StdMarshal_UnmarshalInterface, since we no
  longer use it and the proxy should have taken a reference on it.
- Add a few comments.
- Fixed CoMarshalInterThreadInterfaceInStream and
  CoGetInterfaceAndReleaseStream.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.

svn path=/trunk/; revision=9680
2004-06-16 07:06:50 +00:00
Gé van Geldorp
6c4df3df68 Sync to Wine-20040615:
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
- WNetGetConnection(): use QueryDosDevice to return a fake remote name
  instead of the drive label.

svn path=/trunk/; revision=9679
2004-06-16 06:58:48 +00:00
Gé van Geldorp
e054bf54e2 Sync to Wine-20040615:
Ivan Leo Puoti <puoti@inwind.it>
- Changed my name, so update copyright info.
Ilya Korniyko <k_ilya@ukr.net>
- Encoding fixes in Ukrainian translation.
Wolfgang Schwotzer <wolfgang.schwotzer@gmx.net>
- Support lpstrCustomFilter and return nFilterIndex in file dialog.
Rein Klazes <rklazes@xs4all.nl>
- In FILEDLG_ScanDir do not try to set the current directory to a path
  that is empty.

svn path=/trunk/; revision=9678
2004-06-16 06:54:39 +00:00
Gé van Geldorp
11761ed436 Sync to Wine-20040615:
Maxime Bellenge <maxime.bellenge@laposte.net>
- Implemented PSH_WIZARD97_OLD and PSH_WIZARD97_NEW property sheet
  styles.
- Add DT_END_ELLIPSIS as defaut style for text.
Ilya Korniyko <k_ilya@ukr.net>
- Encoding fixes in Ukrainian translation.
Filip Navara <xnavara@volny.cz>
- Let the subclassing stack grow the opposite way to make the code
  more transparent.
- Remove SubclassWndProc and move its logic to DefSubclassProc.
Dimitrie O. Paun <dpaun@rogers.com>
- Clear the state image bits only if LVS_EX_CHECKBOXES is set.
- Fix obvious logical error in focus handling.
- Indentation and formatting fixes.
- (based on a patch by Krishna Murthy).
Ulrich Czekalla <ulrich@codeweavers.com>
- Handle case where iterator range contains 0 elements.
- Handle case when item text is empty.
  According to MSDN, length should be returned when lParam is NULL.
Patrik Stridvall <ps@leissner.se>
- StrSpnW doesn't exist in comctl32.dll but StrCSpnW does.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implemented TCM_SETITEMEXTRA.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Don't draw whole button pressed when separate dropdown pressed, just
  the separate dropdown itself.
- TBN_DRAGOUT and NM_RDBLCLK notifications.
- Remove unneeded member of private toolbar struct.

svn path=/trunk/; revision=9677
2004-06-16 06:46:13 +00:00
Gé van Geldorp
dc9dfeec01 Remove debug stuff accidentaly left in
svn path=/trunk/; revision=9676
2004-06-16 06:18:14 +00:00
Gé van Geldorp
fbfd3a4820 Marshall WM_CREATE/WM_NCCREATE messages
svn path=/trunk/; revision=9675
2004-06-16 06:09:40 +00:00
Gé van Geldorp
3cca4fd859 Build "new" floppy driver instead of non-functional "old" one
svn path=/trunk/; revision=9674
2004-06-15 22:33:47 +00:00
Eric Kohl
2fbcaac90d Detect floppy disk drives.
svn path=/trunk/; revision=9673
2004-06-15 12:22:19 +00:00
Hartmut Birr
cfef139c5b - Reduced the size of the necessary inquiry data length to recognize a device as valid.
svn path=/trunk/; revision=9672
2004-06-15 09:29:41 +00:00
Hartmut Birr
4536f9c25b - Interpret the sign for qualifier 'l'.
svn path=/trunk/; revision=9671
2004-06-15 08:53:53 +00:00
Hartmut Birr
aefc8f79e7 - Initialized the variable status to get on success a proper return value.
svn path=/trunk/; revision=9670
2004-06-15 08:17:23 +00:00
Art Yerkes
5fd39d97bb recv now works every time
- Standardized on recvfrom request and reply everywhere
- Added a continuous parameter to FillWSABuffers for stream sockets
- Added function TryToSatisfyRecvRequest
- Create MDLs for the WSABUFS.  These are needed because we aren't in our
  home process when tcpip calls back with data.
- Removed extraneous and potentially confusing lock ReadRequestQueueLock
  Now both ReadRequestQueue and ReceiveQueue rely on ReceiveQueueLock

svn path=/trunk/; revision=9669
2004-06-15 02:56:13 +00:00
Filip Navara
9725dc0746 - Update trasformation matrix in SetViewportOrgEx.
svn path=/trunk/; revision=9668
2004-06-14 20:58:51 +00:00
Filip Navara
4cb0e04a46 - Packing fixes
svn path=/trunk/; revision=9667
2004-06-14 20:05:00 +00:00
Art Yerkes
0999a0ef81 Preliminary version of recv.
svn path=/trunk/; revision=9666
2004-06-14 03:22:27 +00:00
Art Yerkes
f773e32aab rawip: Removed the deallocation of the client-supplied mdl. This does not
appear to be part of the definition and is not done in the UDP case.
event: I moved the close notify into it's own function so that it can be
worked on separately.

svn path=/trunk/; revision=9665
2004-06-14 01:40:48 +00:00
Filip Navara
6435dec245 - Compile kernel32 using w32api.
- Fixed some packing issues in DDK headers (more to come).

svn path=/trunk/; revision=9664
2004-06-13 20:04:56 +00:00
Filip Navara
3aa5dd5be2 - Fixed list traversing in MmAlterRegion to correctly handle Length that is greater than real memory area size.
svn path=/trunk/; revision=9663
2004-06-13 14:05:53 +00:00
Martin Fuchs
1a9133bf9b Unicode fix
svn path=/trunk/; revision=9662
2004-06-13 12:56:39 +00:00
Martin Fuchs
9ca2c517db XMLStorage update: XMLReaderBase
svn path=/trunk/; revision=9661
2004-06-13 12:45:29 +00:00
Filip Navara
ebb7ad1e4a - Fixed prototypes of NtAddAtom, NtFindAtom, NtProtectVirtualMemory and KeQueryInterruptTime.
svn path=/trunk/; revision=9660
2004-06-13 10:35:53 +00:00
Art Yerkes
25ae3e20a7 Removed redundant tracking (now incorporated into NdisAllocatePacket, etc)
that was causing a bugcheck in the 'ping to us' case.  The memory was detected
tracked twice (correctly).

This condition was detected by mifritcher after I checked in.

svn path=/trunk/; revision=9659
2004-06-12 04:46:18 +00:00
Gé van Geldorp
57c3c75356 Set MaximumLength to size of allocated memory
svn path=/trunk/; revision=9658
2004-06-11 20:15:07 +00:00
Gé van Geldorp
b2e222b305 Patch by Michael Fritscher <michael@fritscher.net>
Add /? and /s cmdline options

svn path=/trunk/; revision=9657
2004-06-11 14:10:12 +00:00
Gé van Geldorp
58b454b469 Patch by Michael Fritscher <michael@fritscher.net>
Fix CVS warnings.

svn path=/trunk/; revision=9656
2004-06-11 13:59:16 +00:00
Eric Kohl
839baba4ae The root bus driver should return an empty resource list on IRP_MN_QUERY_RESOURCES.
svn path=/trunk/; revision=9655
2004-06-11 09:33:42 +00:00
Gé van Geldorp
ab0a1921c1 Prevent CVS warnings about .*.d files
svn path=/trunk/; revision=9654
2004-06-11 09:10:17 +00:00
Eric Kohl
fbda4aa735 Retrieve Hardware IDs and Compatible IDs from the bus driver and attach them to the device node.
svn path=/trunk/; revision=9653
2004-06-10 11:00:28 +00:00
Hartmut Birr
00df170a8a - Enabled the dependency check for the storage drivers.
svn path=/trunk/; revision=9652
2004-06-10 08:20:20 +00:00
Hartmut Birr
5f843bef93 - Use a bitmap for managing the srb extensions.
- Removed the complete request and next request counter.
  The counters are always wrong, because some miniport drivers fires up
  to much notification requests.
- Enable the queues for the miniport driver, if they are supported.
- Fixed a bug in ScsiPortCompleteRequest.

svn path=/trunk/; revision=9651
2004-06-10 08:14:57 +00:00
Hartmut Birr
b5273a652c - Allocate for each srb its one sense info buffer.
- Reinitialize the transfer size if a retry is necessary in ScsiClassSendSrbSynchronous.

svn path=/trunk/; revision=9650
2004-06-10 07:56:42 +00:00
Hartmut Birr
c3e66860e4 - Exchanged source and target in WRITE_REGISTER_BUFFER_xxx.
svn path=/trunk/; revision=9649
2004-06-10 07:50:30 +00:00
Steven Edwards
5298bf9c05 added \n for DPRINT
svn path=/trunk/; revision=9648
2004-06-09 20:39:41 +00:00
Art Yerkes
c1d0686eaa This is a merge onto head of the last two months worth of changes to the
networking code.

There is individual change info on the branch arty_20040329.

Here is a summary of what changed:

tcpip:

- Added a mostly working transport/tcp branch based on oskittcp
  (checked in at drivers/lib/oskittcp).  This code shares almost nothing
  with the previous version.

- Regularized IRP handling

- Fixed ownership of buffers throughout tcpip.sys.  Buffers are now
  required to be copied in a few more cases, but everybody can call
  anybody else and not have to worry about keeping a buffer alive
  for any specific reason.

- Also moved lots more operations onto the stack (small datastructures
  and pointers).  This will result in a further simplification of the
  code here.

- Made each completion routine solely responsible for freeing memory
  from the corresponding action.

- Removed reference counted small address structures in favor if inlines

- Changed and clarified ownership rules almost everwhere

- Fixed a few more type punning style errors

- Added more info used by iphlpapi

- Added some memory tracing stuff

ndis:

- Fixed one or two type punning errors

ws2_32:

- Added getservbyname and getprotobyname (partial)

oskittcp:

- Diagnostics everywhere

- Eliminated dependence on raw_ip input

- Simplified buffering and signalling model a bit

- Added memory checking as in tcpip

- more to come

svn path=/trunk/; revision=9647
2004-06-09 18:11:39 +00:00
Eric Kohl
25e4bf3404 Build Hardware IDs and Compatible IDs for PCI devices.
svn path=/trunk/; revision=9646
2004-06-09 14:22:53 +00:00
Filip Navara
869566fc97 - Correctly set Irp->IoStatus.Information when handling IOCTL_BOOTVID_INITIALIZE request. This fixes the occasional page faults during bugchecks when NTOSKRNL:InbvResetDisplay tried to call function pointed by uninitialized variable.
svn path=/trunk/; revision=9645
2004-06-08 19:31:10 +00:00
Hartmut Birr
a51ef0df37 - Fixed the counting of pending irps.
svn path=/trunk/; revision=9644
2004-06-07 20:03:00 +00:00
Filip Navara
ba3d08e286 - Fixed redefinition of VERSION.
svn path=/trunk/; revision=9643
2004-06-07 18:03:12 +00:00
Filip Navara
4400aed363 - Include bootdata/hiveinst.inf when building the Live CD registry hives.
svn path=/trunk/; revision=9642
2004-06-07 17:31:50 +00:00
Hartmut Birr
da9b36f495 - Implemented ScsiPortCompleteRequest.
- Fixed the calculation of the max transfer size.
- Rewrote parts of SpiScanAdapter and SpiSendInquiry to speed up device detection.
- Fixed the handling of sense info data for HBA's which are auto request sense capability.
- Added some more debug messages.

svn path=/trunk/; revision=9641
2004-06-07 16:37:07 +00:00
Eric Kohl
5dabb7db10 Implement mouse driver autodetection and installation.
svn path=/trunk/; revision=9640
2004-06-07 12:24:00 +00:00
Hartmut Birr
440fa78c14 - Check if the temp directory exist, if not use the current directory.
svn path=/trunk/; revision=9639
2004-06-06 17:33:13 +00:00
Hartmut Birr
4a7c01adb6 - Cancelled my last change.
svn path=/trunk/; revision=9638
2004-06-06 17:29:57 +00:00
Eric Kohl
36b12d1025 Use hardware description if available to initialize the serial mouse port.
svn path=/trunk/; revision=9637
2004-06-06 15:55:03 +00:00
Hartmut Birr
1d4397159c - Allocate memory for mdl's for paging io from stack instead of the non paged pool.
svn path=/trunk/; revision=9636
2004-06-06 09:13:21 +00:00
Hartmut Birr
efc9160052 - Get first the parameters and do then the processing.
svn path=/trunk/; revision=9635
2004-06-06 09:05:21 +00:00
Hartmut Birr
5c92baff3c - Fixed the set command for WinXP.
- The second parameter must be zero in the call to SetEnvironmentVariable
  if the variable should be deleted.

svn path=/trunk/; revision=9634
2004-06-06 09:03:07 +00:00
Hartmut Birr
fbd64e0eb9 - Removed MakeSureDirectoryPathExistsEx.
- Use the current directory if GetTempPath fails.
- Inherit the handles to the child process (in Execute).
- Assume that the current process is always a console process if ntdll exist
  but not contains the functions NtQueryInformationProcess or NtReadVirtualMemory.

svn path=/trunk/; revision=9633
2004-06-06 08:58:56 +00:00
Hartmut Birr
419db01ef7 - Check if the temp path exist in GetTempPathW.
svn path=/trunk/; revision=9632
2004-06-06 08:50:26 +00:00
Hartmut Birr
353214e42e - Allocate memory for mdl's for paging io from stack instead of the non paged pool.
svn path=/trunk/; revision=9631
2004-06-06 08:36:31 +00:00
Hartmut Birr
3b09731efb - Store page numbers instead of physical address's within mdls.
svn path=/trunk/; revision=9630
2004-06-06 07:52:22 +00:00
Hartmut Birr
b4d6f4e01a - Added the dependence files to the clean target.
svn path=/trunk/; revision=9629
2004-06-05 20:10:41 +00:00
Hartmut Birr
113740ebbd - Fixed the start offset of a partition within an extended partition (in xHalIoWritePartitionTable).
svn path=/trunk/; revision=9628
2004-06-05 20:05:06 +00:00
Eric Kohl
1d623bc9b8 Store serial port identifiers at controller keys.
svn path=/trunk/; revision=9627
2004-06-05 19:52:23 +00:00
Hartmut Birr
893efd8a1f - Added a check for a waitable objects in NtWaitForSingleObject and NtWaitForMultipleObjects.
svn path=/trunk/; revision=9626
2004-06-05 18:52:35 +00:00
Filip Navara
6110c706c4 - Fixed getting of menu item texts in GetMenuItemInfo[AW]. Fixes bug #316.
- Fixed memory leak in MenuDrawPopupMenu.

svn path=/trunk/; revision=9625
2004-06-05 18:39:46 +00:00
Casper Hornstrup
037ba1baea Revert:
2004-06-05  Casper S. Hornstrup  <chorns@users.sourceforge.net>

	* Makefile: Split target all into three parts, one that must be executed
	alone and two that can be executed concurrently.

svn path=/trunk/; revision=9624
2004-06-05 13:39:02 +00:00
Hartmut Birr
c81a4db568 - Changed back to the old variable NASM_CMD.
svn path=/trunk/; revision=9623
2004-06-05 12:06:41 +00:00
Casper Hornstrup
f30f61c8fa 2004-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Split target all into three parts, one that must be executed
	alone and two that can be executed concurrently.

svn path=/trunk/; revision=9622
2004-06-05 11:11:13 +00:00
Casper Hornstrup
97d7e660f0 2004-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Skip automatic dependency tracking if
	DEPENDENCIES=no.

svn path=/trunk/; revision=9621
2004-06-05 10:47:27 +00:00
Hartmut Birr
f79f677f01 - Added a comment for NASM_CMD.
svn path=/trunk/; revision=9620
2004-06-05 10:21:59 +00:00
Hartmut Birr
c530406b93 - Changed back to the old variable NASM_CMD.
svn path=/trunk/; revision=9619
2004-06-05 09:47:36 +00:00
Filip Navara
73dfa9e66a - Disable paging file for Live CD.
svn path=/trunk/; revision=9618
2004-06-05 09:35:52 +00:00
Filip Navara
f3f89873bd - Report the /MININT option for Live CD boots.
svn path=/trunk/; revision=9617
2004-06-05 09:35:51 +00:00
Hartmut Birr
3d8820b2b1 - Added the '<>|' key.
svn path=/trunk/; revision=9616
2004-06-05 09:08:58 +00:00
Filip Navara
39ff6d3136 - Fixed calculation of MFT record size.
- Fixed attribute finding/dumping bounds checking.
- Fixed reading of volume information MFT record.
- Disabled debug messages.

svn path=/trunk/; revision=9615
2004-06-05 08:28:37 +00:00
Filip Navara
70dfb7876f Merged changes from joliet_20040527 branch:
- Experimental Joliet generating support.
- Fixed cdname_exists to check only entries in specific directory.
- Move the DIRECTORY_FLAG logic to parse_filename_into_dirrecord.

svn path=/trunk/; revision=9614
2004-06-04 23:50:15 +00:00
Filip Navara
b820cca03e - Process the "DelReg" section in .inf files.
svn path=/trunk/; revision=9613
2004-06-04 23:47:04 +00:00
Filip Navara
fe2abd0550 - Support expanding environment variables in the setup command line.
svn path=/trunk/; revision=9612
2004-06-04 23:46:02 +00:00
Filip Navara
a880f2ee82 - Basic Live CD building infrastructure.
svn path=/trunk/; revision=9611
2004-06-04 23:44:27 +00:00
Thomas Bluemel
320eabb37f added missing cvsignore file
svn path=/trunk/; revision=9610
2004-06-04 13:49:15 +00:00
Thomas Bluemel
4358005fe4 fixed wrong directory for kbddv. Thanks to ai2097.
svn path=/trunk/; revision=9609
2004-06-04 13:30:27 +00:00
KJK::Hyperion
8a4f16c276 Fixed compilation in environments where the native non-local goto isn't available
svn path=/trunk/; revision=9608
2004-06-04 00:49:40 +00:00
KJK::Hyperion
31af77a32a Setjmp has one argument and returns zero
svn path=/trunk/; revision=9607
2004-06-04 00:47:47 +00:00
KJK::Hyperion
6312f5152f "Using multiple compilers is good for your code", chapter umpteenth: removing the SEH library test (until I have a better example) because it made some non-portable assumptions about the stack layout (could cause STATUS_INVALID_UNWIND_TARGET exceptions with some compilers and full optimization)
svn path=/trunk/; revision=9606
2004-06-03 22:30:22 +00:00
KJK::Hyperion
f739268bbb Fixes for Borland C++ compilation, and one variable is now qualified "volatile" to disable dangerous optimizations
svn path=/trunk/; revision=9603
2004-06-03 22:19:10 +00:00
Eric Kohl
df6802c1fd Add US-Dvorak keyboard layout and enable swedish keyboard layout.
Patch by ai2097.
This fixes bug #329.

svn path=/trunk/; revision=9602
2004-06-03 11:20:10 +00:00
KJK::Hyperion
1d286fa480 Small test case for the SEH library
svn path=/trunk/; revision=9601
2004-06-03 04:15:40 +00:00
KJK::Hyperion
6ce11dc878 Small fixes to the SEH library
svn path=/trunk/; revision=9600
2004-06-03 04:14:07 +00:00
KJK::Hyperion
cb341561af Corrected a stupid mistake
Modified the build system to make kernel-mode components use the SEH library's built-in setjmp/longjmp

svn path=/trunk/; revision=9599
2004-06-03 03:09:01 +00:00
KJK::Hyperion
ce86f5b576 Final touches to the SEH library: now comes with a very basic setjmp/longjmp implementation for when the compiler's native one can't be used
svn path=/trunk/; revision=9598
2004-06-03 02:23:34 +00:00
Eric Kohl
ecc193a6f0 Revert useless changes.
svn path=/trunk/; revision=9597
2004-06-02 22:19:54 +00:00
Eric Kohl
f472268186 Set selected keyboard layout and install language.
svn path=/trunk/; revision=9596
2004-06-02 22:18:06 +00:00
Eric Kohl
d311d3a57f Keep zero-initialized varaibles in the .data section.
svn path=/trunk/; revision=9595
2004-06-02 20:37:46 +00:00
Hartmut Birr
e0027b1777 - Fixed the searching for boot load drivers. This solves the pci driver loading problem.
svn path=/trunk/; revision=9594
2004-06-02 20:30:56 +00:00
Hartmut Birr
26916eed77 - Fixed the makefiles for the build on windows.
svn path=/trunk/; revision=9593
2004-06-02 20:26:08 +00:00
KJK::Hyperion
739c9c2b0a Added license text (MIT license) to the SEH library, added the header files
svn path=/trunk/; revision=9592
2004-06-02 19:22:06 +00:00
KJK::Hyperion
a8943a8c91 SEH library
svn path=/trunk/; revision=9591
2004-06-02 18:36:55 +00:00
Gé van Geldorp
07320b09dd Patch by Pablo Borobia <pablog7@argentina.com>
Work on clipboard.

svn path=/trunk/; revision=9590
2004-06-02 18:29:21 +00:00
Gé van Geldorp
08108f008e Patch by Pablo Borobia <pablog7@argentina.com>
Correct search path for DLL loading (including directory from which .exe
was loaded).

svn path=/trunk/; revision=9589
2004-06-02 18:26:58 +00:00
KJK::Hyperion
3a1705b0b1 Changed the build system to treat nasm as a first-class citizen, making it produce output in the correct format (Microsoft COFF) and cleaning up some bit rot (unused makefile variables, different conventions from the rest of the build system, etc.)
svn path=/trunk/; revision=9588
2004-06-02 18:24:09 +00:00
Royce Mitchell III
5053990958 change to zoomin Makefile to get it compiling, and enable touch, genguid, zoomin, winemine, kill, tcat, and tlist - patch by Travis Snoozy <ai2097@yahoo.com>
svn path=/trunk/; revision=9587
2004-06-02 02:27:04 +00:00
Steven Edwards
08ff887056 revert to 1.3. I didnt mean to commit that
svn path=/trunk/; revision=9586
2004-06-01 19:08:53 +00:00
Steven Edwards
73888a7753 add tgetopt to the list of static libs
svn path=/trunk/; revision=9585
2004-06-01 19:06:50 +00:00
Eric Kohl
f95308afa8 For some strange reason IniFileSectionListHead is not initialized correctly.
Intialize it maually in order to prevent access violations.

svn path=/trunk/; revision=9584
2004-06-01 11:12:59 +00:00
Aleksey Bragin
361a0a9bb7 Patch 257 in bugzilla: "Import Regedit translations from WINE.
Existing resource 'About' from WINE has been removed
since ReactOS already has it."

svn path=/trunk/; revision=9583
2004-06-01 10:20:24 +00:00
Gunnar Dalsnes
8448faa277 moved the safe mem copy routines
svn path=/trunk/; revision=9582
2004-06-01 10:16:26 +00:00
Steven Edwards
05b4d3fb1d Add regsvr32
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9580
2004-06-01 01:46:51 +00:00
Steven Edwards
56481cd659 Make the freeldr build system more like the reactos module
build system. (top level rules.mak, etc....)

Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9579
2004-06-01 01:21:07 +00:00
Steven Edwards
7aeeda0f3c Fix building and use W32API
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9578
2004-06-01 01:13:29 +00:00
Steven Edwards
d2a5a8678b change xInterlockedAddLargeStatistic and ExInterlockedCompareExchange64 to be implemented.
svn path=/trunk/; revision=9577
2004-06-01 01:00:25 +00:00
Gunnar Dalsnes
5a9d7b96f4 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9576
2004-06-01 00:14:07 +00:00
Gunnar Dalsnes
18fcfd015e removed something i shouldn't have
svn path=/trunk/; revision=9575
2004-05-31 23:37:22 +00:00
Martin Fuchs
dc4726b0da integrate optional SDI mode into main explorer branch
svn path=/trunk/; revision=9574
2004-05-31 22:39:12 +00:00
Filip Navara
48da820991 Merge DDE patch from Wine:
Dmitry Timoshkov <dmitry@codeweavers.com>
    Fix a bug in ShellExecute which called DdeCreateStringHandleW
    with a wrong parameter. Revert previous erroneous fix.

(Fixes return value of DdeQueryString[AW] and error codes)

svn path=/trunk/; revision=9573
2004-05-31 19:52:47 +00:00
Gunnar Dalsnes
381799ee02 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9572
2004-05-31 19:51:47 +00:00
Gunnar Dalsnes
3ebfb48eb8 create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9571
2004-05-31 19:45:16 +00:00
Gunnar Dalsnes
cd5c05ea8b create rtl for stuff common to ntdll/ntoskrnl
svn path=/trunk/; revision=9570
2004-05-31 19:33:59 +00:00
James Tabor
9666870f38 Temp fix for GlobalMemoryStatus, pleas test.
svn path=/trunk/; revision=9569
2004-05-31 16:54:04 +00:00
Casper Hornstrup
0d5d9a4b7d 2004-05-31 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/reactos/version.h (KERNEL_VERSION_BUILD_TYPE): Replace possible
	value FINAL with RELEASE.

svn path=/trunk/; revision=9568
2004-05-31 12:21:24 +00:00
Gé van Geldorp
6855f27251 Temporarily undo KeAttachProcess() done by win32k
svn path=/trunk/; revision=9567
2004-05-31 11:47:05 +00:00
Eric Kohl
f9375c3f90 Add more processor information.
Patch by Christoph_vW. Fixes bug #321.

svn path=/trunk/; revision=9566
2004-05-31 11:41:14 +00:00
Thomas Bluemel
481600afb3 changed a string
svn path=/trunk/; revision=9565
2004-05-31 08:45:46 +00:00
Filip Navara
58211be6c8 - Write the system boot device and start options to registry, also create the MiniNT registry key if needed.
svn path=/trunk/; revision=9564
2004-05-30 21:40:47 +00:00
Filip Navara
c5cd2328e8 - Implementation of IoQueryDeviceDescription. Patch by Alex Ionescu.
svn path=/trunk/; revision=9563
2004-05-30 18:30:03 +00:00
Eric Kohl
9c2056bb25 Read device settings from txtsetup.sif.
svn path=/trunk/; revision=9562
2004-05-30 14:54:02 +00:00
Jason Filby
e4bd8fff85 Prevent unnecessary code where count is zero in NtGdiExtTextOut
svn path=/trunk/; revision=9561
2004-05-30 14:51:45 +00:00
Thomas Bluemel
56099c14d4 little GDI speed improvements
svn path=/trunk/; revision=9560
2004-05-30 14:01:13 +00:00
Eric Kohl
2e86c2a5bc Add device settings information.
svn path=/trunk/; revision=9559
2004-05-30 13:03:04 +00:00
Hartmut Birr
02c974661f - Fixed a wrong address in MmAlterViewAttributes which possible does cause a crash if the region is longer than one page.
svn path=/trunk/; revision=9558
2004-05-30 12:55:11 +00:00
Filip Navara
4bbc945c9c - Fixed some NULL-terminating issues that caused the 'videoprt.sys???????????????' module name problem.
svn path=/trunk/; revision=9557
2004-05-30 11:47:43 +00:00
Hartmut Birr
9fa3a2fdb7 - Print the memory map at start up to the debug port.
svn path=/trunk/; revision=9556
2004-05-29 22:10:05 +00:00
Hartmut Birr
d73db829fa - Moved the definition of all dll base addresses to baseaddress.cfg.
svn path=/trunk/; revision=9555
2004-05-29 21:55:09 +00:00
Filip Navara
55532b15d9 - When checking for ReactOS cd-rom, in addition to 'reactos/ntoskrnl.exe' check also for 'reactos/system32/ntoskrnl.exe'.
svn path=/trunk/; revision=9554
2004-05-29 21:28:28 +00:00
Hartmut Birr
716bbd44ba - Moved the definition of all dll base addresses to baseaddress.cfg.
svn path=/trunk/; revision=9553
2004-05-29 21:24:48 +00:00
Filip Navara
ceb8aca194 - Fix the "use of cast expressions as lvalues is deprecated" warning.
svn path=/trunk/; revision=9552
2004-05-29 21:21:06 +00:00
Filip Navara
9136088529 - Fixed DPRINTs.
- Added support for including other .inf files while building the standard hives.

svn path=/trunk/; revision=9551
2004-05-29 21:15:58 +00:00
Art Yerkes
dd2e0b0978 Added csq to build.
svn path=/trunk/; revision=9548
2004-05-29 17:00:41 +00:00
Filip Navara
8900df33c8 - Changed font substitution: MS Sans Serif -> Bitstream Vera Sans.
svn path=/trunk/; revision=9547
2004-05-29 15:53:56 +00:00
Filip Navara
45d5d0cea1 - Correctly initialize the startup info in WinExec.
svn path=/trunk/; revision=9546
2004-05-29 15:10:28 +00:00
Filip Navara
4faf15614f - Prepend "\\??\" to the file name in NtGdiAddFontResource.
svn path=/trunk/; revision=9545
2004-05-29 15:10:27 +00:00
Filip Navara
1aeb737c6b - Fixed unicode string copying bug in NtGdiAddFontResource.
svn path=/trunk/; revision=9544
2004-05-29 13:12:08 +00:00
Filip Navara
b94f2fca33 - Fixed declaration of IMAGE_EXPORT_DIRECTORY structure.
svn path=/trunk/; revision=9543
2004-05-29 11:58:16 +00:00
Filip Navara
206a67a937 - The last parameter of NtReadVirtualMemory should be optional.
svn path=/trunk/; revision=9542
2004-05-29 11:53:43 +00:00
Filip Navara
206298fe27 - RaiseException should pass the exception parameters even if the exception is non-continuable.
svn path=/trunk/; revision=9541
2004-05-29 11:51:33 +00:00
Art Yerkes
0f0b33c44c NdisQueryPacketLength -- Based in an obvious way on a similar macro.
svn path=/trunk/; revision=9539
2004-05-29 10:45:26 +00:00
Art Yerkes
05769811b4 Fixes for gcc-3.4.0 (pasting the __FUNCTION__ constant with a string)
and cast lvalue (reported by thomas weidenmueller)

svn path=/trunk/; revision=9537
2004-05-29 09:59:25 +00:00
Steven Edwards
76fea742f0 moved oskittcp as it is a driver lib.
svn path=/trunk/; revision=9529
2004-05-29 00:56:56 +00:00
Steven Edwards
d31c888e86 moved oskittcp as it is a driver lib.
svn path=/trunk/; revision=9527
2004-05-29 00:16:39 +00:00
Gé van Geldorp
683ba367cc Clean up calls from win32k to csrss
svn path=/trunk/; revision=9526
2004-05-28 21:33:41 +00:00
Royce Mitchell III
63fc502d5a put version information where it's supposed to go - thanks to Ge
svn path=/trunk/; revision=9525
2004-05-28 21:21:06 +00:00
Filip Navara
f1b0bedbad - Revert the PS/2 timeouts to the old values.
svn path=/trunk/; revision=9524
2004-05-28 21:17:42 +00:00
Royce Mitchell III
7440bee0cf reactos-specific debugging functions KeRosDumpStackFrames and KeRosPrintAddress
svn path=/trunk/; revision=9523
2004-05-28 21:16:27 +00:00
Royce Mitchell III
2e294f5461 OS version information - patch by Christoph von Wittich
svn path=/trunk/; revision=9522
2004-05-28 19:58:30 +00:00
Gé van Geldorp
69f3448639 Turn net/netstat and net/ipconfig back on again, since the build problems
were solved

svn path=/trunk/; revision=9521
2004-05-28 18:30:22 +00:00
Gé van Geldorp
137743321e Don't redefine WINAPI. Spotted by Travis Snoozy <ai2097@yahoo.com>
svn path=/trunk/; revision=9520
2004-05-28 18:25:05 +00:00
Steven Edwards
942d157b7a Remove dummy WINAPI define
svn path=/trunk/; revision=9519
2004-05-28 18:21:18 +00:00
Steven Edwards
663c447ca6 cleanup of the SDK and disable use of the old WINE tree.
Travis Snoozy <ai2097@yahoo.com>

svn path=/trunk/; revision=9518
2004-05-28 18:18:43 +00:00
Gé van Geldorp
26beb80a11 Add rule for generating .i (preprocessed) files from .c files
svn path=/trunk/; revision=9517
2004-05-28 18:16:46 +00:00
Royce Mitchell III
11f4efc511 upgrading user32 test to Wine-20040527 - disabled a test in the 'msg' test because it fails on XP SP1.
svn path=/trunk/; revision=9516
2004-05-28 17:56:17 +00:00
Royce Mitchell III
b9b553dbf6 added constants needed by wine's "user32 msg" test
svn path=/trunk/; revision=9515
2004-05-28 14:31:49 +00:00
Thomas Bluemel
004720f1a6 fixed typo
svn path=/trunk/; revision=9514
2004-05-28 13:23:24 +00:00
Thomas Bluemel
336746ec95 1. properly check parameters in SetFilePointer(Ex)()
2. fixed several functions to fail if dealing with console handles

svn path=/trunk/; revision=9513
2004-05-28 13:17:32 +00:00
Eric Kohl
938ede25cd - Implement a generic selection list.
- Use selection list in device settings pages.

svn path=/trunk/; revision=9512
2004-05-28 12:14:00 +00:00
Royce Mitchell III
69a06d8f31 added CS_DROPSHADOW, needed by latest version of wine's user32 test app
svn path=/trunk/; revision=9511
2004-05-28 03:43:12 +00:00
Mark Tempel
bd2990f457 removed programs that link to iphlpapi till exports are worked out.
svn path=/trunk/; revision=9510
2004-05-28 02:32:43 +00:00
Thomas Bluemel
d7b5932acd fixed filename in include statement and added some debug prints for stubs
svn path=/trunk/; revision=9508
2004-05-27 14:50:17 +00:00
Royce Mitchell III
961036b735 eliminate unnecessary multiplications in the inner loops of DIB_1BPP_BitBltSrcCopy_From1BPP
svn path=/trunk/; revision=9507
2004-05-27 12:35:23 +00:00
Hartmut Birr
6e3bbc606d - Don't change the environment block if the number of variables has not changed (in BlockEnvToEnviron).
- Use a copy of the environment strings (in BlockEnvToEnviron).

svn path=/trunk/; revision=9506
2004-05-27 11:49:48 +00:00
Thomas Bluemel
94c04c2051 fixed missing class dereferencings and store a list of windows in the class object
svn path=/trunk/; revision=9505
2004-05-27 11:47:42 +00:00
Filip Navara
ae85951413 - New font substitution: MS Sans Serif -> Bitstream Vera Serif
svn path=/trunk/; revision=9504
2004-05-26 21:47:07 +00:00
Eric Kohl
43836af86c - Implement dummy device settings pages.
- Hide the cursor at startup.

svn path=/trunk/; revision=9503
2004-05-26 20:58:37 +00:00
Aleksey Bragin
ac9cb4c5a6 Fix warnings by vandread.
svn path=/trunk/; revision=9502
2004-05-26 20:37:25 +00:00
Filip Navara
5141945b57 - Return success for SystemFileCacheInformation requests to NtQuerySystemInformation, so we can see some information in the Task Manager.
svn path=/trunk/; revision=9501
2004-05-26 19:56:35 +00:00
Filip Navara
72afcc3bb8 - Fixed the third passed parameter to NtSetInformationThread call in ImpersonateLoggedOnUser.
svn path=/trunk/; revision=9500
2004-05-26 19:53:48 +00:00
Thomas Bluemel
cb1ea2ade7 selecting a new clipping region into a dc doesn't return the previous clipping region handle
svn path=/trunk/; revision=9499
2004-05-26 18:59:21 +00:00
Thomas Bluemel
6248b04e6f fixed returning uninitialized variable in NtGdiSelectVisRgn() and NtGdiExtSelectClipRgn()
svn path=/trunk/; revision=9498
2004-05-26 18:49:06 +00:00
Eric Kohl
8158fc02d0 Append two newlines to the "Press any key to boot form CD....." string.
svn path=/trunk/; revision=9497
2004-05-26 10:58:29 +00:00
Thomas Bluemel
d7d7bbef13 added stubs for SetFileSecurityW(), GetNamedSecurityInfoA/W() and SetNamedSecurityInfoA/W()
svn path=/trunk/; revision=9496
2004-05-26 09:50:10 +00:00
Filip Navara
0fc5792047 - Set CurrentThread->u1.ExitTime to exit time in PsTerminateCurrentThread. Patch by Alex Ionescu.
svn path=/trunk/; revision=9495
2004-05-25 22:03:48 +00:00
Filip Navara
d35144407f - Enabled the 'Press any key to boot from CD' message in the ISO
boot code and show it only when some hard disk is present.
- Adjusted detection timeouts for PS/2 and RS232 to the minimum
  allowed by the specifications so we don't spend ages in hardware detection.
- Experimental NTFS reading support. (No boot code, no attribute lists, no decompression)

svn path=/trunk/; revision=9494
2004-05-25 21:47:39 +00:00
Filip Navara
470210fb06 - Enabled the 'Press any key to boot from CD' message in the ISO
boot code and show it only when some hard disk is present.
- Adjusted detection timeouts for PS/2 and RS232 to the minimum
  allowed by the specifications so we don't spend ages in hardware detection.
- Experimental NTFS reading support. (No boot code, no attribute lists, no decompression)

svn path=/trunk/; revision=9493
2004-05-25 21:31:27 +00:00
Filip Navara
5a22e5bcf0 - Fixed definition of assert macro.
- Fixed few DPRINTs to compile.
- Handle OF_CREATE flag of OpenFile.

svn path=/trunk/; revision=9492
2004-05-25 20:04:14 +00:00
Aleksey Bragin
f11893f56e Sample man files
svn path=/trunk/; revision=9491
2004-05-25 18:50:54 +00:00
Aleksey Bragin
0f711c642b New version of man by Semyon Novikov. Manual pages should be located in c:\\man for now, later it will be enhanced to environment variable.
I have changed the makefile so it is compatible with ReactOS, and compiles just by running 'make'. There are some warnings also, but I didn't have time to fix them.

svn path=/trunk/; revision=9490
2004-05-25 18:49:04 +00:00
Filip Navara
7a98b74d8b - Run Task Manager when CTRL-ALT-DEL is pressed.
svn path=/trunk/; revision=9489
2004-05-25 15:53:16 +00:00
Filip Navara
6368fbd7a8 - Support for window-less hotkeys.
- Send hotkeys even if there's no focus window.

svn path=/trunk/; revision=9488
2004-05-25 15:52:45 +00:00
Hartmut Birr
e58206820b - Implemented ScsiPortGetPhysicalAddress also for addresses from sense info buffer.
- Allocated the sense info buffer within contiguous physical memory.
- Don't send an sence request after an error if the miniport driver is autosense-capable.

svn path=/trunk/; revision=9487
2004-05-24 20:33:41 +00:00
Eric Kohl
b718b8e348 Implement kernel-mode range lists.
Install target must not rebuild executables.

svn path=/trunk/; revision=9486
2004-05-24 12:08:55 +00:00
Eric Kohl
82a4c658f4 Implement kernel-mode range lists.
svn path=/trunk/; revision=9485
2004-05-24 12:05:54 +00:00
Eric Kohl
47f7ff67c1 Implement RtlInvertRangeList() and RtlMergeRangeList().
svn path=/trunk/; revision=9484
2004-05-24 12:03:24 +00:00
Hartmut Birr
8c86d7049f - Fixed my copy-and-paste bug. Thanks to Royce III.
svn path=/trunk/; revision=9483
2004-05-23 15:49:56 +00:00
Thomas Bluemel
5096908ac7 ignore the hInstance field while searching classes if it's NULL
svn path=/trunk/; revision=9482
2004-05-23 14:04:58 +00:00
Hartmut Birr
924e3b2bea - Don't return a file or allocation size for directories.
svn path=/trunk/; revision=9481
2004-05-23 13:34:32 +00:00
Hartmut Birr
84d6759c0a - Fixed the calculated file attribute in CdfsFileFlagsToAttributes.
svn path=/trunk/; revision=9480
2004-05-23 13:27:26 +00:00
Eric Kohl
fc9d0d4b4d - Implement RtlFindRange().
- Add documentation.

svn path=/trunk/; revision=9479
2004-05-23 11:56:16 +00:00
Thomas Bluemel
27119bd65c fixed typos
svn path=/trunk/; revision=9478
2004-05-23 09:36:47 +00:00
Royce Mitchell III
fffba95c47 remove UNIMPLEMENTED from NtUserIsClipboardFormatAvailable and replace it with a DPRINT1 warning that it is not implemented. This change gets Irfanview working.
svn path=/trunk/; revision=9477
2004-05-23 04:04:10 +00:00
Filip Navara
11a1d291a0 - Disable NtGdiRealizePalette. It has a lot of bugs and really doesn't do any of the work it should do.
svn path=/trunk/; revision=9474
2004-05-22 22:07:42 +00:00
Thomas Bluemel
f2992e0c09 prevent memory leaks if callbacks to usermode never return
svn path=/trunk/; revision=9473
2004-05-22 21:12:15 +00:00
Hartmut Birr
ef7b36dd46 - Do not immediately write the zeroed region to the disk for a cached file.
- Fixed a problem, which does occur if the cluster size is lower than the segment size.

svn path=/trunk/; revision=9472
2004-05-22 18:28:18 +00:00
Thomas Bluemel
d805aabcae silence debug message
svn path=/trunk/; revision=9471
2004-05-22 17:51:08 +00:00
Thomas Bluemel
c6bdf3f977 1. added basic reference counting for message queues
2. fixed memory leak when a thread terminates while dispatching a message
3. wake the sender's thread in case of 2.

svn path=/trunk/; revision=9470
2004-05-22 16:48:50 +00:00
Martin Fuchs
4307e3115e code comments
svn path=/trunk/; revision=9469
2004-05-22 13:18:45 +00:00
Filip Navara
86ada6ab1c - Revert change to VGA register values that I accidently commited.
svn path=/trunk/; revision=9468
2004-05-22 12:23:12 +00:00
Eric Kohl
a197c442b7 Center install wizard.
Don't skip to next page as long as required data have not been entered.

svn path=/trunk/; revision=9467
2004-05-22 12:04:10 +00:00
Thomas Bluemel
dd55a50761 1. reverted my last change to SendMessageTimeout() which was wrong
2. fixed UserGetWindowIcon(), SendMessageTimeout() usually overwrites the result variable, even if it failed!

svn path=/trunk/; revision=9466
2004-05-22 09:22:41 +00:00
Filip Navara
1404258b13 - Remove WinLogon icon, because it's copyrighted by Microsoft.
svn path=/trunk/; revision=9465
2004-05-22 09:10:33 +00:00
Filip Navara
ed16c950dc - Check buffer sizes and color counts for IOCTL_VIDEO_SET_COLOR_REGISTERS request.
svn path=/trunk/; revision=9464
2004-05-22 08:53:26 +00:00
Filip Navara
1c1f4e3945 - Don't delete icons that we got by WM_GETICON or GetClassIcon.
svn path=/trunk/; revision=9463
2004-05-22 08:35:38 +00:00
Thomas Bluemel
4c8d47cc6b fixed SendMessageTimeout() to return the correct result even when it timed out
svn path=/trunk/; revision=9462
2004-05-22 08:27:15 +00:00
Hartmut Birr
a4931b6ee8 - removed an obsolete call to ExAllocatePool in CHECKPOINT
svn path=/trunk/; revision=9461
2004-05-22 08:12:49 +00:00
Art Yerkes
a31ff7a76b I forgot to increase the number of strings loaded from the registry. fixed.
svn path=/trunk/; revision=9460
2004-05-22 02:54:32 +00:00
Art Yerkes
7f1e933e8e Blight pointed out that we didn't have all the registers in js. This fixes
that.

svn path=/trunk/; revision=9459
2004-05-22 02:50:25 +00:00
Art Yerkes
6f17d958c6 Blight pointed out that I was missing some regs from the end of the trap frame.
These are now fixed.

svn path=/trunk/; revision=9458
2004-05-22 01:55:31 +00:00
Filip Navara
17983ae6be - Added support for special value "LiveCD" of SystemPath option
for loading ReactOS. It uses the known boot drive information
  as the boot path.

svn path=/trunk/; revision=9457
2004-05-21 20:29:56 +00:00
Filip Navara
1c9e1c3a8b - Fixed a bug in IsoSearchDirectoryBufferForFile. Compare the offset first, so we don't access invalid memory.
svn path=/trunk/; revision=9456
2004-05-21 20:06:09 +00:00
Filip Navara
ce81c53f81 - End-Of-Line marker at the real end of line shouldn't advance the vertical offset.
svn path=/trunk/; revision=9455
2004-05-21 17:34:24 +00:00
Filip Navara
d76f0c8745 - Support for the End-Of-Line RLE mark.
- Treat the bitmap header field bV5ClrUsed correctly if it's set to zero.

svn path=/trunk/; revision=9454
2004-05-21 17:05:46 +00:00
Thomas Bluemel
08855e847a don't clip moving rectangles to the work area for topmost windows
svn path=/trunk/; revision=9453
2004-05-21 12:46:59 +00:00
Thomas Bluemel
03de8510c2 removed obsolete fields from the W32PROCESS structure
svn path=/trunk/; revision=9452
2004-05-21 10:31:00 +00:00
Thomas Bluemel
4349fe8990 implemented DisableProcessWindowsGhosting() (window ghosting is not yet implemented though)
svn path=/trunk/; revision=9451
2004-05-21 10:09:31 +00:00
Thomas Bluemel
6851738b5a fixed message timeout crash, caused by inserting dispatching messages into the wrong dispatching list
svn path=/trunk/; revision=9450
2004-05-20 21:48:41 +00:00
Thomas Bluemel
c9bec757df fixed handling of caption buttons
svn path=/trunk/; revision=9449
2004-05-20 14:53:14 +00:00
Thomas Bluemel
0cc4a84668 clip to the work area when dragging a window
svn path=/trunk/; revision=9448
2004-05-20 14:34:14 +00:00
Thomas Bluemel
0a242842b2 fixed FillRect() to properly handle system color constants (thanks to Royce for spotting this bug)
svn path=/trunk/; revision=9447
2004-05-20 14:12:21 +00:00
Eric Kohl
f44bcb1cdb Add some security function stubs.
svn path=/trunk/; revision=9446
2004-05-20 12:42:51 +00:00
Hartmut Birr
4a1429bb28 - Do not change the mapping count of a page if the physical address falls
in the range of valid physical memory (in MmMapIoSpace and MmUnmapIoSpace).

svn path=/trunk/; revision=9445
2004-05-20 08:37:21 +00:00
Royce Mitchell III
a7cf6b254f get current HINSTANCE if given NULL in CreateWindowExA&W - fixes bug I found today with my little 'window stresser' app.
svn path=/trunk/; revision=9444
2004-05-20 04:10:01 +00:00
Thomas Bluemel
46d6fe4163 set proper lasterror code in RegisterWindowMessage()
svn path=/trunk/; revision=9443
2004-05-19 19:16:47 +00:00
Thomas Bluemel
23c42995a1 fixed RegisterWindowMessage()
svn path=/trunk/; revision=9442
2004-05-19 19:09:20 +00:00
Thomas Bluemel
1f14756983 attempt to fix handling of timed out sending of messages to be thread-safe
svn path=/trunk/; revision=9441
2004-05-19 18:45:31 +00:00
Thomas Bluemel
90b8b7f3d6 use FASTCALL calling convention for internal routines
svn path=/trunk/; revision=9440
2004-05-18 22:32:48 +00:00
Steven Edwards
0fcdaa8c81 Sylvain Petreolle -
Hacked TGMarltt to work on Windows as well as Linux and ReactOS with FreeType.

svn path=/trunk/; revision=9439
2004-05-18 16:22:49 +00:00
Thomas Bluemel
e765178153 ported CreatePolyPolygonRgn() and CreatePolygonRgn() from wine
svn path=/trunk/; revision=9438
2004-05-18 15:25:25 +00:00
Thomas Bluemel
40c3c7cd37 fixed memory leak
svn path=/trunk/; revision=9437
2004-05-18 14:06:42 +00:00
Thomas Bluemel
7ea71b67f4 safe parameter handling for PolyPolygonRgn() and PolygonRgn(). The actual region calculation for both functions is not yet implemented though!
svn path=/trunk/; revision=9436
2004-05-18 13:57:41 +00:00
Martin Fuchs
4b62bbcaa8 prompt with error messageboxes for problems when reading init files
svn path=/trunk/; revision=9435
2004-05-18 12:38:39 +00:00
Eric Kohl
9c4dd6241a Implement SeQueryAuthenticationIdToken().
Add audit function stubs.

svn path=/trunk/; revision=9434
2004-05-18 12:24:40 +00:00
Martin Fuchs
0cc2f5d9be return more verbose XML parser error messages
svn path=/trunk/; revision=9433
2004-05-18 12:10:36 +00:00
Hartmut Birr
c49f961993 - Do print readable sector numbers in DiskReadLogicalSectors.
svn path=/trunk/; revision=9432
2004-05-17 20:30:55 +00:00
Hartmut Birr
869728e524 - Implemented the printing of 64 bit numbers.
svn path=/trunk/; revision=9431
2004-05-17 20:25:01 +00:00
Hartmut Birr
d462152e6d - Fixed the calculation of the start for a partition within an extended partition.
svn path=/trunk/; revision=9430
2004-05-17 20:20:17 +00:00
Martin Fuchs
3128a0aff7 add missing precomp.h header file
svn path=/trunk/; revision=9429
2004-05-17 19:56:04 +00:00
Gé van Geldorp
8f30493913 Prevent unnecessary relinks when TARGET_REGTESTS = yes
svn path=/trunk/; revision=9428
2004-05-17 19:45:10 +00:00
Steven Edwards
0e7124da95 committed Marlett replacement as binary
svn path=/trunk/; revision=9427
2004-05-17 17:41:08 +00:00
Steven Edwards
0bf4f46ded trying to fix this to be binary
svn path=/trunk/; revision=9426
2004-05-17 17:40:21 +00:00
Steven Edwards
997484141f Untested !!!!
Added Font substition support for Marlett via TGMarlett

svn path=/trunk/; revision=9425
2004-05-17 17:32:19 +00:00
Steven Edwards
6eb086ebc9 added Transgamings Marlett font replacement licensed
under the BSD license.

svn path=/trunk/; revision=9424
2004-05-17 17:30:24 +00:00
Filip Navara
aaa859c4a6 - Fixed Window Class menu handling that I broke with my last patch.
svn path=/trunk/; revision=9423
2004-05-17 16:38:58 +00:00
Eric Kohl
06ed586fb1 Add documentation for some range list functions.
svn path=/trunk/; revision=9422
2004-05-17 13:21:52 +00:00
Eric Kohl
53a3421952 Add range list flags.
svn path=/trunk/; revision=9421
2004-05-17 13:20:05 +00:00
Martin Fuchs
06c03f786a use precompiled headers for VC++ builds
svn path=/trunk/; revision=9420
2004-05-17 13:11:06 +00:00
Filip Navara
fb5e84bd1f - Set Mdl->Process in MmMapLockedPages to current process and back to NULL in MmUnmapLockedPages.
svn path=/trunk/; revision=9419
2004-05-16 22:27:57 +00:00
Filip Navara
caa8f5caae - Don't use object that's already unlocked.
svn path=/trunk/; revision=9418
2004-05-16 19:42:32 +00:00
Filip Navara
eb9fa5b0a5 Window Class handling fixes:
- Corrected styles/names for builtin classes.
- Make NtUserRegisterClassExWOW a bit more like in windows.
- More Windows-like handling of hInstance in RegisterClassEx[AW].
- Very basic work on global vs. local window classes.

svn path=/trunk/; revision=9417
2004-05-16 19:31:09 +00:00
Thomas Bluemel
192d918fb4 fixed missing dereferencing of threads in PostThreadMessage()
svn path=/trunk/; revision=9416
2004-05-16 18:33:40 +00:00
Thomas Bluemel
4bee3087ac fixed dereferencing bug
svn path=/trunk/; revision=9415
2004-05-16 13:57:49 +00:00
Thomas Bluemel
3538785e6a replaced UnsafeIntCreateRectRgnIndirect() and UnsafeIntUnionRectWithRgn() with macros to directly call the appropriate function
svn path=/trunk/; revision=9414
2004-05-16 09:51:27 +00:00
Thomas Bluemel
607ca343e7 fixed typo
svn path=/trunk/; revision=9413
2004-05-15 23:07:11 +00:00
Hartmut Birr
d16209b9dc - Improved the reading and writing of fragmented files.
svn path=/trunk/; revision=9412
2004-05-15 23:00:02 +00:00
Hartmut Birr
189436c3ef - Fixed the implementation of IoBuildPartialMdl.
svn path=/trunk/; revision=9411
2004-05-15 22:51:38 +00:00
Thomas Bluemel
43783f95c5 Anich Gregor: Basic implementation of GetUserObjectInformation() (needed by the nvidia opengl ICD)
svn path=/trunk/; revision=9410
2004-05-15 22:50:04 +00:00
Hartmut Birr
bdd1e9e8c6 - Fixed the implementation of MmMapIoSpace.
svn path=/trunk/; revision=9409
2004-05-15 22:45:51 +00:00
Jason Filby
0dbe70cad7 Eng memory test
svn path=/trunk/; revision=9408
2004-05-15 20:30:19 +00:00
Hartmut Birr
aa82813f06 - Simplified the converting of environment variables.
svn path=/trunk/; revision=9407
2004-05-15 20:25:09 +00:00
Thomas Bluemel
4b6ab2d1c6 removed assertion
svn path=/trunk/; revision=9406
2004-05-15 20:19:20 +00:00
Eric Kohl
c0fb78df09 Implement RtlIsRangeAvailable().
svn path=/trunk/; revision=9405
2004-05-15 19:41:10 +00:00
Eric Kohl
9f5e364685 Add range list status codes.
svn path=/trunk/; revision=9404
2004-05-15 19:39:35 +00:00
Hartmut Birr
fbef35d884 - Fixed the execution of batch files.
svn path=/trunk/; revision=9403
2004-05-15 19:24:59 +00:00
Thomas Bluemel
6387f49323 removed #ifdef (due to wine sync)
svn path=/trunk/; revision=9402
2004-05-15 18:20:26 +00:00
Gé van Geldorp
75cf55e8b3 Test was backwards
svn path=/trunk/; revision=9401
2004-05-15 16:29:55 +00:00
Gé van Geldorp
1805ae9248 ASSERT() was a no-op in win32k, even for debug builds
svn path=/trunk/; revision=9400
2004-05-15 16:17:59 +00:00
Filip Navara
9fa3c615c7 - Fixed cut & paste error in NtGdiGetDIBColorTable and NtGdiSetDIBColorTable.
- Fixed implementation of DIB_MapPaletteColors. It shoud take palette from DC and the index array is of type PUSHORT, not PULONG.

svn path=/trunk/; revision=9399
2004-05-15 15:04:43 +00:00
Eric Kohl
2f7fa4426a Implement range list copy and delete functions.
svn path=/trunk/; revision=9398
2004-05-15 14:26:08 +00:00
Jason Filby
d1d7eaa06b Stub __badioinfo
svn path=/trunk/; revision=9397
2004-05-15 12:56:53 +00:00
Filip Navara
4e81b67c89 - Use NtGdiBitBlt in NtGdiStretchDIBits if source and destination dimensions are equal.
svn path=/trunk/; revision=9396
2004-05-15 11:20:38 +00:00
Thomas Bluemel
39fee6b8c7 combobox popups should be always-on-top
svn path=/trunk/; revision=9395
2004-05-15 10:08:45 +00:00
Filip Navara
bc072fb755 - Recalculate the menu bar size when resizing window.
svn path=/trunk/; revision=9394
2004-05-15 08:53:06 +00:00
Filip Navara
6952a5644f - New implementation of GetDIBColorTable and SetDIBColorTable.
svn path=/trunk/; revision=9393
2004-05-15 08:52:25 +00:00
Gé van Geldorp
1825cf4a15 Only split update region into client and non-client parts if there actually
is something to split

svn path=/trunk/; revision=9392
2004-05-15 08:01:56 +00:00
Gé van Geldorp
5884627fe6 Silence debug messages
svn path=/trunk/; revision=9391
2004-05-15 07:49:05 +00:00
Gé van Geldorp
1c108dfcbd Implement complex clipping for StretchBlt
svn path=/trunk/; revision=9390
2004-05-15 06:54:47 +00:00
Thomas Bluemel
b3b134ecfa changed cursors/icons to use the window station handle table
svn path=/trunk/; revision=9389
2004-05-14 23:57:32 +00:00
Gé van Geldorp
4b8fc8e4e4 Implement complex clipping for StretchBlt
svn path=/trunk/; revision=9388
2004-05-14 22:56:18 +00:00
Filip Navara
0c9315b3dc - Fixed implementation of NtGdiGetNearestColor.
svn path=/trunk/; revision=9387
2004-05-14 22:20:46 +00:00
Filip Navara
759afa4f19 - Define KEBUGCHECK macro to make compiling KJS working again.
svn path=/trunk/; revision=9386
2004-05-14 21:25:08 +00:00
Filip Navara
3221290df2 - Minor corrections to EqualRect and SubtractRect.
svn path=/trunk/; revision=9385
2004-05-14 17:02:40 +00:00
Filip Navara
394e0f648e - NtGdiCreateRectRgn should accept negative width and height. It's supposed to be handled just like in NtGdiSetRectRgn.
svn path=/trunk/; revision=9384
2004-05-14 16:56:48 +00:00
Filip Navara
3f9294eaee - Fix ExtSelectClipRgn and some other clipping functions.
svn path=/trunk/; revision=9383
2004-05-14 16:55:18 +00:00
Filip Navara
1e4d1cd885 - Fix DPRINT.
svn path=/trunk/; revision=9382
2004-05-14 16:50:44 +00:00
Filip Navara
95a2d3b54f - Modify DPRINTs to print window styles in hexadecimal notation.
svn path=/trunk/; revision=9381
2004-05-14 16:50:16 +00:00
Filip Navara
fb5a06a8d1 - Check for the WS_CLIPSIBLINGS flag on the correct window.
svn path=/trunk/; revision=9380
2004-05-14 16:48:47 +00:00
Filip Navara
1f1079ac18 - Don't modify Msg->pt for mouse messages. It's supposed to be always in screen coordinates, not it client coordinates.
svn path=/trunk/; revision=9379
2004-05-14 16:48:04 +00:00
Eric Kohl
4087ebf77f Implement basic range list functions.
svn path=/trunk/; revision=9378
2004-05-14 12:11:52 +00:00
James Tabor
57df925ccb Use updated version of SystemHandleInformation.
svn path=/trunk/; revision=9377
2004-05-14 09:25:41 +00:00
Filip Navara
6ea0fbf3f3 - Implementation of RtlDuplicateUnicodeString.
- Copied implementation of RtlGetVersion from ntoskrnl.
- Stubs for RtlNtPathNameToDosPathName and RtlpEnsureBufferSize. These functions are needed by native Windows DLLs.
- Export RtlRandomEx as a wrapper for RtlRandom.

svn path=/trunk/; revision=9376
2004-05-13 21:01:14 +00:00
Filip Navara
f4b54419c3 - Added missing unlocking of handle table in RtlLookupAtomInAtomTable.
svn path=/trunk/; revision=9375
2004-05-13 20:48:31 +00:00
Filip Navara
41df8b886e - Make WinPosSearchChildren more readable.
svn path=/trunk/; revision=9374
2004-05-13 20:46:28 +00:00
Filip Navara
63c655e5d1 - Add some stubs needed by native Windows DLLs.
svn path=/trunk/; revision=9373
2004-05-13 20:42:28 +00:00
Filip Navara
81728cf1b8 - Fix common controls subclassing.
svn path=/trunk/; revision=9372
2004-05-13 20:34:24 +00:00
Filip Navara
624300da51 - Report a failure for FindNextFile(NULL) instead of crashing.
svn path=/trunk/; revision=9371
2004-05-13 20:32:18 +00:00
Filip Navara
620a45896a - Report failure when function imported by ordinal isn't found.
svn path=/trunk/; revision=9370
2004-05-13 20:30:26 +00:00
Filip Navara
c9b5101395 - Handle more notification messages to prevent "-- %p WM_COMMAND %x unhandled" messages.
svn path=/trunk/; revision=9369
2004-05-13 20:28:58 +00:00
Filip Navara
66a1b30c14 - Add REST_NONLEGACYSHELLMODE policy.
svn path=/trunk/; revision=9368
2004-05-13 20:27:04 +00:00
Filip Navara
3da87fae97 - Don't allow making a window with negative dimensions in WM_WINDOWPOSCHANGING.
svn path=/trunk/; revision=9367
2004-05-13 20:25:50 +00:00
Filip Navara
83c27bebc6 - Force recalulation size of menu items when new item is added.
- Make MDI injected icons working.
- Minor corrections to menu code size handling.

svn path=/trunk/; revision=9366
2004-05-13 20:21:27 +00:00
Filip Navara
5c60bbb820 - Define RB_GETBANDMARGINS and RB_SETWINDOWTHEME.
svn path=/trunk/; revision=9365
2004-05-13 20:17:12 +00:00
Filip Navara
08358fce51 - Don't pass garbage to RtlQueryAtomInAtomTable. It doesn't like it...
svn path=/trunk/; revision=9364
2004-05-13 20:10:15 +00:00
Steven Edwards
036d02e291 Added .cvsignore for oskittcp
svn path=/trunk/; revision=9363
2004-05-13 20:03:03 +00:00
Jason Filby
58f0550e7b Regression-test enable win32k; patch by Casper Hornstrup
svn path=/trunk/; revision=9362
2004-05-13 19:31:09 +00:00
Jason Filby
6dac2c7d87 Remove unused variable; patch by Casper Hornstrup
svn path=/trunk/; revision=9361
2004-05-13 19:28:57 +00:00
Filip Navara
89ac0e36c9 - Print class name in DPRINT1 in NtUserFindWindowEx.
svn path=/trunk/; revision=9360
2004-05-12 20:45:05 +00:00
Filip Navara
a1c9203ceb - Fixed the WM_SYSCOMMAND with SC_SIZE messages to have correct codes in wParam.
svn path=/trunk/; revision=9359
2004-05-12 20:34:38 +00:00
Thomas Bluemel
f4371386e4 GetWindowInfo() doesn't check the cbSize parameter
svn path=/trunk/; revision=9358
2004-05-12 15:28:01 +00:00
Gé van Geldorp
a218ec6e0b Fix scrollbar controls
svn path=/trunk/; revision=9357
2004-05-12 09:47:16 +00:00
Gé van Geldorp
45ac874e11 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9356
2004-05-11 20:52:10 +00:00
Gé van Geldorp
b8c9de400f Fix command line handling (mostly double-quoting stuff)
svn path=/trunk/; revision=9355
2004-05-11 20:44:30 +00:00
Gé van Geldorp
fc1b4d644e Allow caller to continue after NtUserOpenClipboard()
svn path=/trunk/; revision=9353
2004-05-10 23:05:13 +00:00
Filip Navara
71f57b72d4 - Workaround for supporting a reads from pipe after the other end has been closed and data are still available in the buffers.
svn path=/trunk/; revision=9352
2004-05-10 19:58:10 +00:00
Thomas Bluemel
21a782aceb take back changes to window styles, they broke our gui consoles
svn path=/trunk/; revision=9351
2004-05-10 19:23:37 +00:00
Gé van Geldorp
1b645d2622 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9350
2004-05-10 18:02:20 +00:00
Gé van Geldorp
2fbb38750c Update to FreeType 2.1.8
svn path=/trunk/; revision=9349
2004-05-10 17:48:36 +00:00
Thomas Bluemel
418b7e53a6 use a common header for most files in win32k to make use of precompiled headers
svn path=/trunk/; revision=9348
2004-05-10 17:07:20 +00:00
Thomas Bluemel
23dcd0a6f2 fixed compiling issues with gcc 3.4
svn path=/trunk/; revision=9347
2004-05-10 13:35:28 +00:00
Thomas Bluemel
32478ebba8 fixed compiling issues with gcc 3.4
svn path=/trunk/; revision=9346
2004-05-10 13:29:59 +00:00
Eric Kohl
dc5862b16e Enable missing EnumDisplayMonitors.
svn path=/trunk/; revision=9345
2004-05-10 12:34:44 +00:00
Gé van Geldorp
eca151dba3 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9344
2004-05-10 12:21:22 +00:00
Gé van Geldorp
cf6301c2d6 Avoid warnings when using gcc 3.4
svn path=/trunk/; revision=9343
2004-05-10 11:56:07 +00:00
Gé van Geldorp
a2c82e3283 Avoid collision with compiler generated label
svn path=/trunk/; revision=9342
2004-05-10 11:13:15 +00:00
Gé van Geldorp
7177d62015 Skip leading comment lines
svn path=/trunk/; revision=9341
2004-05-10 10:51:36 +00:00
Thomas Bluemel
37af37614a Royce3: fixed compiling issues with g++
svn path=/trunk/; revision=9340
2004-05-10 07:44:43 +00:00
Hartmut Birr
c1574ff8d1 - Put the event from file object as user event into the irp in IopCloseFile
and IopDeleteFile. This is necessary because the event from fileobject
  isn't set automatically after a close/cleanup call.

svn path=/trunk/; revision=9339
2004-05-09 15:02:07 +00:00
Hartmut Birr
ad49710348 - Set the correct cdb length for the mode sens command in CdromClassCreateDeviceObject.
svn path=/trunk/; revision=9338
2004-05-09 14:50:50 +00:00
Eric Kohl
c2f0a2f385 Support multi-block bins.
svn path=/trunk/; revision=9337
2004-05-09 14:50:09 +00:00
Eric Kohl
f760135f5d - Implement multi-block bins. This removes all existing size limits within the registry.
- Janitorial work.

svn path=/trunk/; revision=9336
2004-05-09 12:23:35 +00:00
Thomas Bluemel
cc056e8bb5 handle WM_SETCUROR messages for the desktop window
svn path=/trunk/; revision=9335
2004-05-08 19:35:32 +00:00
Thomas Bluemel
c12dfa13b6 assign even more styles for overlapped windows
svn path=/trunk/; revision=9334
2004-05-08 16:06:54 +00:00
Gé van Geldorp
066123fa60 Update porting status
svn path=/trunk/; revision=9333
2004-05-08 14:16:09 +00:00
Gé van Geldorp
dd3c643b4d Sync to Wine-20040505:
Francois Gouget <fgouget@codeweavers.com>
- Taking into account wavemap and midimap there can be up to 8 output
  drivers. So increase the size of the MMDrvs array accordingly.
- Skip already loaded drivers before complaining (asserting) that they
  don't fit in the MMDrvs array.
- Make static Unicode strings const.

svn path=/trunk/; revision=9331
2004-05-08 14:07:55 +00:00
Gé van Geldorp
f19704b04f Sync to Wine-20040505:
Francois Gouget <fgouget@free.fr>
- Make Unicode strings 'static const'.
- Assorted spelling fixes.
- Make our ascii strings static const.
- Remove a couple string variables that were used only once and use the
  string literal directly.
- Use named constants instead of magic numbers.
- Remove wszRegSeparator from devenum_private.h since it's neither
  exported by createdevenum.c nor used by anyone else.
Kevin Koltzau <kevin@plop.org>
- Allow UrlCombine to calculate size of required buffer.

svn path=/trunk/; revision=9330
2004-05-08 13:49:05 +00:00
Gé van Geldorp
1b91a499fe Ulrich Czekalla <ulrich@codeweavers.com>
- Delegates messages directly to the edit control window proc instead of
  containing an edit control. Fixes problems with subclassing the
  richedit control.
Francois Gouget <fgouget@free.fr>
- Make Unicode const strings static so they are not copied to the stack
  each time we enter the function.

svn path=/trunk/; revision=9329
2004-05-08 13:41:00 +00:00
Gé van Geldorp
f7a4bc8f45 Sync to Wine-20040505:
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- Add a stub for StgCreateStorageEx(). Returns
  STG_E_UNIMPLEMENTEDFUNCTION as per MSDN. Fixes an error saving files
  in Word XP.
- Make our ascii strings static const.
  Remove a couple string variables that were used only once and use the
  string literal directly.
Marcus Meissner <marcus@jet.franken.de>
- Fixed strict aliasing issues in dlls/ole32.
- Implemented CoReleaseMarshalData.
- Fixed lvalue casts.
- Fixed strict aliasing issues in dlls/ole32.
Filip Navara <xnavara@volny.cz>
- Get rid of E_UNSPEC non-standard error value.

svn path=/trunk/; revision=9328
2004-05-08 13:32:51 +00:00
Eric Kohl
4c54d1cace Implement recursive deletion of start menu groups and desktop items.
svn path=/trunk/; revision=9327
2004-05-08 13:11:07 +00:00
Thomas Bluemel
b1e6d9458c minor fixes
svn path=/trunk/; revision=9326
2004-05-08 13:06:12 +00:00
Gé van Geldorp
af54a29030 Sync to Wine-20040505:
Mike McCormack <mike@codeweavers.com>
- Implemented WNetEnumCachedPasswords.

svn path=/trunk/; revision=9325
2004-05-08 12:58:08 +00:00
Gé van Geldorp
4e0fa347fa Sync to Wine-20040505:
Pavel Roskin <proski@gnu.org>
- Make the file type combobox non-editable.
Ilya Korniyko <k_ilya@ukr.net>
- Added Ukrainian translations.
Wolfgang Schwotzer <woschwot@gmx.net>
- Update OFN_READONLY flag when closing file dialog.
- Make file dialog support FNERR_BUFFERTOSMALL if buffer too small.
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- If lpstrTitle is NULL, set it to either 'Open File' or 'Save as'.
- Constify the string constants.
- Make Unicode const strings static so they are not copied to the stack
  each time we enter the function.

svn path=/trunk/; revision=9324
2004-05-08 12:53:14 +00:00
Thomas Bluemel
9c710c79db silence debug messages
svn path=/trunk/; revision=9323
2004-05-08 12:49:34 +00:00
Thomas Bluemel
c862df0add fixed handling of CW_USEDEFAULT with CreateWindow(Ex)()
svn path=/trunk/; revision=9322
2004-05-08 12:42:46 +00:00
Gé van Geldorp
2f07e000b4 Sync to Wine-20040505:
Ilya Korniyko <k_ilya@ukr.net>
- Added Ukrainian translations.
Francois Gouget <fgouget@free.fr>
- Make Unicode strings static const.
- Make our ascii strings static const.
- Remove a couple string variables that were used only once and use the
  string literal directly.
Krzysztof Foltman <kfoltman@portal.onet.pl>
- make monthcal a child of datetime (it was a sibling before, causing
  completely incorrect message flow)
- update monthcal after date change in datetime
- choose different coordinates when DTS_SHOWNONE is not used
- embedded monthcal is now 200 pixels wide
- selecting a day in embedded monthcal updates the datetime and hides
  the monthcal
- changing months/years by clicking month name/year in title bar works
- embedded month calendar is correctly destroyed (it used to stick on
  the screen long after the datetime's container was closed)
- next/prev month don't stick anymore
- min/max ranges initialized to some reasonable values
- fixed some bugs caused by reversed order of arguments of MONTHCAL_CopyTime
- update current month/year after setting current date
- changing months etc doesn't send MCN_SELECT (which could be sent
  only after a particular day was clicked)
- changed (hit && MCHT_CALENDARDATE) to (hit == MCHT_CALENDARDATE)
Huw Davies <huw@codeweavers.com>
- Deleting column zero should only delete the column and not the item
  data.
- Implemented TVS_NOSCROLL.
Maxime Bellenge <maxime.bellenge@laposte.net>
- Add NM_RCLICK notification support for toolbars.
- Fix the size of the listview items in the customize dialog.
- Fix TB_GETSTYLE message to return the style of the toolbar and not the
  style of a button.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Optimise accessing toolbar style by storing it in the TOOLBAR_INFO
  structure.
- Replace {Get,Set}WindowLong by {Get,Set}WindowLongPtr where
  appropriate.

svn path=/trunk/; revision=9321
2004-05-08 11:41:05 +00:00
Gé van Geldorp
739592deab Patch by tonik <spammed@fromru.com>
GuiConsoleUpdateBitmap ignores the color attribute of the first character in
line, instead it takes the attribute of the last character of the previous line.

svn path=/trunk/; revision=9320
2004-05-08 09:19:53 +00:00
Filip Navara
eb065653f6 - Protect against reads from (and writes to) closed named pipes.
svn path=/trunk/; revision=9319
2004-05-07 12:13:13 +00:00
Eric Kohl
83d8ef34bb Enable the creation of nested desktop and start menu groups.
svn path=/trunk/; revision=9318
2004-05-07 11:18:53 +00:00
Royce Mitchell III
60676825a8 use bugcheck macros where appropriate so users have a better idea of why they crashed.
svn path=/trunk/; revision=9317
2004-05-07 05:12:10 +00:00
Royce Mitchell III
85f77bb306 fixed output from test
svn path=/trunk/; revision=9316
2004-05-07 04:04:10 +00:00
Thomas Bluemel
bcde8100ea fixed GetThreadDesktop() (not fully working yet because it requires a ObFindHandleForObject() implementation in case the requested thread doesn't belong to the calling process)
svn path=/trunk/; revision=9315
2004-05-05 22:47:06 +00:00
Thomas Bluemel
879f672ffe rewrote NtUserBuildHwndList()
svn path=/trunk/; revision=9314
2004-05-05 22:26:04 +00:00
Thomas Bluemel
e8953aae82 properly handle HTTRANSPARENT hittest with mouse messages
svn path=/trunk/; revision=9313
2004-05-05 22:13:17 +00:00
Filip Navara
333e6a58cb - Fixed various problems (hangs/crashes) with connecting, disconnecting and closing named pipes.
svn path=/trunk/; revision=9312
2004-05-05 18:30:16 +00:00
Filip Navara
65093d7a1e - Compile RPCRT4 without debug messages.
svn path=/trunk/; revision=9311
2004-05-05 18:30:13 +00:00
Eric Kohl
233a41e696 Implement AddItemW().
svn path=/trunk/; revision=9310
2004-05-05 15:29:15 +00:00
Thomas Bluemel
34d4fe2efd support the WS_EX_LEFTSCROLLBAR
svn path=/trunk/; revision=9309
2004-05-05 13:58:59 +00:00
Mike Nordell
2ff07f4497 Return reasonably correct result querying a null memory area. Still a TODO left.
svn path=/trunk/; revision=9308
2004-05-05 02:00:01 +00:00
Filip Navara
857e0edb82 - Fix recognition of CALL instruction. Spotted by Anich Gregor.
svn path=/trunk/; revision=9307
2004-05-04 21:16:51 +00:00
James Tabor
311d1ab004 Added Spinlock in ObpGetHandleCountbyHandleTable.
svn path=/trunk/; revision=9306
2004-05-04 20:18:52 +00:00
Filip Navara
4aeca8b2b1 - Remove old RPCRT4.
svn path=/trunk/; revision=9305
2004-05-04 20:12:04 +00:00
Thomas Bluemel
97a1bb9c2e added option -s to silence status output while processing
svn path=/trunk/; revision=9304
2004-05-04 20:10:18 +00:00
Filip Navara
1021b58459 - Merge RPC runtime from Wine.
svn path=/trunk/; revision=9303
2004-05-04 20:10:07 +00:00
Filip Navara
3eb8552cf1 - Remove old RPCRT4.
svn path=/trunk/; revision=9302
2004-05-04 20:03:37 +00:00
Filip Navara
cf6647ab2e - Forgot to commit this file when syncing the kernel32 test.
svn path=/trunk/; revision=9301
2004-05-04 19:55:10 +00:00
Filip Navara
ae6296eb10 - Remove IPHLPAPI headers copied from Wine.
- Add the necessary structures to W32API headers.

svn path=/trunk/; revision=9300
2004-05-04 19:53:14 +00:00
Filip Navara
c789493a59 - Updated kernel32 test to Wine-20040504.
svn path=/trunk/; revision=9299
2004-05-04 17:25:19 +00:00
Eric Kohl
57aa128d43 Implement DeleteItemW().
svn path=/trunk/; revision=9298
2004-05-04 13:11:22 +00:00
Gé van Geldorp
a02cf9bbfb Implement GetMenuItemInfoA/W
svn path=/trunk/; revision=9297
2004-05-03 22:16:09 +00:00
Filip Navara
73812409b4 - Implementation of IOCTL_VIDEO_QUERY_CURRENT_MODE. Based on patch by Herv� Poussineau.
svn path=/trunk/; revision=9296
2004-05-03 17:15:14 +00:00
Thomas Bluemel
99282d8160 forgot to remove some temporary debug output
svn path=/trunk/; revision=9295
2004-05-03 17:12:27 +00:00
Thomas Bluemel
69e19de407 cleanup of the unicode mess (im)ported from wine
svn path=/trunk/; revision=9294
2004-05-03 16:59:59 +00:00
Steven Edwards
2bde1ad87b removed WINE from list of EXTERNALS, disabled building psx and os2 subsystem from externals for the time being.
svn path=/trunk/; revision=9293
2004-05-03 15:29:01 +00:00
Thomas Bluemel
eae24c4093 implemented LoadModule()
svn path=/trunk/; revision=9292
2004-05-03 14:34:44 +00:00
Eric Kohl
03cfc7943a - Implement DeleteGroup().
- Implement ANSI profile directory functions.

svn path=/trunk/; revision=9291
2004-05-03 12:05:44 +00:00
Hartmut Birr
560afee25c - Don't read the disk informations at boot time from removable medias like zip drives.
This prevents from merging removable disks into the order of partitions from hard disks.

svn path=/trunk/; revision=9289
2004-05-02 22:54:45 +00:00
Hartmut Birr
2440a90d73 - Don't assign arc names to removable media drives like zip drives.
svn path=/trunk/; revision=9288
2004-05-02 22:49:24 +00:00
Gé van Geldorp
8220b586b4 Handle MENUITEMINFOW compiled with _WIN32_WINNT < 0x0500 (MENUITEMINFOW
misses the HBITMAP hbmpItem at the end in that case).

svn path=/trunk/; revision=9287
2004-05-02 21:41:18 +00:00
Mike Nordell
01e86752a1 Make loader tell what module it is relocating (debug)
svn path=/trunk/; revision=9286
2004-05-02 20:53:50 +00:00
Hartmut Birr
7450b416e4 - Fixed checking for a FAT file system on a removable media.
- Check more exactly for a FAT file system.

svn path=/trunk/; revision=9285
2004-05-02 20:16:46 +00:00
Hartmut Birr
38ed29a671 - Check more exactly for a FAT file system.
svn path=/trunk/; revision=9284
2004-05-02 20:12:38 +00:00
Hartmut Birr
a4b7d6a7a5 - Removed old debug code which may crash a user mode application.
svn path=/trunk/; revision=9283
2004-05-02 20:08:29 +00:00
Eric Kohl
00010bb088 Add missing io performance counters.
SystemPerformanceInformation reads io counters.

svn path=/trunk/; revision=9282
2004-05-02 19:34:21 +00:00
Thomas Bluemel
9ea61adcf9 implemented IsWindowInDestroy()
svn path=/trunk/; revision=9281
2004-05-02 17:25:21 +00:00
Thomas Bluemel
b2aa394176 implemented GetThreadLocale() and partly implemented SetThreadLocale()
svn path=/trunk/; revision=9280
2004-05-02 15:47:34 +00:00
Thomas Bluemel
3cc6704954 ported GetBinaryType() from wine
svn path=/trunk/; revision=9279
2004-05-02 14:47:05 +00:00
Art Yerkes
6ec9cfe422 Explanation of the files here.
svn path=/trunk/; revision=9278
2004-05-02 07:36:36 +00:00
Art Yerkes
223730ca41 First rev where a full connect - receive - disconnect cycle worked, although
data wasn't delivered to the client program.  The TCP performed correctly in
handling incoming data, connecting and acknowledging traffic.  Pared down
files to minimum needed.  I'll be able to do more later with the directory
structure, but this is quite workable.

Now working on the rest of the interface to the upper layer.

I'm trying to make this interface as generic as possible so that when IPv6
is added to reactos, there won't have to be too many changes.

svn path=/trunk/; revision=9277
2004-05-02 07:24:43 +00:00
James Tabor
f9df303240 Proper way for counting process handles.
svn path=/trunk/; revision=9275
2004-05-02 04:40:25 +00:00
Gé van Geldorp
f36cfa653a Always reset AUTO_RESIZE flag on exit from REBAR_ForceResize
svn path=/trunk/; revision=9274
2004-05-01 21:22:18 +00:00
Eric Kohl
db2d21de92 Fix Nt/ZwGetTickCount.
svn path=/trunk/; revision=9273
2004-05-01 19:22:49 +00:00
Thomas Bluemel
9c2e9ae15d include welcome.exe on the bootcd
svn path=/trunk/; revision=9272
2004-05-01 19:05:29 +00:00
Mike Nordell
6afc02946b Display module names with the stack trace on unhandled exception (debug)
svn path=/trunk/; revision=9271
2004-05-01 18:09:53 +00:00
Thomas Bluemel
1c49860e46 implemented AnyPopup()
svn path=/trunk/; revision=9270
2004-05-01 18:06:59 +00:00
Mike Nordell
86805ab86a MmQuerySectionView now returns correct AllocationBase (Hartmut Birr)
svn path=/trunk/; revision=9269
2004-05-01 17:11:34 +00:00
Thomas Bluemel
9e1f523308 implemented LockWindowStation() and UnlockWindowStation() (forgot to commit these changes in my previous commit)
svn path=/trunk/; revision=9268
2004-05-01 17:06:55 +00:00
Thomas Bluemel
56ee4446f0 implemented RegisterLogonProcess(), LockWindowStation() and UnlockWindowStation()
svn path=/trunk/; revision=9267
2004-05-01 16:43:15 +00:00
Eric Kohl
346aa0cca2 - Set ALLUSERSPROFILE environment variable upon logon.
- Implement CreateGroup().

svn path=/trunk/; revision=9266
2004-05-01 11:55:38 +00:00
Eric Kohl
58fa3560b2 Add required user shell folder settings.
svn path=/trunk/; revision=9265
2004-05-01 11:53:20 +00:00
Thomas Bluemel
29963dba5d don't use DrawFocusFrame for thin window moving rectangles
svn path=/trunk/; revision=9264
2004-05-01 11:43:52 +00:00
Thomas Bluemel
36599d2a2b fixed DrawFocusRect() to use values from SPI_GETFOCUSBORDERWIDTH/HEIGHT
svn path=/trunk/; revision=9263
2004-05-01 11:38:28 +00:00
Thomas Bluemel
9900ed382e changed SetCursorPos() to use SendInput()
svn path=/trunk/; revision=9262
2004-05-01 09:31:59 +00:00
Gé van Geldorp
d490382a4f Use only LSBit for 1bpp putpixel
svn path=/trunk/; revision=9261
2004-05-01 09:04:37 +00:00
Thomas Bluemel
b4abd1fae0 setup the cursor in the middle of the screen
svn path=/trunk/; revision=9260
2004-05-01 08:55:04 +00:00
Thomas Bluemel
b88aed24cb fix mouse clipping
svn path=/trunk/; revision=9259
2004-05-01 08:47:14 +00:00
Filip Navara
1eeed5accd - Add ASSERT for a palette size.
svn path=/trunk/; revision=9258
2004-05-01 00:51:51 +00:00
Mike Nordell
5b7d8220d3 Make MmQuerySectionView tell how many bytes it actually did set. Fixes VirtualQuery.
svn path=/trunk/; revision=9257
2004-05-01 00:25:41 +00:00
Filip Navara
8b99b4b1c0 - Avoid potencial access violation. Might fix bug #297.
svn path=/trunk/; revision=9256
2004-04-30 23:42:20 +00:00
Thomas Bluemel
c2d319d2d2 use SendInput() to send mouse input data
svn path=/trunk/; revision=9255
2004-04-30 22:18:00 +00:00
Gé van Geldorp
d25a045798 Change bugcheck parameter to easily find out which SESSION5_INITIALIZATION_FAILED
bugcheck occurred

svn path=/trunk/; revision=9254
2004-04-30 20:49:39 +00:00
Steven Edwards
afb4fdb6f1 Remove Visual Mingw. It didnt build anyway,
svn path=/trunk/; revision=9253
2004-04-30 17:56:14 +00:00
Filip Navara
c7eed44a94 CMD Enhancements:
- Fixed UNICODE build.
- Make the DIR /W behave like in Windows.
- Fixed various problems with command input going mad when the screen contents have scrolled.

svn path=/trunk/; revision=9252
2004-04-30 16:52:42 +00:00
Thomas Bluemel
8352c9c082 fixed brush origin
svn path=/trunk/; revision=9251
2004-04-30 14:22:44 +00:00
Gé van Geldorp
db615bc523 Fix TB_GETSTYLE to return the style of the toolbar when wParam is 0.
Spotted by Maxime Belleng� <maxime.bellenge@laposte.net>.
Fixes bug #290.

svn path=/trunk/; revision=9250
2004-04-30 09:55:16 +00:00
Thomas Bluemel
8d041e5355 silence debug message
svn path=/trunk/; revision=9249
2004-04-29 22:42:51 +00:00
Gé van Geldorp
e9a87d53bd Return NULL only in error case
svn path=/trunk/; revision=9248
2004-04-29 21:17:36 +00:00
Gé van Geldorp
edbeb9c88b Implement DDE Execute:
- Do required translations (KernelMode -> UserMode format, ASCII/Unicode)
  in GetMessage
- Call window proc directly from DispatchMessage instead of via callback
- Apply message filter to WM_PAINT and WM_NCPAINT messages
- Implement marshalling of pointer lParams for PostMessage

svn path=/trunk/; revision=9247
2004-04-29 21:13:16 +00:00
Thomas Bluemel
0f0200e106 don't crash if no thread desktop set
svn path=/trunk/; revision=9246
2004-04-29 20:41:03 +00:00
Thomas Bluemel
ddcbbf2e8d implemented keybd_event(), mouse_event(), BlockInput() and SendInput() - the server side however isn't implemented yet
svn path=/trunk/; revision=9245
2004-04-29 20:26:35 +00:00
Filip Navara
ed9f67afe7 - Initialize the serial port to reasonable state after the detection. (Needed by Virtual PC)
svn path=/trunk/; revision=9244
2004-04-29 17:06:21 +00:00
Filip Navara
0419425cb7 - Simplified the mapping of video memory. Now it works in Virtual PC 2004.
svn path=/trunk/; revision=9243
2004-04-29 16:55:37 +00:00
Eric Kohl
4056581a21 Implement AddDesktopItem() and DeleteDesktopItem().
svn path=/trunk/; revision=9242
2004-04-29 14:41:26 +00:00
Mike Nordell
de1dd3b0d4 stop kernel crashing on thread termination
svn path=/trunk/; revision=9240
2004-04-28 23:46:26 +00:00
Hartmut Birr
8111f57e17 - Dereference the idle process in some of the NtQuerySystemInformation functions.
svn path=/trunk/; revision=9239
2004-04-28 20:50:02 +00:00
Hartmut Birr
a0588eb04b - Set the offset for a physical page in MmGetPhysicalAddress.
svn path=/trunk/; revision=9238
2004-04-28 20:46:03 +00:00
Hartmut Birr
3c66806fb0 - Call the DriverStartIo routine at DISPATCH_LEVEL in IoStartPacket.
svn path=/trunk/; revision=9237
2004-04-28 20:42:01 +00:00
Hartmut Birr
e9ee16d561 - Fixed _chmod and _wchmod.
svn path=/trunk/; revision=9236
2004-04-28 20:20:00 +00:00
Filip Navara
47b812dde4 - Simplified handling of palettes selected into device contexts. Now DC->w.hPalette should always point to palette object and shoudn't be NULL.
- Fixed bitfield conversion when creating Color -> Mono XLATEOBJs. Fixes bug #275.

svn path=/trunk/; revision=9235
2004-04-28 18:38:07 +00:00
Aleksey Bragin
3f814d3837 Sorry about that it took so long to commit this file - I was installing a new HDD -> means a new OS installation, etc.
svn path=/trunk/; revision=9234
2004-04-28 12:55:21 +00:00
Jason Filby
de492d049e Followed Casper's advice to use macros to simplify regression tests
svn path=/trunk/; revision=9233
2004-04-27 20:31:32 +00:00
Filip Navara
6cb09490e5 - Fixed line endings and imm32.dll name.
svn path=/trunk/; revision=9232
2004-04-27 20:16:42 +00:00
Jason Filby
17bf83aa38 Second MDL test
svn path=/trunk/; revision=9231
2004-04-27 17:48:52 +00:00
Steven Edwards
855d8095ef Added imm32 and psapi to the CD.
(sorry if this messes up this is the first time I
am doing development from a Linux cross-compile)

svn path=/trunk/; revision=9230
2004-04-26 20:33:13 +00:00
Gunnar Dalsnes
42ad6cb85f make sure temp directory exist
svn path=/trunk/; revision=9229
2004-04-26 20:26:15 +00:00
Gunnar Dalsnes
63bc13d624 fix broken MakeSureDirectoryPathExists. It depended on Wine's
CreateDirectory, which seems to be more relaxed that the ros/Windows
version.

svn path=/trunk/; revision=9228
2004-04-26 20:24:04 +00:00
Gunnar Dalsnes
bdce3452a0 build imagehlp
svn path=/trunk/; revision=9227
2004-04-26 20:20:11 +00:00
Gunnar Dalsnes
68d020f48d make imagehlp import lib
svn path=/trunk/; revision=9226
2004-04-26 20:19:21 +00:00
Thomas Bluemel
be07990679 fixed NtGdiPtVisible()
svn path=/trunk/; revision=9225
2004-04-26 19:58:45 +00:00
Thomas Bluemel
4043538723 fixed hittest calculation
svn path=/trunk/; revision=9224
2004-04-26 17:49:04 +00:00
James Tabor
772e31feb1 Added Process HandleCount information.
svn path=/trunk/; revision=9223
2004-04-26 05:46:35 +00:00
Martin Fuchs
375cb8f522 handle GetDateFormat) failures
(idea by Thomas Weidenmueller)

svn path=/trunk/; revision=9222
2004-04-25 20:22:04 +00:00
Thomas Bluemel
c038032038 implemented GetDCBrushColor(), SetDCBrushColor(), GetDCPenColor() and SetDCPenColor(). they're UNTESTED so far!
svn path=/trunk/; revision=9221
2004-04-25 20:05:30 +00:00
Thomas Bluemel
ffa06b86eb implemented ExtSelectClipRgn() (untested!)
svn path=/trunk/; revision=9220
2004-04-25 16:40:39 +00:00
Thomas Bluemel
d69e5f4dee implemented ExcludeClipRect()
svn path=/trunk/; revision=9219
2004-04-25 16:06:20 +00:00
Thomas Bluemel
6a433d3812 implemented PtVisible()
svn path=/trunk/; revision=9218
2004-04-25 15:52:31 +00:00
Thomas Bluemel
eb9b7d6f5d implemented GetCurrentObject()
svn path=/trunk/; revision=9217
2004-04-25 15:31:43 +00:00
Thomas Bluemel
18d53db81a use "readable" parameter names in functions
svn path=/trunk/; revision=9216
2004-04-25 14:46:54 +00:00
Thomas Bluemel
1cacbc22e0 set proper errorcode in some functions
svn path=/trunk/; revision=9215
2004-04-25 12:51:53 +00:00
Thomas Bluemel
b22facf240 1. implemented hatched brushes
2. fixed memory leak when deleting patterned brushes
3. use brush origin in dib code

svn path=/trunk/; revision=9214
2004-04-25 11:34:13 +00:00
Filip Navara
2dcb05259a - Minor correction to RPC structures.
svn path=/trunk/; revision=9212
2004-04-24 21:35:24 +00:00
Thomas Bluemel
ed71de17e7 proper implementation of FrameRgn() (cannot be ported from wine because wine's implementation is wrong)
svn path=/trunk/; revision=9211
2004-04-24 14:21:37 +00:00
James Tabor
d0983a67cd Set 386 as default cpu type.
svn path=/trunk/; revision=9210
2004-04-24 05:11:54 +00:00
Thomas Bluemel
aeef6123b6 fixed some error cases
svn path=/trunk/; revision=9207
2004-04-23 21:35:59 +00:00
Filip Navara
e7d451e2fd - Correctly swap the Red and Blue colors while setting the palette on non-VGA compatible adapters.
svn path=/trunk/; revision=9206
2004-04-23 20:12:57 +00:00
Filip Navara
4e374dbe4b - Fix the emulation of 'inl' instruction in V86 mode.
svn path=/trunk/; revision=9205
2004-04-23 20:11:11 +00:00
Thomas Bluemel
eabb3b47ad fixed calculation of the non-client-area when WS_BORDER is set
svn path=/trunk/; revision=9204
2004-04-23 19:29:04 +00:00
Hartmut Birr
ac9fc6496a - Initialized the srb on each call to SpiSendInquiry.
svn path=/trunk/; revision=9203
2004-04-23 14:29:07 +00:00
Thomas Bluemel
5ad3f25a47 implemented InvertRgn()
svn path=/trunk/; revision=9202
2004-04-23 13:34:04 +00:00
James Tabor
8ab1cba914 Fixed my mistake in SystemProcessorInformation.
svn path=/trunk/; revision=9201
2004-04-23 06:19:28 +00:00
James Tabor
e20d930ab0 Fixed SystemProcessorInformation.
svn path=/trunk/; revision=9200
2004-04-23 05:37:10 +00:00
James Tabor
87065d0083 Fix return for cpuid.
svn path=/trunk/; revision=9199
2004-04-23 05:34:54 +00:00
James Tabor
8745574fb5 Fix GlobalMemoryStatus & Ex.
svn path=/trunk/; revision=9196
2004-04-22 02:20:52 +00:00
James Tabor
28dfa0ecb7 Implemented new Ros exclusive function SystemFullMemoryInformation.
This is used for suppling virtual user memory usage for GlobalMemoryStatusEx.

svn path=/trunk/; revision=9195
2004-04-22 01:57:49 +00:00
Hartmut Birr
22adb5da88 - Made some flags for the flag value from the FILE structure compatible with the mingw headers.
- Use _IO_LBF instead of _IOLBF, because _IOSTRG and _IOLBF has the same value.

svn path=/trunk/; revision=9194
2004-04-21 21:40:43 +00:00
Gunnar Dalsnes
8a39d95805 temp.workaround: allways free irp
svn path=/trunk/; revision=9191
2004-04-20 23:14:35 +00:00
James Tabor
9acfed6d38 Filip Navara NtGetTickCount implementation.
svn path=/trunk/; revision=9190
2004-04-20 20:39:19 +00:00
Gunnar Dalsnes
03cfbfef0a make mdl usage/impl. more windows compliant
svn path=/trunk/; revision=9189
2004-04-20 19:04:11 +00:00
Gunnar Dalsnes
d169532a77 make mdl impl. more windows compliant
svn path=/trunk/; revision=9188
2004-04-20 18:59:00 +00:00
Jason Filby
87b81bac7c Correct test for MmSizeOfMdl
svn path=/trunk/; revision=9187
2004-04-20 18:52:04 +00:00
Eric Kohl
9e797fd74b Fix typos.
svn path=/trunk/; revision=9186
2004-04-19 10:55:04 +00:00
Eric Kohl
ddaf880002 - Use new userenv.h prototypes.
- Add new dialogs to Czech language for translation.
- Make install wizard code UNICODE aware.

svn path=/trunk/; revision=9185
2004-04-19 10:54:23 +00:00
Eric Kohl
2716e12077 Implement CreateUserProfileA().
svn path=/trunk/; revision=9184
2004-04-19 10:51:17 +00:00
Eric Kohl
0441662dd1 Add private prototypes. Don't contribute them to MinGW!
svn path=/trunk/; revision=9183
2004-04-19 10:50:19 +00:00
Hartmut Birr
4debbe40cc - Fixed the open counter in IntVideoPortDispatchClose.
svn path=/trunk/; revision=9182
2004-04-18 12:59:14 +00:00
James Tabor
331cdb2fcd Add BasePriorty to ProcessBasicInformaion.
svn path=/trunk/; revision=9181
2004-04-18 06:08:36 +00:00
James Tabor
92d947082b Fix Kernel User Timer.
svn path=/trunk/; revision=9177
2004-04-18 00:52:57 +00:00
James Tabor
27b608d040 Fix Kernel User Timer and added ProcessTimes to QueryInformatinProcess
svn path=/trunk/; revision=9176
2004-04-18 00:50:53 +00:00
Thomas Bluemel
b5ae6df350 reverted last change
svn path=/trunk/; revision=9175
2004-04-17 20:23:20 +00:00
Eric Kohl
4845295e63 'Del *.*' ignores directories.
This fixes bug 291.

svn path=/trunk/; revision=9174
2004-04-17 12:01:04 +00:00
Thomas Bluemel
9e9160f508 fixed some scrollbar issues
svn path=/trunk/; revision=9173
2004-04-17 11:00:14 +00:00
Filip Navara
61878c60d2 - Improved RPC headers.
svn path=/trunk/; revision=9170
2004-04-17 07:41:26 +00:00
Gé van Geldorp
b656708fcc Merge back commit from WineHQ
svn path=/trunk/; revision=9169
2004-04-17 07:32:44 +00:00
Filip Navara
b4ff26c3b6 Temporary revert this patch, because it causes a lot of crashes. I sent a message to wine-devel describing the problem.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Fix subclassing to support nested messages.

svn path=/trunk/; revision=9168
2004-04-16 23:44:19 +00:00
Thomas Bluemel
fb5087e80c fixed missing window dereferences and a minor thread-safety bug
svn path=/trunk/; revision=9167
2004-04-16 21:50:26 +00:00
Filip Navara
b6da18c3a0 Force resize before calling RBN_HEIGHTCHANGE notification.
svn path=/trunk/; revision=9166
2004-04-16 20:52:51 +00:00
Thomas Bluemel
c4bde9bbf1 properly remove mousemove messages
svn path=/trunk/; revision=9165
2004-04-16 18:53:53 +00:00
Eric Kohl
f269c53d06 Clear data buffer before sending the INQUIRY command.
svn path=/trunk/; revision=9164
2004-04-16 13:39:46 +00:00
Eric Kohl
dc45d5f3f3 Implement the GUI setup wizard.
svn path=/trunk/; revision=9163
2004-04-16 13:37:18 +00:00
Gé van Geldorp
956eca91cf Update status of ported DLLs
svn path=/trunk/; revision=9162
2004-04-16 09:13:21 +00:00
Gé van Geldorp
3f429071a7 Sync to Wine-20040408
svn path=/trunk/; revision=9160
2004-04-16 09:11:30 +00:00
Gé van Geldorp
4374bb1685 Sync to Wine-20040408
Eric Pouech <pouech-eric@wanadoo.fr>
- implemented MCI_SOUND command
- fixed MCI command table in resource
- added a TODO list on MCI handling
Christian Costa <titan.costa@wanadoo.fr>
- MCI strings are case insensitive.
- Fixed a returned error value.
- Default to FOURCC_DOS if no IOProc found.

svn path=/trunk/; revision=9159
2004-04-16 09:04:04 +00:00
Gé van Geldorp
36e8261e77 Sync to Wine-20040408:
Alexandre Julliard:
- Added memicmpW.

svn path=/trunk/; revision=9158
2004-04-16 08:58:34 +00:00
Gé van Geldorp
e20e56a546 Sync to Wine-20040408:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implement SHMessageBoxCheck functions && add dialog resources.
- Add SHWaitForSendMessageThread, SHAnsiToUnicodeCP,SHStripMneumonicW,
  SHSearchMapInt.
- Make copies of keys when creating, free them when done.
- Use KEY_ALL_ACCESS when writing US reg values.
- SHRegWriteUSValueW: Handle all flag combinations.
- Make some A calls use the W version.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.
Ulrich Czekalla <ulrich@codeweavers.com>
- Implement FixSlashesAndColonW and add stub for SHGetAppCompatFlags.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- UrlCanonicalizeW: Remove \r and \n at the end of lpszUrlCpy, with test
  cases.

svn path=/trunk/; revision=9157
2004-04-16 08:47:55 +00:00
Gé van Geldorp
768e79dd1f Sync to Wine-20040408:
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.

svn path=/trunk/; revision=9156
2004-04-16 08:36:17 +00:00
Gé van Geldorp
d32be1b605 Sync to Wine-20040408:
Warren Turkal <wt@midsouth.rr.com>
- Fixed the implementation of CoTreatAsClass.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=9155
2004-04-16 08:31:25 +00:00
James Tabor
1954069fed VmWare is having problems with Volatile and Atomic process counters at boot time. Fix later
svn path=/trunk/; revision=9154
2004-04-16 01:28:15 +00:00
Thomas Bluemel
fb6ac7fe65 minor fix
svn path=/trunk/; revision=9153
2004-04-16 01:27:44 +00:00
Thomas Bluemel
8eca059c02 1. move SendMessage calls out of the message queue processing code
2. fixed translation of coordinates calculation in different thread states (capturing, in menus, ...)
3. Proper implementation of Set/GetWindowText/Length() (as described in
4. speed improvements

svn path=/trunk/; revision=9152
2004-04-15 23:36:03 +00:00
Thomas Bluemel
1771d71894 fix linking error
svn path=/trunk/; revision=9151
2004-04-15 18:52:45 +00:00
Thomas Bluemel
2751202062 Masahiro Taguchi - small windowbar sizing fix for WS_EX_TOOLWINDOW
svn path=/trunk/; revision=9150
2004-04-15 11:44:03 +00:00
Gé van Geldorp
b8549e32fa Sync to Wine-20040408:
Juan Lang <juan_lang@yahoo.com>
- implement loading network providers
- implement enumeration functions
- some improved error checking and A->W conversion

svn path=/trunk/; revision=9149
2004-04-15 09:28:04 +00:00
Gé van Geldorp
3d289e8e05 Sync to Wine-20040408:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Separate US English resources from English ones.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Updated Spanish translations.
Marcelo Duarte <wine-devel@bol.com.br>
- Minor updates in resource for Portuguese.
Rein Klazes <rklazes@xs4all.nl>
- Fix a possible null pointer crash in FILEDLG95_LOOKIN_Init.

svn path=/trunk/; revision=9148
2004-04-15 08:42:21 +00:00
Gé van Geldorp
5f3c9e9df2 Sync to Wine-20040408:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Add cursor resource.
- Implement TB_MOVEBUTTON.
- Implement drag customise.
- Send TBN_TOOLBARCHANGE and TBN_DELETINGBUTTON.
- Spelling fixes.
- Fix subclassing to support nested messages.
- Document control completeness.
- Remove unneeded include.
- Fix TEXT define.
- Fix tabs.
- Small optimisation in DrawInsert.
- Fix LButtonDown from previous change.
- Don't use BF_ADJUST flag for dropdown buttons.
- Fix LButtonDblClk.
- Fix SetBitmapSize.
- Fix SetButtonInfo.
- Documentation update.
- Better hot item handling.
- Fix DrawMasked to always use the right image list and bitmap index.
- Document completeness.
- Finish tooltip support.
- Honour WM_SETREDRAW.
- Fix all calls of InvalidateRect.
- Implement TB_LOADIMAGES, TB_MAPACCELERATOR{A,W}, TB_MARKBUTTON and
  undocumented message 0x460.
- Better debug output of undocumented message 0x45D.
- Add support for a toolbar global iListGap.
- Make TOOLBAR_CalcToolbar and TOOLBAR_DrawButton not rely on "magic
  numbers" and calculate sizes and positions more like native.
- Rewrite drawing code.
- TTM_TRACKACTIVATE can have NULL lParam when deactivating.
- Factor out common code from TOOLTIPS_DelTool{A,W}.
- Update all indices correctly after delete.
- Unicode notification detection should be local to each tool.
- Implement TTN_GETDISPINFOW notification.
Alexandre Julliard
- Do not kill the animation thread with TerminateThread, let it finish
  properly.
- Fixed a couple of races with the animation thread.
Juan Lang <juan_lang@yahoo.com>
- Prevent negative coords for line, turn off redraw when initializing,
  document one difference in native/builtin behavior.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Mike McCormack <mike@codeweavers.com>
- Make sure the rebar size is above a minimum.
- Make sure to take account of hidden bands during layout.
- Don't calculate the redundant and unused REBAR_ROW structures.
Filip Navara <xnavara@volny.cz>
- Support for RBBS_HIDETITLE style.
Ulrich Czekalla <ulrich@codeweavers.com>
- Fix rebar band insertion and non-client calculation in pager control.
Huw Davies <huw@codeweavers.com>
- Fix dumb error from rev. 1.158.
- When setting the buddy to 0 then we must still resize the updown
  control.
- Added CS_HREDRAW.
Ge van Geldorp <gvg@reactos.com>
- Explicitly ask for image list with screen depth as ILC_COLOR can/will
  limit the depth to 4bpp now.

svn path=/trunk/; revision=9147
2004-04-15 08:29:57 +00:00
Thomas Bluemel
b5c06d7dbd better handling of invalid strings in IntSafeCopyUnicodeString()
svn path=/trunk/; revision=9146
2004-04-14 23:40:43 +00:00
James Tabor
a746bec6f1 Improved Passive Level kernel and user time counters.
svn path=/trunk/; revision=9145
2004-04-14 23:32:53 +00:00
Thomas Bluemel
9a4b93f87e rewrote NtUserFindWindowEx() so it works as it's supposed to. This function is currently called from FindWindowEx(), however there should be a usermode implementation of FindWindowEx() that sends WM_GETTEXT messages to windows belonging to the caller's process. This is not done and should not be done from the kernel mode version.
svn path=/trunk/; revision=9144
2004-04-14 23:17:56 +00:00
Thomas Bluemel
78b070f6b0 enable a debug message
svn path=/trunk/; revision=9143
2004-04-14 20:18:12 +00:00
Thomas Bluemel
c62a106e0c removed unused variable
svn path=/trunk/; revision=9142
2004-04-14 19:07:14 +00:00
Thomas Bluemel
34ec714d1b treat WM_NCMOUSEMOVE message as WM_MOUSEMOVE messages
svn path=/trunk/; revision=9141
2004-04-14 19:06:02 +00:00
Thomas Bluemel
9816ef1a2b forgot to commit a fix
svn path=/trunk/; revision=9140
2004-04-14 17:35:47 +00:00
Thomas Bluemel
81a46fb20d fixed major bugs in the message queue
svn path=/trunk/; revision=9139
2004-04-14 17:19:38 +00:00
James Tabor
b325c3fecb Need more time to work audit patch
svn path=/trunk/; revision=9138
2004-04-14 17:14:45 +00:00
James Tabor
93a7d0e19d Fix by Marc Schtz.
svn path=/trunk/; revision=9137
2004-04-14 12:17:26 +00:00
James Tabor
7d88f002d2 Implementation of system performance auditing hax.
svn path=/trunk/; revision=9136
2004-04-14 07:11:20 +00:00
Thomas Bluemel
900e819d27 little fix
svn path=/trunk/; revision=9135
2004-04-13 23:25:54 +00:00
Thomas Bluemel
b4472c0848 fixed implementation of ChildWindowFromPointEx()
svn path=/trunk/; revision=9134
2004-04-13 23:12:30 +00:00
Thomas Bluemel
bbd9b3d4a8 added paramter -e to skip and count empty lines
svn path=/trunk/; revision=9133
2004-04-13 21:34:45 +00:00
Martin Fuchs
b1a7c433b7 correct error handling in SHELL32_ParseNextElement()
svn path=/trunk/; revision=9132
2004-04-13 20:55:45 +00:00
Martin Fuchs
23a76b4fa1 return "file not found" error values instead of E_INVALIDARG if _ILCreateFromPathA() failed to find files
svn path=/trunk/; revision=9131
2004-04-13 20:54:05 +00:00
Martin Fuchs
ecef0f56e1 merge Wine commit:
Filip Navara <xnavara@volny.cz>
Get rid of non-standard ERROR_UNKNOWN value. The IShellLink case was
tested, others were replaced with reasonable values.

svn path=/trunk/; revision=9130
2004-04-13 20:50:04 +00:00
Martin Fuchs
df24731574 make drive letters in PIDLs always uppercase to enable PIDL comparison
svn path=/trunk/; revision=9129
2004-04-13 20:47:19 +00:00
Jason Filby
4245c59dc1 Update memory regression test and split MDL tests into new file series
svn path=/trunk/; revision=9128
2004-04-13 20:30:58 +00:00
Martin Fuchs
d6e3263af5 return TRUE for TVM_EXPAND if treeview item is already expanded
svn path=/trunk/; revision=9127
2004-04-13 19:51:44 +00:00
Martin Fuchs
ee28a3ec39 spelling fixes
svn path=/trunk/; revision=9126
2004-04-13 19:23:15 +00:00
Thomas Bluemel
e2cebfc8d6 fixed crashes caused by an invalid pointer
svn path=/trunk/; revision=9125
2004-04-13 18:40:00 +00:00
Thomas Bluemel
2a3a6e1dda directly get the window text when drawing the caption bar
svn path=/trunk/; revision=9124
2004-04-13 17:25:22 +00:00
Thomas Bluemel
fa3672479b properly free unicode string
svn path=/trunk/; revision=9123
2004-04-13 16:55:54 +00:00
Thomas Bluemel
83af90bff4 don't pass ansi strings to win32k!!!!
svn path=/trunk/; revision=9122
2004-04-13 16:48:45 +00:00
Thomas Bluemel
83af3eae1d post focus messages to different threads
svn path=/trunk/; revision=9121
2004-04-13 13:50:31 +00:00
Thomas Bluemel
b9a55f9ce0 fixed memory leak
svn path=/trunk/; revision=9120
2004-04-13 00:06:50 +00:00
KJK::Hyperion
ba45b57272 System call thunk generation made marginally more portable:
- generate real C functions with inline asm. Should fix a problem with cross-compilation on 64-bit hosts
 - store parameter count, not parameter block size in sysfuncs.lst

svn path=/trunk/; revision=9119
2004-04-12 22:07:45 +00:00
James Tabor
b7a5d0ed98 Add Debug header.
svn path=/trunk/; revision=9118
2004-04-12 19:52:36 +00:00
Martin Fuchs
bdf792d41a ShellBrowserChild: jump to addressbar target
svn path=/trunk/; revision=9117
2004-04-12 19:49:12 +00:00
Martin Fuchs
77fbf2134e comments
svn path=/trunk/; revision=9116
2004-04-12 18:07:38 +00:00
Martin Fuchs
ec66d1b6b9 show waitcursor when switching to anotehr dir
svn path=/trunk/; revision=9115
2004-04-12 17:57:44 +00:00
Filip Navara
c93eb9e54e - Reverted my last changed, should go to branch!
svn path=/trunk/; revision=9114
2004-04-12 17:31:01 +00:00
Filip Navara
75a32eddd8 - Reverted my last changed, should go to branch!
svn path=/trunk/; revision=9112
2004-04-12 17:20:47 +00:00
Filip Navara
15d5f5709e - Initial hacky implementation of some SCM calls needed by coLinux.
svn path=/trunk/; revision=9110
2004-04-12 17:14:55 +00:00
Filip Navara
318d9e885e - Return some reasonable values from GlobalMemoryStatusEx.
svn path=/trunk/; revision=9109
2004-04-12 17:09:36 +00:00
Martin Fuchs
f6288bd6e9 immediatelly maximize first MDI child window
svn path=/trunk/; revision=9108
2004-04-12 17:09:04 +00:00
Thomas Bluemel
17b4be229e minor fix
svn path=/trunk/; revision=9107
2004-04-12 16:14:54 +00:00
Thomas Bluemel
ba87b6d902 don't copy files if already present
svn path=/trunk/; revision=9106
2004-04-12 16:09:45 +00:00
Martin Fuchs
6a3ea3a956 - fix Entry::read_tree() and get_next_path_component()
- jump to FileChildWindow's directory when entered in address bar

svn path=/trunk/; revision=9105
2004-04-12 15:58:48 +00:00
Filip Navara
d24371eaec - Remove the hack implemenation of LookupPrivilegeValueW.
- Don't check for load driver privilege yet.
- Don't try to acquire load driver privilege in Services.

svn path=/trunk/; revision=9103
2004-04-12 15:22:53 +00:00
Martin Fuchs
95182ed8f5 remove MB_ERR_INVALID_CHARS flag
svn path=/trunk/; revision=9102
2004-04-12 15:08:14 +00:00
Filip Navara
a885a5c4bc - Minor correction to returned error.
svn path=/trunk/; revision=9101
2004-04-12 14:46:02 +00:00
Thomas Bluemel
83d22245fd make the bitmap look like it's supposed to
svn path=/trunk/; revision=9100
2004-04-12 14:10:50 +00:00
Thomas Bluemel
755a1a820f reverted, my mistake
svn path=/trunk/; revision=9099
2004-04-12 13:13:38 +00:00
Thomas Bluemel
a1240dac2e forgot adding the floppy driver
svn path=/trunk/; revision=9098
2004-04-12 13:10:19 +00:00
Filip Navara
de77cb9e79 - Fixed connection/disconnecting/closing handling, so we don't connect to dead and disconnected pipes.
- Handle the OPEN_EXISTING flag correctly.
- Report reasonable error messages instead of STATUS_UNSUCCESSFUL.

svn path=/trunk/; revision=9097
2004-04-12 13:03:29 +00:00
Thomas Bluemel
d7bba47d07 added some makefiles
svn path=/trunk/; revision=9096
2004-04-12 12:08:53 +00:00
Martin Fuchs
ea01087f9c check in gpl.txt as binary UTF-16 file
svn path=/trunk/; revision=9095
2004-04-12 11:07:54 +00:00
Martin Fuchs
7550de503a remove gpl.txt before adding again with -kb
svn path=/trunk/; revision=9094
2004-04-12 11:07:13 +00:00
Martin Fuchs
bdc459faa9 one more error handling fix for GetTimeFormatA()
svn path=/trunk/; revision=9093
2004-04-12 10:49:48 +00:00
Martin Fuchs
a46eec6cea - RosGetTimeFormat(): replace "if (!cchTime) ; else ..." by "if (cchTime)" and adjust comment
- Kohn Emil Dan <emild@cs.technion.ac.il>:

1) RosGetTimeFormat() has a small bug. The last statement should be
return nPos;
and not
return cchTime;

2) GetTimeFormatA() is not implemented. I have written an implementation
for it, which calls GetTimeFormatW(), and converts the string parameters
back and forth.

(committed with adjustments for correct error handling)

svn path=/trunk/; revision=9092
2004-04-12 10:19:43 +00:00
Filip Navara
03124cf16a - Don't declare DWORDLONG as double!
svn path=/trunk/; revision=9091
2004-04-12 09:50:01 +00:00
Martin Fuchs
387d641ed5 optimize favorites sidebar
svn path=/trunk/; revision=9090
2004-04-12 07:38:17 +00:00
Martin Fuchs
2a1a6cbf85 simplified chinese resources by Larry Li <larry@mimios.com>
svn path=/trunk/; revision=9089
2004-04-12 07:37:08 +00:00
Filip Navara
1ff2de0b1a - Implement LookupPrivilegeValueW.
svn path=/trunk/; revision=9087
2004-04-11 19:21:43 +00:00
Gé van Geldorp
968753f694 Add fastinstall target which copies the files but doesn't rebuild the
registry

svn path=/trunk/; revision=9086
2004-04-11 16:51:56 +00:00
Jason Filby
e2c7015e0a Reenable NDEBUG
svn path=/trunk/; revision=9085
2004-04-11 16:10:05 +00:00
Jason Filby
763fb168d1 AcquireLoadDriverPrivilege() to fix problem with SCM not being able to load drivers. Patch by Filip Navara.
svn path=/trunk/; revision=9084
2004-04-11 16:09:11 +00:00
Jason Filby
f2d2a85374 Two DPRINTs for NtLoadDriver failure cases
svn path=/trunk/; revision=9083
2004-04-11 15:31:21 +00:00
Jason Filby
73cb58e922 Add missing include tchar.h
svn path=/trunk/; revision=9082
2004-04-11 13:39:59 +00:00
Martin Fuchs
e848449f54 correct IShellFolder::GetAttributesOf() for the case *dwAttributes=0
svn path=/trunk/; revision=9081
2004-04-11 13:24:29 +00:00
Gé van Geldorp
45267ce58d Bump version number
svn path=/trunk/; revision=9080
2004-04-11 09:57:18 +00:00
Gé van Geldorp
b17d0f5101 - Implement NULL module case for EngFindImageProcAddress
- Add stubs for EngFindImageProcAddress()able not present yet

svn path=/trunk/; revision=9079
2004-04-11 09:09:38 +00:00
Eric Kohl
eddb2f5168 Implement tape IO functions.
svn path=/trunk/; revision=9078
2004-04-10 23:20:17 +00:00
Gunnar Dalsnes
dbb520a63f indent using astyle v1.15.3: astyle --style=ansi -c -s3 -S --convert-tabs %1
svn path=/trunk/; revision=9077
2004-04-10 22:36:07 +00:00
Martin Fuchs
4a875cac12 awake address bar to life
svn path=/trunk/; revision=9076
2004-04-10 20:31:18 +00:00
Filip Navara
30ed90f0b3 - Fix a stupid bug that prevented writing to pipes from working.
svn path=/trunk/; revision=9075
2004-04-10 16:20:59 +00:00
Eric Kohl
cc1629adc6 Fix TAPE_GET_POSITION and TAPE_SET_POSITION structures.
svn path=/trunk/; revision=9074
2004-04-10 16:05:18 +00:00
Martin Fuchs
35290117a3 adjust for WINE
svn path=/trunk/; revision=9073
2004-04-10 14:15:54 +00:00
Martin Fuchs
fe26854c52 avoid to use return length of RegQueryValueW
svn path=/trunk/; revision=9072
2004-04-10 12:56:18 +00:00
Martin Fuchs
74b7a8a0ca fix toggeling of toolbar windows
svn path=/trunk/; revision=9070
2004-04-10 12:07:11 +00:00
Martin Fuchs
f9cb0ec833 activate web bookmarks in cabinet windows
svn path=/trunk/; revision=9069
2004-04-10 10:12:35 +00:00
Filip Navara
17abe3357c - Implement FindWindowEx for case when ClassName == NULL.
svn path=/trunk/; revision=9068
2004-04-10 07:37:28 +00:00
Filip Navara
d0003f99f5 - Handle the case where no BrushOrigin is given even under EngStretchBlt and EngMaskBitBlt.
svn path=/trunk/; revision=9067
2004-04-10 00:58:14 +00:00
Filip Navara
565d0c19a4 - Remove forgotten DbgPrint.
svn path=/trunk/; revision=9066
2004-04-10 00:54:35 +00:00
Thomas Bluemel
cef28e1bf5 handle the case where no BrushOrigin is given
svn path=/trunk/; revision=9065
2004-04-09 22:27:39 +00:00
Gé van Geldorp
80a373534a Compensate BrushOrigin for translation
svn path=/trunk/; revision=9063
2004-04-09 22:13:26 +00:00
Filip Navara
97635093cd - Commit the correct changes to HEAD.
svn path=/trunk/; revision=9062
2004-04-09 22:00:38 +00:00
Filip Navara
12b4cb63bf - Include "roscfg.h".
svn path=/trunk/; revision=9061
2004-04-09 21:22:18 +00:00
Filip Navara
ca61a750e8 - Fixed DPRINTs.
svn path=/trunk/; revision=9060
2004-04-09 21:01:02 +00:00
Filip Navara
159aae243b Compile Win32k using W32API [Part II]:
- Replace usage of "ntddvid.h" header with "ntddvdeo.h".
- Remove some old and now unused headers.

svn path=/trunk/; revision=9059
2004-04-09 20:39:11 +00:00
Martin Fuchs
4043af4b0b Merge Wine shell32 commit:
Francois Gouget <fgouget@free.fr>
Cleanup the handling of the extension in SHELL_FindExecutable():
- Eliminate the corresponding fixed-size buffer which removes the limitation to 3 character extensions.
- Fix handling of the trailing '.' case.
- Do a case-insensitive check for the extension in win.ini.
  Increase the size of the command buffer to 1024.

svn path=/trunk/; revision=9058
2004-04-09 20:33:45 +00:00
Filip Navara
d05fb60776 Add LPC_MESSAGE_BASE_SIZE definition.
svn path=/trunk/; revision=9057
2004-04-09 20:29:29 +00:00
Martin Fuchs
b165b56577 Merge Wine shell32 commits:
Juan Lang <juan_lang@yahoo.com>
- comment fixes
- improved error checking and conformance with Windows
- remove some spurious error messages
- Move control panel applet enumeration to cpanelfolder.c.
- move CreateMyCompEnumList and CreateDesktopEnumList to their respective files
- rewrite CreateFolderEnumList to only FindFirstFile/FindNextFile once

svn path=/trunk/; revision=9056
2004-04-09 20:24:24 +00:00
Filip Navara
f2e2102f39 Fixed .cvsignore.
svn path=/trunk/; revision=9055
2004-04-09 20:24:13 +00:00
Martin Fuchs
a80aa40a8f fix floating favorites menus
svn path=/trunk/; revision=9054
2004-04-09 20:16:47 +00:00
Filip Navara
31c1c21824 - Compile Win32k, GDI, USER32 and CSRSS using W32API.
svn path=/trunk/; revision=9053
2004-04-09 20:03:21 +00:00
Martin Fuchs
db6bcc0793 remove unused variable
svn path=/trunk/; revision=9052
2004-04-09 19:46:15 +00:00
Martin Fuchs
bd41908243 remove unused variable
svn path=/trunk/; revision=9051
2004-04-09 19:45:37 +00:00
Martin Fuchs
05cab1ebfd replace previous favorites start menu folder implementation by fast FavoritesMenu (using the internal XML bookmark informations)
svn path=/trunk/; revision=9050
2004-04-09 19:42:21 +00:00
Thomas Bluemel
50133e0fad added tool for easy installation of the VMware SVGA driver
svn path=/trunk/; revision=9047
2004-04-09 18:27:11 +00:00
Martin Fuchs
7f72303d64 fix XML formating
svn path=/trunk/; revision=9045
2004-04-09 11:51:37 +00:00
Filip Navara
37bfcac65a - Register the standard control classes in GetClassInfo[Ex][AW] if needed.
svn path=/trunk/; revision=9044
2004-04-08 21:14:21 +00:00
Filip Navara
d7d8c7ba0f - Fix a small bug in RtlUnwind.
svn path=/trunk/; revision=9043
2004-04-08 21:14:18 +00:00
Jason Filby
c7da1f1e6a Correct test of value returned from MmQuerySystemSize
svn path=/trunk/; revision=9042
2004-04-08 20:50:02 +00:00
Jason Filby
80198861f1 Remove a DbgPrint used in testing
svn path=/trunk/; revision=9041
2004-04-08 20:49:15 +00:00
Jason Filby
7b4c7821ec Implement MmIsNonPagedSystemAddressValid as a call to MmIsAddressValid
svn path=/trunk/; revision=9040
2004-04-08 20:27:10 +00:00
Jason Filby
9108d0353a Fix MmIsAddressValid to check if VirtualAddress >= KERNEL_BASE
svn path=/trunk/; revision=9039
2004-04-08 20:05:08 +00:00
Gé van Geldorp
41d4ef6885 Export _wcmdln
svn path=/trunk/; revision=9038
2004-04-08 17:53:30 +00:00
Filip Navara
9f3885512a - Don't bugcheck if FDO wasn't attached.
svn path=/trunk/; revision=9036
2004-04-08 16:01:47 +00:00
Filip Navara
ba54c6c892 - Fixed minor bug in VGA driver.
svn path=/trunk/; revision=9033
2004-04-08 15:45:18 +00:00
Filip Navara
57e1e034b8 - Fixed a typo: 0x31 -> 31
svn path=/trunk/; revision=9032
2004-04-08 15:45:17 +00:00
Gé van Geldorp
9358255f84 HwResetHw can be (and sometimes is) NULL
svn path=/trunk/; revision=9030
2004-04-08 15:36:36 +00:00
Thomas Bluemel
7cb3dcec2c some fixes so it can also be compiled as a unicode app
svn path=/trunk/; revision=9028
2004-04-08 12:47:49 +00:00
Thomas Bluemel
b351485907 some fixes that caused crashes
svn path=/trunk/; revision=9027
2004-04-08 12:25:00 +00:00
Filip Navara
f051684bf8 - Add registry entries for SVGA VBE driver.
- Include the driver on the Boot CD.

svn path=/trunk/; revision=9026
2004-04-08 09:44:26 +00:00
Filip Navara
638280971c - Implement brush origin for 4bpp blits.
svn path=/trunk/; revision=9025
2004-04-08 09:44:21 +00:00
Filip Navara
a7270ad893 - Fixed releasing of display ownership.
svn path=/trunk/; revision=9024
2004-04-08 09:43:55 +00:00
Filip Navara
3cb07b0ba8 - Fixed initalization of VIDEO_HW_INITIALIZATION_DATA, because the Video Port driver now checks the values.
svn path=/trunk/; revision=9023
2004-04-08 09:43:35 +00:00
Thomas Bluemel
7aee09070d fixed clipping bug in TransparentBlt(). Thanks to Filip for fixing it
svn path=/trunk/; revision=9022
2004-04-07 22:17:36 +00:00
Martin Fuchs
f53f1a1b98 better looking bookmark icons
svn path=/trunk/; revision=9021
2004-04-07 22:11:24 +00:00
Thomas Bluemel
0e07c33bcc fixed handling left-over pixels in TransparentBlt()
svn path=/trunk/; revision=9020
2004-04-07 22:09:09 +00:00
Gé van Geldorp
bb60332c70 Fix memory leak, thanks to Thomas for spotting this
svn path=/trunk/; revision=9019
2004-04-07 21:12:40 +00:00
Gé van Geldorp
9edefdbda2 - When SendMessageTimeout times out, the CompletionEvent goes out of scope,
so tell the target thread not to signal it
- Replace message queue hardware lock FAST_MUTEX with KMUTEX so it can
  be recursively acquired

svn path=/trunk/; revision=9018
2004-04-07 21:12:08 +00:00
Martin Fuchs
c3cb9779e3 Merge latest Wine commits:
Juan Lang <juan_lang@yahoo.com>
Use symbolic constants for magic numbers in SHGetFolderPathW, avoid
doing MultiByteToWideChar on values that don't need it,

Juan Lang <juan_lang@yahoo.com>
Rename PT_MYCOMP to PT_GUID, and the corresponding union member from mycomp to guid.

Martin Fuchs <martin-fuchs@gmx.net>
Resolve shell shortcuts and process ID lists in ShellExecute() functions.

Juan Lang <juan_lang@yahoo.com>
- comment fixes
- improved error checking and conformance with Windows
- remove some spurious error messages

svn path=/trunk/; revision=9017
2004-04-07 20:41:31 +00:00
Filip Navara
72776b9bcb - Fixed order of bits in a byte for pattern brushes.
svn path=/trunk/; revision=9016
2004-04-07 20:23:38 +00:00
Filip Navara
578af8b934 - Fixed a small and stupid bug. We were incrementing DestBits by sizeof(ULONG) instead of sizeof(BYTE).
svn path=/trunk/; revision=9015
2004-04-07 20:04:22 +00:00
Filip Navara
5a528bd57a - Lock the surface even for GDI blits in IntEngBitBlt, because it mustn't be simulantously accessed.
svn path=/trunk/; revision=9014
2004-04-07 19:57:43 +00:00
Thomas Bluemel
f38bef7c32 better statistics
svn path=/trunk/; revision=9013
2004-04-07 19:25:27 +00:00
Gé van Geldorp
87a878a82e I should test small changes too before committing... Sorry.
svn path=/trunk/; revision=9012
2004-04-07 18:05:16 +00:00
Gé van Geldorp
335631830d - Pass args to MsqSendMessage in correct order
- Implement message sending to HWND_BROADCAST

svn path=/trunk/; revision=9011
2004-04-07 17:52:32 +00:00
Gé van Geldorp
7885bdaef7 Include netapi32.dll and setupapi.dll in default build/setup
svn path=/trunk/; revision=9010
2004-04-07 17:48:15 +00:00
Gé van Geldorp
7a27e9d3bf CVS maintenance
svn path=/trunk/; revision=9009
2004-04-07 17:45:05 +00:00
Gé van Geldorp
d5bc2e4dc7 Change to __stdcall calling convention
svn path=/trunk/; revision=9008
2004-04-07 17:42:05 +00:00
Thomas Bluemel
d8dd152253 little clean-up
svn path=/trunk/; revision=9007
2004-04-07 16:38:27 +00:00
Thomas Bluemel
54dbe4faf6 little clean-up
svn path=/trunk/; revision=9006
2004-04-07 15:37:50 +00:00
Eric Kohl
586548d926 Fixed crashes that were cause by the changes to the service parameter table.
svn path=/trunk/; revision=9005
2004-04-07 15:35:14 +00:00
Eric Kohl
9334666401 Restore modification.
svn path=/trunk/; revision=9004
2004-04-07 15:33:55 +00:00
Thomas Bluemel
879e613c5d patch reverted because ros crashes ntoskrnl
svn path=/trunk/; revision=9003
2004-04-07 15:02:31 +00:00
Thomas Bluemel
6d228618c2 remove obsolete code
svn path=/trunk/; revision=9002
2004-04-07 14:43:08 +00:00
Thomas Bluemel
45a89e2e7c little fix
svn path=/trunk/; revision=9001
2004-04-07 10:20:23 +00:00
Thomas Bluemel
9b45df9243 1. fixed crash in 1bpp blt code that was caused by an uninitialized variable.
2. speed improvements for patterned brushes

svn path=/trunk/; revision=9000
2004-04-07 10:19:34 +00:00
Hartmut Birr
bfde26a3f6 - Rewrote the code which handles processing of irp's and notifications from miniport driver.
- Implemented support for srb extensions (very simple).

svn path=/trunk/; revision=8999
2004-04-07 09:21:01 +00:00
Gé van Geldorp
c44ac169e6 There can never be a parent/child relationship between windows if one of
them is invalid. Fixes bug #217.

svn path=/trunk/; revision=8998
2004-04-07 08:25:40 +00:00
Thomas Bluemel
4783e5bae8 fixed missing dereferences of threads
svn path=/trunk/; revision=8997
2004-04-07 00:58:05 +00:00
KJK::Hyperion
9c7501f3dd - SSPT elements are 8 bit wide on Windows. Made ReactOS binary compatible in this regard, since this affects a public function (KeAddSystemServiceTable)
- use a function pointer for SSDT elements. Function pointers aren't guaranteed to have the same size as data pointers (and we were using ULONG, anyway)
 - SSPT and SSDT types no longer structures to avoid pesky alignment issues
 - genw32k and genntdll fixed accordingly

svn path=/trunk/; revision=8996
2004-04-07 00:14:05 +00:00
Thomas Bluemel
6701beb03a implemented TransparentBlt() on 8bpp surfaces
svn path=/trunk/; revision=8995
2004-04-06 23:05:36 +00:00
Martin Fuchs
6d0d4f988e fix clock visibility flag
svn path=/trunk/; revision=8994
2004-04-06 22:15:25 +00:00
Thomas Bluemel
95057e2cf7 implemented TransparentBlt() on 16bpp and 24bpp surfaces
svn path=/trunk/; revision=8993
2004-04-06 21:53:48 +00:00
Filip Navara
409aaad5d5 - Fixed some dumb bugs in 1bpp code causing memory corruption.
svn path=/trunk/; revision=8992
2004-04-06 21:19:44 +00:00
Steven Edwards
4466dbbf17 Update the readme a bit.
svn path=/trunk/; revision=8991
2004-04-06 21:04:42 +00:00
Gé van Geldorp
5fd4628dec Silence debug messages
svn path=/trunk/; revision=8990
2004-04-06 20:59:40 +00:00
KJK::Hyperion
39b17f5963 A dummy uxtheme doesn't belong to ReactOS - it should be an external project. UxTheme says bye bye and good luck everyone
svn path=/trunk/; revision=8989
2004-04-06 20:03:17 +00:00
Thomas Bluemel
5424a51107 implemented TransparentBlt() on 32bpp surfaces, but there are still some clipping issues
svn path=/trunk/; revision=8988
2004-04-06 17:54:32 +00:00
Gé van Geldorp
1bc88e0f77 Handle regions in SelectObject()
svn path=/trunk/; revision=8987
2004-04-06 07:43:33 +00:00
Thomas Bluemel
5aae8fca39 clip the moving rectangle to the desktop area. This doesn't work because our SelectObject() implementation doesn't handle regions right atm.
svn path=/trunk/; revision=8986
2004-04-05 22:42:11 +00:00
Thomas Bluemel
0a552285f3 draw patterned focus rectangles
svn path=/trunk/; revision=8985
2004-04-05 22:18:35 +00:00
Thomas Bluemel
bea76aded5 use patterned dragging rectangle
svn path=/trunk/; revision=8984
2004-04-05 22:12:53 +00:00
Filip Navara
9c418442a8 - Removed useless code from ImageList_DrawIndirect, because there
are problems with it in combination with the ReactOS code (propably due to
  XLATEOBJs)

svn path=/trunk/; revision=8983
2004-04-05 21:29:28 +00:00
Thomas Bluemel
aa25fb6d2c disable thread-safety, seems to cause some problems atm
svn path=/trunk/; revision=8982
2004-04-05 21:26:30 +00:00
Filip Navara
ba87a9d7a1 - Changed the internal brush object to be (almost) Win32k compatible.
- Changed Pen implementation to use brushes internally.
- Added support for pattern brushes.
- Fixed 8bpp StretchBlt.
- Fixed 4bpp to 4bpp non-SRCCOPY blits.
- Fixed 1bpp to 1bpp non-SRCCOPY blits to work when the destination doesn't
  start at exact byte.
- Reenabled 55AA brush for scrollbar.
- Fixed BITMAPOBJ_GetWidthBits to do WORD alignment and not DWORD.

svn path=/trunk/; revision=8981
2004-04-05 21:26:25 +00:00
Martin Fuchs
beedced608 merge Wine commits
svn path=/trunk/; revision=8980
2004-04-05 21:19:48 +00:00
Thomas Bluemel
bd69e8d121 little cosmetics...
svn path=/trunk/; revision=8979
2004-04-05 21:15:34 +00:00
Thomas Bluemel
0a205b8bd5 made the DCE list thread-safe
svn path=/trunk/; revision=8978
2004-04-05 20:46:15 +00:00
Filip Navara
c89da97139 - Get the WS_EX_STATICEDGE style working.
- Remove a WS_EX_STATICEDGE hack from Explorer.

svn path=/trunk/; revision=8977
2004-04-05 19:54:11 +00:00
Thomas Bluemel
0c33860003 Fixed a crash caused by requesting a large number of extra class space
svn path=/trunk/; revision=8976
2004-04-05 14:42:30 +00:00
Eric Kohl
c78a2cfb83 Implement 'Edit DWORD' dialog.
svn path=/trunk/; revision=8975
2004-04-05 12:00:11 +00:00
Richard Campbell
7838aa4dc8 reverted change
svn path=/trunk/; revision=8974
2004-04-05 09:16:49 +00:00
Martin Fuchs
26a52566a6 fix imagelist loading
svn path=/trunk/; revision=8973
2004-04-04 23:13:11 +00:00
Thomas Bluemel
987fbb6dc1 accidently committed a temporary file, sorry
svn path=/trunk/; revision=8972
2004-04-04 21:55:56 +00:00
Thomas Bluemel
5f472ff726 created stubs for devmgr.dll (based on lots of guesswork, trial&error and the very little resources on the www)
svn path=/trunk/; revision=8971
2004-04-04 21:49:15 +00:00
Martin Fuchs
0fd11b393a add comments
svn path=/trunk/; revision=8970
2004-04-04 21:05:32 +00:00
Martin Fuchs
9289b59c37 store icon information in metadata nodes
svn path=/trunk/; revision=8969
2004-04-04 20:23:51 +00:00
Martin Fuchs
199ffcb9bc icons and tooltips for bookmarks
svn path=/trunk/; revision=8968
2004-04-04 19:12:55 +00:00
Gé van Geldorp
fad7ce3fb4 Hack to translate Ascii chars 128-255 to Unicode too
svn path=/trunk/; revision=8967
2004-04-04 17:59:23 +00:00
Martin Fuchs
b60d102548 display bookmarks in sidebar
svn path=/trunk/; revision=8966
2004-04-04 17:21:27 +00:00
Gé van Geldorp
9af64d9189 Fix scanline increment for 32bpp stretch blts
svn path=/trunk/; revision=8965
2004-04-04 16:40:05 +00:00
Martin Fuchs
776c1e9696 import IE bookmarks and convert into XBEL format bookmark file
svn path=/trunk/; revision=8964
2004-04-04 16:04:34 +00:00
Gé van Geldorp
4eb5cb108b Honour spacing requested by caller
svn path=/trunk/; revision=8963
2004-04-04 15:28:43 +00:00
Richard Campbell
a20876b230 draw the border around the progress bar...code might not be entirely 'correct', can this border be disabled/hidden?
svn path=/trunk/; revision=8962
2004-04-04 06:46:22 +00:00
Thomas Bluemel
81a05c875c some more work on TransparentBlt() (EngTransparentBlt() is still unimplemented)
svn path=/trunk/; revision=8961
2004-04-03 21:25:20 +00:00
Gé van Geldorp
06ed71caec Most regions (> 95% in testing) consist of only 1 rectangle. Add a single
rectangle buffer to ROSRGNDATA to avoid dynamic memory allocation

svn path=/trunk/; revision=8960
2004-04-03 20:36:56 +00:00
Gé van Geldorp
87ea1d498e Use lookaside lists for better performance
svn path=/trunk/; revision=8959
2004-04-03 20:33:39 +00:00
Eric Kohl
5f3ddeb0c9 Silence a debug message.
svn path=/trunk/; revision=8958
2004-04-03 13:45:00 +00:00
Gé van Geldorp
1f56a63145 Handle lpcbData == NULL case.
svn path=/trunk/; revision=8957
2004-04-03 13:12:43 +00:00
Thomas Bluemel
8e52e23724 partially implemented IsHungAppWindow()
svn path=/trunk/; revision=8956
2004-04-02 23:54:26 +00:00
Thomas Bluemel
bb7b8e638e implemented GetWindowModuleFileName()
svn path=/trunk/; revision=8955
2004-04-02 22:16:09 +00:00
Thomas Bluemel
1c5f3e5775 check parameter in GetWindowInfo()
svn path=/trunk/; revision=8954
2004-04-02 21:03:25 +00:00
Thomas Bluemel
6491031cc2 implemented GetWindowInfo()
svn path=/trunk/; revision=8953
2004-04-02 20:51:08 +00:00
Thomas Bluemel
b8560b708d little fix
svn path=/trunk/; revision=8952
2004-04-02 19:14:44 +00:00
Thomas Bluemel
23e366974c properly initialize system menu items
svn path=/trunk/; revision=8951
2004-04-02 19:00:56 +00:00
Hartmut Birr
eec82162fb - Fixed the initializing of the access ranges.
svn path=/trunk/; revision=8950
2004-04-02 15:43:01 +00:00
Gé van Geldorp
b408a6aeb8 Make popup menus topmost windows
svn path=/trunk/; revision=8949
2004-04-01 23:17:28 +00:00
Gé van Geldorp
81361062a2 Fix interaction between topmost and owner/owned windows
svn path=/trunk/; revision=8948
2004-04-01 23:16:21 +00:00
Martin Fuchs
f2bb2f6dcb remove useless if cases
svn path=/trunk/; revision=8947
2004-04-01 20:10:07 +00:00
Gé van Geldorp
fc8f381519 Implement 32bpp -> 32bpp copy with color translation
svn path=/trunk/; revision=8946
2004-04-01 19:31:05 +00:00
Martin Fuchs
cd8132e2d2 Merged Wine commit:
Kevin Koltzau <kevin@plop.org>
	Added support for CSIDL_RESOURCES path.

svn path=/trunk/; revision=8945
2004-04-01 19:14:14 +00:00
Martin Fuchs
59fbb63083 Merged Wine commit:
Do not strip stdcall decoration in spec files.

svn path=/trunk/; revision=8944
2004-04-01 19:13:19 +00:00
James Tabor
d945804c33 Added MediaChangeNoMedia on/off
svn path=/trunk/; revision=8943
2004-04-01 17:29:53 +00:00
James Tabor
2dabdb2ac1 Added MediaChangeCount
svn path=/trunk/; revision=8942
2004-04-01 17:24:47 +00:00
James Tabor
f8e193fbc6 Wrong to remove ExFreePool.
svn path=/trunk/; revision=8941
2004-04-01 15:01:35 +00:00
Eric Kohl
a7456eb968 Fix bugs in RegQueryValueExA() and RegQueryValueExW() that caused crashes or returned bogus
information if the caller wants to retrieve the value data length only.
This fixes some bugs with regedit.

svn path=/trunk/; revision=8940
2004-04-01 13:53:08 +00:00
Thomas Bluemel
a75dfe1a82 fixed DbgPrint line ending
svn path=/trunk/; revision=8939
2004-03-31 21:21:30 +00:00
Thomas Bluemel
96a21f824f fixed NtUserGetAncestor()
svn path=/trunk/; revision=8938
2004-03-31 19:44:34 +00:00
Gé van Geldorp
dfa957c310 IntGetParentObject() does it's own locking, prevent double lock
svn path=/trunk/; revision=8937
2004-03-31 19:20:18 +00:00
Gé van Geldorp
21beea176d Remove window timers when window is destroyed
svn path=/trunk/; revision=8936
2004-03-31 18:37:12 +00:00
Thomas Bluemel
9ea765e409 revert patch due to problems with image lists
svn path=/trunk/; revision=8935
2004-03-31 14:12:04 +00:00
James Tabor
22c413c3b4 Removed ExFreePool and Spell error.
svn path=/trunk/; revision=8934
2004-03-31 05:25:36 +00:00
James Tabor
450a15d61f More Oops!
svn path=/trunk/; revision=8933
2004-03-31 03:39:12 +00:00
James Tabor
1fb32b9534 Added removable mediachange support.
svn path=/trunk/; revision=8932
2004-03-31 03:34:55 +00:00
James Tabor
bc0cf4f9cf Oops!
svn path=/trunk/; revision=8931
2004-03-31 03:34:42 +00:00
James Tabor
3b1c2903f6 Added removable mediachange support.
svn path=/trunk/; revision=8930
2004-03-31 03:33:48 +00:00
Gé van Geldorp
942d7e47a7 Fix IntIsChildWindow for case where parent is a toplevel window
svn path=/trunk/; revision=8929
2004-03-30 22:49:38 +00:00
Gé van Geldorp
a8a999793f Implement TOPMOST windows
svn path=/trunk/; revision=8928
2004-03-30 20:50:16 +00:00
Gé van Geldorp
63c532f15c Disable pool validation since it slows down execution too much
svn path=/trunk/; revision=8927
2004-03-30 09:28:44 +00:00
Gé van Geldorp
3c8dee1caa Allow GDB 6 to backtrace over a syscall
svn path=/trunk/; revision=8926
2004-03-29 22:29:34 +00:00
Thomas Bluemel
bdf6b9b5b7 updated system colors
svn path=/trunk/; revision=8924
2004-03-29 19:50:21 +00:00
Filip Navara
69a9b488f2 - Fixed window-less timers.
svn path=/trunk/; revision=8923
2004-03-29 17:02:22 +00:00
Filip Navara
fdec2f548e - Declare NMTBGETINFOTIP[AW] and TB_MARKBUTTON.
svn path=/trunk/; revision=8922
2004-03-29 16:47:48 +00:00
Gé van Geldorp
1d7a5ffa0b Merge Wine change:
Dmitry Timoshkov <dmitry@codeweavers.com>
- Scrollbar should also react on WM_LBUTTONDBLCLK.

svn path=/trunk/; revision=8921
2004-03-29 12:49:07 +00:00
Filip Navara
d6c2152ba9 - Fixed handling of WM_GETICON message.
- Don't allow destroying icons of foreign processes.

svn path=/trunk/; revision=8917
2004-03-29 06:38:50 +00:00
Filip Navara
a1f1c3b257 - Fixed BitBlts from 4bpp surfaces.
svn path=/trunk/; revision=8916
2004-03-28 23:25:48 +00:00
Filip Navara
acc112d9d4 - Fixed non-SRCCOPY BitBlts to 1bpp surfaces.
svn path=/trunk/; revision=8915
2004-03-28 23:24:57 +00:00
Gé van Geldorp
cdaaa65096 Simple font substitution and matching
svn path=/trunk/; revision=8914
2004-03-28 22:39:59 +00:00
Martin Fuchs
77684eece7 compiler friendly access operator implemantation
svn path=/trunk/; revision=8913
2004-03-28 22:17:49 +00:00
Thomas Bluemel
4309d1082e Partly (not working) implementation of TransparentBlt()
svn path=/trunk/; revision=8912
2004-03-28 21:46:26 +00:00
Martin Fuchs
50c2bd5cc2 avoid GCC complaining about: "ISO C++ says that String XMLStorage::XMLNode::operator[](const char *) const' and String & XMLStorage::XMLNode::operator[](const String &)' are ambiguous even though the worst conversion for the former is better than the worst conversion for the latter
svn path=/trunk/; revision=8911
2004-03-28 21:04:00 +00:00
Filip Navara
741870b134 DbgPrint -> DPRINT
svn path=/trunk/; revision=8910
2004-03-28 20:44:09 +00:00
Martin Fuchs
9447d23bc1 option "display version on desktop background"
svn path=/trunk/; revision=8908
2004-03-28 20:32:23 +00:00
Martin Fuchs
f2d4a56a85 option "display version on desktop background"
svn path=/trunk/; revision=8907
2004-03-28 20:32:21 +00:00
Martin Fuchs
3bf2b751a9 UNICODE optimizations
svn path=/trunk/; revision=8906
2004-03-28 18:10:48 +00:00
Filip Navara
0831947d6c - I accidently ommited two '*' and caused a random crashes when DriverEntry didn't return STATUS_SUCCESS.
svn path=/trunk/; revision=8905
2004-03-28 17:08:55 +00:00
Filip Navara
c05238d39f - Fixed a dumb ExFreePool that I accidently left there.
svn path=/trunk/; revision=8904
2004-03-28 17:01:10 +00:00
Thomas Bluemel
352d841f3b fixed a crash caused by removing a message twice from the queue
svn path=/trunk/; revision=8903
2004-03-28 16:21:58 +00:00
Martin Fuchs
bdaa4495d0 more configuration options:
- show/hide clock
- disable automatic notification icon hiding

svn path=/trunk/; revision=8902
2004-03-28 14:55:18 +00:00
Thomas Bluemel
86d212c244 added basic sas window, some other modifications
svn path=/trunk/; revision=8901
2004-03-28 12:21:41 +00:00
Thomas Bluemel
fa00201ce1 basic implementation of WlxLoggedOutSAS()
svn path=/trunk/; revision=8900
2004-03-28 12:19:07 +00:00
Filip Navara
a24291f78a - Fixed a minor bug in IopLoadServiceModule that caused crashes for disabled drivers.
svn path=/trunk/; revision=8899
2004-03-28 12:03:25 +00:00
Martin Fuchs
bbc679d779 make config option "show-hidden notification icons" persistent
svn path=/trunk/; revision=8898
2004-03-28 12:00:46 +00:00
Filip Navara
6d1dae4a75 - Fixed line endings.
svn path=/trunk/; revision=8897
2004-03-28 09:52:18 +00:00
Filip Navara
c734759964 - Minor cleanup and fixed few memory leaks on driver unload.
svn path=/trunk/; revision=8896
2004-03-28 09:48:13 +00:00
Martin Fuchs
5c7330b4d4 smart XML formating
svn path=/trunk/; revision=8895
2004-03-28 09:34:43 +00:00
Thomas Bluemel
7d9ce02db4 implemented WlxDisplaySASNotice()
svn path=/trunk/; revision=8894
2004-03-27 23:24:51 +00:00
Martin Fuchs
25c77834ce Merge Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	Call IShellExecuteHook interface for ShellExecute() calls with ID
	lists.

svn path=/trunk/; revision=8893
2004-03-27 21:19:27 +00:00
Gé van Geldorp
ac44e25672 Fix LOGFONT conversion in CreateFontIndirectA()
svn path=/trunk/; revision=8892
2004-03-27 21:07:33 +00:00
Filip Navara
014d8e9588 - Rewritten some driver loading functions to get higher control of the driver loading and initialization process (Fixes bug #263).
- Added support for lower level filter drivers.

svn path=/trunk/; revision=8891
2004-03-27 19:41:32 +00:00
Martin Fuchs
bf1b24c1fb - XMLChildrenFilter iterator
- correctly encode special characters while writing XML strings
- MIT license for XmlStorage classes

svn path=/trunk/; revision=8890
2004-03-27 18:08:42 +00:00
Gé van Geldorp
287b32c870 Return empty instead of NULL region for invisible windows
svn path=/trunk/; revision=8889
2004-03-27 15:16:05 +00:00
Martin Fuchs
0fa710246c rollback changes when cancelling notify icon configuration dialog
svn path=/trunk/; revision=8888
2004-03-27 14:02:28 +00:00
Gé van Geldorp
dd3a343e64 Implement scrollbar controls
svn path=/trunk/; revision=8887
2004-03-27 10:46:32 +00:00
Martin Fuchs
0529529902 readll ntdll lib for DbgPrint
svn path=/trunk/; revision=8886
2004-03-27 09:23:05 +00:00
Martin Fuchs
9b62efc1ca Merge of Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	Implementation of IPersistFile::IsDirty().

svn path=/trunk/; revision=8885
2004-03-27 09:16:08 +00:00
Martin Fuchs
796ec35113 Merge of Wine commit:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
	Allow passing NULL to ILFindLastID.

Patch: http://cvs.winehq.org/patch.py?id=11621

svn path=/trunk/; revision=8884
2004-03-27 09:12:05 +00:00
Martin Fuchs
9477018084 merge Wine commit:
Modified files:
	dlls/shell32   : shellole.c shell32_main.h pidl.h pidl.c
	                 folders.c enumidlist.c control.c Makefile.in
Added files:
	dlls/shell32   : cpanelfolder.c cpanel.h

Log message:
	Martin Fuchs <martin-fuchs@gmx.net>
	Implementation of the control panel folder in shell namespace.

Patch: http://cvs.winehq.org/patch.py?id=11721

svn path=/trunk/; revision=8883
2004-03-27 09:08:10 +00:00
Martin Fuchs
63c5fcc117 merge Wine commit:
Martin Fuchs <martin-fuchs@gmx.net>
	- Fix handling of %2, %3, ... and lower case format characters in
	SHELL_ArgifyW().
	- Move "%I" expansion from ShellExecuteEx() into common function
	SHELL_ArgifyW().
	- Pass buffer length to SHELL_FindExecutable().
	- FIXME comment for len paramater in SHELL_ArgifyW().

	Ge van Geldorp <ge@gse.nl>
	- Add double quotation marks unless we already have them (e.g.: "%1"
	%* for exefile).
	- Remove unnecessary double quotation marks and command line arguments.

Patch: http://cvs.winehq.org/patch.py?id=11706

svn path=/trunk/; revision=8882
2004-03-27 09:07:42 +00:00
Art Yerkes
2673c9cd5e Fixed make bootcd on windows and cross.
svn path=/trunk/; revision=8881
2004-03-27 06:23:37 +00:00
Art Yerkes
fa4663f158 Define TOPDIR to . if not defined (for make bootcd)
svn path=/trunk/; revision=8880
2004-03-27 04:33:15 +00:00
Thomas Bluemel
3868dbd0a0 a few more minor speed-up
svn path=/trunk/; revision=8879
2004-03-27 00:35:02 +00:00
Thomas Bluemel
bf9c49bb8b little speed-up
svn path=/trunk/; revision=8878
2004-03-26 23:48:47 +00:00
Gé van Geldorp
367dea79d9 Add riched32.dll
svn path=/trunk/; revision=8877
2004-03-26 23:13:58 +00:00
Gé van Geldorp
c84ea8d62e libexpat.dll was moved
svn path=/trunk/; revision=8876
2004-03-26 23:01:44 +00:00
Martin Fuchs
b2221ecb04 add original .cvsignore entries
svn path=/trunk/; revision=8875
2004-03-26 21:20:30 +00:00
Martin Fuchs
1589b3aa3a add original .cvsignore entries
svn path=/trunk/; revision=8874
2004-03-25 18:02:56 +00:00
Thomas Bluemel
fcc80b7588 added missing .cvsignore file
svn path=/trunk/; revision=8873
2004-03-25 15:16:42 +00:00
Gé van Geldorp
a4c2f8ebd3 Make sure submenus are marked as popups
svn path=/trunk/; revision=8872
2004-03-25 12:32:13 +00:00
Gé van Geldorp
95d5ae34d2 Don't reserve space for empty menubar
svn path=/trunk/; revision=8871
2004-03-25 11:40:41 +00:00
Eric Kohl
9e558fcc6a - Implement ImpersonateLoggedOnUser().
- Moved some security related functions to better places.

svn path=/trunk/; revision=8870
2004-03-25 11:30:07 +00:00
Gé van Geldorp
8a8167ab4d Set correct colors before calling owner-drawn handler
svn path=/trunk/; revision=8869
2004-03-25 08:51:44 +00:00
Gunnar Dalsnes
9d7050fddd add RtlCreateCriticalSectionSpinCount + fix
svn path=/trunk/; revision=8868
2004-03-24 23:43:52 +00:00
Gunnar Dalsnes
29a9d5c519 add RtlCreateCriticalSectionSpinCount
svn path=/trunk/; revision=8867
2004-03-24 23:42:39 +00:00
Emanuele Aliberti
458909a9c0 Initialize LPC-related fields in ETHREAD.
svn path=/trunk/; revision=8866
2004-03-24 22:00:39 +00:00
Emanuele Aliberti
bcbcab94ad Visible build timestamp.
svn path=/trunk/; revision=8865
2004-03-24 21:46:41 +00:00
Martin Fuchs
f977f1fd59 FIXME -> TRACE
svn path=/trunk/; revision=8864
2004-03-24 20:47:58 +00:00
Filip Navara
1bad49c3be * Always return STATUS_SUCCESS from ScsiPortInitialize if some device was found.
* Minor correction to setting of SrbExtension.
* Changed DPRINT1 to DPRINT on some places.

svn path=/trunk/; revision=8863
2004-03-24 16:21:59 +00:00
Eric Kohl
9915a75ce6 - Set user-specific environment variables.
- Append 'PATH' environment variable if it already exists.

svn path=/trunk/; revision=8862
2004-03-24 16:00:01 +00:00
Martin Fuchs
7bd2a160e6 use libexpat.a
svn path=/trunk/; revision=8861
2004-03-24 10:34:21 +00:00
Martin Fuchs
fdbc91f5b5 integration of expat with ROS build system
svn path=/trunk/; revision=8860
2004-03-24 09:39:37 +00:00
Gé van Geldorp
ac6bc94f0f Fix filling of MENUITEMINFO in InsertMenu()
svn path=/trunk/; revision=8859
2004-03-24 08:56:52 +00:00
Martin Fuchs
ea02300a6a use the new built expat library for explorer
svn path=/trunk/; revision=8858
2004-03-24 00:19:16 +00:00
Royce Mitchell III
9a854f33a4 implement SetPixelV
svn path=/trunk/; revision=8857
2004-03-24 00:13:31 +00:00
Martin Fuchs
7e4896289f checked in expat source code
svn path=/trunk/; revision=8856
2004-03-24 00:05:27 +00:00
Gé van Geldorp
45931d5f5d Prevent deletion of system-owned objects like brushes returned by
GetSysColorBrush()

svn path=/trunk/; revision=8855
2004-03-23 22:50:14 +00:00
Thomas Bluemel
68d825d0da fixed accessing memory that has already been freed
svn path=/trunk/; revision=8854
2004-03-23 22:24:27 +00:00
Thomas Bluemel
39c6756765 Implemented GetWindowRgn() and GetWindowRgnBox()
svn path=/trunk/; revision=8853
2004-03-23 21:47:37 +00:00
Gé van Geldorp
022bd7dd68 Check for valid ClientRect
svn path=/trunk/; revision=8852
2004-03-23 21:30:18 +00:00
Gé van Geldorp
82e886d635 Implement GetObjectA/W() for fonts
svn path=/trunk/; revision=8851
2004-03-23 19:46:50 +00:00
Thomas Bluemel
4a2de9a81c don't use the window region when minimized
svn path=/trunk/; revision=8850
2004-03-23 18:08:07 +00:00
Gé van Geldorp
4e955d6423 Fix incorrect pointer arithmetic in NtGdiPtInRegion()
svn path=/trunk/; revision=8849
2004-03-23 17:07:41 +00:00
Thomas Bluemel
e207cba272 Implemented SetWindowRgn() and added support for window regions
svn path=/trunk/; revision=8848
2004-03-23 16:32:20 +00:00
Eric Kohl
93f83462c0 Changes to make AHA-2940 detect devices:
- Set proper inquiry buffer size.
- Check inquiry buffer for valid LUN.

svn path=/trunk/; revision=8847
2004-03-23 12:30:15 +00:00
Gé van Geldorp
c4e75c424f Implement GetUpdateRect() and harden NtUserGetUpdateRect()
svn path=/trunk/; revision=8846
2004-03-23 11:20:58 +00:00
Gé van Geldorp
75543614da - Implement GetCharWidthA/W()
- Fix memory overwrite in NtGdiGetCharWidth32()
Fixes bug #258

svn path=/trunk/; revision=8845
2004-03-23 07:59:47 +00:00
Gé van Geldorp
c718f507e9 Implement EnumFontFamilies(Ex)A/W() and TranslateCharsetInfo()
svn path=/trunk/; revision=8844
2004-03-23 00:18:54 +00:00
Gé van Geldorp
4aae876500 Silence debug messages
svn path=/trunk/; revision=8843
2004-03-23 00:12:24 +00:00
Martin Fuchs
d26e06ebdf - Merged partial Wine commit:
Mike McCormack <mike@codeweavers.com>
  Update path from relative path on loading.

- moved GetFullPathName() from IShellLink_ConstructFromFile() into IShellLinkA/W_fnSetPath()

svn path=/trunk/; revision=8842
2004-03-22 22:56:04 +00:00
Martin Fuchs
e6bd3bc673 merge Wine commit:
- Mike McCormack <mike@codeweavers.com>
  Unicode-ify the icon cache and SHGetFileInfo.

- fix by M. Fuchs

svn path=/trunk/; revision=8841
2004-03-22 21:40:12 +00:00
Martin Fuchs
d52dd4c5cc implemented UTF-8 conversion
svn path=/trunk/; revision=8840
2004-03-22 20:58:16 +00:00
Royce Mitchell III
c6df043a61 Reformatting plus change to NtGdiGetPixel to handle device DCs in addition to DIB DCs. This fixes bug #264.
svn path=/trunk/; revision=8839
2004-03-22 20:46:33 +00:00
Thomas Bluemel
d8eb783e69 fixed a couple of dead-locks in the region code
svn path=/trunk/; revision=8838
2004-03-22 20:14:29 +00:00
Filip Navara
ccecaee56d - Added allocation of SrbExtension.
- Correctly set ConfigInfo->BusInterruptVector.
- Corrected the INQUIRY request.

svn path=/trunk/; revision=8837
2004-03-22 19:59:31 +00:00
Filip Navara
bcce3e20b1 - Compile the VGA driver using w32api.
svn path=/trunk/; revision=8836
2004-03-22 16:00:38 +00:00
Thomas Bluemel
cebfd88253 fixed wrong rendering of clipped characters
svn path=/trunk/; revision=8835
2004-03-22 14:58:56 +00:00
Filip Navara
a3695d5fcb - Make PCI a boot driver.
svn path=/trunk/; revision=8834
2004-03-22 09:06:16 +00:00
Filip Navara
c4c05052cb - Renamed TaggedQueueing to TaggedQueuing.
svn path=/trunk/; revision=8833
2004-03-22 09:05:19 +00:00
Martin Fuchs
10328e2c9e install expat library
svn path=/trunk/; revision=8832
2004-03-21 23:44:28 +00:00
Martin Fuchs
3b9f0dd221 storage of configuration settings in user specific XML file
svn path=/trunk/; revision=8831
2004-03-21 23:36:24 +00:00
Filip Navara
bb917ce975 - Support for upper level filter drivers.
NOTE: Although the support for lower level filter driver is very similar, it's practically impossible to incorporate it with the current design without avoiding bugs such as #262 or #263. I don't want to extend the current mess beyond it's borders, so I ommited the call for initializing lower level filter drivers. The code needs a major cleanup and simplification on some places to make this support possible while maintaining a reasonable stable system.

svn path=/trunk/; revision=8830
2004-03-21 18:58:53 +00:00
Filip Navara
722728fd5c - A message box with timeout informing about successful installation and restart.
svn path=/trunk/; revision=8829
2004-03-21 14:37:19 +00:00
Filip Navara
c4a7a3aa63 - Fixed language definition and line endings.
svn path=/trunk/; revision=8828
2004-03-21 14:35:19 +00:00
Gé van Geldorp
8f6061137a Fix calling convention of various callback function prototypes
svn path=/trunk/; revision=8827
2004-03-21 12:34:02 +00:00
Gé van Geldorp
d8f0a4b49f Silence debug messages
svn path=/trunk/; revision=8826
2004-03-21 12:31:19 +00:00
Thomas Bluemel
de1f68d590 fixed clipping issue
svn path=/trunk/; revision=8825
2004-03-21 10:18:33 +00:00
Royce Mitchell III
a8f59cffef 1000+% performance increase in 1bpp dib -> 1bpp dib blitting.
svn path=/trunk/; revision=8824
2004-03-21 04:17:33 +00:00
Martin Fuchs
6a7304ac01 configuration dialog for notification icons
svn path=/trunk/; revision=8823
2004-03-21 00:31:14 +00:00
Steven Edwards
a9f6fe5ffb Merge setupapi with Winehq.
This should give us a working InstallHInfSection for loading drivers
if not check the attic for Alex's implementation.

svn path=/trunk/; revision=8822
2004-03-20 21:55:24 +00:00
Steven Edwards
537dc19b03 Merge setupapi with Winehq.
svn path=/trunk/; revision=8821
2004-03-20 21:53:36 +00:00
Steven Edwards
50ec7d086b Merge Winehq commit:
Yoshiro Takeno <taro-x@justsystem.co.jp>
In Windows, the leading byte for multibyte characters are set to upper
byte. If single byte character is used, the upper byte is set to 0.

svn path=/trunk/; revision=8820
2004-03-20 21:21:03 +00:00
Steven Edwards
5a868930ca Fix the rendering of the GPL.
svn path=/trunk/; revision=8819
2004-03-20 18:16:23 +00:00
Steven Edwards
7675725511 Make install works. This closes out bug 221
svn path=/trunk/; revision=8818
2004-03-20 17:41:24 +00:00
Filip Navara
72bf171b1b - Minor correction to IopGetSystemPowerDeviceObject.
svn path=/trunk/; revision=8817
2004-03-20 17:34:25 +00:00
Filip Navara
9d3fa4fe4b - Unlock surface in error case of EngModifySurface.
svn path=/trunk/; revision=8816
2004-03-20 17:33:10 +00:00
Eric Kohl
bea41fd8f8 Run second stage setup at first boot after install.
svn path=/trunk/; revision=8815
2004-03-20 15:59:19 +00:00
Eric Kohl
8b50600e95 Load user profile and create user environment upon user logon.
svn path=/trunk/; revision=8814
2004-03-20 15:58:16 +00:00
Eric Kohl
baaf29305f Fully implement RtlFormatCurrentUserKeyPath().
svn path=/trunk/; revision=8813
2004-03-20 15:56:00 +00:00
Martin Fuchs
0f69a9471a - Copyright notices for 2004
- launch_cpanel() utility function

svn path=/trunk/; revision=8811
2004-03-20 13:49:13 +00:00
Martin Fuchs
9de0deb4cc adjust for windres
svn path=/trunk/; revision=8810
2004-03-20 13:31:09 +00:00
Martin Fuchs
f7b3421484 fix japanese resource script
svn path=/trunk/; revision=8809
2004-03-20 13:25:28 +00:00
Martin Fuchs
18e827f845 context menu for notification area
svn path=/trunk/; revision=8808
2004-03-20 13:13:40 +00:00
Martin Fuchs
f06e49faea auto-hiding of inactive notification icons
svn path=/trunk/; revision=8807
2004-03-20 11:42:22 +00:00
Martin Fuchs
5ac2148058 added notifyhook.dll
svn path=/trunk/; revision=8806
2004-03-20 09:16:17 +00:00
Martin Fuchs
347477b0e9 fix for installation target by James Tabor
svn path=/trunk/; revision=8805
2004-03-20 09:11:13 +00:00
Steven Edwards
05cd23fc5c Add notepad to the list of targets.
svn path=/trunk/; revision=8804
2004-03-20 04:36:16 +00:00
Steven Edwards
ffc7f0a6a8 Enable stub for ImpersonateLoggedOnUser. This gets taskmgr
to load again.

svn path=/trunk/; revision=8803
2004-03-20 04:32:06 +00:00
Gé van Geldorp
77eb2df0b2 Handle invalid Unicode strings for %S format like MS does
svn path=/trunk/; revision=8802
2004-03-19 23:00:35 +00:00
Gé van Geldorp
896376d3c1 Handle characters outside first page
svn path=/trunk/; revision=8801
2004-03-19 22:59:23 +00:00
Gé van Geldorp
c082e0250f Fix link warnings
svn path=/trunk/; revision=8800
2004-03-19 22:58:10 +00:00
David Welch
dd4a862112 - Removed local definition of NtCurrentProcess.
svn path=/trunk/; revision=8799
2004-03-19 21:34:49 +00:00
David Welch
45dbc2f5d1 - Added definitions for NtCurrentProcess and NtCurrentThread.
svn path=/trunk/; revision=8798
2004-03-19 21:33:48 +00:00
Filip Navara
d0dca2b24f - Load the PCI bus driver.
- Move the VGA driver from "Video" to "Video Save" group.

svn path=/trunk/; revision=8797
2004-03-19 21:02:55 +00:00
Filip Navara
d621be6ce6 Merged changes from videoport_pnp_14032004 branch:
- Better support for W2K+ video miniport driver incl. the basic implementation of PnP driver model.
- Return Win32 error codes instead of NT equivalents.
- Fixed a few bugs.

svn path=/trunk/; revision=8796
2004-03-19 20:58:32 +00:00
Filip Navara
91c3d64bf5 - Lower IRQL in error case of IoAllocateDriverObjectExtension.
svn path=/trunk/; revision=8794
2004-03-19 17:37:57 +00:00
Eric Kohl
be092c4712 Clean-up NtQueryInformationToken().
svn path=/trunk/; revision=8792
2004-03-19 12:47:17 +00:00
Eric Kohl
c89688b59d Fix NtOpenThreadToken() and NtSetInformationThread().
svn path=/trunk/; revision=8791
2004-03-19 12:45:07 +00:00
Eric Kohl
d037d068ff Implement CreateEnvironmentBlock() and DestroyEnvironmentBlock().
svn path=/trunk/; revision=8790
2004-03-19 12:40:49 +00:00
Eric Kohl
d3d3ab535d Enable environment inheritance.
svn path=/trunk/; revision=8789
2004-03-19 12:38:07 +00:00
Martin Fuchs
494bb081b9 merge WineHQ commit:
Rein Klazes <rklazes@xs4all.nl>
In SHELL_ExecuteW, if a new current directory is specified, change to
it before calling CreateProcess so that it will find the correct
executable.

Patch: http://cvs.winehq.org/patch.py?id=11578

svn path=/trunk/; revision=8788
2004-03-19 09:18:52 +00:00
Aleksey Bragin
f3eb637ea4 Committing my in-progress work with mmdrv, but it's still incomplete, and it still contains MS-specific things (in comments only!).
svn path=/trunk/; revision=8787
2004-03-19 06:11:28 +00:00
Royce Mitchell III
3398afcf63 simple hack to keep winzip from bugchecking us
svn path=/trunk/; revision=8786
2004-03-18 22:03:40 +00:00
David Welch
5ab4f36e65 - Fixed crash on reboot. Sorry.
svn path=/trunk/; revision=8784
2004-03-18 19:58:35 +00:00
Thomas Bluemel
177645b96c implemented SetFileShortName()
svn path=/trunk/; revision=8783
2004-03-18 18:29:19 +00:00
Royce Mitchell III
27f458a084 fixed several serious bugs in info.c and added a couple undocumented compatibilities based on analysis of ms's version.dll's behavior. Removed 16-bit exe support from info.c b/c it was very wrong in most cases, and MSDN says 16-bit exe isn't supported anyways. This gets winzip further towards working.
svn path=/trunk/; revision=8782
2004-03-18 18:15:28 +00:00
Filip Navara
280a5aa361 - Fixed return status of IoGetDeviceProperty.
svn path=/trunk/; revision=8781
2004-03-18 16:43:56 +00:00
Thomas Bluemel
7cda28d415 1. implemented SetFileValidData()
2. updated FILE_INFORMATION_CLASS

svn path=/trunk/; revision=8780
2004-03-18 16:19:26 +00:00
Martin Fuchs
810644856d first version of Explorer NotifyHook DLL
svn path=/trunk/; revision=8779
2004-03-18 00:28:45 +00:00
Thomas Bluemel
fd4ab47d69 minor speed-improvement
svn path=/trunk/; revision=8778
2004-03-17 20:57:06 +00:00
Filip Navara
ff055ed11b - Fixed few bugs related to SUROBJ initialization.
svn path=/trunk/; revision=8776
2004-03-17 16:05:29 +00:00
Gunnar Dalsnes
31ac5158a6 fix pipe create flags traslation
svn path=/trunk/; revision=8775
2004-03-17 15:00:39 +00:00
Eric Kohl
f396c8299f Simplify LoadUserProfileW() and check for loaded profile.
svn path=/trunk/; revision=8774
2004-03-17 14:46:23 +00:00
Steven Edwards
e816725be5 Moved the WINE notepad.
svn path=/trunk/; revision=8773
2004-03-17 01:28:14 +00:00
Steven Edwards
b17d04d3a2 Moved the WINE notepad to rosapps
svn path=/trunk/; revision=8772
2004-03-17 01:27:00 +00:00
Martin Fuchs
cdfa901068 simplify Shell_NotifyIcon implementation
svn path=/trunk/; revision=8771
2004-03-16 23:18:10 +00:00
Martin Fuchs
820df5cbe5 use alloca() to pass NOTIFYICONDATA structures of any size
svn path=/trunk/; revision=8770
2004-03-16 22:49:29 +00:00
David Welch
3db0cc5595 - Map only the vga frame buffer for the hal to write debug messages
and map it higher up in the kernel address space so more space is available
for the nonpaged and paged pools.

svn path=/trunk/; revision=8769
2004-03-16 22:45:56 +00:00
David Welch
d4bd6869fe - Removed useless define.
svn path=/trunk/; revision=8768
2004-03-16 21:13:15 +00:00
David Welch
9eb9832b02 - Use the miniport services to map the frame buffer.
svn path=/trunk/; revision=8767
2004-03-16 21:11:44 +00:00
David Welch
32a05a4377 - Implemented IOCTL_VIDEO_MAP_VIDEO_MEMORY/IOCTL_VIDEO_UNMAP_VIDEO_MEMORY.
svn path=/trunk/; revision=8766
2004-03-16 21:06:20 +00:00
Eric Kohl
bf87266d08 Flush the new user hive after copying.
svn path=/trunk/; revision=8764
2004-03-16 11:34:51 +00:00
Martin Fuchs
1a75a2261c add _ANONYMOUS_UNION to NOTIFYICONDATA struct
svn path=/trunk/; revision=8763
2004-03-16 10:08:16 +00:00
Martin Fuchs
5c6819aaae replace WINE specifiy system tray implementation by a WIN32 compatible implementation
svn path=/trunk/; revision=8762
2004-03-16 10:07:38 +00:00
Art Yerkes
c20093e554 Arty's summary:
drivers/fs/cdfs/fsctl: Allocate wide chars.  CD title was being truncated
drivers/fs/vfat/fsctl: Tolerate a zero bytes-per-sector
Patches by Herve Poussineau

svn path=/trunk/; revision=8761
2004-03-16 08:30:28 +00:00
Royce Mitchell III
7d726b9519 NtGdiGetPixel cleanup - fixed small bug with rect boundary checking, and cleaned up code to only unlock DC in one place.
svn path=/trunk/; revision=8760
2004-03-16 02:15:06 +00:00
Gé van Geldorp
ba96bd3821 - Add arrows for popup submenus
- Display bitmap menu items

svn path=/trunk/; revision=8759
2004-03-15 23:49:29 +00:00
David Welch
28f9bf0155 - Left whole page allocations on by accident.
svn path=/trunk/; revision=8758
2004-03-15 22:22:53 +00:00
Gé van Geldorp
aea7bd7615 - Handle 1bpp DIBs in NtGdiCreateDIBitmap
- Fix double lock of DC in routines called by NtGdiCreateDIBSection

svn path=/trunk/; revision=8757
2004-03-15 22:06:55 +00:00
Gé van Geldorp
52f0a740aa hSelf member contains the handle, not the pointer
svn path=/trunk/; revision=8756
2004-03-15 22:02:31 +00:00
Gé van Geldorp
ad8fa18342 Silence debug message
svn path=/trunk/; revision=8755
2004-03-15 22:01:17 +00:00
Hartmut Birr
8536591b9d - Reduced the size of the symbol files, as only necessary symbol informations are copied.
svn path=/trunk/; revision=8754
2004-03-15 21:31:45 +00:00
Hartmut Birr
6d7c68c262 - Fixed the loading of symbol files, if the base name contains the extension '.sym'.
svn path=/trunk/; revision=8753
2004-03-15 21:16:45 +00:00
Hartmut Birr
f983216b34 - Removed dirty loading of symbol files from ExpInitializeExecutive.
- Prevented moving of KiSystemStartup into _main, because the memory
  from _main is freed from within KiSystemStartup.

svn path=/trunk/; revision=8752
2004-03-15 21:10:34 +00:00
Martin Fuchs
dcb0a46bfe launch sound control panel applet
svn path=/trunk/; revision=8751
2004-03-15 20:59:06 +00:00
Martin Fuchs
fda8c77b11 implementation of volume control tray icon
svn path=/trunk/; revision=8750
2004-03-15 20:45:41 +00:00
Filip Navara
41562afcd3 - Minor corrections to emulated mouse pointer handling.
svn path=/trunk/; revision=8749
2004-03-15 20:21:51 +00:00
David Welch
60a43e438d - Fix reading past the end of the pool block.
svn path=/trunk/; revision=8747
2004-03-15 19:06:35 +00:00
Hartmut Birr
94683a5682 - Changed ctype.h from mingw to ntoskrnl its own.
svn path=/trunk/; revision=8746
2004-03-15 17:32:47 +00:00
Royce Mitchell III
b57b6bb796 mark GetPixel as @implemented and fix param names
svn path=/trunk/; revision=8744
2004-03-15 04:21:17 +00:00
David Welch
c6476093e1 - Fixed whole page allocations since the handle table code now relies on
allocations being eight byte aligned.

svn path=/trunk/; revision=8743
2004-03-15 00:03:31 +00:00
Gé van Geldorp
639ab68e9a Fix mask for true color images
svn path=/trunk/; revision=8742
2004-03-14 23:04:44 +00:00
Martin Fuchs
296ea7d293 handle large notification strings
svn path=/trunk/; revision=8741
2004-03-14 22:44:08 +00:00
Martin Fuchs
14f61e5720 UNICODE fix for Tooltips
svn path=/trunk/; revision=8739
2004-03-14 22:27:44 +00:00
Martin Fuchs
b95e68a45d handle WM_NOTIFYFORMAT
svn path=/trunk/; revision=8738
2004-03-14 22:20:10 +00:00
Martin Fuchs
c53a01dce1 - separate tooltip area for each notify icon
- handle non-null terminated tooltip strings

svn path=/trunk/; revision=8737
2004-03-14 21:02:55 +00:00
Gé van Geldorp
c88c8baba9 Return a valid (empty) visible region when the window is not visible
svn path=/trunk/; revision=8736
2004-03-14 20:31:55 +00:00
Filip Navara
800b2b0dcf - Set InitData.HwInitDataSize to proper value.
svn path=/trunk/; revision=8733
2004-03-14 19:44:02 +00:00
David Welch
ad8ba55cb3 - Complete the irp even on an error.
svn path=/trunk/; revision=8731
2004-03-14 19:25:34 +00:00
Martin Fuchs
254292d714 resize taskbar buttons on WM_SIZE
svn path=/trunk/; revision=8729
2004-03-14 18:51:35 +00:00
David Welch
38b3d10879 - Map ntstatus values to the win32 error code expected by the display driver.
svn path=/trunk/; revision=8728
2004-03-14 18:36:14 +00:00
David Welch
e52b5b410e - Map return codes from the miniport's device i/o control routine from
win32 error code to ntstatus values.

svn path=/trunk/; revision=8727
2004-03-14 18:35:02 +00:00
David Welch
7c4c3bfb0b - Fixed bug with recalling previous input.
- Switch back to text mode when entering the debugger.

svn path=/trunk/; revision=8726
2004-03-14 18:28:59 +00:00
David Welch
ff4f24bbb6 - Removed setting of STATUS_DATA_OVERRUN in IoStatusBlock.Status when
IoStatusBlock.Information is greater than the output buffer length passed
in by the caller.

svn path=/trunk/; revision=8725
2004-03-14 18:27:08 +00:00
Thomas Bluemel
9789932e02 implemented GetProcessIoCounters()
svn path=/trunk/; revision=8724
2004-03-14 18:16:40 +00:00
Eric Kohl
cc68c2e317 Implement GetUserProfileDirectoryW().
Open user key in LoadUserProfileW() and close it in UnloadUserProfile().

svn path=/trunk/; revision=8723
2004-03-14 18:15:59 +00:00
Eric Kohl
2ce08a79bb Fix some prototypes.
svn path=/trunk/; revision=8722
2004-03-14 18:13:19 +00:00
Thomas Bluemel
e040902fff implemented SetConsoleIcon()
svn path=/trunk/; revision=8721
2004-03-14 17:53:27 +00:00
Filip Navara
b6a8d006e3 - Added PnP enum entry for the VMware video driver.
svn path=/trunk/; revision=8720
2004-03-14 17:47:10 +00:00
Filip Navara
b4e4cd6676 - Don't load PnP drivers if they're disabled.
- Save pointer to PnP tree device node in device object's DeviceObjectExtension.
- Add function IopGetDeviceNode for getting device node from device object pointer.
- Rewritten IoGetDeviceProperty to use values that are in device node instead of sending Irps.

svn path=/trunk/; revision=8718
2004-03-14 17:10:48 +00:00
Filip Navara
c5058d5a3c - Fixed handling of IRP_MN_QUERY_BUS_INFORMATION.
- Add basic handling of IRP_MN_QUERY_CAPABILITIES for getting device specific bus address.

svn path=/trunk/; revision=8717
2004-03-14 17:10:43 +00:00
Gé van Geldorp
c72fe4771e Implement TrackPopupMenu. This fixes bug #131
svn path=/trunk/; revision=8716
2004-03-14 16:39:49 +00:00
Martin Fuchs
e8f56accc6 tool tip texts for notification icons
svn path=/trunk/; revision=8715
2004-03-14 16:39:28 +00:00
Martin Fuchs
b61431ec36 declare NOTIFYICON VERSION 3 constants
svn path=/trunk/; revision=8714
2004-03-14 15:54:27 +00:00
Martin Fuchs
b7c8fed978 declare V5 structure members and constants for notifications icons
svn path=/trunk/; revision=8713
2004-03-14 15:42:04 +00:00
Martin Fuchs
258d7cea79 hide clock from desktop bar if it's configured this way in registry
svn path=/trunk/; revision=8712
2004-03-14 14:44:23 +00:00
Thomas Bluemel
841b0b2958 implemented GetFileSizeEx()
svn path=/trunk/; revision=8711
2004-03-14 13:20:10 +00:00
Thomas Bluemel
2c9bca4a1a implemented SetFilePointerEx() and fixed SetFilePointer() to check if the calculated file position is negative
svn path=/trunk/; revision=8710
2004-03-14 13:11:55 +00:00
Martin Fuchs
3b338cc571 fixed imagelist handle leak
svn path=/trunk/; revision=8709
2004-03-14 12:43:27 +00:00
Thomas Bluemel
42798328cb count all gdi handles and serialize removing gdi handles from the table.
svn path=/trunk/; revision=8708
2004-03-14 12:16:50 +00:00
Martin Fuchs
5ca99eb505 disable context menu for non-file system objects
svn path=/trunk/; revision=8706
2004-03-14 12:06:25 +00:00
Gé van Geldorp
d13e1cf220 Match error tested against to the actual error returned by
NtUserGetWindowLong

svn path=/trunk/; revision=8705
2004-03-14 11:27:33 +00:00
Gé van Geldorp
57b26979cb You can't use NtCurrentTeb() in kernel mode
svn path=/trunk/; revision=8704
2004-03-14 11:25:33 +00:00
Thomas Bluemel
85f9fdf39f implemented GetProcessId()
svn path=/trunk/; revision=8703
2004-03-14 11:11:17 +00:00
Thomas Bluemel
04b43aab9e minor fix
svn path=/trunk/; revision=8702
2004-03-14 10:16:18 +00:00
Filip Navara
b0b55220e6 - Make IoGetDeviceInterfaces more compatible with the native version. Patch by Matthew Brace.
svn path=/trunk/; revision=8701
2004-03-14 09:43:12 +00:00
Thomas Bluemel
89265e0151 Implemented CreateHardLink()
svn path=/trunk/; revision=8700
2004-03-14 09:21:42 +00:00
Gé van Geldorp
8dc9f6bf9c Avoid ReactOS changes getting lost
svn path=/trunk/; revision=8699
2004-03-14 09:17:53 +00:00
Gé van Geldorp
ff837bae4a Explicitly include stddef.h for offsetof, needed for newer GCC versions
svn path=/trunk/; revision=8698
2004-03-14 08:51:16 +00:00
Gé van Geldorp
cd7fbb8e5c Translate pixel value from internal pixel format to RGB. Fixes bug #251.
svn path=/trunk/; revision=8697
2004-03-14 00:11:28 +00:00
Gé van Geldorp
e8cf99cda9 Delay unlinking of windows until after all messages have been sent.
This fixes bug #241.

svn path=/trunk/; revision=8696
2004-03-13 23:12:19 +00:00
Thomas Bluemel
ea0774aba3 RtlGetFullPathName_U() is supposed to check the parameter buf, it could be NULL
svn path=/trunk/; revision=8695
2004-03-13 22:23:14 +00:00
Filip Navara
1bc3d1b4ed - Fixed DPRINT.
svn path=/trunk/; revision=8694
2004-03-13 21:33:16 +00:00
Eric Kohl
3211fcf2d0 Implement LoadUserProfileW() and UnloadUserProfile().
svn path=/trunk/; revision=8693
2004-03-13 20:49:07 +00:00
Martin Fuchs
17d9fc0744 french translation for some start menu entries from Gge
svn path=/trunk/; revision=8691
2004-03-13 20:05:32 +00:00
Jason Filby
8552f80d82 Finish off NtDuplicateToken
svn path=/trunk/; revision=8690
2004-03-13 19:25:47 +00:00
David Welch
988f1d5968 - Checked in MmMapLockedPages patch from Anich Gregor.
svn path=/trunk/; revision=8689
2004-03-13 19:14:16 +00:00
David Welch
35f3e5b524 - Record feature information from cpuid. Not used at the moment.
svn path=/trunk/; revision=8688
2004-03-13 18:30:56 +00:00
David Welch
6cee07a9b2 - Fixed comment.
svn path=/trunk/; revision=8687
2004-03-13 18:28:33 +00:00
David Welch
6849e40ba7 - Added disassembler from gdb.
svn path=/trunk/; revision=8686
2004-03-13 18:26:13 +00:00
David Welch
ff3151887b - Added basic tracing, breakpoints and disassembly to the kernel debugger.
svn path=/trunk/; revision=8685
2004-03-13 18:21:57 +00:00
Hartmut Birr
c417fd21b1 - Split LdrpProcessImportDirectory into LdrpProcessImportDirectory and
LdrpProcessImportDirectoryEntry. Sometimes it is necessary to process
  a single entry from import directory and sometimes it is necessary
  to process all entries with the same name.

svn path=/trunk/; revision=8684
2004-03-13 18:14:04 +00:00
Gé van Geldorp
05825a6aab Mark update regions as global objects, to prevent their destruction when
the creating process exits

svn path=/trunk/; revision=8683
2004-03-13 17:33:53 +00:00
Eric Kohl
544d860114 Fix key name size calculation bugs.
Fill some allocated buffers with zeros.
Minor cleanup.

svn path=/trunk/; revision=8682
2004-03-13 12:14:44 +00:00
Eric Kohl
c9c372e34b Add missing EVENTLOG_SUCCESS.
svn path=/trunk/; revision=8681
2004-03-13 09:38:55 +00:00
Vizzini
35472661aa turn off skip bit to support VMWare FDC
svn path=/trunk/; revision=8680
2004-03-13 07:28:40 +00:00
Vizzini
007814383b fixed two race conditions with motor power-off; now handles disk change detection and no-disk-in-drive correctly
svn path=/trunk/; revision=8679
2004-03-13 07:04:54 +00:00
Vizzini
2207df1ae4 fixed a couple motor start/stop bugs; fixed a seek offset
svn path=/trunk/; revision=8678
2004-03-13 05:06:49 +00:00
David Welch
410da0d376 - Removed some debugging stuff I checked in by accident.
svn path=/trunk/; revision=8676
2004-03-13 00:41:40 +00:00
David Welch
e964a19eb2 - Fixed VPInterruptRoutine definition.
svn path=/trunk/; revision=8675
2004-03-12 23:03:21 +00:00
Gé van Geldorp
94c34aee80 Update status
svn path=/trunk/; revision=8674
2004-03-12 22:08:23 +00:00
Gé van Geldorp
ceabe25983 Sync to Wine-20040309:
Jason Edmeades <us@the-edmeades.demon.co.uk>
- Handle playing of files containing a '+' as part of the filename.
Robert Reif <reif@earthlink.net>
- Cleanup prepare/unprepare header parameter checking.
- Fix midiInGetDevCapsW.
Sean Young <sean@mess.org>
- Check uSize parameter in waveOutUnprepareHeader and
waveOutPrepareHeader.
Christian Costa <titan.costa@wanadoo.fr>
- Fixed waveInGetDevCapsW.

svn path=/trunk/; revision=8672
2004-03-12 21:20:53 +00:00
Martin Fuchs
5ceefba3a3 small 'Explorer' string adjustment for french
svn path=/trunk/; revision=8670
2004-03-12 21:20:02 +00:00
Martin Fuchs
82ed8b47d6 adjust start button to text size
svn path=/trunk/; revision=8668
2004-03-12 21:12:28 +00:00
Martin Fuchs
e40caec333 adjust start button to text size
svn path=/trunk/; revision=8667
2004-03-12 21:12:27 +00:00
Gé van Geldorp
a526783523 Sync to Wine-20040309:
Alexandre Julliard:
- Added version scripts for libwine and libwine_unicode.
Rein Klazes <rklazes@xs4all.nl>
- Fix MultiByteToWideChar and WideCharToMultiByte when called with code
page CP_SYMBOL.
- Remove the symbol font from the code page table, so it is not reported
as a valid/supported/installed code page.
- Remove workarounds for the badly behaved MultiByteToWideChar and co.
in a few places.

svn path=/trunk/; revision=8666
2004-03-12 21:04:04 +00:00
Gé van Geldorp
a990283857 Merge back commit from WineHQ
svn path=/trunk/; revision=8665
2004-03-12 20:30:44 +00:00
Filip Navara
7f1a2fa09f - Fixed declaration of DRIVER_OBJECT and friends.
svn path=/trunk/; revision=8664
2004-03-12 19:40:40 +00:00
Filip Navara
0e8946cb44 - Implemented IoGetDriverObjectExtension and IoAllocateDriverObjectExtension.
- Fixed the parts of IoGetDeviceProperty that were incorrectly sending IRP_MN_QUERY_BUS_INFORMATION.

svn path=/trunk/; revision=8663
2004-03-12 19:40:29 +00:00
Filip Navara
5c45ab6ac0 - Support for IRP_MN_QUERY_BUS_INFORMATION and devices on multiple PCI buses.
svn path=/trunk/; revision=8662
2004-03-12 19:40:05 +00:00
Art Yerkes
7b9bc747c8 Added bit counting and inverting functions to address.
Broke out some functions in info.c -- They still don't work properly but
are improving.
Added setting of netmask in datalink/lan.c from the registry, broke out
registry reading function.

svn path=/trunk/; revision=8661
2004-03-12 04:21:59 +00:00
Vizzini
29d063166b - Added arc path support
- Fixed disk change support
 - Fixed the priority boosts to be saner
 - Fixed some start/stop motor timing bugs
 - Figured out the Real Deal with Model 30 support (I hope...)
 - Cleaned up DMA init a bit
 - Improved return values, freed things on fail, etc
 - General code cleanup

svn path=/trunk/; revision=8660
2004-03-12 03:36:32 +00:00
David Welch
f12f44e036 - Actually I realised it isn't valid to touch the object at all after
decrementing the reference count unless the reference count was one. I
also removed the retention check in ObfReferenceObject since I couldn't
see how this would ever be needed.

svn path=/trunk/; revision=8659
2004-03-12 00:46:35 +00:00
David Welch
c61a3955d5 - Use the return value from calling InterlockedDecrement on the reference
count when checking whether the object should be retained. This fixes
a race whereby one thread decrements the value to one, another thread
come in and decrements the value to zero and starts the delete, the
first thread then comes back, does retention checks and finds the
reference count is now zero and then bugchecks because the object is
already being deleted.

svn path=/trunk/; revision=8658
2004-03-12 00:28:13 +00:00
Vizzini
abc17a4830 Lots of code clean-up; correctly copies files of any size to/from disk;
clean under prefast, lint, verifier, and checked win2k

svn path=/trunk/; revision=8657
2004-03-11 23:12:03 +00:00
David Welch
304ff0ba96 - Return any error code from the miniport device i/o control to the display
driver. Fixes crash when running with ati drivers.

svn path=/trunk/; revision=8656
2004-03-11 23:07:16 +00:00
Gé van Geldorp
162e4ee1f5 Sync to Wine-20040309:
Francois Gouget <fgouget@free.fr>
- Assorted spelling and case fixes.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Add SHMenuIndexFromID and SHCoCreateInstanceAC.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Stub the stopwatch API.
- Implement DoesStringRoundTripW,@371-3,@392.
- Move a couple of string functions into string.c
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Add IntlStrEqWorkerA/W.
- StrCmp tests.
- Implement string functions in comctl32.
- Use CompareString in shlwapi wherever possible instead of ugly
  helpers.
Kevin Koltzau <kevin@plop.org>
- Fix UrlCanonicalize and add regression test.
- Prevent crash with invalid args in a few URL functions.

svn path=/trunk/; revision=8655
2004-03-11 22:30:40 +00:00
Gé van Geldorp
778b9378b6 Sync to Wine-20040309:
Marcelo Duarte <wine-devel@bol.com.br>
- Update of Portuguese resources.

svn path=/trunk/; revision=8654
2004-03-11 22:00:19 +00:00
David Welch
01d3124925 - Made KeBugCheckEx into a call to KeBugCheckExWithTf.
- If file logging is in use then dump the last messages from the ringbuffer
on a bugcheck so the user can see them if the system was in graphics mode
when it crashed.

svn path=/trunk/; revision=8653
2004-03-11 21:50:24 +00:00
Gé van Geldorp
14a834a699 Sync to Wine-20040309:
Mike Hearn <mh@codeweavers.com>
- To reduce debugging noise, make IMalloc32/IMallocSpy implementations
  output to the new olemalloc debug channel.
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Alexandre Julliard
- Sync some of the dll registrations with the contents of
  winedefault.reg.

svn path=/trunk/; revision=8652
2004-03-11 21:46:41 +00:00
David Welch
060aa03ca6 - Added KeSaveFloatingPoint and KeRestoreFloatingPointState to the old
ddk so win32k can use them.

svn path=/trunk/; revision=8651
2004-03-11 21:42:01 +00:00
David Welch
2f596c1ce8 - Implemented EngSaveFloatingPointState and EngRestoreFloatingState.
svn path=/trunk/; revision=8650
2004-03-11 21:38:58 +00:00
Gé van Geldorp
0581a7d1a6 Fix DocumentPropertiesW declaration
svn path=/trunk/; revision=8649
2004-03-11 21:16:56 +00:00
Gé van Geldorp
4798e9d2db Sync to Wine-20040309
svn path=/trunk/; revision=8648
2004-03-11 21:15:50 +00:00
Gé van Geldorp
dbdb5a1f76 Sync to Wine-20040309
svn path=/trunk/; revision=8647
2004-03-11 20:08:15 +00:00
Gé van Geldorp
63c72aa8a8 Move declaration of GetLastError() to match PSDK
svn path=/trunk/; revision=8646
2004-03-11 20:05:11 +00:00
Thomas Bluemel
c07e181b14 forgot this one, sorry
svn path=/trunk/; revision=8645
2004-03-11 19:22:21 +00:00
Thomas Bluemel
169c5abd20 simplified calls to MsqPostMessage()
svn path=/trunk/; revision=8644
2004-03-11 16:17:25 +00:00
Thomas Bluemel
1988a7b8ea first attempt to implement SendMessageTimeout()
svn path=/trunk/; revision=8643
2004-03-11 14:47:44 +00:00
Thomas Bluemel
241b66d3bd added buttons to test if a thread is hung
svn path=/trunk/; revision=8642
2004-03-11 14:44:48 +00:00
Gé van Geldorp
7bbe8a0aec New cursor
svn path=/trunk/; revision=8641
2004-03-11 11:34:51 +00:00
Gé van Geldorp
41f97f6862 Create image list for toolbar with same depth as display
svn path=/trunk/; revision=8640
2004-03-11 11:14:52 +00:00
Gé van Geldorp
6477510568 Sync to Wine-20040309:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Implement the drag list control.
- Fix tabs in LBItemFromPt.
- Move string functions to separate file.
- Implement string functions in comctl32.
- Use CompareString in shlwapi wherever possible instead of ugly
  helpers.
- Forward some wrapper functions since we don't care about compatibility
  with Win98 in this case.
- Documentation update.
- Update common control function documentation.
- Don't allocate space for text when nMaxTextRows = 0.
- Support custom check background.
- Reduce number of parameters needed for DrawString function.
- Fix some traces.
- The TBM_GET*HOTLIST functions take imagelist ID in wParam.
- Implement TBM_GETSTRING{A,W}.
- Implement undocumented 0x462 message.
Alexandre Julliard
- Removed a couple of unneeded helper functions.
Maxime BellengT <maxime.bellenge@laposte.net>
- Fix a regression in ImageList_Create when creating a dibsection.
Ulrich Czekalla <ulrich@codeweavers.com>
- Use dibsections for the images.
Dimitrie O. Paun <dpaun@rogers.com>
- LVN_BEGINRDRAG is implemented now. Fix typo.
Aric Stewart <aric@codeweavers.com>
- Implemented LISTVIEW_ApproximateViewRect for LVS_REPORT.
Fabian Cenedese <Cenedese@indel.ch>
- ListView should behave in OWNERDRAW as in FULLROWSELECT. This allows
  to select cells not in the first column in REPORT mode with OWNERDRAW
  style set.
Matt Chapman <matthewc@cse.unsw.edu.au>
- Fix a reentrancy issue in the property sheet implementation by not
  caching a pointer that can change.
- REBAR_Layout should respect the minimum size of bands even when
  RBBS_FIXEDSIZE is not set.
- REBAR_ShowBand needs to force layout of the rebar after a band is
  hidden/unhidden.
Vitaliy Margolen <wine-patch@kievinfo.com>
- Adjust all dimensions to match native.
- Invalidate whole tab area when multi-line.
- In vertical tab placement go from top to bottom.
- Fix annoying visual artifacts.
Huw Davies <huw@codeweavers.com>
- If TBSTYLE_EX_HIDECLIPPEDBUTTONS is set then invalidate the area that
  changes in a resize.
- Don't call SWP unless we're actually adjusting anything.
Christian Costa <titan.costa@wanadoo.fr>
- Accept null module instance, Loadstring can handle it.
Steve Lustbader <slustbader@verizon.net>
- Handle the firstVisible item being NULL in
Mike Hearn <mike@theoretic.com>
- Grow the treeview control expander button by 1px in each direction to
  match the native look.

svn path=/trunk/; revision=8639
2004-03-11 11:13:28 +00:00
Vizzini
8e37499a90 Fixed a length calculation bug introduced with transfer-splitting code
--> big file transfers work now

svn path=/trunk/; revision=8638
2004-03-11 07:01:58 +00:00
Vizzini
8438bc1293 fixed CHS computation bug
svn path=/trunk/; revision=8637
2004-03-11 06:48:22 +00:00
Vizzini
6ef65a3872 - Implement support for split DMA transfers
- Remove assert from CreateClose handler (still doesn't seem to get called
   consistently though)
 - Fixed an off-by-one bug for sector calculation

 --> Medium-sized files transfer to/from disk now

svn path=/trunk/; revision=8636
2004-03-11 06:24:44 +00:00
Andrew Greenwood
d5044130a8 - Updated the version number in README.TXT to 0.2.x (maybe I'm just being pedantic...)
svn path=/trunk/; revision=8635
2004-03-11 02:09:14 +00:00
James Tabor
64c32ff6f4 Turn off debug print out
svn path=/trunk/; revision=8634
2004-03-11 00:05:00 +00:00
Filip Navara
15989c99be - Support for SS_REALSIZEIMAGE and SS_CENTERIMAGE flags for bitmap static controls.
svn path=/trunk/; revision=8633
2004-03-10 23:21:56 +00:00
Filip Navara
cf41719321 - Include eventlog.c in the build.
svn path=/trunk/; revision=8632
2004-03-10 21:56:04 +00:00
Filip Navara
fe0b173e6e - Export the event log functions and LookupAccountSid[AW].
svn path=/trunk/; revision=8631
2004-03-10 21:37:18 +00:00
Aleksey Bragin
2b24e33ce7 LookupAccountSidA and W stubs added (FAR needs them). Hope it is the right place for them.
svn path=/trunk/; revision=8630
2004-03-10 21:34:42 +00:00
Andrew Greenwood
c9c497dc9f - Implemented ChangeMenuA and ChangeMenuW, as implemented in WINE.
svn path=/trunk/; revision=8629
2004-03-10 20:36:19 +00:00
Filip Navara
e080b835d0 - Fixed querying of thread locale.
svn path=/trunk/; revision=8628
2004-03-10 20:26:40 +00:00
Vizzini
ab9a6623a2 Properly set the length of the transfer so FastFat won't assert on us
svn path=/trunk/; revision=8627
2004-03-10 20:17:26 +00:00
Vizzini
1984d3c175 Disabled disk-change notification because it was breaking on Model 30 controllers; read/write is starting to work as a result
svn path=/trunk/; revision=8626
2004-03-10 19:35:04 +00:00
Steven Edwards
c29a4bda2e Add -Wall to the Makefle and fix a few compiler warrnings for
depreceated C++

svn path=/trunk/; revision=8625
2004-03-10 18:57:36 +00:00
Andrew Greenwood
b2a9c5d1de - Boot into GUI again (I'd disabled this as GUI stopped working in my local tree) - sorry about that!
svn path=/trunk/; revision=8624
2004-03-10 17:32:16 +00:00
Casper Hornstrup
fc8e6d987a 2004-03-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/bootsup.c (UpdateFreeLoaderIni): Use existing
	ReactOS entry if available.

svn path=/trunk/; revision=8623
2004-03-10 16:57:36 +00:00
Filip Navara
d72790226a - Fixed the Andrew's NtGdiCreateCompatibleBitmap fix, it was using a wrong Bits array.
svn path=/trunk/; revision=8622
2004-03-10 16:55:03 +00:00
Filip Navara
7f3f39dc20 - Fixed bug in VideoPortSetBusData.
svn path=/trunk/; revision=8621
2004-03-10 16:10:13 +00:00
Andrew Greenwood
a306af21c2 *Major soundcard support update*
ReactOS remains silent for now, but for anyone wishing to further work on the Sound Blaster driver and/or mmdrv.dll, this should help immensely :)

- Imported midimap from WINE
- Imported wavemap from WINE
- Imported msacm from WINE (32-bit only)
- Minor changes to mpu401
- Basic IRP_MJ_WRITE dispatch routine for sndblst.sys (receives buffers, does nothing else.)
- Added various WINE headers to include\wine

svn path=/trunk/; revision=8620
2004-03-10 15:22:45 +00:00
Gé van Geldorp
69208dc611 Tell apps we're NT4 SP6, VB runtime will fail if we report SP0
svn path=/trunk/; revision=8619
2004-03-10 09:14:29 +00:00
Andrew Greenwood
025e88cba9 - Implemented GetDCOrg(), which is officially obsolete, but I've included it for completeness' sake :)
svn path=/trunk/; revision=8618
2004-03-09 23:21:56 +00:00
Casper Hornstrup
e2b29d7f6c 2004-03-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* regtests/Makefile: Make REGTEST_TARGETS depend on *.c.
	* regtests/kmregtests/driver.c: Update call to PerformTests().
	* regtests/kmrtint/kmrtint.c (RegTestMain): Update to match prototype.
	* regtests/kmrtint/kmrtint.def (RegTestMain): Ditto.
	* regtests/kmrtint/kmrtint.edf (RegTestMain): Ditto.
	* regtests/win32base/tests/ws2event.c: New file.
	* regtests/regtests/regtests.c (OUPUT_MODE_DbgPrint,
	OUPUT_MODE_OutputDebugString, OUPUT_MODE_printf): Define.
	(OutputMode): New variable.
	(OutputRoutine): New function.
	(RunTestDriver): Add TestName parameter.
	(main): Parse command line to find output routine and test name.
	* regtests/shared/regtests.c (PerformTest): Use specified output routine
	if specified. Run only specified test if specified.
	(PerformTests): Update call to PerformTest().
	* regtests/shared/regtests.h (TestOutputRoutine): Add prototype.
	(TestDriverMain): Add OutputRoutine and TestName parameter.
	(PerformTests): Ditto.
	* regtests/win32base/Makefile (TARGET_SDKLIBS): Add ws2_32.a.
	* regtests/win32base/driver.c (RegTestMain): Update to match prototype.
	* regtests/win32base/win32base.def (RegTestMain): Ditto.
	* regtests/win32base/win32base.edf (RegTestMain): Ditto.
	* tools/regtests.c (UMSTUB): Update call to PerformTests().

svn path=/trunk/; revision=8617
2004-03-09 22:08:04 +00:00
David Welch
6616abd532 - Forgot this one.
svn path=/trunk/; revision=8616
2004-03-09 22:04:47 +00:00
David Welch
1fbda72a7a - Replaced some common sequences of inline assembly with macros. Avoid
having compiler checks scattered all over the place.
- Added some disabled code to KiDumpTrapFrame that dumps every address
on the stack that could be a return address. This is quite handy for
debugging crashes in modules compiled with fpo.

svn path=/trunk/; revision=8615
2004-03-09 21:49:54 +00:00
David Welch
e04ce16d15 - Fixed check for an out of range index in {Get/Set}{Class/Window}Long
(signed vs. unsigned arithmetic). Fixes crash in 'user32_test win'.

svn path=/trunk/; revision=8614
2004-03-09 21:21:39 +00:00
David Welch
860bde3b68 - Disabled double lock message in NDEBUG builds since it is triggered
whenever there is contention for the same object.

svn path=/trunk/; revision=8613
2004-03-09 20:34:28 +00:00
Filip Navara
9c45d9475e - Uncomment NDEBUG.
svn path=/trunk/; revision=8612
2004-03-09 18:56:32 +00:00
Filip Navara
daae8270b7 - Implemented VideoPortQueryPerformanceCounter and all video port spinlock functions.
- Added more debug info to VideoPortGetAccessRanges.

svn path=/trunk/; revision=8611
2004-03-09 17:28:49 +00:00
Aleksey Bragin
e4ac5bf4f4 Added more (in case we run on PowerPC) processor ids returned by GetSystemInfo(), by Christoph von Wittich.
svn path=/trunk/; revision=8610
2004-03-09 16:35:15 +00:00
Aleksey Bragin
b6ead4d81a Added more processor defines to SYSINFO struct, by Christoph von Wittich.
svn path=/trunk/; revision=8609
2004-03-09 16:33:22 +00:00
Eric Kohl
282e78244f Create a logon token and use it to start the shell process.
svn path=/trunk/; revision=8608
2004-03-09 15:08:12 +00:00
Eric Kohl
e380640f44 LogonUserW(): Fix key name.
svn path=/trunk/; revision=8607
2004-03-09 15:04:28 +00:00
Filip Navara
bea52f9dbe - Minor correction to DMA routines.
svn path=/trunk/; revision=8606
2004-03-09 14:16:39 +00:00
Gé van Geldorp
1bb065b4f4 Correct menu bars for windows not originating at top-left of screen.
This fixes bug #234.

svn path=/trunk/; revision=8605
2004-03-09 14:03:18 +00:00
Gé van Geldorp
97ce8d58b4 Fix SPMajorVersion for Nt4SP5, spotted by Christoph_vW
svn path=/trunk/; revision=8604
2004-03-09 12:59:13 +00:00
Richard Campbell
442842230e noncopyrighted icon FIXED
svn path=/trunk/; revision=8603
2004-03-09 10:59:26 +00:00
Richard Campbell
462be9c136 noncopyrighted icon
svn path=/trunk/; revision=8602
2004-03-09 10:56:16 +00:00
Richard Campbell
847c530813 please don't commit copyrighted microsoft icons to cvs!
svn path=/trunk/; revision=8601
2004-03-09 10:55:44 +00:00
Filip Navara
1a34bfa768 - Added Event Log stubs copied from Wine. It seems it's needed for Visual Basic runtime.
svn path=/trunk/; revision=8600
2004-03-08 21:58:17 +00:00
Filip Navara
dbce1b766d - Do the real memory allocation in context of CSRSS process. Suggested by David Welch.
svn path=/trunk/; revision=8599
2004-03-08 21:45:39 +00:00
Filip Navara
70acaf22e8 - Added service pack numbers to application compatibility settings.
svn path=/trunk/; revision=8598
2004-03-08 21:21:28 +00:00
Filip Navara
03e7c82dd2 - Mask out VIDEO_MEMORY_SPACE_DENSE flag, because it's specific to ALPHA processors. This gets Matrox Mystique driver working.
svn path=/trunk/; revision=8597
2004-03-08 20:54:10 +00:00
David Welch
2b4fa805eb - Hacky implementation of some dma related functions.
svn path=/trunk/; revision=8596
2004-03-08 20:27:33 +00:00
Richard Campbell
5df0488416 one more change.
svn path=/trunk/; revision=8595
2004-03-08 20:19:54 +00:00
Richard Campbell
f350173836 fix corrupted GPL problem
svn path=/trunk/; revision=8594
2004-03-08 20:16:45 +00:00
Steven Edwards
41a3435039 Get MSYS and a few others working again....
svn path=/trunk/; revision=8593
2004-03-08 18:09:05 +00:00
Filip Navara
a8d7de6a74 - Fixed DPRINT.
svn path=/trunk/; revision=8592
2004-03-08 14:31:49 +00:00
Thomas Bluemel
e63f7f9cd0 added basic skeleton for the system control panel
svn path=/trunk/; revision=8591
2004-03-08 14:24:47 +00:00
Filip Navara
06f1206cf2 - Fixed DPRINT.
svn path=/trunk/; revision=8590
2004-03-08 14:22:30 +00:00
Thomas Bluemel
246677c52f little fixes
svn path=/trunk/; revision=8589
2004-03-08 14:20:14 +00:00
Art Yerkes
0c76856d9c More support for IOCTL_TCP_QUERY/SET_INFORMATION_EX
Connected ControlChannel handle type.
Allowed empty EaInfo in create -> ControlChannel.
Added TDI entity for interfaces.
Fixed IPSnmpInfo interface number report.
Fixed returned buffer size report in DispTdiQueryInformationExComplete
Added IPROUTE_ENTRY struct.

What works:
tcpquery lists three entities, two builtin and one IF_ENTITY
tcpquery -i reports 1 interface and 1 address for me (addr=127.0.0.1)

TODO:
Type information for each entity (only two builtin entities are supported now)
Interface info out (IFEntry)
Route info in/out (IPRouteEntry)

svn path=/trunk/; revision=8588
2004-03-08 10:20:18 +00:00
Martin Fuchs
9183e287b1 new bug reports in TODO list
svn path=/trunk/; revision=8587
2004-03-08 09:45:19 +00:00
Eric Kohl
11cc5733d3 Return unique IndexNumber.
Minor cleanup.

svn path=/trunk/; revision=8586
2004-03-08 08:51:26 +00:00
Filip Navara
17ad90f8d0 - Implement RtlGetVersion.
- Rewrite VideoPortGetVersion using RtlGetVersion.
- Added debugging messages to InternalMapMemory.
- Changed VideoPortAllocateBuffer back to PagedPool.

svn path=/trunk/; revision=8585
2004-03-08 08:05:27 +00:00
David Welch
6c8ead7315 - Added a definition for PEVENT.
svn path=/trunk/; revision=8584
2004-03-08 07:41:27 +00:00
David Welch
16473a5114 - Implemented event services.
svn path=/trunk/; revision=8583
2004-03-08 07:04:57 +00:00
James Tabor
8311b47fe4 Finish changes to VideoPortGetVersion
svn path=/trunk/; revision=8582
2004-03-08 04:41:20 +00:00
James Tabor
2f224f7360 Change NonPagedPool for AllocateBuffer and implemented GetVersion for David Welch.
svn path=/trunk/; revision=8581
2004-03-08 04:09:02 +00:00
Andrew Greenwood
0e200b6f99 * Fixed co-ordinate translation for windows that have been moved, adjusting the co-ordinates to take into account the window captions.
NOTE: Menu item tracking is still broken for windows that have been moved. Eg, if you move a window, click on a menu, then move the mouse pointer over another item, the new menu will NOT open unless you click.

svn path=/trunk/; revision=8580
2004-03-07 22:13:51 +00:00
Filip Navara
c0b4d77eb9 - Removed the spinlock I added in my last patch, it's wrong!
svn path=/trunk/; revision=8579
2004-03-07 21:09:08 +00:00
Hartmut Birr
11897d4d87 - Implemented double buffering for a console windows. Currently the second buffer
is a memory bitmap. All screen buffer updates does also write to the bitmap and
  the screen is updated by invalidating the update region. The previous version
  has released the screen buffer lock while scrolling up. It is not possible to
  release the lock while a write to the screen buffer is in progress. If the text
  output routines are faster, we should change the second buffer from a bitmap
  to character array.

svn path=/trunk/; revision=8578
2004-03-07 21:00:11 +00:00
Filip Navara
84269ab2d2 - Fixed MapWindowPoints for NULL window handles.
svn path=/trunk/; revision=8577
2004-03-07 20:38:17 +00:00
Filip Navara
8aad973151 - Changed DbgPrint to DPRINT in DriverEntry.
svn path=/trunk/; revision=8576
2004-03-07 20:33:25 +00:00
Filip Navara
877788b63b - Call create process notify routines from NtCreateProcess.
- Protect PiProcessNotifyRoutine by a spinlock.
- Started PsSetLoadImageNotifyRoutine implementation, it just registers the callback, but doesn't call it.

svn path=/trunk/; revision=8575
2004-03-07 20:31:53 +00:00
Hartmut Birr
fa397a0e33 - Added a disk speed test utility.
svn path=/trunk/; revision=8574
2004-03-07 20:12:13 +00:00
KJK::Hyperion
61ae1aa515 - Added comments to the fiber test, plus minor fixes
- Fixed NT_TIB structure to be compatible with w32api
 - Fixed fiber support in kernel32.dll. Now the correct argument is passed to fiber startup routines

svn path=/trunk/; revision=8573
2004-03-07 20:07:05 +00:00
Hartmut Birr
783cbe0718 - Fixed the handling for ctrl and alt keys.
svn path=/trunk/; revision=8572
2004-03-07 20:03:43 +00:00
Hartmut Birr
ef908e75fd - Initialized the object tag to prevent the tag 0xcccccccc.
svn path=/trunk/; revision=8571
2004-03-07 19:59:37 +00:00
Hartmut Birr
68ddb0bcdd - Pre initialized the resulting transfer length for requests which are split.
svn path=/trunk/; revision=8570
2004-03-07 19:53:08 +00:00
Hartmut Birr
ec2daabaf9 - Changed the dma capability detection code.
- Enabled DMA transfers by default.
- Implemented DMA transfer for atapi devices (CD rom drives).

svn path=/trunk/; revision=8569
2004-03-07 19:48:45 +00:00
Art Yerkes
ce4344ab2c Added waiting on console handles. We use a thread to poll for input
availability.

svn path=/trunk/; revision=8568
2004-03-07 18:06:29 +00:00
Art Yerkes
796f34f5ff David Welch turned me on to the right way to solve the cygwin fork section
map problem.  This fixes map_dup_inherit.

svn path=/trunk/; revision=8567
2004-03-07 17:48:41 +00:00
Filip Navara
39078ad027 - Correct base addresses.
svn path=/trunk/; revision=8566
2004-03-07 14:33:13 +00:00
David Welch
bd277c512b - Added stubs for EngAlphaBlend and EngControlSprites.
svn path=/trunk/; revision=8565
2004-03-07 12:49:27 +00:00
David Welch
27ea3725e5 - .cvsignore update.
svn path=/trunk/; revision=8564
2004-03-07 12:42:10 +00:00
Filip Navara
5c13959830 - Moved the loading of font names from user32.dll to win32k.sys.
- Moved the window metrics values from hivesys.inf to hivedef.inf.
- In case of failure of getting the font values from registry, use default values.
- Removed user32.dll dependency on advapi32.dll.
- Removed the "UGLY HACK" code, because it really isn't true that ReactOS doesn't handle fonts with negative height.

svn path=/trunk/; revision=8563
2004-03-07 11:59:43 +00:00
Filip Navara
fceb231b0e - Fixed RtlFormatCurrentUserKeyPath and it's use.
- Fill correctly all members of the returned device object in IoCreateDevice.
- Don't bug check in loader when export isn't found, only report it and don't load the module.
- If we know a module path while loading, use it for searching for the import modules.
- Modified LdrpBuildModuleBaseName to not strip the extension from file name, because the files 's3legacy.dll' and 's3legacy.sys' are otherwise treated as the same files and wrong module is loaded.

svn path=/trunk/; revision=8562
2004-03-07 11:59:10 +00:00
David Welch
4a88989b85 - Added an implementation of LdrFindImageProcAddress.
svn path=/trunk/; revision=8561
2004-03-07 04:44:41 +00:00
David Welch
75860969fe - Added an implemention of VideoPortGetProcAddress
- ati2mtag calls VideoPortGetAccessRanges with *DeviceId == 0 so treat
that as matching an device id.
- Return STATUS_SUCCESS from VideoPortSetTrappedEmulatorPorts even though
the data is ignored.

svn path=/trunk/; revision=8560
2004-03-07 04:43:55 +00:00
David Welch
ff81e5e1b0 - Use an event rather than a semaphore to wake up the thread that writes
debug output to disk. Avoids bugchecking if the number of debug prints
before the thread wakes up exceeds the semaphore limit.

svn path=/trunk/; revision=8559
2004-03-07 04:38:41 +00:00
KJK::Hyperion
7682e4ce80 Fiber switching code fixed
svn path=/trunk/; revision=8558
2004-03-07 04:00:39 +00:00
KJK::Hyperion
cdf117484b Added fiber test
svn path=/trunk/; revision=8557
2004-03-07 03:48:47 +00:00
KJK::Hyperion
75c1012851 Fiber test application. It's a simulation of the Windows NT scheduling algorithm, complete with priority levels, real-time priorities and starvation prevention. Lacks pre-emption, waiting and boosts
svn path=/trunk/; revision=8556
2004-03-07 03:15:20 +00:00
Hartmut Birr
a30e1be179 - Initialized the win32k timer as SynchronizationTimer.
A notification timer is always signaled after the first hit.
- Possible this does fix more timer related problems.

svn path=/trunk/; revision=8555
2004-03-06 23:09:23 +00:00
David Welch
de9089e707 - Added padding to align VIDEO_PORT_CONFIG_INFO.VdmPhysicalVideoMemoryAddress
and subsequent members the same as visualc.

svn path=/trunk/; revision=8554
2004-03-06 22:27:55 +00:00
David Welch
1f3378866b - Forgot this file.
svn path=/trunk/; revision=8553
2004-03-06 22:26:05 +00:00
David Welch
30aec6e5f7 - Added stubs for some of the new w2k/xp functions.
svn path=/trunk/; revision=8552
2004-03-06 22:25:22 +00:00
David Welch
b041530f2d - Removed some unnecessary DbgPrints from the fatal exception path; ignore
the breakpoint in the tail of KeBugCheckEx/KeBugCheckWithTf if no debugger
is connected.

svn path=/trunk/; revision=8551
2004-03-06 22:24:14 +00:00
David Welch
957b856245 - Added stub implementations of MmAllocatePagesForMdl, MmFreePagesFromMdl
and MmMapLockedPagesSpecifyCache.

svn path=/trunk/; revision=8550
2004-03-06 22:21:20 +00:00
Filip Navara
c3d3178f3e - Corrected processing import directories to handle case when executable imports the same DLL more times.
svn path=/trunk/; revision=8549
2004-03-06 20:32:06 +00:00
James Tabor
fa714393ca Started VideoPortGetAgpServices, Allocate and ReleaseBuffer.
svn path=/trunk/; revision=8548
2004-03-06 08:39:06 +00:00
Filip Navara
f1d20bbf54 2004-03-06 Filip Navara <xnavara@volny.cz>
* drivers/video/videoprt/int10.c (VideoPortInt10):
	Print more debug informations.
	* drivers/video/videoprt/videoprt.c (VideoPortInitialize):
	Prevent conflicts when more miniport drivers are loaded.
	(VideoPortGetDeviceBase, VideoPortMapMemory, InternalMapMemory):
	Change way of reporting error to prevent reporting error when
	the resources were successfully mapped.
	(VideoPortDDCMonitorHelper): Add stub.
	(VidDispatchDeviceControl): Allocate memory from NonPagedPool.
	Add debug messages.
	* drivers/video/videoprt/videoprt.def (VideoPortDDCMonitorHelper):
	Add export.
	* drivers/video/videoprt/videoprt.edf (VideoPortDDCMonitorHelper):
	Ditto.
	* include/ddk/winddi.h (ENG_SYSTEM_ATTRIBUTE): Declare.
	* include/win32k/driver.h (DRIVER_FindMPDriver): Change declaration.
	* subsys/win32k/eng/surface.c (EngModifySurface): Implement.
	* subsys/win32k/misc/driver.c (DRIVER_FindMPDriver):
	Modify to open specific miniport driver depending on parameter.
	* subsys/win32k/objects/dc.c (GetRegistryPath):
	Add parameter to specify display driver number.
	(FindDriverFileNames): Ditto.
	(SetupDevMode): Ditto.
	(IntCreateDC): Correct DPRINT.
	(IntCreatePrimarySurface): Change to try more miniport drivers
	before giving up.
	* subsys/win32k/stubs/stubs.c (HeapVidMemAllocAligned, VidMemFree,
	EngDitherColor, EngQuerySystemAttribute): Add stubs.
	* subsys/win32k/win32k.edf (EngDitherColor, EngQuerySystemAttribute,
	HeapVidMemAllocAligned, VidMemFree, EngModifySurface):
	Add exports.
	* subsys/win32k/win32k.def: Ditto.

svn path=/trunk/; revision=8547
2004-03-06 01:22:04 +00:00
Hartmut Birr
30264d875a - Made it possible to allocate a pageop only if no other pageop for the given address exist.
- Try to pageout a page only if no other access to the page exist.
- Gave a free page only to the next waiting request (in MmReleasePageMemoryConsumer),
  if sufficient free pages are available.

svn path=/trunk/; revision=8546
2004-03-05 11:31:59 +00:00
Hartmut Birr
35cd217de4 - Changed the check for determining if the drawing destination is the screen or not.
- Fixed the order of calls to MouseSafetyOnDrawEnd in some functions.

svn path=/trunk/; revision=8545
2004-03-05 09:02:42 +00:00
Art Yerkes
a57c52276e route add and route delete now work on real windows with our iphlpapi.
svn path=/trunk/; revision=8544
2004-03-05 04:50:01 +00:00
Filip Navara
1f2169eb29 2004-04-04 Filip Navara <xnavara@volny.cz>
* drivers/net/afd/afd/dispatch.c (AfdDispGetName): Implement.
	* drivers/net/afd/include/afd.h (TdiQueryInformation): Declare.
	* drivers/net/tcpip/tcpip/dispatch.c (DispTdiQueryInformation):
	Partially implement for TDI_QUERY_ADDRESS_INFO request.
	* drivers/net/tcpip/transport/tcp/tcp.c (TCPiBuildPacket):
	Don't use variable name NdisBuffer, because it causes conficts.

svn path=/trunk/; revision=8543
2004-03-05 00:48:11 +00:00
Filip Navara
7963bf3535 CVS maintaince
svn path=/trunk/; revision=8542
2004-03-04 23:26:36 +00:00
David Welch
876b2d6ed6 - Make the install depend on the targets to be installed (I don't know
how anyone could service without this).

svn path=/trunk/; revision=8541
2004-03-04 23:14:01 +00:00
David Welch
c77f9d0572 - Fix for crash on gui exit caused by trying to free an uninitialized
variable.

svn path=/trunk/; revision=8540
2004-03-04 23:11:43 +00:00
David Welch
45a3ee5da7 - Reenable the screen after setting the mode.
svn path=/trunk/; revision=8539
2004-03-04 23:01:19 +00:00
Martin Fuchs
72eafe1583 new result buffer length parameter for SHELL_FindExecutable()
svn path=/trunk/; revision=8538
2004-03-04 21:12:11 +00:00
Casper Hornstrup
318a90741d 2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tcpip/i386: New directory.
	* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
	* drivers/net/tcpip/notes.txt: New file.
	* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
	network event.
	(AfdDispEventSelect): Reference event handle.
	* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
	Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
	* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
	EventObject of type PKEVENT.
	* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
	(TARGET_OBJECTS): Add ARCH_OBJECTS.
	* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
	* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
	prototype.
	(TCPv4Checksum): New macro.
	(CorrectChecksum): Rename to IPv4CorrectChecksum.
	(TCPv4CorrectChecksum): New macro.
	* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
	* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
	(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
	* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
	and AckNumber.
	(TCP_SEGMENT): New structure.
	(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
	* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
	for Data on failure.
	* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
	* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
	from ChecksumCompute.
	* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
	operation.
	* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
	PTDI_ADDRESS_IP.
	Initialize ReceivedSegments.
	* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
	(DisplayIPPacket): Call DisplayIPHeader().
	(DisplayTCPHeader): Change format strings.
	* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
	TCPSegmentList): Add.
	(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
	TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
	TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
	function.
	(TCPiBuildPacket): Build segment.
	(TCPStartup): Initialize TCPSegmentList.
	(TCPShutdown): Cleanup TCPSegmentList.

svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
Steven Edwards
0d2b52fb76 Added .cvsignore I forgot about.
svn path=/trunk/; revision=8536
2004-03-04 19:00:44 +00:00
Steven Edwards
5bc9888562 Enable the rest of the stubs needed to get Hello-WinCE working.
No the hello world app still doesnt work. Only the messagebox app works.

svn path=/trunk/; revision=8535
2004-03-04 18:55:44 +00:00
Filip Navara
a2f24f38dc - Cleaned up the Boot Video driver.
- Replaced most of the magic numbers by defines.
- Changed the video mode setting to directly program the VGA registers instead of using Ke386CallBios.
- Properly map the video memory.

svn path=/trunk/; revision=8534
2004-03-04 18:55:09 +00:00
Steven Edwards
5c30d2cc66 Added a stub implementation of commctrl.dll for WinCE support
svn path=/trunk/; revision=8533
2004-03-04 18:54:21 +00:00
Filip Navara
499908b04f - Implemented VideoPortEnableInterrupt and VideoPortDisableInterrupt.
svn path=/trunk/; revision=8532
2004-03-04 18:51:58 +00:00
Filip Navara
eab00ba2a1 - Changed Video Mode setting routines to directly modify VGA registers instead on relying on Int 0x10 services.
- Removed unused code.

svn path=/trunk/; revision=8531
2004-03-04 18:49:58 +00:00
Filip Navara
1849adaa6b CVS maintaince
svn path=/trunk/; revision=8530
2004-03-04 18:45:16 +00:00
Steven Edwards
b6c0920b60 Get a simple WinCE x86 MessageBox program to load.
svn path=/trunk/; revision=8529
2004-03-04 18:24:29 +00:00
Royce Mitchell III
856035ab09 NtGdiPolygon simplification
svn path=/trunk/; revision=8528
2004-03-04 01:50:26 +00:00
Gunnar Dalsnes
cdd8158e28 cleanup
svn path=/trunk/; revision=8527
2004-03-04 01:30:00 +00:00
Gunnar Dalsnes
3c737e0e68 disable apc's for work items
svn path=/trunk/; revision=8526
2004-03-04 01:29:24 +00:00
Filip Navara
07892f4f36 - Don't zero memory allocated by ExAllocatePool.
- Fix font enumeration algorithm to not depend on zeroed memory. (Harmut Birr)

svn path=/trunk/; revision=8525
2004-03-04 00:07:03 +00:00
Steven Edwards
2bb6230071 Created a Edf file.
Commented the rest of the functions out pending my testing
of the WinCE MessageBox app tonight.

svn path=/trunk/; revision=8524
2004-03-03 23:27:27 +00:00
Martin Fuchs
f4ce2a5433 correct jump_to() functions
svn path=/trunk/; revision=8523
2004-03-03 20:33:21 +00:00
Martin Fuchs
30f3bfac23 add opened files to the "recent documents" list
svn path=/trunk/; revision=8522
2004-03-03 20:29:52 +00:00
Martin Fuchs
d39b5e77aa add opened files to the "recent documents" list
svn path=/trunk/; revision=8520
2004-03-03 20:29:51 +00:00
Martin Fuchs
556bf3a4ef new cmdlen parameter for SHELL_FindExecutablebyOperation()
svn path=/trunk/; revision=8519
2004-03-03 20:11:31 +00:00
Martin Fuchs
18f3babce6 merge Wine commit about:
Modified files:
	dlls/shell32   : shlexec.c

Log message:
	Martin Fuchs <martin-fuchs@gmx.net>
	Fix buffer length usage for RegQueryValueW() calls at various places.

Patch: http://cvs.winehq.org/patch.py?id=11331

svn path=/trunk/; revision=8518
2004-03-03 19:26:58 +00:00
Steven Edwards
8a70e9b5a5 Working on Making ReactOS run Windows CE apps........
Dont expect much yet. this is a work in progress.

svn path=/trunk/; revision=8517
2004-03-03 19:11:20 +00:00
Royce Mitchell III
c2923708cd patch by m-t and myself: fixes RoundRect compatibility issue.
svn path=/trunk/; revision=8515
2004-03-03 06:33:58 +00:00
Royce Mitchell III
2a6974f355 patch by m-t: small patch to improve compatibility.
svn path=/trunk/; revision=8514
2004-03-03 04:09:20 +00:00
Steven Edwards
287ae57914 Removed paint and wordpad dummy files
svn path=/trunk/; revision=8513
2004-03-03 03:43:40 +00:00
David Welch
12090241ff - Make dependency files depend on generated headers.
svn path=/trunk/; revision=8512
2004-03-02 22:36:18 +00:00
David Welch
018e7a5fe7 Oops.
svn path=/trunk/; revision=8511
2004-03-02 21:07:35 +00:00
David Welch
3ee20ff277 - Be a bit more specific in the dependencies for the regression tests.
svn path=/trunk/; revision=8510
2004-03-02 20:29:16 +00:00
Filip Navara
7885dac181 netevent.h -> ddk/netevent.h
svn path=/trunk/; revision=8509
2004-03-02 20:06:49 +00:00
Filip Navara
daaf2a72b8 - Build AFD, TCPIP and TDI with w32api headers.
- Removed the old TDI headers from include/net.

svn path=/trunk/; revision=8508
2004-03-02 18:18:15 +00:00
Filip Navara
5eed2db5ae Added import definitions for KefAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
svn path=/trunk/; revision=8507
2004-03-02 17:20:36 +00:00
Filip Navara
7d8bd23d04 assert -> ASSERT
svn path=/trunk/; revision=8506
2004-03-02 17:16:04 +00:00
Filip Navara
71853e115b 2004-03-02 Filip Navara <xnavara@volny.cz>
* include/ddk/scsi.h: Replace ASSERT with assert.
	* include/ddk/video.h: Ditto.
	* include/ddk/winddk.h: Ditto. Remove the lower case assert macro.
	* include/ddk/tdi.h: Correct packing.

svn path=/trunk/; revision=8505
2004-03-02 16:49:22 +00:00
Martin Fuchs
d6e2c152dd merge WineHQ commit
svn path=/trunk/; revision=8504
2004-03-02 10:30:38 +00:00
Martin Fuchs
9cd5e17f9f fix NAMELESSUNION support for struct DECIMAL
svn path=/trunk/; revision=8503
2004-03-02 10:25:59 +00:00
Steven Edwards
636e39eb03 Imported WineCalc by James Briggs.
svn path=/trunk/; revision=8502
2004-03-01 23:27:02 +00:00
Martin Fuchs
43a529f49b - declare IPicture OBJC macros
- enable olepicture.c

svn path=/trunk/; revision=8501
2004-03-01 22:57:20 +00:00
Martin Fuchs
897ccf0b08 resolve SysStringLen FIXME
svn path=/trunk/; revision=8500
2004-03-01 22:45:23 +00:00
Martin Fuchs
7be7923e1a remove superflous dllmain.c file
svn path=/trunk/; revision=8499
2004-03-01 22:41:52 +00:00
Martin Fuchs
93a1911cc6 correct SafeArrayCreateVector[Ex]() parameter types
svn path=/trunk/; revision=8498
2004-03-01 22:12:57 +00:00
Filip Navara
a7c8c741c3 - OpenGL bug fixes and cleanup. Patch by Anich Gregor.
svn path=/trunk/; revision=8497
2004-03-01 19:36:21 +00:00
Filip Navara
279a889834 - Fixed IntGdiExtEscape. Patch by Anich Gregor.
svn path=/trunk/; revision=8496
2004-03-01 19:25:33 +00:00
Vizzini
b5647b11fd First import of in-progress floppy driver replacement. Still needs some
debugging and feature improvements, and the kernel needs a bit of work to
get this driver loading on ReactOS.

svn path=/trunk/; revision=8495
2004-03-01 06:37:26 +00:00
Gunnar Dalsnes
92215102c2 fix root keys sort order
svn path=/trunk/; revision=8494
2004-03-01 01:07:37 +00:00
Gunnar Dalsnes
f4ae5098cc speedup listing items in the treeview
svn path=/trunk/; revision=8493
2004-03-01 00:50:56 +00:00
Hartmut Birr
772d5765b7 - Fixed the returned values for a data underrun.
- Fixed the write count in packet interrupts.

svn path=/trunk/; revision=8492
2004-02-29 22:01:21 +00:00
Filip Navara
7bb59c906f - Fix for race condition that should never happen.
svn path=/trunk/; revision=8491
2004-02-29 17:43:41 +00:00
Martin Fuchs
bc297296d2 fix SafeArrayCreateVectorEx()
svn path=/trunk/; revision=8490
2004-02-29 16:48:02 +00:00
Martin Fuchs
8a5a082170 merge WineHQ commits
svn path=/trunk/; revision=8489
2004-02-29 16:37:23 +00:00
Martin Fuchs
146314a91a fix DECIMAL macros and enable DECIMAL processing functions
svn path=/trunk/; revision=8488
2004-02-29 16:24:54 +00:00
Martin Fuchs
ed3857e1b1 enable SafeArray...() functions
svn path=/trunk/; revision=8487
2004-02-29 15:36:10 +00:00
Martin Fuchs
3834b079e5 remove more FIXMEs
svn path=/trunk/; revision=8486
2004-02-29 15:27:51 +00:00
Martin Fuchs
e6d1d24014 remove LOG output
svn path=/trunk/; revision=8485
2004-02-29 15:06:34 +00:00
Martin Fuchs
f685bba74e enable dispatch.c and varformat.c
svn path=/trunk/; revision=8484
2004-02-29 14:48:12 +00:00
Martin Fuchs
4f35ba6289 declare ITypeInfo_... COBJ macros
svn path=/trunk/; revision=8483
2004-02-29 14:22:52 +00:00
Martin Fuchs
efa31a77fb remove FIXMEs and enable now compiling functions
svn path=/trunk/; revision=8482
2004-02-29 14:19:05 +00:00
Martin Fuchs
bb2bc91e3c declare VARIANT manipulation functions
svn path=/trunk/; revision=8481
2004-02-29 14:16:27 +00:00
Martin Fuchs
6ac5583cf1 - define struct UDATE
- define VTBIT_... constants
- define missing VAR_... constants
- declare functions VarDateFromUdate, VarDateFromUdateEx, VarUdateFromDate

svn path=/trunk/; revision=8480
2004-02-29 14:12:38 +00:00
Martin Fuchs
3b61103945 define DISP_E_DIVBYZERO
svn path=/trunk/; revision=8479
2004-02-29 14:11:02 +00:00
Martin Fuchs
01e0ab2caf * include/oleauto.h (struct NUMPARSE, NUMPRS_...): add declarations for struct NUMPARSE
* include/oleauto.h (VarParseNumFromStr, VarNumFromParseNum): add function declarations

svn path=/trunk/; revision=8478
2004-02-29 13:52:18 +00:00
Martin Fuchs
099d7698c3 remove FIXMEs and re-enable disabled code
svn path=/trunk/; revision=8477
2004-02-29 13:30:08 +00:00
Martin Fuchs
a836674b95 added VARAINT union members llVal and ullVal
svn path=/trunk/; revision=8476
2004-02-29 13:23:45 +00:00
Martin Fuchs
5666895041 move missing oleaut32 declarations from ros-mingw-fixes.h into W32API headers
svn path=/trunk/; revision=8475
2004-02-29 12:53:39 +00:00
Hartmut Birr
b859b0b5db - Started implementation of busmaster dma.
- Splited the interrupt handlers.
- Don't handle 6 byte mode sense requests.

svn path=/trunk/; revision=8474
2004-02-29 12:27:52 +00:00
Hartmut Birr
72986b727d - Rewrote parts of the capability detection code.
svn path=/trunk/; revision=8473
2004-02-29 12:26:09 +00:00
Martin Fuchs
a4a8e435ed remove FIXMEs using corrected W32API headers
svn path=/trunk/; revision=8472
2004-02-29 12:12:18 +00:00
Martin Fuchs
035924f082 declare missing COLOR_... constants
svn path=/trunk/; revision=8471
2004-02-29 12:11:43 +00:00
Martin Fuchs
655457493c remove FIXMEs using corrected W32API headers
svn path=/trunk/; revision=8470
2004-02-29 12:05:33 +00:00
Martin Fuchs
e38d6f00f7 - correct definition of VT_INT_PTR and VT_UINT_PTR
svn path=/trunk/; revision=8469
2004-02-29 12:03:30 +00:00
Martin Fuchs
9adec1e712 - correct parameter type from LPDISPATCH* to LPDISPATCH
- define V_U... macros

svn path=/trunk/; revision=8468
2004-02-29 12:03:23 +00:00
Hartmut Birr
ad9ce1d94e - Protected the callback stack list with a spinlock.
svn path=/trunk/; revision=8467
2004-02-29 11:51:49 +00:00
Filip Navara
e7a65678bd - Fixed GDI handle leak.
svn path=/trunk/; revision=8466
2004-02-29 11:34:42 +00:00
Filip Navara
e5185d34b3 - Removed the incorrect implementations of Device Interface functions.
- Added verified implementation of IoGetDeviceInterfaces written by Matthew Brace and fixed by me.

svn path=/trunk/; revision=8465
2004-02-29 11:34:40 +00:00
Hartmut Birr
9a5bc1ce43 - Don't retry, if the request fails with SRB_STATUS_INVALID_REQUEST.
svn path=/trunk/; revision=8464
2004-02-29 11:21:58 +00:00
Hartmut Birr
fc1748325f - Implemented ScsiPortGetPhysicalAddress for Srb buffers.
svn path=/trunk/; revision=8463
2004-02-29 11:19:21 +00:00
Martin Fuchs
56aef8d72d preparations for SDI code merge
svn path=/trunk/; revision=8462
2004-02-28 23:33:15 +00:00
Filip Navara
504a0756cf - Fixed the definition of IsTextUnicode.
svn path=/trunk/; revision=8460
2004-02-28 22:26:34 +00:00
Thomas Bluemel
f54363658f added ability to cache gdi objects so they don't have to be allocated and deallocated all the time. it is disabled by default but could perhaps speed up the gui a bit.
svn path=/trunk/; revision=8459
2004-02-28 21:16:55 +00:00
Martin Fuchs
d7b74d7460 move '#undef UNTERFACE' behind interface definitions
svn path=/trunk/; revision=8458
2004-02-28 20:14:33 +00:00
Martin Fuchs
6f1017c15b merge WineHQ commits
svn path=/trunk/; revision=8457
2004-02-28 19:16:54 +00:00
Martin Fuchs
f7a2461d14 - "up" button (no functionality yet)
- moved extra functions into new "special" toolbar

svn path=/trunk/; revision=8456
2004-02-28 18:10:03 +00:00
Filip Navara
6332ecc1cd - Fixed the MSVCRT compiling error.
svn path=/trunk/; revision=8453
2004-02-28 16:54:22 +00:00
Martin Fuchs
c3d638c3a8 - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/trunk/; revision=8452
2004-02-28 16:41:55 +00:00
Martin Fuchs
d0cec9c1cd - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/trunk/; revision=8451
2004-02-28 16:41:55 +00:00
Martin Fuchs
6a84f09c2e compatibility fix for "Sleipnir" web browser: minimizing by clicks on taskbar
svn path=/trunk/; revision=8448
2004-02-28 16:05:33 +00:00
Martin Fuchs
a5248aa7bc desktop switching: allow applications to be visible only on one desktop
svn path=/trunk/; revision=8446
2004-02-28 15:14:38 +00:00
Filip Navara
44cb45b570 - Fixed RtlNtStatusToDosErrorNoTeb problems caused by mixing signed and unsigned integers.
svn path=/trunk/; revision=8445
2004-02-28 15:12:49 +00:00
Filip Navara
9b3df405d1 - NtQueryKey should return STATUS_BUFFER_TOO_SMALL and not STATUS_BUFFER_OVERFLOW.
svn path=/trunk/; revision=8444
2004-02-28 15:12:37 +00:00
Filip Navara
d6fd3dcb34 - Add a notice about import library order.
svn path=/trunk/; revision=8443
2004-02-28 15:12:28 +00:00
Martin Fuchs
0f584fd410 new TODO entries
svn path=/trunk/; revision=8442
2004-02-28 14:47:12 +00:00
Martin Fuchs
3d260251a8 Command line option "-install" to replace previously installed shell application
svn path=/trunk/; revision=8441
2004-02-28 14:26:40 +00:00
Martin Fuchs
44f3f0d4a0 remember last foreground window when switching desktops
svn path=/trunk/; revision=8440
2004-02-28 13:49:53 +00:00
Martin Fuchs
fd2602afbb remember last foreground window when switching desktops
svn path=/trunk/; revision=8439
2004-02-28 13:45:33 +00:00
Martin Fuchs
9399bfa9f2 remember last foreground window when switching desktops
svn path=/trunk/; revision=8438
2004-02-28 13:45:33 +00:00
Eric Kohl
bba7724b2d Complete user profile creation.
Add LoadUserProfileW() stub.

svn path=/trunk/; revision=8436
2004-02-28 11:30:59 +00:00
Martin Fuchs
0b2f62bcf5 another foreground window fix for clicks on notification icons
svn path=/trunk/; revision=8434
2004-02-28 10:57:01 +00:00
Martin Fuchs
ae26b09eb5 implemented 'minimize all' feature
svn path=/trunk/; revision=8433
2004-02-28 10:28:09 +00:00
Richard Campbell
44c383eeef temporary workaround for a font issue in win32k...negative font heights aren't handled properly.
svn path=/trunk/; revision=8431
2004-02-28 03:02:08 +00:00
Thomas Bluemel
9ece8f9451 don't hold more than one WM_MOUSEMOVE message at the same time in the message queue
svn path=/trunk/; revision=8430
2004-02-28 00:44:28 +00:00
Gé van Geldorp
82cff84c9a Use *NameLength before overwriting it
svn path=/trunk/; revision=8429
2004-02-27 23:11:32 +00:00
Steven Edwards
9187c6f654 Removed and moved some internal headers for the WINE CxxFrameHandler
Adapted the WINE implemenetation of __UnDName[Ex]
Enabled all of the stubs needed for MFC.

svn path=/trunk/; revision=8428
2004-02-27 22:39:39 +00:00
Thomas Bluemel
b48c6953d0 minor fix to SetParent()
svn path=/trunk/; revision=8427
2004-02-27 22:21:32 +00:00
Hartmut Birr
8219d9801e - Initialize/delete the lock of a console.
- Count the correct number of input events in CsrGetNumberOfConsoleInputEvents.

svn path=/trunk/; revision=8426
2004-02-27 17:35:42 +00:00
Thomas Bluemel
b1acedcbee don't lock the screen dc if it's NULL
svn path=/trunk/; revision=8425
2004-02-27 10:08:21 +00:00
Thomas Bluemel
dc750f77e5 fixed a few gdi leaks
svn path=/trunk/; revision=8424
2004-02-27 10:01:49 +00:00
Filip Navara
a9ecd3580c - Fixed RtlNtStatusToDosErrorNoTeb.
svn path=/trunk/; revision=8423
2004-02-27 05:50:56 +00:00
Thomas Bluemel
f917dbbe8c fixed missing window dereference
svn path=/trunk/; revision=8422
2004-02-27 01:05:45 +00:00
Thomas Bluemel
49d24c174d fixed missing window dereference
svn path=/trunk/; revision=8421
2004-02-27 00:11:58 +00:00
Thomas Bluemel
02708b9017 minor fixes
svn path=/trunk/; revision=8420
2004-02-26 22:52:05 +00:00
Martin Fuchs
326e514891 rebar control for cabinet windows
svn path=/trunk/; revision=8419
2004-02-26 22:45:50 +00:00
Thomas Bluemel
5469cad926 fixed crashes that could be caused by the thread cleanup routine when destroying windows from different threads
svn path=/trunk/; revision=8418
2004-02-26 22:23:55 +00:00
Martin Fuchs
11562074f2 disable start menu entries for non-existing folders
svn path=/trunk/; revision=8416
2004-02-26 21:52:26 +00:00
Martin Fuchs
9bcc74655c include explorer windows in desktop switching
svn path=/trunk/; revision=8413
2004-02-26 21:20:50 +00:00
Martin Fuchs
907d42478e avoid displaying context menu for application button _and_ desktop bar at the same time
svn path=/trunk/; revision=8411
2004-02-26 20:38:32 +00:00
Martin Fuchs
2e8d0a55b2 docu update
svn path=/trunk/; revision=8410
2004-02-26 20:26:11 +00:00
Martin Fuchs
75f575e7dd fix foreground window handling when clicking on notification area icons
svn path=/trunk/; revision=8408
2004-02-26 20:20:44 +00:00
Martin Fuchs
8fe7e083b3 fix foreground window handling when clicking on notification area icons
svn path=/trunk/; revision=8407
2004-02-26 20:20:44 +00:00
Martin Fuchs
15eee1ef26 resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8406
2004-02-26 19:47:39 +00:00
Martin Fuchs
fbd78a5a3a resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8405
2004-02-26 19:47:39 +00:00
Martin Fuchs
c22f36b23a resize taskbar buttons according to number of running applications
svn path=/trunk/; revision=8404
2004-02-26 19:47:39 +00:00
Hartmut Birr
d96346dede - Marked a cache segment as page out in progress to prevent from
recursive calls to MmPageOutPhysicalAddress.
- This fixes bug #220.

svn path=/trunk/; revision=8403
2004-02-26 19:29:55 +00:00
Filip Navara
8098620a78 - Corrected EiAllocatePool prototype.
- Corrected debug message in MmIsUsablePage.

svn path=/trunk/; revision=8402
2004-02-26 18:54:52 +00:00
Filip Navara
86275a897f - Modified import library order to link to snprintf from MSVCRT and not NTDLL. The one in NTDLL doesn't support '%f' parsing and so it caused the "%f KB" texts in Explorer instead of real file size.
svn path=/trunk/; revision=8401
2004-02-26 16:19:17 +00:00
Filip Navara
803e8a4b0f - Removed IsTextUnicode stub and replaced it with forwarding to NTDLL.RtlIsTextUnicode.
svn path=/trunk/; revision=8400
2004-02-26 16:16:18 +00:00
Filip Navara
30830340a8 - Support for RBBS_HIDETITLE style.
svn path=/trunk/; revision=8399
2004-02-26 13:45:44 +00:00
Eric Kohl
3c84f18b66 Remove obsolete files.
svn path=/trunk/; revision=8397
2004-02-26 12:29:15 +00:00
Eric Kohl
b35af5f50f Removed all forwarded exports to MSVCRT because a process must not load MSVCRT and CRTDLL at the same time.
svn path=/trunk/; revision=8396
2004-02-26 12:23:29 +00:00
Steven Edwards
cf035ffc03 Imported Olepro32 from WINE CVS-20040225.......
...I really want to get MFC working.

svn path=/trunk/; revision=8395
2004-02-26 02:01:13 +00:00
Steven Edwards
d36d4e1f21 Updated for Winmm changes.
svn path=/trunk/; revision=8394
2004-02-26 01:42:21 +00:00
Steven Edwards
8e76a54705 Added stub of IsTextUnicode to get notepad working again......
.....The next time someone submits copyrighted code and it makes it in to CVS
the contributor and the person that committed it are going to get a visit from me.

svn path=/trunk/; revision=8393
2004-02-26 00:33:09 +00:00
Steven Edwards
23cc7e88c1 Added stubs for GetFileSecurityA, SetFileSecurityA and
GetUserName based on Winehq sources to get Dependancy
Walker working again.

svn path=/trunk/; revision=8392
2004-02-25 23:54:13 +00:00
Steven Edwards
6645e904c7 Added Winehq2ros.patch for winmm
svn path=/trunk/; revision=8391
2004-02-25 23:50:28 +00:00
Hartmut Birr
8a3a4af533 - Initialize/delete the lock of a screen buffer.
svn path=/trunk/; revision=8390
2004-02-25 23:33:42 +00:00
Steven Edwards
22d250a711 Forgot to commit this.
svn path=/trunk/; revision=8389
2004-02-25 23:13:37 +00:00
Steven Edwards
2ef4c4f1ad Fixed error introduced by removing the stubs.
Created new file hwprofiles.c for GetCurrentHwProfileA

svn path=/trunk/; revision=8388
2004-02-25 23:12:39 +00:00
Martin Fuchs
427c8aeb8f rebar control for desktop bar
svn path=/trunk/; revision=8387
2004-02-25 22:56:49 +00:00
Steven Edwards
1816da4b7a Fix building Lsass
svn path=/trunk/; revision=8386
2004-02-25 22:36:53 +00:00
Steven Edwards
4f12cc2e75 Removed Makefile.ros as it is autogenerated.
svn path=/trunk/; revision=8385
2004-02-25 22:34:57 +00:00
Art Yerkes
6811934f2a For now, I changed the _WIN32_WINNT level in iphlpapi_private.h. This will
probably need to be changed.

svn path=/trunk/; revision=8384
2004-02-25 21:41:31 +00:00
Art Yerkes
4903d69f54 Added iphlpapi_private, which used to be ipprivate. Renamed to better go with
wine scheme.

svn path=/trunk/; revision=8383
2004-02-25 20:35:31 +00:00
Art Yerkes
3fa6583180 No more ick tabs.
svn path=/trunk/; revision=8382
2004-02-25 20:29:15 +00:00
Casper Hornstrup
47306399fd 2004-02-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/datalink/loopback.c: Reformat.
	* drivers/net/tcpip/network/neighbor.c: Ditto.
	* drivers/net/tcpip/tcpip/info.c: Ditto.
	* drivers/net/tcpip/transport/datagram/datagram.c: Cleanup.
	If there is an out-of-resources situation, don't transmit the
	datagram out of order.

svn path=/trunk/; revision=8381
2004-02-25 20:27:56 +00:00
Martin Fuchs
de2e13a185 fix taksbar icons after closing previous applications
svn path=/trunk/; revision=8379
2004-02-25 20:21:29 +00:00
Steven Edwards
07405fb464 Added a stub odbc32.dll as MFC depends on it.
svn path=/trunk/; revision=8378
2004-02-25 20:09:39 +00:00
Art Yerkes
5eea69af20 Removed stubs in icmp, iphlpv6. These are documented as being linked from
iphlpapi.lib, but I made the incorrect assumption that this meant that
they came from iphlpapi.dll

svn path=/trunk/; revision=8377
2004-02-25 20:06:40 +00:00
Steven Edwards
99866ef3a0 Sync Winmm with Wine-20040215 and silence some non-error messages.
svn path=/trunk/; revision=8376
2004-02-25 20:00:42 +00:00
Eric Kohl
9744443ac8 Remove ALL stubs which might be of questionable origin.
svn path=/trunk/; revision=8375
2004-02-25 19:34:33 +00:00
Martin Fuchs
8932a19cd6 set background brush for the short moment of displaying the background color while moving foreground windows
svn path=/trunk/; revision=8373
2004-02-25 19:29:12 +00:00
Martin Fuchs
fcf0872f58 fixed bug #224
svn path=/trunk/; revision=8371
2004-02-25 18:58:26 +00:00
Hartmut Birr
2d27f8a140 - Made again usable the cursor and F1-12 keys.
svn path=/trunk/; revision=8370
2004-02-25 18:12:52 +00:00
Eric Kohl
8b99b4ec5e Remove ALL stubs which might be of questionable origin.
svn path=/trunk/; revision=8369
2004-02-25 14:25:11 +00:00
Gé van Geldorp
5ed2e7cef1 Silence debug messages
svn path=/trunk/; revision=8368
2004-02-25 09:55:30 +00:00
Art Yerkes
5c85402724 Iphlpapi is now fully merged. Further changes should be synced with wine.
svn path=/trunk/; revision=8367
2004-02-25 07:41:50 +00:00
James Tabor
5e2693380d Partial implementation of VideoPortGetVgaStatus, needs testing
svn path=/trunk/; revision=8366
2004-02-25 05:38:33 +00:00
James Tabor
11f62ff83b Started implementation of VideoPortGetVgaStatus
svn path=/trunk/; revision=8365
2004-02-25 03:05:27 +00:00
James Tabor
f687066559 Started implementation of VideoPortGetVgaStatus
svn path=/trunk/; revision=8364
2004-02-25 02:59:55 +00:00
Steven Edwards
2b83ae3b64 Change a UNIMPLEMENTED to a DPRINT so we dont hang
After doing Help -> About -> About OS in Explorer.

svn path=/trunk/; revision=8363
2004-02-25 01:25:51 +00:00
David Welch
5fd0390001 - Make the install target depend on the files to be installed.
svn path=/trunk/; revision=8362
2004-02-24 23:51:38 +00:00
David Welch
7eeed46004 - Avoid a crashing when trying to process an exception early in the boot process.
svn path=/trunk/; revision=8361
2004-02-24 23:51:04 +00:00
David Welch
446f263ed3 - Try to avoid crashing when dumping out a corrupted stack.
svn path=/trunk/; revision=8360
2004-02-24 23:50:26 +00:00
Steven Edwards
f8a6374074 Get most of PICE to build again.
svn path=/trunk/; revision=8359
2004-02-24 23:30:20 +00:00
Martin Fuchs
e105a06719 docu update
svn path=/trunk/; revision=8358
2004-02-24 22:20:18 +00:00
Martin Fuchs
4438a2a27c fixed more GDI handle leaks
svn path=/trunk/; revision=8357
2004-02-24 22:15:43 +00:00
Thomas Bluemel
7db5e43a17 added /KDNOECHO parameter to disable serial echo by default in kdgb
svn path=/trunk/; revision=8355
2004-02-24 21:25:41 +00:00
Martin Fuchs
f276f1c016 - launch task manager
- set foregroundwindow when opening start menu (CTRL-ESC shortcut)

svn path=/trunk/; revision=8354
2004-02-24 20:00:16 +00:00
Thomas Bluemel
aec334c343 fixed WindowFromPoint() to send WM_NCHITTEST messages to windows that belong to the current process.
svn path=/trunk/; revision=8352
2004-02-24 15:56:53 +00:00
Vizzini
e7282af976 patch by Michael Fritscher to get Mspaint closer to working
svn path=/trunk/; revision=8351
2004-02-24 15:42:06 +00:00
Thomas Bluemel
5299e2afd5 cleanup
svn path=/trunk/; revision=8350
2004-02-24 13:27:03 +00:00
Gé van Geldorp
e3ead6ead5 Add more icon images
svn path=/trunk/; revision=8349
2004-02-24 09:16:32 +00:00
Aleksey Bragin
3613632618 InstallHinfSection has had a good progress at last - now it supports (at least _should_ - I didn't have time to test it thoroughly) file operations via file queues. There maybe a mess with paths, and I'm committing this now to have this code lying in CVS rather than on my HDD, since it isn't fully finished yet. But it's really close to the final stage.
svn path=/trunk/; revision=8348
2004-02-24 08:17:37 +00:00
Aleksey Bragin
dcbe451792 I modified this StretchBlt sample to provide non-uniform scaling of image, plus two ways to scale it - via stretchblt() and via stretchdibits() -- to test both functions in ReactOS.
If anyone is strictly against me modifiying this sample from the book -- tell me, and I will create stretchblt2 then. But I think this is unncessary.

svn path=/trunk/; revision=8347
2004-02-24 08:05:13 +00:00
Thomas Bluemel
b13d239f87 1. get rid of winlock.c
2. changed the Parent and Object field of the WINDOW_OBJECT structure to HANDLE for easier maintainance and serialize any access to them

svn path=/trunk/; revision=8346
2004-02-24 01:30:58 +00:00
Gé van Geldorp
d8b7c0ee97 Fix mono -> color bitblts
svn path=/trunk/; revision=8345
2004-02-23 22:44:52 +00:00
Martin Fuchs
60f5689a70 keyboard navigation in start menu using first character of display names
svn path=/trunk/; revision=8344
2004-02-23 22:17:01 +00:00
Filip Navara
47d8d8ba89 - As CURSORICON_FindBestIcon now takes color *bits* count and not color count, fixed the color calculation in LookupIconIdFromDirectoryEx.
svn path=/trunk/; revision=8342
2004-02-23 22:04:38 +00:00
Casper Hornstrup
46d0e1a57c 2004-02-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/regtests.c (KMSTUB): Correct device name.

svn path=/trunk/; revision=8341
2004-02-23 21:46:54 +00:00
Gé van Geldorp
1092faa446 Recursively search sub menus when a command id is specified
svn path=/trunk/; revision=8340
2004-02-23 21:18:45 +00:00
Filip Navara
b320e099ed - Compilation fixes.
svn path=/trunk/; revision=8339
2004-02-23 20:56:50 +00:00
Martin Fuchs
8c1f187f6e fixed icon handle leak in notification area
svn path=/trunk/; revision=8337
2004-02-23 20:36:21 +00:00
Gé van Geldorp
717ccf2aa4 Fix key left at begin and key right at end of menu
svn path=/trunk/; revision=8336
2004-02-23 20:10:01 +00:00
Gé van Geldorp
405c0e0d5a Fix race condition
svn path=/trunk/; revision=8335
2004-02-23 20:08:35 +00:00
Filip Navara
7a4c78bd4d - Fixed icon lookup so that in high color video modes colorfull icons are used.
svn path=/trunk/; revision=8334
2004-02-23 18:16:37 +00:00
Gé van Geldorp
f493ab9cc7 Release the correct lock
svn path=/trunk/; revision=8333
2004-02-23 12:39:37 +00:00
Eric Kohl
95033dafab Update to new fmifs types.
Implement partition format progress bar.

svn path=/trunk/; revision=8332
2004-02-23 11:58:27 +00:00
Eric Kohl
951f5f360f Update to new fmifs types.
svn path=/trunk/; revision=8331
2004-02-23 11:57:00 +00:00
Eric Kohl
574b42db31 * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native
  Add PROGRESS and DONE callbacks.

svn path=/trunk/; revision=8330
2004-02-23 11:56:10 +00:00
Eric Kohl
2b197a92e6 * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native
  InitializeFmIfs() is the DLL entry point

svn path=/trunk/; revision=8329
2004-02-23 11:55:12 +00:00
Eric Kohl
2beb8b39ac * lib/fmifs
* lib/fslib/fvatlib
  Convert Win32 types to native

svn path=/trunk/; revision=8328
2004-02-23 11:53:00 +00:00
Jason Filby
8265b68f51 Add Everaldo to credits
svn path=/trunk/; revision=8326
2004-02-23 04:29:39 +00:00
Gé van Geldorp
0970df8771 Implement system menus
svn path=/trunk/; revision=8325
2004-02-22 23:40:58 +00:00
Filip Navara
50103fff09 - Added missing members of GDIINFO structure.
svn path=/trunk/; revision=8324
2004-02-22 22:19:49 +00:00
Filip Navara
576e14972b - Advancing pointer inside loop makes more sense than checking the same structure ModeCount times.
svn path=/trunk/; revision=8323
2004-02-22 22:19:48 +00:00
Filip Navara
cc1c862dae - Added more debugging messages for video port driver Int 10 services.
svn path=/trunk/; revision=8322
2004-02-22 22:19:42 +00:00
Filip Navara
63aeee7369 Corrected packing!
svn path=/trunk/; revision=8321
2004-02-22 20:21:05 +00:00
David Welch
77c1718844 - Make the targets for regression test files the files themselves to avoid
unnecessary recompilation.

svn path=/trunk/; revision=8319
2004-02-22 18:53:39 +00:00
David Welch
0679c1f91e - Inherit any PREFIX setting for cross-compilation from the environment.
svn path=/trunk/; revision=8318
2004-02-22 18:46:45 +00:00
Gé van Geldorp
dc9250b384 Implement keyboard navigation for menus
svn path=/trunk/; revision=8317
2004-02-22 18:04:52 +00:00
Casper Hornstrup
af770309fc 2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile (all): Put REGTESTS dependency earlier in the list.
	* lib/kernel32/makefile: Support regression tests.
	* lib/kernel32/misc/dllmain.c: Prepare regression tests.
	* regtests/win32base/driver.c: (DummyThreadMain,
	RunPrivateTests): Add.
	(RegTestMain): Run private module regression tests.
	* tools/helper.mk: Add rtshared.a to MK_LIBS if building
	user-mode regression tests.
	* tools/regtests.c (UMSTUB): Add.
	(main): Output user-mode stub.
	* lib/kernel32/tests: New directory.
	* lib/kernel32/tests/.cvsignore: New file.
	* lib/kernel32/tests/Makefile: New file.
	* lib/kernel32/tests/tests: New directory.
	* lib/kernel32/tests/tests/.cvsignore: New file.
	* regtests/win32base/tests/file-1.c: move...
	* lib/kernel32/tests/tests/file-1.c: ...here.

svn path=/trunk/; revision=8316
2004-02-22 17:30:33 +00:00
Filip Navara
e8cc37fcec - Added some strange behaviour to VIS_ComputeVisibleRegion.
- Draw windows from foreground to background in IntFindWindowToRepaint, because it causes problems otherwise.

svn path=/trunk/; revision=8315
2004-02-22 16:56:14 +00:00
Filip Navara
b716aa0265 - Prevent double unlinking of window.
svn path=/trunk/; revision=8313
2004-02-22 15:14:27 +00:00
Filip Navara
1dc0c10491 - Fixed couple of mutex locking issues.
- Removed IntInitDesktopWindow function, because it's no longer used.

svn path=/trunk/; revision=8312
2004-02-22 14:26:35 +00:00
Eric Kohl
a1eebee733 Minor cleanup.
Implement RegRestoreKeyW().

svn path=/trunk/; revision=8311
2004-02-22 14:26:07 +00:00
Thomas Bluemel
2d6b7b1255 minor fix
svn path=/trunk/; revision=8310
2004-02-22 14:09:51 +00:00
Martin Fuchs
765c5f4797 display 'not yet implemented' messages for printers, network and RAS; disable address&command bar
svn path=/trunk/; revision=8306
2004-02-22 12:26:06 +00:00
Filip Navara
9dacfa1b68 - Modifed DceUpdateVisRgn to correctly handle situations when DceGetVisRgn returns NULL.
- Fixed the alternative version of VIS_ComputeVisibleRegion and made it the one and only, because it's smaller and faster than the original one.

svn path=/trunk/; revision=8305
2004-02-22 12:25:35 +00:00
Filip Navara
936dffea06 - Don't call IntSendMessage in MsqTranslateMouseMessage with uninitialized variable as window handle.
svn path=/trunk/; revision=8304
2004-02-22 12:25:02 +00:00
Martin Fuchs
2ae57f1248 disable stubs for SHFindFiles() and SHFindComputer()
svn path=/trunk/; revision=8303
2004-02-22 12:18:58 +00:00
Thomas Bluemel
80c553b4b5 minor cleanup
svn path=/trunk/; revision=8301
2004-02-22 12:06:43 +00:00
Martin Fuchs
b45d1b24ec - handle case, when having problems to open image file
- disable FAT-button since it's not yet ready

svn path=/trunk/; revision=8299
2004-02-22 10:20:30 +00:00
Casper Hornstrup
cc3221be2c 2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
* config (REGRESSIONTESTS): Add.
	* rules.mak (REGTESTS_PATH_INC): Add.
	* drivers/net/tcpip/makefile: Support regression tests.
	* drivers/net/tcpip/tcpip/main.c: Prepare regression tests.
	* hal/halx86/Makefile: Rename TARGET_LIBPATH to TARGET_IMPLIBPATH.
	* regtests/kmregtests/driver.c (KMRegTestsRegister): Add.
	(KMRegTestsRun): Move call to InitializeTests() and RegisterTests() to
	DriverEntry().
	(KMRegTestsDispatch): Support IOCTL_KMREGTESTS_REGISTER.
	* regtests/kmregtests/kmregtests.h (IOCTL_KMREGTESTS_REGISTER): Define.
	* tools/config.mk: Define REGTESTS if REGRESSIONTESTS = 1.
	* tools/helper.mk: Support module private regression tests.
	(TARGET_LIBPATH): Rename to TARGET_IMPLIBPATH.
	(TARGET_LIBPATH, TARGET_REGTESTS): Add.
	* tools/mkconfig.c: Support REGTESTS.
	* tools/regtests.c (umstubfile, kmstubfile): Add.
	(is_file_changed, write_file_if_changed): Add.
	(KMSTUB): Add.
	(HELP): Mention -u and -k switches.
	(main): Parse -u and -k switches.
	* drivers/net/tcpip/tests: New directory.
	* drivers/net/tcpip/tests/.cvsignore: New file.
	* drivers/net/tcpip/tests/Makefile: Makefile.
	* drivers/net/tcpip/tests/tests: New directory.
	* drivers/net/tcpip/tests/tests/.cvsignore: New file.

svn path=/trunk/; revision=8298
2004-02-22 09:59:17 +00:00
Filip Navara
a7b989769f - Unified indenting style in NtGdiExtTextOut and implemented support for right and centered text alignment.
- Don't render glyphs in TextIntGetTextExtentPoint.

svn path=/trunk/; revision=8297
2004-02-22 08:35:21 +00:00
Filip Navara
e6ad1bc2c0 - Fixed deadlock in IntFindWindowToRepaint.
svn path=/trunk/; revision=8296
2004-02-21 23:30:18 +00:00
Filip Navara
f38fdd47c3 - Fixed releasing of window object in IntValidateParent and NtUserRedrawWindow. Spotted by Thomas Weidenmuller.
- Fixed potencial deadlock in IntPaintWindows. Spotted by Thomas Weidenmuller.

svn path=/trunk/; revision=8295
2004-02-21 22:22:26 +00:00
Filip Navara
d83db81881 - Minor correction of NtGdiExtTextOut.
svn path=/trunk/; revision=8294
2004-02-21 21:15:22 +00:00
Filip Navara
232ffaff28 - Moved code from NtGdiTextOut to NtGdiExtTextOut and added basic support for ETO_OPAQUE flag.
svn path=/trunk/; revision=8293
2004-02-21 20:26:54 +00:00
Jason Filby
63eaa13a61 Null terminator fixes
svn path=/trunk/; revision=8292
2004-02-21 16:36:02 +00:00
Emanuele Aliberti
3cb945ba08 KERNEL_VERSION_BUILD_RC added in buildno.h.
svn path=/trunk/; revision=8291
2004-02-21 15:34:51 +00:00
Filip Navara
5aaaf34334 - Fixed my use of IntIsWindowVisible, it takes HWND as parameter and not PWINDOW_OBJECT.
svn path=/trunk/; revision=8290
2004-02-21 14:00:30 +00:00
Filip Navara
445eb5362d - Minor correction (again)
svn path=/trunk/; revision=8289
2004-02-21 13:57:31 +00:00
Filip Navara
c2458a1a4c CVS maintenance
svn path=/trunk/; revision=8288
2004-02-21 13:56:36 +00:00
Filip Navara
391292e419 - Minor correction
svn path=/trunk/; revision=8287
2004-02-21 13:51:13 +00:00
Gé van Geldorp
717c7d0333 Fix double release of fast mutex
svn path=/trunk/; revision=8286
2004-02-21 13:37:26 +00:00
Filip Navara
409eab1805 - Fixed some nonsense code in NtGdiGetDCEx.
- Fixed few race conditions in painting code.
- Removed function IntGetNCUpdateRegion and inlined it's code into IntInvalidateWindows.
- Removed function IsHidden and replaced it's usage by IntIsWindowVisible.

svn path=/trunk/; revision=8285
2004-02-21 13:13:27 +00:00
Hartmut Birr
5b5028fcb9 - Fixed a wrong index, which resulted in writing over the end of an allocated buffer.
svn path=/trunk/; revision=8284
2004-02-21 12:58:49 +00:00
Gé van Geldorp
1f1b824d08 Import w32api version 2.5 include files
svn path=/trunk/; revision=8283
2004-02-21 09:20:39 +00:00
Filip Navara
30e8e2d0b0 - Minor correction to NtConnectPort to avoid freeing NULL pointer. Based on patch by Waldo Alvarez Ca�izares.
svn path=/trunk/; revision=8282
2004-02-21 09:06:27 +00:00
Filip Navara
6659cc3181 - Fix by Waldo Alvarez Ca�izares for 8 <-> 8 bpp and 32 <-> 32 bpp StretchBlt
svn path=/trunk/; revision=8281
2004-02-21 09:06:25 +00:00
Mike Nordell
b3e3acc784 Fix environment variable handling. The (optional) envp argument to main() shall not contain strings of the form "=C:=C:\directory\".
svn path=/trunk/; revision=8280
2004-02-21 08:02:49 +00:00
Gé van Geldorp
184c8d2fba Bump version number on HEAD
svn path=/trunk/; revision=8279
2004-02-20 23:24:30 +00:00
Filip Navara
fd26a9a27b - Fixed line endings
svn path=/trunk/; revision=8278
2004-02-20 15:05:36 +00:00
Gé van Geldorp
4009a9e979 Kill another --include-dir
svn path=/trunk/; revision=8277
2004-02-20 08:33:37 +00:00
Royce Mitchell III
a7e30599ea If nWidth or nHeight is zero, CreateBitmap returns the handle to a 1- by 1-pixel, monochrome bitmap.
svn path=/trunk/; revision=8276
2004-02-20 07:45:58 +00:00
Gé van Geldorp
1355d672b4 Move --include-dir from helper.mk to rules.mak
svn path=/trunk/; revision=8275
2004-02-19 22:24:59 +00:00
Gé van Geldorp
59e447fc8f Also zero out first sector of root dir when formatting FAT12 and FAT16
volumes

svn path=/trunk/; revision=8274
2004-02-19 21:24:54 +00:00
Gé van Geldorp
6bd07e5854 Sync to Wine-20040213
* Jon Griffiths <jon_p_griffiths@yahoo.com>
  Add some missing prototypes, fix AssocIsDangerous.
  Implement StrRetToBSTR, delay-import oleaut32.
* Alexandre Julliard
  Only link against libdxguid where necessary.
* Juan Lang <juan_lang@yahoo.com>
  Stub for MLIsMLHInstance.
* Francois Gouget <fgouget@free.fr>
  Add missing '\n's to debug traces.

svn path=/trunk/; revision=8272
2004-02-19 21:19:27 +00:00
Thomas Bluemel
90fb2c7def added pool tags for better debugging
svn path=/trunk/; revision=8271
2004-02-19 21:12:11 +00:00
Martin Fuchs
8c80ebb0d1 remove duplicate windres include directory to get notepad build
svn path=/trunk/; revision=8269
2004-02-19 20:24:22 +00:00
Gé van Geldorp
c0b75c3e30 samlib is needed for 2nd stage setup
svn path=/trunk/; revision=8268
2004-02-19 19:45:52 +00:00
Thomas Bluemel
4e2ccf1842 added pool tags for better debugging
svn path=/trunk/; revision=8266
2004-02-19 19:44:39 +00:00
Filip Navara
e4340278d7 - Fixed line endings
- Updated regsvr32 to latest version by ShadowFlare.

svn path=/trunk/; revision=8265
2004-02-19 19:26:52 +00:00
Filip Navara
bb25722258 - Revert the last change, because it really doesn't help.
- Don't detect mouse on COM2 by default.

svn path=/trunk/; revision=8264
2004-02-19 17:54:05 +00:00
Gé van Geldorp
ecfd9db944 Patch by H�seyin Uslu <20194562@mail.baskent.edu.tr>
Check color passed on command line, make sure foreground and background
are not the same.

svn path=/trunk/; revision=8263
2004-02-19 17:04:11 +00:00
Thomas Bluemel
3ea2262879 fixed WinPosWindowFromPoint(), now it should work properly.
svn path=/trunk/; revision=8262
2004-02-19 15:27:55 +00:00
Aleksey Bragin
98efb8ab35 Fix by Waldo Alvarez Cacizares, fixes 16<->16 bpp stretchblitting (AbiWord splashscreen will look good)
svn path=/trunk/; revision=8260
2004-02-19 09:31:30 +00:00
Art Yerkes
82bad008ac Commits for bug 193, merged from release branch.
svn path=/trunk/; revision=8259
2004-02-19 06:59:50 +00:00
Art Yerkes
a884236737 Added VK_DECIMAL in numberpad chars.
svn path=/trunk/; revision=8257
2004-02-19 03:51:29 +00:00
Art Yerkes
aa83ce6cde Fixed bug 167.
svn path=/trunk/; revision=8254
2004-02-19 03:45:44 +00:00
Art Yerkes
839f724098 Import from the release branch.
svn path=/trunk/; revision=8252
2004-02-19 03:33:33 +00:00
Gé van Geldorp
e5d1ab1c06 CVS maintenance
svn path=/trunk/; revision=8250
2004-02-18 23:29:12 +00:00
Gé van Geldorp
0e77dd5903 Patch by Mark Tempel and Ge van Geldorp
Check RtlAllocateHeap() return value for 8-byte alignment.

svn path=/trunk/; revision=8249
2004-02-18 23:20:14 +00:00
Casper Hornstrup
0a2bff78f8 2004-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apistatus.lst: Correct path of videoprt.dll.

svn path=/trunk/; revision=8248
2004-02-18 21:29:20 +00:00
Filip Navara
d3753b2d2f - Attempt to avoid interaction with kernel debugging over serial port.
svn path=/trunk/; revision=8246
2004-02-18 16:00:56 +00:00
Thomas Bluemel
d0a5ab9948 Patch by Sylvain Petreolle:
'No newline at EOF' warning fix.

svn path=/trunk/; revision=8245
2004-02-18 13:46:15 +00:00
Richard Campbell
9cff9f7701 roll back thomas's change, apparently it IS causing the problems, my build system is just being stupid.
svn path=/trunk/; revision=8244
2004-02-18 12:21:57 +00:00
Royce Mitchell III
14f2cc4e3b fix bug in NtGdiExtEscape - not checking for NULL == DriverFunctions.Escape.
also added buffer copying.

svn path=/trunk/; revision=8243
2004-02-18 02:37:18 +00:00
Martin Fuchs
d406d24f29 correct comments
svn path=/trunk/; revision=8242
2004-02-18 00:01:59 +00:00
Mike Nordell
faf755d78e Remove not needed specific-compiler compile-time warning.
svn path=/trunk/; revision=8239
2004-02-17 23:58:54 +00:00
Gé van Geldorp
b7ee835601 Sync with Wine-20040213
svn path=/trunk/; revision=8238
2004-02-17 23:09:05 +00:00
Gé van Geldorp
503a4764b1 Sync with Wine-20040213:
Troy Rollo <wine@troy.rollo.name>
Added documentation for DocFiles, based on the CorVu implementation of
DocFiles.

svn path=/trunk/; revision=8237
2004-02-17 23:01:19 +00:00
Gé van Geldorp
9b03fed40e Sync with Wine-20040213:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- CoSetState info should be thread local.
- SetErrorInfo should allocate an apartment when no apartment present.
Alexandre Julliard
Moved a few remaining 16-bit definitions out of the standard headers.

svn path=/trunk/; revision=8236
2004-02-17 23:00:01 +00:00
Gé van Geldorp
a8d545f53b Sync with Wine-20040213:
Huw Davies <huw@codeweavers.com>
Fix a TRACE.

svn path=/trunk/; revision=8235
2004-02-17 22:40:47 +00:00
Gé van Geldorp
f3b3a68770 Sync with Wine-20040213:
Huw Davies <huw@codeweavers.com>
Only redraw button in PressButton and Indeterminate if its state has
changed.
Huw Davies <huw@codeweavers.com>
Honour TB_SETMAXTEXTROWS.
Ulrich Czekalla <ulrich@codeweavers.com>
Add support for BTNS_WHOLEDROPDOWN.
Populate button rect when sending TBN_DROPDOWN.
Dmitry Timoshkov <dmitry@codeweavers.com>
Add partial support for some undocumented toolbar messages.
Huw Davies <huw@codeweavers.com>
TB_ADDBUTTONS can pass a string ptr instead of an index.
TB_GETBUTTONINFO only returns a string if it's not in the internal
string list.
Huw Davies <huw@codeweavers.com>
Use the BTNS_* toolbar button style defines rather than the outdated
TBSTYLE_*.
Huw Davies <huw@codeweavers.com>
Add a missing return.
Jon Griffiths <jon_p_griffiths@yahoo.com>
Draw disabled toolbar buttons correctly.

svn path=/trunk/; revision=8234
2004-02-17 22:39:49 +00:00
Gé van Geldorp
df3569b50b Sync with Wine-20040213:
Vitaliy Margolen <wine-patch@kievinfo.com>
- Fix handling of TCS_RAGGEDRIGHT style.
- Clip UpDown control only if it is present.
- Add ToDos.

svn path=/trunk/; revision=8233
2004-02-17 22:38:03 +00:00
Gé van Geldorp
d8aa2b9e91 Sync with Wine-20040213:
Francois Gouget <fgouget@free.fr>
Assorted spelling and case fixes.
Alexandre Julliard:
Moved a few remaining 16-bit definitions out of the standard headers.

svn path=/trunk/; revision=8232
2004-02-17 22:35:27 +00:00
Gé van Geldorp
fe941591fe Sync with Wine-20040213:
Aric Stewart <aric@codeweavers.com>
Work toward properly updating the SelectionMark when the selected
state changed inside a listbox.

svn path=/trunk/; revision=8231
2004-02-17 22:33:55 +00:00
Gé van Geldorp
1a0c848456 Sync with Wine-20040213:
Robert Shearman <R.J.Shearman@warwick.ac.uk>
Fix nGrow initialization in DPA_CreateEx.

svn path=/trunk/; revision=8230
2004-02-17 22:32:53 +00:00
Martin Fuchs
6cecd7c5a3 inserted _NO_MDI questions
svn path=/trunk/; revision=8229
2004-02-17 21:50:44 +00:00
Martin Fuchs
0d03cadfe1 corrected comment
svn path=/trunk/; revision=8228
2004-02-17 21:50:07 +00:00
Gé van Geldorp
d842500eb1 Always return 8-byte aligned blocks
svn path=/trunk/; revision=8226
2004-02-17 21:11:17 +00:00
Martin Fuchs
a57cc3b82a disable autostart if the SHIFT key is pressed
svn path=/trunk/; revision=8223
2004-02-17 20:20:01 +00:00
Filip Navara
7595e479e5 - Work on serial mouse detection to fix bug #198.
svn path=/trunk/; revision=8221
2004-02-17 18:01:59 +00:00
Thomas Bluemel
f3a0075137 fixed WindowFromPoint() to search backwards
svn path=/trunk/; revision=8220
2004-02-17 17:43:09 +00:00
Thomas Bluemel
d3a4b4244c Added test app for AlphaBlend()
svn path=/trunk/; revision=8219
2004-02-17 14:55:59 +00:00
Mike Nordell
b84451d1c3 Changed timeout from 2000 to 2001 ms, to be able to find it easier in kmode.
svn path=/trunk/; revision=8218
2004-02-17 10:52:03 +00:00
Martin Fuchs
ec74cd68bc cleanup in project file
svn path=/trunk/; revision=8215
2004-02-16 22:54:53 +00:00
Martin Fuchs
3b0926761a added .cvsignore
svn path=/trunk/; revision=8212
2004-02-16 22:01:02 +00:00
Martin Fuchs
596a4b878e merged Wine commits to shell32
svn path=/trunk/; revision=8211
2004-02-16 21:46:12 +00:00
Richard Campbell
583ae62ff8 NtUserSystemParametersInfo:
- removed a case statement, it is now handled in USER32

svn path=/trunk/; revision=8210
2004-02-16 11:16:06 +00:00
Richard Campbell
2af64c0186 NtUserSystemParametersInfo:
- Removed static font variables.

svn path=/trunk/; revision=8207
2004-02-16 07:26:25 +00:00
Richard Campbell
fcb45adac8 SystemParametersInfo:
- SPI_GETNONCLIENTMETRICS and SPI_GETICONTITLELOGFONT
   now load their settings from the registry.
 - SPI_SET* aren't yet implemented, because i'd like to test my
   implementation before i commit them.

svn path=/trunk/; revision=8206
2004-02-16 07:25:01 +00:00
The ReactOS Team
d4a3555442 This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=8047
2004-02-06 08:21:52 +00:00
The ReactOS Team
abc01da30c This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2401
2001-11-28 01:38:00 +00:00
The ReactOS Team
7aeca22fed This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2398
2001-11-27 14:24:15 +00:00
The ReactOS Team
36e1bb60e8 This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2320
2001-10-25 23:22:09 +00:00
The ReactOS Team
74e77bb16f This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=2316
2001-10-23 21:15:45 +00:00
Casper Hornstrup
e3a75fb4da no message
svn path=/branches/avendor/; revision=1279
2000-08-01 18:43:38 +00:00
The ReactOS Team
ce122bcdea This commit was manufactured by cvs2svn to create branch 'avendor'.
svn path=/branches/avendor/; revision=1278
2000-08-01 18:43:38 +00:00
5876 changed files with 788597 additions and 593824 deletions

View File

@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -1,158 +0,0 @@
; FreeLoader by Brian Palmer
; FREELDR.INI - FreeLoader Initialization file
;
; Each line must be less than 1024 characters long
; and must be either a section heading (i.e. [section_name])
; or a setting (i.e. name=value) or a blank line.
; Comments start with a ';' character.
; Background colors can be any one of the following:
; Black
; Blue
; Green
; Cyan
; Red
; Magenta
; Brown
; Gray
; Text colors can be any one of the background
; colors and any of the following:
; DarkGray
; LightBlue
; LightGreen
; LightCyan
; LightRed
; LightMagenta
; Yellow
; White
; [FREELOADER] Section Commands:
;
; MessageBox - displays the specified text in a message box upon bootup
; MessageLine - adds a new line of text to a message box (must come before MessageBox command)
; TitleText - text that is displayed in the title box
; StatusBarColor - color of status bar's background
; StatusBarTextColor - color of status bar's text
; BackdropTextColor - color of the backdrop's fill
; BackdropColor - color of the backdrop's background
; BackdropFillStyle - backdrop fill style - can be Light, Medium, or Dark
; TitleBoxTextColor - title box text color
; TitleBoxColor - title box background color
; MessageBoxTextColor - message box text color
; MessageBoxColor - message box background color
; MenuTextColor - menu text color
; MenuColor - menu color
; TextColor - normal text color
; SelectedTextColor - selected text color
; SelectedColor - selected text background color
; TimeOut - sets the timeout (in seconds) before the first OS listed gets booted automagically
; [OS-General] Section Commands:
;
; BootType - sets the boot type: ReactOS, Linux, BootSector, Partition, Drive
; BootDrive - sets the boot drive: 0 - first floppy, 1 - second floppy, 0x80 - first hard disk, 0x81 - second hard disk
; BootPartition - sets the boot partition
; DriveMap - maps a BIOS drive number to another (i.e. DriveMap=hd1,hd0 maps harddisk1 to harddisk0 or DriveMap=fd1,fd0)
; [BootSector OSType] Section Commands:
;
; BootSector - sets the filename of the bootsector to be loaded
; [ReactOS OSType] Section Commands:
;
; SystemPath - sets the system root path (must be a valid ARC - Path):
; multi(0)disk(0)rdisk(0)partition(1)\reactos
; multi(0)disk(0)fdisk(0)
; Options - sets the command line options for the kernel being booted
; Kernel - sets the kernel filename (default: ntoskrnl.exe)
; Hal - sets the HAL filename (default: hal.dll)
[FREELOADER]
MessageBox=Welcome to FreeLoader!\nCopyright (c) 2003 by Brian Palmer <brianp@sginet.com>\n\nThis is a sample FreeLoader configuration file.\nEdit FREELDR.INI to change the boot settings.
DefaultOS=ReactOSHD
TimeOut=10
; DisplayMode can be:
; NORMAL_VGA for 80x25
; EXTENDED_VGA for 80x50 on VGA 80x43 on EGA
; 0x501C for 80x28
; 0x501E for 80x30
; 0x5022 for 80x34
; 0x502B for 80x43
; 0x503C for 80x60
[Display]
DisplayMode=NORMAL_VGA
TitleText=Brian<61>s Custom FreeLoader Boot Disk
StatusBarColor=Cyan
StatusBarTextColor=Black
BackdropTextColor=White
BackdropColor=Blue
BackdropFillStyle=Medium
TitleBoxTextColor=White
TitleBoxColor=Red
MessageBoxTextColor=White
MessageBoxColor=Blue
MenuTextColor=White
MenuColor=Blue
TextColor=Yellow
SelectedTextColor=Black
SelectedColor=Gray
SpecialEffects=Yes
[Operating Systems]
ReactOSHD="ReactOS (HardDrive)"
ReactOSFloppy="ReactOS (Floppy)"
Linux="Debian Linux"
Floppy="3 1/2 Floppy (A:)"
MSWinders="Microsoft Windows (C:)"
DriveD="Drive D:"
; Load ReactOS from harddisk (drive C:)
[ReactOSHD]
BootType=ReactOS
SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
Options=/DEBUGPORT=SCREEN
Kernel=\REACTOS\SYSTEM32\NTOSKRNL.EXE
Hal=\REACTOS\SYSTEM32\HAL.DLL
; Load ReactOS from floppy (drive A:)
[ReactOSFloppy]
BootType=ReactOS
SystemPath=multi(0)disk(0)fdisk(0)
Options=/DEBUGPORT=SCREEN
Kernel=\reactos\NTOSKRNL.EXE
Hal=\reactos\HAL.DLL
;[ReactOS (Debug)]
;BootType=ReactOS
;SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
;Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=19200
;Kernel=\NTOSKRNL.EXE
;Hal=\HAL.DLL
[Linux]
BootType=Linux
BootDrive=hd1
BootPartition=1
Kernel=/vmlinuz
Initrd=/initrd.img
CommandLine="root=/dev/sdb1"
[Floppy]
BootType=Drive
BootDrive=fd0
[MSWinders]
BootType=Partition
BootDrive=hd0
BootPartition=1
;DriveMap=hd1,hd0
;DriveMap=hd2,hd0
;DriveMap=hd3,hd0
[DriveD]
BootType=Partition
BootDrive=hd1
BootPartition=1

View File

@@ -1,59 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
endif
NASM_CMD = nasm
NFLAGS = -fwin32 -dwin32
BIN2C = ..$(SEP)tools$(SEP)bin2c
TOOLSDIR = ..$(SEP)tools
all:
$(MAKE) -C tools
$(MAKE) -C bootsect
$(MAKE) -C freeldr
$(MAKE) -C install
$(MAKE) -C fdebug
clean:
$(MAKE) -C bootsect clean
$(MAKE) -C freeldr clean
$(MAKE) -C install clean
$(MAKE) -C fdebug clean
$(MAKE) -C tools clean
.PHONY : clean

View File

@@ -1,3 +0,0 @@
*.exe
*.bin
*.h

View File

@@ -1,100 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
endif
NASM_CMD = nasm
NFLAGS = -fwin32 -dwin32
BIN2C = ..$(SEP)tools$(SEP)bin2c
TOOLSDIR = ..$(SEP)tools
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd
.PHONY : clean bootcd
all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin
$(BIN2C) :
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
dosmbr.bin : dosmbr.asm
@echo ===================================================== Assembling dosmbr
@$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm
fat.bin : fat.asm $(BIN2C)
@echo ===================================================== Assembling fat
@$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm
@$(BIN2C) fat.bin fat.h fat_data
fat32.bin : fat32.asm $(BIN2C)
@echo ===================================================== Assembling fat32
@$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm
@$(BIN2C) fat32.bin fat32.h fat32_data
isoboot.bin : isoboot.asm
@echo ===================================================== Assembling isoboot
@$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm
ext2.bin : ext2.asm
@echo ===================================================== Assembling ext2
@$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm
@$(BIN2C) ext2.bin ext2.h ext2_data
.PHONY : bootcd
bootcd: bootcd_dirs isoboot.bin
$(CP) isoboot.bin $(BOOTCD_DIR)
$(CP) dosmbr.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) ext2.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) fat.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) fat32.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
$(CP) isoboot.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
.PHONY : bootcd_dirs
bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
clean:
@-$(RM) *.bin
@-$(RM) *.h
@echo Clean ALL done.

View File

@@ -1,179 +0,0 @@
;
; normal DOS boot sector
;
; Ported to nasm from FreeDOS fdisk 1.2.0 by:
; Casper Hornstrup (chorns@users.sourceforge.net)
;
align 2, db 0
global _bootnormal_code
_bootnormal_code:
;-----------------------------------------------------------------------
; ENTRY (copied from freedos bootsector)
;
; IN: DL = boot drive
;OUT: DL = boot drive
;
;-----------------------------------------------------------------------
real_start: cli
cld
xor ax, ax
mov ss, ax ; initialize stack
mov ds, ax
mov bp, 0x7c00
lea sp, [bp-0x20]
sti
mov ax, 0x1FE0
mov es, ax
mov si, bp
mov di, bp
mov cx, 0x0100
rep movsw
jmp word 0x1FE0:0x7c00+ cont-real_start
cont: mov ds, ax
mov ss, ax
xor ax,ax
mov es,ax
; search for active partition
lea di, [bp+0x1be] ; start of partition table
test_next_for_active:
test byte [di],0x80
jne active_partition_found
add di,0x10 ; next table
cmp di, 07c00h+0x1fe; scanned beyond end of table ??
jb test_next_for_active
;*****************************************************************
call print
db 'no active partition found',0
WAIT_FOR_REBOOT:
jmp $
;*****************************************************************
trouble_reading_drive:
call print
db 'read error while reading drive',0
jmp WAIT_FOR_REBOOT
;*****************************************************************
invalid_partition_code:
call print
db 'partition signature != 55AA',0
jmp WAIT_FOR_REBOOT
;*****************************************************************
active_partition_found:
; call print
; db 'loading active partition',0
call read_boot_sector
jc trouble_reading_drive
cmp word [es:0x7c00+0x1fe],0xaa55
jne invalid_partition_code
jmp word 0x0:0x7c00 ; and jump to boot sector code
;*****************************
; read_boot_sector
;
; IN: DI--> partition info
;OUT:CARRY
;*****************************
read_boot_sector:
; /* check for LBA support */
mov bx,0x55aa
mov ah,0x41
int 0x13
jc StandardBios ; if (regs.b.x != 0xaa55 || (regs.flags & 0x01))
cmp bx,0xaa55 ; goto StandardBios;
jne StandardBios
; /* if DAP cannot be used, don't use LBA */
; if ((regs.c.x & 1) == 0)
; goto StandardBios;
test cl,1
jz StandardBios
jmp short LBABios
_bios_LBA_address_packet:
db 0x10
db 0
db 4 ; read four sectors - why not
db 0
dw 0x7c00 ; fixed boot address for DOS sector
dw 0x0000
_bios_LBA_low dw 0
_bios_LBA_high dw 0
dw 0,0
LBABios:
; copy start address of partition to DAP
mov ax,[di+8]
mov [0x7c00+ (_bios_LBA_low-real_start)],ax
mov ax,[di+8+2]
mov [0x7c00+ (_bios_LBA_high-real_start)],ax
mov ax,0x4200 ; regs.a.x = LBA_READ;
mov si,0x7c00+ (_bios_LBA_address_packet-real_start); regs.si = FP_OFF(&dap);
int 0x13
ret
;*****************************************************************
; read disk, using standard BIOS
;
StandardBios:
mov ax,0x0204 ; regs.a.x = 0x0201;
mov bx,0x7c00 ; regs.b.x = FP_OFF(buffer);
mov cx,[di+2] ; regs.c.x =
; ((chs.Cylinder & 0xff) << 8) + ((chs.Cylinder & 0x300) >> 2) +
; chs.Sector;
; that was easy ;-)
mov dh,[di+1] ; regs.d.b.h = chs.Head;
; regs.es = FP_SEG(buffer);
int 0x13
ret
;****** PRINT
; prints text after call to this function.
print_1char:
xor bx, bx ; video page 0
mov ah, 0x0E ; else print it
int 0x10 ; via TTY mode
print: pop si ; this is the first character
print1: lodsb ; get token
push si ; stack up potential return address
cmp al, 0 ; end of string?
jne print_1char ; until done
ret ; and jump to it
times 0x1fe-$+$$ db 0
db 0x55,0xaa

View File

@@ -1,663 +0,0 @@
; EXT2.ASM
; EXT2 Boot Sector
; Copyright (c) 2002, 2003 Brian Palmer
; [bp-0x04] Here we will store the number of sectors per track
; [bp-0x08] Here we will store the number of heads
; [bp-0x0c] Here we will store the size of the disk as the BIOS reports in CHS form
; [bp-0x10] Here we will store the number of LBA sectors read
SECTORS_PER_TRACK equ 0x04
NUMBER_OF_HEADS equ 0x08
BIOS_CHS_DRIVE_SIZE equ 0x0C
LBA_SECTORS_READ equ 0x10
EXT2_ROOT_INO equ 2
EXT2_S_IFMT equ 0f0h
EXT2_S_IFREG equ 080h
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
BootDrive db 0x80
;BootPartition db 0 ; Moved to end of boot sector to have a standard format across all boot sectors
;SectorsPerTrack db 63 ; Moved to [bp-SECTORS_PER_TRACK]
;NumberOfHeads dw 16 ; Moved to [bp-NUMBER_OF_HEADS]
;BiosCHSDriveSize dd (1024 * 1024 * 63) ; Moved to [bp-BIOS_CHS_DRIVE_SIZE]
;LBASectorsRead dd 0 ; Moved to [bp-LBA_SECTORS_READ]
Ext2VolumeStartSector dd 263088 ; Start sector of the ext2 volume
Ext2BlockSize dd 2 ; Block size in sectors
Ext2BlockSizeInBytes dd 1024 ; Block size in bytes
Ext2PointersPerBlock dd 256 ; Number of block pointers that can be contained in one block
Ext2GroupDescPerBlock dd 32 ; Number of group descriptors per block
Ext2FirstDataBlock dd 1 ; First data block (1 for 1024-byte blocks, 0 for bigger sizes)
Ext2InodesPerGroup dd 2048 ; Number of inodes per group
Ext2InodesPerBlock dd 8 ; Number of inodes per block
Ext2ReadEntireFileLoadSegment:
dw 0
Ext2InodeIndirectPointer:
dd 0
Ext2InodeDoubleIndirectPointer:
dd 0
Ext2BlocksLeftToRead:
dd 0
main:
xor ax,ax ; Setup segment registers
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
mov ss,ax ; Make SS correct
mov bp,7c00h
mov sp,7b00h ; Setup a stack
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne GetDriveParameters
mov [BYTE bp+BootDrive],dl ; Save the boot drive
GetDriveParameters:
mov ah,08h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
mov [BYTE bp-NUMBER_OF_HEADS],eax ; Save number of heads
mov [BYTE bp-SECTORS_PER_TRACK],ecx ; Save number of sectors per track
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BYTE bp-BIOS_CHS_DRIVE_SIZE],eax
LoadExtraBootCode:
; First we have to load our extra boot code at
; sector 1 into memory at [0000:7e00h]
;mov eax,01h
xor eax,eax
inc eax ; Read logical sector 1, EAX now = 1
mov cx,1 ; Read one sector
mov bx,7e00h ; Read sector to [0000:7e00h]
call ReadSectors
jmp LoadRootDirectory
; Reads ext2 group descriptor into [7000:8000]
; We read it to this arbitrary location so
; it will not cross a 64k boundary
; EAX has group descriptor number to read
Ext2ReadGroupDesc:
shl eax,5 ; Group = (Group * sizeof(GROUP_DESCRIPTOR) /* 32 */)
xor edx,edx
div DWORD [BYTE bp+Ext2GroupDescPerBlock] ; Group = (Group / Ext2GroupDescPerBlock)
add eax,DWORD [BYTE bp+Ext2FirstDataBlock] ; Group = Group + Ext2FirstDataBlock + 1
inc eax ; EAX now has the group descriptor block number
; EDX now has the group descriptor offset in the block
; Adjust the read offset so that the
; group descriptor is read to 7000:8000
mov ebx,78000h
sub ebx,edx
shr ebx,4
mov es,bx
xor bx,bx
; Everything is now setup to call Ext2ReadBlock
; Instead of using the call instruction we will
; just put Ext2ReadBlock right after this routine
; Reads ext2 block into [ES:BX]
; EAX has logical block number to read
Ext2ReadBlock:
mov ecx,DWORD [BYTE bp+Ext2BlockSize]
mul ecx
jmp ReadSectors
; Reads ext2 inode into [6000:8000]
; We read it to this arbitrary location so
; it will not cross a 64k boundary
; EAX has inode number to read
Ext2ReadInode:
dec eax ; Inode = Inode - 1
xor edx,edx
div DWORD [BYTE bp+Ext2InodesPerGroup] ; Inode = (Inode / Ext2InodesPerGroup)
mov ebx,eax ; EBX now has the inode group number
mov eax,edx
xor edx,edx
div DWORD [BYTE bp+Ext2InodesPerBlock] ; Inode = (Inode / Ext2InodesPerBlock)
shl edx,7 ; FIXME: InodeOffset *= 128 (make the array index a byte offset)
; EAX now has the inode offset block number from inode table
; EDX now has the inode offset in the block
; Save the inode values and put the group
; descriptor number in EAX and read it in
push edx
push eax
mov eax,ebx
call Ext2ReadGroupDesc
; Group descriptor has been read, now
; grab the inode table block number from it
push WORD 7000h
pop es
mov di,8008h
pop eax ; Restore inode offset block number from stack
add eax,DWORD [es:di] ; Add the inode table start block
; Adjust the read offset so that the
; inode we want is read to 6000:8000
pop edx ; Restore inode offset in the block from stack
mov ebx,68000h
sub ebx,edx
shr ebx,4
mov es,bx
xor bx,bx
call Ext2ReadBlock
ret
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
add eax,DWORD [BYTE bp+Ext2VolumeStartSector] ; Add the start of the volume
cmp eax,DWORD [BYTE bp-BIOS_CHS_DRIVE_SIZE] ; Check if they are reading a sector outside CHS range
jae ReadSectorsLBA ; Yes - go to the LBA routine
; If at all possible we want to use LBA routines because
; They are optimized to read more than 1 sector per read
pushad ; Save logical sector number & sector count
CheckInt13hExtensions: ; Now check if this computer supports extended reads
mov ah,0x41 ; AH = 41h
mov bx,0x55aa ; BX = 55AAh
mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
jc ReadSectorsCHS ; CF set on error (extensions not supported)
cmp bx,0xaa55 ; BX = AA55h if installed
jne ReadSectorsCHS
test cl,1 ; CX = API subset support bitmap
jz ReadSectorsCHS ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
popad ; Restore sector count & logical sector number
ReadSectorsLBA:
pushad ; Save logical sector number & sector count
cmp cx,byte 64 ; Since the LBA calls only support 0x7F sectors at a time we will limit ourselves to 64
jbe ReadSectorsSetupDiskAddressPacket ; If we are reading less than 65 sectors then just do the read
mov cx,64 ; Otherwise read only 64 sectors on this loop iteration
ReadSectorsSetupDiskAddressPacket:
mov [BYTE bp-LBA_SECTORS_READ],cx
mov WORD [BYTE bp-LBA_SECTORS_READ+2],0
o32 push byte 0
push eax ; Put 64-bit logical block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push cx ; Set transfer count
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc PrintDiskError ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
push bx
mov ebx,DWORD [BYTE bp-LBA_SECTORS_READ]
add eax,ebx ; Increment sector to read
shl ebx,5
mov dx,es
add dx,bx ; Setup read buffer for next sector
mov es,dx
pop bx
sub cx,[BYTE bp-LBA_SECTORS_READ]
jnz ReadSectorsLBA ; Read next sector
ret
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectorsCHS:
popad ; Get logical sector number & sector count off stack
ReadSectorsCHSLoop:
pushad
xor edx,edx
mov ecx,DWORD [BYTE bp-SECTORS_PER_TRACK]
div ecx ; Divide logical by SectorsPerTrack
inc dl ; Sectors numbering starts at 1 not 0
mov cl,dl ; Sector in CL
mov edx,eax
shr edx,16
div WORD [BYTE bp-NUMBER_OF_HEADS] ; Divide logical by number of heads
mov dh,dl ; Head in DH
mov dl,[BYTE bp+BootDrive] ; Drive number in DL
mov ch,al ; Cylinder in CX
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc PrintDiskError ; If the read failed then abort
popad
inc eax ; Increment Sector to Read
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop ReadSectorsCHSLoop ; Read next sector
ret
; Displays a disk error message
; And reboots
PrintDiskError:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
call PutCharsCallBios
jmp short PutChars
PutCharsCallBios:
mov ah,0eh
mov bx,07h
int 10h
retn
Done:
mov al,0dh
call PutCharsCallBios
mov al,0ah
call PutCharsCallBios
retn
msgDiskError db 'Disk error',0
; Sorry, need the space...
;msgAnyKey db 'Press any key to restart',0
msgAnyKey db 'Press any key',0
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition db 0
dw 0aa55h ; BootSector signature
; End of bootsector
;
; Now starts the extra boot code that we will store
; at sector 1 on a EXT2 volume
LoadRootDirectory:
mov eax,EXT2_ROOT_INO ; Put the root directory inode number in EAX
call Ext2ReadInode ; Read in the inode
; Point ES:DI to the inode structure at 6000:8000
push WORD 6000h
pop es
mov di,8000h
push di
push es ; Save these for later
; Get root directory size from inode structure
mov eax,DWORD [es:di+4]
push eax
; Now that the inode has been read in load
; the root directory file data to 0000:8000
call Ext2ReadEntireFile
; Since the root directory was loaded to 0000:8000
; then add 8000h to the root directory's size
pop eax
mov edx,8000h ; Set EDX to the current offset in the root directory
add eax,edx ; Initially add 8000h to the size of the root directory
SearchRootDirectory:
push edx ; Save current offset in root directory
push eax ; Save the size of the root directory
; Now we have to convert the current offset
; in the root directory to a SEGMENT:OFFSET pair
mov eax,edx
xor edx,edx
mov ecx,16
div ecx ; Now AX:DX has segment & offset
mov es,ax
mov di,dx
push di ; Save the start of the directory entry
add di,byte 8 ; Add the offset to the filename
mov si,filename
mov cl,11
rep cmpsb ; Compare the file names
pop di
pop eax
pop edx
jz FoundFile
; Nope, didn't find it in this entry, keep looking
movzx ecx,WORD [es:di+4]
add edx,ecx
; Check to see if we have reached the
; end of the root directory
cmp edx,eax
jb SearchRootDirectory
jmp PrintFileNotFound
FoundFile:
mov eax,[es:di] ; Get inode number from directory entry
call Ext2ReadInode ; Read in the inode
; Point ES:DI to the inode structure at 6000:8000
pop es
pop di ; These were saved earlier
mov cx,[es:di] ; Get the file mode so we can make sure it's a regular file
and ch,EXT2_S_IFMT ; Mask off everything but the file type
cmp ch,EXT2_S_IFREG ; Make sure it's a regular file
je LoadFreeLoader
jmp PrintRegFileError
LoadFreeLoader:
mov si,msgLoading ; "Loading FreeLoader..." message
call PutChars ; Display it
call Ext2ReadEntireFile ; Read freeldr.sys to 0000:8000
mov dl,[BYTE bp+BootDrive]
mov dh,[BYTE bp+BootPartition]
push byte 0 ; We loaded at 0000:8000
push WORD 8000h ; We will do a far return to 0000:8000h
retf ; Transfer control to FreeLoader
; Reads ext2 file data into [0000:8000]
; This function assumes that the file's
; inode has been read in to 6000:8000 *and*
; ES:DI points to 6000:8000
; This will load all the blocks up to
; and including the double-indirect pointers.
; This should be sufficient because it
; allows for ~64MB which is much bigger
; than we need for a boot loader.
Ext2ReadEntireFile:
; Reset the load segment
mov WORD [BYTE bp+Ext2ReadEntireFileLoadSegment],800h
; Now we must calculate how
; many blocks to read in
; We will do this by rounding the
; file size up to the next block
; size and then dividing by the block size
mov eax,DWORD [BYTE bp+Ext2BlockSizeInBytes] ; Get the block size in bytes
push eax
dec eax ; Ext2BlockSizeInBytes -= 1
add eax,DWORD [es:di+4] ; Add the file size
xor edx,edx
pop ecx ; Divide by the block size in bytes
div ecx ; EAX now contains the number of blocks to load
push eax
; Make sure the file size isn't zero
cmp eax,byte 0
jnz Ext2ReadEntireFile2
jmp PrintFileSizeError
Ext2ReadEntireFile2:
; Save the indirect & double indirect pointers
mov edx,DWORD [es:di+0x58] ; Get indirect pointer
mov [BYTE bp+Ext2InodeIndirectPointer],edx ; Save indirect pointer
mov edx,DWORD [es:di+0x5c] ; Get double indirect pointer
mov [BYTE bp+Ext2InodeDoubleIndirectPointer],edx ; Save double indirect pointer
; Now copy the direct pointers to 7000:0000
; so that we can call Ext2ReadDirectBlocks
push ds ; Save DS
push es
push WORD 7000h
pop es
pop ds
mov si,8028h
xor di,di ; DS:SI = 6000:8028 ES:DI = 7000:0000
mov cx,24 ; Moving 24 words of data
rep movsw
pop ds ; Restore DS
; Now we have all the block pointers in the
; right location so read them in
pop eax ; Restore the total number of blocks in this file
xor ecx,ecx ; Set the max count of blocks to read to 12
mov cl,12 ; which is the number of direct block pointers in the inode
call Ext2ReadDirectBlockList
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jz Ext2ReadEntireFileDone
; Now we have read all the direct blocks in
; the inode. So now we have to read the indirect
; block and read all it's direct blocks
push eax ; Save the total block count
mov eax,DWORD [BYTE bp+Ext2InodeIndirectPointer] ; Get the indirect block pointer
push WORD 7000h
pop es
xor bx,bx ; Set the load address to 7000:0000
call Ext2ReadBlock ; Read the block
; Now we have all the block pointers from the
; indirect block in the right location so read them in
pop eax ; Restore the total block count
mov ecx,DWORD [BYTE bp+Ext2PointersPerBlock] ; Get the number of block pointers that one block contains
call Ext2ReadDirectBlockList
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jz Ext2ReadEntireFileDone
; Now we have read all the direct blocks from
; the inode's indirect block pointer. So now
; we have to read the double indirect block
; and read all it's indirect blocks
; (whew, it's a good thing I don't support triple indirect blocks)
mov [BYTE bp+Ext2BlocksLeftToRead],eax ; Save the total block count
mov eax,DWORD [BYTE bp+Ext2InodeDoubleIndirectPointer] ; Get the double indirect block pointer
push WORD 7800h
pop es
push es ; Save an extra copy of this value on the stack
xor bx,bx ; Set the load address to 7000:8000
call Ext2ReadBlock ; Read the block
pop es ; Put 7800h into ES (saved on the stack already)
xor di,di
Ext2ReadIndirectBlock:
mov eax,DWORD [es:di] ; Get indirect block pointer
add di,BYTE 4 ; Update DI for next array index
push es
push di
push WORD 7000h
pop es
xor bx,bx ; Set the load address to 7000:0000
call Ext2ReadBlock ; Read the indirect block
; Now we have all the block pointers from the
; indirect block in the right location so read them in
mov eax,DWORD [BYTE bp+Ext2BlocksLeftToRead] ; Restore the total block count
mov ecx,DWORD [BYTE bp+Ext2PointersPerBlock] ; Get the number of block pointers that one block contains
call Ext2ReadDirectBlockList
mov [BYTE bp+Ext2BlocksLeftToRead],eax ; Save the total block count
pop di
pop es
; Check to see if we actually have
; blocks left to read
cmp eax,byte 0
jnz Ext2ReadIndirectBlock
Ext2ReadEntireFileDone:
ret
; Reads a maximum number of blocks
; from an array at 7000:0000
; and updates the total count
; ECX contains the max number of blocks to read
; EAX contains the number of blocks left to read
; On return:
; EAX contians the new number of blocks left to read
Ext2ReadDirectBlockList:
cmp eax,ecx ; Compare it to the maximum number of blocks to read
ja CallExt2ReadDirectBlocks ; If it will take more blocks then just read all of the blocks
mov cx,ax ; Otherwise adjust the block count accordingly
CallExt2ReadDirectBlocks:
sub eax,ecx ; Subtract the number of blocks being read from the total count
push eax ; Save the new total count
call Ext2ReadDirectBlocks
pop eax ; Restore the total count
ret
; Reads a specified number of blocks
; from an array at 7000:0000
; CX contains the number of blocks to read
Ext2ReadDirectBlocks:
push WORD 7000h
pop es
xor di,di ; Set ES:DI = 7000:0000
Ext2ReadDirectBlocksLoop:
mov eax,[es:di] ; Get direct block pointer from array
add di,BYTE 4 ; Update DI for next array index
push cx ; Save number of direct blocks left
push es ; Save array segment
push di ; Save array offset
mov es,[BYTE bp+Ext2ReadEntireFileLoadSegment]
xor bx,bx ; Setup load address for next read
call Ext2ReadBlock ; Read the block (this updates ES for the next read)
mov [BYTE bp+Ext2ReadEntireFileLoadSegment],es ; Save updated ES
pop di ; Restore the array offset
pop es ; Restore the array segment
pop cx ; Restore the number of blocks left
loop Ext2ReadDirectBlocksLoop
; At this point all the direct blocks should
; be loaded and ES (Ext2ReadEntireFileLoadSegment)
; should be ready for the next read.
ret
; Displays a file not found error message
; And reboots
PrintFileNotFound:
mov si,msgFreeLdr ; FreeLdr not found message
jmp short DisplayItAndReboot
; Displays a file size is 0 error
; And reboots
PrintFileSizeError:
mov si,msgFileSize ; Error message
jmp short DisplayItAndReboot
; Displays a file is not a regular file error
; And reboots
PrintRegFileError:
mov si,msgRegFile ; Error message
DisplayItAndReboot:
call PutChars ; Display it
jmp Reboot
msgFreeLdr db 'freeldr.sys not found',0
msgFileSize db 'File size is 0',0
msgRegFile db 'freeldr.sys isnt a regular file',0
filename db 'freeldr.sys'
msgLoading db 'Loading FreeLoader...',0
times 1022-($-$$) db 0 ; Pad to 1022 bytes
dw 0aa55h ; BootSector signature

View File

@@ -1,402 +0,0 @@
; FAT.ASM
; FAT12/16 Boot Sector
; Copyright (c) 1998, 2001, 2002 Brian Palmer
; This is a FAT12/16 file system boot sector
; that searches the entire root directory
; for the file freeldr.sys and loads it into
; memory.
;
; The stack is set to 0000:7BF2 so that the first
; WORD pushed will be placed at 0000:7BF0
;
; The DWORD at 0000:7BFC or BP-04h is the logical
; sector number of the start of the data area.
;
; The DWORD at 0000:7BF8 or BP-08h is the total
; sector count of the boot drive as reported by
; the computers bios.
;
; The WORD at 0000:7BF6 or BP-0ah is the offset
; of the ReadSectors function in the boot sector.
;
; The WORD at 0000:7BF4 or BP-0ch is the offset
; of the ReadCluster function in the boot sector.
;
; The WORD at 0000:7BF2 or BP-0eh is the offset
; of the PutChars function in the boot sector.
;
; When it locates freeldr.sys on the disk it will
; load the first sector of the file to 0000:8000
; With the help of this sector we should be able
; to load the entire file off the disk, no matter
; how fragmented it is.
;
; We load the entire FAT table into memory at
; 7000:0000. This improves the speed of floppy disk
; boots dramatically.
BootSectorStackTop equ 0x7bf2
DataAreaStartHigh equ 0x2
DataAreaStartLow equ 0x4
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow equ 0x8
BiosCHSDriveSize equ 0x8
ReadSectorsOffset equ 0xa
ReadClusterOffset equ 0xc
PutCharsOffset equ 0xe
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'FrLdr1.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 224
TotalSectors dw 2880
MediaDescriptor db 0f0h
SectorsPerFat dw 9
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
BootDrive db 0
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT12 '
main:
xor ax,ax
mov ss,ax
mov bp,7c00h
mov sp,BootSectorStackTop ; Setup a stack
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne GetDriveParameters
mov [BYTE bp+BootDrive],dl ; Save the boot drive
GetDriveParameters:
mov ah,08h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BYTE bp-BiosCHSDriveSize],eax
; Now we must find our way to the first sector of the root directory
xor ax,ax
xor cx,cx
mov al,[BYTE bp+NumberOfFats] ; Number of fats
mul WORD [BYTE bp+SectorsPerFat] ; Times sectors per fat
add ax,WORD [BYTE bp+HiddenSectors]
adc dx,WORD [BYTE bp+HiddenSectors+2] ; Add the number of hidden sectors
add ax,WORD [BYTE bp+ReservedSectors] ; Add the number of reserved sectors
adc dx,cx ; Add carry bit
mov WORD [BYTE bp-DataAreaStartLow],ax ; Save the starting sector of the root directory
mov WORD [BYTE bp-DataAreaStartHigh],dx ; Save it in the first 4 bytes before the boot sector
mov si,WORD [BYTE bp+MaxRootEntries] ; Get number of root dir entries in SI
pusha ; Save 32-bit logical start sector of root dir
; DX:AX now has the number of the starting sector of the root directory
; Now calculate the size of the root directory
xor dx,dx
mov ax,0020h ; Size of dir entry
mul si ; Times the number of entries
mov bx,[BYTE bp+BytesPerSector]
add ax,bx
dec ax
div bx ; Divided by the size of a sector
; AX now has the number of root directory sectors
add [BYTE bp-DataAreaStartLow],ax ; Add the number of sectors of the root directory to our other value
adc [BYTE bp-DataAreaStartHigh],cx ; Now the first 4 bytes before the boot sector contain the starting sector of the data area
popa ; Restore root dir logical sector start to DX:AX
LoadRootDirSector:
mov bx,7e0h ; We will load the root directory sector
mov es,bx ; Right after the boot sector in memory
xor bx,bx ; We will load it to [0000:7e00h]
xor cx,cx ; Zero out CX
inc cx ; Now increment it to 1, we are reading one sector
xor di,di ; Zero out di
push es ; Save ES because it will get incremented by 20h
call ReadSectors ; Read the first sector of the root directory
pop es ; Restore ES (ES:DI = 07E0:0000)
SearchRootDirSector:
cmp [es:di],ch ; If the first byte of the directory entry is zero then we have
jz ErrBoot ; reached the end of the directory and FREELDR.SYS is not here so reboot
pusha ; Save all registers
mov cl,0xb ; Put 11 in cl (length of filename in directory entry)
mov si,filename ; Put offset of filename string in DS:SI
repe cmpsb ; Compare this directory entry against 'FREELDR SYS'
popa ; Restore all the registers
jz FoundFreeLoader ; If we found it then jump
dec si ; SI holds MaxRootEntries, subtract one
jz ErrBoot ; If we are out of root dir entries then reboot
add di,BYTE +0x20 ; Increment DI by the size of a directory entry
cmp di,0200h ; Compare DI to 512 (DI has offset to next dir entry, make sure we haven't gone over one sector)
jc SearchRootDirSector ; If DI is less than 512 loop again
jmp short LoadRootDirSector ; Didn't find FREELDR.SYS in this directory sector, try again
FoundFreeLoader:
; We found freeldr.sys on the disk
; so we need to load the first 512
; bytes of it to 0000:8000
; ES:DI has dir entry (ES:DI == 07E0:XXXX)
mov ax,WORD [es:di+1ah] ; Get start cluster
push ax ; Save start cluster
push WORD 800h ; Put 800h on the stack and load it
pop es ; Into ES so that we load the cluster at 0000:8000
call ReadCluster ; Read the cluster
pop ax ; Restore start cluster of FreeLoader
; Save the addresses of needed functions so
; the helper code will know where to call them.
mov WORD [BYTE bp-ReadSectorsOffset],ReadSectors ; Save the address of ReadSectors
mov WORD [BYTE bp-ReadClusterOffset],ReadCluster ; Save the address of ReadCluster
mov WORD [BYTE bp-PutCharsOffset],PutChars ; Save the address of PutChars
; Now AX has start cluster of FreeLoader and we
; have loaded the helper code in the first 512 bytes
; of FreeLoader to 0000:8000. Now transfer control
; to the helper code. Skip the first three bytes
; because they contain a jump instruction to skip
; over the helper code in the FreeLoader image.
;jmp 0000:8003h
jmp 8003h
; Displays an error message
; And reboots
ErrBoot:
mov si,msgFreeLdr ; FreeLdr not found message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
mov ah,0eh
mov bx,07h
int 10h
jmp short PutChars
Done:
retn
; Displays a bad boot message
; And reboots
BadBoot:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
jmp short Reboot
; Reads cluster number in AX into [ES:0000]
ReadCluster:
; StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors;
dec ax ; Adjust start cluster by 2
dec ax ; Because the data area starts on cluster 2
xor ch,ch
mov cl,BYTE [BYTE bp+SectsPerCluster]
mul cx ; Times sectors per cluster
add ax,[BYTE bp-DataAreaStartLow] ; Add start of data area
adc dx,[BYTE bp-DataAreaStartHigh] ; Now we have DX:AX with the logical start sector of OSLOADER.SYS
xor bx,bx ; We will load it to [ES:0000], ES loaded before function call
;mov cl,BYTE [BYTE bp+SectsPerCluster]; Sectors per cluster still in CX
;call ReadSectors
;ret
; Reads logical sectors into [ES:BX]
; DX:AX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
; We can't just check if the start sector is
; in the BIOS CHS range. We have to check if
; the start sector + length is in that range.
pusha
dec cx
add ax,cx
adc dx,byte 0
cmp dx,WORD [BYTE bp-BiosCHSDriveSizeHigh] ; Check if they are reading a sector within CHS range
ja ReadSectorsLBA ; No - go to the LBA routine
jb ReadSectorsCHS ; Yes - go to the old CHS routine
cmp ax,WORD [BYTE bp-BiosCHSDriveSizeLow] ; Check if they are reading a sector within CHS range
jbe ReadSectorsCHS ; Yes - go to the old CHS routine
ReadSectorsLBA:
popa
ReadSectorsLBALoop:
pusha ; Save logical sector number & sector count
o32 push byte 0
push dx ; Put 64-bit logical
push ax ; block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push byte 1 ; Set transfer count to 1 sector
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
; We are so totally out of space here that I am forced to
; comment out this very beautifully written piece of code
; It would have been nice to have had this check...
;CheckInt13hExtensions: ; Now make sure this computer supports extended reads
; mov ah,0x41 ; AH = 41h
; mov bx,0x55aa ; BX = 55AAh
; mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
; int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
; jc PrintDiskError ; CF set on error (extensions not supported)
; cmp bx,0xaa55 ; BX = AA55h if installed
; jne PrintDiskError
; test cl,1 ; CX = API subset support bitmap
; jz PrintDiskError ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
; Good, we're here so the computer supports LBA disk access
; So finish the extended read
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc BadBoot ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popa ; Restore sector count & logical sector number
inc ax ; Increment Sector to Read
adc dx,byte 0
push bx
mov bx,es
add bx,byte 20h ; Increment read buffer for next sector
mov es,bx
pop bx
loop ReadSectorsLBALoop ; Read next sector
ret
; Reads logical sectors into [ES:BX]
; DX:AX has logical sector number to read
; CX has number of sectors to read
; CarryFlag set on error
ReadSectorsCHS:
popa
ReadSectorsCHSLoop:
pusha
xchg ax,cx
xchg ax,dx
xor dx,dx
div WORD [BYTE bp+SectorsPerTrack]
xchg ax,cx
div WORD [BYTE bp+SectorsPerTrack] ; Divide logical by SectorsPerTrack
inc dx ; Sectors numbering starts at 1 not 0
xchg cx,dx
div WORD [BYTE bp+NumberOfHeads] ; Number of heads
mov dh,dl ; Head to DH, drive to DL
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ch,al ; Cylinder in CX
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc BadBoot
popa
inc ax ;Increment Sector to Read
jnz NoCarryCHS
inc dx
NoCarryCHS:
push bx
mov bx,es
add bx,byte 20h
mov es,bx
pop bx
; Increment read buffer for next sector
loop ReadSectorsCHSLoop ; Read next sector
ret
msgDiskError db 'Disk error',0dh,0ah,0
msgFreeLdr db 'freeldr.sys not found',0dh,0ah,0
; Sorry, need the space...
;msgAnyKey db 'Press any key to restart',0dh,0ah,0
msgAnyKey db 'Press any key',0dh,0ah,0
filename db 'FREELDR SYS'
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition:
db 0
BootSignature:
dw 0aa55h ; BootSector signature

View File

@@ -1,505 +0,0 @@
; FAT32.ASM
; FAT32 Boot Sector
; Copyright (c) 1998, 2000, 2001, 2002 Brian Palmer
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'FrLdr1.0'
BytesPerSector dw 512
SectsPerCluster db 0
ReservedSectors dw 32
NumberOfFats db 2
MaxRootEntries dw 0 ; Always zero for FAT32 volumes
TotalSectors dw 0 ; Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ; Always zero for FAT32 volumes
SectorsPerTrack dw 0
NumberOfHeads dw 0
HiddenSectors dd 0
TotalSectorsBig dd 0
; FAT32 Inserted Info
SectorsPerFatBig dd 0
ExtendedFlags dw 0
FSVersion dw 0
RootDirStartCluster dd 0
FSInfoSector dw 0
BackupBootSector dw 6
Reserved1 times 12 db 0
; End FAT32 Inserted Info
BootDrive db 0
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT32 '
main:
xor ax,ax ; Setup segment registers
mov ds,ax ; Make DS correct
mov es,ax ; Make ES correct
mov ss,ax ; Make SS correct
mov bp,7c00h
mov sp,7c00h ; Setup a stack
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
jne CheckSectorsPerFat
mov [BYTE bp+BootDrive],dl ; Save the boot drive
CheckSectorsPerFat:
cmp WORD [BYTE bp+SectorsPerFat],byte 0x00 ; Check the old 16-bit value of SectorsPerFat
jnz CheckFailed ; If it is non-zero then exit with an error
CheckTotalSectors: ; Check the old 16-bit value of TotalSectors & MaxRootEntries
cmp DWORD [BYTE bp+MaxRootEntries],byte 0x00; by comparing the DWORD at offset MaxRootEntries to zero
jnz CheckFailed ; If it is non-zero then exit with an error
CheckFileSystemVersion:
cmp WORD [BYTE bp+FSVersion],byte 0x00 ; Check the file system version word
jna GetDriveParameters ; It is zero, so continue
CheckFailed:
jmp PrintFileSystemError ; If it is not zero then exit with an error
GetDriveParameters:
mov ax,0800h
mov dl,[BYTE bp+BootDrive] ; Get boot drive in dl
int 13h ; Request drive parameters from the bios
jnc CalcDriveSize ; If the call succeeded then calculate the drive size
; If we get here then the call to the BIOS failed
; so just set CHS equal to the maximum addressable
; size
mov cx,0ffffh
mov dh,cl
CalcDriveSize:
; Now that we have the drive geometry
; lets calculate the drive size
mov bl,ch ; Put the low 8-bits of the cylinder count into BL
mov bh,cl ; Put the high 2-bits in BH
shr bh,6 ; Shift them into position, now BX contains the cylinder count
and cl,3fh ; Mask off cylinder bits from sector count
; CL now contains sectors per track and DH contains head count
movzx eax,dh ; Move the heads into EAX
movzx ebx,bx ; Move the cylinders into EBX
movzx ecx,cl ; Move the sectors per track into ECX
inc eax ; Make it one based because the bios returns it zero based
inc ebx ; Make the cylinder count one based also
mul ecx ; Multiply heads with the sectors per track, result in edx:eax
mul ebx ; Multiply the cylinders with (heads * sectors) [stored in edx:eax already]
; We now have the total number of sectors as reported
; by the bios in eax, so store it in our variable
mov [BiosCHSDriveSize],eax
LoadExtraBootCode:
; First we have to load our extra boot code at
; sector 14 into memory at [0000:7e00h]
mov eax,0eh
add eax,DWORD [BYTE bp+HiddenSectors] ; Add the number of hidden sectors
mov cx,1
xor bx,bx
mov es,bx ; Read sector to [0000:7e00h]
mov bx,7e00h
call ReadSectors
jmp StartSearch
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
cmp eax,DWORD [BiosCHSDriveSize] ; Check if they are reading a sector outside CHS range
jae ReadSectorsLBA ; Yes - go to the LBA routine
; If at all possible we want to use LBA routines because
; They are optimized to read more than 1 sector per read
pushad ; Save logical sector number & sector count
CheckInt13hExtensions: ; Now check if this computer supports extended reads
mov ah,0x41 ; AH = 41h
mov bx,0x55aa ; BX = 55AAh
mov dl,[BYTE bp+BootDrive] ; DL = drive (80h-FFh)
int 13h ; IBM/MS INT 13 Extensions - INSTALLATION CHECK
jc ReadSectorsCHS ; CF set on error (extensions not supported)
cmp bx,0xaa55 ; BX = AA55h if installed
jne ReadSectorsCHS
test cl,1 ; CX = API subset support bitmap
jz ReadSectorsCHS ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
popad ; Restore sector count & logical sector number
ReadSectorsLBA:
pushad ; Save logical sector number & sector count
cmp cx,64 ; Since the LBA calls only support 0x7F sectors at a time we will limit ourselves to 64
jbe ReadSectorsSetupDiskAddressPacket ; If we are reading less than 65 sectors then just do the read
mov cx,64 ; Otherwise read only 64 sectors on this loop iteration
ReadSectorsSetupDiskAddressPacket:
mov [LBASectorsRead],cx
o32 push byte 0
push eax ; Put 64-bit logical block address on stack
push es ; Put transfer segment on stack
push bx ; Put transfer offset on stack
push cx ; Set transfer count
push byte 0x10 ; Set size of packet to 10h
mov si,sp ; Setup disk address packet on stack
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS
jc PrintDiskError ; If the read failed then abort
add sp,byte 0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
push bx
mov ebx,DWORD [LBASectorsRead]
add eax,ebx ; Increment sector to read
shl ebx,5
mov dx,es
add dx,bx ; Setup read buffer for next sector
mov es,dx
pop bx
sub cx,[LBASectorsRead]
jnz ReadSectorsLBA ; Read next sector
ret
LBASectorsRead:
dd 0
; Reads logical sectors into [ES:BX]
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectorsCHS:
popad ; Get logical sector number & sector count off stack
ReadSectorsCHSLoop:
pushad
xor edx,edx
movzx ecx,WORD [BYTE bp+SectorsPerTrack]
div ecx ; Divide logical by SectorsPerTrack
inc dl ; Sectors numbering starts at 1 not 0
mov cl,dl ; Sector in CL
mov edx,eax
shr edx,16
div WORD [BYTE bp+NumberOfHeads] ; Divide logical by number of heads
mov dh,dl ; Head in DH
mov dl,[BYTE bp+BootDrive] ; Drive number in DL
mov ch,al ; Cylinder in CX
ror ah,1 ; Low 8 bits of cylinder in CH, high 2 bits
ror ah,1 ; in CL shifted to bits 6 & 7
or cl,ah ; Or with sector number
mov ax,0201h
int 13h ; DISK - READ SECTORS INTO MEMORY
; AL = number of sectors to read, CH = track, CL = sector
; DH = head, DL = drive, ES:BX -> buffer to fill
; Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read
jc PrintDiskError ; If the read failed then abort
popad
inc eax ; Increment Sector to Read
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop ReadSectorsCHSLoop ; Read next sector
ret
; Displays a disk error message
; And reboots
PrintDiskError:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
jmp Reboot
; Displays a file system error message
; And reboots
PrintFileSystemError:
mov si,msgFileSystemError ; FreeLdr not found message
call PutChars ; Display it
Reboot:
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
xor ax,ax
int 16h ; Wait for a keypress
int 19h ; Reboot
PutChars:
lodsb
or al,al
jz short Done
mov ah,0eh
mov bx,07h
int 10h
jmp short PutChars
Done:
retn
BiosCHSDriveSize dd 0
msgDiskError db 'Disk error',0dh,0ah,0
msgFileSystemError db 'File system error',0dh,0ah,0
msgAnyKey db 'Press any key to restart',0dh,0ah,0
times 509-($-$$) db 0 ; Pad to 509 bytes
BootPartition:
db 0
BootSignature:
dw 0aa55h ; BootSector signature
; End of bootsector
;
; Now starts the extra boot code that we will store
; at sector 14 on a FAT32 volume
;
; To remain multi-boot compatible with other operating
; systems we must not overwrite anything other than
; the bootsector which means we will have to use
; a different sector like 14 to store our extra boot code
StartSearch:
; Now we must get the first cluster of the root directory
mov eax,DWORD [BYTE bp+RootDirStartCluster]
cmp eax,0ffffff8h ; Check to see if this is the last cluster in the chain
jb ContinueSearch ; If not continue, if so then we didn't find freeldr.sys
jmp PrintFileNotFound
ContinueSearch:
mov bx,2000h
mov es,bx ; Read cluster to [2000:0000h]
call ReadCluster ; Read the cluster
; Now we have to find our way through the root directory to
; The OSLOADER.SYS file
xor bx,bx
mov bl,[BYTE bp+SectsPerCluster]
shl bx,4 ; BX = BX * 512 / 32
mov ax,2000h ; We loaded at 2000:0000
mov es,ax
xor di,di
mov si,filename
mov cx,11
rep cmpsb ; Compare filenames
jz FoundFile ; If same we found it
dec bx
jnz FindFile
jmp PrintFileNotFound
FindFile:
mov ax,es ; We didn't find it in the previous dir entry
add ax,2 ; So lets move to the next one
mov es,ax ; And search again
xor di,di
mov si,filename
mov cx,11
rep cmpsb ; Compare filenames
jz FoundFile ; If same we found it
dec bx ; Keep searching till we run out of dir entries
jnz FindFile ; Last entry?
; Get the next root dir cluster and try again until we run out of clusters
mov eax,DWORD [BYTE bp+RootDirStartCluster]
call GetFatEntry
mov [BYTE bp+RootDirStartCluster],eax
jmp StartSearch
FoundFile:
; Display "Loading FreeLoader..." message
mov si,msgLoading ; Loading message
call PutChars ; Display it
xor di,di ; ES:DI has dir entry
xor dx,dx
mov ax,WORD [es:di+14h] ; Get start cluster high word
shl eax,16
mov ax,WORD [es:di+1ah] ; Get start cluster low word
CheckStartCluster:
cmp eax,2 ; Check and see if the start cluster starts at cluster 2 or above
jnb CheckEndCluster ; If so then continue
jmp PrintFileSystemError ; If not exit with error
CheckEndCluster:
cmp eax,0ffffff8h ; Check and see if the start cluster is and end of cluster chain indicator
jb InitializeLoadSegment ; If not then continue
jmp PrintFileSystemError ; If so exit with error
InitializeLoadSegment:
mov bx,800h
mov es,bx
LoadFile:
cmp eax,0ffffff8h ; Check to see if this is the last cluster in the chain
jae LoadFileDone ; If so continue, if not then read the next one
push eax
xor bx,bx ; Load ROSLDR starting at 0000:8000h
push es
call ReadCluster
pop es
xor bx,bx
mov bl,[BYTE bp+SectsPerCluster]
shl bx,5 ; BX = BX * 512 / 16
mov ax,es ; Increment the load address by
add ax,bx ; The size of a cluster
mov es,ax
pop eax
push es
call GetFatEntry ; Get the next entry
pop es
jmp LoadFile ; Load the next cluster (if any)
LoadFileDone:
mov dl,[BYTE bp+BootDrive] ; Load boot drive into DL
mov dh,[BootPartition] ; Load boot partition into DH
xor ax,ax
push ax ; We loaded at 0000:8000
push WORD 8000h ; We will do a far return to 0000:8000h
retf ; Transfer control to ROSLDR
; Returns the FAT entry for a given cluster number
; On entry EAX has cluster number
; On return EAX has FAT entry for that cluster
GetFatEntry:
shl eax,2 ; EAX = EAX * 4 (since FAT32 entries are 4 bytes)
mov ecx,eax ; Save this for later in ECX
xor edx,edx
movzx ebx,WORD [BYTE bp+BytesPerSector]
push ebx
div ebx ; FAT Sector Number = EAX / BytesPerSector
movzx ebx,WORD [BYTE bp+ReservedSectors]
add eax,ebx ; FAT Sector Number += ReservedSectors
mov ebx,DWORD [BYTE bp+HiddenSectors]
add eax,ebx ; FAT Sector Number += HiddenSectors
pop ebx
dec ebx
and ecx,ebx ; FAT Offset Within Sector = ECX % BytesPerSector
; EAX holds logical FAT sector number
; ECX holds FAT entry offset
; Now we have to check the extended flags
; to see which FAT is the active one
; and use it, or if they are mirrored then
; no worries
movzx ebx,WORD [BYTE bp+ExtendedFlags] ; Get extended flags and put into ebx
and bx,0x0f ; Mask off upper 8 bits, now we have active fat in bl
jz LoadFatSector ; If fat is mirrored then skip fat calcs
cmp bl,[BYTE bp+NumberOfFats] ; Compare bl to number of fats
jb GetActiveFatOffset
jmp PrintFileSystemError ; If bl is bigger than numfats exit with error
GetActiveFatOffset:
push eax ; Save logical FAT sector number
mov eax,[BYTE bp+SectorsPerFatBig] ; Get the number of sectors occupied by one fat in eax
mul ebx ; Multiplied by the active FAT index we have in ebx
pop edx ; Get logical FAT sector number
add eax,edx ; Add the current FAT sector offset
LoadFatSector:
push ecx
; EAX holds logical FAT sector number
; Check if we have already loaded it
cmp eax,DWORD [FatSectorInCache]
je LoadFatSectorAlreadyLoaded
mov DWORD [FatSectorInCache],eax
mov bx,7000h
mov es,bx
xor bx,bx ; We will load it to [7000:0000h]
mov cx,1
call ReadSectors
LoadFatSectorAlreadyLoaded:
mov bx,7000h
mov es,bx
pop ecx
mov eax,DWORD [es:ecx] ; Get FAT entry
and eax,0fffffffh ; Mask off reserved bits
ret
FatSectorInCache: ; This variable tells us which sector we currently have in memory
dd 0ffffffffh ; There is no need to re-read the same sector if we don't have to
; Reads cluster number in EAX into [ES:0000]
ReadCluster:
; StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors;
dec eax
dec eax
xor edx,edx
movzx ebx,BYTE [BYTE bp+SectsPerCluster]
mul ebx
push eax
xor edx,edx
movzx eax,BYTE [BYTE bp+NumberOfFats]
mul DWORD [BYTE bp+SectorsPerFatBig]
movzx ebx,WORD [BYTE bp+ReservedSectors]
add eax,ebx
add eax,DWORD [BYTE bp+HiddenSectors]
pop ebx
add eax,ebx ; EAX now contains the logical sector number of the cluster
xor bx,bx ; We will load it to [ES:0000], ES loaded before function call
movzx cx,BYTE [BYTE bp+SectsPerCluster]
call ReadSectors
ret
; Displays a file not found error message
; And reboots
PrintFileNotFound:
mov si,msgFreeLdr ; FreeLdr not found message
call PutChars ; Display it
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
jmp Reboot
msgFreeLdr db 'freeldr.sys not found',0dh,0ah,0
filename db 'FREELDR SYS'
msgLoading db 'Loading FreeLoader...',0dh,0ah,0
times 1022-($-$$) db 0 ; Pad to 1022 bytes
dw 0aa55h ; BootSector signature

File diff suppressed because it is too large Load Diff

View File

@@ -1,466 +0,0 @@
;
; Win2k FAT32 Boot Sector
;
; Brian Palmer <brianp@sginet.com>
;
;
; The BP register is initialized to 0x7c00, the start of
; the boot sector. The SP register is initialized to
; 0x7bf4, leaving 12 bytes of data storage space above
; the stack.
;
; The DWORD that gets stored at 0x7bf4 is 0xffffffff ??
;
; The DWORD that gets stored at 0x7bf8 is the count of
; total sectors of the volume, calculated from the BPB.
;
; The DWORD that gets stored at 0x7bfc is the logical
; sector number of the start of the data area.
;
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'MSWIN4.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 0 ;512 - Always zero for FAT32 volumes
TotalSectors dw 0 ;2880 - Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ;9 - Always zero for FAT32 volumes
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
; FAT32 Inserted Info
SectorsPerFatBig dd 0
ExtendedFlags dw 0
FSVersion dw 0
RootDirStartCluster dd 0
FSInfoSector dw 0
BackupBootSector dw 6
Reserved1 times 12 db 0
; End FAT32 Inserted Info
BootDrive db 80h
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT32 '
main:
00007C5A 33C9 xor cx,cx
00007C5C 8ED1 mov ss,cx ; Setup the stack
00007C5E BCF47B mov sp,0x7bf4 ; Give us 12 bytes of space above the stack
00007C61 8EC1 mov es,cx
00007C63 8ED9 mov ds,cx
00007C65 BD007C mov bp,0x7c00
00007C68 884E02 mov [bp+0x2],cl ; Zero out the nop instruction?? (3rd byte of the boot sector)
00007C6B 8A5640 mov dl,[bp+BootDrive]
00007C6E B408 mov ah,0x8
00007C70 CD13 int 0x13 ; Int 13, func 8 - Get Drive Parameters
00007C72 7305 jnc drive_param_ok ; If no error jmp
drive_param_error:
00007C74 B9FFFF mov cx,0xffff ; We couldn't determine the drive parameters
00007C77 8AF1 mov dh,cl ; So just set the CHS to 0xff
drive_param_ok:
00007C79 660FB6C6 movzx eax,dh ; Store the number of heads in eax
00007C7D 40 inc ax ; Make it one-based because the bios returns it zero-based
00007C7E 660FB6D1 movzx edx,cl ; Store the sectors per track in edx
00007C82 80E23F and dl,0x3f ; Mask off the cylinder bits
00007C85 F7E2 mul dx ; Multiply the sectors per track with the heads, result in dx:ax
00007C87 86CD xchg cl,ch ; Switch the cylinder with the sectors
00007C89 C0ED06 shr ch,0x6 ; Move the top two cylinder bits down where they should be
00007C8C 41 inc cx ; Make it one-based because the bios returns it zero-based
00007C8D 660FB7C9 movzx ecx,cx
00007C91 66F7E1 mul ecx ; Multiply the cylinders with (heads * sectors) [stored in dx:ax already]
00007C94 668946F8 mov [bp-0x8],eax ; This value is the number of total sectors on the disk, so save it for later
00007C98 837E1600 cmp word [bp+TotalSectors],byte +0x0 ; Check the old 16-bit value of TotalSectors
00007C9C 7538 jnz print_ntldr_error_message ; If it is non-zero then exit with an error
00007C9E 837E2A00 cmp word [bp+FSVersion],byte +0x0 ; Check the file system version word
00007CA2 7732 ja print_ntldr_error_message ; If it is not zero then exit with an error
;
; We are now ready to load our second sector of boot code
; But first, a bit of undocumented information about how
; Win2k stores it's second sector of boot code.
;
; The FAT32 filesystem was designed so that you can store
; multiple sectors of boot code. The boot sector of a FAT32
; volume is actually three sectors long. Microsoft extended
; the BPB so much that you can't fit enough code in the
; boot sector to make it work. So they extended it. Sector 0
; is the traditional boot sector, sector 1 is the FSInfo sector,
; and sector 2 is used to store extra boot code to make up
; for the lost space the BPB takes.
;
; Now this creates an interesting problem. Suppose for example
; that the user has Win98 and Win2k installed. The Win2k
; boot sector is stored at sector 0 and the Win98 boot sector is
; stored as BOOTSECT.DOS on the file system. Now if Win2k were
; to store it's second sector of boot code in sector 2 like
; the fat spec says to do then when you try to dual boot back
; to Win98 the Win98 boot sector will load Win2k's second
; sector of boot code. Understand? ;-)
;
; To get around this problem Win2k stores it's second sector
; of boot code elsewhere. This sector is always stored at sector 13
; on the file system. Now don't ask me what happens when you don't
; have enough reserved sectors to store it, but I've never seen a
; FAT32 volume that didn't have at least 32 reserved sectors.
;
00007CA4 668B461C mov eax,[bp+HiddenSectors] ; Get the count of hidden sectors
00007CA8 6683C00C add eax,byte +0xc ; Add 12 to that value so that we are loading the 13th sector of the volume
00007CAC BB0080 mov bx,0x8000 ; Read the sector to address 0x8000
00007CAF B90100 mov cx,0x1 ; Read just one sector
00007CB2 E82B00 call read_sectors ; Read it
00007CB5 E94803 jmp 0x8000 ; Jump to the next sector of boot code
print_disk_error_message:
00007CB8 A0FA7D mov al,[DISK_ERR_offset_from_0x7d00]
putchars:
00007CBB B47D mov ah,0x7d
00007CBD 8BF0 mov si,ax
get_another_char:
00007CBF AC lodsb
00007CC0 84C0 test al,al
00007CC2 7417 jz reboot
00007CC4 3CFF cmp al,0xff
00007CC6 7409 jz print_reboot_message
00007CC8 B40E mov ah,0xe
00007CCA BB0700 mov bx,0x7
00007CCD CD10 int 0x10
00007CCF EBEE jmp short get_another_char
print_reboot_message:
00007CD1 A0FB7D mov al,[RESTART_ERR_offset_from_0x7d00]
00007CD4 EBE5 jmp short putchars
print_ntldr_error_message:
00007CD6 A0F97D mov al,[NTLDR_ERR_offset_from_0x7d00]
00007CD9 EBE0 jmp short putchars
reboot:
00007CDB 98 cbw
00007CDC CD16 int 0x16
00007CDE CD19 int 0x19
read_sectors:
00007CE0 6660 pushad
00007CE2 663B46F8 cmp eax,[bp-0x8]
00007CE6 0F824A00 jc near 0x7d34
00007CEA 666A00 o32 push byte +0x0
00007CED 6650 push eax
00007CEF 06 push es
00007CF0 53 push bx
00007CF1 666810000100 push dword 0x10010
00007CF7 807E0200 cmp byte [bp+0x2],0x0
00007CFB 0F852000 jnz near 0x7d1f
00007CFF B441 mov ah,0x41
00007D01 BBAA55 mov bx,0x55aa
00007D04 8A5640 mov dl,[bp+BootDrive]
00007D07 CD13 int 0x13
00007D09 0F821C00 jc near 0x7d29
00007D0D 81FB55AA cmp bx,0xaa55
00007D11 0F851400 jnz near 0x7d29
00007D15 F6C101 test cl,0x1
00007D18 0F840D00 jz near 0x7d29
00007D1C FE4602 inc byte [bp+0x2]
00007D1F B442 mov ah,0x42
00007D21 8A5640 mov dl,[bp+BootDrive]
00007D24 8BF4 mov si,sp
00007D26 CD13 int 0x13
00007D28 B0F9 mov al,0xf9
00007D2A 6658 pop eax
00007D2C 6658 pop eax
00007D2E 6658 pop eax
00007D30 6658 pop eax
00007D32 EB2A jmp short 0x7d5e
00007D34 6633D2 xor edx,edx
00007D37 660FB74E18 movzx ecx,word [bp+SectorsPerTrack]
00007D3C 66F7F1 div ecx
00007D3F FEC2 inc dl
00007D41 8ACA mov cl,dl
00007D43 668BD0 mov edx,eax
00007D46 66C1EA10 shr edx,0x10
00007D4A F7761A div word [bp+NumberOfHeads]
00007D4D 86D6 xchg dl,dh
00007D4F 8A5640 mov dl,[bp+BootDrive]
00007D52 8AE8 mov ch,al
00007D54 C0E406 shl ah,0x6
00007D57 0ACC or cl,ah
00007D59 B80102 mov ax,0x201
00007D5C CD13 int 0x13
00007D5E 6661 popad
00007D60 0F8254FF jc near print_disk_error_message
00007D64 81C30002 add bx,0x200
00007D68 6640 inc eax
00007D6A 49 dec cx
00007D6B 0F8571FF jnz near read_sectors
00007D6F C3 ret
NTLDR db 'NTLDR '
filler times 49 db 0
NTLDR_ERR db 0dh,0ah,'NTLDR is missing',0ffh
DISK_ERR db 0dh,0ah,'Disk error',0ffh
RESTART_ERR db 0dh,0ah,'Press any key to restart',0dh,0ah
more_filler times 16 db 0
NTLDR_offset_from_0x7d00 db 0
NTLDR_ERR_offset_from_0x7d00 db 0ach
DISK_ERR_offset_from_0x7d00 db 0bfh
RESTART_ERR_offset_from_0x7d00 db 0cch
dw 0
dw 0aa55h
;
; And that ends the code that makes up the traditional boot sector
; From here on out is a disassembly of the extra sector of boot
; code required for a FAT32 volume. Win2k stores this code at
; sector 13 on the file system.
;
00008000 660FB64610 movzx eax,byte [bp+NumberOfFats] ; Put the number of fats into eax
00008005 668B4E24 mov ecx,[bp+SectorsPerFatBig] ; Put the count of sectors per fat into ecx
00008009 66F7E1 mul ecx ; Multiply them, edx:eax = (eax * ecx)
0000800C 6603461C add eax,[bp+HiddenSectors] ; Add the hidden sectors to eax
00008010 660FB7560E movzx edx,word [bp+ReservedSectors] ; Put the count of reserved sectors into edx
00008015 6603C2 add eax,edx ; Add it to eax
00008018 668946FC mov [bp-0x4],eax ; eax now contains the start of the data area, so save it for later
0000801C 66C746F4FFFFFFFF mov dword [bp-0xc],0xffffffff ; Save 0xffffffff for later??
00008024 668B462C mov eax,[bp+RootDirStartCluster] ; Put the starting cluster of the root directory into eax
00008028 6683F802 cmp eax,byte +0x2 ; Check and see if the root directory starts at cluster 2 or above
0000802C 0F82A6FC jc near print_ntldr_error_message ; If not exit with error
00008030 663DF8FFFF0F cmp eax,0xffffff8 ; Check and see if the root directory start cluster is and end of cluster chain indicator
00008036 0F839CFC jnc near print_ntldr_error_message ; If so exit with error
search_root_directory_cluster:
0000803A 6650 push eax ; Save root directory start cluster on stack
0000803C 6683E802 sub eax,byte +0x2 ; Adjust it because the first two fat entries are unused so the third entry marks the first data area cluster
00008040 660FB65E0D movzx ebx,byte [bp+SectsPerCluster] ; Put the number of sectors per cluster in ebx
00008045 8BF3 mov si,bx ; Now store it also in si register
00008047 66F7E3 mul ebx ; Multiply sectors per cluster with root directory start cluster
0000804A 660346FC add eax,[bp-0x4] ; Add the start sector of the data area
read_directory_sector:
0000804E BB0082 mov bx,0x8200 ; We now have the start sector of the root directory, so load it to 0x8200
00008051 8BFB mov di,bx ; Put the address of the root directory sector in di also
00008053 B90100 mov cx,0x1 ; Read one sector
00008056 E887FC call read_sectors ; Perform the read
check_entry_for_ntldr:
00008059 382D cmp [di],ch ; Check the first byte of the root directory entry for zero
0000805B 741E jz ntldr_not_found ; If so then NTLDR is missing so exit with error
0000805D B10B mov cl,0xb ; Put the value 11 in cl so we can compare an 11-byte filename
0000805F 56 push si ; Save si (which contains the number of sectors per cluster)
00008060 BE707D mov si,NTLDR ;0x7d70 ; Check and see if "NTLDR" is the first file entry
00008063 F3A6 repe cmpsb ; Do the compare
00008065 5E pop si ; Restore sectors per cluster into si
00008066 741B jz ntldr_found ; If we found it then continue, else check next entry
00008068 03F9 add di,cx ; Add 0 to di? the next entry is 0x15 bytes away
0000806A 83C715 add di,byte +0x15 ; Add 0x15 to di
0000806D 3BFB cmp di,bx ; Check to see if we have reached the end of our sector we loaded, read_sectors sets bx = end address of data loaded
0000806F 72E8 jc check_entry_for_ntldr ; If we haven't reached the end then check the next entry
00008071 4E dec si ; decrement si, si holds the number of sectors per cluster
00008072 75DA jnz read_directory_sector ; If it's not zero then search the next sector for NTLDR
00008074 6658 pop eax ; If we got here that means we didn't find NTLDR in the previous root directory cluster, so restore eax with the start cluster
00008076 E86500 call get_fat_entry ; Get the next cluster in the fat chain
00008079 72BF jc search_root_directory_cluster ; If we reached end-of-file marker then don't jump, otherwise continue search
ntldr_not_found:
0000807B 83C404 add sp,byte +0x4
0000807E E955FC jmp print_ntldr_error_message
ntldr_load_segment_address dw 0x2000
ntldr_found:
00008083 83C404 add sp,byte +0x4 ; Adjust stack to remove root directory start cluster
00008086 8B7509 mov si,[di+0x9] ; Put start cluster high word in si
00008089 8B7D0F mov di,[di+0xf] ; Put start cluster low word in di
0000808C 8BC6 mov ax,si ; Put high word in ax
0000808E 66C1E010 shl eax,0x10 ; Shift it into position
00008092 8BC7 mov ax,di ; Put low word in ax, now eax contains start cluster of NTLDR
00008094 6683F802 cmp eax,byte +0x2 ; Check and see if the start cluster of NTLDR starts at cluster 2 or above
00008098 0F823AFC jc near print_ntldr_error_message ; If not exit with error
0000809C 663DF8FFFF0F cmp eax,0xffffff8 ; Check and see if the start cluster of NTLDR is and end of cluster chain indicator
000080A2 0F8330FC jnc near print_ntldr_error_message ; If so exit with error
load_next_ntldr_cluster:
000080A6 6650 push eax ; Save NTLDR start cluster for later
000080A8 6683E802 sub eax,byte +0x2 ; Adjust it because the first two fat entries are unused so the third entry marks the first data area cluster
000080AC 660FB64E0D movzx ecx,byte [bp+SectsPerCluster] ; Put the sectors per cluster into ecx
000080B1 66F7E1 mul ecx ; Multiply sectors per cluster by the start cluster, we now have the logical start sector
000080B4 660346FC add eax,[bp-0x4] ; Add the start of the data area logical sector
000080B8 BB0000 mov bx,0x0 ; Load NTLDR to offset zero
000080BB 06 push es ; Save es
000080BC 8E068180 mov es,[ntldr_load_segment_address] ; Get the segment address to load NTLDR to
000080C0 E81DFC call read_sectors ; Load the first cluster
000080C3 07 pop es ; Restore es
000080C4 6658 pop eax ; Restore eax to NTLDR start cluster
000080C6 C1EB04 shr bx,0x4 ; bx contains the amount of data we transferred, so divide it by 16
000080C9 011E8180 add [ntldr_load_segment_address],bx ; Add that value to the segment
000080CD E80E00 call get_fat_entry ; Get the next cluster in eax
000080D0 0F830200 jnc near jump_to_ntldr ; If we have reached the end of file then lets get to NTLDR
000080D4 72D0 jc load_next_ntldr_cluster ; If not, then load another cluster
jump_to_ntldr:
000080D6 8A5640 mov dl,[bp+BootDrive] ; Put the boot drive in dl
000080D9 EA00000020 jmp 0x2000:0x0 ; Jump to NTLDR
get_fat_entry:
000080DE 66C1E002 shl eax,0x2 ; Multiply cluster by 4
000080E2 E81100 call load_fat_sector ; Load the fat sector
000080E5 26668B01 mov eax,[es:bx+di] ; Get the fat entry
000080E9 6625FFFFFF0F and eax,0xfffffff ; Mask off the most significant 4 bits
000080EF 663DF8FFFF0F cmp eax,0xffffff8 ; Compare it to end of file marker to set the flags correctly
000080F5 C3 ret ; Return to caller
load_fat_sector:
000080F6 BF007E mov di,0x7e00 ; We will load the fat sector to 0x7e00
000080F9 660FB74E0B movzx ecx,word [bp+SectsPerCluster] ; Get the sectors per cluster
000080FE 6633D2 xor edx,edx ; We will divide (cluster * 4) / sectorspercluster
00008101 66F7F1 div ecx ; eax is already set before we get to this routine
00008104 663B46F4 cmp eax,[bp-0xc] ; Compare eax to 0xffffffff (initially, we set this value later)
00008108 743A jz load_fat_sector_end ; If it is the same return
0000810A 668946F4 mov [bp-0xc],eax ; Update that value
0000810E 6603461C add eax,[bp+HiddenSectors] ; Add the hidden sectors
00008112 660FB74E0E movzx ecx,word [bp+ReservedSectors] ; Add the reserved sectors
00008117 6603C1 add eax,ecx ; To the hidden sectors + the value we computed earlier
0000811A 660FB75E28 movzx ebx,word [bp+ExtendedFlags] ; Get extended flags and put into ebx
0000811F 83E30F and bx,byte +0xf ; Mask off upper 8 bits
00008122 7416 jz load_fat_sector_into_memory ; If fat is mirrored then skip fat calcs
00008124 3A5E10 cmp bl,[bp+NumberOfFats] ; Compare bl to number of fats
00008127 0F83ABFB jnc near print_ntldr_error_message ; If bl is bigger than numfats exit with error
0000812B 52 push dx ; Save dx
0000812C 668BC8 mov ecx,eax ; Put the current fat sector offset into ecx
0000812F 668B4624 mov eax,[bp+SectorsPerFatBig] ; Get the number of sectors occupied by one fat
00008133 66F7E3 mul ebx ; Multiplied by the active fat index
00008136 6603C1 add eax,ecx ; Add the current fat sector offset
00008139 5A pop dx ; Restore dx
load_fat_sector_into_memory:
0000813A 52 push dx ; Save dx, what is so important in dx??
0000813B 8BDF mov bx,di ; Put 0x7e00 in bx
0000813D B90100 mov cx,0x1 ; Load one sector
00008140 E89DFB call read_sectors ; Perform the read
00008143 5A pop dx ; Restore dx
load_fat_sector_end:
00008144 8BDA mov bx,dx ; Put it into bx, what is this value??
00008146 C3 ret ; Return
00008147 0000 add [bx+si],al
00008149 0000 add [bx+si],al
0000814B 0000 add [bx+si],al
0000814D 0000 add [bx+si],al
0000814F 0000 add [bx+si],al
00008151 0000 add [bx+si],al
00008153 0000 add [bx+si],al
00008155 0000 add [bx+si],al
00008157 0000 add [bx+si],al
00008159 0000 add [bx+si],al
0000815B 0000 add [bx+si],al
0000815D 0000 add [bx+si],al
0000815F 0000 add [bx+si],al
00008161 0000 add [bx+si],al
00008163 0000 add [bx+si],al
00008165 0000 add [bx+si],al
00008167 0000 add [bx+si],al
00008169 0000 add [bx+si],al
0000816B 0000 add [bx+si],al
0000816D 0000 add [bx+si],al
0000816F 0000 add [bx+si],al
00008171 0000 add [bx+si],al
00008173 0000 add [bx+si],al
00008175 0000 add [bx+si],al
00008177 0000 add [bx+si],al
00008179 0000 add [bx+si],al
0000817B 0000 add [bx+si],al
0000817D 0000 add [bx+si],al
0000817F 0000 add [bx+si],al
00008181 0000 add [bx+si],al
00008183 0000 add [bx+si],al
00008185 0000 add [bx+si],al
00008187 0000 add [bx+si],al
00008189 0000 add [bx+si],al
0000818B 0000 add [bx+si],al
0000818D 0000 add [bx+si],al
0000818F 0000 add [bx+si],al
00008191 0000 add [bx+si],al
00008193 0000 add [bx+si],al
00008195 0000 add [bx+si],al
00008197 0000 add [bx+si],al
00008199 0000 add [bx+si],al
0000819B 0000 add [bx+si],al
0000819D 0000 add [bx+si],al
0000819F 0000 add [bx+si],al
000081A1 0000 add [bx+si],al
000081A3 0000 add [bx+si],al
000081A5 0000 add [bx+si],al
000081A7 0000 add [bx+si],al
000081A9 0000 add [bx+si],al
000081AB 0000 add [bx+si],al
000081AD 0000 add [bx+si],al
000081AF 0000 add [bx+si],al
000081B1 0000 add [bx+si],al
000081B3 0000 add [bx+si],al
000081B5 0000 add [bx+si],al
000081B7 0000 add [bx+si],al
000081B9 0000 add [bx+si],al
000081BB 0000 add [bx+si],al
000081BD 0000 add [bx+si],al
000081BF 0000 add [bx+si],al
000081C1 0000 add [bx+si],al
000081C3 0000 add [bx+si],al
000081C5 0000 add [bx+si],al
000081C7 0000 add [bx+si],al
000081C9 0000 add [bx+si],al
000081CB 0000 add [bx+si],al
000081CD 0000 add [bx+si],al
000081CF 0000 add [bx+si],al
000081D1 0000 add [bx+si],al
000081D3 0000 add [bx+si],al
000081D5 0000 add [bx+si],al
000081D7 0000 add [bx+si],al
000081D9 0000 add [bx+si],al
000081DB 0000 add [bx+si],al
000081DD 0000 add [bx+si],al
000081DF 0000 add [bx+si],al
000081E1 0000 add [bx+si],al
000081E3 0000 add [bx+si],al
000081E5 0000 add [bx+si],al
000081E7 0000 add [bx+si],al
000081E9 0000 add [bx+si],al
000081EB 0000 add [bx+si],al
000081ED 0000 add [bx+si],al
000081EF 0000 add [bx+si],al
000081F1 0000 add [bx+si],al
000081F3 0000 add [bx+si],al
000081F5 0000 add [bx+si],al
000081F7 0000 add [bx+si],al
000081F9 0000 add [bx+si],al
000081FB 0000 add [bx+si],al
000081FD 0055AA add [di-0x56],dl ; We can't forget the infamous boot signature

View File

@@ -1,249 +0,0 @@
;
; The BP register is initialized to 0x7c00, the start of
; the boot sector. The SP register is initialized to
; 0x7bf0, leaving 16 bytes of data storage space above
; the stack.
;
; The DWORD that gets stored at 0x7bfc is the logical
; sector number of the start of the data area.
;
; The DWORD that gets stored at 0x7bf8 is ????????
;
; The DWORD that gets stored at 0x7bf4 is ????????
;
; The DWORD that gets stored at 0x7bf0 is ????????
;
org 7c00h
segment .text
bits 16
start:
jmp short main
nop
OEMName db 'MSWIN4.0'
BytesPerSector dw 512
SectsPerCluster db 1
ReservedSectors dw 1
NumberOfFats db 2
MaxRootEntries dw 0 ;512 - Always zero for FAT32 volumes
TotalSectors dw 0 ;2880 - Always zero for FAT32 volumes
MediaDescriptor db 0f8h
SectorsPerFat dw 0 ;9 - Always zero for FAT32 volumes
SectorsPerTrack dw 18
NumberOfHeads dw 2
HiddenSectors dd 0
TotalSectorsBig dd 0
BootDrive db 80h
Reserved db 0
ExtendSig db 29h
SerialNumber dd 00000000h
VolumeLabel db 'NO NAME '
FileSystem db 'FAT16 '
main:
00007C3E 33C9 xor cx,cx
00007C40 8ED1 mov ss,cx ; Setup stack
00007C42 BCF07B mov sp,0x7bf0 ; Give us 16 bytes (4 dwords) of space above stack
00007C45 8ED9 mov ds,cx
00007C47 B80020 mov ax,0x2000
00007C4A 8EC0 mov es,ax ; Setup ES:0000 == 2000:0000
00007C4C FC cld
00007C4D BD007C mov bp,0x7c00
00007C50 384E24 cmp [bp+BootDrive],cl ; Compare the boot drive to zero (I think they are testing for a hard disk drive number)
00007C53 7D24 jnl floppy_boot ; Nope, it's a floppy, skip partition table tests
00007C55 8BC1 mov ax,cx ; Move zero to AX
00007C57 99 cwd ; DX:AX now contains zero
00007C58 E83C01 call read_one_sector ; Try to read in the MBR sector
00007C5B 721C jc floppy_boot ; Read failed, continue
00007C5D 83EB3A sub bx,byte +0x3a ; BX comes back with 512, make it equal to 454 (offset of partition table in MBR)
00007C60 66A11C7C mov eax,[HiddenSectors] ; Put HiddenSectors in EAX
find_our_partition:
00007C64 26663B07 cmp eax,[es:bx] ; Compare partition table entry's start sector to HiddenSectors
00007C68 268A57FC mov dl,[es:bx-0x4] ; Get partition type byte for this entry
00007C6C 7506 jnz next_partition_entry ; If partition start sector != HiddenSectors then skip this entry
00007C6E 80CA02 or dl,0x2 ; Set the second bit in partition type?? I guess this makes types 4 & 6 identical
00007C71 885602 mov [bp+0x2],dl ; Save it on top of nop instruction (3rd byte of boot sector)
next_partition_entry:
00007C74 80C310 add bl,0x10 ; Add 16 to bl (offset of next entry in partition table)
00007C77 73EB jnc find_our_partition ; Jump back until we hit the end of the partition table
; We now have our partition type at 0000:7C02
; If the type was 4 or 6 then that byte is 6
; I can't imagine why the boot sector needs to store
; this information, but hopefully I will uncover it
; as I further disassemble this boot sector.
floppy_boot:
00007C79 33C9 xor cx,cx ; Zero out CX
00007C7B 8A4610 mov al,[bp+NumberOfFats] ; Get the number of FATs in AL (usually 2)
00007C7E 98 cbw ; Sign extend it into AX (AX == 2)
00007C7F F76616 mul word [bp+NumberOfFats] ; Multiply it with NumberOfFats PLUS the low byte of MaxRootEntries!!??
00007C82 03461C add ax,[bp+HiddenSectors] ; Result is in DX:AX
00007C85 13561E adc dx,[bp+HiddenSectors+2] ; Add HiddenSectors to DX:AX
00007C88 03460E add ax,[bp+ReservedSectors] ; Add ReservedSectors to DX:AX
00007C8B 13D1 adc dx,cx ; CX still contains zero
00007C8D 8B7611 mov si,[bp+MaxRootEntries] ; Get MaxRootEntries in SI
00007C90 60 pusha ; Save all registers (right now DX:AX has starting sector of root dir)
00007C91 8946FC mov [bp-0x4],ax ; Save the starting sector of the root directory
00007C94 8956FE mov [bp-0x2],dx ; Save it in the first 4 bytes before the boot sector
00007C97 B82000 mov ax,0x20 ; AX == 32 (size of a directory entry)
00007C9A F7E6 mul si ; Multiply it with MaxRootEntries (DX:AX == length in bytes of root directory)
00007C9C 8B5E0B mov bx,[bp+BytesPerSector] ; Get the BytesPerSector in BX
00007C9F 03C3 add ax,bx ; Add it to AX (what if this addition carries? MS should 'adc dx,0' shouldn't they?)
00007CA1 48 dec ax ; Subtract one (basically rounding up)
00007CA2 F7F3 div bx ; Divide DX:AX (length of root dir in bytes) by the size of a sector
00007CA4 0146FC add [bp-0x4],ax ; Add the number of sectors of the root directory to our other value
00007CA7 114EFE adc [bp-0x2],cx ; Now the first 4 bytes before the boot sector contain the starting sector of the data area
00007CAA 61 popa ; Restore all registers (DX:AX has start sector of root dir)
load_root_dir_sector:
00007CAB BF0000 mov di,0x0 ; Zero out di
00007CAE E8E600 call read_one_sector ; Read the first sector of the root directory
00007CB1 7239 jc print_disk_error_message ; Read failed, print disk error and reboot
search_directory:
00007CB3 26382D cmp [es:di],ch ; If the first byte of the directory entry is zero then we have reached the end
00007CB6 7417 jz print_ntldr_error_message; of the directory and NTLDR is not here so reboot
00007CB8 60 pusha ; Save all registers
00007CB9 B10B mov cl,0xb ; Put 11 in cl (length of filename in directory entry)
00007CBB BEA17D mov si,NTLDR ; Put offset of filename string in DS:SI
00007CBE F3A6 repe cmpsb ; Compare this directory entry against 'NTLDR '
00007CC0 61 popa ; Restore all the registers
00007CC1 7432 jz found_ntldr ; If we found NTLDR then jump
00007CC3 4E dec si ; SI holds MaxRootEntries, subtract one
00007CC4 7409 jz print_ntldr_error_message; If we are out of root dir entries then reboot
00007CC6 83C720 add di,byte +0x20 ; Increment DI by the size of a directory entry
00007CC9 3BFB cmp di,bx ; Compare DI to BX (DI has offset to next dir entry, BX has address of end of directory sector in memory)
00007CCB 72E6 jc search_directory ; If DI is less than BX loop again
00007CCD EBDC jmp short load_root_dir_sector ; Didn't find NTLDR in this directory sector, try again
print_ntldr_error_message:
00007CCF A0FB7D mov al,[NTLDR_ERR_offset_from_0x7d00]
putchars:
00007CD2 B47D mov ah,0x7d
00007CD4 8BF0 mov si,ax
get_another_char:
00007CD6 AC lodsb
00007CD7 98 cbw
00007CD8 40 inc ax
00007CD9 740C jz print_reboot_message
00007CDB 48 dec ax
00007CDC 7413 jz reboot
00007CDE B40E mov ah,0xe
00007CE0 BB0700 mov bx,0x7
00007CE3 CD10 int 0x10
00007CE5 EBEF jmp short get_another_char
print_reboot_message:
00007CE7 A0FD7D mov al,[RESTART_ERR_offset_from_0x7d00]
00007CEA EBE6 jmp short putchars
print_disk_error_message:
00007CEC A0FC7D mov al,[DISK_ERR_offset_from_0x7d00]
00007CEF EBE1 jmp short putchars
reboot:
00007CF1 CD16 int 0x16
00007CF3 CD19 int 0x19
found_ntldr:
00007CF5 268B551A mov dx,[es:di+0x1a] ; Get NTLDR start cluster in DX
00007CF9 52 push dx ; Save it on the stack
00007CFA B001 mov al,0x1 ; Read 1 cluster? Or is this one sector?
00007CFC BB0000 mov bx,0x0 ; ES:BX is the load address (2000:0000)
00007CFF E83B00 call read_cluster ; Do the read
00007D02 72E8 jc print_disk_error_message ; If it failed then reboot
00007D04 5B pop bx ; Get the start cluster of NTLDR in BX
00007D05 8A5624 mov dl,[bp+BootDrive] ; Get boot drive in DL
00007D08 BE0B7C mov si,0x7c0b
00007D0B 8BFC mov di,sp
00007D0D C746F03D7D mov word [bp-0x10],read_cluster
00007D12 C746F4297D mov word [bp-0xc],0x7d29
00007D17 8CD9 mov cx,ds
00007D19 894EF2 mov [bp-0xe],cx
00007D1C 894EF6 mov [bp-0xa],cx
00007D1F C606967DCB mov byte [0x7d96],0xcb
00007D24 EA03000020 jmp 0x2000:0x3
00007D29 0FB6C8 movzx cx,al
00007D2C 668B46F8 mov eax,[bp-0x8]
00007D30 6603461C add eax,[bp+HiddenSectors]
00007D34 668BD0 mov edx,eax
00007D37 66C1EA10 shr edx,0x10
00007D3B EB5E jmp short 0x7d9b
read_cluster:
00007D3D 0FB6C8 movzx cx,al
00007D40 4A dec dx
00007D41 4A dec dx
00007D42 8A460D mov al,[bp+SectsPerCluster]
00007D45 32E4 xor ah,ah
00007D47 F7E2 mul dx
00007D49 0346FC add ax,[bp-0x4]
00007D4C 1356FE adc dx,[bp-0x2]
00007D4F EB4A jmp short 0x7d9b
read_sectors:
00007D51 52 push dx
00007D52 50 push ax
00007D53 06 push es
00007D54 53 push bx
00007D55 6A01 push byte +0x1
00007D57 6A10 push byte +0x10
00007D59 91 xchg ax,cx
00007D5A 8B4618 mov ax,[bp+SectorsPerTrack]
00007D5D 96 xchg ax,si
00007D5E 92 xchg ax,dx
00007D5F 33D2 xor dx,dx
00007D61 F7F6 div si
00007D63 91 xchg ax,cx
00007D64 F7F6 div si
00007D66 42 inc dx
00007D67 87CA xchg cx,dx
00007D69 F7761A div word [bp+NumberOfHeads]
00007D6C 8AF2 mov dh,dl
00007D6E 8AE8 mov ch,al
00007D70 C0CC02 ror ah,0x2
00007D73 0ACC or cl,ah
00007D75 B80102 mov ax,0x201
00007D78 807E020E cmp byte [bp+0x2],0xe
00007D7C 7504 jnz 0x7d82
00007D7E B442 mov ah,0x42
00007D80 8BF4 mov si,sp
00007D82 8A5624 mov dl,[bp+BootDrive]
00007D85 CD13 int 0x13
00007D87 61 popa
00007D88 61 popa
00007D89 720B jc 0x7d96
00007D8B 40 inc ax
00007D8C 7501 jnz 0x7d8f
00007D8E 42 inc dx
00007D8F 035E0B add bx,[bp+BytesPerSector]
00007D92 49 dec cx
00007D93 7506 jnz 0x7d9b
00007D95 F8 clc
00007D96 C3 ret
read_one_sector:
00007D97 41 inc cx
00007D98 BB0000 mov bx,0x0
00007D9B 60 pusha
00007D9C 666A00 o32 push byte +0x0
00007D9F EBB0 jmp short 0x7d51
NTLDR db 'NTLDR '
NTLDR_ERR db 0dh,0ah,'NTLDR is missing',0ffh
DISK_ERR db 0dh,0ah,'Disk error',0ffh
RESTART_ERR db 0dh,0ah,'Press any key to restart',0dh,0ah
filler times 18 db 0
NTLDR_offset_from_0x7d00 db 0
NTLDR_ERR_offset_from_0x7d00 db 0ach
DISK_ERR_offset_from_0x7d00 db 0bfh
RESTART_ERR_offset_from_0x7d00 db 0cch
dw 0
dw 0aa55h

View File

@@ -1 +0,0 @@
*.res

View File

@@ -1,76 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999 - 2003 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
MKDIR = mkdir
SEP = /
CC = mingw32-gcc
LD = mingw32-ld
WINDRES = mingw32-windres
else
RM = cmd /C del
CP = copy /Y
MKDIR = md
SEP = \$(EMPTY_VAR)
CC = gcc
LD = ld
RM = cmd /C del
WINDRES = windres
endif
FLAGS = -Wall
OBJS = rs232.o fdebug.o fdebug.res
.PHONY : clean
all: fdebug.exe
fdebug.exe: $(OBJS)
@echo ===================================================== LINKING fdebug
$(CC) $(FLAGS) -o fdebug.exe $(OBJS) -lgdi32 -lcomdlg32 -Wl,--subsystem,windows
fdebug.res: fdebug.rc resource.h
@echo ===================================================== Compiling $*
$(WINDRES) -o fdebug.res fdebug.rc -O coff
fdebug.o: fdebug.c rs232.h
@echo ===================================================== Compiling $*
$(CC) $(FLAGS) -o fdebug.o -c fdebug.c
rs232.o: rs232.c rs232.h
@echo ===================================================== Compiling $*
$(CC) $(FLAGS) -o rs232.o -c rs232.c
clean:
@-$(RM) *.o
@-$(RM) *.res
@-$(RM) *.exe
@echo Clean ALL done.

View File

@@ -1,554 +0,0 @@
// fdebug.cpp : Defines the entry point for the application.
//
#include <windows.h>
#include <commdlg.h>
#include <process.h>
#include <stdio.h>
#include <tchar.h>
#include "resource.h"
#include "rs232.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
HWND hMainWnd; // The main window handle
HWND hDisplayWnd; // The window to display the incoming data
HWND hEditWnd; // The edit window to get input from the user
TCHAR strComPort[MAX_PATH] = TEXT("COM1"); // The COM port to use
TCHAR strBaudRate[MAX_PATH] = TEXT("115200"); // The baud rate to use
TCHAR strCaptureFileName[MAX_PATH] = TEXT(""); // The file name to capture to
BOOL bConnected = FALSE; // Tells us if we are currently connected
BOOL bCapturing = FALSE; // Tells us if we are currently capturing data
BOOL bLocalEcho = FALSE; // Tells us if local echo is currently enabled
HANDLE hCaptureFile; // Handle to the capture file
DWORD dwThreadId = 0; // Thread id of RS232 communication thread
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConnectionDialogProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK CaptureDialogProc(HWND, UINT, WPARAM, LPARAM);
VOID EnableConnectMenuItem(BOOL Enable);
VOID EnableDisconnectMenuItem(BOOL Enable);
VOID EnableStartCaptureMenuItem(BOOL Enable);
VOID EnableStopCaptureMenuItem(BOOL Enable);
VOID CheckLocalEchoMenuItem(BOOL Checked);
VOID Rs232Thread(VOID* Parameter);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_FDEBUG, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_FDEBUG);
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_FDEBUG);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = NULL;//(HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_FDEBUG;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
hMainWnd = hWnd;
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
RECT rc;
TCHAR WndText[MAX_PATH];
DWORD Index;
NONCLIENTMETRICS ncm;
HFONT hFont;
switch (message)
{
case WM_CREATE:
hEditWnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("EDIT"), "", WS_CHILD|WS_VISIBLE|WS_VSCROLL|ES_AUTOHSCROLL|ES_LEFT|ES_MULTILINE, 0, 0, 0, 0, hWnd, NULL, hInst, NULL);
hDisplayWnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("EDIT"), "", WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL|ES_MULTILINE, 0, 0, 0, 0, hWnd, NULL, hInst, NULL);
memset(&ncm, 0, sizeof(NONCLIENTMETRICS));
ncm.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0);
hFont = CreateFontIndirect(&ncm.lfMessageFont);
SendMessage(hEditWnd, WM_SETFONT, (WPARAM)hFont, TRUE);
SendMessage(hDisplayWnd, WM_SETFONT, (WPARAM)hFont, TRUE);
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if (lParam == (LPARAM)hEditWnd && wmEvent == EN_CHANGE)
{
GetWindowText(hEditWnd, WndText, MAX_PATH);
if (_tcslen(WndText) > 0)
{
SetWindowText(hEditWnd, TEXT(""));
if (!bConnected)
{
MessageBox(hWnd, TEXT("You are not currently connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
break;
}
for (Index=0; Index<_tcslen(WndText); Index++)
{
if (dwThreadId != 0)
{
PostThreadMessage(dwThreadId, WM_CHAR, (WPARAM)WndText[Index], (LPARAM)0);
}
}
}
}
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case ID_FILE_CONNECT:
if (bConnected)
{
MessageBox(hWnd, TEXT("You are already connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
}
else
{
if (DialogBox(hInst, (LPCTSTR)IDD_CONNECTION, hWnd, (DLGPROC)ConnectionDialogProc) == IDOK)
{
bConnected = TRUE;
EnableDisconnectMenuItem(TRUE);
EnableConnectMenuItem(FALSE);
_beginthread(Rs232Thread, 0, NULL);
}
}
break;
case ID_FILE_DISCONNECT:
if (bConnected)
{
bConnected = FALSE;
EnableDisconnectMenuItem(FALSE);
EnableConnectMenuItem(TRUE);
}
else
{
MessageBox(hWnd, TEXT("You are not currently connected!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
}
break;
case ID_FILE_STARTCAPTURE:
if (DialogBox(hInst, (LPCTSTR)IDD_CAPTURE, hWnd, (DLGPROC)CaptureDialogProc) == IDOK)
{
bCapturing = TRUE;
EnableStopCaptureMenuItem(TRUE);
EnableStartCaptureMenuItem(FALSE);
hCaptureFile = CreateFile(strCaptureFileName, FILE_APPEND_DATA, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
break;
case ID_FILE_STOPCAPTURE:
if (bCapturing)
{
bCapturing = FALSE;
EnableStopCaptureMenuItem(FALSE);
EnableStartCaptureMenuItem(TRUE);
CloseHandle(hCaptureFile);
hCaptureFile = NULL;
}
break;
case ID_FILE_LOCALECHO:
if (bLocalEcho)
{
bLocalEcho = FALSE;
CheckLocalEchoMenuItem(bLocalEcho);
}
else
{
bLocalEcho = TRUE;
CheckLocalEchoMenuItem(bLocalEcho);
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
break;
case WM_SIZE:
GetClientRect(hWnd, &rc);
MoveWindow(hDisplayWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top - 20, TRUE);
MoveWindow(hEditWnd, rc.left, rc.bottom - 20, rc.right - rc.left, 20, TRUE);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hLicenseEditWnd;
TCHAR strLicense[0x1000];
switch (message)
{
case WM_INITDIALOG:
hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT);
LoadString(hInst, IDS_LICENSE, strLicense, 0x1000);
SetWindowText(hLicenseEditWnd, strLicense);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
LRESULT CALLBACK ConnectionDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hDlg, IDC_COMPORT), strComPort);
SetWindowText(GetDlgItem(hDlg, IDC_BAUTRATE), strBaudRate);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
GetWindowText(GetDlgItem(hDlg, IDC_COMPORT), strComPort, MAX_PATH);
GetWindowText(GetDlgItem(hDlg, IDC_BAUTRATE), strBaudRate, MAX_PATH);
}
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
LRESULT CALLBACK CaptureDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
OPENFILENAME ofn;
switch (message)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_BROWSE)
{
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
ofn.hInstance = hInst;
ofn.lpstrFilter = NULL;
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 0;
ofn.nFilterIndex = 0;
ofn.lpstrFile = strCaptureFileName;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = NULL;
ofn.Flags = OFN_HIDEREADONLY|OFN_NOREADONLYRETURN;
if (GetOpenFileName(&ofn))
{
SetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName);
}
}
if (LOWORD(wParam) == IDOK)
{
GetWindowText(GetDlgItem(hDlg, IDC_CAPTUREFILENAME), strCaptureFileName, MAX_PATH);
}
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
VOID EnableConnectMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_CONNECT, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_CONNECT, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableDisconnectMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_DISCONNECT, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_DISCONNECT, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableStartCaptureMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_STARTCAPTURE, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_STARTCAPTURE, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID EnableStopCaptureMenuItem(BOOL Enable)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Enable)
{
EnableMenuItem(hFileMenu, ID_FILE_STOPCAPTURE, MF_BYCOMMAND|MF_ENABLED);
}
else
{
EnableMenuItem(hFileMenu, ID_FILE_STOPCAPTURE, MF_BYCOMMAND|MF_GRAYED);
}
}
VOID CheckLocalEchoMenuItem(BOOL Checked)
{
HMENU hMenuBar;
HMENU hFileMenu;
hMenuBar = GetMenu(hMainWnd);
hFileMenu = GetSubMenu(hMenuBar, 0);
if (Checked)
{
CheckMenuItem(hFileMenu, ID_FILE_LOCALECHO, MF_BYCOMMAND|MF_CHECKED);
}
else
{
CheckMenuItem(hFileMenu, ID_FILE_LOCALECHO, MF_BYCOMMAND|MF_UNCHECKED);
}
}
VOID Rs232Thread(VOID* Parameter)
{
BYTE Byte;
TCHAR String[MAX_PATH];
MSG msg;
DWORD dwNumberOfBytesWritten;
dwThreadId = GetCurrentThreadId();
if (!Rs232OpenPortWin32(strComPort))
{
MessageBox(hMainWnd, TEXT("Error opening port!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
bConnected = FALSE;
return;
}
_stprintf(String, TEXT("%s,n,8,1"), strBaudRate);
if (!Rs232ConfigurePortWin32(String))
{
MessageBox(hMainWnd, TEXT("Error configuring port!"), TEXT("Error"), MB_OK|MB_ICONSTOP);
bConnected = FALSE;
return;
}
while (bConnected)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_CHAR)
{
Rs232WriteByteWin32((BYTE)msg.wParam);
if (bLocalEcho && msg.wParam != (WPARAM)TEXT('\r'))
{
PostMessage(hDisplayWnd, WM_CHAR, (WPARAM)msg.wParam, (LPARAM)0);
if (hCaptureFile)
{
WriteFile(hCaptureFile, &msg.wParam, sizeof(TCHAR), &dwNumberOfBytesWritten, NULL);
}
}
}
}
if (Rs232ReadByteWin32(&Byte))
{
_stprintf(String, TEXT("%c"), Byte);
PostMessage(hDisplayWnd, WM_CHAR, (WPARAM)String[0], (LPARAM)0);
if (hCaptureFile)
{
WriteFile(hCaptureFile, &String[0], sizeof(TCHAR), &dwNumberOfBytesWritten, NULL);
}
}
}
dwThreadId = 0;
Rs232ClosePortWin32();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,215 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_FDEBUG ICON DISCARDABLE "fdebug.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDC_FDEBUG MENU DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Connect", ID_FILE_CONNECT
MENUITEM "&Disconnect", ID_FILE_DISCONNECT, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Start Capture", ID_FILE_STARTCAPTURE
MENUITEM "S&top Capture", ID_FILE_STOPCAPTURE, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Local Echo", ID_FILE_LOCALECHO
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 252
TOPMARGIN, 7
BOTTOMMARGIN, 203
END
IDD_CONNECTION, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 189
TOPMARGIN, 7
BOTTOMMARGIN, 93
END
IDD_CAPTURE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 244
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 259, 210
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About FreeLoader Debugger"
FONT 8, "Tahoma"
BEGIN
CONTROL "FreeLoader Debugger v1.0\nCopyright (C) 2003\nby Brian Palmer (brianp@reactos.org)",
IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,53,28,
122,26
DEFPUSHBUTTON "OK",IDOK,183,189,44,14,WS_GROUP
ICON IDI_FDEBUG,IDC_STATIC,19,30,20,20
EDITTEXT IDC_LICENSE_EDIT,53,63,174,107,ES_MULTILINE |
ES_READONLY | WS_VSCROLL
END
IDD_CONNECTION DIALOG DISCARDABLE 0, 0, 196, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Connection Options"
FONT 8, "Tahoma"
BEGIN
LTEXT "Enter the COM port (e.g. COM1):",IDC_STATIC,7,7,108,8
EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL
LTEXT "Enter the baud rate (e.g. 115200):",IDC_STATIC,7,38,114,
8
EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,45,79,50,14
PUSHBUTTON "Cancel",IDCANCEL,100,79,50,14
END
IDD_CAPTURE DIALOG DISCARDABLE 0, 0, 251, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Capture File"
FONT 8, "Tahoma"
BEGIN
LTEXT "Capture File Name:",IDC_STATIC,7,17,62,8
EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL
PUSHBUTTON "&Browse",IDC_BROWSE,194,26,50,14
DEFPUSHBUTTON "OK",IDOK,139,74,50,14
PUSHBUTTON "Cancel",IDCANCEL,194,74,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_TITLE "fdebug"
IDS_HELLO "Hello World!"
IDC_FDEBUG "FDEBUG"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,40 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by fdebug.rc
//
#define IDC_MYICON 2
#define IDD_FDEBUG_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDS_HELLO 106
#define IDI_FDEBUG 107
#define IDI_SMALL 108
#define IDC_FDEBUG 109
#define IDR_MAINFRAME 128
#define IDD_CONNECTION 130
#define IDD_CAPTURE 131
#define IDC_COMPORT 1000
#define IDC_BAUTRATE 1001
#define IDC_CAPTUREFILENAME 1002
#define IDC_BROWSE 1003
#define IDC_LICENSE_EDIT 1029
#define ID_FILE_CONNECT 32771
#define ID_FILE_DISCONNECT 32772
#define ID_FILE_STARTCAPTURE 32773
#define ID_FILE_STOPCAPTURE 32774
#define ID_FILE_LOCALECHO 32775
#define IDS_LICENSE 32815
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 132
#define _APS_NEXT_COMMAND_VALUE 32776
#define _APS_NEXT_CONTROL_VALUE 1004
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif

View File

@@ -1,257 +0,0 @@
/*
* FreeLoader - rs232.c
*
* Copyright (C) 2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <windows.h>
#include <winioctl.h>
#include <tchar.h>
#include <stdio.h>
#include "rs232.h"
HANDLE hPortHandle = NULL;
BOOL Rs232OpenPortWin32(TCHAR* CommPort)
{
TCHAR PortName[MAX_PATH];
DWORD ErrorCode;
// First check and make sure they don't already have the
// OBD2 connection open. We don't want to open things twice.
if (hPortHandle != NULL)
{
_tprintf(TEXT("Port handle not NULL. Must be already open. Returning FALSE...\n"));
return FALSE;
}
_stprintf(PortName, TEXT("\\\\.\\%s"), CommPort);
hPortHandle = CreateFile(PortName,
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
0);
if (hPortHandle == INVALID_HANDLE_VALUE)
{
hPortHandle = NULL;
ErrorCode = GetLastError();
_tprintf(TEXT("CreateFile(\"%s\") failed. GetLastError() = %lu.\n"), PortName, ErrorCode);
return FALSE;
}
return TRUE;
}
BOOL Rs232ClosePortWin32(VOID)
{
HANDLE hTempPortHandle = hPortHandle;
hPortHandle = NULL;
if (hTempPortHandle == NULL)
{
return FALSE;
}
return CloseHandle(hTempPortHandle);
}
// DeviceControlString
// [in] Pointer to a null-terminated string that specifies device-control information.
// The string must have the same form as the mode command's command-line arguments.
//
// For example, the following string specifies a baud rate of 1200, no parity, 8 data bits, and 1 stop bit:
// "baud=1200 parity=N data=8 stop=1"
//
// The following string specifies a baud rate of 115200, no parity, 8 data bits, and 1 stop bit:
// "115200,n,8,1"
//
// The device name is ignored if it is included in the string, but it must specify a valid device, as follows:
// "COM1: baud=1200 parity=N data=8 stop=1"
//
// For further information on mode command syntax, refer to the end-user documentation for your operating system.
BOOL Rs232ConfigurePortWin32(TCHAR* DeviceControlString)
{
DCB dcb;
DWORD ErrorCode;
/*if (!GetCommState(hPortHandle, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("GetCommState() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
dcb.BaudRate = BaudRate;
dcb.ByteSize = DataBits;
dcb.Parity = Parity;
dcb.StopBits = StopBits;
dcb.fBinary = TRUE;
dcb.fDsrSensitivity = FALSE;
dcb.fParity = (Parity == NOPARITY) ? FALSE : TRUE;
dcb.fOutX = FALSE;
dcb.fInX = FALSE;
dcb.fNull = FALSE;
dcb.fAbortOnError = TRUE;
dcb.fOutxCtsFlow = FALSE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
dcb.fDsrSensitivity = FALSE;
dcb.fRtsControl = RTS_CONTROL_DISABLE;
dcb.fOutxCtsFlow = FALSE;
dcb.fOutxCtsFlow = FALSE;*/
memset(&dcb, 0, sizeof(DCB));
dcb.DCBlength = sizeof(dcb);
if (!BuildCommDCB(DeviceControlString, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("BuildCommDCB() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
if (!SetCommState(hPortHandle, &dcb))
{
ErrorCode = GetLastError();
_tprintf(TEXT("SetCommState() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
// Set the timeouts
if (!Rs232SetCommunicationTimeoutsWin32(MAXDWORD, 0, 0, 0, 0))
{
return FALSE;
}
return TRUE;
}
// Members
// ReadIntervalTimeout
// Specifies the maximum time, in milliseconds, allowed to elapse between the arrival of two characters on the communications line. During a ReadFile operation, the time period begins when the first character is received. If the interval between the arrival of any two characters exceeds this amount, the ReadFile operation is completed and any buffered data is returned. A value of zero indicates that interval time-outs are not used.
// A value of MAXDWORD, combined with zero values for both the ReadTotalTimeoutConstant and ReadTotalTimeoutMultiplier members, specifies that the read operation is to return immediately with the characters that have already been received, even if no characters have been received.
//
// ReadTotalTimeoutMultiplier
// Specifies the multiplier, in milliseconds, used to calculate the total time-out period for read operations. For each read operation, this value is multiplied by the requested number of bytes to be read.
// ReadTotalTimeoutConstant
// Specifies the constant, in milliseconds, used to calculate the total time-out period for read operations. For each read operation, this value is added to the product of the ReadTotalTimeoutMultiplier member and the requested number of bytes.
// A value of zero for both the ReadTotalTimeoutMultiplier and ReadTotalTimeoutConstant members indicates that total time-outs are not used for read operations.
//
// WriteTotalTimeoutMultiplier
// Specifies the multiplier, in milliseconds, used to calculate the total time-out period for write operations. For each write operation, this value is multiplied by the number of bytes to be written.
// WriteTotalTimeoutConstant
// Specifies the constant, in milliseconds, used to calculate the total time-out period for write operations. For each write operation, this value is added to the product of the WriteTotalTimeoutMultiplier member and the number of bytes to be written.
// A value of zero for both the WriteTotalTimeoutMultiplier and WriteTotalTimeoutConstant members indicates that total time-outs are not used for write operations.
//
// Remarks
// If an application sets ReadIntervalTimeout and ReadTotalTimeoutMultiplier to MAXDWORD and sets ReadTotalTimeoutConstant to a value greater than zero and less than MAXDWORD, one of the following occurs when the ReadFile function is called:
//
// If there are any characters in the input buffer, ReadFile returns immediately with the characters in the buffer.
// If there are no characters in the input buffer, ReadFile waits until a character arrives and then returns immediately.
// If no character arrives within the time specified by ReadTotalTimeoutConstant, ReadFile times out.
BOOL Rs232SetCommunicationTimeoutsWin32(DWORD ReadIntervalTimeout, DWORD ReadTotalTimeoutMultiplier, DWORD ReadTotalTimeoutConstant, DWORD WriteTotalTimeoutMultiplier, DWORD WriteTotalTimeoutConstant)
{
COMMTIMEOUTS ct;
DWORD ErrorCode;
if (!GetCommTimeouts(hPortHandle, &ct))
{
ErrorCode = GetLastError();
_tprintf(TEXT("GetCommTimeouts() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
ct.ReadIntervalTimeout = ReadIntervalTimeout;
ct.ReadTotalTimeoutConstant = ReadTotalTimeoutConstant;
ct.ReadTotalTimeoutMultiplier = ReadTotalTimeoutMultiplier;
ct.WriteTotalTimeoutConstant = WriteTotalTimeoutConstant;
ct.WriteTotalTimeoutMultiplier = WriteTotalTimeoutMultiplier;
if (!SetCommTimeouts(hPortHandle, &ct))
{
ErrorCode = GetLastError();
_tprintf(TEXT("SetCommTimeouts() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
return TRUE;
}
BOOL Rs232ReadByteWin32(BYTE* DataByte)
{
DWORD BytesRead = 0;
DWORD ErrorCode;
// If ReadFile() fails then report error
if (!ReadFile(hPortHandle, DataByte, 1, &BytesRead, NULL))
{
ErrorCode = GetLastError();
_tprintf(TEXT("ReadFile() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
// If ReadFile() succeeds, but BytesRead isn't 1
// then a timeout occurred.
if (BytesRead != 1)
{
return FALSE;
}
return TRUE;
}
BOOL Rs232WriteByteWin32(BYTE DataByte)
{
DWORD BytesWritten = 0;
BOOL Success;
DWORD ErrorCode;
Success = WriteFile(hPortHandle, &DataByte, 1, &BytesWritten, NULL);
if (!Success || BytesWritten != 1)
{
ErrorCode = GetLastError();
_tprintf(TEXT("WriteFile() failed. GetLastError() = %lu.\n"), ErrorCode);
return FALSE;
}
return TRUE;
}

View File

@@ -1,46 +0,0 @@
/*
* FreeLoader - rs232.h
*
* Copyright (C) 2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __RS232_H
#define __RS232_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
//////////////////////////////////////////////////////////////////////////////////////////
//
// Function prototypes for RS232 communication under Win32
//
//////////////////////////////////////////////////////////////////////////////////////////
BOOL Rs232OpenPortWin32(TCHAR* CommPort);
BOOL Rs232ClosePortWin32(VOID);
BOOL Rs232ConfigurePortWin32(TCHAR* DeviceControlString);
BOOL Rs232SetCommunicationTimeoutsWin32(DWORD ReadIntervalTimeout, DWORD ReadTotalTimeoutMultiplier, DWORD ReadTotalTimeoutConstant, DWORD WriteTotalTimeoutMultiplier, DWORD WriteTotalTimeoutConstant);
BOOL Rs232ReadByteWin32(BYTE* DataByte);
BOOL Rs232WriteByteWin32(BYTE DataByte);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif // !defined(__RS232_H)

View File

@@ -1 +0,0 @@
obj

View File

@@ -1,292 +0,0 @@
Changes in v1.8.19 (12/20/2003) (ekohl)
- Detect PS/2 Port and Pointer Device (Mouse).
- Calculate CPU speed.
- Fixed delay counter overrun.
Changes in v1.8.18 (12/14/2003) (ekohl)
- Detect serial ports and serial pointer devices (Mice/Trackballs)
Changes in v1.8.17 (10/19/2003) (ekohl)
- Ignore case of registry key and value names
Changes in v1.8.16 (10/12/2003) (ekohl)
- Renamed a lot of variables and functions in the registry
- Fixed buggy cell size calculation
Changes in v1.8.15 (8/29/2003) (chorns)
- Add top-level makefile
- Add fdebug/.cvsignore
- Don't use rdel to remove files in tools/Makefile
- Remove warning in freeldr/mm/meminit.c
Changes in v1.8.14 (8/10/2003) (chorns)
- Clear screen to black when booting ReactOS
Changes in v1.8.13 (6/05/2003) (brianp)
- Added support for booting Linux 2.4.x kernels
- i386 exception handler now reports FreeLoader version number
Changes in v1.8.12 (5/25/2003) (ekohl)
- Added .inf-file parser
- SetupLdr loads and uses txtsetup.sif
- Removed .hiv (text-hive) parser
Changes in v1.8.11 (4/30/2003) (ekohl)
- Added DiskGetExtendedDriveParameters()
- Moved hardware detection into the arch directory
- Rewrote/completed harddisk detection
- Removed PCI and IDE detection
- Added basic CPU detection
Changes in v1.8.10 (4/27/2003) (chorns)
- Query BIOS for supported disk drives
Changes in v1.8.9 (4/25/2003) (chorns)
- Detect PCI busses
- Detect IDE controllers and devices
- Improved RegEnumValue()
Changes in v1.8.8 (4/25/2003) (ekohl)
- Added memmove().
- Added hardware hive export.
Changes in v1.8.7 (4/22/2003) (brianp)
- Added a file system recognizer to get around problems where
the partition id did not match the file system type.
Changes in v1.8.6 (4/14/2003) (brianp)
- Fixed a bug in fathelp.asm where is wasn't adding the hidden sector
count before performing a subtraction.
Changes in v1.8.5 (4/10/2003) (ekohl)
- Added support for binary system hive.
Changes in v1.8.4 (4/5/2003) (chorns)
- Added DOS compatible Master Boot Record (MBR)
Changes in v1.8.3 (3/18/2003) (brianp)
- Added _alloca() function because Mingw32 generates code that needs it
- Defined _mainCRTStartup in fathelp.asm because Mingw32 looks for that symbol
Changes in v1.8.2 (1/24/2003) (ekohl)
- Relaxed check for Int13-Extension support.
Some BIOSes have a strange opinion about what is supported. :-/
Changes in v1.8.1 (1/20/2003) (ekohl)
- Fixed the ISO filesystem detection code.
- Removed IsSetupLdr.
Changes in v1.8 (1/18/2003) (brianp)
- Added F8 options menu
- Added custom Boot functionality
- Moved all OS= settings from [FreeLoader] section to [Operating Systems] section.
- Removed MessageLine= setting. MessageBox= now accepts "\n" as an escape character for newlines.
- Added descriptions for disk error codes returned by the BIOS.
- Device names like "fd0" and "hd0" and "hd1" as well as BIOS drive numbers can now be used as BootDrive= settings.
Changes in v1.7.12 (12/05/2002) (brianp)
- Minor tweak to UI code to allow description
text to be displayed along with the progress
bar.
Changes in v1.7.11 (12/05/2002) (brianp)
- Added memory map count to GetBiosMemoryMap() so that
it doesn't just assume the size of the array.
- Fix so that we use the continuation value that
the BIOS returns.
Changes in v1.7.10 (11/24/2002) (brianp)
- Added assembler versions of memcmp() memcpy() memset()
- Implemented Int386() so that real-mode interrupts can be called from C-code
- Removed unnecessary call in DbgPrint() macro (freeldr.sys is ~16k smaller now)
- 64-bit lba sector addressing for disk calls
- Re-coded biosdisk.S as i386disk.c
- Re-coded mem.S as i386mem.c
- Re-coded rtlcode.S as i386rtl.c
- Cleaned up i386trap.S so that it only saves the registers once.
- Re-coded biosvid.S as i386vid.c
- Video fade in/out
- VESA text modes supported now
- Offscreen buffering to remove flicker
- Standardized format of boot sector so that BootPartition is stored right before 0xaa55
- Prefixed all file system functions with 'Fs'
Changes in v1.7.9 (9/30/2002) (brianp)
- Fix for bug in BiosInt13ReadExtended() (biosdisk.S)
by Christophe Bothamy & Mike Lerwill
Changes in v1.7.8 (9/7/2002) (ekohl)
- Added new 'bootcd' target.
- Removed/disabled debugging code.
- SetupLdr must not call BiosInt13ExtensionsSupported to check
extended int13 capabilities because they are already used to
boot a CD and some BIOSes return incorrect results when a CD-ROM
drive is checked.
Changes in v1.7.7 (9/5/2002) (ekohl)
- fs/iso.c: Got iso-fs working again.
- reactos/setupldr.c: Implemented very simple setup loader.
Changes in v1.7.6 (8/31/2002) (ekohl)
- bootsect/isoboot.asm: Reduced read transfer size to ensure that
the read buffer for an int13/ah=42h (exended read) does not
cross a segment boundary.
- freeldr.c, bootmgr.c, setupldr.c, makefile: Renamed
LoadBootManager() and ReactOSRunSetupLoader() to RunLoader().
Either bootmgr.o or setupldr.o is used to build freeldr.sys or
setupldr.sys
Changes in v1.7.5 (8/21/2002) (brianp)
- biosvid.S (BiosVideoDisableBlinkBit): Added code to
disable the blink bit in the text mode character
attribute byte so that the full range of
background colors can be used.
Changes in v1.7.4 (8/20/2002) (brianp)
- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
Changes in v1.7.2 (8/7/2002) (brianp)
- Fragment size must be equal to the block size
Changes in v1.7.1 (8/7/2002) (brianp)
- Symbolic links on EXT2/3 are now supported
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
Changes in v1.6.2 (7/28/2002) (brianp)
- Fix for GetFatEntry16 bug (fathelp.asm) by Mike Lerwill
Changes in v1.6.1 (7/22/2002) (brianp)
- Fix for disk caching while doing drive remapping
Changes in v1.6 (7/21/2002) (brianp)
- Added BIOS drive mapping functionality
Changes in v1.5 (7/13/2002)
- If symbols are available then pass them to the OS as multiboot modules
Changes in v1.4 (6/27/2002)
- Added separate configuration for a SETUPLDR version
Changes in v1.3.1 (6/8/2002)
- Implemented MmAllocateMemoryAtAddress()
- Fixed Linux boot code to go through the memory manager to allocate memory at 1MB
Changes in v1.3 (6/5/2002)
- Added protected mode exception handling in case FreeLoader crashes
- Reworked memory manager to use all of extended memory
- Reworked UI code, now supports multiple text-mode resolutions
Changes in v1.2.2 (5/4/2002)
- Fixed memory leak in menu.c
Changes in v1.2.1 (5/3/2002)
- Makefile updates
- Optimized the Makefile
- Removed recursive make functionality (builds much faster now)
- Places all output into one single directory
- Added automagically generated dependencies
Changes in v1.2 (4/30/2002)
- All Linux kernels are supported (zImage & bzImage, loaded high & low)
- Initrd support
- FreeLoader now compiles under Mingw32 instead of just DJGPP, but
the Mingw32 linker seems to output a corrupt binary.
Changes in v1.01 (4/28/2002)
- Fixed FAT short file name buffer overflow that was causing
some long filenames not to work correctly.
Changes in v1.0 (4/24/2002)
- FreeLoader version 1.0!
- Supports booting ReactOS
- Supports booting Linux bzImage kernels
- No initrd support (yet)
- No zImage support (yet)
- No ext2 file system support (yet)
- Supports FAT & ISO-9660 file systems
- Forward slashes '/' as well as backslashes '\' can be used
for path names in FAT & ISO-9600
- Fixed bug in LBA code where it was only reading one sector
even if you asked for more
- Fixed bug in FAT code, was also present in ISO-9660 code where
it wasn't incrementing the buffer address correctly

View File

@@ -1,413 +0,0 @@
#
# FreeLoader
# Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
#
# Choose various options
#
ifeq ($(HOST),mingw32-linux)
RM = rm -f
CP = cp -f
CC = mingw32-gcc
LD = mingw32-ld
AR = mingw32-ar
NM = mingw32-nm
MKDIR = mkdir
SEP = /
else
RM = cmd /C del
CP = copy /Y
CC = gcc
LD = ld
AR = ar
NM = nm
MKDIR = md
SEP = /
endif
#############################################
# CHANGE THESE FOR YOUR OUTPUT
#
TARGET = i386
# Debugging information on (bigger binary)
#DEBUG = yes
# Debugging information off (smaller binary)
DEBUG = no
OBJDIR = obj
OUTPUT_DIR = $(OBJDIR)$(SEP)$(TARGET)
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd
#############################################
# COMPILER AND LINKER PROGRAMS
#
TOOLSDIR = $(SRCDIR)$(SEP)..$(SEP)tools
RM = $(TOOLSDIR)$(SEP)rdel
CP = $(TOOLSDIR)$(SEP)rcopy
MKDIR = $(TOOLSDIR)$(SEP)rmkdir
RMDIR = $(TOOLSDIR)$(SEP)rrmdir
NASM_CMD = nasm
OBJCOPY = objcopy
DEPTOOL = $(TOOLSDIR)$(SEP)deptool
HOSTTOOL = $(TOOLSDIR)$(SEP)hosttype
TOOLS = $(DEPTOOL) $(HOSTTOOL)
HOSTTYPE = $(shell $(HOSTTOOL))
#-----------------------------------------------------------------------------------------------------
# TEST IF WE ARE IN THE TARGET DIRECTORY
# IF NOT WE WILL CHANGE TO THE TARGET DIRECTORY AND RUN MAKE FROM THERE
#-----------------------------------------------------------------------------------------------------
#ifeq (,$(filter $(CURDIR)$(SEP)$(OUTPUT_DIR),$(notdir $(CURDIR))))
ifneq ($(CURDIR), $(SRCDIR)$(SEP)$(OUTPUT_DIR))
SRCDIR = $(CURDIR)
.SUFFIXES:
#############################################
# VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE
#
MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \
-f ..$(SEP)..$(SEP)Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS)
.PHONY: CHANGE_TO_TARGET
CHANGE_TO_TARGET setupldr : BUILD_TOOLS $(OBJDIR) $(OBJDIR)$(SEP)$(TARGET)
@echo Calculating source file dependencies...
+@$(MAKETARGET)
.PHONY: BUILD_TOOLS
BUILD_TOOLS:
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
$(OBJDIR):
@echo Creating directory: $(OBJDIR)
@$(MKDIR) $(OBJDIR)
$(OBJDIR)$(SEP)$(TARGET): $(OBJDIR)
@echo Creating directory: $(OBJDIR)$(SEP)$(TARGET)
@$(MKDIR) $(OBJDIR)$(SEP)$(TARGET)
Makefile : ;
% :: CHANGE_TO_TARGET
#############################################
.PHONY : clean
clean:
@$(MAKE) --no-print-directory -C $(TOOLSDIR)
@echo Cleaning directory $(OBJDIR)$(SEP)$(TARGET)
@-$(RM) $(OBJDIR)$(SEP)$(TARGET)$(SEP)*
@echo Removing directory $(OBJDIR)$(SEP)$(TARGET)
@-$(RMDIR) $(OBJDIR)$(SEP)$(TARGET)
@-$(RMDIR) $(OBJDIR)
@echo Clean ALL done.
#############################################
.PHONY : bootcd
bootcd : bootcd_dirs setup_loader boot_loader
.PHONY : bootcd_dirs
bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader
.PHONY : boot_loader
boot_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.sys
$(CP) ..$(SEP)freeldr.ini $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.ini
.PHONY : setup_loader
setup_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)setupldr.sys
#############################################
#-----------------------------------------------------------------------------------------------------
# END MAGIC TARGET DIRECTORY CHANGE STUFF
#-----------------------------------------------------------------------------------------------------
else
#############################################
# COMPILER COMMAND LINE OPTIONS
#
COMPILER_OPTIONS = -Wall -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-inline -O1 -MD
# FreeLoader does not use any of the standard libraries, includes, or built-in functions
#############################################
# COMPILER DEFINES
#
ifeq ($(DEBUG),yes)
COMPILER_DEBUG_DEFINES = -DDEBUG
else
COMPILER_DEBUG_DEFINES =
endif
COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES)
#############################################
# INCLUDE DIRECTORY OPTIONS
#
COMPILER_INCLUDES = -I$(SRCDIR)$(SEP)include
#############################################
# COMPILER FLAGS
#
CFLAGS = $(COMPILER_OPTIONS) \
$(COMPILER_DEFINES) \
$(COMPILER_INCLUDES)
#############################################
# LINKER COMMAND LINE OPTIONS
#
#LINKER_OPTIONS = -N -Ttext=0x8000 --oformat=binary -s
LINKER_OPTIONS = -N -Ttext=0x8000
#############################################
# LINKER FLAGS
#
LFLAGS = $(LINKER_OPTIONS)
#############################################
# NASM FLAGS
#
ifeq ($(HOSTTYPE), dos)
NASMFLAGS = -f coff
else
ifeq ($(HOSTTYPE), win32)
NASMFLAGS = -f win32
else
NASMFLAGS = -f elf
endif
endif
#############################################
# LIST ALL THE OBJECT FILE GROUPS
#
# fathelp.o must come first in the link line because it contains bootsector helper code
# arch.o must come second in the link line because it contains the startup code
ARCH_OBJS = fathelp.o \
arch.o \
i386idt.o \
i386trap.o \
i386cpu.o \
i386pnp.o \
boot.o \
linux.o \
mb.o \
i386mem.o \
i386rtl.o \
i386vid.o \
drvmap.o \
int386.o \
i386disk.o \
portio.o \
hardware.o \
hwcpu.o \
_alloca.o # For Mingw32 builds
RTL_OBJS = print.o \
stdlib.o \
string.o \
list.o \
memcmp.o \
memcpy.o \
memmove.o \
memset.o
FS_OBJS = fs.o \
fat.o \
iso.o \
ext2.o \
fsrec.o
UI_OBJS = tui.o \
tuimenu.o \
ui.o \
gui.o
REACTOS_OBJS= arcname.o \
binhive.o \
registry.o
COMM_OBJS = rs232.o
DISK_OBJS = disk.o \
geometry.o \
partition.o
MM_OBJS = mm.o \
meminit.o
CACHE_OBJS = cache.o \
blocklist.o
INIFILE_OBJS= inifile.o \
ini_init.o \
parse.o
INFFILE_OBJS= inffile.o
VIDEO_OBJS = video.o \
vidmode.o \
fade.o \
palette.o \
pixel.o \
bank.o
# libgcc2.o contains code (__udivdi3, __umoddi3) necessary to do
# 64-bit division on the i386 (and other 32-bit) architectures
# This code was taken from the GCC v3.1 source
MATH_OBJS = libgcc2.o
BASE_OBJS = freeldr.o \
debug.o \
multiboot.o \
version.o
FREELDR_OBJS= bootmgr.o \
drivemap.o \
miscboot.o \
options.o \
linuxboot.o \
oslist.o \
custom.o
ROSLDR_OBJS = reactos.o
SETUPLDR_OBJS= setupldr.o
COMMON_OBJS = $(ARCH_OBJS) \
$(RTL_OBJS) \
$(FS_OBJS) \
$(UI_OBJS) \
$(REACTOS_OBJS) \
$(COMM_OBJS) \
$(DISK_OBJS) \
$(MM_OBJS) \
$(CACHE_OBJS) \
$(VIDEO_OBJS) \
$(MATH_OBJS) \
$(BASE_OBJS)
SPECIAL_OBJS = $(INIFILE_OBJS) \
$(INFFILE_OBJS) \
$(FREELDR_OBJS) \
$(ROSLDR_OBJS) \
$(SETUPLDR_OBJS)
F_OBJS = $(COMMON_OBJS) \
$(INIFILE_OBJS) \
$(ROSLDR_OBJS) \
$(FREELDR_OBJS)
S_OBJS = $(COMMON_OBJS) \
$(INIFILE_OBJS) \
$(INFFILE_OBJS) \
$(SETUPLDR_OBJS)
#############################################
# ALL THE OBJECTS
#
ALL_OBJS = $(COMMON_OBJS) \
$(SPECIAL_OBJS)
#############################################
# SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
#
VPATH = $(SRCDIR)$(SEP) \
$(SRCDIR)$(SEP)arch$(SEP)$(TARGET) \
$(SRCDIR)$(SEP)rtl \
$(SRCDIR)$(SEP)fs \
$(SRCDIR)$(SEP)ui \
$(SRCDIR)$(SEP)reactos \
$(SRCDIR)$(SEP)comm \
$(SRCDIR)$(SEP)disk \
$(SRCDIR)$(SEP)mm \
$(SRCDIR)$(SEP)cache \
$(SRCDIR)$(SEP)inifile \
$(SRCDIR)$(SEP)inffile \
$(SRCDIR)$(SEP)video \
$(SRCDIR)$(SEP)math \
$(SRCDIR)$(SEP)include
#############################################
all : freeldr.sys setupldr.sys
@echo Make ALL done.
#############################################
freeldr.sys : $(ALL_OBJS)
@echo ===================================================== LINKING $@
# @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(F_OBJS)
@$(LD) $(LFLAGS) -Map freeldr.map -o freeldr.exe $(F_OBJS)
# @$(CC) -Wl,-Ttext=0x8000,-N,-Map,freeldr.map -o freeldr.exe $(F_OBJS)
@$(NM) --numeric-sort freeldr.exe > freeldr.sym
@$(OBJCOPY) -O binary freeldr.exe freeldr.sys
#############################################
setupldr.sys : $(ALL_OBJS)
@echo ===================================================== LINKING $@
@$(LD) $(LFLAGS) -Map setupldr.map -o setupldr.exe $(S_OBJS)
@$(NM) --numeric-sort setupldr.exe > setupldr.sym
@$(OBJCOPY) -O binary setupldr.exe setupldr.sys
#############################################
%.o :: %.c
@echo ===================================================== Compiling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(DEPTOOL) $*.d
%.o :: %.S
@echo ===================================================== Assembling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(DEPTOOL) $*.d
%.o :: %.asm
@echo ===================================================== Assembling $*
@$(NASM_CMD) $(NASMFLAGS) -o $@ $<
#############################################
# Include the automagically generated dependencies
-include $(ALL_OBJS:%.o=%.d)
#############################################
endif

View File

@@ -1,33 +0,0 @@
/* stuff needed for libgcc on win32. */
/*#ifdef L_chkstk*/
#ifdef WIN32
.global ___chkstk
.global __alloca
___chkstk:
__alloca:
pushl %ecx /* save temp */
movl %esp,%ecx /* get sp */
addl $0x8,%ecx /* and point to return addr */
probe: cmpl $0x1000,%eax /* > 4k ?*/
jb done
subl $0x1000,%ecx /* yes, move pointer down 4k*/
orl $0x0,(%ecx) /* probe there */
subl $0x1000,%eax /* decrement count */
jmp probe /* and do it again */
done: subl %eax,%ecx
orl $0x0,(%ecx) /* less that 4k, just peek here */
movl %esp,%eax
movl %ecx,%esp /* decrement stack */
movl (%eax),%ecx /* recover saved temp */
movl 4(%eax),%eax /* get return address */
jmp *%eax
#endif

View File

@@ -1,335 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(RealEntryPoint)
cli
/* Setup segment registers */
xorw %ax,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Setup a stack */
movw stack16,%sp
sti
/* Init pmode */
call switch_to_prot
.code32
/* Store the boot drive */
movb %dl,(_BootDrive)
/* Store the boot partition */
movb %dh,(_BootPartition)
/* GO! */
call _BootMain
call switch_to_real
.code16
int $0x19
/* We should never get here */
stop:
jmp stop
nop
nop
/*
* Switches the processor to protected mode
* it destroys eax
*/
EXTERN(switch_to_prot)
.code16
cli /* None of these */
/* We don't know what values are currently */
/* in the segment registers. So we are */
/* going to reload them with sane values. */
/* Of course CS has to already be valid. */
/* We are currently in real-mode so we */
/* need real-mode segment values. */
movw $0x0000,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Get the return address off the stack */
popw (code32ret)
/* Save 16-bit stack pointer */
movw %sp,stack16
/* Load the GDT */
lgdt gdtptr
/* Load the IDT */
lidt i386idtptr
/* Enable Protected Mode */
mov %cr0,%eax
orl $CR0_PE_SET,%eax
mov %eax,%cr0
/* Clear prefetch queue & correct CS */
ljmp $PMODE_CS, $inpmode
.code32
inpmode:
/* Setup segment selectors */
movw $PMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
movl stack32,%esp
/* Put the return address back onto the stack */
pushl (code32ret)
/* Now return in p-mode! */
ret
/*
* Switches the processor back to real mode
* it destroys eax
*/
EXTERN(switch_to_real)
.code32
/* We don't know what values are currently */
/* in the segment registers. So we are */
/* going to reload them with sane values. */
/* Of course CS has to already be valid. */
/* We are currently in protected-mode so we */
/* need protected-mode segment values. */
movw $PMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Get the return address off the stack */
popl (code16ret)
/* Save 32-bit stack pointer */
movl %esp,stack32
/* jmp to 16-bit segment to set the limit correctly */
ljmp $RMODE_CS, $switch_to_real16
switch_to_real16:
.code16
/* Restore segment registers to correct limit */
movw $RMODE_DS,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Disable Protected Mode */
mov %cr0,%eax
andl $CR0_PE_CLR,%eax
mov %eax,%cr0
/* Clear prefetch queue & correct CS */
ljmp $0, $inrmode
inrmode:
movw %cs,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
movw %ax,%ss
/* Clear out the high 16-bits of ESP */
/* This is needed because I have one */
/* machine that hangs when booted to dos if */
/* anything other than 0x0000 is in the high */
/* 16-bits of ESP. Even though real-mode */
/* code should only use SP and not ESP. */
xorl %esp,%esp
movw stack16,%sp
/* Put the return address back onto the stack */
pushw (code16ret)
/* Load IDTR with real mode value */
lidt rmode_idtptr
sti /* These are ok now */
/* Now return in r-mode! */
ret
/*
* Needed for enabling the a20 address line
*/
.code16
empty_8042:
.word 0x00eb,0x00eb // jmp $+2, jmp $+2
inb $0x64,%al
testb $0x02,%al
jnz empty_8042
ret
/*
* Enable the A20 address line (to allow access to over 1mb)
*/
EXTERN(_EnableA20)
.code32
pushal
call switch_to_real
.code16
call empty_8042
movb $0xD1,%al // command write
outb %al,$0x64
call empty_8042
mov $0xDF,%al // A20 on
out %al,$0x60
call empty_8042
call switch_to_prot
.code32
popal
ret
/*
* Disable the A20 address line
*/
EXTERN(_DisableA20)
.code32
pushal
call switch_to_real
.code16
call empty_8042
movb $0xD1,%al // command write
outb %al,$0x64
call empty_8042
mov $0xDD,%al // A20 off
out %al,$0x60
call empty_8042
call switch_to_prot
.code32
popal
ret
/* 16-bit stack pointer */
stack16:
.word STACK16ADDR
/* 32-bit stack pointer */
stack32:
.long STACK32ADDR
/* 16-bit return address */
code16ret:
.long 0
/* 32-bit return address */
code32ret:
.long 0
.p2align 2 /* force 4-byte alignment */
gdt:
/* NULL Descriptor */
.word 0x0000
.word 0x0000
.word 0x0000
.word 0x0000
/* 32-bit flat CS */
.word 0xFFFF
.word 0x0000
.word 0x9A00
.word 0x00CF
/* 32-bit flat DS */
.word 0xFFFF
.word 0x0000
.word 0x9200
.word 0x00CF
/* 16-bit real mode CS */
.word 0xFFFF
.word 0x0000
.word 0x9E00
.word 0x0000
/* 16-bit real mode DS */
.word 0xFFFF
.word 0x0000
.word 0x9200
.word 0x0000
/* GDT table pointer */
gdtptr:
.word 0x27 /* Limit */
.long gdt /* Base Address */
/* Real-mode IDT pointer */
rmode_idtptr:
.word 0x3ff /* Limit */
.long 0 /* Base Address */
EXTERN(_BootDrive)
.long 0
EXTERN(_BootPartition)
.long 0

View File

@@ -1,62 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(_ChainLoadBiosBootSectorCode)
.code32
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x0000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x7C00,%sp
ljmpl $0x0000,$0x7C00
EXTERN(_SoftReboot)
.code32
call switch_to_real
.code16
movw $0x40,%ax
movw %ax,%ds
movw $0x72,%si
// Set the word at location 40:72 to 1234h
movw $0x1234,(%si)
// and jump to location FFFF:0 in ROM
ljmpl $0xFFFF,$0x0000

View File

@@ -1,132 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
EXTERN(_DriveMapInt13HandlerStart)
Int13Handler:
pushw %bp
movw %sp,%bp
pushw %ax
pushw %cx
pushw %si
cld
/* Get callers flags from stack */
movw 0x06(%bp),%ax
movw %ax,%cs:(CallersFlags - Int13Handler)
/* Save the drive number they passed in */
movb %dl,%cs:(PassedInDriveNumber - Int13Handler)
/* Now we need to perform the mapping */
xorw %cx,%cx
movw $(Int13HandlerMapCount - Int13Handler),%si
/* Get the count of drives in the map list */
movb %cs:(%si),%cl
incw %si
/* If the map list is empty then just call the old int 13h handler */
cmpb $0,%cl
jz CallOldInt13Handler
GetMappedDriveNumberLoop:
/* Get the next drive number in the list */
lodsw %cs:(%si),%ax
/* Check to see if it's the one they are calling int 13h for */
cmpb %al,%dl
/* If not get the next one */
jne GetMappedDriveNumberLoopNext
/* If we get here then we have found a mapped drive */
/* Send new drive number on to the old int 13h handler */
movb %ah,%dl
/* Call BIOS Int 13 Handler */
jmp CallOldInt13Handler
GetMappedDriveNumberLoopNext:
loop GetMappedDriveNumberLoop
CallOldInt13Handler:
/* Restore the registers we changed off the stack */
popw %si
popw %cx
popw %ax
/* Put flags onto stack */
pushw %cs:(CallersFlags - Int13Handler)
/* Call old int 13h handler with new drive number */
.byte 0x9a /* lcall */
EXTERN(_DriveMapOldInt13HandlerAddress)
.word 0
.word 0
/* Update the callers flags with the values the BIOS returned */
pushw %ax
pushf
popw %ax
movw %ax,0x06(%bp)
popw %ax
/* Restore the callers drive number */
movb %cs:(PassedInDriveNumber - Int13Handler),%dl
popw %bp
iret
CallersFlags:
.word 0
PassedInDriveNumber:
.byte 0
EXTERN(_DriveMapInt13HandlerMapList)
Int13HandlerMapCount:
.byte 0
Int13HandlerDrive1:
.byte 0
Int13HandlerDriveNew1:
.byte 0
Int13HandlerDrive2:
.byte 0
Int13HandlerDriveNew2:
.byte 0
Int13HandlerDrive3:
.byte 0
Int13HandlerDriveNew3:
.byte 0
Int13HandlerDrive4:
.byte 0
Int13HandlerDriveNew4:
.byte 0
EXTERN(_DriveMapInt13HandlerEnd)

View File

@@ -1,233 +0,0 @@
; FATHELP.ASM
; FAT12/16 Boot Sector Helper Code
; Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer
;org 8000h
segment .text
bits 16
BootSectorStackTop equ 0x7bf2
DataAreaStartHigh equ 0x2
DataAreaStartLow equ 0x4
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow equ 0x8
BiosCHSDriveSize equ 0x8
ReadSectorsOffset equ 0xa
ReadClusterOffset equ 0xc
PutCharsOffset equ 0xe
OEMName equ 3
BytesPerSector equ 11
SectsPerCluster equ 13
ReservedSectors equ 14
NumberOfFats equ 16
MaxRootEntries equ 17
TotalSectors equ 19
MediaDescriptor equ 21
SectorsPerFat equ 22
SectorsPerTrack equ 24
NumberOfHeads equ 26
HiddenSectors equ 28
TotalSectorsBig equ 32
BootDrive equ 36
Reserved equ 37
ExtendSig equ 38
SerialNumber equ 39
VolumeLabel equ 43
FileSystem equ 54
BootPartition equ 0x7dfd
; This code will be stored in the first 512 bytes
; of freeldr.sys. The first 3 bytes will be a jmp
; instruction to skip past the FAT helper code
; that is stored in the rest of the 512 bytes.
;
; This code is loaded at 0000:8000 so we have to
; encode a jmp instruction to jump to 0000:8200
global _mainCRTStartup ; For Mingw32 builds where the linker looks for this symbol
_mainCRTStartup:
global start
start:
db 0xe9
db 0xfd
db 0x01
; Now starts the extra boot code that we will store
; in the first 512 bytes of freeldr.sys. This code
; allows the FAT12/16 bootsector to navigate the
; FAT table so that we can still load freeldr.sys
; even if it is fragmented.
FatHelperEntryPoint:
push ax ; First save AX - the start cluster of freeldr.sys
; Display "Loading FreeLoader..." message
mov esi,msgLoading ; Loading message
call [bp-PutCharsOffset] ; Display it
call ReadFatIntoMemory
pop ax ; Restore AX (start cluster)
; AX has start cluster of freeldr.sys
mov bx,800h
mov es,bx
LoadFile:
push ax
call IsFat12
pop ax
jnc LoadFile2
cmp ax,0ff8h ; Check to see if this is the last cluster in the chain
jmp LoadFile3
LoadFile2:
cmp ax,0fff8h
LoadFile3:
jae LoadFile_Done ; If so continue, if not then read then next one
push ax
xor bx,bx ; Load ROSLDR starting at 0000:8000h
push es
call [bp-ReadClusterOffset]
pop es
xor bx,bx
mov bl,BYTE [BYTE bp+SectsPerCluster]
shl bx,5 ; BX = BX * 512 / 16
mov ax,es ; Increment the load address by
add ax,bx ; The size of a cluster
mov es,ax
call IsFat12
pop ax
push es
jnc LoadFile4
call GetFatEntry12 ; Get the next entry
jmp LoadFile5
LoadFile4:
call GetFatEntry16
LoadFile5:
pop es
jmp LoadFile ; Load the next cluster (if any)
LoadFile_Done:
mov dl,BYTE [BYTE bp+BootDrive] ; Load the boot drive into DL
mov dh,[BootPartition] ; Load the boot partition into DH
push WORD 0x0000
push WORD 0x8000 ; We will do a far return to 0000:8000h
retf ; Transfer control to ROSLDR
; Reads the entire FAT into memory at 7000:0000
ReadFatIntoMemory:
mov ax,WORD [BYTE bp+HiddenSectors]
mov dx,WORD [BYTE bp+HiddenSectors+2]
add ax,WORD [BYTE bp+ReservedSectors]
adc dx,byte 0
mov cx,WORD [BYTE bp+SectorsPerFat]
mov bx,7000h
mov es,bx
xor bx,bx
call [bp-ReadSectorsOffset]
ret
; Returns the FAT entry for a given cluster number for 16-bit FAT
; On entry AX has cluster number
; On return AX has FAT entry for that cluster
GetFatEntry16:
mov cx,2 ; AX = AX * 2 (since FAT16 entries are 2 bytes)
mul cx
shl dx,12
mov bx,7000h
add bx,dx
mov es,bx
mov bx,ax ; Restore FAT entry offset
mov ax,WORD [es:bx] ; Get FAT entry
ret
; Returns the FAT entry for a given cluster number for 12-bit FAT
; On entry AX has cluster number
; On return AX has FAT entry for that cluster
GetFatEntry12:
push ax
mov cx,ax
shr ax,1
add ax,cx ; AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits)
mov bx,7000h
mov es,bx
mov bx,ax ; Put FAT entry offset into BX
mov ax,WORD [es:bx] ; Get FAT entry
pop cx ; Get cluster number from stack
and cx,1
jz UseLow12Bits
and ax,0fff0h
shr ax,4
jmp GetFatEntry12_Done
UseLow12Bits:
and ax,0fffh
GetFatEntry12_Done:
ret
; Returns CF = 1 if this is a FAT12 file system
; Otherwise CF = 0 for FAT16
IsFat12:
mov ebx,DWORD [BYTE bp-DataAreaStartLow]
; EBX now has the number of the starting sector of the data area
; starting from the beginning of the disk, so subtrace hidden sectors
sub ebx,DWORD [BYTE bp+HiddenSectors]
xor eax,eax
mov ax,WORD [BYTE bp+TotalSectors]
cmp ax,byte 0
jnz IsFat12_2
mov eax,DWORD [BYTE bp+TotalSectorsBig]
; EAX now contains the number of sectors on the volume
IsFat12_2:
sub eax,ebx ; Subtract data area start sector
xor edx,edx ; from total sectors of volume
; EDX:EAX now contains the number of data sectors on the volume
movzx ebx,BYTE [BYTE bp+SectsPerCluster]
div ebx
; EAX now has the number of clusters on the volume
stc
cmp eax,4085
jb IsFat12_Done
clc
IsFat12_Done:
ret
msgLoading db 'Loading FreeLoader...',0dh,0ah,0
times 510-($-$$) db 0 ; Pad to 510 bytes
dw 0aa55h ; BootSector signature

File diff suppressed because it is too large Load Diff

View File

@@ -1,184 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2003 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __I386_HARDWARE_H_
#define __I386_HARDWARE_H_
typedef enum
{
InterfaceTypeUndefined = -1,
Internal,
Isa,
Eisa,
MicroChannel,
TurboChannel,
PCIBus,
VMEBus,
NuBus,
PCMCIABus,
CBus,
MPIBus,
MPSABus,
ProcessorInternal,
InternalPowerBus,
PNPISABus,
MaximumInterfaceType
} INTERFACE_TYPE, *PINTERFACE_TYPE;
typedef enum _CM_RESOURCE_TYPE
{
CmResourceTypeNull = 0,
CmResourceTypePort,
CmResourceTypeInterrupt,
CmResourceTypeMemory,
CmResourceTypeDma,
CmResourceTypeDeviceSpecific,
CmResourceTypeMaximum
} CM_RESOURCE_TYPE;
typedef enum _CM_SHARE_DISPOSITION
{
CmResourceShareUndetermined = 0,
CmResourceShareDeviceExclusive,
CmResourceShareDriverExclusive,
CmResourceShareShared
} CM_SHARE_DISPOSITION;
typedef U64 PHYSICAL_ADDRESS;
typedef struct
{
U8 Type;
U8 ShareDisposition;
U16 Flags;
union
{
struct
{
PHYSICAL_ADDRESS Start;
U32 Length;
} __attribute__((packed)) Port;
struct
{
U32 Level;
U32 Vector;
U32 Affinity;
} __attribute__((packed)) Interrupt;
struct
{
PHYSICAL_ADDRESS Start;
U32 Length;
} __attribute__((packed)) Memory;
struct
{
U32 Channel;
U32 Port;
U32 Reserved1;
} __attribute__((packed)) Dma;
struct
{
U32 DataSize;
U32 Reserved1;
U32 Reserved2;
} __attribute__((packed)) DeviceSpecificData;
} __attribute__((packed)) u;
} __attribute__((packed)) CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags */
#define CM_RESOURCE_PORT_MEMORY 0x0000
#define CM_RESOURCE_PORT_IO 0x0001
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
typedef struct
{
U16 Version;
U16 Revision;
U32 Count;
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
} __attribute__((packed))CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
typedef struct
{
INTERFACE_TYPE InterfaceType;
U32 BusNumber;
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
} __attribute__((packed)) CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
typedef struct _CM_COMPONENT_INFORMATION
{
U32 Flags;
U32 Version;
U32 Key;
U32 Affinity;
} __attribute__((packed)) CM_COMPONENT_INFORMATION, *PCM_COMPONENT_INFORMATION;
/* CM_COMPONENT_INFORMATION.Flags */
#define Failed 0x00000001
#define ReadOnly 0x00000002
#define Removable 0x00000004
#define ConsoleIn 0x00000008
#define ConsoleOut 0x00000010
#define Input 0x00000020
#define Output 0x00000040
/* PROTOTYPES ***************************************************************/
/* hardware.c */
VOID KeStallExecutionProcessor(U32 Microseconds);
VOID SetComponentInformation(HKEY ComponentKey,
U32 Flags,
U32 Key,
U32 Affinity);
/* hwcpu.c */
VOID DetectCPUs(HKEY SystemKey);
/* i386cpu.S */
U32 CpuidSupported(VOID);
VOID GetCpuid(U32 Level,
U32 *eax,
U32 *ebx,
U32 *ecx,
U32 *edx);
U64 RDTSC(VOID);
/* i386pnp.S */
U32 PnpBiosSupported(VOID);
U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize,
U32 *NodeCount);
U32 PnpBiosGetDeviceNode(U8 *NodeId,
U8 *NodeBuffer);
#endif /* __I386_HARDWARE_H_ */
/* EOF */

View File

@@ -1,635 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2003 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <rtl.h>
#include <debug.h>
#include <mm.h>
#include <portio.h>
#include "../../reactos/registry.h"
#include "hardware.h"
#define MP_FP_SIGNATURE 0x5F504D5F /* "_MP_" */
#define MP_CT_SIGNATURE 0x504D4350 /* "_MP_" */
typedef struct _MP_FLOATING_POINT_TABLE
{
U32 Signature; /* "_MP_" */
U32 PhysicalAddressPointer;
U8 Length;
U8 SpecRev;
U8 Checksum;
U8 FeatureByte[5];
} PACKED MP_FLOATING_POINT_TABLE, *PMP_FLOATING_POINT_TABLE;
typedef struct _MPS_CONFIG_TABLE_HEADER
{
U32 Signature; /* "PCMP" */
U16 BaseTableLength;
U8 SpecRev;
U8 Checksum;
U8 OemIdString[8];
U8 ProductIdString[12];
U32 OemTablePointer;
U16 OemTableLength;
U16 EntryCount;
U32 AddressOfLocalAPIC;
U16 ExtendedTableLength;
U8 ExtendedTableChecksum;
U8 Reserved;
} PACKED MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE;
typedef struct _MP_PROCESSOR_ENTRY
{
U8 EntryType;
U8 LocalApicId;
U8 LocalApicVersion;
U8 CpuFlags;
U32 CpuSignature;
U32 FeatureFlags;
U32 Reserved1;
U32 Reserved2;
} PACKED MP_PROCESSOR_ENTRY, *PMP_PROCESSOR_ENTRY;
/* FUNCTIONS ****************************************************************/
static U32
GetCpuSpeed(VOID)
{
U64 Timestamp1;
U64 Timestamp2;
U64 Diff;
/* Read TSC (Time Stamp Counter) */
Timestamp1 = RDTSC();
/* Wait for 0.1 seconds (= 100 milliseconds = 100000 microseconds)*/
KeStallExecutionProcessor(100000);
/* Read TSC (Time Stamp Counter) again */
Timestamp2 = RDTSC();
/* Calculate elapsed time (check for counter overrun) */
if (Timestamp2 > Timestamp1)
{
Diff = Timestamp2 - Timestamp1;
}
else
{
Diff = Timestamp2 + (((U64)-1) - Timestamp1);
}
return (U32)(Diff / 100000);
}
static VOID
DetectCPU(HKEY CpuKey,
HKEY FpuKey)
{
char VendorIdentifier[13];
char Identifier[64];
U32 FeatureSet;
HKEY CpuInstKey;
HKEY FpuInstKey;
U32 eax = 0;
U32 ebx = 0;
U32 ecx = 0;
U32 edx = 0;
U32 *Ptr;
S32 Error;
BOOL SupportTSC = FALSE;
U32 CpuSpeed;
/* Create the CPU instance key */
Error = RegCreateKey(CpuKey,
"0",
&CpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the FPU instance key */
Error = RegCreateKey(FpuKey,
"0",
&FpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
eax = CpuidSupported();
if (eax & 1)
{
DbgPrint((DPRINT_HWDETECT, "CPUID supported\n"));
/* Get vendor identifier */
GetCpuid(0, &eax, &ebx, &ecx, &edx);
VendorIdentifier[12] = 0;
Ptr = (U32*)&VendorIdentifier[0];
*Ptr = ebx;
Ptr++;
*Ptr = edx;
Ptr++;
*Ptr = ecx;
/* Get Identifier */
GetCpuid(1, &eax, &ebx, &ecx, &edx);
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(unsigned int)((eax >> 8) & 0x0F),
(unsigned int)((eax >> 4) & 0x0F),
(unsigned int)(eax & 0x0F));
FeatureSet = edx;
if (((eax >> 8) & 0x0F) >= 5)
SupportTSC = TRUE;
}
else
{
DbgPrint((DPRINT_HWDETECT, "CPUID not supported\n"));
strcpy(VendorIdentifier, "Unknown");
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(unsigned int)((eax >> 8) & 0x0F),
(unsigned int)((eax >> 4) & 0x0F),
(unsigned int)(eax & 0x0F));
FeatureSet = 0;
}
/* Set 'Conmponent Information' value (CPU and FPU) */
SetComponentInformation(CpuInstKey, 0, 0, 1);
SetComponentInformation(FpuInstKey, 0, 0, 1);
/* Set 'FeatureSet' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "FeatureSet: %x\n", FeatureSet));
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PU8)&FeatureSet,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'Identifier' value (CPU and FPU) */
DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier));
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'VendorIdentifier' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "Vendor Identifier: %s\n", VendorIdentifier));
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PU8)VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* FIXME: Set 'Update Signature' value (CPU only) */
/* FIXME: Set 'Update Status' value (CPU only) */
/* Set '~MHz' value (CPU only) */
if (SupportTSC)
{
CpuSpeed = GetCpuSpeed();
Error = RegSetValue(CpuInstKey,
"~MHz",
REG_DWORD,
(PU8)&CpuSpeed,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
}
}
static VOID
SetMpsProcessor(HKEY CpuKey,
HKEY FpuKey,
PMP_PROCESSOR_ENTRY CpuEntry)
{
char VendorIdentifier[13];
char Identifier[64];
char Buffer[8];
U32 FeatureSet;
HKEY CpuInstKey;
HKEY FpuInstKey;
U32 eax = 0;
U32 ebx = 0;
U32 ecx = 0;
U32 edx = 0;
U32 *Ptr;
S32 Error;
U32 CpuSpeed;
/* Get processor instance number */
sprintf(Buffer, "%u", CpuEntry->LocalApicId);
/* Create the CPU instance key */
Error = RegCreateKey(CpuKey,
Buffer,
&CpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the FPU instance key */
Error = RegCreateKey(FpuKey,
Buffer,
&FpuInstKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Get 'VendorIdentifier' */
GetCpuid(0, &eax, &ebx, &ecx, &edx);
VendorIdentifier[12] = 0;
Ptr = (U32*)&VendorIdentifier[0];
*Ptr = ebx;
Ptr++;
*Ptr = edx;
Ptr++;
*Ptr = ecx;
/* Get 'Identifier' */
sprintf(Identifier,
"x86 Family %u Model %u Stepping %u",
(U32)((CpuEntry->CpuSignature >> 8) & 0x0F),
(U32)((CpuEntry->CpuSignature >> 4) & 0x0F),
(U32)(CpuEntry->CpuSignature & 0x0F));
/* Get FeatureSet */
FeatureSet = CpuEntry->FeatureFlags;
/* Set 'Configuration Data' value (CPU and FPU) */
SetComponentInformation(CpuInstKey,
0,
CpuEntry->LocalApicId,
1 << CpuEntry->LocalApicId);
SetComponentInformation(FpuInstKey,
0,
CpuEntry->LocalApicId,
1 << CpuEntry->LocalApicId);
/* Set 'FeatureSet' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "FeatureSet: %x\n", FeatureSet));
Error = RegSetValue(CpuInstKey,
"FeatureSet",
REG_DWORD,
(PU8)&FeatureSet,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'Identifier' value (CPU and FPU) */
DbgPrint((DPRINT_HWDETECT, "Identifier: %s\n", Identifier));
Error = RegSetValue(CpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
Error = RegSetValue(FpuInstKey,
"Identifier",
REG_SZ,
(PU8)Identifier,
strlen(Identifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* Set 'VendorIdentifier' value (CPU only) */
DbgPrint((DPRINT_HWDETECT, "Vendor Identifier: %s\n", VendorIdentifier));
Error = RegSetValue(CpuInstKey,
"VendorIdentifier",
REG_SZ,
(PU8)VendorIdentifier,
strlen(VendorIdentifier) + 1);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
/* FIXME: Set 'Update Signature' value (CPU only) */
/* FIXME: Set 'Update Status' value (CPU only) */
/* Set '~MHz' value (CPU only) */
if (((CpuEntry->CpuSignature >> 8) & 0x0F) >= 5)
{
CpuSpeed = GetCpuSpeed();
Error = RegSetValue(CpuInstKey,
"~MHz",
REG_DWORD,
(PU8)&CpuSpeed,
sizeof(U32));
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
}
}
}
static PMP_FLOATING_POINT_TABLE
GetMpFloatingPointTable(VOID)
{
PMP_FLOATING_POINT_TABLE FpTable;
char *Ptr;
U8 Sum;
U32 Length;
U32 i;
FpTable = (PMP_FLOATING_POINT_TABLE)0xF0000;
while ((U32)FpTable < 0x100000)
{
if (FpTable->Signature == MP_FP_SIGNATURE)
{
Length = FpTable->Length * 0x10;
Ptr = (char *)FpTable;
Sum = 0;
for (i = 0; i < Length; i++)
{
Sum += Ptr[i];
}
DbgPrint((DPRINT_HWDETECT,
"Checksum: %u\n",
Sum));
if (Sum != 0)
{
DbgPrint((DPRINT_HWDETECT,
"Invalid MP floating point checksum: %u\n",
Sum));
return NULL;
}
return FpTable;
}
FpTable = (PMP_FLOATING_POINT_TABLE)((U32)FpTable + 0x10);
}
return NULL;
}
static PMP_CONFIGURATION_TABLE
GetMpConfigurationTable(PMP_FLOATING_POINT_TABLE FpTable)
{
PMP_CONFIGURATION_TABLE ConfigTable;
char *Ptr;
U8 Sum;
U32 Length;
U32 i;
if (FpTable->FeatureByte[0] != 0 ||
FpTable->PhysicalAddressPointer == 0)
return NULL;
ConfigTable = (PMP_CONFIGURATION_TABLE)FpTable->PhysicalAddressPointer;
if (ConfigTable->Signature != MP_CT_SIGNATURE)
return NULL;
DbgPrint((DPRINT_HWDETECT,
"MP Configuration Table at: %x\n",
(U32)ConfigTable));
/* Calculate base table checksum */
Length = ConfigTable->BaseTableLength;
Ptr = (char *)ConfigTable;
Sum = 0;
for (i = 0; i < Length; i++)
{
Sum += Ptr[i];
}
DbgPrint((DPRINT_HWDETECT,
"MP Configuration Table base checksum: %u\n",
Sum));
if (Sum != 0)
{
DbgPrint((DPRINT_HWDETECT,
"Invalid MP Configuration Table base checksum: %u\n",
Sum));
return NULL;
}
if (ConfigTable->ExtendedTableLength != 0)
{
/* FIXME: Check extended table */
}
return ConfigTable;
}
static BOOL
DetectMps(HKEY CpuKey,
HKEY FpuKey)
{
PMP_FLOATING_POINT_TABLE FpTable;
PMP_CONFIGURATION_TABLE ConfigTable;
PMP_PROCESSOR_ENTRY CpuEntry;
char *Ptr;
U32 Offset;
/* Get floating point table */
FpTable = GetMpFloatingPointTable();
if (FpTable == NULL)
return FALSE;
DbgPrint((DPRINT_HWDETECT,
"MP Floating Point Table at: %x\n",
(U32)FpTable));
if (FpTable->FeatureByte[0] == 0)
{
/* Get configuration table */
ConfigTable = GetMpConfigurationTable(FpTable);
if (ConfigTable == NULL)
{
DbgPrint((DPRINT_HWDETECT,
"Failed to find the MP Configuration Table\n"));
return FALSE;
}
Offset = sizeof(MP_CONFIGURATION_TABLE);
while (Offset < ConfigTable->BaseTableLength)
{
Ptr = (char*)((U32)ConfigTable + Offset);
switch (*Ptr)
{
case 0:
CpuEntry = (PMP_PROCESSOR_ENTRY)Ptr;
DbgPrint((DPRINT_HWDETECT, "Processor Entry\n"));
DbgPrint((DPRINT_HWDETECT,
"APIC Id %u APIC Version %u Flags %x Signature %x Feature %x\n",
CpuEntry->LocalApicId,
CpuEntry->LocalApicVersion,
CpuEntry->CpuFlags,
CpuEntry->CpuSignature,
CpuEntry->FeatureFlags));
DbgPrint((DPRINT_HWDETECT,
"Processor %u: x86 Family %u Model %u Stepping %u\n",
CpuEntry->LocalApicId,
(U32)((CpuEntry->CpuSignature >> 8) & 0x0F),
(U32)((CpuEntry->CpuSignature >> 4) & 0x0F),
(U32)(CpuEntry->CpuSignature & 0x0F)));
SetMpsProcessor(CpuKey, FpuKey, CpuEntry);
Offset += 0x14;
break;
case 1:
DbgPrint((DPRINT_HWDETECT, "Bus Entry\n"));
Offset += 0x08;
break;
case 2:
DbgPrint((DPRINT_HWDETECT, "I/0 APIC Entry\n"));
Offset += 0x08;
break;
case 3:
DbgPrint((DPRINT_HWDETECT, "I/0 Interrupt Assignment Entry\n"));
Offset += 0x08;
break;
case 4:
DbgPrint((DPRINT_HWDETECT, "Local Interrupt Assignment Entry\n"));
Offset += 0x08;
break;
default:
DbgPrint((DPRINT_HWDETECT, "Unknown Entry %u\n",(U32)*Ptr));
return FALSE;
}
}
}
else
{
DbgPrint((DPRINT_HWDETECT,
"Unsupported MPS configuration: %x\n",
FpTable->FeatureByte[0]));
/* FIXME: Identify default configurations */
return FALSE;
}
return TRUE;
}
VOID
DetectCPUs(HKEY SystemKey)
{
HKEY CpuKey;
HKEY FpuKey;
S32 Error;
/* Create the 'CentralProcessor' key */
Error = RegCreateKey(SystemKey,
"CentralProcessor",
&CpuKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Create the 'FloatingPointProcessor' key */
Error = RegCreateKey(SystemKey,
"FloatingPointProcessor",
&FpuKey);
if (Error != ERROR_SUCCESS)
{
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
return;
}
/* Detect CPUs */
if (!DetectMps(CpuKey, FpuKey))
{
DetectCPU(CpuKey, FpuKey);
}
}
/* EOF */

View File

@@ -1,131 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2003 Eric Kohl <ekohl@rz-online.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
/*
* U32 CpuidSupported(VOID);
*
* RETURNS:
* 0x00000001: CPU supports the CPUID instruction
* 0x00000300: Found 80386 CPU
* 0x00000400: Found 80486 CPU without CPUID support
*/
EXTERN(_CpuidSupported)
.code32
pushl %ecx /* save ECX */
pushfl /* push original EFLAGS */
popl %eax /* get original EFLAGS */
movl %eax,%ecx /* save original EFLAGS */
xorl $0x40000,%eax /* flip AC bit in EFLAGS */
pushl %eax /* save new EFLAGS value on stack */
popfl /* replace current EFLAGS value */
pushfl /* get new EFLAGS */
popl %eax /* store new EFLAGS in EAX */
xorl %ecx, %eax /* can't toggle AC bit, processor=80386 */
movl $0x300,%eax /* return processor id */
jz NoCpuid /* jump if 80386 processor */
pushl %ecx
popfl /* restore AC bit in EFLAGS first */
movl %ecx,%eax /* get original EFLAGS */
xorl $0x200000,%eax /* flip ID bit in EFLAGS */
pushl %eax /* save new EFLAGS value on stack */
popfl /* replace current EFLAGS value */
pushfl /* get new EFLAGS */
popl %eax /* store new EFLAGS in EAX */
xorl %ecx,%eax /* can't toggle ID bit, */
movl $0x400,%eax /* return processor id */
je NoCpuid /* processor=80486 */
movl $1,%eax /* CPUID supported */
NoCpuid:
pushl %ecx
popfl /* restore EFLAGS */
popl %ecx /* retore ECX */
ret
/*
* VOID GetCpuid(U32 Level, U32 *eax, U32 *ebx, U32 *ecx, U32 *edx);
*/
EXTERN(_GetCpuid)
.code32
pushl %ebp
movl %esp,%ebp
pushl %eax
pushl %ebx
pushl %ecx
pushl %edx
pushl %esi
movl 0x08(%ebp),%eax
cpuid
movl 0x0C(%ebp),%esi
movl %eax, (%esi)
movl 0x10(%ebp),%esi
movl %ebx, (%esi)
movl 0x14(%ebp),%esi
movl %ecx, (%esi)
movl 0x18(%ebp),%esi
movl %edx, (%esi)
popl %esi
popl %edx
popl %ecx
popl %ebx
popl %eax
movl %ebp,%esp
popl %ebp
ret
/*
* U64 RDTSC(VOID);
*/
EXTERN(_RDTSC)
.code32
rdtsc
ret
/* EOF */

View File

@@ -1,487 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <debug.h>
#include <portio.h>
typedef struct
{
U8 PacketSize; // 00h - Size of packet (10h or 18h)
U8 Reserved; // 01h - Reserved (0)
U16 LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD)
U16 TransferBufferOffset; // 04h - Transfer buffer offset (seg:off)
U16 TransferBufferSegment; // Transfer buffer segment (seg:off)
U64 LBAStartBlock; // 08h - Starting absolute block number
U64 TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer
// used if DWORD at 04h is FFFFh:FFFFh
} PACKED I386_DISK_ADDRESS_PACKET, *PI386_DISK_ADDRESS_PACKET;
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __i386__
BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %d%d SectorCount: %d Buffer: 0x%x\n", DriveNumber, (U32)SectorNumber, SectorCount, Buffer));
//
// Check to see if it is a fixed disk drive
// If so then check to see if Int13 extensions work
// If they do then use them, otherwise default back to BIOS calls
//
if ((DriveNumber >= 0x80) && DiskInt13ExtensionsSupported(DriveNumber))
{
DbgPrint((DPRINT_DISK, "Using Int 13 Extensions for read. DiskInt13ExtensionsSupported(%d) = %s\n", DriveNumber, DiskInt13ExtensionsSupported(DriveNumber) ? "TRUE" : "FALSE"));
//
// LBA is easy, nothing to calculate
// Just do the read
//
return DiskReadLogicalSectorsLBA(DriveNumber, SectorNumber, SectorCount, Buffer);
}
else
{
// LBA is not supported default to the CHS calls
return DiskReadLogicalSectorsCHS(DriveNumber, SectorNumber, SectorCount, Buffer);
}
return TRUE;
}
BOOL DiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
REGS RegsIn;
REGS RegsOut;
U32 RetryCount;
PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER);
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectorsLBA()\n"));
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
RegsIn.b.ah = 0x42; // Subfunction 42h
RegsIn.b.dl = DriveNumber; // Drive number in DL (0 - floppy, 0x80 - harddisk)
RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> disk address packet
RegsIn.w.si = BIOSCALLBUFOFFSET;
// Setup disk address packet
RtlZeroMemory(Packet, sizeof(I386_DISK_ADDRESS_PACKET));
Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET);
Packet->Reserved = 0;
Packet->LBABlockCount = SectorCount;
Packet->TransferBufferOffset = ((U32)Buffer) & 0x0F;
Packet->TransferBufferSegment = ((U32)Buffer) >> 4;
Packet->LBAStartBlock = SectorNumber;
Packet->TransferBuffer64 = 0;
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
// Return:
// CF clear if successful
// AH = 00h
// CF set on error
// AH = error code
// disk address packet's block count field set to the
// number of blocks successfully transferred
// Retry 3 times
for (RetryCount=0; RetryCount<3; RetryCount++)
{
Int386(0x13, &RegsIn, &RegsOut);
// If it worked return TRUE
if (INT386_SUCCESS(RegsOut))
{
return TRUE;
}
// If it was a corrected ECC error then the data is still good
else if (RegsOut.b.ah == 0x11)
{
return TRUE;
}
// If it failed the do the next retry
else
{
DiskResetController(DriveNumber);
continue;
}
}
// If we get here then the read failed
DiskError("Disk Read Failed", RegsOut.b.ah);
return FALSE;
}
BOOL DiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
{
U32 PhysicalSector;
U32 PhysicalHead;
U32 PhysicalTrack;
GEOMETRY DriveGeometry;
U32 NumberOfSectorsToRead;
REGS RegsIn;
REGS RegsOut;
U32 RetryCount;
DbgPrint((DPRINT_DISK, "DiskReadLogicalSectorsCHS()\n"));
//
// Get the drive geometry
//
if (!DiskGetDriveGeometry(DriveNumber, &DriveGeometry))
{
return FALSE;
}
while (SectorCount)
{
//
// Calculate the physical disk offsets
//
PhysicalSector = 1 + (SectorNumber % DriveGeometry.Sectors);
PhysicalHead = (SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads;
PhysicalTrack = (SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads;
//
// Calculate how many sectors we need to read this round
//
if (PhysicalSector > 1)
{
if (SectorCount >= (DriveGeometry.Sectors - (PhysicalSector - 1)))
NumberOfSectorsToRead = (DriveGeometry.Sectors - (PhysicalSector - 1));
else
NumberOfSectorsToRead = SectorCount;
}
else
{
if (SectorCount >= DriveGeometry.Sectors)
NumberOfSectorsToRead = DriveGeometry.Sectors;
else
NumberOfSectorsToRead = SectorCount;
}
//
// Make sure the read is within the geometry boundaries
//
if ((PhysicalHead >= DriveGeometry.Heads) ||
(PhysicalTrack >= DriveGeometry.Cylinders) ||
((NumberOfSectorsToRead + PhysicalSector) > (DriveGeometry.Sectors + 1)) ||
(PhysicalSector > DriveGeometry.Sectors))
{
DiskError("Disk read exceeds drive geometry limits.", 0);
return FALSE;
}
// BIOS Int 13h, function 2 - Read Disk Sectors
// AH = 02h
// AL = number of sectors to read (must be nonzero)
// CH = low eight bits of cylinder number
// CL = sector number 1-63 (bits 0-5)
// high two bits of cylinder (bits 6-7, hard disk only)
// DH = head number
// DL = drive number (bit 7 set for hard disk)
// ES:BX -> data buffer
// Return:
// CF set on error
// if AH = 11h (corrected ECC error), AL = burst length
// CF clear if successful
// AH = status
// AL = number of sectors transferred
// (only valid if CF set for some BIOSes)
RegsIn.b.ah = 0x02;
RegsIn.b.al = NumberOfSectorsToRead;
RegsIn.b.ch = (PhysicalTrack & 0xFF);
RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
RegsIn.b.dh = PhysicalHead;
RegsIn.b.dl = DriveNumber;
RegsIn.w.es = ((U32)Buffer) >> 4;
RegsIn.w.bx = ((U32)Buffer) & 0x0F;
//
// Perform the read
// Retry 3 times
//
for (RetryCount=0; RetryCount<3; RetryCount++)
{
Int386(0x13, &RegsIn, &RegsOut);
// If it worked break out
if (INT386_SUCCESS(RegsOut))
{
break;
}
// If it was a corrected ECC error then the data is still good
else if (RegsOut.b.ah == 0x11)
{
break;
}
// If it failed the do the next retry
else
{
DiskResetController(DriveNumber);
continue;
}
}
// If we retried 3 times then fail
if (RetryCount >= 3)
{
DiskError("Disk Read Failed", RegsOut.b.ah);
return FALSE;
}
// I have learned that not all bioses return
// the sector read count in the AL register (at least mine doesn't)
// even if the sectors were read correctly. So instead
// of checking the sector read count we will rely solely
// on the carry flag being set on error
Buffer += (NumberOfSectorsToRead * DriveGeometry.BytesPerSector);
SectorCount -= NumberOfSectorsToRead;
SectorNumber += NumberOfSectorsToRead;
}
return TRUE;
}
BOOL DiskResetController(U32 DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
DbgPrint((DPRINT_DISK, "DiskResetController(0x%x) DISK OPERATION FAILED -- RESETTING CONTROLLER\n", DriveNumber));
// BIOS Int 13h, function 0 - Reset disk system
// AH = 00h
// DL = drive (if bit 7 is set both hard disks and floppy disks reset)
// Return:
// AH = status
// CF clear if successful
// CF set on error
RegsIn.b.ah = 0x02;
RegsIn.b.dl = DriveNumber;
// Reset the disk controller
Int386(0x13, &RegsIn, &RegsOut);
return INT386_SUCCESS(RegsOut);
}
BOOL DiskInt13ExtensionsSupported(U32 DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
DbgPrint((DPRINT_DISK, "DiskInt13ExtensionsSupported()\n"));
// IBM/MS INT 13 Extensions - INSTALLATION CHECK
// AH = 41h
// BX = 55AAh
// DL = drive (80h-FFh)
// Return:
// CF set on error (extensions not supported)
// AH = 01h (invalid function)
// CF clear if successful
// BX = AA55h if installed
// AH = major version of extensions
// 01h = 1.x
// 20h = 2.0 / EDD-1.0
// 21h = 2.1 / EDD-1.1
// 30h = EDD-3.0
// AL = internal use
// CX = API subset support bitmap
// DH = extension version (v2.0+ ??? -- not present in 1.x)
//
// Bitfields for IBM/MS INT 13 Extensions API support bitmap
// Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
// Bit 1, removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h) supported
// Bit 2, enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
// extended drive parameter table is valid
// Bits 3-15 reserved
RegsIn.b.ah = 0x41;
RegsIn.w.bx = 0x55AA;
RegsIn.b.dl = DriveNumber;
// Reset the disk controller
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
// CF set on error (extensions not supported)
return FALSE;
}
if (RegsOut.w.bx != 0xAA55)
{
// BX = AA55h if installed
return FALSE;
}
// Note:
// The original check is too strict because some BIOSes report that
// extended disk access functions are not suported when booting
// from a CD (e.g. Phoenix BIOS v6.00PG). Argh!
#if 0
if (!(RegsOut.w.cx & 0x0001))
{
// CX = API subset support bitmap
// Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
return FALSE;
}
#endif
// Use this relaxed check instead
if (RegsOut.w.cx == 0x0000)
{
// CX = API subset support bitmap
return FALSE;
}
return TRUE;
}
VOID DiskStopFloppyMotor(VOID)
{
WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0);
}
BOOL DiskGetDriveParameters(U32 DriveNumber, PGEOMETRY Geometry)
{
REGS RegsIn;
REGS RegsOut;
U32 Cylinders;
DbgPrint((DPRINT_DISK, "DiskGetDriveParameters()\n"));
// BIOS Int 13h, function 08h - Get drive parameters
// AH = 08h
// DL = drive (bit 7 set for hard disk)
// ES:DI = 0000h:0000h to guard against BIOS bugs
// Return:
// CF set on error
// AH = status (07h)
// CF clear if successful
// AH = 00h
// AL = 00h on at least some BIOSes
// BL = drive type (AT/PS2 floppies only)
// CH = low eight bits of maximum cylinder number
// CL = maximum sector number (bits 5-0)
// high two bits of maximum cylinder number (bits 7-6)
// DH = maximum head number
// DL = number of drives
// ES:DI -> drive parameter table (floppies only)
RegsIn.b.ah = 0x08;
RegsIn.b.dl = DriveNumber;
RegsIn.w.es = 0x0000;
RegsIn.w.di = 0x0000;
// Get drive parameters
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
return FALSE;
}
Cylinders = (RegsOut.b.cl & 0xC0) << 2;
Cylinders += RegsOut.b.ch;
Cylinders++;
Geometry->Cylinders = Cylinders;
Geometry->Heads = RegsOut.b.dh + 1;
Geometry->Sectors = RegsOut.b.cl & 0x3F;
Geometry->BytesPerSector = 512; // Just assume 512 bytes per sector
return TRUE;
}
BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize)
{
REGS RegsIn;
REGS RegsOut;
PU16 Ptr = (PU16)(BIOSCALLBUFFER);
DbgPrint((DPRINT_DISK, "DiskGetExtendedDriveParameters()\n"));
// Initialize transfer buffer
*Ptr = BufferSize;
// BIOS Int 13h, function 48h - Get drive parameters
// AH = 48h
// DL = drive (bit 7 set for hard disk)
// DS:SI = result buffer
// Return:
// CF set on error
// AH = status (07h)
// CF clear if successful
// AH = 00h
// DS:SI -> result buffer
RegsIn.b.ah = 0x48;
RegsIn.b.dl = DriveNumber;
RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> result buffer
RegsIn.w.si = BIOSCALLBUFOFFSET;
// Get drive parameters
Int386(0x13, &RegsIn, &RegsOut);
if (!INT386_SUCCESS(RegsOut))
{
return FALSE;
}
memcpy(Buffer, Ptr, BufferSize);
return TRUE;
}
U32 DiskGetCacheableBlockCount(U32 DriveNumber)
{
GEOMETRY Geometry;
// Get the disk geometry
// If this fails then we will just return 1 sector to be safe
if (!DiskGetDriveParameters(DriveNumber, &Geometry))
{
return 1;
}
// If LBA is supported then the block size will be 64 sectors (32k)
// If not then the block size is the size of one track
if (DiskInt13ExtensionsSupported(DriveNumber))
{
return 64;
}
else
{
return Geometry.Sectors;
}
}
#endif // defined __i386__

View File

@@ -1,224 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
.p2align 2 /* force 4-byte alignment */
EXTERN(i386idt)
/* Exception 0 - Divide By Zero */
.word i386DivideByZero /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Flags, Zero Byte */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 1 - Debug Exception */
.word i386DebugException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 2 - NMI */
.word i386NMIException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 3 - Breakpoint (INT 3) */
.word i386Breakpoint /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 4 - Overflow (INTO with EFLAGS[OF] set) */
.word i386Overflow /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 5 - Bound Exception */
.word i386BoundException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 6 - Invalid Opcode */
.word i386InvalidOpcode /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 7 - FPU Not Available */
.word i386FPUNotAvailable /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 8 - Double Fault */
.word i386DoubleFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 9 - Coprocessor Segment Overrun */
.word i386CoprocessorSegment /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 10 (0x0A) - Invalid TSS */
.word i386InvalidTSS /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 11 (0x0B) - Segment Not Present */
.word i386SegmentNotPresent /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 12 (0x0C) - Stack Exception */
.word i386StackException /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 13 (0x0D) - General Protection Fault */
.word i386GeneralProtectionFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 14 (0x0E) - Page Fault */
.word i386PageFault /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 15 (0x0F) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 16 (0x10) - Coprocessor Error */
.word i386CoprocessorError /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 17 (0x11) - Alignment Check */
.word i386AlignmentCheck /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 18 (0x12) - Machine Check */
.word i386MachineCheck /* Offset 0 - 15 */
.word 0x0008 /* Selector */
.word 0x8e00 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 19 (0x13) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 20 (0x14) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 21 (0x15) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 22 (0x16) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 23 (0x17) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 24 (0x18) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 25 (0x19) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 26 (0x1A) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 27 (0x1B) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 28 (0x1C) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 29 (0x1D) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 30 (0x1E) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* Exception 31 (0x1F) - Reserved */
.word 0x0000 /* Offset 0 - 15 */
.word 0x0000 /* Selector */
.word 0x0000 /* Zero byte, flags */
.word 0x0000 /* Offset 16 - 31 */
/* IDT table pointer */
EXTERN(i386idtptr)
.word (i386idtptr-i386idt) /* Limit */
.long i386idt /* Base Address */

View File

@@ -1,216 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <rtl.h>
#include <portio.h>
U32 GetExtendedMemorySize(VOID)
{
REGS RegsIn;
REGS RegsOut;
U32 MemorySize;
DbgPrint((DPRINT_MEMORY, "GetExtendedMemorySize()\n"));
// Int 15h AX=E801h
// Phoenix BIOS v4.0 - GET MEMORY SIZE FOR >64M CONFIGURATIONS
//
// AX = E801h
// Return:
// CF clear if successful
// AX = extended memory between 1M and 16M, in K (max 3C00h = 15MB)
// BX = extended memory above 16M, in 64K blocks
// CX = configured memory 1M to 16M, in K
// DX = configured memory above 16M, in 64K blocks
// CF set on error
RegsIn.w.ax = 0xE801;
Int386(0x15, &RegsIn, &RegsOut);
DbgPrint((DPRINT_MEMORY, "Int15h AX=E801h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
DbgPrint((DPRINT_MEMORY, "BX = 0x%x\n", RegsOut.w.bx));
DbgPrint((DPRINT_MEMORY, "CX = 0x%x\n", RegsOut.w.cx));
DbgPrint((DPRINT_MEMORY, "DX = 0x%x\n", RegsOut.w.dx));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
if (INT386_SUCCESS(RegsOut))
{
// If AX=BX=0000h the use CX and DX
if (RegsOut.w.ax == 0)
{
// Return extended memory size in K
MemorySize = RegsOut.w.dx * 64;
MemorySize += RegsOut.w.cx;
return MemorySize;
}
else
{
// Return extended memory size in K
MemorySize = RegsOut.w.bx * 64;
MemorySize += RegsOut.w.ax;
return MemorySize;
}
}
// If we get here then Int15 Func E801h didn't work
// So try Int15 Func 88h
// Int 15h AH=88h
// SYSTEM - GET EXTENDED MEMORY SIZE (286+)
//
// AH = 88h
// Return:
// CF clear if successful
// AX = number of contiguous KB starting at absolute address 100000h
// CF set on error
// AH = status
// 80h invalid command (PC,PCjr)
// 86h unsupported function (XT,PS30)
RegsIn.b.ah = 0x88;
Int386(0x15, &RegsIn, &RegsOut);
DbgPrint((DPRINT_MEMORY, "Int15h AH=88h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n", RegsOut.w.ax));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n\n", (RegsOut.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
if (INT386_SUCCESS(RegsOut) && RegsOut.w.ax != 0)
{
MemorySize = RegsOut.w.ax;
return MemorySize;
}
// If we get here then Int15 Func 88h didn't work
// So try reading the CMOS
WRITE_PORT_UCHAR((PUCHAR)0x70, 0x31);
MemorySize = READ_PORT_UCHAR((PUCHAR)0x71);
MemorySize = (MemorySize & 0xFFFF);
MemorySize = (MemorySize << 8);
DbgPrint((DPRINT_MEMORY, "Int15h Failed\n"));
DbgPrint((DPRINT_MEMORY, "CMOS reports: 0x%x\n", MemorySize));
return MemorySize;
}
U32 GetConventionalMemorySize(VOID)
{
REGS Regs;
DbgPrint((DPRINT_MEMORY, "GetConventionalMemorySize()\n"));
// Int 12h
// BIOS - GET MEMORY SIZE
//
// Return:
// AX = kilobytes of contiguous memory starting at absolute address 00000h
//
// This call returns the contents of the word at 0040h:0013h;
// in PC and XT, this value is set from the switches on the motherboard
Regs.w.ax = 0;
Int386(0x12, &Regs, &Regs);
DbgPrint((DPRINT_MEMORY, "Int12h\n"));
DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n\n", Regs.w.ax));
return (U32)Regs.w.ax;
}
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize)
{
REGS Regs;
U32 MapCount;
DbgPrint((DPRINT_MEMORY, "GetBiosMemoryMap()\n"));
// Int 15h AX=E820h
// Newer BIOSes - GET SYSTEM MEMORY MAP
//
// AX = E820h
// EAX = 0000E820h
// EDX = 534D4150h ('SMAP')
// EBX = continuation value or 00000000h to start at beginning of map
// ECX = size of buffer for result, in bytes (should be >= 20 bytes)
// ES:DI -> buffer for result
// Return:
// CF clear if successful
// EAX = 534D4150h ('SMAP')
// ES:DI buffer filled
// EBX = next offset from which to copy or 00000000h if all done
// ECX = actual length returned in bytes
// CF set on error
// AH = error code (86h)
Regs.x.eax = 0x0000E820;
Regs.x.edx = 0x534D4150; // ('SMAP')
Regs.x.ebx = 0x00000000;
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
for (MapCount=0; MapCount<MaxMemoryMapSize; MapCount++)
{
Int386(0x15, &Regs, &Regs);
DbgPrint((DPRINT_MEMORY, "Memory Map Entry %d\n", MapCount));
DbgPrint((DPRINT_MEMORY, "Int15h AX=E820h\n"));
DbgPrint((DPRINT_MEMORY, "EAX = 0x%x\n", Regs.x.eax));
DbgPrint((DPRINT_MEMORY, "EBX = 0x%x\n", Regs.x.ebx));
DbgPrint((DPRINT_MEMORY, "ECX = 0x%x\n", Regs.x.ecx));
DbgPrint((DPRINT_MEMORY, "CF set = %s\n", (Regs.x.eflags & I386FLAG_CF) ? "TRUE" : "FALSE"));
// If the BIOS didn't return 'SMAP' in EAX then
// it doesn't support this call
if (Regs.x.eax != 0x534D4150)
{
break;
}
// Copy data to caller's buffer
RtlCopyMemory(&BiosMemoryMap[MapCount], (PVOID)BIOSCALLBUFFER, Regs.x.ecx);
DbgPrint((DPRINT_MEMORY, "BaseAddress: 0x%x%x\n", BiosMemoryMap[MapCount].BaseAddress));
DbgPrint((DPRINT_MEMORY, "Length: 0x%x%x\n", BiosMemoryMap[MapCount].Length));
DbgPrint((DPRINT_MEMORY, "Type: 0x%x\n", BiosMemoryMap[MapCount].Type));
DbgPrint((DPRINT_MEMORY, "Reserved: 0x%x\n", BiosMemoryMap[MapCount].Reserved));
DbgPrint((DPRINT_MEMORY, "\n"));
// If the continuation value is zero or the
// carry flag is set then this was
// the last entry so we're done
if (Regs.x.ebx == 0x00000000 || !INT386_SUCCESS(Regs))
{
MapCount++;
DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
break;
}
// Setup the registers for the next call
Regs.x.eax = 0x0000E820;
Regs.x.edx = 0x534D4150; // ('SMAP')
//Regs.x.ebx = 0x00000001; // Continuation value already set by the BIOS
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
}
return MapCount;
}

View File

@@ -1,257 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2003 Eric Kohl <ekohl@rz-online.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
/*
* U32 PnpBiosSupported(VOID);
*
* RETURNS:
*/
_pnp_bios_entry_point:
.long 0
_pnp_bios_data_segment:
.word 0
EXTERN(_PnpBiosSupported)
.code32
pushl %edi
pushl %esi
pushl %ecx
pushl %edx
xorl %edi,%edi
/* init esi */
movl $0xF0000,%esi
pnp_again:
movl (%esi),%eax
cmp $0x506E5024,%eax /* "$PnP" */
je pnp_found
cmp $0xFFFF0,%esi
je pnp_not_found
pnp_add:
addl $0x10,%esi
jmp pnp_again
pnp_found:
/* first calculate the checksum */
pushl %esi
pushl $0x21
popl %ecx
xorl %edx, %edx
pnp_loop:
lodsb
addb %al,%dl
loopl pnp_loop
testb %dl, %dl
popl %esi
jnz pnp_add
movl %esi,%edi
/* Calculate the bios entry point (far pointer) */
xorl %eax,%eax
movw 0x0F(%esi),%ax
shll $16,%eax
movw 0x0D(%esi),%ax
movl %eax,_pnp_bios_entry_point
/* Store bios data segment */
movw 0x1B(%esi),%ax
movw %ax,_pnp_bios_data_segment
pnp_not_found:
movl %edi,%eax
popl %edx
popl %ecx
popl %esi
popl %edi
ret
/*
* U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, U32 *NodeCount);
*
* RETURNS:
*/
_pnp_result:
.long 0
_pnp_node_size:
.word 0
_pnp_node_count:
.word 0
EXTERN(_PnpBiosGetDeviceNodeCount)
.code32
pushl %ebp
movl %esp,%ebp
pushal
push %es
call switch_to_real
.code16
movw _pnp_bios_data_segment,%ax
pushw %ax
pushw %cs
movw $(_pnp_node_size),%ax
pushw %ax
pushw %cs
movw $(_pnp_node_count),%ax
pushw %ax
pushw $0
lcall *_pnp_bios_entry_point
addw $12,%sp
movzwl %ax,%ecx
movl %ecx,_pnp_result
call switch_to_prot
.code32
movl 0x08(%ebp),%esi
movw _pnp_node_size,%ax
movzwl %ax,%ecx
movl %ecx, (%esi)
movl 0x0C(%ebp),%esi
movw _pnp_node_count,%ax
movzwl %ax,%ecx
movl %eax, (%esi)
pop %es
popal
movl %ebp,%esp
popl %ebp
movl _pnp_result,%eax
ret
/*
* U32 PnpBiosGetDeviceNode(U8 *NodeId, U8 *NodeBuffer);
*
* RETURNS:
*/
_pnp_buffer_segment:
.word 0
_pnp_buffer_offset:
.word 0
_pnp_node_number:
.byte 0
EXTERN(_PnpBiosGetDeviceNode)
.code32
pushl %ebp
movl %esp,%ebp
pushal
push %es
/* get current node number */
movl 0x08(%ebp),%esi
movb (%esi),%al
movb %al,_pnp_node_number
/* convert pointer to node buffer to segment/offset */
movl 0x0C(%ebp),%eax
shrl $4,%eax
andl $0xf000,%eax
movw %ax,_pnp_buffer_segment
movl 0x0C(%ebp),%eax
andl $0xffff,%eax
movw %ax,_pnp_buffer_offset
call switch_to_real
.code16
/* push bios segment */
movw _pnp_bios_data_segment,%ax
pushw %ax
/* push control flag */
pushw $0x0001
/* push pointer to node buffer (segment/offset) */
movw _pnp_buffer_segment,%ax
pushw %ax
movw _pnp_buffer_offset,%ax
pushw %ax
/* push pointer to node number (segment/offset) */
pushw %cs
movw $(_pnp_node_number),%ax
pushw %ax
/* push function number */
pushw $1
/* call entry point */
lcall *_pnp_bios_entry_point
addw $14,%sp
movzwl %ax,%ecx
movl %ecx,_pnp_result
call switch_to_prot
.code32
/* update node number */
movl 0x08(%ebp),%esi
movb _pnp_node_number,%al
movb %al,(%esi)
pop %es
popal
movl %ebp,%esp
popl %ebp
movl _pnp_result,%eax
ret
/* EOF */

View File

@@ -1,396 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <rtl.h>
#include <portio.h>
void putchar(int ch)
{
REGS Regs;
/* If we are displaying a CR '\n' then do a LF also */
if (ch == '\n')
{
/* Display the LF */
putchar('\r');
}
/* If we are displaying a TAB '\t' then display 8 spaces ' ' */
if (ch == '\t')
{
/* Display the 8 spaces ' ' */
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
putchar(' ');
return;
}
// Int 10h AH=0Eh
// VIDEO - TELETYPE OUTPUT
//
// AH = 0Eh
// AL = character to write
// BH = page number
// BL = foreground color (graphics modes only)
Regs.b.ah = 0x0E;
Regs.b.al = ch;
Regs.w.bx = 1;
Int386(0x10, &Regs, &Regs);
}
int kbhit(void)
{
REGS Regs;
// Int 16h AH=01h
// KEYBOARD - CHECK FOR KEYSTROKE
//
// AH = 01h
// Return:
// ZF set if no keystroke available
// ZF clear if keystroke available
// AH = BIOS scan code
// AL = ASCII character
Regs.b.ah = 0x01;
Int386(0x16, &Regs, &Regs);
if (Regs.x.eflags & I386FLAG_ZF)
{
return 0;
}
return 1;
}
int getch(void)
{
REGS Regs;
static BOOL ExtendedKey = FALSE;
static char ExtendedScanCode = 0;
// If the last time we were called an
// extended key was pressed then return
// that keys scan code.
if (ExtendedKey)
{
ExtendedKey = FALSE;
return ExtendedScanCode;
}
// Int 16h AH=00h
// KEYBOARD - GET KEYSTROKE
//
// AH = 00h
// Return:
// AH = BIOS scan code
// AL = ASCII character
Regs.b.ah = 0x00;
Int386(0x16, &Regs, &Regs);
// Check for an extended keystroke
if (Regs.b.al == 0)
{
ExtendedKey = TRUE;
ExtendedScanCode = Regs.b.ah;
}
// Return keystroke
return Regs.b.al;
}
int getyear(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
U16 Cent1;
U16 Cent2;
U16 Year;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.cl & 0x0F;
Digit2 = ((Regs.b.cl >> 4) & 0x0F) * 10;
Cent1 = Regs.b.ch & 0x0F;
Cent2 = ((Regs.b.ch >> 4) & 0x0F) * 10;
Year = Cent1 + Cent2;
Year *= 100;
Year += Digit1 + Digit2;
return Year;
}
int getday(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dl & 0x0F;
Digit2 = ((Regs.b.dl >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getmonth(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes, such es the 1998/07/25 system ROM
// in the Compaq Deskpro EP/SB, leave CF unchanged
// if successful, so CF should be cleared before
// calling this function.
__asm__ ("clc");
// Int 1Ah AH=04h
// TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
//
// AH = 04h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = century (BCD)
// CL = year (BCD)
// DH = month (BCD)
// DL = day (BCD)
// CF set on error
Regs.b.ah = 0x04;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dh & 0x0F;
Digit2 = ((Regs.b.dh >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int gethour(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.ch & 0x0F;
Digit2 = ((Regs.b.ch >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getminute(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.cl & 0x0F;
Digit2 = ((Regs.b.cl >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
int getsecond(void)
{
REGS Regs;
U16 Digit1;
U16 Digit2;
// Some BIOSes leave CF unchanged if successful,
// so CF should be cleared before calling this function.
__asm__ ("clc");
// Int 1Ah AH=02h
// TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
//
// AH = 02h
// CF clear to avoid bug
// Return:
// CF clear if successful
// CH = hour (BCD)
// CL = minutes (BCD)
// DH = seconds (BCD)
// DL = daylight savings flag (00h standard time, 01h daylight time)
// CF set on error (i.e. clock not running or in middle of update)
Regs.b.ah = 0x02;
Int386(0x1A, &Regs, &Regs);
/* Convert from BCD to normal */
Digit1 = Regs.b.dh & 0x0F;
Digit2 = ((Regs.b.dh >> 4) & 0x0F) * 10;
return (Digit1 + Digit2);
}
void beep(void)
{
sound(700);
delay(200);
sound(0);
}
void delay(unsigned msec)
{
REGS Regs;
unsigned usec;
unsigned msec_this;
// Int 15h AH=86h
// BIOS - WAIT (AT,PS)
//
// AH = 86h
// CX:DX = interval in microseconds
// Return:
// CF clear if successful (wait interval elapsed)
// CF set on error or AH=83h wait already in progress
// AH = status (see #00496)
// Note: The resolution of the wait period is 977 microseconds on
// many systems because many BIOSes use the 1/1024 second fast
// interrupt from the AT real-time clock chip which is available on INT 70;
// because newer BIOSes may have much more precise timers available, it is
// not possible to use this function accurately for very short delays unless
// the precise behavior of the BIOS is known (or found through testing)
while (msec)
{
msec_this = msec;
if (msec_this > 4000)
{
msec_this = 4000;
}
usec = msec_this * 1000;
Regs.b.ah = 0x86;
Regs.w.cx = usec >> 16;
Regs.w.dx = usec & 0xffff;
Int386(0x15, &Regs, &Regs);
msec -= msec_this;
}
}
void sound(int freq)
{
int scale;
if (freq == 0)
{
WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) & ~3);
return;
}
scale = 1193046 / freq;
WRITE_PORT_UCHAR((PUCHAR)0x43, 0xb6);
WRITE_PORT_UCHAR((PUCHAR)0x42, scale & 0xff);
WRITE_PORT_UCHAR((PUCHAR)0x42, scale >> 8);
WRITE_PORT_UCHAR((PUCHAR)0x61, READ_PORT_UCHAR((PUCHAR)0x61) | 3);
}

View File

@@ -1,931 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
#include <version.h>
.macro SAVE_CPU_REGS
movl %eax,i386_EAX
movl %ebx,i386_EBX
movl %ecx,i386_ECX
movl %edx,i386_EDX
movl %esp,i386_ESP
movl %ebp,i386_EBP
movl %esi,i386_ESI
movl %edi,i386_EDI
movw %ds,%ax
movw %ax,i386_DS
movw %es,%ax
movw %ax,i386_ES
movw %fs,%ax
movw %ax,i386_FS
movw %gs,%ax
movw %ax,i386_GS
movw %ss,%ax
movw %ax,i386_SS
popl %eax
movl %eax,i386_EIP
popl %eax
movw %ax,i386_CS
popl %eax
movl %eax,i386_EFLAGS
movl %cr0,%eax
movl %eax,i386_CR0
//movl %cr1,%eax
//movl %eax,i386_CR1
movl %cr2,%eax
movl %eax,i386_CR2
movl %cr3,%eax
movl %eax,i386_CR3
movl %dr0,%eax
movl %eax,i386_DR0
movl %dr1,%eax
movl %eax,i386_DR1
movl %dr2,%eax
movl %eax,i386_DR2
movl %dr3,%eax
movl %eax,i386_DR3
movl %dr6,%eax
movl %eax,i386_DR6
movl %dr7,%eax
movl %eax,i386_DR7
sgdt i386_GDTR
sidt i386_IDTR
sldt i386_LDTR
str i386_TR
.endm
i386ExceptionHandlerText:
.ascii "FreeLoader i386 Exception Handler\n"
.ascii VERSION
.ascii "\n"
// .asciz "Report bugs to Brian Palmer <brianp@reactos.org>\n\n"
.asciz "Report bugs to ReactOS Kernel mailing list <ros-kernel@reactos.com>\n\n"
i386DivideByZeroText:
.asciz "Exception 00: DIVIDE BY ZERO\n\n"
i386DebugExceptionText:
.asciz "Exception 01: DEBUG EXCEPTION\n\n"
i386NMIExceptionText:
.asciz "Exception 02: NON-MASKABLE INTERRUPT EXCEPTION\n\n"
i386BreakpointText:
.asciz "Exception 03: BREAKPOINT (INT 3)\n\n"
i386OverflowText:
.asciz "Exception 04: OVERFLOW\n\n"
i386BoundExceptionText:
.asciz "Exception 05: BOUND EXCEPTION\n\n"
i386InvalidOpcodeText:
.asciz "Exception 06: INVALID OPCODE\n\n"
i386FPUNotAvailableText:
.asciz "Exception 07: FPU NOT AVAILABLE\n\n"
i386DoubleFaultText:
.asciz "Exception 08: DOUBLE FAULT\n\n"
i386CoprocessorSegmentText:
.asciz "Exception 09: COPROCESSOR SEGMENT OVERRUN\n\n"
i386InvalidTSSText:
.asciz "Exception 0A: INVALID TSS\n\n"
i386SegmentNotPresentText:
.asciz "Exception 0B: SEGMENT NOT PRESENT\n\n"
i386StackExceptionText:
.asciz "Exception 0C: STACK EXCEPTION\n\n"
i386GeneralProtectionFaultText:
.asciz "Exception 0D: GENERAL PROTECTION FAULT\n\n"
i386PageFaultText:
.asciz "Exception 0E: PAGE FAULT\n\n"
i386CoprocessorErrorText:
.asciz "Exception 10: COPROCESSOR ERROR\n\n"
i386AlignmentCheckText:
.asciz "Exception 11: ALIGNMENT CHECK\n\n"
i386MachineCheckText:
.asciz "Exception 12: MACHINE CHECK\n\n"
i386_EAX_Text:
.asciz "EAX: "
i386_EBX_Text:
.asciz "EBX: "
i386_ECX_Text:
.asciz "ECX: "
i386_EDX_Text:
.asciz "EDX: "
i386_ESP_Text:
.asciz " ESP: "
i386_EBP_Text:
.asciz " EBP: "
i386_ESI_Text:
.asciz " ESI: "
i386_EDI_Text:
.asciz " EDI: "
i386_CS_Text:
.asciz "CS: "
i386_DS_Text:
.asciz "DS: "
i386_ES_Text:
.asciz "ES: "
i386_FS_Text:
.asciz "FS: "
i386_GS_Text:
.asciz "GS: "
i386_SS_Text:
.asciz "SS: "
i386_EFLAGS_Text:
.asciz " EFLAGS: "
i386_EIP_Text:
.asciz " EIP: "
i386_ERROR_CODE_Text:
.asciz " ERROR CODE: "
i386_CR0_Text:
.asciz " CR0: "
i386_CR1_Text:
.asciz " CR1: "
i386_CR2_Text:
.asciz " CR2: "
i386_CR3_Text:
.asciz " CR3: "
i386_DR0_Text:
.asciz " DR0: "
i386_DR1_Text:
.asciz " DR1: "
i386_DR2_Text:
.asciz " DR2: "
i386_DR3_Text:
.asciz " DR3: "
i386_DR6_Text:
.asciz " DR6: "
i386_DR7_Text:
.asciz " DR7: "
i386_GDTR_Text:
.asciz " GDTR Base: "
i386_IDTR_Text:
.asciz " IDTR Base: "
i386_Limit_Text:
.asciz " Limit: "
i386_LDTR_Text:
.asciz " LDTR: "
i386_TR_Text:
.asciz " TR: "
/* Set by each exception handler to the address of the description text */
i386ExceptionDescriptionText:
.long 0
/* Used to store the contents of all the registers when an exception occurs */
i386_EAX:
.long 0
i386_EBX:
.long 0
i386_ECX:
.long 0
i386_EDX:
.long 0
i386_ESP:
.long 0
i386_EBP:
.long 0
i386_ESI:
.long 0
i386_EDI:
.long 0
i386_CS:
.word 0
i386_DS:
.word 0
i386_ES:
.word 0
i386_FS:
.word 0
i386_GS:
.word 0
i386_SS:
.word 0
i386_EFLAGS:
.long 0
i386_EIP:
.long 0
i386_ERROR_CODE:
.long 0
i386_CR0:
.long 0
i386_CR1:
.long 0
i386_CR2:
.long 0
i386_CR3:
.long 0
i386_DR0:
.long 0
i386_DR1:
.long 0
i386_DR2:
.long 0
i386_DR3:
.long 0
i386_DR6:
.long 0
i386_DR7:
.long 0
i386_GDTR:
.word 0
.long 0
i386_IDTR:
.word 0
.long 0
i386_LDTR:
.word 0
i386_TR:
.word 0
/* Used to store the current X and Y position on the screen */
i386_ScreenPosX:
.long 0
i386_ScreenPosY:
.long 0
/************************************************************************/
i386CommonExceptionHandler:
.code32
SAVE_CPU_REGS
call i386ClearScreenToBlue
movl $i386ExceptionHandlerText,%esi
call i386PrintText
movl i386ExceptionDescriptionText,%esi
call i386PrintText
movl $i386_EAX_Text,%esi
call i386PrintText
movl i386_EAX,%eax
call i386PrintHexDword // Display EAX
movl $i386_ESP_Text,%esi
call i386PrintText
movl i386_ESP,%eax
call i386PrintHexDword // Display ESP
movl $i386_CR0_Text,%esi
call i386PrintText
movl i386_CR0,%eax
call i386PrintHexDword // Display CR0
movl $i386_DR0_Text,%esi
call i386PrintText
movl i386_DR0,%eax
call i386PrintHexDword // Display DR0
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_EBX_Text,%esi
call i386PrintText
movl i386_EBX,%eax
call i386PrintHexDword // Display EBX
movl $i386_EBP_Text,%esi
call i386PrintText
movl i386_EBP,%eax
call i386PrintHexDword // Display EBP
movl $i386_CR1_Text,%esi
call i386PrintText
movl i386_CR1,%eax
call i386PrintHexDword // Display CR1
movl $i386_DR1_Text,%esi
call i386PrintText
movl i386_DR1,%eax
call i386PrintHexDword // Display DR1
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_ECX_Text,%esi
call i386PrintText
movl i386_ECX,%eax
call i386PrintHexDword // Display ECX
movl $i386_ESI_Text,%esi
call i386PrintText
movl i386_ESI,%eax
call i386PrintHexDword // Display ESI
movl $i386_CR2_Text,%esi
call i386PrintText
movl i386_CR2,%eax
call i386PrintHexDword // Display CR2
movl $i386_DR2_Text,%esi
call i386PrintText
movl i386_DR2,%eax
call i386PrintHexDword // Display DR2
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_EDX_Text,%esi
call i386PrintText
movl i386_EDX,%eax
call i386PrintHexDword // Display EDX
movl $i386_EDI_Text,%esi
call i386PrintText
movl i386_EDI,%eax
call i386PrintHexDword // Display EDI
movl $i386_CR3_Text,%esi
call i386PrintText
movl i386_CR3,%eax
call i386PrintHexDword // Display CR3
movl $i386_DR3_Text,%esi
call i386PrintText
movl i386_DR3,%eax
call i386PrintHexDword // Display DR3
incl i386_ScreenPosY
movl $55,i386_ScreenPosX
movl $i386_DR6_Text,%esi
call i386PrintText
movl i386_DR6,%eax
call i386PrintHexDword // Display DR6
incl i386_ScreenPosY
movl $55,i386_ScreenPosX
movl $i386_DR7_Text,%esi
call i386PrintText
movl i386_DR7,%eax
call i386PrintHexDword // Display DR7
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
incl i386_ScreenPosY
movl $i386_CS_Text,%esi
call i386PrintText
movw i386_CS,%ax
call i386PrintHexWord // Display CS
movl $i386_EIP_Text,%esi
call i386PrintText
movl i386_EIP,%eax
call i386PrintHexDword // Display EIP
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_DS_Text,%esi
call i386PrintText
movw i386_DS,%ax
call i386PrintHexWord // Display DS
movl $i386_ERROR_CODE_Text,%esi
call i386PrintText
movl i386_ERROR_CODE,%eax
call i386PrintHexDword // Display ERROR CODE
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_ES_Text,%esi
call i386PrintText
movw i386_ES,%ax
call i386PrintHexWord // Display ES
movl $i386_EFLAGS_Text,%esi
call i386PrintText
movl i386_EFLAGS,%eax
call i386PrintHexDword // Display EFLAGS
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_FS_Text,%esi
call i386PrintText
movw i386_FS,%ax
call i386PrintHexWord // Display FS
movl $i386_GDTR_Text,%esi
call i386PrintText
movl i386_GDTR+2,%eax
call i386PrintHexDword // Display GDTR Base
movl $i386_Limit_Text,%esi
call i386PrintText
movw i386_GDTR,%ax
call i386PrintHexWord // Display GDTR Limit
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_GS_Text,%esi
call i386PrintText
movw i386_GS,%ax
call i386PrintHexWord // Display GS
movl $i386_IDTR_Text,%esi
call i386PrintText
movl i386_IDTR+2,%eax
call i386PrintHexDword // Display IDTR Base
movl $i386_Limit_Text,%esi
call i386PrintText
movw i386_IDTR,%ax
call i386PrintHexWord // Display IDTR Limit
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
movl $i386_SS_Text,%esi
call i386PrintText
movw i386_SS,%ax
call i386PrintHexWord // Display SS
movl $i386_LDTR_Text,%esi
call i386PrintText
movw i386_LDTR,%ax
call i386PrintHexWord // Display LDTR
movl $i386_TR_Text,%esi
call i386PrintText
movw i386_TR,%ax
call i386PrintHexWord // Display TR
movl $0,i386_ScreenPosX
incl i386_ScreenPosY
incl i386_ScreenPosY
i386ExceptionHandlerHang:
jmp i386ExceptionHandlerHang
iret
/************************************************************************/
i386ClearScreenToBlue:
.code32
cld
movw $0x1F20,%ax
movl $0xB0000,%edi
movl $0x8000,%ecx
rep stosw
ret
/************************************************************************/
/* ESI = Address of text to display */
/************************************************************************/
i386PrintText:
.code32
i386PrintTextLoop:
lodsb
// Check for end of string char
cmp $0,%al
je i386PrintTextDone
// Check for newline char
cmp $0x0a,%al
jne i386PrintTextLoop2
incl i386_ScreenPosY
movl $0,i386_ScreenPosX
jmp i386PrintTextLoop
i386PrintTextLoop2:
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
jmp i386PrintTextLoop
i386PrintTextDone:
ret
/************************************************************************/
/* On return EDI = Address of next char in screen memory */
/************************************************************************/
i386PrintTextCalcAddressOfNextChar:
.code32
push %eax
movl $0xB8000,%edi
addl i386_ScreenPosX,%edi
addl i386_ScreenPosX,%edi
movl i386_ScreenPosY,%eax
movl $160,%ecx // 80 columns, 2 bytes per column
mull %ecx
addl %eax,%edi
pop %eax
ret
/************************************************************************/
/* Prints the value in EAX on the screen in hex */
/************************************************************************/
i386PrintHexDword:
.code32
call i386PrintHex1
i386PrintHex1:
call i386PrintHex2
i386PrintHex2:
call i386PrintHex3
i386PrintHex3:
movb $4,%cl
rol %cl,%eax
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
i386PrintHexTable:
.ascii "0123456789ABCDEF"
/************************************************************************/
/* Prints the value in AX on the screen in hex */
/************************************************************************/
i386PrintHexWord:
.code32
call i386PrintHexWord1
i386PrintHexWord1:
call i386PrintHexWord2
i386PrintHexWord2:
movb $4,%cl
rol %cl,%ax
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
/************************************************************************/
/* Prints the value in AL on the screen in hex */
/************************************************************************/
i386PrintHexByte:
.code32
call i386PrintHexByte1
i386PrintHexByte1:
movb $4,%cl
rol %cl,%al
push %eax
andb $0x0f,%al
movl $i386PrintHexTable,%ebx
xlat /*$i386PrintHexTable*/
call i386PrintTextCalcAddressOfNextChar
stosb
incl i386_ScreenPosX
pop %eax
ret
/************************************************************************/
EXTERN(i386DivideByZero)
.code32
movl $i386DivideByZeroText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386DebugException)
.code32
movl $i386DebugExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386NMIException)
.code32
movl $i386NMIExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386Breakpoint)
.code32
movl $i386BreakpointText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386Overflow)
.code32
movl $i386OverflowText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386BoundException)
.code32
movl $i386BoundExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386InvalidOpcode)
.code32
movl $i386InvalidOpcodeText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386FPUNotAvailable)
.code32
movl $i386FPUNotAvailableText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386DoubleFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386DoubleFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386CoprocessorSegment)
.code32
movl $i386CoprocessorSegmentText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386InvalidTSS)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386InvalidTSSText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386SegmentNotPresent)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386SegmentNotPresentText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386StackException)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386StackExceptionText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386GeneralProtectionFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386GeneralProtectionFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386PageFault)
.code32
popl %eax
movl %eax,i386_ERROR_CODE
movl $i386PageFaultText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386CoprocessorError)
.code32
movl $i386CoprocessorErrorText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386AlignmentCheck)
.code32
movl $i386AlignmentCheckText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************/
EXTERN(i386MachineCheck)
.code32
movl $i386MachineCheckText,i386ExceptionDescriptionText
jmp i386CommonExceptionHandler
/************************************************************************
* DEBUGGING SUPPORT FUNCTIONS
************************************************************************/
EXTERN(_INSTRUCTION_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00000303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00030303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT1)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr0
movl %dr7,%eax
andl $0xfff0ffff,%eax
orl $0x00010303,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0000030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0030030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT2)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr1
movl %dr7,%eax
andl $0xff0fffff,%eax
orl $0x0010030c,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x00000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x03000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT3)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr2
movl %dr7,%eax
andl $0xf0ffffff,%eax
orl $0x01000330,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_INSTRUCTION_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x000003c0,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_READWRITE_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x300003c0,%eax
movl %eax,%dr7
popl %eax
ret
EXTERN(_MEMORY_WRITE_BREAKPOINT4)
.code32
pushl %eax
movl 8(%esp),%eax
movl %eax,%dr3
movl %dr7,%eax
andl $0x0fffffff,%eax
orl $0x100003c0,%eax
movl %eax,%dr7
popl %eax
ret

View File

@@ -1,807 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
* Portions from Linux video.S - Display adapter & video mode setup, version 2.13 (14-May-99)
* Copyright (C) 1995 -- 1999 Martin Mares <mj@ucw.cz>
* Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <video.h>
#include <portio.h>
#include <rtl.h>
#include <debug.h>
typedef struct
{
U8 Signature[4]; // (ret) signature ("VESA")
// (call) VESA 2.0 request signature ("VBE2"), required to receive
// version 2.0 info
U16 VesaVersion; // VESA version number (one-digit minor version -- 0102h = v1.2)
U32 OemNamePtr; // pointer to OEM name
// "761295520" for ATI
U32 Capabilities; // capabilities flags (see #00078)
U32 SupportedModeListPtr; // pointer to list of supported VESA and OEM video modes
// (list of words terminated with FFFFh)
U16 TotalVideoMemory; // total amount of video memory in 64K blocks
// ---VBE v1.x ---
//U8 Reserved[236];
// ---VBE v2.0 ---
U16 OemSoftwareVersion; // OEM software version (BCD, high byte = major, low byte = minor)
U32 VendorNamePtr; // pointer to vendor name
U32 ProductNamePtr; // pointer to product name
U32 ProductRevisionStringPtr; // pointer to product revision string
U16 VBE_AF_Version; // (if capabilities bit 3 set) VBE/AF version (BCD)
// 0100h for v1.0P
U32 AcceleratedModeListPtr; // (if capabilities bit 3 set) pointer to list of supported
// accelerated video modes (list of words terminated with FFFFh)
U8 Reserved[216]; // reserved for VBE implementation
U8 ScratchPad[256]; // OEM scratchpad (for OEM strings, etc.)
} PACKED VESA_SVGA_INFO, *PVESA_SVGA_INFO;
// Bitfields for VESA capabilities:
//
// Bit(s) Description (Table 00078)
// 0 DAC can be switched into 8-bit mode
// 1 non-VGA controller
// 2 programmed DAC with blank bit (i.e. only during blanking interval)
// 3 (VBE v3.0) controller supports hardware stereoscopic signalling
// 3 controller supports VBE/AF v1.0P extensions
// 4 (VBE v3.0) if bit 3 set:
// =0 stereo signalling via external VESA stereo connector
// =1 stereo signalling via VESA EVC connector
// 4 (VBE/AF v1.0P) must call EnableDirectAccess to access framebuffer
// 5 (VBE/AF v1.0P) controller supports hardware mouse cursor
// 6 (VBE/AF v1.0P) controller supports hardware clipping
// 7 (VBE/AF v1.0P) controller supports transparent BitBLT
// 8-31 reserved (0)
// Notes: The list of supported video modes is stored in the reserved
// portion of the SuperVGA information record by some implementations,
// and it may thus be necessary to either copy the mode list or use a
// different buffer for all subsequent VESA calls. Not all of the video
// modes in the list of mode numbers may be supported, e.g. if they require
// more memory than currently installed or are not supported by the
// attached monitor. Check any mode you intend to use through AX=4F01h first..
// The 1.1 VESA document specifies 242 reserved bytes at the end, so the
// buffer should be 262 bytes to ensure that it is not overrun; for v2.0,
// the buffer should be 512 bytes. The S3 specific video modes will most
// likely follow the FFFFh terminator at the end of the standard modes.
// A search must then be made to find them, FFFFh will also terminate this
// second list. In some cases, only a "stub" VBE may be present, supporting
// only AX=4F00h; this case may be assumed if the list of supported video modes
// is empty (consisting of a single word of FFFFh)
VOID BiosSetVideoMode(U32 VideoMode)
{
REGS Regs;
// Int 10h AH=00h
// VIDEO - SET VIDEO MODE
//
// AH = 00h
// AL = desired video mode
// Return:
// AL = video mode flag (Phoenix, AMI BIOS)
// 20h mode > 7
// 30h modes 0-5 and 7
// 3Fh mode 6
// AL = CRT controller mode byte (Phoenix 386 BIOS v1.10)
Regs.b.ah = 0x00;
Regs.b.al = VideoMode;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x8(VOID)
{
REGS Regs;
// Int 10h AX=1112h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x8 DBL-DOT PATTERNS (PS,EGA,VGA)
//
// AX = 1112h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1112;
Regs.b.bl = 0x00;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x14(VOID)
{
REGS Regs;
// Int 10h AX=1111h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM MONOCHROME PATTERNS (PS,EGA,VGA)
//
// AX = 1111h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1111;
Regs.b.bl = 0;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSetVideoFont8x16(VOID)
{
REGS Regs;
// Int 10h AX=1114h
// VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x16 CHARACTER SET (VGA)
//
// AX = 1114h
// BL = block to load
// Return:
// Nothing
Regs.w.ax = 0x1114;
Regs.b.bl = 0;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSelectAlternatePrintScreen(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=20h
// VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - ALTERNATE PRTSC
//
// AH = 12h
// BL = 20h select alternate print screen routine
// Return:
// Nothing
//
// Installs a PrtSc routine from the video card's BIOS to replace the
// default PrtSc handler from the ROM BIOS, which usually does not
// understand screen heights other than 25 lines.
//
// Some adapters disable print-screen instead of enhancing it.
Regs.b.ah = 0x12;
Regs.b.bl = 0x20;
Int386(0x10, &Regs, &Regs);
}
VOID BiosDisableCursorEmulation(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=34h
// VIDEO - ALTERNATE FUNCTION SELECT (VGA) - CURSOR EMULATION
//
// AH = 12h
// BL = 34h
// AL = new state
// 00h enable alphanumeric cursor emulation
// 01h disable alphanumeric cursor emulation
// Return:
// AL = 12h if function supported
//
// Specify whether the BIOS should automatically remap cursor start/end
// according to the current character height in text modes.
Regs.b.ah = 0x12;
Regs.b.bl = 0x34;
Regs.b.al = 0x01;
Int386(0x10, &Regs, &Regs);
}
VOID BiosDefineCursor(U32 StartScanLine, U32 EndScanLine)
{
REGS Regs;
// Int 10h AH=01h
// VIDEO - SET TEXT-MODE CURSOR SHAPE
//
// AH = 01h
// CH = cursor start and options
// CL = bottom scan line containing cursor (bits 0-4)
// Return:
// Nothing
//
// Specify the starting and ending scan lines to be occupied
// by the hardware cursor in text modes.
//
// AMI 386 BIOS and AST Premier 386 BIOS will lock up the
// system if AL is not equal to the current video mode.
//
// Bitfields for cursor start and options:
//
// Bit(s) Description
// 7 should be zero
// 6,5 cursor blink
// (00=normal, 01=invisible, 10=erratic, 11=slow).
// (00=normal, other=invisible on EGA/VGA)
// 4-0 topmost scan line containing cursor
Regs.b.ah = 0x01;
Regs.b.al = 0x03;
Regs.b.ch = StartScanLine;
Regs.b.cl = EndScanLine;
Int386(0x10, &Regs, &Regs);
}
U32 BiosDetectVideoCard(VOID)
{
REGS Regs;
// Int 10h AH=12h BL=10h
// VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - GET EGA INFO
//
// AH = 12h
// BL = 10h
// Return:
// BH = video state
// 00h color mode in effect (I/O port 3Dxh)
// 01h mono mode in effect (I/O port 3Bxh)
// BL = installed memory (00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K)
// CH = feature connector bits
// CL = switch settings
// AH destroyed (at least by Tseng ET4000 BIOS v8.00n)
//
// Installation check;EGA
Regs.b.ah = 0x12;
Regs.b.bl = 0x10;
Int386(0x10, &Regs, &Regs);
// If BL is still equal to 0x10 then there is no EGA/VGA present
if (Regs.b.bl == 0x10)
{
return VIDEOCARD_CGA_OR_OTHER;
}
// Int 10h AX=1A00h
// VIDEO - GET DISPLAY COMBINATION CODE (PS,VGA/MCGA)
//
// AX = 1A00h
// Return:
// AL = 1Ah if function was supported
// BL = active display code
// BH = alternate display code
//
// This function is commonly used to check for the presence of a VGA.
//
// Installation check;VGA
//
// Values for display combination code:
// 00h no display
// 01h monochrome adapter w/ monochrome display
// 02h CGA w/ color display
// 03h reserved
// 04h EGA w/ color display
// 05h EGA w/ monochrome display
// 06h PGA w/ color display
// 07h VGA w/ monochrome analog display
// 08h VGA w/ color analog display
// 09h reserved
// 0Ah MCGA w/ digital color display
// 0Bh MCGA w/ monochrome analog display
// 0Ch MCGA w/ color analog display
// FFh unknown display type
Regs.b.ah = 0x12;
Regs.b.bl = 0x10;
Int386(0x10, &Regs, &Regs);
if (Regs.b.al == 0x1A)
{
return VIDEOCARD_VGA;
}
else
{
return VIDEOCARD_EGA;
}
}
VOID BiosSetVerticalResolution(U32 ScanLines)
{
REGS Regs;
// Int 10h AH=12h BL=30h
// VIDEO - ALTERNATE FUNCTION SELECT (VGA) - SELECT VERTICAL RESOLUTION
//
// AH = 12h
// BL = 30h
// AL = vertical resolution
// 00h 200 scan lines
// 01h 350 scan lines
// 02h 400 scan lines
// Return:
// AL = 12h if function supported
//
// Specifiy the number of scan lines used to display text modes.
//
// The specified resolution will take effect on the next mode set.
Regs.b.ah = 0x12;
Regs.b.bl = 0x30;
Regs.b.al = ScanLines;
Int386(0x10, &Regs, &Regs);
}
VOID BiosSet480ScanLines(VOID)
{
int CRTC;
// Read CRTC port
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
if (CRTC & 1)
{
CRTC = 0x3D4;
}
else
{
CRTC = 0x3B4;
}
// Vertical sync end (also unlocks CR0-7)
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x11);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0C);
// Vertical total
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x06);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x0B);
// (vertical) overflow
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x07);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x3E);
// Vertical sync start
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x10);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xEA);
// Vertical display end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
// Vertical blank start
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x15);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xE7);
// Vertical blank end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x16);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0x04);
// Misc output register (read)
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
// Preserve clock select bits and color bit
CRTC = (CRTC & 0x0D);
// Set correct sync polarity
CRTC = (CRTC | 0xE2);
// (write)
WRITE_PORT_UCHAR((PUCHAR)0x03C2, CRTC);
}
VOID BiosSetVideoDisplayEnd(VOID)
{
int CRTC;
// Read CRTC port
CRTC = READ_PORT_UCHAR((PUCHAR)0x03CC);
if (CRTC & 1)
{
CRTC = 0x3D4;
}
else
{
CRTC = 0x3B4;
}
// Vertical display end
WRITE_PORT_UCHAR((PUCHAR)CRTC, 0x12);
WRITE_PORT_UCHAR((PUCHAR)CRTC+1, 0xDF);
}
VOID VideoSetTextCursorPosition(U32 X, U32 Y)
{
REGS Regs;
// Int 10h AH=02h
// VIDEO - SET CURSOR POSITION
//
// AH = 02h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// DH = row (00h is top)
// DL = column (00h is left)
// Return:
// Nothing
Regs.b.ah = 0x02;
Regs.b.bh = 0x00;
Regs.b.dh = Y;
Regs.b.dl = X;
Int386(0x10, &Regs, &Regs);
}
VOID VideoHideTextCursor(VOID)
{
BiosDefineCursor(0x20, 0x00);
}
VOID VideoShowTextCursor(VOID)
{
BiosDefineCursor(0x0D, 0x0E);
}
U32 VideoGetTextCursorPositionX(VOID)
{
REGS Regs;
// Int 10h AH=03h
// VIDEO - GET CURSOR POSITION AND SIZE
//
// AH = 03h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// Return:
// AX = 0000h (Phoenix BIOS)
// CH = start scan line
// CL = end scan line
// DH = row (00h is top)
// DL = column (00h is left)
Regs.b.ah = 0x03;
Regs.b.bh = 0x00;
Int386(0x10, &Regs, &Regs);
return Regs.b.dl;
}
U32 VideoGetTextCursorPositionY(VOID)
{
REGS Regs;
// Int 10h AH=03h
// VIDEO - GET CURSOR POSITION AND SIZE
//
// AH = 03h
// BH = page number
// 0-3 in modes 2&3
// 0-7 in modes 0&1
// 0 in graphics modes
// Return:
// AX = 0000h (Phoenix BIOS)
// CH = start scan line
// CL = end scan line
// DH = row (00h is top)
// DL = column (00h is left)
Regs.b.ah = 0x03;
Regs.b.bh = 0x00;
Int386(0x10, &Regs, &Regs);
return Regs.b.dh;
}
VOID BiosVideoDisableBlinkBit(VOID)
{
REGS Regs;
// Int 10h AX=1003h
// VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
//
// AX = 1003h
// BL = new state
// 00h background intensity enabled
// 01h blink enabled
// BH = 00h to avoid problems on some adapters
// Return:
// Nothing
//
// Note: although there is no function to get
// the current status, bit 5 of 0040h:0065h
// indicates the state.
Regs.w.ax = 0x1003;
Regs.w.bx = 0x0000;
Int386(0x10, &Regs, &Regs);
}
VOID BiosVideoEnableBlinkBit(VOID)
{
REGS Regs;
// Int 10h AX=1003h
// VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
//
// AX = 1003h
// BL = new state
// 00h background intensity enabled
// 01h blink enabled
// BH = 00h to avoid problems on some adapters
// Return:
// Nothing
//
// Note: although there is no function to get
// the current status, bit 5 of 0040h:0065h
// indicates the state.
Regs.w.ax = 0x1003;
Regs.w.bx = 0x0001;
Int386(0x10, &Regs, &Regs);
}
U16 BiosIsVesaSupported(VOID)
{
REGS Regs;
PVESA_SVGA_INFO SvgaInfo = (PVESA_SVGA_INFO)BIOSCALLBUFFER;
#ifdef DEBUG
//U16* VideoModes;
//U16 Index;
#endif // defined DEBUG
DbgPrint((DPRINT_UI, "BiosIsVesaSupported()\n"));
RtlZeroMemory(SvgaInfo, sizeof(VESA_SVGA_INFO));
// Make sure we receive version 2.0 info
SvgaInfo->Signature[0] = 'V';
SvgaInfo->Signature[1] = 'B';
SvgaInfo->Signature[2] = 'E';
SvgaInfo->Signature[3] = '2';
// Int 10h AX=4F00h
// VESA SuperVGA BIOS (VBE) - GET SuperVGA INFORMATION
//
// AX = 4F00h
// ES:DI -> buffer for SuperVGA information (see #00077)
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// ES:DI buffer filled
// 01h failed
// ---VBE v2.0---
// 02h function not supported by current hardware configuration
// 03h function invalid in current video mode
//
// Determine whether VESA BIOS extensions are present and the
// capabilities supported by the display adapter
//
// Installation check;VESA SuperVGA
Regs.w.ax = 0x4F00;
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
Int386(0x10, &Regs, &Regs);
DbgPrint((DPRINT_UI, "AL = 0x%x\n", Regs.b.al));
DbgPrint((DPRINT_UI, "AH = 0x%x\n", Regs.b.ah));
if (Regs.w.ax != 0x004F)
{
DbgPrint((DPRINT_UI, "Failed.\n"));
return 0x0000;
}
#ifdef DEBUG
DbgPrint((DPRINT_UI, "Supported.\n"));
DbgPrint((DPRINT_UI, "SvgaInfo->Signature[4] = %c%c%c%c\n", SvgaInfo->Signature[0], SvgaInfo->Signature[1], SvgaInfo->Signature[2], SvgaInfo->Signature[3]));
DbgPrint((DPRINT_UI, "SvgaInfo->VesaVersion = v%d.%d\n", ((SvgaInfo->VesaVersion >> 8) & 0xFF), (SvgaInfo->VesaVersion & 0xFF)));
DbgPrint((DPRINT_UI, "SvgaInfo->OemNamePtr = 0x%x\n", SvgaInfo->OemNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->Capabilities = 0x%x\n", SvgaInfo->Capabilities));
DbgPrint((DPRINT_UI, "SvgaInfo->VideoMemory = %dK\n", SvgaInfo->TotalVideoMemory * 64));
DbgPrint((DPRINT_UI, "---VBE v2.0 ---\n"));
DbgPrint((DPRINT_UI, "SvgaInfo->OemSoftwareVersion = v%d.%d\n", ((SvgaInfo->OemSoftwareVersion >> 8) & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 12) & 0x0F) * 10), (SvgaInfo->OemSoftwareVersion & 0x0F) + (((SvgaInfo->OemSoftwareVersion >> 4) & 0x0F) * 10)));
DbgPrint((DPRINT_UI, "SvgaInfo->VendorNamePtr = 0x%x\n", SvgaInfo->VendorNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->ProductNamePtr = 0x%x\n", SvgaInfo->ProductNamePtr));
DbgPrint((DPRINT_UI, "SvgaInfo->ProductRevisionStringPtr = 0x%x\n", SvgaInfo->ProductRevisionStringPtr));
DbgPrint((DPRINT_UI, "SvgaInfo->VBE/AF Version = 0x%x (BCD WORD)\n", SvgaInfo->VBE_AF_Version));
//DbgPrint((DPRINT_UI, "\nSupported VESA and OEM video modes:\n"));
//VideoModes = (U16*)SvgaInfo->SupportedModeListPtr;
//for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
//{
// DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
//}
//if (SvgaInfo->VesaVersion >= 0x0200)
//{
// DbgPrint((DPRINT_UI, "\nSupported accelerated video modes (VESA v2.0):\n"));
// VideoModes = (U16*)SvgaInfo->AcceleratedModeListPtr;
// for (Index=0; VideoModes[Index]!=0xFFFF; Index++)
// {
// DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index]));
// }
//}
DbgPrint((DPRINT_UI, "\n"));
//getch();
#endif // defined DEBUG
return SvgaInfo->VesaVersion;
}
BOOL BiosVesaSetBank(U16 Bank)
{
REGS Regs;
// Int 10h AX=4F05h
// VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL
//
// AX = 4F05h
// BH = subfunction
// 00h select video memory window
// 01h get video memory window
// DX = window address in video memory (in granularity units)
// Return:
// DX = window address in video memory (in gran. units)
// BL = window number
// 00h window A
// 01h window B.
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// 01h failed
Regs.w.ax = 0x4F05;
Regs.w.bx = 0x0000;
Regs.w.dx = Bank;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
return TRUE;
}
BOOL BiosVesaSetVideoMode(U16 Mode)
{
REGS Regs;
// Int 10h AX=4F02h
// VESA SuperVGA BIOS - SET SuperVGA VIDEO MODE
//
// AX = 4F02h
// BX = new video mode
// ES:DI -> (VBE 3.0+) CRTC information block, bit mode bit 11 set
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// 01h failed
//
// Values for VESA video mode:
// 00h-FFh OEM video modes (see #00010 at AH=00h)
// 100h 640x400x256
// 101h 640x480x256
// 102h 800x600x16
// 103h 800x600x256
// 104h 1024x768x16
// 105h 1024x768x256
// 106h 1280x1024x16
// 107h 1280x1024x256
// 108h 80x60 text
// 109h 132x25 text
// 10Ah 132x43 text
// 10Bh 132x50 text
// 10Ch 132x60 text
// ---VBE v1.2+ ---
// 10Dh 320x200x32K
// 10Eh 320x200x64K
// 10Fh 320x200x16M
// 110h 640x480x32K
// 111h 640x480x64K
// 112h 640x480x16M
// 113h 800x600x32K
// 114h 800x600x64K
// 115h 800x600x16M
// 116h 1024x768x32K
// 117h 1024x768x64K
// 118h 1024x768x16M
// 119h 1280x1024x32K (1:5:5:5)
// 11Ah 1280x1024x64K (5:6:5)
// 11Bh 1280x1024x16M
// ---VBE 2.0+ ---
// 120h 1600x1200x256
// 121h 1600x1200x32K
// 122h 1600x1200x64K
// 81FFh special full-memory access mode
// Notes: The special mode 81FFh preserves the contents of the video memory and gives
// access to all of the memory; VESA recommends that the special mode be a packed-pixel
// mode. For VBE 2.0+, it is required that the VBE implement the mode, but not place it
// in the list of available modes (mode information for this mode can be queried
// directly, however).. As of VBE 2.0, VESA will no longer define video mode numbers
Regs.w.ax = 0x4F02;
Regs.w.bx = Mode;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
return TRUE;
}
BOOL BiosVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformation)
{
REGS Regs;
RtlZeroMemory((PVOID)BIOSCALLBUFFER, 256);
// VESA SuperVGA BIOS - GET SuperVGA MODE INFORMATION
// AX = 4F01h
// CX = SuperVGA video mode (see #04082 for bitfields)
// ES:DI -> 256-byte buffer for mode information (see #00079)
// Return:
// AL = 4Fh if function supported
// AH = status
// 00h successful
// ES:DI buffer filled
// 01h failed
//
// Desc: Determine the attributes of the specified video mode
//
// Note: While VBE 1.1 and higher will zero out all unused bytes
// of the buffer, v1.0 did not, so applications that want to be
// backward compatible should clear the buffer before calling
Regs.w.ax = 0x4F01;
Regs.w.cx = Mode;
Regs.w.es = BIOSCALLBUFSEGMENT;
Regs.w.di = BIOSCALLBUFOFFSET;
Int386(0x10, &Regs, &Regs);
if (Regs.w.ax != 0x004F)
{
return FALSE;
}
RtlCopyMemory(ModeInformation, (PVOID)BIOSCALLBUFFER, sizeof(SVGA_MODE_INFORMATION));
DbgPrint((DPRINT_UI, "\n"));
DbgPrint((DPRINT_UI, "BiosVesaGetSVGAModeInformation() mode 0x%x\n", Mode));
DbgPrint((DPRINT_UI, "ModeAttributes = 0x%x\n", ModeInformation->ModeAttributes));
DbgPrint((DPRINT_UI, "WindowAttributesA = 0x%x\n", ModeInformation->WindowAttributesA));
DbgPrint((DPRINT_UI, "WindowAttributesB = 0x%x\n", ModeInformation->WindowsAttributesB));
DbgPrint((DPRINT_UI, "WindowGranularity = %dKB\n", ModeInformation->WindowGranularity));
DbgPrint((DPRINT_UI, "WindowSize = %dKB\n", ModeInformation->WindowSize));
DbgPrint((DPRINT_UI, "WindowAStartSegment = 0x%x\n", ModeInformation->WindowAStartSegment));
DbgPrint((DPRINT_UI, "WindowBStartSegment = 0x%x\n", ModeInformation->WindowBStartSegment));
DbgPrint((DPRINT_UI, "WindowPositioningFunction = 0x%x\n", ModeInformation->WindowPositioningFunction));
DbgPrint((DPRINT_UI, "BytesPerScanLine = %d\n", ModeInformation->BytesPerScanLine));
DbgPrint((DPRINT_UI, "WidthInPixels = %d\n", ModeInformation->WidthInPixels));
DbgPrint((DPRINT_UI, "HeightInPixels = %d\n", ModeInformation->HeightInPixels));
DbgPrint((DPRINT_UI, "CharacterWidthInPixels = %d\n", ModeInformation->CharacterWidthInPixels));
DbgPrint((DPRINT_UI, "CharacterHeightInPixels = %d\n", ModeInformation->CharacterHeightInPixels));
DbgPrint((DPRINT_UI, "NumberOfMemoryPlanes = %d\n", ModeInformation->NumberOfMemoryPlanes));
DbgPrint((DPRINT_UI, "BitsPerPixel = %d\n", ModeInformation->BitsPerPixel));
DbgPrint((DPRINT_UI, "NumberOfBanks = %d\n", ModeInformation->NumberOfBanks));
DbgPrint((DPRINT_UI, "MemoryModel = %d\n", ModeInformation->MemoryModel));
DbgPrint((DPRINT_UI, "BankSize = %d\n", ModeInformation->BankSize));
DbgPrint((DPRINT_UI, "NumberOfImagePlanes = %d\n", ModeInformation->NumberOfImagePanes));
DbgPrint((DPRINT_UI, "---VBE v1.2+ ---\n"));
DbgPrint((DPRINT_UI, "RedMaskSize = %d\n", ModeInformation->RedMaskSize));
DbgPrint((DPRINT_UI, "RedMaskPosition = %d\n", ModeInformation->RedMaskPosition));
DbgPrint((DPRINT_UI, "GreenMaskSize = %d\n", ModeInformation->GreenMaskSize));
DbgPrint((DPRINT_UI, "GreenMaskPosition = %d\n", ModeInformation->GreenMaskPosition));
DbgPrint((DPRINT_UI, "BlueMaskSize = %d\n", ModeInformation->BlueMaskSize));
DbgPrint((DPRINT_UI, "BlueMaskPosition = %d\n", ModeInformation->BlueMaskPosition));
DbgPrint((DPRINT_UI, "ReservedMaskSize = %d\n", ModeInformation->ReservedMaskSize));
DbgPrint((DPRINT_UI, "ReservedMaskPosition = %d\n", ModeInformation->ReservedMaskPosition));
DbgPrint((DPRINT_UI, "\n"));
return TRUE;
}

View File

@@ -1,155 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
Int386_REGS:
Int386_eax:
.long 0
Int386_ebx:
.long 0
Int386_ecx:
.long 0
Int386_edx:
.long 0
Int386_esi:
.long 0
Int386_edi:
.long 0
Int386_ds:
.word 0
Int386_es:
.word 0
Int386_fs:
.word 0
Int386_gs:
.word 0
Int386_eflags:
.long 0
Int386_vector:
.long 0
Int386_regsin:
.long 0
Int386_regsout:
.long 0
/*
* int Int386(int ivec, REGS* in, REGS* out);
*/
EXTERN(_Int386)
.code32
/* Get the function parameters */
movl 0x04(%esp),%eax
movl %eax,Int386_vector
movb %al,Int386_vector_opcode
movl 0x08(%esp),%eax
movl %eax,Int386_regsin
movl 0x0c(%esp),%eax
movl %eax,Int386_regsout
pushal
/* Copy the input regs to our variables */
movl $Int386_REGS,%edi
movl Int386_regsin,%esi
movl $0x24,%ecx
rep
movsb
call switch_to_real
.code16
/* Setup the registers */
movw %cs:Int386_ds,%ax
movw %ax,%ds /* DS register */
movw %cs:Int386_es,%ax
movw %ax,%es /* ES register */
movw %cs:Int386_fs,%ax
movw %ax,%fs /* FS register */
movw %cs:Int386_gs,%ax
movw %ax,%gs /* GS register */
movl %cs:Int386_eax,%eax /* EAX register */
movl %cs:Int386_ebx,%ebx /* EBX register */
movl %cs:Int386_ecx,%ecx /* ECX register */
movl %cs:Int386_edx,%edx /* EDX register */
movl %cs:Int386_esi,%esi /* ESI register */
movl %cs:Int386_edi,%edi /* EDI register */
/* Do not set the flags register */
/* only return its value in regsout */
//pushl Int386_eflags
//popfl /* EFLAGS register */
/* Call the interrupt vector */
/*int Int386_vector*/
Int386_int_opcode:
.byte 0xcd
Int386_vector_opcode:
.byte 0x00
/* Save the registers */
movl %eax,%cs:Int386_eax /* EAX register */
movl %ebx,%cs:Int386_ebx /* EBX register */
movl %ecx,%cs:Int386_ecx /* ECX register */
movl %edx,%cs:Int386_edx /* EDX register */
movl %esi,%cs:Int386_esi /* ESI register */
movl %edi,%cs:Int386_edi /* EDI register */
movw %ds,%ax /* DS register */
movw %ax,%cs:Int386_ds
movw %es,%ax /* ES register */
movw %ax,%cs:Int386_es
movw %fs,%ax /* FS register */
movw %ax,%cs:Int386_fs
movw %gs,%ax /* GS register */
movw %ax,%cs:Int386_gs
pushf
popw %cs:Int386_eflags /* EFLAGS register */
call switch_to_prot
.code32
/* Copy the variables to the output regs */
movl $Int386_REGS,%esi
movl Int386_regsout,%edi
movl $0x24,%ecx
rep
movsb
popal
/* Get return value */
movl Int386_eax,%eax
ret

View File

@@ -1,81 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
.code32
EXTERN(_BootNewLinuxKernel)
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x9000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x9000,%sp
ljmpl $0x9020,$0x0000
.code32
/*
* VOID BootOldLinuxKernel(ULONG KernelSize);
*/
EXTERN(_BootOldLinuxKernel)
/* First we have to copy the kernel down from 0x100000 to 0x10000 */
/* The reason we can overwrite low memory is because this code */
/* executes between 0000:8000 and 0000:FFFF. That leaves space for */
/* 32k of code before we start interfering with Linux kernel address space. */
/* Get KernelSize in ECX and move the kernel down */
movl 0x04(%esp),%ecx
movl $0x100000,%esi
movl $0x10000,%edi
rep movsb
call switch_to_real
.code16
/* Set the boot drive */
movb (_BootDrive),%dl
/* Load segment registers */
cli
movw $0x9000,%bx
movw %bx,%ds
movw %bx,%es
movw %bx,%fs
movw %bx,%gs
movw %bx,%ss
movw $0x9000,%sp
ljmpl $0x9020,$0x0000

View File

@@ -1,262 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
.text
.code16
#define ASM
#include <arch.h>
#include <multiboot.h>
/*
* Here we assume the kernel is loaded at 1mb
* This boots the kernel
*/
.code32
EXTERN(_boot_reactos)
call switch_to_real
.code16
/* Save cursor position */
movw $3,%ax //! Reset video mode
int $0x10
movb $10,%bl
movb $12,%ah
int $0x10
movw $0x1112,%ax // Use 8x8 font
xorb %bl,%bl
int $0x10
movw $0x1200,%ax // Use alternate print screen
movb $0x20,%bl
int $0x10
movb $1,%ah // Define cursor (scan lines 6 to 7)
movw $0x0607,%cx
int $0x10
movb $1,%ah
movw $0x600,%cx
int $0x10
movb $6,%ah // Scroll active page up
movb $0x32,%al // Clear 25 lines
movw $0,%cx // Upper left of scroll
movw $0x314F,%dx // Lower right of scroll
movb $(1*0x00+0),%bh // Use normal attribute on blanked line
int $0x10 // Video-IO
movw $0,%dx
movb $0,%dh
movb $2,%ah
movb $0,%bh
int $0x10
movw $0,%dx
movb $0,%dh
movb $2,%ah
movb $0,%bh
int $0x10
call _multi_boot
// Should never get here
cli
hlt
/*
* After you have setup the _mb_header and _mb_info structures
* then call this routine to transfer control to the kernel.
* This routine must be entered in 16-bit mode.
*/
.code16
EXTERN(_multi_boot)
cli
/*
* Setup various variables
*/
movw %ds,%bx
movzwl %bx,%eax
shll $4,%eax
addl %eax,kernel_gdtbase
/*
* Load the absolute address of the multiboot information structure
*/
movl $_mb_info,%ebx
/*
* load gdt
*/
lgdt kernel_gdtptr
/*
* Enter pmode and clear prefetch queue
*/
movl %cr0,%eax
orl $0x10001,%eax
movl %eax,%cr0
jmp next
next:
/*
* NOTE: This must be position independant (no references to
* non absolute variables)
*/
/*
* Initalize segment registers
*/
movw $KERNEL_DS,%ax
movw %ax,%ds
movw %ax,%ss
movw %ax,%es
movw %ax,%fs
movw %ax,%gs
/*
* Initalize eflags
*/
pushl $0
popfl
/*
* Load the multiboot magic value into eax
*/
movl $0x2badb002,%eax
/*
* Jump to start of 32 bit code at 0xc0000000 + 0x1000
*/
pushl $KERNEL_CS
pushl _mb_entry_addr
lretl
//ljmpl $KERNEL_CS,$(0x0200000+0x1000)
//ljmpl $KERNEL_CS,(_mb_entry_addr)
//ljmpl $KERNEL_CS,$(KERNEL_BASE+0x1000)
.p2align 2 /* force 4-byte alignment */
kernel_gdt:
.word 0 // Zero descriptor
.word 0
.word 0
.word 0
.word 0xffff // Kernel code descriptor
.word 0x0000 //
.word 0x9a00 // base 0h limit 4gb
.word 0x00cf
.word 0xffff // Kernel data descriptor
.word 0x0000 //
.word 0x9200 // base 0h limit 4gb
.word 0x00cf
kernel_gdtptr:
.word (3*8)-1 /* Limit */
kernel_gdtbase:
.long kernel_gdt /* Base Address */
EXTERN(_mb_header)
_mb_magic:
.long 0 // unsigned long magic;
_mb_flags:
.long 0 // unsigned long flags;
_mb_checksum:
.long 0 // unsigned long checksum;
_mb_header_addr:
.long 0 // unsigned long header_addr;
_mb_load_addr:
.long 0 // unsigned long load_addr;
_mb_load_end_addr:
.long 0 // unsigned long load_end_addr;
_mb_bss_end_addr:
.long 0 // unsigned long bss_end_addr;
_mb_entry_addr:
.long 0 // unsigned long entry_addr;
//
// Boot information structure
//
EXTERN(_mb_info)
_multiboot_flags:
.long 0
_multiboot_mem_lower:
.long 0
_multiboot_mem_upper:
.long 0
_multiboot_boot_device:
.long 0
_multiboot_cmdline:
.long 0
_multiboot_mods_count:
.long 0
_multiboot_mods_addr:
.long 0
_multiboot_syms:
.rept 12
.byte 0
.endr
_multiboot_mmap_length:
.long 0
_multiboot_mmap_addr:
.long 0
_multiboot_drives_count:
.long 0
_multiboot_drives_addr:
.long 0
_multiboot_config_table:
.long 0
_multiboot_boot_loader_name:
.long 0
_multiboot_apm_table:
.long 0
EXTERN(_multiboot_modules)
.rept (64 * /*multiboot_module_size*/ 16)
.byte 0
.endr
EXTERN(_multiboot_module_strings)
.rept (64*256)
.byte 0
.endr
EXTERN(_multiboot_memory_map_descriptor_size)
.long 0
EXTERN(_multiboot_memory_map)
.rept (32 * /*sizeof(memory_map_t)*/24)
.byte 0
.endr
EXTERN(_multiboot_kernel_cmdline)
.rept 255
.byte 0
.endr

View File

@@ -1,183 +0,0 @@
/* $Id: portio.c,v 1.1 2003/01/19 01:03:58 bpalmer Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/portio.c
* PURPOSE: Port I/O functions
* PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
* UPDATE HISTORY:
* Created 18/10/99
*/
//#include <ddk/ntddk.h>
#include <freeldr.h>
/* FUNCTIONS ****************************************************************/
/*
* This file contains the definitions for the x86 IO instructions
* inb/inw/inl/outb/outw/outl and the "string versions" of the same
* (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
* versions of the single-IO instructions (inb_p/inw_p/..).
*
* This file is not meant to be obfuscating: it's just complicated
* to (a) handle it all in a way that makes gcc able to optimize it
* as well as possible and (b) trying to avoid writing the same thing
* over and over again with slight variations and possibly making a
* mistake somewhere.
*/
/*
* Thanks to James van Artsdalen for a better timing-fix than
* the two short jumps: using outb's to a nonexistent port seems
* to guarantee better timings even on fast machines.
*
* On the other hand, I'd like to be sure of a non-existent port:
* I feel a bit unsafe about using 0x80 (should be safe, though)
*
* Linus
*/
#ifdef SLOW_IO_BY_JUMPING
#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:")
#else
#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80")
#endif
#ifdef REALLY_SLOW_IO
#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; }
#else
#define SLOW_DOWN_IO __SLOW_DOWN_IO
#endif
VOID /*STDCALL*/
READ_PORT_BUFFER_UCHAR (PUCHAR Port,
PUCHAR Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insb\n\t"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_USHORT (U16* Port,
U16* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insw"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_ULONG (U32* Port,
U32* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; insl"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
UCHAR /*STDCALL*/
READ_PORT_UCHAR (PUCHAR Port)
{
UCHAR Value;
__asm__("inb %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
U16 /*STDCALL*/
READ_PORT_USHORT (U16* Port)
{
U16 Value;
__asm__("inw %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
U32 /*STDCALL*/
READ_PORT_ULONG (U32* Port)
{
U32 Value;
__asm__("inl %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_UCHAR (PUCHAR Port,
PUCHAR Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsb"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_USHORT (U16* Port,
U16* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsw"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_ULONG (U32* Port,
U32* Buffer,
U32 Count)
{
__asm__ __volatile__ ("cld ; rep ; outsl"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_UCHAR (PUCHAR Port,
UCHAR Value)
{
__asm__("outb %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
VOID /*STDCALL*/
WRITE_PORT_USHORT (U16* Port,
U16 Value)
{
__asm__("outw %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
VOID /*STDCALL*/
WRITE_PORT_ULONG (U32* Port,
U32 Value)
{
__asm__("outl %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
/* EOF */

View File

@@ -1,214 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <fs.h>
#include <reactos.h>
#include <ui.h>
#include <arch.h>
#include <miscboot.h>
#include <linux.h>
#include <mm.h>
#include <inifile.h>
#include <debug.h>
#include <options.h>
#include <oslist.h>
#include <video.h>
#include <bootmgr.h>
#include <drivemap.h>
#include <keycodes.h>
VOID RunLoader(VOID)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
U32 OperatingSystemCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
U32 DefaultOperatingSystem;
S32 TimeOut;
U32 SelectedOperatingSystem;
if (!IniFileInitialize())
{
printf("Press any key to reboot.\n");
getch();
return;
}
if (!IniOpenSection("FreeLoader", &SectionId))
{
printf("Section [FreeLoader] not found in freeldr.ini.\n");
getch();
return;
}
if (!UiInitialize())
{
printf("Press any key to reboot.\n");
getch();
return;
}
if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
{
UiMessageBox("Press ENTER to reboot.\n");
goto reboot;
}
if (OperatingSystemCount == 0)
{
UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
goto reboot;
}
DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount);
TimeOut = GetTimeOut();
//
// Find all the message box settings and run them
//
UiShowMessageBoxesInSection("FreeLoader");
for (;;)
{
// Redraw the backdrop
UiDrawBackdrop();
// Show the operating system list menu
if (!UiDisplayMenu(OperatingSystemDisplayNames, OperatingSystemCount, DefaultOperatingSystem, TimeOut, &SelectedOperatingSystem, FALSE, MainBootMenuKeyPressFilter))
{
UiMessageBox("Press ENTER to reboot.\n");
goto reboot;
}
TimeOut = -1;
DefaultOperatingSystem = SelectedOperatingSystem;
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemSectionNames[SelectedOperatingSystem], &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemSectionNames[SelectedOperatingSystem]);
UiMessageBox(SettingName);
continue;
}
// Try to read the boot type
if (!IniReadSettingByName(SectionId, "BootType", SettingValue, 80))
{
sprintf(SettingName, "BootType= line not found in section [%s] in freeldr.ini.\n", OperatingSystemSectionNames[SelectedOperatingSystem]);
UiMessageBox(SettingName);
continue;
}
// Install the drive mapper according to this sections drive mappings
DriveMapMapDrivesInSection(OperatingSystemSectionNames[SelectedOperatingSystem]);
if (stricmp(SettingValue, "ReactOS") == 0)
{
LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Linux") == 0)
{
LoadAndBootLinux(OperatingSystemSectionNames[SelectedOperatingSystem], OperatingSystemDisplayNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "BootSector") == 0)
{
LoadAndBootBootSector(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Partition") == 0)
{
LoadAndBootPartition(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Drive") == 0)
{
LoadAndBootDrive(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
}
reboot:
UiUnInitialize("Rebooting...");
return;
}
U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount)
{
UCHAR DefaultOSText[80];
U32 SectionId;
U32 DefaultOS = 0;
U32 Idx;
if (!IniOpenSection("FreeLoader", &SectionId))
{
return 0;
}
if (IniReadSettingByName(SectionId, "DefaultOS", DefaultOSText, 80))
{
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
if (stricmp(DefaultOSText, OperatingSystemList[Idx]) == 0)
{
DefaultOS = Idx;
break;
}
}
}
return DefaultOS;
}
S32 GetTimeOut(VOID)
{
UCHAR TimeOutText[20];
U32 TimeOut;
U32 SectionId;
if (!IniOpenSection("FreeLoader", &SectionId))
{
return -1;
}
if (IniReadSettingByName(SectionId, "TimeOut", TimeOutText, 20))
{
TimeOut = atoi(TimeOutText);
}
else
{
TimeOut = -1;
}
return TimeOut;
}
BOOL MainBootMenuKeyPressFilter(U32 KeyPress)
{
if (KeyPress == KEY_F8)
{
DoOptionsMenu();
return TRUE;
}
// We didn't handle the key
return FALSE;
}

View File

@@ -1,262 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "cm.h"
#include <mm.h>
#include <disk.h>
#include <rtl.h>
#include <debug.h>
#include <arch.h>
// Returns a pointer to a CACHE_BLOCK structure
// Adds the block to the cache manager block list
// in cache memory if it isn't already there
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalGetBlockPointer() BlockNumber = %d\n", BlockNumber));
CacheBlock = CacheInternalFindBlock(CacheDrive, BlockNumber);
if (CacheBlock != NULL)
{
DbgPrint((DPRINT_CACHE, "Cache hit! BlockNumber: %d CacheBlock->BlockNumber: %d\n", BlockNumber, CacheBlock->BlockNumber));
return CacheBlock;
}
DbgPrint((DPRINT_CACHE, "Cache miss! BlockNumber: %d\n", BlockNumber));
CacheBlock = CacheInternalAddBlockToCache(CacheDrive, BlockNumber);
// Optimize the block list so it has a LRU structure
CacheInternalOptimizeBlockList(CacheDrive, CacheBlock);
return CacheBlock;
}
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalFindBlock() BlockNumber = %d\n", BlockNumber));
//
// Make sure the block list has entries before I start searching it.
//
if (!RtlListIsEmpty((PLIST_ITEM)CacheDrive->CacheBlockHead))
{
//
// Search the list and find the BIOS drive number
//
CacheBlock = CacheDrive->CacheBlockHead;
while (CacheBlock != NULL)
{
//
// We found the block, so return it
//
if (CacheBlock->BlockNumber == BlockNumber)
{
//
// Increment the blocks access count
//
CacheBlock->AccessCount++;
return CacheBlock;
}
CacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlock);
}
}
return NULL;
}
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber)
{
PCACHE_BLOCK CacheBlock = NULL;
DbgPrint((DPRINT_CACHE, "CacheInternalAddBlockToCache() BlockNumber = %d\n", BlockNumber));
// Check the size of the cache so we don't exceed our limits
CacheInternalCheckCacheSizeLimits(CacheDrive);
// We will need to add the block to the
// drive's list of cached blocks. So allocate
// the block memory.
CacheBlock = MmAllocateMemory(sizeof(CACHE_BLOCK));
if (CacheBlock == NULL)
{
return NULL;
}
// Now initialize the structure and
// allocate room for the block data
RtlZeroMemory(CacheBlock, sizeof(CACHE_BLOCK));
CacheBlock->BlockNumber = BlockNumber;
CacheBlock->BlockData = MmAllocateMemory(CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
if (CacheBlock->BlockData ==NULL)
{
MmFreeMemory(CacheBlock);
return NULL;
}
// Now try to read in the block
if (!DiskReadLogicalSectors(CacheDrive->DriveNumber, (BlockNumber * CacheDrive->BlockSize), CacheDrive->BlockSize, (PVOID)DISKREADBUFFER))
{
MmFreeMemory(CacheBlock->BlockData);
MmFreeMemory(CacheBlock);
return NULL;
}
RtlCopyMemory(CacheBlock->BlockData, (PVOID)DISKREADBUFFER, CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
// Add it to our list of blocks managed by the cache
if (CacheDrive->CacheBlockHead == NULL)
{
CacheDrive->CacheBlockHead = CacheBlock;
}
else
{
RtlListInsertTail((PLIST_ITEM)CacheDrive->CacheBlockHead, (PLIST_ITEM)CacheBlock);
}
// Update the cache data
CacheBlockCount++;
CacheSizeCurrent = CacheBlockCount * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
CacheInternalDumpBlockList(CacheDrive);
return CacheBlock;
}
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive)
{
PCACHE_BLOCK CacheBlockToFree;
DbgPrint((DPRINT_CACHE, "CacheInternalFreeBlock()\n"));
// Get a pointer to the last item in the block list
// that isn't forced to be in the cache and remove
// it from the list
CacheBlockToFree = (PCACHE_BLOCK)RtlListGetTail((PLIST_ITEM)CacheDrive->CacheBlockHead);
while (CacheBlockToFree != NULL && CacheBlockToFree->LockedInCache == TRUE)
{
CacheBlockToFree = (PCACHE_BLOCK)RtlListGetPrevious((PLIST_ITEM)CacheBlockToFree);
}
// No blocks left in cache that can be freed
// so just return
if (CacheBlockToFree == NULL)
{
return FALSE;
}
//
// If we are freeing the head of the list then update it's pointer
//
if (CacheBlockToFree == CacheDrive->CacheBlockHead)
{
CacheDrive->CacheBlockHead = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlockToFree);
}
RtlListRemoveEntry((PLIST_ITEM)CacheBlockToFree);
// Free the block memory and the block structure
MmFreeMemory(CacheBlockToFree->BlockData);
MmFreeMemory(CacheBlockToFree);
// Update the cache data
CacheBlockCount--;
CacheSizeCurrent = CacheBlockCount * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
return TRUE;
}
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive)
{
U32 NewCacheSize;
DbgPrint((DPRINT_CACHE, "CacheInternalCheckCacheSizeLimits()\n"));
// Calculate the size of the cache if we added a block
NewCacheSize = (CacheBlockCount + 1) * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
// Check the new size against the cache size limit
if (NewCacheSize > CacheSizeLimit)
{
CacheInternalFreeBlock(CacheDrive);
CacheInternalDumpBlockList(CacheDrive);
}
}
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive)
{
PCACHE_BLOCK CacheBlock;
DbgPrint((DPRINT_CACHE, "Dumping block list for BIOS drive 0x%x.\n", CacheDrive->DriveNumber));
DbgPrint((DPRINT_CACHE, "Cylinders: %d.\n", CacheDrive->DriveGeometry.Cylinders));
DbgPrint((DPRINT_CACHE, "Heads: %d.\n", CacheDrive->DriveGeometry.Heads));
DbgPrint((DPRINT_CACHE, "Sectors: %d.\n", CacheDrive->DriveGeometry.Sectors));
DbgPrint((DPRINT_CACHE, "BytesPerSector: %d.\n", CacheDrive->DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "BlockSize: %d.\n", CacheDrive->BlockSize));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d.\n", CacheSizeLimit));
DbgPrint((DPRINT_CACHE, "CacheSizeCurrent: %d.\n", CacheSizeCurrent));
DbgPrint((DPRINT_CACHE, "CacheBlockCount: %d.\n", CacheBlockCount));
DbgPrint((DPRINT_CACHE, "Dumping %d cache blocks.\n", RtlListCountEntries((PLIST_ITEM)CacheDrive->CacheBlockHead)));
CacheBlock = CacheDrive->CacheBlockHead;
while (CacheBlock != NULL)
{
DbgPrint((DPRINT_CACHE, "Cache Block: CacheBlock: 0x%x\n", CacheBlock));
DbgPrint((DPRINT_CACHE, "Cache Block: Block Number: %d\n", CacheBlock->BlockNumber));
DbgPrint((DPRINT_CACHE, "Cache Block: Access Count: %d\n", CacheBlock->AccessCount));
DbgPrint((DPRINT_CACHE, "Cache Block: Block Data: 0x%x\n", CacheBlock->BlockData));
DbgPrint((DPRINT_CACHE, "Cache Block: Locked In Cache: %d\n", CacheBlock->LockedInCache));
if (CacheBlock->BlockData == NULL)
{
BugCheck((DPRINT_CACHE, "What the heck?!?\n"));
}
CacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheBlock);
}
}
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock)
{
DbgPrint((DPRINT_CACHE, "CacheInternalOptimizeBlockList()\n"));
// Don't do this if this block is already at the head of the list
if (CacheBlock != CacheDrive->CacheBlockHead)
{
// Remove this item from the block list
RtlListRemoveEntry((PLIST_ITEM)CacheBlock);
// Re-insert it at the head of the list
RtlListInsertHead((PLIST_ITEM)CacheDrive->CacheBlockHead, (PLIST_ITEM)CacheBlock);
// Update the head pointer
CacheDrive->CacheBlockHead = CacheBlock;
}
}

View File

@@ -1,325 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "cm.h"
#include <mm.h>
#include <disk.h>
#include <rtl.h>
#include <debug.h>
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal data
//
///////////////////////////////////////////////////////////////////////////////////////
CACHE_DRIVE CacheManagerDrive;
BOOL CacheManagerInitialized = FALSE;
BOOL CacheManagerDataInvalid = FALSE;
U32 CacheBlockCount = 0;
U32 CacheSizeLimit = 0;
U32 CacheSizeCurrent = 0;
BOOL CacheInitializeDrive(U32 DriveNumber)
{
PCACHE_BLOCK NextCacheBlock;
// If we already have a cache for this drive then
// by all means lets keep it, unless it is a removable
// drive, in which case we'll invalidate the cache
if ((CacheManagerInitialized == TRUE) &&
(DriveNumber == CacheManagerDrive.DriveNumber) &&
(DriveNumber >= 0x80) &&
(CacheManagerDataInvalid != TRUE))
{
return TRUE;
}
CacheManagerDataInvalid = FALSE;
//
// If we have already been initialized then free
// the old data
//
if (CacheManagerInitialized)
{
CacheManagerInitialized = FALSE;
DbgPrint((DPRINT_CACHE, "CacheBlockCount: %d\n", CacheBlockCount));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d\n", CacheSizeLimit));
DbgPrint((DPRINT_CACHE, "CacheSizeCurrent: %d\n", CacheSizeCurrent));
//
// Loop through and free the cache blocks
//
while (CacheManagerDrive.CacheBlockHead != NULL)
{
NextCacheBlock = (PCACHE_BLOCK)RtlListGetNext((PLIST_ITEM)CacheManagerDrive.CacheBlockHead);
MmFreeMemory(CacheManagerDrive.CacheBlockHead->BlockData);
MmFreeMemory(CacheManagerDrive.CacheBlockHead);
CacheManagerDrive.CacheBlockHead = NextCacheBlock;
}
}
// Initialize the structure
RtlZeroMemory(&CacheManagerDrive, sizeof(CACHE_DRIVE));
CacheManagerDrive.DriveNumber = DriveNumber;
if (!DiskGetDriveGeometry(DriveNumber, &CacheManagerDrive.DriveGeometry))
{
return FALSE;
}
// Get the number of sectors in each cache block
CacheManagerDrive.BlockSize = DiskGetCacheableBlockCount(DriveNumber);
CacheBlockCount = 0;
CacheSizeLimit = GetSystemMemorySize() / 8;
CacheSizeCurrent = 0;
if (CacheSizeLimit < (64 * 1024))
{
CacheSizeLimit = (64 * 1024);
}
CacheManagerInitialized = TRUE;
DbgPrint((DPRINT_CACHE, "Initializing BIOS drive 0x%x.\n", DriveNumber));
DbgPrint((DPRINT_CACHE, "Cylinders: %d.\n", CacheManagerDrive.DriveGeometry.Cylinders));
DbgPrint((DPRINT_CACHE, "Heads: %d.\n", CacheManagerDrive.DriveGeometry.Heads));
DbgPrint((DPRINT_CACHE, "Sectors: %d.\n", CacheManagerDrive.DriveGeometry.Sectors));
DbgPrint((DPRINT_CACHE, "BytesPerSector: %d.\n", CacheManagerDrive.DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "BlockSize: %d.\n", CacheManagerDrive.BlockSize));
DbgPrint((DPRINT_CACHE, "CacheSizeLimit: %d.\n", CacheSizeLimit));
return TRUE;
}
VOID CacheInvalidateCacheData(VOID)
{
CacheManagerDataInvalid = TRUE;
}
BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer)
{
PCACHE_BLOCK CacheBlock;
U32 StartBlock;
U32 SectorOffsetInStartBlock;
U32 CopyLengthInStartBlock;
U32 EndBlock;
U32 SectorOffsetInEndBlock;
U32 BlockCount;
U32 Idx;
DbgPrint((DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
//
// Caculate which blocks we must cache
//
StartBlock = StartSector / CacheManagerDrive.BlockSize;
SectorOffsetInStartBlock = StartSector % CacheManagerDrive.BlockSize;
CopyLengthInStartBlock = (SectorCount > (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) : SectorCount;
EndBlock = (StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize;
SectorOffsetInEndBlock = (StartSector + SectorCount) % CacheManagerDrive.BlockSize;
BlockCount = (EndBlock - StartBlock) + 1;
DbgPrint((DPRINT_CACHE, "StartBlock: %d SectorOffsetInStartBlock: %d CopyLengthInStartBlock: %d EndBlock: %d SectorOffsetInEndBlock: %d BlockCount: %d\n", StartBlock, SectorOffsetInStartBlock, CopyLengthInStartBlock, EndBlock, SectorOffsetInEndBlock, BlockCount));
//
// Read the first block into the buffer
//
if (BlockCount > 0)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, StartBlock);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
(CacheBlock->BlockData + (SectorOffsetInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)),
(CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector));
DbgPrint((DPRINT_CACHE, "1 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, (CacheBlock->BlockData + (SectorOffsetInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)), (CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector)));
//
// Update the buffer address
//
Buffer += (CopyLengthInStartBlock * CacheManagerDrive.DriveGeometry.BytesPerSector);
//
// Update the block count
//
BlockCount--;
}
//
// Loop through the middle blocks and read them into the buffer
//
for (Idx=StartBlock+1; BlockCount>1; Idx++)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, Idx);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
CacheBlock->BlockData,
CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector);
DbgPrint((DPRINT_CACHE, "2 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, CacheBlock->BlockData, CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector));
//
// Update the buffer address
//
Buffer += CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector;
//
// Update the block count
//
BlockCount--;
}
//
// Read the last block into the buffer
//
if (BlockCount > 0)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, EndBlock);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Copy the portion requested into the buffer
//
RtlCopyMemory(Buffer,
CacheBlock->BlockData,
SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector);
DbgPrint((DPRINT_CACHE, "3 - RtlCopyMemory(0x%x, 0x%x, %d)\n", Buffer, CacheBlock->BlockData, SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector));
//
// Update the buffer address
//
Buffer += SectorOffsetInEndBlock * CacheManagerDrive.DriveGeometry.BytesPerSector;
//
// Update the block count
//
BlockCount--;
}
return TRUE;
}
BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount)
{
PCACHE_BLOCK CacheBlock;
U32 StartBlock;
U32 EndBlock;
U32 BlockCount;
U32 Idx;
DbgPrint((DPRINT_CACHE, "CacheForceDiskSectorsIntoCache() DiskNumber: 0x%x StartSector: %d SectorCount: %d\n", DiskNumber, StartSector, SectorCount));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
//
// Caculate which blocks we must cache
//
StartBlock = StartSector / CacheManagerDrive.BlockSize;
EndBlock = (StartSector + SectorCount) / CacheManagerDrive.BlockSize;
BlockCount = (EndBlock - StartBlock) + 1;
//
// Loop through and cache them
//
for (Idx=StartBlock; Idx<(StartBlock+BlockCount); Idx++)
{
//
// Get cache block pointer (this forces the disk sectors into the cache memory)
//
CacheBlock = CacheInternalGetBlockPointer(&CacheManagerDrive, Idx);
if (CacheBlock == NULL)
{
return FALSE;
}
//
// Lock the sectors into the cache
//
CacheBlock->LockedInCache = TRUE;
}
return TRUE;
}
BOOL CacheReleaseMemory(U32 MinimumAmountToRelease)
{
U32 AmountReleased;
DbgPrint((DPRINT_CACHE, "CacheReleaseMemory() MinimumAmountToRelease = %d\n", MinimumAmountToRelease));
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
{
return FALSE;
}
// Loop through and try to free the requested amount of memory
for (AmountReleased=0; AmountReleased<MinimumAmountToRelease; )
{
// Try to free a block
// If this fails then break out of the loop
if (!CacheInternalFreeBlock(&CacheManagerDrive))
{
break;
}
// It succeeded so increment the amount of memory we have freed
AmountReleased += CacheManagerDrive.BlockSize * CacheManagerDrive.DriveGeometry.BytesPerSector;
}
// Return status
return (AmountReleased >= MinimumAmountToRelease);
}

View File

@@ -1,92 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <disk.h>
#ifndef __CM_H
#define __CM_H
///////////////////////////////////////////////////////////////////////////////////////
//
// This structure describes a cached block element. The disk is divided up into
// cache blocks. For disks which LBA is not supported each block is the size of
// one track. This will force the cache manager to make track sized reads, and
// therefore maximizes throughput. For disks which support LBA the block size
// is 64k because they have no cylinder, head, or sector boundaries.
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct
{
LIST_ITEM ListEntry; // Doubly linked list synchronization member
U32 BlockNumber; // Track index for CHS, 64k block index for LBA
BOOL LockedInCache; // Indicates that this block is locked in cache memory
U32 AccessCount; // Access count for this block
PVOID BlockData; // Pointer to block data
} CACHE_BLOCK, *PCACHE_BLOCK;
///////////////////////////////////////////////////////////////////////////////////////
//
// This structure describes a cached drive. It contains the BIOS drive number
// and indicates whether or not LBA is supported. If LBA is not supported then
// the drive's geometry is described here.
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct
{
U32 DriveNumber;
GEOMETRY DriveGeometry;
U32 BlockSize; // Block size (in sectors)
PCACHE_BLOCK CacheBlockHead;
} CACHE_DRIVE, *PCACHE_DRIVE;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal data
//
///////////////////////////////////////////////////////////////////////////////////////
extern CACHE_DRIVE CacheManagerDrive;
extern BOOL CacheManagerInitialized;
extern U32 CacheBlockCount;
extern U32 CacheSizeLimit;
extern U32 CacheSizeCurrent;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal functions
//
///////////////////////////////////////////////////////////////////////////////////////
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Searches the block list for a particular block
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Adds a block to the cache's block list
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive); // Removes a block from the cache's block list & frees the memory
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive); // Checks the cache size limits to see if we can add a new block, if not calls CacheInternalFreeBlock()
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the list of cached blocks to the debug output port
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock); // Moves the specified block to the head of the list
#endif // defined __CM_H

View File

@@ -1,277 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <comm.h>
#include <portio.h>
/* MACROS *******************************************************************/
#define DEFAULT_BAUD_RATE 19200
#define SER_RBR(x) ((x)+0)
#define SER_THR(x) ((x)+0)
#define SER_DLL(x) ((x)+0)
#define SER_IER(x) ((x)+1)
#define SER_DLM(x) ((x)+1)
#define SER_IIR(x) ((x)+2)
#define SER_LCR(x) ((x)+3)
#define SR_LCR_CS5 0x00
#define SR_LCR_CS6 0x01
#define SR_LCR_CS7 0x02
#define SR_LCR_CS8 0x03
#define SR_LCR_ST1 0x00
#define SR_LCR_ST2 0x04
#define SR_LCR_PNO 0x00
#define SR_LCR_POD 0x08
#define SR_LCR_PEV 0x18
#define SR_LCR_PMK 0x28
#define SR_LCR_PSP 0x38
#define SR_LCR_BRK 0x40
#define SR_LCR_DLAB 0x80
#define SER_MCR(x) ((x)+4)
#define SR_MCR_DTR 0x01
#define SR_MCR_RTS 0x02
#define SER_LSR(x) ((x)+5)
#define SR_LSR_DR 0x01
#define SR_LSR_TBE 0x20
#define SER_MSR(x) ((x)+6)
#define SR_MSR_CTS 0x10
#define SR_MSR_DSR 0x20
#define SER_SCR(x) ((x)+7)
/* STATIC VARIABLES *********************************************************/
static U32 Rs232ComPort = 0;
static U32 Rs232BaudRate = 0;
static PUCHAR Rs232PortBase = (PUCHAR)0;
/* The com port must only be initialized once! */
static BOOLEAN PortInitialized = FALSE;
/* STATIC FUNCTIONS *********************************************************/
static BOOL Rs232DoesComPortExist(PUCHAR BaseAddress)
{
BOOLEAN found;
U8 mcr;
U8 msr;
found = FALSE;
/* save Modem Control Register (MCR) */
mcr = READ_PORT_UCHAR (SER_MCR(BaseAddress));
/* enable loop mode (set Bit 4 of the MCR) */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
/* clear all modem output bits */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
/* read the Modem Status Register */
msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
/*
* the upper nibble of the MSR (modem output bits) must be
* equal to the lower nibble of the MCR (modem input bits)
*/
if ((msr & 0xF0) == 0x00)
{
/* set all modem output bits */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x1F);
/* read the Modem Status Register */
msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
/*
* the upper nibble of the MSR (modem output bits) must be
* equal to the lower nibble of the MCR (modem input bits)
*/
if ((msr & 0xF0) == 0xF0)
found = TRUE;
}
/* restore MCR */
WRITE_PORT_UCHAR (SER_MCR(BaseAddress), mcr);
return (found);
}
/* FUNCTIONS *********************************************************/
BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate)
{
U32 BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
//char buffer[80];
U32 divisor;
U8 lcr;
if (PortInitialized == FALSE)
{
if (BaudRate != 0)
{
Rs232BaudRate = BaudRate;
}
else
{
Rs232BaudRate = DEFAULT_BAUD_RATE;
}
if (ComPort == 0)
{
if (Rs232DoesComPortExist ((PUCHAR)BaseArray[2]))
{
Rs232PortBase = (PUCHAR)BaseArray[2];
Rs232ComPort = 2;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else if (Rs232DoesComPortExist ((PUCHAR)BaseArray[1]))
{
Rs232PortBase = (PUCHAR)BaseArray[1];
Rs232ComPort = 1;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else
{
/*sprintf (buffer,
"\nKernel Debugger: No COM port found!!!\n\n");
HalDisplayString (buffer);*/
return FALSE;
}
}
else
{
if (Rs232DoesComPortExist ((PUCHAR)BaseArray[ComPort]))
{
Rs232PortBase = (PUCHAR)BaseArray[ComPort];
Rs232ComPort = ComPort;
/*#ifndef NDEBUG
sprintf (buffer,
"\nSerial port COM%ld found at 0x%lx\n",
ComPort,
(U32)PortBase);
HalDisplayString (buffer);
#endif*/ /* NDEBUG */
}
else
{
/*sprintf (buffer,
"\nKernel Debugger: No serial port found!!!\n\n");
HalDisplayString (buffer);*/
return FALSE;
}
}
PortInitialized = TRUE;
}
/*
* set baud rate and data format (8N1)
*/
/* turn on DTR and RTS */
WRITE_PORT_UCHAR (SER_MCR(Rs232PortBase), SR_MCR_DTR | SR_MCR_RTS);
/* set DLAB */
lcr = READ_PORT_UCHAR (SER_LCR(Rs232PortBase)) | SR_LCR_DLAB;
WRITE_PORT_UCHAR (SER_LCR(Rs232PortBase), lcr);
/* set baud rate */
divisor = 115200 / BaudRate;
WRITE_PORT_UCHAR (SER_DLL(Rs232PortBase), divisor & 0xff);
WRITE_PORT_UCHAR (SER_DLM(Rs232PortBase), (divisor >> 8) & 0xff);
/* reset DLAB and set 8N1 format */
WRITE_PORT_UCHAR (SER_LCR(Rs232PortBase),
SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO);
/* read junk out of the RBR */
lcr = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
/*
* set global info
*/
//KdComPortInUse = (U32)PortBase;
/*
* print message to blue screen
*/
/*sprintf (buffer,
"\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n",
ComPort,
(U32)PortBase,
BaudRate);
HalDisplayString (buffer);*/
return TRUE;
}
BOOL Rs232PortGetByte(PUCHAR ByteRecieved)
{
if (PortInitialized == FALSE)
return FALSE;
if ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_DR))
{
*ByteRecieved = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
return TRUE;
}
return FALSE;
}
BOOL Rs232PortPollByte(PUCHAR ByteRecieved)
{
if (PortInitialized == FALSE)
return FALSE;
while ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_DR) == 0)
;
*ByteRecieved = READ_PORT_UCHAR (SER_RBR(Rs232PortBase));
return TRUE;
}
VOID Rs232PortPutByte(UCHAR ByteToSend)
{
if (PortInitialized == FALSE)
return;
while ((READ_PORT_UCHAR (SER_LSR(Rs232PortBase)) & SR_LSR_TBE) == 0)
;
WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend);
}

View File

@@ -1,400 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <ui.h>
#include <options.h>
#include <miscboot.h>
#include <debug.h>
#include <disk.h>
#include <arch.h>
#include <inifile.h>
#include <linux.h>
#include <reactos.h>
#include <drivemap.h>
UCHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
UCHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
UCHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos";
UCHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18";
UCHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk.";
UCHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init";
UCHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS";
UCHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
UCHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup.";
VOID OptionMenuCustomBoot(VOID)
{
PUCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" };
U32 CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]);
U32 SelectedMenuItem;
if (!UiDisplayMenu(CustomBootMenuList, CustomBootMenuCount, 0, -1, &SelectedMenuItem, TRUE, NULL))
{
// The user pressed ESC
return;
}
switch (SelectedMenuItem)
{
case 0: // Disk
OptionMenuCustomBootDisk();
break;
case 1: // Partition
OptionMenuCustomBootPartition();
break;
case 2: // Boot Sector File
OptionMenuCustomBootBootSectorFile();
break;
case 3: // ReactOS
OptionMenuCustomBootReactOS();
break;
case 4: // Linux
OptionMenuCustomBootLinux();
break;
}
}
VOID OptionMenuCustomBootDisk(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootDisk%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Drive"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootDrive(SectionName);
}
VOID OptionMenuCustomBootPartition(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootPartition%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Partition"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootPartition(SectionName);
}
VOID OptionMenuCustomBootBootSectorFile(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR BootSectorFileString[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(BootSectorFileString, sizeof(BootSectorFileString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(BootSectorFilePrompt, BootSectorFileString, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomBootSectorFile%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "BootSector"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
// Add the BootSectorFile
if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFileString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootBootSector(SectionName);
}
VOID OptionMenuCustomBootReactOS(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR ReactOSSystemPath[200];
UCHAR ReactOSARCPath[200];
UCHAR ReactOSOptions[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(ReactOSSystemPath, sizeof(ReactOSSystemPath));
RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, 200))
{
return;
}
if (!UiEditBox(ReactOSOptionsPrompt, ReactOSOptions, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomReactOS%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "ReactOS"))
{
return;
}
// Construct the ReactOS ARC system path
ConstructArcPath(ReactOSARCPath, ReactOSSystemPath, DriveMapGetBiosDriveNumber(BootDriveString), atoi(BootPartitionString));
// Add the system path
if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath))
{
return;
}
// Add the CommandLine
if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootReactOS(SectionName);
}
VOID OptionMenuCustomBootLinux(VOID)
{
UCHAR SectionName[100];
UCHAR BootDriveString[20];
UCHAR BootPartitionString[20];
UCHAR LinuxKernelString[200];
UCHAR LinuxInitrdString[200];
UCHAR LinuxCommandLineString[200];
U32 SectionId;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
RtlZeroMemory(LinuxKernelString, sizeof(LinuxKernelString));
RtlZeroMemory(LinuxInitrdString, sizeof(LinuxInitrdString));
RtlZeroMemory(LinuxCommandLineString, sizeof(LinuxCommandLineString));
if (!UiEditBox(BootDrivePrompt, BootDriveString, 20))
{
return;
}
if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20))
{
return;
}
if (!UiEditBox(LinuxKernelPrompt, LinuxKernelString, 200))
{
return;
}
if (!UiEditBox(LinuxInitrdPrompt, LinuxInitrdString, 200))
{
return;
}
if (!UiEditBox(LinuxCommandLinePrompt, LinuxCommandLineString, 200))
{
return;
}
// Generate a unique section name
sprintf(SectionName, "CustomLinux%d%d%d%d%d%d", getyear(), getday(), getmonth(), gethour(), getminute(), getsecond());
// Add the section
if (!IniAddSection(SectionName, &SectionId))
{
return;
}
// Add the BootType
if (!IniAddSettingValueToSection(SectionId, "BootType", "Linux"))
{
return;
}
// Add the BootDrive
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString))
{
return;
}
// Add the BootPartition
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString))
{
return;
}
// Add the Kernel
if (!IniAddSettingValueToSection(SectionId, "Kernel", LinuxKernelString))
{
return;
}
// Add the Initrd
if (strlen(LinuxInitrdString) > 0)
{
if (!IniAddSettingValueToSection(SectionId, "Initrd", LinuxInitrdString))
{
return;
}
}
// Add the CommandLine
if (!IniAddSettingValueToSection(SectionId, "CommandLine", LinuxCommandLineString))
{
return;
}
UiMessageBox(CustomBootPrompt);
LoadAndBootLinux(SectionName, "Custom Linux Setup");
}

View File

@@ -1,380 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <debug.h>
#include <rtl.h>
#include <comm.h>
#include <portio.h>
#ifdef DEBUG
//#define DEBUG_ALL
//#define DEBUG_INIFILE
//#define DEBUG_REACTOS
//#define DEBUG_CUSTOM
#define DEBUG_NONE
#if defined (DEBUG_ALL)
U32 DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS |
DPRINT_LINUX;
#elif defined (DEBUG_INIFILE)
U32 DebugPrintMask = DPRINT_INIFILE;
#elif defined (DEBUG_REACTOS)
U32 DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY;
#elif defined (DEBUG_CUSTOM)
U32 DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINUX;
#else //#elif defined (DEBUG_NONE)
U32 DebugPrintMask = 0;
#endif
#define SCREEN 0
#define RS232 1
#define BOCHS 2
#define COM1 1
#define COM2 2
#define COM3 3
#define COM4 4
#define BOCHS_OUTPUT_PORT 0xe9
U32 DebugPort = RS232;
//U32 DebugPort = SCREEN;
//U32 DebugPort = BOCHS;
U32 ComPort = COM1;
//U32 BaudRate = 19200;
U32 BaudRate = 115200;
BOOL DebugStartOfLine = TRUE;
VOID DebugInit(VOID)
{
if (DebugPort == RS232)
{
Rs232PortInitialize(ComPort, BaudRate);
}
}
VOID DebugPrintChar(UCHAR Character)
{
if (Character == '\n')
{
DebugStartOfLine = TRUE;
}
if (DebugPort == RS232)
{
if (Character == '\n')
{
Rs232PortPutByte('\r');
}
Rs232PortPutByte(Character);
}
else if (DebugPort == BOCHS)
{
WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character);
}
else
{
putchar(Character);
}
}
VOID DebugPrintHeader(U32 Mask)
{
/* No header */
if (Mask == 0)
return;
switch (Mask)
{
case DPRINT_WARNING:
DebugPrintChar('W');
DebugPrintChar('A');
DebugPrintChar('R');
DebugPrintChar('N');
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('G');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_MEMORY:
DebugPrintChar('M');
DebugPrintChar('E');
DebugPrintChar('M');
DebugPrintChar('O');
DebugPrintChar('R');
DebugPrintChar('Y');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_FILESYSTEM:
DebugPrintChar('F');
DebugPrintChar('I');
DebugPrintChar('L');
DebugPrintChar('E');
DebugPrintChar('S');
DebugPrintChar('Y');
DebugPrintChar('S');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_INIFILE:
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('I');
DebugPrintChar('F');
DebugPrintChar('I');
DebugPrintChar('L');
DebugPrintChar('E');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_UI:
DebugPrintChar('U');
DebugPrintChar('I');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_DISK:
DebugPrintChar('D');
DebugPrintChar('I');
DebugPrintChar('S');
DebugPrintChar('K');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_CACHE:
DebugPrintChar('C');
DebugPrintChar('A');
DebugPrintChar('C');
DebugPrintChar('H');
DebugPrintChar('E');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_REGISTRY:
DebugPrintChar('R');
DebugPrintChar('E');
DebugPrintChar('G');
DebugPrintChar('I');
DebugPrintChar('S');
DebugPrintChar('T');
DebugPrintChar('R');
DebugPrintChar('Y');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_REACTOS:
DebugPrintChar('R');
DebugPrintChar('E');
DebugPrintChar('A');
DebugPrintChar('C');
DebugPrintChar('T');
DebugPrintChar('O');
DebugPrintChar('S');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_LINUX:
DebugPrintChar('L');
DebugPrintChar('I');
DebugPrintChar('N');
DebugPrintChar('U');
DebugPrintChar('X');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
case DPRINT_HWDETECT:
DebugPrintChar('H');
DebugPrintChar('W');
DebugPrintChar('D');
DebugPrintChar('E');
DebugPrintChar('T');
DebugPrintChar('E');
DebugPrintChar('C');
DebugPrintChar('T');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
default:
DebugPrintChar('U');
DebugPrintChar('N');
DebugPrintChar('K');
DebugPrintChar('N');
DebugPrintChar('O');
DebugPrintChar('W');
DebugPrintChar('N');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
}
}
VOID DebugPrint(U32 Mask, char *format, ...)
{
int *dataptr = (int *) &format;
char c, *ptr, str[16];
// Mask out unwanted debug messages
if (!(Mask & DebugPrintMask))
{
return;
}
// Print the header if we have started a new line
if (DebugStartOfLine)
{
DebugPrintHeader(Mask);
DebugStartOfLine = FALSE;
}
dataptr++;
while ((c = *(format++)))
{
if (c != '%')
{
DebugPrintChar(c);
}
else
{
switch (c = *(format++))
{
case 'd': case 'u': case 'x':
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
ptr = str;
while (*ptr)
{
DebugPrintChar(*(ptr++));
}
break;
case 'c':
DebugPrintChar((*(dataptr++))&0xff);
break;
case 's':
ptr = (char *)(*(dataptr++));
while ((c = *(ptr++)))
{
DebugPrintChar(c);
}
break;
case '%':
DebugPrintChar(c);
break;
default:
DebugPrint(Mask, "\nDebugPrint() invalid format specifier - %%%c\n", c);
break;
}
}
}
if (DebugPort == SCREEN)
{
//getch();
}
}
VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length)
{
PUCHAR BufPtr = (PUCHAR)Buffer;
U32 Idx;
U32 Idx2;
// Mask out unwanted debug messages
if (!(Mask & DebugPrintMask))
{
return;
}
DebugStartOfLine = FALSE; // We don't want line headers
DebugPrint(Mask, "Dumping buffer at 0x%x with length of %d bytes:\n", Buffer, Length);
for (Idx=0; Idx<Length; )
{
DebugStartOfLine = FALSE; // We don't want line headers
if (Idx < 0x0010)
{
DebugPrint(Mask, "000%x:\t", Idx);
}
else if (Idx < 0x0100)
{
DebugPrint(Mask, "00%x:\t", Idx);
}
else if (Idx < 0x1000)
{
DebugPrint(Mask, "0%x:\t", Idx);
}
else
{
DebugPrint(Mask, "%x:\t", Idx);
}
for (Idx2=0; Idx2<16; Idx2++,Idx++)
{
if (BufPtr[Idx] < 0x10)
{
DebugPrint(Mask, "0");
}
DebugPrint(Mask, "%x", BufPtr[Idx]);
if (Idx2 == 7)
{
DebugPrint(Mask, "-");
}
else
{
DebugPrint(Mask, " ");
}
}
Idx -= 16;
DebugPrint(Mask, " ");
for (Idx2=0; Idx2<16; Idx2++,Idx++)
{
if ((BufPtr[Idx] > 20) && (BufPtr[Idx] < 0x80))
{
DebugPrint(Mask, "%c", BufPtr[Idx]);
}
else
{
DebugPrint(Mask, ".");
}
}
DebugPrint(Mask, "\n");
}
}
#endif // defined DEBUG

View File

@@ -1,112 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <arch.h>
#include <rtl.h>
#include <ui.h>
#include <debug.h>
#undef UNIMPLEMENTED
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
static BOOL bReportError = TRUE;
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID DiskReportError (BOOL bError)
{
bReportError = bError;
}
VOID DiskError(PUCHAR ErrorString, U32 ErrorCode)
{
UCHAR ErrorCodeString[200];
if (bReportError == FALSE)
return;
sprintf(ErrorCodeString, "%s\n\nError Code: 0x%x\nError: %s", ErrorString, ErrorCode, DiskGetErrorCodeString(ErrorCode));
DbgPrint((DPRINT_DISK, "%s\n", ErrorCodeString));
UiMessageBox(ErrorCodeString);
}
PUCHAR DiskGetErrorCodeString(U32 ErrorCode)
{
switch (ErrorCode)
{
case 0x00: return "no error";
case 0x01: return "bad command passed to driver";
case 0x02: return "address mark not found or bad sector";
case 0x03: return "diskette write protect error";
case 0x04: return "sector not found";
case 0x05: return "fixed disk reset failed";
case 0x06: return "diskette changed or removed";
case 0x07: return "bad fixed disk parameter table";
case 0x08: return "DMA overrun";
case 0x09: return "DMA access across 64k boundary";
case 0x0A: return "bad fixed disk sector flag";
case 0x0B: return "bad fixed disk cylinder";
case 0x0C: return "unsupported track/invalid media";
case 0x0D: return "invalid number of sectors on fixed disk format";
case 0x0E: return "fixed disk controlled data address mark detected";
case 0x0F: return "fixed disk DMA arbitration level out of range";
case 0x10: return "ECC/CRC error on disk read";
case 0x11: return "recoverable fixed disk data error, data fixed by ECC";
case 0x20: return "controller error (NEC for floppies)";
case 0x40: return "seek failure";
case 0x80: return "time out, drive not ready";
case 0xAA: return "fixed disk drive not ready";
case 0xBB: return "fixed disk undefined error";
case 0xCC: return "fixed disk write fault on selected drive";
case 0xE0: return "fixed disk status error/Error reg = 0";
case 0xFF: return "sense operation failed";
default: return "unknown error code";
}
}
// This function is in arch/i386/i386disk.c
//BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer)
BOOL DiskIsDriveRemovable(U32 DriveNumber)
{
// Hard disks use drive numbers >= 0x80
// So if the drive number indicates a hard disk
// then return FALSE
if (DriveNumber >= 0x80)
{
return FALSE;
}
// Drive is a floppy diskette so return TRUE
return TRUE;
}
// This function is in arch/i386/i386disk.c
//VOID DiskStopFloppyMotor(VOID)
// This function is in arch/i386/i386disk.c
//U32 DiskGetCacheableBlockCount(U32 DriveNumber)

View File

@@ -1,44 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
#ifdef __i386__
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry)
{
// For now just return the geometry as the BIOS reports it
// BytesPerSector is always set to 512 by i386DiskGetDriveParameters()
if (!DiskGetDriveParameters(DriveNumber, DriveGeometry))
{
DiskError("Drive geometry unknown.", 0);
return FALSE;
}
return TRUE;
}
#else
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry)
{
UNIMPLEMENTED();
}
#endif

View File

@@ -1,239 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
#include <debug.h>
#include <arch.h>
BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 BootablePartitionCount = 0;
MASTER_BOOT_RECORD MasterBootRecord;
// Read master boot record
if (!DiskReadBootRecord(DriveNumber, 0, &MasterBootRecord))
{
return FALSE;
}
// Count the bootable partitions
if (MasterBootRecord.PartitionTable[0].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 0;
}
if (MasterBootRecord.PartitionTable[1].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 1;
}
if (MasterBootRecord.PartitionTable[2].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 2;
}
if (MasterBootRecord.PartitionTable[3].BootIndicator == 0x80)
{
BootablePartitionCount++;
BootPartition = 3;
}
// Make sure there was only one bootable partition
if (BootablePartitionCount == 0)
{
DiskError("No bootable (active) partitions found.", 0);
return FALSE;
}
else if (BootablePartitionCount != 1)
{
DiskError("Too many bootable (active) partitions found.", 0);
return FALSE;
}
// Copy the partition table entry
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[BootPartition], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
MASTER_BOOT_RECORD MasterBootRecord;
PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry;
U32 ExtendedPartitionNumber;
U32 ExtendedPartitionRelativeOffset;
U32 Index;
// Read master boot record
if (!DiskReadBootRecord(DriveNumber, 0, &MasterBootRecord))
{
return FALSE;
}
// If they are asking for a primary
// partition then things are easy
if (PartitionNumber < 5)
{
// PartitionNumber is one-based and we need it zero-based
PartitionNumber--;
// Copy the partition table entry
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[PartitionNumber], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
else
{
// They want an extended partition entry so we will need
// to loop through all the extended partitions on the disk
// and return the one they want.
ExtendedPartitionNumber = PartitionNumber - 5;
// Set the initial relative starting sector to 0
// This is because extended partition starting
// sectors a numbered relative to their parent
ExtendedPartitionRelativeOffset = 0;
for (Index=0; Index<=ExtendedPartitionNumber; Index++)
{
// Get the extended partition table entry
if (!DiskGetFirstExtendedPartitionEntry(&MasterBootRecord, &ExtendedPartitionTableEntry))
{
return FALSE;
}
// Adjust the relative starting sector of the partition
ExtendedPartitionRelativeOffset += ExtendedPartitionTableEntry.SectorCountBeforePartition;
// Read the partition boot record
if (!DiskReadBootRecord(DriveNumber, ExtendedPartitionRelativeOffset, &MasterBootRecord))
{
return FALSE;
}
// Get the first real partition table entry
if (!DiskGetFirstPartitionEntry(&MasterBootRecord, PartitionTableEntry))
{
return FALSE;
}
// Now correct the start sector of the partition
PartitionTableEntry->SectorCountBeforePartition += ExtendedPartitionRelativeOffset;
}
// When we get here we should have the correct entry
// already stored in PartitionTableEntry
// so just return TRUE
return TRUE;
}
}
BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 Index;
for (Index=0; Index<4; Index++)
{
// Check the system indicator
// If it's not an extended or unused partition
// then we're done
if ((MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_ENTRY_UNUSED) &&
(MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_EXTENDED) &&
(MasterBootRecord->PartitionTable[Index].SystemIndicator != PARTITION_XINT13_EXTENDED))
{
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord->PartitionTable[Index], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
}
return FALSE;
}
BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
U32 Index;
for (Index=0; Index<4; Index++)
{
// Check the system indicator
// If it an extended partition then we're done
if ((MasterBootRecord->PartitionTable[Index].SystemIndicator == PARTITION_EXTENDED) ||
(MasterBootRecord->PartitionTable[Index].SystemIndicator == PARTITION_XINT13_EXTENDED))
{
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord->PartitionTable[Index], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
}
return FALSE;
}
BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord)
{
#ifdef DEBUG
U32 Index;
#endif
// Read master boot record
if (!DiskReadLogicalSectors(DriveNumber, LogicalSectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(BootRecord, (PVOID)DISKREADBUFFER, sizeof(MASTER_BOOT_RECORD));
#ifdef DEBUG
DbgPrint((DPRINT_DISK, "Dumping partition table for drive 0x%x:\n", DriveNumber));
DbgPrint((DPRINT_DISK, "Boot record logical start sector = %d\n", LogicalSectorNumber));
DbgPrint((DPRINT_DISK, "sizeof(MASTER_BOOT_RECORD) = 0x%x.\n", sizeof(MASTER_BOOT_RECORD)));
for (Index=0; Index<4; Index++)
{
DbgPrint((DPRINT_DISK, "-------------------------------------------\n"));
DbgPrint((DPRINT_DISK, "Partition %d\n", (Index + 1)));
DbgPrint((DPRINT_DISK, "BootIndicator: 0x%x\n", BootRecord->PartitionTable[Index].BootIndicator));
DbgPrint((DPRINT_DISK, "StartHead: 0x%x\n", BootRecord->PartitionTable[Index].StartHead));
DbgPrint((DPRINT_DISK, "StartSector (Plus 2 cylinder bits): 0x%x\n", BootRecord->PartitionTable[Index].StartSector));
DbgPrint((DPRINT_DISK, "StartCylinder: 0x%x\n", BootRecord->PartitionTable[Index].StartCylinder));
DbgPrint((DPRINT_DISK, "SystemIndicator: 0x%x\n", BootRecord->PartitionTable[Index].SystemIndicator));
DbgPrint((DPRINT_DISK, "EndHead: 0x%x\n", BootRecord->PartitionTable[Index].EndHead));
DbgPrint((DPRINT_DISK, "EndSector (Plus 2 cylinder bits): 0x%x\n", BootRecord->PartitionTable[Index].EndSector));
DbgPrint((DPRINT_DISK, "EndCylinder: 0x%x\n", BootRecord->PartitionTable[Index].EndCylinder));
DbgPrint((DPRINT_DISK, "SectorCountBeforePartition: 0x%x\n", BootRecord->PartitionTable[Index].SectorCountBeforePartition));
DbgPrint((DPRINT_DISK, "PartitionSectorCount: 0x%x\n", BootRecord->PartitionTable[Index].PartitionSectorCount));
}
#endif // defined DEBUG
// Check the partition table magic value
if (BootRecord->MasterBootRecordMagic != 0xaa55)
{
DiskError("Invalid partition table magic (0xaa55)", 0);
return FALSE;
}
return TRUE;
}

View File

@@ -1,227 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <drivemap.h>
#include <rtl.h>
#include <inifile.h>
#include <cache.h>
#include <ui.h>
#include <debug.h>
BOOL DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code
U32 OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler
U32 DriveMapHandlerAddress = 0; // Linear address of our drive map handler
U32 DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler
VOID DriveMapMapDrivesInSection(PUCHAR SectionName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
UCHAR ErrorText[260];
UCHAR Drive1[80];
UCHAR Drive2[80];
U32 SectionId;
U32 SectionItemCount;
U32 Index;
U32 Index2;
DRIVE_MAP_LIST DriveMapList;
RtlZeroMemory(&DriveMapList, sizeof(DRIVE_MAP_LIST));
if (!IniOpenSection(SectionName, &SectionId))
{
return;
}
// Get the number of items in this section
SectionItemCount = IniGetNumSectionItems(SectionId);
// Loop through each one and check if its a DriveMap= setting
for (Index=0; Index<SectionItemCount; Index++)
{
// Get the next setting from the .ini file section
if (IniReadSettingByNumber(SectionId, Index, SettingName, 80, SettingValue, 80))
{
if (stricmp(SettingName, "DriveMap") == 0)
{
// Make sure we haven't exceeded the drive map max count
if (DriveMapList.DriveMapCount >= 4)
{
sprintf(ErrorText, "Max DriveMap count exceeded in section [%s]:\n\n%s=%s", SectionName, SettingName, SettingValue);
UiMessageBox(ErrorText);
continue;
}
RtlZeroMemory(Drive1, 80);
RtlZeroMemory(Drive2, 80);
strcpy(Drive1, SettingValue);
// Parse the setting value and separate a string "hd0,hd1"
// into two strings "hd0" and "hd1"
for (Index2=0; Index2<strlen(Drive1); Index2++)
{
// Check if this character is the separater character (comma - ',')
if (Drive1[Index2] == ',')
{
Drive1[Index2] = '\0';
strcpy(Drive2, &Drive1[Index2+1]);
break;
}
}
// Make sure we got good values before we add them to the map
if (!DriveMapIsValidDriveString(Drive1) || !DriveMapIsValidDriveString(Drive2))
{
sprintf(ErrorText, "Error in DriveMap setting in section [%s]:\n\n%s=%s", SectionName, SettingName, SettingValue);
UiMessageBox(ErrorText);
continue;
}
// Add them to the map
DriveMapList.DriveMap[(DriveMapList.DriveMapCount * 2)] = DriveMapGetBiosDriveNumber(Drive1);
DriveMapList.DriveMap[(DriveMapList.DriveMapCount * 2)+1] = DriveMapGetBiosDriveNumber(Drive2);
DriveMapList.DriveMapCount++;
DbgPrint((DPRINT_WARNING, "Mapping BIOS drive 0x%x to drive 0x%x\n", DriveMapGetBiosDriveNumber(Drive1), DriveMapGetBiosDriveNumber(Drive2)));
}
}
}
if (DriveMapList.DriveMapCount)
{
DbgPrint((DPRINT_WARNING, "Installing Int13 drive map for %d drives.\n", DriveMapList.DriveMapCount));
DriveMapInstallInt13Handler(&DriveMapList);
}
else
{
DbgPrint((DPRINT_WARNING, "Removing any previously installed Int13 drive map.\n"));
DriveMapRemoveInt13Handler();
}
}
BOOL DriveMapIsValidDriveString(PUCHAR DriveString)
{
U32 Index;
// Now verify that the user has given us appropriate strings
if ((strlen(DriveString) < 3) ||
((DriveString[0] != 'f') && (DriveString[0] != 'F') && (DriveString[0] != 'h') && (DriveString[0] != 'H')) ||
((DriveString[1] != 'd') && (DriveString[1] != 'D')))
{
return FALSE;
}
// Now verify that the user has given us appropriate numbers
// Make sure that only numeric characters were given
for (Index=2; Index<strlen(DriveString); Index++)
{
if (DriveString[Index] < '0' || DriveString[Index] > '9')
{
return FALSE;
}
}
// Now make sure that they are not outrageous values (i.e. hd90874)
if ((atoi(&DriveString[2]) < 0) || (atoi(&DriveString[2]) > 0xff))
{
return FALSE;
}
return TRUE;
}
U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName)
{
U32 BiosDriveNumber = 0;
// If they passed in a number string then just
// convert it to decimal and return it
if (DeviceName[0] >= '0' && DeviceName[0] <= '9')
{
return atoi(DeviceName);
}
// Convert the drive number string into a number
// 'hd1' = 1
BiosDriveNumber = atoi(&DeviceName[2]);
// If it's a hard disk then set the high bit
if ((DeviceName[0] == 'h' || DeviceName[0] == 'H') &&
(DeviceName[1] == 'd' || DeviceName[1] == 'D'))
{
BiosDriveNumber |= 0x80;
}
return BiosDriveNumber;
}
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap)
{
U32* RealModeIVT = (U32*)0x00000000;
U16* BiosLowMemorySize = (U16*)0x00000413;
if (!DriveMapInstalled)
{
// Get the old INT 13h handler address from the vector table
OldInt13HandlerAddress = RealModeIVT[0x13];
// Decrease the size of low memory
(*BiosLowMemorySize)--;
// Get linear address for drive map handler
DriveMapHandlerAddress = (U32)(*BiosLowMemorySize) << 10;
// Convert to segment:offset style address
DriveMapHandlerSegOff = (DriveMapHandlerAddress << 12) & 0xffff0000;
}
// Copy the drive map structure to the proper place
RtlCopyMemory(&DriveMapInt13HandlerMapList, DriveMap, sizeof(DRIVE_MAP_LIST));
// Set the address of the BIOS INT 13h handler
DriveMapOldInt13HandlerAddress = OldInt13HandlerAddress;
// Copy the code to our reserved area
RtlCopyMemory((PVOID)DriveMapHandlerAddress, &DriveMapInt13HandlerStart, ((U32)&DriveMapInt13HandlerEnd - (U32)&DriveMapInt13HandlerStart));
// Update the IVT
RealModeIVT[0x13] = DriveMapHandlerSegOff;
CacheInvalidateCacheData();
DriveMapInstalled = TRUE;
}
VOID DriveMapRemoveInt13Handler(VOID)
{
U32* RealModeIVT = (U32*)0x00000000;
U16* BiosLowMemorySize = (U16*)0x00000413;
if (DriveMapInstalled)
{
// Get the old INT 13h handler address from the vector table
RealModeIVT[0x13] = OldInt13HandlerAddress;
// Increase the size of low memory
(*BiosLowMemorySize)++;
CacheInvalidateCacheData();
DriveMapInstalled = FALSE;
}
}

View File

@@ -1,51 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <rtl.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <bootmgr.h>
#include <fs.h>
// Variables BootDrive & BootPartition moved to asmcode.S
//U32 BootDrive = 0; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
//U32 BootPartition = 0; // Boot Partition, 1-4
VOID BootMain(VOID)
{
EnableA20();
#ifdef DEBUG
DebugInit();
#endif
DbgPrint((DPRINT_WARNING, "BootMain() called. BootDrive = 0x%x BootPartition = %d\n", BootDrive, BootPartition));
if (!MmInitializeMemoryManager())
{
printf("Press any key to reboot.\n");
getch();
return;
}
RunLoader();
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,697 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __EXT2_H
#define __EXT2_H
/*
* linux/include/linux/ext3_fs.h
*
* Copyright (C) 1992, 1993, 1994, 1995
* Remy Card (card@masi.ibp.fr)
* Laboratoire MASI - Institut Blaise Pascal
* Universite Pierre et Marie Curie (Paris VI)
*
* from
*
* linux/include/linux/minix_fs.h
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#ifndef _LINUX_EXT3_FS_H
#define _LINUX_EXT3_FS_H
//#include <linux/types.h>
/*
* The second extended filesystem constants/structures
*/
/*
* Define EXT3FS_DEBUG to produce debug messages
*/
#undef EXT3FS_DEBUG
/*
* Define EXT3_PREALLOCATE to preallocate data blocks for expanding files
*/
#undef EXT3_PREALLOCATE /* @@@ Fix this! */
#define EXT3_DEFAULT_PREALLOC_BLOCKS 8
/*
* The second extended file system version
*/
#define EXT3FS_DATE "10 Jan 2002"
#define EXT3FS_VERSION "2.4-0.9.17"
/*
* Debug code
*/
#ifdef EXT3FS_DEBUG
#define ext3_debug(f, a...) \
do { \
printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \
__FILE__, __LINE__, __FUNCTION__); \
printk (KERN_DEBUG f, ## a); \
} while (0)
#else
#define ext3_debug(f, a...) do {} while (0)
#endif
/*
* Special inodes numbers
*/
#define EXT3_BAD_INO 1 /* Bad blocks inode */
#define EXT3_ROOT_INO 2 /* Root inode */
#define EXT3_ACL_IDX_INO 3 /* ACL inode */
#define EXT3_ACL_DATA_INO 4 /* ACL inode */
#define EXT3_BOOT_LOADER_INO 5 /* Boot loader inode */
#define EXT3_UNDEL_DIR_INO 6 /* Undelete directory inode */
#define EXT3_RESIZE_INO 7 /* Reserved group descriptors inode */
#define EXT3_JOURNAL_INO 8 /* Journal inode */
/* First non-reserved inode for old ext3 filesystems */
#define EXT3_GOOD_OLD_FIRST_INO 11
/*
* The second extended file system magic number
*/
#define EXT3_SUPER_MAGIC 0xEF53
/*
* Maximal count of links to a file
*/
#define EXT3_LINK_MAX 32000
/*
* Macro-instructions used to manage several block sizes
*/
#define EXT3_MIN_BLOCK_SIZE 1024
#define EXT3_MAX_BLOCK_SIZE 4096
#define EXT3_MIN_BLOCK_LOG_SIZE 10
#ifdef __KERNEL__
# define EXT3_BLOCK_SIZE(s) ((s)->s_blocksize)
#else
# define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
#endif
#define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry))
#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
#ifdef __KERNEL__
# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
#else
# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
#endif
#ifdef __KERNEL__
#define EXT3_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext3_sb.s_addr_per_block_bits)
#define EXT3_INODE_SIZE(s) ((s)->u.ext3_sb.s_inode_size)
#define EXT3_FIRST_INO(s) ((s)->u.ext3_sb.s_first_ino)
#else
#define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
EXT3_GOOD_OLD_INODE_SIZE : \
(s)->s_inode_size)
#define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
EXT3_GOOD_OLD_FIRST_INO : \
(s)->s_first_ino)
#endif
/*
* Macro-instructions used to manage fragments
*/
#define EXT3_MIN_FRAG_SIZE 1024
#define EXT3_MAX_FRAG_SIZE 4096
#define EXT3_MIN_FRAG_LOG_SIZE 10
#ifdef __KERNEL__
# define EXT3_FRAG_SIZE(s) ((s)->u.ext3_sb.s_frag_size)
# define EXT3_FRAGS_PER_BLOCK(s) ((s)->u.ext3_sb.s_frags_per_block)
#else
# define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size)
# define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s))
#endif
/*
* ACL structures
*/
struct ext3_acl_header /* Header of Access Control Lists */
{
__u32 aclh_size;
__u32 aclh_file_count;
__u32 aclh_acle_count;
__u32 aclh_first_acle;
};
struct ext3_acl_entry /* Access Control List Entry */
{
__u32 acle_size;
__u16 acle_perms; /* Access permissions */
__u16 acle_type; /* Type of entry */
__u16 acle_tag; /* User or group identity */
__u16 acle_pad1;
__u32 acle_next; /* Pointer on next entry for the */
/* same inode or on next free entry */
};
/*
* Structure of a blocks group descriptor
*/
struct ext3_group_desc
{
__u32 bg_block_bitmap; /* Blocks bitmap block */
__u32 bg_inode_bitmap; /* Inodes bitmap block */
__u32 bg_inode_table; /* Inodes table block */
__u16 bg_free_blocks_count; /* Free blocks count */
__u16 bg_free_inodes_count; /* Free inodes count */
__u16 bg_used_dirs_count; /* Directories count */
__u16 bg_pad;
__u32 bg_reserved[3];
};
/*
* Macro-instructions used to manage group descriptors
*/
#ifdef __KERNEL__
# define EXT3_BLOCKS_PER_GROUP(s) ((s)->u.ext3_sb.s_blocks_per_group)
# define EXT3_DESC_PER_BLOCK(s) ((s)->u.ext3_sb.s_desc_per_block)
# define EXT3_INODES_PER_GROUP(s) ((s)->u.ext3_sb.s_inodes_per_group)
# define EXT3_DESC_PER_BLOCK_BITS(s) ((s)->u.ext3_sb.s_desc_per_block_bits)
#else
# define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
# define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc))
# define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
#endif
/*
* Constants relative to the data blocks
*/
#define EXT3_NDIR_BLOCKS 12
#define EXT3_IND_BLOCK EXT3_NDIR_BLOCKS
#define EXT3_DIND_BLOCK (EXT3_IND_BLOCK + 1)
#define EXT3_TIND_BLOCK (EXT3_DIND_BLOCK + 1)
#define EXT3_N_BLOCKS (EXT3_TIND_BLOCK + 1)
/*
* Inode flags
*/
#define EXT3_SECRM_FL 0x00000001 /* Secure deletion */
#define EXT3_UNRM_FL 0x00000002 /* Undelete */
#define EXT3_COMPR_FL 0x00000004 /* Compress file */
#define EXT3_SYNC_FL 0x00000008 /* Synchronous updates */
#define EXT3_IMMUTABLE_FL 0x00000010 /* Immutable file */
#define EXT3_APPEND_FL 0x00000020 /* writes to file may only append */
#define EXT3_NODUMP_FL 0x00000040 /* do not dump file */
#define EXT3_NOATIME_FL 0x00000080 /* do not update atime */
/* Reserved for compression usage... */
#define EXT3_DIRTY_FL 0x00000100
#define EXT3_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
#define EXT3_NOCOMPR_FL 0x00000400 /* Don't compress */
#define EXT3_ECOMPR_FL 0x00000800 /* Compression error */
/* End compression flags --- maybe not all used */
#define EXT3_INDEX_FL 0x00001000 /* hash-indexed directory */
#define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */
#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
#define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */
#define EXT3_FL_USER_VISIBLE 0x00005FFF /* User visible flags */
#define EXT3_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
/*
* Inode dynamic state flags
*/
#define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */
#define EXT3_STATE_NEW 0x00000002 /* inode is newly created */
/*
* ioctl commands
*/
#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
#define EXT3_IOC_SETFLAGS _IOW('f', 2, long)
#define EXT3_IOC_GETVERSION _IOR('f', 3, long)
#define EXT3_IOC_SETVERSION _IOW('f', 4, long)
#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long)
#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long)
#ifdef CONFIG_JBD_DEBUG
#define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long)
#endif
/*
* Structure of an inode on the disk
*/
struct ext3_inode {
__u16 i_mode; /* File mode */
__u16 i_uid; /* Low 16 bits of Owner Uid */
__u32 i_size; /* Size in bytes */
__u32 i_atime; /* Access time */
__u32 i_ctime; /* Creation time */
__u32 i_mtime; /* Modification time */
__u32 i_dtime; /* Deletion Time */
__u16 i_gid; /* Low 16 bits of Group Id */
__u16 i_links_count; /* Links count */
__u32 i_blocks; /* Blocks count */
__u32 i_flags; /* File flags */
union {
struct {
__u32 l_i_reserved1;
} linux1;
struct {
__u32 h_i_translator;
} hurd1;
struct {
__u32 m_i_reserved1;
} masix1;
} osd1; /* OS dependent 1 */
__u32 i_block[EXT3_N_BLOCKS];/* Pointers to blocks */
__u32 i_generation; /* File version (for NFS) */
__u32 i_file_acl; /* File ACL */
__u32 i_dir_acl; /* Directory ACL */
__u32 i_faddr; /* Fragment address */
union {
struct {
__u8 l_i_frag; /* Fragment number */
__u8 l_i_fsize; /* Fragment size */
__u16 i_pad1;
__u16 l_i_uid_high; /* these 2 fields */
__u16 l_i_gid_high; /* were reserved2[0] */
__u32 l_i_reserved2;
} linux2;
struct {
__u8 h_i_frag; /* Fragment number */
__u8 h_i_fsize; /* Fragment size */
__u16 h_i_mode_high;
__u16 h_i_uid_high;
__u16 h_i_gid_high;
__u32 h_i_author;
} hurd2;
struct {
__u8 m_i_frag; /* Fragment number */
__u8 m_i_fsize; /* Fragment size */
__u16 m_pad1;
__u32 m_i_reserved2[2];
} masix2;
} osd2; /* OS dependent 2 */
};
#define i_size_high i_dir_acl
#if defined(__KERNEL__) || defined(__linux__)
#define i_reserved1 osd1.linux1.l_i_reserved1
#define i_frag osd2.linux2.l_i_frag
#define i_fsize osd2.linux2.l_i_fsize
#define i_uid_low i_uid
#define i_gid_low i_gid
#define i_uid_high osd2.linux2.l_i_uid_high
#define i_gid_high osd2.linux2.l_i_gid_high
#define i_reserved2 osd2.linux2.l_i_reserved2
#elif defined(__GNU__)
#define i_translator osd1.hurd1.h_i_translator
#define i_frag osd2.hurd2.h_i_frag;
#define i_fsize osd2.hurd2.h_i_fsize;
#define i_uid_high osd2.hurd2.h_i_uid_high
#define i_gid_high osd2.hurd2.h_i_gid_high
#define i_author osd2.hurd2.h_i_author
#elif defined(__masix__)
#define i_reserved1 osd1.masix1.m_i_reserved1
#define i_frag osd2.masix2.m_i_frag
#define i_fsize osd2.masix2.m_i_fsize
#define i_reserved2 osd2.masix2.m_i_reserved2
#endif /* defined(__KERNEL__) || defined(__linux__) */
/*
* File system states
*/
#define EXT3_VALID_FS 0x0001 /* Unmounted cleanly */
#define EXT3_ERROR_FS 0x0002 /* Errors detected */
#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */
/*
* Mount flags
*/
#define EXT3_MOUNT_CHECK 0x0001 /* Do mount-time checks */
#define EXT3_MOUNT_GRPID 0x0004 /* Create files with directory's group */
#define EXT3_MOUNT_DEBUG 0x0008 /* Some debugging messages */
#define EXT3_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
#define EXT3_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
#define EXT3_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
#define EXT3_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
#define EXT3_MOUNT_NOLOAD 0x0100 /* Don't use existing journal*/
#define EXT3_MOUNT_ABORT 0x0200 /* Fatal error detected */
#define EXT3_MOUNT_DATA_FLAGS 0x0C00 /* Mode for data writes: */
#define EXT3_MOUNT_JOURNAL_DATA 0x0400 /* Write data to journal */
#define EXT3_MOUNT_ORDERED_DATA 0x0800 /* Flush data before commit */
#define EXT3_MOUNT_WRITEBACK_DATA 0x0C00 /* No data ordering */
#define EXT3_MOUNT_UPDATE_JOURNAL 0x1000 /* Update the journal format */
#define EXT3_MOUNT_NO_UID32 0x2000 /* Disable 32-bit UIDs */
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
#ifndef _LINUX_EXT2_FS_H
#define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt
#define set_opt(o, opt) o |= EXT3_MOUNT_##opt
#define test_opt(sb, opt) ((sb)->u.ext3_sb.s_mount_opt & \
EXT3_MOUNT_##opt)
#else
#define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD
#define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT
#endif
#define ext3_set_bit ext2_set_bit
#define ext3_clear_bit ext2_clear_bit
#define ext3_test_bit ext2_test_bit
#define ext3_find_first_zero_bit ext2_find_first_zero_bit
#define ext3_find_next_zero_bit ext2_find_next_zero_bit
/*
* Maximal mount counts between two filesystem checks
*/
#define EXT3_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
#define EXT3_DFL_CHECKINTERVAL 0 /* Don't use interval check */
/*
* Behaviour when detecting errors
*/
#define EXT3_ERRORS_CONTINUE 1 /* Continue execution */
#define EXT3_ERRORS_RO 2 /* Remount fs read-only */
#define EXT3_ERRORS_PANIC 3 /* Panic */
#define EXT3_ERRORS_DEFAULT EXT3_ERRORS_CONTINUE
/*
* Structure of the super block
*/
struct ext3_super_block {
/*00*/ __u32 s_inodes_count; /* Inodes count */
__u32 s_blocks_count; /* Blocks count */
__u32 s_r_blocks_count; /* Reserved blocks count */
__u32 s_free_blocks_count; /* Free blocks count */
/*10*/ __u32 s_free_inodes_count; /* Free inodes count */
__u32 s_first_data_block; /* First Data Block */
__u32 s_log_block_size; /* Block size */
__s32 s_log_frag_size; /* Fragment size */
/*20*/ __u32 s_blocks_per_group; /* # Blocks per group */
__u32 s_frags_per_group; /* # Fragments per group */
__u32 s_inodes_per_group; /* # Inodes per group */
__u32 s_mtime; /* Mount time */
/*30*/ __u32 s_wtime; /* Write time */
__u16 s_mnt_count; /* Mount count */
__s16 s_max_mnt_count; /* Maximal mount count */
__u16 s_magic; /* Magic signature */
__u16 s_state; /* File system state */
__u16 s_errors; /* Behaviour when detecting errors */
__u16 s_minor_rev_level; /* minor revision level */
/*40*/ __u32 s_lastcheck; /* time of last check */
__u32 s_checkinterval; /* max. time between checks */
__u32 s_creator_os; /* OS */
__u32 s_rev_level; /* Revision level */
/*50*/ __u16 s_def_resuid; /* Default uid for reserved blocks */
__u16 s_def_resgid; /* Default gid for reserved blocks */
/*
* These fields are for EXT3_DYNAMIC_REV superblocks only.
*
* Note: the difference between the compatible feature set and
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the filesystem.
*
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
* things it doesn't understand...
*/
__u32 s_first_ino; /* First non-reserved inode */
__u16 s_inode_size; /* size of inode structure */
__u16 s_block_group_nr; /* block group # of this superblock */
__u32 s_feature_compat; /* compatible feature set */
/*60*/ __u32 s_feature_incompat; /* incompatible feature set */
__u32 s_feature_ro_compat; /* readonly-compatible feature set */
/*68*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
/*78*/ char s_volume_name[16]; /* volume name */
/*88*/ char s_last_mounted[64]; /* directory where last mounted */
/*C8*/ __u32 s_algorithm_usage_bitmap; /* For compression */
/*
* Performance hints. Directory preallocation should only
* happen if the EXT3_FEATURE_COMPAT_DIR_PREALLOC flag is on.
*/
__u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
__u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
__u16 s_padding1;
/*
* Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
*/
/*D0*/ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
/*E0*/ __u32 s_journal_inum; /* inode number of journal file */
__u32 s_journal_dev; /* device number of journal file */
__u32 s_last_orphan; /* start of list of inodes to delete */
/*EC*/ __u32 s_reserved[197]; /* Padding to the end of the block */
};
#ifdef __KERNEL__
#define EXT3_SB(sb) (&((sb)->u.ext3_sb))
#define EXT3_I(inode) (&((inode)->u.ext3_i))
#else
/* Assume that user mode programs are passing in an ext3fs superblock, not
* a kernel struct super_block. This will allow us to call the feature-test
* macros from user land. */
#define EXT3_SB(sb) (sb)
#endif
#define NEXT_ORPHAN(inode) (inode)->u.ext3_i.i_dtime
/*
* Codes for operating systems
*/
#define EXT3_OS_LINUX 0
#define EXT3_OS_HURD 1
#define EXT3_OS_MASIX 2
#define EXT3_OS_FREEBSD 3
#define EXT3_OS_LITES 4
/*
* Revision levels
*/
#define EXT3_GOOD_OLD_REV 0 /* The good old (original) format */
#define EXT3_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
#define EXT3_CURRENT_REV EXT3_GOOD_OLD_REV
#define EXT3_MAX_SUPP_REV EXT3_DYNAMIC_REV
#define EXT3_GOOD_OLD_INODE_SIZE 128
/*
* Feature set definitions
*/
#define EXT3_HAS_COMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
#define EXT3_HAS_RO_COMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
#define EXT3_HAS_INCOMPAT_FEATURE(sb,mask) \
( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
#define EXT3_SET_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
#define EXT3_SET_RO_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
#define EXT3_SET_INCOMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
#define EXT3_CLEAR_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
#define EXT3_CLEAR_INCOMPAT_FEATURE(sb,mask) \
EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
#define EXT3_FEATURE_COMPAT_DIR_PREALLOC 0x0001
#define EXT3_FEATURE_COMPAT_IMAGIC_INODES 0x0002
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
#define EXT3_FEATURE_COMPAT_EXT_ATTR 0x0008
#define EXT3_FEATURE_COMPAT_RESIZE_INODE 0x0010
#define EXT3_FEATURE_COMPAT_DIR_INDEX 0x0020
#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
#define EXT3_FEATURE_COMPAT_SUPP 0
/*#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \
EXT3_FEATURE_INCOMPAT_RECOVER)*/
#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE)
#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
/*
* Default values for user and/or group using reserved blocks
*/
#define EXT3_DEF_RESUID 0
#define EXT3_DEF_RESGID 0
/*
* Structure of a directory entry
*/
#define EXT3_NAME_LEN 255
struct ext3_dir_entry {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u16 name_len; /* Name length */
char name[EXT3_NAME_LEN]; /* File name */
};
/*
* The new version of the directory entry. Since EXT3 structures are
* stored in intel byte order, and the name_len field could never be
* bigger than 255 chars, it's safe to reclaim the extra byte for the
* file_type field.
*/
struct ext3_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT3_NAME_LEN]; /* File name */
};
/*
* Ext3 directory file types. Only the low 3 bits are used. The
* other bits are reserved for now.
*/
#define EXT3_FT_UNKNOWN 0
#define EXT3_FT_REG_FILE 1
#define EXT3_FT_DIR 2
#define EXT3_FT_CHRDEV 3
#define EXT3_FT_BLKDEV 4
#define EXT3_FT_FIFO 5
#define EXT3_FT_SOCK 6
#define EXT3_FT_SYMLINK 7
#define EXT3_FT_MAX 8
/*
* EXT3_DIR_PAD defines the directory entries boundaries
*
* NOTE: It must be a multiple of 4
*/
#define EXT3_DIR_PAD 4
#define EXT3_DIR_ROUND (EXT3_DIR_PAD - 1)
#define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & \
~EXT3_DIR_ROUND)
#ifdef __KERNEL__
/*
* Describe an inode's exact location on disk and in memory
*/
struct ext3_iloc
{
struct buffer_head *bh;
struct ext3_inode *raw_inode;
unsigned long block_group;
};
#endif /* __KERNEL__ */
#endif /* _LINUX_EXT3_FS_H */
typedef struct ext3_super_block EXT2_SUPER_BLOCK, *PEXT2_SUPER_BLOCK;
typedef struct ext3_inode EXT2_INODE, *PEXT2_INODE;
typedef struct ext3_group_desc EXT2_GROUP_DESC, *PEXT2_GROUP_DESC;
typedef struct ext3_dir_entry_2 EXT2_DIR_ENTRY, *PEXT2_DIR_ENTRY;
// EXT2_INODE::i_mode values
#define EXT2_S_IRWXO 0x0007 // Other mask
#define EXT2_S_IXOTH 0x0001 // ---------x execute
#define EXT2_S_IWOTH 0x0002 // --------w- write
#define EXT2_S_IROTH 0x0004 // -------r-- read
#define EXT2_S_IRWXG 0x0038 // Group mask
#define EXT2_S_IXGRP 0x0008 // ------x--- execute
#define EXT2_S_IWGRP 0x0010 // -----w---- write
#define EXT2_S_IRGRP 0x0020 // ----r----- read
#define EXT2_S_IRWXU 0x01C0 // User mask
#define EXT2_S_IXUSR 0x0040 // ---x------ execute
#define EXT2_S_IWUSR 0x0080 // --w------- write
#define EXT2_S_IRUSR 0x0100 // -r-------- read
#define EXT2_S_ISVTX 0x0200 // Sticky bit
#define EXT2_S_ISGID 0x0400 // SGID
#define EXT2_S_ISUID 0x0800 // SUID
#define EXT2_S_IFMT 0xF000 // Format mask
#define EXT2_S_IFIFO 0x1000 // FIFO buffer
#define EXT2_S_IFCHR 0x2000 // Character device
#define EXT2_S_IFDIR 0x4000 // Directory
#define EXT2_S_IFBLK 0x6000 // Block device
#define EXT2_S_IFREG 0x8000 // Regular file
#define EXT2_S_IFLNK 0xA000 // Symbolic link
#define EXT2_S_IFSOCK 0xC000 // Socket
#define FAST_SYMLINK_MAX_NAME_SIZE (EXT3_N_BLOCKS * sizeof(U32)) /* 60 bytes */
typedef struct
{
U64 FileSize; // File size
U64 FilePointer; // File pointer
U32* FileBlockList; // File block list
U8 DriveNumber; // Drive number of open file
EXT2_INODE Inode; // File's inode
} EXT2_FILE_INFO, * PEXT2_FILE_INFO;
BOOL Ext2OpenVolume(U8 DriveNumber, U64 VolumeStartSector);
FILE* Ext2OpenFile(PUCHAR FileName);
BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer);
BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry);
BOOL Ext2ReadFile(FILE *FileHandle, U64 BytesToRead, U64* BytesRead, PVOID Buffer);
U64 Ext2GetFileSize(FILE *FileHandle);
VOID Ext2SetFilePointer(FILE *FileHandle, U64 NewFilePointer);
U64 Ext2GetFilePointer(FILE *FileHandle);
BOOL Ext2ReadVolumeSectors(U8 DriveNumber, U64 SectorNumber, U64 SectorCount, PVOID Buffer);
BOOL Ext2ReadSuperBlock(VOID);
BOOL Ext2ReadGroupDescriptors(VOID);
BOOL Ext2ReadDirectory(U32 Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer);
BOOL Ext2ReadBlock(U32 BlockNumber, PVOID Buffer);
BOOL Ext2ReadPartialBlock(U32 BlockNumber, U32 StartingOffset, U32 Length, PVOID Buffer);
U32 Ext2GetGroupDescBlockNumber(U32 Group);
U32 Ext2GetGroupDescOffsetInBlock(U32 Group);
U32 Ext2GetInodeGroupNumber(U32 Inode);
U32 Ext2GetInodeBlockNumber(U32 Inode);
U32 Ext2GetInodeOffsetInBlock(U32 Inode);
BOOL Ext2ReadInode(U32 Inode, PEXT2_INODE InodeBuffer);
BOOL Ext2ReadGroupDescriptor(U32 Group, PEXT2_GROUP_DESC GroupBuffer);
U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode);
U64 Ext2GetInodeFileSize(PEXT2_INODE Inode);
BOOL Ext2CopyIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 IndirectBlock);
BOOL Ext2CopyDoubleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 DoubleIndirectBlock);
BOOL Ext2CopyTripleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 TripleIndirectBlock);
#endif // #defined __EXT2_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,162 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FAT_H
#define __FAT_H
typedef struct _FAT_BOOTSECTOR
{
U8 JumpBoot[3]; // Jump instruction to boot code
U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes
U16 BytesPerSector; // Bytes per sector
U8 SectorsPerCluster; // Number of sectors in a cluster
U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
U8 NumberOfFats; // Number of FAT tables
U16 RootDirEntries; // Number of root directory entries (fat12/16)
U16 TotalSectors; // Number of total sectors on the drive, 16-bit
U8 MediaDescriptor; // Media descriptor byte
U16 SectorsPerFat; // Sectors per FAT table (fat12/16)
U16 SectorsPerTrack; // Number of sectors in a track
U16 NumberOfHeads; // Number of heads on the disk
U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80)
U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
U32 VolumeSerialNumber; // Volume serial number
U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
U8 FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT "
U8 BootCodeAndData[448]; // The remainder of the boot sector
U16 BootSectorMagic; // 0xAA55
} PACKED FAT_BOOTSECTOR, *PFAT_BOOTSECTOR;
typedef struct _FAT32_BOOTSECTOR
{
U8 JumpBoot[3]; // Jump instruction to boot code
U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes
U16 BytesPerSector; // Bytes per sector
U8 SectorsPerCluster; // Number of sectors in a cluster
U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
U8 NumberOfFats; // Number of FAT tables
U16 RootDirEntries; // Number of root directory entries (fat12/16)
U16 TotalSectors; // Number of total sectors on the drive, 16-bit
U8 MediaDescriptor; // Media descriptor byte
U16 SectorsPerFat; // Sectors per FAT table (fat12/16)
U16 SectorsPerTrack; // Number of sectors in a track
U16 NumberOfHeads; // Number of heads on the disk
U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
U32 SectorsPerFatBig; // This field is the FAT32 32-bit count of sectors occupied by ONE FAT. BPB_FATSz16 must be 0
U16 ExtendedFlags; // Extended flags (fat32)
U16 FileSystemVersion; // File system version (fat32)
U32 RootDirStartCluster; // Starting cluster of the root directory (fat32)
U16 FsInfo; // Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1.
U16 BackupBootSector; // If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6.
U8 Reserved[12]; // Reserved for future expansion
U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80)
U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
U32 VolumeSerialNumber; // Volume serial number
U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
U8 FileSystemType[8]; // Always set to the string "FAT32 "
U8 BootCodeAndData[420]; // The remainder of the boot sector
U16 BootSectorMagic; // 0xAA55
} PACKED FAT32_BOOTSECTOR, *PFAT32_BOOTSECTOR;
/*
* Structure of MSDOS directory entry
*/
typedef struct //_DIRENTRY
{
UCHAR FileName[11]; /* Filename + extension */
U8 Attr; /* File attributes */
U8 ReservedNT; /* Reserved for use by Windows NT */
U8 TimeInTenths; /* Millisecond stamp at file creation */
U16 CreateTime; /* Time file was created */
U16 CreateDate; /* Date file was created */
U16 LastAccessDate; /* Date file was last accessed */
U16 ClusterHigh; /* High word of this entry's start cluster */
U16 Time; /* Time last modified */
U16 Date; /* Date last modified */
U16 ClusterLow; /* First cluster number low word */
U32 Size; /* File size */
} PACKED DIRENTRY, * PDIRENTRY;
typedef struct
{
U8 SequenceNumber; /* Sequence number for slot */
WCHAR Name0_4[5]; /* First 5 characters in name */
U8 EntryAttributes; /* Attribute byte */
U8 Reserved; /* Always 0 */
U8 AliasChecksum; /* Checksum for 8.3 alias */
WCHAR Name5_10[6]; /* 6 more characters in name */
U16 StartCluster; /* Starting cluster number */
WCHAR Name11_12[2]; /* Last 2 characters in name */
} PACKED LFN_DIRENTRY, * PLFN_DIRENTRY;
typedef struct
{
U32 FileSize; // File size
U32 FilePointer; // File pointer
U32* FileFatChain; // File fat chain array
U32 DriveNumber;
} FAT_FILE_INFO, * PFAT_FILE_INFO;
BOOL FatOpenVolume(U32 DriveNumber, U32 VolumeStartSector);
U32 FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector);
PVOID FatBufferDirectory(U32 DirectoryStartCluster, U32* EntryCountPointer, BOOL RootDirectory);
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry);
BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer);
FILE* FatOpenFile(PUCHAR FileName);
U32 FatCountClustersInChain(U32 StartCluster);
U32* FatGetClusterChainArray(U32 StartCluster);
BOOL FatReadCluster(U32 ClusterNumber, PVOID Buffer);
BOOL FatReadClusterChain(U32 StartClusterNumber, U32 NumberOfClusters, PVOID Buffer);
BOOL FatReadPartialCluster(U32 ClusterNumber, U32 StartingOffset, U32 Length, PVOID Buffer);
BOOL FatReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 FatGetFileSize(FILE *FileHandle);
VOID FatSetFilePointer(FILE *FileHandle, U32 NewFilePointer);
U32 FatGetFilePointer(FILE *FileHandle);
BOOL FatReadVolumeSectors(U32 DriveNumber, U32 SectorNumber, U32 SectorCount, PVOID Buffer);
#define ATTR_NORMAL 0x00
#define ATTR_READONLY 0x01
#define ATTR_HIDDEN 0x02
#define ATTR_SYSTEM 0x04
#define ATTR_VOLUMENAME 0x08
#define ATTR_DIRECTORY 0x10
#define ATTR_ARCHIVE 0x20
#define ATTR_LONG_NAME (ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUMENAME)
#define FAT12 1
#define FAT16 2
#define FAT32 3
#endif // #defined __FAT_H

View File

@@ -1,393 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include "fat.h"
#include "iso.h"
#include "ext2.h"
#include "fsrec.h"
#include <disk.h>
#include <rtl.h>
#include <ui.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// DATA
/////////////////////////////////////////////////////////////////////////////////////////////
U32 FileSystemType = 0; // Type of filesystem on boot device, set by FsOpenVolume()
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID FileSystemError(PUCHAR ErrorString)
{
DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString));
UiMessageBox(ErrorString);
}
/*
*
* BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber);
*
* This function is called to open a disk volume for file access.
* It must be called before any of the file functions will work.
* It takes two parameters:
*
* Drive: The BIOS drive number of the disk to open
* Partition: This is zero for floppy drives.
* If the disk is a hard disk then this specifies
* The partition number to open (1 - 4)
* If it is zero then it opens the active (bootable) partition
*
*/
BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber)
{
PARTITION_TABLE_ENTRY PartitionTableEntry;
UCHAR ErrorText[80];
U8 VolumeType;
DbgPrint((DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber: 0x%x\n", DriveNumber, PartitionNumber));
// Check and see if it is a floppy drive
// If so then just assume FAT12 file system type
if (DiskIsDriveRemovable(DriveNumber))
{
DbgPrint((DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file system.\n"));
FileSystemType = FS_FAT;
return FatOpenVolume(DriveNumber, 0);
}
// Check for ISO9660 file system type
if (DriveNumber > 0x80 && FsRecIsIso9660(DriveNumber))
{
DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n"));
FileSystemType = FS_ISO9660;
return IsoOpenVolume(DriveNumber);
}
// Set the boot partition
BootPartition = PartitionNumber;
// Get the requested partition entry
if (PartitionNumber == 0)
{
// Partition requested was zero which means the boot partition
if (DiskGetActivePartitionEntry(DriveNumber, &PartitionTableEntry) == FALSE)
{
FileSystemError("No active partition.");
return FALSE;
}
}
else
{
// Get requested partition
if (DiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry) == FALSE)
{
FileSystemError("Partition not found.");
return FALSE;
}
}
// Check for valid partition
if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
{
FileSystemError("Invalid partition.");
return FALSE;
}
// Try to recognize the file system
if (!FsRecognizeVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
{
FileSystemError("Unrecognized file system.");
return FALSE;
}
//switch (PartitionTableEntry.SystemIndicator)
switch (VolumeType)
{
case PARTITION_FAT_12:
case PARTITION_FAT_16:
case PARTITION_HUGE:
case PARTITION_XINT13:
case PARTITION_FAT32:
case PARTITION_FAT32_XINT13:
FileSystemType = FS_FAT;
return FatOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
case PARTITION_EXT2:
FileSystemType = FS_EXT2;
return Ext2OpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
default:
FileSystemType = 0;
sprintf(ErrorText, "Unsupported file system. Type: 0x%x", VolumeType);
FileSystemError(ErrorText);
return FALSE;
}
return TRUE;
}
PFILE FsOpenFile(PUCHAR FileName)
{
PFILE FileHandle = NULL;
//
// Print status message
//
DbgPrint((DPRINT_FILESYSTEM, "Opening file '%s'...\n", FileName));
//
// Check and see if the first character is '\' or '/' and remove it if so
//
while ((*FileName == '\\') || (*FileName == '/'))
{
FileName++;
}
//
// Check file system type and pass off to appropriate handler
//
switch (FileSystemType)
{
case FS_FAT:
FileHandle = FatOpenFile(FileName);
break;
case FS_ISO9660:
FileHandle = IsoOpenFile(FileName);
break;
case FS_EXT2:
FileHandle = Ext2OpenFile(FileName);
break;
default:
FileSystemError("Error: Unknown filesystem.");
break;
}
#ifdef DEBUG
//
// Check return value
//
if (FileHandle != NULL)
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() succeeded. FileHandle: 0x%x\n", FileHandle));
}
else
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() failed.\n"));
}
#endif // defined DEBUG
return FileHandle;
}
VOID FsCloseFile(PFILE FileHandle)
{
}
/*
* ReadFile()
* returns number of bytes read or EOF
*/
BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer)
{
U64 BytesReadBig;
BOOL Success;
//
// Set the number of bytes read equal to zero
//
if (BytesRead != NULL)
{
*BytesRead = 0;
}
switch (FileSystemType)
{
case FS_FAT:
return FatReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
case FS_ISO9660:
return IsoReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
case FS_EXT2:
//return Ext2ReadFile(FileHandle, BytesToRead, BytesRead, Buffer);
Success = Ext2ReadFile(FileHandle, BytesToRead, &BytesReadBig, Buffer);
*BytesRead = (U32)BytesReadBig;
return Success;
default:
FileSystemError("Unknown file system.");
return FALSE;
}
return FALSE;
}
U32 FsGetFileSize(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFileSize(FileHandle);
case FS_ISO9660:
return IsoGetFileSize(FileHandle);
case FS_EXT2:
return Ext2GetFileSize(FileHandle);
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer)
{
switch (FileSystemType)
{
case FS_FAT:
FatSetFilePointer(FileHandle, NewFilePointer);
break;
case FS_ISO9660:
IsoSetFilePointer(FileHandle, NewFilePointer);
break;
case FS_EXT2:
Ext2SetFilePointer(FileHandle, NewFilePointer);
break;
default:
FileSystemError("Unknown file system.");
break;
}
}
U32 FsGetFilePointer(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFilePointer(FileHandle);
break;
case FS_ISO9660:
return IsoGetFilePointer(FileHandle);
break;
case FS_EXT2:
return Ext2GetFilePointer(FileHandle);
break;
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
BOOL FsIsEndOfFile(PFILE FileHandle)
{
if (FsGetFilePointer(FileHandle) >= FsGetFileSize(FileHandle))
{
return TRUE;
}
else
{
return FALSE;
}
}
/*
* FsGetNumPathParts()
* This function parses a path in the form of dir1\dir2\file1.ext
* and returns the number of parts it has (i.e. 3 - dir1,dir2,file1.ext)
*/
U32 FsGetNumPathParts(PUCHAR Path)
{
U32 i;
U32 num;
for (i=0,num=0; i<(int)strlen(Path); i++)
{
if ((Path[i] == '\\') || (Path[i] == '/'))
{
num++;
}
}
num++;
DbgPrint((DPRINT_FILESYSTEM, "FatGetNumPathParts() Path = %s NumPathParts = %d\n", Path, num));
return num;
}
/*
* FsGetFirstNameFromPath()
* This function parses a path in the form of dir1\dir2\file1.ext
* and puts the first name of the path (e.g. "dir1") in buffer
* compatible with the MSDOS directory structure
*/
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path)
{
U32 i;
// Copy all the characters up to the end of the
// string or until we hit a '\' character
// and put them in Buffer
for (i=0; i<(int)strlen(Path); i++)
{
if ((Path[i] == '\\') || (Path[i] == '/'))
{
break;
}
else
{
Buffer[i] = Path[i];
}
}
Buffer[i] = 0;
DbgPrint((DPRINT_FILESYSTEM, "FatGetFirstNameFromPath() Path = %s FirstName = %s\n", Path, Buffer));
}

View File

@@ -1,116 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include "fsrec.h"
#include "fat.h"
#include "iso.h"
#include "ext2.h"
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
/*
*
* BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType);
*
*/
BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType)
{
DbgPrint((DPRINT_FILESYSTEM, "FsRecognizeVolume() DriveNumber: 0x%x VolumeStartSector: %d\n", DriveNumber, VolumeStartSector));
if (FsRecIsExt2(DriveNumber, VolumeStartSector))
{
*VolumeType = PARTITION_EXT2;
return TRUE;
}
else if (FsRecIsFat(DriveNumber, VolumeStartSector))
{
*VolumeType = PARTITION_FAT32;
return TRUE;
}
return FALSE;
}
BOOL FsRecIsIso9660(U32 DriveNumber)
{
PUCHAR Sector = (PUCHAR)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Sector))
{
FileSystemError("Failed to read the PVD.");
return FALSE;
}
return (Sector[0] == 1 &&
Sector[1] == 'C' &&
Sector[2] == 'D' &&
Sector[3] == '0' &&
Sector[4] == '0' &&
Sector[5] == '1');
}
BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector)
{
PEXT2_SUPER_BLOCK SuperBlock = (PEXT2_SUPER_BLOCK)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, VolumeStartSector + 2, 2, SuperBlock))
{
FileSystemError("Failed to read the super block.");
return FALSE;
}
if (SuperBlock->s_magic == EXT3_SUPER_MAGIC)
{
return TRUE;
}
return FALSE;
}
BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector)
{
PFAT_BOOTSECTOR BootSector = (PFAT_BOOTSECTOR)DISKREADBUFFER;
PFAT32_BOOTSECTOR BootSector32 = (PFAT32_BOOTSECTOR)DISKREADBUFFER;
if (!DiskReadLogicalSectors(DriveNumber, VolumeStartSector, 1, BootSector))
{
FileSystemError("Failed to read the boot sector.");
return FALSE;
}
if (strncmp(BootSector->FileSystemType, "FAT12 ", 8) == 0 ||
strncmp(BootSector->FileSystemType, "FAT16 ", 8) == 0 ||
strncmp(BootSector32->FileSystemType, "FAT32 ", 8) == 0)
{
return TRUE;
}
return FALSE;
}

View File

@@ -1,28 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FSREC_H
#define __FSREC_H
BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType);
BOOL FsRecIsIso9660(U32 DriveNumber);
BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector);
BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector);
#endif // #defined __FSREC_H

View File

@@ -1,478 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <fs.h>
#include <disk.h>
#include <rtl.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <cache.h>
#include "iso.h"
#define SECTORSIZE 2048
static U32 IsoRootSector; // Starting sector of the root directory
static U32 IsoRootLength; // Length of the root directory
U32 IsoDriveNumber = 0;
BOOL IsoOpenVolume(U32 DriveNumber)
{
PPVD Pvd = (PPVD)DISKREADBUFFER;
DbgPrint((DPRINT_FILESYSTEM, "IsoOpenVolume() DriveNumber = 0x%x VolumeStartSector = 16\n", DriveNumber));
// Store the drive number
IsoDriveNumber = DriveNumber;
IsoRootSector = 0;
IsoRootLength = 0;
if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Pvd))
{
FileSystemError("Failed to read the PVD.");
return FALSE;
}
IsoRootSector = Pvd->RootDirRecord.ExtentLocationL;
IsoRootLength = Pvd->RootDirRecord.DataLengthL;
DbgPrint((DPRINT_FILESYSTEM, "IsoRootSector = %u IsoRootLegth = %u\n", IsoRootSector, IsoRootLength));
return TRUE;
}
static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
PDIR_RECORD Record;
U32 Offset;
U32 i;
UCHAR Name[32];
DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
RtlZeroMemory(Name, 32 * sizeof(UCHAR));
Offset = 0;
Record = (PDIR_RECORD)DirectoryBuffer;
while (TRUE)
{
Offset = Offset + Record->RecordLength;
Record = (PDIR_RECORD)(DirectoryBuffer + Offset);
if (Record->RecordLength == 0)
{
Offset = ROUND_UP(Offset, SECTORSIZE);
Record = (PDIR_RECORD)(DirectoryBuffer + Offset);
}
if (Record->FileIdLength == 1 && Record->FileId[0] == 0)
{
DbgPrint((DPRINT_FILESYSTEM, "Name '.'\n"));
}
else if (Record->FileIdLength == 1 && Record->FileId[0] == 1)
{
DbgPrint((DPRINT_FILESYSTEM, "Name '..'\n"));
}
else
{
for (i = 0; i < Record->FileIdLength && Record->FileId[i] != ';'; i++)
Name[i] = Record->FileId[i];
Name[i] = 0;
DbgPrint((DPRINT_FILESYSTEM, "Name '%s'\n", Name));
if (strlen(FileName) == strlen(Name) && stricmp(FileName, Name) == 0)
{
IsoFileInfoPointer->FileStart = Record->ExtentLocationL;
IsoFileInfoPointer->FileSize = Record->DataLengthL;
IsoFileInfoPointer->FilePointer = 0;
IsoFileInfoPointer->Directory = (Record->FileFlags & 0x02)?TRUE:FALSE;
return TRUE;
}
}
if (Offset >= DirectoryLength)
return FALSE;
RtlZeroMemory(Name, 32 * sizeof(UCHAR));
}
return FALSE;
}
/*
* IsoBufferDirectory()
* This function allocates a buffer, reads the specified directory
* and returns a pointer to that buffer. The function returns NULL
* if allocation or read fails. The directory is specified by its
* starting sector and length.
*/
static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength)
{
PVOID DirectoryBuffer;
PVOID Ptr;
U32 SectorCount;
U32 i;
DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength));
SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
DbgPrint((DPRINT_FILESYSTEM, "Trying to read (DirectoryCount) %d sectors.\n", SectorCount));
//
// Attempt to allocate memory for directory buffer
//
DbgPrint((DPRINT_FILESYSTEM, "Trying to allocate (DirectoryLength) %d bytes.\n", DirectoryLength));
DirectoryBuffer = MmAllocateMemory(DirectoryLength);
if (DirectoryBuffer == NULL)
{
return NULL;
}
//
// Now read directory contents into DirectoryBuffer
//
for (i = 0, Ptr = DirectoryBuffer; i < SectorCount; i++, Ptr += SECTORSIZE)
{
if (!DiskReadLogicalSectors(IsoDriveNumber, DirectoryStartSector + i, 1, (PVOID)DISKREADBUFFER))
{
MmFreeMemory(DirectoryBuffer);
return NULL;
}
RtlCopyMemory(Ptr, (PVOID)DISKREADBUFFER, SECTORSIZE);
}
return DirectoryBuffer;
}
/*
* IsoLookupFile()
* This function searches the file system for the
* specified filename and fills in an ISO_FILE_INFO structure
* with info describing the file, etc. returns true
* if the file exists or false otherwise
*/
static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
int i;
U32 NumberOfPathParts;
UCHAR PathPart[261];
PVOID DirectoryBuffer;
U32 DirectorySector;
U32 DirectoryLength;
ISO_FILE_INFO IsoFileInfo;
DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName));
RtlZeroMemory(IsoFileInfoPointer, sizeof(ISO_FILE_INFO));
//
// Figure out how many sub-directories we are nested in
//
NumberOfPathParts = FsGetNumPathParts(FileName);
DirectorySector = IsoRootSector;
DirectoryLength = IsoRootLength;
//
// Loop once for each part
//
for (i=0; i<NumberOfPathParts; i++)
{
//
// Get first path part
//
FsGetFirstNameFromPath(PathPart, FileName);
//
// Advance to the next part of the path
//
for (; (*FileName != '\\') && (*FileName != '/') && (*FileName != '\0'); FileName++)
{
}
FileName++;
//
// Buffer the directory contents
//
DirectoryBuffer = IsoBufferDirectory(DirectorySector, DirectoryLength);
if (DirectoryBuffer == NULL)
{
return FALSE;
}
//
// Search for file name in directory
//
if (!IsoSearchDirectoryBufferForFile(DirectoryBuffer, DirectoryLength, PathPart, &IsoFileInfo))
{
MmFreeMemory(DirectoryBuffer);
return FALSE;
}
MmFreeMemory(DirectoryBuffer);
//
// If we have another sub-directory to go then
// grab the start sector and file size
//
if ((i+1) < NumberOfPathParts)
{
DirectorySector = IsoFileInfo.FileStart;
DirectoryLength = IsoFileInfo.FileSize;
}
}
RtlCopyMemory(IsoFileInfoPointer, &IsoFileInfo, sizeof(ISO_FILE_INFO));
return TRUE;
}
/*
* IsoOpenFile()
* Tries to open the file 'name' and returns true or false
* for success and failure respectively
*/
FILE* IsoOpenFile(PUCHAR FileName)
{
ISO_FILE_INFO TempFileInfo;
PISO_FILE_INFO FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoOpenFile() FileName = %s\n", FileName));
if (!IsoLookupFile(FileName, &TempFileInfo))
{
return NULL;
}
FileHandle = MmAllocateMemory(sizeof(ISO_FILE_INFO));
if (FileHandle == NULL)
{
return NULL;
}
RtlCopyMemory(FileHandle, &TempFileInfo, sizeof(ISO_FILE_INFO));
return (FILE*)FileHandle;
}
/*
* IsoReadFile()
* Reads BytesToRead from open file and
* returns the number of bytes read in BytesRead
*/
BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer)
{
PISO_FILE_INFO IsoFileInfo = (PISO_FILE_INFO)FileHandle;
U32 SectorNumber;
U32 OffsetInSector;
U32 LengthInSector;
U32 NumberOfSectors;
U32 i;
DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer));
if (BytesRead != NULL)
{
*BytesRead = 0;
}
//
// If they are trying to read past the
// end of the file then return success
// with BytesRead == 0
//
if (IsoFileInfo->FilePointer >= IsoFileInfo->FileSize)
{
return TRUE;
}
//
// If they are trying to read more than there is to read
// then adjust the amount to read
//
if ((IsoFileInfo->FilePointer + BytesToRead) > IsoFileInfo->FileSize)
{
BytesToRead = (IsoFileInfo->FileSize - IsoFileInfo->FilePointer);
}
//
// Ok, now we have to perform at most 3 calculations
// I'll draw you a picture (using nifty ASCII art):
//
// CurrentFilePointer -+
// |
// +----------------+
// |
// +-----------+-----------+-----------+-----------+
// | Sector 1 | Sector 2 | Sector 3 | Sector 4 |
// +-----------+-----------+-----------+-----------+
// | |
// +---------------+--------------------+
// |
// BytesToRead -------+
//
// 1 - The first calculation (and read) will align
// the file pointer with the next sector
// boundary (if we are supposed to read that much)
// 2 - The next calculation (and read) will read
// in all the full sectors that the requested
// amount of data would cover (in this case
// sectors 2 & 3).
// 3 - The last calculation (and read) would read
// in the remainder of the data requested out of
// the last sector.
//
//
// Only do the first read if we
// aren't aligned on a cluster boundary
//
if (IsoFileInfo->FilePointer % SECTORSIZE)
{
//
// Do the math for our first read
//
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
OffsetInSector = IsoFileInfo->FilePointer % SECTORSIZE;
LengthInSector = (BytesToRead > (SECTORSIZE - OffsetInSector)) ? (SECTORSIZE - OffsetInSector) : BytesToRead;
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, ((PVOID)DISKREADBUFFER + OffsetInSector), LengthInSector);
if (BytesRead != NULL)
{
*BytesRead += LengthInSector;
}
BytesToRead -= LengthInSector;
IsoFileInfo->FilePointer += LengthInSector;
Buffer += LengthInSector;
}
//
// Do the math for our second read (if any data left)
//
if (BytesToRead > 0)
{
//
// Determine how many full clusters we need to read
//
NumberOfSectors = (BytesToRead / SECTORSIZE);
for (i = 0; i < NumberOfSectors; i++)
{
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectorsLBA(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, SECTORSIZE);
if (BytesRead != NULL)
{
*BytesRead += SECTORSIZE;
}
BytesToRead -= SECTORSIZE;
IsoFileInfo->FilePointer += SECTORSIZE;
Buffer += SECTORSIZE;
}
}
//
// Do the math for our third read (if any data left)
//
if (BytesToRead > 0)
{
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectorsLBA(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
{
return FALSE;
}
RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, BytesToRead);
if (BytesRead != NULL)
{
*BytesRead += BytesToRead;
}
IsoFileInfo->FilePointer += BytesToRead;
BytesToRead -= BytesToRead;
Buffer += BytesToRead;
}
DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() done\n"));
return TRUE;
}
U32 IsoGetFileSize(FILE *FileHandle)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoGetFileSize() FileSize = %d\n", IsoFileHandle->FileSize));
return IsoFileHandle->FileSize;
}
VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoSetFilePointer() NewFilePointer = %d\n", NewFilePointer));
IsoFileHandle->FilePointer = NewFilePointer;
}
U32 IsoGetFilePointer(FILE *FileHandle)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoGetFilePointer() FilePointer = %d\n", IsoFileHandle->FilePointer));
return IsoFileHandle->FilePointer;
}

View File

@@ -1,115 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ISO_H
#define __ISO_H
struct _DIR_RECORD
{
UCHAR RecordLength; // 1
UCHAR ExtAttrRecordLength; // 2
U32 ExtentLocationL; // 3-6
U32 ExtentLocationM; // 7-10
U32 DataLengthL; // 11-14
U32 DataLengthM; // 15-18
UCHAR Year; // 19
UCHAR Month; // 20
UCHAR Day; // 21
UCHAR Hour; // 22
UCHAR Minute; // 23
UCHAR Second; // 24
UCHAR TimeZone; // 25
UCHAR FileFlags; // 26
UCHAR FileUnitSize; // 27
UCHAR InterleaveGapSize; // 28
U32 VolumeSequenceNumber; // 29-32
UCHAR FileIdLength; // 33
UCHAR FileId[1]; // 34
} __attribute__((packed));
typedef struct _DIR_RECORD DIR_RECORD, *PDIR_RECORD;
/* Volume Descriptor header*/
struct _VD_HEADER
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
} __attribute__((packed));
typedef struct _VD_HEADER VD_HEADER, *PVD_HEADER;
/* Primary Volume Descriptor */
struct _PVD
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
UCHAR unused0; // 8
UCHAR SystemId[32]; // 9-40
UCHAR VolumeId[32]; // 41-72
UCHAR unused1[8]; // 73-80
U32 VolumeSpaceSizeL; // 81-84
U32 VolumeSpaceSizeM; // 85-88
UCHAR unused2[32]; // 89-120
U32 VolumeSetSize; // 121-124
U32 VolumeSequenceNumber; // 125-128
U32 LogicalBlockSize; // 129-132
U32 PathTableSizeL; // 133-136
U32 PathTableSizeM; // 137-140
U32 LPathTablePos; // 141-144
U32 LOptPathTablePos; // 145-148
U32 MPathTablePos; // 149-152
U32 MOptPathTablePos; // 153-156
DIR_RECORD RootDirRecord; // 157-190
UCHAR VolumeSetIdentifier[128]; // 191-318
UCHAR PublisherIdentifier[128]; // 319-446
/* more data ... */
} __attribute__((packed));
typedef struct _PVD PVD, *PPVD;
typedef struct
{
U32 FileStart; // File start sector
U32 FileSize; // File size
U32 FilePointer; // File pointer
BOOL Directory;
U32 DriveNumber;
} ISO_FILE_INFO, * PISO_FILE_INFO;
BOOL IsoOpenVolume(U32 DriveNumber);
FILE* IsoOpenFile(PUCHAR FileName);
BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 IsoGetFileSize(FILE *FileHandle);
VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer);
U32 IsoGetFilePointer(FILE *FileHandle);
#endif // #defined __FAT_H

View File

@@ -1,171 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ARCH_H
#define __ARCH_H
/* Defines needed for switching between real and protected mode */
#define NULL_DESC 0x00 /* NULL descriptor */
#define PMODE_CS 0x08 /* PMode code selector, base 0 limit 4g */
#define PMODE_DS 0x10 /* PMode data selector, base 0 limit 4g */
#define RMODE_CS 0x18 /* RMode code selector, base 0 limit 64k */
#define RMODE_DS 0x20 /* RMode data selector, base 0 limit 64k */
#define KERNEL_BASE 0xC0000000
//#define USER_CS 0x08
//#define USER_DS 0x10
//#define KERNEL_CS 0x20
//#define KERNEL_DS 0x28
#define KERNEL_CS 0x08
#define KERNEL_DS 0x10
#define CR0_PE_SET 0x00000001 /* OR this value with CR0 to enable pmode */
#define CR0_PE_CLR 0xFFFFFFFE /* AND this value with CR0 to disable pmode */
#define STACK16ADDR 0x7000 /* The 16-bit stack top will be at 0000:7000 */
#define STACK32ADDR 0x78000 /* The 32-bit stack top will be at 7000:8000, or 0x78000 */
#define BIOSCALLBUFFER 0x78000 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFSEGMENT 0x7800 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */
#define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer for FAT) */
#define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the BIOS */
/* Makes "x" a global variable or label */
#define EXTERN(x) .global x; x:
#ifndef ASM
typedef struct
{
unsigned long eax;
unsigned long ebx;
unsigned long ecx;
unsigned long edx;
unsigned long esi;
unsigned long edi;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned long eflags;
} PACKED DWORDREGS;
typedef struct
{
unsigned short ax, _upper_ax;
unsigned short bx, _upper_bx;
unsigned short cx, _upper_cx;
unsigned short dx, _upper_dx;
unsigned short si, _upper_si;
unsigned short di, _upper_di;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned short flags, _upper_flags;
} PACKED WORDREGS;
typedef struct
{
unsigned char al;
unsigned char ah;
unsigned short _upper_ax;
unsigned char bl;
unsigned char bh;
unsigned short _upper_bx;
unsigned char cl;
unsigned char ch;
unsigned short _upper_cx;
unsigned char dl;
unsigned char dh;
unsigned short _upper_dx;
unsigned short si, _upper_si;
unsigned short di, _upper_di;
unsigned short ds;
unsigned short es;
unsigned short fs;
unsigned short gs;
unsigned short flags, _upper_flags;
} PACKED BYTEREGS;
typedef union
{
DWORDREGS x;
DWORDREGS d;
WORDREGS w;
BYTEREGS b;
} REGS;
// Int386()
//
// Real mode interrupt vector interface
//
// (E)FLAGS can *only* be returned by this function, not set.
// Make sure all memory pointers are in SEG:OFFS format and
// not linear addresses, unless the interrupt handler
// specifically handles linear addresses.
int Int386(int ivec, REGS* in, REGS* out);
// Flag Masks
#define I386FLAG_CF 0x0001 // Carry Flag
#define I386FLAG_RESV1 0x0002 // Reserved - Must be 1
#define I386FLAG_PF 0x0004 // Parity Flag
#define I386FLAG_RESV2 0x0008 // Reserved - Must be 0
#define I386FLAG_AF 0x0010 // Auxiliary Flag
#define I386FLAG_RESV3 0x0020 // Reserved - Must be 0
#define I386FLAG_ZF 0x0040 // Zero Flag
#define I386FLAG_SF 0x0080 // Sign Flag
#define I386FLAG_TF 0x0100 // Trap Flag (Single Step)
#define I386FLAG_IF 0x0200 // Interrupt Flag
#define I386FLAG_DF 0x0400 // Direction Flag
#define I386FLAG_OF 0x0800 // Overflow Flag
// This macro tests the Carry Flag
// If CF is set then the call failed (usually)
#define INT386_SUCCESS(regs) ((regs.x.eflags & I386FLAG_CF) == 0)
void EnableA20(void);
VOID ChainLoadBiosBootSectorCode(VOID); // Implemented in boot.S
VOID SoftReboot(VOID); // Implemented in boot.S
VOID DetectHardware(VOID); // Implemented in hardware.c
#endif /* ! ASM */
#endif // #defined __ARCH_H

View File

@@ -1,29 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __BOOTMGR_H
#define __BOOTMGR_H
U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount);
S32 GetTimeOut(VOID);
BOOL MainBootMenuKeyPressFilter(U32 KeyPress);
#endif // #defined __BOOTMGR_H

View File

@@ -1,30 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CACHE_H
#define __CACHE_H
BOOL CacheInitializeDrive(U32 DriveNumber);
VOID CacheInvalidateCacheData(VOID);
BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer);
BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount);
BOOL CacheReleaseMemory(U32 MinimumAmountToRelease);
#endif // defined __CACHE_H

View File

@@ -1,32 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __RS232_H
#define __RS232_H
BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate);
BOOL Rs232PortGetByte(PUCHAR ByteRecieved);
BOOL Rs232PortPollByte(PUCHAR ByteRecieved);
VOID Rs232PortPutByte(UCHAR ByteToSend);
#endif // defined __RS232_H

View File

@@ -1,84 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
#define DPRINT_NONE 0x00000000 // No debug print
#define DPRINT_WARNING 0x00000001 // OR this with DebugPrintMask to enable debugger messages and other misc stuff
#define DPRINT_MEMORY 0x00000002 // OR this with DebugPrintMask to enable memory management messages
#define DPRINT_FILESYSTEM 0x00000004 // OR this with DebugPrintMask to enable file system messages
#define DPRINT_INIFILE 0x00000008 // OR this with DebugPrintMask to enable .ini file messages
#define DPRINT_UI 0x00000010 // OR this with DebugPrintMask to enable user interface messages
#define DPRINT_DISK 0x00000020 // OR this with DebugPrintMask to enable disk messages
#define DPRINT_CACHE 0x00000040 // OR this with DebugPrintMask to enable cache messages
#define DPRINT_REGISTRY 0x00000080 // OR this with DebugPrintMask to enable registry messages
#define DPRINT_REACTOS 0x00000100 // OR this with DebugPrintMask to enable ReactOS messages
#define DPRINT_LINUX 0x00000200 // OR this with DebugPrintMask to enable Linux messages
#define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages
VOID DebugInit(VOID);
VOID DebugPrint(U32 Mask, char *format, ...);
VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length);
#define DbgPrint(_x_) DebugPrint _x_ ;
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); }
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
#ifdef __i386__
// Debugging support functions:
//
// BREAKPOINT() - Inserts an "int 3" instruction
// INSTRUCTION_BREAKPOINTX(x) - Enters exception handler right before instruction at address "x" is executed
// MEMORY_READWRITE_BREAKPOINTX(x) - Enters exception handler when a read or write occurs at address "x"
// MEMORY_WRITE_BREAKPOINTX(x) - Enters exception handler when a write occurs at address "x"
//
// You may have as many BREAKPOINT()'s as you like but you may only
// have up to four of any of the others.
#define BREAKPOINT() __asm__ ("int $3");
void INSTRUCTION_BREAKPOINT1(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT1(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT1(unsigned long addr);
void INSTRUCTION_BREAKPOINT2(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT2(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT2(unsigned long addr);
void INSTRUCTION_BREAKPOINT3(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT3(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT3(unsigned long addr);
void INSTRUCTION_BREAKPOINT4(unsigned long addr);
void MEMORY_READWRITE_BREAKPOINT4(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
#endif // defined __i386__
#else
#define DbgPrint(_x_)
#define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_)
#endif // defined DEBUG
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n"))
#endif // defined __DEBUG_H

View File

@@ -1,146 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DISK_H
#define __DISK_H
typedef struct _GEOMETRY
{
U32 Cylinders; // Number of cylinders on the disk
U32 Heads; // Number of heads on the disk
U32 Sectors; // Number of sectors per track
U32 BytesPerSector; // Number of bytes per sector
} GEOMETRY, *PGEOMETRY;
//
// Extended disk geometry (Int13 / ah=48h)
//
typedef struct _EXTENDED_GEOMETRY
{
U16 Size;
U16 Flags;
U32 Cylinders;
U32 Heads;
U32 SectorsPerTrack;
U64 Sectors;
U16 BytesPerSector;
U32 PDPTE;
} __attribute__((packed)) EXTENDED_GEOMETRY, *PEXTENDED_GEOMETRY;
//
// Define the structure of a partition table entry
//
typedef struct _PARTITION_TABLE_ENTRY
{
U8 BootIndicator; // 0x00 - non-bootable partition, 0x80 - bootable partition (one partition only)
U8 StartHead; // Beginning head number
U8 StartSector; // Beginning sector (2 high bits of cylinder #)
U8 StartCylinder; // Beginning cylinder# (low order bits of cylinder #)
U8 SystemIndicator; // System indicator
U8 EndHead; // Ending head number
U8 EndSector; // Ending sector (2 high bits of cylinder #)
U8 EndCylinder; // Ending cylinder# (low order bits of cylinder #)
U32 SectorCountBeforePartition; // Number of sectors preceding the partition
U32 PartitionSectorCount; // Number of sectors in the partition
} PACKED PARTITION_TABLE_ENTRY, *PPARTITION_TABLE_ENTRY;
//
// Define the structure of the master boot record
//
typedef struct _MASTER_BOOT_RECORD
{
U8 MasterBootRecordCodeAndData[0x1b8]; /* 0x000 */
U32 Signature; /* 0x1B8 */
U16 Reserved; /* 0x1BC */
PARTITION_TABLE_ENTRY PartitionTable[4]; /* 0x1BE */
U16 MasterBootRecordMagic; /* 0x1FE */
} PACKED MASTER_BOOT_RECORD, *PMASTER_BOOT_RECORD;
//
// Partition type defines
//
#define PARTITION_ENTRY_UNUSED 0x00 // Entry unused
#define PARTITION_FAT_12 0x01 // 12-bit FAT entries
#define PARTITION_XENIX_1 0x02 // Xenix
#define PARTITION_XENIX_2 0x03 // Xenix
#define PARTITION_FAT_16 0x04 // 16-bit FAT entries
#define PARTITION_EXTENDED 0x05 // Extended partition entry
#define PARTITION_HUGE 0x06 // Huge partition MS-DOS V4
#define PARTITION_IFS 0x07 // IFS Partition
#define PARTITION_OS2BOOTMGR 0x0A // OS/2 Boot Manager/OPUS/Coherent swap
#define PARTITION_FAT32 0x0B // FAT32
#define PARTITION_FAT32_XINT13 0x0C // FAT32 using extended int13 services
#define PARTITION_XINT13 0x0E // Win95 partition using extended int13 services
#define PARTITION_XINT13_EXTENDED 0x0F // Same as type 5 but uses extended int13 services
#define PARTITION_PREP 0x41 // PowerPC Reference Platform (PReP) Boot Partition
#define PARTITION_LDM 0x42 // Logical Disk Manager partition
#define PARTITION_UNIX 0x63 // Unix
#define PARTITION_LINUX_SWAP 0x82 // Linux Swap Partition
#define PARTITION_EXT2 0x83 // Linux Ext2/Ext3
///////////////////////////////////////////////////////////////////////////////////////
//
// i386 BIOS Disk Functions (i386disk.c)
//
///////////////////////////////////////////////////////////////////////////////////////
#ifdef __i386__
//BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer);
BOOL DiskResetController(U32 DriveNumber);
BOOL DiskInt13ExtensionsSupported(U32 DriveNumber);
//VOID DiskStopFloppyMotor(VOID);
BOOL DiskGetDriveParameters(U32 DriveNumber, PGEOMETRY Geometry);
BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize);
//U32 DiskGetCacheableBlockCount(U32 DriveNumber);
#endif // defined __i386__
///////////////////////////////////////////////////////////////////////////////////////
//
// FreeLoader Disk Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID DiskReportError (BOOL bError);
VOID DiskError(PUCHAR ErrorString, U32 ErrorCode);
PUCHAR DiskGetErrorCodeString(U32 ErrorCode);
BOOL DiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry);
BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); // Implemented in i386disk.c
BOOL DiskIsDriveRemovable(U32 DriveNumber);
VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c
U32 DiskGetCacheableBlockCount(U32 DriveNumber); // Implemented in i386disk.c
///////////////////////////////////////////////////////////////////////////////////////
//
// Fixed Disk Partition Management Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord);
#endif // defined __DISK_H

View File

@@ -1,43 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __DRIVEMAP_H
#define __DRIVEMAP_H
typedef struct
{
U8 DriveMapCount; // Count of drives currently mapped
U8 DriveMap[8]; // Map of BIOS drives
} PACKED DRIVE_MAP_LIST, *PDRIVE_MAP_LIST;
VOID DriveMapMapDrivesInSection(PUCHAR SectionName);
BOOL DriveMapIsValidDriveString(PUCHAR DriveString); // Checks the drive string ("hd0") for validity
U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0')
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h handler for the drive mapper
VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h drive map handler
extern PVOID DriveMapInt13HandlerStart;
extern PVOID DriveMapInt13HandlerEnd;
extern U32 DriveMapOldInt13HandlerAddress;
extern DRIVE_MAP_LIST DriveMapInt13HandlerMapList;
#endif // #defined __DRIVEMAP_H

View File

@@ -1,81 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FREELDR_H
#define __FREELDR_H
#define NULL 0
#define TRUE 1
#define FALSE 0
#define BOOL int
#define BOOLEAN int
typedef BOOLEAN *PBOOLEAN;
#define CHAR char
#define PCHAR char *
#define UCHAR unsigned char
#define PUCHAR unsigned char *
#define WCHAR unsigned short
#define PWCHAR unsigned short *
#define VOID void
#define PVOID VOID*
#ifdef __i386__
#define size_t unsigned int
typedef unsigned char U8;
typedef char S8;
typedef unsigned short U16;
typedef short S16;
typedef unsigned long U32;
typedef long S32;
typedef unsigned long long U64;
typedef long long S64;
typedef U8 __u8;
typedef S8 __s8;
typedef U16 __u16;
typedef S16 __s16;
typedef U32 __u32;
typedef S32 __s32;
typedef U64 __u64;
typedef S64 __s64;
#endif // __i386__
typedef U8 *PU8;
typedef U16 *PU16;
typedef U32 *PU32;
#define ROUND_UP(N, S) ((N) + (S) - ((N) % (S)))
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
#define PACKED __attribute__((packed))
extern U32 BootDrive; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
extern U32 BootPartition; // Boot Partition, 1-4
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
void BootMain(void);
VOID RunLoader(VOID);
#endif // defined __FREELDR_H

View File

@@ -1,47 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __FS_H
#define __FS_H
#define EOF -1
#define FS_FAT 1
#define FS_NTFS 2
#define FS_EXT2 3
#define FS_REISER 4
#define FS_ISO9660 5
#define FILE VOID
#define PFILE FILE *
VOID FileSystemError(PUCHAR ErrorString);
BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber);
PFILE FsOpenFile(PUCHAR FileName);
VOID FsCloseFile(PFILE FileHandle);
BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
U32 FsGetFileSize(PFILE FileHandle);
VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer);
U32 FsGetFilePointer(PFILE FileHandle);
BOOL FsIsEndOfFile(PFILE FileHandle);
U32 FsGetNumPathParts(PUCHAR Path);
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path);
#endif // #defined __FS_H

View File

@@ -1,130 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: inffile.h,v 1.1 2003/05/25 21:17:30 ekohl Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/infcache.h
* PURPOSE: INF file parser that caches contents of INF file in memory
* PROGRAMMER: Royce Mitchell III
* Eric Kohl
*/
#ifndef __INFCACHE_H__
#define __INFCACHE_H__
#define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
#define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
#define STATUS_WRONG_INF_STYLE (0xC0700003)
#define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
#define MAX_INF_STRING_LENGTH 512
typedef PU32 HINF, *PHINF;
typedef struct _INFCONTEXT
{
PVOID Inf;
// PVOID CurrentInf;
PVOID Section;
PVOID Line;
} INFCONTEXT, *PINFCONTEXT;
/* FUNCTIONS ****************************************************************/
BOOLEAN
InfOpenFile (PHINF InfHandle,
PCHAR FileName,
PU32 ErrorLine);
VOID
InfCloseFile (HINF InfHandle);
BOOLEAN
InfFindFirstLine (HINF InfHandle,
PCHAR Section,
PCHAR Key,
PINFCONTEXT Context);
BOOLEAN
InfFindNextLine (PINFCONTEXT ContextIn,
PINFCONTEXT ContextOut);
BOOLEAN
InfFindFirstMatchLine (PINFCONTEXT ContextIn,
PCHAR Key,
PINFCONTEXT ContextOut);
BOOLEAN
InfFindNextMatchLine (PINFCONTEXT ContextIn,
PCHAR Key,
PINFCONTEXT ContextOut);
S32
InfGetLineCount (HINF InfHandle,
PCHAR Section);
S32
InfGetFieldCount (PINFCONTEXT Context);
BOOLEAN
InfGetBinaryField (PINFCONTEXT Context,
U32 FieldIndex,
PU8 ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetIntField (PINFCONTEXT Context,
U32 FieldIndex,
S32 *IntegerValue);
BOOLEAN
InfGetMultiSzField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetStringField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR ReturnBuffer,
U32 ReturnBufferSize,
PU32 RequiredSize);
BOOLEAN
InfGetData (PINFCONTEXT Context,
PCHAR *Key,
PCHAR *Data);
BOOLEAN
InfGetDataField (PINFCONTEXT Context,
U32 FieldIndex,
PCHAR *Data);
#endif /* __INFCACHE_H__ */
/* EOF */

View File

@@ -1,35 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __PARSEINI_H
#define __PARSEINI_H
BOOL IniFileInitialize(VOID);
BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId);
U32 IniGetNumSectionItems(U32 SectionId);
U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex);
U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex);
BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize);
BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize);
BOOL IniAddSection(PUCHAR SectionName, U32* SectionId);
BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue);
#endif // defined __PARSEINI_H

View File

@@ -1,46 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KEYCODES_H
#define __KEYCODES_H
// Key codes
#define KEY_EXTENDED 0x00
#define KEY_ENTER 0x0D
#define KEY_BACKSPACE 0x08
#define KEY_SPACE 0x20
#define KEY_UP 0x48
#define KEY_DOWN 0x50
#define KEY_LEFT 0x4B
#define KEY_RIGHT 0x4D
#define KEY_ESC 0x1B
#define KEY_F1 0x3B
#define KEY_F2 0x3C
#define KEY_F3 0x3D
#define KEY_F4 0x3E
#define KEY_F5 0x3F
#define KEY_F6 0x40
#define KEY_F7 0x41
#define KEY_F8 0x42
#define KEY_F9 0x43
#define KEY_F10 0x44
#endif // #defined __KEYCODES_H

View File

@@ -1,139 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <fs.h>
#ifndef __LINUX_H
#define __LINUX_H
#define LINUX_LOADER_TYPE_LILO 0x01
#define LINUX_LOADER_TYPE_LOADLIN 0x11
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
#define LINUX_LOADER_TYPE_SYSLINUX 0x31
#define LINUX_LOADER_TYPE_ETHERBOOT 0x41
#define LINUX_LOADER_TYPE_FREELOADER 0x81
#define LINUX_COMMAND_LINE_MAGIC 0xA33F
#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS'
#define LINUX_BOOT_SECTOR_MAGIC 0xAA55
#define LINUX_KERNEL_LOAD_ADDRESS 0x100000
#define LINUX_FLAG_LOAD_HIGH 0x01
#define LINUX_FLAG_CAN_USE_HEAP 0x80
#define LINUX_MAX_INITRD_ADDRESS 0x38000000
typedef struct
{
U8 BootCode1[0x20];
U16 CommandLineMagic;
U16 CommandLineOffset;
U8 BootCode2[0x1CD];
U8 SetupSectors;
U16 RootFlags;
U16 SystemSize;
U16 SwapDevice;
U16 RamSize;
U16 VideoMode;
U16 RootDevice;
U16 BootFlag; // 0xAA55
} PACKED LINUX_BOOTSECTOR, *PLINUX_BOOTSECTOR;
typedef struct
{
U8 JumpInstruction[2];
U32 SetupHeaderSignature; // Signature for SETUP-header
U16 Version; // Version number of header format
U16 RealModeSwitch; // Default switch
U16 SetupSeg; // SETUPSEG
U16 StartSystemSeg;
U16 KernelVersion; // Offset to kernel version string
U8 TypeOfLoader; // Loader ID
// =0, old one (LILO, Loadlin,
// Bootlin, SYSLX, bootsect...)
// else it is set by the loader:
// 0xTV: T=0 for LILO
// T=1 for Loadlin
// T=2 for bootsect-loader
// T=3 for SYSLX
// T=4 for ETHERBOOT
// V = version
U8 LoadFlags; // flags, unused bits must be zero (RFU)
// LOADED_HIGH = 1
// bit within loadflags,
// if set, then the kernel is loaded high
// CAN_USE_HEAP = 0x80
// if set, the loader also has set heap_end_ptr
// to tell how much space behind setup.S
// can be used for heap purposes.
// Only the loader knows what is free!
U16 SetupMoveSize; // size to move, when we (setup) are not
// loaded at 0x90000. We will move ourselves
// to 0x90000 then just before jumping into
// the kernel. However, only the loader
// know how much of data behind us also needs
// to be loaded.
U32 Code32Start; // here loaders can put a different
// start address for 32-bit code.
//
// 0x1000 = default for zImage
//
// 0x100000 = default for big kernel
U32 RamdiskAddress; // address of loaded ramdisk image
// Here the loader (or kernel generator) puts
// the 32-bit address were it loaded the image.
U32 RamdiskSize; // its size in bytes
U16 BootSectKludgeOffset;
U16 BootSectKludgeSegment;
U16 HeapEnd; // space from here (exclusive) down to
// end of setup code can be used by setup
// for local heap purposes.
U16 Pad1;
U32 CommandLinePointer; // 32-bit pointer to the kernel command line
U32 InitrdAddressMax; // Highest legal initrd address
} PACKED LINUX_SETUPSECTOR, *PLINUX_SETUPSECTOR;
VOID BootNewLinuxKernel(VOID); // Implemented in linux.S
VOID BootOldLinuxKernel(U32 KernelSize); // Implemented in linux.S
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description);
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName);
BOOL LinuxReadBootSector(PFILE LinuxKernelFile);
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile);
BOOL LinuxReadKernel(PFILE LinuxKernelFile);
BOOL LinuxCheckKernelVersion(VOID);
BOOL LinuxReadInitrd(PFILE LinuxInitrdFile);
#endif // defined __LINUX_H

View File

@@ -1,27 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __BOOT_H
#define __BOOT_H
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName);
VOID LoadAndBootPartition(PUCHAR OperatingSystemName);
VOID LoadAndBootDrive(PUCHAR OperatingSystemName);
#endif // defined __BOOT_H

View File

@@ -1,58 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __MEMORY_H
#define __MEMORY_H
#define MEMTYPE_USABLE 0x01
#define MEMTYPE_RESERVED 0x02
#define MEMTYPE_ACPI_RECLAIM 0x03
#define MEMTYPE_ACPI_NVS 0x04
typedef struct
{
U64 BaseAddress;
U64 Length;
U32 Type;
U32 Reserved;
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
U32 GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
// These functions are implemented in mem.S
U32 GetExtendedMemorySize(VOID); // Returns extended memory size in KB
U32 GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); // Fills structure with BIOS memory map and returns memory map item count
//BOOL MmInitializeMemoryManager(U32 LowMemoryStart, U32 LowMemoryLength);
BOOL MmInitializeMemoryManager(VOID);
PVOID MmAllocateMemory(U32 MemorySize);
VOID MmFreeMemory(PVOID MemoryPointer);
//PVOID MmAllocateLowMemory(U32 MemorySize);
//VOID MmFreeLowMemory(PVOID MemoryPointer);
PVOID MmAllocateMemoryAtAddress(U32 MemorySize, PVOID DesiredAddress);
PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress);
#endif // defined __MEMORY_H

View File

@@ -1,164 +0,0 @@
/* multiboot.h - the header for Multiboot */
/* Copyright (C) 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef __MULTIBOOT_H
#define __MULTIBOOT_H
/* Macros. */
/* The magic number for the Multiboot header. */
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
/* The flags for the Multiboot header. */
#define MULTIBOOT_HEADER_FLAGS 0x00010003
/* The magic number passed by a Multiboot-compliant boot loader. */
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
/* The size of our stack (16KB). */
#define STACK_SIZE 0x4000
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
#ifdef HAVE_ASM_USCORE
# define EXT_C(sym) _ ## sym
#else
# define EXT_C(sym) sym
#endif
#define MB_INFO_FLAG_MEM_SIZE 0x00000001
#define MB_INFO_FLAG_BOOT_DEVICE 0x00000002
#define MB_INFO_FLAG_COMMAND_LINE 0x00000004
#define MB_INFO_FLAG_MODULES 0x00000008
#define MB_INFO_FLAG_AOUT_SYMS 0x00000010
#define MB_INFO_FLAG_ELF_SYMS 0x00000020
#define MB_INFO_FLAG_MEMORY_MAP 0x00000040
#define MB_INFO_FLAG_DRIVES 0x00000080
#define MB_INFO_FLAG_CONFIG_TABLE 0x00000100
#define MB_INFO_FLAG_BOOT_LOADER_NAME 0x00000200
#define MB_INFO_FLAG_APM_TABLE 0x00000400
#define MB_INFO_FLAG_GRAPHICS_TABLE 0x00000800
#ifndef ASM
/* Do not include here in boot.S. */
/* Types. */
/* The Multiboot header. */
typedef struct multiboot_header
{
unsigned long magic;
unsigned long flags;
unsigned long checksum;
unsigned long header_addr;
unsigned long load_addr;
unsigned long load_end_addr;
unsigned long bss_end_addr;
unsigned long entry_addr;
} multiboot_header_t;
/* The symbol table for a.out. */
typedef struct aout_symbol_table
{
unsigned long tabsize;
unsigned long strsize;
unsigned long addr;
unsigned long reserved;
} aout_symbol_table_t;
/* The section header table for ELF. */
typedef struct elf_section_header_table
{
unsigned long num;
unsigned long size;
unsigned long addr;
unsigned long shndx;
} elf_section_header_table_t;
/* The Multiboot information. */
typedef struct multiboot_info
{
unsigned long flags;
unsigned long mem_lower;
unsigned long mem_upper;
unsigned long boot_device;
unsigned long cmdline;
unsigned long mods_count;
unsigned long mods_addr;
#if 0
/* reactos and loadros define this entry with a size of 12 byte but the union is 16 byte */
union
{
aout_symbol_table_t aout_sym;
elf_section_header_table_t elf_sec;
} u;
#else
char syms[12];
#endif
unsigned long mmap_length;
unsigned long mmap_addr;
} multiboot_info_t;
/* The module structure. */
typedef struct module
{
unsigned long mod_start;
unsigned long mod_end;
unsigned long string;
unsigned long reserved;
} module_t;
/* The memory map. Be careful that the offset 0 is base_addr_low
but no size. */
typedef struct memory_map
{
//unsigned long size;
unsigned long base_addr_low;
unsigned long base_addr_high;
unsigned long length_low;
unsigned long length_high;
unsigned long type;
unsigned long reserved;
} memory_map_t;
multiboot_header_t mb_header; // Multiboot header structure defined in kernel image file
multiboot_info_t mb_info; // Multiboot info structure passed to kernel
char multiboot_kernel_cmdline[255]; // Command line passed to kernel
module_t multiboot_modules[64]; // Array to hold boot module info loaded for the kernel
char multiboot_module_strings[64][256]; // Array to hold module names
unsigned long multiboot_memory_map_descriptor_size;
memory_map_t multiboot_memory_map[32]; // Memory map
void boot_reactos(void);
#include "fs.h" // Included FILE structure definition
BOOL MultiBootLoadKernel(FILE *KernelImage);
//BOOL MultiBootLoadModule(FILE *ModuleImage, char *ModuleName);
PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, U32* ModuleSize);
int GetBootPartition(char *OperatingSystemName);
PVOID MultiBootCreateModule(char *ModuleName);
BOOL MultiBootCloseModule(PVOID ModuleBase, U32 dwModuleSize);
#endif /* ! ASM */
#endif // defined __MULTIBOOT_H

View File

@@ -1,34 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __OPTIONS_H
#define __OPTIONS_H
VOID DoOptionsMenu(VOID);
VOID OptionMenuReboot(VOID);
VOID OptionMenuCustomBoot(VOID);
VOID OptionMenuCustomBootDisk(VOID);
VOID OptionMenuCustomBootPartition(VOID);
VOID OptionMenuCustomBootBootSectorFile(VOID);
VOID OptionMenuCustomBootReactOS(VOID);
VOID OptionMenuCustomBootLinux(VOID);
#endif // #defined __OPTIONS_H

View File

@@ -1,28 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __OSLIST_H
#define __OSLIST_H
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32* OperatingSystemCountPointer);
U32 CountOperatingSystems(U32 SectionId);
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32 OperatingSystemCount);
BOOL RemoveQuotes(PUCHAR QuotedString);
#endif // #defined __OSLIST_H

View File

@@ -1,78 +0,0 @@
/*
* FreeLoader
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 Eric Kohl
* Copyright (C) 2001 Emanuele Aliberti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __PORTIO_H
#define __PORTIO_H
/*
* Port I/O functions
*/
VOID
/*STDCALL*/
READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count);
UCHAR
/*STDCALL*/
READ_PORT_UCHAR (PUCHAR Port);
U32
/*STDCALL*/
READ_PORT_ULONG (U32* Port);
U16
/*STDCALL*/
READ_PORT_USHORT (U16* Port);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count);
VOID
/*STDCALL*/
WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value);
VOID
/*STDCALL*/
WRITE_PORT_ULONG (U32* Port, U32 Value);
VOID
/*STDCALL*/
WRITE_PORT_USHORT (U16* Port, U16 Value);
#endif // defined __PORTIO_H

View File

@@ -1,48 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __REACTOS_H
#define __REACTOS_H
///////////////////////////////////////////////////////////////////////////////////////
//
// ReactOS Loading Functions
//
///////////////////////////////////////////////////////////////////////////////////////
void LoadAndBootReactOS(PUCHAR OperatingSystemName);
///////////////////////////////////////////////////////////////////////////////////////
//
// ReactOS Setup Loader Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID ReactOSRunSetupLoader(VOID);
///////////////////////////////////////////////////////////////////////////////////////
//
// ARC Path Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DissectArcPath(char *ArcPath, char *BootPath, U32* BootDrive, U32* BootPartition);
void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, U32 Disk, U32 Partition);
U32 ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath);
#endif // defined __REACTOS_H

View File

@@ -1,135 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __STDLIB_H
#define __STDLIB_H
#include <freeldr.h>
///////////////////////////////////////////////////////////////////////////////////////
//
// String Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int strlen(char *str);
char * strcpy(char *dest, char *src);
char * strncpy(char *dest, char *src, size_t count);
char * strcat(char *dest, char *src);
char * strncat(char *dst, const char *src, size_t n);
char * strchr(const char *s, int c);
char * strrchr(const char *s, int c);
int strcmp(const char *string1, const char *string2);
int stricmp(const char *string1, const char *string2);
int strncmp(const char *string1, const char *string2, size_t length);
int strnicmp(const char *string1, const char *string2, size_t length);
///////////////////////////////////////////////////////////////////////////////////////
//
// Memory Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int memcmp(const void *buf1, const void *buf2, size_t count);
void * memcpy(void *to, const void *from, size_t count);
void * memmove(void *dest, const void *src, size_t count);
void * memset(void *src, int val, size_t count);
#define RtlCompareMemory(Source1, Source2, Length) memcmp(Source1, Source2, Length)
#define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
#define RtlFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length)
#define RtlMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length)
///////////////////////////////////////////////////////////////////////////////////////
//
// Standard Library Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int atoi(char *string);
char * itoa(int value, char *string, int radix);
int toupper(int c);
int tolower(int c);
int isspace(int c);
int isdigit(int c);
int isxdigit(int c);
char * convert_to_ascii(char *buf, int c, ...);
void putchar(int ch); // Implemented in asmcode.S
int kbhit(void); // Implemented in asmcode.S
int getch(void); // Implemented in asmcode.S
int getyear(void); // Implemented in asmcode.S
int getday(void); // Implemented in asmcode.S
int getmonth(void); // Implemented in asmcode.S
int gethour(void); // Implemented in asmcode.S
int getminute(void); // Implemented in asmcode.S
int getsecond(void); // Implemented in asmcode.S
void beep(void);
void delay(unsigned msec);
void sound(int freq);
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
///////////////////////////////////////////////////////////////////////////////////////
//
// Screen Output Functions
//
///////////////////////////////////////////////////////////////////////////////////////
void print(char *str);
void printf(char *fmt, ...);
void sprintf(char *buffer, char *format, ...);
///////////////////////////////////////////////////////////////////////////////////////
//
// List Functions
//
///////////////////////////////////////////////////////////////////////////////////////
typedef struct _LIST_ITEM
{
struct _LIST_ITEM* ListPrev;
struct _LIST_ITEM* ListNext;
} LIST_ITEM, *PLIST_ITEM;
VOID RtlListInitializeHead(PLIST_ITEM ListHead); // Initializes a doubly linked list
VOID RtlListInsertHead(PLIST_ITEM ListHead, PLIST_ITEM Entry); // Inserts an entry at the head of the list
VOID RtlListInsertTail(PLIST_ITEM ListHead, PLIST_ITEM Entry); // Inserts an entry at the tail of the list
PLIST_ITEM RtlListRemoveHead(PLIST_ITEM ListHead); // Removes the entry at the head of the list
PLIST_ITEM RtlListRemoveTail(PLIST_ITEM ListHead); // Removes the entry at the tail of the list
PLIST_ITEM RtlListGetHead(PLIST_ITEM ListHead); // Returns the entry at the head of the list
PLIST_ITEM RtlListGetTail(PLIST_ITEM ListHead); // Returns the entry at the tail of the list
BOOL RtlListIsEmpty(PLIST_ITEM ListHead); // Indicates whether a doubly linked list is empty
U32 RtlListCountEntries(PLIST_ITEM ListHead); // Counts the entries in a doubly linked list
PLIST_ITEM RtlListGetPrevious(PLIST_ITEM ListEntry); // Returns the previous item in the list
PLIST_ITEM RtlListGetNext(PLIST_ITEM ListEntry); // Returns the next item in the list
PLIST_ITEM RtlListRemoveEntry(PLIST_ITEM ListEntry); // Removes the entry from the list
VOID RtlListInsertEntry(PLIST_ITEM InsertAfter, PLIST_ITEM ListEntry); // Inserts a new list entry right after the specified one
VOID RtlListMoveEntryPrevious(PLIST_ITEM ListEntry); // Moves the list entry to before the previous entry
VOID RtlListMoveEntryNext(PLIST_ITEM ListEntry); // Moves the list entry to after the next entry
#endif // defined __STDLIB_H

View File

@@ -1,95 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __UI_H
#define __UI_H
extern U32 UiScreenWidth; // Screen Width
extern U32 UiScreenHeight; // Screen Height
extern UCHAR UiStatusBarFgColor; // Status bar foreground color
extern UCHAR UiStatusBarBgColor; // Status bar background color
extern UCHAR UiBackdropFgColor; // Backdrop foreground color
extern UCHAR UiBackdropBgColor; // Backdrop background color
extern UCHAR UiBackdropFillStyle; // Backdrop fill style
extern UCHAR UiTitleBoxFgColor; // Title box foreground color
extern UCHAR UiTitleBoxBgColor; // Title box background color
extern UCHAR UiMessageBoxFgColor; // Message box foreground color
extern UCHAR UiMessageBoxBgColor; // Message box background color
extern UCHAR UiMenuFgColor; // Menu foreground color
extern UCHAR UiMenuBgColor; // Menu background color
extern UCHAR UiTextColor; // Normal text color
extern UCHAR UiSelectedTextColor; // Selected text color
extern UCHAR UiSelectedTextBgColor; // Selected text background color
extern UCHAR UiEditBoxTextColor; // Edit box text color
extern UCHAR UiEditBoxBgColor; // Edit box text background color
extern UCHAR UiTitleBoxTitleText[260]; // Title box's title text
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects
extern UCHAR UiMonthNames[12][15];
///////////////////////////////////////////////////////////////////////////////////////
//
// User Interface Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL UiInitialize(VOID); // Initialize User-Interface
VOID UiUnInitialize(PUCHAR BootText); // Un-initialize User-Interface
VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
VOID UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
VOID UiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom); // Draws a shadow on the bottom and right sides of the area specified
VOID UiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
VOID UiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
VOID UiDrawCenteredText(U32 Left, U32 Top, U32 Right, U32 Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
VOID UiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen
VOID UiUpdateDateTime(VOID); // Updates the date and time
VOID UiInfoBox(PUCHAR MessageText); // Displays a info box on the screen
VOID UiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button
VOID UiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources
VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiShowMessageBoxesInSection(PUCHAR SectionName); // Displays all the message boxes in a given section
VOID UiEscapeString(PUCHAR String); // Processes a string and changes all occurances of "\n" to '\n'
BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, U32 Length);
UCHAR UiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value
UCHAR UiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value
VOID UiTruncateStringEllipsis(PUCHAR StringText, U32 MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...'
VOID UiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
VOID UiFadeOut(VOID); // Fades the screen out
///////////////////////////////////////////////////////////////////////////////////////
//
// Menu Functions
//
///////////////////////////////////////////////////////////////////////////////////////
typedef BOOL (*UiMenuKeyPressFilterCallback)(U32 KeyPress);
BOOL UiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
#endif // #defined __UI_H

View File

@@ -1,49 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __VERSION_H
#define __VERSION_H
/* just some stuff */
#define VERSION "FreeLoader v1.8.19"
#define COPYRIGHT "Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>"
#define AUTHOR_EMAIL "<brianp@sginet.com>"
#define BY_AUTHOR "by Brian Palmer"
// FreeLoader version defines
//
// NOTE:
// If you fix bugs then you increment the patch version
// If you add features then you increment the minor version and zero the patch version
// If you add major functionality then you increment the major version and zero the minor & patch versions
//
#define FREELOADER_MAJOR_VERSION 1
#define FREELOADER_MINOR_VERSION 8
#define FREELOADER_PATCH_VERSION 19
#ifndef ASM
PUCHAR GetFreeLoaderVersionString(VOID);
#endif // ASM
#endif // defined __VERSION_H

View File

@@ -1,197 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __VIDEO_H
#define __VIDEO_H
#define VIDEOCARD_CGA_OR_OTHER 0
#define VIDEOCARD_EGA 1
#define VIDEOCARD_VGA 2
#define VERTRES_200_SCANLINES 0x00
#define VERTRES_350_SCANLINES 0x01
#define VERTRES_400_SCANLINES 0x02
#define MODETYPE_TEXT 0
#define MODETYPE_GRAPHICS 1
#define VIDEOMODE_NORMAL_TEXT 0
#define VIDEOMODE_EXTENDED_TEXT 1
#define VIDEOMODE_80X28 0x501C
#define VIDEOMODE_80X30 0x501E
#define VIDEOMODE_80X34 0x5022
#define VIDEOMODE_80X43 0x502B
#define VIDEOMODE_80X60 0x503C
#define VIDEOMODE_132X25 0x8419
#define VIDEOMODE_132X43 0x842B
#define VIDEOMODE_132X50 0x8432
#define VIDEOMODE_132X60 0x843C
#define VIDEOPORT_PALETTE_READ 0x03C7
#define VIDEOPORT_PALETTE_WRITE 0x03C8
#define VIDEOPORT_PALETTE_DATA 0x03C9
#define VIDEOPORT_VERTICAL_RETRACE 0x03DA
#define VIDEOVGA_MEM_ADDRESS 0xA0000
#define VIDEOTEXT_MEM_ADDRESS 0xB8000
typedef struct
{
U8 Red;
U8 Green;
U8 Blue;
} PACKED PALETTE_ENTRY, *PPALETTE_ENTRY;
typedef struct
{
U16 ModeAttributes; // mode attributes (see #00080)
U8 WindowAttributesA; // window attributes, window A (see #00081)
U8 WindowsAttributesB; // window attributes, window B (see #00081)
U16 WindowGranularity; // window granularity in KB
U16 WindowSize; // window size in KB
U16 WindowAStartSegment; // start segment of window A (0000h if not supported)
U16 WindowBStartSegment; // start segment of window B (0000h if not supported)
U32 WindowPositioningFunction; // -> FAR window positioning function (equivalent to AX=4F05h)
U16 BytesPerScanLine; // bytes per scan line
//---remainder is optional for VESA modes in v1.0/1.1, needed for OEM modes---
U16 WidthInPixels; // width in pixels (graphics) or characters (text)
U16 HeightInPixels; // height in pixels (graphics) or characters (text)
U8 CharacterWidthInPixels; // width of character cell in pixels
U8 CharacterHeightInPixels; // height of character cell in pixels
U8 NumberOfMemoryPlanes; // number of memory planes
U8 BitsPerPixel; // number of bits per pixel
U8 NumberOfBanks; // number of banks
U8 MemoryModel; // memory model type (see #00082)
U8 BankSize; // size of bank in KB
U8 NumberOfImagePanes; // number of image pages (less one) that will fit in video RAM
U8 Reserved1; // reserved (00h for VBE 1.0-2.0, 01h for VBE 3.0)
//---VBE v1.2+ ---
U8 RedMaskSize; // red mask size
U8 RedMaskPosition; // red field position
U8 GreenMaskSize; // green mask size
U8 GreenMaskPosition; // green field size
U8 BlueMaskSize; // blue mask size
U8 BlueMaskPosition; // blue field size
U8 ReservedMaskSize; // reserved mask size
U8 ReservedMaskPosition; // reserved mask position
U8 DirectColorModeInfo; // direct color mode info
// bit 0:Color ramp is programmable
// bit 1:Bytes in reserved field may be used by application
//---VBE v2.0+ ---
U32 LinearVideoBufferAddress; // physical address of linear video buffer
U32 OffscreenMemoryPointer; // pointer to start of offscreen memory
U16 OffscreenMemorySize; // KB of offscreen memory
//---VBE v3.0 ---
U16 LinearBytesPerScanLine; // bytes per scan line in linear modes
U8 BankedNumberOfImages; // number of images (less one) for banked video modes
U8 LinearNumberOfImages; // number of images (less one) for linear video modes
U8 LinearRedMaskSize; // linear modes:Size of direct color red mask (in bits)
U8 LinearRedMaskPosition; // linear modes:Bit position of red mask LSB (e.g. shift count)
U8 LinearGreenMaskSize; // linear modes:Size of direct color green mask (in bits)
U8 LinearGreenMaskPosition; // linear modes:Bit position of green mask LSB (e.g. shift count)
U8 LinearBlueMaskSize; // linear modes:Size of direct color blue mask (in bits)
U8 LinearBlueMaskPosition; // linear modes:Bit position of blue mask LSB (e.g. shift count)
U8 LinearReservedMaskSize; // linear modes:Size of direct color reserved mask (in bits)
U8 LinearReservedMaskPosition; // linear modes:Bit position of reserved mask LSB
U32 MaximumPixelClock; // maximum pixel clock for graphics video mode, in Hz
U8 Reserved2[190]; // 190 BYTEs reserved (0)
} PACKED SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
extern U32 CurrentMemoryBank;
extern SVGA_MODE_INFORMATION VesaVideoModeInformation;
extern PVOID VideoOffScreenBuffer;
VOID BiosSetVideoMode(U32 VideoMode); // Implemented in i386vid.S
VOID BiosSetVideoFont8x8(VOID); // Implemented in i386vid.S
VOID BiosSetVideoFont8x14(VOID); // Implemented in i386vid.S
VOID BiosSetVideoFont8x16(VOID); // Implemented in i386vid.S
VOID BiosSelectAlternatePrintScreen(VOID); // Implemented in i386vid.S
VOID BiosDisableCursorEmulation(VOID); // Implemented in i386vid.S
VOID BiosDefineCursor(U32 StartScanLine, U32 EndScanLine); // Implemented in i386vid.S
U32 BiosDetectVideoCard(VOID); // Implemented in i386vid.S
VOID BiosSetVerticalResolution(U32 ScanLines); // Implemented in i386vid.S, must be called right before BiosSetVideoMode()
VOID BiosSet480ScanLines(VOID); // Implemented in i386vid.S, must be called right after BiosSetVideoMode()
VOID BiosSetVideoDisplayEnd(VOID); // Implemented in i386vid.S
VOID BiosVideoDisableBlinkBit(VOID); // Implemented in i386vid.S
VOID BiosVideoEnableBlinkBit(VOID); // Implemented in i386vid.S
U16 BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version
BOOL BiosVesaSetBank(U16 Bank); // Implemented in i386vid.S
BOOL BiosVesaSetVideoMode(U16 Mode); // Implemented in i386vid.S
BOOL BiosVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformation); // Implemented in i386vid.S
VOID VideoSetTextCursorPosition(U32 X, U32 Y); // Implemented in i386vid.S
VOID VideoHideTextCursor(VOID); // Implemented in i386vid.S
VOID VideoShowTextCursor(VOID); // Implemented in i386vid.S
U32 VideoGetTextCursorPositionX(VOID); // Implemented in i386vid.S
U32 VideoGetTextCursorPositionY(VOID); // Implemented in i386vid.S
BOOL VideoSetMode(U32 VideoMode);
BOOL VideoSetMode80x25(VOID); // Sets 80x25
BOOL VideoSetMode80x50_80x43(VOID); // Sets 80x50 (VGA) or 80x43 (EGA) 8-pixel mode
BOOL VideoSetMode80x28(VOID); // Sets 80x28. Works on all VGA's. Standard 80x25 with 14-point font
BOOL VideoSetMode80x43(VOID); // Sets 80x43. Works on all VGA's. It's a 350-scanline mode with 8-pixel font.
BOOL VideoSetMode80x30(VOID); // Sets 80x30. Works on all VGA's. 480 scanlines, 16-pixel font.
BOOL VideoSetMode80x34(VOID); // Sets 80x34. Works on all VGA's. 480 scanlines, 14-pixel font.
BOOL VideoSetMode80x60(VOID); // Sets 80x60. Works on all VGA's. 480 scanlines, 8-pixel font.
U32 VideoGetCurrentModeResolutionX(VOID);
U32 VideoGetCurrentModeResolutionY(VOID);
U32 VideoGetBytesPerScanLine(VOID);
U32 VideoGetCurrentMode(VOID);
U32 VideoGetCurrentModeType(VOID); // MODETYPE_TEXT or MODETYPE_GRAPHICS
BOOL VideoIsCurrentModeVesa(VOID);
U32 VideoGetCurrentModeColorDepth(VOID); // Returns 0 for text mode, 16 for 4-bit, 256 for 8-bit, 32768 for 15-bit, 65536 for 16-bit, etc.
VOID VideoClearScreen(VOID);
VOID VideoWaitForVerticalRetrace(VOID);
PVOID VideoAllocateOffScreenBuffer(VOID); // Returns a pointer to an off-screen buffer sufficient for the current video mode
U32 VideoGetMemoryBankForPixel(U32 X, U32 Y);
U32 VideoGetMemoryBankForPixel16(U32 X, U32 Y);
U32 VideoGetBankOffsetForPixel(U32 X, U32 Y);
U32 VideoGetBankOffsetForPixel16(U32 X, U32 Y);
VOID VideoSetMemoryBank(U16 BankNumber);
U32 VideoGetOffScreenMemoryOffsetForPixel(U32 X, U32 Y);
VOID VideoCopyOffScreenBufferToVRAM(VOID);
VOID VideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue);
VOID VideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue);
VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoRestorePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoSetPixel16(U32 X, U32 Y, U8 Color);
VOID VideoSetPixel256(U32 X, U32 Y, U8 Color);
VOID VideoSetPixelRGB(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue);
VOID VideoSetPixel16_OffScreen(U32 X, U32 Y, U8 Color);
VOID VideoSetPixel256_OffScreen(U32 X, U32 Y, U8 Color);
VOID VideoSetPixelRGB_OffScreen(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue);
VOID VideoSetAllColorsToBlack(U32 ColorCount);
VOID VideoFadeIn(PPALETTE_ENTRY Palette, U32 ColorCount);
VOID VideoFadeOut(U32 ColorCount);
#endif // defined __VIDEO_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __INI_H
#define __INI_H
#include <rtl.h>
#include <fs.h>
#define INI_FILE_COMMENT_CHAR ';'
// This structure describes a single .ini file item
// The item format in the .ini file is:
// Name=Value
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR ItemName;
PUCHAR ItemValue;
} INI_SECTION_ITEM, *PINI_SECTION_ITEM;
// This structure describes a .ini file section
// The section format in the .ini file is:
// [Section Name]
// This structure has a list of section items with
// one INI_SECTION_ITEM for each line in the section
typedef struct
{
LIST_ITEM ListEntry;
PUCHAR SectionName;
U32 SectionItemCount;
PINI_SECTION_ITEM SectionItemList;
} INI_SECTION, *PINI_SECTION;
extern PINI_SECTION IniFileSectionListHead;
extern U32 IniFileSectionCount;
extern U32 IniFileSettingCount;
PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber);
BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize);
U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset);
U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset);
BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength);
BOOL IniIsCommentLine(PUCHAR LineOfText, U32 TextLength);
BOOL IniIsSectionName(PUCHAR LineOfText, U32 TextLength);
U32 IniGetSectionNameSize(PUCHAR SectionNameLine, U32 LineLength);
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, U32 LineLength);
BOOL IniIsSetting(PUCHAR LineOfText, U32 TextLength);
U32 IniGetSettingNameSize(PUCHAR SettingNameLine, U32 LineLength);
U32 IniGetSettingValueSize(PUCHAR SettingValueLine, U32 LineLength);
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, U32 LineLength);
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, U32 LineLength);
#endif // defined __INI_H

View File

@@ -1,112 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <fs.h>
#include <rtl.h>
#include <mm.h>
#include <debug.h>
BOOL IniFileInitialize(VOID)
{
PFILE Freeldr_Ini; // File handle for freeldr.ini
PUCHAR FreeLoaderIniFileData;
U32 FreeLoaderIniFileSize;
BOOL Success;
// Open freeldr.ini
// BootDrive & BootPartition are passed
// in from the boot sector code in the
// DL & DH registers.
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
// If we couldn't open freeldr.ini on the partition
// they specified in the boot sector then try
// opening the active (boot) partition.
if ((Freeldr_Ini == NULL) && (BootPartition != 0))
{
BootPartition = 0;
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
return FALSE;
}
if (Freeldr_Ini == NULL)
{
printf("Error opening freeldr.ini or file not found.\n");
printf("You need to re-install FreeLoader.\n");
return FALSE;
}
// Get the file size & allocate enough memory for it
FreeLoaderIniFileSize = FsGetFileSize(Freeldr_Ini);
FreeLoaderIniFileData = MmAllocateMemory(FreeLoaderIniFileSize);
// If we are out of memory then return FALSE
if (FreeLoaderIniFileData == NULL)
{
printf("Out of memory while loading freeldr.ini.\n");
FsCloseFile(Freeldr_Ini);
return FALSE;
}
// Read freeldr.ini off the disk
if (!FsReadFile(Freeldr_Ini, FreeLoaderIniFileSize, NULL, FreeLoaderIniFileData))
{
FsCloseFile(Freeldr_Ini);
MmFreeMemory(FreeLoaderIniFileData);
return FALSE;
}
FsCloseFile(Freeldr_Ini);
// Parse the .ini file data
Success = IniParseFile(FreeLoaderIniFileData, FreeLoaderIniFileSize);
MmFreeMemory(FreeLoaderIniFileData);
return Success;
}
PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber)
{
PFILE IniFileHandle; // File handle for freeldr.ini
if (!FsOpenVolume(BootDriveNumber, BootPartitionNumber))
{
if (BootPartitionNumber == 0)
{
printf("Error opening active (bootable) partition on boot drive 0x%x for file access.\n", BootDriveNumber);
}
else
{
printf("Error opening partition %d on boot drive 0x%x for file access.\n", BootPartitionNumber, BootDriveNumber);
}
return NULL;
}
// Try to open freeldr.ini
IniFileHandle = FsOpenFile("freeldr.ini");
return IniFileHandle;
}

View File

@@ -1,252 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <ui.h>
#include <rtl.h>
#include <debug.h>
#include <mm.h>
BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId)
{
PINI_SECTION Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() SectionName = %s\n", SectionName));
if (!IniFileSectionListHead)
return FALSE;
// Loop through each section and find the one they want
Section = (PINI_SECTION)RtlListGetHead((PLIST_ITEM)IniFileSectionListHead);
while (Section != NULL)
{
// Compare against the section name
if (stricmp(SectionName, Section->SectionName) == 0)
{
// We found it
*SectionId = (U32)Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n", SectionId));
return TRUE;
}
// Get the next section in the list
Section = (PINI_SECTION)RtlListGetNext((PLIST_ITEM)Section);
}
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Section not found.\n"));
return FALSE;
}
U32 IniGetNumSectionItems(U32 SectionId)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
DbgPrint((DPRINT_INIFILE, "IniGetNumSectionItems() SectionId = 0x%x\n", SectionId));
DbgPrint((DPRINT_INIFILE, "IniGetNumSectionItems() Item count = %d\n", Section->SectionItemCount));
return Section->SectionItemCount;
}
U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
// Return the size of the string plus 1 for the null-terminator
return (strlen(Section->SectionItemList[SettingIndex].ItemName) + 1);
}
U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
// Return the size of the string plus 1 for the null-terminator
return (strlen(Section->SectionItemList[SettingIndex].ItemValue) + 1);
}
BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
#ifdef DEBUG
U32 RealSettingNumber = SettingNumber;
#endif
DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() SectionId = 0x%x\n", SectionId));
// Loop through each section item and find the one they want
DbgPrint((DPRINT_INIFILE, ".01 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
SectionItem = (PINI_SECTION_ITEM)RtlListGetHead((PLIST_ITEM)Section->SectionItemList);
while (SectionItem != NULL)
{
DbgPrint((DPRINT_INIFILE, ".1 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
// Check to see if this is the setting they want
if (SettingNumber == 0)
{
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting number %d found.\n", RealSettingNumber));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting name = %s\n", SectionItem->ItemName));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting value = %s\n", SectionItem->ItemValue));
DbgPrint((DPRINT_INIFILE, "1 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
RtlZeroMemory(SettingName, NameSize);
RtlZeroMemory(SettingValue, ValueSize);
DbgPrint((DPRINT_INIFILE, "2 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
strncpy(SettingName, SectionItem->ItemName, NameSize);
DbgPrint((DPRINT_INIFILE, "3 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
strncpy(SettingValue, SectionItem->ItemValue, ValueSize);
DbgPrint((DPRINT_INIFILE, "4 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
DbgDumpBuffer(DPRINT_INIFILE, SettingName, NameSize);
DbgDumpBuffer(DPRINT_INIFILE, SettingValue, ValueSize);
return TRUE;
}
// Nope, keep going
SettingNumber--;
// Get the next section item in the list
SectionItem = (PINI_SECTION_ITEM)RtlListGetNext((PLIST_ITEM)SectionItem);
}
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() Setting number %d not found.\n", RealSettingNumber));
return FALSE;
}
BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() SectionId = 0x%x\n", SectionId));
// Loop through each section item and find the one they want
SectionItem = (PINI_SECTION_ITEM)RtlListGetHead((PLIST_ITEM)Section->SectionItemList);
while (SectionItem != NULL)
{
// Check to see if this is the setting they want
if (stricmp(SettingName, SectionItem->ItemName) == 0)
{
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting \'%s\' found.\n", SettingName));
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting value = %s\n", SectionItem->ItemValue));
RtlZeroMemory(Buffer, BufferSize);
strncpy(Buffer, SectionItem->ItemValue, BufferSize);
return TRUE;
}
// Get the next section item in the list
SectionItem = (PINI_SECTION_ITEM)RtlListGetNext((PLIST_ITEM)SectionItem);
}
DbgPrint((DPRINT_INIFILE, "IniReadSettingByName() Setting \'%s\' not found.\n", SettingName));
return FALSE;
}
BOOL IniAddSection(PUCHAR SectionName, U32* SectionId)
{
PINI_SECTION Section;
// Allocate a new section structure
Section = MmAllocateMemory(sizeof(INI_SECTION));
if (!Section)
{
return FALSE;
}
RtlZeroMemory(Section, sizeof(INI_SECTION));
// Allocate the section name buffer
Section->SectionName = MmAllocateMemory(strlen(SectionName));
if (!Section->SectionName)
{
MmFreeMemory(Section);
return FALSE;
}
// Get the section name
strcpy(Section->SectionName, SectionName);
// Add it to the section list head
IniFileSectionCount++;
if (IniFileSectionListHead == NULL)
{
IniFileSectionListHead = Section;
}
else
{
RtlListInsertTail((PLIST_ITEM)IniFileSectionListHead, (PLIST_ITEM)Section);
}
*SectionId = (U32)Section;
return TRUE;
}
BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
// Allocate a new item structure
SectionItem = MmAllocateMemory(sizeof(INI_SECTION_ITEM));
if (!SectionItem)
{
return FALSE;
}
RtlZeroMemory(SectionItem, sizeof(INI_SECTION_ITEM));
// Allocate the setting name buffer
SectionItem->ItemName = MmAllocateMemory(strlen(SettingName));
if (!SectionItem->ItemName)
{
MmFreeMemory(SectionItem);
return FALSE;
}
// Allocate the setting value buffer
SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue));
if (!SectionItem->ItemValue)
{
MmFreeMemory(SectionItem->ItemName);
MmFreeMemory(SectionItem);
return FALSE;
}
strcpy(SectionItem->ItemName, SettingName);
strcpy(SectionItem->ItemValue, SettingValue);
// Add it to the current section
Section->SectionItemCount++;
if (Section->SectionItemList == NULL)
{
Section->SectionItemList = SectionItem;
}
else
{
RtlListInsertTail((PLIST_ITEM)Section->SectionItemList, (PLIST_ITEM)SectionItem);
}
return TRUE;
}

View File

@@ -1,605 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include "ini.h"
#include <rtl.h>
#include <mm.h>
#include <debug.h>
PINI_SECTION IniFileSectionListHead = NULL;
U32 IniFileSectionCount = 0;
U32 IniFileSettingCount = 0;
BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize)
{
U32 CurrentOffset;
U32 CurrentLineNumber;
PUCHAR IniFileLine;
U32 IniFileLineSize;
U32 LineLength;
PINI_SECTION CurrentSection = NULL;
PINI_SECTION_ITEM CurrentItem = NULL;
DbgPrint((DPRINT_INIFILE, "IniParseFile() IniFileSize: %d\n", IniFileSize));
// Start with an 80-byte buffer
IniFileLineSize = 80;
IniFileLine = MmAllocateMemory(IniFileLineSize);
if (!IniFileLine)
{
return FALSE;
}
// Loop through each line and parse it
CurrentLineNumber = 0;
CurrentOffset = 0;
while (CurrentOffset < IniFileSize)
{
// First check the line size and increase our buffer if necessary
if (IniFileLineSize < IniGetNextLineSize(IniFileData, IniFileSize, CurrentOffset))
{
IniFileLineSize = IniGetNextLineSize(IniFileData, IniFileSize, CurrentOffset);
MmFreeMemory(IniFileLine);
IniFileLine = MmAllocateMemory(IniFileLineSize);
if (!IniFileLine)
{
return FALSE;
}
}
// Get the line of data
CurrentOffset = IniGetNextLine(IniFileData, IniFileSize, IniFileLine, IniFileLineSize, CurrentOffset);
LineLength = strlen(IniFileLine);
// If it is a blank line or a comment then skip it
if (IniIsLineEmpty(IniFileLine, LineLength) || IniIsCommentLine(IniFileLine, LineLength))
{
CurrentLineNumber++;
continue;
}
// Check if it is a new section
if (IniIsSectionName(IniFileLine, LineLength))
{
// Allocate a new section structure
CurrentSection = MmAllocateMemory(sizeof(INI_SECTION));
if (!CurrentSection)
{
MmFreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentSection, sizeof(INI_SECTION));
// Allocate the section name buffer
CurrentSection->SectionName = MmAllocateMemory(IniGetSectionNameSize(IniFileLine, LineLength));
if (!CurrentSection->SectionName)
{
MmFreeMemory(CurrentSection);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Get the section name
IniExtractSectionName(CurrentSection->SectionName, IniFileLine, LineLength);
// Add it to the section list head
IniFileSectionCount++;
if (IniFileSectionListHead == NULL)
{
IniFileSectionListHead = CurrentSection;
}
else
{
RtlListInsertTail((PLIST_ITEM)IniFileSectionListHead, (PLIST_ITEM)CurrentSection);
}
CurrentLineNumber++;
continue;
}
// Check if it is a setting
if (IniIsSetting(IniFileLine, LineLength))
{
// First check to make sure we're inside a [section]
if (CurrentSection == NULL)
{
printf("Error: freeldr.ini:%ld: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
printf("Press any key to continue...\n");
getch();
CurrentLineNumber++;
continue;
}
// Allocate a new item structure
CurrentItem = MmAllocateMemory(sizeof(INI_SECTION_ITEM));
if (!CurrentItem)
{
MmFreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentItem, sizeof(INI_SECTION_ITEM));
// Allocate the setting name buffer
CurrentItem->ItemName = MmAllocateMemory(IniGetSettingNameSize(IniFileLine, LineLength));
if (!CurrentItem->ItemName)
{
MmFreeMemory(CurrentItem);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Allocate the setting value buffer
CurrentItem->ItemValue = MmAllocateMemory(IniGetSettingValueSize(IniFileLine, LineLength));
if (!CurrentItem->ItemValue)
{
MmFreeMemory(CurrentItem->ItemName);
MmFreeMemory(CurrentItem);
MmFreeMemory(IniFileLine);
return FALSE;
}
// Get the section name
IniExtractSettingName(CurrentItem->ItemName, IniFileLine, LineLength);
IniExtractSettingValue(CurrentItem->ItemValue, IniFileLine, LineLength);
// Add it to the current section
IniFileSettingCount++;
CurrentSection->SectionItemCount++;
if (CurrentSection->SectionItemList == NULL)
{
CurrentSection->SectionItemList = CurrentItem;
}
else
{
RtlListInsertTail((PLIST_ITEM)CurrentSection->SectionItemList, (PLIST_ITEM)CurrentItem);
}
CurrentLineNumber++;
continue;
}
CurrentLineNumber++;
}
DbgPrint((DPRINT_INIFILE, "Parsed %d sections and %d settings.\n", IniFileSectionCount, IniFileSettingCount));
DbgPrint((DPRINT_INIFILE, "IniParseFile() done.\n"));
return TRUE;
}
U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset)
{
U32 Idx;
U32 LineCharCount = 0;
// Loop through counting chars until we hit the end of the
// file or we encounter a new line char
for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++)
{
// Increment the line character count
LineCharCount++;
// Check for new line char
if (IniFileData[CurrentOffset] == '\n')
{
CurrentOffset++;
break;
}
}
// Add one for the NULL-terminator
LineCharCount++;
// Send back line character count
return LineCharCount;
}
U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset)
{
U32 Idx;
// Loop through grabbing chars until we hit the end of the
// file or we encounter a new line char
for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++)
{
// If we haven't exceeded our buffer size yet
// then store another char
if (Idx < (BufferSize - 1))
{
Buffer[Idx++] = IniFileData[CurrentOffset];
}
// Check for new line char
if (IniFileData[CurrentOffset] == '\n')
{
CurrentOffset++;
break;
}
}
// Terminate the string
Buffer[Idx] = '\0';
// Get rid of newline & linefeed characters (if any)
if((Buffer[strlen(Buffer)-1] == '\n') || (Buffer[strlen(Buffer)-1] == '\r'))
Buffer[strlen(Buffer)-1] = '\0';
if((Buffer[strlen(Buffer)-1] == '\n') || (Buffer[strlen(Buffer)-1] == '\r'))
Buffer[strlen(Buffer)-1] = '\0';
// Send back new offset
return CurrentOffset;
}
BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check for text (skipping whitespace)
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t') ||
(LineOfText[Idx] == '\n') ||
(LineOfText[Idx] == '\r'))
{
continue;
}
else
{
return FALSE;
}
}
return TRUE;
}
BOOL IniIsCommentLine(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check the first character (skipping whitespace)
// and make sure that it is an opening bracket
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t'))
{
continue;
}
else if (LineOfText[Idx] == INI_FILE_COMMENT_CHAR)
{
return TRUE;
}
else
{
break;
}
}
return FALSE;
}
BOOL IniIsSectionName(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Check the first character (skipping whitespace)
// and make sure that it is an opening bracket
for (Idx=0; Idx<TextLength; Idx++)
{
if ((LineOfText[Idx] == ' ') ||
(LineOfText[Idx] == '\t'))
{
continue;
}
else if (LineOfText[Idx] == '[')
{
return TRUE;
}
else
{
break;
}
}
return FALSE;
}
U32 IniGetSectionNameSize(PUCHAR SectionNameLine, U32 LineLength)
{
U32 Idx;
U32 NameSize;
// Find the opening bracket (skipping whitespace)
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ' ') ||
(SectionNameLine[Idx] == '\t'))
{
continue;
}
else //if (SectionNameLine[Idx] == '[')
{
break;
}
}
// Skip past the opening bracket
Idx++;
// Count the characters up until the closing bracket or EOL
for (NameSize=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ']') ||
(SectionNameLine[Idx] == '\0'))
{
break;
}
// Increment the count
NameSize++;
}
// Add one for the NULL-terminator
NameSize++;
return NameSize;
}
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Find the opening bracket (skipping whitespace)
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ' ') ||
(SectionNameLine[Idx] == '\t'))
{
continue;
}
else //if (SectionNameLine[Idx] == '[')
{
break;
}
}
// Skip past the opening bracket
Idx++;
// Count the characters up until the closing bracket or EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if ((SectionNameLine[Idx] == ']') ||
(SectionNameLine[Idx] == '\0'))
{
break;
}
// Grab a character and increment DestIdx
SectionName[DestIdx] = SectionNameLine[Idx];
DestIdx++;
}
// Terminate the string
SectionName[DestIdx] = '\0';
}
BOOL IniIsSetting(PUCHAR LineOfText, U32 TextLength)
{
U32 Idx;
// Basically just check for an '=' equals sign
for (Idx=0; Idx<TextLength; Idx++)
{
if (LineOfText[Idx] == '=')
{
return TRUE;
}
}
return FALSE;
}
U32 IniGetSettingNameSize(PUCHAR SettingNameLine, U32 LineLength)
{
U32 Idx;
U32 NameSize;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == ' ') ||
(SettingNameLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Count the characters up until the '=' equals sign or EOL
for (NameSize=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == '=') ||
(SettingNameLine[Idx] == '\0'))
{
break;
}
// Increment the count
NameSize++;
}
// Add one for the NULL-terminator
NameSize++;
return NameSize;
}
U32 IniGetSettingValueSize(PUCHAR SettingValueLine, U32 LineLength)
{
U32 Idx;
U32 ValueSize;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingValueLine[Idx] == ' ') ||
(SettingValueLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Skip the characters up until the '=' equals sign or EOL
for (; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '=')
{
Idx++;
break;
}
// If we hit EOL then obviously the value size is zero
if (SettingValueLine[Idx] == '\0')
{
return 0;
}
}
// Count the characters up until the EOL
for (ValueSize=0; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '\0')
{
break;
}
// Increment the count
ValueSize++;
}
// Add one for the NULL-terminator
ValueSize++;
return ValueSize;
}
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == ' ') ||
(SettingNameLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Get the characters up until the '=' equals sign or EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if ((SettingNameLine[Idx] == '=') ||
(SettingNameLine[Idx] == '\0'))
{
break;
}
// Grab a character and increment DestIdx
SettingName[DestIdx] = SettingNameLine[Idx];
DestIdx++;
}
// Terminate the string
SettingName[DestIdx] = '\0';
}
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, U32 LineLength)
{
U32 Idx;
U32 DestIdx;
// Skip whitespace
for (Idx=0; Idx<LineLength; Idx++)
{
if ((SettingValueLine[Idx] == ' ') ||
(SettingValueLine[Idx] == '\t'))
{
continue;
}
else
{
break;
}
}
// Skip the characters up until the '=' equals sign or EOL
for (; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '=')
{
Idx++;
break;
}
// If we hit EOL then obviously the value size is zero
if (SettingValueLine[Idx] == '\0')
{
SettingValue[0] = '\0';
return;
}
}
// Get the characters up until the EOL
for (DestIdx=0; Idx<LineLength; Idx++)
{
if (SettingValueLine[Idx] == '\0')
{
break;
}
// Grab a character and increment DestIdx
SettingValue[DestIdx] = SettingValueLine[Idx];
DestIdx++;
}
// Terminate the string
SettingValue[DestIdx] = '\0';
}

View File

@@ -1,508 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <disk.h>
#include <miscboot.h>
#include <rtl.h>
#include <fs.h>
#include <ui.h>
#include <linux.h>
#include <debug.h>
#include <mm.h>
#include <inifile.h>
#include <oslist.h> // For RemoveQuotes()
#include <video.h>
#include <drivemap.h>
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
PLINUX_BOOTSECTOR LinuxBootSector = NULL;
PLINUX_SETUPSECTOR LinuxSetupSector = NULL;
U32 SetupSectorSize = 0;
BOOL NewStyleLinuxKernel = FALSE;
U32 LinuxKernelSize = 0;
U32 LinuxInitrdSize = 0;
UCHAR LinuxKernelName[260];
UCHAR LinuxInitrdName[260];
BOOL LinuxHasInitrd = FALSE;
UCHAR LinuxCommandLine[260] = "";
U32 LinuxCommandLineSize = 0;
PVOID LinuxKernelLoadAddress = NULL;
PVOID LinuxInitrdLoadAddress = NULL;
UCHAR LinuxBootDescription[80];
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
{
PFILE LinuxKernel = NULL;
PFILE LinuxInitrdFile = NULL;
UCHAR TempString[260];
UiDrawBackdrop();
if (Description)
{
sprintf(LinuxBootDescription, "Loading %s...", Description);
}
else
{
strcpy(LinuxBootDescription, "Loading Linux...");
}
UiDrawStatusText(LinuxBootDescription);
UiDrawProgressBarCenter(0, 100, LinuxBootDescription);
// Parse the .ini file section
if (!LinuxParseIniSection(OperatingSystemName))
{
goto LinuxBootFailed;
}
// Open the boot volume
if (!FsOpenVolume(BootDrive, BootPartition))
{
UiMessageBox("Failed to open boot drive.");
goto LinuxBootFailed;
}
// Open the kernel
LinuxKernel = FsOpenFile(LinuxKernelName);
if (LinuxKernel == NULL)
{
sprintf(TempString, "Linux kernel \'%s\' not found.", LinuxKernelName);
UiMessageBox(TempString);
goto LinuxBootFailed;
}
// Open the initrd file image (if necessary)
if (LinuxHasInitrd)
{
LinuxInitrdFile = FsOpenFile(LinuxInitrdName);
if (LinuxInitrdFile == NULL)
{
sprintf(TempString, "Linux initrd image \'%s\' not found.", LinuxInitrdName);
UiMessageBox(TempString);
goto LinuxBootFailed;
}
}
// Read the boot sector
if (!LinuxReadBootSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the setup sector
if (!LinuxReadSetupSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Calc kernel size
LinuxKernelSize = FsGetFileSize(LinuxKernel) - (512 + SetupSectorSize);
// Get the file size
LinuxInitrdSize = FsGetFileSize(LinuxInitrdFile);
// Read the kernel
if (!LinuxReadKernel(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the initrd (if necessary)
if (LinuxHasInitrd)
{
if (!LinuxReadInitrd(LinuxInitrdFile))
{
goto LinuxBootFailed;
}
}
// If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h)
if (LinuxBootSector->RootDevice == 0x0000)
{
LinuxBootSector->RootDevice = 0x0200;
}
if (LinuxSetupSector->Version >= 0x0202)
{
LinuxSetupSector->CommandLinePointer = 0x99000;
}
else
{
LinuxBootSector->CommandLineMagic = LINUX_COMMAND_LINE_MAGIC;
LinuxBootSector->CommandLineOffset = 0x9000;
}
if (NewStyleLinuxKernel)
{
LinuxSetupSector->TypeOfLoader = LINUX_LOADER_TYPE_FREELOADER;
}
else
{
LinuxSetupSector->LoadFlags = 0;
}
RtlCopyMemory((PVOID)0x90000, LinuxBootSector, 512);
RtlCopyMemory((PVOID)0x90200, LinuxSetupSector, SetupSectorSize);
RtlCopyMemory((PVOID)0x99000, LinuxCommandLine, LinuxCommandLineSize);
UiUnInitialize("Booting Linux...");
DiskStopFloppyMotor();
if (LinuxSetupSector->LoadFlags & LINUX_FLAG_LOAD_HIGH)
{
BootNewLinuxKernel();
}
else
{
BootOldLinuxKernel(LinuxKernelSize);
}
LinuxBootFailed:
if (LinuxKernel != NULL)
{
FsCloseFile(LinuxKernel);
}
if (LinuxInitrdFile != NULL)
{
FsCloseFile(LinuxInitrdFile);
}
if (LinuxBootSector != NULL)
{
MmFreeMemory(LinuxBootSector);
}
if (LinuxSetupSector != NULL)
{
MmFreeMemory(LinuxSetupSector);
}
if (LinuxKernelLoadAddress != NULL)
{
MmFreeMemory(LinuxKernelLoadAddress);
}
if (LinuxInitrdLoadAddress != NULL)
{
MmFreeMemory(LinuxInitrdLoadAddress);
}
LinuxBootSector = NULL;
LinuxSetupSector = NULL;
LinuxKernelLoadAddress = NULL;
LinuxInitrdLoadAddress = NULL;
SetupSectorSize = 0;
NewStyleLinuxKernel = FALSE;
LinuxKernelSize = 0;
LinuxHasInitrd = FALSE;
strcpy(LinuxCommandLine, "");
LinuxCommandLineSize = 0;
}
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
{
UCHAR SettingName[260];
UCHAR SettingValue[260];
U32 SectionId;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return FALSE;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 260))
{
UiMessageBox("Boot drive not specified for selected OS!");
return FALSE;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 260))
{
BootPartition = atoi(SettingValue);
}
// Get the kernel name
if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, 260))
{
UiMessageBox("Linux kernel filename not specified for selected OS!");
return FALSE;
}
// Get the initrd name
if (IniReadSettingByName(SectionId, "Initrd", LinuxInitrdName, 260))
{
LinuxHasInitrd = TRUE;
}
// Get the command line
if (IniReadSettingByName(SectionId, "CommandLine", LinuxCommandLine, 260))
{
RemoveQuotes(LinuxCommandLine);
LinuxCommandLineSize = strlen(LinuxCommandLine) + 1;
}
return TRUE;
}
BOOL LinuxReadBootSector(PFILE LinuxKernelFile)
{
// Allocate memory for boot sector
LinuxBootSector = (PLINUX_BOOTSECTOR)MmAllocateMemory(512);
if (LinuxBootSector == NULL)
{
return FALSE;
}
// Read linux boot sector
FsSetFilePointer(LinuxKernelFile, 0);
if (!FsReadFile(LinuxKernelFile, 512, NULL, LinuxBootSector))
{
return FALSE;
}
// Check for validity
if (LinuxBootSector->BootFlag != LINUX_BOOT_SECTOR_MAGIC)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
DbgPrint((DPRINT_LINUX, "SetupSectors: %d\n", LinuxBootSector->SetupSectors));
DbgPrint((DPRINT_LINUX, "RootFlags: 0x%x\n", LinuxBootSector->RootFlags));
DbgPrint((DPRINT_LINUX, "SystemSize: 0x%x\n", LinuxBootSector->SystemSize));
DbgPrint((DPRINT_LINUX, "SwapDevice: 0x%x\n", LinuxBootSector->SwapDevice));
DbgPrint((DPRINT_LINUX, "RamSize: 0x%x\n", LinuxBootSector->RamSize));
DbgPrint((DPRINT_LINUX, "VideoMode: 0x%x\n", LinuxBootSector->VideoMode));
DbgPrint((DPRINT_LINUX, "RootDevice: 0x%x\n", LinuxBootSector->RootDevice));
DbgPrint((DPRINT_LINUX, "BootFlag: 0x%x\n", LinuxBootSector->BootFlag));
return TRUE;
}
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile)
{
U8 TempLinuxSetupSector[512];
LinuxSetupSector = (PLINUX_SETUPSECTOR)TempLinuxSetupSector;
// Read first linux setup sector
FsSetFilePointer(LinuxKernelFile, 512);
if (!FsReadFile(LinuxKernelFile, 512, NULL, TempLinuxSetupSector))
{
return FALSE;
}
// Check the kernel version
if (!LinuxCheckKernelVersion())
{
return FALSE;
}
if (NewStyleLinuxKernel)
{
SetupSectorSize = 512 * LinuxBootSector->SetupSectors;
}
else
{
SetupSectorSize = 4 * 512; // Always 4 setup sectors
}
// Allocate memory for setup sectors
LinuxSetupSector = (PLINUX_SETUPSECTOR)MmAllocateMemory(SetupSectorSize);
if (LinuxSetupSector == NULL)
{
return FALSE;
}
// Copy over first setup sector
RtlCopyMemory(LinuxSetupSector, TempLinuxSetupSector, 512);
// Read in the rest of the linux setup sectors
FsSetFilePointer(LinuxKernelFile, 1024);
if (!FsReadFile(LinuxKernelFile, SetupSectorSize - 512, NULL, ((PVOID)LinuxSetupSector) + 512))
{
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
DbgPrint((DPRINT_LINUX, "SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature));
DbgPrint((DPRINT_LINUX, "Version: 0x%x\n", LinuxSetupSector->Version));
DbgPrint((DPRINT_LINUX, "RealModeSwitch: 0x%x\n", LinuxSetupSector->RealModeSwitch));
DbgPrint((DPRINT_LINUX, "SetupSeg: 0x%x\n", LinuxSetupSector->SetupSeg));
DbgPrint((DPRINT_LINUX, "StartSystemSeg: 0x%x\n", LinuxSetupSector->StartSystemSeg));
DbgPrint((DPRINT_LINUX, "KernelVersion: 0x%x\n", LinuxSetupSector->KernelVersion));
DbgPrint((DPRINT_LINUX, "TypeOfLoader: 0x%x\n", LinuxSetupSector->TypeOfLoader));
DbgPrint((DPRINT_LINUX, "LoadFlags: 0x%x\n", LinuxSetupSector->LoadFlags));
DbgPrint((DPRINT_LINUX, "SetupMoveSize: 0x%x\n", LinuxSetupSector->SetupMoveSize));
DbgPrint((DPRINT_LINUX, "Code32Start: 0x%x\n", LinuxSetupSector->Code32Start));
DbgPrint((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress));
DbgPrint((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize));
DbgPrint((DPRINT_LINUX, "BootSectKludgeOffset: 0x%x\n", LinuxSetupSector->BootSectKludgeOffset));
DbgPrint((DPRINT_LINUX, "BootSectKludgeSegment: 0x%x\n", LinuxSetupSector->BootSectKludgeSegment));
DbgPrint((DPRINT_LINUX, "HeapEnd: 0x%x\n", LinuxSetupSector->HeapEnd));
return TRUE;
}
BOOL LinuxReadKernel(PFILE LinuxKernelFile)
{
U32 BytesLoaded;
UCHAR StatusText[260];
PVOID LoadAddress;
sprintf(StatusText, "Loading %s", LinuxKernelName);
UiDrawStatusText(StatusText);
// Allocate memory for Linux kernel
LinuxKernelLoadAddress = MmAllocateMemoryAtAddress(LinuxKernelSize, (PVOID)LINUX_KERNEL_LOAD_ADDRESS);
if (LinuxKernelLoadAddress != (PVOID)LINUX_KERNEL_LOAD_ADDRESS)
{
return FALSE;
}
LoadAddress = LinuxKernelLoadAddress;
// Read linux kernel to 0x100000 (1mb)
FsSetFilePointer(LinuxKernelFile, 512 + SetupSectorSize);
for (BytesLoaded=0; BytesLoaded<LinuxKernelSize; )
{
if (!FsReadFile(LinuxKernelFile, LINUX_READ_CHUNK_SIZE, NULL, LoadAddress))
{
return FALSE;
}
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LoadAddress += LINUX_READ_CHUNK_SIZE;
UiDrawProgressBarCenter(BytesLoaded, LinuxKernelSize + LinuxInitrdSize, LinuxBootDescription);
}
return TRUE;
}
BOOL LinuxCheckKernelVersion(VOID)
{
// Just assume old kernel until we find otherwise
NewStyleLinuxKernel = FALSE;
// Check for new style setup header
if (LinuxSetupSector->SetupHeaderSignature != LINUX_SETUP_HEADER_ID)
{
NewStyleLinuxKernel = FALSE;
}
// Check for version below 2.0
else if (LinuxSetupSector->Version < 0x0200)
{
NewStyleLinuxKernel = FALSE;
}
// Check for version 2.0
else if (LinuxSetupSector->Version == 0x0200)
{
NewStyleLinuxKernel = TRUE;
}
// Check for version 2.01+
else if (LinuxSetupSector->Version >= 0x0201)
{
NewStyleLinuxKernel = TRUE;
LinuxSetupSector->HeapEnd = 0x9000;
LinuxSetupSector->LoadFlags |= LINUX_FLAG_CAN_USE_HEAP;
}
if ((NewStyleLinuxKernel == FALSE) && (LinuxHasInitrd == TRUE))
{
UiMessageBox("Error: Cannot load a ramdisk (initrd) with an old kernel image.");
return FALSE;
}
return TRUE;
}
BOOL LinuxReadInitrd(PFILE LinuxInitrdFile)
{
U32 BytesLoaded;
UCHAR StatusText[260];
sprintf(StatusText, "Loading %s", LinuxInitrdName);
UiDrawStatusText(StatusText);
// Allocate memory for the ramdisk
//LinuxInitrdLoadAddress = MmAllocateMemory(LinuxInitrdSize);
// Try to align it at the next MB boundary after the kernel
//LinuxInitrdLoadAddress = MmAllocateMemoryAtAddress(LinuxInitrdSize, (PVOID)ROUND_UP((LINUX_KERNEL_LOAD_ADDRESS + LinuxKernelSize), 0x100000));
if (LinuxSetupSector->Version <= 0x0202)
{
LinuxInitrdLoadAddress = MmAllocateHighestMemoryBelowAddress(LinuxInitrdSize, (PVOID)LINUX_MAX_INITRD_ADDRESS);
}
else
{
LinuxInitrdLoadAddress = MmAllocateHighestMemoryBelowAddress(LinuxInitrdSize, (PVOID)LinuxSetupSector->InitrdAddressMax);
}
if (LinuxInitrdLoadAddress == NULL)
{
return FALSE;
}
// Set the information in the setup struct
LinuxSetupSector->RamdiskAddress = (U32)LinuxInitrdLoadAddress;
LinuxSetupSector->RamdiskSize = LinuxInitrdSize;
DbgPrint((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress));
DbgPrint((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize));
if (LinuxSetupSector->Version >= 0x0203)
{
DbgPrint((DPRINT_LINUX, "InitrdAddressMax: 0x%x\n", LinuxSetupSector->InitrdAddressMax));
}
// Read in the ramdisk
for (BytesLoaded=0; BytesLoaded<LinuxInitrdSize; )
{
if (!FsReadFile(LinuxInitrdFile, LINUX_READ_CHUNK_SIZE, NULL, (PVOID)LinuxInitrdLoadAddress))
{
return FALSE;
}
BytesLoaded += LINUX_READ_CHUNK_SIZE;
LinuxInitrdLoadAddress += LINUX_READ_CHUNK_SIZE;
UiDrawProgressBarCenter(BytesLoaded + LinuxKernelSize, LinuxInitrdSize + LinuxKernelSize, LinuxBootDescription);
}
return TRUE;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,301 +0,0 @@
/* Header file for libgcc2.c. */
/* Copyright (C) 2000, 2001
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_LIBGCC2_H
#define GCC_LIBGCC2_H
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
extern void __clear_cache (char *, char *);
extern void __eprintf (const char *, const char *, unsigned int, const char *)
__attribute__ ((__noreturn__));
struct bb;
extern void __bb_exit_func (void);
extern void __bb_init_func (struct bb *);
extern void __bb_fork_func (void);
extern void __bb_trace_func (void);
extern void __bb_trace_ret (void);
extern void __bb_init_trace_func (struct bb *, unsigned long);
struct exception_descriptor;
extern short int __get_eh_table_language (struct exception_descriptor *);
extern short int __get_eh_table_version (struct exception_descriptor *);
/* Permit the tm.h file to select the endianness to use just for this
file. This is used when the endianness is determined when the
compiler is run. */
#ifndef LIBGCC2_WORDS_BIG_ENDIAN
#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
#endif
#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
#ifndef MIN_UNITS_PER_WORD
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
#endif
/* In the first part of this file, we are interfacing to calls generated
by the compiler itself. These calls pass values into these routines
which have very specific modes (rather than very specific types), and
these compiler-generated calls also expect any return values to have
very specific modes (rather than very specific types). Thus, we need
to avoid using regular C language type names in this part of the file
because the sizes for those types can be configured to be anything.
Instead we use the following special type names. */
typedef int QItype __attribute__ ((mode (QI)));
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef int HItype __attribute__ ((mode (HI)));
typedef unsigned int UHItype __attribute__ ((mode (HI)));
#if MIN_UNITS_PER_WORD > 1
/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1 */
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
#if LONG_LONG_TYPE_SIZE > 32
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
#if MIN_UNITS_PER_WORD > 4
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4 */
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
#endif
#endif
#if BITS_PER_UNIT == 8
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
typedef float XFtype __attribute__ ((mode (XF)));
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
typedef float TFtype __attribute__ ((mode (TF)));
#endif
#else /* BITS_PER_UNIT != 8 */
/* On dsp's there are usually qf/hf/tqf modes used instead of the above.
For now we don't support them in libgcc2.c. */
#undef L_fixdfdi
#undef L_fixsfdi
#undef L_fixtfdi
#undef L_fixunsdfdi
#undef L_fixunsdfsi
#undef L_fixunssfdi
#undef L_fixunssfsi
#undef L_fixunstfdi
#undef L_fixunsxfdi
#undef L_fixunsxfsi
#undef L_fixxfdi
#undef L_floatdidf
#undef L_floatdisf
#undef L_floatditf
#undef L_floatdixf
#endif /* BITS_PER_UNIT != 8 */
typedef int word_type __attribute__ ((mode (__word__)));
/* Make sure that we don't accidentally use any normal C language built-in
type names in the first part of this file. Instead we want to use *only*
the type names defined above. The following macro definitions insure
that if we *do* accidentally use some normal C language built-in type name,
we will get a syntax error. */
#define char bogus_type
#define short bogus_type
#define int bogus_type
#define long bogus_type
#define unsigned bogus_type
#define float bogus_type
#define double bogus_type
#if MIN_UNITS_PER_WORD > 4
#define W_TYPE_SIZE (8 * BITS_PER_UNIT)
#define Wtype DItype
#define UWtype UDItype
#define HWtype DItype
#define UHWtype UDItype
#define DWtype TItype
#define UDWtype UTItype
#define __NW(a,b) __ ## a ## di ## b
#define __NDW(a,b) __ ## a ## ti ## b
#elif MIN_UNITS_PER_WORD > 2 \
|| (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32)
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
#define Wtype SItype
#define UWtype USItype
#define HWtype SItype
#define UHWtype USItype
#define DWtype DItype
#define UDWtype UDItype
#define __NW(a,b) __ ## a ## si ## b
#define __NDW(a,b) __ ## a ## di ## b
#elif MIN_UNITS_PER_WORD > 1
#define W_TYPE_SIZE (2 * BITS_PER_UNIT)
#define Wtype HItype
#define UWtype UHItype
#define HWtype HItype
#define UHWtype UHItype
#define DWtype SItype
#define UDWtype USItype
#define __NW(a,b) __ ## a ## hi ## b
#define __NDW(a,b) __ ## a ## si ## b
#else
#define W_TYPE_SIZE BITS_PER_UNIT
#define Wtype QItype
#define UWtype UQItype
#define HWtype QItype
#define UHWtype UQItype
#define DWtype HItype
#define UDWtype UHItype
#define __NW(a,b) __ ## a ## qi ## b
#define __NDW(a,b) __ ## a ## hi ## b
#endif
#define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
#define Wtype_MIN (- Wtype_MAX - 1)
#define __muldi3 __NDW(mul,3)
#define __divdi3 __NDW(div,3)
#define __udivdi3 __NDW(udiv,3)
#define __moddi3 __NDW(mod,3)
#define __umoddi3 __NDW(umod,3)
#define __negdi2 __NDW(neg,2)
#define __lshrdi3 __NDW(lshr,3)
#define __ashldi3 __NDW(ashl,3)
#define __ashrdi3 __NDW(ashr,3)
#define __ffsdi2 __NDW(ffs,2)
#define __cmpdi2 __NDW(cmp,2)
#define __ucmpdi2 __NDW(ucmp,2)
#define __udivmoddi4 __NDW(udivmod,4)
#define __fixunstfDI __NDW(fixunstf,)
#define __fixtfdi __NDW(fixtf,)
#define __fixunsxfDI __NDW(fixunsxf,)
#define __fixxfdi __NDW(fixxf,)
#define __fixunsdfDI __NDW(fixunsdf,)
#define __fixdfdi __NDW(fixdf,)
#define __fixunssfDI __NDW(fixunssf,)
#define __fixsfdi __NDW(fixsf,)
#define __floatdixf __NDW(float,xf)
#define __floatditf __NDW(float,tf)
#define __floatdidf __NDW(float,df)
#define __floatdisf __NDW(float,sf)
#define __fixunsxfSI __NW(fixunsxf,)
#define __fixunstfSI __NW(fixunstf,)
#define __fixunsdfSI __NW(fixunsdf,)
#define __fixunssfSI __NW(fixunssf,)
extern DWtype __muldi3 (DWtype, DWtype);
extern DWtype __divdi3 (DWtype, DWtype);
extern UDWtype __udivdi3 (UDWtype, UDWtype);
extern UDWtype __umoddi3 (UDWtype, UDWtype);
extern DWtype __moddi3 (DWtype, DWtype);
/* __udivmoddi4 is static inline when building other libgcc2 portions. */
#if (!defined (L_udivdi3) && !defined (L_divdi3) && \
!defined (L_umoddi3) && !defined (L_moddi3))
extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *);
#endif
/* __negdi2 is static inline when building other libgcc2 portions. */
#if !defined(L_divdi3) && !defined(L_moddi3)
extern DWtype __negdi2 (DWtype);
#endif
extern DWtype __lshrdi3 (DWtype, word_type);
extern DWtype __ashldi3 (DWtype, word_type);
extern DWtype __ashrdi3 (DWtype, word_type);
extern DWtype __ffsdi2 (DWtype);
/* __udiv_w_sdiv is static inline when building other libgcc2 portions. */
#if (!defined(L_udivdi3) && !defined(L_divdi3) && \
!defined(L_umoddi3) && !defined(L_moddi3))
extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype);
#endif
extern word_type __cmpdi2 (DWtype, DWtype);
extern word_type __ucmpdi2 (DWtype, DWtype);
extern Wtype __absvsi2 (Wtype);
extern DWtype __absvdi2 (DWtype);
extern Wtype __addvsi3 (Wtype, Wtype);
extern DWtype __addvdi3 (DWtype, DWtype);
extern Wtype __subvsi3 (Wtype, Wtype);
extern DWtype __subvdi3 (DWtype, DWtype);
extern Wtype __mulvsi3 (Wtype, Wtype);
extern DWtype __mulvdi3 (DWtype, DWtype);
extern Wtype __negvsi2 (Wtype);
extern DWtype __negvdi2 (DWtype);
#if BITS_PER_UNIT == 8
extern DWtype __fixdfdi (DFtype);
extern DWtype __fixsfdi (SFtype);
extern DFtype __floatdidf (DWtype);
extern SFtype __floatdisf (DWtype);
extern UWtype __fixunsdfSI (DFtype);
extern UWtype __fixunssfSI (SFtype);
extern DWtype __fixunsdfDI (DFtype);
extern DWtype __fixunssfDI (SFtype);
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
extern DWtype __fixxfdi (XFtype);
extern DWtype __fixunsxfDI (XFtype);
extern XFtype __floatdixf (DWtype);
extern UWtype __fixunsxfSI (XFtype);
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
extern DWtype __fixunstfDI (TFtype);
extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype);
#endif
#endif /* BITS_PER_UNIT == 8 */
/* DWstructs are pairs of Wtype values in the order determined by
LIBGCC2_WORDS_BIG_ENDIAN. */
#if LIBGCC2_WORDS_BIG_ENDIAN
struct DWstruct {Wtype high, low;};
#else
struct DWstruct {Wtype low, high;};
#endif
/* We need this union to unpack/pack DImode values, since we don't have
any arithmetic yet. Incoming DImode parameters are stored into the
`ll' field, and the unpacked result is read from the struct `s'. */
typedef union
{
struct DWstruct s;
DWtype ll;
} DWunion;
#include "longlong.h"
#endif /* ! GCC_LIBGCC2_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,230 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <freeldr.h>
#include <arch.h>
#include <miscboot.h>
#include <rtl.h>
#include <fs.h>
#include <ui.h>
#include <inifile.h>
#include <disk.h>
#include <drivemap.h>
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
{
PFILE FilePointer;
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
UCHAR FileName[260];
U32 BytesRead;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
BootPartition = atoi(SettingValue);
}
if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, 260))
{
UiMessageBox("Boot sector file not specified for selected OS!");
return;
}
if (!FsOpenVolume(BootDrive, BootPartition))
{
UiMessageBox("Failed to open boot drive.");
return;
}
FilePointer = FsOpenFile(FileName);
if (FilePointer == NULL)
{
strcat(FileName, " not found.");
UiMessageBox(FileName);
return;
}
// Read boot sector
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
PARTITION_TABLE_ENTRY PartitionTableEntry;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
// Read the boot drive
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
// Read the boot partition
if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
UiMessageBox("Boot partition not specified for selected OS!");
return;
}
BootPartition = atoi(SettingValue);
// Get the partition table entry
if (!DiskGetPartitionEntry(BootDrive, BootPartition, &PartitionTableEntry))
{
return;
}
// Now try to read the partition boot sector
// If this fails then abort
if (!DiskReadLogicalSectors(BootDrive, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
U32 SectionId;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
// Try to open the operating system section in the .ini file
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
UiMessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
UiMessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
// Now try to read the boot sector (or mbr)
// If this fails then abort
if (!DiskReadLogicalSectors(BootDrive, 0, 1, (PVOID)0x7C00))
{
return;
}
// Check for validity
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return;
}
UiUnInitialize("Booting...");
// Don't stop the floppy drive motor when we
// are just booting a bootsector, or drive, or partition.
// If we were to stop the floppy motor then
// the BIOS wouldn't be informed and if the
// next read is to a floppy then the BIOS will
// still think the motor is on and this will
// result in a read error.
//DiskStopFloppyMotor();
//DisableA20();
ChainLoadBiosBootSectorCode();
}

View File

@@ -1,70 +0,0 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __MEM_H
#define __MEM_H
#ifdef __i386__
#define MM_PAGE_SIZE 4096
#endif // defined __i386__
typedef struct
{
U32 PageAllocated; // Zero = free, non-zero = allocated
U32 PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain)
} PACKED PAGE_LOOKUP_TABLE_ITEM, *PPAGE_LOOKUP_TABLE_ITEM;
//
// Define this to 1 if you want the entire contents
// of the memory allocation bitmap displayed
// when a chunk is allocated or freed
//
#define DUMP_MEM_MAP_ON_VERIFY 0
extern PVOID PageLookupTableAddress;
extern U32 TotalPagesInLookupTable;
extern U32 FreePagesInLookupTable;
extern U32 LastFreePageHint;
#ifdef DEBUG
PUCHAR MmGetSystemMemoryMapTypeString(U32 Type);
#endif
U32 MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address
PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the last address of memory from the memory map
U32 MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions
PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory)
VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory
VOID MmInitPageLookupTable(PVOID PageLookupTable, U32 TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Inits the page lookup table according to the memory types in the memory map
VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount, U32 PageAllocated); // Marks the specified pages as allocated or free in the lookup table
VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount); // Allocates the specified pages in the lookup table
U32 MmCountFreePagesInLookupTable(PVOID PageLookupTable, U32 TotalPageCount); // Returns the number of free pages in the lookup table
U32 MmFindAvailablePagesFromEnd(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded); // Returns the page number of the first available page range from the end of memory
U32 MmFindAvailablePagesBeforePage(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded, U32 LastPage); // Returns the page number of the first available page range before the specified page
VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32* MapCount); // Removes entries in the memory map that describe memory above 4G
VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, U32 TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory
BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, U32 TotalPageCount, PVOID PageAddress, U32 PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE
#endif // defined __MEM_H

Some files were not shown because too many files have changed in this diff Show More