Compare commits

...

3480 Commits

Author SHA1 Message Date
nj
3a5a7572a9 Updated to version 0.1.5
svn path=/branches/ros-branch-0_1_5/; revision=6688
2003-11-18 19:19:47 +00:00
Martin Fuchs
20c7f87c94 take over main branch patch "make windres work again" into 0.1.5 branch
svn path=/branches/ros-branch-0_1_5/; revision=6584
2003-11-08 16:50:55 +00:00
Vizzini
ea55b7bf72 merged a missing macro from head
svn path=/branches/ros-branch-0_1_5/; revision=6572
2003-11-08 05:52:45 +00:00
Eric Kohl
4eb59b536b Disabled buggy capability detection code.
svn path=/branches/ros-branch-0_1_5/; revision=6557
2003-11-07 13:00:39 +00:00
Eric Kohl
19c2f9e135 Issue SPECIFY command upon initialization.
svn path=/branches/ros-branch-0_1_5/; revision=6538
2003-11-05 23:54:26 +00:00
The ReactOS Team
37428df5ef This commit was manufactured by cvs2svn to create branch
'ros-branch-0_1_5'.

svn path=/branches/ros-branch-0_1_5/; revision=6506
2003-11-02 03:09:06 +00:00
Eric Kohl
08c981ba53 Do not hold the PiThreadListLock spinlock while calling KeDispatchObjectWait() because the latter will acquire the spinlock.
This fixes bug #31.

svn path=/trunk/; revision=6505
2003-11-02 03:09:06 +00:00
Eric Kohl
fc75de898d Added 'done' messages.
svn path=/trunk/; revision=6504
2003-11-02 01:30:16 +00:00
James Tabor
e11643fd66 Added name
svn path=/trunk/; revision=6503
2003-11-02 01:27:39 +00:00
Eric Kohl
df0af98c1b Reimplemented dispatcher database lock and synchronization primitives.
This fixes bug #26.

svn path=/trunk/; revision=6502
2003-11-02 01:16:21 +00:00
Martin Fuchs
de4f0fd8ab full-docu
svn path=/trunk/; revision=6501
2003-11-02 00:25:54 +00:00
Martin Fuchs
624b756507 work around for make GPF bug
svn path=/trunk/; revision=6500
2003-11-02 00:18:01 +00:00
Martin Fuchs
05175c5ffa insert docu generation date
svn path=/trunk/; revision=6499
2003-11-01 23:32:21 +00:00
Martin Fuchs
d1cbf8d6a1 terminate sed command
svn path=/trunk/; revision=6498
2003-11-01 23:27:38 +00:00
Martin Fuchs
1a4db60836 added updatefooter script
svn path=/trunk/; revision=6497
2003-11-01 23:26:44 +00:00
Vizzini
24f99a1f1c fixed the 8-ping limit
svn path=/trunk/; revision=6496
2003-11-01 23:24:00 +00:00
Martin Fuchs
fa46e0b6c4 add footer template file
svn path=/trunk/; revision=6495
2003-11-01 23:18:27 +00:00
Martin Fuchs
3b223f7e1b extend doxygen documentation
svn path=/trunk/; revision=6494
2003-11-01 23:17:59 +00:00
Martin Fuchs
ec73f42181 added doxygen targets to Makefile
svn path=/trunk/; revision=6493
2003-11-01 17:04:20 +00:00
Eric Kohl
06a85f7e81 Implemented ScsiClassAsynchronousCompletion() and ScsiClassReleaseQueue().
svn path=/trunk/; revision=6492
2003-11-01 16:33:39 +00:00
Martin Fuchs
9ecaadc7e6 activate Doxygen Flag JAVADOC_AUTOBRIEF
svn path=/trunk/; revision=6491
2003-11-01 13:49:02 +00:00
Filip Navara
8f0c69a7d6 - Added French and German keyboard DLLs to makefile, registry and CD-ROM layout script.
svn path=/trunk/; revision=6490
2003-11-01 13:28:54 +00:00
Hartmut Birr
d8042fe330 - Check if a requested fixed address range is valid for the address space.
- This fixes bug #34.

svn path=/trunk/; revision=6489
2003-11-01 12:59:38 +00:00
Martin Fuchs
06f5aba298 added Doxygen configuration file
svn path=/trunk/; revision=6488
2003-11-01 12:24:10 +00:00
Hartmut Birr
49a370ce14 - Check for the current irql, if there is a call to IoStartNextPacket.
If it is  necessary, raise the irql to DISPATCH_LEVEL.

svn path=/trunk/; revision=6487
2003-11-01 10:42:32 +00:00
Filip Navara
7e110a9faa - Small bugfixes.
svn path=/trunk/; revision=6486
2003-11-01 04:06:59 +00:00
Art Yerkes
ba98b29885 Added p_dup_handle test.
svn path=/trunk/; revision=6485
2003-10-31 21:41:52 +00:00
Art Yerkes
0f8d274449 This test case test ROS' ability to duplicate a process handle, give the
handle to the child process, then have the child process give back its
own handle.  This is used by cygwin during fork and vfork.

svn path=/trunk/; revision=6484
2003-10-31 21:41:32 +00:00
Thomas Bluemel
cef6a8899c this temporarily fixes the crash displaying ansi messageboxes (Royce)
svn path=/trunk/; revision=6483
2003-10-31 20:49:45 +00:00
Art Yerkes
e15344ddce Added map_dup_inherit test case (currently, failing).
svn path=/trunk/; revision=6482
2003-10-31 20:27:16 +00:00
Art Yerkes
1a752ef4ba This is a simplified case of something cygwin does:
1) Create a shared memory are using CreateFileMapping with SEC_RESERVE set.
2) Make the handle inheritable.
3) Call CreateProcess with inherit = TRUE
4) Map the region using MapViewOfFile.
5) Commit pages using VirtualAlloc.

See: MSDN's documentation on CreateFileMapping and VirtualAlloc.

When the test runs correctly, "%d: starting" is printed twice, with no other
output.

svn path=/trunk/; revision=6481
2003-10-31 20:26:14 +00:00
Filip Navara
15da259ba7 - Fixed the last patch by Mark Tempel to really work correctly.
svn path=/trunk/; revision=6480
2003-10-31 18:25:56 +00:00
Filip Navara
f18cbd53ba - Added stack trace reporting in exception handler.
svn path=/trunk/; revision=6479
2003-10-31 16:27:01 +00:00
Filip Navara
65a44fd9e2 - Fixed passing of integer named controls in dialogs. Previously an integer was passed directly to CreateWindowEx, but that could not work, because it treats it as a string. After reading Microsoft documentation the correct way is to pass a string in form "#num".
- Fixed getting of integer names in STATIC control. Is this the right place?
- Fixed icon support in STATIC control.

svn path=/trunk/; revision=6478
2003-10-31 16:25:08 +00:00
Eric Kohl
c3b4b58a78 Use synchronous IO for screen and keyboard and get rid of the input event object.
svn path=/trunk/; revision=6477
2003-10-31 11:09:38 +00:00
Gunnar Dalsnes
888ca1574d improved IoMapTransfer (hopefylly)
svn path=/trunk/; revision=6476
2003-10-31 01:08:00 +00:00
Gunnar Dalsnes
b872ea2cad -impl. KeRemoveEntryDeviceQueue
-added irql asserts
-misc. small fixes and cleanups

svn path=/trunk/; revision=6475
2003-10-31 00:14:09 +00:00
Mark Tempel
286ec91295 Changing the DbgPrint outputs to be a bit more usefull.
svn path=/trunk/; revision=6474
2003-10-30 22:06:42 +00:00
Mark Tempel
98ec124b3d Update to add in a first attempt to send the WM_MOUSEACTIVATE message to windows when the user clicks the mouse over them.
TODO: Fix the PostMessage for WM_MOUSEACTIVATE to a SendMessage and check the return to see what to do with the origional mouse message.

svn path=/trunk/; revision=6473
2003-10-30 22:03:00 +00:00
Mark Tempel
555931d0f4 Update to implement WindowFromPoint by delegating to NtUserWindowFromPoint:
svn path=/trunk/; revision=6472
2003-10-30 21:58:42 +00:00
Mark Tempel
c8f5c0a9bd Update to implement NtUserWindowFromPoint:
TODO-- Fix the check for static windows, and validate that this version works the same way as WindowFromPoint in Windows...

svn path=/trunk/; revision=6471
2003-10-30 21:57:21 +00:00
Mark Tempel
2095d78af2 Update to specify the parameters to NtUserWindowFromPoint.
svn path=/trunk/; revision=6470
2003-10-30 21:54:35 +00:00
Eric Kohl
bd908afdf1 Issue a work item only if an object will be deleted.
Fixes bug #14.

svn path=/trunk/; revision=6469
2003-10-30 21:34:54 +00:00
Gé van Geldorp
d6e366fb65 Fix problem introduced when fixing bitblt'ing to monochrome bitmaps
svn path=/trunk/; revision=6468
2003-10-30 18:27:33 +00:00
Filip Navara
e11fa90a59 - Fixed loading of symbols when compiled with DBG=1 (again).
svn path=/trunk/; revision=6467
2003-10-30 18:16:25 +00:00
Art Yerkes
f382315b71 Set the lpvReserved parameter of DllMain according to whether the DLL was
loaded using LoadLibrary or at start time by the system loader.  DLLs use
this mechanism to determine how they were loaded.

svn path=/trunk/; revision=6466
2003-10-30 15:52:29 +00:00
Gunnar Dalsnes
39dca294c5 fixed a call to IoAllocateAdapterChannel
svn path=/trunk/; revision=6465
2003-10-30 13:34:47 +00:00
Gunnar Dalsnes
3186456e36 some fixes
svn path=/trunk/; revision=6464
2003-10-30 13:33:43 +00:00
Gunnar Dalsnes
454e9ef133 added some sugar
svn path=/trunk/; revision=6463
2003-10-30 13:29:38 +00:00
Gunnar Dalsnes
2b75113a2b added a comment
svn path=/trunk/; revision=6462
2003-10-30 13:25:38 +00:00
Gé van Geldorp
c3fc013ce4 Changes for W32API
svn path=/trunk/; revision=6461
2003-10-30 08:56:38 +00:00
Gé van Geldorp
51140532fa Create monochrome palette when selecting 1bpp bitmap into DC
svn path=/trunk/; revision=6460
2003-10-29 22:46:56 +00:00
Gé van Geldorp
6a8700f4b2 Fix DIB_1BPP_PutPixel
svn path=/trunk/; revision=6459
2003-10-29 22:45:45 +00:00
Martin Fuchs
f2be62ff1a add some calls to SHRestricted to replace awfull Registry reading
svn path=/trunk/; revision=6458
2003-10-29 21:37:14 +00:00
Filip Navara
4a4b64e0e7 - Fixed few more bugs reported by Wine user32 window test. 4/373 tests fails now. The rest is caused propably by incomplete NtUserDestroyWindow.
- Fixed locking of DCs in NtGdiBitBlt when hDCSrc == hDCDest.

svn path=/trunk/; revision=6457
2003-10-29 16:25:00 +00:00
Filip Navara
ac96511aae - Fixed more bugs reported by Wine user32 window test. (7/373 tests fails now)
svn path=/trunk/; revision=6456
2003-10-29 10:04:55 +00:00
Filip Navara
3247a4d444 - Fixed few more bugs reported by Wine user32 window test. (68/373 tests fails now)
svn path=/trunk/; revision=6455
2003-10-29 08:49:56 +00:00
Gé van Geldorp
ce50eff0b5 Allow environment variable ROS_INSTALL to set installation dir
svn path=/trunk/; revision=6454
2003-10-29 08:40:38 +00:00
Gé van Geldorp
fd5226dd32 Changes for W32API
svn path=/trunk/; revision=6453
2003-10-29 08:38:55 +00:00
Filip Navara
4926605241 - Fixed loading of symbols when compiled with DBG=1.
svn path=/trunk/; revision=6452
2003-10-28 22:48:37 +00:00
Filip Navara
1f31cc412e - Fixed more bugs reported by Wine user32 window test. (72/373 tests fail now)
svn path=/trunk/; revision=6451
2003-10-28 22:46:30 +00:00
Filip Navara
e95a291ceb - Fixed some bugs reported by Wine user32 window test. Still many are left.
svn path=/trunk/; revision=6450
2003-10-28 20:24:09 +00:00
Hartmut Birr
f9e7598cc7 - Fixed the length calculation of a unicode string in vfatGetFCBForFile.
svn path=/trunk/; revision=6449
2003-10-28 20:21:21 +00:00
Gé van Geldorp
40be01c894 Check for double class registration and implement Get/SetClassLong with
Offset >= 0

svn path=/trunk/; revision=6448
2003-10-28 20:19:45 +00:00
Gé van Geldorp
82fc43d926 More DirectDraw groundwork by Peter Bajusz
svn path=/trunk/; revision=6447
2003-10-28 19:30:08 +00:00
Filip Navara
e0d3016a0f - Added check for Atom == 0 in RtlQueryAtomInAtomTable.
- Set error code in one error case of GetDiskFreeSpaceW.
- Added call to DC_UnlockDc in one error case of NtGdiBitBlt.

svn path=/trunk/; revision=6446
2003-10-28 17:43:42 +00:00
Filip Navara
3fa0b64ad8 - Removed debug messages from GetWindowLong/SetWindowLong.
- Modified NtUserSetShellWindowEx to work. It passed Martin's tests, so I take it's correct.

svn path=/trunk/; revision=6445
2003-10-28 13:43:56 +00:00
Filip Navara
2609d3aece - Bugfixes of SetWindowPos. Now the window relinking really works for every window and not only for HWND_TOP. The Explorer Start Menu works now and desktop is painted. The dark side is that the desktop ShellView doesn't show anymore.
svn path=/trunk/; revision=6444
2003-10-28 12:21:36 +00:00
Filip Navara
92b58c12e3 - Fixed bug #25.
svn path=/trunk/; revision=6443
2003-10-28 09:49:04 +00:00
KJK::Hyperion
db7b08f3f4 Use and initialize Common Controls v6, or visual styles won't work
svn path=/trunk/; revision=6442
2003-10-27 23:20:57 +00:00
KJK::Hyperion
0d27ccca5d Skeleton for a Windows XP theme dumper
(note: doesn't compile on g++, at the moment - a #define hell I want to avoid entering, if possible)

svn path=/trunk/; revision=6441
2003-10-27 03:03:22 +00:00
KJK::Hyperion
ddf4e24c7d French keyboard layout by Jean-Michel Gay
svn path=/trunk/; revision=6440
2003-10-27 00:17:32 +00:00
Filip Navara
f2011619fc - Small bugfixes.
svn path=/trunk/; revision=6439
2003-10-26 18:08:51 +00:00
Eric Kohl
e9721e7a3e Bail out of RtlQueryRegistryValues if RTL_QUERY_REGISTRY_REQUIRED specified and value not found.
Patch by Ge van Geldorp.

svn path=/trunk/; revision=6438
2003-10-26 12:47:12 +00:00
Filip Navara
fc55092ea5 - Fixed placement of window caption buttons.
- Removed DefWindowProc handler for WM_NCLBUTTONUP.
- Rewritten DefWindowProc handler for WM_NCHITTEST.
- Fixed two defines in ReactOS headers.
- nonclient.c is compiled with ReactOS headers by default.

svn path=/trunk/; revision=6437
2003-10-26 11:08:32 +00:00
Filip Navara
50382abaf9 - Better implementation of window non-client area functions.
- Fixed GetWindowLong and SetWindowLong.
- Other small bug fixes.

svn path=/trunk/; revision=6436
2003-10-25 22:57:34 +00:00
Gé van Geldorp
95f63185a4 Added DirectDraw stubs by Peter Bajusz
svn path=/trunk/; revision=6435
2003-10-25 20:34:34 +00:00
Steven Edwards
475e195ad3 Add support for es->style and ES_MULTILINE back in
svn path=/trunk/; revision=6434
2003-10-25 18:51:26 +00:00
Gé van Geldorp
256162a37c Add DirectDraw driver calls to DRIVER_FUNCTIONS and the initializer to
DRIVER_BuildDDIFunctions. Patch by Peter Bajusz.

svn path=/trunk/; revision=6433
2003-10-25 18:45:13 +00:00
Steven Edwards
2acf4116c8 Fix building with the current stuff
svn path=/trunk/; revision=6432
2003-10-25 16:09:22 +00:00
Robert Dickenson
668039fd8a Commit of some work done last year...
svn path=/trunk/; revision=6431
2003-10-25 13:21:41 +00:00
Gé van Geldorp
afb4b42206 Resolution and screen depth change via registry settings, works for at
least the VMware driver

svn path=/trunk/; revision=6430
2003-10-25 10:59:19 +00:00
KJK::Hyperion
cf8011aa19 *** empty log message ***
svn path=/trunk/; revision=6429
2003-10-25 01:19:09 +00:00
KJK::Hyperion
4b6fa45980 Headers for theme support
svn path=/trunk/; revision=6428
2003-10-25 00:48:07 +00:00
KJK::Hyperion
d5640e8aad Fixes around GCC's stupidity
svn path=/trunk/; revision=6427
2003-10-25 00:46:01 +00:00
Gé van Geldorp
458bf0e03e Implement VideoPortGetRegistryParameters
svn path=/trunk/; revision=6426
2003-10-24 21:39:59 +00:00
Gé van Geldorp
bdb5b824b5 Bail out of RtlQueryRegistryValues if RTL_QUERY_REGISTRY_REQUIRED specified
and value not found

svn path=/trunk/; revision=6425
2003-10-24 21:38:33 +00:00
KJK::Hyperion
cda5a1a107 Minimal UxTheme skeleton (includes Borland C++ Builder project for my own sanity)
svn path=/trunk/; revision=6424
2003-10-24 21:29:48 +00:00
KJK::Hyperion
37296302c4 Fixed long-standing, annoying warnings in MSVCRT and CRTDLL
svn path=/trunk/; revision=6423
2003-10-24 21:28:00 +00:00
Gé van Geldorp
253dc51ca0 Complain a little bit louder if drivers can't be loaded
svn path=/trunk/; revision=6422
2003-10-24 08:22:29 +00:00
Vizzini
15fc6ff3af more.c:
Patch from Timothy Schepens <tischepe@fastmail.fm>:
This is a patch to let more use the window size instead of the buffer size.

sort.c: fixed qsort warning

svn path=/trunk/; revision=6421
2003-10-23 21:36:43 +00:00
Hartmut Birr
6a031188f2 - Initialize the used page count for the non paged pool in MmInitializeBalancer.
svn path=/trunk/; revision=6420
2003-10-23 20:28:08 +00:00
Thomas Bluemel
7b4d4ff86a clip the cursor while moving/sizing windows
svn path=/trunk/; revision=6419
2003-10-23 19:39:00 +00:00
Hartmut Birr
85a1b9d2bd - Fixed a crash which occurs if the maxmem option
reduces the memory size from the bios memory map.

svn path=/trunk/; revision=6418
2003-10-23 19:36:33 +00:00
Hartmut Birr
360e3be08a - Fixed the length calculation of some unicode strings.
svn path=/trunk/; revision=6417
2003-10-23 19:16:33 +00:00
Eric Kohl
9bb05f0dc5 Release the controller object if media detection fails.
svn path=/trunk/; revision=6416
2003-10-23 18:48:13 +00:00
Hartmut Birr
56605f5a0b - Changed the algorithm which makes the allocation 8-byte aligned.
- Fixed a bug which reserves to much memory (16MB) at startup.
- Fixed TAG_STATISTICS_TRACKING.

svn path=/trunk/; revision=6415
2003-10-23 18:43:36 +00:00
Gé van Geldorp
792f0b6860 Mark system color brushes as global so they won't be deleted when the
process which created them terminates

svn path=/trunk/; revision=6414
2003-10-23 15:34:44 +00:00
Hartmut Birr
2bb8751f3e - Added FULL_MAP support.
svn path=/trunk/; revision=6413
2003-10-23 13:16:17 +00:00
Gé van Geldorp
083311294c Work on activation/focus
svn path=/trunk/; revision=6412
2003-10-23 09:07:54 +00:00
Vizzini
3c640340fe Fixes to get slave DMA working again, as well as more architectural changes
that bring us closer to the Windows 2000 DMA model.

adapter.c: significantly re-worked and heavily commented
hal.h: more additions to ADAPTER_OBJECT; more pending
dma.c: added initialization of ADAPTER_OBJECT
ndis/io.c: minor DMA changes and addition of fixmes

svn path=/trunk/; revision=6411
2003-10-23 09:03:51 +00:00
Gé van Geldorp
47be3186ac Fix double output of lines > 80 chars in text mode
svn path=/trunk/; revision=6410
2003-10-23 06:53:20 +00:00
Gé van Geldorp
3cfa31a43d IntAcquireWinLockShared() was calling ExAcquireResourceExclusiveLite() and
IntAcquireWinLockExclusive() was calling ExAcquireResourceSharedLite(),
switch this.

svn path=/trunk/; revision=6409
2003-10-22 21:11:34 +00:00
Gé van Geldorp
7fc5f298e9 Release window lock in error conditions
svn path=/trunk/; revision=6408
2003-10-22 21:10:24 +00:00
Steven Edwards
67624ecdb3 Fix building the stub rpcrt4.dll to make the WINE dlls happy.
svn path=/trunk/; revision=6407
2003-10-22 20:14:25 +00:00
Steven Edwards
e4075679a4 GetDriveType should return DRIVE_NO_ROOT_DIR if there is no drive.
svn path=/trunk/; revision=6406
2003-10-22 20:06:32 +00:00
Thomas Bluemel
0967cc00ba fixed handling callback timers, thanks to GvG
svn path=/trunk/; revision=6405
2003-10-22 19:02:13 +00:00
Hartmut Birr
5be42e1107 - Added a check for a locked page in MmPageOutPhysicalAddress.
svn path=/trunk/; revision=6404
2003-10-22 18:26:34 +00:00
Hartmut Birr
e80fcc0855 - Added a missing check for a valid swap entry in MmPageOutSectionView.
svn path=/trunk/; revision=6403
2003-10-22 18:20:38 +00:00
Gé van Geldorp
7cb9ea96db Handle non-source ROPs and pattern ROPs
svn path=/trunk/; revision=6402
2003-10-22 17:44:01 +00:00
Filip Navara
4909784b30 - Removed commented-out code from FillRect to prevent anyone from uncommenting it, because it's wrong!
- Fixed WindowClass->hbrBackground == (COLOR_* + 1) bug I introduced, but now it's working the right way.
- Copied system coloe code from user32 to win32k, where it was messy!

svn path=/trunk/; revision=6401
2003-10-22 14:02:54 +00:00
Gé van Geldorp
b597738dd3 Fix window destruction on thread termination
svn path=/trunk/; revision=6400
2003-10-22 13:34:25 +00:00
Eric Kohl
4baf0a9002 Implemented ObQueryObjectAuditingByHandle().
svn path=/trunk/; revision=6399
2003-10-21 21:46:39 +00:00
Martin Fuchs
b9d355dbb5 replace old makefile by new MinGW makefile to fix resource compilation problems using cross compilers
svn path=/trunk/; revision=6398
2003-10-21 21:38:09 +00:00
Steven Edwards
47ae788845 Remove comment about freeldr depending on djgpp only.
svn path=/trunk/; revision=6397
2003-10-21 21:23:58 +00:00
Martin Fuchs
24632cd448 use WS_EX_TOOLWINDOW for floating menus
svn path=/trunk/; revision=6396
2003-10-21 20:23:53 +00:00
Thomas Bluemel
b8054aafb3 fixed small bug in WinPosSetActiveWindow()
svn path=/trunk/; revision=6395
2003-10-21 19:40:05 +00:00
Eric Kohl
79a459f094 Implemented handle flags 'Inherit' and 'ProtectFromClose'.
svn path=/trunk/; revision=6394
2003-10-21 15:50:51 +00:00
Vizzini
70bd83b2cb fixed line endings
svn path=/trunk/; revision=6393
2003-10-21 01:53:03 +00:00
Mark Tempel
97ebaeae3c Update to edit to fix:
-drawing lines while maintaining clip regions
-shutdown now works better. GlobalUnlock has the correct return codes.

svn path=/trunk/; revision=6392
2003-10-21 01:35:05 +00:00
Martin Fuchs
ecdcd538eb add missing icon
svn path=/trunk/; revision=6391
2003-10-20 19:33:55 +00:00
Eric Kohl
bf57d89032 Make paged and non-paged memory pools 8-byte aligned.
svn path=/trunk/; revision=6390
2003-10-20 18:43:11 +00:00
Gé van Geldorp
2515e0e291 Implement GUI consoles
svn path=/trunk/; revision=6389
2003-10-20 18:02:04 +00:00
Gé van Geldorp
f0f8de0966 Set tmMaxCharWidth
svn path=/trunk/; revision=6388
2003-10-20 17:57:42 +00:00
Gé van Geldorp
44c92af3c6 Partial fix for handling GDIOBJs between different processes
svn path=/trunk/; revision=6387
2003-10-20 17:57:05 +00:00
Gé van Geldorp
b8b3cf100c Add handling of SUBDIRS macro
svn path=/trunk/; revision=6386
2003-10-20 17:54:17 +00:00
Thomas Bluemel
a5ab15b6e3 fixed multiwin crashing win32k when closing the window with the child window
svn path=/trunk/; revision=6385
2003-10-20 14:00:58 +00:00
Robert Dickenson
139847baad Further version syncing...
svn path=/trunk/; revision=6384
2003-10-20 12:48:19 +00:00
Martin Fuchs
c42c8aa58a use DynamicFct for AllowSetForegroundWindow()
svn path=/trunk/; revision=6383
2003-10-20 07:55:52 +00:00
Vizzini
f177ad4810 Changes to support the 3Com 3c90x ndis5 driver and other bugfixes:
- Update registry with new 3com infor and set cards to disable by default
  - removed unnecessary crap from miniport.h
  - switch to using MINIPORT_BLOCK whenever possible for internal NDIS stuff
  - implemented NdisGetBufferPhysicalArraySize
  - fixed three similar bugs with overwriting memory in the config api
  - implemented NdisMQueryAssignedResources
  - fixed NdisMAllocateMapRegisters
  - implemented NdisMStartPhysicalBufferMapping
  - implemented NdisMCompletePhysicalBufferMapping
  - implemented NdisMMapIoSpace
  - implemented NdisMUnmapIoSpace
  - fixed HalAllocateAdapterChannel and IoAllocateAdapterChannel to
    act more like windows
  - fixed up a couple of enums
  - other misc. stuff

svn path=/trunk/; revision=6382
2003-10-20 06:03:29 +00:00
Nedko Arnaudov
39a209d69e Make it link with gcc 3.x
svn path=/trunk/; revision=6381
2003-10-19 22:59:36 +00:00
Filip Navara
d75f4aedc3 Fixed compilation errors in NDIS.
svn path=/trunk/; revision=6380
2003-10-19 21:55:37 +00:00
Filip Navara
dba6345f47 - Fixed GetFullPathNameA and debug message in GetFullPathNameW. The path handling is still wrong in some cases, I am trying to find out why.
- Very basic implementaion of NtUserPaintDesktop.
- Fixed bug in default window WM_ERASEBKGND.
- Fixed bug in default window WM_PAINT.
- Made BeginDeferWindowPos, DeferWindowPos, EndDeferWindowPos pseudo-working by returning values that make sense and calling SetWindowPos.

svn path=/trunk/; revision=6379
2003-10-19 19:51:48 +00:00
Eric Kohl
e3a669e3fa Ignore case of registry key and value names.
svn path=/trunk/; revision=6378
2003-10-19 19:42:20 +00:00
Vizzini
eaf5358cf8 uppercase NLS key to cure booting problems
svn path=/trunk/; revision=6377
2003-10-19 19:22:19 +00:00
Eric Kohl
f9d7f36bfe Initialize section object type after the object manager types have been initalized.
svn path=/trunk/; revision=6376
2003-10-19 17:33:54 +00:00
Hartmut Birr
08664af596 - Fixed the length value in some debug messages.
svn path=/trunk/; revision=6375
2003-10-19 17:10:46 +00:00
Hartmut Birr
91a9d5d368 - Fixed a bug in vfatGetNextDirEntry to get the first entry
from a directory, usually the '.' for a sub directory.

svn path=/trunk/; revision=6374
2003-10-19 17:07:58 +00:00
Filip Navara
b73b1eaf89 - Reverted to previous version of RtlGetFullPathName_U
- Fixed GetFullPathNameA

svn path=/trunk/; revision=6373
2003-10-19 16:17:50 +00:00
Martin Fuchs
0802d5a7f3 Docu-Update
svn path=/trunk/; revision=6372
2003-10-19 13:15:37 +00:00
Martin Fuchs
a887faa8e0 Implemented floating start menus
svn path=/trunk/; revision=6371
2003-10-19 13:09:45 +00:00
Robert Dickenson
d7f0fdf355 Further version syncing...
svn path=/trunk/; revision=6370
2003-10-19 11:13:54 +00:00
Robert Dickenson
308b455c7f Single line typo fixup consistent with same change in headers.
svn path=/trunk/; revision=6369
2003-10-19 10:43:10 +00:00
Robert Dickenson
81ef57a149 Header additions and modifications to bring our header versions closer to the latest mingw releases. Basically just reducing the diffs between the two versions.
Nothing should change with the resulting binaries (although various #pragma pack directives may have an effect )^:
Clean build tested without problem. Hopefully haven't broken anything with the runtime, ROS still boots ok for me under BOCHS.
Lots of laborious work all to be chucked out once we can finally switch over to the mingw headers full time.
Sorry if this causes anybody�s uncommitted work to be in conflict.
Heaps more coming to an directory near you soon (if nobody objects of course)
I noticed somewhere something like an 'include next' directive, however I can't find it now. In order to save me the research can anybody enlighten me as to its purpose. What I am hoping for is that it tells the pre-proc to go to the next header of the same name in the 'includes' search path. Such a directive would certainly be useful right now!
Regarding the mention on ros-kernel about wine-msvcrt v's ros-msvcrt I was hoping that the mingwacr project would addrs this however it seems to have lost all its steam. Anybody got an update concerning the project?
Somewhat off topic: finally the rains have come -> http://mirror.bom.gov.au/products/IDR032.loop.shtml#image

svn path=/trunk/; revision=6368
2003-10-19 10:36:41 +00:00
Eric Kohl
ed810e5f93 Add missing SOFTWARE key.
svn path=/trunk/; revision=6367
2003-10-19 09:35:07 +00:00
Thomas Bluemel
ce73b32829 Only load the US keyboard layout if no other was loaded successfully
svn path=/trunk/; revision=6366
2003-10-18 21:48:18 +00:00
Vizzini
0eb7b64bdc Forgot part of Art's patch
svn path=/trunk/; revision=6365
2003-10-18 21:45:00 +00:00
Martin Fuchs
19ce427c77 * Load default keyboard layout (GER or US) if no other load was successfull
svn path=/trunk/; revision=6364
2003-10-18 21:29:26 +00:00
Eric Kohl
36324e0454 Ignore the case of key and value names in the internal registry tree.
svn path=/trunk/; revision=6363
2003-10-18 20:41:14 +00:00
Vizzini
e6bdd2efdb Patch from Art Yerkes:
1. I removed the global keyboard pointer, and instead acquire a new copy of
the pointer for each thread that needs it.  This makes a lock unnecessary,
but is probably less efficient than it could be.

2. Keyboard DLL names are read from the registry in the same way as on win2k.
The (Default) value is taken from HKLM\System\currentcontrolset\nls\locale,
and used to form the key HKLM\System\currentcontrolset\<8-digit-locale>
And get the layout file from the "Layout File" value.  I added the entries
for kbdus in hivesys.inf.  When others make keyboard layouts, they should be
added here.

svn path=/trunk/; revision=6362
2003-10-18 20:41:10 +00:00
Filip Navara
db03a52a68 Updated RtlGetFullPathName_U from new Wine release.
svn path=/trunk/; revision=6361
2003-10-18 20:32:58 +00:00
Martin Fuchs
e8822d364b * add interactive sort functionality to program search dialog
svn path=/trunk/; revision=6360
2003-10-18 20:29:48 +00:00
Thomas Bluemel
87921d1868 fixed a return value
svn path=/trunk/; revision=6359
2003-10-18 19:18:41 +00:00
Thomas Bluemel
cf858e6be6 fixed a few warnings
svn path=/trunk/; revision=6358
2003-10-18 18:49:08 +00:00
Eric Kohl
1de8f5d574 Display 'Drive not ready' error if the user tries to list the directory on an empty drive.
svn path=/trunk/; revision=6357
2003-10-18 17:59:29 +00:00
Filip Navara
ed9a0cb22a - Fixed registry entries for Explorer (once more)
- Added very basic window relinking to WinPosSetWindowPos

svn path=/trunk/; revision=6356
2003-10-18 17:35:44 +00:00
Martin Fuchs
e9c87d778a * caching of searched start menu entries
* launch by double click

svn path=/trunk/; revision=6355
2003-10-18 13:35:40 +00:00
Filip Navara
d8255ef3ba Make DeferWindowPos call SetWindowPos instead of just saying unimplemented.
svn path=/trunk/; revision=6354
2003-10-18 10:35:52 +00:00
Hartmut Birr
02a2e5a3c6 - Moved the initializing of file caching after a possible
expansion of the file in MmCreateDataFileSection.

svn path=/trunk/; revision=6353
2003-10-18 09:35:11 +00:00
Martin Fuchs
b33671f3ab activate find-progra-dialog filter
svn path=/trunk/; revision=6352
2003-10-17 22:56:25 +00:00
Gé van Geldorp
5304188395 Don't set hClipRgn to NULL just before checking it
svn path=/trunk/; revision=6351
2003-10-17 21:35:45 +00:00
Thomas Bluemel
dc71bde604 fixed wrong parameters
svn path=/trunk/; revision=6350
2003-10-17 20:50:59 +00:00
Thomas Bluemel
04b57ad0bd implemented basic drawing of carets
svn path=/trunk/; revision=6349
2003-10-17 20:31:56 +00:00
Martin Fuchs
fb9b3cb9c2 make SetShellwindow() implementation more complete
svn path=/trunk/; revision=6348
2003-10-17 17:38:38 +00:00
Filip Navara
31c01ee91a Fixed paths for shell32.dll.
svn path=/trunk/; revision=6347
2003-10-17 15:35:07 +00:00
Thomas Bluemel
ac2f8c6d97 fixed warning
svn path=/trunk/; revision=6346
2003-10-17 14:18:18 +00:00
Robert Dickenson
c73c9212f8 Reverting previous mods due to even more problems occurring with a clean build.
Sorry for all the noise...

svn path=/trunk/; revision=6345
2003-10-17 12:53:48 +00:00
Robert Dickenson
a0c7411b79 Reverting previous mods due to even more problems occurring with a clean build.
svn path=/trunk/; revision=6344
2003-10-17 11:46:45 +00:00
Robert Dickenson
8a6ba12068 Couple of temporary fixes required, found after doing a clean build.
svn path=/trunk/; revision=6343
2003-10-17 11:15:29 +00:00
Robert Dickenson
4c7cd88113 Minor progress to bring ros-ddk headers closer to the latest mingw-ddk headers. Tested some dependant targets and found no build problems.
svn path=/trunk/; revision=6342
2003-10-17 09:17:59 +00:00
Robert Dickenson
427e1430ca Minor progress to bring ros-ddk headers closer to the latest mingw-ddk headers. Tested dependant targets and found no problems.
svn path=/trunk/; revision=6341
2003-10-17 05:36:39 +00:00
Thomas Bluemel
72ac951c61 initial implementation of carets
svn path=/trunk/; revision=6340
2003-10-16 22:07:37 +00:00
Thomas Bluemel
9ab1a381bc fixed warning
svn path=/trunk/; revision=6339
2003-10-16 18:03:26 +00:00
Filip Navara
db8287ce57 Fixed a small bug in IopInitializeBuiltinDriver.
svn path=/trunk/; revision=6338
2003-10-16 17:59:48 +00:00
Eric Kohl
1e3b13361d - Moved and renamed RtlpCreateRegistryKeyPath() to IopCreateDeviceKeyPath()
- Removed ntoskrnl/include/internal/registry.h

svn path=/trunk/; revision=6337
2003-10-16 14:50:11 +00:00
Eric Kohl
e4e84cbc31 Removed calls to RtlpGetRegistryHandle().
svn path=/trunk/; revision=6336
2003-10-16 12:50:30 +00:00
Eric Kohl
382a403ea1 Removed call to RtlpGetRegistryHandle().
svn path=/trunk/; revision=6335
2003-10-16 12:45:09 +00:00
Robert Dickenson
2e841b972e Trivial mod to remove obsolete comment about bugfix. Thanks Eric for comfirming.
Removed line:
//  while (Section != NULL)  // RobD - this looks like an error, Section variable never changes inside the while loop...

svn path=/trunk/; revision=6334
2003-10-16 08:39:28 +00:00
Vizzini
9ce7e4fa9d simplification of irql manipulation in a couple of places - patch by Mike Nordell
svn path=/trunk/; revision=6333
2003-10-16 03:26:51 +00:00
Vizzini
46fe6c1b84 merged in MDL fix and a makefile mod from the 0.1.4 release branch. This represents the last of the merging from the branch and officially closes it out.
svn path=/trunk/; revision=6332
2003-10-15 22:16:44 +00:00
Eric Kohl
194a827c38 Make RtlpGetRegistryHandle() a local helper function.
svn path=/trunk/; revision=6331
2003-10-15 21:15:45 +00:00
Thomas Bluemel
ba15abe412 unstubbed caret functions in win32k
svn path=/trunk/; revision=6330
2003-10-15 20:48:19 +00:00
Filip Navara
2233f43d06 Fixed loading icons with flag LR_LOADFROMFILE.
svn path=/trunk/; revision=6329
2003-10-15 19:39:08 +00:00
Thomas Bluemel
f09774d1ba fixed NtUserSetSystemTimer()
svn path=/trunk/; revision=6328
2003-10-15 19:28:57 +00:00
Thomas Bluemel
551e479436 fixed missing space
svn path=/trunk/; revision=6327
2003-10-15 18:29:59 +00:00
Thomas Bluemel
259baa738c added a test application for carets (which are currently not implemented)
svn path=/trunk/; revision=6326
2003-10-15 18:28:54 +00:00
Filip Navara
5753152b64 Fixed driver loading order, cleaned up relevant functions, and moved boot driver
initializing to separate function IopInitializeBootDrivers in io/driver.c.

These functions has been renamed:
LdrInitializeBootStartDriver -> IopInitializeBuiltinDriver (moved to io/driver.c)
LdrLoadAutoConfigDrivers -> IopInitializeSystemDrivers

How the driver loading works now:
- The root bus driver is enumerated by IoInit2 and it causes all drivers marked
as boot start to be initialized and attached to respective device tree node.
- Other boot drivers are initialized by IopInitializeBootDrivers (called from
ExpInitializeExecutive).
- After creating system root link (by IoCreateSystemRootLink) the device
tree is travesed by IopInitializePnpServices and all non-boot start drivers
all loaded.
- At last, system start drivers are loaded by IopInitializeSystemDrivers.

svn path=/trunk/; revision=6325
2003-10-15 17:04:39 +00:00
Eric Kohl
c44771a681 Added pointer to a security descriptor to OBJECT_HEADER.
svn path=/trunk/; revision=6324
2003-10-15 16:59:36 +00:00
Thomas Bluemel
5b025dc283 some work on timers
svn path=/trunk/; revision=6323
2003-10-15 13:39:09 +00:00
Eric Kohl
6d37414eab Cleaned up RtlpQuerySecurityDescriptor() and fixed SaclLength.
svn path=/trunk/; revision=6322
2003-10-15 11:02:04 +00:00
Vizzini
1075502a5c Patch by Mike Nordell to fix broken paths
svn path=/trunk/; revision=6321
2003-10-15 03:29:33 +00:00
Vizzini
f9ea16f884 added kbdus.dll to copy-over
svn path=/trunk/; revision=6320
2003-10-15 03:16:27 +00:00
Vizzini
1472d11a1f Patch, as suggested by Mike Nordell, to verify IRQL before calling unsafe fast mutex functions
svn path=/trunk/; revision=6319
2003-10-15 03:09:23 +00:00
Vizzini
e570a920e4 patch by d_layer to fix two unnecessary-rebuild problems
svn path=/trunk/; revision=6318
2003-10-15 02:56:02 +00:00
Eric Kohl
ca72cbfce5 RtlGetFullPathName_U() must use a drive's root directory if a current directory has not been assigned.
This fixes bug #7.

svn path=/trunk/; revision=6317
2003-10-14 19:36:26 +00:00
Filip Navara
98354eb95c Added one more registry entry for Application Data path.
svn path=/trunk/; revision=6316
2003-10-14 19:17:37 +00:00
Filip Navara
ec667f9dab Added check for PsGetWin32Process() == NULL to IntGetWindowObject. It's propably not right and only hiding the real problem, but I need it to get explorer wroking...
svn path=/trunk/; revision=6315
2003-10-14 18:49:10 +00:00
Filip Navara
cbcee55a07 Fixed line endings.
svn path=/trunk/; revision=6314
2003-10-14 18:25:31 +00:00
Filip Navara
e85d3f11f1 Added registry entries for Wine DLLs (needed by Explorer).
svn path=/trunk/; revision=6313
2003-10-14 18:22:16 +00:00
Filip Navara
3889a8a8dd Fixed RegQueryValueExA and marked as implemented.
svn path=/trunk/; revision=6312
2003-10-14 18:18:27 +00:00
Eric Kohl
47419d0b98 Implemented NtQueryObject(ObjectBasicInformation).
svn path=/trunk/; revision=6311
2003-10-14 14:49:05 +00:00
Eric Kohl
09bed329b8 - Moved symbolic link object type.
- Added create time and removed object attributes.

svn path=/trunk/; revision=6310
2003-10-14 14:45:23 +00:00
Mark Tempel
6af69a6d26 Update to edit to keep it from crashing the kernel when it is created.
svn path=/trunk/; revision=6309
2003-10-14 03:32:18 +00:00
Mark Tempel
c21ade114a Update to correct a bug in GlobalSize with GMEM_MOVEABLE memory. Now a valid heap pointer is passed into RtlSizeHeap.
svn path=/trunk/; revision=6308
2003-10-14 01:44:39 +00:00
Martin Fuchs
4ceccd2cd5 update version number to 0.1.4
svn path=/trunk/; revision=6307
2003-10-13 22:42:06 +00:00
Eric Kohl
a4504f3fa6 - Cancel pending hive scynchronization upon shutdown.
- Implemented NtSetInformationKey().
- Mark more modified blocks in NtCreateKey().

svn path=/trunk/; revision=6306
2003-10-13 20:53:42 +00:00
Thomas Bluemel
1992cfebcb added missing cvsignore file
svn path=/trunk/; revision=6305
2003-10-13 15:34:10 +00:00
Thomas Bluemel
4aec51e513 Add a quick test application for testing the GlobalXXX memory API.
by Mark Tempel

svn path=/trunk/; revision=6304
2003-10-13 15:05:59 +00:00
Mark Tempel
8789928717 Updated to add support for all GlobalXXX functions for GMEM_FIXED, and GMEM_MOVEABLE memory.
svn path=/trunk/; revision=6303
2003-10-13 04:45:30 +00:00
Mark Tempel
b04cf03c9a Windows implements GlobalDiscard by using a #define to GlobalReAlloc. This update removes GlobalDiscard from the function list, and adds the define.
svn path=/trunk/; revision=6302
2003-10-13 04:40:18 +00:00
Mark Tempel
677670754c Update make file to build a test application for the GlobalXXX memory API.
svn path=/trunk/; revision=6301
2003-10-13 04:33:40 +00:00
Hartmut Birr
fea73f2343 - Added ntoskrnl.h to the include files.
svn path=/trunk/; revision=6300
2003-10-12 21:21:40 +00:00
Gé van Geldorp
96ef6162d0 Handle invalid DC instead of ASSERTing
svn path=/trunk/; revision=6299
2003-10-12 20:23:25 +00:00
Hartmut Birr
59f99bc8c6 - Put all init functions in a special section and do free
the memory from this section after system initialization.

svn path=/trunk/; revision=6298
2003-10-12 17:37:08 +00:00
Hartmut Birr
2a1821394f - Fixed the freeing of memory from boot load drivers.
- Put all init functions in a special section and do free
  the memory from this section after system initialization.

svn path=/trunk/; revision=6296
2003-10-12 17:05:50 +00:00
Vizzini
74be14122f Support for VMWare NIC, and some general clean-up and other minor changes:
- default to full maps
 - switched ndis (temporarily) back to system-start
 - enabled the pcnet driver in the registry (temporary - awaiting PnP support)
 - fixed the version number in the ndis version resource
 - implemented packet array indications
 - added a missing enum member to kedef
 - added PAGED_CODE() to ndis.h
 - added IRQL checking, assertions, and some comments to ndis
 - did some re-formatting to bring into code standard
 - other minor/cosmetic changes

svn path=/trunk/; revision=6295
2003-10-12 16:39:52 +00:00
Eric Kohl
b635a41ae9 - Renamed a lot of variables and functions in the registry.
- Fixed buggy cell size calculation.

svn path=/trunk/; revision=6294
2003-10-12 15:52:45 +00:00
Gé van Geldorp
c21ca7f81c Bump version number to 0.1.4
svn path=/trunk/; revision=6293
2003-10-12 14:01:30 +00:00
Thomas Bluemel
73d4cc4bcd fixed button caption bug
svn path=/trunk/; revision=6292
2003-10-12 10:05:22 +00:00
Gé van Geldorp
4b70642b13 Store WindowStation in Win32Process data too when setting window station
svn path=/trunk/; revision=6290
2003-10-12 09:46:51 +00:00
Hartmut Birr
e9be00f3e9 - Fixed a missing 'S' from SynchronizeWindows31FilesAndWindowsNTRegistry.
svn path=/trunk/; revision=6289
2003-10-12 09:39:44 +00:00
Thomas Bluemel
e959d6aee2 fixed warnings
svn path=/trunk/; revision=6287
2003-10-12 01:13:23 +00:00
Martin Fuchs
6c3428a268 Display colorfull startmenu side logo if enough colors are available in the current display mode
svn path=/trunk/; revision=6286
2003-10-12 00:59:33 +00:00
Thomas Bluemel
7d418a62a8 rewritten MessageBox functions, added MessageBoxTimeout()
svn path=/trunk/; revision=6285
2003-10-12 00:39:50 +00:00
Gé van Geldorp
522c110055 Added Mark Tempel, Art Yerkes, Martin Fuchs, Vizzini, Filip Navara,
Andrew Greenwood, Thomas Weidenmueller and Jonathan Wilson to list
of coders.
Split up STRINGTABLE resource.

svn path=/trunk/; revision=6284
2003-10-11 21:06:18 +00:00
Mark Tempel
d3116f3c9e Update the allocator to try to force memory to be allocated on an 8-byte boundary.
svn path=/trunk/; revision=6283
2003-10-11 21:03:50 +00:00
Filip Navara
77d1c7d4ce Corrected prototypes for FsRtlNotifyInitializeSync and FsRtlNotifyUninitializeSync.
svn path=/trunk/; revision=6282
2003-10-11 20:40:21 +00:00
Mark Tempel
b54239c578 Fix the declaration of GlobalDiscard to be STDCALL
svn path=/trunk/; revision=6281
2003-10-11 20:25:42 +00:00
Mark Tempel
42c1e37424 Update to add GlobalXXX memory API constants that were missing.
svn path=/trunk/; revision=6280
2003-10-11 20:23:21 +00:00
Hartmut Birr
096a69471d - Changed the file names to unicode strings.
- Replaced most of the string functions with the unicode functions.
- Removed some overhead.
- Fixed some minor bugs.

svn path=/trunk/; revision=6279
2003-10-11 17:51:56 +00:00
Hartmut Birr
a751ffce23 - Replace the first part of the short name with a check sum after some rounds to get a unique name.
svn path=/trunk/; revision=6278
2003-10-11 17:38:42 +00:00
Hartmut Birr
056d573329 - Fixed some type casts to get correct index values into the nls tables.
svn path=/trunk/; revision=6277
2003-10-11 17:23:52 +00:00
Eric Kohl
a7d3c209b1 Fixed cell buggy cell size calculation.
svn path=/trunk/; revision=6276
2003-10-11 16:55:49 +00:00
Gé van Geldorp
573b369b03 Fix OpenDesktop()
svn path=/trunk/; revision=6275
2003-10-11 16:28:58 +00:00
Eric Kohl
3a2fbc9c8f - Fixed inconsistent detection of in-offset data.
- Fixed class name cell allocation.
- Renamed a lot of variables and functions.

svn path=/trunk/; revision=6274
2003-10-10 21:55:16 +00:00
Thomas Bluemel
d27fed0f93 1. added kbdgr (German Keyboard Layout), (at least two) keys don't work though, search for FIXME
2. Added some VK_* defines

svn path=/trunk/; revision=6273
2003-10-09 17:48:44 +00:00
Gé van Geldorp
1e839b2692 Free DCE when window is destroyed
svn path=/trunk/; revision=6272
2003-10-09 07:30:02 +00:00
Gé van Geldorp
3f52e9d728 Keyboard sync between gui and text modes, patch by Art Yerkes and
Hartmut Birr

svn path=/trunk/; revision=6271
2003-10-09 06:13:05 +00:00
Thomas Bluemel
511fc18181 don't draw caption icon if not needed
svn path=/trunk/; revision=6270
2003-10-08 13:46:34 +00:00
guido
58c18026cc fixed for working on linux (for real now ...)
svn path=/trunk/; revision=6268
2003-10-07 22:22:24 +00:00
Gé van Geldorp
53ef4cbee3 Reserve space for terminating NUL character in window text
svn path=/trunk/; revision=6267
2003-10-07 22:06:52 +00:00
guido
5d276433ca fix compilation on linux, TODO: accept wildcards
svn path=/trunk/; revision=6266
2003-10-07 22:00:32 +00:00
Gé van Geldorp
68620a65d5 Change check for absolute pathnames on Windows
svn path=/trunk/; revision=6265
2003-10-07 19:48:12 +00:00
James Tabor
f651e5f32c Fix Include for Linux
svn path=/trunk/; revision=6264
2003-10-07 16:40:12 +00:00
Thomas Bluemel
8c2e8abc3d fixed bug in drawing the window caption
svn path=/trunk/; revision=6263
2003-10-07 15:42:37 +00:00
Eric Kohl
908cf73ea4 Create type objects for all object types.
svn path=/trunk/; revision=6262
2003-10-07 14:08:43 +00:00
Martin Fuchs
568dabc967 WIne without _tcslwr
svn path=/trunk/; revision=6261
2003-10-07 08:35:41 +00:00
Gé van Geldorp
6c664de318 Add "make registry" target
svn path=/trunk/; revision=6260
2003-10-07 07:47:21 +00:00
Gé van Geldorp
3650a74350 Fix pixel swap error
svn path=/trunk/; revision=6259
2003-10-06 21:04:24 +00:00
Casper Hornstrup
2b41fc9ef0 2003-10-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: New target uboot for simple unattended setup.
	* bootdata/unattend.inf.sample: Sample unattended setup script.
	* subsys/system/usetup/partlist.c (SelectPartition): New function.
	* subsys/system/usetup/partlist.h (SelectPartition): Prototype.
	* subsys/system/usetup/usetup.c: Support unattended setup.
	(IsUnattendedSetup, UnattendDestinationDiskNumber,
	UnattendDestinationPartitionNumber, UnattendInstallationDirectory):
	New.
	(CheckUnattendedSetup, InstallDirectoryPage1): New function.

svn path=/trunk/; revision=6258
2003-10-06 19:22:42 +00:00
Filip Navara
ec64ee05f6 Fixed line endings.
svn path=/trunk/; revision=6257
2003-10-06 18:49:50 +00:00
Filip Navara
4dd437312a Added system32\\drivers\\ndis.sys as it's a boot start driver.
svn path=/trunk/; revision=6256
2003-10-06 18:30:54 +00:00
Filip Navara
91aeffd931 I commited more files than I wanted by mistake. :( This patch reverses most of the changes and addes commit message for the others.
reactos/config - Reversed
reactos/lib/gdi32/objects/bitblt.c - Reversed
reactos/lib/kernel32/process/create.c - Added output of user mode exception address.
reactos/lib/user32/controls/button.c - Fixed debug print
reactos/lib/user32/windows/bitmap.c - Reversed
reactos/ntoskrnl/cm/rtlfunc.c - Reversed
reactos/ntoskrnl/io/driver.c - Reversed
reactos/subsys/system/explorer/buildno.h - Updated
reactos/subsys/system/explorer/explorer_intres.rc - Changed VK_S and VK_X to numeric values, because MinGW doesn't have these constants.
reactos/subsys/system/explorer/makefile - Reversed
reactos/subsys/win32k/ntuser/windc.c - Reversed

svn path=/trunk/; revision=6255
2003-10-06 18:24:54 +00:00
Gé van Geldorp
3e4cc29925 Remove no longer needed stuff
svn path=/trunk/; revision=6254
2003-10-06 18:18:00 +00:00
Filip Navara
8d31e83bb5 Added vfw.h header for compiling comctl32.dll with older w32api.
svn path=/trunk/; revision=6253
2003-10-06 17:53:55 +00:00
Thomas Bluemel
fb45e50cc0 fixed bug in calculation of scrollbars
svn path=/trunk/; revision=6252
2003-10-06 17:25:16 +00:00
Gé van Geldorp
0c98050bdc Fix icon handling
svn path=/trunk/; revision=6251
2003-10-06 16:25:53 +00:00
Gé van Geldorp
307c3b1526 Prevent double output
svn path=/trunk/; revision=6250
2003-10-06 16:24:20 +00:00
Vizzini
2f9834a4b1 fixed line endings on all files
svn path=/trunk/; revision=6249
2003-10-06 16:13:28 +00:00
Vizzini
2b4d614b3b fixed line endings
svn path=/trunk/; revision=6248
2003-10-06 15:54:29 +00:00
Filip Navara
21a74ed02c Wine's COMCTL32 port.
svn path=/trunk/; revision=6247
2003-10-05 21:26:59 +00:00
Filip Navara
64591816e3 Added C++ terminate function.
svn path=/trunk/; revision=6246
2003-10-05 18:13:27 +00:00
Filip Navara
03195d93a6 Made registry key handles inheritable.
svn path=/trunk/; revision=6245
2003-10-05 17:13:27 +00:00
Filip Navara
d2734276cb Added semi-stub for GetCurrentHwProfileA.
svn path=/trunk/; revision=6244
2003-10-05 17:12:32 +00:00
Eric Kohl
7301a9d4b0 Return handle information in ObReferenceObjectByHandle().
svn path=/trunk/; revision=6243
2003-10-05 16:57:39 +00:00
Richard Campbell
5ba34e8e3d fixed makefile for mingw systems, make is no longer make.exe, it is mingw32-make.exe, fixed this permanently by changing everything to $(MAKE)
svn path=/trunk/; revision=6242
2003-10-05 05:51:26 +00:00
Martin Fuchs
26e9ba9eda display icons in search dialog
svn path=/trunk/; revision=6241
2003-10-04 23:30:22 +00:00
Thomas Bluemel
93e9630e67 implements system timers (similar to standard timers)
svn path=/trunk/; revision=6240
2003-10-04 22:36:37 +00:00
Filip Navara
996d541acf Updated makefile and changed target name to shell32.dll.
svn path=/trunk/; revision=6239
2003-10-04 21:30:05 +00:00
Thomas Bluemel
7ee95e2702 1.fixes drawing thin and dialog captions
2.fixes hittesting for thin and dialog style windows
3.hide scrollbars if client area is too small

svn path=/trunk/; revision=6238
2003-10-04 21:18:17 +00:00
Gé van Geldorp
9f165f1472 Stricter checking of GDIOBJ handles
svn path=/trunk/; revision=6237
2003-10-04 21:09:29 +00:00
Martin Fuchs
2a8a8ea559 read explorer policy settings from registry
svn path=/trunk/; revision=6236
2003-10-04 21:02:42 +00:00
Eric Kohl
32be4e4865 Fixed buggy DPRINT.
Found by Patvor.

svn path=/trunk/; revision=6235
2003-10-04 20:26:45 +00:00
Gé van Geldorp
8377a6d3cf Don't unreference driver for dc's with NULL drivername
svn path=/trunk/; revision=6234
2003-10-04 20:26:43 +00:00
Gé van Geldorp
e661c147ad Fix NtGdiRectangle
svn path=/trunk/; revision=6233
2003-10-04 20:04:10 +00:00
Filip Navara
2f8bd70826 Fixed WinMM and Shell32 DLLs to be usable by Solitaire and Task Manager.
svn path=/trunk/; revision=6232
2003-10-04 19:55:48 +00:00
Filip Navara
3e19a65825 Patch by Skywing.
- Added notice about PsGetCurrentProcessId not returning a real handle.
- Changed PsGetCurrentProcessId() to NtCurrentProcess() in RtlpGetRegistryHandle.
(I am still not sure if it works correctly, but it crashes otherwise!)

svn path=/trunk/; revision=6231
2003-10-04 18:19:17 +00:00
Martin Fuchs
cbd89b1469 compile resources with wrc
svn path=/trunk/; revision=6230
2003-10-04 17:57:11 +00:00
Martin Fuchs
30e42e78a6 remove winefile.rc
svn path=/trunk/; revision=6229
2003-10-04 17:56:51 +00:00
Martin Fuchs
d9f9ad8343 adjust for wrc
svn path=/trunk/; revision=6228
2003-10-04 17:56:34 +00:00
Martin Fuchs
56cae963fd removed compiler warning
svn path=/trunk/; revision=6227
2003-10-04 17:36:40 +00:00
Martin Fuchs
133757aaab disable call to AllowSetForegroundWindow() for Wine
svn path=/trunk/; revision=6226
2003-10-04 17:32:25 +00:00
Eric Kohl
9b66809886 - Added OBJECT_INFORMATION_CLASS type.
- Added, fixed or moved object information types.

svn path=/trunk/; revision=6225
2003-10-04 17:12:31 +00:00
Thomas Bluemel
c102b23e07 fixes in DefWndNCCalcSize() and other small fixes
svn path=/trunk/; revision=6224
2003-10-04 16:04:01 +00:00
Thomas Bluemel
193d845613 adding test app for the client area calculation using the WM_NCCALCSIZE message
svn path=/trunk/; revision=6223
2003-10-04 12:14:37 +00:00
Filip Navara
569ba4e82d Fixed DPRINT in NtQueryDirectoryObject.
svn path=/trunk/; revision=6222
2003-10-04 07:48:11 +00:00
Gé van Geldorp
80c2c54b48 Gracefully handle some out of resource situations
svn path=/trunk/; revision=6220
2003-10-03 22:07:40 +00:00
Gé van Geldorp
826367ef3c Implementation of ReleaseDC(), works for now but could be made more efficient
svn path=/trunk/; revision=6219
2003-10-03 18:04:37 +00:00
Eric Kohl
8f27cdee0d Initialize more port configuration information for PCI devices.
AHA-2940 gets detected and initialized. :-)

svn path=/trunk/; revision=6218
2003-10-03 16:18:35 +00:00
Martin Fuchs
c5a3a450b2 allow SetForegroundWindow() for Notify Windows
svn path=/trunk/; revision=6217
2003-10-03 15:33:18 +00:00
Filip Navara
5626948240 Fixed DPRINT in IopInvalidateDeviceRelations.
svn path=/trunk/; revision=6216
2003-10-03 13:37:53 +00:00
Gé van Geldorp
54c0f5b8de - Pass correct coordinates in WM_MOVE
- Fix non-client size calculation

svn path=/trunk/; revision=6215
2003-10-03 11:44:44 +00:00
Eric Kohl
340061ddcf Scan the SCSI buses by sending SCSI requests instead of calling the miniport's StartIo routine directly.
svn path=/trunk/; revision=6214
2003-10-03 10:47:41 +00:00
Thomas Bluemel
9dc187ebe5 SetScrollInfo() now repaints the scrollbars if needed
svn path=/trunk/; revision=6213
2003-10-02 23:21:42 +00:00
Gé van Geldorp
e2486f18e3 Fix computation of bounding rectangle
svn path=/trunk/; revision=6212
2003-10-02 21:32:45 +00:00
Eric Kohl
8da5e2f8e1 Major rework of ScsiPortInitialize():
- Got rid of pseudo device extension.
- Create port device object before the call to HwFindAdapter().

svn path=/trunk/; revision=6210
2003-10-02 13:40:00 +00:00
Martin Fuchs
bf5a98bcc0 _avive-Handling
svn path=/trunk/; revision=6209
2003-10-02 00:51:35 +00:00
Martin Fuchs
6ab07bccfd disabled console code for Wine
svn path=/trunk/; revision=6208
2003-10-02 00:50:13 +00:00
Martin Fuchs
d81895f3a3 Beginnings of "Search Program" dialog
svn path=/trunk/; revision=6207
2003-10-01 23:30:11 +00:00
Thomas Bluemel
9a49c3f027 disable DbgPrints
svn path=/trunk/; revision=6205
2003-10-01 19:11:06 +00:00
Eric Kohl
e0492ecd39 - Move port configuration info from the device extension.
- Prepare to reorganize ScsiPortInitialize().

svn path=/trunk/; revision=6204
2003-10-01 14:59:11 +00:00
Eric Kohl
14faffecc0 - Check the number of harddisks and fail if no harddisk is available.
- Updated some texts.
- Disabled debugging messages.

svn path=/trunk/; revision=6203
2003-10-01 14:54:21 +00:00
Gé van Geldorp
960aa79c36 Release PiThreadListLock as soon as possible
svn path=/trunk/; revision=6202
2003-09-30 22:36:29 +00:00
Gé van Geldorp
3df2c8544f Handle mouse not present situation
svn path=/trunk/; revision=6201
2003-09-30 22:04:24 +00:00
Thomas Bluemel
336b105291 fixed the keyboard driver crash if there was no mouse detected, maybe not the best solution but it seems to work. win32k still expects a mouse though
svn path=/trunk/; revision=6200
2003-09-30 19:59:45 +00:00
Filip Navara
55cfd3e3f4 Changed the video driver back to VGA. Sorry for bug in my previous patch.
svn path=/trunk/; revision=6198
2003-09-30 16:04:51 +00:00
Filip Navara
408392e571 - Small fixies for bus drivers.
- Added (commented out) registry entry for loading PCI driver
- Commented out the Ne2000 root bus registry entry, because it crashes ReactOS without reversed Skywing's object.c patch.

svn path=/trunk/; revision=6197
2003-09-30 15:46:59 +00:00
Martin Fuchs
550fd767cd Changed shell namespacew sort order to file name instead of displayed name
svn path=/trunk/; revision=6196
2003-09-30 08:53:00 +00:00
Martin Fuchs
6ef5b3b5fb Fix for wrong UNICODE definition of CFSTR_FILENAME in MinGW
svn path=/trunk/; revision=6195
2003-09-29 22:16:40 +00:00
Filip Navara
eb69ba9ec2 This is first part of patch to get loading boot bus drivers working. The loading still doesn't work, but it doesn't crash at least.
Changes:
- Added BootDriver parameter to IopInitializeDriver.
- Changed second parameter of IopInitializeDevice to BootDriver.
- Avoid initalizing boot bus drivers in IopInitializeDevice
- Remove thrid parameter (BootDriversOnly) of IopInterrogateBusExtender, because it isn't used
- Enabled calling of IopLoadBootStartDrivers in ExpInitializeExecutive.
- Disabled some debug messages
- Some other small fixies

svn path=/trunk/; revision=6194
2003-09-29 20:43:07 +00:00
Martin Fuchs
0ddc55f416 * open MDI cabinet folders instead of new mainframe windows
* avoid accessing floppy drive when browsing "My Computer"

svn path=/trunk/; revision=6193
2003-09-29 20:24:48 +00:00
Thomas Bluemel
99bf2fc3b8 rewrote the ps/2 mouse driver. it works now :)
svn path=/trunk/; revision=6192
2003-09-29 19:41:46 +00:00
Thomas Bluemel
4dba9c4e26 fixed handling of WM_MOUSEWHEEL....again
svn path=/trunk/; revision=6191
2003-09-29 19:38:30 +00:00
Thomas Bluemel
34d43b1c8a fixed passing a wrong parameter to GetWindowLong()
svn path=/trunk/; revision=6190
2003-09-29 19:00:44 +00:00
Martin Fuchs
f67ae3636f moved settings entries into submenu
svn path=/trunk/; revision=6189
2003-09-28 21:28:30 +00:00
Martin Fuchs
febcdf59e3 open subfolders in cabinet windows
svn path=/trunk/; revision=6188
2003-09-28 20:59:30 +00:00
Martin Fuchs
a7de09c7ea open cabinet windows then clicking on desktop folders
svn path=/trunk/; revision=6187
2003-09-28 19:51:05 +00:00
Martin Fuchs
b48f5abd49 ShellBrowserImpl::OnDefaultCommand()
svn path=/trunk/; revision=6186
2003-09-28 19:50:42 +00:00
Martin Fuchs
61382e6bca use ILGetSize() instead of IMalloc::GetSize()
svn path=/trunk/; revision=6185
2003-09-28 19:49:59 +00:00
Thomas Bluemel
bbe43cc970 fixed handling of WM_MOUSEWHEEL which are supposed to be sent to the window with the current focus no matter where the mouse cursor is
svn path=/trunk/; revision=6182
2003-09-28 14:21:26 +00:00
Filip Navara
59760bf0d0 Setting of device node flags DNF_PROCESSED and DNF_ENUMERATED.
svn path=/trunk/; revision=6181
2003-09-28 12:52:53 +00:00
Martin Fuchs
6e65f7ed9f new TODO entries
svn path=/trunk/; revision=6180
2003-09-28 12:00:22 +00:00
Martin Fuchs
b2c1f686f6 added a Makefile for compiling as winelib application
svn path=/trunk/; revision=6179
2003-09-28 07:42:30 +00:00
Martin Fuchs
4adc17e7ad corrections for compiling as winelib application
svn path=/trunk/; revision=6178
2003-09-28 07:39:40 +00:00
Filip Navara
4472b96d6b Fixed line endings.
svn path=/trunk/; revision=6177
2003-09-28 07:37:11 +00:00
Thomas Bluemel
c9e8d81464 disable detection of mice since bochs doesn't like it
svn path=/trunk/; revision=6175
2003-09-28 01:33:51 +00:00
Thomas Bluemel
5b44561405 fix resulution setting
svn path=/trunk/; revision=6174
2003-09-28 00:35:03 +00:00
Thomas Bluemel
9a74edf2a1 advanced ps/2 mouse driver that supports intellimouse and mice with mouse wheel and 4th and 5th buttons
svn path=/trunk/; revision=6173
2003-09-28 00:30:34 +00:00
Thomas Bluemel
7871924668 support for mouse wheels and 4th and 5th mouse button (WM_MOUSEWHEEL, WM_XBUTTON*)
svn path=/trunk/; revision=6172
2003-09-28 00:26:13 +00:00
Emanuele Aliberti
719909479f I changed the PSXDLL.DLL version info description to make it different from MS' (and make it say what it actually is).
svn path=/trunk/; revision=6171
2003-09-27 21:23:23 +00:00
Martin Fuchs
3018ab1bdc merged start menus of the same name (e.g. "All Users\Startup" with "<User>\Startup")
svn path=/trunk/; revision=6170
2003-09-27 21:20:32 +00:00
Filip Navara
48587e3e2f Fixed line endings.
svn path=/trunk/; revision=6169
2003-09-27 18:53:58 +00:00
guido
86e9bc55c8 Renamed 'makefile' to 'Makefile' in order to build on linux
svn path=/trunk/; revision=6168
2003-09-27 18:52:31 +00:00
Martin Fuchs
367a45d72a * created a Makefile for compiling as standalone project using MinGW
* eliminated all warnings displayed when using -Wall
* activated option for compiling as UNICODE version

svn path=/trunk/; revision=6166
2003-09-27 17:21:03 +00:00
Gé van Geldorp
8638791220 Set cursor position and time for posted messages
svn path=/trunk/; revision=6165
2003-09-27 15:41:54 +00:00
Filip Navara
c434e40598 Fixed SetPixel and initial implementation of SetPixelV.
svn path=/trunk/; revision=6164
2003-09-27 15:09:26 +00:00
Martin Fuchs
f7deec4b5c moved start menu entries for control panel, etc. into new settings submenu
svn path=/trunk/; revision=6163
2003-09-27 13:15:02 +00:00
Gé van Geldorp
1c7c828d1e Alternate implementation of DrawFocusRect() which works better in current
ReactOS

svn path=/trunk/; revision=6161
2003-09-27 12:32:52 +00:00
Filip Navara
4e2b376ccf Bugfix: Reverted order of mask1Bpp, this change fixes 1bpp blits.
svn path=/trunk/; revision=6159
2003-09-27 09:27:45 +00:00
Robert Dickenson
7f69240625 reactos\subsys\system\usetup\infcache.c (line 1156)
CacheSection = Cache->FirstSection;
  while (Section != NULL)

changed to:
  CacheSection = Cache->FirstSection;
//  while (Section != NULL)  // RobD - this looks like an error, variable 'Section' never changes inside the while loop...
  while (CacheSection != NULL)

and also the same in:
reactos\tools\mkhive\infcache.c (line 1007)

Could Royce or Eric confirm this 'fix' please.

svn path=/trunk/; revision=6158
2003-09-27 09:14:15 +00:00
Thomas Bluemel
b58279d977 partial support for intellimouse
svn path=/trunk/; revision=6156
2003-09-27 01:08:19 +00:00
Thomas Bluemel
82a60ec8d1 removed redefinition of WHEEL_DELTA constant
svn path=/trunk/; revision=6155
2003-09-27 00:29:52 +00:00
Thomas Bluemel
aa8f2f585a added constants for WM_XBUTTON* messages
svn path=/trunk/; revision=6154
2003-09-27 00:22:10 +00:00
Gé van Geldorp
2deb611ef7 Add NtUserReleaseDC
svn path=/trunk/; revision=6152
2003-09-26 21:05:48 +00:00
Gé van Geldorp
e80e96bff4 - Incomplete implementation of ReleaseDC()
- Fix pen color bug if pen was selected into a DC more than once
- Cache GetSysColorBrush() and GetSysColorPen()

svn path=/trunk/; revision=6151
2003-09-26 20:58:06 +00:00
Filip Navara
4671a645d8 Changed DPRINT1 to DPRINT when connecting to mouse device.
svn path=/trunk/; revision=6150
2003-09-26 20:10:07 +00:00
Eric Kohl
3bc1216b7f Check for presence of \reactos\ntoskrnl.exe instead of REACTOS disk label to identify the boot cdrom device.
svn path=/trunk/; revision=6149
2003-09-26 19:45:04 +00:00
Filip Navara
efec63db2f Fixed the type of PS2MouseInitializeDataQueue.
svn path=/trunk/; revision=6148
2003-09-26 19:37:38 +00:00
Filip Navara
afd54f8f9c Fixed DIB_BltToVGA and other functions calling it to handle situation where SourcePoint->x % 2 != 0.
svn path=/trunk/; revision=6147
2003-09-26 18:38:47 +00:00
Filip Navara
95d5d55bff Fixed the FileVersion once more. The version should be 5.1.2600 because some applications use the bitmap resources directly and depending on the FileVersion tries to load animations.
svn path=/trunk/; revision=6146
2003-09-26 12:17:05 +00:00
Gé van Geldorp
b13d959501 Handle some out of resource situations
svn path=/trunk/; revision=6145
2003-09-26 10:45:45 +00:00
Eric Kohl
5a99fbb2ce Search for devices if a valid vendor and device ids are passes to ScsiPortInitialize().
svn path=/trunk/; revision=6144
2003-09-25 23:23:21 +00:00
Thomas Bluemel
fbbaa9a97d fixed some drawing bugs of scrollbars
svn path=/trunk/; revision=6143
2003-09-25 21:16:56 +00:00
Eric Kohl
895c98c856 Replaced ObRosCreateObject() by ObCreateObject() and ObInsertObject().
Fixed ObCreateObject() and ObInsertObject().

svn path=/trunk/; revision=6140
2003-09-25 20:09:56 +00:00
Filip Navara
72d8964737 Fixed line endings.
svn path=/trunk/; revision=6139
2003-09-25 18:29:45 +00:00
Thomas Bluemel
636d453391 fixed file version to 1,0,0,0
svn path=/trunk/; revision=6138
2003-09-25 18:10:22 +00:00
Thomas Bluemel
37d56c9567 fixed version info
svn path=/trunk/; revision=6137
2003-09-25 17:05:19 +00:00
Filip Navara
7ea418b4eb Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
   Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
   KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
   ExFreePoolWithTag.
ntoskrnl/io/driver.c:
   Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
   Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
   in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
   Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
   ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
   ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
   ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
   Fixed registry handling in IopActionInterrogateDeviceStack and
   IopActionConfigureChildServices.
   Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
   Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
   New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
   Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
   Partial implementation of ExFreePoolWithTag.

svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
Filip Navara
bf8e3b5659 Device driver loading and unloading utilities.
svn path=/trunk/; revision=6135
2003-09-25 15:40:23 +00:00
Filip Navara
85fd5b07a7 Fixed generation of Device ID.
svn path=/trunk/; revision=6134
2003-09-25 15:21:11 +00:00
Aleksey Bragin
1fc4bb294e palbitblt installation is added to reactos tests
svn path=/trunk/; revision=6133
2003-09-25 15:20:59 +00:00
Aleksey Bragin
19fcfe178b Slightly changed PALETTE_SetMapping() to obtain pointer to the system palette dynamically instead of just looking into COLOR_sysPal.
Good news - palbitblt.exe now works as it as supposed to work under non-paletted mode, and in 16-colors too (but I haven't checked if it looks the same in this mode in Windows too)

svn path=/trunk/; revision=6132
2003-09-25 15:15:03 +00:00
Aleksey Bragin
30174c1155 Changes in COLOR_PaletteLookupPixel() to handel case, when it's called with NULL XlateObj,
svn path=/trunk/; revision=6131
2003-09-25 15:12:42 +00:00
Aleksey Bragin
fc32b5f1f9 Changed one UNIMPLEMENTED in NtGdiGetDIBits() to DPRINT (when bits=0, application queries for parameters, and gets them via this way). I guess this isn't fully correct behaviour, but everyone will get clear notification via DPRINT in case this branch of NtGdiGetDIBits is called.
svn path=/trunk/; revision=6130
2003-09-25 14:40:42 +00:00
Aleksey Bragin
2f740eff13 PALOBJ_cGetColors(): PalObj is already a pointer to PALGDI, no need to call AccessInternalObjectFromUserObject(PalObj). At least it gives error when this function is invoked. If I'm mistaking (this function is being called with wrong param), please notify me.
svn path=/trunk/; revision=6129
2003-09-25 14:32:55 +00:00
Vizzini
07a35efe80 Patch by Skywing:
- fixes issues with object manager calling object deletion callbacks at raised IRQL [which creates a ton of problems]
 - move kernel debugger init to after ExInit

svn path=/trunk/; revision=6128
2003-09-25 05:12:24 +00:00
Thomas Bluemel
0ae09914df fixed passing pointers to win32k
svn path=/trunk/; revision=6127
2003-09-24 21:09:22 +00:00
Thomas Bluemel
987f34d8d3 fixed file version field
svn path=/trunk/; revision=6126
2003-09-24 20:32:11 +00:00
Thomas Bluemel
4b416189e9 add capclock to the build system
svn path=/trunk/; revision=6125
2003-09-24 20:05:29 +00:00
Thomas Bluemel
63ebbd13c0 fixed some cvsignore files
svn path=/trunk/; revision=6124
2003-09-24 19:55:18 +00:00
Thomas Bluemel
461f1cab84 improved mouse (buttons) handling
svn path=/trunk/; revision=6123
2003-09-24 18:39:34 +00:00
Thomas Bluemel
b5d10cd2da added *.map to the cvsignore file
svn path=/trunk/; revision=6122
2003-09-24 17:36:58 +00:00
Thomas Bluemel
e669b2e1cb Added winhello2 test app by Michael Fritscher
svn path=/trunk/; revision=6121
2003-09-24 16:11:05 +00:00
Thomas Bluemel
3fd1dcd5e0 some fixes on on gdi handles
svn path=/trunk/; revision=6120
2003-09-24 16:01:32 +00:00
Thomas Bluemel
3ed28b6e6f some work on scrollbars
svn path=/trunk/; revision=6119
2003-09-24 13:41:40 +00:00
Gé van Geldorp
4fe38862eb NtGdiEllipse() improvements
svn path=/trunk/; revision=6118
2003-09-23 21:48:18 +00:00
Thomas Bluemel
3ec27cec15 fixed memory leak in REGION_XorRegion()
svn path=/trunk/; revision=6117
2003-09-23 19:33:29 +00:00
Gé van Geldorp
0b9c284361 Fix GDI_HANDLE_INDEX_MASK, thanks to Jonathan Wilson
svn path=/trunk/; revision=6116
2003-09-23 18:04:42 +00:00
Filip Navara
cb74b26689 Update of richedit to Wine 20030911 version
svn path=/trunk/; revision=6115
2003-09-22 06:11:49 +00:00
Thomas Bluemel
19aeb83a4b added *.iso and *.cab to cvsignore
svn path=/trunk/; revision=6114
2003-09-21 18:17:55 +00:00
Thomas Bluemel
a41feef44a fixed NtUserClipCursor()
svn path=/trunk/; revision=6113
2003-09-21 16:00:24 +00:00
Martin Fuchs
87768e6cca fix usage of 64 bit constants in SleepEx() and GetQueuedCompletionStatus()
svn path=/trunk/; revision=6112
2003-09-21 14:02:30 +00:00
Martin Fuchs
3d57db0ea0 Exception Handling
svn path=/trunk/; revision=6111
2003-09-21 13:51:20 +00:00
Martin Fuchs
3c50c8c091 Explorer FAQ
svn path=/trunk/; revision=6110
2003-09-21 13:51:02 +00:00
Thomas Bluemel
3a04e43292 fixed NtUserClipCursor()
svn path=/trunk/; revision=6109
2003-09-21 11:53:13 +00:00
Gé van Geldorp
3cd94c29a1 Fix some coordinate system mismatches
svn path=/trunk/; revision=6108
2003-09-21 06:44:51 +00:00
Thomas Bluemel
52c1dddf12 ported ConvertDefaultLocale() from wine
svn path=/trunk/; revision=6107
2003-09-21 01:47:02 +00:00
Thomas Bluemel
de2bded76d unstubbed national language support functions
svn path=/trunk/; revision=6105
2003-09-20 23:37:56 +00:00
Thomas Bluemel
df61aa9b8a fixed compiler warnings
svn path=/trunk/; revision=6104
2003-09-20 22:44:22 +00:00
Thomas Bluemel
9fb56830e8 fixed compiler warnings
svn path=/trunk/; revision=6103
2003-09-20 20:31:57 +00:00
Thomas Bluemel
174238220d fixed compiler warnings and cvsignore files
svn path=/trunk/; revision=6102
2003-09-20 20:12:43 +00:00
Gé van Geldorp
b2869f7a74 Revert previous change to dialog.c and fix the problem at it's root,
in EnumChildWindows. Thanks to Thomas Weidenmueller.

svn path=/trunk/; revision=6101
2003-09-20 19:52:23 +00:00
Gé van Geldorp
0504e0cffa Fix GetDlgItem()
svn path=/trunk/; revision=6100
2003-09-20 19:24:11 +00:00
Thomas Bluemel
04b9e7234a fixed compiler warnings
svn path=/trunk/; revision=6099
2003-09-20 19:08:44 +00:00
Thomas Bluemel
013bfffae8 fixed compiler warnings
svn path=/trunk/; revision=6098
2003-09-20 14:44:35 +00:00
Martin Fuchs
c92e25be46 improved exception handling in start menu, especially for non-NT systems
svn path=/trunk/; revision=6097
2003-09-19 20:27:59 +00:00
Martin Fuchs
f2fb2a7e5c rm REMOTE DBG
svn path=/trunk/; revision=6096
2003-09-19 07:43:27 +00:00
Martin Fuchs
2efa56ff58 fix for mingw build
svn path=/trunk/; revision=6095
2003-09-18 22:48:17 +00:00
Martin Fuchs
b0665e94ab compatibility changes for correct start menu subentries on Windows 9x
svn path=/trunk/; revision=6094
2003-09-18 22:18:38 +00:00
Aleksey Bragin
e125705217 Patch by Mike Nordell: Change UserMode to KeGetCurrentProcess()->PreviousMode in calls to ObReferenceObjectByHandle() in file ps/kill.c
svn path=/trunk/; revision=6093
2003-09-18 17:55:21 +00:00
Aleksey Bragin
4374bab13d Add msimg32 to the list of libraries
svn path=/trunk/; revision=6092
2003-09-18 16:03:03 +00:00
Aleksey Bragin
092aeee1ca Path by Filip Navarra, implementing initial version MSIMG32 dll that just calls relevant gdi32.dll functions.
svn path=/trunk/; revision=6091
2003-09-18 15:44:43 +00:00
Eric Kohl
b2a7aa0781 Added defines for uninitialized values.
svn path=/trunk/; revision=6090
2003-09-18 13:45:07 +00:00
Martin Fuchs
b4f1ad8ce1 use system colors instead of hardcoded constants for drive panes
svn path=/trunk/; revision=6089
2003-09-16 21:54:24 +00:00
Martin Fuchs
d1e179a339 command line option -nodesktop
svn path=/trunk/; revision=6088
2003-09-16 17:59:23 +00:00
Emanuele Aliberti
1f1078fba3 Patch by Valentin Verkhovsky: Ntfs driver is updated now and ready for testing.
I've been working on MFT processing for while.
Thus driver performs  only  files & attribute enumerating
by VCN-LCN pair mapping   like M$ Nfi  utility.

For me it compiles and the image loads correctly.

svn path=/trunk/; revision=6087
2003-09-15 16:01:16 +00:00
Vizzini
ed00963623 changed callbacks to use stdcall
made a number of changes to the protocol->miniport send path
clarified locking and irql manipulation code
added support for SendPacketsHandler
cleaned up NdisRegisterProtocol and NdisOpenAdapter

svn path=/trunk/; revision=6086
2003-09-15 03:58:12 +00:00
Vizzini
c7198d46d8 implemented MiniportHalt, MiniportQueryInformation, and MiniportSetInformation
svn path=/trunk/; revision=6085
2003-09-15 03:47:22 +00:00
Vizzini
6c6b49d3cb Patch from Filip Navara updating comctl32
svn path=/trunk/; revision=6084
2003-09-15 02:48:15 +00:00
Martin Fuchs
5cb3c6a572 updatebuildno without ./
svn path=/trunk/; revision=6083
2003-09-14 19:04:23 +00:00
Martin Fuchs
54c2f02940 lf
svn path=/trunk/; revision=6082
2003-09-14 19:00:03 +00:00
Martin Fuchs
88b58a6ff1 updatebuildno script for systems without installed "cp"
svn path=/trunk/; revision=6081
2003-09-14 18:43:44 +00:00
Martin Fuchs
64fddd5694 transparent Icons with shadow
svn path=/trunk/; revision=6080
2003-09-14 17:28:27 +00:00
Martin Fuchs
04f28a8acf transparent XP icons in various image sizes
svn path=/trunk/; revision=6079
2003-09-14 15:48:51 +00:00
Hartmut Birr
9604dab6c5 - Use KeSetBasePriorityThread for changing the thread priority in NtSetInformationThread.
svn path=/trunk/; revision=6078
2003-09-14 10:53:32 +00:00
Hartmut Birr
6f4149e361 - Reference all returned process objects (in PsGetNextProcess).
- Do not fail if a process is deleted (in PsGetNextProcess).
- Change the direction of the returned process (in PsGetNextProcess).
- Check if a process is deleted in NtOpenProcess.

svn path=/trunk/; revision=6077
2003-09-14 10:52:33 +00:00
Hartmut Birr
24203ec76e - Moved the call to ExpSwapThreadEventPair from PiDeleteThread to PsTerminateCurrentThread.
svn path=/trunk/; revision=6076
2003-09-14 10:50:29 +00:00
Hartmut Birr
5eb3a136c6 - Returned STATUS_PROCESS_IS_TERMINATING/STATUS_THREAD_IS_TERMINATING instead of
STATUS_UNSUCCESSFUL if a process/thread is deleted.

svn path=/trunk/; revision=6075
2003-09-14 10:48:39 +00:00
Thomas Bluemel
1324042725 added missing cvsignore
svn path=/trunk/; revision=6074
2003-09-14 10:37:03 +00:00
Hartmut Birr
0b9f28cec0 - Changed the reference/dereference order in ObDeleteHandle.
svn path=/trunk/; revision=6073
2003-09-14 09:19:07 +00:00
Hartmut Birr
753a4b6018 - Changed the wait parameter to FALSE in a call to KeSetEvent (in NtSetLowEventPair).
svn path=/trunk/; revision=6072
2003-09-14 09:18:04 +00:00
Hartmut Birr
8f692f9ab7 - Implemented the allocation type NonPagedPoolCacheAligned/NonPagedPoolCacheAlignedMustS.
svn path=/trunk/; revision=6071
2003-09-14 09:15:04 +00:00
Hartmut Birr
991009f8c6 - Reduce the size for the block header by using a union structure.
- Allocate the buffer for the pool bitmap dynamically.
- Fixed some of the debug functions.
- Implemented the allocation type NonPagedPoolCacheAligned/NonPagedPoolCacheAlignedMustS.

svn path=/trunk/; revision=6070
2003-09-14 09:14:20 +00:00
Hartmut Birr
230ad74f48 - Fixed KeReleaseDispatcherDatabaseLockAtDpcLevel/KeReleaseDispatcherDatabaseLock.
svn path=/trunk/; revision=6069
2003-09-14 09:12:19 +00:00
Hartmut Birr
f9cf46a778 - Initialize only the page table for the region up to 8MB.
svn path=/trunk/; revision=6068
2003-09-14 09:11:14 +00:00
Hartmut Birr
8331f92d3f - Dereference the process pointer in QSI_DEF(SystemProcessInformation).
svn path=/trunk/; revision=6067
2003-09-14 09:03:54 +00:00
Hartmut Birr
0ec4b3e636 - Fixed the length for the allocated buffer in IntGetClassName.
svn path=/trunk/; revision=6066
2003-09-14 09:03:53 +00:00
Vizzini
47c9a1e005 fix for building with DBG=1
svn path=/trunk/; revision=6065
2003-09-14 05:53:15 +00:00
Martin Fuchs
b5596b0da8 Use a better ReactOS Icon as application icon and for start menu button
svn path=/trunk/; revision=6064
2003-09-13 23:52:05 +00:00
Vizzini
fd94f77ea8 patch by Filip Navara for remaining mswsock stubs
svn path=/trunk/; revision=6063
2003-09-13 21:15:03 +00:00
Martin Fuchs
d17de36214 rename local variable from hwnd to hwndDesktop
svn path=/trunk/; revision=6062
2003-09-13 19:13:57 +00:00
Martin Fuchs
6ede4e5449 work around for Windows NT, Win 98, ... to display desktop window in the correct size
svn path=/trunk/; revision=6061
2003-09-13 19:01:25 +00:00
Thomas Bluemel
9b298429d8 fixed the hMenu parameter in CreateWindowEx so that this parameter changes the child windows' ID
svn path=/trunk/; revision=6060
2003-09-13 13:58:38 +00:00
Martin Fuchs
5d3579faab added link to FAQ web page
svn path=/trunk/; revision=6059
2003-09-13 11:27:20 +00:00
Martin Fuchs
3d6d2f3879 removed compatibility code for old W32API headers of version 2.3
svn path=/trunk/; revision=6058
2003-09-13 10:06:18 +00:00
Vizzini
a9aabdaaf1 Patch by skywing:
- wrote RtlRaiseException user mode implementation
  - wrote KiRaiseUserExceptionDispatcher/KeRaiseUserException to raise user exceptions from kernel mode
  - implemented raise STATUS_INVALID_HANDLE-if-debugged in NtClose

svn path=/trunk/; revision=6057
2003-09-13 06:17:52 +00:00
Gé van Geldorp
4eec93eae2 (Partial) implementation of Ellipse()
svn path=/trunk/; revision=6056
2003-09-12 22:17:06 +00:00
Vizzini
f7f1fc7717 new patch for more stubs and misc changes
patch changes:
1.add mswsock.dll with stubs for allmost all functions (1 or 2 I cant get prototype of)
2.add some definitions to various header files
3.add some stubs to advapi32.dll
4.add a stub for GdiInitializeLanguagePack to gdi32.dll
5.add some stubs to iphlpapi.dll
6.add some stubs to kernel32.dll
7.add some stubs to ntdll.dll
8.add some stubs to ws2_32.dll
9.add some stub definitions to wsock32.dll
10.change wsock32.dll so that most functions redirect to ws2_32.dll or mswsock.dll (which is how microsoft does it)
11.turn -Wall -Werror on for cards
12.turn -Wall -Werror on for epsapi
13.turn -Wall -Werror on for fmifs and fix problems that resulted
14.turn -Wall -Werror on for freetype
15.turn -Wall -Werror on for vfatlib and fix problems that resulted
15.turn -Wall -Werror on for kernel32 and fix problems that resulted
16.turn -Wall -Werror on for ntdll and fix problems that resulted
17.turn -Wall -Werror on for lzexpand
18.turn -Wall -Werror on for msafd
19.turn -Wall -Werror on for psapi
20.turn -Wall -Werror on for twain
21.add some stubs to user32.dll
22.turn -Wall -Werror on for version
23.turn -Wall -Werror on for wshirda

svn path=/trunk/; revision=6055
2003-09-12 17:51:48 +00:00
Thomas Bluemel
3eff784d88 fixed some cvsignore files
svn path=/trunk/; revision=6053
2003-09-12 16:18:52 +00:00
Thomas Bluemel
a4487cceea removed winedbc dependencies
svn path=/trunk/; revision=6052
2003-09-12 13:47:59 +00:00
Thomas Bluemel
a9160ac5fd implemented a couple of scrollbar functions and fixed GetDoubleClickTime()
svn path=/trunk/; revision=6051
2003-09-12 12:54:26 +00:00
Gé van Geldorp
fd08241470 Add some SS_* styles
svn path=/trunk/; revision=6050
2003-09-11 22:32:33 +00:00
Gé van Geldorp
30d562530c Fixed typo
svn path=/trunk/; revision=6049
2003-09-11 22:11:44 +00:00
Gé van Geldorp
1a9cd2de4a Implemented SS_PATHELLIPSIS and SS_ENDELLIPSIS styles and STN_CLICKED/STN_DBLCLK
notifications

svn path=/trunk/; revision=6048
2003-09-11 22:10:16 +00:00
Vizzini
1c0adb9ffd assignment bugfix for casper
svn path=/trunk/; revision=6047
2003-09-11 20:10:33 +00:00
Eric Kohl
a0fc1a5dac - Zero DMA related data in the pseudo device extension before a new port device is detected.
- Added code to support one device-queue per LUN (disabled).
- Cleaned-up / simplified some functions.
- Started to rename internal functions to SpiXxxx.

svn path=/trunk/; revision=6046
2003-09-11 11:51:05 +00:00
Eric Kohl
892557fccc Added Adapter-Object used for PCI-Bus-Master-DMA.
svn path=/trunk/; revision=6045
2003-09-11 11:45:28 +00:00
Gé van Geldorp
89d5a30486 Implement SS_SUNKEN and SS_WORDELLIPSIS styles
svn path=/trunk/; revision=6044
2003-09-11 08:32:42 +00:00
Gé van Geldorp
f837ed21ac Handle WM_CTLCOLOR* messages
svn path=/trunk/; revision=6043
2003-09-11 08:32:06 +00:00
Gé van Geldorp
755c84cde3 Support OPAQUE text background
svn path=/trunk/; revision=6042
2003-09-10 23:16:13 +00:00
Gé van Geldorp
5bdf0b7486 Switch back to correct mode
svn path=/trunk/; revision=6041
2003-09-10 23:08:28 +00:00
Aleksey Bragin
6b54dccd23 Small bug in debug data displayed: NtGdiCreatePrimarySurface(): Fixed line "Display Driver ... loaded", now loads really loaded driver instead of always first on the list.
svn path=/trunk/; revision=6040
2003-09-10 21:06:26 +00:00
Aleksey Bragin
e9d5901d8b NtGdiRealizePalette(): Unlock palettes prior to call to IntEngCreateXlate(). (prevents double-lock)
svn path=/trunk/; revision=6039
2003-09-10 21:03:18 +00:00
Aleksey Bragin
156ce01884 Small program to test ReactOS palette support in bitblt operations (Crashes on ROS for now, I'll commit patches to ROS later to fix this).
svn path=/trunk/; revision=6038
2003-09-10 20:15:46 +00:00
Gé van Geldorp
2d66ad555c Fix caption text width
svn path=/trunk/; revision=6037
2003-09-10 18:18:25 +00:00
Thomas Bluemel
5e5352278f added file version resource to riched32 and changed makefile to automatically build the riched32.dll
svn path=/trunk/; revision=6036
2003-09-10 15:30:53 +00:00
Vizzini
3a5cac081a cvsignores and commented out softice
svn path=/trunk/; revision=6035
2003-09-10 15:28:53 +00:00
Thomas Bluemel
233a78a636 added cvs ignore file
svn path=/trunk/; revision=6034
2003-09-10 14:41:29 +00:00
Thomas Bluemel
4d3bedb140 added richedit.h so the richedit control can be compiled
svn path=/trunk/; revision=6033
2003-09-10 14:39:33 +00:00
Gé van Geldorp
8636ea85a9 Let the mouse cursor go where it hasn't gone before: right and lower edge
of the screen

svn path=/trunk/; revision=6032
2003-09-10 07:24:31 +00:00
Vizzini
413af2c984 patch by Skywing: made existing eventpair code more efficient and added support for associating eventpairs with
threads and signaling them that way

svn path=/trunk/; revision=6031
2003-09-10 06:12:22 +00:00
Gé van Geldorp
05023f216e Limit cursor clip region to desktop region
svn path=/trunk/; revision=6030
2003-09-09 20:10:38 +00:00
Gé van Geldorp
7479009d8c Properly offset client-relative update rectangle
svn path=/trunk/; revision=6029
2003-09-09 20:06:58 +00:00
Gé van Geldorp
e34b503bd2 Remove debug breakpoint
svn path=/trunk/; revision=6028
2003-09-09 15:56:06 +00:00
Gé van Geldorp
860af295a0 Add RoundRect test (patch by Royce3)
svn path=/trunk/; revision=6027
2003-09-09 15:50:46 +00:00
Gé van Geldorp
213461d136 RoundRect() implementation by Royce3
svn path=/trunk/; revision=6026
2003-09-09 15:49:59 +00:00
Gé van Geldorp
93e8262300 Add KFLOATING_STATE
svn path=/trunk/; revision=6025
2003-09-09 14:51:41 +00:00
Gé van Geldorp
216280ce74 Naive implementation of Ke(Save/Restore)FloatingPointState
svn path=/trunk/; revision=6024
2003-09-09 14:50:19 +00:00
Gé van Geldorp
f7cd42043b Mark ScreenDeviceContext as local before destroying it
svn path=/trunk/; revision=6023
2003-09-09 10:57:03 +00:00
Gé van Geldorp
840130bc87 .cvsignore maintenance
svn path=/trunk/; revision=6022
2003-09-09 09:43:46 +00:00
Gé van Geldorp
c0339cdb1b Show which areas are being repainted
svn path=/trunk/; revision=6021
2003-09-09 09:40:19 +00:00
Gé van Geldorp
db573c519a Fixes to WinPosSetWindowPos() and the routines it depends upon
svn path=/trunk/; revision=6020
2003-09-09 09:39:21 +00:00
Vizzini
a5743bd648 code cleanup, lots of little bugfixes, implemented MiniportHandleISR
svn path=/trunk/; revision=6019
2003-09-09 04:42:21 +00:00
Steven Edwards
d34f9a0679 Sorry about that. the COPYING file is a copy of the GPL.
svn path=/trunk/; revision=6018
2003-09-08 19:25:50 +00:00
Thomas Bluemel
5f42375644 fixed drawing the window frame so there's a line between client area and caption bar
svn path=/trunk/; revision=6017
2003-09-08 18:50:00 +00:00
Steven Edwards
3551d4488a Added a copy of the GPL. Just to make it clear some parts of ReactOS
are GPL others are LGPL so we ship a copy of both licenses for now.

svn path=/trunk/; revision=6016
2003-09-08 18:27:53 +00:00
Gé van Geldorp
afb6548beb #include stddef.h in winsock2.h
svn path=/trunk/; revision=6015
2003-09-08 17:19:55 +00:00
Thomas Bluemel
205f58421e implemented calculating of tracking thumb in scrollbars
svn path=/trunk/; revision=6014
2003-09-08 15:08:56 +00:00
Gé van Geldorp
eca8e8ad7c winsock2.h now depends on stddef.h
svn path=/trunk/; revision=6013
2003-09-08 13:20:15 +00:00
Thomas Bluemel
569f26e923 changes in this patch by Jonathon Wilson:
1.add some definitions to ascii.h
2.add some definitions to base.h
3.add some definitions to defines.h
4.add some definitions to funcs.h
5.add some definitions to structs.h
6.add some definitions to unicode.h
7.add some definitions to winsock2.h
8.fix it so that the ACCESS_MODE definition in ntos\security.h is only visible in kernel mode
9.add lots of stubs to advapi32.dll (some stuff from appmgmt.h, winsafer.h, evntrace.h, winefs.h, sddl.h, wincred.h & mschapp.h still to be added)
10.add a bunch of stubs to iphlpapi.dll
11.modify kernel32.dll so that certain functions are forwarded to ntdll.dll instead of being stubs in kernel32.dll
12.modify lz32.dll so that everything points at kernel32.dll
13.fix msafd.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
14.add stubs for SendIMEMessageExW and SendIMEMessageExA to user32.dll
15.add some stubs to ws2_32.dll
16.rename WahCreateNotificationTable to WahCreateNotificationHandle in ws2help.dll (WahCreateNotificationHandle is what microsoft calls it)
17.fix ws2help.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
18.fix wshirda.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
19.fix wsock32\stubs.c to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
20.add some stubs/fix some others for wsock32.dll
21.add some stubs to secur32.dll (more to come when I get sspi.h, secext.h & ntsecpkg.h)
22.add stubs for GetConsoleKeyboardLayoutNameA & GetConsoleKeyboardLayoutNameW to kernel32
23.add stub for SetupChangeFontSize to syssetup.dll
24.add some header files from WINE (related to advapi, secur32 and others)
and 25.made lsass\ntsecapi.h redundant (the stuff that was in it is now in the WINE ntsecapi.h). Therefore, it should probobly be removed.

There are also a bunch of things in the defs/edfs that are there but commented out. This is because I have yet to find the prototype for them.

svn path=/trunk/; revision=6012
2003-09-08 09:56:57 +00:00
Thomas Bluemel
19c18b7f2c added hittesting for scrollbars and fixed passing the cursor coordinates to NCL messages
svn path=/trunk/; revision=6011
2003-09-08 02:14:20 +00:00
Martin Fuchs
61009dcbf6 Version 0.1.3.7
svn path=/trunk/; revision=6010
2003-09-07 22:00:02 +00:00
Eric Kohl
7bc7cff30d Fixed the button label bug.
svn path=/trunk/; revision=6009
2003-09-07 17:36:40 +00:00
Eric Kohl
55f95cb4b1 Fixed COLOR_WINDOWFRAME and COLOR_WINDOW system color. Default buttons and checkboxes look better now.
svn path=/trunk/; revision=6008
2003-09-07 17:35:15 +00:00
Eric Kohl
4d237d4e7c Removed checkbox bitmap loading code and hardcoded checkbox size.
Checkboxes are visible now.

svn path=/trunk/; revision=6007
2003-09-07 13:16:55 +00:00
Thomas Bluemel
1a1d4a8874 added syscall NtUserGetScrollInfo() and fixed nonclient hittest for caption buttons
svn path=/trunk/; revision=6006
2003-09-07 11:52:54 +00:00
Eric Kohl
f54139ad6e Do not link against ntdll.
svn path=/trunk/; revision=6005
2003-09-07 11:17:51 +00:00
Thomas Bluemel
76286b9a50 renamed and fixed a few functions regarding scrollbars
svn path=/trunk/; revision=6004
2003-09-07 09:55:52 +00:00
James Tabor
94b5d29d89 Implement temp GetEnhMetaFilePixelFormat
svn path=/trunk/; revision=6003
2003-09-06 19:44:00 +00:00
James Tabor
cd39c464f2 Implementing OpenGl support
svn path=/trunk/; revision=6002
2003-09-06 19:04:56 +00:00
Thomas Bluemel
62847198aa fixed disabled caption buttons bug
svn path=/trunk/; revision=6001
2003-09-06 16:59:30 +00:00
James Tabor
81b36f5903 Implementing OpenGl support
svn path=/trunk/; revision=6000
2003-09-06 16:50:11 +00:00
Thomas Bluemel
625bd1a280 better handling of caption buttons
svn path=/trunk/; revision=5999
2003-09-06 14:30:21 +00:00
Vizzini
e1f57fd5f7 added pcnet to make system and added unix installation script
svn path=/trunk/; revision=5997
2003-09-06 02:19:39 +00:00
Vizzini
8ed19da5a8 *** empty log message ***
svn path=/trunk/; revision=5996
2003-09-06 02:01:40 +00:00
Gé van Geldorp
0320c0fcc2 Allow serial mouse driver and COM debug output to coexist peacefully.
Patch by Filip Navara

svn path=/trunk/; revision=5995
2003-09-05 15:55:47 +00:00
Eric Kohl
31b2a95597 - Implemented ScsiPortGetPhysicalAddress() (incomplete).
- Implemented ScsiPortGetVirtualAddress().

svn path=/trunk/; revision=5994
2003-09-05 15:05:52 +00:00
Eric Kohl
7070f0804a Copy .nls files without renaming them. Bochs users can use DOS and Loadros or FreeLoader to boot ReactOS.
svn path=/trunk/; revision=5993
2003-09-05 15:03:38 +00:00
Eric Kohl
8cfd3cac0b Implemented ScsiPortGetUncachedExtension().
svn path=/trunk/; revision=5992
2003-09-05 11:48:03 +00:00
Vizzini
b078e28da7 returned debug level to MIN_TRACE
svn path=/trunk/; revision=5991
2003-09-05 06:25:44 +00:00
Vizzini
aa20c8ca0e several new APIs courtesy of Royce3
svn path=/trunk/; revision=5990
2003-09-05 06:18:26 +00:00
Vizzini
1a6db07631 re-worked ndis to do device detection from a win2k-style registry enum database, added debugging aids, commented, began to stub support for deserialized miniports
svn path=/trunk/; revision=5989
2003-09-05 05:44:53 +00:00
Vizzini
2ef78d9833 switched to mapped port i/o from immediate i/o, having solved the port mapping problem in ndis
svn path=/trunk/; revision=5988
2003-09-05 05:40:42 +00:00
Vizzini
3f8dab56a1 registry format change for new ndis device detection
svn path=/trunk/; revision=5987
2003-09-05 05:39:43 +00:00
Vizzini
646d02c426 orphan adapter list
svn path=/trunk/; revision=5986
2003-09-05 02:29:07 +00:00
Vizzini
1683474c77 fix broken build
svn path=/trunk/; revision=5985
2003-09-05 01:59:30 +00:00
Eric Kohl
9d8179a6c8 - Implemented LUN-Extensions.
- Moved Inquiry-Data from Port-Extension to LUN-Extensions.

svn path=/trunk/; revision=5984
2003-09-04 23:33:55 +00:00
Emanuele Aliberti
a7793b4ec9 Simple Win32 caption clock.
It exposes a bug possibly in win32k.sys which causes a system crash.

svn path=/trunk/; revision=5983
2003-09-04 21:33:11 +00:00
Vizzini
7377c5fe18 missed one
svn path=/trunk/; revision=5982
2003-09-04 16:52:10 +00:00
Eric Kohl
74ef9cda04 Search for all logical units (LUNs) of a SCSI target.
svn path=/trunk/; revision=5981
2003-09-04 11:30:42 +00:00
Vizzini
4517f7f992 added NdisMAllocateSharedMemory and NdisMFreeSharedMemory and fixed a couple minor bugs
svn path=/trunk/; revision=5980
2003-09-04 07:01:51 +00:00
Vizzini
dc354a8e32 implemented NdisMAllocateMapRegisters, NdisMFreeMapRegisters, NdisMQueryMapRegisterCount, and NdisMRegisterIoPortRange
svn path=/trunk/; revision=5979
2003-09-04 06:59:48 +00:00
Vizzini
f82864342a added object and added -Wall
svn path=/trunk/; revision=5978
2003-09-04 06:55:21 +00:00
Vizzini
7f9734c8df couple of new data structs and changes to LOGICAL_ADAPTER struct for resource tracking, dma, etc.
svn path=/trunk/; revision=5977
2003-09-04 06:53:31 +00:00
Vizzini
ce2f631b26 implemented NdisMPciAssignResources and fixed several string length bugs
svn path=/trunk/; revision=5976
2003-09-04 06:51:31 +00:00
Vizzini
0e0fac5636 fixed a potential 0-pointer deref
svn path=/trunk/; revision=5975
2003-09-04 06:47:37 +00:00
Vizzini
f0496db9c5 implemented HalAllocateCommonBuffer
svn path=/trunk/; revision=5974
2003-09-04 06:45:38 +00:00
Vizzini
02ee3e3600 fixed RtlUnicodeStringToInteger
svn path=/trunk/; revision=5973
2003-09-04 06:41:35 +00:00
Vizzini
908c5df187 added NdisRawXXX prototypes and moved callback function prototypes to stdcall
svn path=/trunk/; revision=5972
2003-09-04 06:35:20 +00:00
Vizzini
a26b8ceda1 nic enumerator
svn path=/trunk/; revision=5971
2003-09-04 01:45:42 +00:00
Vizzini
8a5da02367 started pcnet driver - incomplete but builds and loads
svn path=/trunk/; revision=5970
2003-09-03 23:59:56 +00:00
Eric Kohl
fef7f78541 Implemented device enumeration in QueryDosDeviceW().
svn path=/trunk/; revision=5969
2003-09-03 22:28:40 +00:00
Eric Kohl
89fc578c5f Fixed signature of [Nt/Zw]QueryDirectoryObject().
svn path=/trunk/; revision=5968
2003-09-03 20:16:06 +00:00
Eric Kohl
a1f144f35b Implemented/fixed QueryDosDevice[A/W].
svn path=/trunk/; revision=5967
2003-09-03 16:16:04 +00:00
Eric Kohl
c9313c9b83 Fixed bugs in NtQuerySymbolicLinkObject():
- fixed returned length and status

svn path=/trunk/; revision=5966
2003-09-03 15:12:16 +00:00
Eric Kohl
1aace81264 - Fixed calculation of the number of FAT sectors.
- Write disk label as Oem string.
- Moved hidden sector hack to vfatlib.c

svn path=/trunk/; revision=5965
2003-09-03 10:06:39 +00:00
Eric Kohl
dc6fc3e540 Export missing FreeOemString().
svn path=/trunk/; revision=5964
2003-09-03 10:03:50 +00:00
Martin Fuchs
3205402fac print KERNEL_VERSION_STR
svn path=/trunk/; revision=5963
2003-09-02 21:23:47 +00:00
Emanuele Aliberti
190fc39af4 HALx86: minor cleanup and internal calling convention changes in display functions.
svn path=/trunk/; revision=5962
2003-09-02 20:11:43 +00:00
Hartmut Birr
ed80957cfc - Don't put the digits strings on the stack.
svn path=/trunk/; revision=5961
2003-09-02 18:19:41 +00:00
Eric Kohl
14dfbc088a Added some splay-tree functions.
svn path=/trunk/; revision=5960
2003-09-02 13:18:22 +00:00
Eric Kohl
e3b6ff8479 Added some splay-tree functions.
svn path=/trunk/; revision=5959
2003-09-02 11:21:59 +00:00
Eric Kohl
f6ee216aae Added some splay-tree functions.
svn path=/trunk/; revision=5958
2003-09-02 11:14:15 +00:00
Eric Kohl
ed2e90a9e8 Implemented creation of simple cabinet files (one file per cabinet).
svn path=/trunk/; revision=5957
2003-09-01 15:43:25 +00:00
Eric Kohl
3882add234 The used FAT-type (FAT12/FAT16/FAT32) depends on the volume size, not on the partition type.
svn path=/trunk/; revision=5956
2003-09-01 13:15:42 +00:00
Steven Edwards
f61bbf368c Merge richedit.dll with Winehq. 8-31-03.
Ported by Filip Navara.

svn path=/trunk/; revision=5955
2003-08-31 21:33:32 +00:00
Richard Campbell
c49c4f3c5e - size of the close bitmap is now 16x14, i'd like to convert this to an icon like it's supposed to be, do we have icon support yet?
svn path=/trunk/; revision=5954
2003-08-31 14:25:28 +00:00
Gé van Geldorp
13dddecf2d Check hDC handle is valid before accessing its data
svn path=/trunk/; revision=5953
2003-08-31 13:24:38 +00:00
Martin Fuchs
7c9e70178a Wine workaround for displaying the desktop bar
svn path=/trunk/; revision=5952
2003-08-31 12:37:43 +00:00
Gé van Geldorp
cbd7a663c8 More bitmap format translation bugs
svn path=/trunk/; revision=5951
2003-08-31 10:20:33 +00:00
Gé van Geldorp
f62b36b0f1 - Fix various bitmap format translation bugs
- Fix some palette issues
- Fix some gdiobj locking warnings

svn path=/trunk/; revision=5950
2003-08-31 07:56:24 +00:00
nj
e9170f21ca Version 0.1.3
svn path=/trunk/; revision=5948
2003-08-30 22:14:42 +00:00
Martin Fuchs
d347dec099 Wine cleanup
svn path=/trunk/; revision=5947
2003-08-30 21:05:22 +00:00
Martin Fuchs
c2a5e8e44e compatibility to building as Winelib application
svn path=/trunk/; revision=5946
2003-08-30 20:48:21 +00:00
Casper Hornstrup
d88ab5ba6e Readd bootimage.bmp in binary mode.
svn path=/trunk/; revision=5945
2003-08-30 20:09:45 +00:00
Casper Hornstrup
283cd3b65a Readd bootimage.bmp in binary mode.
svn path=/trunk/; revision=5944
2003-08-30 20:07:09 +00:00
Casper Hornstrup
5e27514ba7 2003-08-30 Filip Navara <xnavara@volny.cz>
* tools/cabman/cabinet.cxx (CCabinet::ConvertPath): NULL-terminate
	newpath.

svn path=/trunk/; revision=5943
2003-08-30 19:22:32 +00:00
Thomas Bluemel
653c134ed1 some fixes on MessageBox code
svn path=/trunk/; revision=5942
2003-08-30 18:38:08 +00:00
Steven Edwards
449c82d834 Added stubs to iphlpapi that are needed by netapi32.
svn path=/trunk/; revision=5941
2003-08-30 15:27:42 +00:00
Richard Campbell
e388dadfac replaced tab with 2 spaces.
svn path=/trunk/; revision=5940
2003-08-30 15:09:46 +00:00
Richard Campbell
a18c29c6fb - Removed the loop from UNIMPLEMENTED and changed the text a bit
svn path=/trunk/; revision=5939
2003-08-30 15:04:34 +00:00
Hartmut Birr
335e8718f7 - Reference/dereference the parent key in CmiObjectDelete.
The call to CmiRemoveKeyFromList does dereference the parent and
  it is possible that the parent key is deleted before the
  subkey delete process is complete.

svn path=/trunk/; revision=5938
2003-08-30 14:51:05 +00:00
Hartmut Birr
5a6cf4163c - Use the parents registry hive if the parent is accessed in CmiRemoveSubKey.
svn path=/trunk/; revision=5937
2003-08-30 14:50:23 +00:00
Hartmut Birr
72bb12e96c - Allocate a separate name buffer in RtlQueryRegistryValues.
- Fixed a name parameter in a call to the callers supplied query routine.

svn path=/trunk/; revision=5936
2003-08-30 14:49:41 +00:00
Hartmut Birr
ee8ef2cacf - Fixed the enumeration of subkeys for which doesn't exist a hash entry.
- Fixed the enumeration of the length of all sub key and class names.

svn path=/trunk/; revision=5935
2003-08-30 14:49:03 +00:00
Hartmut Birr
249cdd634d - Copied some changes from wine tree.
svn path=/trunk/; revision=5934
2003-08-30 14:48:07 +00:00
Hartmut Birr
e1a7ba7e86 - Changed the attributes in all calls to NtOpenKey from KEY_ALL_ACCESS to MAXIMUM_ALLOWED.
- Fixed in some function the length of the allocated buffer and the returned values.
  The Ntxxx functions doesn't return a zero terminator for strings.

svn path=/trunk/; revision=5933
2003-08-30 14:46:29 +00:00
Eric Kohl
45d8282507 Reset last error before moving the file pointer.
svn path=/trunk/; revision=5932
2003-08-30 13:32:52 +00:00
Martin Fuchs
b69868a964 WINE build compatibility
svn path=/trunk/; revision=5931
2003-08-30 11:30:18 +00:00
Casper Hornstrup
2566f13f3e 2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rmkdir.c: Fix for absolute paths.

svn path=/trunk/; revision=5930
2003-08-30 00:59:11 +00:00
Casper Hornstrup
b6a3594f0e 2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rmkdir.c: Create all (sub)directories in path on win32.

svn path=/trunk/; revision=5929
2003-08-29 23:32:56 +00:00
Richard Campbell
8d9c42a241 Added vera fonts.
svn path=/trunk/; revision=5928
2003-08-29 23:08:10 +00:00
Casper Hornstrup
b80c0dd41c 2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* bootdata/packages/reactos.dff: Don't include winmm.dll in reactos.cab.

svn path=/trunk/; revision=5927
2003-08-29 22:56:18 +00:00
Richard Campbell
c87861cbec Use Vera instead of helmet for drawing menus, button captions, etc. Please note i wasn't able to TEST this patch but there is no possible way it doesn't work.
svn path=/trunk/; revision=5926
2003-08-29 21:53:50 +00:00
David Welch
88cdb96043 - Fix from art: use the region protection for faulted in pages.
svn path=/trunk/; revision=5925
2003-08-29 21:23:06 +00:00
David Welch
eebe1ed001 - Removed test code.
svn path=/trunk/; revision=5924
2003-08-29 21:22:24 +00:00
Thomas Bluemel
b8025b214f modified MsqTranslateMouseMessage() for Double clicks
svn path=/trunk/; revision=5922
2003-08-29 19:17:32 +00:00
Casper Hornstrup
37f50a72e5 2003-08-29 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Copy freeloader files to bootable CD.

svn path=/trunk/; revision=5921
2003-08-29 18:59:29 +00:00
Casper Hornstrup
e0351c91f1 - Add top-level makefile
- Add fdebug/.cvsignore
- Don't use rdel to remove files in tools/Makefile
- Remove warning in freeldr/mm/meminit.c

svn path=/trunk/; revision=5920
2003-08-29 18:54:17 +00:00
Martin Fuchs
5b3f0e0806 Now we handle start menu popups via StartMenuRoot::TrackStartmenu().
svn path=/trunk/; revision=5919
2003-08-29 14:52:57 +00:00
Gé van Geldorp
5db07c0a15 Fixed NtGdiCreateCompatableDC()
svn path=/trunk/; revision=5918
2003-08-29 12:28:24 +00:00
Eric Kohl
b4b3b303fe Keep users from deleting partitions in special cases that will damage partition tables.
svn path=/trunk/; revision=5917
2003-08-29 11:27:16 +00:00
Gé van Geldorp
5348dfac81 Allocate space for terminating NUL of window text
svn path=/trunk/; revision=5916
2003-08-29 11:00:19 +00:00
Martin Fuchs
ed65784cec multithreading for class Window; usage of window map insted of GWL_USERDATA
svn path=/trunk/; revision=5915
2003-08-29 10:35:37 +00:00
Gé van Geldorp
9665ee6bdb Handle non-nul terminated strings
svn path=/trunk/; revision=5914
2003-08-29 10:20:53 +00:00
Gé van Geldorp
3c1664946f Fix warning
svn path=/trunk/; revision=5913
2003-08-29 09:34:52 +00:00
Gé van Geldorp
6f5012a900 Various fixes by Filip Navara
svn path=/trunk/; revision=5912
2003-08-29 09:29:11 +00:00
Thomas Bluemel
12c2e7f892 fixed the definition of User32SetupDefaultCursors()
svn path=/trunk/; revision=5911
2003-08-29 08:46:20 +00:00
Thomas Bluemel
502394d4ce 1.added callback routine for loading system cursors after switching to gui (not implemented so far)
2.added CopyCursor() which didn't exist as yet

svn path=/trunk/; revision=5910
2003-08-29 00:24:42 +00:00
Gé van Geldorp
62a4b07158 Fix ellipsis in e.g. window captions
svn path=/trunk/; revision=5909
2003-08-28 21:40:26 +00:00
Emanuele Aliberti
24315e0593 PSX: POSIXW32: I updated a note about creating a PSX process from W32.
svn path=/trunk/; revision=5908
2003-08-28 20:01:23 +00:00
Martin Fuchs
1eea5d2dac set TTN_ALWAYS for quicklaunch icons
svn path=/trunk/; revision=5907
2003-08-28 19:59:14 +00:00
Gé van Geldorp
eee0086bc9 Serial mouse driver rewrite by Filip Navara
svn path=/trunk/; revision=5906
2003-08-28 19:44:00 +00:00
Gé van Geldorp
d6a2479e6a Fix PolyPolygon and PolyPolyline (patch by Jonathan Wilson)
svn path=/trunk/; revision=5905
2003-08-28 19:41:37 +00:00
Martin Fuchs
34a1adfed2 Implemented control panel window in cabinet view mode.
svn path=/trunk/; revision=5904
2003-08-28 19:38:17 +00:00
Gé van Geldorp
c954ec53c5 Stubs for newer functions (patch by Jonathan Wilson)
svn path=/trunk/; revision=5903
2003-08-28 19:37:00 +00:00
Gé van Geldorp
31393a210e Implement LZ functions (patch by Jonathan Wilson)
svn path=/trunk/; revision=5902
2003-08-28 19:34:10 +00:00
Gé van Geldorp
8975cb766b Cleaned up too much.... Sorry
svn path=/trunk/; revision=5901
2003-08-28 19:24:28 +00:00
Martin Fuchs
d1a58a026b Implemented control panel window in cabinet view mode.
svn path=/trunk/; revision=5900
2003-08-28 19:13:48 +00:00
Thomas Bluemel
7a0c1b40d1 1. implemented GetDoubleClickTime() and SetDoubleClickTime()
2. implemented SM_CXDOUBLECLK, SM_CYDOUBLECLK and SM_SWAPBUTTON for GetSystemMetrics()
3. implemented NtUserSystemParametersInfo() partially
4. implemented SPI_SETDOUBLECLKWIDTH, SPI_SETDOUBLECLKHEIGHT and SPI_SETDOUBLECLICKTIME for SystemParametersInfo()

svn path=/trunk/; revision=5899
2003-08-28 18:04:59 +00:00
Thomas Bluemel
303749022b implemented support for double clicks
svn path=/trunk/; revision=5898
2003-08-28 16:33:22 +00:00
Thomas Bluemel
9719db631e implemented SwapMouseButton()
svn path=/trunk/; revision=5897
2003-08-28 14:22:05 +00:00
Martin Fuchs
6381c3ac66 Implemented control panel window in cabinet view mode.
svn path=/trunk/; revision=5896
2003-08-28 14:20:05 +00:00
Gé van Geldorp
063d8646a9 .cvsignore maintenance
svn path=/trunk/; revision=5895
2003-08-28 14:00:22 +00:00
Gé van Geldorp
3a922d8d38 Fix double locking of DC
svn path=/trunk/; revision=5894
2003-08-28 13:50:49 +00:00
Gé van Geldorp
e9b3a79c09 Silence debug messages
svn path=/trunk/; revision=5893
2003-08-28 13:38:24 +00:00
Gé van Geldorp
4ab5d75768 Create palette handles as gdiobj handles which can be used by usermode
svn path=/trunk/; revision=5892
2003-08-28 12:35:59 +00:00
Thomas Bluemel
1847e2839e implemented drawing menu bar
svn path=/trunk/; revision=5891
2003-08-28 10:39:44 +00:00
Martin Fuchs
926aaa42ea control panel start entry
svn path=/trunk/; revision=5890
2003-08-28 08:19:50 +00:00
Thomas Bluemel
9cfd31e787 changed menu code to use UNICODE_STRING
svn path=/trunk/; revision=5889
2003-08-27 22:58:12 +00:00
David Welch
22f4e1ae9e - Forgot these two files.
svn path=/trunk/; revision=5888
2003-08-27 21:30:37 +00:00
David Welch
9231f7b9a2 - Added support for crash dumps:-
* Recognize the option /CRASHDUMP on the kernel command line to specify
the type of dump desired.
* Added a new driver (diskdump) which wraps the miniport for the disk
containing the pagefile and does the crash dump i/o.
* Added a FSCTL to get the mapping between LCNs and disk offsets so
crash dumps don't need to go through the filesystem.

svn path=/trunk/; revision=5887
2003-08-27 21:28:08 +00:00
David Welch
1d47b45a53 - Removed kernel private includes.
svn path=/trunk/; revision=5886
2003-08-27 21:21:59 +00:00
Martin Fuchs
49f689ef95 partly implemented control panel window
svn path=/trunk/; revision=5885
2003-08-27 21:07:33 +00:00
David Welch
f97528ca2d - Added .cvsignore file.
svn path=/trunk/; revision=5884
2003-08-27 20:59:35 +00:00
David Welch
9768ea066d - Fix for completion of file system control IRPs.
svn path=/trunk/; revision=5883
2003-08-27 20:57:09 +00:00
David Welch
927f2ae503 - Implement backspace control code in hal output.
svn path=/trunk/; revision=5882
2003-08-27 20:56:26 +00:00
Martin Fuchs
e092af6dee clock tool tips
svn path=/trunk/; revision=5881
2003-08-27 15:52:03 +00:00
Martin Fuchs
3bd933579b idea-update
svn path=/trunk/; revision=5880
2003-08-27 15:47:53 +00:00
Martin Fuchs
44eb89d031 Implemented launching of date/time control panel applet
svn path=/trunk/; revision=5879
2003-08-27 10:00:26 +00:00
Steven Edwards
8a964fafb7 New header from WINE for regression test suite.
svn path=/trunk/; revision=5878
2003-08-27 05:09:58 +00:00
Steven Edwards
c4f4234af6 Did some work implementing rpcrt4.dll so we can make use of the UUID
creation functions for other dlls we need to port. The other 90% of wines
rpc client and server code wont compile but this should be all we need for
a while.

Added regression test.

svn path=/trunk/; revision=5877
2003-08-27 05:07:19 +00:00
Steven Edwards
bac8e6e44e Imported imm32.dll from Winehq CVS 8-26-03
Needed for OpenOffice. (No it wont work yet.)

svn path=/trunk/; revision=5876
2003-08-27 03:11:40 +00:00
Martin Fuchs
2d0cf5cb61 Implemented Tooltip Popup for Clock to display current date
svn path=/trunk/; revision=5875
2003-08-26 22:37:20 +00:00
Thomas Bluemel
51b70de9b7 1. finally fixed handling the WM_MOUSEMOVE messages, credits go to Royce :)
2. Now passing cursor's hotspot position to SetPointerShape

svn path=/trunk/; revision=5874
2003-08-26 19:26:02 +00:00
Martin Fuchs
d239b6fbb7 added hostobjs dir to .cvsignore
svn path=/trunk/; revision=5873
2003-08-26 17:56:22 +00:00
David Welch
698ab100bb - Fixed slashes.
svn path=/trunk/; revision=5872
2003-08-26 16:36:33 +00:00
Martin Fuchs
5207a6524e Implemented Search and Shut Down in startmenu by calling undocumentd shell32 fucntions
svn path=/trunk/; revision=5871
2003-08-26 15:51:17 +00:00
Steven Edwards
93082694f4 end of line fix
svn path=/trunk/; revision=5870
2003-08-26 14:17:01 +00:00
Richard Campbell
9efc96ea08 - Figured i'd go ahead and commit these changes...reduces the cludge that is shell32.dll under ROS. Still needs ALOT of work (which i actually plan on doing :) )
svn path=/trunk/; revision=5869
2003-08-26 13:44:12 +00:00
David Welch
4825f80147 - Add the boot video driver to the system hive.
svn path=/trunk/; revision=5868
2003-08-26 12:48:47 +00:00
Thomas Bluemel
7e89d485f3 big patch by Jonathon Wilson for GDI32 & related stuff
changes are:
1.add some new functions to ascii.h and unicode.h
2.add some definitions to base.h
3.add a bunch of functions to funcs.h
4.add a few structures to structs.h
5.add definitions for some missing stuff to winddi.h
6.general fixes and updates to structures and definitions in winddi.h
7.add some other structures and definitions to winddi.h
8.add some Engxxx functions to winddi.h
9.a small fix in crtdll.def
10.add all the new defs to gdi32.def and gdi32.edf
11.add all the new stubs to gdi32 stubs.c
12.implement PolyPolygon and PolyPolyline
13.some fixes to msafd.def/msafd.edf
14.change WahCloseNotificationHelper to WahCloseNotificationHandleHelper in ws2help to match the microsoft definition
15.add d3d.h, d3dcaps.h, d3dtypes.h, ddraw.h, d3dhal.h, ddrawi.h to include and include\ddk (needed for the GdiEntryxx and DdEntryxx functions in gdi32.dll). Headers are modified versions of those from WINE (stuff removed that wont compile without OLE headers, some stuff added)
16.add ddentry.h which is used with the DdEntry and GdiEntry functions
and 17.fix some stuff in stubs.c of win32k

A fair few of these definitions could be wrong (some of them are educated guesses, like some of the Gdixxx functions)
If anyone has any corrections, any answers for the FIXMEs and structures I dont have definitions for, definitions for the remaining stuff in gdi32.def with a ; in front of it or whatever, do let me know.
Or if anyone wants to comment about my changes, please let me know.

svn path=/trunk/; revision=5867
2003-08-26 12:28:53 +00:00
Thomas Bluemel
0a74c43706 due to reports in the mailing list i fixed this file
svn path=/trunk/; revision=5866
2003-08-26 09:18:26 +00:00
Thomas Bluemel
692a8afd47 fixed a bug crashing the kernel when moving the cursor while returning to the console
svn path=/trunk/; revision=5865
2003-08-26 00:33:53 +00:00
Thomas Bluemel
a38845b010 disabled new code...
svn path=/trunk/; revision=5864
2003-08-26 00:06:16 +00:00
Steven Edwards
2832cd4e05 Added make and install for cards.dll
svn path=/trunk/; revision=5863
2003-08-25 23:56:58 +00:00
Thomas Bluemel
044494cbcd fixed a few bugs in MsqInsertSystemMessage() and improved moving mouse cursor
svn path=/trunk/; revision=5862
2003-08-25 23:55:46 +00:00
Steven Edwards
877b6f0c22 Forgot this
svn path=/trunk/; revision=5861
2003-08-25 23:41:55 +00:00
Steven Edwards
f4722f2cd8 Added cards.dll by Filip Navara with some minor changes I had to make
to merge with winehq.

svn path=/trunk/; revision=5860
2003-08-25 23:35:36 +00:00
Richard Campbell
5d01a60b97 - Solitaire now works partially, patch by Filip Navara
svn path=/trunk/; revision=5859
2003-08-25 23:24:03 +00:00
Andrew Greenwood
2721685576 * This is a TEMPORARY commit of some WINMM stubs to get comctl32 to compile, as requested by Steven. I am going to continue working on porting this over from WINE, but won't commit my changes until it compiles and links properly.
svn path=/trunk/; revision=5858
2003-08-25 22:41:26 +00:00
David Welch
5265ea1787 - Patch from Art Yerkes: return access violation on PAGE_NOACCESS memory.
svn path=/trunk/; revision=5857
2003-08-25 19:26:10 +00:00
Hartmut Birr
238889e049 - The pool lock should be acquired before any tests start (pool verify or red zone test).
svn path=/trunk/; revision=5856
2003-08-25 18:51:50 +00:00
Hartmut Birr
54867f2910 - Fixed a buffer overflow.
svn path=/trunk/; revision=5855
2003-08-25 18:24:20 +00:00
Martin Fuchs
cd92a2363b calculate taskbar size
svn path=/trunk/; revision=5854
2003-08-25 17:01:38 +00:00
Thomas Bluemel
15ccb1b4be fixed MsqInsertSystemMessage()
svn path=/trunk/; revision=5853
2003-08-25 14:54:06 +00:00
Thomas Bluemel
9acc460ae1 modified MsqInsertSystemMessage() so it prevents the system message queue from having more than one WM_MOUSEMOVE message. This should improve moving windows and reduce sending unnecessary WM_MOUSEMOVE messages to applications
svn path=/trunk/; revision=5852
2003-08-25 14:26:30 +00:00
Martin Fuchs
7b2f150c3c moved explorer.lst ti winefile dir
svn path=/trunk/; revision=5851
2003-08-25 13:54:10 +00:00
David Welch
c702fb192b - Only set up the registers that are needed for fading in the palette.
Fixes compatibility problems.

svn path=/trunk/; revision=5850
2003-08-25 12:27:45 +00:00
David Welch
0fb5176276 - Fixed DAC mask register definition.
svn path=/trunk/; revision=5849
2003-08-25 12:26:50 +00:00
Eric Kohl
aa839bb4ed Removed trailing newline. This could have caused some trouble.
svn path=/trunk/; revision=5848
2003-08-25 12:06:29 +00:00
Eric Kohl
f9d13d1819 Disabled two debug messages.
svn path=/trunk/; revision=5847
2003-08-25 11:57:22 +00:00
Eric Kohl
d84b0927cd Changed file system decision as per Brian Palmers suggestion.
Prepare check for valid bootsectors.

svn path=/trunk/; revision=5846
2003-08-25 11:56:07 +00:00
Martin Fuchs
aee5772252 todo update
svn path=/trunk/; revision=5845
2003-08-25 09:33:24 +00:00
Hartmut Birr
17ad3ee0db - Include roscfg.h previous all other header files.
svn path=/trunk/; revision=5844
2003-08-25 09:17:12 +00:00
Hartmut Birr
d09b29c3e8 - Check always the irq trapframe's cs before delivering an user mode apc.
- Copy the irq trap frame only for apc's.

svn path=/trunk/; revision=5843
2003-08-25 09:14:09 +00:00
Steven Edwards
78b253a811 Converted some C++ comment to C style comments
svn path=/trunk/; revision=5842
2003-08-25 01:37:48 +00:00
Thomas Bluemel
94053da414 fixed a bug in NtUserClipCursor()
svn path=/trunk/; revision=5841
2003-08-25 00:51:11 +00:00
Thomas Bluemel
862a1d3afe fixed a bug that caused the mouse cursor drawing incorrectly
svn path=/trunk/; revision=5840
2003-08-25 00:28:23 +00:00
Thomas Bluemel
94b7020933 fixed bugs and completed SetCursorPos() and ClipCursor()
svn path=/trunk/; revision=5839
2003-08-24 23:52:29 +00:00
Aleksey Bragin
35a75878d6 Fixing some obvious bugs in NtGdiRealizePalette (mentioned in the email to ros-kernel list)
svn path=/trunk/; revision=5838
2003-08-24 21:45:40 +00:00
Gé van Geldorp
259639183e BuildDIBPalette fix by Filip Navara
svn path=/trunk/; revision=5837
2003-08-24 20:58:09 +00:00
David Welch
d7e545ac33 - Added in some code from XFree86 to save the vga state on the startup
and restore it on a bugcheck.

svn path=/trunk/; revision=5836
2003-08-24 20:56:16 +00:00
Martin Fuchs
5d476a06de changes-update
svn path=/trunk/; revision=5835
2003-08-24 20:27:38 +00:00
Martin Fuchs
5ccd500de1 Added romanian translation of Ciobanu Alexander.
svn path=/trunk/; revision=5834
2003-08-24 20:19:38 +00:00
Thomas Bluemel
80f8d37b53 implemented SetCursorPos() and GetCursorPos() and changes in the win32k mouse driver callback
svn path=/trunk/; revision=5833
2003-08-24 18:52:18 +00:00
Eric Kohl
096203e6dc - xHalIoReadPartitionTable() returns proper HiddenSector values.
- Disabled some debug messgages.

svn path=/trunk/; revision=5832
2003-08-24 18:07:45 +00:00
David Welch
e4259d3298 - Support 'in dx, eax'/'in imm, eax' in the v86 monitor. Fixes gui startup
on my Radeon 9000.

svn path=/trunk/; revision=5831
2003-08-24 17:22:27 +00:00
Gé van Geldorp
c157c95deb - Improve repainting after a window move
- Move child windows if their parent is moved

svn path=/trunk/; revision=5830
2003-08-24 16:20:30 +00:00
Eric Kohl
c466a4450e Added FAT12 support.
Create random volume serial numbers.

svn path=/trunk/; revision=5829
2003-08-24 16:15:31 +00:00
Hartmut Birr
26532ec2d6 - Fixed the check for printable ascii characters.
svn path=/trunk/; revision=5828
2003-08-24 16:02:52 +00:00
David Welch
9cb40ad0da - Fixed typo in SetUnhandledExceptionFilter
svn path=/trunk/; revision=5827
2003-08-24 14:49:55 +00:00
Martin Fuchs
becf23850d Added logo in start menu.
svn path=/trunk/; revision=5826
2003-08-24 13:53:40 +00:00
Martin Fuchs
eed9914cd8 added shellclasses example project
svn path=/trunk/; revision=5825
2003-08-24 13:51:11 +00:00
Martin Fuchs
fc0152a86e added VC file patterns
svn path=/trunk/; revision=5824
2003-08-24 12:27:22 +00:00
Martin Fuchs
dc72d671b1 moved plugin source from taskbar directory to winefile/plugins
svn path=/trunk/; revision=5823
2003-08-24 12:24:03 +00:00
Martin Fuchs
d5cc3b7cb3 moved plugin source from taskbar directory to winefile/plugins
svn path=/trunk/; revision=5822
2003-08-24 12:22:14 +00:00
Martin Fuchs
86c2f8cff6 added comments
svn path=/trunk/; revision=5821
2003-08-24 12:20:38 +00:00
Martin Fuchs
72898415e4 checked in shellhook source code as backup
svn path=/trunk/; revision=5820
2003-08-24 12:20:20 +00:00
David Welch
26c230dd5a - Moved boot video support to a seperate driver.
svn path=/trunk/; revision=5819
2003-08-24 12:11:13 +00:00
David Welch
d75ef2bebd - Move bootvideo support for a seperate driver.
- Use the normal HalAcquire/ReleaseDisplayOwnership mechanism to reset the
display if a bugcheck occurs while the bootimage is displayed.

svn path=/trunk/; revision=5818
2003-08-24 12:08:16 +00:00
David Welch
d2c4219caf - Support for resetting the display mode on a bug check.
svn path=/trunk/; revision=5817
2003-08-24 11:58:16 +00:00
David Welch
1c8b6bc99e - Fill in the DriverBase and DriverSize fields in the DRIVER_OBJECT structure.
svn path=/trunk/; revision=5816
2003-08-24 11:35:41 +00:00
David Welch
659245c76a - Calls the miniport's HwReset if the HAL reacquires display ownership;
don't do an int10.

svn path=/trunk/; revision=5815
2003-08-24 11:30:02 +00:00
David Welch
f85a8455cb - Return TRUE from HwInitialize
- Implement HwReset.

svn path=/trunk/; revision=5814
2003-08-24 11:28:09 +00:00
Casper Hornstrup
aa6c5c7738 2003-08-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Support creating compressed bootable CDs.
	* rules.mak (HOST_CXX, HOST_AR, CABMAN): Define.
	* bootdata/txtsetup.sif: Add Cabinets section.
	Remove files that are put in reactos.cab.
	* subsys/system/usetup/filequeue.c (SetupCloseFileQueue): Release
	memory allocated for SourceCabinet.
	(SetupQueueCopy): Support copying files in cabinets.
	(SetupCommitFileQueue): Support copying files in cabinets.
	* subsys/system/usetup/filequeue.h (SetupQueueCopy): Add SourceCabinet
	parameter.
	* subsys/system/usetup/filesup.c (SetupExtractFile): New function.
	* subsys/system/usetup/filesup.h (SetupExtractFile): Prototype.
	* subsys/system/usetup/infcache.c (InfOpenBufferedFile): New function.
	* subsys/system/usetup/infcache.h (InfOpenBufferedFile): Prototype.
	* subsys/system/usetup/makefile (TARGET_SDKLIBS): Add zlib.a.
	(TARGET_CFLAGS): Add zlib to include path.
	(TARGET_OBJECTS): Add cabinet.o.
	* subsys/system/usetup/usetup.c (PrepareCopyPageInfFile): New function.
	(PrepareCopyPage): Process Cabinets section.
	* tools/helper.mk: Support C++ applications.
	* rosbin.txt: Remove.
	* bootdata/packages: New directory.
	* bootdata/packages/reactos.dff: New file.
	* lib/zlib/Makefile.host: New file.
	* subsys/system/usetup/cabinet.c: Ditto.
	* subsys/system/usetup/cabinet.h: Ditto.
	* tools/cabman: New directory.
	* tools/cabman/.cvsignore: New file.
	* tools/cabman/cabinet.cxx: Ditto.
	* tools/cabman/cabinet.h: Ditto.
	* tools/cabman/cabman.h: Ditto.
	* tools/cabman/dff.txt: Ditto.
	* tools/cabman/dfp.cxx: Ditto.
	* tools/cabman/dfp.h: Ditto.
	* tools/cabman/main.cxx: Ditto.
	* tools/cabman/makefile: Ditto.
	* tools/cabman/makefile.win32: Ditto.
	* tools/cabman/mszip.cxx: Ditto.
	* tools/cabman/mszip.h: Ditto.
	* tools/cabman/raw.cxx: Ditto.
	* tools/cabman/raw.h: Ditto.

svn path=/trunk/; revision=5813
2003-08-24 10:36:07 +00:00
Casper Hornstrup
a60eb421a7 2003-08-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/structs.h: Apply packed attribute to the typedef, not the
	type's name.
	* include/ntos/keyboard.h: Ditto.
	* include/ntos/tss.h: Ditto.
	* include/win32k/cursoricon.h: Ditto.
	* include/win32k/math.h: Include the compiler's math.h for builtins.
	* ntoskrnl/nt/vdm.c (NtEarlyInitVdm): Avoid warning when compiling using
	GCC 3.4.

svn path=/trunk/; revision=5812
2003-08-24 10:00:12 +00:00
Martin Fuchs
a7977a2a2d Implement CTRL+ESC shortcut for poping up start menu
svn path=/trunk/; revision=5811
2003-08-24 09:44:02 +00:00
Martin Fuchs
80069f0d59 moved externals.h into winefile directory
svn path=/trunk/; revision=5810
2003-08-24 09:43:56 +00:00
Thomas Bluemel
65e70b333c added missing icon file
svn path=/trunk/; revision=5809
2003-08-24 07:58:01 +00:00
Martin Fuchs
aa77f6df20 browse drives in start menu
svn path=/trunk/; revision=5808
2003-08-24 05:04:04 +00:00
Thomas Bluemel
53ee161d92 1. ClipCursor(), GetClipCursor() in user32
2. NtUserClipCursor() and NtUserGetClipCursor() in win32k
3. moved system cursor information to WINSTATION_OBJECT
4. modified win32k mousedriver callback routine for cursor clipping

svn path=/trunk/; revision=5807
2003-08-24 01:12:16 +00:00
Steven Edwards
f9212d48c5 Fixed new tests added .cvsignore files.
Sorry about that.

svn path=/trunk/; revision=5806
2003-08-23 21:13:18 +00:00
Thomas Bluemel
7ef4a451c3 implemented NtUserGetIconSize()
svn path=/trunk/; revision=5805
2003-08-23 20:59:08 +00:00
Steven Edwards
a301bcf7df Updated patblt test and .cvsignore
svn path=/trunk/; revision=5804
2003-08-23 20:55:40 +00:00
Martin Fuchs
2de513433b work around for missing BTNS_NOPREFIX declaration in mingw commtrl.h
svn path=/trunk/; revision=5803
2003-08-23 19:52:15 +00:00
Martin Fuchs
ffa80e7e36 fixed create_absolute_pidl()
svn path=/trunk/; revision=5802
2003-08-23 19:48:37 +00:00
Martin Fuchs
20228bbf5d implemented context menus for task bar
svn path=/trunk/; revision=5801
2003-08-23 18:06:21 +00:00
Martin Fuchs
4d265e45f4 Implemented tool tips for quicklaunch bar.
svn path=/trunk/; revision=5800
2003-08-23 18:05:34 +00:00
Thomas Bluemel
05831e8a00 small changes
svn path=/trunk/; revision=5799
2003-08-23 17:06:07 +00:00
Thomas Bluemel
274ac97525 added icons
svn path=/trunk/; revision=5798
2003-08-23 16:50:58 +00:00
Casper Hornstrup
5f2c2b55be 2003-08-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/tcpsvr/tcpsvr.c (main): Fix multiline string constant.

svn path=/trunk/; revision=5797
2003-08-23 16:37:18 +00:00
Casper Hornstrup
2ef07b88f9 2003-08-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/utils/stats/stats.c (ReadLine): Handle unix end-of-line characters.

svn path=/trunk/; revision=5796
2003-08-23 16:33:04 +00:00
Casper Hornstrup
4a3ede724b 2003-08-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/Makefile (TEST_APPS): Remove patblt and stretchblt
	as they break full make.

svn path=/trunk/; revision=5795
2003-08-23 16:30:49 +00:00
Martin Fuchs
3ff42008f4 improved error reporting for GCC version
svn path=/trunk/; revision=5794
2003-08-23 13:44:37 +00:00
Martin Fuchs
4fcd44e5eb removed warning for VS.Net compiler
svn path=/trunk/; revision=5793
2003-08-23 11:51:01 +00:00
Martin Fuchs
cb0cc914a1 added TODO entries
svn path=/trunk/; revision=5792
2003-08-23 10:59:20 +00:00
Martin Fuchs
b457e5103c fixed more memory and GDI handle leaks
svn path=/trunk/; revision=5791
2003-08-23 10:02:38 +00:00
Martin Fuchs
594afa2f55 fixed GDI handle leaks
svn path=/trunk/; revision=5790
2003-08-23 09:27:26 +00:00
Martin Fuchs
43fa5d1ab2 implemented 'run...' dialog by using shell32 functionality (taken from taskmgr/run.c)
svn path=/trunk/; revision=5789
2003-08-23 09:26:57 +00:00
Martin Fuchs
ea2e4b1c26 added .cvsignore
svn path=/trunk/; revision=5788
2003-08-23 07:53:54 +00:00
Steven Edwards
114ba86989 install new GDI tests
svn path=/trunk/; revision=5787
2003-08-23 07:00:35 +00:00
Steven Edwards
a38afaee02 Added new tests to build
svn path=/trunk/; revision=5786
2003-08-23 06:49:21 +00:00
Steven Edwards
bf3eb0bdde Fixed another demo
svn path=/trunk/; revision=5785
2003-08-23 06:48:35 +00:00
Steven Edwards
aceee42b0f Fix demo - for real this time
svn path=/trunk/; revision=5784
2003-08-23 06:43:54 +00:00
Steven Edwards
0c3c02ba8f Fix demo
svn path=/trunk/; revision=5783
2003-08-23 06:42:45 +00:00
Steven Edwards
5c77637a9b Added new scaled text demo from the Windows 2000 graphics API blackbook
svn path=/trunk/; revision=5782
2003-08-23 06:41:54 +00:00
Steven Edwards
90b7f43de7 Added new makefile for demo
svn path=/trunk/; revision=5781
2003-08-23 06:26:46 +00:00
Steven Edwards
121191e9e1 Set target type as Windows
svn path=/trunk/; revision=5780
2003-08-23 06:10:36 +00:00
Steven Edwards
65018e8631 Add winedbg.dll back
svn path=/trunk/; revision=5779
2003-08-23 05:06:34 +00:00
Steven Edwards
ed30599f45 Merge with Winehq to support w32api and MS_VC headers.
Add linking to winedbgc.dll

svn path=/trunk/; revision=5778
2003-08-22 23:36:27 +00:00
Steven Edwards
9c1b0dcc9f Make lzexpand use winedbg interface.
Merge latest changes with winehq CVS
reactos/subsys/system/expand should work now

svn path=/trunk/; revision=5777
2003-08-22 23:35:28 +00:00
Steven Edwards
62e998a88b Wine porting fixes
Patch by Filip Navara

svn path=/trunk/; revision=5776
2003-08-22 23:34:30 +00:00
Steven Edwards
1e60813c3c Updated winedbg.dll to support latest WINE dlls.
Patch by Filip Navara

svn path=/trunk/; revision=5775
2003-08-22 23:32:39 +00:00
Steven Edwards
7f4e557bf9 Removed sym file from CVS
svn path=/trunk/; revision=5774
2003-08-22 21:27:22 +00:00
Martin Fuchs
12b861a404 added quicklaunch bar
svn path=/trunk/; revision=5773
2003-08-22 21:16:58 +00:00
Martin Fuchs
0b414b7b38 fixed create_bitmap_from_icon()
svn path=/trunk/; revision=5772
2003-08-22 21:14:31 +00:00
Thomas Bluemel
7e8228e0c7 fixed GetIconInfo()
svn path=/trunk/; revision=5771
2003-08-22 20:50:44 +00:00
Martin Fuchs
764b078068 Implemented quick launch bar
svn path=/trunk/; revision=5770
2003-08-22 20:43:36 +00:00
Thomas Bluemel
c863a9d611 fixed a bug in LoadCursorImage()
svn path=/trunk/; revision=5769
2003-08-22 20:17:08 +00:00
Thomas Bluemel
aefd11c055 fixed a bug in LdrAccessResource(), it should abort when ResourceDataEntry == NULL
svn path=/trunk/; revision=5768
2003-08-22 20:00:39 +00:00
Hartmut Birr
130e0947f7 - Free the sub key table in CmiObjectDelete.
svn path=/trunk/; revision=5767
2003-08-22 19:22:19 +00:00
Thomas Bluemel
68cb54ddaf updated user32 resources
svn path=/trunk/; revision=5766
2003-08-22 19:14:01 +00:00
Gé van Geldorp
a15a37fcab Fix handling of invalid memory accesses by the stub
svn path=/trunk/; revision=5765
2003-08-22 18:46:40 +00:00
Thomas Bluemel
1aa98eb415 added 2 cursors
svn path=/trunk/; revision=5764
2003-08-22 18:42:45 +00:00
Martin Fuchs
ddcf08e7d2 double buffering
svn path=/trunk/; revision=5763
2003-08-22 18:25:48 +00:00
Thomas Bluemel
cc1e453ce3 updated cursor resources
svn path=/trunk/; revision=5762
2003-08-22 18:21:52 +00:00
Martin Fuchs
b60923167a NotifyArea::CancelModes()
svn path=/trunk/; revision=5761
2003-08-22 17:32:24 +00:00
Martin Fuchs
f45db7ba7a bugfix: focus handling in startmenu
svn path=/trunk/; revision=5760
2003-08-22 16:59:19 +00:00
Thomas Bluemel
e570fadda7 bugfixes for menus
svn path=/trunk/; revision=5759
2003-08-22 16:01:01 +00:00
Martin Fuchs
ef6eb3eb50 check for valid task icon owener windows
svn path=/trunk/; revision=5758
2003-08-22 15:30:30 +00:00
Martin Fuchs
c92a9be46a btntest.sym
svn path=/trunk/; revision=5757
2003-08-22 15:29:47 +00:00
Andrew Greenwood
7010fa377f * Started porting WINMM from WINE
* Defined __WINE_FOR_REACTOS__ and created internal.h, which defines a few things not already defined.

It compiles, but *will NOT* link, as I haven't finished porting yet. I'll continue hacking away at it.

svn path=/trunk/; revision=5756
2003-08-22 14:56:59 +00:00
Gé van Geldorp
a06a9da285 Prevent double screen output when GDB is active
svn path=/trunk/; revision=5755
2003-08-22 14:49:54 +00:00
Eric Kohl
8773b1104e Use FAT12 or FAT16 CHS for small partitions even if the drive supports LBA.
svn path=/trunk/; revision=5754
2003-08-22 13:55:36 +00:00
Emanuele Aliberti
b5984d7099 PSXDLL: RtlNtStatusToPsxErrno moved to PSX subsystem client library from NTDLL.
svn path=/trunk/; revision=5753
2003-08-22 13:55:15 +00:00
Eric Kohl
c07929b227 Moved FAT32 code to a sepatate file.
Added hack for HiddenSectors value. This is needed to boot FreeLoader.

svn path=/trunk/; revision=5752
2003-08-22 13:53:02 +00:00
Eric Kohl
b8eace220f Ignore junk data from ATA and ATAPI devices.
svn path=/trunk/; revision=5751
2003-08-22 13:50:39 +00:00
Emanuele Aliberti
c8ca03fbbf NTDLL: RtlNtStatusToPsxErrno moved to PSX subsystem client library.
svn path=/trunk/; revision=5750
2003-08-22 13:46:55 +00:00
Martin Fuchs
cd813d619c set work area size
svn path=/trunk/; revision=5749
2003-08-22 13:27:58 +00:00
Royce Mitchell III
5f5441389e C89 compatibility and fixed a pointer bug ( conferred with Thomas on his intensions first ).
svn path=/trunk/; revision=5748
2003-08-22 13:27:09 +00:00
Martin Fuchs
942ea1645e Implemented tray notification callback messages
svn path=/trunk/; revision=5747
2003-08-22 12:41:24 +00:00
Martin Fuchs
da38f35c6c Added tray notification area.
svn path=/trunk/; revision=5746
2003-08-22 09:50:41 +00:00
Martin Fuchs
78d7ed187a implemented clock display in tray notification area
svn path=/trunk/; revision=5745
2003-08-22 09:46:58 +00:00
Gé van Geldorp
9146491fcd Fix counting when going from bottom to top
svn path=/trunk/; revision=5744
2003-08-22 08:03:51 +00:00
Gé van Geldorp
adaa3d6de2 - Move CreateFrameBrushes() and DeleteFrameBrushes() to file where they are
actually used
- Only call them when needed
- Fix resource specification so CreateFrameBrushes() can actually find the
  bitmap it needs

svn path=/trunk/; revision=5743
2003-08-22 07:51:32 +00:00
Steven Edwards
c6066fbd1a Add guid generator by Jonathon Wilson
svn path=/trunk/; revision=5742
2003-08-22 07:26:41 +00:00
Martin Fuchs
74b969bb49 Removed commctrl.h to use the one of W32API headers.
svn path=/trunk/; revision=5741
2003-08-22 07:19:10 +00:00
Richard Campbell
de14bd7a54 - ewps, forgot to convert to 16 colors...interesting, loading 24 bitmaps from resources doesn't seem to work properly
svn path=/trunk/; revision=5740
2003-08-22 06:57:31 +00:00
Richard Campbell
01a760d4ec - obm_close update, i was bored and didn't feel like coding, i hate code burnout.
svn path=/trunk/; revision=5739
2003-08-22 06:33:22 +00:00
Steven Edwards
f6d8e666a9 Merged regedit from winehq cvs.
Moved to new home in reactos tree.
 - I know I said I was on vacation

svn path=/trunk/; revision=5738
2003-08-22 05:55:14 +00:00
Steven Edwards
cd80ac4da7 Add linking to libstdc++ for buggy gcc installs
svn path=/trunk/; revision=5737
2003-08-22 04:54:59 +00:00
Royce Mitchell III
897a184f5a C89 compatibility
svn path=/trunk/; revision=5736
2003-08-22 01:55:36 +00:00
Thomas Bluemel
8ad3e4af6d fixed MessageBeep()
svn path=/trunk/; revision=5735
2003-08-22 00:39:15 +00:00
Thomas Bluemel
91fbb3f0d8 fixed MessageBeep()
svn path=/trunk/; revision=5734
2003-08-22 00:37:36 +00:00
Thomas Bluemel
8b52facc15 unstubbed MessageBeep()
svn path=/trunk/; revision=5733
2003-08-22 00:33:47 +00:00
Thomas Bluemel
7b8304433e reorganized window.c
svn path=/trunk/; revision=5732
2003-08-21 23:07:40 +00:00
Hartmut Birr
b90ac7e87b - Fixed RtlLeaveCriticalSection and RtlTryEnterCriticalSection.
svn path=/trunk/; revision=5731
2003-08-21 22:40:18 +00:00
Thomas Bluemel
426e7567ba added @implemented/@unimplemented comments
svn path=/trunk/; revision=5730
2003-08-21 22:17:56 +00:00
Thomas Bluemel
6a048dddff work on system menus
svn path=/trunk/; revision=5729
2003-08-21 21:52:06 +00:00
Thomas Bluemel
2a0a6362e3 work on system menus
svn path=/trunk/; revision=5728
2003-08-21 20:29:44 +00:00
Gé van Geldorp
60e08b722e - Add Magic number back in
- Move all HANDLE_ENTRY fields into GDIOBJHDR (saves memory)

svn path=/trunk/; revision=5727
2003-08-21 20:16:55 +00:00
Gé van Geldorp
113ee4971a Don't free region if handle is special value 1 (whole window)
svn path=/trunk/; revision=5726
2003-08-21 20:14:45 +00:00
Martin Fuchs
61076e4c18 display icons in tray notification area
svn path=/trunk/; revision=5725
2003-08-21 19:24:30 +00:00
Martin Fuchs
afbf3c66b6 working start menu; beginning of tray notification area
Start menu popup is now closed when clicking in another window.

svn path=/trunk/; revision=5724
2003-08-21 17:11:49 +00:00
Thomas Bluemel
6d6caffd7d some more work on system menus
svn path=/trunk/; revision=5723
2003-08-21 16:04:26 +00:00
Eric Kohl
f7b82c11f2 Fixed FAT16 bootcode install. Don't overwrite any valid BPB data.
svn path=/trunk/; revision=5722
2003-08-21 15:35:32 +00:00
Eric Kohl
5f04c08330 Added FAT16 format code.
svn path=/trunk/; revision=5721
2003-08-21 15:33:48 +00:00
Thomas Bluemel
dad429cc35 initial support for system menus
svn path=/trunk/; revision=5720
2003-08-21 15:26:19 +00:00
Thomas Bluemel
45e8d98b48 Implemented loading compatibility settings (custom version information) for applications
svn path=/trunk/; revision=5719
2003-08-21 12:51:01 +00:00
Royce Mitchell III
cbbd90f4f1 C89 compatibility
svn path=/trunk/; revision=5718
2003-08-21 04:17:15 +00:00
Royce Mitchell III
6f9d6a7c74 fixed several dc locking bugs as well as several memory leaks
svn path=/trunk/; revision=5717
2003-08-20 22:07:36 +00:00
Eric Kohl
e2dd45fd4a Use FAT16 for partitions smaller than 512MB and FAT32 for larger ones.
svn path=/trunk/; revision=5716
2003-08-20 21:58:06 +00:00
Gé van Geldorp
a5e1765aa6 Handle system color background brushes
svn path=/trunk/; revision=5715
2003-08-20 21:42:27 +00:00
Gé van Geldorp
39b5c8f5e4 Change credits as requested by Jon Griffiths <jon_p_griffiths@yahoo.com>
svn path=/trunk/; revision=5714
2003-08-20 21:41:22 +00:00
Emanuele Aliberti
92f4c1b15d WIN32K: little work on Set/GetPixel (I don't know how to actually get/set a pixel value).
svn path=/trunk/; revision=5713
2003-08-20 20:45:28 +00:00
Royce Mitchell III
bbb8de1530 fixed some documentation and implemented RoundRect to call Rectangle so we at least see *something* until RoundRect can get implemented
svn path=/trunk/; revision=5712
2003-08-20 20:24:35 +00:00
Eric Kohl
8225007b2c Added check and warning about incompatible partition tables.
The previous patches (partlist.c and usetup.c) were written by Hartmut Birr!

svn path=/trunk/; revision=5711
2003-08-20 20:07:33 +00:00
Casper Hornstrup
11ee47208a 2003-08-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/win32k/ntuser/menu.c (IntSetMenuDefaultItem,
	IntGetMenuDefaultItem): Fix unsigned/signed warnings.

svn path=/trunk/; revision=5710
2003-08-20 18:55:03 +00:00
Eric Kohl
e89f5dacce Ignore valid but unused partition table (4 unused entries).
svn path=/trunk/; revision=5709
2003-08-20 16:59:46 +00:00
Eric Kohl
1926975c01 Install FAT16 bootcode on FAT16 partitions.
Don't modify valid partition types when a partiton is formatted.

svn path=/trunk/; revision=5708
2003-08-20 16:31:21 +00:00
Martin Fuchs
e4b7ecbc70 dynamic startmenu widths
svn path=/trunk/; revision=5707
2003-08-20 15:18:08 +00:00
Eric Kohl
3d0daebcc4 Enable ReactOS installation.
svn path=/trunk/; revision=5706
2003-08-20 15:16:43 +00:00
Eric Kohl
e9042b4e5a Fixed FAT32 cluster size calculation (GB instead of MB).
svn path=/trunk/; revision=5705
2003-08-20 15:15:30 +00:00
Emanuele Aliberti
bd5999bd1a NTOSKRNL PS: NtOpenThread implemented.
svn path=/trunk/; revision=5704
2003-08-20 15:02:53 +00:00
Royce Mitchell III
cafb322c66 commented out a DPRINT that referenced a variable that no longer exists
svn path=/trunk/; revision=5703
2003-08-20 14:53:16 +00:00
Thomas Bluemel
f8dadc910b Patch by Jonathon Wilson: Implemented loading cursors with LoadImage()
svn path=/trunk/; revision=5702
2003-08-20 14:08:19 +00:00
Thomas Bluemel
545e6f33fb some work on menus
svn path=/trunk/; revision=5701
2003-08-20 14:01:16 +00:00
Thomas Bluemel
33a53f0e47 implemented NtUserGetMenuDefaultItem()
svn path=/trunk/; revision=5700
2003-08-20 13:02:32 +00:00
Martin Fuchs
246cb6d247 automatically opening startmenu-submenus
svn path=/trunk/; revision=5699
2003-08-20 12:42:25 +00:00
Andrew Greenwood
1dbf9b9981 * Took an intelligent guess at NtLockVirtualMemory and NtUnlockVirtualMemory and attempted to implement them, but they're most likely *wrong*. Shouldn't break anything already though.
svn path=/trunk/; revision=5698
2003-08-20 10:37:33 +00:00
Thomas Bluemel
bcefe84d60 added NtUserGetMenuDefaultItem() syscall
svn path=/trunk/; revision=5697
2003-08-20 10:08:53 +00:00
Martin Fuchs
10f0f6628e draw startmenu subfolder arrows
svn path=/trunk/; revision=5696
2003-08-20 09:08:00 +00:00
Martin Fuchs
9a3c91b31d eliminating warning
svn path=/trunk/; revision=5695
2003-08-20 09:06:34 +00:00
Gé van Geldorp
2ad60bb5af .cvsignore maintenance
svn path=/trunk/; revision=5694
2003-08-20 08:05:10 +00:00
Gé van Geldorp
bb70febc2a - Store GDI object type in the handle itself
- Rename remaining XX_HandleToPtr/XX_ReleasePtr funcs to XX_LockXx/XX_UnlockXx

svn path=/trunk/; revision=5693
2003-08-20 07:45:02 +00:00
Royce Mitchell III
974eb2f364 patch by vizzini - Fixed a typoed struct member, Fixed a unicode->hex integer bug.
svn path=/trunk/; revision=5692
2003-08-20 04:18:31 +00:00
Andrew Greenwood
05bd5fcc78 * Made a start on a few user32 stubs
* Various other small changes

svn path=/trunk/; revision=5691
2003-08-20 03:07:33 +00:00
Andrew Greenwood
675c971445 * Implemented handling for DC_INBUTTON and DC_SMALLCAP styles in DrawCaption()
* Misc. other very minor improvements

svn path=/trunk/; revision=5690
2003-08-20 01:41:01 +00:00
Andrew Greenwood
de05ce363a * Merged common code from GetClassInfoExA/W into an internal GetClassInfoExCommon routine, called by both functions.
These changes conflicted with an earlier commit - I have manually merged the changed. If there are any mistakes, one of the functions has the original code commented out.

svn path=/trunk/; revision=5689
2003-08-20 01:05:10 +00:00
Andrew Greenwood
8eb1d07658 DrawCaption() now works, and is called (unsurprisingly) for drawing the captions of windows!
* Implemented DrawCaption() in lib/user32/windows/defwnd.c (couldn't put it in draw.c due to the functions it relies upon being in defwnd.c)
* Changed a few metrics in subsys/win32k/ntuser/metric.c to match the Windows defaults
* Added DC_GRADIENT and DC_BUTTONS to include/defines.h
* Modified prototype for UserDrawSysMenuButton in lib/user32/include/window.h to return success/failure
* Modified lib/usr32/resources/obm_close.bmp slightly. It now looks more like the Windows version.

svn path=/trunk/; revision=5688
2003-08-20 00:41:04 +00:00
David Welch
778113754c - Fix for accessing Section->Segment after dereferencing the associated
file object.

svn path=/trunk/; revision=5687
2003-08-20 00:02:31 +00:00
David Welch
12d437f94e - Forgot this file - sorry.
svn path=/trunk/; revision=5686
2003-08-20 00:01:30 +00:00
David Welch
f2d9fe4842 - Patch from PM implementing ldt and tss iobitmap support.
svn path=/trunk/; revision=5685
2003-08-19 23:59:08 +00:00
Thomas Bluemel
c301cf0343 small bugfix
svn path=/trunk/; revision=5684
2003-08-19 23:54:26 +00:00
David Welch
0bed5b1747 - Fixed whole page allocations.
svn path=/trunk/; revision=5683
2003-08-19 23:52:36 +00:00
Thomas Bluemel
aab0f8f999 fixed NtUserGetClassInfo() and GetClassInfoExA/W()
svn path=/trunk/; revision=5682
2003-08-19 23:41:20 +00:00
Steven Edwards
eca1b2621d Add lz32.dll to apistatus list.
svn path=/trunk/; revision=5681
2003-08-19 23:25:58 +00:00
Royce Mitchell III
23f865f379 fixed minor blip in Polygon algo
svn path=/trunk/; revision=5680
2003-08-19 21:29:20 +00:00
Martin Fuchs
0152db0310 new cvsignore entries
svn path=/trunk/; revision=5679
2003-08-19 21:05:21 +00:00
Martin Fuchs
c5ddf7eb05 Implementation of standard startmenu folders
svn path=/trunk/; revision=5678
2003-08-19 21:04:37 +00:00
Eric Kohl
cb15da56e1 * Added trailing fs info sector signature
* Calculate correct cluster size

svn path=/trunk/; revision=5677
2003-08-19 19:15:20 +00:00
Hartmut Birr
57a76c0f45 - Fixed the intial values for cluster 0 and 1.
- Write the fat in larger chunks.
- Calculate the necessary size for the fat more exactly.

svn path=/trunk/; revision=5676
2003-08-19 17:51:12 +00:00
Martin Fuchs
02a714f2b9 Implemented navigation and launching in start menu
svn path=/trunk/; revision=5675
2003-08-19 16:51:36 +00:00
Eric Kohl
a0f1b6fbfe * Install MBR boot code if necessary.
* Install partition boot code after formatting.

svn path=/trunk/; revision=5674
2003-08-19 15:54:47 +00:00
Royce Mitchell III
8fcc6f51cd fixed definition of DESKTOPENUMPROC
svn path=/trunk/; revision=5673
2003-08-19 15:18:26 +00:00
Thomas Bluemel
f75a6525b5 Patch by Jonathon Wilson:
1. renames all w32k syscalls to ntgdi
2. contains the fixed, working PolyPatBlt and PatBlt fixes from before
3. renames W32kInitialize to Win32kInitalize
4. renames W32kDeviceProcess to Win32kDeviceProcess
5. renames all the w32k functions in ntuser to int functions (like in ntgdi)

svn path=/trunk/; revision=5672
2003-08-19 11:48:50 +00:00
Martin Fuchs
4f3b4c81e2 use BTNS_SEP instead of TBSTYLE_SEP
svn path=/trunk/; revision=5671
2003-08-19 09:48:43 +00:00
Martin Fuchs
0fd6225404 OwnerdrawnButton
svn path=/trunk/; revision=5670
2003-08-19 09:36:25 +00:00
Martin Fuchs
a355ea3e20 added code comments and a bit of cleanup
svn path=/trunk/; revision=5669
2003-08-19 09:13:02 +00:00
Martin Fuchs
8ee9da9bb7 disable window resizing for start menu
svn path=/trunk/; revision=5668
2003-08-19 09:11:43 +00:00
Royce Mitchell III
a5dc482c4c Added MmDbgPagedPoolRedZoneCheck(). I hope to eventually export it so other OS components can check for bounds violations whenever they want. For now, you can do so by calling ExAllocatePool(PagedPool,0)
svn path=/trunk/; revision=5667
2003-08-19 05:24:07 +00:00
Royce Mitchell III
5b43864d3d C89 compatibility
svn path=/trunk/; revision=5666
2003-08-19 03:05:42 +00:00
Royce Mitchell III
b3b09803f9 fixed some memory leaks with GetClassInfoEx(A/W)
svn path=/trunk/; revision=5665
2003-08-19 02:55:53 +00:00
Steven Edwards
b46260a736 Added implemented and unimplemented tags.
svn path=/trunk/; revision=5664
2003-08-19 01:31:51 +00:00
Thomas Bluemel
ccceb1f9ac implemented SetLastErrorEx()
svn path=/trunk/; revision=5663
2003-08-19 01:31:15 +00:00
Thomas Bluemel
6569fdad17 minor fixes
svn path=/trunk/; revision=5662
2003-08-19 01:03:41 +00:00
Thomas Bluemel
01533e4a5d GetClassInfoExA/W() checks for valid parameters now
svn path=/trunk/; revision=5661
2003-08-19 00:49:42 +00:00
Thomas Bluemel
37da5cd4d8 fixed some bugs in GetClassInfoExA/W()
svn path=/trunk/; revision=5660
2003-08-19 00:36:40 +00:00
Thomas Bluemel
1717987643 fixed GetClassInfoExA/W() and CreateWindowExA/W()
svn path=/trunk/; revision=5659
2003-08-18 23:52:03 +00:00
Andrew Greenwood
5f8d059303 OK I must be having a bad coding day or something. This should finally fix the build problems.
svn path=/trunk/; revision=5658
2003-08-18 23:10:44 +00:00
Andrew Greenwood
0768d3a18b Oops... Sorry guys, the last commit I made broke the build, so I've just reversed most of what I did. Just commented out my changes in unwind.c
svn path=/trunk/; revision=5657
2003-08-18 22:55:15 +00:00
Martin Fuchs
ce4a563fbf first draft of explorer start menu
svn path=/trunk/; revision=5656
2003-08-18 22:28:41 +00:00
Andrew Greenwood
6fb621e9a8 * Added stubs for GetSecurityInfo and GetSecurityInfoExA/W in advapi32
* Added some rather messy code to msvcrt/except/unwind.c in an attempt to get cmd.exe from Windows 2000 to run once again (Microsoft must've updated it in SP4 ... it used to work!)

svn path=/trunk/; revision=5655
2003-08-18 22:19:25 +00:00
Andrew Greenwood
63a25cf323 I've attempted to (correctly) re-stub some of the WinMM.DLL functions, and have partly implemented some parameter checking, etc.
This is still a complete mess and won't link. And it doesn't like me using file mappings.

svn path=/trunk/; revision=5654
2003-08-18 19:14:57 +00:00
Eric Kohl
c01dbcf16b * Write modified partition sectors to disk.
* Enable partition formatting code.

svn path=/trunk/; revision=5653
2003-08-18 17:39:26 +00:00
Eric Kohl
c5cce225e2 xHalIoWritePartitionTable(): Don't bail out if a partition manager was found.
svn path=/trunk/; revision=5652
2003-08-18 17:34:18 +00:00
Emanuele Aliberti
0682a6e2b0 SystemProcessInformation: PPID retrieved.
Now tlist shows correct parent-child relations.

svn path=/trunk/; revision=5651
2003-08-18 15:18:03 +00:00
Thomas Bluemel
b68f0a643f some work on menus
svn path=/trunk/; revision=5650
2003-08-18 14:09:13 +00:00
Thomas Bluemel
065d88ba18 some work on menus
svn path=/trunk/; revision=5649
2003-08-18 13:37:54 +00:00
Martin Fuchs
e0306148f3 initializing for GCC
svn path=/trunk/; revision=5648
2003-08-18 13:09:46 +00:00
Martin Fuchs
aa7ecf8b2d BTNS_BUTTON
svn path=/trunk/; revision=5647
2003-08-18 13:07:50 +00:00
Thomas Bluemel
b2b074bf8c removed MENUITEMINFOW struct from MENU_ITEM
svn path=/trunk/; revision=5646
2003-08-18 11:58:17 +00:00
Hartmut Birr
f56db0bd84 - Enabled the break handler.
svn path=/trunk/; revision=5645
2003-08-18 11:55:43 +00:00
Hartmut Birr
3c9f26a7a0 - Remove all wait objects from a thread which would be deleted.
- Release the thread list lock after the real context switch
  (some code was moved from thread.c to tskswitch.S).
- Check for the state of a thread which is blocked or unblocked,
  because it is possible that there was a second thread switching.
- Fixed KeSetBasePriorityThread.
- Check for a necessary task switch after changing the thread priority in KeSetPriorityThread.

svn path=/trunk/; revision=5644
2003-08-18 11:52:31 +00:00
Hartmut Birr
69ade55431 - Check for the status after calling KeWaitForSingleObject in NtRequestWaitReplyPort.
svn path=/trunk/; revision=5643
2003-08-18 11:48:19 +00:00
Hartmut Birr
14aa056fe0 - Remove all wait objects from a thread which would be deleted.
- Release the thread list lock after the real context switch
  (some code was moved from thread.c to tskswitch.S).
- Check for the state of a thread which is blocked or unblocked,
  because it is possible that there was a second thread switching.
- Fixed KeSetBasePriorityThread.
- Check for a necessary task switch after changing the thread priority in KeSetPriorityThread.

svn path=/trunk/; revision=5642
2003-08-18 11:23:32 +00:00
Hartmut Birr
7aab7f108b - Store for each process a separate pointer for a control handler within the process data structure.
- Call the control handler only if processed input is enabled.
- Call the control handler for each process which is attached to the console.

svn path=/trunk/; revision=5641
2003-08-18 10:58:49 +00:00
Hartmut Birr
74b741f04a - Fixed the initializing of the initial console control handler.
- Fixed RemoveConsoleCtrlHandler.
- CreateProcess should send the console control handler to csrss.

svn path=/trunk/; revision=5640
2003-08-18 10:47:04 +00:00
Hartmut Birr
a11c2e5606 - Delete a process environment in the context of a worker thread
if the caller does not run in the same process which would
  be deleted and if KeAttachProcess was already called.

svn path=/trunk/; revision=5639
2003-08-18 10:20:57 +00:00
Hartmut Birr
8ab6fed82c - Do not call KeAttachProcess/keDetachProcess if the current process is the necessary process.
svn path=/trunk/; revision=5638
2003-08-18 10:18:14 +00:00
Andrew Greenwood
e7eff667e5 This is Jonathan Wilson's patch, which implements DrawFrame and fixes PolyPatBlt.
svn path=/trunk/; revision=5637
2003-08-18 09:59:29 +00:00
James Tabor
1ec31c1ff5 Commit Ctrl Event handler
svn path=/trunk/; revision=5636
2003-08-18 07:47:28 +00:00
James Tabor
542347bd13 Commit Ctrl Event handler
svn path=/trunk/; revision=5635
2003-08-18 07:32:00 +00:00
Martin Fuchs
c433be3d74 spelling fix
svn path=/trunk/; revision=5634
2003-08-18 07:24:28 +00:00
James Tabor
2cfb8d7b0d Commit Ctrl Event handler
svn path=/trunk/; revision=5633
2003-08-18 07:20:37 +00:00
James Tabor
38064c3a39 Commit Ctrl Event handler
svn path=/trunk/; revision=5632
2003-08-18 07:06:59 +00:00
Andrew Greenwood
f049704abd Implemented GrayStringA and GrayStringW (untested, probably won't work)
svn path=/trunk/; revision=5631
2003-08-18 00:14:50 +00:00
Thomas Bluemel
a234963ccf Implemented SetWindowContextHelpId() and GetWindowContextHelpId()
svn path=/trunk/; revision=5630
2003-08-18 00:11:17 +00:00
Thomas Bluemel
cfac33ce3b Implemented AnimateWindow()
svn path=/trunk/; revision=5629
2003-08-17 23:48:36 +00:00
Martin Fuchs
b988aae390 added cvsignore2
svn path=/trunk/; revision=5628
2003-08-17 23:28:24 +00:00
Martin Fuchs
2a4126d9ca corrected cvsignore
svn path=/trunk/; revision=5627
2003-08-17 23:26:13 +00:00
Martin Fuchs
b5aac7eb36 log off button in start menu
svn path=/trunk/; revision=5626
2003-08-17 23:14:23 +00:00
Andrew Greenwood
54a2b50917 * Ported listbox conrtol from WINE - it doesn't work properly yet, but registers and processes messages!
* Implemented IsChild and FreeConsole (latter is guesswork based on AllocConsole!)
* Started implementing OpenIcon (remains unfinished)
* Improved EnableWindow, IsWindowEnabled and IsZoomed
* Replaced some instances of GetWindowLong with NtUserGetWindowLong
* Added SIF_TRACKPOS to defines.h
* Added dwLocaleId to COMPAREITEMSTRUCT

svn path=/trunk/; revision=5625
2003-08-17 22:45:40 +00:00
Martin Fuchs
d9668b0a6a picture button for start menu
svn path=/trunk/; revision=5624
2003-08-17 20:41:41 +00:00
Martin Fuchs
a24652a4d7 picture button for start menu
svn path=/trunk/; revision=5623
2003-08-17 20:41:32 +00:00
Andrew Greenwood
ff7ea1c1f5 * Implemented EnabledWindow and IsWindowEnabled (seem to work OK)
* Modified DrawState slightly (still doesn't work very well)

svn path=/trunk/; revision=5622
2003-08-17 20:29:57 +00:00
Andrew Greenwood
04bd392176 More work on DrawStateA/DrawStateW. They are still both incomplete, and only really work for DSS_NORMAL and DST_TEXT at the moment. Button text drawing appears to be broken (window state is always disabled for some reason.)
svn path=/trunk/; revision=5621
2003-08-17 19:07:11 +00:00
Martin Fuchs
17412a6d95 new helper struct ClientRect
svn path=/trunk/; revision=5620
2003-08-17 18:31:45 +00:00
Royce Mitchell III
5b6d43ab50 * fixes a couple (several?) memory leaks
* fixes |many| gdi locking bugs ( particularly DC's )
* Polygon and Rectangle now match MS's perfectly.
* a lot of functions take PDC or have PDC-equivalents now.
* fixed some C89 compatibility issues. ( before you complain, I refuse
to upgrade b/c my gcc 2.95 has caught ERRORS that gcc 3 completely
ignores, so I refuse to upgrade )

svn path=/trunk/; revision=5619
2003-08-17 17:32:58 +00:00
David Welch
8b7c8b8dff - Fixed bug in small width brush blts aligned to an eight boundary.
- Accelerate dstinvert blts (treat as patinvert with a colour of 0xF).

svn path=/trunk/; revision=5618
2003-08-17 15:11:54 +00:00
Martin Fuchs
6fba0a4d96 refresh attributes of existing taskbar buttons
svn path=/trunk/; revision=5617
2003-08-17 15:03:11 +00:00
Martin Fuchs
76a258b41b Handling ofg iconized windows
svn path=/trunk/; revision=5616
2003-08-17 14:19:03 +00:00
Richard Campbell
8568d5b2bb - Added 'time.c' for time functions
- Updated makefile

No longer compiles due to errors?!?  I could use some help here.  Anyone want to tell me what i'm doing wrong?

svn path=/trunk/; revision=5615
2003-08-17 12:32:05 +00:00
Richard Campbell
59ac5f2e25 - Updated winmm defs, (This library isn't used or compiled yet, use the one from wine)
- Removed a comment

svn path=/trunk/; revision=5614
2003-08-17 10:47:27 +00:00
Eric Kohl
63f8c28d8b Implemented xHalIoSetPartitionInformation().
Fixed typos in debug messages.
Cleaned up the mess.

svn path=/trunk/; revision=5613
2003-08-17 10:36:45 +00:00
Thomas Bluemel
e283c5b7d3 Added WindowFromDC() by Philip Alldredge
svn path=/trunk/; revision=5612
2003-08-17 09:17:04 +00:00
Martin Fuchs
f8e97c4994 Optimierung der Applikationsfenster-Anzeige
svn path=/trunk/; revision=5611
2003-08-17 07:59:37 +00:00
Royce Mitchell III
85f2a50511 fixed GDIOBJ locking issue with DC_SET_MODE macro
svn path=/trunk/; revision=5610
2003-08-17 03:32:59 +00:00
Andrew Greenwood
96a1097b2d Very basic (and incomplete) implementation of DrawStateA, DrawStateW and some internal helper functions, based on the code from WINE. It works well enough to display text on buttons, but doesn't handle any state drawing yet. I hope to implement this over the next few days.
svn path=/trunk/; revision=5609
2003-08-17 02:51:42 +00:00
Martin Fuchs
e0aedc01c3 first draft of working task bar
svn path=/trunk/; revision=5608
2003-08-16 23:27:18 +00:00
Gé van Geldorp
8d77a084ae Remove ANSI window proc and related funcs, fix color of SS_*RECT/SS_*FRAME
styles, fix SS_ETCHEDHORZ and SS_ETCHEDVERT styles, fix clipping

svn path=/trunk/; revision=5607
2003-08-16 21:34:18 +00:00
Royce Mitchell III
2ef7538593 fixed line back-tracking in Polygon to match forward-tracking. No overlap occurs between line and fill if pen width <= 1.
svn path=/trunk/; revision=5606
2003-08-16 21:17:20 +00:00
Royce Mitchell III
cc588fb0f4 Updated by TortoiseCVS
svn path=/trunk/; revision=5605
2003-08-16 21:15:54 +00:00
Royce Mitchell III
33652190b3 Updated by TortoiseCVS
svn path=/trunk/; revision=5604
2003-08-16 21:15:37 +00:00
Gé van Geldorp
93b6368a9f Fix test for WindowTextAtom
svn path=/trunk/; revision=5603
2003-08-16 20:16:50 +00:00
James Tabor
1498f053e6 Commit Ctrl Event handler more changes are pending.
svn path=/trunk/; revision=5602
2003-08-16 17:37:51 +00:00
Martin Fuchs
a374276f97 additional comments
svn path=/trunk/; revision=5601
2003-08-16 12:06:52 +00:00
Martin Fuchs
0d9772d954 update from mail archive
svn path=/trunk/; revision=5600
2003-08-16 12:06:12 +00:00
Martin Fuchs
643f42422c use msdevfilt
svn path=/trunk/; revision=5599
2003-08-16 12:04:51 +00:00
James Tabor
0d9433ca45 Setup ConsoleLocks for Event handler
svn path=/trunk/; revision=5598
2003-08-16 06:19:15 +00:00
Royce Mitchell III
55aa0bc5a5 add abs() declaration
svn path=/trunk/; revision=5597
2003-08-16 05:12:37 +00:00
Royce Mitchell III
606b457dcd W32kRectangle() fixed.
svn path=/trunk/; revision=5596
2003-08-16 05:00:14 +00:00
Royce Mitchell III
321a71f1dd Polygon now works flawlessly ( with possible exception to the issue mentioned on the list earlier this evening ). Scrollbar arrows are now perfect.
svn path=/trunk/; revision=5595
2003-08-16 04:47:41 +00:00
Royce Mitchell III
58d4ce9842 my Polygon algorithm sandbox
svn path=/trunk/; revision=5594
2003-08-16 01:34:29 +00:00
Gé van Geldorp
349c41fe42 Revert most of last change
svn path=/trunk/; revision=5593
2003-08-15 21:56:48 +00:00
Eric Kohl
ff28f462af Got xHalIoWritePartitionTable() working.
svn path=/trunk/; revision=5592
2003-08-15 19:37:32 +00:00
Royce Mitchell III
d4deb682ee improvements to Polygon algo - commiting to get help on one last detail. Winding polygons now work and floating point code is eliminated.
svn path=/trunk/; revision=5591
2003-08-15 18:51:32 +00:00
Gé van Geldorp
4f6a2a6124 Simple maze demo
svn path=/trunk/; revision=5590
2003-08-15 17:06:49 +00:00
Gé van Geldorp
dd426f79b3 Handle SysColor background brushes
svn path=/trunk/; revision=5589
2003-08-15 17:06:11 +00:00
Martin Fuchs
acffe270aa checking wine patches
svn path=/trunk/; revision=5588
2003-08-15 16:13:41 +00:00
Martin Fuchs
cc6e4df2a4 include makefile project
svn path=/trunk/; revision=5587
2003-08-15 16:12:52 +00:00
Thomas Bluemel
f916e75837 changed registering builtin classes to unicode
svn path=/trunk/; revision=5586
2003-08-15 15:55:02 +00:00
Thomas Bluemel
946116f8d4 added builtin PopupMenu window class
svn path=/trunk/; revision=5585
2003-08-15 15:12:14 +00:00
Royce Mitchell III
898e3104f1 fixed UITOOLS95_DrawRectEdge to match repairs made to the vga driver. buttons and framed windows now look correct (again).
svn path=/trunk/; revision=5584
2003-08-15 13:44:30 +00:00
Thomas Bluemel
59c7cc4bc9 fixed small bug in NtUserSetMenu()
svn path=/trunk/; revision=5583
2003-08-15 11:11:02 +00:00
Richard Campbell
1c8bc47bcc - NtUserSetActiveWindow now called in CreateWindowEx
svn path=/trunk/; revision=5582
2003-08-15 10:53:16 +00:00
Richard Campbell
1fd05861d6 - Remove nonclient.c (not used)
svn path=/trunk/; revision=5581
2003-08-15 10:51:51 +00:00
Richard Campbell
d0443c94b3 - Remove nonclient.c (not used)
- Removed DbgPrints()

svn path=/trunk/; revision=5580
2003-08-15 10:51:23 +00:00
Hartmut Birr
08be7d88cc - Fixed the allocated size for the KernelCallbackTable.
svn path=/trunk/; revision=5579
2003-08-15 10:17:09 +00:00
Richard Campbell
eed3e59db4 Now use GetActiveWindow() to set the active flag.
svn path=/trunk/; revision=5578
2003-08-15 10:12:22 +00:00
Martin Fuchs
d27a1e6d43 move text
svn path=/trunk/; revision=5577
2003-08-15 07:53:26 +00:00
Martin Fuchs
501742224c remove warnings
svn path=/trunk/; revision=5576
2003-08-15 07:53:07 +00:00
Andrew Greenwood
98cc6d95b0 This commit mostly adds DbgPrint() statements to places relevant to the button control, and also partially implements DrawState(), although it doesn't seem to work *at all* at the moment.
svn path=/trunk/; revision=5575
2003-08-15 02:51:53 +00:00
Gé van Geldorp
168a174267 Fix line drawing
svn path=/trunk/; revision=5574
2003-08-14 22:34:16 +00:00
Royce Mitchell III
dacc05c901 patch by Jonathon Wilson
Implement PolyPatBlt, SetDeskWallpaper as a call to SystemParametersInfo, UserClientDllInitialize, WCSToMBEx, MBToWCSEx, MB_GetString, SetWindowWord, TranslateMessageEx, SetMessageQueue, IsHungAppWindow
Added stubs for a bunch more functions from NT4SP6 user32.dll

svn path=/trunk/; revision=5573
2003-08-14 20:25:52 +00:00
Andrew Greenwood
8535425fcd ReactOS W32API convert part 4
I've modified ReactOS' headers and source files to match W32API's headers, and fully recompiled and booted ReactOS without them, so it does still work.

A more detailed log of changes will be sent to the ros-kernel mailing list shortly.

svn path=/trunk/; revision=5572
2003-08-14 18:30:28 +00:00
Eric Kohl
979c196068 Fixed nls variable declarations.
svn path=/trunk/; revision=5571
2003-08-14 17:54:27 +00:00
Eric Kohl
d535f217c0 RtlQueryRegistryValues():
* Fixed a bug which returned malformed Unicode strings.
* Removed an unnecessary limitation.

svn path=/trunk/; revision=5570
2003-08-14 14:52:13 +00:00
Eric Kohl
2b3c1f4b49 Fixed some discrepancies (cdecl vs. stdcall) and typos.
svn path=/trunk/; revision=5569
2003-08-14 12:47:33 +00:00
Eric Kohl
6d3c6eba11 Fixed a lot of discrepancies (cdecl vs. stdcall).
svn path=/trunk/; revision=5568
2003-08-14 10:43:42 +00:00
Eric Kohl
1805517888 Implemented ProbeForRead() and ProbeFor Write() (but no SEH yet).
svn path=/trunk/; revision=5567
2003-08-14 10:41:36 +00:00
Eric Kohl
ce57c8d26d Added missing nls declarations.
svn path=/trunk/; revision=5566
2003-08-14 10:32:09 +00:00
Royce Mitchell III
2f9bb4b28a patch by Jonathon Wilson - fix bug in SetClassLong and SetWindowLong
svn path=/trunk/; revision=5565
2003-08-14 01:38:19 +00:00
Royce Mitchell III
238a317934 implementation of the Eng*Semaphore suite of functions. Thanks David, Ge, MikeN & vizzini.
svn path=/trunk/; revision=5564
2003-08-13 22:43:15 +00:00
Casper Hornstrup
715a74de6d Revert last change.
svn path=/trunk/; revision=5563
2003-08-13 20:25:41 +00:00
Casper Hornstrup
be065e6f54 2003-08-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/win32k/ntuser.h (NtUserGetClassName): Make nMaxCount an ULONG.
	* subsys/win32k/dib/dib16bpp.c: Fix unsigned/signed warnings.
	* subsys/win32k/dib/dib1bpp.c: Ditto.
	* subsys/win32k/dib/dib32bpp.c: Ditto.
	* subsys/win32k/dib/dib4bpp.c: Ditto.
	* subsys/win32k/dib/dib8bpp.c: Ditto.
	* subsys/win32k/eng/lineto.c: Ditto.
	* subsys/win32k/eng/mouse.c: Ditto.
	* subsys/win32k/eng/xlate.c: Ditto.
	* subsys/win32k/misc/driver.c: Ditto.
	* subsys/win32k/ntuser/class.c: Ditto.
	* subsys/win32k/ntuser/keyboard.c: Ditto.
	* subsys/win32k/ntuser/timer.c: Ditto.
	* subsys/win32k/ntuser/window.c: Ditto.
	* subsys/win32k/objects/bitmaps.c: Ditto.
	* subsys/win32k/objects/color.c: Ditto.
	* subsys/win32k/objects/coord.c: Ditto.
	* subsys/win32k/objects/dib.c: Ditto.
	* subsys/win32k/objects/path.c: Ditto.
	* subsys/win32k/objects/region.c: Ditto.
	* subsys/win32k/objects/text.c: Ditto.

svn path=/trunk/; revision=5562
2003-08-13 20:24:05 +00:00
Aleksey Bragin
6b9dcfa9e2 Add some stubs to winmm.dll so WinQuake could load (but certainly not run yet).
svn path=/trunk/; revision=5561
2003-08-13 20:19:03 +00:00
Martin Fuchs
02171eb485 make explorer bar look more like windows taskbar bar
svn path=/trunk/; revision=5560
2003-08-13 18:55:07 +00:00
Martin Fuchs
bfb4755f65 drawing desktop background by using PaintDesktop()
svn path=/trunk/; revision=5559
2003-08-13 16:40:09 +00:00
Martin Fuchs
f594676552 checked in Wine patch
svn path=/trunk/; revision=5558
2003-08-13 16:39:08 +00:00
Royce Mitchell III
95e83c3f2a all win32k's stubs now have correct function signatures. I think the def/edf files need more entries, but the linker doesn't complain at the moment.
svn path=/trunk/; revision=5557
2003-08-13 16:32:55 +00:00
Royce Mitchell III
efbb209fb9 no warnings on gcc 3.2, either, so warnings are now errors
svn path=/trunk/; revision=5556
2003-08-13 13:58:11 +00:00
James Tabor
3d4aee56e2 Still working on Ctrl Events
svn path=/trunk/; revision=5555
2003-08-13 06:53:54 +00:00
James Tabor
cbca322aec Type-O Fix
svn path=/trunk/; revision=5554
2003-08-13 05:18:40 +00:00
Royce Mitchell III
1e71f74fde no more win32k warnings any more according to gcc 2.95. Once I confirm that gcc 3.x has no warnings, I will enable -Werror
svn path=/trunk/; revision=5553
2003-08-13 00:50:25 +00:00
Thomas Bluemel
ea19302157 added InternalGetWindowText() exports
svn path=/trunk/; revision=5552
2003-08-12 22:47:20 +00:00
Thomas Bluemel
ef8535e025 removed warning
svn path=/trunk/; revision=5551
2003-08-12 22:45:27 +00:00
Thomas Bluemel
a6e48e9704 Implemented InternalGetWindowText() partially
svn path=/trunk/; revision=5550
2003-08-12 22:27:55 +00:00
Gé van Geldorp
2a4b68c022 Fix linker warnings for new stubs
svn path=/trunk/; revision=5549
2003-08-12 22:16:44 +00:00
Gé van Geldorp
538c7d51fd Add ROPs for 1, 8, 16, 24 and 32 bpp
svn path=/trunk/; revision=5548
2003-08-12 21:55:47 +00:00
Royce Mitchell III
038fbb6783 implemented KeAcquireSpinLockRaiseToSynch
svn path=/trunk/; revision=5547
2003-08-12 21:19:50 +00:00
Royce Mitchell III
18ebc095c1 fixed build error
svn path=/trunk/; revision=5546
2003-08-12 21:08:14 +00:00
Royce Mitchell III
eef42bcfe5 added proper definitions for many stubs. created xpstubs for functions only available since XP ( i.e. low priority )
svn path=/trunk/; revision=5545
2003-08-12 20:52:47 +00:00
Royce Mitchell III
e1c3966599 structs WCRUN, FD_GLYPHSET, DRIVEROBJ, TYPE1_FONT
svn path=/trunk/; revision=5544
2003-08-12 20:50:50 +00:00
Royce Mitchell III
ac95a0881d typedefs for FLONG & HDRVOBJ
svn path=/trunk/; revision=5543
2003-08-12 20:49:28 +00:00
Royce Mitchell III
253eef3eda forgot some stuff for STROBJ, this clears it up, sorry.
svn path=/trunk/; revision=5542
2003-08-12 20:16:22 +00:00
Royce Mitchell III
e1de2a798e Added GetLastNtError(), corrected STROBJ definition
svn path=/trunk/; revision=5541
2003-08-12 20:08:45 +00:00
Royce Mitchell III
16a98c2251 added HSEMAPHORE
svn path=/trunk/; revision=5540
2003-08-12 20:00:05 +00:00
Casper Hornstrup
ec5b094ed5 Version 1.8.14
svn path=/trunk/; revision=5539
2003-08-12 18:51:25 +00:00
Eric Kohl
03734abbca Implemented code to update container partitions. Only a few border-cases are still missing.
svn path=/trunk/; revision=5538
2003-08-12 15:56:21 +00:00
Martin Fuchs
6010f3ea82 open child folders by double click in ShellBrowserChild
svn path=/trunk/; revision=5537
2003-08-11 22:04:26 +00:00
Royce Mitchell III
4504834722 warnings, warnings, everywhere.... but not so many any more.
svn path=/trunk/; revision=5536
2003-08-11 21:10:49 +00:00
Royce Mitchell III
0eeded0a9a fixed vgaHLine and VGADDIFillSolid for cases where left edge and right edge are in same 8-pixel group. ( no longer needs to default to slow case )
svn path=/trunk/; revision=5535
2003-08-11 19:58:43 +00:00
Martin Fuchs
1503893d83 Subclassing of shell window for drawing desktop background
svn path=/trunk/; revision=5534
2003-08-11 19:53:47 +00:00
Martin Fuchs
6497f3daae draw blue background
svn path=/trunk/; revision=5533
2003-08-11 19:44:53 +00:00
Gunnar Dalsnes
9cc8d55331 -WinStaLock is now WinLock & made global
-removed desktop window list
-fixed/reworked window linking
-SetParent/NtUserSetParent somewhat implemented
-misc

svn path=/trunk/; revision=5532
2003-08-11 19:14:16 +00:00
Martin Fuchs
417dffd0c4 SubclassedWindow class for wrapping subclassed windows
svn path=/trunk/; revision=5531
2003-08-11 18:57:52 +00:00
Casper Hornstrup
ab7f9064f1 Clear screen to black when booting ReactOS.
svn path=/trunk/; revision=5530
2003-08-11 18:56:26 +00:00
Casper Hornstrup
9858f2daeb 2003-08-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* bootdata/txtsetup.sif (SetupData): Add /NOBOOTSCREEN to OsLoadOptions.
	* hal/halx86/display.c (CHAR_ATTRIBUTE_BLACK): Define.
	(HalClearDisplay): Add CharAttribute parameter.
	(HalInitializeDisplay, HalReleaseDisplayOwnership): Blue screen.
	* hal/halx86/halinit.c (DriverEntry): Blue screen for boot phase 2.
	* include/reactos/resource.h (IDB_BOOTIMAGE): Define.
	* ntoskrnl/Makefile: Add boot video objects.
	* ntoskrnl/Makefile.i386: Ditto.
	* ntoskrnl/ntoskrnl.def: Add boot video exports.
	* ntoskrnl/ntoskrnl.edf: Ditto.
	* ntoskrnl/ntoskrnl.rc (IDB_BOOTIMAGE): Define.
	* ntoskrnl/include/internal/kd.h (KdInit3): Add.
	* ntoskrnl/kd/kdebug.c (KdInitSystem): Print information in KdInit3.
	* ntoskrnl/ke/bug.c (KeBugCheckWithTf, KeBugCheckEx): Switch to
	text-mode on crash if needed.
	* ntoskrnl/ke/main.c (ExpInitializeExecutive): Display bootscreen image
	during boot.
	* ntoskrnl/ke/i386/v86m_sup.S (_KiV86Complete): Restore previous mode and
	old exception handler list.
	* subsys/csrss/init.c: Change PrintString to DPRINT1.
	* subsys/smss/init.c: Change PrintString to DPRINT1.
	(SignalInitEvent): New.
	(InitSessionManager): Call SignalInitEvent to switch to text-mode if
	needed.
	* subsys/smss/smss.c: Change PrintString to DPRINT1.
	* ntoskrnl/inbv: New directory.
	* ntoskrnl/inbv/i386: Ditto.
	* ntoskrnl/res: Ditto.
	* include/ntos/bootvid.h: New file.
	* ntoskrnl/inbv/.cvsignore: Ditto.
	* ntoskrnl/inbv/bootvid.c: Ditto.
	* ntoskrnl/inbv/inbv.c: Ditto.
	* ntoskrnl/inbv/i386/.cvsignore: Ditto.
	* ntoskrnl/inbv/i386/pixelsup.S: Ditto.
	* ntoskrnl/res/bootimage.bmp: Ditto.

svn path=/trunk/; revision=5529
2003-08-11 18:50:12 +00:00
Martin Fuchs
bad8c294c5 change CPP to CXX
svn path=/trunk/; revision=5528
2003-08-11 18:17:44 +00:00
Gé van Geldorp
4ad39f0a27 Fixes to SystemParametersInfoA (Unicode->Ansi conversions)
svn path=/trunk/; revision=5527
2003-08-11 11:02:43 +00:00
Gé van Geldorp
4fa73ed4a8 Repairs to WNDPROC and class handling by Jonathan Wilson
svn path=/trunk/; revision=5526
2003-08-11 10:30:19 +00:00
Richard Campbell
aee5041a87 Updates for new wine source tree.
svn path=/trunk/; revision=5525
2003-08-11 09:43:37 +00:00
Richard Campbell
acdc820a0d bug fixes
svn path=/trunk/; revision=5524
2003-08-11 07:02:06 +00:00
James Tabor
fa0bed7eab Clean up warning redefined RT_MESSAGETABLEW, and int w/o a cast at line 500.
svn path=/trunk/; revision=5523
2003-08-11 05:58:02 +00:00
Royce Mitchell III
111ed4cd20 fixed diag lines - initial error for bresnham algo should be 1/2 max error, not 0.
svn path=/trunk/; revision=5522
2003-08-11 04:23:37 +00:00
Royce Mitchell III
08f2d72ce1 fixed miscalculation for upward or leftward bound diagonal lines
svn path=/trunk/; revision=5521
2003-08-11 04:02:07 +00:00
Royce Mitchell III
bd2daaee8b added a couple more diagonal lines for testing
svn path=/trunk/; revision=5520
2003-08-11 03:55:47 +00:00
Royce Mitchell III
4e4e603189 fixed several bugs, simplified some calculations. This appears to have broken framerect drawing ( zoomin on min/max buttons ), but I think that was expecting the wrong behavior.
svn path=/trunk/; revision=5519
2003-08-11 03:51:44 +00:00
Royce Mitchell III
83399f1ec0 fixed bug in DrawLineTo for up-ward verticals and left-ward horizontals.
svn path=/trunk/; revision=5518
2003-08-11 03:35:06 +00:00
Royce Mitchell III
9aa18596b3 fixed the #endif problem reported by GvG.
svn path=/trunk/; revision=5517
2003-08-11 02:59:57 +00:00
Royce Mitchell III
0fa3b8483b added more hlines to isolate it's problem
svn path=/trunk/; revision=5516
2003-08-11 02:15:24 +00:00
Royce Mitchell III
77e6a164bb changes to get cmd compiling again
svn path=/trunk/; revision=5515
2003-08-11 00:22:04 +00:00
Royce Mitchell III
47916748b6 added #include <msvcrt/string.h>
svn path=/trunk/; revision=5514
2003-08-11 00:04:05 +00:00
Royce Mitchell III
254b88eb63 commented out unused things
svn path=/trunk/; revision=5513
2003-08-10 23:58:52 +00:00
Royce Mitchell III
ccf732d210 added _MAX_PATH and cousins as defined in wine
svn path=/trunk/; revision=5512
2003-08-10 23:55:18 +00:00
Eric Kohl
34572eba83 Reverted my logic changes to Mike Nordell's patch.
svn path=/trunk/; revision=5511
2003-08-10 20:33:05 +00:00
Hartmut Birr
da65ace973 - Fixed the allocation of the retrieval pointers for pagefiles
which do not end at a cluster boundary.

svn path=/trunk/; revision=5510
2003-08-10 20:03:10 +00:00
Hartmut Birr
6ae4b24c97 - Fixed the test for the start vcn in VfatGetRetrievalPointers.
svn path=/trunk/; revision=5509
2003-08-10 20:01:16 +00:00
Eric Kohl
65a5a3f831 Fixed returned container partition starting offsets in xHalIoReadPartitionTable().
svn path=/trunk/; revision=5508
2003-08-10 16:49:07 +00:00
Eric Kohl
279af692f5 Don't close the nls section object twice.
svn path=/trunk/; revision=5507
2003-08-10 10:09:51 +00:00
Martin Fuchs
eafe61d076 new TODO entries
svn path=/trunk/; revision=5506
2003-08-10 10:09:25 +00:00
Martin Fuchs
e4942a19d5 documentation update
svn path=/trunk/; revision=5505
2003-08-10 07:36:14 +00:00
Gé van Geldorp
198b7818d5 Adjust MmCopyFrom/ToCaller() declarations to fix warnings in win32k
svn path=/trunk/; revision=5504
2003-08-10 07:05:24 +00:00
Royce Mitchell III
b7ad386053 patch by art yerkes - fixes Y and BKSP
svn path=/trunk/; revision=5503
2003-08-10 06:33:39 +00:00
Martin Fuchs
da4d3ce2b0 slash fir linux compatibiliy
svn path=/trunk/; revision=5502
2003-08-10 06:23:44 +00:00
Martin Fuchs
71e03db3fe fix FOLDERSETTINGS usage
svn path=/trunk/; revision=5501
2003-08-09 23:12:30 +00:00
Martin Fuchs
749c3d1719 small improvements for DesktopWindow
svn path=/trunk/; revision=5500
2003-08-09 22:38:39 +00:00
Martin Fuchs
5bdce2b978 UNICODE for TARGET_RCFLAGS
svn path=/trunk/; revision=5499
2003-08-09 22:38:08 +00:00
Martin Fuchs
1b70b3872f removed *.coff
svn path=/trunk/; revision=5498
2003-08-09 22:37:32 +00:00
Gé van Geldorp
0d95af3a22 Failed to release DC
svn path=/trunk/; revision=5497
2003-08-09 21:14:01 +00:00
Gé van Geldorp
3d7fc85f62 Only set WIN_NCACTIVATED style on toplevel windows, the WIN_NCACTIVATED
style clashes with one of the SS_ (static control) styles and should
be removed in the future anyway

svn path=/trunk/; revision=5496
2003-08-09 21:13:14 +00:00
Martin Fuchs
2306a321ef removed warnings
svn path=/trunk/; revision=5495
2003-08-09 19:56:45 +00:00
Martin Fuchs
6d16724ea7 moved SetShellWindowEx() implementation into kernel space
svn path=/trunk/; revision=5494
2003-08-09 18:22:11 +00:00
Martin Fuchs
f3dec73013 implemented explorer and desktop window using shell view
svn path=/trunk/; revision=5493
2003-08-09 17:32:27 +00:00
Martin Fuchs
8e4b0ed4e7 Implemented explorer and desktop window using shell views
svn path=/trunk/; revision=5492
2003-08-09 17:11:40 +00:00
Eric Kohl
3943f08547 Moved filesystem list to a separate file.
Support installing ReactOS to 'unpartitioned disk space'.
Update drive letters and partition numbers when the partition list is modified.
Distinguish FAT16 CHS, FAT16 LBA and FAT32 LBA partitions.
Print internal partition list for debugging.

svn path=/trunk/; revision=5491
2003-08-09 16:32:26 +00:00
Casper Hornstrup
9654fc7a75 2003-08-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/windows/dialog.c (GetDlgItemInt): Fix unsigned/signed
	warning.
	* lib/user32/windows/menu.c (IsMenu): Ditto.
	* lib/user32/windows/messagebox.c (MSGBOX_OnInit): Ditto.
	* ntoskrnl/mm/ppool.c: Ditto.

svn path=/trunk/; revision=5488
2003-08-09 14:25:08 +00:00
Martin Fuchs
798b12d6be Implemented SetShellWindowEx()
svn path=/trunk/; revision=5487
2003-08-09 13:15:53 +00:00
Gé van Geldorp
bdb03fa472 Handle border case
svn path=/trunk/; revision=5486
2003-08-09 12:03:10 +00:00
Gé van Geldorp
f706d5fa85 Set mouse boundaries based on desktop size
svn path=/trunk/; revision=5485
2003-08-09 11:59:27 +00:00
Gé van Geldorp
900520aace Replace DbgPrint by DPRINT/DPRINT1
svn path=/trunk/; revision=5484
2003-08-09 11:58:13 +00:00
Gé van Geldorp
f223051440 Fix border case and improve speed
svn path=/trunk/; revision=5483
2003-08-09 11:56:57 +00:00
David Welch
f4de5cad85 - Accelerate PATINVERT blits. Makes moving windows less painful but there
is still a significant lag with mouse input.

svn path=/trunk/; revision=5482
2003-08-09 10:39:13 +00:00
David Welch
f40ab28955 - Fixed include path.
svn path=/trunk/; revision=5481
2003-08-09 09:34:09 +00:00
Martin Fuchs
02085be659 implemented GetShellWindow() and SetShellWindow()
svn path=/trunk/; revision=5480
2003-08-09 09:02:48 +00:00
Martin Fuchs
b6d1f250bb implement permission checking in SetShellWindow()
svn path=/trunk/; revision=5479
2003-08-09 08:57:13 +00:00
Martin Fuchs
3eb9a3bce5 implement GetShellWindow() and SetShellWindow()
svn path=/trunk/; revision=5478
2003-08-09 08:42:35 +00:00
Martin Fuchs
4a9e04a0c8 Add GetShellWindow() since it's now present in Microsofts Platform SDK 2003
svn path=/trunk/; revision=5477
2003-08-09 08:26:34 +00:00
Martin Fuchs
af85d1032f Add GetShellWindow() since it's now present in Microsofts Platform SDK 2003 header
svn path=/trunk/; revision=5476
2003-08-09 08:25:38 +00:00
Thomas Bluemel
3d4914c898 fixed build error
svn path=/trunk/; revision=5475
2003-08-09 07:15:20 +00:00
James Tabor
000755de9d This implements GetClassInfo
It also implements GetClassInfoEx
It also implements RealGetWindowClass as best as I can do it right now (i.e. I dont know exactly what makes it different from GetClassName so it just calls GetClassName)
And it finishes GetClassName

svn path=/trunk/; revision=5474
2003-08-09 07:09:57 +00:00
James Tabor
e658713c2c Implement a Default Console Handler for Console Apps.
svn path=/trunk/; revision=5473
2003-08-09 04:13:24 +00:00
Richard Campbell
5e599db3a7 fixed typo
svn path=/trunk/; revision=5472
2003-08-08 22:20:08 +00:00
Royce Mitchell III
8640002319 added apps/tests/linetest - demonstrates bugs in line-drawing routines.
svn path=/trunk/; revision=5471
2003-08-08 21:53:04 +00:00
Royce Mitchell III
c09e41690b appx 4x speed improvement to VGAtoVGA(), which is used when dragging windows around the screen.
svn path=/trunk/; revision=5470
2003-08-08 16:13:18 +00:00
Thomas Bluemel
5dc9eed728 Fixed a bug that crashed cmd.exe when the command name length > MAX_PATH
svn path=/trunk/; revision=5469
2003-08-08 15:52:32 +00:00
Royce Mitchell III
979bd81524 Updated by TortoiseCVS
svn path=/trunk/; revision=5468
2003-08-08 15:25:14 +00:00
Royce Mitchell III
120453cd7c patch by Jonathon Wilson - complete implemenation of GWL_WNDPROC, GCL_WNDPROC and GCL_MENUNAME..
svn path=/trunk/; revision=5467
2003-08-08 02:57:54 +00:00
Hartmut Birr
529277d521 - Fixed some type problems if cmd is compiled as unicode.
svn path=/trunk/; revision=5466
2003-08-08 00:49:24 +00:00
Hartmut Birr
8996ac2b8f - Fixed _(w)makepath.
svn path=/trunk/; revision=5465
2003-08-08 00:46:20 +00:00
Royce Mitchell III
ee25eea496 fixed locking bug, eliminated warnings
svn path=/trunk/; revision=5464
2003-08-07 16:18:02 +00:00
Andrew Greenwood
bda3572a3d Missed this file out last time... I moved KEBUGCHECK and KEBUGCHECKEX into ntos/kefuncs.h (a new file)
svn path=/trunk/; revision=5463
2003-08-07 12:31:55 +00:00
James Tabor
9c21a394bd Start implementing GenerateConsoleCtrlEven.
svn path=/trunk/; revision=5462
2003-08-07 12:17:56 +00:00
Andrew Greenwood
59a33415c2 W32API conversion update
This shouldn't directly affect anything for normal (non-W32API) builds. A more detailed change log will be sent to the ros-kernel mailing list shortly.

svn path=/trunk/; revision=5461
2003-08-07 11:47:33 +00:00
Thomas Bluemel
12d87df6e0 Added NtUserRemoveMenu() and NtUserDeleteMenu()
svn path=/trunk/; revision=5460
2003-08-07 10:25:59 +00:00
Hartmut Birr
b17b46078f - Fixed some type problems if cmd is compiled as unicode.
- Build an unicode argv pointer, if cmd is compiled as unicode.
- Fixed a buffer overflow, while processing the argv pointer.

svn path=/trunk/; revision=5459
2003-08-07 09:43:03 +00:00
Hartmut Birr
6810286aa0 - Fixed some type problems if cmd is compiled as unicode.
- Convert a string from unicode to ascii which is written
  to a file (or to the console), if cmd is compiled as unicode.

svn path=/trunk/; revision=5458
2003-08-07 09:38:54 +00:00
Hartmut Birr
fe60cb4985 - Fixed some type problems if cmd is compiled as unicode.
- Convert a string from a file to unicode if cmd is compiled as unicode.

svn path=/trunk/; revision=5457
2003-08-07 09:34:16 +00:00
Hartmut Birr
84c6569f84 - Fixed some type problems if cmd is compiled as unicode.
svn path=/trunk/; revision=5456
2003-08-07 09:27:42 +00:00
Hartmut Birr
5d1c88be8a - Fixed the build of the environmen in some functions.
svn path=/trunk/; revision=5455
2003-08-07 09:14:14 +00:00
Hartmut Birr
8aadf00967 - Added a missing call to string in __vfwprintf.
svn path=/trunk/; revision=5454
2003-08-07 09:11:08 +00:00
Hartmut Birr
d0daff91e8 - Set the _IOBINARY flag for in memory streams.
- Fixed the size of the terminating 0 in vswprintf/_vsnwprintf.

svn path=/trunk/; revision=5453
2003-08-07 09:08:45 +00:00
Hartmut Birr
2ecabff0a3 - Fixed the format string in GetTempFileNameW.
svn path=/trunk/; revision=5452
2003-08-07 09:05:43 +00:00
Hartmut Birr
0d5b332d52 - Fixed _(w)splitpath.
svn path=/trunk/; revision=5451
2003-08-07 09:04:10 +00:00
Royce Mitchell III
fcd871c119 patch by vizzini - added settings for vmware's net driver, implemented a handful of functions needed by the driver, more to come
svn path=/trunk/; revision=5450
2003-08-07 05:28:33 +00:00
Royce Mitchell III
74ff28452f * added _DISABLE_TIDENTS macro to disable any ANSI/UNICODE ambiguous elements from the header files.
* enabled _DISABLE_TIDENTS for most ReactOS OS components.
* fixed all errors that resulted from this change
* a few small bugfixes along the way

svn path=/trunk/; revision=5449
2003-08-07 04:03:25 +00:00
Royce Mitchell III
8828590645 function name to left-most column
svn path=/trunk/; revision=5448
2003-08-07 03:35:06 +00:00
Royce Mitchell III
ab15b1074b function names to left-most column
svn path=/trunk/; revision=5447
2003-08-07 03:32:00 +00:00
Royce Mitchell III
83c7463719 function names to left column
svn path=/trunk/; revision=5446
2003-08-07 03:29:44 +00:00
Royce Mitchell III
de019849b6 moved _NtCurrentTeb()'s function name to left-most column.
svn path=/trunk/; revision=5445
2003-08-07 01:51:42 +00:00
Royce Mitchell III
5784df93e4 bugfix: UNICODE_STRING objects are not null-terminated by default, but LoadLibraryW expects a null-terminated string.
svn path=/trunk/; revision=5444
2003-08-06 22:05:46 +00:00
Thomas Bluemel
2f728ecc17 some work on menus
svn path=/trunk/; revision=5443
2003-08-06 18:43:58 +00:00
Thomas Bluemel
bd3582207d more work on window classes and RegisterClass[Ex] by Jonathan Wilson
svn path=/trunk/; revision=5442
2003-08-06 16:47:35 +00:00
Royce Mitchell III
9eba70c367 Updated by TortoiseCVS
svn path=/trunk/; revision=5441
2003-08-06 16:39:57 +00:00
Eric Kohl
3b90d80a10 Implemented partition creation and deletion on the internal partition list.
Moved some functions from usetup.c to partlist.c.
Removed unused code.

svn path=/trunk/; revision=5440
2003-08-06 16:37:46 +00:00
Aleksey Bragin
1e452928ca Fixed GetWindowWord()
svn path=/trunk/; revision=5439
2003-08-06 16:37:28 +00:00
Aleksey Bragin
ec326fe1d6 Implemented GetWindowWord() as call to NtuserGetWindowLong() with casting result to WORD.
svn path=/trunk/; revision=5438
2003-08-06 15:38:13 +00:00
Aleksey Bragin
80c5a9419a Added GetWindowWord function to def and edf file
svn path=/trunk/; revision=5437
2003-08-06 15:34:46 +00:00
David Welch
c1de116da3 - Allow painting of the desktop window (why was this removed?)
svn path=/trunk/; revision=5436
2003-08-06 15:27:27 +00:00
David Welch
e373dfabf4 - Optimized implementation of blits from the display surface to a 4BPP DIB.
svn path=/trunk/; revision=5435
2003-08-06 13:53:18 +00:00
David Welch
5d3d0bf17b - Added .cvsignore file for this application.
svn path=/trunk/; revision=5434
2003-08-06 13:52:03 +00:00
David Welch
a1cbe39ded - Updated .cvsignore file for this dll.
svn path=/trunk/; revision=5433
2003-08-06 13:50:54 +00:00
David Welch
f5088eb8d9 - Added .cvsignore file for this directory.
svn path=/trunk/; revision=5432
2003-08-06 13:50:19 +00:00
Thomas Bluemel
461b5018b2 Some changes for menus and unstubbed NtUserGetSystemMenu(), NtUserSetSystemMenu() and NtUserCallHwndLock()
svn path=/trunk/; revision=5431
2003-08-06 13:17:44 +00:00
James Tabor
e5793b92ec Found problem when copy file to C:\TEST, output result was C:TEST, which placed it in current directory. CMD copy is still buggy.
svn path=/trunk/; revision=5430
2003-08-06 11:33:03 +00:00
Thomas Bluemel
0a6485b203 Some changes for menus and unstubbed NtUserCallNoParam() and NtUserCallOneParam()
svn path=/trunk/; revision=5429
2003-08-06 11:32:17 +00:00
James Tabor
a98f5b2575 Fix copy *.exe c:\test and c:test. Made use of GetFullPathNameA to force clean paths.
svn path=/trunk/; revision=5428
2003-08-05 23:48:51 +00:00
James Tabor
5c18315741 Found problem when copy file to C:\TEST, output result was C:TEST, which placed it in current directory. CMD copy is still buggy.
svn path=/trunk/; revision=5427
2003-08-05 23:30:03 +00:00
Emanuele Aliberti
0275f1127b FsRtlInitializeOplock is implemented with a void function because it is obsolete.
svn path=/trunk/; revision=5426
2003-08-05 21:37:21 +00:00
Eric Kohl
5f3ceed713 Added some cosmetical fixes.
Fixed size of trailing unused disk space.
Create partition page adds partition to internal list.
No on-disk changes yet.

svn path=/trunk/; revision=5425
2003-08-05 20:39:24 +00:00
Thomas Bluemel
0c3a60aa71 Added some more menu functions
svn path=/trunk/; revision=5424
2003-08-05 19:50:57 +00:00
Jason Filby
6295a1f99b Dont include winfile in main makefile since it doesnt compile
svn path=/trunk/; revision=5423
2003-08-05 19:05:32 +00:00
Thomas Bluemel
64c31c759c ANSI/UNICODE struct separation patch by Royce3, ANSI/UNICODE WNDCLASS separation and new gdi32 functions by Jonathan Wilson
svn path=/trunk/; revision=5422
2003-08-05 15:41:03 +00:00
Aleksey Bragin
d932b77179 Implemented NdisImmediateReadPort..() and NdisImmediateWritePort...() as calls to hal's READ_PORT_xxx and WRITE_PORT_xxx
svn path=/trunk/; revision=5421
2003-08-05 12:22:48 +00:00
Thomas Bluemel
7d209b51d0 Added new menu functions and fixed some bugs
svn path=/trunk/; revision=5420
2003-08-04 23:52:25 +00:00
Royce Mitchell III
e4dec071c1 added an ASSERT to W32kIsDesktopWindow()
svn path=/trunk/; revision=5419
2003-08-04 21:21:13 +00:00
Eric Kohl
c6f66985bf Additions and fix to NtQueryInformationProcess.
Patch by Mike Nordell.

svn path=/trunk/; revision=5418
2003-08-04 20:44:54 +00:00
Royce Mitchell III
cc71b9ec7a initial implementation of EngLockSurface and EngUnlockSurface
svn path=/trunk/; revision=5417
2003-08-04 19:57:47 +00:00
Royce Mitchell III
35e4a473dd marked implemented functions as such
svn path=/trunk/; revision=5416
2003-08-04 19:57:05 +00:00
Royce Mitchell III
f460558ae4 patch by vizzini - began addition of NDIS4 support to ndis.sys; began conversion of tcpip.sys to NDIS4, adjusted bindings info in the registry
svn path=/trunk/; revision=5415
2003-08-04 19:31:06 +00:00
Royce Mitchell III
602faeb404 bugfix in W32kDeleteDC() - you can't release a NULL handle ( i.e. DCToDelete->w.hBitmap )
svn path=/trunk/; revision=5414
2003-08-04 19:10:52 +00:00
Royce Mitchell III
0132757b63 reformatting + fix GDIOBJ_LockMultipleObj() to not try to lock a NULL handle.
svn path=/trunk/; revision=5413
2003-08-04 19:08:26 +00:00
Royce Mitchell III
3f0eccc563 reformatting, check return value of GDIOBJ_LockMultipleObj(), allow compile to calc size of Lock for calls to GDIOBJ_LockMultipleObj()
svn path=/trunk/; revision=5412
2003-08-04 19:07:50 +00:00
Royce Mitchell III
0af13836af fixed spelling error
svn path=/trunk/; revision=5411
2003-08-04 17:54:52 +00:00
Gunnar Dalsnes
a24079b8cc -misc
svn path=/trunk/; revision=5410
2003-08-04 16:56:49 +00:00
Gunnar Dalsnes
878bd7b8e1 -W32k/NtUser separation
-cleanup
-misc

svn path=/trunk/; revision=5409
2003-08-04 16:55:36 +00:00
Eric Kohl
92bab0c786 Cleaned up the partition list and update the status line.
Removed some global partition data.
Added delete partition page.

svn path=/trunk/; revision=5408
2003-08-04 15:54:05 +00:00
Thomas Bluemel
0b2338e5a9 made very small changes to some menu function definitions
svn path=/trunk/; revision=5407
2003-08-04 10:14:19 +00:00
Thomas Bluemel
ef0c664be9 Implemented a few things...
svn path=/trunk/; revision=5406
2003-08-04 10:13:51 +00:00
Hartmut Birr
afa27c2690 - Fixed a buffer overflow, if a atapi device returns more bytes as requested.
svn path=/trunk/; revision=5405
2003-08-04 08:32:48 +00:00
Hartmut Birr
0fe3e63201 - Fixed the calculation of the block end.
- Allocate large blocks (>=PAGE_SIZE) page aligned.

svn path=/trunk/; revision=5404
2003-08-04 08:26:19 +00:00
James Tabor
fdee06eae0 Fix end of line,
svn path=/trunk/; revision=5403
2003-08-04 03:30:34 +00:00
Royce Mitchell III
78dffae46c new version of PagedPoolCacheAligned. Fixing the problem in subsys/win32k/objects/dc.c allows this code to work perfectly ( even when forcing all PagedPool allocations to be cache aligned. Also implemented buffer over/under-run detection for the PagedPool.
svn path=/trunk/; revision=5402
2003-08-04 00:39:58 +00:00
Royce Mitchell III
330f6dce4f fixed 2 bugs in HEAP_strdupA2W, moved the HEAP_ functions to their own file, and caching the results of RtlGetProcessHeap() for improved performance.
svn path=/trunk/; revision=5401
2003-08-04 00:28:44 +00:00
Royce Mitchell III
bd3999379b clean-up work on my GDIOBJ lock/unlock tracing/debugging
svn path=/trunk/; revision=5400
2003-08-04 00:24:07 +00:00
Royce Mitchell III
1ddb9c245b fixed major ( but obscure ) bug, passing a PDC where an HDC should have been.
svn path=/trunk/; revision=5399
2003-08-04 00:18:21 +00:00
Emanuele Aliberti
a389755afc tlist in rosapps now compiles again.
svn path=/trunk/; revision=5398
2003-08-03 18:06:02 +00:00
Emanuele Aliberti
a98f810f35 CTM in rosapps now compiles again.
svn path=/trunk/; revision=5397
2003-08-03 18:00:41 +00:00
Jason Filby
83c3378434 Comment CTM out from main makefile until it can compile
svn path=/trunk/; revision=5396
2003-08-03 16:37:46 +00:00
Emanuele Aliberti
775fc49699 FsRtlSyncVolumes is implemented, even if it does nothing, because it is an absolete API since NT 4.0 or NT 3.50.
svn path=/trunk/; revision=5395
2003-08-03 15:53:45 +00:00
Emanuele Aliberti
bfa5b471b5 IMAGE_SUBSYSTEM_EFI_xxx added (KJK::Hyperion)
svn path=/trunk/; revision=5394
2003-08-03 15:34:52 +00:00
Royce Mitchell III
c5edad3a6b fixed declarations for W32kSetProp & W32kGetProp to eliminate build errors.
svn path=/trunk/; revision=5393
2003-08-03 15:08:14 +00:00
Eric Kohl
94880f6c27 Replaced partition arrays by a doubly-linked lists.
Display unpartitioned disk space correctly.

svn path=/trunk/; revision=5392
2003-08-03 12:20:22 +00:00
Richard Campbell
922496846f Removed duplicate code for drawing min/max/close buttons, I can actually implement this even better, but i have to leave.
svn path=/trunk/; revision=5391
2003-08-03 01:48:53 +00:00
David Welch
786dbef8e2 - Repaint the parent window in the non-paintself case.
- Updates since DceGetVisRgn returns a region which is in screen(?) coordinates.- Hacks to allow repainting of the desktop.

svn path=/trunk/; revision=5390
2003-08-02 19:56:19 +00:00
David Welch
6cb3436154 - Fixed vga to vga blits with a negative direction.
svn path=/trunk/; revision=5389
2003-08-02 19:53:56 +00:00
David Welch
a319015f49 - Fixed negative width/height off by one.
svn path=/trunk/; revision=5388
2003-08-02 19:52:03 +00:00
David Welch
334c131a7a - Fixed rounding direction.
svn path=/trunk/; revision=5387
2003-08-02 19:46:52 +00:00
Gunnar Dalsnes
5152bc11cc -partially impl. GetQueueStatus, GetInputState
svn path=/trunk/; revision=5386
2003-08-02 16:56:13 +00:00
Gunnar Dalsnes
d550965766 -invented NtUserGetQueueStatus
svn path=/trunk/; revision=5385
2003-08-02 16:54:38 +00:00
Gunnar Dalsnes
eec230298d -added queue bits (currently unused)
svn path=/trunk/; revision=5384
2003-08-02 16:53:40 +00:00
Gunnar Dalsnes
7f050c459b -invented NtUserGetQueueStatus
-added queue bits (currently unused)

svn path=/trunk/; revision=5383
2003-08-02 16:53:08 +00:00
Eric Kohl
0c6dca9836 Replaced array of disk entries in partition list by doubley-linked list of disk entries.
Disabled create, delete and format partition until bugs are fixed.

svn path=/trunk/; revision=5382
2003-08-02 16:49:36 +00:00
Gunnar Dalsnes
3ff6d5b32d -Introduce new WinSta lock to replace most others
svn path=/trunk/; revision=5381
2003-08-02 16:32:53 +00:00
Gunnar Dalsnes
59caa89d83 -W32k/NtUser separation
-Introduce new WinSta lock to replace most others

svn path=/trunk/; revision=5380
2003-08-02 16:32:18 +00:00
Emanuele Aliberti
0eec40929a IMAGE_SUBSYSTEM_XBOX added (Barubary).
svn path=/trunk/; revision=5379
2003-08-02 14:23:29 +00:00
Thomas Bluemel
c6ab1f9b5f Added the MENUITEMINFOA/W structure
svn path=/trunk/; revision=5377
2003-08-02 01:54:24 +00:00
Royce Mitchell III
920142e43a fixed build error
svn path=/trunk/; revision=5376
2003-08-02 00:34:19 +00:00
Royce Mitchell III
9bf077bd41 added UNIMPLEMENTED macro and return 0 to NtUserMenuInfo
svn path=/trunk/; revision=5375
2003-08-02 00:03:33 +00:00
Royce Mitchell III
85ee89fefe moved function names to left-most column
svn path=/trunk/; revision=5374
2003-08-01 23:53:55 +00:00
Royce Mitchell III
6779fdedf7 added file/line# tracking to GDIOBJ locking & unlocking to help track down any remaining GDIOBJ locking issues.
svn path=/trunk/; revision=5373
2003-08-01 20:54:03 +00:00
David Welch
786eaea3f0 - Check the validity of the window handle before calling checking for
a desktop in NtUserGetAncestor.

svn path=/trunk/; revision=5372
2003-08-01 20:24:54 +00:00
David Welch
ec488b1f40 - Realize the system font when creating a DC - avoids a crash on simple
startup.

svn path=/trunk/; revision=5371
2003-08-01 20:22:58 +00:00
Royce Mitchell III
2f64211efe reformatted and fixed one of the gdi locking bugs
svn path=/trunk/; revision=5370
2003-08-01 19:42:54 +00:00
David Welch
9b7ffc9f8a - Implemented GetMessagePos and GetMessageTime
svn path=/trunk/; revision=5369
2003-08-01 18:45:35 +00:00
Royce Mitchell III
63f62de42d death to warnings
svn path=/trunk/; revision=5368
2003-08-01 16:08:14 +00:00
David Welch
81ef6d78bf - Forgot this file.
svn path=/trunk/; revision=5367
2003-08-01 14:44:03 +00:00
David Welch
f09f142871 - More support for window moving. The window moves but what was below the
old position isn't repainted.

svn path=/trunk/; revision=5366
2003-08-01 14:38:51 +00:00
David Welch
07a3d1d8e3 - Added a missing break - fixes nonmasked, non-pattern blits.
- Added support for all vga to vga blit directions.

svn path=/trunk/; revision=5365
2003-08-01 14:34:19 +00:00
Eric Kohl
f8c432602c Fixed target directory for setupldr.sys.
svn path=/trunk/; revision=5364
2003-08-01 14:16:19 +00:00
Thomas Bluemel
36629a61f8 Changed a few definitions
svn path=/trunk/; revision=5363
2003-08-01 11:57:08 +00:00
Thomas Bluemel
2fc0098fe8 Moved a function from menu.c to window.c
svn path=/trunk/; revision=5362
2003-08-01 11:56:43 +00:00
David Welch
571d3f55d3 - Delete the device object and symbolic link if connecting to the port
driver fails.

svn path=/trunk/; revision=5361
2003-08-01 11:47:14 +00:00
Thomas Bluemel
ef7b713c37 Added a few new syscalls
svn path=/trunk/; revision=5360
2003-08-01 10:56:40 +00:00
Thomas Bluemel
6af74c71d9 Added some menu functions
svn path=/trunk/; revision=5359
2003-08-01 10:55:19 +00:00
Thomas Bluemel
7a7250c74b Adjusted usage hints
svn path=/trunk/; revision=5358
2003-08-01 09:06:54 +00:00
Richard Campbell
d798d54a08 boredom, figured i'd commit the change ;)
svn path=/trunk/; revision=5357
2003-08-01 06:32:55 +00:00
Richard Campbell
50a9df0d98 sync with latest wine source tree
svn path=/trunk/; revision=5356
2003-08-01 06:30:52 +00:00
Thomas Bluemel
66615a0c8a Implemented LoadMenuIndirectW()
svn path=/trunk/; revision=5355
2003-08-01 00:44:27 +00:00
Thomas Bluemel
08210803d8 new menu.c
svn path=/trunk/; revision=5354
2003-07-31 23:15:07 +00:00
Thomas Bluemel
feea865c46 Menu functions
svn path=/trunk/; revision=5353
2003-07-31 23:14:37 +00:00
Thomas Bluemel
381c1c6ca9 removed menu functions
svn path=/trunk/; revision=5352
2003-07-31 23:12:38 +00:00
Thomas Bluemel
536f4271e0 Added otMenu type
svn path=/trunk/; revision=5351
2003-07-31 23:11:38 +00:00
Thomas Bluemel
b8fa0ee48c Added W32kGetSysColorBrush() that's included by menu.c
svn path=/trunk/; revision=5350
2003-07-31 23:08:49 +00:00
Thomas Bluemel
a765936fc3 Modified CreateMenu() and DestroyMenu()
svn path=/trunk/; revision=5349
2003-07-31 23:06:43 +00:00
Thomas Bluemel
7cedf407f1 Added menu functions NtUser*
svn path=/trunk/; revision=5348
2003-07-31 23:04:48 +00:00
Thomas Bluemel
3445150d31 Added Handle table for menus
svn path=/trunk/; revision=5347
2003-07-31 23:00:55 +00:00
Martin Fuchs
23845e1644 fix include path for version.h
svn path=/trunk/; revision=5346
2003-07-31 22:00:18 +00:00
Martin Fuchs
c76d495bff Declared IDragSourceHelper
svn path=/trunk/; revision=5345
2003-07-31 21:54:28 +00:00
Royce Mitchell III
cab1b119f1 marked NdisAllocateMemoryWithTag as @implemented
svn path=/trunk/; revision=5344
2003-07-31 21:50:50 +00:00
Royce Mitchell III
361cc25b24 no code change - moved function names to beginning of line
svn path=/trunk/; revision=5343
2003-07-31 18:24:43 +00:00
Royce Mitchell III
a1de567eff kbdus.dll - submitted by art yerkes
svn path=/trunk/; revision=5342
2003-07-31 16:47:08 +00:00
David Welch
0b78b457fc - Reverted incorrect code.
svn path=/trunk/; revision=5341
2003-07-31 11:16:10 +00:00
Royce Mitchell III
bbb0ecb401 added page-aligned allocations ( reworked patch by Mike Nordell )
fixed 2 small probs w/ ntoskrnl.edf

svn path=/trunk/; revision=5340
2003-07-31 01:44:18 +00:00
Royce Mitchell III
84610d9546 fixed bug in struct _MODIFIERS declaration.
svn path=/trunk/; revision=5339
2003-07-31 00:52:59 +00:00
Steven Edwards
77dba28717 Added missing files from Vizzinis NDIS patch
svn path=/trunk/; revision=5338
2003-07-30 23:41:55 +00:00
Royce Mitchell III
eab39eae46 patch submitted by Vizzini (tested by myself) - implemented Ndis configuration api, adapted ne2000 to use it to get configuration, fixed up registry support for ne2000 driver, other supporting changes
svn path=/trunk/; revision=5337
2003-07-30 22:11:20 +00:00
Royce Mitchell III
e5f5b27064 disabled check for existing hive. Needed because hivesys.inf will be getting an update soon, and mkhive can't recognize that an existing file may be out of date.
svn path=/trunk/; revision=5336
2003-07-30 21:22:51 +00:00
Hartmut Birr
09c3a66c65 - Don't allocate/free a class name string in User32ConvertToAsciiMessage/
User32FreeAsciiConvertedMessage if the class name is an atom.

svn path=/trunk/; revision=5335
2003-07-30 19:36:36 +00:00
Magnus Olsen
f15e2b76b9 *** empty log message ***
svn path=/trunk/; revision=5334
2003-07-30 19:06:55 +00:00
Magnus Olsen
007c07efe6 *** empty log message ***
svn path=/trunk/; revision=5333
2003-07-30 18:55:27 +00:00
Royce Mitchell III
98f9507c1e cast away warning, reformatted function definition to conform to standard.
svn path=/trunk/; revision=5332
2003-07-30 18:35:03 +00:00
Martin Fuchs
8bd2e4e942 adapt winefile project file for new file hierarchie
svn path=/trunk/; revision=5331
2003-07-30 16:46:22 +00:00
Martin Fuchs
21ee9e011a usage of Get/SetShellWindow() for registering desktop window; display desktop only, if there is not already another
svn path=/trunk/; revision=5330
2003-07-30 16:44:43 +00:00
Royce Mitchell III
d2cd5c9398 renamed apps/tests/button, apps/test/button2 & apps/tests/tokentest to be ISO-9660 compatible.
fixed install.bat to reflect those changes, and commented out missing files.
fixed cdmake to abort on non-ISO-9660 names, and removed name mangling.

svn path=/trunk/; revision=5329
2003-07-30 14:08:16 +00:00
Eric Kohl
2d1ca36bba Fixed returned key names in calls to NtEnumerateKey() and NtQueryKey().
svn path=/trunk/; revision=5328
2003-07-30 10:49:09 +00:00
Martin Fuchs
31caa1aaff declare some additional missing shell constants and types
svn path=/trunk/; revision=5327
2003-07-30 05:43:07 +00:00
James Tabor
ff990ad35e Created NtUserCreateMenu.
svn path=/trunk/; revision=5326
2003-07-30 04:00:47 +00:00
James Tabor
f01a4bbc85 Adding Art Yerkes Keyboard Patch
svn path=/trunk/; revision=5325
2003-07-29 23:34:12 +00:00
James Tabor
ad08e4b8c5 Adding Art Yerkes Keyboard Patch
svn path=/trunk/; revision=5324
2003-07-29 23:24:01 +00:00
James Tabor
bf7329e25b Adding Art Yerkes Keyboard Testing Code
svn path=/trunk/; revision=5323
2003-07-29 23:03:01 +00:00
Richard Campbell
9b70e2debd A few bugfixes
svn path=/trunk/; revision=5322
2003-07-29 22:42:26 +00:00
James Tabor
132dc80b26 Adding Art Yerkes Keyboard Testing Code
svn path=/trunk/; revision=5321
2003-07-29 20:38:30 +00:00
Royce Mitchell III
d818b09a8c changes to compile on VC6 & fixed some long file name issues I was experiencing.
svn path=/trunk/; revision=5320
2003-07-29 20:30:11 +00:00
Royce Mitchell III
304ae1f0b9 another patch by Mike Nordell. Fixed pointer math to be AMD64 compatible per David Welch.
svn path=/trunk/; revision=5319
2003-07-29 19:43:13 +00:00
Royce Mitchell III
6992ecb9fa casting bug-fix in mm/npool.c - submitted by Mike Nordell aka tamlin - builds & boots to winhello for him & I both.
svn path=/trunk/; revision=5318
2003-07-29 19:00:34 +00:00
Royce Mitchell III
a1edd5239a fixed pointer math to be portable
svn path=/trunk/; revision=5317
2003-07-29 18:51:11 +00:00
Hartmut Birr
c709aacf75 - Close always the thread and process handle, even if cmd does not wait for termination of the process.
svn path=/trunk/; revision=5316
2003-07-29 18:27:10 +00:00
Hartmut Birr
e8644f681b - Reintialize the timer object to reset the event object if there is no user timer in the list.
svn path=/trunk/; revision=5315
2003-07-29 18:17:53 +00:00
Royce Mitchell III
d72f016227 fixed all my bugs passing PUNICODE_STRING objects as PWSTR. Fixed signature of RtlMultiByteToUnicodeN.
svn path=/trunk/; revision=5314
2003-07-29 16:44:48 +00:00
Royce Mitchell III
ef3c8f80d8 fix compiler bug warning by casting to void*
svn path=/trunk/; revision=5313
2003-07-29 16:42:35 +00:00
Eric Kohl
8d0d5db7c6 Make sure the object name is a zero-terminated Unicode in ObFindObject().
Bug found by Royce Mitchell and Vizzini.

svn path=/trunk/; revision=5312
2003-07-29 14:37:39 +00:00
Eric Kohl
5e24ec3176 Defined UNICODE_NULL.
svn path=/trunk/; revision=5311
2003-07-29 14:31:48 +00:00
Martin Fuchs
0ec78164b0 extended cvsignore
svn path=/trunk/; revision=5310
2003-07-29 06:57:19 +00:00
Richard Campbell
9a42a52561 reverted SetWindowPos change, causes display errors in other windows...
svn path=/trunk/; revision=5309
2003-07-29 05:37:23 +00:00
Richard Campbell
0f93fcfd62 Fixed a possible bug in mouse detection, the code states the return is because bochs coughs on the rest of the code, but it seems to work fine now...might this be why some people have issues with mice on real hardware? will check into this later.
svn path=/trunk/; revision=5308
2003-07-29 05:33:15 +00:00
Richard Campbell
51ddb25af9 small fix (subtracts 1 from each side of the client area) done for winemine
svn path=/trunk/; revision=5307
2003-07-29 02:14:46 +00:00
Royce Mitchell III
032b4ea8e6 added *.tmp to .cvsignore
svn path=/trunk/; revision=5306
2003-07-29 00:27:40 +00:00
Eric Kohl
c08e57bdfe Added some more features for messageboxes (MB_HELP, MB_RIGHT,
MB_CANCELTRYCONTINUE, MB_TOPMOST) and made some other changes.
Patch by Thomas Weidenmueller.

svn path=/trunk/; revision=5305
2003-07-28 23:23:17 +00:00
Royce Mitchell III
c96f5dedff fixed allocation size in call to RtlAllocateHeap
svn path=/trunk/; revision=5304
2003-07-28 19:38:58 +00:00
Royce Mitchell III
0d53ee5681 cast return value of RtlAllocateHeap to proper type
svn path=/trunk/; revision=5303
2003-07-28 19:37:13 +00:00
Royce Mitchell III
e170c778de fixed parameter declaration for GetSystemWindowsDirectoryA
svn path=/trunk/; revision=5302
2003-07-28 18:39:41 +00:00
Eric Kohl
1acf351783 Added Messagebox support.
Patch by Thomas Weidenmueller.

svn path=/trunk/; revision=5301
2003-07-28 08:09:51 +00:00
Steven Edwards
70d7e57a1d Mike McCormack <mike@codeweavers.com>
wvsnprint accepts %p too (on win2k).

svn path=/trunk/; revision=5300
2003-07-28 03:51:33 +00:00
Steven Edwards
cb4c1883dd Build Fix
svn path=/trunk/; revision=5299
2003-07-28 03:28:07 +00:00
Steven Edwards
c272eb5359 Fix buidling calc
svn path=/trunk/; revision=5298
2003-07-28 02:26:15 +00:00
James Tabor
ca40c0ffd4 Switch Thread and Process Id around in W32kGetWindowThreadProcessId
svn path=/trunk/; revision=5297
2003-07-28 02:05:46 +00:00
James Tabor
d3b4f0a838 Changes based on Gunnar Andr Dalsnes Thread & Process Id patch
svn path=/trunk/; revision=5296
2003-07-28 01:22:28 +00:00
Eric Kohl
3b66543ecb Added missing MultiSz support.
Fixed some minor bugs.

svn path=/trunk/; revision=5295
2003-07-27 22:27:36 +00:00
Steven Edwards
78e43e0f29 Treat DWORD values as unsigned - Patch by vizzini
svn path=/trunk/; revision=5294
2003-07-27 22:00:26 +00:00
David Welch
2ce9849248 - RegisterClassExA: Don't try to convert a class name which is an atom
to unicode.
- NtUserRegisterClass: Track classes by atom not by name.

svn path=/trunk/; revision=5293
2003-07-27 21:35:50 +00:00
David Welch
df807693a0 - Pass the rop code to PatBlt down to the BitBlt functions.
- Emulate all rop codes on dib 4bpp surfaces. I left the current code
as an optimized case for SRCCOPY.

svn path=/trunk/; revision=5292
2003-07-27 18:37:23 +00:00
David Welch
f858d1a51d - Made the argument to W32kIsEmptyRect constant; fixes some warnings.
svn path=/trunk/; revision=5291
2003-07-27 18:34:48 +00:00
Eric Kohl
938493d413 Added dialog class registration.
Patch by Thomas Weidenmueller.

svn path=/trunk/; revision=5290
2003-07-27 17:48:43 +00:00
Hartmut Birr
b7b1ad8ea9 - Set the deault base for user mode dlls to 0x10000000.
- Fixed the reloc entries for a user mode dll by a second call to ld/dlltools.

svn path=/trunk/; revision=5289
2003-07-27 14:08:38 +00:00
Hartmut Birr
70ebdbd3ec - Protected each access to the module list with acquiring the loader lock.
- Removed the both list entries from the module list in LdrUnloadDll.

svn path=/trunk/; revision=5288
2003-07-27 14:00:04 +00:00
David Welch
d7c14e4f71 - Made a start on implemented window moving.
- Implemented capturing input.
- Implemented some of window activation.
- Fixed a bug in NtUserGetAncestor - Don't return the desktop window for
GA_ROOT.

svn path=/trunk/; revision=5287
2003-07-27 11:54:42 +00:00
David Welch
fc10a5b013 - Don't continue the exception if there are no seh frames at all.
svn path=/trunk/; revision=5286
2003-07-27 11:49:32 +00:00
Eric Kohl
4a35181ef2 Implemented LdrQueryImageFileExecutionOptions().
svn path=/trunk/; revision=5285
2003-07-27 11:40:01 +00:00
Royce Mitchell III
f82ee00571 added missing assert for unhandled case in RtlMultiByteToUnicodeSize
svn path=/trunk/; revision=5284
2003-07-26 23:25:17 +00:00
Royce Mitchell III
a79eb7852c put variables at top to eliminate build error in DIALOG_CreateControls32
svn path=/trunk/; revision=5283
2003-07-26 23:12:08 +00:00
Royce Mitchell III
a432924599 no more complaints about missing .d files during build (yay!) - submitted by arty
svn path=/trunk/; revision=5282
2003-07-26 22:51:03 +00:00
David Welch
90e968621b - Forgot these files; sorry everyone.
svn path=/trunk/; revision=5281
2003-07-26 20:05:45 +00:00
Richard Campbell
6408c767ef bugfixes by Thomas Weidenmueller
svn path=/trunk/; revision=5280
2003-07-26 18:38:52 +00:00
David Welch
ae73363a39 Added some code from wine from menus.
svn path=/trunk/; revision=5279
2003-07-26 15:48:47 +00:00
Hartmut Birr
6b89ce1a25 - Fixed the using of the assert macro.
svn path=/trunk/; revision=5278
2003-07-26 14:56:55 +00:00
Richard Campbell
27d761134d dialog.c patch by Thomas Weidenmueller
svn path=/trunk/; revision=5277
2003-07-26 14:55:35 +00:00
Hartmut Birr
bb9fe349f2 - Moved the code for freeing a segment to separate function (MmUnmapViewOfSegment).
- Freed all segments for an image section in MmUnmapViewOfSection.

svn path=/trunk/; revision=5276
2003-07-26 12:47:51 +00:00
Hartmut Birr
fc9d49f8c0 - Freed the no access memory area in MmReleaseMemoryArea.
- Changed the iteration through the memory area list in MmReleaseMemoryArea.

svn path=/trunk/; revision=5275
2003-07-26 12:45:37 +00:00
Hartmut Birr
501204c9c5 - Fixed the compared length of the name in LdrFindEntryForName.
- Initialized the section handle for a loaded dll in LdrPEStartup.

svn path=/trunk/; revision=5274
2003-07-26 12:44:20 +00:00
Royce Mitchell III
2c955c5467 bigger font + reorganized
svn path=/trunk/; revision=5273
2003-07-26 00:04:02 +00:00
Royce Mitchell III
fd46a0c711 removed unused variable causing build failure. Also fixed int/ptr comparison warning
svn path=/trunk/; revision=5272
2003-07-25 23:57:20 +00:00
David Welch
99f9c40405 - Use a paged lookside list for window messages.
svn path=/trunk/; revision=5271
2003-07-25 23:53:36 +00:00
David Welch
2a0a58c945 - Added InterlockedPushEntrySList export so lookaside lists can be used
from outside ntoskrnl.

svn path=/trunk/; revision=5270
2003-07-25 23:51:23 +00:00
Royce Mitchell III
f66a066087 got rid of BS_FLAT ( Casper added it to include/defines.h )
svn path=/trunk/; revision=5269
2003-07-25 23:50:37 +00:00
Royce Mitchell III
bf34364f74 implementation of window enumeration. thread window enumeration appears to have a problem. Would someone who understands it better please fix it?
svn path=/trunk/; revision=5268
2003-07-25 23:02:21 +00:00
Steven Edwards
8a66dfeaad Added expand program ported from WINE.
svn path=/trunk/; revision=5267
2003-07-25 21:51:30 +00:00
Steven Edwards
56670e025c remove asm code from WINE string function.
svn path=/trunk/; revision=5266
2003-07-25 21:42:14 +00:00
Gunnar Dalsnes
457baf8e8c GetWindowThreadProcessId impl./fixed
svn path=/trunk/; revision=5265
2003-07-25 19:37:14 +00:00
Gunnar Dalsnes
a857d3b160 NtUser-/W32kGetWindowThreadProcessId impl.
svn path=/trunk/; revision=5264
2003-07-25 19:36:26 +00:00
Royce Mitchell III
1e85120647 test case for EnumWindows, EnumChildWindows, etc... all functions that make use of NtUserBuildHwndList
svn path=/trunk/; revision=5263
2003-07-25 19:13:14 +00:00
Gé van Geldorp
a5abfe745b Fix Sermouse entry
svn path=/trunk/; revision=5262
2003-07-25 08:47:30 +00:00
Royce Mitchell III
62662b7a88 destubbing
svn path=/trunk/; revision=5260
2003-07-24 22:17:15 +00:00
Gé van Geldorp
a847c6c2a6 Finished W32kGetTextExtentExPoint() implementation
svn path=/trunk/; revision=5259
2003-07-24 21:23:37 +00:00
Casper Hornstrup
b8ae2f9b96 2003-07-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/fs/vfat/*.c: Remove protection of NDEBUG.

svn path=/trunk/; revision=5258
2003-07-24 20:52:58 +00:00
Steven Edwards
fda0b5ab0b Build and install lz32.dll and twain_32.dll ported from WINE-20030709
svn path=/trunk/; revision=5257
2003-07-24 19:54:25 +00:00
Hartmut Birr
e465a87f9c - Removed import of kernel32.GetVersionExW.
svn path=/trunk/; revision=5256
2003-07-24 19:53:11 +00:00
Steven Edwards
e88c8bf234 Added GetSystemWindowsDirectory[A/W] stub
returning GetWindowsDirectory. FIXME

svn path=/trunk/; revision=5255
2003-07-24 19:50:40 +00:00
Steven Edwards
c32bccd381 Added GetSystemWindowsDirectory[A/W] stub.
svn path=/trunk/; revision=5254
2003-07-24 19:50:03 +00:00
Casper Hornstrup
b1026db1fa 2003-07-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
Move welcome from rosapps to here and beautify it a bit.

	* Makefile: Copy bootdata/autorun.inf, and bootdata/icon.ico to CD.
	(SYS_APPS) Add welcome.
	* include/defines.h (BS_FLAT): Define.
	* bootdata/autorun.inf: New file.
	* bootdata/icon.ico: Ditto.
	* subsys/system/welcome: New directory.
	* subsys/system/welcome/.cvsignore: New file.
	* subsys/system/welcome/Makefile: Ditto.
	* subsys/system/welcome/resource.h: Ditto.
	* subsys/system/welcome/welcome.c: Ditto.
	* subsys/system/welcome/welcome.rc: Ditto.
	* subsys/system/welcome/res/: New directory.
	* subsys/system/welcome/res/background-right.bmp: New file.
	* subsys/system/welcome/res/background-top.bmp: Ditto.
	* subsys/system/welcome/res/default.bmp: Ditto.
	* subsys/system/welcome/res/icon.ico: Ditto.
	* subsys/system/welcome/res/topic0.bmp: Ditto.
	* subsys/system/welcome/res/topic1.bmp: Ditto.
	* subsys/system/welcome/res/topic2.bmp: Ditto.

svn path=/trunk/; revision=5253
2003-07-24 19:37:20 +00:00
Casper Hornstrup
2b7294bcd1 Make vfatfs compile using VC6.
Patch by Mike Nordell.

svn path=/trunk/; revision=5252
2003-07-24 19:00:42 +00:00
Hartmut Birr
f312ea4371 - Fixed the loading of a segment which raw size is lower than the virtual size.
svn path=/trunk/; revision=5251
2003-07-24 18:37:44 +00:00
Royce Mitchell III
d47c833e21 reorganized for NDIS_WDM support ( submitted by vizzini )
svn path=/trunk/; revision=5250
2003-07-24 18:14:59 +00:00
Royce Mitchell III
080c7a7f06 finished destubbing
svn path=/trunk/; revision=5249
2003-07-24 17:53:13 +00:00
Richard Campbell
91e25632da W32kGetTextExtentExPoint now calls W32kGetTextExtentPoint.
This isn't the correct way of doing things, but it fixes a few bugs and allows more apps to load.  (specifically the samplewindow test
and static window test)

svn path=/trunk/; revision=5248
2003-07-24 16:56:59 +00:00
Gé van Geldorp
7adac2389e Prevent overflow
svn path=/trunk/; revision=5247
2003-07-24 16:28:26 +00:00
Royce Mitchell III
7fa795731e added lib/iphlpapi
svn path=/trunk/; revision=5246
2003-07-24 16:17:15 +00:00
Richard Campbell
d0ed98230d Make SampleWindow by default
svn path=/trunk/; revision=5245
2003-07-24 16:16:10 +00:00
Richard Campbell
acfe0be54e Various unicode/ANSI related bugfixes as pointed out by GvG
svn path=/trunk/; revision=5244
2003-07-24 16:14:33 +00:00
Gé van Geldorp
eb40ebc18a Remove unused files (msvcrt version is used instead)
svn path=/trunk/; revision=5243
2003-07-24 15:59:46 +00:00
Richard Campbell
1b631d3524 MoveWindow once again uses SetWindowPos.
svn path=/trunk/; revision=5242
2003-07-24 15:59:34 +00:00
Richard Campbell
c43855748b Sample window + command button test app by Colin Peters. Added because it doesn't yet work under ROS. Source is under public domain.
Requires GetTextMetricsA to work properly.

svn path=/trunk/; revision=5241
2003-07-24 15:51:58 +00:00
Gé van Geldorp
84ec27b055 Special processing for NULL locale
svn path=/trunk/; revision=5240
2003-07-24 15:38:15 +00:00
Royce Mitchell III
42db286418 RtlGetNtVersionNumbers (from WINE)
svn path=/trunk/; revision=5239
2003-07-24 14:25:33 +00:00
Eric Kohl
901dcf2a27 Native applications must not know about BOOL type.
svn path=/trunk/; revision=5238
2003-07-24 13:52:27 +00:00
Royce Mitchell III
2b64861966 fixed warning in ExitThread - gcc complained that noreturn function does return
svn path=/trunk/; revision=5237
2003-07-24 13:50:26 +00:00
Gé van Geldorp
7e7e74b988 This time, apply the correct patch from Art Yerkes instead of an old one...
svn path=/trunk/; revision=5236
2003-07-24 05:51:26 +00:00
Royce Mitchell III
c522666b4e In C:\cvs\reactos live: cvs -q -z9 commit -m "renamed MyGetAdaptersInfo to GetAdaptersInfo so that iphlpapi will compile. Also fixed some ANSI/UNICODE-related bugs ( eliminating the warnings )." lib/iphlpapi/iphlpapi.c lib/iphlpapi/makefile
CVSROOT=:ext:royce@osexperts.com:/CVS/ReactOS

svn path=/trunk/; revision=5235
2003-07-24 01:08:12 +00:00
Gé van Geldorp
b7fd15bf4b Set up for cross-compiling under Linux, patches by Vizzini
svn path=/trunk/; revision=5234
2003-07-23 21:27:15 +00:00
Gé van Geldorp
f36e90f9c1 Handle non-existing accelerator table
svn path=/trunk/; revision=5233
2003-07-23 20:39:45 +00:00
Gé van Geldorp
2cba955bd3 Fix movement direction of mouse cursor, install serial mouse driver but
do not load it by default

svn path=/trunk/; revision=5232
2003-07-23 20:03:28 +00:00
David Welch
e891a5adeb - Fix buffer overflow if mouse packets are arriving faster than we can
pass them to the callback.

svn path=/trunk/; revision=5231
2003-07-23 19:15:40 +00:00
David Welch
6e6bff4228 - Don't allocate/free a new callback on each callback to user mode.
svn path=/trunk/; revision=5230
2003-07-23 19:13:37 +00:00
Eric Kohl
b3503c4a97 Implemented IOCTL_DISK_IS_WRITABLE.
Reread disk geometry only if disk is removable.

svn path=/trunk/; revision=5229
2003-07-23 18:45:08 +00:00
Gé van Geldorp
0af61c4ff3 Release mutex on NULL hWnd, fix by Art Yerkes
svn path=/trunk/; revision=5228
2003-07-23 17:04:24 +00:00
Gé van Geldorp
42d63c02df Implement NtUserPostThreadMessage and add test program (all by Art Yerkes)
svn path=/trunk/; revision=5227
2003-07-23 17:00:55 +00:00
Gé van Geldorp
aa538172d6 Fixed PRTL_BASE_PROCESS_START_ROUTINE declaration
svn path=/trunk/; revision=5226
2003-07-23 15:30:53 +00:00
James Tabor
340036bb3b Implemented ClientToScreen & IsIconic
svn path=/trunk/; revision=5225
2003-07-23 06:19:14 +00:00
James Tabor
ffa7f8d851 Implemented IsIconic
svn path=/trunk/; revision=5224
2003-07-23 06:14:12 +00:00
Royce Mitchell III
c97baed023 Updated by TortoiseCVS
svn path=/trunk/; revision=5223
2003-07-23 05:48:29 +00:00
Royce Mitchell III
530d335005 Updated by TortoiseCVS
svn path=/trunk/; revision=5222
2003-07-23 05:46:55 +00:00
James Tabor
8b30a5168c Implemented ClientToScreen
svn path=/trunk/; revision=5221
2003-07-23 04:52:44 +00:00
KJK::Hyperion
67939b3b7b Made the thread creation code in ROSRTL more portable
svn path=/trunk/; revision=5220
2003-07-22 20:10:04 +00:00
Eric Kohl
c1efb7ad67 Implemented DC coordinate functions.
Patch by Mike Nordell.

svn path=/trunk/; revision=5219
2003-07-22 20:02:08 +00:00
Gé van Geldorp
add211f2ff Properly close file descriptors, fix by rwreed@users.sourceforge.net
svn path=/trunk/; revision=5218
2003-07-22 08:44:38 +00:00
Steven Edwards
b014017354 Added temp header to ease porting of WINE dlls untill w32api fixes are done.
svn path=/trunk/; revision=5217
2003-07-22 04:30:14 +00:00
Steven Edwards
45e9de34d9 Imported twain_32 in to source tree from WINE 20030709
svn path=/trunk/; revision=5216
2003-07-22 04:00:28 +00:00
Steven Edwards
081d91a2fa Imported lz32.dll in to source tree from WINE 20030709
svn path=/trunk/; revision=5215
2003-07-22 03:58:23 +00:00
James Tabor
415aa9b110 Fix KEBUGCHECK
svn path=/trunk/; revision=5214
2003-07-22 03:17:24 +00:00
Royce Mitchell III
2a438cfb48 created KEBUGCHECK, KEBUGCHECKEX, KEBUGCHECKWITHTS macros to report file/line of bugcheck. replace all direct calls of KeBugCheck, KeBugCheckEx and KeBugCheckWithTs with corresponding macros. I rebuilt from a make clean and it looks good.
svn path=/trunk/; revision=5213
2003-07-21 21:53:53 +00:00
David Welch
15550bfef3 - Checked in a test application which does various operations on a
terminated thread.

svn path=/trunk/; revision=5212
2003-07-21 21:44:28 +00:00
David Welch
b9185cc4c4 - Fix for lengthy delays when freeing a memory area. Don't attach/detach
another process when deleting each page table entry.

svn path=/trunk/; revision=5211
2003-07-21 21:41:21 +00:00
David Welch
a3cf0cbc62 Checked in Petr Matousek's fixes for sending APCs to terminated threads.
svn path=/trunk/; revision=5210
2003-07-21 21:36:01 +00:00
Royce Mitchell III
8b57be1bf4 lib/gdi32/misc/stubsa.c: fixed uninitialized pointer ( lpszDescriptionW ) in GetEnhMetaFileDescription()
svn path=/trunk/; revision=5209
2003-07-21 19:21:48 +00:00
Royce Mitchell III
5c1018772c more gdi32 destubbing.
svn path=/trunk/; revision=5208
2003-07-21 19:05:53 +00:00
James Tabor
d3e86a568d Fix FONTENUMEXPROC in W32kEnumFontFamiliesEx.
svn path=/trunk/; revision=5207
2003-07-21 17:43:46 +00:00
Royce Mitchell III
934564a9a6 more gdi32 destubbing, fixed declarations for EnumFontsA/W
svn path=/trunk/; revision=5206
2003-07-21 05:53:15 +00:00
Royce Mitchell III
ce107e0415 fixed declaration for W32kEnumFontFamiliesEx.
Added RosRtlLogFontA2W and RosRtlLogFontW2A to lib/rosrtl
more destubbing in gdi32/misc/stubsa/w.c

svn path=/trunk/; revision=5205
2003-07-21 04:56:32 +00:00
Royce Mitchell III
d0202ddfa2 put GetObjectW back in stubsw.c until Jim's ready for it
svn path=/trunk/; revision=5204
2003-07-21 04:10:41 +00:00
James Tabor
ca2708a0f7 Implemented Unplugged GDI32 code
svn path=/trunk/; revision=5203
2003-07-21 04:04:31 +00:00
Royce Mitchell III
7966c30375 fixed gdi32 not building. order is important for TARGET_SDKLIBS when dealing with static libraries it seems
svn path=/trunk/; revision=5202
2003-07-21 03:56:27 +00:00
Royce Mitchell III
a16d5260b7 removed duplicate definition (old stub) of PrivilegedServiceAuditAlarmA and PrivilegedServiceAuditAlarmW
svn path=/trunk/; revision=5201
2003-07-21 03:40:58 +00:00
Royce Mitchell III
38dce58aa9 fixed missing constants and build errors
svn path=/trunk/; revision=5200
2003-07-21 03:38:42 +00:00
Royce Mitchell III
aa3f68d3f9 *** empty log message ***
svn path=/trunk/; revision=5199
2003-07-21 02:36:00 +00:00
Royce Mitchell III
414a1f8012 moved USER32_DevModeA2W to lib/rosrtl/misc/devmode.c and renamed to RosRtlDevModeA2W. Modified user32 to use it there now. Fixed several stubs in GDI32 and added AddFontResourceExA/W functions.
svn path=/trunk/; revision=5198
2003-07-21 01:59:51 +00:00
James Tabor
55a6108edf Implemented Unplugged GDI32 code
svn path=/trunk/; revision=5197
2003-07-21 01:20:53 +00:00
Royce Mitchell III
39dc42b6a6 lib/advapi32/reg/reg.c:
copied from wine RegQueryMultipleValuesW, RegReplaceKeyA, RegRestoreKeyA
marked RegSaveKeyA as @implemented

svn path=/trunk/; revision=5196
2003-07-21 00:32:23 +00:00
Hartmut Birr
e9966875c8 - Fixed the volume label length in FsdGetFsVolumeInformation.
svn path=/trunk/; revision=5195
2003-07-20 23:09:01 +00:00
Hartmut Birr
3032eefcc4 - Changed volinfo from a windows to a console program.
svn path=/trunk/; revision=5194
2003-07-20 22:55:39 +00:00
Eric Kohl
537b19a1a3 Implemented missing audit functions.
svn path=/trunk/; revision=5193
2003-07-20 22:11:58 +00:00
Eric Kohl
54fd76554e Moved audit functions to a separate file.
Fixed audit function prototypes.

svn path=/trunk/; revision=5192
2003-07-20 22:10:38 +00:00
Royce Mitchell III
de766fd82e applied Mike Nordell's fix to lib/kernel32/synch/wait.c to fix an integer promotion bug causing WaitForSingleEvent, etc, to timeout early.
svn path=/trunk/; revision=5191
2003-07-20 19:53:53 +00:00
Royce Mitchell III
e475cbc5d8 reworked the code in drivers/fs/vfat/volume.c: FsdGetFsAttributeInformation no longer copies null terminator. Verified GetVolumeInformation still works correctly.
svn path=/trunk/; revision=5190
2003-07-20 18:36:53 +00:00
Royce Mitchell III
a084794f67 lpVolumeNameBuffer wasn't being null terminated either. The line of code to do so was there, but it was missing the "= 0"
svn path=/trunk/; revision=5189
2003-07-20 18:05:46 +00:00
James Tabor
9276a7b72a Implemented Unpluged DC code
svn path=/trunk/; revision=5188
2003-07-20 16:47:05 +00:00
Eric Kohl
b6f5c8a9af Implemented PrivilegeCheck().
svn path=/trunk/; revision=5187
2003-07-20 15:16:51 +00:00
Eric Kohl
67897f32c0 Fixed compiler warnings.
svn path=/trunk/; revision=5186
2003-07-20 13:13:03 +00:00
David Welch
b694ab70c9 Each test application should only occur once in the list of targets.
svn path=/trunk/; revision=5185
2003-07-20 12:18:03 +00:00
David Welch
eccf821ef2 Checked in Petr Matousek's suspend test application.
svn path=/trunk/; revision=5184
2003-07-20 12:17:19 +00:00
David Welch
ae921ed9bb - Checked in Petr Matousek's APC fix.
svn path=/trunk/; revision=5183
2003-07-20 12:14:46 +00:00
Hartmut Birr
4c772af134 - Fixed GetVolumeInformationA/W.
svn path=/trunk/; revision=5182
2003-07-20 09:40:13 +00:00
Royce Mitchell III
5d6837f300 added myself to the "notevil" list
svn path=/trunk/; revision=5181
2003-07-20 06:51:29 +00:00
James Tabor
2159a6ca97 Added SetDesktopBitmap
svn path=/trunk/; revision=5180
2003-07-20 06:25:52 +00:00
James Tabor
3c46b3026a Implemented GetKeyState, GetKeyboardState & SetKeyboardState.
svn path=/trunk/; revision=5179
2003-07-20 05:32:19 +00:00
Royce Mitchell III
06f059499a fixed ldr/loader.c to report a missing export before bugchecking. ( was a CPRINT, which apparently doesn't work). Updated ntoskrnl.edf exports so that ros boots in bochs on my system again ( my ATAPI zip drive apparently was choking it )
svn path=/trunk/; revision=5178
2003-07-20 05:15:34 +00:00
James Tabor
2f0ad8d685 Implemented unpluged DC code.
svn path=/trunk/; revision=5177
2003-07-20 04:00:36 +00:00
KJK::Hyperion
93baf2c7ad Fixed a bug in the accelerators code
svn path=/trunk/; revision=5176
2003-07-20 03:45:31 +00:00
James Tabor
e1c932cd9e Removed W32k from SelectObject. Doesnt effect anything.
svn path=/trunk/; revision=5175
2003-07-20 03:01:13 +00:00
James Tabor
377803bd56 Implemented unpluged DC code, FrameRect, InvertRect and DrawFocusRect.
svn path=/trunk/; revision=5174
2003-07-20 02:58:13 +00:00
Royce Mitchell III
91c717d561 drivers/fs/vfat/volume.c: fixed bug lines 88, 92 - wasn't copying null-terminator.
svn path=/trunk/; revision=5173
2003-07-20 01:48:46 +00:00
James Tabor
3a6b419266 Implemented FrameRect, InvertRect and DrawFocusRect.
svn path=/trunk/; revision=5172
2003-07-20 01:24:52 +00:00
James Tabor
a3be8dee2e Implemented Unpluged DC code
svn path=/trunk/; revision=5171
2003-07-20 00:42:55 +00:00
James Tabor
07ac6a5f63 Implemented Unpluged DC code
svn path=/trunk/; revision=5170
2003-07-20 00:33:55 +00:00
James Tabor
6dfe326b7b Implemented Unpluged DC code
svn path=/trunk/; revision=5169
2003-07-20 00:13:36 +00:00
Eric Kohl
313d9193b5 Moved caret functions to a separate file.
svn path=/trunk/; revision=5168
2003-07-20 00:06:27 +00:00
Eric Kohl
b474c2f621 Added audit functions.
svn path=/trunk/; revision=5167
2003-07-20 00:04:06 +00:00
David Welch
34a2109187 - Fixed case of include file name.
svn path=/trunk/; revision=5166
2003-07-19 23:11:16 +00:00
James Tabor
f0c49a6e83 Implemented Unpluged DC code
svn path=/trunk/; revision=5165
2003-07-19 22:53:21 +00:00
Eric Kohl
df985d0406 Implemented NdisMPciAssignSlotResources() partially.
svn path=/trunk/; revision=5164
2003-07-19 11:40:05 +00:00
Hartmut Birr
8e2008811b - Reverted my last changes.
svn path=/trunk/; revision=5163
2003-07-19 08:02:51 +00:00
James Tabor
e70d5b63e7 Add SetDesktopBitmap to def file
svn path=/trunk/; revision=5162
2003-07-19 04:52:52 +00:00
Royce Mitchell III
1519602c46 sorry I fubar'd the build :(
svn path=/trunk/; revision=5161
2003-07-19 04:10:30 +00:00
Royce Mitchell III
35e4ade503 see ChangeLog file please
svn path=/trunk/; revision=5160
2003-07-19 01:35:27 +00:00
Gé van Geldorp
24475b126e Only repaint those parts of the desktop window which need repainting
svn path=/trunk/; revision=5159
2003-07-18 20:55:21 +00:00
Royce Mitchell III
f064f64b1d StringFromCLSID missing call to IMalloc_Release
svn path=/trunk/; revision=5158
2003-07-18 04:01:58 +00:00
Steven Edwards
c79e8b6c63 install new tests.
svn path=/trunk/; revision=5157
2003-07-17 23:24:43 +00:00
Steven Edwards
0cd892553a Updated tests.
svn path=/trunk/; revision=5156
2003-07-17 23:18:23 +00:00
Gé van Geldorp
6b56586d3b Implement DCX_EXCLUDERGN and DCX_INTERSECTRGN
svn path=/trunk/; revision=5155
2003-07-17 21:25:11 +00:00
Gé van Geldorp
6a672c7aec Get SM_CXSCREEN and SM_CYSCREEN from size of desktop window
svn path=/trunk/; revision=5154
2003-07-17 19:31:49 +00:00
Eric Kohl
5e00b52f0a Partially implemented NdisImmediateWritePciSlotInformation() and NdisWritePciSlotInformation().
svn path=/trunk/; revision=5153
2003-07-17 18:17:55 +00:00
Eric Kohl
286447a2c9 Partially implemented NdisImmediateReadPciSlotInformation() and NdisReadPciSlotInformation().
svn path=/trunk/; revision=5152
2003-07-17 17:37:06 +00:00
Andrew Greenwood
e6d0d671b8 Win 32 API header compatibility update
Files that should now compile with Win 32 API headers:
* sysinfo.c
* time.c
* work.c
* zone.c

If you suddenly discover that something no longer works due to a missing struct member, it's probably because I've renamed it to match the Win 32 API headers.

svn path=/trunk/; revision=5151
2003-07-17 16:57:39 +00:00
Casper Hornstrup
cb35a5b425 2003-07-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/fs/ntfs/notes.txt: New file.
	* drivers/fs/ntfs/close.c: Ditto.
	* drivers/fs/ntfs/rw.c: Ditto.
	* drivers/fs/ntfs/attrib.c: Change Cdfs prefix to Ntfs.
	* drivers/fs/ntfs/fcb.c: Ditto.
	* drivers/fs/ntfs/finfo.c: Ditto.
	* drivers/fs/ntfs/fsctl.c: Ditto.
	* drivers/fs/ntfs/volinfo.c: Ditto.
	* drivers/fs/ntfs/ntfs.c (DriverEntry): Set remaining dispatch functions.
	* drivers/fs/ntfs/ntfs.h: Change Cdfs prefix to Ntfs.
	(NTFS_RECORD_HEADER, FILE_RECORD_HEADER): Document fields.
	* drivers/fs/ntfs/makefile (TARGET_OBJECTS): Add close.o rw.o.

svn path=/trunk/; revision=5150
2003-07-17 13:31:39 +00:00
Casper Hornstrup
7359af43d8 Revert.
svn path=/trunk/; revision=5149
2003-07-17 10:47:02 +00:00
Casper Hornstrup
ee523ca3ba 2003-07-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
* INSTALL: Update installation instructions.

svn path=/trunk/; revision=5148
2003-07-17 10:46:21 +00:00
Gé van Geldorp
ef4ace3cd7 Changes for multiple window support
svn path=/trunk/; revision=5147
2003-07-17 07:49:15 +00:00
Gé van Geldorp
5e5c85ccdd Ignore generated _regtests.c
svn path=/trunk/; revision=5146
2003-07-17 06:37:39 +00:00
Steven Edwards
88a91a3783 Added combobox test by Waldo Alvarez
svn path=/trunk/; revision=5145
2003-07-17 03:05:44 +00:00
Royce Mitchell III
496acc2853 changed crtdll to use msvcrt's stdio/scanf.c
svn path=/trunk/; revision=5144
2003-07-16 22:09:07 +00:00
Royce Mitchell III
0d2df900ab using msvcrt's vfscanf now.
svn path=/trunk/; revision=5143
2003-07-16 21:59:56 +00:00
Royce Mitchell III
1a9bda60e7 modifed strtok & wcstok in msvcrt so that crtdll can use it.
new private support functions _lasttoken and _wlasttoken to support strtok and wcstok respectively.
fixed lib/msvcrt/stdio/vfscanf.c to remove unnecessary globals.

svn path=/trunk/; revision=5142
2003-07-16 21:54:22 +00:00
Hartmut Birr
a94bc96529 - Sorry, something was wrong with my last clean up and check in.
The MEMORY_AREA_CACHE_SEGMENT should go to MmPageOutSectionView.

svn path=/trunk/; revision=5141
2003-07-16 20:57:36 +00:00
Royce Mitchell III
0397f6f960 fixed some warnings
svn path=/trunk/; revision=5140
2003-07-16 17:53:34 +00:00
Royce Mitchell III
0b1a369faf integrated Art Yerkes' _ftime implementation at lib/msvcrt/time/ftime.c
fixed ungetc warning in lib/msvcrt/stdio/vfscanf.c (also renamed ungetc macro to UNGETC for clarity)

svn path=/trunk/; revision=5139
2003-07-16 13:29:01 +00:00
Eric Kohl
db21a27a3b Fixed a potential bug related to anonymous struct/union.
svn path=/trunk/; revision=5138
2003-07-16 11:51:56 +00:00
Royce Mitchell III
e847eaa655 Fixed references to errno in MSVCRT to use __set_errno() and _errno() respectively. Fixed warning (args 3 & 6 in call to CreateThread) in lib/msvcrt/process/threadx.c
svn path=/trunk/; revision=5137
2003-07-16 02:45:24 +00:00
Royce Mitchell III
8082dee891 Updated by TortoiseCVS
svn path=/trunk/; revision=5136
2003-07-15 21:56:01 +00:00
Hartmut Birr
067fe9985c - Check for a non existing memory area.
- Check if the memory area would be deleted.
- Allow to page out section pages which are mapped from cache.

svn path=/trunk/; revision=5135
2003-07-15 19:31:27 +00:00
Hartmut Birr
e6d3e40053 - Acquire always the segmemt lock in CcRosLookupCacheSegment/CcRosCreateCacheSegment.
- Try to remove mapped section pages from a cache segment in CcRosTrimCache.

svn path=/trunk/; revision=5134
2003-07-15 19:30:33 +00:00
Royce Mitchell III
4610a1b077 modified crtdll to forward most of it's CTYPE, STRING and WSTRING entries to NTDLL or MSVCRT.
svn path=/trunk/; revision=5132
2003-07-15 19:27:25 +00:00
Andrew Greenwood
8ff4e97a06 Sorry, I broke depend.mk last time by forcing forward slash usage... This should fix it.
svn path=/trunk/; revision=5131
2003-07-15 19:19:07 +00:00
Andrew Greenwood
acd21b1447 My first CVS commit. Hope I get this right. I did put a few files in the CVS dir manually... Innocent mistake... I'll clean it up after I'm done with this. Sorry!
Some of NTOSKRNL now compiles with __USE_W32API enabled. Note that this commit is purely so I know what to do, and also to allow other people to continue working on this if they wish to do so. I will continue hacking away at it.

It's not complete yet, but I've ensured that the changes I have made aren't incompatible with ReactOS as it stands at the moment. It compiles without __USE_W32API fine.

* Modified the tools/depend.mk file to force the use of forward slash (SEH variable?) otherwise it tries to run "toolsdepend.exe" without a slash.

* Moved a couple of routines from include/ddk/halfuncs.h to hal/halx86/include/hal.h

* Fixed conflicting types in ntoskrnl/ex/interlck.c

* Replaced .a with .u, #undef'd "lite" functions and defined NONAMELESSUNION in ntoskrnl/ex/resource.c so that it compiles with Win 32 API

* Added some more conditional defines to include/shared_data.h, ntoskrnl/include/internal/mm.h (and i386/mm.h), ntoskrnl/include/internal/ps.h

* Replaced .a with .u for OWNER_ENTRY and ERESOURCE in include/ddk/extypes.h (so they are compatible with Win 32 API headers)

* Various other small adjustments

Hope this works!

svn path=/trunk/; revision=5130
2003-07-15 16:26:18 +00:00
Royce Mitchell III
5522330a11 Updated by TortoiseCVS
svn path=/trunk/; revision=5129
2003-07-15 13:45:03 +00:00
Gé van Geldorp
fddc6df9fc Pass PHANDLE instead of HANDLE in NtOpenFile call
svn path=/trunk/; revision=5128
2003-07-15 10:49:52 +00:00
Gé van Geldorp
377c984b14 Return STATUS_NO_MEMORY instead of uninitialized Status on out of mem
svn path=/trunk/; revision=5127
2003-07-15 10:42:53 +00:00
Gé van Geldorp
a294d0a9ef Fix W32kFillRgn
svn path=/trunk/; revision=5126
2003-07-15 08:55:52 +00:00
Gé van Geldorp
4c172272c6 Remove debug.h
svn path=/trunk/; revision=5125
2003-07-15 08:15:27 +00:00
Steven Edwards
47a7fcd868 Added another static control test by Royce Mitchell.
svn path=/trunk/; revision=5124
2003-07-15 00:00:38 +00:00
Steven Edwards
de452dbacb Add include/wine/commctl.h back in untill w32api commctl.h header is fixed.
svn path=/trunk/; revision=5123
2003-07-14 22:07:12 +00:00
Steven Edwards
8434cb67a9 Added patch by Martain Fuchs for mulitple explorer instances.
svn path=/trunk/; revision=5122
2003-07-14 22:06:23 +00:00
Hartmut Birr
3364b9cc5f - Fixed the handling for page file backed sections.
svn path=/trunk/; revision=5121
2003-07-14 20:14:11 +00:00
Aleksey Bragin
9789c326b0 Make NdisMRegisterMiniport() say (MIN_TRACE) about failure of a call to driver's MiniportInitialize() instead of silently passing unsuccess to driver.
svn path=/trunk/; revision=5120
2003-07-14 18:55:11 +00:00
Royce Mitchell III
4f2e726bb3 Updated by TortoiseCVS
svn path=/trunk/; revision=5119
2003-07-14 18:44:10 +00:00
Gé van Geldorp
604728cdb1 Set CombinedClip region for memory DCs
svn path=/trunk/; revision=5118
2003-07-14 17:36:59 +00:00
Gé van Geldorp
bf39992fa1 Remove debug stuff
svn path=/trunk/; revision=5117
2003-07-14 17:35:31 +00:00
Gé van Geldorp
c341c05952 Handle NULL color translation
svn path=/trunk/; revision=5116
2003-07-14 17:34:52 +00:00
Gé van Geldorp
6b72cd60c5 Set screen width/height
svn path=/trunk/; revision=5115
2003-07-14 17:33:51 +00:00
Royce Mitchell III
bbab51678b *** empty log message ***
svn path=/trunk/; revision=5114
2003-07-14 13:55:24 +00:00
Gé van Geldorp
81d7932557 .cvsignore maintenance
svn path=/trunk/; revision=5113
2003-07-14 10:05:58 +00:00
Gé van Geldorp
b25c2dc92b Line clipping test program
svn path=/trunk/; revision=5112
2003-07-14 09:47:47 +00:00
Gé van Geldorp
7e11593f8c Implement clipping of lines
svn path=/trunk/; revision=5111
2003-07-14 09:43:11 +00:00
Gé van Geldorp
98d338a1c4 Implement sorting of clip rectangles
svn path=/trunk/; revision=5110
2003-07-14 09:38:02 +00:00
James Tabor
260e788eba Enable FillRgn
svn path=/trunk/; revision=5109
2003-07-14 06:36:36 +00:00
Steven Edwards
2ac4b3136b update sprintf fuctions with code from WINE.
User32 now passes the sprintf regression test

svn path=/trunk/; revision=5108
2003-07-13 18:02:04 +00:00
David Welch
b2730a4d61 - Fixed deadlock in pager thread.
- Added some more debugging checks.

svn path=/trunk/; revision=5107
2003-07-13 14:36:32 +00:00
Eric Kohl
988c5bb9eb Create media change events.
Check for XA disk formats.
Removed shutdown/flush routine.
Process read requests asynchronously.

svn path=/trunk/; revision=5106
2003-07-13 12:40:15 +00:00
Steven Edwards
a7afd50a26 typo - fix install of regression tests.
svn path=/trunk/; revision=5105
2003-07-13 05:42:31 +00:00
Steven Edwards
29189bc99c Added support for installing new regression tests
svn path=/trunk/; revision=5104
2003-07-13 05:14:34 +00:00
Eric Kohl
15f281d6a1 Convert SCSI SRB to ATAPI format for MODE_SENSE, MODE_SELECT and FORMAT_UNIT SCSI commands.
svn path=/trunk/; revision=5103
2003-07-12 19:18:31 +00:00
Eric Kohl
043a6c087f Append a newline to embedded binary files to keep compiler from crying.
svn path=/trunk/; revision=5102
2003-07-12 18:01:53 +00:00
Gé van Geldorp
5ed1368ae1 Please shoot (well, ok, at least never let him near a computer again) the
person who decided that the order of args for EngSort() is different from
the order for qsort()

svn path=/trunk/; revision=5101
2003-07-12 14:00:05 +00:00
Eric Kohl
c8356266c1 Added missing debug messages.
svn path=/trunk/; revision=5100
2003-07-12 13:13:43 +00:00
Eric Kohl
35a9700437 Implemented ScsiClassFindModePage().
Improved error handling.

svn path=/trunk/; revision=5099
2003-07-12 13:10:45 +00:00
Gé van Geldorp
36f596b459 Implement EngSort()
svn path=/trunk/; revision=5098
2003-07-12 12:45:29 +00:00
Casper Hornstrup
fdfc1cdb67 2003-07-12 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/extypes.h (NPAGED_LOOKASIDE_LIST, PAGED_LOOKASIDE_LIST):
	Match w32api fields.
	* include/ddk/halfuncs.h (HalReturnToFirmware, HalReleaseDisplayOwnership,
	HalQueryDisplayOwnership): Move ...
	* include/ntos/halfuncs.h: ... here.
	* include/ntos/rtl.h: (PopEntrySList, PushEntrySList): Move to
	ntoskrnl/ex/lookas.c.
	* include/ntos/zw.h (NtAccessCheckAndAuditAlarm, NtCancelTimer,
	NtCreatePagingFile, NtCreateThread, NtFlushInstructionCache,
	NtFlushVirtualMemory, NtGetTickCount, NtLoadKey, NtLockVirtualMemory,
	NtOpenObjectAuditAlarm, NtProtectVirtualMemory, NtQueryDirectoryObject,
	NtQueryIntervalProfile, NtQueryVirtualMemory, NtRaiseHardError,
	NtSetInformationKey, NtSetInformationObject, NtSetTimer, NtUnloadKey,
	NtUnlockVirtualMemory, NtWaitForMultipleObjects, NtCreateProfile,
	NtDelayExecution, NtExtendSection, NtQuerySection): Include for w32api.
	* ntoskrnl/ntoskrnl.def (ExInterlockedAddUlong,
	ExInterlockedInsertHeadList, ExInterlockedInsertTailList,
	ExInterlockedPopEntryList, ExInterlockedPushEntryList,
	ExInterlockedRemoveHeadList): Make FASTCALL.
	* ntoskrnl/ntoskrnl.edf: Ditto.
	* ntoskrnl/ex/list.c: Ditto.
	* include/ddk/exfuncs.h: Ditto.
	(InterlockedPopEntrySList, InterlockedPushEntrySList,
	ExAllocateFromPagedLookasideList, ExFreeToPagedLookasideList): Add.
	* ntoskrnl/ex/interlck.c (ExInterlockedDecrementLong,
	ExInterlockedAddUlong, ExInterlockedIncrementLong): Undefine if defined.
	* ntoskrnl/ex/lookas.c (PopEntrySList, PushEntrySList,
	LookasideListLock): Add.
	* drivers/dd/blue/blue.c: Include <roskrnl.h>.
	* drivers/dd/videoprt/videoprt.c: Ditto.

svn path=/trunk/; revision=5097
2003-07-12 10:24:45 +00:00
Steven Edwards
b6eef9ca10 upload new config.h and remove unneeded commctl.h
svn path=/trunk/; revision=5096
2003-07-12 03:54:56 +00:00
Steven Edwards
c2f5d2a9c0 cleanup of old wine stuff in main reactos module
svn path=/trunk/; revision=5095
2003-07-12 03:42:01 +00:00
Steven Edwards
664a42a414 cleanup of old wine porting stuff
svn path=/trunk/; revision=5094
2003-07-12 03:40:49 +00:00
David Welch
bf56cfa999 - Return a specific status code when the pagefile is full.
svn path=/trunk/; revision=5093
2003-07-12 01:55:50 +00:00
David Welch
4ae404aaa8 - Implemented Harmutt Birr's suggestion of a seperate thread
to do balancing.
- Move pages that can't be paged out because the pagefile is
full to the end of the LRU list so we don't waste time checking
them again.

svn path=/trunk/; revision=5092
2003-07-12 01:52:10 +00:00
David Welch
e41f7f3329 - Fixed a deadlock - if a thread releasing an fmutex was rescheduled after
checking for contention but before setting the count to one then a thread
trying to acquire the fmutex between the two could be stuck forever even
though the fmutex was actually available.

svn path=/trunk/; revision=5091
2003-07-12 01:09:10 +00:00
Eric Kohl
719ae2a6dd Implemented RegSetKeySecurity().
Cleaned-up the function order.

svn path=/trunk/; revision=5090
2003-07-12 00:03:42 +00:00
Eric Kohl
6a67e42639 Fixed compiler warnings.
svn path=/trunk/; revision=5089
2003-07-11 23:58:45 +00:00
Royce Mitchell III
e2154cb138 checks against EOF were always failing according to compiler
svn path=/trunk/; revision=5088
2003-07-11 22:17:09 +00:00
Royce Mitchell III
abfcc7803e @implemented and @unimplemented comments for lib/msvcrt/*
svn path=/trunk/; revision=5087
2003-07-11 21:58:16 +00:00
Gé van Geldorp
edec53a34e Move qsort() to rosrtl static library
svn path=/trunk/; revision=5086
2003-07-11 20:55:43 +00:00
Casper Hornstrup
ad21febf7c 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/controls/edit.c (EDIT_EM_SetLimitText,
	EDIT_WM_StyleChanged): Fix unsigned/signed warning.

svn path=/trunk/; revision=5085
2003-07-11 18:25:03 +00:00
Casper Hornstrup
2f01236d5b 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* config (DBG): Default to 0.

svn path=/trunk/; revision=5084
2003-07-11 18:17:09 +00:00
Casper Hornstrup
8402d06a5c 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* regtests: New directory.
	* regtests/kmregtests: Ditto.
	* regtests/kmrtint: Ditto.
	* regtests/regtests: Ditto.
	* regtests/shared: Ditto.
	* regtests/win32base: Ditto.
	* include/roskrnl.h: New file.
	* regtests/Makefile: Ditto.
	* regtests/kmregtests/.cvsignore: Ditto.
	* regtests/kmregtests/driver.c: Ditto.
	* regtests/kmregtests/kmregtests.h: Ditto.
	* regtests/kmregtests/Makefile: Ditto.
	* regtests/kmrtint/.cvsignore: Ditto.
	* regtests/kmrtint/kmrtint.c: Ditto.
	* regtests/kmrtint/kmrtint.def: Ditto.
	* regtests/kmrtint/kmrtint.edf: Ditto.
	* regtests/kmrtint/Makefile: Ditto.
	* regtests/regtests/.cvsignore: Ditto.
	* regtests/regtests/Makefile: Ditto.
	* regtests/regtests/regtests.c: Ditto.
	* regtests/shared/.cvsignore: Ditto.
	* regtests/shared/Makefile: Ditto.
	* regtests/shared/regtests.c: Ditto.
	* regtests/shared/regtests.h: Ditto.
	* regtests/win32base/.cvsignore: Ditto.
	* regtests/win32base/driver.c: Ditto.
	* regtests/win32base/file-1.c: Ditto.
	* regtests/win32base/Makefile: Ditto.
	* regtests/win32base/win32base.def: Ditto.
	* regtests/win32base/win32base.edf: Ditto.
	* tools/regtests.c: Ditto.
	* Makefile: Add target regtests.
	* config: Add SEH option.
	* rules.mak: Add tool REGTESTS.
	* bootdata/hivesys.inf: Add service kmregtests.
	* include/win32k/bitmaps.h (DIB_BitmapInfoSize): Correct prototype.
	* ntoskrnl/ke/i386/exp.c (KiKernelTrapHandler): Reverse wrong boolean
	expression.
	* ntoskrnl/ke/i386/usertrap.c (KiUserTrapHandler): Ditto.
	* tools/Makefile: Add tool regtests.
	* tools/config.mk: Handle SEH option.
	* tools/helper.mk: Support regression tests.

svn path=/trunk/; revision=5083
2003-07-11 18:13:57 +00:00
Steven Edwards
17d7cb86ae Enable the edit control
svn path=/trunk/; revision=5082
2003-07-11 18:00:14 +00:00
Steven Edwards
977727b6cd Forgot to commit Makefile
svn path=/trunk/; revision=5081
2003-07-11 17:58:51 +00:00
Casper Hornstrup
fb2b3f263e 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/bitblt/bitblt.c (MainWndProc): Declare variables
	before any statements are processed in the scope.
	* apps/tests/icontest/icontest.c (WinMain): Ditto.
	* apps/tests/wm_paint/wm_paint.c (WinMain, MainWndProc): Ditto.

svn path=/trunk/; revision=5080
2003-07-11 17:33:55 +00:00
Royce Mitchell III
6d1c6531b5 @implemented and @unimplemented comments for lib/crtdll/*
svn path=/trunk/; revision=5079
2003-07-11 17:25:39 +00:00
Casper Hornstrup
06a9aa1f74 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/controls/button.c (PB_Paint, GB_Paint): Declare variables
	before any statements are processed in the scope.
	* lib/user32/controls/combo.c (CBPaintButton): Ditto.
	* lib/user32/windows/accel.c (TranslateAcceleratorA): Ditto.
	* subsys/win32k/include/class.h (W32kGetClassLong): Fix prototype.
	* subsys/win32k/ntuser/class.c (W32kGetClassLong): Match prototype.
	* subsys/win32k/ntuser/windc.c (DceAllocDCE): Ditto.
	* subsys/win32k/ntuser/window.c (DestroyThreadWindows): Ditto.

svn path=/trunk/; revision=5078
2003-07-11 17:08:44 +00:00
Royce Mitchell III
dadc689465 @implemented and @unimplemented comments for subsys/win32k
svn path=/trunk/; revision=5077
2003-07-11 15:59:37 +00:00
Eric Kohl
c31ca84c42 Handle abort command.
svn path=/trunk/; revision=5075
2003-07-11 14:10:41 +00:00
Eric Kohl
c71f4b34ff Implemented ScsiClassModeSense().
svn path=/trunk/; revision=5074
2003-07-11 14:07:30 +00:00
Royce Mitchell III
040095cb66 applied @implemented and @unimplemented comments to ntdll functions that are listed in NT4.0's ntdll exports
svn path=/trunk/; revision=5073
2003-07-11 13:50:23 +00:00
Casper Hornstrup
3e05a4dcd9 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rgenstat/rgenstat.c (process_directory): Fix building on Windows.

svn path=/trunk/; revision=5072
2003-07-11 13:13:35 +00:00
Casper Hornstrup
19f0d68338 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rgenstat/rgenstat.c (API_INFO): Add filename field.
	(path_to_url, get_filename): New functions.
	(parse_file, process_directory): Build cvs path.
	(generate_xml_for_component): Set file attribute on a function.
	* tools/rgenstat/web/rapistatus.css (.h): New class.
	* tools/rgenstat/web/rapistatus.js (clickHandler): Go to the file in
	ViewCVS on click on a function.
	* tools/rgenstat/web/rapistatus.xsl: Handle file attribute.

svn path=/trunk/; revision=5071
2003-07-11 13:05:10 +00:00
Gé van Geldorp
da0c79cd27 Fix calling convention of callback functions
svn path=/trunk/; revision=5070
2003-07-11 09:48:24 +00:00
Steven Edwards
8d6bf48e41 Added untested and mostly borked edit control ported from WINE.
svn path=/trunk/; revision=5069
2003-07-11 04:22:00 +00:00
Royce Mitchell III
59d5c9f016 finished applying @implemented and @unimplemented comments and remove the comments from non-api functions
svn path=/trunk/; revision=5068
2003-07-11 01:23:16 +00:00
Casper Hornstrup
fcdbcbec58 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/win32k/objects/region.c (W32kFillRgn): Fix syntax error.

svn path=/trunk/; revision=5065
2003-07-11 00:16:47 +00:00
Casper Hornstrup
153d94b106 2003-07-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rgenstat/rgenstat.c (get_previous_identifier): Skip end-of-line
	characters when searching for identifier.
	(parse_file): Print a warning if no identifier is found.

svn path=/trunk/; revision=5064
2003-07-10 23:41:36 +00:00
James Tabor
aea9dce89b Update Change Log
svn path=/trunk/; revision=5063
2003-07-10 23:26:51 +00:00
Casper Hornstrup
4453023a6c 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/winspool/stubs.c: Add @implemented and @unimplemented to APIs.

svn path=/trunk/; revision=5062
2003-07-10 21:48:16 +00:00
Casper Hornstrup
f5eab68f00 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/wsock32/stubs.c: Add @implemented and @unimplemented to APIs.

svn path=/trunk/; revision=5061
2003-07-10 21:41:56 +00:00
James Tabor
aa9708cead Implement W32kFillRgn
svn path=/trunk/; revision=5060
2003-07-10 21:36:39 +00:00
Royce Mitchell III
9c041c91d7 @implemented and @unimplemented comments for ntoskrnl/ob/*.c
svn path=/trunk/; revision=5059
2003-07-10 21:34:29 +00:00
Casper Hornstrup
3119d09f0c 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/ws2_32/misc/bsd.c: Add @implemented and @unimplemented
	to APIs.
	* lib/ws2_32/misc/dllmain.c: Ditto.
	* lib/ws2_32/misc/event.c: Ditto.
	* lib/ws2_32/misc/ns.c: Ditto.
	* lib/ws2_32/misc/sndrcv.c: Ditto.
	* lib/ws2_32/misc/stubs.c: Ditto.
	* lib/ws2_32/misc/upcall.c: Ditto.

svn path=/trunk/; revision=5058
2003-07-10 21:28:17 +00:00
Royce Mitchell III
229baeb7ed @implemented and @unimplemented comments for ntoskrnl/nt/*.c
svn path=/trunk/; revision=5057
2003-07-10 21:23:49 +00:00
Casper Hornstrup
f3f967897a 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/dd/videoprt/videoprt.c: Add @implemented and @unimplemented
	to APIs.

svn path=/trunk/; revision=5056
2003-07-10 21:12:40 +00:00
Casper Hornstrup
81b917771a 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/version/misc/stubs.c: Add @implemented and @unimplemented to APIs.

svn path=/trunk/; revision=5055
2003-07-10 21:07:14 +00:00
Royce Mitchell III
555bc8b89e @implemented and @unimplemented comments for ntoskrnl/mm/*.c and also added a few missing /* EOF */ entries
svn path=/trunk/; revision=5054
2003-07-10 21:05:04 +00:00
Casper Hornstrup
5966683fda 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/misc/dde.c: Add @implemented and @unimplemented to APIs.
	* lib/user32/misc/desktop.c: Ditto.
	* lib/user32/misc/display.c: Ditto.
	* lib/user32/misc/exit.c: Ditto.
	* lib/user32/misc/object.c: Ditto.
	* lib/user32/misc/resources.c: Ditto.
	* lib/user32/misc/sprintf.c: Ditto.
	* lib/user32/misc/stubs.c: Ditto.
	* lib/user32/misc/timer.c: Ditto.
	* lib/user32/misc/winhelp.c: Ditto.
	* lib/user32/misc/winsta.c: Ditto.
	* lib/user32/windows/accel.c: Ditto.
	* lib/user32/windows/bitmap.c: Ditto.
	* lib/user32/windows/class.c: Ditto.
	* lib/user32/windows/clipboard.c: Ditto.
	* lib/user32/windows/cursor.c: Ditto.
	* lib/user32/windows/dc.c: Ditto.
	* lib/user32/windows/defwnd.c: Ditto.
	* lib/user32/windows/dialog.c: Ditto.
	* lib/user32/windows/draw.c: Ditto.
	* lib/user32/windows/font.c: Ditto.
	* lib/user32/windows/hook.c: Ditto.
	* lib/user32/windows/icon.c: Ditto.
	* lib/user32/windows/input.c: Ditto.
	* lib/user32/windows/mdi.c: Ditto.
	* lib/user32/windows/menu.c: Ditto.
	* lib/user32/windows/message.c: Ditto.
	* lib/user32/windows/messagebox.c: Ditto.
	* lib/user32/windows/nonclient.c: Ditto.
	* lib/user32/windows/paint.c: Ditto.
	* lib/user32/windows/prop.c: Ditto.
	* lib/user32/windows/rect.c: Ditto.
	* lib/user32/windows/text.c: Ditto.
	* lib/user32/windows/window.c: Ditto.

svn path=/trunk/; revision=5053
2003-07-10 21:04:32 +00:00
Royce Mitchell III
00e0a5619c @implemented and @unimplemented comments for ntoskrnl/lpc/*.c
svn path=/trunk/; revision=5052
2003-07-10 20:42:53 +00:00
Royce Mitchell III
080762083a @implemented and @unimplemented comments for ntoskrnl/ldr/*.c
svn path=/trunk/; revision=5051
2003-07-10 20:34:50 +00:00
Casper Hornstrup
a7b9be5b82 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tdi/cte/string.c: Add @implemented and @unimplemented to
	APIs.
	* drivers/net/tdi/cte/stubs.c: Ditto.
	* drivers/net/tdi/tdi/dereg.c: Ditto.
	* drivers/net/tdi/tdi/handler.c: Ditto.
	* drivers/net/tdi/tdi/obsolete.c: Ditto.
	* drivers/net/tdi/tdi/stubs.c: Ditto.

svn path=/trunk/; revision=5050
2003-07-10 19:54:13 +00:00
Casper Hornstrup
1c8bbc0320 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/snmpapi/snmpapi.c: Add @implemented and @unimplemented to APIs.

svn path=/trunk/; revision=5049
2003-07-10 19:47:23 +00:00
Casper Hornstrup
b22ef7ff80 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/secur32/lsa.c: Add @implemented and @unimplemented to APIs.

svn path=/trunk/; revision=5048
2003-07-10 19:44:20 +00:00
Casper Hornstrup
ca3c5c97f1 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/storage/scsiport/scsiport.c: Add @implemented and
	@unimplemented to APIs.

svn path=/trunk/; revision=5047
2003-07-10 19:41:20 +00:00
Casper Hornstrup
964084e0c4 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/ndis/ndis/40gone.c: Add @implemented and @unimplemented
	to APIs.
	* drivers/net/ndis/ndis/50gone.c: Ditto.
	* drivers/net/ndis/ndis/buffer.c: Ditto.
	* drivers/net/ndis/ndis/cl.c: Ditto.
	* drivers/net/ndis/ndis/cm.c: Ditto.
	* drivers/net/ndis/ndis/co.c: Ditto.
	* drivers/net/ndis/ndis/control.c: Ditto.
	* drivers/net/ndis/ndis/hardware.c: Ditto.
	* drivers/net/ndis/ndis/io.c: Ditto.
	* drivers/net/ndis/ndis/memory.c: Ditto.
	* drivers/net/ndis/ndis/miniport.c: Ditto.
	* drivers/net/ndis/ndis/protocol.c: Ditto.
	* drivers/net/ndis/ndis/string.c: Ditto.
	* drivers/net/ndis/ndis/stubs.c: Ditto.
	* drivers/net/ndis/ndis/time.c: Ditto.

svn path=/trunk/; revision=5046
2003-07-10 19:34:26 +00:00
Casper Hornstrup
5a7413d3b7 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/kernel32/debug/break.c: Add @implemented and @unimplemented
	to APIs.
	* lib/kernel32/debug/debugger.c: Ditto.
	* lib/kernel32/debug/output.c: Ditto.
	* lib/kernel32/except/except.c: Ditto.
	* lib/kernel32/file/backup.c: Ditto.
	* lib/kernel32/file/cnotify.c: Ditto.
	* lib/kernel32/file/copy.c: Ditto.
	* lib/kernel32/file/create.c: Ditto.
	* lib/kernel32/file/curdir.c: Ditto.
	* lib/kernel32/file/delete.c: Ditto.
	* lib/kernel32/file/deviceio.c: Ditto.
	* lib/kernel32/file/dir.c: Ditto.
	* lib/kernel32/file/dosdev.c: Ditto.
	* lib/kernel32/file/file.c: Ditto.
	* lib/kernel32/file/find.c: Ditto.
	* lib/kernel32/file/iocompl.c: Ditto.
	* lib/kernel32/file/lfile.c: Ditto.
	* lib/kernel32/file/lock.c: Ditto.
	* lib/kernel32/file/mailslot.c: Ditto.
	* lib/kernel32/file/move.c: Ditto.
	* lib/kernel32/file/npipe.c: Ditto.
	* lib/kernel32/file/pipe.c: Ditto.
	* lib/kernel32/file/rw.c: Ditto.
	* lib/kernel32/file/tape.c: Ditto.
	* lib/kernel32/file/volume.c: Ditto.
	* lib/kernel32/mem/global.c: Ditto.
	* lib/kernel32/mem/heap.c: Ditto.
	* lib/kernel32/mem/isbad.c: Ditto.
	* lib/kernel32/mem/local.c: Ditto.
	* lib/kernel32/mem/procmem.c: Ditto.
	* lib/kernel32/mem/section.c: Ditto.
	* lib/kernel32/mem/virtual.c: Ditto.
	* lib/kernel32/misc/atom.c: Ditto.
	* lib/kernel32/misc/comm.c: Ditto.
	* lib/kernel32/misc/computername.c: Ditto.
	* lib/kernel32/misc/console.c: Ditto.
	* lib/kernel32/misc/env.c: Ditto.
	* lib/kernel32/misc/error.c: Ditto.
	* lib/kernel32/misc/errormsg.c: Ditto.
	* lib/kernel32/misc/handle.c: Ditto.
	* lib/kernel32/misc/ldr.c: Ditto.
	* lib/kernel32/misc/mbchars.c: Ditto.
	* lib/kernel32/misc/muldiv.c: Ditto.
	* lib/kernel32/misc/perfcnt.c: Ditto.
	* lib/kernel32/misc/profile.c: Ditto.
	* lib/kernel32/misc/res.c: Ditto.
	* lib/kernel32/misc/stubs.c: Ditto.
	* lib/kernel32/misc/sysinfo.c: Ditto.
	* lib/kernel32/misc/time.c: Ditto.
	* lib/kernel32/misc/toolhelp.c: Ditto.
	* lib/kernel32/process/cmdline.c: Ditto.
	* lib/kernel32/process/create.c: Ditto.
	* lib/kernel32/process/proc.c: Ditto.
	* lib/kernel32/process/session.c: Ditto.
	* lib/kernel32/string/lstring.c: Ditto.
	* lib/kernel32/synch/critical.c: Ditto.
	* lib/kernel32/synch/event.c: Ditto.
	* lib/kernel32/synch/intrlck.c: Ditto.
	* lib/kernel32/synch/mutex.c: Ditto.
	* lib/kernel32/synch/sem.c: Ditto.
	* lib/kernel32/synch/timer.c: Ditto.
	* lib/kernel32/synch/wait.c: Ditto.
	* lib/kernel32/thread/fiber.c: Ditto.
	* lib/kernel32/thread/fls.c: Ditto.
	* lib/kernel32/thread/thread.c: Ditto.
	* lib/kernel32/thread/tls.c: Ditto.

svn path=/trunk/; revision=5045
2003-07-10 18:50:51 +00:00
Royce Mitchell III
7fc8c17d16 @implemented and @unimplemented comments for ntoskrnl/ke/*.c
svn path=/trunk/; revision=5044
2003-07-10 17:44:06 +00:00
Casper Hornstrup
0ef97879a2 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/iphlpapi/iphlpapi.c: Add @implemented and @unimplemented
	to APIs.

svn path=/trunk/; revision=5043
2003-07-10 16:57:05 +00:00
Eric Kohl
e3cf693557 Implemented FsRtlDoesNameContainWildCard().
svn path=/trunk/; revision=5042
2003-07-10 16:43:10 +00:00
Royce Mitchell III
061e95c9c9 @implemented and @unimplemented comments for ntoskrnl/kd/*.c
svn path=/trunk/; revision=5041
2003-07-10 15:50:09 +00:00
Royce Mitchell III
f5e3df2e1b @implemented and @unimplemented comments for ntoskrnl/io/*.c
svn path=/trunk/; revision=5040
2003-07-10 15:47:00 +00:00
Casper Hornstrup
e67a8deed9 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/gdi32/main/dllmain.c: Add @implemented and @unimplemented
	to APIs.
	* lib/gdi32/misc/stubs.c: Ditto.
	* lib/gdi32/misc/stubsa.c: Ditto.
	* lib/gdi32/misc/stubsw.c: Ditto.
	* lib/gdi32/objects/bitblt.c: Ditto.
	* lib/gdi32/objects/brush.c: Ditto.
	* lib/gdi32/objects/clip.c: Ditto.
	* lib/gdi32/objects/dc.c: Ditto.
	* lib/gdi32/objects/fillshap.c: Ditto.
	* lib/gdi32/objects/line.c: Ditto.
	* lib/gdi32/objects/pen.c: Ditto.
	* lib/gdi32/objects/region.c: Ditto.
	* lib/gdi32/objects/text.c: Ditto.

svn path=/trunk/; revision=5039
2003-07-10 15:35:49 +00:00
Casper Hornstrup
502033e823 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/storage/class2/class2.c: Add @implemented and @unimplemented
	to APIs.

svn path=/trunk/; revision=5038
2003-07-10 15:11:58 +00:00
Casper Hornstrup
9f9aba203f 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/advapi32/misc/shutdown.c: Add @implemented and @unimplemented
	to APIs.
	* lib/advapi32/misc/stubs.c: Ditto.
	* lib/advapi32/misc/sysfunc.c: Ditto.
	* lib/advapi32/reg/reg.c: Ditto.
	* lib/advapi32/sec/ac.c: Ditto.
	* lib/advapi32/sec/misc.c: Ditto.
	* lib/advapi32/sec/sec.c: Ditto.
	* lib/advapi32/sec/sid.c: Ditto.
	* lib/advapi32/service/scm.c: Ditto.
	* lib/advapi32/service/sctrl.c: Ditto.
	* lib/advapi32/token/privilege.c: Ditto.
	* lib/advapi32/token/token.c: Ditto.

svn path=/trunk/; revision=5037
2003-07-10 15:05:55 +00:00
Casper Hornstrup
ff80e432fd 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rgenstat/rgenstat.c (parse_file): Be silent.

svn path=/trunk/; revision=5036
2003-07-10 12:32:39 +00:00
Casper Hornstrup
980d7609ca 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak (XSLTPROC): Add.
	* tools/Makefile: Add rgenstat.
	* apistatus.lst: New file.
	* tools/rgenstat: New directory.
	* tools/rgenstat/.cvsignore: New file.
	* tools/rgenstat/llmosrt.c: Ditto.
	* tools/rgenstat/Makefile: Ditto.
	* tools/rgenstat/rgenstat.c: Ditto.
	* tools/rgenstat/web: New directory.
	* tools/rgenstat/web/*.gif: New files.
	* tools/rgenstat/web/.cvsignore: New file.
	* tools/rgenstat/web/rapistatus.css: Ditto.
	* tools/rgenstat/web/rapistatus.js: Ditto.
	* tools/rgenstat/web/rapistatus.xsl: Ditto.

svn path=/trunk/; revision=5035
2003-07-10 12:29:02 +00:00
Casper Hornstrup
b71535d7cf 2003-07-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/fs/vfat/misc.c (VfatLockControl): Move it so it is placed
	before it is referenced.
	* include/win32k/ntuser.h (NtUserQueryWindow): Correct prototype.
	* lib/winedbgc/debug.c (default_dbg_vlog): Use wine_dbg_vprintf, not
	__wine_dbg_vprintf.
	* ntoskrnl/nt/vdm.c (NtEarlyInitVdm): Work around GCC 3.4 trying to be
	smart.

svn path=/trunk/; revision=5034
2003-07-10 11:03:51 +00:00
Royce Mitchell III
5fd0423e1b added @implemented and @unimplemented notes to the cc through fs directories of ntoskrnl
svn path=/trunk/; revision=5033
2003-07-10 06:27:13 +00:00
Steven Edwards
36d8866638 New much better edit control test by Waldo Alvarez Ca�izares.
svn path=/trunk/; revision=5032
2003-07-10 05:37:17 +00:00
Casper Hornstrup
92cc25a074 Joakim Asplund <joakim_asplund@spray.se>
lib/user32/controls/combo.c:
- Combo height fix

lib/user32/windows/window.c
- Fix to FindWindowExW, incorrect allocation of UNICODE_STRING:s
    (uninitialized pointers...)

subsys/win32k/ntuser/painting.c:
- Put in locking of window lists where it was missing
- Fixed an incorrect CONTAINING_RECORD

subsys/win32k/ntuser/windc.c
- Put in locking of window lists where it was missing

subsys/win32k/ntuser/window.c
- Put in locking of window lists, both children and thread, where it was missing
- W32kCreateDesktopWindow had forgotten initializing its ChildrenListLock!
- Remade NtUserFindWindowEx which I hope should work more as expected now

subsys/win32k/ntuser/winpos.c:
- Put in locking of window lists where it was missing

svn path=/trunk/; revision=5031
2003-07-10 00:24:04 +00:00
KJK::Hyperion
ca5d43deae Missing file from my last commit
svn path=/trunk/; revision=5030
2003-07-09 21:55:44 +00:00
KJK::Hyperion
f98dc7b970 No more unnecessary and never-ending output from genw32k
svn path=/trunk/; revision=5029
2003-07-09 20:41:35 +00:00
Hartmut Birr
7c4a36f112 - Used string functions instead of iteration code.
- Replaced wcscpy with memcpy if the length of the string is known.

svn path=/trunk/; revision=5028
2003-07-09 20:25:00 +00:00
Hartmut Birr
198a10ed1b - GetTickCount should return the elapsed time since booting in milliseconds and not the tick count.
svn path=/trunk/; revision=5027
2003-07-09 20:19:50 +00:00
Hartmut Birr
52d7096779 - Initialized TickCountMultiplier from shared user data.
svn path=/trunk/; revision=5026
2003-07-09 20:17:47 +00:00
Hartmut Birr
c1c87cd076 - Fixed some debug messages.
svn path=/trunk/; revision=5025
2003-07-09 20:15:50 +00:00
Hartmut Birr
5ac5a18db9 - Used memcpy instead of iteration code.
svn path=/trunk/; revision=5024
2003-07-09 20:13:56 +00:00
Hartmut Birr
edd824b265 - Replaced _wcsnicmp with RtlEqualUnicodeString.
- Replaced wcscpy with memcpy if the length of the string is known.
- Used string functions instaed of iteration code.

svn path=/trunk/; revision=5023
2003-07-09 20:11:41 +00:00
Hartmut Birr
0efd005774 - Check for more illegal characters in VfatCreateFile.
svn path=/trunk/; revision=5022
2003-07-09 19:59:21 +00:00
Eric Kohl
b2805cde6e Implemented WriteConsoleOutputCharacterW().
svn path=/trunk/; revision=5021
2003-07-09 10:43:08 +00:00
Eric Kohl
33859812f3 Initialize lead byte info pointers.
svn path=/trunk/; revision=5020
2003-07-09 10:40:50 +00:00
Gé van Geldorp
d1c76c1e31 Prevent painting outside surface
svn path=/trunk/; revision=5019
2003-07-09 07:00:00 +00:00
KJK::Hyperion
d4b51b9c1f Fully implemented the user32 side of accelerator table functions
svn path=/trunk/; revision=5018
2003-07-09 00:09:47 +00:00
Steven Edwards
3159e14d52 Sync explorer with Martin Fuchs:
- File Management by provided by winefile merge (Requires WINE Headers).
- Fixes registry startup provide via wineboot merge
- Explorer bar loading fixed
- Cleaned up explorer source tree a little.
- Added doc/TODO.txt

svn path=/trunk/; revision=5017
2003-07-08 22:52:53 +00:00
Gé van Geldorp
1c92882c66 Removed tlist because it doesn't build correctly
svn path=/trunk/; revision=5016
2003-07-08 19:40:46 +00:00
Gé van Geldorp
016967f3ee Implement VideoPortLogError (not complete yet)
svn path=/trunk/; revision=5015
2003-07-08 17:06:44 +00:00
Steven Edwards
f3f9aa8224 Added a simple explorer bar to desktop.
Patch by Alexander Ciobanu with parts by Martin Fuchs.

svn path=/trunk/; revision=5014
2003-07-08 03:21:15 +00:00
Hartmut Birr
f824321d24 - Fixed FLUSH_TLB for higher optimization levels like -O6.
svn path=/trunk/; revision=5013
2003-07-07 20:22:47 +00:00
James Tabor
86faaec314 Implement GetWindowThreadProcessId
svn path=/trunk/; revision=5012
2003-07-07 06:39:34 +00:00
James Tabor
a08e8eb37d Implement NtUserQueryWindow
svn path=/trunk/; revision=5011
2003-07-07 06:12:08 +00:00
KJK::Hyperion
5514f345a3 - apps/utils/tickcount/tickcount.c: corrected assertion
- include/funcs.h: declared GetScrollBarInfo
 - include/napi/teb.h: removed misleading comment about NtCurrentTeb; preparing TEB for Windows 2003-compatible FLS support
 - include/tchar.h: added _tcslen
 - include/tgetopt.h: type-generic getopt (see lib/tgetopt)
 - include/win32k/ntuser.h, subsys/win32k/ntuser/window.c, subsys/win32k/ntuser/timer.c, lib/user32/misc/timer.c, lib/user32/windows/paint.c: corrected declarations of NtUserSetTimer, NtUserKillTimer and NtUserRedrawWindow (Win32K doesn't follow the NT calling convention)
 - lib/crtdll/crtdll.def: exported ::operator new and ::operator delete
 - lib/kernel32/thread/fls.c: FLS support almost done
 - lib/ntdll/*: implemented _chkstk/_alloca_probe - some more Visual C++ programs should run now; exported NtCurrentTeb for compatibility with Windows NT 3.51 and some non-i386 architectures; removed the CRT from the linker libraries
 - lib/string/*: type-generic string functions (single, shared implementation for single-byte and Unicode variants using _t macros); corrected a bug in the i386 wcsncmp; merged strspn/strcspn; corrected non-portable code in strspn/strcspn; implemented strnlen/tcsnlen for the i386 architecture; all changes were regression-tested and compared against the Microsoft CRT
 - tools/helper.mk: libraries, dlls and drivers now depend from their DEF/EDF files

svn path=/trunk/; revision=5010
2003-07-06 23:04:19 +00:00
Hartmut Birr
8ed329a442 - Do only attach/detach the process if the address is in user space
and if the current process is not the creator process (in MmProbeAndLockPages).

svn path=/trunk/; revision=5009
2003-07-06 10:50:21 +00:00
Hartmut Birr
0ae49a2c5e - Store the consumer type for each page.
- Implemented the zero pager thread.
- Check that the given page is a user page (in MmGetLRUNextUserPage).

svn path=/trunk/; revision=5008
2003-07-06 10:34:32 +00:00
Hartmut Birr
63ac615e14 - Don't free the memory from symbol files if the kernel debugger is active.
svn path=/trunk/; revision=5007
2003-07-06 10:25:15 +00:00
Hartmut Birr
c6b8b78565 - Release the lock while allocating pages for the pool (in grow_kernel_pool).
svn path=/trunk/; revision=5006
2003-07-06 07:36:56 +00:00
Steven Edwards
9fa9badcf4 Added desktop part of explorer clone by Andrew "Silver Blade" Greenwood.
svn path=/trunk/; revision=5005
2003-07-06 07:18:32 +00:00
Steven Edwards
48802da388 update cvsingnore files
svn path=/trunk/; revision=5004
2003-07-06 04:48:53 +00:00
Steven Edwards
7807d86143 Added new button test by Ciobanu Alexander.
svn path=/trunk/; revision=5003
2003-07-06 01:23:02 +00:00
Hartmut Birr
89b0516273 - Allocate a separate memory area for the kmap area.
- Changed the free block list for the non paged pool from a double linked list
  to an avl tree which is sorted by sizes.

svn path=/trunk/; revision=5002
2003-07-05 18:10:50 +00:00
Casper Hornstrup
4ac70b6bbb 2003-07-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/windows/defwnd.c (DefWndHandleLButtonUpNC,
	User32DefWindowProc): Only send WM_SYSCOMMAND message, not WM_CLOSE.
	(DefWndHandleSysCommand): Handle SC_CLOSE message.

svn path=/trunk/; revision=5001
2003-07-05 17:57:22 +00:00
Casper Hornstrup
9826d4e679 2003-07-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/win32k/ntuser.h (NtUserSetFocus): Correct prototype.
	* lib/user32/misc/stubs.c (SetFocus): Remove.
	* lib/user32/windows/defwnd.c (KEYDATA_ALT): New.
	(User32DefWindowProc): Handle WM_SYSKEYDOWN.
	* lib/user32/windows/input.c (SetFocus): New.
	* subsys/win32k/include/msgqueue.h (USER_MESSAGE_QUEUE): Document
	FocusWindow field.
	* subsys/win32k/include/window.h (W32kSetFocusWindow): Change return type
	to HWND.
	* subsys/win32k/include/winsta.h (W32kGetFocusMessageQueue): New.
	* subsys/win32k/ntuser/input.c (KeyboardThreadMain): Handle system keys.
	* subsys/win32k/ntuser/keyboard.c (NtUserSetFocus): New.
	* subsys/win32k/ntuser/msgqueue.c (MsqPostKeyboardMessage): Implement.
	* subsys/win32k/ntuser/stubs.c (NtUserSetFocus): Remove.
	* subsys/win32k/ntuser/window.c (W32kSetFocusWindow): Implement.
	(NtUserGetClientRect, W32kGetWindowProc, NtUserCreateWindowEx): Release
	window reference on error.
	(W32kDestroyWindow): Remove focus from window tree before destroying it
	if needed.
	* subsys/win32k/ntuser/winpos.c (WinPosChangeActiveWindow): Implement.
	(WinPosShowWindow): Activate window if needed.
	* subsys/win32k/ntuser/winsta.c (W32kGetFocusMessageQueue): New.

svn path=/trunk/; revision=5000
2003-07-05 16:04:01 +00:00
Steven Edwards
6c51b3072c Remove unimplemented in SetDebugErrorLevel.
svn path=/trunk/; revision=4999
2003-07-03 02:52:54 +00:00
Gé van Geldorp
d24db59ab5 Version 0.1.2
svn path=/trunk/; revision=4996
2003-07-02 21:10:16 +00:00
Steven Edwards
ad5a04b000 Add another stub (SetDebugErrorLevel) for dependancy walker.
svn path=/trunk/; revision=4995
2003-07-01 23:09:09 +00:00
Richard Campbell
c43774d9fe more exports...hate doing this manually...
svn path=/trunk/; revision=4994
2003-07-01 01:03:49 +00:00
Richard Campbell
677110b2cc New ROS User32...doesn't work...doesn't even compile...not even CLOSE to being complete...(no dllmain yet for instance...)
svn path=/trunk/; revision=4993
2003-06-30 22:17:37 +00:00
guido
1f77515cad last bit of .cvsignore updates
svn path=/trunk/; revision=4992
2003-06-29 21:12:24 +00:00
guido
0eb42760a8 another day of janitor stuff
svn path=/trunk/; revision=4991
2003-06-29 21:05:54 +00:00
Casper Hornstrup
397aee4126 Readd windows.h as it is needed for cross-compilation.
svn path=/trunk/; revision=4990
2003-06-29 12:30:20 +00:00
guido
f5c3d860c3 still more .cvsignore maintenance
svn path=/trunk/; revision=4989
2003-06-28 23:30:11 +00:00
guido
19a10245f0 again more .cvsignore maintenance
svn path=/trunk/; revision=4988
2003-06-28 23:10:02 +00:00
guido
4dd0876325 more .cvsignore maintenance
svn path=/trunk/; revision=4987
2003-06-28 23:09:27 +00:00
guido
258e83341b .cvsignore maintenance
svn path=/trunk/; revision=4986
2003-06-28 23:04:41 +00:00
Gé van Geldorp
9389c797ef Implement clipping for bitblt operations
svn path=/trunk/; revision=4985
2003-06-28 08:39:18 +00:00
Hartmut Birr
5e61f5b601 - Disabled TAG_STATISTICS_TRACKING.
svn path=/trunk/; revision=4984
2003-06-27 21:35:05 +00:00
Steven Edwards
66cc55e3e3 Remove unneed windows.h
svn path=/trunk/; revision=4983
2003-06-27 21:33:25 +00:00
Hartmut Birr
9195641c84 - Fixed some locking problems during different processes access the same sections (dlls).
- Reduced the overhead in MmCreateImageSection if for a file the caching is initialized already.
- Moved some values from SECTION_OBJECT to MM_IMAGE_SECTION_OBJECT.
- Removed the lock from SECTION_OBJECT.

svn path=/trunk/; revision=4982
2003-06-27 21:28:30 +00:00
Gé van Geldorp
8abf146aac Add architecture define to CFLAGS
svn path=/trunk/; revision=4981
2003-06-27 21:17:35 +00:00
Gé van Geldorp
d7ce70741b Small fixes for newer MinGW version
svn path=/trunk/; revision=4980
2003-06-27 21:10:35 +00:00
Steven Edwards
08ce61d1c2 CreateFileMapping Patch by Hartmut Birr for MSYS applications.
(No they still dont work)

svn path=/trunk/; revision=4979
2003-06-27 20:15:17 +00:00
Hartmut Birr
fcde5c2e54 - Call the FSD if the volume is mounted in IoVerifyVolume.
svn path=/trunk/; revision=4978
2003-06-27 19:00:33 +00:00
Casper Hornstrup
b36ca324a9 2003-06-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/controls/button.c (ButtonWndProc_comm): Fix unsigned/signed
	warning.

svn path=/trunk/; revision=4977
2003-06-27 17:49:07 +00:00
Steven Edwards
bf1abd5a1c Enable stubs for a few functions needed by dependancy walker.
Add new file stubs.c for the functions I didnt know where to place.

svn path=/trunk/; revision=4976
2003-06-27 15:19:19 +00:00
Eric Kohl
f99f43d367 Disabled potentially misleading error message.
svn path=/trunk/; revision=4975
2003-06-27 00:16:33 +00:00
Hartmut Birr
8aca12db20 - Revert the last changes. Support for removable medias needs more investigations.
svn path=/trunk/; revision=4974
2003-06-26 22:01:02 +00:00
Gé van Geldorp
c2f1fc8975 Implement SelectClipRgn() (note: this does NOT mean that clipping is
working now!)

svn path=/trunk/; revision=4973
2003-06-26 21:52:40 +00:00
Eric Kohl
352ebc2a24 Added cdrom IOCTLs.
svn path=/trunk/; revision=4972
2003-06-26 20:02:03 +00:00
Eric Kohl
60c39669a2 Added two NOPs.
FreeLoader can now be built using MinGW.

svn path=/trunk/; revision=4971
2003-06-26 15:16:36 +00:00
Gé van Geldorp
1d4c92223c Remove reference to ps.h
svn path=/trunk/; revision=4970
2003-06-26 06:31:49 +00:00
Steven Edwards
d6cb5e2e20 removed combobox file. code implemented in ported wine control
svn path=/trunk/; revision=4969
2003-06-26 00:14:15 +00:00
Steven Edwards
cefbfd89ed Updated license information with date.
svn path=/trunk/; revision=4968
2003-06-26 00:04:49 +00:00
Steven Edwards
76e2bc6284 Added combobox control ported from WINE
Added controls.h header to hold missing
defines and structures until w32api is in sync.

svn path=/trunk/; revision=4967
2003-06-26 00:01:34 +00:00
Gé van Geldorp
9aea24bfae On thread termination, destroy all windows owned by that thread
svn path=/trunk/; revision=4966
2003-06-25 22:37:07 +00:00
Gé van Geldorp
91e44fd859 Fix polygon outline special case and min/max caption buttons
svn path=/trunk/; revision=4965
2003-06-25 16:55:33 +00:00
Eric Kohl
a547aaf0c5 Added checksum calculation to PnPBiosSupported().
Patch by Petr Matousek.

svn path=/trunk/; revision=4964
2003-06-25 13:56:04 +00:00
Eric Kohl
676160308e Verify storage device upon file open request.
svn path=/trunk/; revision=4963
2003-06-24 21:34:41 +00:00
Eric Kohl
db571ee907 Implemented several IOCTLs.
Improved error handling/reporting.

svn path=/trunk/; revision=4962
2003-06-24 21:32:15 +00:00
Eric Kohl
7cc3dd52bb Merged duplicate code.
svn path=/trunk/; revision=4961
2003-06-24 21:30:08 +00:00
Eric Kohl
0059d716a1 Minor cleanup.
svn path=/trunk/; revision=4960
2003-06-24 12:39:08 +00:00
Eric Kohl
b209c5a96e Allocate a sense data buffer for each disk device.
svn path=/trunk/; revision=4959
2003-06-24 12:38:00 +00:00
Eric Kohl
39825a170b Minor cleanup.
svn path=/trunk/; revision=4958
2003-06-24 12:31:40 +00:00
Eric Kohl
1b854f5f2a Added more stuff to the IDENTIFY data block.
Added support for the TEST UNIT READY command.
Combined various booleans in a flags variable.

svn path=/trunk/; revision=4957
2003-06-24 12:29:02 +00:00
Eric Kohl
b6b732c937 Removed unused variable.
svn path=/trunk/; revision=4956
2003-06-24 12:22:14 +00:00
Gé van Geldorp
59a5712e45 Start scan for PnP$ signature at low end (0xf0000)
svn path=/trunk/; revision=4955
2003-06-24 11:41:58 +00:00
Gé van Geldorp
f974b5e263 Pass failures up the chain
svn path=/trunk/; revision=4954
2003-06-24 11:34:28 +00:00
Richard Campbell
0ceda3461a Some small fixes...more soon
svn path=/trunk/; revision=4953
2003-06-24 00:55:02 +00:00
Richard Campbell
a2ad470fa7 ewps
svn path=/trunk/; revision=4952
2003-06-23 21:16:01 +00:00
Richard Campbell
3fa6478075 Button test (used GvG's static control test as a template.)
svn path=/trunk/; revision=4951
2003-06-23 16:01:20 +00:00
Richard Campbell
d570317697 blah i need to stop having those late night coding sessions :P
Register the button control class

svn path=/trunk/; revision=4950
2003-06-23 14:46:17 +00:00
Richard Campbell
23ed82d969 Ported the button control from wine. This is untested, but will probably work, haven't written a test app yet, will do so when i have more time :)
Implements:
  - Pushbutton
  - RadioButton
  - CheckBox

svn path=/trunk/; revision=4949
2003-06-23 10:10:51 +00:00
Gé van Geldorp
a0f42417ab Implemented GetTextExtentPoint32() and fix GetTextExtentPoint()
svn path=/trunk/; revision=4948
2003-06-22 21:33:48 +00:00
guido
96b4efbbd6 fixed warning
svn path=/trunk/; revision=4947
2003-06-22 19:51:14 +00:00
guido
08aacf7745 fixed slashes
svn path=/trunk/; revision=4946
2003-06-22 19:43:53 +00:00
Steven Edwards
f6f96aa6c6 Ported icontitle control from WINE
svn path=/trunk/; revision=4945
2003-06-22 19:18:17 +00:00
Steven Edwards
cbb3e1c384 Added Icontitle Control
svn path=/trunk/; revision=4944
2003-06-22 19:17:18 +00:00
Eric Kohl
ee442cb63a Added missing SCSI pass-through structures.
svn path=/trunk/; revision=4943
2003-06-22 16:35:58 +00:00
Eric Kohl
eab41528ac Added missing disk io control codes.
svn path=/trunk/; revision=4942
2003-06-22 16:33:44 +00:00
Hartmut Birr
2f0c098757 - Allocate the pipe buffer at creation time.
- Interprete the given buffer size.
- Interprete the given direction (inbound, outbound or both).
- The handling of read/write request in message mode is possible incorrect.

svn path=/trunk/; revision=4941
2003-06-21 19:55:55 +00:00
Eric Kohl
246369270a Implemented NLS functions.
svn path=/trunk/; revision=4940
2003-06-21 18:06:11 +00:00
Jurgen van Gael
ea98149a49 Partial GetAdaptersInfo implementation in order to get ipconfig running.
svn path=/trunk/; revision=4939
2003-06-21 16:04:09 +00:00
Gé van Geldorp
500b7199f9 Bounds checking in MmMarkPage(Un)Mapped, call MmMarkPageMapped from
MmMapIoSpace() for symmetry with MmUnmapIoSpace()

svn path=/trunk/; revision=4938
2003-06-21 14:30:42 +00:00
Gé van Geldorp
ba8e03d72f Implement display ownership, also makes ATI Rage 3rd party video driver
runnable

svn path=/trunk/; revision=4937
2003-06-21 14:25:30 +00:00
guido
a9b7d71462 Fixed cdmake on linux, if D_TYPE is not supported.
svn path=/trunk/; revision=4936
2003-06-21 09:11:24 +00:00
Eric Kohl
58b09f3345 Initial work on error logging.
svn path=/trunk/; revision=4935
2003-06-20 22:43:27 +00:00
Eric Kohl
627e330d0d Disable debug messages.
svn path=/trunk/; revision=4934
2003-06-20 18:19:29 +00:00
Eric Kohl
ea01cf3f1f Enable automatic initialization and termination of Win32 threads and processes.
svn path=/trunk/; revision=4933
2003-06-20 16:26:53 +00:00
Gé van Geldorp
76d1058fc3 Map video memory based on actual size of screen
svn path=/trunk/; revision=4932
2003-06-20 13:04:09 +00:00
Gé van Geldorp
7704a6609a Remove debug breakpoint
svn path=/trunk/; revision=4931
2003-06-20 10:37:23 +00:00
Emanuele Aliberti
3f1690fdbd KERNEL32.GetConsoleWindow implemented
KERNEL32.GetConsoleHardwareState implemented (undoc;incompatible)
KERNEL32.SetConsoleHardwareState implemented (undoc;incompatible)

Console window's handle is actually not returned because csrss does not create a window for each allocated console.

HardwareState is undocumented. Only size of the returned/set data is the same as NT's.

svn path=/trunk/; revision=4930
2003-06-19 19:38:26 +00:00
Gé van Geldorp
3be996ffc4 Revert last change
svn path=/trunk/; revision=4929
2003-06-19 19:01:01 +00:00
Gé van Geldorp
9ad6e7c184 Implement EngQueryPerformanceFrequency, EngQueryPerformanceCounter and
partly Eng(Un)SecureMem

svn path=/trunk/; revision=4928
2003-06-19 17:13:28 +00:00
Gé van Geldorp
86d2a51a17 Implement VideoPortSynchronizeExecution() and VideoPortScanRom()
svn path=/trunk/; revision=4927
2003-06-19 16:04:05 +00:00
Gé van Geldorp
b5c47abf10 Implement KeQueryPerformanceCounter() and move all timer related stuff to
a single file timer.c

svn path=/trunk/; revision=4926
2003-06-19 16:00:03 +00:00
Gé van Geldorp
17b476d572 Implement VideoPortSynchronizeExecution() and VideoPortScanRom()
svn path=/trunk/; revision=4925
2003-06-19 15:57:45 +00:00
Gé van Geldorp
96d9fbe944 Don't mark pages as unmapped when releasing them via MmUnmapIoSpace
svn path=/trunk/; revision=4924
2003-06-19 15:48:39 +00:00
KJK::Hyperion
c37620bed9 Cosmetics...
svn path=/trunk/; revision=4923
2003-06-19 03:17:56 +00:00
KJK::Hyperion
bf7fd7c66e Updated D-Flat/32 readme (removed TODO item about naming conventions)
svn path=/trunk/; revision=4922
2003-06-19 02:52:02 +00:00
KJK::Hyperion
ec3b369d83 Renamed ALL DFlat32 symbols to include a Df/DF/DF_/DFM_ prefix. Compiles and works fine, apparently
svn path=/trunk/; revision=4921
2003-06-19 02:48:13 +00:00
Hartmut Birr
c4c8ee8bec - Fixed the install and dist rule for static libraries.
- Build user mode images without debug symbols.
- Build map files for each image.

svn path=/trunk/; revision=4920
2003-06-17 19:40:08 +00:00
Gé van Geldorp
58bf81b39f Call InitializeVideoAddressSpace() before opening the display device, so
the display open routine can make INT10 calls

svn path=/trunk/; revision=4919
2003-06-17 13:55:16 +00:00
Eric Kohl
79cd3ca256 Disable debug messages.
svn path=/trunk/; revision=4918
2003-06-17 10:52:56 +00:00
Eric Kohl
21ef04df28 Initialize pointers to lead byte info tables.
svn path=/trunk/; revision=4917
2003-06-17 10:44:16 +00:00
Eric Kohl
b905ce98aa Fixed NtAdjustPrivilegeToken() and SeSinglePrivilegeCheck().
svn path=/trunk/; revision=4916
2003-06-17 10:42:37 +00:00
Gé van Geldorp
a2be00bf0e Fix processing of com port options
svn path=/trunk/; revision=4915
2003-06-17 10:39:43 +00:00
Hartmut Birr
df3bf6cc39 - something was wrong with the previous checkin.
svn path=/trunk/; revision=4914
2003-06-16 19:41:56 +00:00
Hartmut Birr
1d64761f02 - Restart the access fault handler if the return value is STATUS_MM_RESTART_OPERATION.
svn path=/trunk/; revision=4913
2003-06-16 19:20:28 +00:00
Hartmut Birr
11eb72da00 - Fixed the test for context flags because the architecture flag is always set.
svn path=/trunk/; revision=4912
2003-06-16 19:19:30 +00:00
Hartmut Birr
f56c6ce607 - Removed the architecture flag while checking the context flag.
- Fixed the test for math support.

svn path=/trunk/; revision=4911
2003-06-16 19:18:48 +00:00
Hartmut Birr
5ce7ebb682 - Fixed the delivering of pending dpcs in KiDispatchInterrupt.
- Raise the irql before acquiring the lock in KeRemoveQueueDpc.

svn path=/trunk/; revision=4910
2003-06-16 19:18:14 +00:00
Hartmut Birr
c4bb72e4ce - Decrement the pending apc count while holding the lock in KiDeliverUserApc.
- Restart the scanning through the apc list if there was released the lock in KiDeliverApc.

svn path=/trunk/; revision=4909
2003-06-16 19:17:45 +00:00
Hartmut Birr
5f1dae9d19 - Release the lock while accessing pageable user mode buffers in NtReplyWaitReceivePortEx.
svn path=/trunk/; revision=4908
2003-06-16 19:17:08 +00:00
Hartmut Birr
b13e656c10 - Remove only the necessary page count from cache in CcRosTrimCache.
svn path=/trunk/; revision=4907
2003-06-16 19:16:32 +00:00
Hartmut Birr
d62b3b42e8 - Fixed the check for an existing paging file.
svn path=/trunk/; revision=4906
2003-06-16 19:15:57 +00:00
Eric Kohl
322b60c160 Added service table pointer to KTHREAD.
svn path=/trunk/; revision=4905
2003-06-16 16:45:52 +00:00
Gé van Geldorp
8726fa1797 Unicode windows not supported yet, convert to Ascii
svn path=/trunk/; revision=4904
2003-06-16 14:05:02 +00:00
Eric Kohl
1cffd5317b Fixed yet another buggy debug message.
svn path=/trunk/; revision=4903
2003-06-16 14:00:51 +00:00
Eric Kohl
6b85686432 Fixed buggy debug message
svn path=/trunk/; revision=4902
2003-06-16 13:56:30 +00:00
Gé van Geldorp
4345b27024 Introduce WNDCLASS(EX)A/W
svn path=/trunk/; revision=4901
2003-06-16 13:56:09 +00:00
Gé van Geldorp
065af84ed5 Static control test application by Radoslaw Sokol
svn path=/trunk/; revision=4900
2003-06-16 13:51:16 +00:00
Gé van Geldorp
4d4af768ba First shot at STATIC control
svn path=/trunk/; revision=4899
2003-06-16 13:46:26 +00:00
Gé van Geldorp
628c166c14 Handle NULL window name
svn path=/trunk/; revision=4898
2003-06-16 13:43:16 +00:00
Gé van Geldorp
5b1bf6da3b Introduce WNDCLASS(EX)A/W
svn path=/trunk/; revision=4897
2003-06-16 13:10:01 +00:00
Steven Edwards
e752a43c37 Gcc 3.x end of line warning fixes
svn path=/trunk/; revision=4896
2003-06-15 21:20:34 +00:00
Gé van Geldorp
acf78985a1 Fixes to get CS_PARENTDC working
svn path=/trunk/; revision=4895
2003-06-15 20:08:02 +00:00
Richard Campbell
53bf611e09 Implemented FindWindowEx, it's untested, but the code should work, as it's fairly straightfoward...This is only a partial implementation however. It searches all windows regardless...
svn path=/trunk/; revision=4894
2003-06-15 04:25:34 +00:00
Steven Edwards
57a3b7cc34 Turn off SEH Junk some other minor cleanups.
svn path=/trunk/; revision=4893
2003-06-14 22:17:48 +00:00
Gé van Geldorp
60dd268c50 Pass WndProc in call to W32kCallWindowProc, saving a usermode -> kernelmode ->
usermode trip

svn path=/trunk/; revision=4892
2003-06-14 21:21:23 +00:00
Hartmut Birr
6a3ff87ad2 - Fixed the calculation of MiPagesRequired.
- Fixed the calculation of the target in MiRebalanceMemoryConsumers.

svn path=/trunk/; revision=4891
2003-06-14 17:53:25 +00:00
Hartmut Birr
07dd3a3809 - Added a boot option for reducing the used memory size ('/maxmem=used_memory_in_mb').
svn path=/trunk/; revision=4890
2003-06-14 17:46:24 +00:00
Gé van Geldorp
2e437e9b34 Partial implementation of DestroyWindow(), handling child windows
svn path=/trunk/; revision=4889
2003-06-14 10:00:58 +00:00
Gé van Geldorp
9c7d6c225d Do not delete WindowTextAtom on WM_NCDESTROY, default WM_NCCREATE might
not have been called (overridden) messing up the WindowTextAtom ref count

svn path=/trunk/; revision=4888
2003-06-14 09:59:17 +00:00
Gé van Geldorp
814ac65da6 Fix RtlpFreeHandle
svn path=/trunk/; revision=4887
2003-06-14 09:52:57 +00:00
Steven Edwards
eda4cb882d primitives test from the Windows 2000 Graphics API Backbook
Used with permission from Damon Chandler <dmc27@ee.cornell.edu>

Makefile still needs to be converted to ReactOS Makefile
and SEH needs to be disabled.

svn path=/trunk/; revision=4886
2003-06-13 19:39:30 +00:00
Gé van Geldorp
3da2ebbda8 Patch by Hartmut to clean up my mess
svn path=/trunk/; revision=4885
2003-06-11 18:38:44 +00:00
Gé van Geldorp
6e6cbd0cc2 "ext" is a pointer
svn path=/trunk/; revision=4884
2003-06-11 18:37:30 +00:00
Eric Kohl
9ddebf95c5 Added math support routines.
Removed entry point.

svn path=/trunk/; revision=4883
2003-06-11 15:42:31 +00:00
Eric Kohl
398d93b19b Added math support routines.
svn path=/trunk/; revision=4882
2003-06-11 15:38:36 +00:00
Eric Kohl
6fb78880ce Fixed math support routines.
svn path=/trunk/; revision=4881
2003-06-11 12:29:49 +00:00
KJK::Hyperion
649a9d362a - i386/fiber.S: SwitchToFiber: there was data defined in the middle of the function - ooops
- thread.c: ThreadStartup: initialize error code to zero, so that void ThreadMains set the thread's exit code to something that makes sense

svn path=/trunk/; revision=4880
2003-06-09 22:39:48 +00:00
Hartmut Birr
a3048f0254 - Replaced FindFirstFile/FindClose with GetFileAttributesEx.
- Fixed some minor bugs.

svn path=/trunk/; revision=4879
2003-06-09 20:31:13 +00:00
Hartmut Birr
48be1aeb7d - Moved strspn and strcspn to the string library.
svn path=/trunk/; revision=4878
2003-06-09 20:27:14 +00:00
Hartmut Birr
e9f3a8740c - Implemented GetFileAttributesExA/W.
svn path=/trunk/; revision=4877
2003-06-09 19:58:21 +00:00
Eric Kohl
52b40cdd07 Verify checksums of preloaded DLLs.
svn path=/trunk/; revision=4876
2003-06-09 13:45:22 +00:00
Eric Kohl
b99ad0e0a6 Implemented LdrVerifyImageMatchesChecksum().
svn path=/trunk/; revision=4875
2003-06-09 13:44:37 +00:00
Eric Kohl
b7bf13d061 Added full implementations of [Get/Set]ComputerName[A/W].
svn path=/trunk/; revision=4874
2003-06-08 21:00:04 +00:00
Eric Kohl
e7d27b01ee Added default computer name settings.
svn path=/trunk/; revision=4873
2003-06-08 20:56:46 +00:00
Gé van Geldorp
472ebde7ec Fix NtGetContextThread() and implement NtSetContextThread()
svn path=/trunk/; revision=4872
2003-06-07 19:13:43 +00:00
Casper Hornstrup
32f2d198df Add missing file.
svn path=/trunk/; revision=4871
2003-06-07 16:23:46 +00:00
Casper Hornstrup
a86b74f2fe 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ddk/dbgfuncs.h: Move ...
	* include/ntos/dbgfuncs.h: ... here.
	* include/basetsd.h (LONG32): Make it a long.
	* include/ntos.h: Include ntos/dbgfuncs.h.
	* include/ddk/dbgfuncs.h (DBG_STATUS_*, DBG_GET_SHOW_*): Move to
	include/ntos/dbgfuncs.h.
	* include/ddk/exfuncs.h (ExNotifyCallback): Match w32api prototype.
	(*BinaryTree, *SplayTree, *HashTable): Move to include/ntos/zw.h.
	* include/ddk/extypes.h (TRAVERSE_METHOD, PKEY_COMPARATOR,
	PTRAVERSE_ROUTINE, _BINARY_TREE_NODE, BINARY_TREE, SPLAY_TREE_NODE,
	SPLAY_TREE, HASH_TABLE): Move to include/ntos/zwtypes.h.
	* include/ddk/status.h (STATUS_PATH_SYNTAX_BAD): Rename to
	STATUS_OBJECT_PATH_SYNTAX_BAD.
	* apps/utils/objdir/objdir.c (StatusToName): Change
	STATUS_PATH_SYNTAX_BAD to STATUS_OBJECT_PATH_SYNTAX_BAD.
	* ntoskrnl/dbg/errinfo.c: Use STATUS_OBJECT_PATH_SYNTAX_BAD.
	* include/ntos/rtl.h (RtlQueryRegistryValues, RtlWriteRegistryValue,
	RtlDeleteRegistryValue): Match w32api prototypes.
	* include/ntos/zw.h (ZwQuerySystemTime): Ditto.
	* lib/kernel32/file/cnotify.c (FindFirstChangeNotificationW): Use
	STATUS_OBJECT_PATH_SYNTAX_BAD.
	* lib/ntdll/rtl/registry.c (RtlDeleteRegistryValue,
	RtlQueryRegistryValues, RtlWriteRegistryValue): Match w32api prototypes.
	* ntoskrnl/cm/cm.h, ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/regfile.c: Change
	FILETIME to LARGE_INTEGER.
	* ntoskrnl/cm/rtlfunc.c (RtlDeleteRegistryValue, RtlQueryRegistryValues,
	RtlWriteRegistryValue): Match w32api prototypes.
	* ntoskrnl/ex/callback.c (ExNotifyCallback): Ditto.
	* ntoskrnl/ex/time.c (NtQuerySystemTime): Ditto.

svn path=/trunk/; revision=4870
2003-06-07 16:16:39 +00:00
Hartmut Birr
a47b482b97 - Dereference the process object in W32kCleanupForProcess.
svn path=/trunk/; revision=4869
2003-06-07 12:37:01 +00:00
Casper Hornstrup
39c92c6522 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* hal/halx86/dma.c (AdapterObjects): Don't put braces on scalar
	initializers.

svn path=/trunk/; revision=4868
2003-06-07 12:25:53 +00:00
Casper Hornstrup
685119e0cd 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/obfuncs.h (ObCreateObject): Remove.
	* include/ntos/zwtypes.h (ObRosCreateObject): Add.
	* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
	and ObRosCreateObject@20.
	* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,
	ntoskrnl/io/create.c, ntoskrnl/io/device.c, ntoskrnl/io/iocomp.c,
	ntoskrnl/lpc/connect.c, ntoskrnl/lpc/create.c, ntoskrnl/mm/section.c,
	ntoskrnl/nt/evtpair.c, ntoskrnl/nt/mutant.c, ntoskrnl/nt/ntevent.c,
	ntoskrnl/nt/ntsem.c, ntoskrnl/nt/nttimer.c, ntoskrnl/nt/profile.c,
	ntoskrnl/ob/dirobj.c, ntoskrnl/ob/namespc.c, ntoskrnl/ob/symlink.c,
	ntoskrnl/ps/create.c, ntoskrnl/ps/process.c, ntoskrnl/se/token.c,
	subsys/win32k/ntuser/winsta.c: Use ObRosCreateObject, not ObCreateObject.
	* ntoskrnl/ob/object.c (ObRosCreateObject): Rename from ObCreateObject.
	(ObCreateObject): Add stub.

svn path=/trunk/; revision=4867
2003-06-07 12:23:14 +00:00
Casper Hornstrup
1e6c809d07 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/obfuncs.h (ObCreateObject): Remove.
	* include/ntos/zwtypes.h (ObRosCreateObject):
	* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
	and ObRosCreateObject@20.
	* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,
	ntoskrnl/io/create.c, ntoskrnl/io/device.c, ntoskrnl/io/iocomp.c,
	ntoskrnl/lpc/connect.c, ntoskrnl/lpc/create.c, ntoskrnl/mm/section.c,
	ntoskrnl/nt/evtpair.c, ntoskrnl/nt/mutant.c, ntoskrnl/nt/ntevent.c,
	ntoskrnl/nt/ntsem.c, ntoskrnl/nt/nttimer.c, ntoskrnl/nt/profile.c,
	ntoskrnl/ob/dirobj.c, ntoskrnl/ob/namespc.c, ntoskrnl/ob/symlink.c,
	ntoskrnl/ps/create.c, ntoskrnl/ps/process.c, ntoskrnl/se/token.c,
	subsys/win32k/ntuser/winsta.c: Use ObRosCreateObject, not ObCreateObject.
	* ntoskrnl/ob/object.c (ObRosCreateObject): Rename from ObCreateObject.
	(ObCreateObject): Add stub.

svn path=/trunk/; revision=4866
2003-06-07 12:17:20 +00:00
Casper Hornstrup
922b9fdf46 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
	(FSRTL_COMMON_FCB_HEADER): Add.
	* include/ddk/iotypes.h (FILE_OBJECT): Rename field
	SectionObjectPointers to SectionObjectPointer.
	* ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
	ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
	drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
	drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
	drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
	drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
	Use new	FILE_OBJECT structure.
	* drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
	Use new FSRTL_COMMON_FCB_HEADER structure.
	* drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
	* include/ddk/ketypes.h (KQUEUE): Match w32api structure.
	* ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
	* ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
	KeReleaseSpinLockFromDpcLevel): Undefine before declaring.

svn path=/trunk/; revision=4865
2003-06-07 11:34:36 +00:00
Eric Kohl
83f9a49a15 Added RtlRandom() and RtlUniform().
svn path=/trunk/; revision=4864
2003-06-07 11:33:13 +00:00
Casper Hornstrup
cafd29d267 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/ketypes.h (KSPIN_LOCK, PKSPIN_LOCK): Match w32api
	structures.
	* ntoskrnl/ke/spinlock.c: Use new structures.

svn path=/trunk/; revision=4863
2003-06-07 10:37:50 +00:00
Eric Kohl
bdb2981529 Fixed minor bugs in RtlConvertSidToUnicodeString().
svn path=/trunk/; revision=4862
2003-06-07 10:35:27 +00:00
Casper Hornstrup
ebabe56624 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/service.h: Move ...
	* include/ntos/service.h: ... here.
	* include/ddk/kdfuncs.h: Move ...
	* include/ntos/kdfuncs.h: ... here.
	* include/ntos/halfuncs.h: New file.
	* ntoskrnl/include/internal/hal/hal.h,
	ntoskrnl/include/internal/hal/bus.h,
	ntoskrnl/include/internal/hal/mps.h: Remove.
	* hal/halx86/include/hal.h: Remove disabled code.
	* include/ntos.h: Include ntos/service.h, ntos/halfuncs.h, and
	ntos/kdfuncs.h.
	* include/ddk/fstypes.h (FILE_LOCK_TOC): Move ...
	* include/ntos/file.h: ... here.
	* include/ddk/halfuncs.h (HalAllProcessorsStarted,
	HalBeginSystemInterrupt, HalDisableSystemInterrupt,
	HalEnableSystemInterrupt, HalEndSystemInterrupt,
	HalInitializeProcessor, HalInitSystem, HalReportResourceUsage): Move to
	include/ntos/halfuncs.h.
	* include/ddk/iofuncs.h (IoAssignDriveLetters): Ditto.
	* include/ddk/kefuncs.h (KeInitializeApc): Match w32api prototype.
	(KeRaiseIrqlToSynchLevel): Move to include/ntos/halfuncs.h.
	* include/ddk/ketypes.h (KAPC_ENVIRONMENT): Move to include/ntos/types.h.
	(KDEVICE_QUEUE, KDEVICE_QUEUE_ENTRY): Match w32api prototype.
	(KINTERRUPT): Move to include/ntos/zwtypes.h.
	* include/ddk/mmtypes.h (PAGE_ROUND_UP, PAGE_ROUND_DOWN): Move ...
	* include/ntos/mm.h: ... here.
	* include/ddk/ntddk.h: Don't include ddk/kdfuncs.h.
	* include/ddk/pstypes.h (PKTHREAD, PRKTHREAD): Add.
	(PsInitialSystemProcess, PsProcessType, PsThreadType): Move ...
	include/ntos/ps.h: ... here.
	* lib/ntdll/rtl/i386/exception.c (SehpContinue): New.
	* ntoskrnl/rtl/i386/exception.c (SehpContinue): Ditto.
	* ntoskrnl/include/internal/ke.h: Include <ddk/ntifs.h>.
	* ntoskrnl/include/internal/ntoskrnl.h: Include internal/ke.h.
	* ntoskrnl/ex/napi.c: Use new structure SSDT_ENTRY.
	* ntoskrnl/ke/apc.c (KeInitializeApc): Match w32api prototype.
	* ntoskrnl/ke/kqueue.c: Use fields of new structures KDEVICE_QUEUE
	and KDEVICE_QUEUE_ENTRY.

svn path=/trunk/; revision=4861
2003-06-07 10:14:40 +00:00
Emanuele Aliberti
9e0e46f4bd fireball added
svn path=/trunk/; revision=4860
2003-06-07 09:43:16 +00:00
Casper Hornstrup
b6102c5a3c 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/cm/regfile.c (CmiCopyKey): Fix unsigned/signed warning.

svn path=/trunk/; revision=4859
2003-06-07 07:34:54 +00:00
Hartmut Birr
d4c1149b14 - Do not interpret spaces within a quoted string as break marker.
svn path=/trunk/; revision=4857
2003-06-06 21:05:58 +00:00
Hartmut Birr
a72bd6590c - Return ENOENT if the path name contains '*' or '?'.
svn path=/trunk/; revision=4856
2003-06-06 21:04:13 +00:00
Hartmut Birr
705db1eb52 - Do not create cache segments after the end of a file.
svn path=/trunk/; revision=4855
2003-06-06 21:02:42 +00:00
Hartmut Birr
5143077b97 - Fixed the used offset for page table/directory entries and pageops.
svn path=/trunk/; revision=4854
2003-06-06 21:01:36 +00:00
Hartmut Birr
08b4648a0a - Fixed the used offset for page table/directory entries and pageops.
- Use the page directory as page table for short segments.
- Handle zero padded segments (segments which are not complete within a file)
  by using of non dircet mapped non private pages.
- Removed some overhead.
- Fixed the locking of pages and cache segments in MmPageOutDeleteMapping/MmPageOutSectionView.

svn path=/trunk/; revision=4853
2003-06-06 21:00:28 +00:00
Eric Kohl
b694b8942b Implemented NtSaveKey().
svn path=/trunk/; revision=4852
2003-06-06 19:11:02 +00:00
Gé van Geldorp
2730a5ab14 Improve polygon filling, patch by Tim Jobling
svn path=/trunk/; revision=4851
2003-06-06 10:27:43 +00:00
Gé van Geldorp
9ee4f092fc Remove some dead code
svn path=/trunk/; revision=4850
2003-06-06 10:18:32 +00:00
Gé van Geldorp
2b5affa11d Fix CreateDIBSection() and add some stuff to GetDIBits()
svn path=/trunk/; revision=4849
2003-06-06 10:17:44 +00:00
Gunnar Dalsnes
a988e5ab0e -corrected protoype
svn path=/trunk/; revision=4848
2003-06-05 23:38:37 +00:00
Gunnar Dalsnes
aba6a902a2 -impl. process and thread cleanup
svn path=/trunk/; revision=4847
2003-06-05 22:47:47 +00:00
Gunnar Dalsnes
9b53ffc03a -call thread notify routines below DISPATCH_LVL
svn path=/trunk/; revision=4846
2003-06-05 22:45:38 +00:00
Gunnar Dalsnes
1f8cbb88a0 -call process notify routines below DISPATCH_LVL
-enable removal of process notify routines

svn path=/trunk/; revision=4845
2003-06-05 22:45:22 +00:00
Brian Palmer
5320d2eb3f 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

svn path=/trunk/; revision=4844
2003-06-05 20:06:48 +00:00
Casper Hornstrup
1179903bd5 2003-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/windows/icon.c (CURSORICON_FindBestCursor,
	CURSORICON_FindBestIcon): Fix unsigned/signed warning.

svn path=/trunk/; revision=4843
2003-06-05 11:57:12 +00:00
Casper Hornstrup
f2f1a0251b 2003-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* ntoskrnl/include/internal/i386/ps.h (KPCR_TSS): Redefine as 0x3C.
	(KPCR_TIB): New structure.
	(IKPCR): Ditto.
	(KPCR): Match w32api structure fieldnames.
	* ntoskrnl/ke/main.c (ExpInitializeExecutive): Adjust for changes to KPCR.
	* ntoskrnl/ke/i386/kernel.c: Ditto.
	* ntoskrnl/ps/thread.c: Ditto.

svn path=/trunk/; revision=4842
2003-06-05 11:51:13 +00:00
Marty Dill
55c6517e00 Send WM_STYLECHANGING/WM_STYLECHANGED when setting GWL_STYLE or GWL_EXSTYLE.
svn path=/trunk/; revision=4841
2003-06-05 03:55:36 +00:00
Gunnar Dalsnes
56bcfe5420 -cleanup IoBuildSynchronousFsdRequest
svn path=/trunk/; revision=4840
2003-06-04 21:41:12 +00:00
Gunnar Dalsnes
08b9eddcc0 -Impl. IoGetRelatedDeviceObject
-Impl. IoAttachDevice

svn path=/trunk/; revision=4839
2003-06-04 21:35:37 +00:00
Hartmut Birr
ffe18386b5 - Implemented memmove fot i386 with assembler.
svn path=/trunk/; revision=4838
2003-06-04 18:14:46 +00:00
Hartmut Birr
b49e2bc450 - Clear the direction flag previous each 'rep string' instruction.
svn path=/trunk/; revision=4837
2003-06-04 18:11:16 +00:00
Hartmut Birr
b841a51945 - Fixed a wrong call to OffsetToCluster in VfatSetAllocationSizeInformation (Thanks to Marc Sch�tz).
svn path=/trunk/; revision=4836
2003-06-04 18:01:02 +00:00
Eric Kohl
b1b828a434 Improved icon support. Patch by Tim Jobling.
svn path=/trunk/; revision=4835
2003-06-03 22:26:52 +00:00
Eric Kohl
e25101088c Improved icon support. Patch by tim Jobling.
svn path=/trunk/; revision=4834
2003-06-03 22:23:48 +00:00
Eric Kohl
62b803fe27 Install icon file.
svn path=/trunk/; revision=4833
2003-06-03 22:22:15 +00:00
Eric Kohl
966127468f Add icon as binary file.
svn path=/trunk/; revision=4831
2003-06-03 20:37:01 +00:00
Eric Kohl
277fc435a5 Removed broken icon.
svn path=/trunk/; revision=4830
2003-06-03 20:35:48 +00:00
Jurgen van Gael
7e41bced72 Implemented NtUserGetAncestor with GA_ROOT flag, stops winhello from crashing when clicking on the title bar.
svn path=/trunk/; revision=4828
2003-06-03 15:43:57 +00:00
Eric Kohl
1018ad9087 Point the root key's parent key pointer to the root key to prevent check routines from reporting false positives.
svn path=/trunk/; revision=4827
2003-06-03 07:28:01 +00:00
Eric Kohl
642d896c7b Implemented 'QueryName' method for key objects.
svn path=/trunk/; revision=4826
2003-06-02 16:51:15 +00:00
Eric Kohl
f05c47fa29 Fixed a tiny bug in ObQueryNameString().
svn path=/trunk/; revision=4825
2003-06-02 16:49:33 +00:00
Eric Kohl
002980df9c Fixed ObQueryNameString() for unnamed objects.
svn path=/trunk/; revision=4824
2003-06-02 13:03:15 +00:00
Emanuele Aliberti
881f1cd531 Campbell and Dalsnes added to the coders directory.
By the way:
- who's fireball@mok ?
- how do I add Unicode strings to RC files?

svn path=/trunk/; revision=4823
2003-06-02 12:30:05 +00:00
Eric Kohl
cea34097ce - Implemented ObQueryNameString().
- Added 'QueryName' object function.
- Implemented 'QueryName' function for file objects.

svn path=/trunk/; revision=4822
2003-06-02 10:04:28 +00:00
Hartmut Birr
210252c422 - Update two pde's if the kernel stack crosses a 4MB boundary.
svn path=/trunk/; revision=4821
2003-06-01 19:50:04 +00:00
Hartmut Birr
d4ce775b60 - Fixed the type of the result from open and replace fclose with close.
- Call time with a parameter (WIN32).

svn path=/trunk/; revision=4820
2003-06-01 19:35:28 +00:00
Hartmut Birr
819f2750e9 - Return after cleanup in NtEnumerateKey.
svn path=/trunk/; revision=4819
2003-06-01 19:28:12 +00:00
Hartmut Birr
392a5753ab - Added memccpy.
svn path=/trunk/; revision=4818
2003-06-01 19:23:18 +00:00
Hartmut Birr
4900a6f281 - Removed some files which are replaced by the string library.
svn path=/trunk/; revision=4817
2003-06-01 19:18:09 +00:00
Eric Kohl
c28184bd36 Added missing .cvsignore file. Patch by Michael Fritscher.
svn path=/trunk/; revision=4816
2003-06-01 18:18:02 +00:00
Eric Kohl
25758f18d9 Implemented RtlExtendedMagicDivide() and RtlSelfRelativeToAbsoluteSD(). Patch by Marc Schuetz.
svn path=/trunk/; revision=4815
2003-06-01 18:14:24 +00:00
Eric Kohl
b036cea0eb Implemented RtlExtendedMagicDivide(). Patch by Marc Schuetz.
svn path=/trunk/; revision=4814
2003-06-01 18:13:23 +00:00
Eric Kohl
8eb47000b7 Remobed duplicate functionality and cleaned-up the registry code.
svn path=/trunk/; revision=4813
2003-06-01 17:39:14 +00:00
Hartmut Birr
d197898a75 - Fixed a bug in the section which makes the destination pointer dword aligned.
svn path=/trunk/; revision=4812
2003-06-01 17:10:42 +00:00
Hartmut Birr
cdeedf3bb4 - Do not free the environment strings from the initial environment.
svn path=/trunk/; revision=4811
2003-06-01 17:08:03 +00:00
Hartmut Birr
ec5e98348c - Open CONOUT$ for accessing the console buffer. This fixes the
"GetConsolScreenBufferInfo : error 6" message, if the stdout handle is redirected.

svn path=/trunk/; revision=4810
2003-06-01 17:06:22 +00:00
Eric Kohl
f170e40b0a Fixed remaining object name issues in NtLoadKey2() and NtUnloadKey().
svn path=/trunk/; revision=4809
2003-06-01 15:10:52 +00:00
Eric Kohl
813549499b Preliminary fix for NtQueryObject().
svn path=/trunk/; revision=4808
2003-06-01 15:09:34 +00:00
Casper Hornstrup
05a9cdcf10 2003-06-01 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ntos/zwtypes.h (SYSTEM_MODULES): Rename to
	SYSTEM_MODULE_INFORMATION. Match w32api structure fieldnames.
	(SYSTEM_MODULE_INFORMATION):  Rename to SYSTEM_MODULE_INFORMATION_ENTRY.
	Match w32api structure fieldnames.
	* include/epsapi.h: Include <ntos.h>.
	(PSYSMOD_ENUM_ROUTINE, PsaCaptureSystemModules, PsaWalkSystemModules,
	PsaWalkFirstSystemModule, PsaWalkNextSystemModule): Use
	SYSTEM_MODULE_INFORMATION_ENTRY and SYSTEM_MODULE_INFORMATION structures.
	* lib/epsapi/enum/drivers.c: Use SYSTEM_MODULE_INFORMATION_ENTRY and
	SYSTEM_MODULE_INFORMATION structures.
	* lib/psapi/misc/win32.c: Ditto.
	* ntoskrnl/ldr/loader.c: Ditto.
	* lib/epsapi/enum/modules.c: Include <ntos.h>.
	* lib/ntdll/rtl/thread.c: Ditto.
	* lib/rosrtl/thread/context.c: Ditto.
	* lib/rosrtl/thread/create.c: Ditto.
	* lib/rosrtl/thread/stack.c: Ditto.
	* include/ntos.h: Include "rosrtl/thread.h".
	* include/structs.h (_BLOB_DEFINED): Rename to __BLOB_T_DEFINED.
	* include/winsock2.h: Ditto.
	* include/ntos/obtypes.h (POBJECT_TYPE): Make a pointer to struct
	_OBJECT_TYPE.
	(PHANDLE_TABLE): Make a pointer to struct _HANDLE_TABLE.
	* ntoskrnl/include/internal/mm.h (PSECTION_OBJECT): Make a pointer to
	struct _SECTION_OBJECT.
	* ntoskrnl/include/internal/i386/ps.h (PKPCR): Make a pointer to struct
	_KPCR.

svn path=/trunk/; revision=4807
2003-06-01 14:59:02 +00:00
Steven Edwards
17c104a163 Added named pipe test by Dan Kegel
svn path=/trunk/; revision=4806
2003-05-31 20:26:49 +00:00
Steven Edwards
d29a317edc Changed name of edit control test
svn path=/trunk/; revision=4805
2003-05-31 19:43:59 +00:00
Eric Kohl
ba5a26559b - Implemented RtlAdjustPrivileges().
- Implemented NtAdjustPrivilegesToken() partially.
- Fixed declaration of LUID.

svn path=/trunk/; revision=4804
2003-05-31 11:10:30 +00:00
Gé van Geldorp
5f47cf8a2a Use DPRINT1 instead of DbgPrint
svn path=/trunk/; revision=4803
2003-05-31 08:53:14 +00:00
Gé van Geldorp
f0aa23eb97 Fix some bugs relating to child windows
svn path=/trunk/; revision=4802
2003-05-31 08:51:58 +00:00
Eric Kohl
dea1b856c7 Implemented NtLoadKey2() and NtUnloadKey().
Implementation is still incomplete but functional.

svn path=/trunk/; revision=4801
2003-05-30 22:28:14 +00:00
Eric Kohl
da25678127 Added missing registry options.
svn path=/trunk/; revision=4800
2003-05-30 22:26:25 +00:00
Hartmut Birr
ddeb6c9e87 - Removed files for functions which are used from the string library.
svn path=/trunk/; revision=4799
2003-05-29 18:01:42 +00:00
Eric Kohl
6d2758d3b7 Converted the Registry to Unicode.
Link default user hive to '\Registry\User\.Default'

svn path=/trunk/; revision=4798
2003-05-29 14:09:41 +00:00
Gé van Geldorp
7a7e93c4ab Set height of default fonts to non-zero
svn path=/trunk/; revision=4797
2003-05-29 13:18:39 +00:00
Gé van Geldorp
9906724442 Fix WM_GETTEXT handling
svn path=/trunk/; revision=4796
2003-05-29 13:17:41 +00:00
Eric Kohl
d5d6a165bd Added removal of .d files to 'clean' rule.
svn path=/trunk/; revision=4795
2003-05-29 08:50:23 +00:00
KJK::Hyperion
66080da575 - Kernel32: implemented fibers. Almost complete - only lacks some Windows 2003 Server features (switching the floating point context and Fiber Local Storage functions)
- Kernel32: GetCurrentFiber and GetFiberData are macros, not functions
 - Kernel32: ExitThread now is declared as __declspec(noreturn)
 - RosRtl: two new functions to allocate and free stacks
 - RosRtl: corrected a couple of prototypes

svn path=/trunk/; revision=4794
2003-05-29 00:36:41 +00:00
Steven Edwards
2382d9e48e Add simple edit control test.
- I'm going to try my hand at porting the WINE edit control
  as Richard and Ge work on User32

svn path=/trunk/; revision=4793
2003-05-28 22:14:19 +00:00
Casper Hornstrup
1e2c725f58 2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Update bootcd target.

svn path=/trunk/; revision=4792
2003-05-28 19:53:53 +00:00
Casper Hornstrup
a255631bec 2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/progress.c (ProgressNextStep): Check if NewPos
	is odd.

svn path=/trunk/; revision=4790
2003-05-28 18:35:35 +00:00
Casper Hornstrup
2d947f6f92 2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/haltypes.h: Move ...
	* include/ntos/haltypes.h: ... here.
	* include/ddk/obtypes.h: Move ...
	* include/ntos/obtypes.h: ... here.
	* include/ddk/i386/tss.h: Move ...
	* include/ntos/tss.h: ... here.
	* include/errors.h, include/windows.h: #include_next <windows.h>.
	* include/ntos.h: Include "ntos/haltypes.h", "ntos/obtypes.h", and
	"ntos/tss.h".
	* include/ddk/defines.h (EXPORTED, IMPORTED): Move to
	include/ntos/types.h.
	* include/ddk/exfuncs.h, include/ddk/mmtypes.h, include/ntos/except.h,
	include/ntos/file.h, include/ole32/guiddef.h, include/win32k/color.h,
	lib/msafd/include/debug.h, lib/user32/include/debug.h,
	lib/ws2_32/include/debug.h, lib/ws2help/debug.h,
	ntoskrnl/include/internal/debug.h, ntoskrnl/ke/i386/bthread.S,
	ntoskrnl/rtl/error.c: Don't define macros if previously defined.
	* include/ddk/halfuncs.h: Include <ntos/haltypes.h>.
	* include/ddk/iotypes.h: Include <ntos/obtypes.h>.
	* include/ddk/ketypes.h (MB_FLAGS_*, LOADER_MODULE, ADDRESS_RANGE,
	LOADER_PARAMETER_BLOCK): Move to include/ntos/types.h.
	* include/ddk/ntddk.h: #include_next <ddk/ntddk.h>.
	* include/ddk/ntifs.h: #include_next <ddk/ntifs.h>.
	* include/napi/shared_data.h (SharedUserData): Undefine before defining.
	* include/ntos/rtl.h (RtlUpcaseUnicodeString): Correct prototype.
	* include/ntos/zwtypes.h (THREAD_STATE): Add.
	* lib/ntdll/rtl/unicode.c (RtlUpcaseUnicodeString): Match new prototype.
	* ntoskrnl/rtl/unicode.c (RtlUpcaseUnicodeString): Ditto.
	* lib/string/Makefile: Include Makefile.$(ARCH). Don't include
	makefile.$(ARCH).
	* ntoskrnl/ex/sysinfo.c, ntoskrnl/include/internal/ntoskrnl.h,
	* ntoskrnl/include/internal/ob.h, ntoskrnl/ob/handle.c: Include <ntos.h>.
	* ntoskrnl/ke/i386/syscall.S: Don't include <ddk/defines.h>.
	(KernelMode, UserMode): Define.
	* ntoskrnl/ke/i386/stkswitch.S, ntoskrnl/ke/i386/tskswitch.S,
	ntoskrnl/ke/i386/v86m_sup.S: Include <ntos/tss.h>

svn path=/trunk/; revision=4789
2003-05-28 18:09:10 +00:00
Eric Kohl
91987ce5dc Convert Registry to Unicode. Part 2.
svn path=/trunk/; revision=4788
2003-05-28 16:09:51 +00:00
Eric Kohl
80344c77a6 Use Unicode strings in key objects.
svn path=/trunk/; revision=4787
2003-05-28 12:04:17 +00:00
Eric Kohl
be3c31a2c2 Updated registry key flags. Added missing fix.
svn path=/trunk/; revision=4786
2003-05-27 23:09:11 +00:00
Hartmut Birr
cf33a9ca6e - Forgot icon.ico for icontest.
svn path=/trunk/; revision=4785
2003-05-27 21:02:21 +00:00
Eric Kohl
00d19927ae Implemented spinlock and event functions.
svn path=/trunk/; revision=4784
2003-05-27 20:59:24 +00:00
Hartmut Birr
9bcbb3492c - Added icontest.
svn path=/trunk/; revision=4783
2003-05-27 20:57:11 +00:00
Hartmut Birr
07d2bba441 - Added icontest (contributed by Tim Jobling).
svn path=/trunk/; revision=4782
2003-05-27 20:51:39 +00:00
Hartmut Birr
6796cee74b - Removed files for functions which are used from the string library.
svn path=/trunk/; revision=4781
2003-05-27 20:17:04 +00:00
Hartmut Birr
8761554070 - Link string library to msvcrt.
svn path=/trunk/; revision=4780
2003-05-27 20:07:53 +00:00
Hartmut Birr
7944ef0129 *** empty log message ***
svn path=/trunk/; revision=4779
2003-05-27 20:02:20 +00:00
Hartmut Birr
d9ee350ffd - Link string library to crtdll.
svn path=/trunk/; revision=4778
2003-05-27 20:01:30 +00:00
Hartmut Birr
fac54407bb *** empty log message ***
svn path=/trunk/; revision=4777
2003-05-27 19:49:14 +00:00
Hartmut Birr
3d7e102b13 - Removed strcat, strchr, strcmp, strcpy, strlen, strncat, strncmp, strncpy and strrchr.
svn path=/trunk/; revision=4776
2003-05-27 19:41:10 +00:00
Hartmut Birr
7a6772f94b - Link the string library to ntdll.
svn path=/trunk/; revision=4775
2003-05-27 19:40:20 +00:00
Hartmut Birr
2ba9015708 *** empty log message ***
svn path=/trunk/; revision=4774
2003-05-27 19:28:40 +00:00
Hartmut Birr
7297d83e9f - Removed wcscat, wcschr, wcscmp, wcscpy, wcslen, wcsncat, wcsncmp, wcsncpy and wcsrchr.
svn path=/trunk/; revision=4773
2003-05-27 19:24:04 +00:00
Hartmut Birr
5ae840005e - Removed strcat, strchr, strcmp, strcpy, strlen, strncat, strncmp, strncpy and strrchr.
svn path=/trunk/; revision=4772
2003-05-27 19:22:42 +00:00
Hartmut Birr
ce562b2ba0 - Linked the string library to ntoskrnl.
svn path=/trunk/; revision=4771
2003-05-27 19:21:14 +00:00
Hartmut Birr
e44c02e52b - Added a one rule for static libraries.
- Added static string library.

svn path=/trunk/; revision=4770
2003-05-27 19:02:26 +00:00
Hartmut Birr
34cc922d57 - Added static string library.
svn path=/trunk/; revision=4769
2003-05-27 18:58:15 +00:00
Eric Kohl
28c98fe9b4 Get codepage and casetable files from txtsetup.sif.
svn path=/trunk/; revision=4768
2003-05-27 14:13:41 +00:00
Eric Kohl
1aa2d79e1d Added NLS information.
svn path=/trunk/; revision=4767
2003-05-27 13:59:53 +00:00
Eric Kohl
d5533a3ed7 Updated registry key flags. 0x20 means packed key name.
svn path=/trunk/; revision=4766
2003-05-27 13:58:26 +00:00
Gé van Geldorp
dfe58a3a5c Implement OffsetViewportOrgEx()
svn path=/trunk/; revision=4765
2003-05-27 07:23:05 +00:00
Gé van Geldorp
3c0df75f7c Fixes to UpdateRegion code, implement GetUpdateRgn() and ValidateRgn()
svn path=/trunk/; revision=4764
2003-05-26 18:52:37 +00:00
Richard Campbell
bae47d7a0f Install MultiWin test
svn path=/trunk/; revision=4763
2003-05-26 10:53:37 +00:00
Richard Campbell
7a4f224456 Syncing my changes with tree
svn path=/trunk/; revision=4762
2003-05-26 10:52:15 +00:00
Richard Campbell
2d32e95fa9 Simple Multiple Window Test
svn path=/trunk/; revision=4761
2003-05-26 10:51:20 +00:00
Hartmut Birr
ab5ce5a163 - Fixed the releasing of cache segments on error in ReadCacheSegment/CcCopyWrite/CcCopyRead.
svn path=/trunk/; revision=4760
2003-05-25 21:50:18 +00:00
Hartmut Birr
10acad2b71 - Check if a file object is on the close list and remove it from the list in CcRosRefernceCache.
- Sort the cache segments for the bcb by offsets.

svn path=/trunk/; revision=4759
2003-05-25 21:49:04 +00:00
Eric Kohl
939d5316af - Added .inf-file parser
- SetupLdr loads and uses txtsetup.sif
- Removed .hiv (text-hive) parser

svn path=/trunk/; revision=4758
2003-05-25 21:20:43 +00:00
Eric Kohl
c028a8b5e0 Added OsLoadOptions (kernel command line).
svn path=/trunk/; revision=4757
2003-05-25 21:14:53 +00:00
Richard Campbell
f8758cae49 Small visual fixes, more coming soon.
svn path=/trunk/; revision=4756
2003-05-25 21:05:38 +00:00
Eric Kohl
9526676d67 Removed unused NLS files.
svn path=/trunk/; revision=4755
2003-05-25 17:17:52 +00:00
Eric Kohl
c2b48451a9 Fixed memory-allocation for bins while loading hives.
svn path=/trunk/; revision=4754
2003-05-25 17:16:09 +00:00
Casper Hornstrup
49729ea1ab 2003-05-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Fix typo.

svn path=/trunk/; revision=4753
2003-05-25 14:26:28 +00:00
Casper Hornstrup
419b1c5759 2003-05-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Don't install system.hiv. Install fonts and nls directory.
	* tools/rcopy.c (copy_file, copy_directory, is_directory): New functions.

svn path=/trunk/; revision=4752
2003-05-25 11:33:58 +00:00
Richard Campbell
ca127f5069 Several small bug fixes, nothing important
svn path=/trunk/; revision=4751
2003-05-25 10:53:05 +00:00
Hartmut Birr
2602dc4fec - Fixed the parameters in two calls to MEMCHECK.
svn path=/trunk/; revision=4750
2003-05-24 17:26:39 +00:00
Hartmut Birr
01a3fd2a8b - Initialize TableBase in PsCreatePeb.
svn path=/trunk/; revision=4749
2003-05-24 17:14:41 +00:00
Eric Kohl
763c776f24 Optimized hive import.
Removed text-hive support.
Removed text-hives.

svn path=/trunk/; revision=4748
2003-05-24 13:19:15 +00:00
Richard Campbell
9b91b02ef8 Actually, compile errors, let me fix first.
svn path=/trunk/; revision=4747
2003-05-23 23:12:02 +00:00
Richard Campbell
34855b5f6b Okay, NtUserFineWindowEx bug fixed.
svn path=/trunk/; revision=4746
2003-05-23 23:08:03 +00:00
Eric Kohl
6528cf1fdc Add experimental jamfiles (still buggy).
svn path=/trunk/; revision=4745
2003-05-23 22:43:03 +00:00
Richard Campbell
04572bc608 - Implemented FindWindowEx*() (it was already implemented in subsys\win32k\ntuser\window.c with the exception of a small bug, but wasn't mapped to by user32??) FIXED
- FindWindow() is also implemented, though not properly. (Someone has it set up to use FindWindowEx, this isn't the proper way to do this...FindWindow doesn't search children...)

svn path=/trunk/; revision=4744
2003-05-23 17:07:12 +00:00
Richard Campbell
832463b116 Implement GetDesktopWindow()
svn path=/trunk/; revision=4743
2003-05-23 16:44:12 +00:00
Steven Edwards
c3234a4ad8 Patch by Tim Jobling - Fix unhandled exception in bitblt test.
svn path=/trunk/; revision=4742
2003-05-22 21:41:20 +00:00
Gé van Geldorp
fe8db53413 Add DebugOut device driver
svn path=/trunk/; revision=4741
2003-05-22 15:11:29 +00:00
Gunnar Dalsnes
5882d8441a -Dereference thread
-Reduce/fix handle-less-timer bitmap

svn path=/trunk/; revision=4740
2003-05-22 02:07:22 +00:00
Gunnar Dalsnes
e76a3a5ab0 -Fixed FileObject/Event dereferencing at IRP completion problem
-Reworked IRP completion rotuines
-io/irp.c: Reworked IoIsOperationSynchronous
-afd/opnclose.c: Fixed bug where CCB was freed twice
-io/create.c: changed Lock event in FileObject from NotificationEvent to SynchronizationEvent

svn path=/trunk/; revision=4739
2003-05-22 00:47:04 +00:00
Gé van Geldorp
5af5f51b74 - Implement WaitMessage()
- Rearrange message code to avoid code duplication
- Fix bugs, mainly in signaling new messages
- Include Hartmut's fix of 2003/03/26

svn path=/trunk/; revision=4738
2003-05-21 22:58:43 +00:00
Brian Palmer
f152732d04 Lot's of fixes for the FAT12/16 boot sector code.
svn path=/trunk/; revision=4737
2003-05-21 20:28:13 +00:00
Eric Kohl
faa8f94f27 Use NLS-Section in user-mode.
svn path=/trunk/; revision=4736
2003-05-21 16:11:02 +00:00
Eric Kohl
17ad474bcb Minor update
svn path=/trunk/; revision=4735
2003-05-21 16:09:30 +00:00
Eric Kohl
d043a91017 Removed unused NLS stuff.
Cleaned-up PEB initialization.

svn path=/trunk/; revision=4734
2003-05-21 15:06:33 +00:00
Hartmut Birr
aa2f971da2 - Fixed the calculation of the TopAddress in MmFindGapTopDown.
svn path=/trunk/; revision=4733
2003-05-20 18:56:25 +00:00
Eric Kohl
562eeb5ceb Finished kernel-mode part of NLS section implementation.
svn path=/trunk/; revision=4732
2003-05-20 14:38:05 +00:00
Eric Kohl
74592b5432 Implemented NDIS timer functions.
svn path=/trunk/; revision=4731
2003-05-20 13:00:41 +00:00
Gé van Geldorp
ecd7b2f8f3 Handle SetWindowText() across Unicode/Ansi conversions
svn path=/trunk/; revision=4730
2003-05-19 20:11:17 +00:00
guido
c1cf7ec993 commented out some duplicate defines
svn path=/trunk/; revision=4729
2003-05-19 19:42:30 +00:00
Gé van Geldorp
388f86d19c Implement GetSysColor()
svn path=/trunk/; revision=4728
2003-05-19 18:36:43 +00:00
Hartmut Birr
58781325ac - Release the rmap list lock also, if the address is in kernel space.
svn path=/trunk/; revision=4727
2003-05-19 15:58:09 +00:00
Eric Kohl
7e921a40c1 Implemented NLS file import.
svn path=/trunk/; revision=4726
2003-05-19 14:39:09 +00:00
Eric Kohl
e76752c103 Load NLS files.
Add basic support for installing ReactOS from floppy disks.

svn path=/trunk/; revision=4725
2003-05-19 09:58:50 +00:00
Eric Kohl
031f55682e Removed obsolete settings.
svn path=/trunk/; revision=4724
2003-05-19 09:51:34 +00:00
Gé van Geldorp
7bd3409f53 Recompute scrollbar positions in case window changed size
svn path=/trunk/; revision=4723
2003-05-18 22:11:41 +00:00
Gé van Geldorp
94571478d5 Send WM_NCPAINT and WM_ERASEBKGND messages when making a window visible
svn path=/trunk/; revision=4722
2003-05-18 22:09:08 +00:00
Gé van Geldorp
15073977b6 Remove WINDOWOBJECT_NEED_BEGINPAINT flag since calling BeginPaint in a
WM_PAINT handler is not strictly required

svn path=/trunk/; revision=4721
2003-05-18 22:07:02 +00:00
guido
97c3fae178 proper CFLAGS when DBG=0
svn path=/trunk/; revision=4720
2003-05-18 21:17:33 +00:00
Eric Kohl
f1d44624af Fixed wrong argument order.
svn path=/trunk/; revision=4718
2003-05-18 19:37:20 +00:00
Emanuele Aliberti
b44dda2928 I forgot to remove debug code in MouseGDICallBack.
svn path=/trunk/; revision=4717
2003-05-18 19:30:55 +00:00
Emanuele Aliberti
c0bb24f7ad Fix for a bug I introduced declaring FASTCALL MouseGDICallBack.
svn path=/trunk/; revision=4716
2003-05-18 19:21:24 +00:00
Emanuele Aliberti
fec738c6cb WIN32K code cleanup.
Prefer FASTCALL/STDCALL in kernel mode code.
Make compiler check function signatures.
Tested under BOCHS 2.0.2 + FreeDOS + loadros.

svn path=/trunk/; revision=4715
2003-05-18 17:22:31 +00:00
Emanuele Aliberti
982fd1f286 WIN32K code cleanup.
Prefer FASTCALL/STDCALL in kernel mode code.
Make compiler check function signatures.
Tested under BOCHS 2.0.2 + FreeDOS + loadros.

svn path=/trunk/; revision=4714
2003-05-18 17:16:18 +00:00
Emanuele Aliberti
6955ff7e6e RECT *is* RECTL
svn path=/trunk/; revision=4713
2003-05-18 17:12:11 +00:00
Eric Kohl
df24b9bb9a Add known DLLs.
Install NLS files.

svn path=/trunk/; revision=4712
2003-05-18 15:22:52 +00:00
Eric Kohl
e35e42758a Remove the INSTALL directory of the Boot-CD.
svn path=/trunk/; revision=4711
2003-05-18 15:21:30 +00:00
Eric Kohl
2cd0a85f57 Do not overwrite existing hive files.
Add hive header checksum.

svn path=/trunk/; revision=4710
2003-05-18 13:50:58 +00:00
Eric Kohl
bcef4d4f0e Fixed .inf parser to accept DOS and *nix files.
svn path=/trunk/; revision=4709
2003-05-18 12:50:17 +00:00
Eric Kohl
e568d2b165 Parse DOS and *nix text files correctly.
svn path=/trunk/; revision=4708
2003-05-18 12:12:07 +00:00
Gé van Geldorp
19c81674a3 Implement SetWindowPos()
svn path=/trunk/; revision=4707
2003-05-18 07:51:41 +00:00
Gé van Geldorp
7ba70583b9 Generate WM_PAINT messages in PeekMessage()
svn path=/trunk/; revision=4706
2003-05-18 06:47:19 +00:00
Eric Kohl
397169c1a8 Added new MEMORY_AREA_NO_ACCESS type.
Make the top and bottom 64KB of process memory space and the 60KB above the shared user page from unaccessible.
Introduced MmSystemRangeStart.

svn path=/trunk/; revision=4705
2003-05-17 19:16:39 +00:00
Eric Kohl
e1c437438c Implemented Top-Down-Allocator.
svn path=/trunk/; revision=4704
2003-05-17 15:29:50 +00:00
Gé van Geldorp
c865c87d30 When sending WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages from
Win32k, make sure the WINDOWPOS structure referenced by lParam is located
in user space

svn path=/trunk/; revision=4703
2003-05-17 14:37:23 +00:00
Gé van Geldorp
b41ecb619a When sending WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages from
Win32k, make sure the WINDOWPOS structure referenced by lParam is located
in user space

svn path=/trunk/; revision=4702
2003-05-17 14:30:28 +00:00
Hartmut Birr
9ad263f04e - Reference/Dereference the process object only for adresses within user space.
svn path=/trunk/; revision=4701
2003-05-17 13:46:05 +00:00
Hartmut Birr
f5048a6a3b - Initialize the page directory for a new process from global kernel page directory in MmCopyMmInfo.
- Check for kernel or user space in MmIsAccessedAndResetAcessPage/MmSetCleanPage/MmSetDirtyPage.
- Added InitGlobalKernelPageDirectory.

svn path=/trunk/; revision=4700
2003-05-17 13:45:04 +00:00
Hartmut Birr
fd4d79b7fd - Added some checks for kernel or user space.
- Added MmMapViewInSystemSpace/MmUnmapViewInSystemSpace (implemented by Eric).

svn path=/trunk/; revision=4699
2003-05-17 13:43:44 +00:00
Hartmut Birr
8e68ec6bf2 - Marked the initial kernel space as mapped.
svn path=/trunk/; revision=4698
2003-05-17 13:42:56 +00:00
Gé van Geldorp
8674a82d87 Implement SetWindowLong() and refine implementation of GetWindowLong()
svn path=/trunk/; revision=4697
2003-05-17 13:41:31 +00:00
Hartmut Birr
f5aebd93f1 - Free memory for boot load files, except ntoskrnl.exe and hal.dll.
svn path=/trunk/; revision=4696
2003-05-17 13:40:03 +00:00
Gé van Geldorp
61b19adbb6 Implement SetWindowLong() and refine implementation of GetWindowLong()
svn path=/trunk/; revision=4695
2003-05-17 09:20:23 +00:00
Casper Hornstrup
ae351cde87 2003-05-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/io/irp.c (IofCallDriver): Don't reference FileObject.

svn path=/trunk/; revision=4694
2003-05-17 00:25:39 +00:00
Emanuele Aliberti
79780a3bcd KERNEL32.OpenConsoleW interface changed a proposed by KJK:Hyperion.
svn path=/trunk/; revision=4693
2003-05-16 20:33:15 +00:00
Gé van Geldorp
1e77c45603 Convert from Unicode to ANSI in GetTextMetricsA()
svn path=/trunk/; revision=4692
2003-05-16 18:55:27 +00:00
Eric Kohl
389d19a1e3 Updated NLS function signature.
Reverted NLS section mapping because of unability to fix the section mapping code.

svn path=/trunk/; revision=4691
2003-05-16 17:38:41 +00:00
Eric Kohl
14e53ad5b6 Accept .nls files.
svn path=/trunk/; revision=4690
2003-05-16 15:37:50 +00:00
Gé van Geldorp
7295ea3de1 Added Bitstream Vera fonts and removed accidental loading of Arial font
svn path=/trunk/; revision=4689
2003-05-16 15:10:10 +00:00
Casper Hornstrup
270cb3a0ec 2003-05-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/io/cleanup.c (IopCompleteRequest1, IoSecondStageCompletion):
	Don't dereference Irp->UserEvent here.
	* ntoskrnl/io/irp.c (IofCallDriver): Reference FileObject.
	* ntoskrnl/io/rw.c (IopReadWriteIoComplete): New function.
	* (NtReadFile, NtWriteFile): Set I/O completion routine if using an
	event that is under object manager control.

svn path=/trunk/; revision=4688
2003-05-16 12:03:11 +00:00
Gé van Geldorp
f728ec4f27 Fixed typo in TEXTMETRICSW
svn path=/trunk/; revision=4687
2003-05-16 06:23:14 +00:00
Eric Kohl
366cd995f3 Fixed crash upon shutdown.
svn path=/trunk/; revision=4686
2003-05-15 13:34:37 +00:00
Eric Kohl
556a38e0c0 Implemented NLS section (not usable yet) and updated NLS functions.
svn path=/trunk/; revision=4685
2003-05-15 11:07:51 +00:00
Eric Kohl
54aa3104d4 Don't crash ReactOS if DLL-Preloading fails.
svn path=/trunk/; revision=4684
2003-05-14 21:27:53 +00:00
Eric Kohl
9fef3a18ee Implemented MmMapViewInSystemSpace() and MmUnmapViewInSystemSpace().
svn path=/trunk/; revision=4683
2003-05-14 10:52:46 +00:00
Casper Hornstrup
10f9688a17 2003-05-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/Makefile (OBJECTS_IO): Add io/rawfs.o.
	* ntoskrnl/cm/registry.c (CmiInitHives): Check status using NT_SUCCESS().
	* ntoskrnl/include/internal/io.h (RawFsIsRawFileSystemDeviceObject,
	RawFsDriverEntry): Add prototypes.
	* ntoskrnl/include/internal/ntoskrnl.h (IoInit2): Add prototype.
	* ntoskrnl/io/device.c (IopCreateDriverObject): Handle unnamed services.
	* ntoskrnl/io/fs.c (IoMountVolume): Handle mounting of raw volumes.
	(IoRegisterFileSystem): Add registered filesystem device objects at the
	head of the list.
	* ntoskrnl/io/iomgr.c (IoInit2): New function.
	* ntoskrnl/ke/main.c (ExpInitializeExecutive): Call IoInit2().
	* ntoskrnl/mm/section.c (MmQuerySectionView): Check return value of call
	to MmFindRegion().
	* ntoskrnl/io/rawfs.c: New file.

svn path=/trunk/; revision=4682
2003-05-13 21:28:26 +00:00
Eric Kohl
107725f820 Implemented dll preloading and mapping.
svn path=/trunk/; revision=4681
2003-05-12 19:47:53 +00:00
Jason Filby
b5b83b1d47 UNIMPLEMENTED put in unimplemented functions
svn path=/trunk/; revision=4680
2003-05-12 19:30:00 +00:00
Gé van Geldorp
017f478b25 Implemented IsWindow()
svn path=/trunk/; revision=4679
2003-05-12 18:52:14 +00:00
Eric Kohl
484cf7d5bf Directory objects must be able to parse a 'remaining path' that does not start with a backslash.
This is needed to support relative path names in the object tree.

svn path=/trunk/; revision=4678
2003-05-12 13:59:09 +00:00
Eric Kohl
c0f1cf6933 Added ability to open a file using a handle to a directory file and a relative path name.
Tested on NT4.

svn path=/trunk/; revision=4677
2003-05-12 10:00:46 +00:00
Eric Kohl
64ca9e3c34 Fixed a bug which skipped the first letter of a relative object path name.
svn path=/trunk/; revision=4676
2003-05-11 19:41:22 +00:00
Casper Hornstrup
0c6f80f830 2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Set hidden sectors.
	* ntoskrnl/io/xhaldrv.c (xHalIoWritePartitionTable): Implement support
	for primary partitions.
	* subsys/system/usetup/partlist.c (CreateSelectedPartition): Compute
	hidden sectors.
	* subsys/system/usetup/usetup.c (SelectPartitionPage,
	DrawFileSystemList, FormatPartitionPage): Don't use conditional define
	ENABLE_FORMAT.
	(CreateFileSystemList): Don't draw "Keep current file system" option if
	formatting is needed.
	(SelectFileSystemPage): Figure out if partition must be formatted.
	* subsys/system/usetup/usetup.h (ENABLE_FORMAT): Remove.
	(FILE_SYSTEM_LIST): Add ForceFormat field.

svn path=/trunk/; revision=4675
2003-05-11 18:31:09 +00:00
Casper Hornstrup
67e99cf820 2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/windows/font.c (TEXT_PathEllipsify, TEXT_Reprefix): Fix
	unsigned/signed warning.
	* ntoskrnl/mm/pagefile.c (MmWriteToSwapPage, MmReadFromSwapPage,
	NtCreatePagingFile): Ditto.

svn path=/trunk/; revision=4674
2003-05-11 15:18:01 +00:00
Jason Filby
5bbb8860e3 Fixed return values of W32kArc and W32kMoveToEx
svn path=/trunk/; revision=4673
2003-05-11 12:44:09 +00:00
Jason Filby
76c3289be5 NtUserSendMessageCallback is UNIMPLEMENTED
svn path=/trunk/; revision=4672
2003-05-11 12:29:41 +00:00
Gé van Geldorp
f507252aa5 Implement DrawTextA()/DrawTextW() (mostly copied from Wine)
svn path=/trunk/; revision=4671
2003-05-11 11:12:00 +00:00
Jason Filby
6c2e6e0aa5 NtUserPostMessage: use a switch statement instead of if; WM_NULL: ignore message
svn path=/trunk/; revision=4670
2003-05-11 10:47:33 +00:00
Hartmut Birr
7a801d3bd8 - Implemented FSCTL_GET_RETRIVAL_POINTERS.
- Call the storage driver for read/write requests to pagefiles directly.

svn path=/trunk/; revision=4669
2003-05-11 09:51:26 +00:00
Hartmut Birr
710b4c97a6 - Retrieve the cluster chunks for a pagefile from fsd and use this values for reading/writing to the pagefile.
svn path=/trunk/; revision=4668
2003-05-11 09:48:57 +00:00
Eric Kohl
f99473b691 Display human readable device descriptions for generic PnP-IDs.
svn path=/trunk/; revision=4667
2003-05-11 09:42:40 +00:00
Hartmut Birr
3350303771 - Changed data pointers from signed to unsigned char.
svn path=/trunk/; revision=4666
2003-05-11 07:44:14 +00:00
Gé van Geldorp
8d4eee3aab Check for messages sent by other threads
svn path=/trunk/; revision=4665
2003-05-10 21:47:04 +00:00
Emanuele Aliberti
780c1a105d Right description.
svn path=/trunk/; revision=4664
2003-05-10 10:31:32 +00:00
Emanuele Aliberti
9fa1fd384e Names fixed.
svn path=/trunk/; revision=4663
2003-05-10 10:30:18 +00:00
Eric Kohl
3e708e6c79 Detect hardware before ntoskrnl.exe will be loaded.
svn path=/trunk/; revision=4662
2003-05-10 09:26:59 +00:00
Eric Kohl
7f6db59b55 - Fixed counting the number of available harddisks for broken BIOSes.
- Enable/disable the display of read error messages.

svn path=/trunk/; revision=4661
2003-05-10 09:25:35 +00:00
Eric Kohl
8e23b88b00 Removed duplicate output of used disk space in the summary.
svn path=/trunk/; revision=4660
2003-05-09 21:58:05 +00:00
Eric Kohl
dbf90936aa Added a little PnP-BIOS data dumper.
svn path=/trunk/; revision=4659
2003-05-08 18:55:09 +00:00
Eric Kohl
d882e9a38b Reworked and fixed most of the CPU and PnP code.
svn path=/trunk/; revision=4658
2003-05-08 18:35:46 +00:00
Gé van Geldorp
77d0973eaa Only update page dir for page containing stack
svn path=/trunk/; revision=4657
2003-05-08 05:26:36 +00:00
Gé van Geldorp
5966a211e9 Don't let page containing stack disappear when switching memory spaces
svn path=/trunk/; revision=4656
2003-05-07 21:41:03 +00:00
Aleksey Bragin
74c0e6eb1c Added EthFilterDprIndicateReceive(), EthFilterDprIndicateReceiveComplete() functions, since Realtek 8139 network card driver imports them. Their contents is "UNIMPLEMENTED". This makes ReactOS at least gracefully discarding this driver (and not crashing with BugCheck).
svn path=/trunk/; revision=4655
2003-05-07 19:33:14 +00:00
Aleksey Bragin
1ee3211646 Uncommented exporting of EthFilterDprIndicateReceive (and ReceiveComplete)
svn path=/trunk/; revision=4654
2003-05-07 19:09:48 +00:00
Eric Kohl
2b3487d3d6 Removed unix newlines
svn path=/trunk/; revision=4653
2003-05-07 18:45:56 +00:00
Eric Kohl
e0352540ed Moved test sound.
svn path=/trunk/; revision=4652
2003-05-06 19:01:03 +00:00
Eric Kohl
df18b87eab Added PnP-BIOS detection.
svn path=/trunk/; revision=4651
2003-05-06 16:36:42 +00:00
Eric Kohl
e09ba35e8c Fixed wrong types in printf strings.
svn path=/trunk/; revision=4650
2003-05-06 08:45:10 +00:00
Eric Kohl
d13fee86d3 Added emergency console dummy page.
Removed unused code.

svn path=/trunk/; revision=4649
2003-05-06 07:17:52 +00:00
Gé van Geldorp
4d7b93456f Fixes to GetFullPathNameA and RtlGetFullPathName_U by Tim Jobling
svn path=/trunk/; revision=4648
2003-05-06 06:49:57 +00:00
Casper Hornstrup
4ac8de4791 2003-05-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk: Kill implicit rule ".o".

svn path=/trunk/; revision=4647
2003-05-05 19:59:21 +00:00
Emanuele Aliberti
38056aff4c KERNEL32.OpenConsoleW() implemented.
svn path=/trunk/; revision=4646
2003-05-05 19:58:27 +00:00
Steven Edwards
e8ebc1da08 build wm_paint and bitblt tests
svn path=/trunk/; revision=4645
2003-05-05 16:40:38 +00:00
Steven Edwards
65e14fea99 Add install for wm_paint and bitblt test
svn path=/trunk/; revision=4644
2003-05-05 16:40:05 +00:00
Gé van Geldorp
9f2567f198 Allow sending of messages from non-GUI threads
svn path=/trunk/; revision=4643
2003-05-04 15:42:21 +00:00
Gé van Geldorp
e16ddc6bdf Clean up debugging stuff and silence debug messages
svn path=/trunk/; revision=4642
2003-05-04 15:41:40 +00:00
Gé van Geldorp
d82ce80d6c (Partial) implementation of W32kGetDIBits()
svn path=/trunk/; revision=4641
2003-05-03 14:38:11 +00:00
Gé van Geldorp
e6f39d93f0 Fix GetDC(NULL), not complete yet
svn path=/trunk/; revision=4640
2003-05-03 14:12:14 +00:00
Gé van Geldorp
158fda092b Implement GetDeviceCaps()
svn path=/trunk/; revision=4639
2003-05-03 13:39:06 +00:00
Eric Kohl
8e7f49204c Added .cvsignore files. Patch by Mihcael Fritscher.
svn path=/trunk/; revision=4638
2003-05-03 13:11:39 +00:00
Eric Kohl
98ed7cd2b1 Started work on second stage setup.
svn path=/trunk/; revision=4636
2003-05-02 18:12:38 +00:00
Gé van Geldorp
ec67470a38 Silence CVS
svn path=/trunk/; revision=4635
2003-05-02 07:57:04 +00:00
Gé van Geldorp
6644846375 Implemented NtUserRegisterWindowMessage
svn path=/trunk/; revision=4634
2003-05-02 07:52:33 +00:00
Gé van Geldorp
8eaabc5146 Properly clean up terminated threads
svn path=/trunk/; revision=4633
2003-05-01 22:00:31 +00:00
Eric Kohl
8cbf35a0f7 Get timeout value from the registry or use default timeout.
svn path=/trunk/; revision=4632
2003-05-01 17:50:35 +00:00
Eric Kohl
85c99dd8aa Get timeout value from the registry.
svn path=/trunk/; revision=4631
2003-05-01 17:49:23 +00:00
Eric Kohl
62d7fe29c6 Added CPU detection for multiprocessor systems.
svn path=/trunk/; revision=4630
2003-05-01 15:46:06 +00:00
Gé van Geldorp
45661acd89 C++ runtime support, mostly copied from Wine
svn path=/trunk/; revision=4629
2003-04-30 22:07:30 +00:00
Gé van Geldorp
412a23aa10 Changed some DbgPrint's to DPRINT's
svn path=/trunk/; revision=4628
2003-04-30 22:04:12 +00:00
Gé van Geldorp
70dce1ee4b Added stubs for keybd_event() and mouse_event()
svn path=/trunk/; revision=4627
2003-04-30 22:03:00 +00:00
Gé van Geldorp
340ee78475 Fix SetThreadPriority()
svn path=/trunk/; revision=4626
2003-04-30 22:00:41 +00:00
Gé van Geldorp
ad70cd4bbe Implement ThreadBasePriority case for NtSetInformationThread()
svn path=/trunk/; revision=4625
2003-04-30 21:56:22 +00:00
Gé van Geldorp
e70e534a2e Added imm32 and winspool
svn path=/trunk/; revision=4624
2003-04-30 21:06:02 +00:00
Gé van Geldorp
deba825487 Install winspool.drv
svn path=/trunk/; revision=4623
2003-04-30 20:55:00 +00:00
Gé van Geldorp
4c59119a88 Fully stubbed winspool.drv (Wine printing is too different from ReactOS
to use that one)

svn path=/trunk/; revision=4622
2003-04-30 20:44:06 +00:00
Eric Kohl
5fd8b65697 Fixed disk geometry detection bug.
Added CPU detection for uniprocessor systems.

svn path=/trunk/; revision=4621
2003-04-30 18:10:46 +00:00
Gé van Geldorp
f0d4e3c543 Zero-initialze TEB for new threads
svn path=/trunk/; revision=4620
2003-04-30 15:11:31 +00:00
Eric Kohl
43ab2f61b4 - Added DiskGetExtendedDriveParameters()
- Moved hardware detection into the arch directory
- Rewrote/completed harddisk detection
- Removed PCI and IDE detection
- Added basic CPU detection

svn path=/trunk/; revision=4619
2003-04-30 14:08:04 +00:00
Gé van Geldorp
78a50b48b4 All IsBadXxxxPtr return values were backward (TRUE when they should be
FALSE and vv.)

svn path=/trunk/; revision=4618
2003-04-29 22:39:57 +00:00
Eric Kohl
e678b87637 Disabled debug messages.
svn path=/trunk/; revision=4617
2003-04-29 19:49:17 +00:00
Eric Kohl
23f8e2083b Implemented disk geometry update for BIOS drives.
Disk manager handling is not implemented yet.

svn path=/trunk/; revision=4616
2003-04-29 18:06:26 +00:00
KJK::Hyperion
38a1364aae - new statically linked library ROSRTL, for code to be shared among system DLLs
- user-mode thread creation code moved to ROSRTL
 - user-mode thread context initialization code fixed
 - LdrInitializeThunk() breakin stub fixed

svn path=/trunk/; revision=4615
2003-04-29 02:17:01 +00:00
Casper Hornstrup
6247d82cc7 2003-04-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile (DLLS): Add epsapi, psapi and wsock32.
	* lib/ntdll/ldr/utils.c (LdrPerformRelocations): Handle the case where a
	relocation crosses a page boundary.
	(LdrFixupImports): Use image load address in calculatation of import
	address list.

svn path=/trunk/; revision=4614
2003-04-28 21:32:10 +00:00
Eric Kohl
e97422786f Wiped the partition sector structure mess away.
Made sector read and write routines more flexible.
Fixed disk signature reading bug.

svn path=/trunk/; revision=4613
2003-04-28 21:15:07 +00:00
Casper Hornstrup
37f29ead4b 2003-04-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/fslib/vfatlib/vfatlib.h: New file.
	* subsys/system/usetup/format.c: Ditto.
	* subsys/system/usetup/format.h: Ditto.
	* lib/fslib/vfatlib/vfatlib.c (GetShiftCount): Define.
	(VfatWriteBootSector, VfatWriteFsInfo, VfatWriteFAT,
	VfatWriteRootDirectory): New function.
	(VfatFormat): Implement.
	* subsys/system/usetup/bootsup.c: (InstallFat32BootCodeToFile): Use
	0x0000 as marker to disable backup boot sector.
	(InstallFat32BootCodeToDisk): Add lower 8-bit to BackupBootSector.
	Also treat 0x0000 as no backup boot sector is available.
	* subsys/system/usetup/makefile (TARGET_SDKLIBS): Define.
	(TARGET_OBJECTS): Add format.o.
	* subsys/system/usetup/partlist.c (AddPartitionList): Initialize
	PartNumber field.
	(GetSelectedPartition): Set PartEntryNumber correctly.
	(CreateSelectedPartition): Write partition information to disk.
	(DeleteSelectedPartition): New function.
	* subsys/system/usetup/partlist.h (PARTDATA): Add field CreatePartition.
	(DeleteSelectedPartition): Prototype.
	* subsys/system/usetup/usetup.c (ConfirmDeletePartition): New function.
	(SelectPartitionPage): Support deletion of partition.
	(FormatPartitionPage): Support formatting of partition.

svn path=/trunk/; revision=4612
2003-04-28 19:44:13 +00:00
Aleksey Bragin
55300ebbf2 Added DbgPrint-notification for stubbed function KeSetAffinityThread()
svn path=/trunk/; revision=4611
2003-04-28 14:32:36 +00:00
Aleksey Bragin
331899f621 Added notification for partly-implemented NdisMSetAttributesEx()
svn path=/trunk/; revision=4610
2003-04-28 14:31:47 +00:00
Eric Kohl
29a610ad56 Use disk signature or MBR checksum to find the right disk.
Add missing device objects to device extensions.

svn path=/trunk/; revision=4609
2003-04-28 11:05:34 +00:00
Gé van Geldorp
ffebf21131 RegionSize in MEMORY_BASIC_INFORMATION is relative to BaseAddress, not to
AllocationBase

svn path=/trunk/; revision=4608
2003-04-28 10:37:40 +00:00
Gé van Geldorp
458d8d250c Layout stat structures exactly the same as in Microsoft MSVCRT, for
binary compatibility

svn path=/trunk/; revision=4607
2003-04-27 23:14:04 +00:00
guido
8429d49021 fixed file dates in root directory
svn path=/trunk/; revision=4606
2003-04-27 20:23:30 +00:00
Hartmut Birr
b5d5cf6145 - Initialize the fpu control register within the context structure.
svn path=/trunk/; revision=4605
2003-04-27 18:58:00 +00:00
Casper Hornstrup
371b0fd87e - Query BIOS for supported disk drives
svn path=/trunk/; revision=4604
2003-04-27 18:18:51 +00:00
Eric Kohl
3f270ca3d4 Removed unused bios32 support.
svn path=/trunk/; revision=4603
2003-04-27 18:12:15 +00:00
Eric Kohl
392883e81f Detect and print BIOS disk geometry.
svn path=/trunk/; revision=4602
2003-04-27 18:10:38 +00:00
Eric Kohl
0f71890bc8 Added disk geometry structures for hardware detection.
svn path=/trunk/; revision=4601
2003-04-27 18:08:56 +00:00
Emanuele Aliberti
52fa46b090 FsRtlNumberOfRunsInLargeMcb() implemented (simple).
svn path=/trunk/; revision=4600
2003-04-27 16:25:25 +00:00
Hartmut Birr
676d1d9ebf - Fixed the frame layout for trap 15 and 16.
svn path=/trunk/; revision=4599
2003-04-27 16:21:16 +00:00
Casper Hornstrup
a80496b963 2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk (TARGET_ASFLAGS): Add -march and define MK_ARCH_ID.
	* lib/ntdll/makefile (TARGET_ASFLAGS): Define as
	"-I $(PATH_TO_TOP)/include".
	(TARGET_OBJECTS): Add ldr/entry.o.
	* lib/ntdll/ldr/startup.c: Move inline assembly code...
	* lib/ntdll/ldr/entry.S: ...here. New file.

svn path=/trunk/; revision=4598
2003-04-27 14:45:52 +00:00
Casper Hornstrup
3568bb9b50 2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/kernel32/kernel32.h (assert): Define.
	* tools/mkhive/.cvsignore: New file.

svn path=/trunk/; revision=4597
2003-04-27 11:43:31 +00:00
Eric Kohl
a950079369 Moved disk manager related offset calculation to class2.
Implemented dynamic partition management.
Removed unused header files.

svn path=/trunk/; revision=4596
2003-04-27 10:50:07 +00:00
KJK::Hyperion
879b1f5754 My biggest commit so far (everything compiles and apparently runs fine):
- replaced DWORD with ULONG in a couple of places
 - replaced some ULONGs with LONGs in the KD GDB stub
 - replaced INITIAL_TEB with USER_STACK, as per Nebbet's book, to support both fixed size and expandable stacks
 - added InterlockedExchangePointer
 - added the ASM_BREAKPOINT macro as the architecture-dependent assembler code to raise a breakpoint exception
 - corrected definitions of INT, LONG, DWORD, UINT, ULONG and ULONG32
 - corrected IoSetCancelRoutine to use InterlockedExchangePointer
 - corrected definition of NtCurrentTeb and NtCurrentPeb
 - corrected DbgBreakPoint and DbgUserBreakPoint not to set up a stack frame (temporary fix with inline assembler - why doesn't GCC understand __declspec(naked)?)
 - corrected various calls to Interlocked* functions to cast OUT operands to LONG *
 - corrected various printf format strings
 - corrected DbgUiIssueRemoteBreakin to use the smallest possible stack  (this is what started everything)
 - removed a DPRINT that accessed pageable memory at non-PASSIVE_LEVEL IRQL
 - beautified CreateProcessA (another temporary fix - all the new functions will be isolated in the upcoming stand-alone RTL)
 - prefixed LdrInitializeThunk with a nop that can be overwritten with a breakpoint for debugging purposes (temporary debugging aid until we have user-mode debugger support). Will add support for this to the breakin utility soon
 - thread creation code rewritten from scratch (some glitches documented inline, but works fine)
 - thread creation code now duplicated just twice, as opposed to five times (temporary fix - three new, non standard functions have been exported from NTDLL.DLL, will fix later)

svn path=/trunk/; revision=4595
2003-04-26 23:13:33 +00:00
Eric Kohl
f2c91805a0 Added missing newline.
svn path=/trunk/; revision=4594
2003-04-26 22:51:21 +00:00
Steven Edwards
71df58baf5 Fixed wm_paint test to use ReactOS build system.
svn path=/trunk/; revision=4593
2003-04-26 21:39:36 +00:00
Steven Edwards
91316fff93 Fixed bitblt test to use ReactOS build system.
svn path=/trunk/; revision=4592
2003-04-26 21:37:09 +00:00
Eric Kohl
8b4929f41e Improved command line completion. Patch by Marc Schuetz.
svn path=/trunk/; revision=4591
2003-04-26 16:38:05 +00:00
Gé van Geldorp
01a868d4b8 Remove SetLastErrorByStatus, since it's no longer needed (it is a macro
now) and is giving compile errors

svn path=/trunk/; revision=4590
2003-04-26 12:50:56 +00:00
Gé van Geldorp
ffa4267973 Silence debug messages
svn path=/trunk/; revision=4589
2003-04-26 10:06:10 +00:00
Gé van Geldorp
1139966a4e If name of DLL to load contains a path and it has been loaded before,
find the previous entry

svn path=/trunk/; revision=4588
2003-04-26 10:05:38 +00:00
Gé van Geldorp
1e0a179dd4 FileNameLength and ShortNameLength are in bytes, adjust offset for writing
terminating NUL character accordingly

svn path=/trunk/; revision=4587
2003-04-26 08:56:50 +00:00
Hartmut Birr
4b11a99bfe - Fixed the offset in ReadPciConfigUshort.
svn path=/trunk/; revision=4586
2003-04-26 07:09:26 +00:00
Hartmut Birr
40b6b22911 - Fixed the offset in ReadPciConfigUshort/WritePciConfigUshort.
svn path=/trunk/; revision=4585
2003-04-26 07:06:55 +00:00
Steven Edwards
63e4fdcdc6 Replace SetLastErrorByStatus with RtlNtStatusToDosError
svn path=/trunk/; revision=4584
2003-04-26 01:19:31 +00:00
KJK::Hyperion
b9269e59c8 SetLastErrorByStatus() now a macro, for binary compatibility with Windows
svn path=/trunk/; revision=4583
2003-04-26 00:25:01 +00:00
Aleksey Bragin
2e6c5e5a92 Implement part of the functionality of NdisMSetAttributesEx(). (So ROS doesn't complain while loading VMWare net driver -- though it still doesn't load)
svn path=/trunk/; revision=4582
2003-04-25 21:22:48 +00:00
Casper Hornstrup
b119bad3fa - Detect PCI busses
- Detect IDE controllers and devices
- Improved RegEnumValue()

svn path=/trunk/; revision=4581
2003-04-25 19:32:51 +00:00
Hartmut Birr
37339cbf6b - Fixed the detection of a fat32 boot sector.
svn path=/trunk/; revision=4580
2003-04-25 18:45:06 +00:00
Aleksey Bragin
143395e386 KeSetAffinityThread stub added (returns STATUS_SUCCESS and thus VMWare network driver won't crash ReactOS)
svn path=/trunk/; revision=4579
2003-04-25 18:37:44 +00:00
Aleksey Bragin
79c386dcf3 KeSetAffinityThread added (uncommented in def files)
svn path=/trunk/; revision=4578
2003-04-25 18:36:10 +00:00
Hartmut Birr
9282a443a1 - Fixed a rounding bug within the translation from float values to printable wstrings.
svn path=/trunk/; revision=4577
2003-04-25 17:49:07 +00:00
Eric Kohl
80b2784520 - Added memmove().
- Added hardware hive export.

svn path=/trunk/; revision=4576
2003-04-25 09:54:52 +00:00
Eric Kohl
323bc49a36 - Added memmove().
- Added hardware hive export.

svn path=/trunk/; revision=4575
2003-04-25 09:45:17 +00:00
Gé van Geldorp
6aa450d7d9 Moved _ftol to NTDLL
svn path=/trunk/; revision=4574
2003-04-24 22:21:13 +00:00
Hartmut Birr
f4e4a5dd14 - Call KeBugCheckWithTf for not handled kernel mode exceptions in KiDispatchException.
svn path=/trunk/; revision=4573
2003-04-24 16:55:08 +00:00
Hartmut Birr
3eb21f737e - Implemented KeBugCheckWithTf like KeBugCheckEx.
svn path=/trunk/; revision=4572
2003-04-24 16:53:59 +00:00
Hartmut Birr
d7982ea298 - Do not free the initial environment block, if the environment changed.
svn path=/trunk/; revision=4571
2003-04-24 16:34:26 +00:00
Hartmut Birr
0d54f93d31 - Fixed a rounding bug within the translation from float values to printable strings.
svn path=/trunk/; revision=4570
2003-04-24 16:28:57 +00:00
Eric Kohl
33b0769d71 Enable hardware hive import.
svn path=/trunk/; revision=4569
2003-04-24 12:28:57 +00:00
Gé van Geldorp
a94c5d7e28 Fix _ftol() and move it to NTDLL i386 subdir
svn path=/trunk/; revision=4568
2003-04-23 22:58:02 +00:00
Brian Palmer
fb8745e1ef Turned the FreeLoader debugger into a GUI app.
Basically just a terminal program that logs the RS232 data to a file.

svn path=/trunk/; revision=4567
2003-04-23 20:59:30 +00:00
Eric Kohl
0abf32e9f6 Fixed returning an undefined value.
svn path=/trunk/; revision=4566
2003-04-23 19:36:04 +00:00
Brian Palmer
201324d607 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.

svn path=/trunk/; revision=4565
2003-04-23 16:47:24 +00:00
Eric Kohl
198be0032b Remove gstart.exe from boot CD.
svn path=/trunk/; revision=4563
2003-04-23 12:43:23 +00:00
Eric Kohl
e39c8f7e42 Use cdmake.exe to create reactos.iso file.
Remove gstart.exe from boot CD.

svn path=/trunk/; revision=4562
2003-04-23 12:42:59 +00:00
Eric Kohl
a2ba772d42 Added checks for invalid block pointers.
Update free cell list when three cells are merged.

svn path=/trunk/; revision=4561
2003-04-22 21:14:39 +00:00
KJK::Hyperion
c1ce9a4b84 - string-type-generic getopt() (hacked together in half a hour - seems to work fine, though). Very simple - only implements the POSIX standard (no long options, etc.)
- modified tlist to use getopt() to parse the command line, just for fun. Seems to work

svn path=/trunk/; revision=4560
2003-04-22 03:20:25 +00:00
Gé van Geldorp
aac3b7cd7b Exclude dependency files from CVS operations
svn path=/trunk/; revision=4559
2003-04-20 19:54:51 +00:00
Gé van Geldorp
0f4fba969a Implemented _beginthreadex and _endthreadex
svn path=/trunk/; revision=4558
2003-04-20 19:42:50 +00:00
Gé van Geldorp
628cc3fad9 Simple implementation of GetCPInfo
svn path=/trunk/; revision=4557
2003-04-20 19:42:11 +00:00
Emanuele Aliberti
728ac0f0b5 FsRtl: More obsolete functions for handling Memory Control Blocks (MCB).
It seems that, whit the release of WNT40, MCBs were replaced with LARGE_MCBs.

svn path=/trunk/; revision=4556
2003-04-20 17:59:18 +00:00
Emanuele Aliberti
638d0bd31a FsRtl{Un}InitializeMcb() implemented (apparently obsolete).
svn path=/trunk/; revision=4555
2003-04-20 09:07:12 +00:00
Emanuele Aliberti
e47c7dd876 FsRtl:Memory Control Block updates (from ntifs.h by B.Branten)
svn path=/trunk/; revision=4554
2003-04-19 17:17:10 +00:00
Gé van Geldorp
ee030d79d9 For binary compatibility, layout the fields in the TEB at exactly the
same offsets as in WinNT.

svn path=/trunk/; revision=4553
2003-04-18 19:02:16 +00:00
Casper Hornstrup
569a7a02b6 2003-04-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* subsys/system/usetup/partlist.c (AddPartitionList): Create
	unpartitioned areas.
	(CreatePartitionListNoGUI): Save disk geometry.
	(PrintDiskData): Do not print hidden partition list entries.
	(ScrollDownPartitionList, ScrollUpPartitionList): Skip hidden partition
	list entries.
	(GetActiveBootPartition): Use CurrentDisk as index.
	(CreateSelectedPartition): New function.
	* subsys/system/usetup/partlist.h (PARTDATA): Add field NewPartSize.
	(PARTENTRY): Add fields StartingOffset and HidePartEntry.
	(DISKENTRY): Add fields Cylinders, TracksPerCylinder, SectorsPerTrack,
	and BytesPerSector;
	(CreateSelectedPartition): Add Prototype.
	* subsys/system/usetup/usetup.c (PAGE_NUMBER): Add CREATE_PARTITION_PAGE
	and FORMAT_PARTITION_PAGE
	(CurrentPartitionList, CurrentFileSystemList): New globals.
	(SelectPartitionPage): Set CurrentPartitionList.
	(PARTITION_SIZE_INPUT_FIELD_LENGTH): Define as 6.
	(DrawInputField, ShowPartitionSizeInputBox, CreatePartitionPage,
	CreateFileSystemList, DestroyFileSystemList, DrawFileSystemList,
	ScrollDownFileSystemList, ScrollUpFileSystemList, FormatPartitionPage):
	New functions.
	(SelectFileSystemPage): Draw partition screen.
	(CheckFileSystemPage): Handle CREATE_PARTITION_PAGE and
	FORMAT_PARTITION_PAGE.
	* subsys/system/usetup/usetup.h (FILE_SYSTEM, FILE_SYSTEM_LIST): Add enums.

svn path=/trunk/; revision=4552
2003-04-18 14:00:17 +00:00
Gé van Geldorp
9acdb61c4b Pass CC on make command line so we won't have to change FreeType source
files

svn path=/trunk/; revision=4551
2003-04-18 10:48:13 +00:00
Gé van Geldorp
3ac978f542 Import FreeType 2.1.4
svn path=/trunk/; revision=4550
2003-04-18 10:44:19 +00:00
Gé van Geldorp
296d8bc63f Implement duplication of NtCurrentThread() pseudo-handle
svn path=/trunk/; revision=4549
2003-04-18 09:37:01 +00:00
Gé van Geldorp
63401fccd2 Change DPL in trap gate for INT 3 to 3, so INT 3 can be used from user mode
svn path=/trunk/; revision=4548
2003-04-18 09:09:56 +00:00
Gé van Geldorp
ff17fbcf89 Fix GetVersion
svn path=/trunk/; revision=4547
2003-04-18 08:29:35 +00:00
Gé van Geldorp
bbe715ec28 Print debug message if DllMain of a loaded DLL fails
svn path=/trunk/; revision=4546
2003-04-18 08:28:31 +00:00
Gé van Geldorp
857a0fc520 Have GetACP() return something sensible
svn path=/trunk/; revision=4545
2003-04-18 08:26:50 +00:00
Eric Kohl
70ce973518 Create hardware keys only if hardware hive was not imported.
svn path=/trunk/; revision=4544
2003-04-17 11:07:47 +00:00
Casper Hornstrup
ac3799c79c 2003-04-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/mkhive/infcache.c (InfpCacheFindSection, InfpCacheFindKeyLine,
	InfFindFirstLine, InfFindFirstMatchLine, InfFindNextMatchLine,
	InfGetLineCount): Change call to stricmp() to strcasecmp().
	* tools/mkhive/reginf.c (GetRootKey): Ditto.
	* tools/mkhive/registry.c (RegSetValue, RegQueryValue): Ditto.

svn path=/trunk/; revision=4543
2003-04-17 10:41:02 +00:00
Eric Kohl
f284e3a41c - remove gstart.exe
- call mkhive.exe
- load system instead of system.hiv

svn path=/trunk/; revision=4542
2003-04-16 15:08:55 +00:00
Eric Kohl
8b6b2e1d5b Finished mkhive.
svn path=/trunk/; revision=4541
2003-04-16 15:06:33 +00:00
Brian Palmer
273b6dd69f Fixed the EXT2/3 boot sector code so that it only uses the boot drive in the boot sector if it exists (i.e. not 0xff)
Otherwise it uses the boot drive passed in the DL register.
Updated the EXT2/3 installer to reflect the changes in the boot sector code for EXT2/3.

svn path=/trunk/; revision=4540
2003-04-15 22:48:06 +00:00
Brian Palmer
b4d0aca25a 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.

svn path=/trunk/; revision=4539
2003-04-15 02:15:54 +00:00
Eric Kohl
1a884ce84d Add hive maker. It does not export binary hives yet.
svn path=/trunk/; revision=4538
2003-04-14 17:19:42 +00:00
Eric Kohl
be94ceb3d5 Disabled packet.sys driver.
svn path=/trunk/; revision=4537
2003-04-14 15:41:30 +00:00
KJK::Hyperion
6225a118af sorry, forgot to exclude auto-generated files from dependency tracking
svn path=/trunk/; revision=4536
2003-04-14 12:14:50 +00:00
KJK::Hyperion
1bd4ae1455 - fixed definition of IO_COUNTERS structure to make it binary compatible with Windows (and make EPSAPI enumerate threads correctly on Windows)
- cleaned up some makefiles, added dependency tracking
 - tlist now uses EPSAPI, and, incidentally, a bug has also been fixed

svn path=/trunk/; revision=4535
2003-04-14 01:19:08 +00:00
Casper Hornstrup
e7940ebdad 2003-04-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/kd/gdbstub.c (KdEnterDebuggerException): Fix signed/unsigned
	comparison warning.
	* ntoskrnl/ke/i386/exp.c (KiKernelTrapHandler): Ditto.
	* ntoskrnl/ke/i386/usertrap.c (KiUserTrapHandler): Ditto.
	* tools/helper.mk: Do not install static libraries.

svn path=/trunk/; revision=4533
2003-04-13 17:38:27 +00:00
Casper Hornstrup
c64cac2688 2003-04-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/Makefile: Fix rule for mkflpimg.

svn path=/trunk/; revision=4532
2003-04-13 13:05:04 +00:00
guido
ca2e0585ff added tool to create floppy disk images
svn path=/trunk/; revision=4531
2003-04-13 12:51:28 +00:00
Brian Palmer
b4581c2c95 Added simple utility to read the FreeLoader debug output
from the serial port and display it on the console.
Someday I will turn this into a GUI app.

svn path=/trunk/; revision=4530
2003-04-13 04:14:20 +00:00
KJK::Hyperion
336f8e82c1 - corrected typo in epsapi.h
- CTM: cleaned up to use EPSAPI and the ReactOS DDK

svn path=/trunk/; revision=4529
2003-04-13 03:57:41 +00:00
KJK::Hyperion
1b1afc9539 - the build system now handles static libraries 0.5% better
- cabman: brand new makefile - uses TARGET_* macros, the build helper, and the zlib library properly
 - fmifs: static libraries (.a archives) are built directly into the dk/w32/lib directory, instead of their base directory, so the makefile has been fixed
 - psapi: split into PSAPI.dll and EPSAPI (Extended PSAPI), renamed some files, new header
 - zlib: cleaned up makefile from unnecessary hacks

svn path=/trunk/; revision=4528
2003-04-13 03:24:28 +00:00
Gunnar Dalsnes
0871ebf88b implemeted waiting on file handles/file objects
svn path=/trunk/; revision=4527
2003-04-12 20:34:27 +00:00
Eric Kohl
7b5e0bebdf Final preparations for hardware hive import.
svn path=/trunk/; revision=4526
2003-04-12 18:41:43 +00:00
Eric Kohl
4aa19f2392 * Removed CmiLockBlock() and CmiReleaseBlock().
* Added new hive flags to distinguish between volatile/non-volatile and pointer/offset hives.

svn path=/trunk/; revision=4525
2003-04-12 15:09:57 +00:00
Casper Hornstrup
01aebbdd9d 2003-04-12 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/cdmake/Makefile: Use HOST_CC.
	* tools/cdmake/cdmake.c (MAX_PATH, DIR_SEPARATOR_CHAR,
	DIR_SEPARATOR_STRING): Define.
	(directory_record): Add fields name_on_cd and extension_on_cd.
	(error_exit): Make a macro. Avoid using vfprintf and fprintf.
	(write_directory_record, new_directory_record, compare_directory_order,
	pass): Use name_on_cd and extension_on_cd.
	(make_directory_records, get_file_specifications): Use DIR_SEPARATOR_CHAR.
	(new_directory_record, make_directory_records): Linux implementations.
	(main): Use DIR_SEPARATOR_CHAR.

svn path=/trunk/; revision=4524
2003-04-12 14:53:56 +00:00
Phillip Susi
03cba78fff Moved a local declaration to the top of the funtion, where it has to be to compile
svn path=/trunk/; revision=4523
2003-04-11 21:02:21 +00:00
KJK::Hyperion
22f750cd54 The GDB KD stub now correctly references/dereferences ETHREAD objects
svn path=/trunk/; revision=4522
2003-04-11 02:25:24 +00:00
KJK::Hyperion
5c6df46d27 - PsLookup* functions fixed to increment the reference count of the object they are about to return. The GDB KD stub is directly affected by this patch, but it hasn't been fixed yet
- PsGetCurrentProcess and PsGetCurrentThread are now macros calling IoGetCurrentProcess and KeGetCurrentThread, for binary compatibility with Windows

svn path=/trunk/; revision=4521
2003-04-10 23:14:47 +00:00
Gé van Geldorp
71c3c7c1cc Fix named resource handling and LoadString by d_layer
svn path=/trunk/; revision=4520
2003-04-10 19:12:15 +00:00
Eric Kohl
68962b6249 Remove system.hiv from Boot-CD.
svn path=/trunk/; revision=4519
2003-04-10 18:55:27 +00:00
Eric Kohl
c26ce9f93b Added support for binary system hive.
svn path=/trunk/; revision=4518
2003-04-10 18:51:22 +00:00
Eric Kohl
55a31c6b98 Added support for binary system hive.
svn path=/trunk/; revision=4517
2003-04-10 18:43:14 +00:00
Eric Kohl
ceb7d45424 Do not add empty bins to a binry hive.
svn path=/trunk/; revision=4516
2003-04-10 17:49:55 +00:00
Aleksey Bragin
294c3bcf94 New ctm version, supports killing of process, some bugfixes, increased speed of scrolling. My first ReactOS commit via CVS :)
svn path=/trunk/; revision=4515
2003-04-09 16:31:28 +00:00
Gé van Geldorp
2602dec603 Improve (hardware) exception handling and reporting
svn path=/trunk/; revision=4514
2003-04-07 23:10:08 +00:00
Eric Kohl
e81de9962d Added new tool 'cdmake'.
svn path=/trunk/; revision=4513
2003-04-07 18:16:58 +00:00
Eric Kohl
4aa447d8d2 Added missing boot signature.
svn path=/trunk/; revision=4512
2003-04-06 20:01:09 +00:00
Gé van Geldorp
abbc08ce15 Moved MSVCRT setjmp.o
svn path=/trunk/; revision=4511
2003-04-06 13:10:21 +00:00
Gé van Geldorp
f579397b48 Add wsock32
svn path=/trunk/; revision=4510
2003-04-06 12:49:13 +00:00
Gé van Geldorp
c3fb300cc3 Zero-fill initialized data not contained in image file (2nd try)
svn path=/trunk/; revision=4509
2003-04-06 12:48:33 +00:00
Gé van Geldorp
3fe2b722fd Added _setjmp3() and __p__iob()
svn path=/trunk/; revision=4508
2003-04-06 12:40:56 +00:00
Eric Kohl
e6af1b07da Removed outdated declarations and macros.
svn path=/trunk/; revision=4507
2003-04-06 12:13:53 +00:00
Casper Hornstrup
61914f23d0 2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/freetype/.cvsignore: Ignore nul.

svn path=/trunk/; revision=4506
2003-04-06 10:51:29 +00:00
Casper Hornstrup
09754161f9 2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/storage/atapi/atapi.c (AtapiReadWrite): Expect an interrupt a
	bit sooner.
	* hal/halx86/isa.c (HalpGetIsaInterruptVector): Compute vector for MP.
	* hal/halx86/pci.c (HalpGetPciInterruptVector): Ditto.
	* hal/halx86/sysbus.c (HalpGetSystemInterruptVector): Ditto.
	* hal/halx86/mp.c (AssignIrqVector): Rewrite.
	(MpsTimerHandler): Disable for now.
	(MpsSpuriousHandler): Do not acknowledge interrupt.
	(HalAllProcessorsStarted): Only boot 1 CPU for now.
	(RescheduleDpcRoutine): New function.
	(RescheduleDpc): New variable.
	(HalpInitMPS): Initialize RescheduleDpc. Fix bug in call to memset.
	* hal/halx86/mpsirql.c: Rewrite.
	* hal/halx86/include/mps.h (VECTOR2IRQ, IRQ2VECTOR, VECTOR2IRQL,
	IRQL2VECTOR): New macros.
	* ntoskrnl/ntoskrnl.def: Add KeRescheduleThread@0.
	* ntoskrnl/ntoskrnl.edf: Ditto.
	* ntoskrnl/include/internal/ke.h (KeRescheduleThread): Prototype.
	* ntoskrnl/ke/kthread.c (KeRescheduleThread): New function.
	* ntoskrnl/ke/i386/exp.c (KeInitExceptions): Remove unneeded call to
	set_trap_gate().
	* ntoskrnl/ke/i386/irq.c (VECTOR2IRQ, IRQ2VECTOR, VECTOR2IRQL): Correct.
	(IRQ_BASE): Define as FIRST_DEVICE_VECTOR.
	(NR_IRQS): Define using IRQ_BASE.
	(KeInitInterrupts): Use IRQ_BASE.
	(KiInterruptDispatch2): Rewrite.
	(KiInterruptDispatch): Ditto.
	(KeConnectInterrupt): Pass Vector to HalEnableSystemInterrupt() for MP.
	(KeDisconnectInterrupt): Pass Vector to HalDisableSystemInterrupt() for MP.
	* ntoskrnl/ke/i386/trap.s (_KiTrapProlog): Change 0x124 to KPCR_CURRENT_THREAD.

svn path=/trunk/; revision=4505
2003-04-06 10:45:16 +00:00
Casper Hornstrup
d6d1a08b48 2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Add format.
	* include/fslib/vfatlib.h (VfatFormat): Prototype.
	* lib/fmifs/format.c (VfatFormat): Add stub.
	* lib/fmifs/makefile (TARGET_LIBS): Add vfatlib.a.
	* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Add stub.
	* tools/helper.mk: Do not install .sym files for static libraries.
	* subsys/system/format: New directory.
	* subsys/system/format/makefile: New file.
	* subsys/system/format/format.c: Ditto.

svn path=/trunk/; revision=4504
2003-04-05 23:17:22 +00:00
guido
6756a59755 initialize variable
svn path=/trunk/; revision=4503
2003-04-05 22:21:33 +00:00
guido
5ccf66a359 housekeeping
svn path=/trunk/; revision=4502
2003-04-05 22:19:57 +00:00
Gé van Geldorp
e09c1c61dc Rollback previous change for now, gives problems when memory area extends beyond
end of file image

svn path=/trunk/; revision=4501
2003-04-05 21:57:13 +00:00
Casper Hornstrup
013bcd214a 2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/fslib: New directory.
	* lib/fslib: Ditto.
	* lib/fslib/vfatlib: Ditto.
	* include/fslib/vfatlib.h: New file.
	* lib/fslib/vfatlib/.cvsignore: Ditto.
	* lib/fslib/vfatlib/Makefile: Ditto.
	* lib/fslib/vfatlib/vfatlib.c: Ditto.
	* Makefile: Support file system libraries
	* lib/zlib/Makefile: Remove nostrip target.
	* tools/helper.mk: Add nostrip target.

svn path=/trunk/; revision=4500
2003-04-05 19:40:41 +00:00
Casper Hornstrup
d322047b43 2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/.cvsignore: Ignore rline.

svn path=/trunk/; revision=4499
2003-04-05 15:37:58 +00:00
Casper Hornstrup
e656184ad6 2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* bootcd.bat: Install dosmbr.bin.
	* drivers/storage/disk/disk.c (DiskClassDeviceControl): Pass physical
	device object to IoWritePartitionTable().
	* ntoskrnl/io/xhaldrv.c (xHalReadMBR): New function.
	(xHalWriteMBR): Ditto.
	(xHalExamineMBR): Use xHalReadMBR() to read MBR.
	(xHalIoWritePartitionTable): Partial implement.
	* subsys/system/usetup/bootsup.c (InstallMBRBootCodeToDisk): New function.
	* subsys/system/usetup/bootsup.h (InstallMBRBootCodeToDisk): Prototype.
	* subsys/system/usetup/partlist.c (CreatePartitionListNoGUI): New function.
	(CreatePartitionList): Use CreatePartitionListNoGUI() to create partition
	list.
	(GetPartitionInformation): New function.
	(MarkPartitionActive): Ditto.
	* subsys/system/usetup/partlist.h (MarkPartitionActive): Prototype.
	* subsys/system/usetup/usetup.c (SelectPartitionPage): Make SystemRootPath
	point to the selected partition if no partitions are active.
	(BootLoaderPage): If no partitions are active, then install a DOS MBR and
	mark the selected partition active.

svn path=/trunk/; revision=4498
2003-04-05 15:36:34 +00:00
Casper Hornstrup
d44d6e392a Added DOS compatible Master Boot Record (MBR)
svn path=/trunk/; revision=4497
2003-04-05 15:28:45 +00:00
Gé van Geldorp
4f133928b7 Zero-fill initialized data not contained in image file
svn path=/trunk/; revision=4496
2003-04-05 13:19:05 +00:00
Gé van Geldorp
2aab2423c2 Silcence CVS messages
svn path=/trunk/; revision=4495
2003-04-05 09:48:40 +00:00
Casper Hornstrup
7b1020a10e 2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile: Add bootcd target.
	(BOOTCD_INSTALL): Set for bootcd install.
	* rules.mak (TOPDIR): Define on windows.
	(BOOTCD_DIR): Define.
	(RLINE): Define.
	* apps/tests/lpc/makefile: Handle BOOTCD_INSTALL.
	* apps/tests/mstest/Makefile: Ditto.
	* apps/tests/nptest/Makefile: Ditto.
	* apps/tests/shm/makefile: Ditto.
	* ntoskrnl/Makefile: Handle BOOTCD_INSTALL. Add bootcd target.
	* drivers/dd/vga/makefile: Add bootcd target.
	* drivers/dd/blue/makefile (TARGET_BOOTSTRAP): Define as yes.
	* drivers/dd/floppy/Makefile: Ditto.
	* drivers/fs/cdfs/makefile: Ditto.
	* drivers/fs/ntfs/makefile: Ditto.
	* drivers/fs/vfat/makefile: Ditto.
	* drivers/input/keyboard/makefile: Ditto.
	* drivers/storage/atapi/makefile: Ditto.
	* drivers/storage/cdrom/makefile: Ditto.
	* drivers/storage/class2/makefile: Ditto.
	* drivers/storage/disk/makefile: Ditto.
	* drivers/storage/scsiport/makefile: Ditto.
	* hal/halx86/Makefile: Ditto.
	* lib/ntdll/makefile: Ditto.
	* subsys/system/usetup/makefile (TARGET_BOOTSTRAP): Define as yes.
	(TARGET_BOOTSTRAP_NAME): Define as smss.exe.
	* tools/Makefile: Add rline executable.
	* tools/helper.mk: Support bootcd targets.
	* tools/rline.c: New file.

svn path=/trunk/; revision=4494
2003-04-05 09:37:45 +00:00
Hartmut Birr
e174c6dcd5 - Fixed the initializing of the buffer length in CmiConnectHive.
svn path=/trunk/; revision=4492
2003-04-04 21:52:25 +00:00
Casper Hornstrup
dd53666e1a 2003-04-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/freetype/builds/compiler/gcc.mk (CC): Comment out; use CC from
	rules.mak instead.
	* lib/freetype/README.ROS: Note this in porting guide.

svn path=/trunk/; revision=4491
2003-04-04 21:30:31 +00:00
KJK::Hyperion
f729ca1756 NtCurrentTeb() for Alpha rewritten. Reorganized a couple of things
svn path=/trunk/; revision=4490
2003-04-04 20:36:15 +00:00
KJK::Hyperion
81369c3603 Updated FIXME comment
svn path=/trunk/; revision=4489
2003-04-04 20:35:24 +00:00
Steven Edwards
2941c583a4 add ctm by Aleksey Bragin
svn path=/trunk/; revision=4488
2003-04-04 19:26:04 +00:00
Eric Kohl
82389bc005 Cleaned-up and simplified hive import and registry initialization.
svn path=/trunk/; revision=4487
2003-04-04 14:05:29 +00:00
Gé van Geldorp
69b46e8303 Ignore .*.d files
svn path=/trunk/; revision=4486
2003-04-03 22:58:28 +00:00
Gé van Geldorp
4fbceaaefc Add time...() stubs
svn path=/trunk/; revision=4485
2003-04-03 22:57:00 +00:00
Gé van Geldorp
1eb65f81dd WSOCK32 stub
svn path=/trunk/; revision=4484
2003-04-03 22:44:19 +00:00
KJK::Hyperion
37f24851c5 - Nebbet-ized a couple of Zw types [tested]
- PSAPI now 10% better

svn path=/trunk/; revision=4483
2003-04-03 00:06:24 +00:00
Gunnar Dalsnes
4948893df6 timer messages impl.
svn path=/trunk/; revision=4482
2003-04-02 23:29:04 +00:00
Gé van Geldorp
42f7ce354a Turn optimization off in DBG builds
svn path=/trunk/; revision=4481
2003-04-02 23:25:56 +00:00
Gunnar Dalsnes
94975d7d95 timer messages impl.
svn path=/trunk/; revision=4480
2003-04-02 23:19:28 +00:00
Gunnar Dalsnes
9db4bafa99 timer messages impl.
svn path=/trunk/; revision=4479
2003-04-02 23:12:53 +00:00
KJK::Hyperion
a812f4e0b2 Long due update to PSAPI
svn path=/trunk/; revision=4478
2003-04-02 22:09:57 +00:00
KJK::Hyperion
01da24f40c Miscellaneous fixes:
- activated dependency tracking for ntdll [tested]
 - fixed trivial warning [tested]
 - build rules now define appropriate _M_<arch> macro, for compatibility with the Microsoft DDK [tested]
 - faster implementation of NtCurrentPeb() on the x86 [tested]
 - NtCurrentTeb() implementations for the Alpha AXP and MIPS R4000 architectures

svn path=/trunk/; revision=4477
2003-04-02 21:55:16 +00:00
KJK::Hyperion
323478bacf Forgot to remove this
svn path=/trunk/; revision=4476
2003-04-02 02:09:28 +00:00
KJK::Hyperion
4e0c54a3b8 Finalized my previous kernel32.dll patch - please test OutputDebugString
svn path=/trunk/; revision=4475
2003-04-02 00:23:12 +00:00
KJK::Hyperion
870f594d75 RtlRunDecodeUnicodeString & RtlRunEncodeUnicodeString patch finalized
svn path=/trunk/; revision=4474
2003-04-02 00:06:00 +00:00
KJK::Hyperion
e379c5e0b7 RtlRunEncodeUnicodeString & RtlRunDecodeUnicodeString contributed by crazylord
svn path=/trunk/; revision=4473
2003-04-02 00:01:21 +00:00
Eric Kohl
c3a2a5dc0d Start cleaning-up the hive management routines.
Initialize hive and log file names for the system hive.

svn path=/trunk/; revision=4472
2003-04-01 19:01:58 +00:00
Eric Kohl
1a56964de6 Fix missing entry point warning.
svn path=/trunk/; revision=4471
2003-04-01 18:58:59 +00:00
Gé van Geldorp
db73ddbe31 Add labs() needed for new MinGW environment
svn path=/trunk/; revision=4470
2003-04-01 17:14:36 +00:00
Eric Kohl
0ce7c979ac Enable import of binary system hive.
svn path=/trunk/; revision=4469
2003-04-01 16:37:14 +00:00
Eric Kohl
1fb9958a68 Fix bug which causes a crash in RtlpCheckFileNameExtension() if the file doesn't have an extension.
svn path=/trunk/; revision=4468
2003-04-01 16:35:22 +00:00
Gé van Geldorp
1d1253f734 Changed location of FreeType to lib/freetype
svn path=/trunk/; revision=4467
2003-04-01 08:55:51 +00:00
Gé van Geldorp
b4f4566a01 Use FreeType DLL
svn path=/trunk/; revision=4466
2003-04-01 08:43:46 +00:00
Gé van Geldorp
fa1f8db542 FreeType 2.1.3 import
svn path=/trunk/; revision=4465
2003-04-01 08:38:33 +00:00
Gé van Geldorp
fbc6b77b36 Support for kernel mode DLLs (TARGET_TYPE kmdll)
svn path=/trunk/; revision=4464
2003-04-01 08:13:30 +00:00
KJK::Hyperion
1f3d9b8335 - implemented a couple of DbgUi* APIs introduced in NT 5.1
- implemented RtlExitUserThread

svn path=/trunk/; revision=4463
2003-03-31 22:32:18 +00:00
KJK::Hyperion
279e7acf18 - added annotation to TEB definition
- new DbgUi* APIs added in NT 5.1
 - implemented RtlExitThread
 - added definition of various ACE_* structures

svn path=/trunk/; revision=4462
2003-03-31 22:30:49 +00:00
KJK::Hyperion
647129da1f - debugging support APIs moved into their own directory
- reversed the Debug Monitor protocol, implemented OutputDebugString accordingly
 - added a handful of new functions introduced in NT 5.1, either stubbed out or implemented

svn path=/trunk/; revision=4461
2003-03-31 22:28:59 +00:00
KJK::Hyperion
63a0f413bf Fixed tlist
svn path=/trunk/; revision=4460
2003-03-31 21:03:42 +00:00
Eric Kohl
1f8fe422c6 Remove unused code.
svn path=/trunk/; revision=4459
2003-03-31 11:49:38 +00:00
Eric Kohl
4dc8e937b1 Enable loading of binary hive files (without file extension).
svn path=/trunk/; revision=4458
2003-03-31 11:48:48 +00:00
Gé van Geldorp
14952fd4f9 Add \SystemRoot\system32 to the search path for implicitly linked
kernel mode DLLs

svn path=/trunk/; revision=4457
2003-03-31 09:30:00 +00:00
Eric Kohl
fc3c449b62 Updated for 0.1.1 CD.
svn path=/trunk/; revision=4455
2003-03-29 21:41:21 +00:00
Jason Filby
0c7e8e368e Version 0.1.1
svn path=/trunk/; revision=4454
2003-03-29 18:37:07 +00:00
Casper Hornstrup
579da78402 2003-03-29 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/ex/sysinfo.c (SystemProcessInformation): Fix warning.

svn path=/trunk/; revision=4453
2003-03-29 12:55:48 +00:00
Eric Kohl
e4dd0575db Removed cmd from the target list.
svn path=/trunk/; revision=4452
2003-03-29 12:06:09 +00:00
Eric Kohl
7bf5e6cae6 Added support for the Ontrack Disk Manager.
svn path=/trunk/; revision=4451
2003-03-28 22:47:33 +00:00
Richard Campbell
1d95979106 Ported AdjustClientRect(Ex) from wine, this fixes bugs in hcalc
svn path=/trunk/; revision=4450
2003-03-28 19:25:00 +00:00
Richard Campbell
2b62e9b22c Fixes a client area issue in winemine and other apps.
svn path=/trunk/; revision=4449
2003-03-28 18:59:18 +00:00
Gé van Geldorp
5fff73db86 Fix crash in W32kGetTextMetrics
svn path=/trunk/; revision=4448
2003-03-28 16:20:51 +00:00
Gé van Geldorp
34aacc4e6b Fix crash at load-time
svn path=/trunk/; revision=4447
2003-03-28 15:34:17 +00:00
Gé van Geldorp
a2c3aa0f98 Send mouse movement messages when moving to left/top
svn path=/trunk/; revision=4446
2003-03-28 15:27:47 +00:00
Gé van Geldorp
c338b7de02 Initialize DC with BLACK_PEN
svn path=/trunk/; revision=4445
2003-03-28 15:27:02 +00:00
Gé van Geldorp
58ce5de527 Rollback last change
svn path=/trunk/; revision=4444
2003-03-27 23:17:22 +00:00
Jason Filby
cdc8ff38a8 Readme.txt for users
svn path=/trunk/; revision=4443
2003-03-27 22:25:33 +00:00
Gé van Geldorp
1b46517748 Fix linker warning
svn path=/trunk/; revision=4442
2003-03-27 19:34:00 +00:00
Richard Campbell
c99b43d4cb - Tim Jobling implemented PolyLine
svn path=/trunk/; revision=4441
2003-03-27 03:24:04 +00:00
Richard Campbell
9588279d27 *** empty log message ***
svn path=/trunk/; revision=4440
2003-03-27 02:31:41 +00:00
Richard Campbell
dd8f77cf0f - Implemented InvalidateRect and InvalidateRgn by Tim Jobling
svn path=/trunk/; revision=4439
2003-03-27 02:27:42 +00:00
Richard Campbell
90bdbbb09a *** empty log message ***
svn path=/trunk/; revision=4438
2003-03-27 02:26:15 +00:00
Richard Campbell
8923bf8701 - InvalidateRgn and InvalidateRect by Tim Jobling
svn path=/trunk/; revision=4437
2003-03-27 02:25:14 +00:00
Hartmut Birr
b47552e96f - Do not create a console for GUI applications.
svn path=/trunk/; revision=4436
2003-03-26 22:11:27 +00:00
Hartmut Birr
4950a5230f - Fixed a bug in CsrDeleteConsole. Sometimes the console wasn't removed from the console list.
svn path=/trunk/; revision=4435
2003-03-26 22:10:43 +00:00
Eric Kohl
6748410167 Implemented RtlIsTextUnicode().
svn path=/trunk/; revision=4434
2003-03-26 15:19:28 +00:00
Gé van Geldorp
52dfe36e11 Introduce ANSI version of LOGFONT and associated structures
svn path=/trunk/; revision=4433
2003-03-26 08:11:53 +00:00
Richard Campbell
96719caa15 *** empty log message ***
svn path=/trunk/; revision=4432
2003-03-26 01:01:21 +00:00
Gé van Geldorp
59371a062e Introduce TEXTMETRICSA and TEXTMETRICSW
svn path=/trunk/; revision=4431
2003-03-25 22:35:19 +00:00
Richard Campbell
dcedc133e0 *** empty log message ***
svn path=/trunk/; revision=4430
2003-03-25 20:34:52 +00:00
Eric Kohl
5ae904ab74 Added automatic start of 2nd stage setup.
svn path=/trunk/; revision=4429
2003-03-25 19:26:33 +00:00
Richard Campbell
eefe9aeef3 Removed a DbgPrint
svn path=/trunk/; revision=4428
2003-03-24 23:45:47 +00:00
Richard Campbell
464468ce33 Implemented UpdateWindow()
svn path=/trunk/; revision=4427
2003-03-24 23:08:51 +00:00
Gé van Geldorp
428e6983d1 Speed up search for free handle somewhat
svn path=/trunk/; revision=4426
2003-03-24 22:50:17 +00:00
Gé van Geldorp
0d5ed410c1 Fix GDI handle leaks
svn path=/trunk/; revision=4425
2003-03-24 22:49:54 +00:00
Eric Kohl
a3437854ba Use an enum for page id's instead of an ULONG.
svn path=/trunk/; revision=4424
2003-03-24 19:12:10 +00:00
Eric Kohl
192fe9f464 Implemented import of binary system hive. (UNTESTED)
Improved handling of a hive's dirty block bitmap.

svn path=/trunk/; revision=4423
2003-03-24 19:10:00 +00:00
Eric Kohl
6b349cca78 Added leading semicolons to comment lines
svn path=/trunk/; revision=4422
2003-03-24 13:45:27 +00:00
Eric Kohl
d64b0c501f Implemented RegLoadKey[A/W]() and RegUnLoadKey[A/W]().
svn path=/trunk/; revision=4421
2003-03-24 13:44:15 +00:00
Richard Campbell
e93115c5a2 - Proper implementation of NtUserMoveWindow()
svn path=/trunk/; revision=4420
2003-03-24 01:36:10 +00:00
KJK::Hyperion
1c607fc7d1 zlib is a static library, not (necessarily) a driver library. Moved it back to reactos/lib (who moved it?)
svn path=/trunk/; revision=4419
2003-03-24 01:28:44 +00:00
KJK::Hyperion
f7d6015170 why was zlib.a included in the list of files to install?
svn path=/trunk/; revision=4418
2003-03-24 00:23:18 +00:00
KJK::Hyperion
5c1108ea15 - changed a couple of structures to match the definitions given in the book "Windows 2000 Native API"
- implementation of the SystemProcessInformation class of NtQuerySystemInformation() by Aleksey Bragin

svn path=/trunk/; revision=4417
2003-03-24 00:09:32 +00:00
Gunnar Dalsnes
d3c97ea09d init. change notification work
svn path=/trunk/; revision=4416
2003-03-23 19:51:11 +00:00
Hartmut Birr
f771a79dd9 - Set the executable flag for some files in _stat.
svn path=/trunk/; revision=4415
2003-03-23 15:18:34 +00:00
Hartmut Birr
fa9eae54dd - Fixed a bug in valisttos.
- Implemented _spawnlp.

svn path=/trunk/; revision=4414
2003-03-23 15:18:01 +00:00
Eric Kohl
f392901f75 Implemented NtQueryAttributesFile() and NtQueryFullAttributesFile().
svn path=/trunk/; revision=4413
2003-03-23 14:46:09 +00:00
Hartmut Birr
2aef8289eb - Save the device object for dereferencing before the worker routine is called (IoWorkItemCallback).
svn path=/trunk/; revision=4412
2003-03-23 10:50:13 +00:00
Hartmut Birr
457a70030c - Add a trailing '\' if the path is only a drive (RtlpEatPath).
svn path=/trunk/; revision=4411
2003-03-23 10:49:19 +00:00
Hartmut Birr
52b9204b29 - Extract the correct search pattern and do not interpret '.' or '..'
at the end of the pattern as path (InternalFindFirstFile).

svn path=/trunk/; revision=4410
2003-03-23 10:48:14 +00:00
Hartmut Birr
d7d389bf60 - Fixed the length parameter for calling RtlGetCurrentDirectory_U (GetCurrentDirectoryW).
svn path=/trunk/; revision=4409
2003-03-23 10:46:59 +00:00
Hartmut Birr
1032130eaf - Fixed the intialization of the returned fcb if the directory is the root (FindFile).
svn path=/trunk/; revision=4408
2003-03-23 10:45:56 +00:00
Jason Filby
4687fe39e4 Free bitmap in EngTransparentBlt
svn path=/trunk/; revision=4407
2003-03-23 10:15:12 +00:00
Jason Filby
3aed736c06 Improved font loaded message
svn path=/trunk/; revision=4406
2003-03-23 09:46:22 +00:00
Jason Filby
44b3528f71 Line drawing fixes
svn path=/trunk/; revision=4405
2003-03-23 09:18:51 +00:00
Eric Kohl
68c3b158fc GetFileAttributes() and SetFileAttributes() must use NtOpenFile() to open directories too.
svn path=/trunk/; revision=4404
2003-03-23 04:01:16 +00:00
Gé van Geldorp
8b0fa2ce3d Release XLATEOBJs after use
svn path=/trunk/; revision=4403
2003-03-22 23:57:32 +00:00
Gé van Geldorp
1e8cc39810 Don't access internal object for NULL handle
svn path=/trunk/; revision=4402
2003-03-22 23:57:05 +00:00
Eric Kohl
a8c65e148b Check only the last path component for system hive name.
svn path=/trunk/; revision=4401
2003-03-22 22:32:17 +00:00
Jason Filby
e02bb01522 Use DPRINT1 for errors
svn path=/trunk/; revision=4400
2003-03-22 22:05:36 +00:00
Jason Filby
0a595fb831 Use DbgPrint for errors
svn path=/trunk/; revision=4399
2003-03-22 21:52:38 +00:00
Jason Filby
8526f38f43 Line drawing fixes
svn path=/trunk/; revision=4398
2003-03-22 21:51:05 +00:00
Eric Kohl
0e4840598e Fix typo.
svn path=/trunk/; revision=4397
2003-03-22 18:45:20 +00:00
Eric Kohl
5aa85e8ac2 Separate import of system and hardware hive.
svn path=/trunk/; revision=4396
2003-03-22 18:27:40 +00:00
Eric Kohl
c5b283562d Import registry data from inf files which are listed in txtsetup.sif.
svn path=/trunk/; revision=4395
2003-03-22 15:25:03 +00:00
Eric Kohl
8b3c315dd9 Add new registry inf files.
svn path=/trunk/; revision=4394
2003-03-22 15:22:14 +00:00
Eric Kohl
4f8e2ab714 Fixed NtLoadKey(), NtLoadKey2() and NtSaveKey() signature.
svn path=/trunk/; revision=4393
2003-03-22 11:26:51 +00:00
Mark Tempel
9bb9270ac0 Update to make shaptest be a windowed application.
svn path=/trunk/; revision=4392
2003-03-22 06:53:06 +00:00
Richard Campbell
87a1ef504f Allocated space for the menu
svn path=/trunk/; revision=4391
2003-03-22 04:53:01 +00:00
Richard Campbell
948bca0d7e Allocate space for menu in MoveWindow, will filter this change to SetWindowPos/CreateWindowEx soon, gotta go. PS doesn't work yet due to menu not being 'seen'
svn path=/trunk/; revision=4390
2003-03-22 03:05:26 +00:00
KJK::Hyperion
7c39153727 small fix to linking error
svn path=/trunk/; revision=4389
2003-03-21 21:46:06 +00:00
Hartmut Birr
a9b1cd3b93 - Fixed the buffer handling for ioctl requests and direct access
input buffers (METHODE_IN_DIRECT, output buffer from caller).

svn path=/trunk/; revision=4388
2003-03-21 21:09:42 +00:00
Hartmut Birr
99146c71b3 - Write direct to the console buffer in CsrWriteConsoleOutputChar.
- Update only the necessary screen region in CsrFillOutputChar.
- Improve the access to the console buffer in CsrFillOutputAttrib/CsrWriteConsoleOutputAttrib.

svn path=/trunk/; revision=4387
2003-03-21 20:17:55 +00:00
Eric Kohl
79dcc93088 Fixed typos in hivesys.inf.
Changed shell.exe to cmd.exe in txtsetup.sif

svn path=/trunk/; revision=4386
2003-03-21 18:10:32 +00:00
Eric Kohl
a4e1a6d03d Fixed value list cell resizing bug.
svn path=/trunk/; revision=4385
2003-03-21 17:40:57 +00:00
Mark Tempel
71c0c0f710 fixed the shaptest copy command.
svn path=/trunk/; revision=4384
2003-03-21 04:26:50 +00:00
Gunnar Dalsnes
ed69e0431b LoadResource crashed with NULL hModule
svn path=/trunk/; revision=4383
2003-03-21 00:20:41 +00:00
Gé van Geldorp
5b0769c317 Change install path
svn path=/trunk/; revision=4382
2003-03-20 21:46:41 +00:00
Gé van Geldorp
b3b7b23fa1 Set default shell to cmd.exe
svn path=/trunk/; revision=4381
2003-03-20 20:59:33 +00:00
Gé van Geldorp
6aa0e3b90d Shutdown after shell exit
svn path=/trunk/; revision=4380
2003-03-20 20:56:52 +00:00
Richard Campbell
a4907447eb *** empty log message ***
svn path=/trunk/; revision=4379
2003-03-20 20:56:24 +00:00
Richard Campbell
285f0befdd Remove shell
svn path=/trunk/; revision=4378
2003-03-20 20:53:15 +00:00
Richard Campbell
dc30187ea9 shell.exe is now cmd.exe
svn path=/trunk/; revision=4377
2003-03-20 20:50:40 +00:00
Richard Campbell
a0d62646a9 bug fixes
svn path=/trunk/; revision=4376
2003-03-20 20:29:48 +00:00
Richard Campbell
aa72305d58 Get CMD.EXE to build.
svn path=/trunk/; revision=4375
2003-03-20 19:32:59 +00:00
Richard Campbell
589616a406 Made cmd default shell
svn path=/trunk/; revision=4374
2003-03-20 19:22:23 +00:00
Richard Campbell
11dbd69c7c Changed default shell to cmd.exe
svn path=/trunk/; revision=4373
2003-03-20 19:21:01 +00:00
Richard Campbell
82d063e87d Move cmd to ReactOS module
svn path=/trunk/; revision=4372
2003-03-20 19:19:23 +00:00
Gé van Geldorp
43ff81f72d Search child list for windows to be repainted
svn path=/trunk/; revision=4371
2003-03-20 10:10:12 +00:00
Gé van Geldorp
6088c8a758 Initialize FastMutex before it's used
svn path=/trunk/; revision=4370
2003-03-20 10:09:24 +00:00
Gé van Geldorp
61656150fa Fix loader warnings
svn path=/trunk/; revision=4369
2003-03-20 09:45:57 +00:00
Gé van Geldorp
4a6584272a Silence some debug messages
svn path=/trunk/; revision=4368
2003-03-20 08:22:01 +00:00
Richard Campbell
f6818caa5e What the HELL was I smokin? :)
svn path=/trunk/; revision=4367
2003-03-20 04:03:13 +00:00
Richard Campbell
962a19c45f fixed bug because mingw is stupid (no newline at end of file? WHY OH WHY?)
svn path=/trunk/; revision=4366
2003-03-20 03:37:14 +00:00
Mark Tempel
a5c783b93c Updated comment to be more accurate.
svn path=/trunk/; revision=4365
2003-03-20 03:12:25 +00:00
Mark Tempel
504851d85e Added an initial implementation of Polygon. The initial revision is pretty slow,
and needs to be optimized.

svn path=/trunk/; revision=4364
2003-03-20 03:07:38 +00:00
Mark Tempel
3203df9587 Initial revision of the polygon fill routines. This implementation only supports ALTERNATE mode.
This revision is slow and has some drawing inaccuracies that need to be ironed out.

svn path=/trunk/; revision=4363
2003-03-20 03:06:52 +00:00
Mark Tempel
fac59fb33a Added objects/polyfill.c (polygon fill routines) to the build.
svn path=/trunk/; revision=4362
2003-03-20 03:05:03 +00:00
Mark Tempel
694a6b2c6e Removed Get/SetPolygonFillMode and Polygon
svn path=/trunk/; revision=4361
2003-03-20 03:04:02 +00:00
Mark Tempel
ea5140f3c0 Moved implementation of Rectangle to here.
Added Polygon

svn path=/trunk/; revision=4360
2003-03-20 03:03:39 +00:00
Mark Tempel
358c2e54fd Moved Rectangle to fillshap.c
svn path=/trunk/; revision=4359
2003-03-20 03:03:00 +00:00
Mark Tempel
f404855197 Add Get/SetPolygonFillMode
svn path=/trunk/; revision=4358
2003-03-20 03:02:38 +00:00
Mark Tempel
ba707122eb Update to add the file fillshap.c to the build.
svn path=/trunk/; revision=4357
2003-03-20 03:02:07 +00:00
Richard Campbell
cfb0571c4e Minor change to PATH=
svn path=/trunk/; revision=4356
2003-03-20 02:43:18 +00:00
Richard Campbell
769b12cd45 Removed NEWS
svn path=/trunk/; revision=4355
2003-03-20 02:39:59 +00:00
Richard Campbell
e3c29f8bcd Updated INSTALL
svn path=/trunk/; revision=4354
2003-03-20 02:38:41 +00:00
Richard Campbell
2fbb2609d7 Attempt at updating README file
svn path=/trunk/; revision=4353
2003-03-20 02:33:37 +00:00
Gunnar Dalsnes
957f814a24 initial work on I/O completion
svn path=/trunk/; revision=4352
2003-03-19 23:17:52 +00:00
Gunnar Dalsnes
fc1366d624 set thread WaitReason when blocking
svn path=/trunk/; revision=4351
2003-03-19 23:12:41 +00:00
Gunnar Dalsnes
313dc5e53f set thread WaitReason when blocking
initial work on I/O completion

svn path=/trunk/; revision=4350
2003-03-19 23:09:54 +00:00
KJK::Hyperion
14597f5f11 MinGW includes libmsvcrt.a by default, no need to add it manually
svn path=/trunk/; revision=4349
2003-03-19 21:36:01 +00:00
KJK::Hyperion
85e1c49842 Fixed parsing of color specification strings containing "bright"
svn path=/trunk/; revision=4348
2003-03-19 21:34:13 +00:00
Eric Kohl
65620794d3 Reorganize registry initialization.
Fix typos.

svn path=/trunk/; revision=4347
2003-03-19 20:12:44 +00:00
Eric Kohl
1b066695c5 Fix typos.
svn path=/trunk/; revision=4346
2003-03-19 20:10:24 +00:00
Mark Tempel
cb7c9a0a09 Test application used for testing GDI shape drawing functions. Currently it tests Polygon
svn path=/trunk/; revision=4345
2003-03-19 16:03:02 +00:00
Mark Tempel
367031db4a Update to add a new test application (shaptest) to the build. This application
is used to test shape drawing GDI functions.

svn path=/trunk/; revision=4344
2003-03-19 03:37:07 +00:00
Brian Palmer
958c16b6d9 Only compile if running win32 version of gcc.
svn path=/trunk/; revision=4343
2003-03-18 22:53:05 +00:00
Brian Palmer
1c8640a836 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

svn path=/trunk/; revision=4342
2003-03-18 22:32:30 +00:00
Eric Kohl
3c2e048a81 Implemented the import of default registry settings from .inf files.
This is based on Wine's setupapi implementation by Alexandre Julliard.

svn path=/trunk/; revision=4341
2003-03-18 20:39:49 +00:00
Eric Kohl
1b53680503 Fixed an off-by-one error in CmiPopulateHive().
Removed dead code from NtFlushKey().
Changed some debugging messages.

svn path=/trunk/; revision=4340
2003-03-18 20:36:17 +00:00
Gé van Geldorp
c306d43c24 Pass NTSTATUS return code from NtUser functions and use MmCopyFromCaller
to access pointer parameter

svn path=/trunk/; revision=4339
2003-03-18 09:16:44 +00:00
Gé van Geldorp
32f822eab5 Add #include to prevent warnings on MmCopyFrom/ToUser
svn path=/trunk/; revision=4338
2003-03-18 08:34:37 +00:00
Gé van Geldorp
c5c4fcd810 Pass PWINDOW_OBJECT instead of HANDLE in call to W32kGetClientRect
svn path=/trunk/; revision=4337
2003-03-18 08:33:27 +00:00
Richard Campbell
cc078531ba Implemented RedrawWindow()
svn path=/trunk/; revision=4336
2003-03-18 07:19:17 +00:00
Richard Campbell
2c77bbfae2 Implemented CloseWindow()
svn path=/trunk/; revision=4335
2003-03-18 07:01:09 +00:00
Richard Campbell
6952a4bc36 Implemented GetParent()
svn path=/trunk/; revision=4334
2003-03-18 06:46:10 +00:00
Richard Campbell
46cdc5f1ca Implemented IsZoomed()
svn path=/trunk/; revision=4333
2003-03-18 06:44:11 +00:00
Steven Edwards
075b861ce8 A little more good housekeeping
svn path=/trunk/; revision=4332
2003-03-18 01:21:49 +00:00
Steven Edwards
91b46db515 Removed Extra unnneed messagebox test
svn path=/trunk/; revision=4331
2003-03-18 01:00:33 +00:00
Steven Edwards
201760656a Moved MessageBox test to a more proper name
svn path=/trunk/; revision=4330
2003-03-18 00:55:23 +00:00
Steven Edwards
d46106cd34 disabled unneeded EH in test
svn path=/trunk/; revision=4329
2003-03-18 00:54:09 +00:00
Gunnar Dalsnes
04719148b0 LdrGetExportByOrdinal was broken
LdrGetExportByName: fixed bug visible when number of exported functions > number of exported names + check for zero symbol name export table

svn path=/trunk/; revision=4328
2003-03-17 23:05:07 +00:00
Gunnar Dalsnes
b41c5aa867 TlsGetValue: fix to comply with SDK behaviour
svn path=/trunk/; revision=4327
2003-03-17 22:39:09 +00:00
Gunnar Dalsnes
cff9e3c02f don't touch FileObject after IoCallDriver + cleanup
svn path=/trunk/; revision=4326
2003-03-17 22:30:55 +00:00
Gunnar Dalsnes
d03afca494 ObReferenceObjectByHandle: don't fail if NULL DesiredAccess
svn path=/trunk/; revision=4325
2003-03-17 22:28:55 +00:00
Eric Kohl
55d730e10e NtCreateKey() must return STATUS_OBJECT_NAME_NOT_FOUND if the caller tries to create a tree instead of a single key.
svn path=/trunk/; revision=4324
2003-03-17 22:09:26 +00:00
Eric Kohl
b5d59b0618 Fixed registry paths and some typos.
svn path=/trunk/; revision=4323
2003-03-17 22:06:31 +00:00
Richard Campbell
63a26e233a - Updated obm_close
- Fixed a bug with min/max hit tracking
- Added support for allocating a DCE for each window (untested)

svn path=/trunk/; revision=4322
2003-03-16 23:01:08 +00:00
Emanuele Aliberti
c2f91bfad0 SoftModalMessageBox stub added.
svn path=/trunk/; revision=4321
2003-03-16 17:11:22 +00:00
Emanuele Aliberti
328caa7669 Minor changes.
svn path=/trunk/; revision=4320
2003-03-16 17:01:45 +00:00
Eric Kohl
1ac75e85d3 Moved txtsetup.sif to the bootdata directory.
Added hivesys.inf file.

svn path=/trunk/; revision=4319
2003-03-16 16:17:39 +00:00
Hartmut Birr
bd8712ad37 - Fixed the screen updating in CsrWriteConsoleOutputChar.
svn path=/trunk/; revision=4318
2003-03-16 16:14:38 +00:00
Casper Hornstrup
77eee7ca44 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ntos/rtltypes.h (PRTL_BASE_PROCESS_START_ROUTINE): Define.
	* lib/kernel32/process/create.c (RtlBaseProcessStartRoutine): Import.
	(KlCreateFirstThread): Support images with native subsystem ID.
	* lib/ntdll/def/ntdll.def (RtlBaseProcessStartRoutine): Export.
	* lib/ntdll/def/ntdll.edf (RtlBaseProcessStartRoutine): Ditto.
	* lib/ntdll/rtl/exception.c (RtlBaseProcessStart): Forward declare.
	(RtlBaseProcessStartRoutine, RtlBaseProcessStart): Add.

svn path=/trunk/; revision=4317
2003-03-16 14:16:54 +00:00
Casper Hornstrup
4f23f4eae4 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/defines.h (VS_FFI_SIGNATURE, VS_FFI_STRUCVERSION): Define.

svn path=/trunk/; revision=4316
2003-03-16 13:45:27 +00:00
Casper Hornstrup
5f81b22161 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/ke/i386/exp.c (KiKernelTrapHandler): Use exception code
	STATUS_ACCESS_VIOLATION for exception 14.

svn path=/trunk/; revision=4315
2003-03-16 13:25:47 +00:00
Casper Hornstrup
43b6dc2a24 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/fs/util.c (FsRtlGetFileSize): Implement.

svn path=/trunk/; revision=4314
2003-03-16 13:18:49 +00:00
Casper Hornstrup
0a8aad891f 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/ntdll/rtl/nls.c (RtlCustomCPToUnicodeN, RtlMultiByteToUnicodeN,
	RtlOemToUnicodeN, RtlUnicodeToCustomCPN, RtlUnicodeToMultiByteN,
	RtlUnicodeToMultiByteSize, RtlUnicodeToOemN,
	RtlUpcaseUnicodeToCustomCPN, RtlUpcaseUnicodeToMultiByteN,
	RtlUpcaseUnicodeToOemN): Assert when unimplemented code is reached.

svn path=/trunk/; revision=4313
2003-03-16 13:07:02 +00:00
Casper Hornstrup
6697890d71 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ntos/zwtypes.h (FILE_BASIC_INFORMATION): Use LARGE_INTEGER,
	not TIME type for time fields.
	* lib/kernel32/file/copy.c (SetLastWriteTime): Adjust for new type.
	(CopyFileExW): Ditto.

svn path=/trunk/; revision=4312
2003-03-16 12:57:32 +00:00
Casper Hornstrup
09e4426af3 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ntos/types.h (FALSE): Protect with #ifndef FALSE.
	(TRUE): Protect with #ifndef TRUE.

svn path=/trunk/; revision=4311
2003-03-16 12:45:03 +00:00
Casper Hornstrup
a9d3504875 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/napi/i386/segment.h (put_user, get_user,
	bad_user_access_length, __segment_dummy, __sd, __const_sd, __put_user,
	__get_user, __generic_memcpy_tofs, __constant_memcpy_tofs, COMMON,
	__generic_memcpy_fromfs, __constant_memcpy_fromfs, memcpy_fromfs,
	memcpy_tofs, get_fs_byte, get_fs_word, get_fs_long, put_fs_byte,
	put_fs_word, put_fs_long, get_user_word, get_user_byte, get_user_long,
	put_user_byte, put_user_word, put_user_long, get_fs, get_ds, set_fs,
	set_ds): Remove.

svn path=/trunk/; revision=4310
2003-03-16 12:39:29 +00:00
Casper Hornstrup
8702f6b7e1 2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ddk/pstypes.h (TLS_OUT_OF_INDEXES): Define.

svn path=/trunk/; revision=4309
2003-03-16 12:27:54 +00:00
Richard Campbell
a02dfcdf70 Fixed more bugs...
svn path=/trunk/; revision=4308
2003-03-16 07:02:38 +00:00
Richard Campbell
46535b89b5 System buttons actually look like they press.
svn path=/trunk/; revision=4307
2003-03-16 06:43:09 +00:00
Eric Kohl
9c982f8f51 Implemented InfGetXxxField() functions.
svn path=/trunk/; revision=4306
2003-03-15 19:36:11 +00:00
Steven Edwards
e8cb3842fb turn off EH in test program.
svn path=/trunk/; revision=4305
2003-03-15 00:28:09 +00:00
Steven Edwards
cb418f8fa6 ....
svn path=/trunk/; revision=4304
2003-03-14 23:45:00 +00:00
Steven Edwards
2b4f936add Hack stub for NdisWriteErrorLogEntry so VMware network driver fails with some grace. =/
svn path=/trunk/; revision=4303
2003-03-14 23:37:26 +00:00
Eugene Ingerman
3cacdf6d55 Added safe copy from user.
svn path=/trunk/; revision=4302
2003-03-14 22:48:32 +00:00
Steven Edwards
a8e0023bb0 Gcc 3.x newline warning fix
svn path=/trunk/; revision=4301
2003-03-14 22:13:40 +00:00
Richard Campbell
f257940218 *** empty log message ***
svn path=/trunk/; revision=4300
2003-03-14 08:34:25 +00:00
Richard Campbell
2be2440055 IDEALLY this should look like NT4 windows to the pixel. Problem is the client area is off...anyone know how to fix it?
svn path=/trunk/; revision=4299
2003-03-14 07:24:35 +00:00
Richard Campbell
4fd70f50be Added some entries, changed some entries. This may or may not bug out windowing in ROS, haven't checked. Will check and fix as necessary next.
svn path=/trunk/; revision=4298
2003-03-13 20:02:36 +00:00
Eric Kohl
e4228315fc Replaced the current inf-parser by a robust state-machine parser. It is heavily based on Alexandre Julliard's setupapi inf-parser.
svn path=/trunk/; revision=4297
2003-03-13 17:58:52 +00:00
Eric Kohl
7e590b2656 Seperated inf- and ini-file routines. The inf-file routines look like the setupapi-routines.
Create 'Setup' key in the system hive.

svn path=/trunk/; revision=4296
2003-03-13 09:51:11 +00:00
Richard Campbell
19af3dbdde *** empty log message ***
svn path=/trunk/; revision=4295
2003-03-12 16:36:18 +00:00
Richard Campbell
593d22e757 A couple bugfixes
svn path=/trunk/; revision=4294
2003-03-12 16:27:32 +00:00
Richard Campbell
54fa81f819 Windows are activated when created. This is actually just a hack, they really are active, but I don't know how well this will work in a multi windowing environment.
svn path=/trunk/; revision=4293
2003-03-12 08:26:54 +00:00
Richard Campbell
b1839c1917 YAY for bug fixes!
svn path=/trunk/; revision=4292
2003-03-12 06:32:44 +00:00
Richard Campbell
77ca8d96bd More bugfixes
svn path=/trunk/; revision=4291
2003-03-12 06:02:59 +00:00
Richard Campbell
876c0e392b ditto
svn path=/trunk/; revision=4290
2003-03-12 05:40:46 +00:00
Richard Campbell
a09e66521a Small bugfix
svn path=/trunk/; revision=4289
2003-03-12 05:21:53 +00:00
Richard Campbell
adcf4970da Implemented MoveWindow()
svn path=/trunk/; revision=4288
2003-03-12 05:18:21 +00:00
Steven Edwards
3e669eed4d Added Demo for WM_ERASEBKGND
- Contributed by Damon Chandler Windows2000 Graphics API Backbook

svn path=/trunk/; revision=4287
2003-03-11 19:50:30 +00:00
Gé van Geldorp
ab42b89f19 Get mouse cursor working under VMware
svn path=/trunk/; revision=4286
2003-03-11 00:21:41 +00:00
Richard Campbell
aee47209b1 LOTs of changes, a few bug fixes, some code cleanup.
svn path=/trunk/; revision=4285
2003-03-11 00:18:54 +00:00
Jason Filby
5a4eded72e Updated Serial Mouse driver
svn path=/trunk/; revision=4284
2003-03-10 19:53:08 +00:00
Jason Filby
34d1c4a88a Removing old mouse driver
svn path=/trunk/; revision=4283
2003-03-10 19:44:40 +00:00
Richard Campbell
744b947f71 Defined DFC_POPUPMENU
svn path=/trunk/; revision=4282
2003-03-10 06:27:13 +00:00
Jason Filby
b0e9fcf187 Minor button fixes
svn path=/trunk/; revision=4281
2003-03-09 21:49:08 +00:00
Hartmut Birr
f92f7ff968 - Return TRUE on success in DrvAssertMode.
svn path=/trunk/; revision=4280
2003-03-09 21:44:24 +00:00
Hartmut Birr
b98522fd18 - Protected the access to the crtc registers (cursor position) with cli/sti.
svn path=/trunk/; revision=4279
2003-03-09 21:43:37 +00:00
Hartmut Birr
b7c7511503 - Added CsrDuplicateHandle.
svn path=/trunk/; revision=4278
2003-03-09 21:42:47 +00:00
Hartmut Birr
035e6fa830 - Added CsrCreateProcessData.
- Added CsrDuplicateHandle.

svn path=/trunk/; revision=4277
2003-03-09 21:41:35 +00:00
Hartmut Birr
718da6238e - Check for a valid process data pointer in some functions.
svn path=/trunk/; revision=4276
2003-03-09 21:41:00 +00:00
Hartmut Birr
2a8c933a65 - Check for a valid process data pointer in some functions.
- Fixed the length parameter for the title if the console is swapped.
- Fixed some tests in CsrpWriteConsole.
- Fixed some rectangle functions.
- Fixed some offset calculations for accessing the screen buffer.

svn path=/trunk/; revision=4275
2003-03-09 21:40:19 +00:00
Hartmut Birr
8716ed6781 - Fixed the return value in SearchPathW.
svn path=/trunk/; revision=4274
2003-03-09 21:39:17 +00:00
Hartmut Birr
1768a37e66 - Duplicate the error handle in CreateProcessW.
- Fixed the size parameter in calls to SearchPathW.

svn path=/trunk/; revision=4273
2003-03-09 21:38:40 +00:00
Hartmut Birr
59798c6f34 - Improved DuplicateHandle for console handles.
svn path=/trunk/; revision=4272
2003-03-09 21:37:57 +00:00
Hartmut Birr
bb63ba9048 - Implemented DuplicateConsoleHandle.
- Duplicate the error handle in AllocConsole.
- Opening 'CONIN$' for console access in GetConsoleTitleW, SetConsoleTitleW, SetConsoleTitleA.

svn path=/trunk/; revision=4271
2003-03-09 21:37:18 +00:00
Gé van Geldorp
95bceebe67 #include file moved
svn path=/trunk/; revision=4270
2003-03-09 19:34:14 +00:00
Jason Filby
2fb8899caa Refer to new ntddmou.h
svn path=/trunk/; revision=4269
2003-03-09 18:44:59 +00:00
Jason Filby
feda09e7a3 Calculation fix (from Tim Jobling)
svn path=/trunk/; revision=4268
2003-03-09 15:09:23 +00:00
Jason Filby
397c2118fd Calculation fix
svn path=/trunk/; revision=4267
2003-03-09 15:08:33 +00:00
Jason Filby
975ce25154 Improved mouse button handling
svn path=/trunk/; revision=4266
2003-03-09 15:00:51 +00:00
Eric Kohl
098af174b6 Start to fill-in the registry.
svn path=/trunk/; revision=4265
2003-03-08 19:29:09 +00:00
Eric Kohl
a130f0e169 Create binary system hive when usetup is running.
svn path=/trunk/; revision=4264
2003-03-08 19:26:12 +00:00
Gé van Geldorp
6fdd94516b - Fix DC/Bitmap handling
- Fix compiler warnings
- Silence some debug output

svn path=/trunk/; revision=4263
2003-03-08 13:16:52 +00:00
Gé van Geldorp
10283bad30 Remove DCE from linked list on destroy
svn path=/trunk/; revision=4261
2003-03-08 00:46:14 +00:00
Gé van Geldorp
4817869d83 Remove debugging statements
svn path=/trunk/; revision=4260
2003-03-08 00:45:04 +00:00
Richard Campbell
3548ecb7a4 Implemented MoveWindow and SetWindowPos, SetWindowPos is based on WinPosSetWindowPos, so now i need to investigate why it's not working :P.
svn path=/trunk/; revision=4259
2003-03-07 05:38:02 +00:00
Richard Campbell
cba82eeb5e More bug fixes, should behave alot like Windows NT now.
svn path=/trunk/; revision=4258
2003-03-07 04:50:42 +00:00
Gé van Geldorp
f0d0dc3adf Adjust to new position in rosapps build tree
svn path=/trunk/; revision=4257
2003-03-07 00:13:22 +00:00
Gé van Geldorp
ddf2e52b15 Switch back to the command prompt when you press the "X" Close button
svn path=/trunk/; revision=4256
2003-03-06 23:57:03 +00:00
Richard Campbell
18e402c803 *** empty log message ***
svn path=/trunk/; revision=4255
2003-03-06 21:46:19 +00:00
Richard Campbell
e924b6d06c Updated by TortoiseCVS
svn path=/trunk/; revision=4254
2003-03-06 21:45:23 +00:00
Richard Campbell
d2f53a79d8 Added WineMine
svn path=/trunk/; revision=4253
2003-03-06 21:13:17 +00:00
Richard Campbell
c8c6395488 Removed winemine from reactos core module
svn path=/trunk/; revision=4252
2003-03-06 21:10:51 +00:00
Gé van Geldorp
63d294b58a GetClientRect implementation by Tim Jobling
svn path=/trunk/; revision=4251
2003-03-06 21:03:49 +00:00
Richard Campbell
5d28d9704c Temp fix because LoadString isn't working properly.
svn path=/trunk/; revision=4250
2003-03-06 19:33:18 +00:00
Gé van Geldorp
e2ef77ef6c Copied from Wine with some adjustments for our build environment
svn path=/trunk/; revision=4249
2003-03-06 18:44:57 +00:00
Eric Kohl
f7e5711321 Implemented GetProcessAffinityMask() and SetProcessAffinityMask().
svn path=/trunk/; revision=4248
2003-03-06 15:05:29 +00:00
Eric Kohl
916b14c816 Implemented SignalObjectAndWait().
Added some checks for console handles.

svn path=/trunk/; revision=4247
2003-03-06 13:01:15 +00:00
Gé van Geldorp
bceffa7c9b Convert between RGBQUAD and COLORREF when creating a palette for a DIB
svn path=/trunk/; revision=4246
2003-03-06 00:57:44 +00:00
Gé van Geldorp
d339a04507 Silence some debug messages
svn path=/trunk/; revision=4245
2003-03-06 00:56:59 +00:00
Gé van Geldorp
85f75f7691 Conversion between bitfield and indexed no longer hardcoded
svn path=/trunk/; revision=4244
2003-03-06 00:56:40 +00:00
Eric Kohl
cb8b8e6c15 Implemented VerifyConsoleIoHandle().
svn path=/trunk/; revision=4243
2003-03-05 22:51:48 +00:00
Richard Campbell
7f5d1e97f4 Implemented MoveWindow, won't work until SetWindowPos is fixed.
svn path=/trunk/; revision=4242
2003-03-04 22:34:48 +00:00
Eric Kohl
088b5e86e8 Added code to handle 'Ontrack Disk Manager' harddisks. (Untested!)
svn path=/trunk/; revision=4241
2003-03-04 21:58:05 +00:00
Richard Campbell
481eddb6df Minor fix
svn path=/trunk/; revision=4240
2003-03-04 13:19:01 +00:00
Gé van Geldorp
57b8529cb5 Remove some debug #if's
svn path=/trunk/; revision=4239
2003-03-04 10:39:41 +00:00
Gé van Geldorp
31e559fb73 - Add support for 8-bit and 32-bit displays
- Precompute DIB routines
- Fix some compiler warnings

svn path=/trunk/; revision=4238
2003-03-04 10:09:01 +00:00
Richard Campbell
4ea32f911a Added OBM_CLOSE
svn path=/trunk/; revision=4237
2003-03-04 01:23:37 +00:00
Richard Campbell
8d7b189b73 Removed unused resources.
svn path=/trunk/; revision=4236
2003-03-04 01:10:30 +00:00
Richard Campbell
e67fee744a Implemented GetWindowDC()
svn path=/trunk/; revision=4235
2003-03-04 00:40:37 +00:00
Richard Campbell
8abf7a676f Temp fix
svn path=/trunk/; revision=4234
2003-03-03 19:51:31 +00:00
Richard Campbell
c6e059cb67 Added GWL_ID to NtUserGetWindowLong. Not implemented yet. Just there to prevent the debug printfs.
svn path=/trunk/; revision=4233
2003-03-03 18:57:26 +00:00
Gé van Geldorp
1b48f7d941 Get MS 16 color driver to work under Bochs
svn path=/trunk/; revision=4232
2003-03-03 00:17:24 +00:00
Richard Campbell
31ed89a07f Lots of bug fixes
svn path=/trunk/; revision=4231
2003-03-02 16:30:07 +00:00
Gé van Geldorp
0dcf21545b Fixed some compiler warnings
svn path=/trunk/; revision=4230
2003-03-02 12:07:28 +00:00
Gé van Geldorp
1b1e741e1b Fixed several off-by-one errors and some compiler warnings
svn path=/trunk/; revision=4229
2003-03-02 12:04:00 +00:00
Gé van Geldorp
8690cad211 Fix boot problems and make it work under VMware
svn path=/trunk/; revision=4228
2003-03-02 10:53:38 +00:00
Marty Dill
ad0f593f37 Bumped CSRSS_MAX_TITLE_LENGTH up to 80.
svn path=/trunk/; revision=4227
2003-03-02 01:25:45 +00:00
Marty Dill
15f7619166 Minor fixes to CsrGetTitle and Console_Api to get titles working properly.
svn path=/trunk/; revision=4226
2003-03-02 01:24:37 +00:00
Marty Dill
20a78cdf13 Fixed up Get/SetConsoleTitleAW().
svn path=/trunk/; revision=4225
2003-03-02 01:23:19 +00:00
Richard Campbell
cb819643dd Some bug fixes.
svn path=/trunk/; revision=4224
2003-03-01 20:39:16 +00:00
Richard Campbell
2d631fae3f Changed timmons to helmet, but this should be loaded from the registry.
svn path=/trunk/; revision=4223
2003-03-01 09:05:34 +00:00
Richard Campbell
348b71b4a6 Small bug fix
svn path=/trunk/; revision=4222
2003-03-01 09:01:51 +00:00
Richard Campbell
c8274bd166 Now uses DrawFrameControl to draw controls, still MANY bugs but I'm slowly getting there.
svn path=/trunk/; revision=4221
2003-03-01 08:56:34 +00:00
Richard Campbell
424f2d1c24 Fixed DrawFrameControl Somewhat
svn path=/trunk/; revision=4220
2003-03-01 06:05:36 +00:00
Eric Kohl
87364d1ef4 Fixed wrong MBR declaration.
svn path=/trunk/; revision=4219
2003-03-01 00:00:32 +00:00
Richard Campbell
95cee3fcfb Remove OBM_CLOSED
svn path=/trunk/; revision=4218
2003-02-28 23:22:18 +00:00
Richard Campbell
23d3f40462 oops.
svn path=/trunk/; revision=4217
2003-02-28 23:20:41 +00:00
Richard Campbell
107f4e64ce ditto.
svn path=/trunk/; revision=4216
2003-02-28 23:19:32 +00:00
Richard Campbell
93549aa9d8 Removed unused OBM_CLOSED resource. Part of a fix coming soon.
svn path=/trunk/; revision=4215
2003-02-28 23:18:11 +00:00
Richard Campbell
a526796893 Use DrawEdge for drawing windows.
svn path=/trunk/; revision=4214
2003-02-28 22:59:30 +00:00
Gé van Geldorp
343857f12a Replace direct calls to "make" with $(MAKE)
svn path=/trunk/; revision=4213
2003-02-28 22:51:17 +00:00
Eric Kohl
0390d46de9 Fixed [Nt/Zw]QuerySecurityObject() prototype.
svn path=/trunk/; revision=4212
2003-02-27 22:49:06 +00:00
Eric Kohl
4b23fcb6ce Fixed string lengths in calls to ZwSetValueKey() to include terminating zero character.
svn path=/trunk/; revision=4211
2003-02-27 20:32:31 +00:00
Eric Kohl
9a9d96086b Terminate service name string.
svn path=/trunk/; revision=4210
2003-02-27 20:29:55 +00:00
Gé van Geldorp
e024154763 Cleanup
svn path=/trunk/; revision=4209
2003-02-27 16:34:15 +00:00
Gunnar Dalsnes
0acc0f3aa9 Non expired timer wasn't dequeued/canceled before freed
svn path=/trunk/; revision=4208
2003-02-27 15:41:54 +00:00
Gunnar Dalsnes
d295bac408 WaitForMultipleObjectsEx passed WaitAny for WaitAll waits and vice versa
svn path=/trunk/; revision=4207
2003-02-27 15:40:46 +00:00
Gunnar Dalsnes
dd41cf2e27 corrected prototype
svn path=/trunk/; revision=4206
2003-02-27 15:39:10 +00:00
Gunnar Dalsnes
5852f3f492 WaitForMultipleObjects: WaitAll waits were buggy
Many small fixes and cleanups

svn path=/trunk/; revision=4205
2003-02-27 15:38:36 +00:00
Eric Kohl
3013b90260 Fixed compiler warings.
svn path=/trunk/; revision=4204
2003-02-27 14:42:43 +00:00
Eric Kohl
9321cd1e2c Do not expand command lines automatically. This fixes 'objdir \??'.
svn path=/trunk/; revision=4203
2003-02-27 14:40:31 +00:00
Gé van Geldorp
74a0e47a7c Queue GDI callback in CriticalWorkQueue to improve mouse smoothness
under Bochs

svn path=/trunk/; revision=4202
2003-02-26 22:29:28 +00:00
Eric Kohl
dcd495dbe5 Detect disk manager software.
svn path=/trunk/; revision=4201
2003-02-26 16:25:40 +00:00
Eric Kohl
64e0e82479 Fixed some hal dispatch table issues.
Improved HalExamineMBR() to detect disk managers.

svn path=/trunk/; revision=4200
2003-02-26 14:14:47 +00:00
Gé van Geldorp
991196c35e - Move GDI drivers and win32k.sys from system32\drivers to system32
- Load GDI driver from registry key
- Clean up hacks in videoprt (borrowed some code from scsiport)
- Support for MS VGA driver under VMware, doesn't work yet under Bochs

svn path=/trunk/; revision=4199
2003-02-25 23:08:54 +00:00
Eric Kohl
31f87c95ae * Moved symbolic link implementation to the object manager.
* Free target string when the link object is deleted.
* Create a type object for symbolic links.
* Use different security descriptors for protected and unprotected symbolic links.

svn path=/trunk/; revision=4198
2003-02-25 16:50:46 +00:00
Eric Kohl
97049b595e no message
svn path=/trunk/; revision=4197
2003-02-25 16:43:45 +00:00
Eric Kohl
a4dd288c42 Implemented ExIsProcessorFeaturePresent().
svn path=/trunk/; revision=4196
2003-02-25 00:25:07 +00:00
Hartmut Birr
0c1e5baf17 - Improved CloseConsoleHandle.
svn path=/trunk/; revision=4195
2003-02-24 23:24:55 +00:00
Hartmut Birr
471aaa7f5e - Added oppening of console handles (CreateFileW).
svn path=/trunk/; revision=4194
2003-02-24 23:23:32 +00:00
Hartmut Birr
0d292546b8 - Implemented CsrGetInputHandle, CsrGetOutputHandle and CsrCloseHandle.
svn path=/trunk/; revision=4193
2003-02-24 23:20:16 +00:00
Hartmut Birr
3432e6048e - Fixed a dead look in CsrFlushInputBuffer.
svn path=/trunk/; revision=4192
2003-02-24 23:17:32 +00:00
Hartmut Birr
ef47860772 - Fixed a bug within the parameter check.
- Improved speed.

svn path=/trunk/; revision=4191
2003-02-24 23:16:13 +00:00
Hartmut Birr
0b69830fa0 - Removed allocation of nonpaged pool memory for event objects.
- Fixed a dead look while fsd's are loading with the fs recognizer (in IoMountVolume).

svn path=/trunk/; revision=4190
2003-02-24 23:14:05 +00:00
Steven Edwards
b70c013718 Fix by Hartmut Birr
Csrss inserts a '\n' after '\r' in the event queue. This extra event must be removed in
CsrReadInputEvent.

svn path=/trunk/; revision=4189
2003-02-24 21:58:46 +00:00
Jason Filby
e0fbe100b8 New and delete operators
svn path=/trunk/; revision=4188
2003-02-21 21:50:04 +00:00
Robert Dickenson
95cb8daf2a corrected parameter type for towupper.
svn path=/trunk/; revision=4187
2003-02-21 16:32:57 +00:00
Robert Dickenson
7c50d54d90 minor cleanup.
svn path=/trunk/; revision=4186
2003-02-21 16:30:05 +00:00
Robert Dickenson
2375f4f3f4 removed taskmgr from default target list since it requires c++.
svn path=/trunk/; revision=4185
2003-02-21 16:24:35 +00:00
Robert Dickenson
562b3cf13b getting some mods from a while ago sync'd.
svn path=/trunk/; revision=4184
2003-02-21 16:23:11 +00:00
Robert Dickenson
c3ff43d969 minor updates to try and find some debug output from the wine libs.
svn path=/trunk/; revision=4183
2003-02-21 14:47:34 +00:00
Robert Dickenson
9f3fb17e6e minor mod to main header to attempt to fix mingw version problem.
svn path=/trunk/; revision=4182
2003-02-21 14:04:55 +00:00
Robert Dickenson
a3e2ea980a minor update to sync my tree.
svn path=/trunk/; revision=4181
2003-02-20 15:07:37 +00:00
Marty Dill
b556b6e5a6 Richard Campbell's Win9x/NT4/5 window style patch.
svn path=/trunk/; revision=4180
2003-02-19 22:44:57 +00:00
Jason Filby
331ea2e7ba Updated close graphic
svn path=/trunk/; revision=4179
2003-02-19 20:34:31 +00:00
Eric Kohl
8fb7776793 Started implementing a hive check (still disabled).
svn path=/trunk/; revision=4178
2003-02-19 17:24:20 +00:00
Gé van Geldorp
7380b03af6 Don't pass (unused) DeviceHandle into ObCreateObject, that causes the
HandleCount to be unnecessarily incremented.

svn path=/trunk/; revision=4177
2003-02-19 00:05:07 +00:00
Casper Hornstrup
e35969fcc7 2003-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/cc/view.c (CcRosFlushDirtyPages): Treat a write attempt with
	a return value of STATUS_END_OF_FILE as a successful write.
	* ntoskrnl/cc/copy.c (WriteCacheSegment): Ditto.

svn path=/trunk/; revision=4176
2003-02-18 22:06:53 +00:00
Casper Hornstrup
05a7ea2883 2003-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/cm/regfile.c (CmiRemoveSubKey): Kill warnings.
	(CmiMergeFree): Ditto.

svn path=/trunk/; revision=4175
2003-02-18 21:30:08 +00:00
Eric Kohl
d4830ae787 Use a 5-step transaction to update hive and log file.
svn path=/trunk/; revision=4174
2003-02-18 17:02:49 +00:00
Eric Kohl
9728fb6d1c Tiny update, fixes some output annoyances.
svn path=/trunk/; revision=4173
2003-02-18 17:01:10 +00:00
Gé van Geldorp
40160296f7 Implemented VideoPortGetAccessRanges
svn path=/trunk/; revision=4172
2003-02-17 21:24:42 +00:00
Gé van Geldorp
7e66e6636b Implemented HalpAssignPciSlotResources
svn path=/trunk/; revision=4171
2003-02-17 21:24:13 +00:00
Gé van Geldorp
5a0ca2a384 Bring types of memory to allocate (PagedPool etc.) constants inline with
MS DDK for binary compatibility of drivers

svn path=/trunk/; revision=4170
2003-02-17 21:22:49 +00:00
Gé van Geldorp
cef6fb49d1 FreeLdr tries to load "Start"=dword:00000000 entries, remove vmx_svga
service for the moment

svn path=/trunk/; revision=4169
2003-02-17 21:19:16 +00:00
Jason Filby
969ec4afc2 Minor fixes
svn path=/trunk/; revision=4168
2003-02-17 21:03:52 +00:00
Jason Filby
f3ad138b6b Improvements by Royce Mitchell III
svn path=/trunk/; revision=4167
2003-02-17 19:48:27 +00:00
Eric Kohl
acea065ea0 Write log file header, block bitmap and dirty blocks.
svn path=/trunk/; revision=4166
2003-02-17 19:15:41 +00:00
Eric Kohl
32bef2128d Fixed a compiler warning.
svn path=/trunk/; revision=4165
2003-02-17 16:30:17 +00:00
Eric Kohl
d38b07d910 Added errcodes.rc.
svn path=/trunk/; revision=4164
2003-02-17 16:29:11 +00:00
Eric Kohl
9f61985794 Replaced kernel32 heap functions by ntdll heap functions.
svn path=/trunk/; revision=4163
2003-02-17 16:27:31 +00:00
Hartmut Birr
bf6c33299c - Set the last error if SearchPathW fails.
svn path=/trunk/; revision=4162
2003-02-16 18:56:04 +00:00
Hartmut Birr
77e9bdc898 - Added iswspace.
svn path=/trunk/; revision=4161
2003-02-16 18:54:26 +00:00
Hartmut Birr
7644e39b2c - errcodes.rc and msg00409.bin are build by the makefile.
svn path=/trunk/; revision=4160
2003-02-16 18:52:31 +00:00
Hartmut Birr
7aa65c578d - Add a rule to build errcodes.rc.
svn path=/trunk/; revision=4159
2003-02-16 18:47:41 +00:00
Eric Kohl
b4f988014e Changed vidport to videoprt.
svn path=/trunk/; revision=4158
2003-02-16 00:46:37 +00:00
Eric Kohl
491e42c760 Added missing Acl and SD functions from ntdll.
svn path=/trunk/; revision=4157
2003-02-15 22:29:45 +00:00
Eric Kohl
0c2028b391 Added missing Acl and SD functions from ntdll.
svn path=/trunk/; revision=4156
2003-02-15 21:07:49 +00:00
Phillip Susi
da676ec715 Converted a few stray unix linefeeds to dos
svn path=/trunk/; revision=4155
2003-02-15 20:25:03 +00:00
Gé van Geldorp
7ff8369044 Support for VMware video drivers (oops, forgot this one)
svn path=/trunk/; revision=4154
2003-02-15 19:51:27 +00:00
Gé van Geldorp
7f3777d9ad Moved to drivers\dd\videoprt
svn path=/trunk/; revision=4153
2003-02-15 19:25:12 +00:00
Gé van Geldorp
e942503f49 Support for VMware video driver
svn path=/trunk/; revision=4152
2003-02-15 19:21:31 +00:00
Gé van Geldorp
aaa7b9a682 Support for VMware video drivers
svn path=/trunk/; revision=4151
2003-02-15 19:16:34 +00:00
Eric Kohl
d9dc30e0aa * Implemented/fixed NtSetSecurityObject() and NtQuerySecurityObject().
* Updated object security method.
* Added security method for key objects.
* NtDeleteKey() deletes existing values but no subkeys.
* Calculate hive header checksum and increment hive update counters.

svn path=/trunk/; revision=4150
2003-02-15 18:46:28 +00:00
Eric Kohl
e028c60886 Calculate hive header checksum.
Use update counters for hive flushing.
Invalidate more than one block if a cell crosses block boundaries.

svn path=/trunk/; revision=4149
2003-02-14 23:01:06 +00:00
Eric Kohl
e8f191a72e Replaced filesystem list spinlock by an executive resource.
svn path=/trunk/; revision=4148
2003-02-14 22:54:38 +00:00
Eric Kohl
75e27edb71 Fixed declarations.
svn path=/trunk/; revision=4147
2003-02-14 17:52:31 +00:00
Eric Kohl
458223c320 New bins should be flushed properly.
Prepared log file support.

svn path=/trunk/; revision=4146
2003-02-14 17:48:54 +00:00
Hartmut Birr
1c043c1647 - Ntoskrnl uses for all access to internal structures the SectionObjectPointers from file object.
- The bcb field is removed from the REACTOS_COMMON_FCB_HEADER structure.
- FSD's store the pointer to the fcb in FsContext from file object. There is no pointer from ccb to the fcb.

svn path=/trunk/; revision=4145
2003-02-13 22:24:19 +00:00
Eric Kohl
44e85c2846 Implemented merging of free blocks.
svn path=/trunk/; revision=4144
2003-02-13 13:59:57 +00:00
Eric Kohl
493e797fa0 Added hive synchronization to value-related registry functions.
svn path=/trunk/; revision=4143
2003-02-12 19:00:23 +00:00
Eric Kohl
bd0f683f94 Added value delete and enumerate tests.
svn path=/trunk/; revision=4142
2003-02-12 18:56:49 +00:00
Eric Kohl
9895df9741 Implemented IsProcessorFeaturePresent().
svn path=/trunk/; revision=4141
2003-02-12 03:44:20 +00:00
KJK::Hyperion
15d50c5fcd * include/defines.h: defined INVALID_FILE_SIZE
* include/ntos/rtl.h: fixed typo
 * lib/kernel32/file/file.c: fixed GetCompressedFileSizeW
 * lib/kernel32/misc/comm.c: implemented BuildCommDCB and BuildCommDCBAndTimeouts
 * lib/kernel32/misc/handle.c: fixed SetHandleInformation
 * lib/kernel32/misc/time.c: fixed FileTimeToSystemTime
 * lib/kernel32/misc/dllmain.c: shut up a warning
 * lib/kernel32/misc/env.c: ditto
 * lib/kernel32/misc/ldr.c: ditto

svn path=/trunk/; revision=4140
2003-02-12 00:39:31 +00:00
Eric Kohl
c9f5e072dc Added two 'create value' tests.
svn path=/trunk/; revision=4139
2003-02-11 23:47:04 +00:00
Gé van Geldorp
ef9c7cc11f Font facename is stored in LOGFONTW itself (like in LOGFONT)
svn path=/trunk/; revision=4138
2003-02-11 23:35:23 +00:00
Gé van Geldorp
ffb96febaf Match STYPE_* definitions to DDK values
svn path=/trunk/; revision=4137
2003-02-11 00:16:40 +00:00
KJK::Hyperion
d470f18cfb sorry Casper, I have to insist: OSVERSIONINFOEX *derives* from OSVERSIONINFO. It's not just a matter of field names and types, it's a type-checking issue. At least for C++, it has to be inheritance. For C, it's temporarily commented out, until there's a macro to specify if the compiler supports unnamed structure members
svn path=/trunk/; revision=4136
2003-02-10 23:18:41 +00:00
Casper Hornstrup
1e6fba5a39 2003-02-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/structs.h (OSVERSIONINFOEXA): Expand definition of
	OSVERSIONINFOA.
	(OSVERSIONINFOEXW): Expand definition of OSVERSIONINFOW.
	* lib/msafd/misc/helpers.c (LocateHelperDLL): Cast AddressFamily,
	SocketType, and Protocol to INT.
	* lib/ws2_32/misc/catalog.c (LocateProvider): Ditto.

svn path=/trunk/; revision=4135
2003-02-10 21:29:41 +00:00
Eric Kohl
848ea5c2e0 Use ERESOURCE instead of spinlock to protect the hive list.
Use worker thread to run hive flush routine at dispatch level.
 - Changes by Hartmut Birr!

Delete a key's hash block when the key is deleted.
Update pointers and offsets in a key object when the key cell is deleted.

svn path=/trunk/; revision=4134
2003-02-10 21:24:45 +00:00
Eric Kohl
0430d6bf60 Fixed a typo.
svn path=/trunk/; revision=4133
2003-02-10 21:17:37 +00:00
Eric Kohl
51806a9cd8 Defined HTCLOSE. Patch by Richard Campbell.
svn path=/trunk/; revision=4132
2003-02-10 15:22:23 +00:00
KJK::Hyperion
bc3ba178e3 New utility tickcount: displays the kernel tick count in human readable format. Sample output:
3 days, 11 hours, 13 minutes, 27 seconds and 943 milliseconds

svn path=/trunk/; revision=4131
2003-02-09 21:17:21 +00:00
KJK::Hyperion
38078e6603 Some more fixes to tchar.h
svn path=/trunk/; revision=4130
2003-02-09 21:15:29 +00:00
Eric Kohl
8ce89c167c Simplified key deletion.
Added workaround to prevent BSOD on missing hives.

svn path=/trunk/; revision=4129
2003-02-09 19:55:40 +00:00
Eric Kohl
cc025a380a Disabled unimplemented tests
svn path=/trunk/; revision=4128
2003-02-09 19:11:51 +00:00
Eric Kohl
2c649ff694 Install hivetest.
svn path=/trunk/; revision=4127
2003-02-09 18:28:16 +00:00
Eric Kohl
e1bae36982 Added hivetest (modified regtest).
Replaced direct calls to make by $(MAKE).

svn path=/trunk/; revision=4126
2003-02-09 18:27:29 +00:00
Eric Kohl
4363c6ef6f Added hivetest (modified regtest).
svn path=/trunk/; revision=4125
2003-02-09 18:26:36 +00:00
Hartmut Birr
ee641bec75 Removed the fix for flushing modified cache segments in NtShutdownSystem.
svn path=/trunk/; revision=4124
2003-02-09 18:04:54 +00:00
Hartmut Birr
965149e8db Implemented IRP_MJ_FLUSH_BUFFERS.
Added cache flushing at shutdown.

svn path=/trunk/; revision=4123
2003-02-09 18:02:56 +00:00
Eric Kohl
8a23cc7a5b Added hive flushing.
- Only keys are supported (create / delete).
- No log-file support yet.
- Still a little buggy.

svn path=/trunk/; revision=4122
2003-02-09 11:57:14 +00:00
Nedko Arnaudov
652669005d Uncommented dependency file generating rule.
$(EXE_POSTFIX) use instead of ".exe".

svn path=/trunk/; revision=4121
2003-02-09 02:18:10 +00:00
Nedko Arnaudov
747e565cb0 Reference to web site at geocities removed (site is dropped).
svn path=/trunk/; revision=4120
2003-02-09 02:15:23 +00:00
Nedko Arnaudov
3cf6c316e7 Some minor documentation at last.
svn path=/trunk/; revision=4119
2003-02-09 02:13:27 +00:00
Eric Kohl
541a44a00e Fixed a bug in RtlFindSetBits().
svn path=/trunk/; revision=4118
2003-02-08 20:59:50 +00:00
Eric Kohl
0be3b55ba5 Copy file dates of source file too.
Get default install directory from txtsetup.sif.

svn path=/trunk/; revision=4116
2003-02-08 00:19:32 +00:00
Nedko Arnaudov
3fad983cf2 *** empty log message ***
svn path=/trunk/; revision=4115
2003-02-05 03:18:57 +00:00
KJK::Hyperion
325856dad9 Small fix to tchar.h
svn path=/trunk/; revision=4114
2003-02-04 01:13:26 +00:00
Gé van Geldorp
38535d7610 Fix by Royce3 to make _tolower() and _toupper() behave like their
MS counterparts

svn path=/trunk/; revision=4113
2003-02-03 17:05:19 +00:00
Gé van Geldorp
0f7e47f8bd Fix by Royce3
svn path=/trunk/; revision=4112
2003-02-03 16:59:27 +00:00
Eric Kohl
a9b14e9d16 Implemented CancelIo() and SetThreadIdealProcessor().
svn path=/trunk/; revision=4111
2003-02-03 14:20:24 +00:00
Gé van Geldorp
5bd96088c4 Set page protection for images having section alignment < page size
svn path=/trunk/; revision=4110
2003-02-03 11:52:46 +00:00
Gé van Geldorp
f5f297382d Set lpcbData (data length) correctly
svn path=/trunk/; revision=4109
2003-02-02 22:40:36 +00:00
Gé van Geldorp
45ce03c95f Make starting of SERVICES.EXE dependent on registry key
svn path=/trunk/; revision=4108
2003-02-02 22:38:54 +00:00
KJK::Hyperion
dc2da3fbac Cleaning up victims of stricter warning checking...
svn path=/trunk/; revision=4107
2003-02-02 19:27:17 +00:00
KJK::Hyperion
a9d96a9cfc Finally solved some advapi32 nonsense:
- advapi32 doesn't import any more from itself
 - smarter stubbing (look at the files modified in this commit)

svn path=/trunk/; revision=4106
2003-02-02 19:24:44 +00:00
KJK::Hyperion
2eabc8e38d Various makefile fixes:
- don't link crt0 and msvcrt by default into system DLLs
 - strict warning checking: all warnings displayed, and treated as errors

svn path=/trunk/; revision=4105
2003-02-02 19:24:16 +00:00
KJK::Hyperion
ec3fc77a5f Don't link crt0 and msvcrt into system DLLs
svn path=/trunk/; revision=4104
2003-02-02 17:36:16 +00:00
KJK::Hyperion
29981bcab8 Reimplemented LoadStringA
Implemented LoadStringW

svn path=/trunk/; revision=4103
2003-02-02 17:35:30 +00:00
Eric Kohl
670b6c8678 Fixed compiler warnings.
svn path=/trunk/; revision=4102
2003-02-02 17:21:06 +00:00
Eric Kohl
ffebe8dee1 Implemented QueryPerformanceCounter() and QueryPerformanceFrequency().
svn path=/trunk/; revision=4101
2003-02-02 16:57:49 +00:00
Eric Kohl
74bc05988d Implemented NtQueryPerformanceCounter().
svn path=/trunk/; revision=4100
2003-02-02 16:55:56 +00:00
Hartmut Birr
f979d1b237 Check the length of the gap if this starts at the begin or end of the area in MmFindGap.
svn path=/trunk/; revision=4099
2003-02-02 08:55:51 +00:00
Hartmut Birr
f0fd058aef Fixed a call to ZwFreeVirtualMemory.
svn path=/trunk/; revision=4098
2003-02-02 08:53:32 +00:00
KJK::Hyperion
26c473a88d OSVERSIONINFO and OSVERSIONINFOEX properly declared
Corrected some PEB fields

svn path=/trunk/; revision=4096
2003-02-01 20:00:26 +00:00
KJK::Hyperion
035dcd8224 GetVersion, GetVersionExA and GetVersionExW reimplemented correctly (almost)
svn path=/trunk/; revision=4095
2003-02-01 19:58:17 +00:00
Jason Filby
c2e49604ca ReactOS 0.1.0
svn path=/trunk/; revision=4093
2003-02-01 15:34:35 +00:00
Hartmut Birr
f6e1dcfb06 Fixed a wrong DPRINT.
svn path=/trunk/; revision=4091
2003-01-31 21:49:11 +00:00
Eric Kohl
ef148f5d2b Renamed misleading 'BootBackupSector' to 'FsInfoSector'.
svn path=/trunk/; revision=4089
2003-01-31 15:55:18 +00:00
Brian Palmer
8ae622059e Updated freeldr.ini to work with latest .ini file changes.
svn path=/trunk/; revision=4088
2003-01-31 02:44:32 +00:00
Eric Kohl
6c8aa0f44c Added write cache flushing (untested).
svn path=/trunk/; revision=4087
2003-01-30 22:09:15 +00:00
Hartmut Birr
ec65b164ca Increase the write back count in CcRosFlushDirtyPages
according to the dirty page count from cache manager.

svn path=/trunk/; revision=4086
2003-01-30 18:30:53 +00:00
Hartmut Birr
945450876a Write back dirty pages from cache manager at shutdown.
svn path=/trunk/; revision=4085
2003-01-30 18:28:10 +00:00
Eric Kohl
79baa4d74c Added more install files. Patch by Hartmut Birr.
svn path=/trunk/; revision=4084
2003-01-30 17:38:30 +00:00
Eric Kohl
14f750504e Distinguish between ini-files and inf/sif-files. Patch by Hartmut Birr.
svn path=/trunk/; revision=4083
2003-01-30 17:37:13 +00:00
Eric Kohl
155e4760a8 Added some more files to the boot-cd.
Fixed bug in txtsetup.sif.

svn path=/trunk/; revision=4082
2003-01-30 14:45:51 +00:00
Eric Kohl
6002d83db8 - Added error messages
- Added support for multiple installations

Please wait until the Disk-LED stopps flashing or your installation will be corrupted. :-/

svn path=/trunk/; revision=4081
2003-01-30 14:41:45 +00:00
Hartmut Birr
40e995eed2 -Using DataBuffer and DataTransferLength from DeviceExtension on read/write requests.
-Check if there is a device attached to the ide channel in AtapiFindDevice.

svn path=/trunk/; revision=4080
2003-01-28 17:34:20 +00:00
Hartmut Birr
596dfc3682 -Do not modify the buffer and length field within the srb for read/write retries.
svn path=/trunk/; revision=4079
2003-01-28 17:33:18 +00:00
Eric Kohl
4263b27dfb Added bootsector installation and boot.ini manipulation.
svn path=/trunk/; revision=4078
2003-01-28 17:29:22 +00:00
Hartmut Birr
3c193e4b74 - Check the returned status after calls to NextCluster/OffsetToCluster
to detect a full disk.
- Call NextCluster with the correct parameters (FirstCluster/NextCluster).
- If the size for a file would be reduced, free first the cache segments
  and as second the clusters within the fat.

svn path=/trunk/; revision=4077
2003-01-28 16:48:03 +00:00
Robert Dickenson
9cac22fb79 minor update.
svn path=/trunk/; revision=4076
2003-01-27 15:12:12 +00:00
Robert Dickenson
6c08d81780 backdoor macro fixed.
svn path=/trunk/; revision=4075
2003-01-27 14:49:18 +00:00
Eugene Ingerman
2e3e5c7bd3 Implemented a couple of stubbed functions. Added several pointer checks.
svn path=/trunk/; revision=4074
2003-01-25 23:09:40 +00:00
Eugene Ingerman
6a14e674e4 Minor bug fix.
svn path=/trunk/; revision=4073
2003-01-25 23:06:32 +00:00
Eugene Ingerman
9715d6594d Minor changes to palette code.
svn path=/trunk/; revision=4072
2003-01-25 23:01:24 +00:00
Eugene Ingerman
d4e882e816 Fixed save/restore screen area bug. This bug showed up as a black rectangle on the vertical scrollbar in winhello test.
svn path=/trunk/; revision=4071
2003-01-25 22:53:12 +00:00
Hartmut Birr
4bf9e37598 -Added some file locking improvements.
svn path=/trunk/; revision=4070
2003-01-25 18:53:27 +00:00
Hartmut Birr
eb70f5ed97 - Reverted my latest changes to fix the handling of errors/retries.
- Set the correct data buffer on retries.

svn path=/trunk/; revision=4069
2003-01-25 16:19:06 +00:00
Hartmut Birr
1c7ac901e2 -IoCallDriver didn't set DeviceObject member in next stack location.
-IofCompleteRequest: fixed broken completion routine handling
(Thanks to Gunnar Andr� Dalsnes)

svn path=/trunk/; revision=4068
2003-01-25 16:16:54 +00:00
Hartmut Birr
5d6425550e -IoCancelIrp fixed/improved (Thanks to Gunnar Andr� Dalsnes).
svn path=/trunk/; revision=4067
2003-01-25 16:15:33 +00:00
Hartmut Birr
8b9d426c26 -Added some irp stack macros (IoSetPreviousIrpStackLocation, IoGetPreviousIrpStackLocation, IoRetardIrpStackLocation). (Thanks to Gunnar Andr� Dalsnes)
svn path=/trunk/; revision=4066
2003-01-25 16:01:49 +00:00
Hartmut Birr
4b68ac00e4 -Implemented vfat file locking. (Thanks to Gunnar Andr� Dalsnes)
svn path=/trunk/; revision=4065
2003-01-25 15:55:08 +00:00
Hartmut Birr
ca34b94db6 -Added some file locking improvements. (Thanks to Gunnar Andr� Dalsnes)
svn path=/trunk/; revision=4064
2003-01-25 15:52:43 +00:00
Hartmut Birr
1fb967f911 -Added file locking test application. (Thanks to Gunnar Andr� Dalsnes)
svn path=/trunk/; revision=4063
2003-01-25 15:46:52 +00:00
Eugene Ingerman
2f26431f71 Fixed: locking GDI objects twice when running wm_paint test.
svn path=/trunk/; revision=4062
2003-01-24 23:25:34 +00:00
Jason Filby
4b0f9d9631 Scrollbar improvements
svn path=/trunk/; revision=4061
2003-01-24 22:42:15 +00:00
Steven Edwards
d3190c9220 Turned off SEH in test
svn path=/trunk/; revision=4060
2003-01-24 19:48:13 +00:00
Steven Edwards
8dc97ce4a4 Added WM_PAINT test from the Windows2000 graphics API blackbook,
used with permission of author under public domain license.

svn path=/trunk/; revision=4059
2003-01-24 19:45:57 +00:00
Eric Kohl
d51c4061d7 Fixed size of BootBackup in the FAT32 bootsector.
svn path=/trunk/; revision=4058
2003-01-24 13:42:43 +00:00
Eric Kohl
1ce736a133 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. :-/

svn path=/trunk/; revision=4057
2003-01-24 11:25:56 +00:00
Eugene Ingerman
9a5403580f Fixed a shameful bug. Color translation should work now.
svn path=/trunk/; revision=4056
2003-01-24 09:11:03 +00:00
Gé van Geldorp
fe5caa6437 Retrieve startup shell from registry
svn path=/trunk/; revision=4055
2003-01-23 00:16:47 +00:00
Gé van Geldorp
cd5b2167bd Make cmd.exe usable as startup shell
svn path=/trunk/; revision=4054
2003-01-23 00:15:10 +00:00
Steven Edwards
24ed00435b Added more stubbs for bochs
svn path=/trunk/; revision=4053
2003-01-22 17:52:14 +00:00
Eric Kohl
834dbc5fd5 Fixed some warnings.
Added missing stubs.
Implemented GetThreadPriotityBoost() and SetThreadPriorityBoost().

svn path=/trunk/; revision=4052
2003-01-22 02:24:36 +00:00
Robert Dickenson
1eac255e7c Changed define _OLE2NLS_IN_BUILD_ to reactivate various stubs including GetACP.
svn path=/trunk/; revision=4050
2003-01-21 20:50:51 +00:00
Gé van Geldorp
382a976b49 Use fclose() on FILE* object
svn path=/trunk/; revision=4049
2003-01-21 17:56:10 +00:00
Eric Kohl
e1cf009871 Changes in v1.8.1 (1/20/2003) (ekohl)
- Fixed the ISO filesystem detection code.
- Removed IsSetupLdr.

svn path=/trunk/; revision=4047
2003-01-20 18:39:53 +00:00
Eric Kohl
3960f23e28 Copy second sector of the fat32 bootsector instead of the fat(12/16) bootsector.
Fixed several compiler warnings.

svn path=/trunk/; revision=4046
2003-01-19 17:01:38 +00:00
Hartmut Birr
ac0965daf7 Added special handling for shift value 32.
svn path=/trunk/; revision=4045
2003-01-19 01:49:10 +00:00
Hartmut Birr
25f4f4f91c Attache the process if we are running in the context of an other process (in KdbFreeSymbols).
svn path=/trunk/; revision=4044
2003-01-19 01:46:33 +00:00
Gé van Geldorp
14fc3556c8 Silence some debug messages
svn path=/trunk/; revision=4043
2003-01-19 01:13:04 +00:00
Eugene Ingerman
15128f6053 Removed debug output.
svn path=/trunk/; revision=4042
2003-01-19 01:07:46 +00:00
Gé van Geldorp
31036dbb90 Honour FILE_OVERWRITE and FILE_OVERWRITE_IF (truncate existing file)
svn path=/trunk/; revision=4041
2003-01-19 01:06:45 +00:00
Gé van Geldorp
96fdaea58f Fix truncation to 0 bytes
svn path=/trunk/; revision=4040
2003-01-19 01:06:09 +00:00
Gé van Geldorp
10d48ac01e Handle textmode translation where CR is at the end of a request and the LF is
at the beginning of the next request

svn path=/trunk/; revision=4039
2003-01-19 01:05:03 +00:00
Brian Palmer
59f1842f56 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.

svn path=/trunk/; revision=4038
2003-01-19 01:04:01 +00:00
Eugene Ingerman
a26dfde014 Made GDI object locking exclusive. Added functions for locking multiple objects. Added comments.
svn path=/trunk/; revision=4037
2003-01-19 01:01:21 +00:00
Eugene Ingerman
898f490858 Some cleanup.
svn path=/trunk/; revision=4036
2003-01-19 01:01:00 +00:00
Eugene Ingerman
58c9054f3f Made GDI object locking exclusive. Added functions for locking multiple objects.
svn path=/trunk/; revision=4035
2003-01-18 20:53:57 +00:00
Eugene Ingerman
736ff1ac84 Fixed functions where GDI objects were locked but not released.
svn path=/trunk/; revision=4034
2003-01-18 20:47:32 +00:00
Eugene Ingerman
b8049283dc Don't compute absolute values after squaring.
svn path=/trunk/; revision=4033
2003-01-18 20:44:34 +00:00
Rex Jolliff
3b71d9191e a test
svn path=/trunk/; revision=4032
2003-01-18 20:26:20 +00:00
Robert Dickenson
d55087f86e Hope I fixed the broken issue.
svn path=/trunk/; revision=4031
2003-01-18 15:55:07 +00:00
Brian Palmer
4fb2283421 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.

svn path=/trunk/; revision=4030
2003-01-18 10:21:23 +00:00
Marty Dill
47333299bc Fixed a few memory leaks. Minor cleanup.
svn path=/trunk/; revision=4029
2003-01-18 00:10:59 +00:00
guido
586bc4dd7c ignore rtouch
svn path=/trunk/; revision=4028
2003-01-18 00:10:36 +00:00
Eric Kohl
52aba34f15 Dump some file attributes (file name, volume name, etc.)
Fixed infinite loop in a 'dir' command.

svn path=/trunk/; revision=4027
2003-01-17 19:57:31 +00:00
guido
3adeec8d80 fix compiler warning
svn path=/trunk/; revision=4026
2003-01-17 19:26:14 +00:00
guido
d0d1b840ca make it compile on linux too
svn path=/trunk/; revision=4025
2003-01-17 19:06:15 +00:00
Eric Kohl
e5057ddea7 Dump some file attributes (file name, volume name, etc.)
Fixed infinite loop in a 'dir' command.

svn path=/trunk/; revision=4024
2003-01-17 18:51:13 +00:00
Gé van Geldorp
08a01c4da8 Correctly expand wildcards in other directories
svn path=/trunk/; revision=4023
2003-01-17 18:04:08 +00:00
Eric Kohl
5dc512f7c3 Prepared bootloader installation.
svn path=/trunk/; revision=4022
2003-01-17 13:18:15 +00:00
Eric Kohl
fec5d8fcaf Removed unnecessary includes.
svn path=/trunk/; revision=4021
2003-01-17 13:09:43 +00:00
Eric Kohl
4e7b1eb14b ntddndis.h must include OID definitions.
svn path=/trunk/; revision=4020
2003-01-17 13:04:55 +00:00
Eric Kohl
0349fbade9 Fixed a few STDCALL issues and other warnings.
svn path=/trunk/; revision=4019
2003-01-17 13:03:16 +00:00
Gé van Geldorp
3ade7829d0 * Move (optional) wildcard expansion to split()
* Only expand arguments actually containing wildcard characters
  (to prevent expanding directory names to all files within that directory)

svn path=/trunk/; revision=4018
2003-01-17 00:31:33 +00:00
Gé van Geldorp
1bfce04639 When an empty filename is passed in directory search, find all (*) entries, not
the current directory (.)

svn path=/trunk/; revision=4017
2003-01-16 22:02:24 +00:00
Jason Filby
bf924ece94 New SystemState enumeration
svn path=/trunk/; revision=4016
2003-01-16 20:05:34 +00:00
Casper Hornstrup
50e4ffb8e8 2003-01-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/dbg/profile.c (KdbProfilerThreadMain): Make STDCALL.

svn path=/trunk/; revision=4015
2003-01-16 19:51:20 +00:00
Eric Kohl
96d8f03765 Removed outdated and duplicate bugcode definition.
svn path=/trunk/; revision=4014
2003-01-16 17:56:00 +00:00
Eric Kohl
308b132b5d Added UDF filesystem recognizer (still incomplete).
Fixed several memory leaks.

svn path=/trunk/; revision=4013
2003-01-16 11:58:15 +00:00
guido
191a1899fc ignore *.d
svn path=/trunk/; revision=4012
2003-01-15 23:42:11 +00:00
Casper Hornstrup
36aa98343d 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/makefile (TCP_OBJECTS): Add transport/tcp/tcpcore.o,
	transport/tcp/tcp_input.o, transport/tcp/tcp_ipv4.o,
	transport/tcp/tcp_output.o, and transport/tcp/tcp_timer.o.
	* drivers/net/tcpip/transport/tcp/tcp.c (TCPStartup): Call tcp_init().
	* drivers/net/tcpip/include/linux.h: New file.
	* drivers/net/tcpip/include/tcpcore.h: Ditto.
	* drivers/net/tcpip/include/tcpdef.h: Ditto.
	* drivers/net/tcpip/transport/tcp/tcp_input.c: Ditto.
	* drivers/net/tcpip/transport/tcp/tcp_ipv4.c: Ditto.
	* drivers/net/tcpip/transport/tcp/tcp_output.c: Ditto.
	* drivers/net/tcpip/transport/tcp/tcp_timer.c: Ditto.
	* drivers/net/tcpip/transport/tcp/tcpcore.c: Ditto.

svn path=/trunk/; revision=4011
2003-01-15 21:57:31 +00:00
Casper Hornstrup
fd6f0e5b04 *** empty log message ***
svn path=/trunk/; revision=4010
2003-01-15 21:25:29 +00:00
Casper Hornstrup
910f281f6e 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/kernel32/k32.h: New file.
	* lib/kernel32/makefile (TARGET_CFLAGS): Add -I./.
	(TARGET_PCH): Set to k32.h.
	* lib/kernel32/except/except.c: Use <k32.h>.
	* lib/kernel32/file/backup.c: Ditto.
	* lib/kernel32/file/cnotify.c: Ditto.
	* lib/kernel32/file/copy.c: Ditto.
	* lib/kernel32/file/create.c: Ditto.
	* lib/kernel32/file/curdir.c: Ditto.
	* lib/kernel32/file/delete.c: Ditto.
	* lib/kernel32/file/deviceio.c: Ditto.
	* lib/kernel32/file/dir.c: Ditto.
	* lib/kernel32/file/dosdev.c: Ditto.
	* lib/kernel32/file/file.c: Ditto.
	* lib/kernel32/file/find.c: Ditto.
	* lib/kernel32/file/iocompl.c: Ditto.
	* lib/kernel32/file/lfile.c: Ditto.
	* lib/kernel32/file/lock.c: Ditto.
	* lib/kernel32/file/mailslot.c: Ditto.
	* lib/kernel32/file/move.c: Ditto.
	* lib/kernel32/file/npipe.c: Ditto.
	* lib/kernel32/file/pipe.c: Ditto.
	* lib/kernel32/file/rw.c: Ditto.
	* lib/kernel32/file/tape.c: Ditto.
	* lib/kernel32/file/volume.c: Ditto.
	* lib/kernel32/mem/global.c: Ditto.
	* lib/kernel32/mem/heap.c: Ditto.
	* lib/kernel32/mem/isbad.c: Ditto.
	* lib/kernel32/mem/local.c: Ditto.
	* lib/kernel32/mem/procmem.c: Ditto.
	* lib/kernel32/mem/section.c: Ditto.
	* lib/kernel32/mem/virtual.c: Ditto.
	* lib/kernel32/misc/atom.c: Ditto.
	* lib/kernel32/misc/comm.c: Ditto.
	* lib/kernel32/misc/console.c: Ditto.
	* lib/kernel32/misc/debug.c: Ditto.
	* lib/kernel32/misc/dllmain.c: Ditto.
	* lib/kernel32/misc/env.c: Ditto.
	* lib/kernel32/misc/error.c: Ditto.
	* lib/kernel32/misc/handle.c: Ditto.
	* lib/kernel32/misc/ldr.c: Ditto.
	* lib/kernel32/misc/profile.c: Ditto.
	* lib/kernel32/misc/res.c: Ditto.
	* lib/kernel32/misc/stubs.c: Ditto.
	* lib/kernel32/misc/sysinfo.c: Ditto.
	* lib/kernel32/misc/time.c: Ditto.
	* lib/kernel32/process/cmdline.c: Ditto.
	* lib/kernel32/process/create.c: Ditto.
	* lib/kernel32/process/proc.c: Ditto.
	* lib/kernel32/process/session.c: Ditto.
	* lib/kernel32/string/lstring.c: Ditto.
	* lib/kernel32/synch/critical.c: Ditto.
	* lib/kernel32/synch/event.c: Ditto.
	* lib/kernel32/synch/intrlck.c: Ditto.
	* lib/kernel32/synch/mutex.c: Ditto.
	* lib/kernel32/synch/sem.c: Ditto.
	* lib/kernel32/synch/timer.c: Ditto.
	* lib/kernel32/synch/wait.c: Ditto.
	* lib/kernel32/thread/fiber.c: Ditto.
	* lib/kernel32/thread/thread.c: Ditto.
	* lib/kernel32/thread/tls.c: Ditto.

svn path=/trunk/; revision=4009
2003-01-15 21:24:36 +00:00
Casper Hornstrup
76b1705795 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/testsets/Makefile (TEST_SETS): Remove ldr.
	* include/msvcrt/ctype.h (towupper): Make returntype wchar_t.

svn path=/trunk/; revision=4008
2003-01-15 21:07:18 +00:00
Casper Hornstrup
1c52b61e7d 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rtouch.c: Include <sys/utime.h>, not <utime.h>.

svn path=/trunk/; revision=4007
2003-01-15 20:32:35 +00:00
Casper Hornstrup
f63e1913da 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rtouch.c: New file.
	* rules.mak (ROS_USE_PCH): Default to no.
	(RTOUCH): Define.
	* tools/Makefile: Add rtouch utility.
	* tools/helper.mk: Support precompiled headers.

svn path=/trunk/; revision=4006
2003-01-15 20:18:12 +00:00
Robert Dickenson
8b09e17d3f Required for some wine libs and now rosapps to build with ros includes in preference to mingw's
svn path=/trunk/; revision=4005
2003-01-15 20:17:50 +00:00
Robert Dickenson
b2a576cd5f Pulling in wstring support functions from wine, need to either bring in wctype_table or access the kernel32 nls files??? TODO:
svn path=/trunk/; revision=4004
2003-01-15 20:12:27 +00:00
Robert Dickenson
9ebba084e6 Split out separate makefiles for apps/tests apps/testsets & apps/utils.
svn path=/trunk/; revision=4003
2003-01-15 20:09:52 +00:00
Robert Dickenson
e6a193806c Mainly standardisation of makefiles. Added some exports to core libs for wine dependancies.
svn path=/trunk/; revision=4002
2003-01-15 20:05:53 +00:00
Casper Hornstrup
eb3b9049a9 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/dbg/profile.c: New file.
	* ntoskrnl/Makefile (OBJECTS_KDBG): Add dbg/profile.o.
	* ntoskrnl/dbg/kdb.h: Define NTOS_MODE_KERNEL. Include <ntos.h>.
	(LdrGetAddressInformation, KdbInitProfiling, KdbInitProfiling2,
	KdbDisableProfiling, KdbEnableProfiling, KdbProfileInterrupt) Prototype.
	* ntoskrnl/kd/kdebug.c (KdInitSystem): Add /PROFILE option if KDBG=1.
	* ntoskrnl/ke/main.c (ExpInitializeExecutive): Call KdbInitProfiling2()
	if KDBG=1.
	* ntoskrnl/ke/i386/irq.c: Include <../dbg/kdb.h> if KDBG=1.
	(KiInterruptDispatch): Call KdbProfileInterrupt() on timer interrupt
	if KDBG=1.

svn path=/trunk/; revision=4001
2003-01-15 19:58:07 +00:00
Robert Dickenson
92dec86909 Mainly standardisation of makefiles, now support make install rules and use ros headers...
svn path=/trunk/; revision=4000
2003-01-15 19:55:29 +00:00
Casper Hornstrup
f811f37004 2003-01-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/fs/vfat/create.c (VfatSupersedeFile): Only notify cache manager
	about change in file size if caching is initiated on the file stream.

svn path=/trunk/; revision=3999
2003-01-15 19:53:49 +00:00
Hartmut Birr
594558c6e2 Fixed the corrupted screen after a console switching with ALT+TAB.
svn path=/trunk/; revision=3998
2003-01-15 00:36:10 +00:00
Gé van Geldorp
97bb8934e2 Include error code in diagnostic and exit on error
svn path=/trunk/; revision=3997
2003-01-15 00:17:12 +00:00
guido
0319671dea just fixed a few warnings
svn path=/trunk/; revision=3996
2003-01-14 18:51:12 +00:00
Hartmut Birr
6f63730de8 Fixed low memory mapping.
svn path=/trunk/; revision=3995
2003-01-13 01:11:12 +00:00
Hartmut Birr
2cc8694271 Fixed UINT8/PUINT8.
svn path=/trunk/; revision=3994
2003-01-13 00:50:37 +00:00
Robert Dickenson
e9ba047848 path to root correction.
svn path=/trunk/; revision=3993
2003-01-12 02:03:06 +00:00
Robert Dickenson
87c1e63ebe Added new targets.
svn path=/trunk/; revision=3992
2003-01-12 02:02:17 +00:00
Robert Dickenson
329c896e1f Updates to the VDM support. Improvemnts to the new wine-debug-channels supprt.
svn path=/trunk/; revision=3991
2003-01-12 01:54:40 +00:00
Gé van Geldorp
1028fc6755 getc must return unsigned chars, cast to int
svn path=/trunk/; revision=3990
2003-01-11 22:40:24 +00:00
Casper Hornstrup
a437c36e7f 2003-01-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
* boot.bat: Use DOS end-of-line characters.

svn path=/trunk/; revision=3989
2003-01-11 17:30:34 +00:00
Hartmut Birr
6dac0c12b1 Reduced the size of the copy buffer.
svn path=/trunk/; revision=3988
2003-01-11 16:03:55 +00:00
Hartmut Birr
99a3325875 Removed FCB_UPDATE_ENTRY.
svn path=/trunk/; revision=3987
2003-01-11 16:02:29 +00:00
Hartmut Birr
0f02fa7c0d Call VfatUpdateEntry on each write operation.
svn path=/trunk/; revision=3986
2003-01-11 16:01:28 +00:00
Hartmut Birr
3ce30c75e1 Inform/query the cache/memory manager if a file would be deleted.
svn path=/trunk/; revision=3985
2003-01-11 16:00:16 +00:00
Hartmut Birr
3e3f697064 Store a pointer to the parent in the fcb structure and
reference/dereference the parent fcb on create/destroy.

svn path=/trunk/; revision=3984
2003-01-11 15:59:07 +00:00
Hartmut Birr
a2aa04440b Reduced some overhead in VfatUpdateEntry.
svn path=/trunk/; revision=3983
2003-01-11 15:57:55 +00:00
Hartmut Birr
7a16a8cbe7 Removed the call to VfatUpdateEntry.
Executed VfatClose always synchronous.

svn path=/trunk/; revision=3982
2003-01-11 15:56:43 +00:00
Hartmut Birr
189d9d92c3 Removed the call to VfatUpdateEntry.
svn path=/trunk/; revision=3981
2003-01-11 15:52:54 +00:00
Hartmut Birr
543fd98805 Used a hash table for storing/searching of process data pointers.
Unmap the connected view in CsrFreeProcessData.
Set the correct reply status in CsrCreateProcess.

svn path=/trunk/; revision=3980
2003-01-11 15:51:48 +00:00
Hartmut Birr
dfbf98b1b0 Fixed the check for the correct count of pagefiles.
svn path=/trunk/; revision=3979
2003-01-11 15:49:33 +00:00
Hartmut Birr
aa18c0d5d4 Ended the searching for a free block if it was found one.
svn path=/trunk/; revision=3978
2003-01-11 15:48:33 +00:00
Hartmut Birr
779329a8ee Disabled the call to MmWriteDirtyPages. MmWriteDirtyPages doesn't work correctly.
svn path=/trunk/; revision=3977
2003-01-11 15:47:14 +00:00
Hartmut Birr
9a1546a675 Signaled the event of pageop at return if the function have previous wait at this event.
svn path=/trunk/; revision=3976
2003-01-11 15:45:55 +00:00
Hartmut Birr
680b25b598 Did not dereference the connected port if the function returns success.
svn path=/trunk/; revision=3975
2003-01-11 15:33:49 +00:00
Hartmut Birr
b99cb5b1aa Fixed a comment.
svn path=/trunk/; revision=3974
2003-01-11 15:32:40 +00:00
Hartmut Birr
be6d0d37cd Signaled the event of pageop at return if the function have previous wait at this event.
Freed the section segments for a pagefile mapping in MmpDeleteSection.
Dereferenced the section object at the end of MmCreatePageFileSection.
Implemented MmFlushImageSection (not complete).

svn path=/trunk/; revision=3973
2003-01-11 15:31:05 +00:00
Hartmut Birr
14c1929fc2 Used lookasidelists for rmap's.
svn path=/trunk/; revision=3972
2003-01-11 15:28:18 +00:00
Hartmut Birr
ac22af2d68 Used lookasidelists for pageop's.
svn path=/trunk/; revision=3971
2003-01-11 15:26:59 +00:00
Hartmut Birr
e177cc849d Used lookasidelists for some memory allocations.
Implemented a delayed remove/close function for file objects.
This holds files for section views (exe's and dll's) longer
within the cache.

svn path=/trunk/; revision=3970
2003-01-11 15:24:38 +00:00
Hartmut Birr
7a00c6be46 Used lookasidelists for ibcb's.
Enabled caching of directories and fat segments.

svn path=/trunk/; revision=3969
2003-01-11 15:22:31 +00:00
Hartmut Birr
a0e6246535 Moved all definitions for internal structures and functions to cc.h.
svn path=/trunk/; revision=3968
2003-01-11 15:21:09 +00:00
Gé van Geldorp
ec67f794e9 Temporary fix to allow build to continue(generated file, shouldn't be in CVS)
svn path=/trunk/; revision=3967
2003-01-10 20:02:50 +00:00
Robert Dickenson
f821d1d7cc Changes to included libraries in build.
svn path=/trunk/; revision=3966
2003-01-08 19:56:26 +00:00
Robert Dickenson
d606d9479f New name for packet capture library network driver, packet driver to be deprecated.
svn path=/trunk/; revision=3965
2003-01-08 19:55:02 +00:00
Robert Dickenson
cfc75012b1 New library to export the wine debug channel support functions.
svn path=/trunk/; revision=3964
2003-01-08 19:52:22 +00:00
Robert Dickenson
f81a1de259 Moved wine debug channel exports to new library.
svn path=/trunk/; revision=3963
2003-01-08 19:50:39 +00:00
Robert Dickenson
1af5429d2b And that wraps up our broadcast for this evening.
svn path=/trunk/; revision=3961
2003-01-07 18:22:54 +00:00
Robert Dickenson
9c58563e7b Updates to accomodate changes and additions with the various sub-modules.
svn path=/trunk/; revision=3960
2003-01-07 18:20:34 +00:00
Robert Dickenson
158847adad temporarily removed regexpl due to C++ dependance problems.
svn path=/trunk/; revision=3959
2003-01-07 18:16:44 +00:00
Robert Dickenson
34f1644a51 Updated and removed temporarily regexpl due to C++ problems.
svn path=/trunk/; revision=3958
2003-01-07 18:14:30 +00:00
Robert Dickenson
b30bc31e1f CVS housekeeping.
svn path=/trunk/; revision=3957
2003-01-07 18:10:30 +00:00
Robert Dickenson
299dc7ee24 Added clipboard and common dialog references as well as build improvements.
svn path=/trunk/; revision=3956
2003-01-07 18:06:16 +00:00
Robert Dickenson
d73cc06799 Temporary fork of candidate base of potententially very useful development tool for ros.
svn path=/trunk/; revision=3955
2003-01-07 17:59:20 +00:00
Robert Dickenson
b8573aace5 Added _alldiv,_allmul,_allrem,_allshl,_allshr,_aulldiv,_aullrem,_aullshr stubs and exported them.
svn path=/trunk/; revision=3954
2003-01-07 17:48:12 +00:00
Robert Dickenson
5def2455d3 Added rules for building 'proglib' targets since nothing seemed to use this target already and it didn't work for csrss otherwise.
svn path=/trunk/; revision=3953
2003-01-07 17:39:58 +00:00
Robert Dickenson
839ce7a195 Changed from target type 'program' to 'proglib' and exported CsrServerInitialization for OS/2 subsystem linkage.
svn path=/trunk/; revision=3952
2003-01-07 17:37:22 +00:00
Robert Dickenson
2f4bd108e7 Turned back off and modified some other debug noise.
svn path=/trunk/; revision=3951
2003-01-07 17:35:56 +00:00
Robert Dickenson
b4ed26f8da Added some some missing exports for wine module linkage.
Shutdown was a mess from *nix newlines.

svn path=/trunk/; revision=3950
2003-01-07 17:32:59 +00:00
Robert Dickenson
ae2157bade Added some some missing exports for wine module linkage.
svn path=/trunk/; revision=3949
2003-01-07 17:30:33 +00:00
Robert Dickenson
0ffa768455 Added support for lauching VDM on dos image load.
Depends phase in makefile for processing with wmc.
Included message table resources section.
Added some some missing exports for wine module linkage.

svn path=/trunk/; revision=3948
2003-01-07 17:29:09 +00:00
Robert Dickenson
3f13766f16 added install batch similar to that provided in /reactos. Removed deprecated Makefile.
svn path=/trunk/; revision=3947
2003-01-07 16:24:45 +00:00
Robert Dickenson
a6d6844e8a Performed housekeeping to get the subsystem building. Introduced ros makefile 'standards' throughout.
Is anybody doing any work on the OS/2 support?

svn path=/trunk/; revision=3946
2003-01-07 16:23:12 +00:00
Robert Dickenson
a8e38f8c30 housekeeping files...
svn path=/trunk/; revision=3945
2003-01-05 19:32:32 +00:00
Robert Dickenson
8efeab6149 Include a define for a Macro having being defined, temporary fix to avoid conflict with posix+ headers.
svn path=/trunk/; revision=3944
2003-01-05 19:23:20 +00:00
Robert Dickenson
176e744766 Trivial update to trace message plus the usual housekeeping...
svn path=/trunk/; revision=3943
2003-01-05 19:18:44 +00:00
Robert Dickenson
add8773a9b Added a new phase to the build cycle, make depends, in order to get certain dependancies built first.
This includes but is not limited to global error code headers generated from message scripts via wmc.

svn path=/trunk/; revision=3942
2003-01-05 19:17:16 +00:00
Robert Dickenson
9b802163c5 Updated global ReactOS makefile to incorporate new wine and posix etc sub-targets with the defacto standard make style.
svn path=/trunk/; revision=3941
2003-01-05 19:15:10 +00:00
Robert Dickenson
3028effd84 doing some maintenance on the posix build system, getting in sync with reactos base.
svn path=/trunk/; revision=3940
2003-01-05 18:29:41 +00:00
Robert Dickenson
0ab5c4ecee doing some maintenance on the posix build system, getting in sync with reactos base.
svn path=/trunk/; revision=3939
2003-01-05 18:10:27 +00:00
Robert Dickenson
bc87211c3f housekeeping files...
svn path=/trunk/; revision=3938
2003-01-05 17:54:20 +00:00
Robert Dickenson
d110568a5c created stubs for the rest of the functions listed in mingw's tlhelp.h and exported them.
svn path=/trunk/; revision=3937
2003-01-05 14:32:32 +00:00
Robert Dickenson
c374e4ed3e Created test program for loading libraries in various ways.
svn path=/trunk/; revision=3936
2003-01-05 14:17:42 +00:00
Robert Dickenson
b9113d3fae Moved the beginnings of some toolhelp exports to their own module.
svn path=/trunk/; revision=3935
2003-01-05 10:07:08 +00:00
Robert Dickenson
661896dfde ps did not require a lot from C++, so now it doesn't require it at all.
svn path=/trunk/; revision=3934
2003-01-04 18:36:28 +00:00
Robert Dickenson
7a48c7fcf2 exported stubs for Process32First, Process32Next and CreateToolhelp32Snapshot created.
svn path=/trunk/; revision=3933
2003-01-04 18:33:18 +00:00
Robert Dickenson
7c22eaa402 reference to mingw's libth32.a added so the thing compiles *and* links.
svn path=/trunk/; revision=3932
2003-01-04 17:45:49 +00:00
Emanuele Aliberti
14759bdf75 Copyright years updated to 2003.
svn path=/trunk/; revision=3931
2003-01-04 15:24:12 +00:00
Emanuele Aliberti
3d07c7ba00 Eugene Ingerman, Guido de Jong, Jurgen van Gael, Marty Dill, and Ge van Geldorp added to the list of ROS coders.
svn path=/trunk/; revision=3930
2003-01-04 15:21:18 +00:00
Hartmut Birr
267074bb2e Fixed handling of large FAT32 partitions.
svn path=/trunk/; revision=3928
2003-01-04 02:07:18 +00:00
Gé van Geldorp
0a4d96cc81 Handle FAT32 partitions larger than 4GB
svn path=/trunk/; revision=3927
2003-01-03 23:58:31 +00:00
guido
85c1893693 fix some warnings
----------------------------------------------------------------------

svn path=/trunk/; revision=3926
2003-01-03 00:28:07 +00:00
Casper Hornstrup
31fe11951c 2003-01-02 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/ke/timer.c (KeExpireTimers): Avoid signed/unsigned comparison
	warning.
	* lib/user32/controls/scrollbar.c (SCROLL_DrawScrollBar): Put a statement
	at end.

svn path=/trunk/; revision=3925
2003-01-02 23:37:28 +00:00
Hartmut Birr
a39bff34c3 Set the hidden sector value from boot sector with the correct partition offset.
svn path=/trunk/; revision=3924
2003-01-02 21:43:52 +00:00
Hartmut Birr
8c7e8c4bbc Recalculate the partition value for freeldr. Freeldr uses a different partition numbering like linux.
svn path=/trunk/; revision=3923
2003-01-02 21:42:56 +00:00
Hartmut Birr
efc518af7b Fixed the access to the region list in MmAlterRegion.
svn path=/trunk/; revision=3922
2003-01-02 16:41:56 +00:00
Hartmut Birr
4af2b6bcb7 Splited HalEndSystemInterrupt in two functions. HalEndSystemInterrupt,
HalpLowerIrql and HalpExecuteIrqs was called recursively.

svn path=/trunk/; revision=3921
2003-01-02 16:07:49 +00:00
Hartmut Birr
e7cbcafe30 Moved the call to HalEndSystemInterrupt to the end of KiInterruptDispatch.
svn path=/trunk/; revision=3920
2003-01-02 16:06:49 +00:00
Hartmut Birr
7d15711868 Fixed a buffer overflow in wcsncpy.
svn path=/trunk/; revision=3919
2003-01-02 16:05:50 +00:00
Hartmut Birr
0b2f407fd4 Added a missing call to VfatCloseFile.
svn path=/trunk/; revision=3918
2003-01-02 16:04:31 +00:00
Hartmut Birr
b3f5d3a6f8 Added a terminating 0 in vfatGetFCBForFile. Vfat has used the buggy implementation of wcsncpy.
svn path=/trunk/; revision=3917
2003-01-02 16:03:56 +00:00
Hartmut Birr
c937cd4933 Fixed the handling for errors/retries.
svn path=/trunk/; revision=3916
2003-01-02 16:03:04 +00:00
Hartmut Birr
f9725d0888 Check if a uncached read is sector aligned, fail if is not.
svn path=/trunk/; revision=3915
2003-01-02 16:02:02 +00:00
Hartmut Birr
5d8ab9ff70 Uninitialize the file cache only if it was initialized.
svn path=/trunk/; revision=3914
2003-01-02 16:01:21 +00:00
Robert Dickenson
5b2709d12e added missing sub-dir to clean rule.
svn path=/trunk/; revision=3913
2003-01-01 11:18:06 +00:00
Robert Dickenson
e5b16f9408 Updates to test program.
svn path=/trunk/; revision=3912
2003-01-01 11:16:18 +00:00
Robert Dickenson
617e618fda Minor mods.
svn path=/trunk/; revision=3911
2003-01-01 11:11:49 +00:00
Robert Dickenson
980c3dbb9a Changes to all definitions involving wchar_t. The unsigned short type caused g++ to fail.
svn path=/trunk/; revision=3910
2003-01-01 06:19:37 +00:00
Robert Dickenson
4d245b3040 updates to the sc utility.
svn path=/trunk/; revision=3909
2002-12-28 16:19:22 +00:00
Robert Dickenson
239ec2591c added a default test ip address, i'm sure i've done this before...
svn path=/trunk/; revision=3908
2002-12-28 16:12:04 +00:00
Robert Dickenson
79a36072ff added new targets - does anybody else use these?
perhaps I should try make install some time...

svn path=/trunk/; revision=3907
2002-12-28 16:10:03 +00:00
Robert Dickenson
c7e92bc001 added new targets and some macros.
svn path=/trunk/; revision=3906
2002-12-28 16:07:59 +00:00
Robert Dickenson
d4e546fc84 moved all wine targets to makefile in wine dir
svn path=/trunk/; revision=3905
2002-12-28 16:06:11 +00:00
Gé van Geldorp
fab451963b Added apps\tests\copymove
svn path=/trunk/; revision=3904
2002-12-27 23:56:03 +00:00
Gé van Geldorp
92dee16101 Tests for MoveFile and related routines
svn path=/trunk/; revision=3903
2002-12-27 23:54:33 +00:00
Gé van Geldorp
133a166af6 Improved file attribute and file time handling
svn path=/trunk/; revision=3902
2002-12-27 23:50:21 +00:00
Robert Dickenson
d2d897b1c4 something going spooky with CVS, trying to get this file in...
svn path=/trunk/; revision=3901
2002-12-27 14:53:06 +00:00
Robert Dickenson
3288c0e0d5 Include test for truncating files, which currently doesn't work.
svn path=/trunk/; revision=3900
2002-12-27 14:44:01 +00:00
Robert Dickenson
bb2e6e63b8 Progress with opening and closing handles to SCM.
svn path=/trunk/; revision=3899
2002-12-27 14:40:03 +00:00
Robert Dickenson
70544cdae0 First draft of a ScmNamedPipeListenerThread implementation.
Some debug noise from winlogon and as always edited an ignore file.

svn path=/trunk/; revision=3898
2002-12-27 13:54:28 +00:00
Robert Dickenson
e464b1cd43 rename target from sh.exe to baresh.exe to avoid namespace conflict.
svn path=/trunk/; revision=3897
2002-12-26 18:28:25 +00:00
Robert Dickenson
c36596ece0 Keep the posix module buildable, and add some CVS sugar for easier scanning.
svn path=/trunk/; revision=3896
2002-12-26 18:14:38 +00:00
Robert Dickenson
2ed726833f Changed THREAD_STATE_RUNNABLE to THREAD_STATE_READY however PsDispatchThread() is still inaccessible.
svn path=/trunk/; revision=3895
2002-12-26 17:36:12 +00:00
Robert Dickenson
0edbb923d6 Perl5.8 requires the pointer to i/o table to be exported, and layed out correctly...
svn path=/trunk/; revision=3894
2002-12-26 17:26:41 +00:00
Robert Dickenson
b9d3e630ef Unix extra lines cleaned up.
svn path=/trunk/; revision=3893
2002-12-26 17:23:27 +00:00
Robert Dickenson
8e885e0492 Started to port some of the support for IsCharAlphaNumeric et al from wine.
svn path=/trunk/; revision=3892
2002-12-26 17:21:27 +00:00
Robert Dickenson
6cf975887d More sugar for CVS...
svn path=/trunk/; revision=3891
2002-12-26 17:16:13 +00:00
Robert Dickenson
df6e777080 Added new Service Control utitlity.
svn path=/trunk/; revision=3890
2002-12-26 17:04:46 +00:00
Gé van Geldorp
ccf4643b4c Fix sector size for AT LBA drives at 512 bytes
svn path=/trunk/; revision=3889
2002-12-22 11:38:41 +00:00
Gé van Geldorp
67cf4a374e Fixed typo, Edi was not restored
svn path=/trunk/; revision=3888
2002-12-22 11:35:15 +00:00
Gé van Geldorp
7140e3951d Volume label doesn't always have the ARCHIVE bit set
svn path=/trunk/; revision=3887
2002-12-22 11:26:01 +00:00
Jason Filby
2f3111335f Oops! Commented out offending line
svn path=/trunk/; revision=3886
2002-12-22 10:50:04 +00:00
Jason Filby
69ccaa8434 Scrollbar improvements
svn path=/trunk/; revision=3885
2002-12-21 19:25:41 +00:00
Eric Kohl
afe60dcdbf Add bootsectors and FREELDR.SYS to bootcd.
svn path=/trunk/; revision=3884
2002-12-21 14:54:47 +00:00
Robert Dickenson
05a8cab618 Revisted the packet capture driver and updated with fixes in latest 3.0a4 release.
Seems I'll need to do some work on the SCM before this'll be running for me.

svn path=/trunk/; revision=3883
2002-12-21 04:46:09 +00:00
Hartmut Birr
5f09dd1402 Replaced some calls to DbgPrint with the DPRINT macro.
svn path=/trunk/; revision=3882
2002-12-16 23:23:21 +00:00
Hartmut Birr
2774a7c60b Unmap the low memory in SMP mode in MmInit3.
svn path=/trunk/; revision=3881
2002-12-16 22:59:44 +00:00
Hartmut Birr
5b1b2a4860 Fixed Exfi386InterlockedExchangeUlong and InterlockedExchange.
svn path=/trunk/; revision=3880
2002-12-16 22:56:30 +00:00
Casper Hornstrup
3aa9d2d9ba 2002-12-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Only uninitialize caching
	when initialized.
	* drivers/fs/vfat/fcb.c (vfatReleaseFCB): Ditto.
	* lib/kernel32/mem/section.c (CreateFileMappingW): Pass NULL as
	MaximumSize to NtCreateSection if dwMaximumSizeHigh and dwMaximumSizeLow
	are both 0.
	* ntoskrnl/cc/pin.c (CcMapData): Assert if Bcb is NULL.
	* ntoskrnl/cc/view.c (CcRosReleaseCacheSegment, CcRosLookupCacheSegment,
	CcRosMarkDirtyCacheSegment, CcRosUnmapCacheSegment,
	CcRosCreateCacheSegment, CcRosGetCacheSegmentChain,
	CcRosGetCacheSegment, CcRosRequestCacheSegment, CcFlushCache,
	CcRosDeleteFileCache, CcRosReferenceCache, CcRosDereferenceCache,
	CcRosReleaseFileCache, CcGetFileObjectFromSectionPtrs): Ditto.
	* ntoskrnl/mm/section.c (MiReadPage): Assert if Fcb->Bcb is NULL.
	(MmCreateDataFileSection): Make sure caching is initialized for the file
	stream.

svn path=/trunk/; revision=3879
2002-12-15 17:01:52 +00:00
Eric Kohl
d774049979 Use lookaside list to allocate SRBs.
svn path=/trunk/; revision=3878
2002-12-15 14:34:43 +00:00
Robert Dickenson
35ccf47588 created kernel32.mc message file which generates errcodes.rc, MSG00409.bin and /include/reactos/errcodes.h
need to figure out how to get these to build automatically at the dependancy stage before including the output rc into kernel32 resources.

svn path=/trunk/; revision=3877
2002-12-15 06:34:43 +00:00
Steven Edwards
dd8087fdde Apply'd hartmut sector size patch for VMware.
Please report if you have problems on your platform

svn path=/trunk/; revision=3876
2002-12-15 00:23:31 +00:00
Steven Edwards
9894d327a4 Added more stubs for bochs.
svn path=/trunk/; revision=3875
2002-12-14 17:36:51 +00:00
Robert Dickenson
218703bf94 Updated test program.
Successfully reads and writes short test buffer using stream I/O, both A and W versions.
Tests for correct handling of /r/n in text modes however nothing as yet for multi-bytes.
If you rebuild me watch out for the dependacy _tfileio.c which doesn't have an entry in the makefile.

svn path=/trunk/; revision=3874
2002-12-14 14:42:01 +00:00
Eric Kohl
4e2f492dc0 Fixed data overrun upon read commands.
svn path=/trunk/; revision=3873
2002-12-13 19:35:12 +00:00
Eric Kohl
34056f0e1c Don't build ide.sys any longer.
svn path=/trunk/; revision=3872
2002-12-12 17:04:01 +00:00
Robert Dickenson
30b8d5cc45 Fixed "kernel32_test codepage" conformance test:
C:\reactos\bin>kernel32_test codepage
codepage: 2 tests executed, 0 marked as todo, 0 failures.
Plus a bit of cvsignoring and #ifdef's in stubs for trying to build with the ole2nls module.

svn path=/trunk/; revision=3871
2002-12-12 04:53:23 +00:00
Robert Dickenson
785d4e6698 KdDebuggerEnable -> KdDebuggerEnabled
svn path=/trunk/; revision=3870
2002-12-11 04:39:20 +00:00
Hartmut Birr
a7be665092 Removed dependancy tracking.
svn path=/trunk/; revision=3869
2002-12-10 19:09:26 +00:00
Steven Edwards
1ff8dc116a Linking not hosed now. Fixed via import of -lstdc++.
svn path=/trunk/; revision=3868
2002-12-10 17:03:03 +00:00
Steven Edwards
e4493af78d Fixed makefile for cabman. Linking is still hosed.
svn path=/trunk/; revision=3867
2002-12-10 17:01:16 +00:00
Eric Kohl
1ff210919e Added the Promise Ultra100 (PDC20267) controller to the list of supported atapi controllers.
svn path=/trunk/; revision=3866
2002-12-10 12:18:33 +00:00
Robert Dickenson
c43641f102 Put things back how they work for others until I work it out properly.
svn path=/trunk/; revision=3865
2002-12-10 09:31:30 +00:00
Eric Kohl
f51d9f66a6 Replaced bios error codes by valid status codes.
svn path=/trunk/; revision=3864
2002-12-09 23:15:57 +00:00
Eric Kohl
e1ed68fe85 Implemented ScsiPortGetDeviceBase() and ScsiPortFreeDeviceBase().
svn path=/trunk/; revision=3863
2002-12-09 23:14:04 +00:00
Eric Kohl
2b0a6b6d38 Fixed buggy system hive identification.
svn path=/trunk/; revision=3862
2002-12-09 23:09:25 +00:00
Hartmut Birr
8f1bfbccb6 Fixed some bugs in the wait functions.
svn path=/trunk/; revision=3861
2002-12-09 20:16:42 +00:00
Hartmut Birr
e1b39fac3c Protected the access to system_time with a spinlock.
svn path=/trunk/; revision=3860
2002-12-09 20:15:25 +00:00
Hartmut Birr
d008835685 Fixed the setting of the real time clock.
svn path=/trunk/; revision=3859
2002-12-09 20:13:12 +00:00
Hartmut Birr
cd35c38aa0 Added ntdll.a to TARGET_SDKLIBS. Ntdll.a is needed to import DbgPrint for DPRINT macros.
svn path=/trunk/; revision=3858
2002-12-09 20:11:56 +00:00
Hartmut Birr
14d77e9c63 Added -D_MSVCRT_LIB_ to TARGET_CFLAGS and ntdll.a to TARGET_SDKLIBS.
Ntdll.a is needed to import DbgPrint for DPRINT macros.

svn path=/trunk/; revision=3857
2002-12-09 20:09:24 +00:00
Hartmut Birr
c8662b4cab Disabled the definition of DbgPrint for __GNUC__. DbgPrint is imported from ntdll.dll.
svn path=/trunk/; revision=3856
2002-12-09 20:07:46 +00:00
Hartmut Birr
1fa5ceab79 Fixed the initializing of the C runtime handles.
svn path=/trunk/; revision=3855
2002-12-09 20:06:24 +00:00
Hartmut Birr
1cd89b296e Added support for shared interrupts (tested with a promise ultra100tx2 controller).
Added support for the Promise utra100tx2 controller.
Used multiple sector commands and 32bit IO only if the disk does support this.

svn path=/trunk/; revision=3854
2002-12-09 20:04:44 +00:00
Hartmut Birr
4db7fe648e Added more debug messages.
Register interrupts with hal and allow shared interrupts.

svn path=/trunk/; revision=3853
2002-12-09 20:01:14 +00:00
Hartmut Birr
39a9c0a865 Register interrupts with hal.
svn path=/trunk/; revision=3852
2002-12-09 19:57:56 +00:00
Hartmut Birr
a7ee619591 Enable/Disable the irq in KeConnectInterrupt/KeDisconnectInterrupt.
Call each registered interrupt in KiInterruptDispatch2 (only for UP).

svn path=/trunk/; revision=3851
2002-12-09 19:53:44 +00:00
Hartmut Birr
c657e69cc6 Fixed handling for level triggered interrupts.
svn path=/trunk/; revision=3850
2002-12-09 19:51:16 +00:00
Hartmut Birr
4386afd7cb Protected the cmos ports with a spinlock.
svn path=/trunk/; revision=3849
2002-12-09 19:47:22 +00:00
Hartmut Birr
89fd93f5c7 Fixed the calculation of the irql.
svn path=/trunk/; revision=3848
2002-12-09 19:46:39 +00:00
Hartmut Birr
bb6414ddad Fixed the addressing of pci device and function numbers.
Protected the pci ports with a spinlock.
Fixed the calculation of the irql.
Added HalpTranslatePciAddress.

svn path=/trunk/; revision=3847
2002-12-09 19:45:55 +00:00
Hartmut Birr
24941bbcb3 Added HalpGetIsaInterruptVector.
svn path=/trunk/; revision=3846
2002-12-09 19:44:44 +00:00
Robert Dickenson
167268f4b3 Commented out reference to VECTOR2IRQ in order to get MP config building.
svn path=/trunk/; revision=3845
2002-12-09 18:44:05 +00:00
Robert Dickenson
74075d4ed5 Commented out call to PsDispatchThread(THREAD_STATE_RUNNABLE) in order to get MP config building.
svn path=/trunk/; revision=3844
2002-12-09 18:42:41 +00:00
Robert Dickenson
58d9c81bdc Added a dummy copy of KiInterruptDispatch2 and removed reference to KeGetCurrentThread()->LastEip in order to get MP config building.
svn path=/trunk/; revision=3843
2002-12-09 18:40:45 +00:00
Robert Dickenson
5118ff8a48 Still... having problems with auto-depends on when running building Windows.
DEPENDS_PATH := $(PATH_TO_TOP)/tools/
Seems to need a trailing / on the other option as well???
I can't explain what's going on here, so I'm trying to fix it by trial and error.
Once again, please let me know if it breaks things for others.

svn path=/trunk/; revision=3842
2002-12-09 17:26:00 +00:00
Robert Dickenson
8d49e96dcf Still having problems with auto-depends on when running building Windows.
Cannot see how or when this problem was introduced, just suddenly stopped working the other day...
Appending the final \ seems to get it fixed again.
DEPENDS_PATH := $(subst /,\,$(PATH_TO_TOP))\tools\
Please let me know if it breaks things for others.

svn path=/trunk/; revision=3841
2002-12-09 17:03:09 +00:00
Robert Dickenson
719e18bbee Added some more libraries which now build to the WINE_DLLS section.
svn path=/trunk/; revision=3840
2002-12-09 15:38:18 +00:00
Robert Dickenson
1a95510552 Rollback removal of auto-dependancy checking.
Another version of make had made it's way in front of my path )^;

svn path=/trunk/; revision=3839
2002-12-09 15:18:11 +00:00
Eric Kohl
029fe88aa3 Fixed a bug which created new registry hives in the wrong directory.
svn path=/trunk/; revision=3838
2002-12-08 18:54:45 +00:00
Robert Dickenson
f2a2cbc0d9 minor format modifications to reduce diffs with latest wine sources to simplify updating.
mainly just updated with LGPL license in headers.

svn path=/trunk/; revision=3837
2002-12-08 16:26:52 +00:00
Robert Dickenson
5e2ff077e8 minor format modifications to reduce diffs with duplicates elsewhere in tree.
comment out depends rule in makefile since it doesn't work when building on windows.

svn path=/trunk/; revision=3836
2002-12-08 16:23:33 +00:00
Robert Dickenson
dd12442072 typos, reduce mingw header diffs, extra includes.
svn path=/trunk/; revision=3835
2002-12-08 16:18:30 +00:00
Robert Dickenson
a49981697a Fix for wide character streams.
svn path=/trunk/; revision=3834
2002-12-08 16:14:28 +00:00
Robert Dickenson
91616f730f Adding support for resource based error message table
svn path=/trunk/; revision=3833
2002-12-08 16:07:18 +00:00
Robert Dickenson
61bb7ba7ad Split out the resource functions for finer control of debug output.
svn path=/trunk/; revision=3832
2002-12-08 15:57:40 +00:00
Eric Kohl
688e9b05d9 Ouch!
svn path=/trunk/; revision=3831
2002-12-07 15:43:29 +00:00
Eric Kohl
822d5e3d78 Call CmInit2() only if the system hive was imported.
svn path=/trunk/; revision=3830
2002-12-07 14:47:10 +00:00
Eric Kohl
1a57936f09 Added progress bar to file copy page.
svn path=/trunk/; revision=3828
2002-12-06 21:39:04 +00:00
Eric Kohl
72136233fb Fixed warnings.
svn path=/trunk/; revision=3827
2002-12-06 17:33:16 +00:00
Eric Kohl
5c0db541d3 Fixed a typo.
svn path=/trunk/; revision=3826
2002-12-06 17:31:33 +00:00
Robert Dickenson
accbf7c896 In search of meaningful error messages and some housekeeping on the stubs file.
svn path=/trunk/; revision=3825
2002-12-06 13:14:14 +00:00
Brian Palmer
0853d8cf3d 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.

svn path=/trunk/; revision=3824
2002-12-06 04:43:02 +00:00
Brian Palmer
f54c214e8e 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.

svn path=/trunk/; revision=3823
2002-12-06 04:00:41 +00:00
Robert Dickenson
f1592aa69f Improved unicode fileio support.
svn path=/trunk/; revision=3822
2002-12-05 15:31:26 +00:00
Eric Kohl
2aacb78c3e Removed some error-prone bit-fiddling.
svn path=/trunk/; revision=3821
2002-12-04 20:39:03 +00:00
Eric Kohl
e51ba71a9b Fixed a typo.
svn path=/trunk/; revision=3820
2002-12-04 20:36:22 +00:00
Eric Kohl
b4d4bdf465 Added bus- and target-specific data to the device map.
svn path=/trunk/; revision=3819
2002-12-03 23:57:05 +00:00
Hartmut Birr
e3a1b88d60 Added support for the lower case flags of 8.3 names.
Fixed a bug that will corrupt directories if ros creates 8.3 names without a long name.

svn path=/trunk/; revision=3818
2002-12-03 01:14:49 +00:00
Eric Kohl
c00bebf1f2 Implemented SetThreadAffinityMask().
Fixed some *nix line breaks.

svn path=/trunk/; revision=3817
2002-12-02 21:28:40 +00:00
Eric Kohl
a378416e55 Implemented deferred hive synchronization. It doesn't sync yet.
svn path=/trunk/; revision=3816
2002-12-02 18:52:44 +00:00
Robert Dickenson
0416e5796f updated wine target section.
svn path=/trunk/; revision=3815
2002-12-02 18:40:33 +00:00
Eric Kohl
13c33450ed Fixed NtQueryValueKey() wrt packed value names.
svn path=/trunk/; revision=3814
2002-12-01 19:18:16 +00:00
Eric Kohl
21ad71423a Fixed a display bug in test 1.
svn path=/trunk/; revision=3813
2002-12-01 19:16:26 +00:00
Robert Dickenson
64c768602f Temporarily remove last few wine build targets that need some more work.
svn path=/trunk/; revision=3812
2002-11-30 19:12:51 +00:00
Eric Kohl
d608e437c9 Implemented packing of value names
svn path=/trunk/; revision=3811
2002-11-30 14:46:27 +00:00
Robert Dickenson
4bad5b8b2f Split out a few variable differences between libraries.
svn path=/trunk/; revision=3810
2002-11-29 16:00:21 +00:00
Robert Dickenson
1b135b8732 Further reduced differences and include all identical msvcrt targets in crtdll makefile.
svn path=/trunk/; revision=3809
2002-11-29 15:59:05 +00:00
Robert Dickenson
b5cd7d30a0 Updating include path in files previously missed.
svn path=/trunk/; revision=3808
2002-11-29 12:27:50 +00:00
Robert Dickenson
2ebbba0d7d Updating files somehow confused by CVS.
Old tree cvs reports up-to-date.
New tree - different ???
more to come...

svn path=/trunk/; revision=3807
2002-11-29 11:26:58 +00:00
Eric Kohl
5f25774f6e Added driver name to the partition list
svn path=/trunk/; revision=3806
2002-11-28 19:20:38 +00:00
Eric Kohl
4603c2ef5a Build the hardware device map for each SCSI port.
Bus or device specific information is not implemented yet.

svn path=/trunk/; revision=3805
2002-11-28 16:07:04 +00:00
Robert Dickenson
630e12009d Thank-you to Eugene for pointing out that I missed a required change
I:\Dev\reactos\reactos\apps\utils\net\roshttpd\include\socket.h
           8 : #include <crtdll/stdio.h>
Fixed to now include <msvcrt/....> instead which is now common to both the ntdll and msvcrt dll's

svn path=/trunk/; revision=3804
2002-11-28 12:21:02 +00:00
Hartmut Birr
ac08a1048a Added a missing increment operator.
svn path=/trunk/; revision=3803
2002-11-27 21:00:49 +00:00
Hartmut Birr
99b937362d Fixed the return value in ferror.
svn path=/trunk/; revision=3802
2002-11-27 20:56:28 +00:00
Hartmut Birr
d4386d7b53 Free the user stack in PsReapThreads.
svn path=/trunk/; revision=3801
2002-11-27 20:54:37 +00:00
Hartmut Birr
56964fad03 Do only for process handles detach/attach the process. Some handles
needs the correct process on close/delete. Only for process handles
is it possible that ObCloseAllHandles is called recursively.

svn path=/trunk/; revision=3800
2002-11-27 20:52:29 +00:00
Hartmut Birr
baf7670d00 Change the type for the page fault handler from trap to interrupt gate.
Enable interrupts on page faults only if the faulting process has interrupts enabled.

svn path=/trunk/; revision=3799
2002-11-27 20:49:54 +00:00
Hartmut Birr
d6ec424dbf Fixed the definition of NTKERNELAPI.
svn path=/trunk/; revision=3798
2002-11-27 20:46:44 +00:00
Hartmut Birr
6dc09f22d2 Initialize the registers for the next call to Int386 in GetBiosMemoryMap.
svn path=/trunk/; revision=3797
2002-11-27 20:31:17 +00:00
Hartmut Birr
dd6e3b8b31 Intialize the size for the bios memory map.
svn path=/trunk/; revision=3796
2002-11-27 20:29:43 +00:00
Eric Kohl
5f973ce0cf Use a 'secret' registry value to tell ntoskrnl where to create the registry hives.
svn path=/trunk/; revision=3795
2002-11-26 15:33:06 +00:00
Eric Kohl
a76689e99c Use ERESOURCE to lock registry hives.
Keep open hives in a global list.

svn path=/trunk/; revision=3794
2002-11-26 15:31:41 +00:00
guido
56b706f3e0 fixed compiler error: removed reference to crtdll
svn path=/trunk/; revision=3793
2002-11-25 23:53:38 +00:00
guido
8d09bf7839 Changes '\' to '/' to enable x-compiling on linux.
svn path=/trunk/; revision=3792
2002-11-25 23:19:31 +00:00
Robert Dickenson
a38f0cad21 cleaned up some warnings.
svn path=/trunk/; revision=3791
2002-11-25 17:41:40 +00:00
Robert Dickenson
8a0cebc9b6 no longer depend on msvcrt/tchar.h
svn path=/trunk/; revision=3790
2002-11-25 17:38:18 +00:00
Robert Dickenson
6b09fd544c Some cleanup.
svn path=/trunk/; revision=3789
2002-11-25 15:47:52 +00:00
Jason Filby
503d6a8fec Fixes
svn path=/trunk/; revision=3788
2002-11-24 20:25:49 +00:00
Jason Filby
dfc58357af Fixes
svn path=/trunk/; revision=3787
2002-11-24 20:18:35 +00:00
Jason Filby
683e4a3c99 Initial scrollbar code
svn path=/trunk/; revision=3786
2002-11-24 20:15:37 +00:00
Robert Dickenson
e676e56f6d cleaning up the cvs views a bit and added a makefile I must have missed a while ago.
svn path=/trunk/; revision=3785
2002-11-24 19:48:56 +00:00
Robert Dickenson
5110b764c2 update registry test program.
svn path=/trunk/; revision=3784
2002-11-24 19:13:40 +00:00
Robert Dickenson
11e87876dc update test program.
svn path=/trunk/; revision=3783
2002-11-24 19:12:30 +00:00
Brian Palmer
425bbb1543 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'

svn path=/trunk/; revision=3782
2002-11-24 19:10:06 +00:00
Robert Dickenson
787724058b Added binary and unicode file i/o support to msvcrt.
Reduced differences between crtdll and msvcrt sources

svn path=/trunk/; revision=3781
2002-11-24 18:42:26 +00:00
Robert Dickenson
5bdf3d7d22 Added a header I created a while ago when looking into irda support.
svn path=/trunk/; revision=3780
2002-11-24 18:28:38 +00:00
Robert Dickenson
cd5fad8f71 Changes to suit addition of a single macro in the types header.
svn path=/trunk/; revision=3779
2002-11-24 18:26:40 +00:00
Robert Dickenson
e80942cd98 Mainly just added some small #ifdef sections for a little portability.
svn path=/trunk/; revision=3778
2002-11-24 18:24:52 +00:00
Robert Dickenson
db2294a694 Added header to aid porting and include tchar.h here as it's the only unique thing about /include/crtdll
svn path=/trunk/; revision=3777
2002-11-24 18:14:19 +00:00
Robert Dickenson
29f20a14b6 Not sure quite how these changed seeing as they're to go shortly I just want to clear my CVS for now.
svn path=/trunk/; revision=3776
2002-11-24 18:09:57 +00:00
Robert Dickenson
1b66fde766 Result of three way diffing with include/crtdll and the winapi2 headers.
reactos/include/crtdll now unused and to be deprecated.

svn path=/trunk/; revision=3775
2002-11-24 18:06:01 +00:00
Eric Kohl
e6d113445e Added some more files to the boot cd.
Implemented file copy queue.

svn path=/trunk/; revision=3774
2002-11-23 01:55:27 +00:00
Eric Kohl
b8d0354d95 Disabled debug message.
Attempt to read beyond the end of a file must return STATUS_END_OF_FILE.

svn path=/trunk/; revision=3773
2002-11-20 21:55:25 +00:00
Jason Filby
64975d00e2 Added some missing border style definitions
svn path=/trunk/; revision=3772
2002-11-20 20:56:41 +00:00
Robert Dickenson
cc6b5ab403 Altered layout for easier comparison with msvcrt's makefile.
svn path=/trunk/; revision=3771
2002-11-19 17:16:14 +00:00
Robert Dickenson
caadfbc4fa Created new subtree for groups of related test programs.
Created application for ANSI and UNICODE stream I/O testing.

svn path=/trunk/; revision=3770
2002-11-19 13:03:29 +00:00
Robert Dickenson
7c17b26c4e Created skeleton for notepad application.
svn path=/trunk/; revision=3769
2002-11-19 12:56:47 +00:00
Eric Kohl
19a1ecf23f Disabled a debug message.
svn path=/trunk/; revision=3768
2002-11-18 22:40:32 +00:00
Eric Kohl
3788a144f4 Added PCI class and subclass definitions.
svn path=/trunk/; revision=3767
2002-11-18 22:39:02 +00:00
Robert Dickenson
8e08360d7b Fixed up the path spec and filename in the header blocks
svn path=/trunk/; revision=3766
2002-11-18 05:43:33 +00:00
Robert Dickenson
e8a0978c40 Fixed up the path spec and filename in the header blocks
svn path=/trunk/; revision=3765
2002-11-18 03:19:43 +00:00
Robert Dickenson
3cdb8f8517 *nix newlines throughout file fixed.
svn path=/trunk/; revision=3764
2002-11-17 04:10:56 +00:00
Robert Dickenson
bcccc0197d Relative include path fixed to absolute path.
svn path=/trunk/; revision=3763
2002-11-17 04:00:33 +00:00
Eric Kohl
89c5d6dd51 Revoved lots of unix line breaks.
svn path=/trunk/; revision=3762
2002-11-16 00:08:45 +00:00
Casper Hornstrup
28516f1bfb Fix compillation error.
svn path=/trunk/; revision=3761
2002-11-15 23:26:16 +00:00
Casper Hornstrup
5e586c9ecf 2002-11-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ddk/ldrtypes.h: Move ...
	* include/ntos/ldrtypes.h: ... here.
	* include/ddk/ntddk.h: Include ldrtypes.h at new location.

svn path=/trunk/; revision=3760
2002-11-15 22:30:30 +00:00
Eric Kohl
da9ce8cff3 Removed special case of process without process parameter block for initial process (smss.exe).
svn path=/trunk/; revision=3759
2002-11-15 22:06:01 +00:00
Eric Kohl
5a6a428544 Create process parameter block for initial process (smss.exe).
svn path=/trunk/; revision=3758
2002-11-15 22:04:51 +00:00
Casper Hornstrup
7a11ad1c92 Add missing files
svn path=/trunk/; revision=3757
2002-11-15 21:59:54 +00:00
Casper Hornstrup
2c1d2fb84f Add missing files.
svn path=/trunk/; revision=3756
2002-11-15 21:56:37 +00:00
Casper Hornstrup
755fde7e59 2002-11-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/bus/acpi/ospm/osl.c (acpi_os_readable, acpi_os_writable):
	Match prototypes.
	* include/ascii.h (AbortSystemShutdownA): Correct prototype.
	* include/debug.h (assert): Wrap in #ifndef assert.
	* include/funcs.h (AbortSystemShutdown): Remove duplicate prototype.
	* include/ddk/rtltypes.h: Move ...
	* include/ntos/rtltypes.h: ... here.
	* include/ddk/rtl.h: Move ...
	* include/ntos/rtl.h: ... here.
	* include/ddk/zwtypes.h: Move ...
	* include/ntos/zwtypes.h: ... here.
	* include/ddk/zw.h: Move ...
	* include/ntos/zw.h: ... here.
	| include/ddk/cmfuncs.h: Remove file; Move NtCreateKey to ntos/zw.h.
	* include/ntos.h: #include ntos/rtltypes.h, ntos/rtl.h, ntos/zwtypes.h,
	and ntos/zw.h.
	* include/unicode.h: (AbortSystemShutdownW): Correct prototype.
	* include/ddk/ntddk.h: Include headers at new location; Don't include
	removed files.
	* include/defines.h: Wrap definitions in w32api in #ifndef __USE_W32API.
	* include/ntos/zwtypes.h: Ditto.
	* include/napi/lpc.h: Ditto.
	* include/napi/shared_data.h: Ditto.
	* include/napi/teb.h: Ditto.
	* include/napi/types.h: Ditto.
	* include/ntdll/ldr.h: Ditto.
	* include/ntdll/rtl.h: Ditto.
	* include/ntos/console.h: Ditto.
	* include/ntos/disk.h: Ditto.
	* include/ntos/except.h: Ditto.
	* include/ntos/file.h: Ditto.
	* include/ntos/gditypes.h: Ditto.
	* include/ntos/heap.h: Ditto.
	* include/ntos/keyboard.h: Ditto.
	* include/ntos/mm.h: Ditto.
	* include/ntos/ntdef.h: Ditto.
	* include/ntos/ps.h: Ditto.
	* include/ntos/registry.h: Ditto.
	* include/ntos/security.h: Ditto.
	* include/ntos/synch.h: Ditto.
	* include/ntos/time.h: Ditto.
	* include/ntos/types.h: Ditto.
	* include/ntos/port.h: Ditto.
	* lib/advapi32/misc/shutdown.c (AbortSystemShutdownW,
	AbortSystemShutdownA): Correct prototype.
	* lib/advapi32/reg/reg.c: #include ntos.h.
	* lib/advapi32/sec/misc.c: Ditto.
	* lib/advapi32/sec/sid.c: Ditto.
	* lib/advapi32/service/sctrl.c: Ditto.
	* lib/advapi32/token/token.c: Ditto.
	* lib/kernel32/misc/dllmain.c: Ditto.
	* ntoskrnl/ex/napi.c: Ditto.
	* ntoskrnl/rtl/i386/exception.c: Ditto.
	* lib/advapi32/sec/ac.c: Ditto.
	(FindFirstFreeAce, GetAce): Change PACE* to PACE_HEADER*.
	* lib/advapi32/service/scm.c (EnumServicesStatusExA,
	EnumServicesStatusExW, QueryServiceStatusEx): Correct prototype.
	* lib/ntdll/rtl/ppb.c (RtlDestroyProcessParameters): Match prototype.
	* ntoskrnl/dbg/errinfo.c (DbgGetErrorText): Use %08x, not %08lx.
	* ntoskrnl/io/arcname.c (IoCreateSystemRootLink): Use %u, not %lu.
	* ntoskrnl/ke/main.c (ExpInitializeExecutive): Ditto.
	* (_main): Use %d, not %ld.
	* ntoskrnl/include/internal/i386/ke.h: Add #pragma GCC system_header.
	* include/ddk/ntdef.h (NTSYSAPI, NTAPI, NTKERNELAPI): Define to STDCALL;
	Check if already defined.
	* include/base.h (STDCALL, CDECL, CALLBACK, PASCAL): Move to ntos/types.h.

svn path=/trunk/; revision=3755
2002-11-14 18:21:07 +00:00
Casper Hornstrup
d9e3082d1f 2002-11-13 Rick Gaiser <RickG81@Wanadoo.nl>
* drivers/bus/isapnp/isapnp.c (FindNextReadPort): Increment Port before
	checking wether port address is in NE2000 address space range and returning
	port address value.

svn path=/trunk/; revision=3754
2002-11-13 21:57:47 +00:00
Eric Kohl
58cbfb764a * Added ini file suport (Thanks to Royce Mitchell!)
* Improved the partition list.
* Use information from txtsetup.sif to create directories.
* Added basic error handling.

svn path=/trunk/; revision=3753
2002-11-13 18:25:18 +00:00
Robert Dickenson
d4293289b3 Just getting in sync with removal of obsolete #pragma directive.
New work soon to come. Having a bad time with heap corruption
when attempting to import massive reg scripts into the ROS registry.

svn path=/trunk/; revision=3752
2002-11-13 12:08:26 +00:00
Robert Dickenson
e2d799f080 Commit of the rest of Gunnars file locking patch.
svn path=/trunk/; revision=3751
2002-11-13 06:01:12 +00:00
Robert Dickenson
84831891ce added #ifdef around headers to support test build. Modified debug messages.
svn path=/trunk/; revision=3750
2002-11-13 05:18:03 +00:00
Eric Kohl
3a8df0d499 Added setup information file txtsetup.sif.
svn path=/trunk/; revision=3749
2002-11-12 19:17:21 +00:00
Eric Kohl
eb1c9c77ee Reworked initial process loader.
Crash the system if the initial process fails within 5 seconds.

svn path=/trunk/; revision=3748
2002-11-12 19:12:34 +00:00
Steven Edwards
2f04a917bb Relicensed as LGPL and Released back to the WINE project as per
Rob's Approvial.

svn path=/trunk/; revision=3747
2002-11-12 15:25:15 +00:00
Marty Dill
49c384301b Implemented ReadConsoleOutputA() and WriteConsoleInputA().
svn path=/trunk/; revision=3746
2002-11-12 00:48:26 +00:00
Marty Dill
13aca9ca62 Added missing exports for a few console functions.
svn path=/trunk/; revision=3745
2002-11-12 00:46:02 +00:00
Marty Dill
4f2f3061db CreateDirectoryExW: Fail gracefully if directory name is null/empty.
svn path=/trunk/; revision=3744
2002-11-12 00:45:16 +00:00
Hartmut Birr
62765739e2 * Changed the access to the bitmap from BYTE to ULONG for speeding up.
svn path=/trunk/; revision=3743
2002-11-11 22:53:26 +00:00
Hartmut Birr
7c80de2804 * Do not exit if GetConsoleScreenBufferInfo fails. GetConsoleScreenBufferInfo fails
if the given handle is redirected to a file or pipe. This stops windres from working.

svn path=/trunk/; revision=3742
2002-11-11 21:53:25 +00:00
Hartmut Birr
153843d464 * Implemented multiple sector commands for reading and writing (only for disks).
* Implemented 32 bit access for I/O (only for disks).
* Both options can be desabled by undefining ENABLE_MULTIMODE and ENABLE_32BIT.

svn path=/trunk/; revision=3741
2002-11-11 21:51:33 +00:00
Hartmut Birr
62eac3dcff * Used look aside lists to allocate memory for VFATFCB, VFATCCB and VFAT_IRP_CONTEXT.
* Removed IsLastEntry, IsVolEntry, IsDeletedEntry, vfat_wstrlen, vfatGrabFCB,
  vfat_initstr, vfat_wcsncat, vfat_wcsncpy, vfat_movestr, wstrcmpi and replaced
  this functions with existing equivalents or functions from ntoskrnl.
* Merged GetEntryName into vfatGetNextDirEntry for reducing some overhead.
* Implemented a file name cache to speed up the searching for existing fcb.
* Removed some calls to FsdDosDateTimeToFileTime.
* Moved the call to CcZeroData behind the initializing of the cache (in VfatWrite).
* Using existing fcbs in FindFile if there is no '*?' within the search name.

svn path=/trunk/; revision=3740
2002-11-11 21:49:18 +00:00
Casper Hornstrup
4ba36f62e4 2002-11-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/bus/acpi/include/acpi.h: Include platform/types.h.
	* drivers/bus/acpi/include/actypes.h: (UINT8, BOOLEAN, UCHAR, UINT16,
	INT32, UINT32, UINT64): Disable, use the OS defined types instead.
	* drivers/bus/acpi/include/platform/types.h: Remove all types,
	include ntos.h instead.
	* drivers/bus/acpi/ospm/include/acpisys.h: Don't include
	platform/types.h.

svn path=/trunk/; revision=3739
2002-11-10 19:24:01 +00:00
Casper Hornstrup
d8acda7c3e 2002-11-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/defines.h: Fix warnings when bulding with gcc 3.3.
	* include/ddk/status.h: Ditto.
	* include/freetype/internal/ftdebug.h: Ditto.
	* include/net/ndis.h: Ditto.
	* lib/msafd/misc/helpers.c: Ditto.
	* lib/user32/windows/defwnd.c: Ditto.
	* lib/user32/windows/window.c: Ditto.
	* ntoskrnl/cm/ntfunc.c: Ditto.
	* ntoskrnl/cm/regfile.c: Ditto.
	* ntoskrnl/cm/regobj.c: Ditto.
	* ntoskrnl/dbg/errinfo.c: Ditto.
	* ntoskrnl/ex/hashtab.c: Ditto.
	* ntoskrnl/include/internal/mm.h: Ditto.
	* ntoskrnl/io/irp.c: Ditto.
	* ntoskrnl/kd/gdbstub.c: Ditto.
	* ntoskrnl/ke/queue.c: Ditto.
	* ntoskrnl/ke/sem.c: Ditto.
	* ntoskrnl/ldr/resource.c: Ditto.
	* ntoskrnl/mm/balance.c: Ditto.
	* ntoskrnl/mm/freelist.c: Ditto.
	* ntoskrnl/mm/mdl.c: Ditto.
	* ntoskrnl/mm/npool.c: Ditto.
	* ntoskrnl/mm/section.c: Ditto.
	* ntoskrnl/rtl/error.c: Ditto.
	* ntoskrnl/rtl/mem.c: Ditto.
	* ntoskrnl/rtl/string.c: Ditto.
	* ntoskrnl/rtl/time.c: Ditto.
	* ntoskrnl/rtl/unicode.c: Ditto.
	* ntoskrnl/rtl/wstring.c: Ditto.
	* ntoskrnl/rtl/i386/exception.c: Ditto.
	* subsys/win32k/freetype/src/base/ftinit.c: Ditto.

svn path=/trunk/; revision=3738
2002-11-10 18:17:43 +00:00
Robert Dickenson
5db0748cc3 committing more developments.
svn path=/trunk/; revision=3737
2002-11-10 14:29:27 +00:00
Robert Dickenson
5acde91b05 changed "$(RM) *.various" to "- $(RM) *.various" in order to keep the clean rule going.
svn path=/trunk/; revision=3736
2002-11-10 14:27:45 +00:00
Robert Dickenson
9a3d4ea3c6 added a couple of entries within the [\Registry\Machine\SOFTWARE\Classes] section for testing.
svn path=/trunk/; revision=3735
2002-11-10 14:12:41 +00:00
Robert Dickenson
adb86bd362 added #ifdef around headers to support private test build and various changes to debug diagnostics.
svn path=/trunk/; revision=3734
2002-11-10 14:10:09 +00:00
Robert Dickenson
d7753423c7 added #ifdef around headers to support private test build and some temporary zeroing of arrays during debugging.
svn path=/trunk/; revision=3733
2002-11-10 14:02:44 +00:00
Robert Dickenson
2e1e2b7968 added #ifdef around headers to support private test build.
svn path=/trunk/; revision=3732
2002-11-10 14:00:41 +00:00
Robert Dickenson
68c82b15c9 added #ifdef around headers and some debug message copying/terminating to support private test build.
svn path=/trunk/; revision=3731
2002-11-10 13:57:06 +00:00
Robert Dickenson
4ca5b5aa15 changed the default trace level to MID_TRACE for when DBG is defined.
svn path=/trunk/; revision=3730
2002-11-10 13:53:34 +00:00
Robert Dickenson
e99ad86ebe slight mod to the end of line for received ip packets to display a debug message.
svn path=/trunk/; revision=3729
2002-11-10 13:52:13 +00:00
Robert Dickenson
ba7265a614 some un-important modifications to my serial coms test program.
not of interest for now until I get something commitable for the simple serial driver.

svn path=/trunk/; revision=3728
2002-11-10 13:48:51 +00:00
Robert Dickenson
73eb67f51b just some code to to some specific key reading tests.
svn path=/trunk/; revision=3727
2002-11-10 13:47:03 +00:00
Robert Dickenson
24ef4d36dc added a whole bunch of hacks #ifdef'd into the header section to support private test build.
totally turned the contents upside down so functions are implicitly declared before use without header prototypes.

svn path=/trunk/; revision=3726
2002-11-10 13:44:48 +00:00
Robert Dickenson
e0461e2d52 display some extra debug messages on boot to see whats going on.
svn path=/trunk/; revision=3725
2002-11-10 13:40:08 +00:00
Robert Dickenson
c2cdc52d2e committing a parameter swap from Gunnars heap fix which I seem to have missed.
svn path=/trunk/; revision=3724
2002-11-10 13:38:14 +00:00
Robert Dickenson
77f5d4efe8 added #ifdef around headers to support private test build.
svn path=/trunk/; revision=3723
2002-11-10 13:36:59 +00:00
Robert Dickenson
2c9f063386 added #ifdef around headers to support private test build and modified debug messages.
svn path=/trunk/; revision=3722
2002-11-10 13:36:15 +00:00
Robert Dickenson
c37549f7cd added trivial comment reference consistancy with DDK prototype.
svn path=/trunk/; revision=3721
2002-11-10 13:34:42 +00:00
Robert Dickenson
ccb6663108 useless change to only some parameter names to be more consistent with DDK prototype.
svn path=/trunk/; revision=3720
2002-11-10 13:33:26 +00:00
Robert Dickenson
af405dcb05 display debug message on boot.
svn path=/trunk/; revision=3719
2002-11-10 13:30:32 +00:00
Hartmut Birr
3e9e0d0737 * Unlock the address space if MmOpenMemoryAreaByAddress fails (MmWritePhysicalAddress).
svn path=/trunk/; revision=3718
2002-11-09 20:27:03 +00:00
Robert Dickenson
0d78d25da5 Manually applying Gunnars patch because it's easier this way - and a good chance to review mods.
svn path=/trunk/; revision=3717
2002-11-07 16:36:50 +00:00
Robert Dickenson
2e3612cc58 Manually applying Gunnars patch because it's easier this way - and a good chance to review mods.
svn path=/trunk/; revision=3716
2002-11-07 02:52:37 +00:00
Robert Dickenson
f2064b3f8b Manually applying Gunnars patch became it's easier this way - and a good chance to review mods.
svn path=/trunk/; revision=3715
2002-11-07 02:45:29 +00:00
David Welch
a079c4b347 Reverted previous changes - Mm{Enable,Disable}VirtualMapping are faster
and won't allocate or free page tables. A page fault handler should
never see a disabled page since enabling and disabling is guarded by
a pageop.

svn path=/trunk/; revision=3714
2002-11-05 21:13:15 +00:00
Hartmut Birr
a794750da6 * Fixed the length for the page protection.
svn path=/trunk/; revision=3713
2002-11-05 21:01:38 +00:00
Hartmut Birr
8e4b80043b * Initialize the return value in DefWndNCCalcSize.
svn path=/trunk/; revision=3712
2002-11-05 20:59:48 +00:00
Hartmut Birr
1d127839b8 * Fixed the call to LoadImageW/RemovePropW if there is given
an identifier in LoadImageA/RemovePropA.

svn path=/trunk/; revision=3711
2002-11-05 20:58:20 +00:00
Hartmut Birr
e8899a2a5b * Fixed the searching for executable files in the spawnXpX/execXpX-functions.
svn path=/trunk/; revision=3710
2002-11-05 20:55:59 +00:00
Hartmut Birr
cb7fd6d214 * Fixed the searching for the file extension in CreateProcessW.
svn path=/trunk/; revision=3709
2002-11-05 20:54:10 +00:00
Hartmut Birr
811a27af00 * Fixed a wrong pointer initialization in RtlClearBits.
svn path=/trunk/; revision=3708
2002-11-05 20:52:38 +00:00
Hartmut Birr
3ec57dfda5 * Check for symbolic-links in ObFindObject.
svn path=/trunk/; revision=3707
2002-11-05 20:51:23 +00:00
Hartmut Birr
95b7092276 * Use the cache for images where the section offset is not page
alligned in MiReadPage.
* Removed a wrong call to MmReferencePage in MmPageOutSectionView.
* Fixed the length in MmAlterViewAttributes.
* Wait for releasing of the pageop in MmFreeSectionPage.
* Fixed some wrong return values in MmMapViewOfSection.

svn path=/trunk/; revision=3706
2002-11-05 20:50:02 +00:00
Hartmut Birr
9c17318aff * Used tagged memory for rmap entries.
svn path=/trunk/; revision=3705
2002-11-05 20:48:08 +00:00
Hartmut Birr
e4be6a3090 * Fixed the used and free block calculation.
* Allocate all blocks dword alligned and all big blocks (>=4K) page alligned.

svn path=/trunk/; revision=3704
2002-11-05 20:47:05 +00:00
Hartmut Birr
ffadffc82b * Fixed the allocation length for the mdl bitmap.
* Changed the bit allocation functions to RtlXxxBitMapYyy.
* Fixed the calculation of the starting point for free bitmap entries.

svn path=/trunk/; revision=3703
2002-11-05 20:45:09 +00:00
Hartmut Birr
ef586c33c1 * Fixed the calculation of the gap in MmFindGap.
* Serach for page alligned blocks in MmCreateMemorArea.

svn path=/trunk/; revision=3702
2002-11-05 20:43:35 +00:00
Hartmut Birr
4fcb4176f8 * Delete the virtual mapping first before the the mapped range
is freed in MmFreeNonPagedPoolRegion.
* Adujust AllocMapHint only if the reserved block starts at AllocMapHint.
* Changed the bit allocation functions to RtlXxxBitMapYyy.

svn path=/trunk/; revision=3701
2002-11-05 20:41:17 +00:00
Hartmut Birr
3d3d96c5d6 * Call KeBugcheck in MmDeletePageTable/MmFreePageTable if the
address points to the kernel address space.
* Check if an other process has inserted a kernel page directory
  entry while waiting for a page (MmGetPageEntry/MmGetPageEntry2).
* Check the kernel page directory only for an entry if the
  address points to the kernel address space (MmGetPageEntry1/2,
  MmDeleteVirtualMapping and MmDeletePageFileMapping).
* Disabled MmEnableVirtualMapping/MmDisableVirtualMapping.
  There is no difference between an entry with disabled mapping and
  a swap entry.

svn path=/trunk/; revision=3700
2002-11-05 20:39:03 +00:00
Hartmut Birr
a4b5d8a978 * Locking the address space before accessing it.
* Fixed some length calculations.

svn path=/trunk/; revision=3699
2002-11-05 20:35:33 +00:00
Hartmut Birr
4096437ab3 * Disabled all calls to MmEnableVirtualMapping/MmDisableVirtualMapping,
there is no difference for the page entry between a
  disabled mapping and a swap entry.

svn path=/trunk/; revision=3698
2002-11-05 20:31:34 +00:00
Hartmut Birr
fb46b3c16a * Fixed the buffer allocation in NtAccecptConnectedPort.
svn path=/trunk/; revision=3697
2002-11-05 20:27:56 +00:00
Hartmut Birr
39537ca751 * Setting the DeviceObject and Vbp for given FileObject to zero
if the open operation fails. The close and cleanup call must
  not route throught the FSD if the open call failed.
* Wait for the completion from FSD after the close/cleanup call.

svn path=/trunk/; revision=3696
2002-11-05 20:24:33 +00:00
Casper Hornstrup
1d57b8f66d 2002-11-03 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/lpc/lpcclt.c: Change LPC_MESSAGE_HEADER to LPC_MESSAGE.
	* include/csrss/csrss.h: Ditto.
	* include/lsass/lsass.h: Ditto.
	* include/napi/dbg.h: Ditto.
	* include/napi/lpc.h: Ditto.
	* lib/kernel32/misc/console.c: Ditto.
	* lib/ntdll/csr/lpc.c: Ditto.
	* lib/ntdll/dbg/debug.c: Ditto.
	* lib/secur32/lsa.c: Ditto.
	* ntoskrnl/dbg/user.c: Ditto.
	* ntoskrnl/include/internal/port.h: Ditto.
	* ntoskrnl/lpc/connect.c: Ditto.
	* ntoskrnl/lpc/reply.c: Ditto.
	* ntoskrnl/ps/process.c: Ditto.
	* subsys/csrss/api/conio.c: Ditto.
	* subsys/csrss/api/process.c: Ditto.
	* subsys/csrss/api/user.c: Ditto.

svn path=/trunk/; revision=3692
2002-11-03 20:01:07 +00:00
Eric Kohl
614f689b29 Display drive letters in partition list.
svn path=/trunk/; revision=3691
2002-11-02 23:17:06 +00:00
Robert Dickenson
d6d5e1af3d Update for VALENTA and VALENTW type changes.
Change HANDLE to HKEY throughout.
Bugfix and memory leak fixed.

svn path=/trunk/; revision=3690
2002-11-02 13:55:06 +00:00
Robert Dickenson
781e188154 Created typedefs for VALENTA and VALENTW, deprecated common VALENT type.
svn path=/trunk/; revision=3689
2002-11-02 13:50:45 +00:00
David Welch
cb8ac201ad Don't crash when a mouse message doesn't fall inside a window.
svn path=/trunk/; revision=3687
2002-11-01 11:29:58 +00:00
David Welch
6072415050 Fixed race condition between psaux ISR and DPC.
svn path=/trunk/; revision=3686
2002-10-31 23:48:06 +00:00
Jason Filby
58aee3a2d8 Version 0.0.21
svn path=/trunk/; revision=3684
2002-10-31 17:50:55 +00:00
Hartmut Birr
b8114825ec Merged all exec* and spawn* functions in one source file.
svn path=/trunk/; revision=3683
2002-10-31 07:29:07 +00:00
Hartmut Birr
9b875ab82c Merged all exec* and spawn* functions in one source file.
Reduced some overhead.

svn path=/trunk/; revision=3682
2002-10-31 07:26:08 +00:00
Eric Kohl
ad6fb31ad3 Fixed warnings.
svn path=/trunk/; revision=3681
2002-10-31 01:50:00 +00:00
Eric Kohl
5294570a8d Fixed minor linker warning for native apps.
Only link against default libraries if TARGET_SDKLIBS is not set.

svn path=/trunk/; revision=3680
2002-10-31 00:48:27 +00:00
David Welch
ae67380311 Implemented mouse messages.
svn path=/trunk/; revision=3679
2002-10-31 00:03:31 +00:00
David Welch
5672a8cbc6 Removed surplus debug messages.
svn path=/trunk/; revision=3678
2002-10-31 00:02:01 +00:00
Brian Palmer
39204fdedc Fix for MS's idiocy on a Win98 boot disk I have.
Apparently they use ESP without initializing anything more than SP.

svn path=/trunk/; revision=3677
2002-10-30 23:05:17 +00:00
Eric Kohl
8cfdeb8c6b Fixed wrong r/o protection of excessive pages. Spotted by Jan Kratochvil.
svn path=/trunk/; revision=3676
2002-10-30 19:53:20 +00:00
Eric Kohl
92bb09bd8d Various improvements and hardcoded directory creation.
svn path=/trunk/; revision=3675
2002-10-29 18:40:02 +00:00
Rex Jolliff
385fdfdfeb revert of mass delete of the posix subsystem. perhaps there is hope for it yet.
svn path=/trunk/; revision=3674
2002-10-29 04:45:58 +00:00
Marty Dill
c29a543da5 Added stub for IsProcessorFeaturePresent() to stop LdrGetProcedureAddress from complaining.
svn path=/trunk/; revision=3673
2002-10-29 04:05:26 +00:00
Marty Dill
da8792228d Implemented PeekConsoleInputA().
svn path=/trunk/; revision=3672
2002-10-29 03:49:32 +00:00
Robert Dickenson
644b07f2e1 RtlOpenCurrentUser() freed a string a little to early in some circumstances - fixed.
svn path=/trunk/; revision=3671
2002-10-28 15:50:25 +00:00
Robert Dickenson
a650557ee6 Fixed up some typos.
svn path=/trunk/; revision=3670
2002-10-28 15:45:56 +00:00
Robert Dickenson
f0cbb2db03 Found the problem, local copy of win32k.c required here but not in repository?
svn path=/trunk/; revision=3669
2002-10-28 15:27:01 +00:00
Robert Dickenson
e6e5a8a75e Reverted addition of target win32k.a in the SDK import libs.
svn path=/trunk/; revision=3668
2002-10-28 15:20:37 +00:00
Robert Dickenson
859479e295 Revert one of the makefile changes.
Linking with TARGET_SDKLIBS = win32k.a proved to be a very bad idea!
Something is wrong with building csrss, what happened to subsys/csrss/win32k.c ???

svn path=/trunk/; revision=3667
2002-10-28 15:19:09 +00:00
Robert Dickenson
01637f8e7f Check for GMEM_ZEROINIT flag and pass HEAP_ZERO_MEMORY flag to RtlAllocateHeap if required.
svn path=/trunk/; revision=3666
2002-10-28 15:08:32 +00:00
Robert Dickenson
58d86a321d Added rule to build win32k.a for linking by csrss.
This is already in dk/nkm however there doesn't seem to be a make macro to reference this?

svn path=/trunk/; revision=3665
2002-10-28 15:04:58 +00:00
Robert Dickenson
fbbe455d39 Added some exports required by csrss to get things building again.
svn path=/trunk/; revision=3664
2002-10-28 15:03:18 +00:00
Robert Dickenson
4c028e84ab Updated with fix for missing win32k.lib imports
svn path=/trunk/; revision=3663
2002-10-28 15:02:18 +00:00
Robert Dickenson
572227dc48 Starting something for VDM support.
svn path=/trunk/; revision=3662
2002-10-28 13:59:59 +00:00
Robert Dickenson
821199a87a Removed files that don't belong in the repository.
svn path=/trunk/; revision=3661
2002-10-28 12:10:23 +00:00
David Welch
31c69eaf8a dos2unix'd some more files.
svn path=/trunk/; revision=3660
2002-10-26 09:53:16 +00:00
Casper Hornstrup
9bbe34eb81 2002-10-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/msvcrt/except/seh.s: Fix end-of-line formatting.
	* lib/ntdll/rtl/i386/exception.c: Ditto.
	* lib/ntdll/rtl/i386/except.s: Ditto.
	* ntoskrnl/rtl/i386/except.s: Ditto.
	* ntoskrnl/rtl/i386/seh.s: Ditto.

svn path=/trunk/; revision=3659
2002-10-26 07:32:08 +00:00
Casper Hornstrup
b824c3ef39 *** empty log message ***
svn path=/trunk/; revision=3658
2002-10-26 00:38:01 +00:00
Casper Hornstrup
a1e055e943 2002-10-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/msvcrt/Makefile (OBJECTS_EXCEPT): Add except/seh.o; Remove
	except/exhand3.o.
	* lib/msvcrt/except/exhand2.c (MsvcrtDebug): New function.
	* lib/msvcrt/except/unwind.c (PEXCEPTION_FRAME): Remove.
	(_global_unwind2): Correct prototype.
	* lib/ntdll/makefile (RTL_I386_OBJECTS, ARCH_OBJECTS): New groups.
	(TARGET_OBJECTS): Add ARCH_OBJECTS group.
	* lib/ntdll/rtl/exception.c (KiUserExceptionDispatcher): Set
	NumberParameters in exception record.
	(RtlRaiseStatus): Remove.
	* ntoskrnl/Makefile (OBJECTS_RTL): Remove rtl/seh.o.
	(OBJECTS_RTL_I386): Add rtl/i386/except.o, rtl/i386/exception.o, and
	rtl/i386/seh.o.
	* ntoskrnl/ke/catch.c (RtlpExecuteHandlerForException,
	RtlpDumpExceptionRegistrations, RtlpDispatchException,
	RtlpExecuteHandler, RtlpExceptionHandler, RtlpUnwindHandler,
	RtlpExecuteHandlerForException, RtlpExecuteHandlerForUnwind,
	RtlUnwind): Remove.
	(RtlpDispatchException): Add prototype.
	* ntoskrnl/ke/i386/usertrap.c (ExceptionTypeStrings): Remove.
	* ntoskrnl/ps/create.c (PsCreateTeb): Mark end of exception
	registration list.
	* tools/helper.mk (TARGET_ASFLAGS): Add -g if DBG = 1.
	* lib/msvcrt/except/exhand3.c: Remove.
	* ntoskrnl/rtl/seh.c: Ditto.
	* lib/msvcrt/except/seh.s: New file.
	* lib/ntdll/rtl/i386/except.s: Ditto.
	* lib/ntdll/rtl/i386/exception.c: Ditto.
	* ntoskrnl/rtl/i386/except.s: Ditto.
	* ntoskrnl/rtl/i386/exception.c: Ditto.
	* ntoskrnl/rtl/i386/seh.s: Ditto.

svn path=/trunk/; revision=3657
2002-10-26 00:32:19 +00:00
Casper Hornstrup
5437114eaa 2002-10-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/kernel32/process/create.c (_except_handler): New function.
	(BaseProcessStart): Ditto.
	(KlCreateFirstThread): Return INVALID_HANDLE_VALUE on error; Call
	BaseProcessStart() before process entry point.
	* lib/kernel32/thread/thread.c (_except_handler): New function.
	(ThreadStartup): Protect thread using SEH constructs.

svn path=/trunk/; revision=3656
2002-10-25 22:59:55 +00:00
Casper Hornstrup
9e54d1d8d3 2002-10-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ddk/zw.h (NtProcessStartup): Use standard calling convention.
	* subsys/csrss/csrss.c (NtProcessStartup): Ditto.
	* subsys/smss/smss.c (NtProcessStartup): Ditto.
	* subsys/system/autochk/autochk.c (NtProcessStartup): Ditto.
	* subsys/system/usetup/usetup.c (NtProcessStartup): Ditto.

svn path=/trunk/; revision=3655
2002-10-25 22:08:21 +00:00
Casper Hornstrup
c28439db70 2002-10-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/tokentest/tokentest.c (ROS_ACE_HEADER): Move field
	AccessMask ...
	(ROS_ACE): ... here.
	(DisplayDacl): Make pAce an ROS_ACE*; Use new path for AceType; Use
	sizeof(ACE) instead of sizeof(ACE_HEADER).
	* include/ntos/security.h (ACE_HEADER): Move field AccessMask ...
	(ACE): ... here.
	* lib/ntdll/rtl/acl.c: Use new path for AccessMask.
	* ntoskrnl/se/semgr.c: Ditto.
	* ntoskrnl/se/acl.c (SepInitDACLs): Use new path for AccessMask; Use
	sizeof(ACE) instead of sizeof(ACE_HEADER).
	* ntoskrnl/se/token.c (SepCreateSystemProcessToken): Use sizeof(ACE)
	instead of sizeof(ACE_HEADER).

svn path=/trunk/; revision=3654
2002-10-25 21:48:00 +00:00
KJK::Hyperion
6efd5e3b01 POSIX+ says goodbye and leaves. It used to be fun, now it's just painful
svn path=/trunk/; revision=3653
2002-10-24 23:29:19 +00:00
Steven Edwards
a42476b9fb added tests for StretchBlt, PatBlt and BitBlt by Damon Chandler
svn path=/trunk/; revision=3652
2002-10-24 07:46:43 +00:00
Eric Kohl
95bb94d117 Initialize registry hives only once.
svn path=/trunk/; revision=3651
2002-10-23 17:21:07 +00:00
Steven Edwards
e8f680ecbb Add some includes to fix part of building. (Adopt me)
svn path=/trunk/; revision=3650
2002-10-23 17:07:06 +00:00
Hartmut Birr
7e51468aab KeSetEvent must be called with Wait set to FALSE within a DPC.
svn path=/trunk/; revision=3649
2002-10-21 17:05:32 +00:00
Marty Dill
66e64009cd Revert last changes.
svn path=/trunk/; revision=3648
2002-10-21 00:53:33 +00:00
Marty Dill
552baccb19 Implemented SubtractRect(). Misc fixes.
svn path=/trunk/; revision=3647
2002-10-20 23:57:03 +00:00
Marty Dill
f56af542aa Implemented FreeEnvironmentStringsW().
svn path=/trunk/; revision=3646
2002-10-20 23:56:05 +00:00
Eric Kohl
bb4e509794 Implemented [Get/Set]ProcessShutdownParameters().
svn path=/trunk/; revision=3645
2002-10-20 16:40:12 +00:00
Eric Kohl
31789101ee Implemented RegisterServicesProcess() and ExitWindowsEx() partially.
svn path=/trunk/; revision=3644
2002-10-20 14:54:34 +00:00
Robert Dickenson
e1365d9be6 Bugfix for ascii-hex conversions.
svn path=/trunk/; revision=3643
2002-10-20 13:55:09 +00:00
Casper Hornstrup
aa9fe526e2 2002-10-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/napi/teb.h (RTL_USER_PROCESS_PARAMETERS): Use field names
	as described in Windows NT/2000 Native API Reference.
	* lib/kernel32/file/file.c: Use new field names.
	* lib/kernel32/misc/console.c: Ditto.
	* lib/kernel32/process/create.c: Ditto.
	* lib/kernel32/process/proc.c: Ditto.
	* lib/ntdll/rtl/path.c: Ditto.
	* lib/ntdll/rtl/ppb.c: Ditto.
	* lib/ntdll/rtl/process.c: Ditto.

svn path=/trunk/; revision=3642
2002-10-20 11:56:00 +00:00
Robert Dickenson
bab254e373 Part of patch contributed by Gunnar Andr� Dalsnes.
svn path=/trunk/; revision=3641
2002-10-20 03:34:00 +00:00
Robert Dickenson
db067a2011 Part of patch contributed by Gunnar Andr� Dalsnes.
svn path=/trunk/; revision=3640
2002-10-20 03:13:51 +00:00
Marty Dill
4add2cf6f0 -Implemented GetNumberOfConsoleInputEvents and ReadConsoleOutputAttribute
-Added definition of CONSOLE_SELECTION_INFO struct
-Added stubs for GetConsoleSelectionInfo, GetConsoleProcessList, and AttachConsole
-Fixed prototypes for AddConsoleAlias[AW]

svn path=/trunk/; revision=3639
2002-10-20 00:34:40 +00:00
Casper Hornstrup
0f48860c6c 2002-10-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ntos.h: Include relevant files.
	* include/internal/ke.h: Include files relative to
	ntoskrnl/include.
	* include/internal/arch/ke.h: Ditto.

svn path=/trunk/; revision=3638
2002-10-19 14:24:16 +00:00
Emanuele Aliberti
21f3631d43 PAGESIZE to PAGE_SIZE.
svn path=/trunk/; revision=3637
2002-10-18 21:56:39 +00:00
Eric Kohl
a190455587 Implemented selection of install partition and directory.
svn path=/trunk/; revision=3635
2002-10-18 20:04:00 +00:00
Hartmut Birr
50d4270639 Fixed the initializing of the memory map for reactos.
svn path=/trunk/; revision=3634
2002-10-16 16:39:15 +00:00
Robert Dickenson
96dce91abb Added MODE command.
svn path=/trunk/; revision=3633
2002-10-16 01:47:11 +00:00
Robert Dickenson
89e00ddbac Added some support for the MODE command.
svn path=/trunk/; revision=3632
2002-10-16 01:45:49 +00:00
Eugene Ingerman
f576feb997 Work around environment variables size limitation of make program.
svn path=/trunk/; revision=3631
2002-10-09 07:11:24 +00:00
Robert Dickenson
97575f89c9 Added define _USE_NE2000 with increased tracing level instead of #if 0 block to bind stack to NIC.
svn path=/trunk/; revision=3630
2002-10-07 12:44:51 +00:00
Robert Dickenson
273ae68ba9 Added backdoor check for _BLOB_DEFINED to prevent header conflict.
svn path=/trunk/; revision=3629
2002-10-07 12:40:41 +00:00
Robert Dickenson
6cf061fde8 Changed GUID_DEFINED to _GUID_DEFINED for compatibility (prevent conflict) with mingw headers.
svn path=/trunk/; revision=3628
2002-10-07 12:34:33 +00:00
Robert Dickenson
4fbeb6d1f1 Quick fix to prevent bochs users experiencing aborts on load.
New basic WDM serial driver still being worked on.

svn path=/trunk/; revision=3627
2002-10-06 13:16:26 +00:00
Jason Filby
86d248e99b DIB color fix, palette fix
svn path=/trunk/; revision=3626
2002-10-05 17:13:16 +00:00
David Welch
a686f1e6f4 Implemented IO work queue functions using the system work queues.
svn path=/trunk/; revision=3625
2002-10-05 10:53:37 +00:00
Steven Edwards
34f0970179 New line fix for gcc 3.x
svn path=/trunk/; revision=3623
2002-10-03 20:57:13 +00:00
Steven Edwards
c95ee52187 New line fix for gcc 3.x
svn path=/trunk/; revision=3622
2002-10-03 20:49:03 +00:00
Robert Dickenson
f312c1f4c7 Simple test program for Serial Driver testing.
svn path=/trunk/; revision=3621
2002-10-03 19:43:31 +00:00
Robert Dickenson
d58db5470b Added exports to def/edf files and modified some pnp functions.
svn path=/trunk/; revision=3620
2002-10-03 19:39:56 +00:00
Robert Dickenson
f787714862 Added call to possibly tempory IoInitializeWorkerThreads.
svn path=/trunk/; revision=3619
2002-10-03 19:34:50 +00:00
Robert Dickenson
75a4e11044 Added comment about problem discovered when testing packet.sys
svn path=/trunk/; revision=3618
2002-10-03 19:33:07 +00:00
Steven Edwards
f10756010c 1. stub sndPlaySnd[A/W] to keep notepad from bitching
2. gcc 3.x end of line fix

svn path=/trunk/; revision=3617
2002-10-03 19:32:05 +00:00
Robert Dickenson
a5ba8c663e Included new file io/iowork.c in build.
svn path=/trunk/; revision=3616
2002-10-03 19:29:09 +00:00
Robert Dickenson
4251d141a6 Enabled entry for STATUS_OBJECT_NAME_EXISTS
svn path=/trunk/; revision=3615
2002-10-03 19:28:31 +00:00
Robert Dickenson
73905b2cdb Replaced original with version from FreeDDK and tested fine. One less to merge later....
svn path=/trunk/; revision=3614
2002-10-03 19:27:51 +00:00
Robert Dickenson
48d7bdc4d9 Added required defines and typedefs for ntoskrnl/io modules.
svn path=/trunk/; revision=3613
2002-10-03 19:26:47 +00:00
Robert Dickenson
a46d78f359 Added prototype for IoInitializeWorkerThreads, possibly temporary.
svn path=/trunk/; revision=3612
2002-10-03 19:24:24 +00:00
Robert Dickenson
95d4c902d7 Make WinCVS look a little cleaner.
svn path=/trunk/; revision=3611
2002-10-03 19:22:53 +00:00
Robert Dickenson
fc9c5cf9a4 Some debug macro changes.
svn path=/trunk/; revision=3610
2002-10-03 19:22:27 +00:00
Robert Dickenson
c5384d5b78 Added new file. Lots of research and work required to make it work.
svn path=/trunk/; revision=3609
2002-10-03 19:17:26 +00:00
Robert Dickenson
feef5457b3 Fix for DeviceIoControl masking FILE_DEVICE_FILE_SYSTEM incorrectly.
Anybody familiar with this module please review.

svn path=/trunk/; revision=3608
2002-10-03 19:09:04 +00:00
Steven Edwards
445f205034 End of file fix for gcc 3.x
svn path=/trunk/; revision=3607
2002-10-03 18:34:09 +00:00
Steven Edwards
3c1edaacd4 End of line fix for gcc 3.x
svn path=/trunk/; revision=3606
2002-10-03 18:28:22 +00:00
Robert Dickenson
2a2fb0f8d3 Implemented many of the ComXX exports.
svn path=/trunk/; revision=3605
2002-10-03 18:26:53 +00:00
Robert Dickenson
d983ce92fe Added ntddser.h from FreeDDK for Serial Driver development.
svn path=/trunk/; revision=3604
2002-10-03 18:06:23 +00:00
Hartmut Birr
d6d2e95044 Fixed the start value for the time calculation in time2.
svn path=/trunk/; revision=3603
2002-10-03 17:17:35 +00:00
Eric Kohl
df43e0e3f8 Added some commnets.
Changed valid slot numbers from 0-7 to 1-8.
Reset (leave) setup-mode for slot after reading POS data.

svn path=/trunk/; revision=3602
2002-10-03 09:11:00 +00:00
guido
5073fe8a33 removed duplicate type definition
svn path=/trunk/; revision=3601
2002-10-02 21:08:24 +00:00
Eric Kohl
3d254b8d29 Added minimal MicroChannel bus handler.
svn path=/trunk/; revision=3600
2002-10-02 19:32:57 +00:00
Hartmut Birr
bf6ff83636 Added CcFlushCache and CcGetFileObjectFromSectionPtrs.
svn path=/trunk/; revision=3599
2002-10-02 19:25:19 +00:00
Hartmut Birr
9f97892ffa Release the cache segment if the reading of it fails (in CcMapData).
svn path=/trunk/; revision=3598
2002-10-02 19:23:42 +00:00
Hartmut Birr
68d5450c51 Release the BcbLock before there is a call to CcRosFreeCacheSegment (in CcSetFileSizes).
svn path=/trunk/; revision=3597
2002-10-02 19:22:06 +00:00
Hartmut Birr
8aca0dc370 Modified some functions, changed the sequence for acquiring some of
the protection elements (VieLock, BcbLock, SegmentLock..) and protected
the access to some elements with the associated locking element.
Implemented CcFlushCache and CcGetFileObjectFromSectionPtrs.

svn path=/trunk/; revision=3596
2002-10-02 19:20:51 +00:00
Emanuele Aliberti
ef773a3f6b PSX: minor changes to the 'posix' module for enabling full compilation.
Q: should the dk for a subsystem be contained in that subsystem's tree?

svn path=/trunk/; revision=3595
2002-10-01 20:21:45 +00:00
Casper Hornstrup
1e847489e4 2002-10-01 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/dd/floppy/floppy.c: Changed PAGESIZE to PAGE_SIZE.
	* drivers/fs/cdfs/fcb.c: Ditto.
	* drivers/fs/cdfs/fsctl.c: Ditto.
	* drivers/fs/cdfs/rw.c: Ditto.
	* drivers/fs/ext2/dir.c: Ditto.
	* drivers/fs/ext2/inode.c: Ditto.
	* drivers/fs/ext2/rw.c: Ditto.
	* drivers/fs/ext2/super.c: Ditto.
	* drivers/fs/minix/blockdev.c: Ditto.
	* drivers/fs/minix/cache.c: Ditto.
	* drivers/fs/minix/inode.c: Ditto.
	* drivers/fs/minix/rw.c: Ditto.
	* drivers/fs/ntfs/fcb.c: Ditto.
	* drivers/fs/ntfs/ntfs.h: Ditto.
	* drivers/fs/vfat/create.c: Ditto.
	* drivers/fs/vfat/direntry.c: Ditto.
	* drivers/fs/vfat/dirwr.c: Ditto.
	* drivers/fs/vfat/fat.c: Ditto.
	* drivers/fs/vfat/fcb.c: Ditto.
	* drivers/fs/vfat/fsctl.c: Ditto.
	* drivers/fs/vfat/rw.c: Ditto.
	* drivers/storage/class2/class2.c: Ditto.
	* drivers/storage/scsiport/scsiport.c: Ditto.
	* hal/halx86/adapter.c: Ditto.
	* hal/halx86/mp.c: Ditto.
	* include/ddk/mmfuncs.h: Ditto.
	* include/ddk/mmtypes.h: Ditto.
	* include/ddk/i386/pagesize.h: Ditto.
	* include/ntdll/pagesize.h: Ditto.
	* lib/kernel32/process/create.c: Ditto.
	* lib/kernel32/thread/thread.c: Ditto.
	* lib/ntdll/ldr/utils.c: Ditto.
	* lib/ntdll/rtl/env.c: Ditto.
	* lib/ntdll/rtl/heap.c: Ditto.
	* lib/ntdll/rtl/ppb.c: Ditto.
	* lib/ntdll/rtl/process.c: Ditto.
	* lib/ntdll/rtl/thread.c: Ditto.
	* ntoskrnl/cc/copy.c: Ditto.
	* ntoskrnl/cc/view.c: Ditto.
	* ntoskrnl/ex/sysinfo.c: Ditto.
	* ntoskrnl/include/internal/i386/mm.h: Ditto.
	* ntoskrnl/io/mdl.c: Ditto.
	* ntoskrnl/ke/kthread.c: Ditto.
	* ntoskrnl/ke/i386/kernel.c: Ditto.
	* ntoskrnl/ldr/init.c: Ditto.
	* ntoskrnl/ldr/loader.c: Ditto.
	* ntoskrnl/mm/anonmem.c: Ditto.
	* ntoskrnl/mm/cont.c: Ditto.
	* ntoskrnl/mm/freelist.c: Ditto.
	* ntoskrnl/mm/iospace.c: Ditto.
	* ntoskrnl/mm/kmap.c: Ditto.
	* ntoskrnl/mm/marea.c: Ditto.
	* ntoskrnl/mm/mdl.c: Ditto.
	* ntoskrnl/mm/mminit.c: Ditto.
	* ntoskrnl/mm/ncache.c: Ditto.
	* ntoskrnl/mm/npool.c: Ditto.
	* ntoskrnl/mm/pagefile.c: Ditto.
	* ntoskrnl/mm/pageop.c: Ditto.
	* ntoskrnl/mm/section.c: Ditto.
	* ntoskrnl/mm/slab.c: Ditto.
	* ntoskrnl/mm/i386/page.c: Ditto.
	* ntoskrnl/ob/handle.c: Ditto.
	* ntoskrnl/ps/create.c: Ditto.
	* ntoskrnl/ps/process.c: Ditto.
	* ntoskrnl/ps/w32call.c: Ditto.
	* subsys/win32k/include/object.h: Ditto.

svn path=/trunk/; revision=3594
2002-10-01 19:27:25 +00:00
Casper Hornstrup
e10af6e59e 2002-10-01 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/ntdll/string/ctype.c: Undefine __MSVCRT__ to not have mingw
	runtime import _pctype.

svn path=/trunk/; revision=3593
2002-10-01 18:57:23 +00:00
Jurgen van Gael
768a5a2297 FIX:previous was wrong file
svn path=/trunk/; revision=3592
2002-10-01 12:57:23 +00:00
Jurgen van Gael
a98d50ca9b FIX:memory leak - font objects got create for every WM_PAINT message and never deleted
svn path=/trunk/; revision=3591
2002-10-01 12:52:00 +00:00
Eugene Ingerman
c6002facd3 1. Cleanup GDI objects when process is deleted.
2. Bug fixes.

svn path=/trunk/; revision=3590
2002-10-01 06:41:57 +00:00
Brian Palmer
784dc1a198 Changes in v1.7.9 (9/30/2002) (brianp)
- Fix for bug in BiosInt13ReadExtended() (biosdisk.S)
  by Christophe Bothamy & Mike Lerwill

svn path=/trunk/; revision=3589
2002-09-30 23:30:32 +00:00
Casper Hornstrup
7b7130b9ca 2002-09-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/user32/misc/desktop.c (string.h): Include.
	* lib/user32/misc/resources.c: Ditto.
	* lib/user32/misc/winhelp.c: Ditto.
	* lib/user32/windows/accel.c: Ditto.
	* lib/user32/windows/bitmap.c: Ditto.
	* subsys/win32k/freetype/ctype.c: Undefine __MSVCRT__ and _pctype to not
	have mingw runtime import _pctype.

svn path=/trunk/; revision=3588
2002-09-30 21:21:38 +00:00
Hartmut Birr
beb75552bb Replaced EXE_SUFFIX with EXE_POSTFIX.
svn path=/trunk/; revision=3587
2002-09-30 21:02:54 +00:00
Hartmut Birr
5bb8c3c68f WideCharToMultiByte accept each code page like MultiByteToWideChar.
Wmc.exe will now produce correct header files (bugcode.h) on ros.

svn path=/trunk/; revision=3586
2002-09-30 21:01:32 +00:00
Hartmut Birr
d9c63079bb Fixed the value for dwHighDateTime in SystemTimeToFileTime.
svn path=/trunk/; revision=3585
2002-09-30 20:59:39 +00:00
Hartmut Birr
dad0922fda Fixed the value for EPOCHWEEKDAY.
Improve converting speed in RtlTimeToTimeFields.

svn path=/trunk/; revision=3584
2002-09-30 20:57:54 +00:00
Hartmut Birr
ffe7ccffd2 Release PiThreadListLock before KeReleaseThread is called in PiDeleteThread.
svn path=/trunk/; revision=3583
2002-09-30 20:56:17 +00:00
Casper Hornstrup
f5eae01623 2002-09-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/cc/view.c (alloca): Prototype.
	* ntoskrnl/rtl/ctype.c: Undefine __MSVCRT__ to not have mingw runtime
	import _pctype.

svn path=/trunk/; revision=3582
2002-09-30 20:55:33 +00:00
Hartmut Birr
80d9dd3cc3 Fixed the value for EPOCHWEEKDAY.
svn path=/trunk/; revision=3581
2002-09-30 20:54:59 +00:00
Hartmut Birr
1ad57518fc Changed from OrginalFileObject to the FileObject from current stack location in IoIsOperationSynchronous.
svn path=/trunk/; revision=3580
2002-09-30 20:53:38 +00:00
Hartmut Birr
2b72f3d894 Changed the allocation function from ExAllocatePool to ExAllocatePoolWithTag in ExpDefaultAllocate.
svn path=/trunk/; revision=3579
2002-09-30 20:52:23 +00:00
Hartmut Birr
7a4a78d0b1 Removed VfatIoIsOperationSynchronous and changed back to IoIsOperationSynchronous.
svn path=/trunk/; revision=3578
2002-09-30 20:49:44 +00:00
Hartmut Birr
749530e630 Free the DirectorySeachPattern.
svn path=/trunk/; revision=3577
2002-09-30 20:48:43 +00:00
Hartmut Birr
a2d32d6cf7 Changed the starting cluster for the call to OffsetToCluster in VfatSetAllocationSizeInformation
from current cluster to the first cluster of a file or directory.
Do not set the new size for directories in VfatSetAllocationSizeInformation.

svn path=/trunk/; revision=3576
2002-09-30 20:47:28 +00:00
David Welch
5f0f163996 Use the correct bit order.
svn path=/trunk/; revision=3575
2002-09-30 19:45:19 +00:00
David Welch
5daca85b58 Fix for wrongly disabling interrupts causing system time loss.
svn path=/trunk/; revision=3574
2002-09-30 19:43:33 +00:00
Jason Filby
dc908bafd1 Perform color translation for 4BPP to 4BPP DIBs
svn path=/trunk/; revision=3573
2002-09-28 22:23:36 +00:00
Jason Filby
d166ac40b1 Draw minimize and maximize buttons with smaller, correct, metrics
svn path=/trunk/; revision=3572
2002-09-28 22:13:28 +00:00
Hartmut Birr
bf59f99dac Fixed the conversion in MultiByteToWideChar. Wmc.exe does now running on ros.
svn path=/trunk/; revision=3571
2002-09-27 15:29:03 +00:00
Hartmut Birr
7c651fda9c Fixed the calculation of leap days in RtlTimeToTimeFields.
svn path=/trunk/; revision=3570
2002-09-27 15:23:03 +00:00
David Welch
51ee9ffb3d Added nicer looking default mouse cursor.
Draw a mouse cursor as a pair of AND and XOR masks.
Speedup saving the screen area behind the mouse cursor by blitting it to
a non-displayed part of the frame buffer.

svn path=/trunk/; revision=3569
2002-09-25 21:21:36 +00:00
Hartmut Birr
9b17dd2a05 Stored the return value in the location given by the parameter (in function time()).
svn path=/trunk/; revision=3568
2002-09-25 16:31:36 +00:00
Eric Kohl
db14727518 Added more setup 'pages'. No install functionality yet.
svn path=/trunk/; revision=3567
2002-09-25 14:48:35 +00:00
Robert Dickenson
2ef96cd555 Added serial to the device_drivers target list.
svn path=/trunk/; revision=3566
2002-09-25 12:49:12 +00:00
Robert Dickenson
c08624515a Moved location of serial driver entry to prevent very strange behaviour of serial appearing to load multiple times as currently seen under bochs.
svn path=/trunk/; revision=3565
2002-09-25 12:45:13 +00:00
Brian Palmer
c3457c3890 Added more compiler flags
svn path=/trunk/; revision=3564
2002-09-25 04:22:37 +00:00
Steven Edwards
7222eece5c added test for mktime()
svn path=/trunk/; revision=3563
2002-09-25 01:09:49 +00:00
Jason Filby
559919d821 Added missing palette.h
svn path=/trunk/; revision=3562
2002-09-24 20:25:49 +00:00
Jason Filby
bf2d96d820 Win32k fixes including better 1BPP support
svn path=/trunk/; revision=3561
2002-09-24 20:22:10 +00:00
guido
25c608fd37 added .cvsignore
svn path=/trunk/; revision=3560
2002-09-24 19:50:47 +00:00
guido
895e809d7a changed backslash to slash
(I'm probably the only one having trouble with backslashes ...)

svn path=/trunk/; revision=3559
2002-09-24 19:34:18 +00:00
Steven Edwards
afbe90de84 added install for winmm.dll
svn path=/trunk/; revision=3558
2002-09-24 18:45:56 +00:00
Steven Edwards
230dc66a3a Added blank winmm.dll with one stub to try and get bochs working.
svn path=/trunk/; revision=3557
2002-09-24 18:45:32 +00:00
Steven Edwards
2e6e06f683 Change caption from Task Manager to ReactOS Task Manager
svn path=/trunk/; revision=3556
2002-09-24 16:45:12 +00:00
Robert Dickenson
5f1366aacc Updated with latest version changes to original source.
svn path=/trunk/; revision=3555
2002-09-24 15:16:46 +00:00
Robert Dickenson
2217a4d789 Temporary workaround to prevent bochs trouble.
svn path=/trunk/; revision=3554
2002-09-24 15:12:33 +00:00
Robert Dickenson
e7c419950d Added calls to INIT_TAG for better debugging messages.
svn path=/trunk/; revision=3553
2002-09-24 15:11:34 +00:00
Robert Dickenson
44572b3e1e Suspicious call to ExFreePool commented out for peer review?
svn path=/trunk/; revision=3552
2002-09-24 15:10:35 +00:00
Robert Dickenson
be84fb0f1c Updated with latest version changes to original source by Politecnico di Torino.
svn path=/trunk/; revision=3551
2002-09-24 15:08:14 +00:00
Robert Dickenson
eda8dee587 Addition of control panel applet support to shell32. Still need to clean local and do build testing. More to come soon.
svn path=/trunk/; revision=3550
2002-09-24 15:06:10 +00:00
Robert Dickenson
939bdcdace Doing some work on the serial driver.
svn path=/trunk/; revision=3549
2002-09-24 14:59:32 +00:00
Robert Dickenson
066f6e3fdc Added new registry entries in support of the network components.
svn path=/trunk/; revision=3548
2002-09-24 14:58:54 +00:00
Robert Dickenson
8f5a73d237 Added new targets to the copy list.
svn path=/trunk/; revision=3547
2002-09-24 14:47:27 +00:00
Robert Dickenson
0ea72c53bc Added targets for getting new import libraries built.
svn path=/trunk/; revision=3546
2002-09-24 14:44:15 +00:00
Robert Dickenson
954cb157af Test app for some visibility on whats in the registry.
svn path=/trunk/; revision=3545
2002-09-24 14:41:55 +00:00
Robert Dickenson
6179622668 Added SNMP Error Codes.
svn path=/trunk/; revision=3544
2002-09-24 14:37:04 +00:00
Robert Dickenson
803e49c960 Very minor updates in support of network applications development.
svn path=/trunk/; revision=3543
2002-09-24 14:35:49 +00:00
Robert Dickenson
6ee5647f7b Minor fix to get ROS pinging reliably over ne2000 as tested on hardware and bochs.
svn path=/trunk/; revision=3542
2002-09-24 14:34:41 +00:00
Robert Dickenson
55fe4b8ca1 Misc updates and additions to as yet only partial applications.
svn path=/trunk/; revision=3541
2002-09-24 14:26:47 +00:00
Robert Dickenson
edfa8a7002 Sync'ing remaining changes after recent CVS problems. Seem to now have my route back!
svn path=/trunk/; revision=3540
2002-09-24 14:22:48 +00:00
Steven Edwards
5902c7241e End of line fix for gcc 3.x, other misc fixes for 3x
svn path=/trunk/; revision=3539
2002-09-24 03:57:59 +00:00
Steven Edwards
2e1536cfa6 End of line fix for gcc 3.x
svn path=/trunk/; revision=3538
2002-09-24 03:43:25 +00:00
Steven Edwards
19c7a64cf1 added install for regression test suite
svn path=/trunk/; revision=3537
2002-09-23 23:50:43 +00:00
guido
fec8acf355 re-added some files and fixed a few errors
svn path=/trunk/; revision=3536
2002-09-23 21:22:42 +00:00
guido
cd5724441e added clean rule
svn path=/trunk/; revision=3535
2002-09-23 20:09:10 +00:00
Steven Edwards
41f1cd4bda Added some stubbs for the WINE kernel32 regression test
svn path=/trunk/; revision=3534
2002-09-23 19:20:34 +00:00
Jason Filby
ee7cad8534 Added dibtest - only 1BPP test for now
svn path=/trunk/; revision=3533
2002-09-22 20:09:01 +00:00
guido
44279ad4aa added .cvsignore
svn path=/trunk/; revision=3532
2002-09-22 18:53:37 +00:00
guido
43cd157b8f updated .cvsignore
svn path=/trunk/; revision=3531
2002-09-22 18:52:45 +00:00
guido
4f8b6f7d02 added port of freedos find command
svn path=/trunk/; revision=3530
2002-09-22 18:41:59 +00:00
guido
714d720147 minor fix for 'dist'
svn path=/trunk/; revision=3529
2002-09-22 18:41:16 +00:00
David Welch
02d56c87f1 Accelerate PATCOPY blits.
svn path=/trunk/; revision=3528
2002-09-21 18:05:25 +00:00
Jason Filby
93dd94f0db Minor fixes
svn path=/trunk/; revision=3527
2002-09-21 10:39:54 +00:00
Jason Filby
2f3e32bfea Windows now show captions
svn path=/trunk/; revision=3526
2002-09-20 21:55:50 +00:00
Eugene Ingerman
088dbb0953 Patch by Hartmut Birr: protect IrpFlags with spinlock.
svn path=/trunk/; revision=3525
2002-09-20 05:40:28 +00:00
Jason Filby
d0a1f447f1 Corrected comment
svn path=/trunk/; revision=3524
2002-09-19 22:56:14 +00:00
Jason Filby
dfcf977473 Text alignment should be TA_TOP for a new DC
svn path=/trunk/; revision=3523
2002-09-19 22:41:57 +00:00
Eric Kohl
db1b121d20 Major rework.
Fixed keyboard bug.

svn path=/trunk/; revision=3522
2002-09-19 16:21:15 +00:00
Eric Kohl
f38f607dc4 Moved SCSI headers because they are used by usetup.
svn path=/trunk/; revision=3521
2002-09-19 16:18:50 +00:00
David Welch
af353b6572 Create a PDEV for the display driver only once.
svn path=/trunk/; revision=3520
2002-09-18 23:56:48 +00:00
KJK::Hyperion
c14f0762b7 Temporary getopt.h. MingW doesn't define getopt() anywhere, but ships with libiberty, that implements it. This file temporarily fills the gap
svn path=/trunk/; revision=3519
2002-09-18 01:09:10 +00:00
David Welch
b3aca5f5cc Pass only the base name of a module.
svn path=/trunk/; revision=3518
2002-09-17 23:48:14 +00:00
David Welch
93381cbd04 More user fixes.
svn path=/trunk/; revision=3517
2002-09-17 23:46:23 +00:00
David Welch
8874b95126 Misc. user fixes.
svn path=/trunk/; revision=3516
2002-09-17 23:43:29 +00:00
David Welch
57e810c555 Misc. user fixes.
Don't load FPU or debug register data unless requested.

svn path=/trunk/; revision=3515
2002-09-17 23:41:44 +00:00
Jason Filby
8c69edcca7 Fixes for DIBs to show with correct vertical orientation
svn path=/trunk/; revision=3514
2002-09-17 23:20:44 +00:00
Jason Filby
319a04a8a0 Remove unneeded floating point code
svn path=/trunk/; revision=3513
2002-09-17 21:39:10 +00:00
Hartmut Birr
60457afcdc Changed the detection of the last session from IOCTL_CDROM_READ_TOC to IOCTL_CDROM_GET_LAST_SESSION.
Fixed the calculation of the VolumeOffset.

svn path=/trunk/; revision=3512
2002-09-17 20:42:59 +00:00
Hartmut Birr
fe3896a798 added support for IOCTL_CDROM_GET_LAST_SESSION.
svn path=/trunk/; revision=3511
2002-09-17 20:35:22 +00:00
guido
11e344c9df fix calculation of InitSize and correctly set edx in the trap frame
svn path=/trunk/; revision=3510
2002-09-17 16:41:22 +00:00
Hartmut Birr
28bdb2c847 Fixed a wrong length in CdfsReadFile.
svn path=/trunk/; revision=3509
2002-09-15 22:26:52 +00:00
Hartmut Birr
520643c107 Added support for multi session CD's.
svn path=/trunk/; revision=3508
2002-09-15 22:25:05 +00:00
Hartmut Birr
3c54f08801 Added CdfsSetPosition/CdfsSetInformation.
svn path=/trunk/; revision=3507
2002-09-15 22:23:23 +00:00
Hartmut Birr
9083e6bddd Check some attributes in CdfsCreateFile.
svn path=/trunk/; revision=3506
2002-09-15 22:21:40 +00:00
Hartmut Birr
c7c45f9bac Added support for IOCTL_CDROM_READ_TOC.
svn path=/trunk/; revision=3505
2002-09-15 22:19:16 +00:00
guido
c9aa7a8462 Initialisation of debugging and floating point registers in
PsBeginThread*.

svn path=/trunk/; revision=3504
2002-09-15 13:49:57 +00:00
guido
2b22998369 Switch i287 fpu, if present, into protected mode (ignored on i387) and
properly initialize some variables.

svn path=/trunk/; revision=3503
2002-09-15 10:45:05 +00:00
guido
50bd524398 Fix building using gcc-2.95
svn path=/trunk/; revision=3502
2002-09-14 13:10:45 +00:00
guido
347f421015 Ported SORT command form FreeDOS
svn path=/trunk/; revision=3501
2002-09-13 21:40:28 +00:00
Jason Filby
8678f12e61 Initial support for 1BPP
svn path=/trunk/; revision=3500
2002-09-13 20:36:06 +00:00
Hartmut Birr
8b3648cad0 Increased the search buffer for InternalFindFirstFile/InternalFindNextFile.
Changed from single entry to multiple entries in InternalFindNextFile.

svn path=/trunk/; revision=3497
2002-09-13 19:03:40 +00:00
Hartmut Birr
5d53de65e2 Improve converting speed in RtlTimeFieldsToTime/RtlTimeFieldsToTime.
Fixed an error if the month is negativ in RtlTimeFieldsToTime.

svn path=/trunk/; revision=3496
2002-09-13 18:58:36 +00:00
Hartmut Birr
61e3f21f42 Check for CREATE_UNICODE_ENVIRONMENT in CreateProcessA.
svn path=/trunk/; revision=3495
2002-09-13 18:55:31 +00:00
Hartmut Birr
0542fdd563 Use the functions from ntdll in SystemeTimeToFileTime/FileTimeToSystemTime.
svn path=/trunk/; revision=3494
2002-09-13 18:53:17 +00:00
Hartmut Birr
5c88f1916c Fixed some problems which occurs if a directory goes over the sector (2048 byte) boundary.
Save the current directory offset in the ccb for increasing the speed for countinous directory queries.

svn path=/trunk/; revision=3493
2002-09-13 18:51:01 +00:00
Hartmut Birr
eec75375c4 Fixed a buffer overflow if there is given a not null terminated string with a precision parameter.
Reduced some overhead for outputing strings.
Added handling of the precision parameter for counted strings.
Return the outputed character count (or an error) in __vf(w)printf.

svn path=/trunk/; revision=3492
2002-09-13 18:48:42 +00:00
Hartmut Birr
3f316cde99 Fixed a buffer overflow if there is given a not null terminated string with a precision parameter.
Added handling of the precision parameter for counted strings.
Reduced some overhead for strings.

svn path=/trunk/; revision=3491
2002-09-13 18:45:10 +00:00
Hartmut Birr
1950866768 Reduced some overhead for strings.
Added handling of the precision parameter for counted strings.

svn path=/trunk/; revision=3490
2002-09-13 18:43:01 +00:00
guido
8d4571bdf3 Fix case sensitivity problem
svn path=/trunk/; revision=3489
2002-09-12 18:08:54 +00:00
guido
c8227ebcc5 Prevent buffer overflows in vsn(w)printf
svn path=/trunk/; revision=3488
2002-09-12 17:50:42 +00:00
Steven Edwards
19a7100f39 Fixed text output for simple messagebox test
svn path=/trunk/; revision=3487
2002-09-11 22:34:40 +00:00
KJK::Hyperion
0ddd0152c2 Path to SMSS can be now set in the registry value REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Session Manager\Path. The code is temporarily disabled because it hasn't been tested yet
svn path=/trunk/; revision=3486
2002-09-11 19:36:14 +00:00
Robert Dickenson
dc91eccd19 Replaced many CPP modules with C ones. All filenames now lowercase 8.3 format. Now builds as UNICODE or ANSI.
svn path=/trunk/; revision=3485
2002-09-10 02:07:02 +00:00
Robert Dickenson
ef39f0a5aa Removed obsolete cpp modules ready for new imports.
svn path=/trunk/; revision=3484
2002-09-10 02:01:38 +00:00
Steven Edwards
a0797d5f25 added patch submitted by Guido de Jong
svn path=/trunk/; revision=3483
2002-09-09 22:49:00 +00:00
Steven Edwards
f17812383d added patch submitted by Guido de Jong
svn path=/trunk/; revision=3482
2002-09-09 22:36:40 +00:00
Steven Edwards
8d67244770 added patch submitted by Guido de Jong
svn path=/trunk/; revision=3481
2002-09-09 22:27:57 +00:00
Hartmut Birr
4b6d4d065b Added CdfsCleanup.
svn path=/trunk/; revision=3480
2002-09-09 17:27:14 +00:00
Hartmut Birr
b06d4dcc2f Changed initialization/deinitialization of caching.
svn path=/trunk/; revision=3479
2002-09-09 17:26:24 +00:00
Hartmut Birr
b35e9d39b5 Free the DirectorySeachPattern.
svn path=/trunk/; revision=3478
2002-09-09 17:25:39 +00:00
KJK::Hyperion
af0e0e9ab6 Trivial syntax error
svn path=/trunk/; revision=3477
2002-09-08 23:28:11 +00:00
Eric Kohl
5c1d53b4eb Added initial console setup code.
svn path=/trunk/; revision=3476
2002-09-08 18:29:56 +00:00
Casper Hornstrup
f6ca76b756 Reverted latest changes
svn path=/trunk/; revision=3475
2002-09-08 11:16:44 +00:00
Casper Hornstrup
831938b9ee Reverted latest changes
svn path=/trunk/; revision=3474
2002-09-08 10:47:47 +00:00
Casper Hornstrup
17c0b5798e Reverted latest changes.
svn path=/trunk/; revision=3473
2002-09-08 10:23:54 +00:00
Casper Hornstrup
06d3fda385 Fixed declaration of WSHGetWSAProtocolInfo
svn path=/trunk/; revision=3471
2002-09-07 19:40:57 +00:00
Casper Hornstrup
96a7d97dac Fixed declaration of WSHGetWSAProtocolInfo
svn path=/trunk/; revision=3470
2002-09-07 19:20:08 +00:00
Casper Hornstrup
fb914ea8cb Remove some debugging code.
svn path=/trunk/; revision=3469
2002-09-07 17:08:31 +00:00
Casper Hornstrup
59448c64c0 Fixed typo.
svn path=/trunk/; revision=3468
2002-09-07 16:44:12 +00:00
Casper Hornstrup
5f42259b67 Added MSVCRT.DLL private headers.
svn path=/trunk/; revision=3467
2002-09-07 15:18:12 +00:00
Casper Hornstrup
387d432884 Use free Windows DDK and compile with latest MinGW releases.
svn path=/trunk/; revision=3466
2002-09-07 15:13:13 +00:00
Eric Kohl
fb29fa8a10 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.

svn path=/trunk/; revision=3465
2002-09-06 22:38:10 +00:00
Emanuele Aliberti
81a79af1eb USER32.EqualRect(): partial implementation.
svn path=/trunk/; revision=3462
2002-09-05 21:50:53 +00:00
Emanuele Aliberti
17974568f9 Just one more line. Little is known about MCBs.
svn path=/trunk/; revision=3461
2002-09-05 20:41:05 +00:00
Eric Kohl
28da6203e2 Got iso-fs working again.
Implemented very simple setup loader.

svn path=/trunk/; revision=3460
2002-09-05 15:31:45 +00:00
Robert Kopferl
449e39d06a Added some stubs in order to
implement them some time

svn path=/trunk/; revision=3459
2002-09-04 22:19:47 +00:00
Eric Kohl
296c5258a4 Check for a busy device in AtapiInterrupt().
svn path=/trunk/; revision=3458
2002-09-04 21:33:26 +00:00
David Welch
9191240ab4 Added missing file.
svn path=/trunk/; revision=3457
2002-09-04 18:09:31 +00:00
Eric Kohl
3e871a4ef6 Added code to identify the cdrom drive when ReactOS is booted from a CD because the bios does not provide any usable information.
The Boot-CD must be labeled 'REACTOS'.

svn path=/trunk/; revision=3456
2002-09-04 13:58:56 +00:00
David Welch
afe56d0970 Implemented part of window properties support
Convert WM_GETTEXT messages when sending between windows
Added Steven's bitmaps to the user32 resources
Fixed some bugs when creating a DIB
Implemented LoadBitmap

svn path=/trunk/; revision=3455
2002-09-03 22:44:21 +00:00
Casper Hornstrup
068a37b1cd Don't try to build modules that won't build.
Support latest MinGW releases.
Support building on linux.

svn path=/trunk/; revision=3454
2002-09-03 18:44:19 +00:00
Steven Edwards
f8310e0ce2 Added binary resources from Wine for user32.
To be replaced latter by wrc format

svn path=/trunk/; revision=3453
2002-09-02 23:35:00 +00:00
Steven Edwards
9ca848afd6 Fixed another stub for the WINE dlls.
svn path=/trunk/; revision=3452
2002-09-02 20:30:25 +00:00
Steven Edwards
b3a582dbdd Fix export to get WineMine to load.
svn path=/trunk/; revision=3451
2002-09-02 18:48:32 +00:00
David Welch
b163519757 Don't reinitialize the VGA on an enable surface if it is already initialized
Implemented patblt and rectangle fill
Offset drawing by the origin of the DC
Other GUI fixes

svn path=/trunk/; revision=3450
2002-09-01 20:39:56 +00:00
Robert Dickenson
a8c82f2bfb Added some exports.
svn path=/trunk/; revision=3449
2002-09-01 04:27:51 +00:00
Robert Dickenson
96561f80c2 Seem to have missed updating these previously....
svn path=/trunk/; revision=3448
2002-09-01 04:17:05 +00:00
David Welch
c81c209798 Non-client painting fixes.
svn path=/trunk/; revision=3447
2002-08-31 23:18:47 +00:00
KJK::Hyperion
cbc3029db7 Defined missing virtual memory query/set information types
svn path=/trunk/; revision=3446
2002-08-31 18:33:21 +00:00
Eric Kohl
fd7d5a399f Build FREELDR.SYS and SETUPLDR.SYS in a single make run.
Fixed build process for SETUPLDR.SYS.

svn path=/trunk/; revision=3445
2002-08-31 18:09:31 +00:00
Eric Kohl
bd3e14d1f7 Added a workaround for broken BIOSes.
Load SETUPLDR.SYS instead of FREELDR.SYS.
Disabled waiting for key.

svn path=/trunk/; revision=3444
2002-08-31 18:00:25 +00:00
KJK::Hyperion
08d5474187 PSAPI (re)licensed under LGPL to be shared with WinE, as per Steven's request. Interfaces (headers and import library definitions) and trivial sources put in the public domain
svn path=/trunk/; revision=3443
2002-08-31 17:11:24 +00:00
KJK::Hyperion
75cabefb26 LGPL 2.1
svn path=/trunk/; revision=3442
2002-08-31 17:07:30 +00:00
KJK::Hyperion
a0cbde7bb0 PSAPI: all the annoying stuff (enumeration and search, basically) has been taken care of. Only profiling remains to be implemented.
Check out the subsystem-independent routines in enum/ (FWIW: the whole DLL only imports two calls from kernel32.dll, SetLastError and AreFileApisANSI): they've been tested, and they could make for a great static library, to implement task manager, tlist, ToolHelp API, etc. Maybe a future addition to mingwnt?

svn path=/trunk/; revision=3441
2002-08-31 15:36:56 +00:00
David Welch
c0b94f90f9 Implemented GetAncestor and IsWindowVisible
Save and restore the trap frame around exceptions
Allow nested w32 callbacks

svn path=/trunk/; revision=3440
2002-08-30 02:47:37 +00:00
KJK::Hyperion
6332533037 PSAPI almost finished
svn path=/trunk/; revision=3439
2002-08-29 23:57:54 +00:00
David Welch
3ede8f0814 Fixed when changing the attributes of an area larger than the mapped area.
Unprotect pages before applying relocations
Create a module entry before fixing up imports to support recursive
dependencies
Added missing symbol to user32

svn path=/trunk/; revision=3438
2002-08-29 22:12:16 +00:00
Robert Dickenson
27e2be0d83 Added start of utility application zoomin.
svn path=/trunk/; revision=3437
2002-08-29 20:28:13 +00:00
Robert Dickenson
d173db00ea Added command line handling from wine regedit, removed stdafx rubbish.
Builds cleanly and executes but no run-time testing as yet - beware.

svn path=/trunk/; revision=3436
2002-08-29 18:42:38 +00:00
KJK::Hyperion
0a0f2c9c13 Corrected source paths for Event Log service and RPC subsystem
svn path=/trunk/; revision=3435
2002-08-28 23:13:08 +00:00
Robert Kopferl
6c040588b1 *** empty log message ***
svn path=/trunk/; revision=3434
2002-08-28 22:31:56 +00:00
Jason Filby
69b5fb7882 A few new definitions related to windowing
svn path=/trunk/; revision=3433
2002-08-28 22:03:44 +00:00
Jason Filby
bf5d7b47c9 Initial nonclient code
svn path=/trunk/; revision=3432
2002-08-28 21:58:00 +00:00
Hartmut Birr
444da66580 Replaced 'jmp $+3' with 'jmp label'.
svn path=/trunk/; revision=3431
2002-08-28 20:53:20 +00:00
Robert Kopferl
4bad48b791 added a preliminary WideCharToMultyByte(). This impl. only cuts of the upper 9 Bit and makes no use of NLS - its a Hack
svn path=/trunk/; revision=3430
2002-08-28 19:31:09 +00:00
Robert Dickenson
8a22ec305f Respond to WM_MEASUREITEM with the font height.
svn path=/trunk/; revision=3429
2002-08-28 19:01:49 +00:00
Eric Kohl
5857837550 Added detection of PCI Bus Master Controllers.
svn path=/trunk/; revision=3428
2002-08-28 18:36:18 +00:00
Robert Kopferl
07c788111d added some CP_ definitions
svn path=/trunk/; revision=3427
2002-08-28 17:52:00 +00:00
Robert Kopferl
b767c78d56 added CodePage symbols inside a #if 0
svn path=/trunk/; revision=3426
2002-08-28 17:47:09 +00:00
Hartmut Birr
2fe8ed1c18 *** empty log message ***
svn path=/trunk/; revision=3425
2002-08-28 07:32:39 +00:00
Hartmut Birr
f454afa33c Changed parameters for IoPageRead/IoPageWrite/IoSynchronousPageWrite.
Removed referencing of the event/file object.

svn path=/trunk/; revision=3424
2002-08-28 07:19:10 +00:00
Hartmut Birr
a5a8fc4a5a Removed dereferencing of the event/file object for paging IO.
svn path=/trunk/; revision=3423
2002-08-28 07:17:22 +00:00
Hartmut Birr
2066bfecef Added/enabled IoAcquireRemoveLockEx, IoInitializeRemoveLockEx, IoPageRead,
IoReleaseRemoveLockAndWaitEx, IoReleaseRemoveLockEx.

svn path=/trunk/; revision=3422
2002-08-28 07:15:14 +00:00
Hartmut Birr
1b9c730b99 Moved IoPageRead from io.h to iofuncs.h.
Changed parameters for IoPageRead/IoPageWrite/IoSynchronousPageWrite.
Fixed the length calculation in CcZeroData.

svn path=/trunk/; revision=3421
2002-08-28 07:13:04 +00:00
Hartmut Birr
fdd13c6ff5 Changed the parameters for InterlockedCompareExchange.
svn path=/trunk/; revision=3420
2002-08-28 07:08:26 +00:00
Hartmut Birr
9b2f541051 Set the allocation size in IoCreateFile.
svn path=/trunk/; revision=3419
2002-08-28 07:05:14 +00:00
Hartmut Birr
9ad20399e9 Added memcpy/memset with inline assembler implementation for target i386.
svn path=/trunk/; revision=3418
2002-08-28 07:03:10 +00:00
Brian Palmer
0f2ad47bfb Fix for disk error while Loading FreeLoader... discovered by Dave Albert
In ReadSectorsCHS it was pop'ing values off the stack that hadn't been push'ed

svn path=/trunk/; revision=3417
2002-08-28 04:46:17 +00:00
Steven Edwards
7a32bdf315 update .cvsignore
svn path=/trunk/; revision=3416
2002-08-28 00:03:29 +00:00
Steven Edwards
1810bf3caa add .cvsignore
svn path=/trunk/; revision=3415
2002-08-28 00:03:09 +00:00
Steven Edwards
258b472dd7 copy gstart.exe to C:\reactos\system32
svn path=/trunk/; revision=3414
2002-08-27 23:59:17 +00:00
David Welch
78126b68a6 More painting fixes.
svn path=/trunk/; revision=3413
2002-08-27 23:32:21 +00:00
David Welch
25788364e8 Misc. painting fixes.
svn path=/trunk/; revision=3412
2002-08-27 23:29:40 +00:00
Jason Filby
c75df46270 Minor fix
svn path=/trunk/; revision=3411
2002-08-27 21:20:45 +00:00
Jason Filby
cb6d74f998 BeginPaint and EndPaint now functional
svn path=/trunk/; revision=3410
2002-08-27 20:32:03 +00:00
Robert Dickenson
74c9931dbf Created new module for library IPRTPRIO.DLL
svn path=/trunk/; revision=3409
2002-08-27 13:22:30 +00:00
Hartmut Birr
b6e3b83941 Repleaced wcsicmp with _wcsicmp in ScLookupServiceByServiceName.
wcsicmp is imported from msvcrt.dll and _wcsicmp from ntdll.dll.

svn path=/trunk/; revision=3408
2002-08-27 06:41:58 +00:00
Robert Dickenson
3b451c4642 Added required support for WinHelp exports in user32.lib
svn path=/trunk/; revision=3407
2002-08-27 06:41:33 +00:00
Hartmut Birr
a9a618aeb0 Using ReadCacheSegment for reading a cache segment in MiReadPage.
Fixed the attribute in a call to MmCreateVirtualMapping in MmNotPresentFaultSectionView.
Removed a wrong call to MmUnlockAddressSpace in MmUnmapViewOfSection.

svn path=/trunk/; revision=3406
2002-08-27 06:40:32 +00:00
Robert Dickenson
4463ef833f Added entry points for WinHelpA and WinHelpW exports.
svn path=/trunk/; revision=3405
2002-08-27 06:40:15 +00:00
Hartmut Birr
69b3035df8 Changed from CreateFileW for opening a directory to the new
function InternalOpenDirectoryW. InternalOpenDirectory uses
NtCreateFile instead of CreateFileW.

svn path=/trunk/; revision=3404
2002-08-27 06:38:23 +00:00
Hartmut Birr
efcf4c3d7f Added testing for a valid proccess pointer in
MmWritePagePhysicalAddress/MmPageOutPhysicalAddress.
Moved the call to ObDereferenceObject to the end in
MmWritePagePhysicalAddress/MmPageOutPhysicalAddress.

svn path=/trunk/; revision=3403
2002-08-27 06:36:32 +00:00
Hartmut Birr
06226b583c Added CloseInProcess to the structure OBJECT_HEADER.
Check for close operation in ObReferenceObjectByPointer,
ObpPerformRetentionChecks, ObfReferenceObject.

svn path=/trunk/; revision=3402
2002-08-27 06:34:22 +00:00
Hartmut Birr
9e3bef3b3c Fixed the calculation of the ActiveCount member from structure ERESOURCE.
svn path=/trunk/; revision=3401
2002-08-27 06:31:55 +00:00
Robert Dickenson
58bbc5be5d Created new application template dialog for testing and demonstration.
svn path=/trunk/; revision=3400
2002-08-27 00:53:34 +00:00
David Welch
7a3564314a Added missing prototype.
svn path=/trunk/; revision=3399
2002-08-26 23:22:53 +00:00
David Welch
df75d0d97f Fixes for painting.
svn path=/trunk/; revision=3398
2002-08-26 23:20:54 +00:00
Hartmut Birr
3f6d544a66 Initialized Peb->WindowFlags (instead of Flags) with dwFlags in CreateWindowW.
svn path=/trunk/; revision=3397
2002-08-26 22:07:01 +00:00
David Welch
024738024e 2002-08-26 David Welch <welch@computer2.darkstar.org>
* lib/gdi32/misc/dllmain.c (GdiDllInitialize): Don't initialize
	win32k.sys for each process.
	* subsys/csrss/init.c (CsrServerInitialization): Initialize
	win32k.sys as well.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/process.c (NtCreateProcess): Reference the
	parent process's handle using ExGetPreviousMode.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/misc/dllmain.c (Init): Initialize gdi32 as well.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* iface/addsys/genw32k.c (main, process): Generate a set of
	stubs for csrss as well.

svn path=/trunk/; revision=3396
2002-08-26 13:06:03 +00:00
David Welch
f7c5c8bcd2 Oops, fixed compile errors.
svn path=/trunk/; revision=3395
2002-08-26 12:27:48 +00:00
David Welch
87579ff3f0 Copy all the startup info to the new process.
svn path=/trunk/; revision=3394
2002-08-26 11:24:29 +00:00
Jason Filby
84a242512b DCE header file
svn path=/trunk/; revision=3393
2002-08-25 15:56:54 +00:00
Steven Edwards
2df0829929 Stick the import lib in the right place.
svn path=/trunk/; revision=3392
2002-08-25 10:20:51 +00:00
Robert Dickenson
9971dc596a More CVS sugar.
svn path=/trunk/; revision=3391
2002-08-25 07:22:29 +00:00
Robert Dickenson
9c63868251 Added a whole lot of CVS sugar so I can use WinCVS flat mode more effectively.
svn path=/trunk/; revision=3390
2002-08-25 07:16:37 +00:00
Robert Dickenson
94aa216cf4 Fixed some broken stuff, added some cvs sugur.
svn path=/trunk/; revision=3389
2002-08-25 06:59:34 +00:00
Robert Dickenson
381af4ae02 Fixes for building with __MINGW32_VERSION 2.1
svn path=/trunk/; revision=3388
2002-08-25 06:47:16 +00:00
Jason Filby
1231d02b03 Initial code for NtUserGetDC
svn path=/trunk/; revision=3387
2002-08-24 11:09:17 +00:00
KJK::Hyperion
34b85a88a2 Removed superfluous DPRINTs
svn path=/trunk/; revision=3386
2002-08-24 03:50:49 +00:00
Eric Kohl
bdf9e628c0 Fixed dependency file deletion bug.
svn path=/trunk/; revision=3385
2002-08-24 01:45:37 +00:00
Eric Kohl
4abbed187f Added welcome/autorun application
svn path=/trunk/; revision=3384
2002-08-23 16:17:12 +00:00
Eric Kohl
e8d3ef310d Added welcome/autorun application (test bitmaps)
svn path=/trunk/; revision=3383
2002-08-23 16:15:47 +00:00
Emanuele Aliberti
b07c25b369 Fixes for building the imports libraries.
svn path=/trunk/; revision=3382
2002-08-23 12:41:55 +00:00
Emanuele Aliberti
d4dc1756c4 Makefile fixes to compile.
svn path=/trunk/; revision=3381
2002-08-23 12:40:56 +00:00
Robert Dickenson
0b318e24d3 Added new include file.
svn path=/trunk/; revision=3380
2002-08-23 08:28:43 +00:00
Robert Dickenson
90d386b1c0 Added some exports.
svn path=/trunk/; revision=3379
2002-08-23 08:27:46 +00:00
Robert Dickenson
8f61fc390c Modified to use new include file reactos/include/snmp.h to be committed shortly.
svn path=/trunk/; revision=3378
2002-08-23 08:26:52 +00:00
Robert Dickenson
f4dca9cd17 Added entries for new network applications.
svn path=/trunk/; revision=3377
2002-08-23 08:24:13 +00:00
Robert Dickenson
3a41864fff Created framework for new network utility applications.
svn path=/trunk/; revision=3376
2002-08-23 08:23:28 +00:00
Eric Kohl
ed21a6af20 -Implemented ReadConsoleOutputCharacterA and CsrReadConsoleOutputChar
-Added null pointer check to FillConsoleOutputCharacterA
-Added parameter names and removed 'undocumented' label for
GetConsoleFontSize and GetCurrentConsoleFont
-Added definition of CONSOLE_FONT_INFO struct
-Added call to SetLastError(ERROR_OUTOFMEMORY) to a number of
RtlAllocateHeap return value checks

Patch by Marty Dill

svn path=/trunk/; revision=3375
2002-08-22 15:21:57 +00:00
Brian Palmer
d3991649c5 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.

svn path=/trunk/; revision=3374
2002-08-22 05:33:59 +00:00
Brian Palmer
f64597ef92 Initial commit for utility to install FreeLoader under Linux
svn path=/trunk/; revision=3373
2002-08-21 03:34:01 +00:00
Brian Palmer
367cfa7085 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).

svn path=/trunk/; revision=3372
2002-08-21 03:32:49 +00:00
KJK::Hyperion
d8bd5ccb4a New macros InitializeUnicodeString(), RtlInitUnicodeStringFromLiteral() and UNICODE_STRING_INITIALIZATOR(), for fast, compile-time initialization of UNICODE_STRING variables
svn path=/trunk/; revision=3371
2002-08-20 20:37:19 +00:00
Jason Filby
51f0384fc0 Improved HLine algorithm; improvement carried over to FillSolid
svn path=/trunk/; revision=3370
2002-08-19 22:01:12 +00:00
Eugene Ingerman
6b30cb44dd Added color translation for solid color brushes.
svn path=/trunk/; revision=3369
2002-08-19 21:49:45 +00:00
Jason Filby
5add7bd9d8 Fixed VGADDIFillSolid - now fast, although ugly (will clean it up still)
svn path=/trunk/; revision=3368
2002-08-18 22:11:06 +00:00
Hartmut Birr
92de298b36 - Added a check for valid result pointers in GetDiskFreeSpaceExW.
- Changed from CreateFileW to NtCreateFile in GetVolumeInformationW.
  CreateFileW doesn't allow to open directories.

svn path=/trunk/; revision=3367
2002-08-18 21:07:59 +00:00
Hartmut Birr
0127899031 Rewrote _stat functions. This functions can't use _fstat.
svn path=/trunk/; revision=3366
2002-08-18 21:04:52 +00:00
KJK::Hyperion
82557ffc26 RtlGetProcessHeap() is not a function in Microsoft Windows
svn path=/trunk/; revision=3365
2002-08-18 18:50:27 +00:00
KJK::Hyperion
8a7fe191c9 CreateFileW: corrected a couple of buglets, added handling of GENERIC_ALL access, packed with DPRINTs to catch the bug that breaks gcc and cmd (sorry, last time I touch something I can't test)
svn path=/trunk/; revision=3364
2002-08-18 16:01:11 +00:00
Jason Filby
6c96aec67d Use clip.h instead of enum.h
svn path=/trunk/; revision=3363
2002-08-18 13:55:11 +00:00
Eugene Ingerman
95d847d794 1. CLIPOBJ_bEnum, CLIPOBJ_cEnumStart - implemented internal clip region enumeration.
2. Implemented PaintRgn. Added test to gditest.
3. Removed enum.c enum.h (duplicates for clip.c clip.h).

svn path=/trunk/; revision=3362
2002-08-18 07:02:57 +00:00
KJK::Hyperion
cfd7b8b886 Cleaned up CreateFileW. Please check out the FIXMEs
svn path=/trunk/; revision=3361
2002-08-18 04:20:21 +00:00
KJK::Hyperion
9a20837e5c Added definition of FILE_OPEN_FOR_RECOVERY
svn path=/trunk/; revision=3360
2002-08-18 04:19:27 +00:00
Robert Dickenson
aca2356310 Minor cosmetic changes to define, fixup workaround of windres bug.
svn path=/trunk/; revision=3359
2002-08-17 17:26:14 +00:00
Robert Dickenson
2cac3f921d Rudimentiary drivebar support added.
svn path=/trunk/; revision=3358
2002-08-17 17:23:18 +00:00
Hartmut Birr
7376639aea Call VfatSetAllocationSizeInformation only if the file size is increased (VfatWrite).
svn path=/trunk/; revision=3357
2002-08-17 16:51:07 +00:00
Robert Dickenson
85acea80c6 Added new module for iphlpapi.dll
svn path=/trunk/; revision=3356
2002-08-17 16:23:13 +00:00
Robert Dickenson
4115f5826a Newline at EOF to fix warning
svn path=/trunk/; revision=3355
2002-08-17 16:18:54 +00:00
Robert Dickenson
d078405603 Added TOOLS_PATH macro and default target similar to that in reactos/rules.mak
svn path=/trunk/; revision=3354
2002-08-17 16:06:29 +00:00
Robert Dickenson
faa53591e2 Added NDISVERSION define for our target NDIS support level, currently commented out pending testing.
svn path=/trunk/; revision=3353
2002-08-17 16:02:08 +00:00
Robert Dickenson
8141b34d44 fixed clean rule to match other makefile standard
svn path=/trunk/; revision=3352
2002-08-17 15:58:38 +00:00
Robert Dickenson
ee57fdbbc9 Fixed typo in header comment.
svn path=/trunk/; revision=3351
2002-08-17 15:57:22 +00:00
Robert Dickenson
2bcc926b73 Added new module for snmpapi.dll
svn path=/trunk/; revision=3350
2002-08-17 15:48:21 +00:00
Hartmut Birr
4b6ce94d5d Disabled/removed debug messages.
svn path=/trunk/; revision=3349
2002-08-17 15:46:36 +00:00
Hartmut Birr
d7f19d41ea Changed the values for the page file size from the registry from Byte to MByte.
svn path=/trunk/; revision=3348
2002-08-17 15:31:03 +00:00
Hartmut Birr
e0c35e0076 Zero out the page in MmTransferOwnershipPage.
svn path=/trunk/; revision=3347
2002-08-17 15:29:18 +00:00
Hartmut Birr
c463dfec1b Change the type of the parameter PhysicalAddress in MmDisableVirtualMapping.
svn path=/trunk/; revision=3346
2002-08-17 15:27:54 +00:00
Hartmut Birr
9443ca8347 Set the extension length to 0 if there is no extension (RtlGenerate8dot3Name).
svn path=/trunk/; revision=3345
2002-08-17 15:23:50 +00:00
Hartmut Birr
ea5ed93302 Fixed the size for memory unmapping from boot process.
svn path=/trunk/; revision=3344
2002-08-17 15:22:33 +00:00
Hartmut Birr
4e9dc21691 Removed freeing of IRP's MDL in ScsiClassIoComplete.
svn path=/trunk/; revision=3343
2002-08-17 15:21:12 +00:00
Hartmut Birr
675afa7691 Setup the correct stack location for completion routines in IofCompleteRequest.
This change correct also the called completion routine in IoSecondStageCompletion
(ntoskrnl\io\cleanup.c).

svn path=/trunk/; revision=3342
2002-08-17 15:20:33 +00:00
Hartmut Birr
74e8579c8f Removed the absolute path (c:\reactos\system32) to smss.exe.
svn path=/trunk/; revision=3341
2002-08-17 15:17:59 +00:00
Robert Dickenson
9baabd888d Removed modules to go into shell32. New control panel launcher based on same wine program.
svn path=/trunk/; revision=3340
2002-08-17 15:16:38 +00:00
Hartmut Birr
6130c02167 - Release streaming file object for directories in vfatReleaseFCB.
- Removed initialization of caching in vfatAttacheFCBToFileObject.
  The cache for files is initialized at the first read/write operation.
- Merged vfatExtendSpace and VfatSetAllocationSizeInformation in one function.

svn path=/trunk/; revision=3339
2002-08-17 15:15:50 +00:00
Hartmut Birr
01d5ad9279 - Disabled write caching for meta data (FAT, directories) in
CcSetDirtyPinedData. There is no working shutdown function
  for writing back each modified cache segment. A reboot or
  crash can damage the disk.
- Added CcRosReferenceCache and CcRosDereferenceCache.
- Check at each call to CcRosInitializeFileCache if the cache was
  initialized for the file stream by a previous call to this function.
- Check at each call to CcRosReleaseFileCache if this is possible
  to delete the caching for the file stream.

svn path=/trunk/; revision=3338
2002-08-17 15:14:26 +00:00
Hartmut Birr
572bbc6ea5 Increment/Decrement the cache reference count on each create/delete
operation for a section. This prevents the cache from uninitialization
for a mapped file (data or image) at the cleanup of a given file object
or force the uninitialization if the last section of a file is deleted.

svn path=/trunk/; revision=3337
2002-08-17 15:12:49 +00:00
David Welch
c62229b967 2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): Ensure the
	process isn't freed in the middle of our operations.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/finfo.c (VfatSetAllocationSizeInformation): Fixed.

svn path=/trunk/; revision=3336
2002-08-17 14:14:20 +00:00
David Welch
1a46ca7d8a 2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/create.c (PiDeleteThread): Don't dereference
	the thread's process while holding the thread list lock.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmMapViewOfSection): Check there is
	enough space for all parts of an image before mapping it; if
	there isn't enough space free at the preferred base address
	then try to choose a different one.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/mpw.c (MmInitMpwThread): Run the MPW thread at
	idle priority.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/kmap.c (ExUnmapPage, ExAllocatePageWithPhysPage,
	MiFreeNonPagedPoolRegion, MiAllocNonPagedPoolRegion): Maintain
	a hint of the next free page; makes running with whole page
	allocation more bearable.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/anonmem.c (MmPageOutVirtualMemory): Show an
	out of swap space message if we are out of swap space.
	* ntoskrnl/mm/section.c (MmPageOutSectionView): Show an
	out of swap space message if we are out of swap space.
	* ntoskrnl/mm/pagefile.c (MmAllocSwapPage): Don't automatically
	show an out of swap space message on failure.
	* ntoskrnl/mm/pagefile.c (MmShowOutOfSpaceMessagePagingFile): New
	function to notify the user that the pagefile is full.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* drivers/lib/zlib/Makefile: Create a dummy zlib.sym

svn path=/trunk/; revision=3335
2002-08-17 01:42:03 +00:00
Eugene Ingerman
1052bedeed Updated memory area const names.
svn path=/trunk/; revision=3334
2002-08-16 22:03:07 +00:00
David Welch
99c4e70f22 2002-08-16 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/npool.c (ExAllocateWholePageBlock): Converted
	to use PHYSICAL_ADDRESS type for page address.

2002-08-16  David Welch  <welch@computer2.darkstar.org>

	* subsys/win32k/ntuser/class.c (W32kCreateClass): Corrected
	typo when calculating the offset into the class object to
	put the class name string.

2002-08-16  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/thread.c (PsDispatchThreadNoLock): Don't call
	the reaper function directly; set an event to wake up a seperate
	reaper thread.
	* ntoskrnl/ps/thread.c (PsReaperThreadMain): New function that
	waits for a notification and then calls PsReapThreads.
	* ntoskrnl/ps/thread.c (PsInitThreadManagement): Create the
	reaper thread.

svn path=/trunk/; revision=3333
2002-08-16 01:39:17 +00:00
David Welch
a4e3a21cfa Export LdrFindResourceDirectory_U
Remove LdrFindResourceDirectory_U stub

svn path=/trunk/; revision=3332
2002-08-15 16:11:01 +00:00
David Welch
8cec2e609d 2002-08-14 David Welch <welch@computer2.darkstar.org>
* subsys/smss/init.c (SmPagingFilesQueryRoutine): If possible
	take the size of the paging file from the registry.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmCreateDataFileSection): Extend the
	section if necessary.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/pagefile.c (NtCreatePagingFile): Set the file
	size using the FileAllocationInformation class.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/anonmem.c (MmWritePageVirtualMemory): Implemented
	function to write anonymous memory pages to the swap file.
	* ntoskrnl/mm/anonmem.c (MmFreeVirtualMemoryPage): Free any
	swap page associated with the page.
	* ntoskrnl/mm/mpw.c (MmWriteDirtyPages): New function to find
	pages to write to disk.
	* ntoskrnl/mm/mpw.c (MmMpwThreadMain): Implemented MPW functionality.
	* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): New function
	to write a single page back to disk.
	* ntoskrnl/mm/rmap.c (MmSetCleanAllRmaps, MmSetDirtyAllRmaps,
	MmIsDirtyPageRmap): New rmap function to support the MPW thread.
	* ntoskrnl/mm/section.c (MmWritePageSectionView): Implemented
	function to write back section pages.
	* ntoskrnl/mm/section.c (MmFreeSectionPage): Free any swap
	entry associated with the page; mark pages shared with
	the cache as dirty if necessary.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ldr/loader.c (LdrPEProcessModule): Set name of
	the module into the module text structure.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/io/rw.c (NtReadFile, NtWriteFile): Use the correct
	test for whether to wait for the completion of i/o.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cm/ntfunc.c (NtFlushKey): Request synchronous i/o
	from NtOpenFile.
	* ntoskrnl/cm/regfile (CmiInitPermanentRegistryHive): Request
	synchronous i/o from NtCreateFile.
	* ntoskrnl/dbg/kdb_stabs.c (LdrpLoadModuleSymbols): Request
	synchronous i/o from NtOpenFile.
	* ntoskrnl/ldr/sysdll.c (LdrpMapSystemDll): Request synchronous i/o
	from NtOpenFile.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/view.c (CcRosSuggestFreeCacheSegment): Maintain the
	correct reference count.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/view.c (CcRosFlushCacheSegment): New function to
	write back a modified cache segment.
	* ntoskrnl/cc/view.c (CcRosFlushDirtyPages): New function to
	flush some dirty pages from the cache.
	* ntoskrnl/cc/view.c (CcRosMarkDirtyCacheSegment): New function to
	mark a cache segment modified while mapped into memory as dirty.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/pin.c (CcMapData, CcUnpinData, CcSetDirtyPinnedData):
	Store the dirty status in the BCB; don't write back dirty data
	immediately.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* include/ntos/mm.h: Added SEC_XXXX defines from 'Windows NT/2000
	Native API Reference'

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/ea.c (VfatSetExtendedAttributes): Empty
	placeholder for extended attribute functions.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/finfo.c (VfatSetAllocationSizeInformation):
	Added function to set allocation size.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/fcb.c (vfatFCBInitializeCache): Renamed
	to vfatFCBInitializeCacheFromVolume.
	* drivers/fs/vfat/fcb.c (vfatMakeFCBFromDirEntry): Don't
	initialise the cache with a file object representing the
	volume unless the FCB is for a directory.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/create.c (VfatPagingFileCreate): Added a
	new function for handling paging file only code.
	* drivers/fs/vfat/create.c (VfatSupersedeFile): Added a
	new function for doing a file supersede.
	* drivers/fs/vfat/create.c (VfatCreateFile): Reformatted and
	adjusted control flow. Set allocation size and extended attributes
	on create.
	* drivers/fs/vfat/create.c (VfatCreate): Removed goto.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Renamed
	updEntry to VfatUpdateEntry.
	* drivers/fs/vfat/close.c (VfatCloseFile): Renamed
	updEntry to VfatUpdateEntry.
	* drivers/fs/vfat/dirwr.c (updEntry): Renamed to
	VfatUpdateEntry.
	* drivers/fs/vfat/dirwr.c (addEntry): Renamed to
	VfatAddEntry.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* apps/tests/sectest/sectest.c (main): Fixed formatting.

svn path=/trunk/; revision=3331
2002-08-14 20:58:39 +00:00
Eric Kohl
54865265f0 Implemented and fixed several ACL and SD functions.
Patch by Alexandru Matei.

svn path=/trunk/; revision=3330
2002-08-13 20:41:22 +00:00
Eric Kohl
ce083074cf Added missing newline
svn path=/trunk/; revision=3329
2002-08-10 21:58:14 +00:00
Eric Kohl
5e4fc8c66d Added compression stubs
svn path=/trunk/; revision=3328
2002-08-10 21:57:41 +00:00
David Welch
383eddd11e 2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/i386/page.c (MmSetPageProtect): Fixed
	behaviour when called on the system address space.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/virtual.c (MmQueryAnonMem, MmProtectAnonMem,
	NtAllocateVirtualMemory, NtFreeVirtualMemory): Renamed
	segments to regions; moved region code to seperate file.
	Implemented NtQueryVirtualMemory and NtProtectVirtualMemory
	for anonymous memory areas.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/anonmem.c: Moved functions relating to
	areas created with NtAllocateVirtualMemory to a
	seperate file.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmQuerySectionView): Implemented
	NtQueryVirtualMemory for section views.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmAccessFaultSectionView,
	MmNotPresentFaultSectionView, MmProtectSectionView,
	MmMapViewOfSegment, MmAlterViewAttributes): Implemented
	NtProtectVirtualMemory for section views.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/main.c: Removed SEH test code.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* lib/ntdll/ldr/utils.c (LdrFixupImports): Remove the readonly
	protection from the IAT before writing to it.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* lib/ntdll/ldr/utils.c (LdrAdjustDllName): Properly null terminate
	the base name of the DLL.

2002-08-10  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ldr/loader.c (LdrPEProcessModule): Set the text segment
	of modules to readonly after loading.

svn path=/trunk/; revision=3327
2002-08-10 16:41:20 +00:00
Eric Kohl
6809339d27 Fixed several function prototypes.
svn path=/trunk/; revision=3326
2002-08-09 22:57:48 +00:00
Brian Palmer
10e943e65d Preliminary EXT2 boot sector code
Fixed bug in FAT32 boot sector where it wasn't properly updating the sector load address

svn path=/trunk/; revision=3325
2002-08-09 17:34:24 +00:00
David Welch
95fbecfd46 2002-08-09 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/create.c (NtCreateThread): Call PsSuspendThread
	if NtCreateThread has CreateSuspended as TRUE.
	* ntoskrnl/ps/suspend.c (PsSuspendThread, PsResumeThread,
	PiSuspendThreadKernelRoutine): Fixed suspend functionality.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/i386/usertrap.c (print_user_address): Copy
	the LDR variable from the right address.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/apc.c (KiDeliverNormalApc): Check for
	kernel APCs pending on exit from the kernel.
	* ntoskrnl/ke/apc.c (KiDeliverNormalApc, KiDeliverUserApc,
	KiDeliverApc): Set the APC's inserted flag to FALSE after
	removing it from the thread's queue.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* lib/kernel32/thread/thread.c (ThreadStartup): Don't
	call DLL entrypoints; this is done by LdrInitializeThunk.
	* lib/ntdll/ldr/startup.c (LdrInitializeThunk): Call
	DLLs in initialization order; take the loader lock before
	calling.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* apps/tests/thread/thread.c (main): Test suspend and
	resume functionality.

svn path=/trunk/; revision=3324
2002-08-09 17:23:57 +00:00
David Welch
5a801d58c3 2002-08-08 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section (NtQuerySection): Return the
	right result length.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/usertrap.c (print_user_address): Check for
	a NULL LDR structure in the PEB; copy the LDR pointer in
	safely.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/apc.c (KiDeliverUserApc): Deliver all present
	APCs; release the APC spinlock while acccessing user memory.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* include/internal/ps.h: Adjusted offsets into the ETHREAD
	structure.
	* include/internal/ps.h: Removed redundant members from the
	KTHREAD structure.
	* ntoskrnl/ke/kthread.c (KeInitializeThread): Removed
	redundant members from the KTHREAD structure.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/dbg/kdb.c (KdbEnterDebuggerException): New
	function to enter the debugger on an exception.
	* ntoskrnl/kd/kdebug.c (KdInitSystem): Initialize the
	local kernel debugger if enabled.
	* ntoskrnl/ke/catch.c (KiDispatchException): Enter the
	local kernel debugger on an exception.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* include/ntdll/ldr.h: Added definition for a DLL entrypoint.
	* lib/kernel32/process/create.c (KlCreateFirstThread): Put
	the argument to the NtProcessStartup function on the stack.
	* lib/kernel32/process/create.c (KlInitPeb): Read the
	base address of the new image from the PEB.
	* lib/kernel32/process/create.c (CreateProcessW): Start the
	first thread at the entrypoint of the new image.
	* lib/ntdll/ldr/startup.c (LdrInitializeThunk): If the
	function is called after the initial startup then just call the
	entrypoints for the loaded DLLs with DLL_THREAD_ATTACH. Don't
	call the entrypoint of the image.
	* lib/ntdll/rtl/process.c (RtlpCreateFirstThread): Put the
	argument to the NtProcessStartup function on the stack.
	* lib/ntdll/rtl/process.c (KlInitPeb): Read the base address of
	the new image from the PEB.
	* lib/ntdll/rtl/process.c (RtlCreateUserProcess): Start the
	first thread at the entrypoint of the new image.
	* ntoskrnl/ke/i386/bthread.S (PsBeginThreadWithContextInternal):
	Use the system call path to begin a usermode thread.
	* ntoskrnl/ke/i386/thread.c (Ke386InitThreadWithContext): Convert
	the supplied context into a trap frame.
	* ntoskrnl/ldr/init.c (LdrLoadInitialProcess): Put the PEB argument
	to the NtProcessStartup function on the new stack; start the
	first thread at the entrypoint of the image.
	* ntoskrnl/ps/create.c (NtCreateThread): Create an APC to call
	LdrInitializeThunk in the context of a new thread before its
	entrypoint.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Uninitialise
	the cache on file cleanup.
	* drivers/fs/vfat/fcb.c (vfatReleaseFcb): Don't uninitialise
	the cache on file close.
	* ntoskrnl/cc/copy.c: Renamed zero page global variable.
	* ntoskrnl/cc/view.c: Added cache delete function.

svn path=/trunk/; revision=3323
2002-08-08 17:54:16 +00:00
Brian Palmer
7cbe6176ad Defined FAST_SYMLINK_MAX_NAME_SIZE
svn path=/trunk/; revision=3322
2002-08-08 04:46:46 +00:00
Brian Palmer
793d60fcff Changes in v1.7.2 (8/7/2002) (brianp)
- Fragment size must be equal to the block size

svn path=/trunk/; revision=3321
2002-08-08 04:38:43 +00:00
Brian Palmer
3cb41fbb8b Changes in v1.7.1 (8/7/2002) (brianp)
- Symbolic links on EXT2/3 are now supported

svn path=/trunk/; revision=3320
2002-08-08 04:28:08 +00:00
Brian Palmer
f5ac842ed4 Fix for compiling in non-debug (release) mode. (Reduces binary size from 128k to 82k currently)
svn path=/trunk/; revision=3319
2002-08-07 05:37:07 +00:00
Brian Palmer
70d2e3812d 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)

(isn't this an awesome commit? ;-) Just look at that list of files)

svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
Jason Filby
aac9125953 Updated version file to 0.0.20
svn path=/trunk/; revision=3316
2002-08-05 19:57:47 +00:00
Robert Dickenson
aa405ed6f1 Added combobox to drivebar, yet to get working. Whole application needs alot of cleanup.
Fixed up makefile plus dependancies and now builds (and runs) with ros-tools.

svn path=/trunk/; revision=3315
2002-08-04 18:40:49 +00:00
Eugene Ingerman
c724d71f77 Fixed a bug in the new Engxxx objects code.
svn path=/trunk/; revision=3314
2002-08-04 18:21:59 +00:00
Eugene Ingerman
7325b379e2 Rewrote gdi (Engxxx) objects.
svn path=/trunk/; revision=3313
2002-08-04 09:55:11 +00:00
Eugene Ingerman
94706d121d Added more tests to gditest.c
svn path=/trunk/; revision=3312
2002-08-04 09:53:19 +00:00
Eugene Ingerman
d9243a0a4b Removed deprecated file.
svn path=/trunk/; revision=3311
2002-08-04 09:52:05 +00:00
Eric Kohl
cfa1943b4f Don't alloc an extra console upon startup.
Added correct calculation of free disk size for drives larger than 2GB.

svn path=/trunk/; revision=3309
2002-08-01 10:29:18 +00:00
Eric Kohl
4201812a7e Added RtlCopyLuidAndAttributesArray() and RtlCopySidAndAttributesArray().
svn path=/trunk/; revision=3308
2002-07-29 15:37:06 +00:00
Eric Kohl
5295bac977 Added cache flush counters.
svn path=/trunk/; revision=3307
2002-07-29 15:29:58 +00:00
Brian Palmer
410b3629c3 Changes in v1.6.2 (7/28/2002) (brianp)
- Fix for GetFatEntry16 bug (fathelp.asm) by Mike Lerwill

svn path=/trunk/; revision=3306
2002-07-29 06:49:58 +00:00
Eric Kohl
8e93e09163 Added missing fastcall list functions
svn path=/trunk/; revision=3305
2002-07-27 13:02:37 +00:00
Robert Kopferl
d35d4191c1 -Nearly compiles doscalls
-Added  an mixing header to have ntddk and os2 included without conflicts

svn path=/trunk/; revision=3304
2002-07-26 00:23:13 +00:00
Eric Kohl
554d0a03f4 Implemented RtlTimeToElapsedTimeFields().
svn path=/trunk/; revision=3303
2002-07-25 16:58:58 +00:00
Eric Kohl
873c86599e Implemented RtlTimeToElapsedtimeFields().
svn path=/trunk/; revision=3302
2002-07-25 16:57:49 +00:00
Eric Kohl
9a04ad5955 Added compression functions (not usabel yet).
svn path=/trunk/; revision=3301
2002-07-25 13:18:31 +00:00
Eric Kohl
a79a9cbba6 Implemented IoCheckDesiredAccess() and IoGetInitialStack().
svn path=/trunk/; revision=3300
2002-07-24 17:49:31 +00:00
Robert Kopferl
d6e258cc9e free os2.h version
svn path=/trunk/; revision=3299
2002-07-23 13:00:46 +00:00
Robert Kopferl
a6c291342a *** empty log message ***
svn path=/trunk/; revision=3298
2002-07-23 13:00:11 +00:00
Robert Kopferl
77fce8841d update
svn path=/trunk/; revision=3297
2002-07-23 12:30:01 +00:00
Robert Dickenson
58d70d404f Added control panel applet icons to the list control imagelist. Next I'll make them lauch!
svn path=/trunk/; revision=3296
2002-07-23 08:24:54 +00:00
Jurgen van Gael
3ce45b038f OpenSCManager waits for services.exe to initialize
svn path=/trunk/; revision=3295
2002-07-23 08:16:05 +00:00
Eugene Ingerman
57a74268f7 Fixed bugs in region operations code (should run region tests correctly now)
svn path=/trunk/; revision=3294
2002-07-23 08:03:15 +00:00
Brian Palmer
ac37c58b98 Fix for disk caching while doing drive remapping
svn path=/trunk/; revision=3293
2002-07-23 06:46:55 +00:00
Robert Dickenson
0e96a84263 Whatever it is I changed, it's now backed up before I go to bed.
svn path=/trunk/; revision=3292
2002-07-22 21:12:26 +00:00
Robert Dickenson
916c8b493b Basic Control Panel created.
svn path=/trunk/; revision=3291
2002-07-22 21:05:41 +00:00
Eric Kohl
c1652a2ee6 Read drive number from the command line.
Added some sanity checks.

svn path=/trunk/; revision=3290
2002-07-22 17:53:12 +00:00
Eugene Ingerman
5faa3537c3 Missing file.
svn path=/trunk/; revision=3289
2002-07-22 17:42:52 +00:00
Robert Dickenson
63850f4969 Added missing file and some hex string conversion routines. Now displays registry data.
svn path=/trunk/; revision=3288
2002-07-22 14:41:40 +00:00
Steven Edwards
11a446cf74 Commited as binary
svn path=/trunk/; revision=3287
2002-07-22 11:12:38 +00:00
Steven Edwards
b2e2bb7f04 Removed to recommit as binary
svn path=/trunk/; revision=3286
2002-07-22 11:11:55 +00:00
Eugene Ingerman
2bda045a8e Added GetRegionData gdi function. Added region test. Fixed some bugs.
svn path=/trunk/; revision=3285
2002-07-22 07:55:49 +00:00
Brian Palmer
1aa76f94bd Added BIOS drive mapping functionality
svn path=/trunk/; revision=3284
2002-07-22 03:44:08 +00:00
Eric Kohl
c747481470 Moved WS_EX_CLIENTEDGE to the correct location.
svn path=/trunk/; revision=3283
2002-07-21 22:57:06 +00:00
Robert Dickenson
48266252bf Almost completed dialog layouts contributed by Ian McLean.
svn path=/trunk/; revision=3282
2002-07-21 18:28:26 +00:00
David Welch
45d7740d94 Renamed kernel.map -> ntoskrnl.map
svn path=/trunk/; revision=3280
2002-07-20 21:49:35 +00:00
Eugene Ingerman
d525647699 Use kernel.map (text format ntoskrnl symbols) instead of ntosknl.sym in pice. Fixed several bugs.
svn path=/trunk/; revision=3279
2002-07-20 20:27:22 +00:00
Jurgen van Gael
6fc62fb9b0 GCC 3.1 compatibility
svn path=/trunk/; revision=3278
2002-07-20 16:54:58 +00:00
Robert Dickenson
0efb5bd01d Updated version information.
svn path=/trunk/; revision=3277
2002-07-20 16:43:35 +00:00
Robert Dickenson
f3e89b62de Added new section to support default applications:
/* ReactOS default Application Registry Root Path */
#define RES_STR_ROSAPP_REGISTRY_ROOT	"Software\\ReactWare"

svn path=/trunk/; revision=3276
2002-07-20 16:38:55 +00:00
Robert Dickenson
e6ccc243b9 Updated with changes to version information.
svn path=/trunk/; revision=3275
2002-07-20 16:37:12 +00:00
Robert Dickenson
51278afbc0 Updated with an improvement to the registry save/restore module.
svn path=/trunk/; revision=3274
2002-07-20 16:35:34 +00:00
Robert Dickenson
f4629b5599 Updated with latest progress. How does one read a default registry value???
svn path=/trunk/; revision=3273
2002-07-20 16:29:26 +00:00
Robert Dickenson
ad319a46cf Updated with latest progress. Started on a worker thread for network enumerating and file change notifications.
svn path=/trunk/; revision=3272
2002-07-20 16:24:45 +00:00
Eric Kohl
86dc3a88d2 Added check for loaded system start drivers.
Create control pipe before a service is started.

svn path=/trunk/; revision=3271
2002-07-20 13:34:10 +00:00
Eric Kohl
ed77972722 Minor improvements.
svn path=/trunk/; revision=3270
2002-07-20 13:32:26 +00:00
Eric Kohl
951f903bda Added some experimental code
svn path=/trunk/; revision=3269
2002-07-20 13:31:34 +00:00
Eric Kohl
db6e84c404 Implemented FileAllInformation.
svn path=/trunk/; revision=3268
2002-07-20 11:44:37 +00:00
Eric Kohl
aa3245dd92 Fixed [Nt/Zw]QueryAttributeFile() and [Nt/Zw]QueryFullAttributesFile() prototypes.
svn path=/trunk/; revision=3267
2002-07-20 01:00:34 +00:00
Eric Kohl
41598868d1 Implemented FileNetworkOpenInformation.
svn path=/trunk/; revision=3266
2002-07-20 00:57:36 +00:00
Eric Kohl
f91b107c89 Fixed 'clean' rule because rdel cannot delete itself.
svn path=/trunk/; revision=3265
2002-07-19 12:31:49 +00:00
Eugene Ingerman
72c8bf3db3 Fixed typo. Now can disable kernel debugger by setting KDBG = 0 in config.
svn path=/trunk/; revision=3264
2002-07-19 03:56:47 +00:00
Steven Edwards
0504b08b95 Cleanup make and install, Moved all of the incompleate stuff to the end of make.
svn path=/trunk/; revision=3263
2002-07-19 02:11:11 +00:00
Eugene Ingerman
8d9c181908 Implemented some of gdi region functions.
svn path=/trunk/; revision=3262
2002-07-18 21:59:18 +00:00
Eugene Ingerman
52102e72fc Export MmCopyFrom/ToCaller from ntoskrnl. Added MulDiv.
svn path=/trunk/; revision=3261
2002-07-18 21:49:59 +00:00
Robert Dickenson
76e2e2e22f Added listview updating.
svn path=/trunk/; revision=3260
2002-07-18 20:27:52 +00:00
Eric Kohl
8553d39828 Moved _SET_PARTITON_INFORMATION to a common location.
svn path=/trunk/; revision=3259
2002-07-18 19:56:31 +00:00
Eric Kohl
a54c9ddecb Fixed a typo.
svn path=/trunk/; revision=3258
2002-07-18 18:18:17 +00:00
Robert Dickenson
b3b4923b11 Added properties dialog.
svn path=/trunk/; revision=3257
2002-07-18 18:18:12 +00:00
Robert Dickenson
53dd918713 Updated with cleanup of treeview module.
svn path=/trunk/; revision=3256
2002-07-18 18:16:42 +00:00
Eric Kohl
fb4e8713ea Added _purecall().
svn path=/trunk/; revision=3255
2002-07-18 18:15:09 +00:00
Eric Kohl
dbd109d357 Removed some obsolete definitions of __unit64.
Added a few missing newlines.

svn path=/trunk/; revision=3254
2002-07-18 18:12:59 +00:00
Eric Kohl
b0c64e3f9f Added IOCTL_DISK_SET_PARTITION_INFO.
Added checks for user induced errors.
Added basic shutdown/flush support.

svn path=/trunk/; revision=3253
2002-07-18 18:09:59 +00:00
Eric Kohl
3b8674494e Build and install beep and null driver.
svn path=/trunk/; revision=3252
2002-07-18 00:31:40 +00:00
Eric Kohl
99197ba099 Reported sector size must always be a power of 2.
svn path=/trunk/; revision=3251
2002-07-18 00:30:22 +00:00
Eric Kohl
fc1193592b Fixed access to non-existent device extension.
svn path=/trunk/; revision=3250
2002-07-18 00:29:19 +00:00
David Welch
2e467c56a3 Symbol loading working in kdb.
svn path=/trunk/; revision=3249
2002-07-18 00:25:31 +00:00
David Welch
90bd33d955 Print stack frames as densely as possible.
svn path=/trunk/; revision=3248
2002-07-17 23:11:37 +00:00
David Welch
d7c17b103d Updated .cvsignore file
svn path=/trunk/; revision=3247
2002-07-17 22:57:58 +00:00
David Welch
bbeb8dbe36 KDB stabs file.
svn path=/trunk/; revision=3246
2002-07-17 22:57:18 +00:00
David Welch
e646abc58c Fixed null pointer exceptions.
Removed private install script.
Moved stabs reading to a seperate file.
Added hooks for the kernel debugger.

svn path=/trunk/; revision=3245
2002-07-17 22:56:11 +00:00
David Welch
82ad78524a Remove crash testing code.
svn path=/trunk/; revision=3244
2002-07-17 21:28:37 +00:00
David Welch
9d6848e6ed Fixed some bugs.
svn path=/trunk/; revision=3243
2002-07-17 21:04:57 +00:00
Robert Dickenson
21214f6b8c Updated treeview and listview functionality.
svn path=/trunk/; revision=3242
2002-07-16 23:22:19 +00:00
Robert Dickenson
1ad1b97103 Updated treeview and listview functionality.
svn path=/trunk/; revision=3241
2002-07-16 22:18:29 +00:00
Robert Dickenson
74571d0428 Added save and restore of calculator mode using registry.
svn path=/trunk/; revision=3240
2002-07-16 21:54:17 +00:00
Robert Dickenson
8e12d121dc Added framework for new application - calc.
svn path=/trunk/; revision=3239
2002-07-16 19:15:12 +00:00
Steven Edwards
3c63d04d0d Fixed warning about missing include
svn path=/trunk/; revision=3238
2002-07-15 22:48:56 +00:00
Steven Edwards
83ed1ffe5f added hcalc target
svn path=/trunk/; revision=3237
2002-07-15 22:41:07 +00:00
Steven Edwards
9eb8af7e68 Added Makefile for hcalc calc replacement. Works.
svn path=/trunk/; revision=3236
2002-07-15 22:40:36 +00:00
Steven Edwards
7a09dc279a Fix no new line at end of file gcc 3.1 warrnings
svn path=/trunk/; revision=3235
2002-07-15 22:29:32 +00:00
Robert Dickenson
a4ae51d977 Minor mod.
svn path=/trunk/; revision=3234
2002-07-15 20:02:06 +00:00
Robert Dickenson
2f8748afe5 Updates with progress on calling standard dialogs, FileOpen, SelectFont and more...
svn path=/trunk/; revision=3233
2002-07-15 20:01:15 +00:00
Robert Dickenson
cc89fd7bba Updates with progress on TreeView, ChildWnd type and more...
svn path=/trunk/; revision=3232
2002-07-15 20:00:02 +00:00
Hartmut Birr
4f0371f4af Changed the ordering for allocating the inquiry buffer and zeroing the srb in ScsiPortInquire.
svn path=/trunk/; revision=3231
2002-07-15 18:25:17 +00:00
Eric Kohl
3886e2f66b Dump the first MFT cluster and some file attributes.
svn path=/trunk/; revision=3230
2002-07-15 15:37:33 +00:00
Steven Edwards
d34f38d43f Fix end of line warning for gcc 3.1
svn path=/trunk/; revision=3229
2002-07-15 11:26:07 +00:00
Steven Edwards
8ef0e02d6f Fix end of line warning
svn path=/trunk/; revision=3228
2002-07-15 11:11:17 +00:00
Steven Edwards
7e1f00545a Fix winebuild of regsvr32
svn path=/trunk/; revision=3227
2002-07-15 10:54:13 +00:00
Rex Jolliff
4177237053 a test
svn path=/trunk/; revision=3226
2002-07-15 05:24:27 +00:00
Steven Edwards
c979d633b1 Import of DJ Dalories hcalc window calculator
svn path=/trunk/; revision=3225
2002-07-15 04:55:44 +00:00
Robert Dickenson
1713f73a79 sync minor mod.
svn path=/trunk/; revision=3224
2002-07-14 22:38:37 +00:00
Brian Palmer
17731321a4 *** empty log message ***
svn path=/trunk/; revision=3223
2002-07-14 22:33:06 +00:00
Robert Dickenson
a0f2e6b8ca Split window control, listview and treeview moved to child window.
svn path=/trunk/; revision=3222
2002-07-14 21:03:10 +00:00
Robert Dickenson
dbbae605b7 Split window control, listview and treeview moved to child window.
svn path=/trunk/; revision=3221
2002-07-14 20:38:52 +00:00
Robert Dickenson
45552bacf0 Updated with minor modifications only.
svn path=/trunk/; revision=3220
2002-07-14 18:00:54 +00:00
Robert Dickenson
cf0bb98945 Updated with progress. Still far to go....
svn path=/trunk/; revision=3219
2002-07-14 17:59:36 +00:00
Steven Edwards
5705c99d2a Added touch to the makefile
svn path=/trunk/; revision=3218
2002-07-14 16:01:28 +00:00
Robert Dickenson
8919efa70d Removed obsolete cpp versions of files.
svn path=/trunk/; revision=3217
2002-07-14 15:22:53 +00:00
Hartmut Birr
0ff8db0de8 Close the files after loading.
svn path=/trunk/; revision=3216
2002-07-14 07:48:17 +00:00
Eugene Ingerman
a0e70e46a2 Added reference counting and deferred deletion for GDI objects.
svn path=/trunk/; revision=3215
2002-07-13 21:37:27 +00:00
Casper Hornstrup
e39975e5f1 Fix typo
svn path=/trunk/; revision=3214
2002-07-13 20:56:53 +00:00
Casper Hornstrup
66b0087b28 If symbols are available then pass them to the OS as multiboot modules
svn path=/trunk/; revision=3213
2002-07-13 12:55:07 +00:00
Casper Hornstrup
84b74a9cd9 2002-07-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* rules.mak (RSYM): Define.
	* include/ddk/zwtypes.h (DebugDbgLoadSymbols): Add to enum
	_DEBUG_CONTROL_CODE.
	* include/ntdll/ldr.h (LDR_SYMBOL_INFO, LdrpLoadUserModuleSymbols): Add.
	(LdrLoadModuleSymbols): Remove.
	* include/ntos/kdbgsyms.h (ST_FILENAME, ST_FUNCTION,
	ST_LINENUMBER): Add.
	(SYMBOL). Make Name an ANSI_STRING.
	(IMAGE_SYMBOL_INFO, AreSymbolsParsed): Add.
	* lib/ntdll/ldr/startup.c (LdrInitializeThunk): Call
	LdrpLoadUserModuleSymbols() not LdrLoadModuleSymbols().
	* lib/ntdll/ldr/utils.c (LdrLoadModuleSymbols): Rename to
	LdrpLoadUserModuleSymbols.
	(LdrpLoadUserModuleSymbols): Use DebugDbgLoadSymbols debug control code.
	(LdrLoadDll): assert if out of memory.
	(LdrLoadDll): Call
	LdrpLoadUserModuleSymbols(), not LdrLoadModuleSymbols().
	* lib/ntdll/string/ctype.c (_pctype): #undef.
	* ntoskrnl/dbg/dbgctrl.c (NtSystemDebugControl): Call
	LdrLoadUserModuleSymbols on DebugDbgLoadSymbols.
	* ntoskrnl/include/internal/ldr.h (LdrGetAddressInformation): Add.
	* ntoskrnl/include/internal/module.h (MODULE_TEXT_SECTION): Make SymbolInfo
	an IMAGE_SYMBOL_INFO.
	* ntoskrnl/ke/i386/exp.c (LdrGetAddressInformation): Add prototype.
	(print_address): Change #ifdef KDBG to #ifdef DBG.
	(KiDoubleFaultHandler, KiDumpTrapFrame, KeDumpStackFrames): Dump
	one stack frame per line.
	* ntoskrnl/ke/i386/multiboot.S: Create pagetables for more kernel
	address space so larger modules can be passed from the boot loader.
	* ntoskrnl/ke/i386/usertrap.c (LdrGetAddressInformation): Add prototype.
	(print_user_address): Print symbols using LdrGetAddressInformation().
	* ntoskrnl/ldr/loader.c (SYMBOLFILE_HEADER, IMAGE_SYMBOL_INFO_CACHE,
	STAB_ENTRY, N_FUN, N_SLINE, N_SO, SymbolListHead): Add.
	(TAG_SYM_BUF): Remove.
	(LdrInitDebug): Remove unneeded code.
	(LdrInit1): Prepare for loading symbols.
	(LdrpReadLine, HexL, LdrpParseLine, LdrpLoadModuleSymbolsFromBuffer,
	LdrpLoadUserModuleSymbolsFromBuffer): Remove.
	(LdrpParseImageSymbols, LdrpGetFileName, LdrpGetFunctionName,
	LdrpGetLineNumber, LdrGetAddressInformation, LdrpLookupUserSymbolInfo): Add.
	(LdrpLoadModuleSymbols, LdrInitializeBootStartDriver): Change to use new
	symbol structures.
	(LdrLoadUserModuleSymbols): Cache symbol buffers.
	(LdrUnloadModuleSymbols): Implement.
	(LdrLoadModule, LdrUnloadModule): Change #ifdef KDBG to #ifdef DBG.
	(LdrPEProcessModule): Split a line into two lines.
	(LdrPEProcessModule): Setup for loading symbols.
	* ntoskrnl/ldr/sysdll.c (LdrpMapSystemDll): Open with FILE_SHARE_READ.
	* ntoskrnl/ps/process.c (PiFreeSymbols): Call LdrUnloadModuleSymbols() to
	free symbols.
	(PiDeleteProcess): Change #ifdef KDBG to #ifdef DBG.
	* ntoskrnl/rtl/ctype.c (_pctype): #undef.
	* ntoskrnl/rtl/string.c (strncpy): Terminate destination string.
	* tools/Makefile (rsym): Add target.
	* tools/helper.mk: Include config and use -g if DBG = 1.

svn path=/trunk/; revision=3212
2002-07-13 12:44:09 +00:00
Casper Hornstrup
3e56065829 2002-07-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* Makefile (install_before): Install system.hiv to correct location.

svn path=/trunk/; revision=3211
2002-07-13 11:45:13 +00:00
Eric Kohl
684b660d77 Fixed a typo
svn path=/trunk/; revision=3210
2002-07-13 11:31:02 +00:00
Robert Dickenson
54a958627a Corrected makefiles for all tests and added new application GetSysMetrics.
svn path=/trunk/; revision=3209
2002-07-10 20:10:16 +00:00
Robert Dickenson
8c8c369504 Updated with changes due to file manager and registry editor work.
svn path=/trunk/; revision=3208
2002-07-10 18:41:10 +00:00
Robert Dickenson
0a8fa54c83 Updated with latest work. Still far to go...
svn path=/trunk/; revision=3207
2002-07-10 18:39:21 +00:00
Eric Kohl
aaf641d620 Implemented the ability to create suspended threads.
svn path=/trunk/; revision=3206
2002-07-10 15:17:35 +00:00
Eric Kohl
cae7cd6a6c Renamed some thread states.
svn path=/trunk/; revision=3205
2002-07-10 15:15:00 +00:00
Eric Kohl
2ecad3b855 ConnectNamedPipe(): STATUS_PIPE_CONNECTED reports a successful connect.
svn path=/trunk/; revision=3204
2002-07-10 15:09:57 +00:00
Robert Dickenson
4684f7fe0e cleanup
svn path=/trunk/; revision=3203
2002-07-09 21:47:54 +00:00
Robert Dickenson
c63a30db15 Fixed missing module in makefile.
svn path=/trunk/; revision=3202
2002-07-09 21:46:46 +00:00
Robert Dickenson
00bd48992d Added some options dialog procedures.
svn path=/trunk/; revision=3201
2002-07-09 21:40:02 +00:00
Robert Dickenson
b2afb794ec Added some resources.
svn path=/trunk/; revision=3200
2002-07-09 20:42:46 +00:00
Robert Dickenson
95e5b26b81 Added new template multiple document interface application.
svn path=/trunk/; revision=3199
2002-07-09 19:53:58 +00:00
Robert Dickenson
d28f38708e Removed obsolete files.
svn path=/trunk/; revision=3198
2002-07-09 19:49:08 +00:00
Robert Dickenson
131548b463 Committing latest progress, still much TODO:
svn path=/trunk/; revision=3197
2002-07-09 19:46:14 +00:00
Robert Dickenson
8fafe08ea7 Added network information utility, net\niclist.
svn path=/trunk/; revision=3196
2002-07-09 19:41:53 +00:00
Robert Dickenson
11d5861527 cleanup
svn path=/trunk/; revision=3195
2002-07-09 19:40:50 +00:00
Robert Dickenson
3f876808eb Created new network utility niclist for displaying list of packet capture devices.
svn path=/trunk/; revision=3194
2002-07-09 19:34:41 +00:00
Steven Edwards
51fbd50e50 More wine dlls/programs
svn path=/trunk/; revision=3193
2002-07-09 03:15:41 +00:00
Steven Edwards
6270465595 Updated for wine
svn path=/trunk/; revision=3192
2002-07-08 12:35:50 +00:00
Steven Edwards
500bd3f56c Fixed typo
svn path=/trunk/; revision=3191
2002-07-08 07:19:38 +00:00
Steven Edwards
f562ef75b8 Fixed more of wine
svn path=/trunk/; revision=3190
2002-07-07 20:03:52 +00:00
Robert Dickenson
ee5be2916e Added entry for new coder.
svn path=/trunk/; revision=3189
2002-07-07 19:47:04 +00:00
Steven Edwards
8c8444aecb Removed by mistake
svn path=/trunk/; revision=3188
2002-07-07 10:44:03 +00:00
Steven Edwards
cb2bfa2afb Syncing of WINE dlls
svn path=/trunk/; revision=3187
2002-07-06 22:36:44 +00:00
Eric Kohl
5e114ab271 Revert last patch.
svn path=/trunk/; revision=3186
2002-07-06 17:38:06 +00:00
Steven Edwards
8fc03ec0f6 Remove wine's rpcrt for the list of targets
svn path=/trunk/; revision=3185
2002-07-06 10:39:18 +00:00
Steven Edwards
3c971f2b7b new config.h
svn path=/trunk/; revision=3184
2002-07-06 10:08:29 +00:00
Robert Dickenson
050dbf13f5 Updated with progress work.
svn path=/trunk/; revision=3182
2002-07-06 02:44:16 +00:00
Eric Kohl
8e101e71d4 Added the ability to expand embedded environment variables to RtlExpandEnvironmentVariable().
svn path=/trunk/; revision=3181
2002-07-05 17:23:05 +00:00
David Welch
54ab6db1c4 Added some missing files.
svn path=/trunk/; revision=3180
2002-07-04 20:12:28 +00:00
David Welch
3c453d5dc1 2002-07-04 David Welch <welch@computer2.darkstar.org>
* subsys/win32k/include/callback.h: Fixed callback argument
	definitions.
	* subsys/win32k/ntuser/winpos.c: Implemented some more of the windows
	sizing/moving code.
	* subsys/win32k/ntuser/painting.c: Implemented some more of the
	window painting code.
	* subsys/win32k/objects/coord.c: Implemented LPtoDP and DPtoLP.
	* subsys/win32k/objects/region.c: Added stubs for some more
	region functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/process.c (NtCreateProcess): Duplicate the
	process desktop handle as well.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/se/token.c: Don't call the ZwXXX variant of
	system calls when in system context.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/Makefile: Added file with MDA output code.
	* ntoskrnl/kd/kdebug.c: Recognize MDA as a destination for
	debug output.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/windows/defwnd.c: Implemented some more of the
	default window handler.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/misc/stubs.c: Removed some stubs to seperate files.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/user32.def: Export ScreenToClient otherwise we
	get problems when code in user32 tries to call it.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/win32k/region.h: Added prototypes for some missing
	region functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/win32k/ntuser.h: Added prototypes for some missing
	NtUserXXX functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/user32/wininternal.h: Added some constants for
	private GetDCEx styles that WINE needs.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/user32/callback.h: Fixed callbacks for messages with
	parameters.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/napi/win32.h (W32THREAD): Added pointer to the
	thread's desktop.
	* include/napi/win32.h (W32PROCESS): Removed handle table,
	added a pointer to the process's window station.
	* subsys/win32k/ntuser/guicheck.c (W32kGuiCheck): Reference
	a process's window station on the first win32k system call. Reference
	a thread's desktop on the first win32k system call.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/messages.h: Added some missing WM_XXX constants.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* drivers/dd/ide/makefile: Compiling with debugging messages
	needs libgcc to be linked in.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* iface/addsys/genw32k.c: Generate a variable with the
	number of system calls.
	* iface/native/genntdll.c: Generate a proper stack frame for
	the user system call stubs.
	* ntoskrnl/ke/i386/syscall.S: Generate a proper stack frame for
	the handler for system calls.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* Makefile: Build the GUI startup application.
	* subsys/system/gstart/gstart.c: Application to start up
	the GUI.

svn path=/trunk/; revision=3179
2002-07-04 19:56:38 +00:00
Steven Edwards
9033534bb4 Fix Wine Resource Compiler Path
svn path=/trunk/; revision=3178
2002-07-04 18:16:42 +00:00
Robert Dickenson
d5251a1991 Fixed incorrect order of resource strings to identifiers.
svn path=/trunk/; revision=3177
2002-07-03 19:33:40 +00:00
Robert Dickenson
157460c518 New File Manager application - winfile.
svn path=/trunk/; revision=3176
2002-07-03 19:32:52 +00:00
Robert Dickenson
bfab1ffb07 Added entries for regedit, regedt32 and taskmgr.
svn path=/trunk/; revision=3175
2002-07-03 18:13:30 +00:00
Robert Dickenson
2c0cbaa9e2 Cleanup after first check-in.
svn path=/trunk/; revision=3174
2002-07-03 18:12:53 +00:00
Robert Dickenson
7fe69e5501 Cleanup after extracting regedit code.
svn path=/trunk/; revision=3173
2002-07-03 18:11:49 +00:00
Robert Dickenson
dc8c16d0fc Created new application - regedit.
svn path=/trunk/; revision=3172
2002-07-03 17:52:20 +00:00
Robert Dickenson
a13ca47ccb Minor updates, added status bar support from TaskMgr.
svn path=/trunk/; revision=3171
2002-07-02 17:37:20 +00:00
Robert Dickenson
06560b36fd Started ReactOS regedt32 application. Mainframe, menus and makefile only.
svn path=/trunk/; revision=3170
2002-07-02 16:57:56 +00:00
Robert Dickenson
bdbc30455a Fixes to performance page resizing and font.bmp updated.
svn path=/trunk/; revision=3169
2002-07-02 15:43:04 +00:00
Brian Palmer
4b42b078ed Recommitting files as binary.
svn path=/trunk/; revision=3168
2002-07-02 04:16:12 +00:00
Brian Palmer
6de3925ad4 Removed corrupt binary files that were added as text files.
svn path=/trunk/; revision=3167
2002-07-02 04:13:43 +00:00
Robert Dickenson
aea5d54245 Fixed font bitmap and minor window placement mods.
svn path=/trunk/; revision=3166
2002-06-30 14:52:10 +00:00
Eugene Ingerman
994b70bb48 Video mode switching when entering pice shell.
svn path=/trunk/; revision=3165
2002-06-30 02:45:44 +00:00
Eugene Ingerman
d01d6a21a7 Ignore v86 faults (for now).
svn path=/trunk/; revision=3164
2002-06-30 02:41:29 +00:00
Eugene Ingerman
a6b20c5fda Added NFLAGS when calling nasm.
svn path=/trunk/; revision=3163
2002-06-30 02:40:24 +00:00
Robert Dickenson
7ec506fe21 no message
svn path=/trunk/; revision=3162
2002-06-29 20:14:26 +00:00
Robert Dickenson
d08fc97f99 Some work on resizing performance page.
svn path=/trunk/; revision=3161
2002-06-29 20:01:17 +00:00
Robert Dickenson
b7d141eefe Added macro for passing RCFLAGS to resource compiler.
svn path=/trunk/; revision=3160
2002-06-29 18:21:00 +00:00
Robert Dickenson
51036c7f74 Updated for building with GCC.
Added graphcntrl for performance page.
Various fixes and additions.

svn path=/trunk/; revision=3159
2002-06-29 18:13:03 +00:00
Brian Palmer
7fc762dac1 Changes in v1.4 (6/27/2002)
- Added separate configuration for a SETUPLDR version

svn path=/trunk/; revision=3158
2002-06-28 00:50:16 +00:00
Eric Kohl
1f6b602dc5 Added check for loaded module prior to loading it.
svn path=/trunk/; revision=3157
2002-06-27 17:52:32 +00:00
Eric Kohl
5b7f97ebf6 Stop the system if SystemRoot cannot be created or is not accessible.
svn path=/trunk/; revision=3156
2002-06-27 17:47:55 +00:00
Eric Kohl
32dfc1175f Set missing OBJ_OPENLINK attribute in IoDeleteSymbolicLinkObject().
svn path=/trunk/; revision=3155
2002-06-27 17:46:53 +00:00
Eric Kohl
1020b229fe Fixed SystemRoot accessibility check.
svn path=/trunk/; revision=3154
2002-06-27 17:45:45 +00:00
Brian Palmer
c2f51ccadd Makefile now generates a sorted symbol file - freeldr.sym
svn path=/trunk/; revision=3153
2002-06-26 22:44:07 +00:00
Brian Palmer
3d14932152 Fixed Makefile so it will work when you do a clean checkout and the tools aren't already built.
svn path=/trunk/; revision=3152
2002-06-26 22:32:43 +00:00
Hartmut Birr
ccf3e5b082 Fixed a typo.
svn path=/trunk/; revision=3151
2002-06-26 18:39:50 +00:00
Hartmut Birr
402fdf5780 Fixed some calculatations in ObmpGetObjectHandle.
svn path=/trunk/; revision=3150
2002-06-26 18:38:24 +00:00
Hartmut Birr
317666175c Added PCM_PARTIAL_RESOURCE_LIST.
svn path=/trunk/; revision=3149
2002-06-26 18:37:36 +00:00
Hartmut Birr
518b1b7a13 Changed the sector size from BLOCKSIZE to the size from the boot sector.
svn path=/trunk/; revision=3148
2002-06-26 18:36:41 +00:00
Eric Kohl
40fe11fc2b Added 'Multi UNC Provider' driver stub.
Added NTFS driver stub.

svn path=/trunk/; revision=3147
2002-06-25 22:25:17 +00:00
Eric Kohl
24c84ca4b7 Added NTFS driver stub.
svn path=/trunk/; revision=3146
2002-06-25 22:23:06 +00:00
Eric Kohl
ef401a1081 Added 'Multi UNC Provider' driver stub.
svn path=/trunk/; revision=3145
2002-06-25 22:21:41 +00:00
Eric Kohl
0892a6b53a Added eventlog service stub.
Added rpc server stub.

svn path=/trunk/; revision=3144
2002-06-25 21:14:26 +00:00
Eric Kohl
b7bc22228a Added rpc server stub.
svn path=/trunk/; revision=3143
2002-06-25 21:11:11 +00:00
Eric Kohl
5190929b04 Added eventlog service stub.
svn path=/trunk/; revision=3142
2002-06-25 21:10:14 +00:00
Eric Kohl
e8b989193d Implemented CallNamedPipeW() and TransactNamedPipe().
svn path=/trunk/; revision=3141
2002-06-25 18:49:38 +00:00
David Welch
409ca20cca One case only please.
svn path=/trunk/; revision=3138
2002-06-22 11:59:46 +00:00
Robert Dickenson
8a68c12c32 Updated with latest changes for including new net modules.
svn path=/trunk/; revision=3136
2002-06-21 21:05:32 +00:00
Robert Dickenson
ea7f10019b Added required definitions for the packet driver to build.
svn path=/trunk/; revision=3135
2002-06-21 20:40:51 +00:00
Eugene Ingerman
1c6674aa68 Fixed typo/bug in W32kCallWindowProc.
svn path=/trunk/; revision=3134
2002-06-21 04:14:07 +00:00
Eric Kohl
5bba28324f Fixed a long-standing hack to open symbolic link objects.
svn path=/trunk/; revision=3133
2002-06-20 21:31:39 +00:00
Eric Kohl
27a682e098 Fixed severe bugs in the default value handling of RegSetValue() and RegQueryValue().
Implemented simple registry links.
Added creation of the CurrentControlSet link.

svn path=/trunk/; revision=3132
2002-06-20 16:31:59 +00:00
Eugene Ingerman
669dabbc82 Updated PICE to work with recent kernel changes. Changed kernel module handling.
svn path=/trunk/; revision=3131
2002-06-20 04:46:11 +00:00
Eric Kohl
79d575aef4 Implemented registry links (REG_LINK).
Create the 'CurrentControlSet' link after the registry has been initialized.

svn path=/trunk/; revision=3130
2002-06-19 22:32:47 +00:00
Eric Kohl
5c4728ed0a Added registry link tests.
svn path=/trunk/; revision=3129
2002-06-19 22:27:43 +00:00
Robert Dickenson
a493f4baea Added new library packet.dll
svn path=/trunk/; revision=3128
2002-06-19 15:50:29 +00:00
Robert Dickenson
0f848a3fd1 Added packet.sys to target list.
svn path=/trunk/; revision=3127
2002-06-19 15:46:32 +00:00
Robert Dickenson
2ce7a61b0b Fixed invalid paths. Added packet to target list.
svn path=/trunk/; revision=3126
2002-06-19 15:45:48 +00:00
Robert Dickenson
d45d540c92 Added new exports
svn path=/trunk/; revision=3125
2002-06-19 15:44:47 +00:00
Robert Dickenson
b61d3e84c2 Added new driver 'packet', ported from the Windows Packet Capture Driver project.
svn path=/trunk/; revision=3124
2002-06-19 15:43:15 +00:00
Robert Dickenson
d8141822e2 Added .cvsingore file.
svn path=/trunk/; revision=3123
2002-06-19 06:38:03 +00:00
Robert Dickenson
c2b9c68cbf Created new module for wshirda.dll
svn path=/trunk/; revision=3122
2002-06-19 06:26:11 +00:00
KJK::Hyperion
2d2ac84025 PSAPI meta-source files moved in the standard location
svn path=/trunk/; revision=3121
2002-06-18 22:36:43 +00:00
KJK::Hyperion
1a9ed68d15 PSAPI initial commit
svn path=/trunk/; revision=3120
2002-06-18 22:16:53 +00:00
David Welch
77a2974988 Moved win32 callback support into a new file.
svn path=/trunk/; revision=3119
2002-06-18 22:03:48 +00:00
David Welch
5f997bca7b 2002-06-18 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* tools/helper.mk: Make an import library a proper target
	depending on the .def file.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* subsys/win32k/ntuser/window.c (NtUserGetWindowLong): Began
	implementation.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* subsys/win32k/misc/object.c (ObmCreateHandle): Return the
	correct handle value.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* subsys/win32k/makefile: Make win32k depend on the file containing
	the service table.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/ke/i386/stkswitch.S (KeSwitchStackAndRet,
	KePushAndStackSwitchAndSysRet): Push one value only.
	* ntoskrnl/ps/w32call.c (NtCallbackReturn, NtW32Call): Moved
	these functions to a new file. Restore the old trap frame after
	returning from a callback.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* lib/user32/windows/message.c (CallWindowProcA, CallWindowProcW):
	Convert message to Unicode or ASCII if necessary.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* include/user32/callback.h: Added WM_CREATE and WM_NCCALCSIZE
	callbacks.
	* lib/user32/windows/window.c (User32SendCREATEMessageForKernel,
	User32SendNCCREATEMessageForKernel): Implemented.
	* subsys/win32k/ntuser/callback.c (W32kSendCREATEMessage):
	Implemented.

2002-06-18  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* include/structs.h: Added Unicode and ASCII versions of
	CREATESTRUCT.

svn path=/trunk/; revision=3118
2002-06-18 21:51:11 +00:00
Brian Palmer
3acd677b53 Fixed GetBiosMemoryMap() function.
svn path=/trunk/; revision=3117
2002-06-18 21:40:27 +00:00
Eric Kohl
9fb8f57561 IoDestroyDriverList(): Free memory of group and service entries.
IopCreateServiceListEntry(): simplified function and reduced memory consumption.

svn path=/trunk/; revision=3116
2002-06-18 07:11:44 +00:00
Eric Kohl
b29a9b85b9 RtlQueryRegistryValues() must treat REG_MULTI_SZ and REG_EXPAND_SZ values like REG_SZ values upon direct queries.
svn path=/trunk/; revision=3115
2002-06-18 07:07:42 +00:00
joeg
57c8a1c6e3 apps/tests/tokentest.c
* Fix stupidity that prevented tokentest
  from compiling

svn path=/trunk/; revision=3114
2002-06-17 23:13:35 +00:00
joeg
941ae04aa2 ntoskrnl/ps/process.c
* Call SepCreateSystemProcessToken() when creating the
  initial system process.  Cleanup the token during
  in PiDeleteProcess().

* Call SepInitializeNewProcess() during NtCreateProcess
  to copy the parent processes token to the new process.

ntoskrnl/include/internal/se.h
ntoskrnl/se/token.c

* Change name of SepDuplicationToken() [which was unimplemented]
  to SepDuplicateToken().  Implement it.

* Implement new functions (which are used by process.c)
  SepInitializeNewProcess() and SepCreateSystemToken().

* Correctly (I think) set Token->ImpersonationLevel in
  NtCreateToken().

apps/tests/tokentest/tokentest.c

* Dump the current processes token.

svn path=/trunk/; revision=3113
2002-06-17 22:52:32 +00:00
joeg
0f1c17eda0 ntoskrnl/ke/main.c
* Move SeInit2() to before we initialize process
  management so we can create an initial system
  token to go with the initial system process.

ntoskrnl/ps/process.c
* Implement NtOpenProcessToken() by calling
  _NtOpenProcessToken() -- why do we have
  both of these?

* Fix bug in _NtOpenProcessToken() that
  caused us to crash creating the token
  handle.

* Return STATUS_INVALID_INFO_CLASS from
  NtQueryInformationProcess() and
  NtSetInformationProcess() for information classes
  documented as unqueryable or unsettable
  by Gary Nebbet in his book "Native API Reference".

* Fix bug in NtSetInformationProcess() where it
  assigns the primary token -- it derefeneced the
  old token if SeExchangePrimaryToken() failed;
  it should have derferenced it if it succeeded.

svn path=/trunk/; revision=3112
2002-06-17 22:16:34 +00:00
Robert Dickenson
eebe5809fd Created new empty module for buiding ws2help.dll
Yet to define parameters and return values for all exports.

svn path=/trunk/; revision=3111
2002-06-17 19:33:45 +00:00
Eric Kohl
81a07ed6a6 Improved driver loading sequence with respect to the group order.
Added ability to run user-mode services.

svn path=/trunk/; revision=3110
2002-06-17 15:47:32 +00:00
Eric Kohl
1b52f5ff18 Implemented direct query of REG_EXPAND_SZ values.
svn path=/trunk/; revision=3109
2002-06-17 15:42:30 +00:00
Steven Edwards
df3c5b992e added simple tcp server test
svn path=/trunk/; revision=3108
2002-06-17 06:01:17 +00:00
David Welch
279f0b0ed5 2002-06-16 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* tools/help.mk: Make the install target depend on all the
	files to be installed.

2002-06-16  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/ps/thread.c (NtCallbackReturn): Set TSS.Esp0 to the
	top of the old stack.
	* ntoskrnl/ps/thread.c (NtW32Call): Set TSS.Esp0 to the top of
	the new stack. Free the callback stack correctly. Don't copy
	portion of the trap frame that doesn't exist in non-v86-mode
	interrupts.
	* ntoskrnl/ps/thread.c (PsFreeCallbackStack): New function to
	free a stack allocated with PsAllocateCallbackStack.

2002-06-16  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* drivers/dd/null/makefile: Commented out local LDFLAGS as
	these cause bad relocations in the stripped image.

2002-06-16  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* config: Corrected spelling error.

svn path=/trunk/; revision=3107
2002-06-16 21:41:16 +00:00
Jason Filby
78f1caa4a9 NtW32Call: replace sizeof(KTRAP_FRAME) with 124 bytes
svn path=/trunk/; revision=3106
2002-06-16 20:52:07 +00:00
Eric Kohl
e6b5136b65 Fixed wrong interpretation of value cell size in NtSetValueKey().
svn path=/trunk/; revision=3105
2002-06-16 20:00:34 +00:00
Casper Hornstrup
7c5d3bb9ef Revert last change
svn path=/trunk/; revision=3104
2002-06-16 17:25:58 +00:00
Casper Hornstrup
1a1942d5c0 Avoid importing _pctype when using mingw-runtime 2.0.
svn path=/trunk/; revision=3103
2002-06-16 16:27:22 +00:00
Eric Kohl
d783d4d686 Fixed loading of symbol files.
Implemented automatic loading of PICE.

svn path=/trunk/; revision=3102
2002-06-16 11:45:06 +00:00
Steven Edwards
56deabe577 Updated Makefile to fix building
svn path=/trunk/; revision=3101
2002-06-16 06:05:28 +00:00
Steven Edwards
a8b847f532 Fixed include path in ramdriver
svn path=/trunk/; revision=3100
2002-06-16 06:02:17 +00:00
Steven Edwards
4d831f2242 Fixed building of Serial Mouse driver (still broken)
svn path=/trunk/; revision=3099
2002-06-16 04:47:56 +00:00
Eric Kohl
7c25d62093 Changed calling convention of EngXxx funtions to STDCALL.
Added missing includes.

svn path=/trunk/; revision=3096
2002-06-15 21:44:08 +00:00
Eric Kohl
37c39cc09a Changed the calling convention used by the video miniport/port driver interface and the display driver/win32k interface (DrvXxx functions) to STDCALL.
The EngXxx and other funtions will be changed in a second step.

svn path=/trunk/; revision=3095
2002-06-15 14:58:25 +00:00
Hartmut Birr
8dd702a72b Fixed saving of esp in KePushAndStackSwitchAndSysRet.
svn path=/trunk/; revision=3094
2002-06-15 14:57:29 +00:00
Jason Filby
97970adc7d Fixed missing initialization in PsAllocateCallback
svn path=/trunk/; revision=3093
2002-06-15 11:27:28 +00:00
Eric Kohl
5e1123c888 Cleanup, add display of token values being passed into ZwCreateToken() as well as display of values coming out of the token.
(Patch by Joseph Galbraith)

svn path=/trunk/; revision=3092
2002-06-15 10:13:35 +00:00
Eric Kohl
6017a8515d Enable %wZ and %Z format specifiers (remove #if 0).
Fix check for NULL Buffer (it was checking for non-null Buffer).
Fix length field when printing unicode strings; it was printing twice as many characters as it should have.
(Patch by Joseph Galbraith)

svn path=/trunk/; revision=3091
2002-06-15 10:12:43 +00:00
Eric Kohl
165c6d209a Fix bug in RtlEqualSid() that caused all sids with the same sub-authority count to compare equal.
Teach RtlpAddKnownAce() some status values other than STATUS_UNSUCCESSFUL.
(Patch by Joseph Galbraith)

svn path=/trunk/; revision=3090
2002-06-15 10:10:43 +00:00
Eric Kohl
fd874ecc14 Fix bug in RtlpAddKnownAce() that caused it to place the SID in the wrong location.
Teach RtlpAddKnownAce() some status values other than STATUS_UNSUCCESSFUL.
(Patch by Joseph Galbraith)

svn path=/trunk/; revision=3089
2002-06-15 10:09:17 +00:00
Jason Filby
b6b3e3f14e Bugfix: correct memory allocation calculation
svn path=/trunk/; revision=3088
2002-06-14 20:56:17 +00:00
Jason Filby
b592122ee6 Fixed another typo
svn path=/trunk/; revision=3087
2002-06-14 19:07:32 +00:00
Jason Filby
0a5b749896 Fixed some typos
svn path=/trunk/; revision=3086
2002-06-14 18:55:09 +00:00
Casper Hornstrup
5b804e36db Don't install static libraries.
svn path=/trunk/; revision=3085
2002-06-14 17:17:38 +00:00
Jason Filby
a0c16e128a GuiCheck for NtUserRegisterClassExWOW
svn path=/trunk/; revision=3081
2002-06-14 15:21:43 +00:00
Eric Kohl
260116f684 Fixed direct reference to a driver object.
svn path=/trunk/; revision=3080
2002-06-14 14:24:28 +00:00
Eric Kohl
01b92c6de5 Pass pointer to CSRSS process on first create request.
svn path=/trunk/; revision=3079
2002-06-14 14:23:14 +00:00
Eric Kohl
69c0982e64 Added vga driver
svn path=/trunk/; revision=3078
2002-06-14 14:19:28 +00:00
Casper Hornstrup
7e27a9348f Delete dependency files on clean
svn path=/trunk/; revision=3077
2002-06-14 13:20:08 +00:00
Casper Hornstrup
49051a245f Use standard mingw32 prefix on linux.
svn path=/trunk/; revision=3076
2002-06-14 13:04:18 +00:00
Casper Hornstrup
8d0ecd86c9 Make clean rule depend on tools rule
svn path=/trunk/; revision=3075
2002-06-14 11:06:03 +00:00
Eric Kohl
503826a739 Fixed automatic loading of required modules.
Cleaned up module loading interface.

svn path=/trunk/; revision=3074
2002-06-14 07:49:58 +00:00
David Welch
fd2a5c35a4 Split up some stubs into their own files.
svn path=/trunk/; revision=3068
2002-06-13 20:36:40 +00:00
Hartmut Birr
e019c02170 Reseting the conversion qualifier for each new value from the format string.
svn path=/trunk/; revision=3063
2002-06-13 16:45:02 +00:00
Eric Kohl
e2822009d7 Fixed driver unloading upon failing initialization.
svn path=/trunk/; revision=3062
2002-06-13 15:14:28 +00:00
Brian Palmer
63ea3fb94c Cross-platform tools added to Makefiles.
svn path=/trunk/; revision=3061
2002-06-13 00:39:49 +00:00
Eric Kohl
6ab0a870c1 Updated the system hive and the boot driver list.
svn path=/trunk/; revision=3060
2002-06-12 23:38:28 +00:00
Eric Kohl
6f7c3842bc Now ZwLoadDriver() uses the registry path instead of a file name to load a driver.
svn path=/trunk/; revision=3059
2002-06-12 23:35:55 +00:00
Eric Kohl
9d3870ce78 Cleaned up the driver loading routines.
svn path=/trunk/; revision=3058
2002-06-12 23:33:15 +00:00
Eric Kohl
2137580260 Use the registry to load system start drivers.
svn path=/trunk/; revision=3057
2002-06-12 23:30:36 +00:00
Eric Kohl
0f47c75c9a Use NtSetSystemInformation() to load win32k.sys because it is not a driver but a kernel extension.
svn path=/trunk/; revision=3056
2002-06-12 23:26:56 +00:00
Eric Kohl
c16bc4c28d RtlpGetRegistryHandle(): Don't remove a leading backslash if an absolute registry path is used.
svn path=/trunk/; revision=3055
2002-06-12 23:24:19 +00:00
Casper Hornstrup
debb46b5c3 BugCheck if no boot drivers are passed to ntoskrnl.exe
svn path=/trunk/; revision=3054
2002-06-12 14:06:29 +00:00
Casper Hornstrup
a07b0d8b8e * Call RtlCreateUnicodeString() instead of RtlInitUnicodeString() when
initializing the DeviceNode->ServiceName, since IopFreeDeviceNode()
  will use RtlFreeUnicodeString() on it.

* Call ObDereferenceObject() instead of ExFreePool() to release the
  DeviceObject if DriverEntry fails.
  Patch from Joseph Galbraith.

svn path=/trunk/; revision=3053
2002-06-12 14:05:03 +00:00
Rex Jolliff
72a2cedd0a another test of commit mailer
svn path=/trunk/; revision=3052
2002-06-12 02:32:14 +00:00
Rex Jolliff
c2c993d6bb a test of commit mailer
svn path=/trunk/; revision=3051
2002-06-12 01:59:50 +00:00
David Welch
05ad1d3198 2002-06-11 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* subsys/system/winlogon/winlogon.c (WinMain): Check for
	failure when creating a window system.

2002-06-11  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/ob/handle.c (ObDuplicateObject): Added this internal
	function for duplicating objects.
	* ntoskrnl/ps/process.c (NtCreateProcess): Duplicate the parent
	process's window station to the child process.
	* ntoskrnl/ps/process.c (PsInitProcessManagement): Initialize the
	first process's window station.

2002-06-11  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/mm/marea.c (MmCreateMemoryArea): Initialise
	page operation structure members.
	* ntoskrnl/mm/pageop.c (MmReleasePageOp, MmGetPageOp): Increment
	or decrement the page operation count in the memory area.
	* ntoskrnl/mm/virtual.c (MmNotPresentFaultVirtualMemory,
	MmPageOutVirtualMemory): Check for a deleted memory area before
	handling the fault.
	* ntoskrnl/mm/virtual.c (MmFreeVirtualMemory): Wait for all
	page operations to finish before freeing the memory area.

2002-06-11  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/ke/i386/syscall.S (interrupt_handler2e): Corrected
	test for previous mode, upper 16-bit of CS on the stack after an
	interrupt are arbitary.

2002-06-11  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* lib/user32/misc/winsta.c: Cleaned up indentation.

2002-06-11  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* apps/tests/winhello/winhello.c (WinMain, MainWndProc):
	Cleaned up formatting, some more error checks.

2002-06-04  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/mm/virtual.c (MmSecureVirtualMemory,
	MmUnsecureVirtualMemory, NtQueryVirtualMemory): Corrected indentation.

svn path=/trunk/; revision=3050
2002-06-11 22:09:03 +00:00
Casper Hornstrup
669a991546 Add multi and expand registry key type support.
svn path=/trunk/; revision=3049
2002-06-11 20:10:36 +00:00
Eric Kohl
30a776c6e9 Fixed LdrpCompareModuleNames() to accept fully qualified path names too.
svn path=/trunk/; revision=3048
2002-06-11 18:37:23 +00:00
Brian Palmer
a89e08d368 Caches the current FAT sector so it doesn't read again if it doesn't have to.
svn path=/trunk/; revision=3047
2002-06-11 16:58:31 +00:00
Casper Hornstrup
65ae3074e9 Kill warnings.\n Use DbgPrint for debugging registry.
svn path=/trunk/; revision=3046
2002-06-11 16:23:20 +00:00
Brian Palmer
8bab1a8f2d Optimized FAT32 bootsector to read more than 1 sector at a time on systems supporting LBA calls.
svn path=/trunk/; revision=3045
2002-06-11 05:41:45 +00:00
Eric Kohl
6ac81e7954 Changed data structure which represents driver objects from MODULE_OBJECT to DRIVER_OBJECT.
Now a DriverEntry's RegistryPath string is usable automagically.

svn path=/trunk/; revision=3044
2002-06-10 23:04:48 +00:00
Hartmut Birr
0ddc3e2715 Reference/Dereference the process object in PiTerminateProcess.
svn path=/trunk/; revision=3043
2002-06-10 21:37:45 +00:00
Hartmut Birr
0dbc90e4e0 Unmap the pages first and than remove the entries from the allocation map in MmUnmapLockedPages.
svn path=/trunk/; revision=3042
2002-06-10 21:36:31 +00:00
Hartmut Birr
16068960f0 Replaced all calls to MmDereferencePage with MmReleasePageMemoryConsumer.
Added handling for multiple referenced pages in MmReleasePageMemoryConsumer.

svn path=/trunk/; revision=3041
2002-06-10 21:34:38 +00:00
Hartmut Birr
a64eec7e49 Added flushing of file streams.
svn path=/trunk/; revision=3040
2002-06-10 21:28:36 +00:00
Hartmut Birr
495dfc660f Rewrote fread/fwrite for a better/faster handling of reads/writes requests.
svn path=/trunk/; revision=3039
2002-06-10 21:26:36 +00:00
Hartmut Birr
9ac5422074 Fixed ftell for streams which are opened for reading and writing.
svn path=/trunk/; revision=3038
2002-06-10 21:23:34 +00:00
Hartmut Birr
f0cb69cade Fixed fflush for non dirty file streams.
svn path=/trunk/; revision=3037
2002-06-10 21:21:06 +00:00
Hartmut Birr
b971a7adc6 Fixed a minor bug in updEntry.
svn path=/trunk/; revision=3036
2002-06-10 21:19:18 +00:00
Hartmut Birr
f3e094f2f0 Updating the directory entries in VfatWrite only, if the allocation size has changed.
Added zeroing for files, if the write starts after the current end of the file.

svn path=/trunk/; revision=3035
2002-06-10 21:17:57 +00:00
Hartmut Birr
20a4914b89 Added updating of directory entries in VfatCleanupFile/VfatCloseFile.
svn path=/trunk/; revision=3034
2002-06-10 21:15:58 +00:00
Hartmut Birr
87e32585f2 Fixed a minor bug in CcSetFileSizes.
svn path=/trunk/; revision=3033
2002-06-10 21:13:26 +00:00
Hartmut Birr
8393c73b3b Implemented CcZeroData.
svn path=/trunk/; revision=3032
2002-06-10 21:11:56 +00:00
Eric Kohl
c4d4559cce Moved io/drvlck.c to mm.
Minimize access to the module object via the object manager.
Use module list for internal module management.
Protect module list with a spinlock.

svn path=/trunk/; revision=3031
2002-06-10 08:50:55 +00:00
Eric Kohl
c9e12ce035 Handle multi-string group order list properly.
svn path=/trunk/; revision=3030
2002-06-09 13:28:49 +00:00
Emanuele Aliberti
10514a1fd8 PSXSS: It seems the renamed csrterm did not get in the repository.
PSXSS: I try again.

svn path=/trunk/; revision=3029
2002-06-09 08:37:07 +00:00
Brian Palmer
662162a601 Fixed bug that was preventing FreeLoader from booting on FAT32 systems.
svn path=/trunk/; revision=3028
2002-06-09 00:03:58 +00:00
Brian Palmer
20327bf11a 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

svn path=/trunk/; revision=3027
2002-06-08 19:20:01 +00:00
Emanuele Aliberti
6eab84796a Mostly path fixing after new modules layout is in effect.
I renamed the terminal emulator CSRTERM: now it is named POSIXW32,
because it is a a door to reach the POSIX+ subsystem FROM the Win32
subsystem.

svn path=/trunk/; revision=3026
2002-06-08 16:28:05 +00:00
Eric Kohl
bb14287865 - Implement NtCreateToken()
- Implement RtlGetAce()
- Fix bug which cause RtlCreateAcl() to always fail.
- Cleanup parameter names and fix bug that caused a buffer overrun in RtlCopySidAndAttributesArray()
- When referencing the token object in NtQueryInformationToken() pass in either TOKEN_QUERY access or TOKEN_QUERY_SOURCE access. Passing in zero led to ObReferenceObjectByHandle() always failing with ACCESS_DENIED.
- Fixed NtQueryInformationToken() to check the buffer length and return STATUS_BUFFER_TO_SMALL and the required length.
- Ensure that the ReturnLength is set correctly when NtQueryInformationToken() succeeds. Previously, it was set to the number of bytes unused in the user buffer in some cases or not set at all.
- Handle case of NULL default dacl correctly in NtQueryInformationToken()
- Update main makefile to build apps\utils.
- Update makefiles in apps\utils to have the correct PATH_TO_TOP.
- Update main makefile to build apps\tests\tokentest

Written by Joseph Galbraith.

svn path=/trunk/; revision=3024
2002-06-07 23:00:20 +00:00
Eric Kohl
33cc33c731 Let services.exe load the auto-start drivers.
svn path=/trunk/; revision=3023
2002-06-07 20:11:03 +00:00
Hartmut Birr
e1a2eb2f0b Fixed the return value in GetFileSize.
svn path=/trunk/; revision=3022
2002-06-07 16:54:04 +00:00
Hartmut Birr
23ed00e90e Fixed the allocation size for the fat in VfatMount.
svn path=/trunk/; revision=3021
2002-06-07 16:53:18 +00:00
Eugene Ingerman
9910fb19ec Updated paths after directory was moved.
svn path=/trunk/; revision=3020
2002-06-07 05:35:04 +00:00
Eric Kohl
421ce5c9dc Fixed broken handling of SCSI port capabilities.
svn path=/trunk/; revision=3019
2002-06-06 23:20:08 +00:00
Brian Palmer
0bb513eddf Makefile fixes
svn path=/trunk/; revision=3018
2002-06-06 21:33:13 +00:00
Jason Filby
aa8aca9ec4 Don't define CC in makefile
svn path=/trunk/; revision=3017
2002-06-06 20:36:52 +00:00
Eric Kohl
6a97fcb4f7 Added full short name (8.3 name) support.
svn path=/trunk/; revision=3016
2002-06-06 19:01:04 +00:00
Eric Kohl
cf6fb9b64c Fixed another silly bug.
svn path=/trunk/; revision=3015
2002-06-06 18:59:50 +00:00
Jason Filby
51fddda8d4 Implemented NtUserPeekMessage
svn path=/trunk/; revision=3014
2002-06-06 17:50:16 +00:00
Eric Kohl
bee2ec8653 Added partial suppport for short names (8.3 names).
svn path=/trunk/; revision=3013
2002-06-06 16:20:52 +00:00
Eric Kohl
f9769b54cf Fixed a typo in RtlGenerate8dot3Name().
Added more tests to RtlIsNameLegalDOS8Dot3().

svn path=/trunk/; revision=3012
2002-06-06 16:17:26 +00:00
Eric Kohl
819490ac07 Fixed the copy length in RtlQueryRegistryValues(). Found by Hartmut Birr.
svn path=/trunk/; revision=3011
2002-06-06 14:03:58 +00:00
Brian Palmer
ac99fa1fdc 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

svn path=/trunk/; revision=3010
2002-06-06 05:58:37 +00:00
Hartmut Birr
998a072d3f Fixed the alocation size in NtRegisterThreadTerminatePort.
svn path=/trunk/; revision=3009
2002-06-05 19:38:08 +00:00
Hartmut Birr
a7c919c505 Created the object handle only if the object is created successful in ObCreateObject.
This fixes some crashs after changing to a nonexisting drive and
a message like 'Parent is a Directory which is not a device type'.

svn path=/trunk/; revision=3008
2002-06-05 19:37:12 +00:00
Hartmut Birr
2422bc4676 Fixed the wrong parameter odering in a call to memset in EiAddSharedOwner.
svn path=/trunk/; revision=3007
2002-06-05 19:36:10 +00:00
Hartmut Birr
69671d74e1 Fixed the copy length in RtlQueryRegistryValues.
svn path=/trunk/; revision=3006
2002-06-05 19:35:04 +00:00
Hartmut Birr
926cc1342f Fixed a test after a memory allocation in CmiInitPermanentRegistryHive.
svn path=/trunk/; revision=3005
2002-06-05 19:34:08 +00:00
Hartmut Birr
d55c657a07 Fixed the error string odering.
svn path=/trunk/; revision=3004
2002-06-05 19:33:11 +00:00
Hartmut Birr
6e8befbaa7 Fixed the declaration of _alloca/alloca.
svn path=/trunk/; revision=3003
2002-06-05 19:32:20 +00:00
Hartmut Birr
b37ed73013 Fixed the value CurrentTransferPages for splited requests in ScsiClassReadWrite.
svn path=/trunk/; revision=3002
2002-06-05 19:31:39 +00:00
Eric Kohl
9078342c24 Implemented RtlGenerate8dot3Name() and RtlIsNameLegalDOS8Dot3().
svn path=/trunk/; revision=3001
2002-06-05 16:53:36 +00:00
David Welch
3d3be3df27 2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
	correctly.

2002-06-04  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
	* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
	pages of the kernel stack to be accessible from this process.

2002-06-04  David Welch  <welch@cwcom.net>

	* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/include/internal/mm.h: Changed prototypes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
	page directory base to PHYSICAL_ADDRESS.
	* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
	to use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
	to use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
	use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
	MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
	MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
	MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
	MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
	MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
	MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
	MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
	addresses.
	* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
	ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
	MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
	MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
	MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
	MmDeleteAllRmaps, MmDeleteRmap): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
	MmAccessFaultSectionView, MmPageOutDeleteMapping,
	MmPageOutSectionView, MmFreeSectionPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
	MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
	use PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
	MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
	MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
	MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
	physical address.
	* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
	PHYSICAL_ADDRESS type for physical address.

2002-06-04  David Welch  <welch@cwcom.net>

	* Lots of change since the ChangeLog was last updated.

svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
Eric Kohl
a7a6f4a353 Fixed typo!
svn path=/trunk/; revision=2999
2002-06-04 14:14:07 +00:00
Eric Kohl
0fae9a2eac Fixed token type initialization.
svn path=/trunk/; revision=2998
2002-06-04 13:44:06 +00:00
Casper Hornstrup
a31f8b8f88 Corrected install.bat
svn path=/trunk/; revision=2997
2002-06-02 22:19:11 +00:00
Nedko Arnaudov
63409d34cf Ignore some intermediate files
svn path=/trunk/; revision=2996
2002-06-02 21:16:44 +00:00
Casper Hornstrup
1504a1115c Compile with new layout
svn path=/trunk/; revision=2995
2002-06-02 19:25:02 +00:00
Robert Kopferl
3d8bcf9d02 reorganized some files
svn path=/trunk/; revision=2994
2002-05-30 15:11:47 +00:00
Eric Kohl
9238b6279b Replaced linux partition type constants.
svn path=/trunk/; revision=2993
2002-05-29 21:41:41 +00:00
Eric Kohl
f07010f0fe Replaces linux partition type constants.
svn path=/trunk/; revision=2992
2002-05-29 21:39:06 +00:00
Eric Kohl
a6945246c2 Minor cleanup
svn path=/trunk/; revision=2991
2002-05-28 16:11:17 +00:00
Eric Kohl
b5f307997d Wait for BUSY to clear prior to selecting a drive. Disabled old code.
svn path=/trunk/; revision=2990
2002-05-28 09:34:18 +00:00
Eric Kohl
4cd4c7a855 Build a fake partition table for removable media drives.
svn path=/trunk/; revision=2989
2002-05-28 09:29:07 +00:00
Eric Kohl
d92e35924c Fix to support removable media (512 bytes per sector only!).
svn path=/trunk/; revision=2988
2002-05-28 09:25:09 +00:00
Hartmut Birr
a6f55d8cf7 Fixed creation of paging file in SmPagingFilesQueryRoutine.
svn path=/trunk/; revision=2987
2002-05-27 18:24:44 +00:00
Hartmut Birr
5d9e939c65 Fixed returned file length in GetFileInformationByHandle.
svn path=/trunk/; revision=2986
2002-05-27 18:23:49 +00:00
Eric Kohl
69494ad0b8 Silenced debug messages.
svn path=/trunk/; revision=2985
2002-05-26 20:25:49 +00:00
Eric Kohl
f193742266 Implemented command retries.
Improved error handling.

svn path=/trunk/; revision=2984
2002-05-26 20:24:42 +00:00
Eric Kohl
af5a948adf Always update disk geometry.
svn path=/trunk/; revision=2983
2002-05-26 20:23:22 +00:00
Eric Kohl
5aad28cf99 Silenced debug messages.
svn path=/trunk/; revision=2982
2002-05-26 20:20:39 +00:00
Eric Kohl
32e8099716 Enabled driver letter assignment for removable drives.
svn path=/trunk/; revision=2981
2002-05-26 20:18:18 +00:00
Eric Kohl
9ca6cf1169 Made NTFS-Partitions mountable.
svn path=/trunk/; revision=2980
2002-05-25 13:32:51 +00:00
Eric Kohl
a9f79206fa Fixed timeout for unpopulated ide channels.
Fixed inquiry data block for unpopulated ide channels.
Minor cleanup.

svn path=/trunk/; revision=2979
2002-05-25 13:30:53 +00:00
Eric Kohl
66bc07c8b9 Fixed severe bug in drive detection code.
Minor cleanup.

svn path=/trunk/; revision=2978
2002-05-24 22:28:11 +00:00
Eric Kohl
6ff87bd4f1 Fixed a severe bug in RtlQueryRegistryValues() and implemented support for REG_EXPAND_SZ.
Read the system environment from the registry.

svn path=/trunk/; revision=2977
2002-05-24 18:08:39 +00:00
Eric Kohl
dffbf01285 Added import of REG_EXPAND_SZ registry values.
Added media change support.
Added 'BootExecute'-feature to smss.
Added autochk dummy application.

svn path=/trunk/; revision=2976
2002-05-24 07:52:09 +00:00
Emanuele Aliberti
890bc030ff Build failed, then I removed it and checked it out again but ^Ms were there again.
I just removed the ^M at EOF. Maybe this time it works.

svn path=/trunk/; revision=2975
2002-05-23 20:59:22 +00:00
Eric Kohl
02fd65a6dc Use NT-compatible (VPB-based) mounting mechanism.
svn path=/trunk/; revision=2974
2002-05-23 09:53:26 +00:00
Brian Palmer
e5423f156b Compared the output of fat.asm from nasm v0.98 and nasm v0.98.32.
Modified fat.asm to produce the same output under both versions.

svn path=/trunk/; revision=2973
2002-05-22 22:15:28 +00:00
Eric Kohl
8e529b4411 Read settings from the registry.
svn path=/trunk/; revision=2972
2002-05-22 15:55:51 +00:00
Eric Kohl
47ee8afc68 Fixed Unload routine prototype.
svn path=/trunk/; revision=2971
2002-05-21 19:29:00 +00:00
David Welch
f4623b38f3 ntoskrnl/cc/view.c: CcRosTrimCache: Added a comment describing the
function.
ntoskrnl/ex/fmutex.c: ExAcquireFastMutexUnsafe: Reverted incorrect fix.
ntoskrnl/mm/section.c: MmUnmapViewOfSection: Removed acquiring the address
space lock; this is always done by the caller.
ntoskrnl/mm/section.c: NtUnmapViewOfSection: Hold the address space lock
over calls to MmUnmapViewOfSection.

svn path=/trunk/; revision=2970
2002-05-19 14:09:35 +00:00
Casper Hornstrup
10100f9649 Fixed a bug in ExAquireFastMutexUnsafe
svn path=/trunk/; revision=2969
2002-05-19 13:53:02 +00:00
David Welch
daad760238 services/fs/cdfs/.cvsignore: Added .cvsignore file
ntoskrnl/ex/fmutex.c: ExAcquireFastMutex: Added an check for recursively
acquiring a FAST_MUTEX.
ntoskrnl/include/internal/mm.h: ADDRESS_SPACE: Changed lock from a KMUTEX
to a FAST_MUTEX.
ntoskrnl/mm/aspace: MmLockAddressSpace, MmUnlockAddressSpace,
MmInitializeAddressSpace: Changed lock from a KMUTEX to a FAST_MUTEX
ntoskrnl/mm/mdl.c: MmInitializeMdlImplementation, MmMapLockedPages,
MmUnmapLockedPages: Use a special region that doesn't need the address
space lock for mapping MDLs.
ntoskrnl/mm/mminit.c: MmInit2: Call MDL initialization routine.
ntoskrnl/mm/section.c: MmMapViewOfSegment: Changed to a static function,
don't lock the address space since it is done by the caller.
ntoskrnl/ps/thread.c: PsDumpThreads: Fixed garbage prints in stack dump.

svn path=/trunk/; revision=2968
2002-05-17 23:01:57 +00:00
KJK::Hyperion
aec0b9bcfc New calls and new exported functions
svn path=/trunk/; revision=2967
2002-05-17 02:21:54 +00:00
KJK::Hyperion
da32d20e2c Miscellaneous calls
svn path=/trunk/; revision=2966
2002-05-17 02:16:16 +00:00
KJK::Hyperion
2d949174b9 Preliminary code for fork()
svn path=/trunk/; revision=2965
2002-05-17 02:12:55 +00:00
KJK::Hyperion
bce8535f50 Started implementing sys/stat.h calls
svn path=/trunk/; revision=2964
2002-05-17 02:10:41 +00:00
KJK::Hyperion
75a810da7d TLS calls (currently unused)
svn path=/trunk/; revision=2963
2002-05-17 02:07:14 +00:00
KJK::Hyperion
69ca37d697 Temporary code for debugging purposes
svn path=/trunk/; revision=2962
2002-05-17 02:04:39 +00:00
KJK::Hyperion
d24e468cb0 Fixed some embarassing errors
svn path=/trunk/; revision=2961
2002-05-17 01:55:34 +00:00
KJK::Hyperion
a2da78fa4e errno finally thread-safe
svn path=/trunk/; revision=2960
2002-05-17 01:52:03 +00:00
KJK::Hyperion
a97804075b Temporary code for debugging purposes
svn path=/trunk/; revision=2959
2002-05-17 01:49:53 +00:00
KJK::Hyperion
084950fd26 Temporary code
svn path=/trunk/; revision=2958
2002-05-17 01:47:13 +00:00
KJK::Hyperion
34a6708f44 Fixed assert() macro, fixed header
svn path=/trunk/; revision=2957
2002-05-17 01:42:41 +00:00
KJK::Hyperion
9523648137 SysV IPC headers
svn path=/trunk/; revision=2956
2002-05-17 01:37:15 +00:00
Eric Kohl
cca52d053b Modified LdrLoadModule() to return NTSTATUS.
Added missing definitions.

svn path=/trunk/; revision=2955
2002-05-16 06:41:30 +00:00
Eric Kohl
2d27974602 Added experimental support for FAT and NTFS FSDs.
Silenced debug messges.

svn path=/trunk/; revision=2954
2002-05-15 18:05:00 +00:00
Eric Kohl
1875c5ebb2 Added file system recognizer driver.
Implemented file system driver loading.
Minor cleanup.

svn path=/trunk/; revision=2953
2002-05-15 09:42:19 +00:00
Eric Kohl
3991d36943 Silenced debug message.
svn path=/trunk/; revision=2952
2002-05-14 23:17:12 +00:00
Eric Kohl
58cf63221a Fixed several cache-related bugs.
Silenced debug messages.

svn path=/trunk/; revision=2951
2002-05-14 23:16:23 +00:00
David Welch
fb21de32de Reverted the MPW changes (keep these in a seperate branch)
svn path=/trunk/; revision=2950
2002-05-14 21:19:21 +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
6057 changed files with 706568 additions and 506374 deletions

View File

@@ -1,39 +0,0 @@
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,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,167 +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
; [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
; Driver - sets the name of one or more drivers to be loaded (one entry per driver)
[FREELOADER]
MessageLine=Welcome to FreeLoader!
MessageLine=Copyright (c) 2002 by Brian Palmer <brianp@sginet.com>
MessageLine=
MessageBox=Edit your FREELDR.INI file to change your boot settings.
OS=ReactOS (HD)
OS=ReactOS (Floppy)
;OS=ReactOS (Debug)
OS=Linux
OS=LinuxInitrd
OS=3<> Floppy (A:)
OS=Microsoft Windows (C:)
OS=Drive D:
DefaultOS=ReactOS (Floppy)
TimeOut=10
[Display]
TitleText=Boot Menu
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
; Load ReactOS from harddisk (drive C:)
[ReactOS (HD)]
Name="ReactOS (HardDrive)"
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
Driver=\REACTOS\SYSTEM32\DRIVERS\IDE.SYS
Driver=\REACTOS\SYSTEM32\DRIVERS\VFATFS.SYS
; Load ReactOS from floppy (drive A:)
[ReactOS (Floppy)]
Name="ReactOS (Floppy)"
BootType=ReactOS
SystemPath=multi(0)disk(0)fdisk(0)
Options=/DEBUGPORT=SCREEN
Kernel=\reactos\NTOSKRNL.EXE
Hal=\reactos\HAL.DLL
Driver=\reactos\IDE.SYS
Driver=\reactos\VFATFS.SYS
;[ReactOS (Debug)]
;Name="ReactOS (Debug)"
;BootType=ReactOS
;BootDrive=0
;Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=19200
;Kernel=\NTOSKRNL.EXE
;Hal=\HAL.DLL
;Driver=\DRIVERS\IDE.SYS
;Driver=\DRIVERS\VFATFS.SYS
[Linux]
Name="Debian Linux 2.2.17"
BootType=Linux
BootDrive=0
Kernel=/vmlinuz
CommandLine="root=/dev/sdb1"
[Linux]
Name="Linux w/Initrd"
BootType=Linux
BootDrive=0x80
BootPartition=1
Kernel=/vmlinuz
Initrd=/initrd.gz
CommandLine=
[3<> Floppy (A:)]
Name="3<> Floppy (A:)"
BootType=Drive
BootDrive=0
[Microsoft Windows (C:)]
Name="Microsoft Windows (C:)"
BootType=Drive
BootDrive=0x80
[Drive D:]
Name="Drive D:"
BootType=Partition
BootDrive=0x81
BootPartition=1

View File

@@ -1,44 +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.
#
export CC = gcc
export LD = ld
export AR = ar
export RM = cmd /C del
export CP = cmd /C copy
export NASM_CMD = nasm
export MAKE = make
.PHONY : bootsect freeldr install clean
all: bootsect freeldr install
bootsect:
$(MAKE) -C bootsect
freeldr: bootsect
$(MAKE) -C freeldr
install:
$(MAKE) -C install
clean:
$(RM) *.bin
$(MAKE) -C freeldr clean

View File

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

View File

@@ -1,49 +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.
#
export CC = gcc
export LD = ld
export AR = ar
export RM = cmd /C del
export CP = cmd /C copy
export NASM_CMD = nasm
.PHONY : clean
all: fat.bin fat32.bin isoboot.bin bin2c.exe
fat.bin: fat.asm bin2c.exe
$(NASM_CMD) -o fat.bin -f bin fat.asm
bin2c fat.bin fat.h fat_data
fat32.bin: fat32.asm bin2c.exe
$(NASM_CMD) -o fat32.bin -f bin fat32.asm
bin2c fat32.bin fat32.h fat32_data
isoboot.bin: isoboot.asm
$(NASM_CMD) -o isoboot.bin -f bin isoboot.asm
bin2c.exe: bin2c.c
$(CC) -o bin2c.exe bin2c.c
clean:
- $(RM) *.bin
- $(RM) *.exe
- $(RM) *.h

View File

@@ -1,48 +0,0 @@
#include <stdio.h>
FILE *in;
FILE *out;
int main(int argc, char *argv[])
{
unsigned char ch;
int cnt = 0;
if (argc < 4)
{
printf("usage: bin2c infile.bin outfile.h array_name\n");
return -1;
}
if ((in = fopen(argv[1], "rb")) == NULL)
{
printf("Couldn't open data file.\n");
return -1;
}
if ((out = fopen(argv[2], "wb")) == NULL)
{
printf("Couldn't open output file.\n");
return -1;
}
fprintf(out, "unsigned char %s[] = {\n", argv[3]);
ch = fgetc(in);
while (!feof(in))
{
if (cnt != 0)
fprintf(out, ", ");
if (!(cnt % 16))
fprintf(out, "\n");
fprintf(out, "0x%02x", (int)ch);
cnt++;
ch = fgetc(in);
}
fprintf(out, "\n};");
fclose(in);
fclose(out);
return 0;
}

View File

@@ -1,380 +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
BiosCHSDriveSize equ 0x6
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow 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
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
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 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
; 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]
call ReadSectors
ret
; Displays an error message
; And reboots
ErrBoot:
mov si,msgFreeLdr ; FreeLdr not found message
call PutChars ; Display it
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
Reboot:
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
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
jmp Reboot
; Reads logical sectors into [ES:BX]
; DX:AX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
cmp dx,WORD [BYTE bp-BiosCHSDriveSizeHigh]; Check if they are reading a sector within CHS range
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:
pushad ; 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,0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
inc ax ; Increment Sector to Read
jnz NoCarry
inc dx
NoCarry:
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop ReadSectorsLBA ; 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:
pushad
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,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 BadBoot
popad
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 ReadSectorsCHS ; 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 510-($-$$) db 0 ; Pad to 510 bytes
dw 0aa55h ; BootSector signature

View File

@@ -1,466 +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
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 within CHS range
jbe ReadSectorsCHS ; Yes - go to the old CHS routine
ReadSectorsLBA:
pushad ; Save logical sector number & sector count
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 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
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 PrintDiskError ; If the read failed then abort
add sp,0x10 ; Remove disk address packet from stack
popad ; Restore sector count & logical sector number
inc eax ; Increment sector to read
mov dx,es
add dx,byte 20h ; Increment read buffer for next sector
mov es,dx
loop 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:
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 ReadSectorsCHS ; Read next sector
ret
; Displays a disk error message
; And reboots
PrintDiskError:
mov si,msgDiskError ; Bad boot disk message
call PutChars ; Display it
mov si,msgAnyKey ; Press any key 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
mov si,msgAnyKey ; Press any key message
call PutChars ; Display it
Reboot:
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 510-($-$$) db 0 ; Pad to 510 bytes
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,800h
mov es,bx ; Read cluster to [0000:8000h]
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,800h ; We loaded at 0800: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
popad
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]
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
mov bx,7000h
mov es,bx
xor bx,bx ; We will load it to [7000:0000h]
mov cx,1
call ReadSectors
mov bx,7000h
mov es,bx
pop ecx
mov eax,DWORD [es:ecx] ; Get FAT entry
and eax,0fffffffh ; Mask off reserved bits
ret
; 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

View File

@@ -1,960 +0,0 @@
; ****************************************************************************
;
; isolinux.asm
;
; A program to boot Linux kernels off a CD-ROM using the El Torito
; boot standard in "no emulation" mode, making the entire filesystem
; available. It is based on the SYSLINUX boot loader for MS-DOS
; floppies.
;
; Copyright (C) 1994-2001 H. Peter Anvin
;
; 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, Inc., 675 Mass Ave, Cambridge MA 02139,
; USA; either version 2 of the License, or (at your option) any later
; version; incorporated herein by reference.
;
; ****************************************************************************
;
; THIS FILE IS A MODIFIED VERSION OF ISOLINUX.ASM
; MODIFICATION DONE BY MICHAEL K TER LOUW
; LAST UPDATED 3-9-2002
; SEE "COPYING" FOR INFORMATION ABOUT THE LICENSE THAT APPLIES TO THIS RELEASE
;
; ****************************************************************************
;
; This file is a modified version of ISOLINUX.ASM.
; Modification done by Eric Kohl
; Last update 04-25-2002
;
; ****************************************************************************
; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
;%define DEBUG_MESSAGES ; Uncomment to get debugging messages
; ---------------------------------------------------------------------------
; BEGIN THE BIOS/CODE/DATA SEGMENT
; ---------------------------------------------------------------------------
absolute 0400h
serial_base resw 4 ; Base addresses for 4 serial ports
absolute 0413h
BIOS_fbm resw 1 ; Free Base Memory (kilobytes)
absolute 046Ch
BIOS_timer resw 1 ; Timer ticks
absolute 0472h
BIOS_magic resw 1 ; BIOS reset magic
absolute 0484h
BIOS_vidrows resb 1 ; Number of screen rows
;
; Memory below this point is reserved for the BIOS and the MBR
;
absolute 1000h
trackbuf resb 8192 ; Track buffer goes here
trackbufsize equ $-trackbuf
; trackbuf ends at 3000h
struc open_file_t
file_sector resd 1 ; Sector pointer (0 = structure free)
file_left resd 1 ; Number of sectors left
endstruc
struc dir_t
dir_lba resd 1 ; Directory start (LBA)
dir_len resd 1 ; Length in bytes
dir_clust resd 1 ; Length in clusters
endstruc
MAX_OPEN_LG2 equ 2 ; log2(Max number of open files)
MAX_OPEN equ (1 << MAX_OPEN_LG2)
SECTORSIZE_LG2 equ 11 ; 2048 bytes/sector (El Torito requirement)
SECTORSIZE equ (1 << SECTORSIZE_LG2)
CR equ 13 ; Carriage Return
LF equ 10 ; Line Feed
absolute 5000h ; Here we keep our BSS stuff
DriveNo resb 1 ; CD-ROM BIOS drive number
DiskError resb 1 ; Error code for disk I/O
RetryCount resb 1 ; Used for disk access retries
TimeoutCount resb 1 ; Timeout counter
ISOFlags resb 1 ; Flags for ISO directory search
RootDir resb dir_t_size ; Root directory
CurDir resb dir_t_size ; Current directory
ISOFileName resb 64 ; ISO filename canonicalization buffer
ISOFileNameEnd equ $
alignb open_file_t_size
Files resb MAX_OPEN*open_file_t_size
section .text
org 7000h
start:
cli ; Disable interrupts
xor ax, ax ; ax = segment zero
mov ss, ax ; Initialize stack segment
mov sp, start ; Set up stack
mov ds, ax ; Initialize other segment registers
mov es, ax
mov fs, ax
mov gs, ax
sti ; Enable interrupts
cld ; Increment pointers
mov cx, 2048 >> 2 ; Copy the bootsector
mov si, 0x7C00 ; from 0000:7C00
mov di, 0x7000 ; to 0000:7000
rep movsd ; copy the program
jmp 0:relocate ; jump into relocated code
relocate:
; Display the banner and copyright
%ifdef DEBUG_MESSAGES
mov si, isolinux_banner ; si points to hello message
call writestr ; display the message
mov si,copyright_str
call writestr
%endif
; Make sure the keyboard buffer is empty
.kbd_buffer_test:
call pollchar
jz .kbd_buffer_empty
call getchar
jmp .kbd_buffer_test
.kbd_buffer_empty:
; Display the 'Press key' message and wait for a maximum of 5 seconds
call crlf
mov si, presskey_msg ; si points to 'Press key' message
call writestr ; display the message
mov byte [TimeoutCount], 5
.next_second:
mov eax, [BIOS_timer] ; load current tick counter
add eax, 19 ;
.poll_again:
call pollchar
jnz .boot_cdrom
mov ebx, [BIOS_timer]
cmp eax, ebx
jnz .poll_again
mov si, dot_msg ; print '.'
call writestr
dec byte [TimeoutCount] ; decrement timeout counter
jz .boot_harddisk
jmp .next_second
.boot_harddisk:
; Boot first harddisk (drive 0x80)
mov ax, 0201h
mov dx, 0080h
mov cx, 0001h
mov bx, 7C00h
int 13h
jnc .go_hd
jmp kaboom
.go_hd:
mov ax, cs
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov dx, 0080h
jmp 0:0x7C00
.boot_cdrom:
; Save and display the boot drive number
mov [DriveNo], dl
%ifdef DEBUG_MESSAGES
mov si, startup_msg
call writemsg
mov al, dl
call writehex2
call crlf
%endif
; Now figure out what we're actually doing
; Note: use passed-in DL value rather than 7Fh because
; at least some BIOSes will get the wrong value otherwise
mov ax, 4B01h ; Get disk emulation status
mov dl, [DriveNo]
mov si, spec_packet
int 13h
jc near spec_query_failed ; Shouldn't happen (BIOS bug)
mov dl, [DriveNo]
cmp [sp_drive], dl ; Should contain the drive number
jne near spec_query_failed
%ifdef DEBUG_MESSAGES
mov si, spec_ok_msg
call writemsg
mov al, byte [sp_drive]
call writehex2
call crlf
%endif
found_drive:
; Get drive information
mov ah, 48h
mov dl, [DriveNo]
mov si, drive_params
int 13h
jnc params_ok
mov si, nosecsize_msg
call writemsg
params_ok:
; Check for the sector size (should be 2048, but
; some BIOSes apparently think we're 512-byte media)
;
; FIX: We need to check what the proper behaviour
; is for getlinsec when the BIOS thinks the sector
; size is 512!!! For that, we need such a BIOS, though...
%ifdef DEBUG_MESSAGES
mov si, secsize_msg
call writemsg
mov ax, [dp_secsize]
call writehex4
call crlf
%endif
;
; Clear Files structures
;
mov di, Files
mov cx, (MAX_OPEN*open_file_t_size)/4
xor eax, eax
rep stosd
;
; Now, we need to sniff out the actual filesystem data structures.
; mkisofs gave us a pointer to the primary volume descriptor
; (which will be at 16 only for a single-session disk!); from the PVD
; we should be able to find the rest of what we need to know.
;
get_fs_structures:
mov eax, 16 ; Primary Volume Descriptor (sector 16)
mov bx, trackbuf
call getonesec
mov eax, [trackbuf+156+2]
mov [RootDir+dir_lba],eax
mov [CurDir+dir_lba],eax
%ifdef DEBUG_MESSAGES
mov si, rootloc_msg
call writemsg
call writehex8
call crlf
%endif
mov eax,[trackbuf+156+10]
mov [RootDir+dir_len],eax
mov [CurDir+dir_len],eax
%ifdef DEBUG_MESSAGES
mov si, rootlen_msg
call writemsg
call writehex8
call crlf
%endif
add eax,SECTORSIZE-1
shr eax,SECTORSIZE_LG2
mov [RootDir+dir_clust],eax
mov [CurDir+dir_clust],eax
%ifdef DEBUG_MESSAGES
mov si, rootsect_msg
call writemsg
call writehex8
call crlf
%endif
; Look for the "X86" directory, and if found,
; make it the current directory instead of the root
; directory.
mov di,isolinux_dir
mov al,02h ; Search for a directory
call searchdir_iso
jnz .dir_found
mov si,no_dir_msg
call writemsg
jmp kaboom
.dir_found:
mov [CurDir+dir_len],eax
mov eax,[si+file_left]
mov [CurDir+dir_clust],eax
xor eax,eax ; Free this file pointer entry
xchg eax,[si+file_sector]
mov [CurDir+dir_lba],eax
mov di, isolinux_bin ; di points to Isolinux filename
call searchdir ; look for the file
jnz .isolinux_opened ; got the file
mov si, no_isolinux_msg ; si points to error message
call writemsg ; display the message
jmp kaboom ; fail boot
.isolinux_opened:
push si ; save file pointer
%ifdef DEBUG_MESSAGES
mov si, filelen_msg
call writemsg
call writehex8
call crlf
%endif
mov bx, 0x8000 ; bx = load address
pop si ; si = file pointer
mov cx, 0xFFFF ; load the whole file
call getfssec ; get the first sector
mov dl, [DriveNo] ; dl = boot drive
jmp 0:0x8000 ; jump into OSLoader
;
; searchdir:
;
; Open a file
;
; On entry:
; DS:DI = filename
; If successful:
; ZF clear
; SI = file pointer
; DX:AX or EAX = file length in bytes
; If unsuccessful
; ZF set
;
;
; searchdir_iso is a special entry point for ISOLINUX only. In addition
; to the above, searchdir_iso passes a file flag mask in AL. This is useful
; for searching for directories.
;
alloc_failure:
xor ax,ax ; ZF <- 1
ret
searchdir:
xor al,al
searchdir_iso:
mov [ISOFlags],al
call allocate_file ; Temporary file structure for directory
jnz alloc_failure
push es
push ds
pop es ; ES = DS
mov si,CurDir
cmp byte [di],'\' ; If filename begins with slash
jne .not_rooted
inc di ; Skip leading slash
mov si,RootDir ; Reference root directory instead
.not_rooted:
mov eax,[si+dir_clust]
mov [bx+file_left],eax
mov eax,[si+dir_lba]
mov [bx+file_sector],eax
mov edx,[si+dir_len]
.look_for_slash:
mov ax,di
.scan:
mov cl,[di]
inc di
and cl,cl
jz .isfile
cmp cl,'\'
jne .scan
mov [di-1],byte 0 ; Terminate at directory name
mov cl,02h ; Search for directory
xchg cl,[ISOFlags]
push di
push cx
push word .resume ; Where to "return" to
push es
.isfile:
xchg ax,di
.getsome:
; Get a chunk of the directory
mov si,trackbuf
pushad
xchg bx,si
mov cx,1 ; load one sector
call getfssec
popad
.compare:
movzx eax, byte [si] ; Length of directory entry
cmp al, 33
jb .next_sector
mov cl, [si+25]
xor cl, [ISOFlags]
test cl, byte 8Eh ; Unwanted file attributes!
jnz .not_file
pusha
movzx cx, byte [si+32] ; File identifier length
add si, byte 33 ; File identifier offset
call iso_compare_names
popa
je .success
.not_file:
sub edx, eax ; Decrease bytes left
jbe .failure
add si, ax ; Advance pointer
.check_overrun:
; Did we finish the buffer?
cmp si, trackbuf+trackbufsize
jb .compare ; No, keep going
jmp short .getsome ; Get some more directory
.next_sector:
; Advance to the beginning of next sector
lea ax, [si+SECTORSIZE-1]
and ax, ~(SECTORSIZE-1)
sub ax, si
jmp short .not_file ; We still need to do length checks
.failure:
%ifdef DEBUG_MESSAGES
mov si, findfail_msg
call writemsg
call crlf
%endif
xor eax, eax ; ZF = 1
mov [bx+file_sector], eax
pop es
ret
.success:
mov eax, [si+2] ; Location of extent
mov [bx+file_sector], eax
mov eax, [si+10] ; Data length
push eax
add eax, SECTORSIZE-1
shr eax, SECTORSIZE_LG2
mov [bx+file_left], eax
pop eax
mov edx, eax
shr edx, 16
and bx, bx ; ZF = 0
mov si, bx
pop es
ret
.resume:
; We get here if we were only doing part of a lookup
; This relies on the fact that .success returns bx == si
xchg edx, eax ; Directory length in edx
pop cx ; Old ISOFlags
pop di ; Next filename pointer
mov byte [di-1], '\' ; restore the backslash in the filename
mov [ISOFlags], cl ; Restore the flags
jz .failure ; Did we fail? If so fail for real!
jmp .look_for_slash ; Otherwise, next level
;
; allocate_file: Allocate a file structure
;
; If successful:
; ZF set
; BX = file pointer
; In unsuccessful:
; ZF clear
;
allocate_file:
push cx
mov bx, Files
mov cx, MAX_OPEN
.check:
cmp dword [bx], byte 0
je .found
add bx, open_file_t_size ; ZF = 0
loop .check
; ZF = 0 if we fell out of the loop
.found:
pop cx
ret
;
; iso_compare_names:
; Compare the names DS:SI and DS:DI and report if they are
; equal from an ISO 9660 perspective. SI is the name from
; the filesystem; CX indicates its length, and ';' terminates.
; DI is expected to end with a null.
;
; Note: clobbers AX, CX, SI, DI; assumes DS == ES == base segment
;
iso_compare_names:
; First, terminate and canonicalize input filename
push di
mov di, ISOFileName
.canon_loop:
jcxz .canon_end
lodsb
dec cx
cmp al, ';'
je .canon_end
and al, al
je .canon_end
stosb
cmp di, ISOFileNameEnd-1 ; Guard against buffer overrun
jb .canon_loop
.canon_end:
cmp di, ISOFileName
jbe .canon_done
cmp byte [di-1], '.' ; Remove terminal dots
jne .canon_done
dec di
jmp short .canon_end
.canon_done:
mov [di], byte 0 ; Null-terminate string
pop di
mov si, ISOFileName
.compare:
lodsb
mov ah, [di]
inc di
and ax, ax
jz .success ; End of string for both
and al, al ; Is either one end of string?
jz .failure ; If so, failure
and ah, ah
jz .failure
or ax, 2020h ; Convert to lower case
cmp al, ah
je .compare
.failure:
and ax, ax ; ZF = 0 (at least one will be nonzero)
.success:
ret
;
; getfssec: Get multiple clusters from a file, given the file pointer.
;
; On entry:
; ES:BX -> Buffer
; SI -> File pointer
; CX -> Cluster count; 0FFFFh = until end of file
; On exit:
; SI -> File pointer (or 0 on EOF)
; CF = 1 -> Hit EOF
;
getfssec:
cmp cx, [si+file_left]
jna .ok_size
mov cx, [si+file_left]
.ok_size:
mov bp, cx
push cx
push si
mov eax, [si+file_sector]
call getlinsec
xor ecx, ecx
pop si
pop cx
add [si+file_sector], ecx
sub [si+file_left], ecx
ja .not_eof ; CF = 0
xor ecx, ecx
mov [si+file_sector], ecx ; Mark as unused
xor si,si
stc
.not_eof:
ret
; INT 13h, AX=4B01h, DL=<passed in value> failed.
; Try to scan the entire 80h-FFh from the end.
spec_query_failed:
mov si,spec_err_msg
call writemsg
mov dl, 0FFh
.test_loop:
pusha
mov ax, 4B01h
mov si, spec_packet
mov byte [si], 13 ; Size of buffer
int 13h
popa
jc .still_broken
mov si, maybe_msg
call writemsg
mov al, dl
call writehex2
call crlf
cmp byte [sp_drive], dl
jne .maybe_broken
; Okay, good enough...
mov si, alright_msg
call writemsg
mov [DriveNo], dl
.found_drive:
jmp found_drive
; Award BIOS 4.51 apparently passes garbage in sp_drive,
; but if this was the drive number originally passed in
; DL then consider it "good enough"
.maybe_broken:
cmp byte [DriveNo], dl
je .found_drive
.still_broken: dec dx
cmp dl, 80h
jnb .test_loop
fatal_error:
mov si, nothing_msg
call writemsg
.norge:
jmp short .norge
; Information message (DS:SI) output
; Prefix with "isolinux: "
;
writemsg:
push ax
push si
mov si, isolinux_str
call writestr
pop si
call writestr
pop ax
ret
;
; crlf: Print a newline
;
crlf:
mov si, crlf_msg
; Fall through
;
; writestr: write a null-terminated string to the console, saving
; registers on entry.
;
writestr:
pushfd
pushad
.top:
lodsb
and al, al
jz .end
call writechr
jmp short .top
.end:
popad
popfd
ret
;
; writehex[248]: Write a hex number in (AL, AX, EAX) to the console
;
writehex2:
pushfd
pushad
shl eax, 24
mov cx, 2
jmp short writehex_common
writehex4:
pushfd
pushad
shl eax, 16
mov cx, 4
jmp short writehex_common
writehex8:
pushfd
pushad
mov cx, 8
writehex_common:
.loop:
rol eax, 4
push eax
and al, 0Fh
cmp al, 10
jae .high
.low:
add al, '0'
jmp short .ischar
.high:
add al, 'A'-10
.ischar:
call writechr
pop eax
loop .loop
popad
popfd
ret
;
; Write a character to the screen. There is a more "sophisticated"
; version of this in the subsequent code, so we patch the pointer
; when appropriate.
;
writechr:
pushfd
pushad
mov ah, 0Eh
xor bx, bx
int 10h
popad
popfd
ret
;
; Get one sector. Convenience entry point.
;
getonesec:
mov bp, 1
; Fall through to getlinsec
;
; Get linear sectors - EBIOS LBA addressing, 2048-byte sectors.
;
; Note that we can't always do this as a single request, because at least
; Phoenix BIOSes has a 127-sector limit. To be on the safe side, stick
; to 32 sectors (64K) per request.
;
; Input:
; EAX - Linear sector number
; ES:BX - Target buffer
; BP - Sector count
;
getlinsec:
mov si,dapa ; Load up the DAPA
mov [si+4],bx
mov bx,es
mov [si+6],bx
mov [si+8],eax
.loop:
push bp ; Sectors left
cmp bp,byte 32
jbe .bp_ok
mov bp,32
.bp_ok:
mov [si+2],bp
push si
mov dl,[DriveNo]
mov ah,42h ; Extended Read
call xint13
pop si
pop bp
movzx eax,word [si+2] ; Sectors we read
add [si+8],eax ; Advance sector pointer
sub bp,ax ; Sectors left
shl ax,SECTORSIZE_LG2-4 ; 2048-byte sectors -> segment
add [si+6],ax ; Advance buffer pointer
and bp,bp
jnz .loop
mov eax,[si+8] ; Next sector
ret
; INT 13h with retry
xint13:
mov byte [RetryCount], 6
.try:
pushad
int 13h
jc .error
add sp, byte 8*4 ; Clean up stack
ret
.error:
mov [DiskError], ah ; Save error code
popad
dec byte [RetryCount]
jnz .try
.real_error:
mov si, diskerr_msg
call writemsg
mov al, [DiskError]
call writehex2
mov si, ondrive_str
call writestr
mov al, dl
call writehex2
call crlf
; Fall through to kaboom
;
; kaboom: write a message and bail out. Wait for a user keypress,
; then do a hard reboot.
;
kaboom:
mov ax, cs
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
sti
mov si, err_bootfailed
call writestr
call getchar
cli
mov word [BIOS_magic], 0 ; Cold reboot
jmp 0F000h:0FFF0h ; Reset vector address
getchar:
.again:
mov ah, 1 ; Poll keyboard
int 16h
jz .again
.kbd:
xor ax, ax ; Get keyboard input
int 16h
.func_key:
ret
;
; pollchar: check if we have an input character pending (ZF = 0)
;
pollchar:
pushad
mov ah,1 ; Poll keyboard
int 16h
popad
ret
isolinux_banner db CR, LF, 'Loading IsoBoot...', CR, LF, 0
copyright_str db ' Copyright (C) 1994-2002 H. Peter Anvin', CR, LF, 0
presskey_msg db 'Press any key to boot from CD', 0
dot_msg db '.',0
%ifdef DEBUG_MESSAGES
startup_msg: db 'Starting up, DL = ', 0
spec_ok_msg: db 'Loaded spec packet OK, drive = ', 0
secsize_msg: db 'Sector size appears to be ', 0
rootloc_msg: db 'Root directory location: ', 0
rootlen_msg: db 'Root directory length: ', 0
rootsect_msg: db 'Root directory length(sectors): ', 0
fileloc_msg: db 'FreeLdr.sys location: ', 0
filelen_msg: db 'FreeLdr.sys length: ', 0
filesect_msg: db 'FreeLdr.sys length(sectors): ', 0
findfail_msg: db 'Failed to find file!', 0
%endif
nosecsize_msg: db 'Failed to get sector size, assuming 0800', CR, LF, 0
spec_err_msg: db 'Loading spec packet failed, trying to wing it...', CR, LF, 0
maybe_msg: db 'Found something at drive = ', 0
alright_msg: db 'Looks like it might be right, continuing...', CR, LF, 0
nothing_msg: db 'Failed to locate CD-ROM device; boot failed.', CR, LF, 0
isolinux_str db 'IsoBoot: ', 0
crlf_msg db CR, LF, 0
diskerr_msg: db 'Disk error ', 0
ondrive_str: db ', drive ', 0
err_bootfailed db CR, LF, 'Boot failed: press a key to retry...'
isolinux_dir db '\REACTOS', 0
no_dir_msg db 'Could not find the REACTOS directory.', CR, LF, 0
isolinux_bin db 'FREELDR.SYS', 0
no_isolinux_msg db 'Could not find the file FREELDR.SYS.', CR, LF, 0
;
; El Torito spec packet
;
align 8, db 0
spec_packet: db 13h ; Size of packet
sp_media: db 0 ; Media type
sp_drive: db 0 ; Drive number
sp_controller: db 0 ; Controller index
sp_lba: dd 0 ; LBA for emulated disk image
sp_devspec: dw 0 ; IDE/SCSI information
sp_buffer: dw 0 ; User-provided buffer
sp_loadseg: dw 0 ; Load segment
sp_sectors: dw 0 ; Sector count
sp_chs: db 0,0,0 ; Simulated CHS geometry
sp_dummy: db 0 ; Scratch, safe to overwrite
;
; EBIOS drive parameter packet
;
align 8, db 0
drive_params: dw 30 ; Buffer size
dp_flags: dw 0 ; Information flags
dp_cyl: dd 0 ; Physical cylinders
dp_head: dd 0 ; Physical heads
dp_sec: dd 0 ; Physical sectors/track
dp_totalsec: dd 0,0 ; Total sectors
dp_secsize: dw 0 ; Bytes per sector
dp_dpte: dd 0 ; Device Parameter Table
dp_dpi_key: dw 0 ; 0BEDDh if rest valid
dp_dpi_len: db 0 ; DPI len
db 0
dw 0
dp_bus: times 4 db 0 ; Host bus type
dp_interface: times 8 db 0 ; Interface type
db_i_path: dd 0,0 ; Interface path
db_d_path: dd 0,0 ; Device path
db 0
db_dpi_csum: db 0 ; Checksum for DPI info
;
; EBIOS disk address packet
;
align 8, db 0
dapa: dw 16 ; Packet size
.count: dw 0 ; Block count
.off: dw 0 ; Offset of buffer
.seg: dw 0 ; Segment of buffer
.lba: dd 0 ; LBA (LSW)
dd 0 ; LBA (MSW)
times 2048-($-$$) nop ; Pad to file offset 2048

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,261 +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.
#
#############################################
# CHANGE THESE FOR YOUR OUTPUT
#
TARGET = i386
DEBUG = 1 # Debugging information on (bigger binary)
#DEBUG = 0 # Debugging information off (smaller binary)
OBJDIR = obj
OUTPUT_DIR = $(OBJDIR)/$(TARGET)
#############################################
# COMPILER AND LINKER PROGRAMS
#
CC = gcc
LD = ld
AR = ar
RM = cmd /C del
CP = cmd /C copy
MKDIR = cmd /C md
RMDIR = cmd /C rd
MAKE = cmd /C make
NASM_CMD = nasm
OBJCOPY = objcopy
SED = $(SRCDIR)/../sed
#-----------------------------------------------------------------------------------------------------
# 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)/$(OUTPUT_DIR),$(notdir $(CURDIR))))
ifneq ($(CURDIR), $(SRCDIR)/$(OUTPUT_DIR))
.SUFFIXES:
#############################################
# VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE
#
MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \
-f ../../Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS)
.PHONY: CHANGE_TO_TARGET
CHANGE_TO_TARGET: $(OBJDIR) $(OBJDIR)/$(TARGET)
+@$(MAKETARGET)
$(OBJDIR):
@echo Creating directory: $(OBJDIR)
@$(MKDIR) $(OBJDIR)
$(OBJDIR)/$(TARGET): $(OBJDIR)
@echo Creating directory: $(OBJDIR)\$(TARGET)
@$(MKDIR) $(OBJDIR)\$(TARGET)
Makefile : ;
% :: CHANGE_TO_TARGET
#############################################
.PHONY : clean
clean:
@echo Cleaning directory $(OBJDIR)\$(TARGET)
@-$(RM) /Q $(OBJDIR)\$(TARGET)\*.*
@echo Removing directory $(OBJDIR)\$(TARGET)
@-$(RMDIR) $(OBJDIR)\$(TARGET)
@-$(RMDIR) $(OBJDIR)
@echo Clean ALL done.
#############################################
#-----------------------------------------------------------------------------------------------------
# END MAGIC TARGET DIRECTORY CHANGE STUFF
#-----------------------------------------------------------------------------------------------------
else
#############################################
# COMPILER COMMAND LINE OPTIONS
#
COMPILER_OPTIONS = -Wall -nostdlib -nostdinc -fno-builtin -O3 -MD
#############################################
# COMPILER DEFINES
#
ifeq ($(DEBUG),1)
COMPILER_DEFINES = -DDEBUG
else
COMPILERS_DEFINES =
endif
#############################################
# INCLUDE DIRECTORY OPTIONS
#
COMPILER_INCLUDES = -I$(SRCDIR)/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 -s
#############################################
# LINKERS FLAGS
#
LFLAGS = $(LINKER_OPTIONS)
#############################################
# 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
# end.o must come last in the link line
ARCH_OBJS = fathelp.o \
arch.o \
boot.o \
linux.o \
mb.o \
mem.o \
diskint13.o
RTL_OBJS = memory.o \
print.o \
stdlib.o \
string.o \
list.o
FS_OBJS = fs.o \
fat.o \
iso.o
UI_OBJS = tui.o \
menu.o
REACTOS_OBJS= reactos.o \
arcname.o \
hwdetect.o \
reghive.o \
registry.o
COMM_OBJS = rs232.o \
portio.o
DISK_OBJS = disk.o \
geometry.o \
partition.o
MM_OBJS = mm.o \
mm_init.o
CACHE_OBJS = cache.o \
blocklist.o
INIFILE_OBJS= inifile.o \
ini_init.o \
parse.o
FREELDR_OBJS= freeldr.o \
miscboot.o \
options.o \
linuxboot.o \
multiboot.o \
debug.o \
oslist.o \
version.o \
end.o # Must come last in the link line
#############################################
# ALL THE OBJECTS
#
OBJS = $(ARCH_OBJS) \
$(RTL_OBJS) \
$(FS_OBJS) \
$(UI_OBJS) \
$(REACTOS_OBJS) \
$(COMM_OBJS) \
$(DISK_OBJS) \
$(MM_OBJS) \
$(CACHE_OBJS) \
$(INIFILE_OBJS) \
$(FREELDR_OBJS)
#############################################
# SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
#
VPATH = $(SRCDIR)/ \
$(SRCDIR)/arch/$(TARGET) \
$(SRCDIR)/rtl \
$(SRCDIR)/fs \
$(SRCDIR)/ui \
$(SRCDIR)/reactos \
$(SRCDIR)/comm \
$(SRCDIR)/disk \
$(SRCDIR)/mm \
$(SRCDIR)/cache \
$(SRCDIR)/inifile \
$(SRCDIR)/include
#############################################
all : freeldr.sys
@echo Make ALL done.
#############################################
freeldr.sys : $(OBJS)
@echo ===================================================== LINKING $@
# @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(OBJS)
@$(LD) $(LFLAGS) -o freeldr.exe $(OBJS)
@$(OBJCOPY) -O binary freeldr.exe freeldr.sys
#############################################
%.o :: %.c
@echo ===================================================== Compiling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(SED) -e "s/\($*\)\.o[ :]*/\1.o $*.dep : /g" < $*.d > $*.dep
# @$(SED) -e "s/#.*//" -e "s/^[^:]*: *//" -e "s/ *\\$$//" -e "/^$$/ d" -e "s/$$/ :/" < $*.d >> $*.P
%.o :: %.S
@echo ===================================================== Assembling $*
@$(CC) $(CFLAGS) -o $@ -c $<
@$(SED) -e "s/\($*\)\.o[ :]*/\1.o $*.dep : /g" < $*.d > $*.dep
# @$(SED) -e "s/#.*//" -e "s/^[^:]*: *//" -e "s/ *\\$$//" -e "/^$$/ d" -e "s/$$/ :/" < $*.d >> $*.P
%.o :: %.asm
@echo ===================================================== Assembling $*
@$(NASM_CMD) -o $@ -f coff $<
#############################################
# Include the automagically generated dependencies
-include $(OBJS:%.o=%.dep)
#############################################
endif

View File

@@ -1,898 +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)
/* GO! */
call _BootMain
call switch_to_real
.code16
int $0x19
/* We should never get here */
stop:
jmp stop
/*
* Switches the processor to protected mode
* it destroys eax
*/
EXTERN(switch_to_prot)
.code16
cli /* None of these */
/* Get the return address off the stack */
popw (code32ret)
/* Save 16-bit stack pointer */
movw %sp,stack16
/* Load the GDT */
lgdt gdtptr
/* 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
/* 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
movw stack16,%sp
/* Put the return address back onto the stack */
pushw (code16ret)
sti /* These are ok now */
/* Now return in r-mode! */
ret
/*
* void putchar(int ch);
*/
EXTERN(_putchar)
.code32
push %eax
push %ebx
push %ebp
/* Get character to display */
movb 0x10(%esp),%bl
/* If we are displaying a CR '\n' then do a LF also */
cmpb $0x0a,%bl
jnz putchar_1
/* Display the LF */
pushl $0x0d
call _putchar
popl %eax
putchar_1:
/* If we are displaying a TAB '\t' then display 8 spaces ' ' */
cmpb $0x09,%bl
jnz putchar_2
/* Display the 8 spaces ' ' */
pushl $0x20
call _putchar
call _putchar
call _putchar
call _putchar
call _putchar
call _putchar
call _putchar
call _putchar
popl %eax
pop %ebp
pop %ebx
pop %eax
ret
putchar_2:
call switch_to_real
.code16
/* Display the character via BIOS int 0x10 function 0x0e */
movb $0x0e,%ah
movb %bl,%al
movw $1,%bx
int $0x10
call switch_to_prot
.code32
pop %ebp
pop %ebx
pop %eax
ret
/*
* void clrscr(void);
*/
EXTERN(_clrscr)
.code32
push %eax
push %ebp
call switch_to_real
.code16
/* Int 0x10, AH = 0x0F - Get Current Video Mode */
movb $0x0f,%ah
int $0x10
/* Int 0x10, AH = 0x00 - Set Current Video Mode, also clears the screen */
movb $0x00,%ah
int $0x10
call switch_to_prot
.code32
pop %ebp
pop %eax
ret
/*
* int kbhit(void);
*/
EXTERN(_kbhit)
.code32
push %ebp
push %ebx
call switch_to_real
.code16
/* Int 0x16, AH = 0x01 - Get Keyboard Status */
movb $0x01,%ah
int $0x16
jz kbhit_1 // ZF=0 if no key is available
/* Return value is non-zero if a key is available */
movl $1,%ebx
jmp kbhit_done
kbhit_1:
/* Return value is zero if no key is available */
movl $0,%ebx
kbhit_done:
call switch_to_prot
.code32
/* Get return value from ebx */
movl %ebx,%eax
pop %ebx
pop %ebp
ret
/*
* int getch(void);
*/
extended_scancode:
.byte 0
EXTERN(_getch)
.code32
push %ebp
push %ebx
call switch_to_real
.code16
/* Check and see if we have an extended scancode to return */
movb extended_scancode,%al
movb $0,extended_scancode
movzbl %al,%ebx
cmpb $0,%al
jnz getch_done
/* Int 0x16, AH = 0x00 - Wait for keypress */
movb $0,%ah
int $0x16
/* If al is zero then it is an extended key */
cmp $0,%al
jnz getch_1
/* Save the scan code to be returned on the next call to getch() */
movb %ah,extended_scancode
getch_1:
/* Store character in ebx */
movzbl %al,%ebx
getch_done:
call switch_to_prot
.code32
/* Get return value from ebx */
movl %ebx,%eax
pop %ebx
pop %ebp
ret
/*
* void gotoxy(int x, int y);
*/
EXTERN(_gotoxy)
.code32
push %ebp
push %eax
push %ebx
push %edx
/* Get cursor positions */
movb 0x14(%esp),%dl
movb 0x18(%esp),%dh
call switch_to_real
.code16
/* Update the cursor position */
movb $2,%ah
movb $0,%bh
int $0x10
call switch_to_prot
.code32
pop %edx
pop %ebx
pop %eax
pop %ebp
ret
/*
* int getyear(void);
*/
EXTERN(_getyear)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the date */
movb $4,%ah
int $0x1a
/* Convert from BCD to normal */
movb %ch,%al
andb $0x0f,%al
movb %al,%dl
movb %ch,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
movb %dl,%dh
movb %cl,%al
andb $0x0f,%al
movb %al,%dl
movb %cl,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
movb %dl,%cl
movzbl %dh,%eax
movl $100,%ebx
mull %ebx
movl %eax,%edx
addb %cl,%dl
/* Save return value */
movl %edx,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int getday(void);
*/
EXTERN(_getday)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the date */
movb $4,%ah
int $0x1a
/* Convert from BCD to normal */
movb %dl,%al
andb $0x0f,%al
movb %al,%cl
movb %dl,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%cl
/* Save return value */
movzbl %cl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int getmonth(void);
*/
EXTERN(_getmonth)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the date */
movb $4,%ah
int $0x1a
/* Convert from BCD to normal */
movb %dh,%al
andb $0x0f,%al
movb %al,%dl
movb %dh,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
/* Save return value */
movzbl %dl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int gethour(void);
*/
EXTERN(_gethour)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the time */
movb $2,%ah
int $0x1a
/* Convert from BCD to normal */
movb %ch,%al
andb $0x0f,%al
movb %al,%dl
movb %ch,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
/* Save return value */
movzbl %dl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int getminute(void);
*/
EXTERN(_getminute)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the time */
movb $2,%ah
int $0x1a
/* Convert from BCD to normal */
movb %cl,%al
andb $0x0f,%al
movb %al,%dl
movb %cl,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
/* Save return value */
movzbl %dl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int getsecond(void);
*/
EXTERN(_getsecond)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the time */
movb $2,%ah
int $0x1a
/* Convert from BCD to normal */
movb %dh,%al
andb $0x0f,%al
movb %al,%dl
movb %dh,%al
shrb $0x04,%al
andb $0x0f,%al
movb $0x0a,%bl
mulb %bl
addb %al,%dl
/* Save return value */
movzbl %dl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* void hidecursor(void);
*/
EXTERN(_hidecursor)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Hide the cursor */
movb $1,%ah
movw $0x2000,%cx
int $0x10
call switch_to_prot
.code32
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* void showcursor(void);
*/
EXTERN(_showcursor)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Show the cursor */
movb $1,%ah
movb $0x0d,%ch
movb $0x0e,%cl
int $0x10
call switch_to_prot
.code32
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int wherex(void);
*/
EXTERN(_wherex)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the cursor position */
movb $3,%ah
movb $0,%bh
int $0x10
/* Save return value */
movzbl %dl,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
ret
/*
* int wherey(void);
*/
EXTERN(_wherey)
.code32
push %ebp
push %ebx
push %ecx
push %edx
call switch_to_real
.code16
/* Get the cursor position */
movb $3,%ah
movb $0,%bh
int $0x10
/* Save return value */
movzbl %dh,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
pop %edx
pop %ecx
pop %ebx
pop %ebp
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)
*/
.code32
EXTERN(_enable_a20)
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
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 */
EXTERN(_BootDrive)
.long 0

View File

@@ -1,45 +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(_ChainLoadBiosBootSectorCode)
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

View File

@@ -1,603 +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"
/*
* BOOL BiosInt13Read(ULONG Drive, ULONG Head, ULONG Track, ULONG Sector, ULONG SectorCount, PVOID Buffer);
*/
_biosdisk_drive:
.long 0
_biosdisk_head:
.long 0
_biosdisk_track:
.long 0
_biosdisk_sector:
.long 0
_biosdisk_nsects:
.long 0
_biosdisk_buffer:
.long 0
_biosdisk_retval:
.long 0
_biosdisk_retrycount:
.byte 0
_biosdisk_error_code:
.byte 0
EXTERN(_BiosInt13Read)
.code32
push %ebp
push %esi
push %edi
push %ebx
push %ecx
push %edx
/* Get parameters */
movl 0x1c(%esp),%eax
movl %eax,_biosdisk_drive
movl 0x20(%esp),%eax
movl %eax,_biosdisk_head
movl 0x24(%esp),%eax
movl %eax,_biosdisk_track
movl 0x28(%esp),%eax
movl %eax,_biosdisk_sector
movl 0x2c(%esp),%eax
movl %eax,_biosdisk_nsects
movl 0x30(%esp),%eax
movl %eax,_biosdisk_buffer
call switch_to_real
.code16
pushw %es // Save this just in case
movb $3,_biosdisk_retrycount // Set the retry count to 3
_biosdisk_read:
movl _biosdisk_buffer,%eax // Get buffer address in eax
shrl $4,%eax // Make linear address into segment
movw %ax,%es // Load ES with segment
movl _biosdisk_buffer,%ebx // and BX with offset
andl $0x0f,%ebx // so that data gets loaded to [ES:BX]
movb _biosdisk_sector,%cl // Get the sector in CL
movw _biosdisk_track,%ax // Cylinder in AX
movb %al,%ch // Now put it in CH
rorb $1,%ah // Low 8 bits of cylinder in CH, high 2 bits
rorb $1,%ah // in CL shifted to bits 6 & 7
andb $0xc0,%ah // Clear out low six bits
orb %ah,%cl // Or with sector number
movb _biosdisk_head,%dh // Get the head
movb _biosdisk_drive,%dl // Get the drive
movb $2,%ah // BIOS int 0x13, function 2 - Read Disk Sectors
movb _biosdisk_nsects,%al // Number of sectors to read
int $0x13 // Read a sector
// I have recently 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
//jmp _biosdisk_done
//cmpb _biosdisk_nsects,%al // See how many sectors we actually read
//jne _biosdisk_error // Jump if no error
movb $1,%al // Set the return value to be one (will be set to zero later if needed)
jc _biosdisk_error // Jump if error (CF = 1 on error)
jmp _biosdisk_done
_biosdisk_error:
movb %ah,_biosdisk_error_code// Save the error code
cmpb $0x11,%ah // Check and see if it was a corrected ECC error
je _biosdisk_done // If so then the data is still good, if not fail
movb _biosdisk_retrycount,%al// Get the current retry count
decb %al // Decrement it
movb %al,_biosdisk_retrycount// Save it
cmpb $0,%al // Is it zero?
jz _biosdisk_zero // Yes, return zero
movb $0,%ah // BIOS int 0x13, function 0 - Reset Disk System
movb _biosdisk_drive,%dl // Get the drive
int $0x13 // Reset the disk system
jmp _biosdisk_read // Try reading again
_biosdisk_zero:
movb $0,%al // We will return zero
_biosdisk_done:
movzbl %al,%eax // Put the number of sectors read into EAX
movl %eax,_biosdisk_retval // Save it as the return value
popw %es // Restore ES
call switch_to_prot
.code32
movl _biosdisk_retval,%eax // Get return value
//movl $1,%eax
pop %edx
pop %ecx
pop %ebx
pop %edi
pop %esi
pop %ebp
ret
/*
* BOOL BiosInt13ReadExtended(ULONG Drive, ULONG Sector, ULONG SectorCount, PVOID Buffer);
*/
_disk_address_packet:
_packet_size:
.byte 0x10
_packet_reserved:
.byte 0
_packet_sector_count:
.word 0
_packet_transfer_buffer_offset:
.word 0
_packet_transfer_buffer_segment:
.word 0
_packet_lba_sector_number:
.quad 0
_packet_64bit_flat_address:
.quad 0
_int13_extended_drive:
.long 0
_int13_extended_sector_count:
.long 0
_int13_extended_retval:
.long 0
_int13_extended_retrycount:
.byte 0
EXTERN(_BiosInt13ReadExtended)
.code32
push %ebp
push %esi
push %edi
push %ebx
push %ecx
push %edx
/* Get parameters */
movl 0x1c(%esp),%eax
movl %eax,_int13_extended_drive
movl 0x20(%esp),%eax
movl %eax,_packet_lba_sector_number
movl 0x24(%esp),%eax
movw %ax,_packet_sector_count
movl %eax,_int13_extended_sector_count
movl 0x28(%esp),%eax // Get buffer address in eax
shrl $4,%eax // Make linear address into segment
movw %ax,_packet_transfer_buffer_segment // Save segment
movl 0x28(%esp),%eax // Get buffer address in eax
andl $0x0f,%eax // Make linear address into offset
movw %ax,_packet_transfer_buffer_offset // Save offset
call switch_to_real
.code16
pushw %es // Save this just in case
movb $3,_int13_extended_retrycount // Set the retry count to 3
_int13_extended_read:
movb _int13_extended_drive,%dl // Get the drive
movb $0x42,%ah // BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
movw $_disk_address_packet,%si // DS:SI -> disk address packet
int $0x13 // Read sectors
jc _int13_extended_error // Jump if error (CF = 1 on error)
movl _int13_extended_sector_count,%eax // Get the sector count in eax
cmpw _packet_sector_count,%ax // See how many sectors we actually read (returned in disk address packet sector count)
jne _int13_extended_error // Jump if not equal
jmp _int13_extended_done
_int13_extended_error:
movb %ah,_biosdisk_error_code // Save the error code
cmpb $0x11,%ah // Check and see if it was a corrected ECC error
je _int13_extended_done // If so then the data is still good, if not fail
movb _int13_extended_retrycount,%al // Get the current retry count
decb %al // Decrement it
movb %al,_int13_extended_retrycount // Save it
cmpb $0,%al // Is it zero?
jz _int13_extended_zero // Yes, return zero
movb $0,%ah // BIOS int 0x13, function 0 - Reset Disk System
movb _int13_extended_drive,%dl // Get the drive
int $0x13 // Reset the disk system
jmp _int13_extended_read // Try reading again
_int13_extended_zero:
movb $0,%al // We will return zero
_int13_extended_done:
movzbl %al,%eax // Put the number of sectors read into EAX
movl %eax,_int13_extended_retval // Save it as the return value
popw %es // Restore ES
call switch_to_prot
.code32
movl _int13_extended_retval,%eax // Get return value
pop %edx
pop %ecx
pop %ebx
pop %edi
pop %esi
pop %ebp
ret
/*
* BOOL BiosInt13ExtensionsSupported(ULONG Drive);
*/
_int13_extension_check_drive:
.long 0
_int13_extension_check_retval:
.long 0
EXTERN(_BiosInt13ExtensionsSupported)
.code32
push %ebp
push %esi
push %edi
push %ebx
push %ecx
push %edx
/* Get parameters */
movl 0x1c(%esp),%eax
movl %eax,_int13_extension_check_drive
call switch_to_real
.code16
// Now make sure this computer supports extended reads
movb $0x41,%ah // AH = 41h
movw $0x55aa,%bx // BX = 55AAh
movb _int13_extension_check_drive,%dl // DL = drive (80h-FFh)
int $0x13 // IBM/MS INT 13 Extensions - INSTALLATION CHECK
jc _int13_extension_check_error // CF set on error (extensions not supported)
cmpw $0xaa55,%bx // BX = AA55h if installed
jne _int13_extension_check_error
testb $1,%cl // CX = API subset support bitmap
jz _int13_extension_check_error // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
// If we get here then we passed all the int13 extension tests
movl $1,_int13_extension_check_retval // Set return value to TRUE
jmp _int13_extension_check_done
_int13_extension_check_error:
movl $0,_int13_extension_check_retval // The tests failed so return FALSE
_int13_extension_check_done:
call switch_to_prot
.code32
movl _int13_extension_check_retval,%eax // Get return value
pop %edx
pop %ecx
pop %ebx
pop %edi
pop %esi
pop %ebp
ret
/*
* ULONG BiosInt13GetLastErrorCode(VOID);
*/
EXTERN(_BiosInt13GetLastErrorCode)
.code32
movzbl _biosdisk_error_code,%eax // Get return value
ret
/*
* void stop_floppy(void);
*
* Stops the floppy drive from spinning, so that other software is
* jumped to with a known state.
*/
EXTERN(_stop_floppy)
.code32
push %eax
push %edx
call switch_to_real
.code16
movw $0x3F2, %dx
xorb %al, %al
outb %al, %dx
call switch_to_prot
.code32
pop %edx
pop %eax
ret
/*
* int get_heads(int drive);
*/
EXTERN(_get_heads)
.code32
push %ebx
push %ecx
push %edx
push %edi
push %es
/* Get drive */
movl 0x18(%esp),%eax
movl %eax,_biosdisk_drive
call switch_to_real
.code16
movb $0x08,%ah
movb _biosdisk_drive,%dl
int $0x13
jc _get_heads_error
movzbl %dh,%edx
incl %edx
movl %edx,_biosdisk_retval
jmp _get_heads_done
_get_heads_error:
movl $0xff,_biosdisk_retval
_get_heads_done:
call switch_to_prot
.code32
movl _biosdisk_retval,%eax // Get return value
pop %es
pop %edi
pop %edx
pop %ecx
pop %ebx
ret
/*
* int get_cylinders(int drive);
*/
EXTERN(_get_cylinders)
.code32
push %ebx
push %ecx
push %edx
push %edi
push %es
/* Get drive */
movl 0x18(%esp),%eax
movl %eax,_biosdisk_drive
call switch_to_real
.code16
movb $0x08,%ah
movb _biosdisk_drive,%dl
int $0x13
jc _get_cylinders_error
xorl %edx,%edx
andb $0xc0,%cl
shrb $0x06,%cl
movb %cl,%dh
movb %ch,%dl
incl %edx
movl %edx,_biosdisk_retval
jmp _get_cylinders_done
_get_cylinders_error:
movl $0xff,_biosdisk_retval
_get_cylinders_done:
call switch_to_prot
.code32
movl _biosdisk_retval,%eax // Get return value
pop %es
pop %edi
pop %edx
pop %ecx
pop %ebx
ret
/*
* int get_sectors(int drive);
*/
EXTERN(_get_sectors)
.code32
push %ebx
push %ecx
push %edx
push %edi
push %es
/* Get drive */
movl 0x18(%esp),%eax
movl %eax,_biosdisk_drive
call switch_to_real
.code16
movb $0x08,%ah
movb _biosdisk_drive,%dl
int $0x13
jc _get_sectors_error
andb $0x3f,%cl
movzbl %cl,%ecx
movl %ecx,_biosdisk_retval
jmp _get_sectors_done
_get_sectors_error:
movl $0xff,_biosdisk_retval
_get_sectors_done:
call switch_to_prot
.code32
movl _biosdisk_retval,%eax // Get return value
pop %es
pop %edi
pop %edx
pop %ecx
pop %ebx
ret
/*
* BOOL BiosInt13GetDriveParameters(ULONG Drive, PGEOMETRY Geometry);
*/
_bios_int13_cylinders:
.long 0
_bios_int13_heads:
.long 0
_bios_int13_sectors:
.long 0
_bios_int13_bytes_per_sector:
.long 0
_bios_int13_drive_parameters_struct_address:
.long 0
EXTERN(_BiosInt13GetDriveParameters)
.code32
push %ebx
push %ecx
push %edx
push %edi
push %esi
push %es
/* Get drive */
movl 0x1c(%esp),%eax
movl %eax,_biosdisk_drive
movl 0x20(%esp),%eax
movl %eax,_bios_int13_drive_parameters_struct_address
call switch_to_real
.code16
movb $0x08,%ah
movb _biosdisk_drive,%dl
int $0x13
jc _BiosInt13GetDriveParameters_Error
// Get the heads
movzbl %dh,%eax
incl %eax
movl %eax,_bios_int13_heads
// Get the sectors
movw %cx,%dx
andb $0x3f,%dl
movzbl %dl,%edx
movl %edx,_bios_int13_sectors
// Get the cylinders
xorl %edx,%edx
andb $0xc0,%cl
shrb $0x06,%cl
movb %cl,%dh
movb %ch,%dl
incl %edx
movl %edx,_bios_int13_cylinders
// Get the bytes per sector
movl $512,_bios_int13_bytes_per_sector // Just assume 512 bytes per sector
movl $0x01,_biosdisk_retval
jmp _BiosInt13GetDriveParameters_Done
_BiosInt13GetDriveParameters_Error:
movl $0x00,_biosdisk_retval
_BiosInt13GetDriveParameters_Done:
call switch_to_prot
.code32
// Copy drive parameters to structure
movl $_bios_int13_cylinders,%esi
movl _bios_int13_drive_parameters_struct_address,%edi
movl $0x04,%ecx
cld
rep movsl
movl _biosdisk_retval,%eax // Get return value
pop %es
pop %esi
pop %edi
pop %edx
pop %ecx
pop %ebx
ret

View File

@@ -1,226 +0,0 @@
; FATHELP.ASM
; FAT12/16 Boot Sector Helper Code
; Copyright (c) 1998, 2001, 2002 Brian Palmer
;org 8000h
segment .text
bits 16
BootSectorStackTop equ 0x7bf2
DataAreaStartHigh equ 0x2
DataAreaStartLow equ 0x4
BiosCHSDriveSize equ 0x6
BiosCHSDriveSizeHigh equ 0x6
BiosCHSDriveSizeLow 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
; 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 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
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,0fh
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 bx,[BYTE bp-DataAreaStartLow]
mov cx,[BYTE bp-DataAreaStartHigh]
; CX:BX now has the number of the starting sector of the data area
xor dx,dx
mov ax,WORD [BYTE bp+TotalSectors]
cmp ax,byte 0
jnz IsFat12_2
mov ax,WORD [BYTE bp+TotalSectorsBig]
mov dx,WORD [BYTE bp+TotalSectorsBig+2]
; DX:AX now contains the number of sectors on the volume
IsFat12_2:
sub ax,bx ; Subtract data area start sector
sub dx,cx ; from total sectors of volume
; DX:AX now contains the number of data sectors on the volume
movzx bx,BYTE [BYTE bp+SectsPerCluster]
div bx
; AX now has the number of clusters on the volume
stc
cmp ax,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

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*0x10+1),%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 (64 * /*sizeof(memory_map_t)*/24)
.byte 0
.endr
EXTERN(_multiboot_kernel_cmdline)
.rept 255
.byte 0
.endr

View File

@@ -1,198 +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"
.code32
EXTERN(_GetExtendedMemorySize)
//
// get extended memory size in KB
//
pushl %edx
pushl %ecx
pushl %ebx
call switch_to_real
.code16
movw $0xe801,%ax
int $0x15
jc .oldstylemem
cmpw $0,%ax
je .cmem
movzwl %bx,%ebx
shll $6,%ebx
movzwl %ax,%eax
addl %ebx,%eax
jmp .done_mem
.cmem:
cmpw $0,%cx
je .oldstylemem
movzwl %dx,%edx
shll $6,%edx
movzwl %cx,%ecx
addl %ecx,%edx
movl %edx,%eax
jmp .done_mem
.oldstylemem:
// int 15h opt e801 don't work , try int 15h, option 88h
movb $0x88,%ah
int $0x15
cmp $0,%ax
je .cmosmem
movzwl %ax,%eax
jmp .done_mem
.cmosmem:
// int 15h opt 88h don't work , try read cmos
xorl %eax,%eax
movb $0x31,%al
outb %al,$0x70
inb $0x71,%al
andl $0xffff,%eax // clear carry
shll $8,%eax
.done_mem:
/* Save return value */
movl %eax,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
popl %ebx
popl %ecx
popl %edx
ret
.code32
EXTERN(_GetConventionalMemorySize)
//
// Get conventional memory size in KB
//
pushl %edx
call switch_to_real
.code16
xorl %eax,%eax
int $0x12
/*xorl %eax,%eax
movb $0x30,%al
outb %al,$0x70
inb $0x71,%al
andl $0xffff,%eax*/ // clear carry
/* Save return value */
movzwl %ax,%edx
call switch_to_prot
.code32
/* Restore return value */
movl %edx,%eax
popl %edx
ret
.code32
_gbmm_mem_map_length:
.long 0
_gbmm_memory_map_addr:
.long 0
EXTERN(_GetBiosMemoryMap)
//
// Retrieve BIOS memory map if available
//
pushl %edx
pushl %ecx
pushl %ebx
pushl %edi
movl $0,_gbmm_mem_map_length
/* Get memory map address off stack */
movl 0x10(%esp),%eax
movl %eax,_gbmm_memory_map_addr
call switch_to_real
.code16
xorl %ebx,%ebx
movl _gbmm_memory_map_addr,%edi
.mmap_next:
movl $0x534D4150,%edx // 'SMAP'
movl $/*sizeof(memory_map_t)*/24,%ecx
movl 0xE820,%eax
int $0x15
jc .done_mmap
cmpl $0x534D4150,%eax // 'SMAP'
jne .done_mmap
addl $/*sizeof(memory_map_t)*/24,%edi
addl $/*sizeof(memory_map_t)*/24,_gbmm_mem_map_length
cmpl $0,%ebx
jne .mmap_next
.done_mmap:
call switch_to_prot
.code32
/* Get return value */
movl _gbmm_mem_map_length,%eax
popl %edi
popl %ebx
popl %ecx
popl %edx
ret

View File

@@ -1,263 +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.
*/
#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, ULONG 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, ULONG 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, ULONG 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 = AllocateMemory(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 = AllocateMemory(CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
if (CacheBlock->BlockData ==NULL)
{
FreeMemory(CacheBlock);
return NULL;
}
// Now try to read in the block
if (!DiskReadLogicalSectors(CacheDrive->DriveNumber, (BlockNumber * CacheDrive->BlockSize), CacheDrive->BlockSize, (PVOID)DISKREADBUFFER))
{
FreeMemory(CacheBlock->BlockData);
FreeMemory(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
FreeMemory(CacheBlockToFree->BlockData);
FreeMemory(CacheBlockToFree);
// Update the cache data
CacheBlockCount--;
CacheSizeCurrent = CacheBlockCount * (CacheDrive->BlockSize * CacheDrive->DriveGeometry.BytesPerSector);
return TRUE;
}
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive)
{
ULONG 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, "LbaSupported = %s.\n", CacheDrive->LbaSupported ? "TRUE" : "FALSE"));
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,329 +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.
*/
#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;
ULONG CacheBlockCount = 0;
ULONG CacheSizeLimit = 0;
ULONG CacheSizeCurrent = 0;
BOOL CacheInitializeDrive(ULONG 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))
{
return TRUE;
}
//
// 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);
FreeMemory(CacheManagerDrive.CacheBlockHead->BlockData);
FreeMemory(CacheManagerDrive.CacheBlockHead);
CacheManagerDrive.CacheBlockHead = NextCacheBlock;
}
}
// Initialize the structure
RtlZeroMemory(&CacheManagerDrive, sizeof(CACHE_DRIVE));
CacheManagerDrive.DriveNumber = DriveNumber;
CacheManagerDrive.LbaSupported = BiosInt13ExtensionsSupported(DriveNumber);
if (!DiskGetDriveGeometry(DriveNumber, &CacheManagerDrive.DriveGeometry))
{
return FALSE;
}
// If LBA is supported then the block size will be 128 sectors (64k)
// If not then the block size is the size of one track
if (CacheManagerDrive.LbaSupported)
{
// FIXME: Temporarily reduced this to
// 64 sectors since not all BIOS calls
// support reading as many as 128 sectors
CacheManagerDrive.BlockSize = 64;//128;
}
else
{
CacheManagerDrive.BlockSize = CacheManagerDrive.DriveGeometry.Sectors;
}
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, "LbaSupported = %s.\n", CacheManagerDrive.LbaSupported ? "TRUE" : "FALSE"));
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;
}
BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer)
{
PCACHE_BLOCK CacheBlock;
ULONG StartBlock;
ULONG SectorOffsetInStartBlock;
ULONG CopyLengthInStartBlock;
ULONG EndBlock;
ULONG SectorOffsetInEndBlock;
ULONG BlockCount;
ULONG 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(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount)
{
PCACHE_BLOCK CacheBlock;
ULONG StartBlock;
ULONG EndBlock;
ULONG BlockCount;
ULONG 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(ULONG MinimumAmountToRelease)
{
ULONG 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,93 +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.
*/
#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
ULONG BlockNumber; // Track index for CHS, 64k block index for LBA
BOOL LockedInCache; // Indicates that this block is locked in cache memory
ULONG 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
{
ULONG DriveNumber;
BOOL LbaSupported;
GEOMETRY DriveGeometry;
ULONG BlockSize; // Block size (in sectors)
PCACHE_BLOCK CacheBlockHead;
} CACHE_DRIVE, *PCACHE_DRIVE;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal data
//
///////////////////////////////////////////////////////////////////////////////////////
extern CACHE_DRIVE CacheManagerDrive;
extern BOOL CacheManagerInitialized;
extern ULONG CacheBlockCount;
extern ULONG CacheSizeLimit;
extern ULONG CacheSizeCurrent;
///////////////////////////////////////////////////////////////////////////////////////
//
// Internal functions
//
///////////////////////////////////////////////////////////////////////////////////////
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Searches the block list for a particular block
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, ULONG 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,183 +0,0 @@
/* $Id: portio.c,v 1.1 2001/11/28 10:26:52 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,
ULONG Count)
{
__asm__ __volatile__ ("cld ; rep ; insb\n\t"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_USHORT (PUSHORT Port,
PUSHORT Buffer,
ULONG Count)
{
__asm__ __volatile__ ("cld ; rep ; insw"
: "=D" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
READ_PORT_BUFFER_ULONG (PULONG Port,
PULONG Buffer,
ULONG 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);
}
USHORT /*STDCALL*/
READ_PORT_USHORT (PUSHORT Port)
{
USHORT Value;
__asm__("inw %w1, %0\n\t"
: "=a" (Value)
: "d" (Port));
SLOW_DOWN_IO;
return(Value);
}
ULONG /*STDCALL*/
READ_PORT_ULONG (PULONG Port)
{
ULONG 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,
ULONG Count)
{
__asm__ __volatile__ ("cld ; rep ; outsb"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_USHORT (PUSHORT Port,
PUSHORT Buffer,
ULONG Count)
{
__asm__ __volatile__ ("cld ; rep ; outsw"
: "=S" (Buffer), "=c" (Count)
: "d" (Port),"0" (Buffer),"1" (Count));
}
VOID /*STDCALL*/
WRITE_PORT_BUFFER_ULONG (PULONG Port,
PULONG Buffer,
ULONG 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 (PUSHORT Port,
USHORT Value)
{
__asm__("outw %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
VOID /*STDCALL*/
WRITE_PORT_ULONG (PULONG Port,
ULONG Value)
{
__asm__("outl %0, %w1\n\t"
:
: "a" (Value),
"d" (Port));
SLOW_DOWN_IO;
}
/* EOF */

View File

@@ -1,276 +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>
/* 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 ULONG Rs232ComPort = 0;
static ULONG 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;
BYTE mcr;
BYTE 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(ULONG ComPort, ULONG BaudRate)
{
ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
//char buffer[80];
ULONG divisor;
BYTE 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,
(ULONG)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,
(ULONG)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,
(ULONG)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 = (ULONG)PortBase;
/*
* print message to blue screen
*/
/*sprintf (buffer,
"\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n",
ComPort,
(ULONG)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,332 +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.
*/
#include <freeldr.h>
#include <debug.h>
#include <rtl.h>
#include <comm.h>
#ifdef DEBUG
//ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
// DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS |
// DPRINT_LINUX;
ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_FILESYSTEM |
/*DPRINT_CACHE |*/ DPRINT_LINUX;
//ULONG DebugPrintMask = DPRINT_INIFILE;
#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
//ULONG DebugPort = RS232;
//ULONG DebugPort = SCREEN;
ULONG DebugPort = BOCHS;
ULONG ComPort = COM1;
//ULONG BaudRate = 19200;
ULONG 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(ULONG Mask)
{
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_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;
default:
DebugPrintChar('U');
DebugPrintChar('N');
DebugPrintChar('K');
DebugPrintChar('N');
DebugPrintChar('O');
DebugPrintChar('W');
DebugPrintChar('N');
DebugPrintChar(':');
DebugPrintChar(' ');
break;
}
}
VOID DebugPrint(ULONG 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;
}
}
}
if (DebugPort == SCREEN)
{
//getch();
}
}
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length)
{
PUCHAR BufPtr = (PUCHAR)Buffer;
ULONG Idx;
ULONG 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,153 +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.
*/
#include <freeldr.h>
#include <disk.h>
#include <fs.h>
#include <rtl.h>
#include <ui.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID DiskError(PUCHAR ErrorString)
{
UCHAR ErrorCodeString[80];
sprintf(ErrorCodeString, "%s\nError Code: 0x%x", ErrorString, BiosInt13GetLastErrorCode());
DbgPrint((DPRINT_DISK, "%s\n", ErrorCodeString));
if (UserInterfaceUp)
{
MessageBox(ErrorCodeString);
}
else
{
printf("%s", ErrorCodeString);
printf("\nPress any key\n");
getch();
}
}
BOOL DiskReadLogicalSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount, PVOID Buffer)
{
ULONG PhysicalSector;
ULONG PhysicalHead;
ULONG PhysicalTrack;
GEOMETRY DriveGeometry;
ULONG NumberOfSectorsToRead;
DbgPrint((DPRINT_DISK, "ReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %d SectorCount: %d Buffer: 0x%x\n", DriveNumber, 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) && (BiosInt13ExtensionsSupported(DriveNumber)))
{
DbgPrint((DPRINT_DISK, "Using Int 13 Extensions for read. BiosInt13ExtensionsSupported(%d) = %s\n", DriveNumber, BiosInt13ExtensionsSupported(DriveNumber) ? "TRUE" : "FALSE"));
//
// LBA is easy, nothing to calculate
// Just do the read
//
if (!BiosInt13ReadExtended(DriveNumber, SectorNumber, SectorCount, Buffer))
{
DiskError("Disk read error.");
return FALSE;
}
}
else
{
//
// 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 are supposed to read
//
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;
}
DbgPrint((DPRINT_DISK, "Calling BiosInt13Read() with PhysicalHead: %d\n", PhysicalHead));
DbgPrint((DPRINT_DISK, "Calling BiosInt13Read() with PhysicalTrack: %d\n", PhysicalTrack));
DbgPrint((DPRINT_DISK, "Calling BiosInt13Read() with PhysicalSector: %d\n", PhysicalSector));
DbgPrint((DPRINT_DISK, "Calling BiosInt13Read() with NumberOfSectorsToRead: %d\n", NumberOfSectorsToRead));
//
// 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.");
return FALSE;
}
//
// Perform the read
//
if (!BiosInt13Read(DriveNumber, PhysicalHead, PhysicalTrack, PhysicalSector, NumberOfSectorsToRead, Buffer))
{
DiskError("Disk read error.");
return FALSE;
}
Buffer += (NumberOfSectorsToRead * DriveGeometry.BytesPerSector);
SectorCount -= NumberOfSectorsToRead;
SectorNumber += NumberOfSectorsToRead;
}
}
return TRUE;
}

View File

@@ -1,37 +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.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
BOOL DiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry)
{
// For now just return the geometry as the BIOS reports it
// BytesPerSector is always set to 512 by BiosInt13GetDriveParameters()
if (!BiosInt13GetDriveParameters(DriveNumber, DriveGeometry))
{
DiskError("Drive geometry unknown.");
return FALSE;
}
return TRUE;
}

View File

@@ -1,269 +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.
*/
#include <freeldr.h>
#include <disk.h>
#include <rtl.h>
#include <mm.h>
#include <debug.h>
#include <arch.h>
BOOL DiskIsDriveRemovable(ULONG 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;
}
BOOL DiskIsDriveCdRom(ULONG DriveNumber)
{
PUCHAR Sector = (PUCHAR)DISKREADBUFFER;
BOOL Result;
// Hard disks use drive numbers >= 0x80
// So if the drive number indicates a hard disk
// then return FALSE
if ((DriveNumber >= 0x80) && (BiosInt13ExtensionsSupported(DriveNumber)))
{
if (!BiosInt13ReadExtended(DriveNumber, 16, 1, Sector))
{
DiskError("Disk read error.");
FreeMemory(Sector);
return FALSE;
}
Result = (Sector[0] == 1 &&
Sector[1] == 'C' &&
Sector[2] == 'D' &&
Sector[3] == '0' &&
Sector[4] == '0' &&
Sector[5] == '1');
return Result;
}
// Drive is not CdRom so return FALSE
return FALSE;
}
BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
ULONG 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 != 1)
{
DiskError("Too many bootable partitions or none found.");
return FALSE;
}
// Copy the partition table entry
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[BootPartition], sizeof(PARTITION_TABLE_ENTRY));
return TRUE;
}
BOOL DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
MASTER_BOOT_RECORD MasterBootRecord;
PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry;
ULONG ExtendedPartitionNumber;
ULONG 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;
for (Index=0; Index<=ExtendedPartitionNumber; Index++)
{
// Get the extended partition table entry
if (!DiskGetFirstExtendedPartitionEntry(&MasterBootRecord, &ExtendedPartitionTableEntry))
{
return FALSE;
}
// Read the partition boot record
if (!DiskReadBootRecord(DriveNumber, ExtendedPartitionTableEntry.SectorCountBeforePartition, &MasterBootRecord))
{
return FALSE;
}
// Get the first real partition table entry
if (!DiskGetFirstPartitionEntry(&MasterBootRecord, PartitionTableEntry))
{
return FALSE;
}
}
// 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)
{
ULONG 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)
{
ULONG 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(ULONG DriveNumber, ULONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord)
{
ULONG Index;
// 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)");
return FALSE;
}
return TRUE;
}

View File

@@ -1,27 +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
#define ASM
#include "arch.h"
EXTERN(_FreeLoaderModuleEnd)
.long _FreeLoaderModuleEnd

View File

@@ -1,205 +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.
*/
#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 "oslist.h"
#include "cache.h"
// Variable BootDrive moved to asmcode.S
//ULONG BootDrive = 0; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
ULONG BootPartition = 0; // Boot Partition, 1-4
ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount);
LONG GetTimeOut(VOID);
VOID BootMain(VOID)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG SectionId;
ULONG OperatingSystemCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
ULONG DefaultOperatingSystem;
LONG TimeOut;
ULONG SelectedOperatingSystem;
enable_a20();
#ifdef DEBUG
DebugInit();
#endif
InitMemoryManager();
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 (!InitUserInterface())
{
printf("Press any key to reboot.\n");
getch();
return;
}
if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
{
MessageBox("Press ENTER to reboot.\n");
goto reboot;
}
if (OperatingSystemCount == 0)
{
MessageBox("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
//
ShowMessageBoxesInSection("FreeLoader");
for (;;)
{
// Show the operating system list menu
if (!DisplayMenu(OperatingSystemDisplayNames, OperatingSystemCount, DefaultOperatingSystem, TimeOut, &SelectedOperatingSystem))
{
MessageBox("Press ENTER to reboot.\n");
goto reboot;
}
TimeOut = -1;
// 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]);
MessageBox(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]);
MessageBox(SettingName);
continue;
}
if (stricmp(SettingValue, "ReactOS") == 0)
{
LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
else if (stricmp(SettingValue, "Linux") == 0)
{
LoadAndBootLinux(OperatingSystemSectionNames[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:
clrscr();
showcursor();
return;
}
ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount)
{
UCHAR DefaultOSText[80];
ULONG SectionId;
ULONG DefaultOS = 0;
ULONG 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;
}
LONG GetTimeOut(VOID)
{
UCHAR TimeOutText[20];
ULONG TimeOut;
ULONG SectionId;
if (!IniOpenSection("FreeLoader", &SectionId))
{
return -1;
}
if (IniReadSettingByName(SectionId, "TimeOut", TimeOutText, 20))
{
TimeOut = atoi(TimeOutText);
}
else
{
TimeOut = -1;
}
return TimeOut;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,164 +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.
*/
#ifndef __FAT_H
#define __FAT_H
typedef struct _FAT_BOOTSECTOR
{
BYTE JumpBoot[3]; // Jump instruction to boot code
UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
WORD BytesPerSector; // Bytes per sector
BYTE SectorsPerCluster; // Number of sectors in a cluster
WORD ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
BYTE NumberOfFats; // Number of FAT tables
WORD RootDirEntries; // Number of root directory entries (fat12/16)
WORD TotalSectors; // Number of total sectors on the drive, 16-bit
BYTE MediaDescriptor; // Media descriptor byte
WORD SectorsPerFat; // Sectors per FAT table (fat12/16)
WORD SectorsPerTrack; // Number of sectors in a track
WORD NumberOfHeads; // Number of heads on the disk
DWORD HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
DWORD TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
BYTE DriveNumber; // Int 0x13 drive number (e.g. 0x80)
BYTE Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
BYTE BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
DWORD VolumeSerialNumber; // Volume serial number
UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
UCHAR FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT "
BYTE BootCodeAndData[448]; // The remainder of the boot sector
WORD BootSectorMagic; // 0xAA55
} PACKED FAT_BOOTSECTOR, *PFAT_BOOTSECTOR;
typedef struct _FAT32_BOOTSECTOR
{
BYTE JumpBoot[3]; // Jump instruction to boot code
UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes
WORD BytesPerSector; // Bytes per sector
BYTE SectorsPerCluster; // Number of sectors in a cluster
WORD ReservedSectors; // Reserved sectors, usually 1 (the bootsector)
BYTE NumberOfFats; // Number of FAT tables
WORD RootDirEntries; // Number of root directory entries (fat12/16)
WORD TotalSectors; // Number of total sectors on the drive, 16-bit
BYTE MediaDescriptor; // Media descriptor byte
WORD SectorsPerFat; // Sectors per FAT table (fat12/16)
WORD SectorsPerTrack; // Number of sectors in a track
WORD NumberOfHeads; // Number of heads on the disk
DWORD HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table)
DWORD TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume
DWORD SectorsPerFatBig; // This field is the FAT32 32-bit count of sectors occupied by ONE FAT. BPB_FATSz16 must be 0
WORD ExtendedFlags; // Extended flags (fat32)
WORD FileSystemVersion; // File system version (fat32)
DWORD RootDirStartCluster; // Starting cluster of the root directory (fat32)
WORD FsInfo; // Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1.
WORD BackupBootSector; // If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6.
BYTE Reserved[12]; // Reserved for future expansion
BYTE DriveNumber; // Int 0x13 drive number (e.g. 0x80)
BYTE Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0.
BYTE BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present.
DWORD VolumeSerialNumber; // Volume serial number
UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory
UCHAR FileSystemType[8]; // Always set to the string "FAT32 "
BYTE BootCodeAndData[420]; // The remainder of the boot sector
WORD BootSectorMagic; // 0xAA55
} PACKED FAT32_BOOTSECTOR, *PFAT32_BOOTSECTOR;
/*
* Structure of MSDOS directory entry
*/
typedef struct //_DIRENTRY
{
UCHAR FileName[11]; /* Filename + extension */
UINT8 Attr; /* File attributes */
UINT8 ReservedNT; /* Reserved for use by Windows NT */
UINT8 TimeInTenths; /* Millisecond stamp at file creation */
UINT16 CreateTime; /* Time file was created */
UINT16 CreateDate; /* Date file was created */
UINT16 LastAccessDate; /* Date file was last accessed */
UINT16 ClusterHigh; /* High word of this entry's start cluster */
UINT16 Time; /* Time last modified */
UINT16 Date; /* Date last modified */
UINT16 ClusterLow; /* First cluster number low word */
UINT32 Size; /* File size */
} PACKED DIRENTRY, * PDIRENTRY;
typedef struct
{
UINT8 SequenceNumber; /* Sequence number for slot */
WCHAR Name0_4[5]; /* First 5 characters in name */
UINT8 EntryAttributes; /* Attribute byte */
UINT8 Reserved; /* Always 0 */
UINT8 AliasChecksum; /* Checksum for 8.3 alias */
WCHAR Name5_10[6]; /* 6 more characters in name */
UINT16 StartCluster; /* Starting cluster number */
WCHAR Name11_12[2]; /* Last 2 characters in name */
} PACKED LFN_DIRENTRY, * PLFN_DIRENTRY;
typedef struct
{
ULONG FileSize; // File size
ULONG FilePointer; // File pointer
PUINT32 FileFatChain; // File fat chain array
ULONG DriveNumber;
} FAT_FILE_INFO, * PFAT_FILE_INFO;
BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector);
ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector);
PVOID FatBufferDirectory(UINT32 DirectoryStartCluster, PUINT32 EntryCountPointer, BOOL RootDirectory);
BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, UINT32 EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
ULONG FatGetNumPathParts(PUCHAR Path);
VOID FatGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path);
void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry);
BOOL FatGetFatEntry(UINT32 Cluster, PUINT32 ClusterPointer);
FILE* FatOpenFile(PUCHAR FileName);
UINT32 FatCountClustersInChain(UINT32 StartCluster);
PUINT32 FatGetClusterChainArray(UINT32 StartCluster);
BOOL FatReadCluster(ULONG ClusterNumber, PVOID Buffer);
BOOL FatReadClusterChain(ULONG StartClusterNumber, ULONG NumberOfClusters, PVOID Buffer);
BOOL FatReadPartialCluster(ULONG ClusterNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer);
BOOL FatReadFile(FILE *FileHandle, ULONG BytesToRead, PULONG BytesRead, PVOID Buffer);
ULONG FatGetFileSize(FILE *FileHandle);
VOID FatSetFilePointer(FILE *FileHandle, ULONG NewFilePointer);
ULONG FatGetFilePointer(FILE *FileHandle);
BOOL FatReadVolumeSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG 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,298 +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.
*/
#include <freeldr.h>
#include <fs.h>
#include "fat.h"
#include "iso.h"
#include <disk.h>
#include <rtl.h>
#include <ui.h>
#include <arch.h>
#include <debug.h>
/////////////////////////////////////////////////////////////////////////////////////////////
// DATA
/////////////////////////////////////////////////////////////////////////////////////////////
ULONG FileSystemType = 0; // Type of filesystem on boot device, set by OpenDiskDrive()
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
VOID FileSystemError(PUCHAR ErrorString)
{
DbgPrint((DPRINT_FILESYSTEM, "%s\n", ErrorString));
if (UserInterfaceUp)
{
MessageBox(ErrorString);
}
else
{
printf("%s", ErrorString);
printf("\nPress any key\n");
getch();
}
}
/*
*
* BOOL OpenDiskDrive(ULONG DriveNumber, ULONG PartitionNumber);
*
* This function is called to open a disk drive 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 OpenDiskDrive(ULONG DriveNumber, ULONG PartitionNumber)
{
PARTITION_TABLE_ENTRY PartitionTableEntry;
DbgPrint((DPRINT_FILESYSTEM, "OpenDiskDrive() 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 and see if it is a cdrom drive
// If so then just assume ISO9660 file system type
if (DiskIsDriveCdRom(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;
}
switch (PartitionTableEntry.SystemIndicator)
{
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);
default:
FileSystemType = 0;
FileSystemError("Unsupported file system.");
return FALSE;
}
return TRUE;
}
PFILE OpenFile(PUCHAR FileName)
{
PFILE FileHandle = NULL;
//
// Print status message
//
DbgPrint((DPRINT_FILESYSTEM, "Opening file '%s'...\n", FileName));
//
// Check file system type and pass off to appropriate handler
//
if (FileSystemType == FS_FAT)
{
FileHandle = FatOpenFile(FileName);
}
else if (FileSystemType == FS_ISO9660)
{
FileHandle = IsoOpenFile(FileName);
}
else
{
FileSystemError("Error: Unknown filesystem.");
}
#ifdef DEBUG
//
// Check return value
//
if (FileHandle != NULL)
{
DbgPrint((DPRINT_FILESYSTEM, "OpenFile() succeeded. FileHandle: 0x%x\n", FileHandle));
}
else
{
DbgPrint((DPRINT_FILESYSTEM, "OpenFile() failed.\n"));
}
#endif // defined DEBUG
return FileHandle;
}
VOID CloseFile(PFILE FileHandle)
{
}
/*
* ReadFile()
* returns number of bytes read or EOF
*/
BOOL ReadFile(PFILE FileHandle, ULONG BytesToRead, PULONG BytesRead, PVOID Buffer)
{
//
// 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);
default:
FileSystemError("Unknown file system.");
return FALSE;
}
return FALSE;
}
ULONG GetFileSize(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFileSize(FileHandle);
case FS_ISO9660:
return IsoGetFileSize(FileHandle);
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
VOID SetFilePointer(PFILE FileHandle, ULONG NewFilePointer)
{
switch (FileSystemType)
{
case FS_FAT:
FatSetFilePointer(FileHandle, NewFilePointer);
break;
case FS_ISO9660:
IsoSetFilePointer(FileHandle, NewFilePointer);
break;
default:
FileSystemError("Unknown file system.");
break;
}
}
ULONG GetFilePointer(PFILE FileHandle)
{
switch (FileSystemType)
{
case FS_FAT:
return FatGetFilePointer(FileHandle);
break;
case FS_ISO9660:
return IsoGetFilePointer(FileHandle);
break;
default:
FileSystemError("Unknown file system.");
break;
}
return 0;
}
BOOL IsEndOfFile(PFILE FileHandle)
{
if (GetFilePointer(FileHandle) >= GetFileSize(FileHandle))
{
return TRUE;
}
else
{
return FALSE;
}
}

View File

@@ -1,559 +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.
*/
#include <freeldr.h>
#include <fs.h>
#include "iso.h"
#include <disk.h>
#include <rtl.h>
#include <ui.h>
#include <arch.h>
#include <mm.h>
#include <debug.h>
#include <cache.h>
#define SECTORSIZE 2048
static ULONG IsoRootSector; // Starting sector of the root directory
static ULONG IsoRootLength; // Length of the root directory
ULONG IsoDriveNumber = 0;
BOOL IsoOpenVolume(ULONG DriveNumber)
{
PPVD Pvd;
DbgPrint((DPRINT_FILESYSTEM, "IsoOpenVolume() DriveNumber = 0x%x VolumeStartSector = 16\n", DriveNumber));
// Store the drive number
IsoDriveNumber = DriveNumber;
IsoRootSector = 0;
IsoRootLength = 0;
Pvd = AllocateMemory(SECTORSIZE);
if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Pvd))
{
FileSystemError("Failed to read the PVD.");
FreeMemory(Pvd);
return FALSE;
}
IsoRootSector = Pvd->RootDirRecord.ExtentLocationL;
IsoRootLength = Pvd->RootDirRecord.DataLengthL;
FreeMemory(Pvd);
DbgPrint((DPRINT_FILESYSTEM, "IsoRootSector = %u IsoRootLegth = %u\n", IsoRootSector, IsoRootLength));
return TRUE;
}
static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, UINT32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
{
PDIR_RECORD Record;
ULONG Offset;
ULONG i;
UCHAR Name[32];
DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
memset(Name, 0, 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;
memset(Name, 0, 32 * sizeof(UCHAR));
}
return FALSE;
}
static PVOID IsoBufferDirectory(UINT32 DirectoryStartSector, UINT32 DirectoryLength)
{
PVOID DirectoryBuffer;
UINT32 SectorCount;
DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength));
//
// Attempt to allocate memory for directory buffer
//
DbgPrint((DPRINT_FILESYSTEM, "Trying to allocate (DirectoryLength) %d bytes.\n", DirectoryLength));
DirectoryBuffer = AllocateMemory(DirectoryLength);
if (DirectoryBuffer == NULL)
{
return NULL;
}
SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
DbgPrint((DPRINT_FILESYSTEM, "Trying to read (DirectoryCount) %d sectors.\n", SectorCount));
//
// Now read directory contents into DirectoryBuffer
//
if (!DiskReadLogicalSectors(IsoDriveNumber, DirectoryStartSector, SectorCount, DirectoryBuffer))
{
FreeMemory(DirectoryBuffer);
return NULL;
}
return DirectoryBuffer;
}
/*
* IsoGetNumPathParts()
* 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)
*/
static ULONG IsoGetNumPathParts(PUCHAR Path)
{
ULONG i;
ULONG num;
for (i=0,num=0; i<(int)strlen(Path); i++)
{
if ((Path[i] == '\\') || (Path[i] == '/'))
{
num++;
}
}
num++;
DbgPrint((DPRINT_FILESYSTEM, "IsoGetNumPathParts() Path = %s NumPathParts = %d\n", Path, num));
return num;
}
/*
* IsoGetFirstNameFromPath()
* 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
*/
static VOID IsoGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path)
{
ULONG 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, "IsoGetFirstNameFromPath() Path = %s FirstName = %s\n", Path, Buffer));
}
/*
* 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;
ULONG NumberOfPathParts;
UCHAR PathPart[261];
PVOID DirectoryBuffer;
UINT32 DirectorySector;
UINT32 DirectoryLength;
ISO_FILE_INFO IsoFileInfo;
DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName));
memset(IsoFileInfoPointer, 0, sizeof(ISO_FILE_INFO));
//
// Check and see if the first character is '\' and remove it if so
//
while ((*FileName == '\\') || (*FileName == '/'))
{
FileName++;
}
//
// Figure out how many sub-directories we are nested in
//
NumberOfPathParts = IsoGetNumPathParts(FileName);
DirectorySector = IsoRootSector;
DirectoryLength = IsoRootLength;
//
// Loop once for each part
//
for (i=0; i<NumberOfPathParts; i++)
{
//
// Get first path part
//
IsoGetFirstNameFromPath(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))
{
FreeMemory(DirectoryBuffer);
return FALSE;
}
FreeMemory(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;
}
}
memcpy(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 = AllocateMemory(sizeof(ISO_FILE_INFO));
if (FileHandle == NULL)
{
return NULL;
}
memcpy(FileHandle, &TempFileInfo, sizeof(ISO_FILE_INFO));
return (FILE*)FileHandle;
}
/*
* IsoReadPartialSector()
* Reads part of a cluster into memory
*/
static BOOL IsoReadPartialSector(ULONG SectorNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer)
{
PUCHAR SectorBuffer;
DbgPrint((DPRINT_FILESYSTEM, "IsoReadPartialSector() SectorNumber = %d StartingOffset = %d Length = %d Buffer = 0x%x\n", SectorNumber, StartingOffset, Length, Buffer));
SectorBuffer = AllocateMemory(SECTORSIZE);
if (SectorBuffer == NULL)
{
return FALSE;
}
if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, SectorBuffer))
{
FreeMemory(SectorBuffer);
return FALSE;
}
memcpy(Buffer, ((PVOID)SectorBuffer + StartingOffset), Length);
FreeMemory(SectorBuffer);
return TRUE;
}
/*
* IsoReadFile()
* Reads BytesToRead from open file and
* returns the number of bytes read in BytesRead
*/
BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, PULONG BytesRead, PVOID Buffer)
{
PISO_FILE_INFO IsoFileInfo = (PISO_FILE_INFO)FileHandle;
UINT32 SectorNumber;
UINT32 OffsetInSector;
UINT32 LengthInSector;
UINT32 NumberOfSectors;
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 (!IsoReadPartialSector(SectorNumber, OffsetInSector, LengthInSector, Buffer))
{
return FALSE;
}
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);
if (NumberOfSectors > 0)
{
SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, NumberOfSectors, Buffer))
{
return FALSE;
}
if (BytesRead != NULL)
{
*BytesRead += (NumberOfSectors * SECTORSIZE);
}
BytesToRead -= (NumberOfSectors * SECTORSIZE);
IsoFileInfo->FilePointer += (NumberOfSectors * SECTORSIZE);
Buffer += (NumberOfSectors * 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 (!IsoReadPartialSector(SectorNumber, 0, BytesToRead, Buffer))
{
return FALSE;
}
if (BytesRead != NULL)
{
*BytesRead += BytesToRead;
}
IsoFileInfo->FilePointer += BytesToRead;
BytesToRead -= BytesToRead;
Buffer += BytesToRead;
}
printf("IsoReadFile() done\n");
return TRUE;
}
ULONG 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, ULONG NewFilePointer)
{
PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle;
DbgPrint((DPRINT_FILESYSTEM, "IsoSetFilePointer() NewFilePointer = %d\n", NewFilePointer));
IsoFileHandle->FilePointer = NewFilePointer;
}
ULONG 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-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.
*/
#ifndef __ISO_H
#define __ISO_H
struct _DIR_RECORD
{
UCHAR RecordLength; // 1
UCHAR ExtAttrRecordLength; // 2
ULONG ExtentLocationL; // 3-6
ULONG ExtentLocationM; // 7-10
ULONG DataLengthL; // 11-14
ULONG 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
ULONG 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
ULONG VolumeSpaceSizeL; // 81-84
ULONG VolumeSpaceSizeM; // 85-88
UCHAR unused2[32]; // 89-120
ULONG VolumeSetSize; // 121-124
ULONG VolumeSequenceNumber; // 125-128
ULONG LogicalBlockSize; // 129-132
ULONG PathTableSizeL; // 133-136
ULONG PathTableSizeM; // 137-140
ULONG LPathTablePos; // 141-144
ULONG LOptPathTablePos; // 145-148
ULONG MPathTablePos; // 149-152
ULONG 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
{
ULONG FileStart; // File start sector
ULONG FileSize; // File size
ULONG FilePointer; // File pointer
BOOL Directory;
ULONG DriveNumber;
} ISO_FILE_INFO, * PISO_FILE_INFO;
BOOL IsoOpenVolume(ULONG DriveNumber);
FILE* IsoOpenFile(PUCHAR FileName);
BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, PULONG BytesRead, PVOID Buffer);
ULONG IsoGetFileSize(FILE *FileHandle);
VOID IsoSetFilePointer(FILE *FileHandle, ULONG NewFilePointer);
ULONG IsoGetFilePointer(FILE *FileHandle);
#endif // #defined __FAT_H

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.
*/
/* 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 NR_TASKS 128 /* Space reserved in the GDT for TSS descriptors */
#define STACK16ADDR 0x7000 /* The 16-bit stack top will be at 0000:7000 */
#define STACK32ADDR 0x80000 /* The 32-bit stack top will be at 7000:FFFF, or 0x7FFFF */
#define MAXLOWMEMADDR 0x78000 /* The highest usuable low memory address for our memory allocator */
#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
void enable_a20(void);
void stop_floppy(void);
extern unsigned long FreeLoaderModuleEnd;
#endif /* ! ASM */

View File

@@ -1,29 +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.
*/
#ifndef __CACHE_H
#define __CACHE_H
BOOL CacheInitializeDrive(ULONG DriveNumber);
BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer);
BOOL CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount);
BOOL CacheReleaseMemory(ULONG MinimumAmountToRelease);
#endif // defined __CACHE_H

View File

@@ -1,85 +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(ULONG ComPort, ULONG BaudRate);
BOOL Rs232PortGetByte(PUCHAR ByteRecieved);
BOOL Rs232PortPollByte(PUCHAR ByteRecieved);
VOID Rs232PortPutByte(UCHAR ByteToSend);
/*
* Port I/O functions
*/
VOID
/*STDCALL*/
READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_ULONG (PULONG Port, PULONG Value, ULONG Count);
VOID
/*STDCALL*/
READ_PORT_BUFFER_USHORT (PUSHORT Port, PUSHORT Value, ULONG Count);
UCHAR
/*STDCALL*/
READ_PORT_UCHAR (PUCHAR Port);
ULONG
/*STDCALL*/
READ_PORT_ULONG (PULONG Port);
USHORT
/*STDCALL*/
READ_PORT_USHORT (PUSHORT Port);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_ULONG (PULONG Port, PULONG Value, ULONG Count);
VOID
/*STDCALL*/
WRITE_PORT_BUFFER_USHORT (PUSHORT Port, PUSHORT Value, ULONG Count);
VOID
/*STDCALL*/
WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value);
VOID
/*STDCALL*/
WRITE_PORT_ULONG (PULONG Port, ULONG Value);
VOID
/*STDCALL*/
WRITE_PORT_USHORT (PUSHORT Port, USHORT Value);
#endif // defined __RS232_H

View File

@@ -1,52 +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.
*/
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
#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_REACTOS 0x00000080 // OR this with DebugPrintMask to enable ReactOS messages
#define DPRINT_LINUX 0x00000100 // OR this with DebugPrintMask to enable Linux messages
VOID DebugInit(VOID);
VOID DebugPrint(ULONG Mask, char *format, ...);
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
#define DbgPrint(_x_) DebugPrint _x_
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d\n", __FILE__, __LINE__); DebugPrint _x_ ; for (;;); }
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
#else
#define DbgPrint(_x_)
#define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_)
#endif // defined DEBUG
#endif // defined __DEBUG_H

View File

@@ -1,122 +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.
*/
#ifndef __DISK_H
#define __DISK_H
typedef struct _GEOMETRY
{
ULONG Cylinders;
ULONG Heads;
ULONG Sectors;
ULONG BytesPerSector;
} GEOMETRY, *PGEOMETRY;
//
// Define the structure of a partition table entry
//
typedef struct _PARTITION_TABLE_ENTRY
{
BYTE BootIndicator; // 0x00 - non-bootable partition, 0x80 - bootable partition (one partition only)
BYTE StartHead; // Beginning head number
BYTE StartSector; // Beginning sector (2 high bits of cylinder #)
BYTE StartCylinder; // Beginning cylinder# (low order bits of cylinder #)
BYTE SystemIndicator; // System indicator
BYTE EndHead; // Ending head number
BYTE EndSector; // Ending sector (2 high bits of cylinder #)
BYTE EndCylinder; // Ending cylinder# (low order bits of cylinder #)
DWORD SectorCountBeforePartition; // Number of sectors preceding the partition
DWORD 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
{
BYTE MasterBootRecordCodeAndData[0x1be];
PARTITION_TABLE_ENTRY PartitionTable[4];
WORD MasterBootRecordMagic;
} 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
///////////////////////////////////////////////////////////////////////////////////////
//
// BIOS Disk Functions
//
///////////////////////////////////////////////////////////////////////////////////////
int biosdisk(int cmd, int drive, int head, int track, int sector, int nsects, void *buffer); // Implemented in asmcode.S
BOOL BiosInt13Read(ULONG Drive, ULONG Head, ULONG Track, ULONG Sector, ULONG SectorCount, PVOID Buffer); // Implemented in asmcode.S
BOOL BiosInt13ReadExtended(ULONG Drive, ULONG Sector, ULONG SectorCount, PVOID Buffer); // Implemented in asmcode.S
BOOL BiosInt13ExtensionsSupported(ULONG Drive);
ULONG BiosInt13GetLastErrorCode(VOID);
void stop_floppy(void); // Implemented in asmcode.S
int get_heads(int drive); // Implemented in asmcode.S
int get_cylinders(int drive); // Implemented in asmcode.S
int get_sectors(int drive); // Implemented in asmcode.S
BOOL BiosInt13GetDriveParameters(ULONG Drive, PGEOMETRY Geometry); // Implemented in disk.S
///////////////////////////////////////////////////////////////////////////////////////
//
// FreeLoader Disk Functions
//
///////////////////////////////////////////////////////////////////////////////////////
VOID DiskError(PUCHAR ErrorString);
BOOL DiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
BOOL DiskReadLogicalSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount, PVOID Buffer);
///////////////////////////////////////////////////////////////////////////////////////
//
// Fixed Disk Partition Management Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DiskIsDriveRemovable(ULONG DriveNumber);
BOOL DiskIsDriveCdRom(ULONG DriveNumber);
BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOL DiskGetPartitionEntry(ULONG DriveNumber, ULONG 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(ULONG DriveNumber, ULONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord);
#endif // defined __DISK_H

View File

@@ -1,69 +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.
*/
#ifndef __FREELDR_H
#define __FREELDR_H
#define size_t unsigned int
#define BOOL int
#define BOOLEAN int
#define NULL 0
#define TRUE 1
#define FALSE 0
#define BYTE unsigned char
#define WORD unsigned short
#define DWORD unsigned long
#define CHAR char
#define PCHAR char *
#define UCHAR unsigned char
#define PUCHAR unsigned char *
#define WCHAR unsigned short
#define PWCHAR unsigned short *
#define SHORT short
#define USHORT unsigned short
#define PUSHORT unsigned short *
#define LONG long
#define ULONG unsigned long
#define PULONG unsigned long *
#define PDWORD DWORD *
#define PWORD WORD *
#define VOID void
#define PVOID VOID*
#define INT8 char
#define UINT8 unsigned char
#define INT16 short
#define UINT16 unsigned short
#define INT32 long
#define UINT32 unsigned long
#define PUINT32 UINT32 *
#define INT64 long long
#define UINT64 unsigned long long
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
#define PACKED __attribute__((packed))
extern ULONG BootDrive; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
extern ULONG BootPartition; // Boot Partition, 1-4
extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed
void BootMain(void);
#endif // defined __FREELDR_H

View File

@@ -1,45 +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.
*/
#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 OpenDiskDrive(ULONG DriveNumber, ULONG PartitionNumber);
PFILE OpenFile(PUCHAR FileName);
VOID CloseFile(PFILE FileHandle);
BOOL ReadFile(PFILE FileHandle, ULONG BytesToRead, PULONG BytesRead, PVOID Buffer);
ULONG GetFileSize(PFILE FileHandle);
VOID SetFilePointer(PFILE FileHandle, ULONG NewFilePointer);
ULONG GetFilePointer(PFILE FileHandle);
BOOL IsEndOfFile(PFILE FileHandle);
#endif // #defined __FS_H

View File

@@ -1,31 +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.
*/
#ifndef __PARSEINI_H
#define __PARSEINI_H
BOOL IniFileInitialize(VOID);
BOOL IniOpenSection(PUCHAR SectionName, PULONG SectionId);
ULONG IniGetNumSectionItems(ULONG SectionId);
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize);
BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG BufferSize);
#endif // defined __PARSEINI_H

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.
*/
#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
typedef struct
{
BYTE BootCode1[0x20];
WORD CommandLineMagic;
WORD CommandLineOffset;
BYTE BootCode2[0x1CD];
BYTE SetupSectors;
WORD RootFlags;
WORD SystemSize;
WORD SwapDevice;
WORD RamSize;
WORD VideoMode;
WORD RootDevice;
WORD BootFlag; // 0xAA55
} PACKED LINUX_BOOTSECTOR, *PLINUX_BOOTSECTOR;
typedef struct
{
BYTE JumpInstruction[2];
DWORD SetupHeaderSignature; // Signature for SETUP-header
WORD Version; // Version number of header format
WORD RealModeSwitch; // Default switch
WORD SetupSeg; // SETUPSEG
WORD StartSystemSeg;
WORD KernelVersion; // Offset to kernel version string
BYTE 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
BYTE 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!
WORD 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.
DWORD Code32Start; // here loaders can put a different
// start address for 32-bit code.
//
// 0x1000 = default for zImage
//
// 0x100000 = default for big kernel
DWORD RamdiskAddress; // address of loaded ramdisk image
// Here the loader (or kernel generator) puts
// the 32-bit address were it loaded the image.
DWORD RamdiskSize; // its size in bytes
WORD BootSectKludgeOffset;
WORD BootSectKludgeSegment;
WORD HeapEnd; // space from here (exclusive) down to
// end of setup code can be used by setup
// for local heap purposes.
} PACKED LINUX_SETUPSECTOR, *PLINUX_SETUPSECTOR;
VOID BootNewLinuxKernel(VOID); // Implemented in linux.S
VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S
VOID LoadAndBootLinux(PUCHAR OperatingSystemName);
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName);
BOOL LinuxReadBootSector(PFILE LinuxKernelFile);
BOOL LinuxReadSetupSector(PFILE LinuxKernelFile);
BOOL LinuxReadKernel(PFILE LinuxKernelFile);
BOOL LinuxCheckKernelVersion(VOID);
BOOL LinuxReadInitrd(VOID);
#endif // defined __LINUX_H

View File

@@ -1,29 +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.
*/
#ifndef __BOOT_H
#define __BOOT_H
VOID ChainLoadBiosBootSectorCode(VOID); // Implemented in boot.S
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName);
VOID LoadAndBootPartition(PUCHAR OperatingSystemName);
VOID LoadAndBootDrive(PUCHAR OperatingSystemName);
#endif // defined __BOOT_H

View File

@@ -1,55 +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.
*/
#ifndef __MEMORY_H
#define __MEMORY_H
#include <multiboot.h>
VOID InitMemoryManager(VOID);
PVOID AllocateMemory(ULONG NumberOfBytes);
VOID FreeMemory(PVOID MemBlock);
ULONG GetSystemMemorySize(VOID); // Returns the amount of total usuable memory available to the memory manager
// These functions are implemented in mem.S
int GetExtendedMemorySize(void); // Returns extended memory size in KB
int GetConventionalMemorySize(void); // Returns conventional memory size in KB
int GetBiosMemoryMap(memory_map_t *mem_map); // Fills mem_map structure with BIOS memory map and returns length of memory map
//BOOL MmInitializeMemoryManager(ULONG LowMemoryStart, ULONG LowMemoryLength);
//PVOID MmAllocateMemory(ULONG MemorySize);
//VOID MmFreeMemory(PVOID MemoryPointer);
//PVOID MmAllocateLowMemory(ULONG MemorySize);
//VOID MmFreeLowMemory(PVOID MemoryPointer);
//PVOID MmAllocateMemoryFrom1Mb(ULONG MemorySize);
#endif // defined __MEMORY_H

View File

@@ -1,159 +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;
union
{
aout_symbol_table_t aout_sym;
elf_section_header_table_t elf_sec;
} u;
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; // 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, PULONG ModuleSize);
int GetBootPartition(char *OperatingSystemName);
PVOID MultiBootCreateModule(char *ModuleName);
BOOL MultiBootCloseModule(PVOID ModuleBase, DWORD dwModuleSize);
#endif /* ! ASM */
#endif // defined __MULTIBOOT_H

View File

@@ -1,31 +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.
*/
#ifndef __OPTIONS_H
#define __OPTIONS_H
void DoOptionsMenu(void);
void DoDiskOptionsMenu(void);
void DoBootOptionsMenu(int BootDriveNum, char *BootDriveText);
void DoBootPartitionOptionsMenu(int BootDriveNum);
int RunOptionsMenu(char OptionsMenuItems[][80], int OptionsMenuItemCount, int nOptionSelected, char *OptionsMenuTitle);
void InitOptionsMenu(int *nOptionsMenuBoxLeft, int *nOptionsMenuBoxTop, int *nOptionsMenuBoxRight, int *nOptionsMenuBoxBottom, int OptionsMenuItemCount);
void DrawOptionsMenu(char OptionsMenuItems[][80], int OptionsMenuItemCount, int nOptionSelected, char *OptionsMenuTitle, int nOptionsMenuBoxLeft, int nOptionsMenuBoxTop, int nOptionsMenuBoxRight, int nOptionsMenuBoxBottom);
#endif // #defined __OPTIONS_H

View File

@@ -1,28 +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.
*/
#ifndef __OSLIST_H
#define __OSLIST_H
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, PULONG OperatingSystemCountPointer);
ULONG CountOperatingSystems(ULONG SectionId);
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount);
BOOL RemoveQuotes(PUCHAR QuotedString);
#endif // #defined __OSLIST_H

View File

@@ -1,42 +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.
*/
#ifndef __REACTOS_H
#define __REACTOS_H
///////////////////////////////////////////////////////////////////////////////////////
//
// ReactOS Loading Functions
//
///////////////////////////////////////////////////////////////////////////////////////
void LoadAndBootReactOS(PUCHAR OperatingSystemName);
///////////////////////////////////////////////////////////////////////////////////////
//
// ARC Path Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DissectArcPath(char *ArcPath, char *BootPath, PULONG BootDrive, PULONG BootPartition);
//BOOL ConvertBiosDriveToArcName(PUCHAR ArcName, ULONG BiosDriveNumber);
//ULONG ConvertArcNameToBiosDrive(PUCHAR ArcName);
#endif // defined __REACTOS_H

View File

@@ -1,134 +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.
*/
#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 * 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 RtlCompareMemory(const PVOID Source1, const PVOID Source2, ULONG Length);
VOID RtlCopyMemory(PVOID Destination, const PVOID Source, ULONG Length);
VOID RtlFillMemory(PVOID Destination, ULONG Length, UCHAR Fill);
VOID RtlZeroMemory(PVOID Destination, ULONG Length);
#define memcmp(buf1, buf2, count) RtlCompareMemory(buf1, buf2, count)
#define memcpy(dest, src, count) RtlCopyMemory(dest, src,count)
#define memset(dest, c, count) RtlFillMemory(dest,count, c)
///////////////////////////////////////////////////////////////////////////////////////
//
// 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
void clrscr(void); // Implemented in asmcode.S
int kbhit(void); // Implemented in asmcode.S
int getch(void); // Implemented in asmcode.S
void gotoxy(int x, int y); // 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 hidecursor(void); // Implemented in asmcode.S
void showcursor(void); // Implemented in asmcode.S
int wherex(void); // Implemented in asmcode.S
int wherey(void); // Implemented in asmcode.S
#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
ULONG 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,157 +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.
*/
#ifndef __TUI_H
#define __TUI_H
#define SCREEN_MEM 0xB8000
#define TITLE_BOX_HEIGHT 5
// Initialize Textual-User-Interface
BOOL InitUserInterface(VOID);
// Fills the entire screen with a backdrop
void DrawBackdrop(void);
// Fills the area specified with cFillChar and cAttr
void FillArea(int nLeft, int nTop, int nRight, int nBottom, char cFillChar, char cAttr /* Color Attributes */);
// Draws a shadow on the bottom and right sides of the area specified
void DrawShadow(int nLeft, int nTop, int nRight, int nBottom);
// Draws a box around the area specified
void DrawBox(int nLeft, int nTop, int nRight, int nBottom, int nVertStyle, int nHorzStyle, int bFill, int bShadow, char cAttr);
// Draws text at coordinates specified
void DrawText(int nX, int nY, char *text, char cAttr);
// Draws text at the very bottom line on the screen
void DrawStatusText(char *text);
// Updates the date and time
void UpdateDateTime(void);
// Saves the screen so that it can be restored later
void SaveScreen(char *buffer);
// Restores the screen from a previous save
void RestoreScreen(char *buffer);
// Displays a message box on the screen with an ok button
void MessageBox(char *text);
// Adds a line of text to the message box buffer
void MessageLine(char *text);
// Returns true if color is valid
BOOL IsValidColor(char *color);
// Converts the text color into it's equivalent color value
char TextToColor(char *color);
// Returns true if fill is valid
BOOL IsValidFillStyle(char *fill);
// Converts the text fill into it's equivalent fill value
char TextToFillStyle(char *fill);
// Draws the progress bar showing nPos percent filled
void DrawProgressBar(int nPos);
// Displays all the message boxes in a given section
void ShowMessageBoxesInSection(PUCHAR SectionName);
/*
* Combines the foreground and background colors into a single attribute byte
*/
#define ATTR(cFore, cBack) ((cBack << 4)|cFore)
/*
* Fill styles for DrawBackdrop()
*/
#define LIGHT_FILL 0xB0
#define MEDIUM_FILL 0xB1
#define DARK_FILL 0xB2
/*
* Screen colors
*/
#define COLOR_BLACK 0
#define COLOR_BLUE 1
#define COLOR_GREEN 2
#define COLOR_CYAN 3
#define COLOR_RED 4
#define COLOR_MAGENTA 5
#define COLOR_BROWN 6
#define COLOR_GRAY 7
#define COLOR_DARKGRAY 8
#define COLOR_LIGHTBLUE 9
#define COLOR_LIGHTGREEN 10
#define COLOR_LIGHTCYAN 11
#define COLOR_LIGHTRED 12
#define COLOR_LIGHTMAGENTA 13
#define COLOR_YELLOW 14
#define COLOR_WHITE 15
/* Add COLOR_BLINK to a background to cause blinking */
#define COLOR_BLINK 8
/*
* Defines for IBM box drawing characters
*/
#define HORZ (0xc4) /* Single horizontal line */
#define D_HORZ (0xcd) /* Double horizontal line.*/
#define VERT (0xb3) /* Single vertical line */
#define D_VERT (0xba) /* Double vertical line. */
/* Definitions for corners, depending on HORIZ and VERT */
#define UL (0xda)
#define UR (0xbf) /* HORZ and VERT */
#define LL (0xc0)
#define LR (0xd9)
#define D_UL (0xc9)
#define D_UR (0xbb) /* D_HORZ and D_VERT */
#define D_LL (0xc8)
#define D_LR (0xbc)
#define HD_UL (0xd5)
#define HD_UR (0xb8) /* D_HORZ and VERT */
#define HD_LL (0xd4)
#define HD_LR (0xbe)
#define VD_UL (0xd6)
#define VD_UR (0xb7) /* HORZ and D_VERT */
#define VD_LL (0xd3)
#define VD_LR (0xbd)
// Key codes
#define KEY_EXTENDED 0x00
#define KEY_ENTER 0x0D
#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
///////////////////////////////////////////////////////////////////////////////////////
//
// Menu Functions
//
///////////////////////////////////////////////////////////////////////////////////////
BOOL DisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, PULONG SelectedMenuItem);
#endif // #defined __TUI_H

View File

@@ -1,43 +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.
*/
#ifndef __VERSION_H
#define __VERSION_H
/* just some stuff */
#define VERSION "FreeLoader v1.2.2"
#define COPYRIGHT "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
// FreeLoader version defines
//
// NOTE:
// If you fix bugs then you increment the patch version
// If you add features then you increment the minor version
// If you add major functionality then you increment the major version
//
#define FREELOADER_MAJOR_VERSION 1
#define FREELOADER_MINOR_VERSION 2
#define FREELOADER_PATCH_VERSION 2
PUCHAR GetFreeLoaderVersionString(VOID);
#endif // defined __VERSION_H

View File

@@ -1,72 +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.
*/
#ifndef __INI_H
#define __INI_H
#include <rtl.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;
ULONG SectionItemCount;
PINI_SECTION_ITEM SectionItemList;
} INI_SECTION, *PINI_SECTION;
extern PINI_SECTION IniFileSectionListHead;
extern ULONG IniFileSectionListCount;
BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize);
ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset);
BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength);
BOOL IniIsCommentLine(PUCHAR LineOfText, ULONG TextLength);
BOOL IniIsSectionName(PUCHAR LineOfText, ULONG TextLength);
ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength);
VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, ULONG LineLength);
BOOL IniIsSetting(PUCHAR LineOfText, ULONG TextLength);
ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength);
ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength);
VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, ULONG LineLength);
VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, ULONG LineLength);
#endif // defined __INI_H

View File

@@ -1,78 +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.
*/
#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;
ULONG FreeLoaderIniFileSize;
BOOL Success;
// Open the boot drive for file access
if (!OpenDiskDrive(BootDrive, 0))
{
printf("Error opening boot drive for file access.\n");
return FALSE;
}
// Try to open freeldr.ini or fail
Freeldr_Ini = OpenFile("freeldr.ini");
if (Freeldr_Ini == NULL)
{
printf("FREELDR.INI not found.\nYou need to re-install FreeLoader.\n");
return FALSE;
}
// Get the file size & allocate enough memory for it
FreeLoaderIniFileSize = GetFileSize(Freeldr_Ini);
FreeLoaderIniFileData = AllocateMemory(FreeLoaderIniFileSize);
// If we are out of memory then return FALSE
if (FreeLoaderIniFileData == NULL)
{
printf("Out of memory while loading FREELDR.INI.\n");
CloseFile(Freeldr_Ini);
return FALSE;
}
// Read freeldr.ini off the disk
if (!ReadFile(Freeldr_Ini, FreeLoaderIniFileSize, NULL, FreeLoaderIniFileData))
{
CloseFile(Freeldr_Ini);
FreeMemory(FreeLoaderIniFileData);
return FALSE;
}
CloseFile(Freeldr_Ini);
// Parse the .ini file data
Success = IniParseFile(FreeLoaderIniFileData, FreeLoaderIniFileSize);
FreeMemory(FreeLoaderIniFileData);
return Success;
}

View File

@@ -1,130 +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.
*/
#include <freeldr.h>
#include "ini.h"
#include <ui.h>
#include <rtl.h>
#include <debug.h>
BOOL IniOpenSection(PUCHAR SectionName, PULONG SectionId)
{
PINI_SECTION Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() SectionName = %s\n", SectionName));
// 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 = (ULONG)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;
}
ULONG IniGetNumSectionItems(ULONG 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;
}
BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
ULONG RealSettingNumber = SettingNumber;
DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() 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 (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));
strncpy(SettingName, SectionItem->ItemName, NameSize);
strncpy(SettingValue, SectionItem->ItemValue, 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(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG 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));
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;
}

View File

@@ -1,602 +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.
*/
#include <freeldr.h>
#include "ini.h"
#include <rtl.h>
#include <mm.h>
#include <debug.h>
PINI_SECTION IniFileSectionListHead = NULL;
ULONG IniFileSectionCount = 0;
ULONG IniFileSettingCount = 0;
BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize)
{
ULONG CurrentOffset;
ULONG CurrentLineNumber;
PUCHAR IniFileLine;
ULONG IniFileLineSize;
ULONG 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 = AllocateMemory(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);
FreeMemory(IniFileLine);
IniFileLine = AllocateMemory(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 = AllocateMemory(sizeof(INI_SECTION));
if (!CurrentSection)
{
FreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentSection, sizeof(INI_SECTION));
// Allocate the section name buffer
CurrentSection->SectionName = AllocateMemory(IniGetSectionNameSize(IniFileLine, LineLength));
if (!CurrentSection->SectionName)
{
FreeMemory(CurrentSection);
FreeMemory(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:%d: Setting \'%s\' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
CurrentLineNumber++;
continue;
}
// Allocate a new item structure
CurrentItem = AllocateMemory(sizeof(INI_SECTION_ITEM));
if (!CurrentItem)
{
FreeMemory(IniFileLine);
return FALSE;
}
RtlZeroMemory(CurrentItem, sizeof(INI_SECTION_ITEM));
// Allocate the setting name buffer
CurrentItem->ItemName = AllocateMemory(IniGetSettingNameSize(IniFileLine, LineLength));
if (!CurrentItem->ItemName)
{
FreeMemory(CurrentItem);
FreeMemory(IniFileLine);
return FALSE;
}
// Allocate the setting value buffer
CurrentItem->ItemValue = AllocateMemory(IniGetSettingValueSize(IniFileLine, LineLength));
if (!CurrentItem->ItemValue)
{
FreeMemory(CurrentItem);
FreeMemory(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;
}
ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset)
{
ULONG Idx;
ULONG 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;
}
ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset)
{
ULONG 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, ULONG TextLength)
{
ULONG 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, ULONG TextLength)
{
ULONG 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, ULONG TextLength)
{
ULONG 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;
}
ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG 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, ULONG LineLength)
{
ULONG Idx;
ULONG 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, ULONG TextLength)
{
ULONG Idx;
// Basically just check for an '=' equals sign
for (Idx=0; Idx<TextLength; Idx++)
{
if (LineOfText[Idx] == '=')
{
return TRUE;
}
}
return FALSE;
}
ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength)
{
ULONG Idx;
ULONG 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;
}
ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength)
{
ULONG Idx;
ULONG 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, ULONG LineLength)
{
ULONG Idx;
ULONG 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, ULONG LineLength)
{
ULONG Idx;
ULONG 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,443 +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.
*/
#include "freeldr.h"
#include "arch.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()
PLINUX_BOOTSECTOR LinuxBootSector = NULL;
PLINUX_SETUPSECTOR LinuxSetupSector = NULL;
ULONG SetupSectorSize = 0;
BOOL NewStyleLinuxKernel = FALSE;
ULONG LinuxKernelSize = 0;
UCHAR LinuxKernelName[260];
UCHAR LinuxInitrdName[260];
BOOL LinuxHasInitrd = FALSE;
UCHAR LinuxCommandLine[260] = "";
ULONG LinuxCommandLineSize = 0;
VOID LoadAndBootLinux(PUCHAR OperatingSystemName)
{
PFILE LinuxKernel = NULL;
UCHAR TempString[260];
DrawBackdrop();
// Parse the .ini file section
if (!LinuxParseIniSection(OperatingSystemName))
{
goto LinuxBootFailed;
}
// Open the boot volume
if (!OpenDiskDrive(BootDrive, BootPartition))
{
MessageBox("Failed to open boot drive.");
goto LinuxBootFailed;
}
// Open the kernel
LinuxKernel = OpenFile(LinuxKernelName);
if (LinuxKernel == NULL)
{
sprintf(TempString, "Linux kernel \'%s\' not found.", LinuxKernelName);
MessageBox(TempString);
goto LinuxBootFailed;
}
// Read the boot sector
if (!LinuxReadBootSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the setup sector
if (!LinuxReadSetupSector(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the kernel
if (!LinuxReadKernel(LinuxKernel))
{
goto LinuxBootFailed;
}
// Read the initrd (if necessary)
if (LinuxHasInitrd)
{
if (!LinuxReadInitrd())
{
goto LinuxBootFailed;
}
}
// If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h)
if (LinuxBootSector->RootDevice == 0x0000)
{
LinuxBootSector->RootDevice = 0x0200;
}
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);
showcursor();
clrscr();
stop_floppy();
if (LinuxSetupSector->LoadFlags & LINUX_FLAG_LOAD_HIGH)
{
BootNewLinuxKernel();
}
else
{
BootOldLinuxKernel(LinuxKernelSize);
}
LinuxBootFailed:
if (LinuxKernel != NULL)
{
CloseFile(LinuxKernel);
}
if (LinuxBootSector != NULL)
{
FreeMemory(LinuxBootSector);
}
if (LinuxSetupSector != NULL)
{
FreeMemory(LinuxSetupSector);
}
LinuxBootSector = NULL;
LinuxSetupSector = NULL;
SetupSectorSize = 0;
NewStyleLinuxKernel = FALSE;
LinuxKernelSize = 0;
LinuxHasInitrd = FALSE;
strcpy(LinuxCommandLine, "");
LinuxCommandLineSize = 0;
}
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
{
UCHAR SettingName[260];
UCHAR SettingValue[260];
ULONG SectionId;
// Find all the message box settings and run them
ShowMessageBoxesInSection(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);
MessageBox(SettingName);
return FALSE;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 260))
{
MessageBox("Boot drive not specified for selected OS!");
return FALSE;
}
BootDrive = atoi(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 260))
{
BootPartition = atoi(SettingValue);
}
// Get the kernel name
if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, 260))
{
MessageBox("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)AllocateMemory(512);
if (LinuxBootSector == NULL)
{
return FALSE;
}
// Read linux boot sector
SetFilePointer(LinuxKernelFile, 0);
if (!ReadFile(LinuxKernelFile, 512, NULL, LinuxBootSector))
{
return FALSE;
}
// Check for validity
if (LinuxBootSector->BootFlag != LINUX_BOOT_SECTOR_MAGIC)
{
MessageBox("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)
{
BYTE TempLinuxSetupSector[512];
LinuxSetupSector = (PLINUX_SETUPSECTOR)TempLinuxSetupSector;
// Read first linux setup sector
SetFilePointer(LinuxKernelFile, 512);
if (!ReadFile(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)AllocateMemory(SetupSectorSize);
if (LinuxSetupSector == NULL)
{
return FALSE;
}
// Copy over first setup sector
RtlCopyMemory(LinuxSetupSector, TempLinuxSetupSector, 512);
// Read in the rest of the linux setup sectors
SetFilePointer(LinuxKernelFile, 1024);
if (!ReadFile(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)
{
PVOID LoadAddress = (PVOID)LINUX_KERNEL_LOAD_ADDRESS;
ULONG BytesLoaded;
UCHAR StatusText[260];
sprintf(StatusText, " Loading %s", LinuxKernelName);
DrawStatusText(StatusText);
DrawProgressBar(0);
// Calc kernel size
LinuxKernelSize = GetFileSize(LinuxKernelFile) - (512 + SetupSectorSize);
// Read linux kernel to 0x100000 (1mb)
SetFilePointer(LinuxKernelFile, 512 + SetupSectorSize);
for (BytesLoaded=0; BytesLoaded<LinuxKernelSize; )
{
if (!ReadFile(LinuxKernelFile, 0x4000, NULL, LoadAddress))
{
return FALSE;
}
BytesLoaded += 0x4000;
LoadAddress += 0x4000;
DrawProgressBar( (BytesLoaded * 100) / LinuxKernelSize );
}
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))
{
MessageBox("Error: Cannot load a ramdisk (initrd) with an old kernel image.");
return FALSE;
}
return TRUE;
}
BOOL LinuxReadInitrd(VOID)
{
PFILE LinuxInitrdFile;
UCHAR TempString[260];
ULONG LinuxInitrdSize;
ULONG LinuxInitrdLoadAddress;
ULONG BytesLoaded;
UCHAR StatusText[260];
sprintf(StatusText, " Loading %s", LinuxInitrdName);
DrawStatusText(StatusText);
DrawProgressBar(0);
// Open the initrd file image
LinuxInitrdFile = OpenFile(LinuxInitrdName);
if (LinuxInitrdFile == NULL)
{
sprintf(TempString, "Linux initrd image \'%s\' not found.", LinuxInitrdName);
MessageBox(TempString);
return FALSE;
}
// Get the file size
LinuxInitrdSize = GetFileSize(LinuxInitrdFile);
// Calculate the load address
if (GetExtendedMemorySize() < 0x4000)
{
LinuxInitrdLoadAddress = GetExtendedMemorySize() * 1024; // Load at end of memory
}
else
{
LinuxInitrdLoadAddress = 0x4000 * 1024; // Load at end of 16mb
}
LinuxInitrdLoadAddress -= ROUND_UP(LinuxInitrdSize, 4096);
// Set the information in the setup struct
LinuxSetupSector->RamdiskAddress = LinuxInitrdLoadAddress;
LinuxSetupSector->RamdiskSize = LinuxInitrdSize;
// Read in the ramdisk
for (BytesLoaded=0; BytesLoaded<LinuxInitrdSize; )
{
if (!ReadFile(LinuxInitrdFile, 0x4000, NULL, (PVOID)LinuxInitrdLoadAddress))
{
return FALSE;
}
BytesLoaded += 0x4000;
LinuxInitrdLoadAddress += 0x4000;
DrawProgressBar( (BytesLoaded * 100) / LinuxInitrdSize );
}
return TRUE;
}

View File

@@ -1,208 +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.
*/
#include "freeldr.h"
#include "arch.h"
#include "miscboot.h"
#include "rtl.h"
#include "fs.h"
#include "ui.h"
#include "inifile.h"
#include "disk.h"
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
{
PFILE FilePointer;
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG SectionId;
UCHAR FileName[260];
ULONG BytesRead;
// Find all the message box settings and run them
ShowMessageBoxesInSection(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);
MessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
MessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = atoi(SettingValue);
BootPartition = 0;
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
BootPartition = atoi(SettingValue);
}
if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, 260))
{
MessageBox("Boot sector file not specified for selected OS!");
return;
}
if (!OpenDiskDrive(BootDrive, BootPartition))
{
MessageBox("Failed to open boot drive.");
return;
}
FilePointer = OpenFile(FileName);
if (FilePointer == NULL)
{
strcat(FileName, " not found.");
MessageBox(FileName);
return;
}
// Read boot sector
if (!ReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
{
return;
}
// Check for validity
if (*((PWORD)(0x7c00 + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid boot sector magic (0xaa55)");
return;
}
clrscr();
showcursor();
stop_floppy();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG SectionId;
PARTITION_TABLE_ENTRY PartitionTableEntry;
// Find all the message box settings and run them
ShowMessageBoxesInSection(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);
MessageBox(SettingName);
return;
}
// Read the boot drive
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
MessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = atoi(SettingValue);
// Read the boot partition
if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
{
MessageBox("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 (*((PWORD)(0x7c00 + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid boot sector magic (0xaa55)");
return;
}
clrscr();
showcursor();
stop_floppy();
ChainLoadBiosBootSectorCode();
}
VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
{
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG SectionId;
// Find all the message box settings and run them
ShowMessageBoxesInSection(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);
MessageBox(SettingName);
return;
}
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
{
MessageBox("Boot drive not specified for selected OS!");
return;
}
BootDrive = atoi(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 (*((PWORD)(0x7c00 + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid boot sector magic (0xaa55)");
return;
}
clrscr();
showcursor();
stop_floppy();
ChainLoadBiosBootSectorCode();
}

View File

@@ -1,48 +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.
*/
#ifndef __MEM_H
#define __MEM_H
//
// 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
#define MEM_BLOCK_SIZE 256
typedef struct
{
BOOL MemBlockAllocated; // Is this block allocated or free
ULONG BlocksAllocated; // Block length, in multiples of MEM_BLOCK_SIZE
} MEMBLOCK, *PMEMBLOCK;
extern ULONG RealFreeLoaderModuleEnd;
extern PVOID HeapBaseAddress;
extern ULONG HeapLengthInBytes;
extern ULONG HeapMemBlockCount;
extern PMEMBLOCK HeapMemBlockArray;
#endif // defined __MEM_H

View File

@@ -1,296 +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.
*/
#include <freeldr.h>
#include <mm.h>
#include "mem.h"
#include <rtl.h>
#include <debug.h>
#include <ui.h>
#ifdef DEBUG
ULONG AllocationCount = 0;
VOID VerifyHeap(VOID);
VOID DumpMemoryAllocMap(VOID);
VOID IncrementAllocationCount(VOID);
VOID DecrementAllocationCount(VOID);
VOID MemAllocTest(VOID);
#endif // DEBUG
PVOID AllocateMemory(ULONG NumberOfBytes)
{
ULONG BlocksNeeded;
ULONG Idx;
ULONG NumFree;
PVOID MemPointer;
if (NumberOfBytes == 0)
{
DbgPrint((DPRINT_MEMORY, "AllocateMemory() called for 0 bytes. Returning NULL.\n"));
MessageBox("Memory allocation failed: AllocateMemory() called for 0 bytes.");
return NULL;
}
// Find out how many blocks it will take to
// satisfy this allocation
BlocksNeeded = ROUND_UP(NumberOfBytes, MEM_BLOCK_SIZE) / MEM_BLOCK_SIZE;
// Now loop through our array of blocks and
// see if we have enough space
for (Idx=0,NumFree=0; Idx<HeapMemBlockCount; Idx++)
{
// Check this block and see if it is already allocated
// If so reset our counter and continue the loop
if (HeapMemBlockArray[Idx].MemBlockAllocated)
{
NumFree = 0;
continue;
}
else
{
// It is free memory so lets increment our count
NumFree++;
}
// If we have found enough blocks to satisfy the request
// then we're done searching
if (NumFree >= BlocksNeeded)
{
break;
}
}
Idx++;
// If we don't have enough available mem
// then return NULL
if (NumFree < BlocksNeeded)
{
DbgPrint((DPRINT_MEMORY, "Memory allocation failed. Not enough free memory to allocate %d bytes. AllocationCount: %d\n", NumberOfBytes, AllocationCount));
MessageBox("Memory allocation failed: out of memory.");
return NULL;
}
// Subtract the block count from Idx and we have
// the start block of the memory
Idx -= NumFree;
// Now we know which block to give them
MemPointer = HeapBaseAddress + (Idx * MEM_BLOCK_SIZE);
// Now loop through and mark all the blocks as allocated
for (NumFree=0; NumFree<BlocksNeeded; NumFree++)
{
HeapMemBlockArray[Idx + NumFree].MemBlockAllocated = TRUE;
HeapMemBlockArray[Idx + NumFree].BlocksAllocated = NumFree ? 0 : BlocksNeeded; // Mark only the first block with the count
}
#ifdef DEBUG
IncrementAllocationCount();
DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d blocks) of memory starting at block %d. AllocCount: %d\n", NumberOfBytes, BlocksNeeded, Idx, AllocationCount));
DbgPrint((DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer));
VerifyHeap();
#endif // DEBUG
// Now return the pointer
return MemPointer;
}
VOID FreeMemory(PVOID MemBlock)
{
ULONG BlockNumber;
ULONG BlockCount;
ULONG Idx;
#ifdef DEBUG
// Make sure we didn't get a bogus pointer
if ((MemBlock < HeapBaseAddress) || (MemBlock > (HeapBaseAddress + HeapLengthInBytes)))
{
BugCheck((DPRINT_MEMORY, "Bogus memory pointer (0x%x) passed to FreeMemory()\n", MemBlock));
}
#endif // DEBUG
// Find out the block number if the first
// block of memory they allocated
BlockNumber = (MemBlock - HeapBaseAddress) / MEM_BLOCK_SIZE;
BlockCount = HeapMemBlockArray[BlockNumber].BlocksAllocated;
#ifdef DEBUG
// Make sure we didn't get a bogus pointer
if ((BlockCount < 1) || (BlockCount > HeapMemBlockCount))
{
BugCheck((DPRINT_MEMORY, "Invalid block count in heap page header. HeapMemBlockArray[BlockNumber].BlocksAllocated = %d\n", HeapMemBlockArray[BlockNumber].BlocksAllocated));
}
#endif
// Loop through our array and mark all the
// blocks as free
for (Idx=BlockNumber; Idx<(BlockNumber + BlockCount); Idx++)
{
HeapMemBlockArray[Idx].MemBlockAllocated = FALSE;
HeapMemBlockArray[Idx].BlocksAllocated = 0;
}
#ifdef DEBUG
DecrementAllocationCount();
DbgPrint((DPRINT_MEMORY, "Freed %d blocks of memory starting at block %d. AllocationCount: %d\n", BlockCount, BlockNumber, AllocationCount));
VerifyHeap();
#endif // DEBUG
}
#ifdef DEBUG
VOID VerifyHeap(VOID)
{
ULONG Idx;
ULONG Idx2;
ULONG Count;
if (DUMP_MEM_MAP_ON_VERIFY)
{
DumpMemoryAllocMap();
}
// Loop through the array and verify that
// everything is kosher
for (Idx=0; Idx<HeapMemBlockCount; Idx++)
{
// Check if this block is allocation
if (HeapMemBlockArray[Idx].MemBlockAllocated)
{
// This is the first block in the run so it
// had better have a length that is within range
if ((HeapMemBlockArray[Idx].BlocksAllocated < 1) || (HeapMemBlockArray[Idx].BlocksAllocated > (HeapMemBlockCount - Idx)))
{
BugCheck((DPRINT_MEMORY, "Allocation length out of range in heap table. HeapMemBlockArray[Idx].BlocksAllocated = %d\n", HeapMemBlockArray[Idx].BlocksAllocated));
}
// Now go through and verify that the rest of
// this run has the blocks marked allocated
// with a length of zero but don't check the
// first one because we already did
Count = HeapMemBlockArray[Idx].BlocksAllocated;
for (Idx2=1; Idx2<Count; Idx2++)
{
// Make sure it's allocated
if (HeapMemBlockArray[Idx + Idx2].MemBlockAllocated != TRUE)
{
BugCheck((DPRINT_MEMORY, "Heap table indicates hole in memory allocation. HeapMemBlockArray[Idx + Idx2].MemBlockAllocated != TRUE\n"));
}
// Make sure the length is zero
if (HeapMemBlockArray[Idx + Idx2].BlocksAllocated != 0)
{
BugCheck((DPRINT_MEMORY, "Allocation chain has non-zero value in non-first block in heap table. HeapMemBlockArray[Idx + Idx2].BlocksAllocated != 0\n"));
}
}
// Move on to the next run
Idx += (Count - 1);
}
else
{
// Nope, not allocated so make sure the length is zero
if (HeapMemBlockArray[Idx].BlocksAllocated != 0)
{
BugCheck((DPRINT_MEMORY, "Free block is start of memory allocation. HeapMemBlockArray[Idx].BlocksAllocated != 0\n"));
}
}
}
}
VOID DumpMemoryAllocMap(VOID)
{
ULONG Idx;
DbgPrint((DPRINT_MEMORY, "----------- Memory Allocation Bitmap -----------\n"));
for (Idx=0; Idx<HeapMemBlockCount; Idx++)
{
if ((Idx % 32) == 0)
{
DbgPrint((DPRINT_MEMORY, "\n"));
DbgPrint((DPRINT_MEMORY, "%x:\t", HeapBaseAddress + (Idx * 256)));
}
else if ((Idx % 4) == 0)
{
DbgPrint((DPRINT_MEMORY, " "));
}
if (HeapMemBlockArray[Idx].MemBlockAllocated)
{
DbgPrint((DPRINT_MEMORY, "X"));
}
else
{
DbgPrint((DPRINT_MEMORY, "*"));
}
}
DbgPrint((DPRINT_MEMORY, "\n"));
}
VOID IncrementAllocationCount(VOID)
{
AllocationCount++;
}
VOID DecrementAllocationCount(VOID)
{
AllocationCount--;
}
VOID MemAllocTest(VOID)
{
PVOID MemPtr1;
PVOID MemPtr2;
PVOID MemPtr3;
PVOID MemPtr4;
PVOID MemPtr5;
MemPtr1 = AllocateMemory(4096);
printf("MemPtr1: 0x%x\n", (int)MemPtr1);
getch();
MemPtr2 = AllocateMemory(4096);
printf("MemPtr2: 0x%x\n", (int)MemPtr2);
getch();
MemPtr3 = AllocateMemory(4096);
printf("MemPtr3: 0x%x\n", (int)MemPtr3);
DumpMemoryAllocMap();
VerifyHeap();
getch();
FreeMemory(MemPtr2);
getch();
MemPtr4 = AllocateMemory(2048);
printf("MemPtr4: 0x%x\n", (int)MemPtr4);
getch();
MemPtr5 = AllocateMemory(4096);
printf("MemPtr5: 0x%x\n", (int)MemPtr5);
getch();
}
#endif // DEBUG
// Returns the amount of total usuable memory available to the memory manager
ULONG GetSystemMemorySize(VOID)
{
return HeapLengthInBytes;
}

View File

@@ -1,88 +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.
*/
#include <freeldr.h>
#include <arch.h>
#include <mm.h>
#include "mem.h"
#include <rtl.h>
#include <debug.h>
#include <ui.h>
ULONG RealFreeLoaderModuleEnd = 0;
PVOID HeapBaseAddress = NULL;
ULONG HeapLengthInBytes = 0;
ULONG HeapMemBlockCount = 0;
PMEMBLOCK HeapMemBlockArray = NULL;
VOID InitMemoryManager(VOID)
{
ULONG MemBlocks;
ULONG BaseAddress;
ULONG Length;
// Round up to the next page of memory
RealFreeLoaderModuleEnd = ROUND_UP(FreeLoaderModuleEnd, 4096);
// FIXME:
// Add extra space for .data & .bss sections
// which are listed after FreeLoaderModuleEnd
// because it is in the .text section.
// I need to have everything in one section...
RealFreeLoaderModuleEnd += 0x2000;
BaseAddress = RealFreeLoaderModuleEnd;
Length = (MAXLOWMEMADDR - RealFreeLoaderModuleEnd);
DbgPrint((DPRINT_MEMORY, "Initializing Memory Manager.\n"));
DbgPrint((DPRINT_MEMORY, "Conventional memory size: %d KB\n", GetConventionalMemorySize()));
DbgPrint((DPRINT_MEMORY, "Low memory map:\n"));
DbgPrint((DPRINT_MEMORY, "00000\t1000\tReserved\n"));
DbgPrint((DPRINT_MEMORY, "01000\t6000\t16-bit stack\n"));
DbgPrint((DPRINT_MEMORY, "07000\t1000\tUnused\n"));
DbgPrint((DPRINT_MEMORY, "08000\t%x\tFreeLoader program code\n", (RealFreeLoaderModuleEnd - 0x8000)));
DbgPrint((DPRINT_MEMORY, "%x\t%x\tLow memory heap\n", BaseAddress, Length));
DbgPrint((DPRINT_MEMORY, "78000\t8000\t32-bit stack\n"));
DbgPrint((DPRINT_MEMORY, "80000\t10000\tFile system read buffer\n"));
DbgPrint((DPRINT_MEMORY, "90000\t10000\tDisk read buffer\n"));
DbgPrint((DPRINT_MEMORY, "A0000\t60000\tReserved\n"));
// Calculate how many memory blocks we have
MemBlocks = (Length / MEM_BLOCK_SIZE);
// Adjust the heap length so we can reserve
// enough storage space for the MEMBLOCK array
Length -= (MemBlocks * sizeof(MEMBLOCK));
// Initialize our tracking variables
HeapBaseAddress = (PVOID)BaseAddress;
HeapLengthInBytes = Length;
HeapMemBlockCount = (HeapLengthInBytes / MEM_BLOCK_SIZE);
HeapMemBlockArray = (PMEMBLOCK)(HeapBaseAddress + HeapLengthInBytes);
// Clear the memory
DbgPrint((DPRINT_MEMORY, "HeapBaseAddress: 0x%x HeapLengthInBytes: %d\n", HeapBaseAddress, HeapLengthInBytes));
RtlZeroMemory(HeapBaseAddress, HeapLengthInBytes);
RtlZeroMemory(HeapMemBlockArray, (HeapMemBlockCount * sizeof(MEMBLOCK)));
#ifdef DEBUG
DbgPrint((DPRINT_MEMORY, "Memory Manager initialized. BaseAddress = 0x%x Length = 0x%x. %d blocks in heap.\n", BaseAddress, Length, HeapMemBlockCount));
//MemAllocTest();
#endif
}

View File

@@ -1,271 +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.
*/
#include "freeldr.h"
#include "arch.h"
#include "rtl.h"
#include "fs.h"
#include "multiboot.h"
#include "ui.h"
#include "inifile.h"
#include "mm.h"
unsigned long next_module_load_base = 0;
module_t* pOpenModule = NULL;
BOOL MultiBootLoadKernel(FILE *KernelImage)
{
PDWORD ImageHeaders;
int Idx;
DWORD dwHeaderChecksum;
DWORD dwFileLoadOffset;
DWORD dwDataSize;
DWORD dwBssSize;
ULONG BytesRead;
// Allocate 8192 bytes for multiboot header
ImageHeaders = (PDWORD)AllocateMemory(8192);
if (ImageHeaders == NULL)
{
return FALSE;
}
/*
* Load the first 8192 bytes of the kernel image
* so we can search for the multiboot header
*/
if (!ReadFile(KernelImage, 8192, NULL, ImageHeaders))
{
FreeMemory(ImageHeaders);
return FALSE;
}
/*
* Now find the multiboot header and copy it
*/
for (Idx=0; Idx<2048; Idx++)
{
// Did we find it?
if (ImageHeaders[Idx] == MULTIBOOT_HEADER_MAGIC)
{
// Yes, copy it and break out of this loop
memcpy(&mb_header, &ImageHeaders[Idx], sizeof(multiboot_header_t));
break;
}
}
FreeMemory(ImageHeaders);
/*
* If we reached the end of the 8192 bytes without
* finding the multiboot header then return error
*/
if (Idx == 2048)
{
MessageBox("No multiboot header found!");
return FALSE;
}
/*printf("multiboot header:\n");
printf("0x%x\n", mb_header.magic);
printf("0x%x\n", mb_header.flags);
printf("0x%x\n", mb_header.checksum);
printf("0x%x\n", mb_header.header_addr);
printf("0x%x\n", mb_header.load_addr);
printf("0x%x\n", mb_header.load_end_addr);
printf("0x%x\n", mb_header.bss_end_addr);
printf("0x%x\n", mb_header.entry_addr);
getch();*/
/*
* Calculate the checksum and make sure it matches
*/
dwHeaderChecksum = mb_header.magic;
dwHeaderChecksum += mb_header.flags;
dwHeaderChecksum += mb_header.checksum;
if (dwHeaderChecksum != 0)
{
MessageBox("Multiboot header checksum invalid!");
return FALSE;
}
/*
* Get the file offset, this should be 0, and move the file pointer
*/
dwFileLoadOffset = (Idx * sizeof(DWORD)) - (mb_header.header_addr - mb_header.load_addr);
SetFilePointer(KernelImage, dwFileLoadOffset);
/*
* Load the file image
*/
dwDataSize = (mb_header.load_end_addr - mb_header.load_addr);
ReadFile(KernelImage, dwDataSize, NULL, (void*)mb_header.load_addr);
/*
* Initialize bss area
*/
dwBssSize = (mb_header.bss_end_addr - mb_header.load_end_addr);
memset((void*)mb_header.load_end_addr, 0, dwBssSize);
next_module_load_base = ROUND_UP(mb_header.bss_end_addr, /*PAGE_SIZE*/4096);
return TRUE;
}
#if 0
BOOL MultiBootLoadModule(FILE *ModuleImage, char *ModuleName)
{
DWORD dwModuleSize;
module_t* pModule;
char* ModuleNameString;
char * TempName;
/*
* Get current module data structure and module name string array
*/
pModule = &multiboot_modules[mb_info.mods_count];
do {
TempName = strchr( ModuleName, '\\' );
if( TempName )
ModuleName = TempName + 1;
} while( TempName );
ModuleNameString = multiboot_module_strings[mb_info.mods_count];
dwModuleSize = GetFileSize(ModuleImage);
pModule->mod_start = next_module_load_base;
pModule->mod_end = next_module_load_base + dwModuleSize;
strcpy(ModuleNameString, ModuleName);
pModule->string = (unsigned long)ModuleNameString;
/*
* Load the file image
*/
ReadFile(ModuleImage, dwModuleSize, NULL, (void*)next_module_load_base);
next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096);
mb_info.mods_count++;
return TRUE;
}
#endif
PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, PULONG ModuleSize)
{
DWORD dwModuleSize;
module_t* pModule;
char* ModuleNameString;
char * TempName;
/*
* Get current module data structure and module name string array
*/
pModule = &multiboot_modules[mb_info.mods_count];
do {
TempName = strchr( ModuleName, '\\' );
if( TempName )
ModuleName = TempName + 1;
} while( TempName );
ModuleNameString = multiboot_module_strings[mb_info.mods_count];
dwModuleSize = GetFileSize(ModuleImage);
pModule->mod_start = next_module_load_base;
pModule->mod_end = next_module_load_base + dwModuleSize;
strcpy(ModuleNameString, ModuleName);
pModule->string = (unsigned long)ModuleNameString;
/*
* Load the file image
*/
ReadFile(ModuleImage, dwModuleSize, NULL, (void*)next_module_load_base);
next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096);
mb_info.mods_count++;
if (ModuleSize != NULL)
*ModuleSize = dwModuleSize;
return((PVOID)pModule->mod_start);
}
int GetBootPartition(char *OperatingSystemName)
{
int BootPartitionNumber = -1;
char value[1024];
ULONG SectionId;
if (IniOpenSection(OperatingSystemName, &SectionId))
{
if (IniReadSettingByName(SectionId, "BootPartition", value, 1024))
{
BootPartitionNumber = atoi(value);
}
}
return BootPartitionNumber;
}
PVOID MultiBootCreateModule(char *ModuleName)
{
module_t* pModule;
char* ModuleNameString;
/*
* Get current module data structure and module name string array
*/
pModule = &multiboot_modules[mb_info.mods_count];
ModuleNameString = multiboot_module_strings[mb_info.mods_count];
pModule->mod_start = next_module_load_base;
pModule->mod_end = -1;
strcpy(ModuleNameString, ModuleName);
pModule->string = (unsigned long)ModuleNameString;
pOpenModule = pModule;
return((PVOID)pModule->mod_start);
}
BOOL MultiBootCloseModule(PVOID ModuleBase, DWORD dwModuleSize)
{
module_t* pModule;
if ((pOpenModule != NULL) &&
((module_t*)ModuleBase == pOpenModule->mod_start) &&
(pOpenModule->mod_end == -1))
{
pModule = pOpenModule;
pModule->mod_end = pModule->mod_start + dwModuleSize;
next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096);
mb_info.mods_count++;
pOpenModule = NULL;
return(TRUE);
}
return(FALSE);
}

View File

@@ -1,396 +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.
*/
#include "freeldr.h"
#include "rtl.h"
#include "ui.h"
#include "options.h"
#include "miscboot.h"
#if 0
void DoOptionsMenu(void)
{
int OptionsMenuItemCount = 1; // Count is 1 because we don't show the "Set ReactOS Boot Flags" menu item yet
char OptionsMenuItems[2][80] = { "Boot Wizard", "Set ReactOS Boot Flags" /* i.e. Safe Mode, Last Known Good Configuration */ };
int OptionsMenuItemSelected = 0;
while (OptionsMenuItemSelected != -1)
{
OptionsMenuItemSelected = RunOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, OptionsMenuItemSelected, "[Advanced Options]");
switch (OptionsMenuItemSelected)
{
case 0:
DoDiskOptionsMenu();
break;
}
}
}
void DoDiskOptionsMenu(void)
{
char DiskMenuItems[25][80];
int DiskMenuItemCount = 0;
int FloppyDiskMenuItemCount = 0;
int HardDiskMenuItemCount = 0;
int DiskMenuItemSelected = 0;
char temp[255];
int i;
FloppyDiskMenuItemCount = (int)*((char *)((0x40 * 16) + 0x10)); // Get number of floppy disks from bios data area 40:10
if (FloppyDiskMenuItemCount & 1)
FloppyDiskMenuItemCount = (FloppyDiskMenuItemCount >> 6) + 1;
else
FloppyDiskMenuItemCount = 0;
HardDiskMenuItemCount = (int)*((char *)((0x40 * 16) + 0x75)); // Get number of hard disks from bios data area 40:75
DiskMenuItemCount = FloppyDiskMenuItemCount + HardDiskMenuItemCount;
for (i=0; i<FloppyDiskMenuItemCount; i++)
{
strcpy(DiskMenuItems[i], "Floppy Disk ");
itoa(i + 1, temp, 10);
strcat(DiskMenuItems[i], temp);
}
for (i=0; i<HardDiskMenuItemCount; i++)
{
strcpy(DiskMenuItems[i + FloppyDiskMenuItemCount], "Hard Disk ");
itoa(i + 1, temp, 10);
strcat(DiskMenuItems[i + FloppyDiskMenuItemCount], temp);
strcat(DiskMenuItems[i + FloppyDiskMenuItemCount], " (");
itoa((get_heads(i+0x80) * get_cylinders(i+0x80) * get_sectors(i+0x80)) / 2048, temp, 10);
strcat(DiskMenuItems[i + FloppyDiskMenuItemCount], temp);
strcat(DiskMenuItems[i + FloppyDiskMenuItemCount], " MB)");
}
DiskMenuItemSelected = 0;
while (DiskMenuItemSelected != -1)
{
DiskMenuItemSelected = RunOptionsMenu(DiskMenuItems, DiskMenuItemCount, DiskMenuItemSelected, "[Boot Wizard]");
if (DiskMenuItemSelected != -1)
{
if (DiskMenuItemSelected < FloppyDiskMenuItemCount)
DoBootOptionsMenu(DiskMenuItemSelected, DiskMenuItems[DiskMenuItemSelected]);
else
DoBootOptionsMenu((DiskMenuItemSelected - FloppyDiskMenuItemCount) + 0x80, DiskMenuItems[DiskMenuItemSelected]);
}
}
}
void DoBootOptionsMenu(int BootDriveNum, char *BootDriveText)
{
int BootOptionsMenuItemCount = 2;
char BootOptionsMenuItems[2][80] = { "Boot To ", "Pick A Boot Partition" };
int BootOptionsMenuItemSelected = 0;
/*strcat(BootOptionsMenuItems[0], BootDriveText);
while (BootOptionsMenuItemSelected != -1)
{
BootOptionsMenuItemSelected = RunOptionsMenu(BootOptionsMenuItems, BootOptionsMenuItemCount, BootOptionsMenuItemSelected, "[Boot Options]");
switch (BootOptionsMenuItemSelected)
{
case 0:
BootDrive = BootDriveNum;
if (!biosdisk(_DISK_READ, BootDrive, 0, 0, 1, 1, (void*)0x7c00))
{
MessageBox("Disk Read Error");
return;
}
// Check for validity
if (*((WORD*)(0x7c00 + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid boot sector magic (0xaa55)");
return;
}
RestoreScreen(ScreenBuffer);
showcursor();
gotoxy(CursorXPos, CursorYPos);
stop_floppy();
JumpToBootCode();
break;
case 1:
if (BootDriveNum < 0x80)
{
MessageBox("This option is not available for a floppy disk.");
continue;
}
else
DoBootPartitionOptionsMenu(BootDriveNum);
break;
}
}*/
}
void DoBootPartitionOptionsMenu(int BootDriveNum)
{
struct
{
int partition_num;
int partition_type;
int head, sector, cylinder;
} BootPartitions[8];
int BootOptionsMenuItemCount = 0;
char BootOptionsMenuItems[8][80];
int BootOptionsMenuItemSelected = 0;
int head, sector, cylinder;
int offset;
int i;
char temp[25];
/*BootDrive = BootDriveNum;
if (!biosdisk(_DISK_READ, BootDrive, 0, 0, 1, 1, SectorBuffer))
{
MessageBox("Disk Read Error");
return;
}
// Check for validity
if (*((WORD*)(SectorBuffer + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid partition table magic (0xaa55)");
return;
}
offset = 0x1BE;
for (i=0; i<4; i++)
{
// Check for valid partition
if (SectorBuffer[offset + 4] != 0)
{
BootPartitions[BootOptionsMenuItemCount].partition_num = i;
BootPartitions[BootOptionsMenuItemCount].partition_type = SectorBuffer[offset + 4];
BootPartitions[BootOptionsMenuItemCount].head = SectorBuffer[offset + 1];
BootPartitions[BootOptionsMenuItemCount].sector = (SectorBuffer[offset + 2] & 0x3F);
BootPartitions[BootOptionsMenuItemCount].cylinder = SectorBuffer[offset + 3];
if (SectorBuffer[offset + 2] & 0x80)
BootPartitions[BootOptionsMenuItemCount].cylinder += 0x200;
if (SectorBuffer[offset + 2] & 0x40)
BootPartitions[BootOptionsMenuItemCount].cylinder += 0x100;
strcpy(BootOptionsMenuItems[BootOptionsMenuItemCount], "Boot To Partition ");
itoa(i+1, temp, 10);
strcat(BootOptionsMenuItems[BootOptionsMenuItemCount], temp);
strcat(BootOptionsMenuItems[BootOptionsMenuItemCount], " (Type: 0x");
itoa(BootPartitions[BootOptionsMenuItemCount].partition_type, temp, 16);
if (strlen(temp) < 2)
strcat(BootOptionsMenuItems[BootOptionsMenuItemCount], "0");
strcat(BootOptionsMenuItems[BootOptionsMenuItemCount], temp);
strcat(BootOptionsMenuItems[BootOptionsMenuItemCount], ")");
BootOptionsMenuItemCount++;
}
offset += 0x10;
}
while (BootOptionsMenuItemSelected != -1)
{
BootOptionsMenuItemSelected = RunOptionsMenu(BootOptionsMenuItems, BootOptionsMenuItemCount, BootOptionsMenuItemSelected, "[Boot Partition Options]");
if (BootOptionsMenuItemSelected != -1)
{
head = BootPartitions[BootOptionsMenuItemCount].head;
sector = BootPartitions[BootOptionsMenuItemCount].sector;
cylinder = BootPartitions[BootOptionsMenuItemCount].cylinder;
// Read partition boot sector
if (!biosdisk(_DISK_READ, BootDrive, head, cylinder, sector, 1, (void*)0x7c00))
{
MessageBox("Disk Read Error");
return;
}
// Check for validity
if (*((WORD*)(0x7c00 + 0x1fe)) != 0xaa55)
{
MessageBox("Invalid boot sector magic (0xaa55)");
return;
}
RestoreScreen(ScreenBuffer);
showcursor();
gotoxy(CursorXPos, CursorYPos);
stop_floppy();
JumpToBootCode();
}
}*/
}
int RunOptionsMenu(char OptionsMenuItems[][80], int OptionsMenuItemCount, int nOptionSelected, char *OptionsMenuTitle)
{
int key;
int second;
BOOL bDone = FALSE;
int nOptionsMenuBoxLeft;
int nOptionsMenuBoxRight;
int nOptionsMenuBoxTop;
int nOptionsMenuBoxBottom;
// Initialise the menu
InitOptionsMenu(&nOptionsMenuBoxLeft, &nOptionsMenuBoxTop, &nOptionsMenuBoxRight, &nOptionsMenuBoxBottom, OptionsMenuItemCount);
DrawBackdrop();
// Update the menu
DrawOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, nOptionSelected, OptionsMenuTitle, nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom);
second = getsecond();
// Loop
do
{
// Check for a keypress
if (kbhit())
{
// Cancel the timeout
if (nTimeOut != -1)
{
nTimeOut = -1;
DrawOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, nOptionSelected, OptionsMenuTitle, nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom);
}
// Get the key
key = getch();
// Is it extended?
if (key == 0)
key = getch(); // Yes - so get the extended key
// Process the key
switch (key)
{
case KEY_UP:
if (nOptionSelected)
{
nOptionSelected--;
// Update the menu
DrawOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, nOptionSelected, OptionsMenuTitle, nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom);
}
break;
case KEY_DOWN:
if (nOptionSelected < (OptionsMenuItemCount - 1))
{
nOptionSelected++;
// Update the menu
DrawOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, nOptionSelected, OptionsMenuTitle, nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom);
}
break;
case KEY_ENTER:
//MessageBox("The Advanced Options are still being implemented.");
bDone = TRUE;
break;
case KEY_ESC:
nOptionSelected = -1;
bDone = TRUE;
break;
}
}
// Update the date & time
UpdateDateTime();
if (nTimeOut > 0)
{
if (getsecond() != second)
{
second = getsecond();
nTimeOut--;
// Update the menu
DrawOptionsMenu(OptionsMenuItems, OptionsMenuItemCount, nOptionSelected, OptionsMenuTitle, nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom);
}
}
if (nTimeOut == 0)
bDone = TRUE;
}
while (!bDone);
return nOptionSelected;
}
void InitOptionsMenu(int *nOptionsMenuBoxLeft, int *nOptionsMenuBoxTop, int *nOptionsMenuBoxRight, int *nOptionsMenuBoxBottom, int OptionsMenuItemCount)
{
/*int height = OptionsMenuItemCount;
int width = 20;
height += 1; // Allow room for top & bottom borders
width += 18; // Allow room for left & right borders, plus 8 spaces on each side
// Calculate the OS list box area
*nOptionsMenuBoxLeft = (nScreenWidth - width) / 2;
*nOptionsMenuBoxRight = *nOptionsMenuBoxLeft + width;
*nOptionsMenuBoxTop = (nScreenHeight - height) / 2 + 1;
*nOptionsMenuBoxBottom = *nOptionsMenuBoxTop + height;*/
}
void DrawOptionsMenu(char OptionsMenuItems[][80], int OptionsMenuItemCount, int nOptionSelected, char *OptionsMenuTitle, int nOptionsMenuBoxLeft, int nOptionsMenuBoxTop, int nOptionsMenuBoxRight, int nOptionsMenuBoxBottom)
{
int i, j;
char text[260];
int space, space_left, space_right;
// Update the status bar
/*DrawStatusText(" Use \x18\x19 to select, then press ENTER. Press ESC to go back.");
DrawBox(nOptionsMenuBoxLeft, nOptionsMenuBoxTop, nOptionsMenuBoxRight, nOptionsMenuBoxBottom, D_VERT, D_HORZ, TRUE, TRUE, ATTR(cMenuFgColor, cMenuBgColor));
DrawText(nOptionsMenuBoxLeft + (((nOptionsMenuBoxRight - nOptionsMenuBoxLeft) - strlen(OptionsMenuTitle)) / 2) + 1, nOptionsMenuBoxTop, OptionsMenuTitle, ATTR(cMenuFgColor, cMenuBgColor));
for(i=0; i<OptionsMenuItemCount; i++)
{
space = (nOptionsMenuBoxRight - nOptionsMenuBoxLeft - 2) - strlen(OptionsMenuItems[i]);
space_left = (space / 2) + 1;
space_right = (space - space_left) + 1;
text[0] = '\0';
for(j=0; j<space_left; j++)
strcat(text, " ");
strcat(text, OptionsMenuItems[i]);
for(j=0; j<space_right; j++)
strcat(text, " ");
if(i == nOptionSelected)
{
DrawText(nOptionsMenuBoxLeft+1, nOptionsMenuBoxTop+1+i, text, ATTR(cSelectedTextColor, cSelectedTextBgColor));
}
else
{
DrawText(nOptionsMenuBoxLeft+1, nOptionsMenuBoxTop+1+i, text, ATTR(cTextColor, cMenuBgColor));
}
}*/
}
#endif

View File

@@ -1,254 +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.
*/
#include "freeldr.h"
#include "inifile.h"
#include "oslist.h"
#include "rtl.h"
#include "mm.h"
#include "ui.h"
BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, PULONG OperatingSystemCountPointer)
{
ULONG Idx;
ULONG CurrentOperatingSystemIndex;
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG OperatingSystemCount;
ULONG SectionId;
ULONG OperatingSystemSectionId;
ULONG SectionSettingCount;
PUCHAR *OperatingSystemSectionNames;
PUCHAR *OperatingSystemDisplayNames;
//
// Open the [FreeLoader] section
//
if (!IniOpenSection("FreeLoader", &SectionId))
{
MessageBox("Section [FreeLoader] not found in freeldr.ini.");
return FALSE;
}
SectionSettingCount = IniGetNumSectionItems(SectionId);
OperatingSystemCount = CountOperatingSystems(SectionId);
//
// Allocate memory to hold operating system lists
//
if (!AllocateListMemory(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, OperatingSystemCount))
{
return FALSE;
}
//
// Now loop through and read the operating system section names
//
CurrentOperatingSystemIndex = 0;
for (Idx=0; Idx<SectionSettingCount; Idx++)
{
IniReadSettingByNumber(SectionId, Idx, SettingName, 80, SettingValue, 80);
if (stricmp(SettingName, "OS") == 0)
{
strcpy(OperatingSystemSectionNames[CurrentOperatingSystemIndex], SettingValue);
CurrentOperatingSystemIndex++;
}
}
//
// Now loop through and read the operating system display names
//
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
if (IniOpenSection(OperatingSystemSectionNames[Idx], &OperatingSystemSectionId))
{
if (IniReadSettingByName(OperatingSystemSectionId, "Name", SettingValue, 80))
{
//
// Remove any quotes around the string
//
RemoveQuotes(SettingValue);
strcpy(OperatingSystemDisplayNames[Idx], SettingValue);
}
else
{
sprintf(SettingName, "Operating System '%s' has no Name= line in it's [section].", OperatingSystemSectionNames[Idx]);
MessageBox(SettingName);
strcpy(OperatingSystemDisplayNames[Idx], "");
}
}
}
*OperatingSystemCountPointer = OperatingSystemCount;
*SectionNamesPointer = OperatingSystemSectionNames;
*DisplayNamesPointer = OperatingSystemDisplayNames;
return TRUE;
}
ULONG CountOperatingSystems(ULONG SectionId)
{
ULONG Idx;
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG OperatingSystemCount = 0;
ULONG SectionSettingCount;
//
// Loop through and count the operating systems
//
SectionSettingCount = IniGetNumSectionItems(SectionId);
for (Idx=0; Idx<SectionSettingCount; Idx++)
{
IniReadSettingByNumber(SectionId, Idx, SettingName, 80, SettingValue, 80);
if (stricmp(SettingName, "OS") == 0)
{
if (IniOpenSection(SettingValue, NULL))
{
OperatingSystemCount++;
}
else
{
sprintf(SettingName, "Operating System '%s' is listed in freeldr.ini but doesn't have a [section].", SettingValue);
MessageBox(SettingName);
}
}
}
return OperatingSystemCount;
}
BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount)
{
ULONG Idx;
PUCHAR *OperatingSystemSectionNames = NULL;
PUCHAR *OperatingSystemDisplayNames = NULL;
//
// Allocate memory to hold operating system list arrays
//
OperatingSystemSectionNames = (PUCHAR*) AllocateMemory( sizeof(PUCHAR) * OperatingSystemCount);
OperatingSystemDisplayNames = (PUCHAR*) AllocateMemory( sizeof(PUCHAR) * OperatingSystemCount);
//
// If either allocation failed then return FALSE
//
if ( (OperatingSystemSectionNames == NULL) || (OperatingSystemDisplayNames == NULL) )
{
if (OperatingSystemSectionNames != NULL)
{
FreeMemory(OperatingSystemSectionNames);
}
if (OperatingSystemDisplayNames != NULL)
{
FreeMemory(OperatingSystemDisplayNames);
}
return FALSE;
}
//
// Clear our newly allocated memory
//
memset(OperatingSystemSectionNames, 0, sizeof(PUCHAR) * OperatingSystemCount);
memset(OperatingSystemDisplayNames, 0, sizeof(PUCHAR) * OperatingSystemCount);
//
// Loop through each array element and allocate it's string memory
//
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
OperatingSystemSectionNames[Idx] = (PUCHAR) AllocateMemory(80);
OperatingSystemDisplayNames[Idx] = (PUCHAR) AllocateMemory(80);
//
// If it failed then jump to the cleanup code
//
if ( (OperatingSystemSectionNames[Idx] == NULL) || (OperatingSystemDisplayNames[Idx] == NULL))
{
goto AllocateListMemoryFailed;
}
}
*SectionNamesPointer = OperatingSystemSectionNames;
*DisplayNamesPointer = OperatingSystemDisplayNames;
return TRUE;
AllocateListMemoryFailed:
//
// Loop through each array element and free it's string memory
//
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
if (OperatingSystemSectionNames[Idx] != NULL)
{
FreeMemory(OperatingSystemSectionNames[Idx]);
}
if (OperatingSystemDisplayNames[Idx] != NULL)
{
FreeMemory(OperatingSystemDisplayNames[Idx]);
}
}
//
// Free operating system list arrays
//
FreeMemory(OperatingSystemSectionNames);
FreeMemory(OperatingSystemDisplayNames);
return FALSE;
}
BOOL RemoveQuotes(PUCHAR QuotedString)
{
UCHAR TempString[200];
//
// If this string is not quoted then return FALSE
//
if ((QuotedString[0] != '\"') && (QuotedString[strlen(QuotedString)-1] != '\"'))
{
return FALSE;
}
if (QuotedString[0] == '\"')
{
strcpy(TempString, (QuotedString + 1));
}
else
{
strcpy(TempString, QuotedString);
}
if (TempString[strlen(TempString)-1] == '\"')
{
TempString[strlen(TempString)-1] = '\0';
}
strcpy(QuotedString, TempString);
return TRUE;
}

View File

@@ -1,74 +0,0 @@
/*
* FreeLoader - arcname.c
*
* Copyright (C) 2001 Brian Palmer <brianp@sginet.com>
* Copyright (C) 2001 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 <rtl.h>
BOOL DissectArcPath(char *ArcPath, char *BootPath, PULONG BootDrive, PULONG BootPartition)
{
char *p;
if (_strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
return FALSE;
p = ArcPath + 15;
if (_strnicmp(p, "fdisk(", 6) == 0)
{
/*
* floppy disk path:
* multi(0)disk(0)fdisk(x)\path
*/
p = p + 6;
*BootDrive = atoi(p);
p = strchr(p, ')');
if (p == NULL)
return FALSE;
p++;
*BootPartition = 0;
}
else if (_strnicmp(p, "rdisk(", 6) == 0)
{
/*
* hard disk path:
* multi(0)disk(0)rdisk(x)partition(y)\path
*/
p = p + 6;
*BootDrive = atoi(p) + 0x80;
p = strchr(p, ')');
if ((p == NULL) || (_strnicmp(p, ")partition(", 11) != 0))
return FALSE;
p = p + 11;
*BootPartition = atoi(p);
p = strchr(p, ')');
if ((p == NULL) || (*BootPartition == 0))
return FALSE;
p++;
}
else
{
return FALSE;
}
strcpy(BootPath, p);
return TRUE;
}

View File

@@ -1,39 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2001 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 <rtl.h>
//#define NDEBUG
VOID
DetectHardware(VOID)
{
#ifndef NDEBUG
printf("DetectHardware() called\n");
#endif
#ifndef NDEBUG
printf("DetectHardware() done\n");
#endif
//for(;;);
}

View File

@@ -1,26 +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.
*/
#ifndef __HWDETECT_H
#define __HWDETECT_H
VOID DetectHardware(VOID);
#endif /* __HWDETECT_H */

View File

@@ -1,655 +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.
*/
#include <freeldr.h>
#include <arch.h>
#include <reactos.h>
#include <rtl.h>
#include <fs.h>
#include <ui.h>
#include <multiboot.h>
#include <mm.h>
#include <inifile.h>
#include "registry.h"
#include "hwdetect.h"
#define NDEBUG
static BOOL
LoadKernel(PCHAR szFileName, int nPos)
{
PFILE FilePointer;
PCHAR szShortName;
char szBuffer[256];
szShortName = strrchr(szFileName, '\\');
if (szShortName == NULL)
szShortName = szFileName;
else
szShortName = szShortName + 1;
FilePointer = OpenFile(szFileName);
if (FilePointer == NULL)
{
strcpy(szBuffer, szShortName);
strcat(szBuffer, " not found.");
MessageBox(szBuffer);
return(FALSE);
}
/*
* Update the status bar with the current file
*/
strcpy(szBuffer, " Reading ");
strcat(szBuffer, szShortName);
DrawStatusText(szBuffer);
/*
* Load the kernel
*/
MultiBootLoadKernel(FilePointer);
DrawProgressBar(nPos);
return(TRUE);
}
static BOOL
LoadDriver(PCHAR szFileName, int nPos)
{
PFILE FilePointer;
char value[256];
char *p;
FilePointer = OpenFile(szFileName);
if (FilePointer == NULL)
{
strcpy(value, szFileName);
strcat(value, " not found.");
MessageBox(value);
return(FALSE);
}
/*
* Update the status bar with the current file
*/
strcpy(value, " Reading ");
p = strrchr(szFileName, '\\');
if (p == NULL)
strcat(value, szFileName);
else
strcat(value, p + 1);
DrawStatusText(value);
/*
* Load the driver
*/
MultiBootLoadModule(FilePointer, szFileName, NULL);
DrawProgressBar(nPos);
return(TRUE);
}
static BOOL
LoadNlsFile(PCHAR szFileName, PCHAR szModuleName)
{
PFILE FilePointer;
char value[256];
char *p;
FilePointer = OpenFile(szFileName);
if (FilePointer == NULL)
{
strcpy(value, szFileName);
strcat(value, " not found.");
MessageBox(value);
return(FALSE);
}
/*
* Update the status bar with the current file
*/
strcpy(value, " Reading ");
p = strrchr(szFileName, '\\');
if (p == NULL)
strcat(value, szFileName);
else
strcat(value, p + 1);
DrawStatusText(value);
/*
* Load the driver
*/
MultiBootLoadModule(FilePointer, szModuleName, NULL);
return(TRUE);
}
static VOID
LoadBootDrivers(PCHAR szSystemRoot, int nPos)
{
LONG rc = 0;
HKEY hGroupKey, hServiceKey, hDriverKey;
char ValueBuffer[256];
char ServiceName[256];
ULONG BufferSize;
ULONG Index;
char *s, *p;
char GroupName[256];
ULONG len;
BOOL done;
ULONG ValueSize;
ULONG ValueType;
ULONG StartValue;
UCHAR DriverGroup[256];
ULONG DriverGroupSize;
UCHAR ImagePath[256];
/* get 'service group order' key */
rc = RegOpenKey(NULL,
"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder",
&hGroupKey);
// printf("RegOpenKey(): rc %d\n", (int)rc);
if (rc != ERROR_SUCCESS)
return;
/* enumerate drivers */
rc = RegOpenKey(NULL,
"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services",
&hServiceKey);
// printf("RegOpenKey(): rc %d\n", (int)rc);
if (rc != ERROR_SUCCESS)
return;
// printf("hKey: %x\n", (int)hKey);
BufferSize = 256;
rc = RegQueryValue(hGroupKey, "List", NULL, (PUCHAR)ValueBuffer, &BufferSize);
// printf("RegQueryValue(): rc %d\n", (int)rc);
if (rc != ERROR_SUCCESS)
return;
// printf("BufferSize: %d \n", (int)BufferSize);
// printf("ValueBuffer: '%s' \n", ValueBuffer);
done = FALSE;
s = ValueBuffer;
do
{
p = strchr(s, ';');
if (p != NULL)
{
len = p - s;
memcpy(GroupName, s, len);
GroupName[len] = 0;
s = p + 1;
}
else
{
strcpy(GroupName, s);
done = TRUE;
}
// printf("Driver group: '%s'\n", GroupName);
/* enumerate all drivers */
Index = 0;
while (TRUE)
{
ValueSize = 256;
rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize);
// printf("RegEnumKey(): rc %d\n", (int)rc);
if (rc == ERROR_NO_MORE_ITEMS)
break;
if (rc != ERROR_SUCCESS)
return;
// printf("Service %d: '%s'\n", (int)Index, ServiceName);
/* open driver Key */
rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey);
ValueSize = sizeof(ULONG);
rc = RegQueryValue(hDriverKey, "Start", &ValueType, (PUCHAR)&StartValue, &ValueSize);
// printf(" Start: %x \n", (int)StartValue);
DriverGroupSize = 256;
rc = RegQueryValue(hDriverKey, "Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize);
// printf(" Group: %s \n", DriverGroup);
if ((StartValue == 0) && (stricmp(DriverGroup, GroupName) == 0))
{
ValueSize = 256;
rc = RegQueryValue(hDriverKey,
"ImagePathName",
NULL,
(PUCHAR)ImagePath,
&ValueSize);
if (rc != ERROR_SUCCESS)
{
// printf(" ImagePath: not found\n");
strcpy(ImagePath, szSystemRoot);
strcat(ImagePath, "system32\\drivers\\");
strcat(ImagePath, ServiceName);
strcat(ImagePath, ".sys");
}
else
{
// printf(" ImagePath: '%s'\n", ImagePath);
}
// printf(" Loading driver: '%s'\n", ImagePath);
if (nPos < 100)
nPos += 5;
LoadDriver(ImagePath, nPos);
}
Index++;
}
}
while(done == FALSE);
}
static BOOL
LoadNlsFiles(PCHAR szSystemRoot)
{
LONG rc = ERROR_SUCCESS;
HKEY hKey;
char szIdBuffer[80];
char szNameBuffer[80];
char szFileName[256];
ULONG BufferSize;
/* open the codepage key */
rc = RegOpenKey(NULL,
"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage",
&hKey);
if (rc != ERROR_SUCCESS)
return(FALSE);
/* get ANSI codepage */
BufferSize = 80;
rc = RegQueryValue(hKey, "ACP", NULL, (PUCHAR)szIdBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
BufferSize = 80;
rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
/* load ANSI codepage table */
strcpy(szFileName, szSystemRoot);
strcat(szFileName, "system32\\");
strcat(szFileName, szNameBuffer);
if (!LoadNlsFile(szFileName, "ANSI.NLS"))
return(FALSE);
/* get OEM codepage */
BufferSize = 80;
rc = RegQueryValue(hKey, "OEMCP", NULL, (PUCHAR)szIdBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
BufferSize = 80;
rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
/* load OEM codepage table */
strcpy(szFileName, szSystemRoot);
strcat(szFileName, "system32\\");
strcat(szFileName, szNameBuffer);
if (!LoadNlsFile(szFileName, "OEM.NLS"))
return(FALSE);
/* open the language key */
rc = RegOpenKey(NULL,
"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\Language",
&hKey);
if (rc != ERROR_SUCCESS)
return(FALSE);
/* get the Unicode case table */
BufferSize = 80;
rc = RegQueryValue(hKey, "Default", NULL, (PUCHAR)szIdBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
BufferSize = 80;
rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
if (rc != ERROR_SUCCESS)
return(FALSE);
/* load Unicode case table */
strcpy(szFileName, szSystemRoot);
strcat(szFileName, "system32\\");
strcat(szFileName, szNameBuffer);
if (!LoadNlsFile(szFileName, "UNICASE.NLS"))
return(FALSE);
return(TRUE);
}
void LoadAndBootReactOS(PUCHAR OperatingSystemName)
{
PFILE FilePointer;
char name[1024];
char value[1024];
char szFileName[1024];
char szBootPath[256];
// int i;
// int nNumDriverFiles=0;
// int nNumFilesLoaded=0;
char MsgBuffer[256];
ULONG SectionId;
char* Base;
ULONG Size;
//
// Open the operating system section
// specified in the .ini file
//
if (!IniOpenSection(OperatingSystemName, &SectionId))
{
sprintf(MsgBuffer,"Operating System section '%s' not found in freeldr.ini", OperatingSystemName);
MessageBox(MsgBuffer);
return;
}
/*
* Setup multiboot information structure
*/
mb_info.flags = MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES;
mb_info.mem_lower = GetConventionalMemorySize();
mb_info.mem_upper = GetExtendedMemorySize();
mb_info.boot_device = 0xffffffff;
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
mb_info.mods_count = 0;
mb_info.mods_addr = (unsigned long)multiboot_modules;
mb_info.mmap_length = GetBiosMemoryMap(&multiboot_memory_map);
if (mb_info.mmap_length)
{
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
mb_info.flags |= MB_INFO_FLAG_MEMORY_MAP;
//printf("memory map length: %d\n", mb_info.mmap_length);
//printf("dumping memory map:\n");
//for (i=0; i<(mb_info.mmap_length / 4); i++)
//{
// printf("0x%x\n", ((unsigned long *)&multiboot_memory_map)[i]);
//}
//getch();
}
//printf("low_mem = %d\n", mb_info.mem_lower);
//printf("high_mem = %d\n", mb_info.mem_upper);
//getch();
/*
* Make sure the system path is set in the .ini file
*/
if (!IniReadSettingByName(SectionId, "SystemPath", value, 1024))
{
MessageBox("System path not specified for selected operating system.");
return;
}
/*
* Verify system path
*/
if (!DissectArcPath(value, szBootPath, &BootDrive, &BootPartition))
{
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
MessageBox(MsgBuffer);
return;
}
/* set boot drive and partition */
((char *)(&mb_info.boot_device))[0] = (char)BootDrive;
((char *)(&mb_info.boot_device))[1] = (char)BootPartition;
/* copy ARC path into kernel command line */
strcpy(multiboot_kernel_cmdline, value);
/*
* Read the optional kernel parameters (if any)
*/
if (IniReadSettingByName(SectionId, "Options", value, 1024))
{
strcat(multiboot_kernel_cmdline, " ");
strcat(multiboot_kernel_cmdline, value);
}
/* append a backslash */
if ((strlen(szBootPath)==0) ||
szBootPath[strlen(szBootPath)] != '\\')
strcat(szBootPath, "\\");
#ifndef NDEBUG
sprintf(MsgBuffer,"SystemRoot: '%s'", szBootPath);
MessageBox(MsgBuffer);
#endif
DrawBackdrop();
DrawStatusText(" Loading...");
DrawProgressBar(0);
/*
* Try to open boot drive
*/
if (!OpenDiskDrive(BootDrive, BootPartition))
{
MessageBox("Failed to open boot drive.");
return;
}
/*
* Find the kernel image name
* and try to load the kernel off the disk
*/
if(IniReadSettingByName(SectionId, "Kernel", value, 1024))
{
/*
* Set the name and
*/
if (value[0] == '\\')
{
strcpy(szFileName, value);
}
else
{
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\");
strcat(szFileName, value);
}
}
else
{
strcpy(value, "NTOSKRNL.EXE");
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\");
strcat(szFileName, value);
}
if (!LoadKernel(szFileName, 5))
return;
/*
* Find the HAL image name
* and try to load the kernel off the disk
*/
if(IniReadSettingByName(SectionId, "Hal", value, 1024))
{
/*
* Set the name and
*/
if (value[0] == '\\')
{
strcpy(szFileName, value);
}
else
{
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\");
strcat(szFileName, value);
}
}
else
{
strcpy(value, "HAL.DLL");
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\");
strcat(szFileName, value);
}
if (!LoadDriver(szFileName, 10))
return;
/*
* Find the System hive image name
* and try to load it off the disk
*/
if(IniReadSettingByName(SectionId, "SystemHive", value, 1024))
{
/*
* Set the name and
*/
if (value[0] == '\\')
{
strcpy(szFileName, value);
}
else
{
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\CONFIG\\");
strcat(szFileName, value);
}
}
else
{
strcpy(value, "SYSTEM.HIV");
strcpy(szFileName, szBootPath);
strcat(szFileName, "SYSTEM32\\CONFIG\\");
strcat(szFileName, value);
}
#ifndef NDEBUG
sprintf(MsgBuffer,"SystemHive: '%s'", szFileName);
MessageBox(MsgBuffer);
#endif
FilePointer = OpenFile(szFileName);
if (FilePointer == NULL)
{
strcat(value, " not found.");
MessageBox(value);
return;
}
/*
* Update the status bar with the current file
*/
strcpy(name, " Reading ");
strcat(name, value);
while (strlen(name) < 80)
strcat(name, " ");
DrawStatusText(name);
/*
* Load the system hive
*/
Base = MultiBootLoadModule(FilePointer, szFileName, &Size);
RegInitializeRegistry();
RegImportHive(Base, Size);
DrawProgressBar(15);
#ifndef NDEBUG
sprintf(MsgBuffer,"SystemHive loaded at 0x%x size %u", (unsigned)Base, (unsigned)Size);
MessageBox(MsgBuffer);
#endif
/*
* Retrieve hardware information and create the hardware hive
*/
DetectHardware();
// Base = MultiBootCreateModule(HARDWARE.HIV);
// RegExportHive("\\Registry\\Machine\\HARDWARE", Base, &Size);
// MultiBootCloseModule(Base, Size);
DrawProgressBar(20);
/*
* Load NLS files
*/
#if 0
if (!LoadNlsFiles(szBootPath))
{
MessageBox("Failed to load NLS files\n");
return;
}
#endif
DrawProgressBar(25);
/*
* Load boot drivers
*/
LoadBootDrivers(szBootPath, 25);
/*
* Clear the screen and redraw the backdrop and status bar
*/
DrawBackdrop();
DrawStatusText(" Press any key to boot");
/*
* Wait for user
*/
strcpy(name, "Kernel and Drivers loaded.\nPress any key to boot ");
strcat(name, OperatingSystemName);
strcat(name, ".");
//MessageBox(name);
/*
* Now boot the kernel
*/
stop_floppy();
boot_reactos();
}

View File

@@ -1,571 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2001 Rex Jolliff
* Copyright (C) 2001 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 <rtl.h>
#include <mm.h>
#include "registry.h"
#define NDEBUG
#define REGISTRY_FILE_MAGIC "REGEDIT4"
#define INVALID_HANDLE_VALUE NULL
static PCHAR
checkAndSkipMagic (PCHAR regChunk)
{
if (strncmp (regChunk,
REGISTRY_FILE_MAGIC,
strlen (REGISTRY_FILE_MAGIC)) != 0)
{
#ifndef NDEBUG
printf("incorrect magic number in registry chunk. expected: %s got:%.*s\n",
REGISTRY_FILE_MAGIC,
strlen (REGISTRY_FILE_MAGIC),
regChunk);
#endif
return 0;
}
regChunk += strlen (REGISTRY_FILE_MAGIC);
#ifndef NDEBUG
printf("Found registry chunk magic value\n");
#endif
return regChunk;
}
static PCHAR
skipWhitespaceInChunk (PCHAR regChunk)
{
while (*regChunk && isspace (*regChunk))
regChunk++;
return *regChunk ? regChunk : 0;
}
static int
computeKeyNameSize (PCHAR regChunk)
{
int copyCount = 0;
while (*regChunk != 0 && *regChunk != ']')
{
copyCount++;
regChunk++;
}
return copyCount;
}
static BOOL
allocateKeyName(PCHAR *newKeyName, int newKeySize)
{
if (*newKeyName != NULL)
FreeMemory(*newKeyName);
*newKeyName = AllocateMemory(newKeySize + 1);
if (*newKeyName == NULL)
return(FALSE);
memset(*newKeyName, 0, newKeySize + 1);
return(TRUE);
}
static PCHAR
skipToNextKeyInChunk (PCHAR regChunk)
{
while (*regChunk != 0 && *regChunk != '[')
{
while (*regChunk != 0 && *regChunk != '\n')
{
regChunk++;
}
regChunk++;
}
return *regChunk ? regChunk : 0;
}
static PCHAR
getKeyNameFromChunk (PCHAR regChunk, PCHAR newKeyName)
{
int index = 0;
while (*regChunk != 0 && *regChunk != ']')
{
newKeyName[index++] = *regChunk++;
}
newKeyName[index] = '\0';
return *regChunk ? regChunk : 0;
}
static HKEY
createNewKey (PCHAR newKeyName)
{
HKEY handleToReturn = NULL;
#ifndef NDEBUG
printf("Adding new key '%s'\n", newKeyName);
#endif
RegCreateKey(NULL,
newKeyName,
&handleToReturn);
#ifndef NDEBUG
printf(" returned handle: 0x%x\n", handleToReturn);
#endif
return handleToReturn;
}
static PCHAR
skipToNextKeyValueInChunk (PCHAR regChunk)
{
while (*regChunk != 0 && *regChunk != '\n')
regChunk++;
regChunk = skipWhitespaceInChunk (regChunk);
return regChunk;
}
static int
computeKeyValueNameSize (PCHAR regChunk)
{
int size = 0;
if (*regChunk != '\"')
return 0;
regChunk++;
while (*regChunk != 0 && *regChunk != '\"')
{
size++;
regChunk++;
}
return regChunk ? size : 0;
}
static PCHAR
getKeyValueNameFromChunk (PCHAR regChunk, PCHAR newKeyName)
{
int index = 0;
regChunk++;
while (*regChunk != 0 && *regChunk != '\"')
{
newKeyName[index++] = *regChunk++;
}
newKeyName[index] = '\0';
regChunk++;
return *regChunk ? regChunk : 0;
}
static PCHAR
getKeyValueTypeFromChunk (PCHAR regChunk, PCHAR dataFormat, int *keyValueType)
{
if (*regChunk == '\"')
{
strcpy (dataFormat, "string");
*keyValueType = REG_SZ;
}
else if (strncmp (regChunk, "hex", 3) == 0)
{
strcpy (dataFormat, "hex");
regChunk += 3;
if (*regChunk == '(')
{
regChunk++;
*keyValueType = atoi (regChunk);
while (*regChunk != 0 && *regChunk != ')')
regChunk++;
regChunk++;
}
else
*keyValueType = REG_BINARY;
if (*regChunk == ':')
regChunk++;
}
else if (strncmp (regChunk, "dword", 5) == 0)
{
strcpy (dataFormat, "dword");
*keyValueType = REG_DWORD;
regChunk += 5;
if (*regChunk == ':')
regChunk++;
}
else
{
// UNIMPLEMENTED;
}
return *regChunk ? regChunk : 0;
}
static int
computeKeyValueDataSize (PCHAR regChunk, PCHAR dataFormat)
{
int dataSize = 0;
if (strcmp (dataFormat, "string") == 0)
{
regChunk++;
while (*regChunk != 0 && *regChunk != '\"')
{
dataSize++;
regChunk++;
}
dataSize++;
}
else if (strcmp (dataFormat, "hex") == 0)
{
while (*regChunk != 0 && isxdigit(*regChunk))
{
regChunk++;
regChunk++;
dataSize++;
if (*regChunk == ',')
{
regChunk++;
if (*regChunk == '\\')
{
regChunk++;
regChunk = skipWhitespaceInChunk (regChunk);
}
}
}
}
else if (strcmp (dataFormat, "dword") == 0)
{
dataSize = sizeof(DWORD);
while (*regChunk != 0 && isxdigit(*regChunk))
{
regChunk++;
}
}
else
{
// UNIMPLEMENTED;
}
return dataSize;
}
static BOOL
allocateDataBuffer (PVOID * data, int * dataBufferSize, int dataSize)
{
if (*dataBufferSize < dataSize)
{
if (*dataBufferSize > 0)
FreeMemory(*data);
*data = AllocateMemory(dataSize);
*dataBufferSize = dataSize;
}
return TRUE;
}
static PCHAR
getKeyValueDataFromChunk (PCHAR regChunk, PCHAR dataFormat, PCHAR data)
{
char dataValue;
ULONG ulValue;
PCHAR ptr;
if (strcmp (dataFormat, "string") == 0)
{
/* convert quoted string to zero-terminated Unicode string */
ptr = (PCHAR)data;
regChunk++;
while (*regChunk != 0 && *regChunk != '\"')
{
*ptr++ = (CHAR)*regChunk++;
}
*ptr = 0;
regChunk++;
}
else if (strcmp (dataFormat, "hex") == 0)
{
while (*regChunk != 0 && isxdigit (*regChunk))
{
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
tolower(*regChunk) - 'a') << 4;
regChunk++;
dataValue += (isdigit (*regChunk) ? *regChunk - '0' :
tolower(*regChunk) - 'a');
regChunk++;
*data++ = dataValue;
if (*regChunk == ',')
{
regChunk++;
if (*regChunk == '\\')
{
regChunk++;
regChunk = skipWhitespaceInChunk (regChunk);
}
}
}
}
else if (strcmp (dataFormat, "dword") == 0)
{
ulValue = 0;
while (*regChunk != 0 && isxdigit(*regChunk))
{
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
tolower(*regChunk) - 'a');
ulValue = (ulValue << 4) + dataValue;
regChunk++;
}
memcpy(data, &ulValue, sizeof(ULONG));
}
else
{
// UNIMPLEMENTED;
}
return *regChunk ? regChunk : 0;
}
static BOOL
setKeyValue (HKEY currentKey,
PCHAR newValueName,
ULONG keyValueType,
PVOID data,
ULONG dataSize)
{
LONG status;
#ifndef NDEBUG
printf("Adding value (%s) to current key, with data type %d size %d\n",
newValueName,
(int)keyValueType,
(int)dataSize);
#endif
status = RegSetValue(currentKey,
newValueName,
keyValueType,
data,
dataSize);
if (status != ERROR_SUCCESS)
{
#ifndef NDEBUG
printf("could not set key value, rc:%d\n", status);
#endif
return FALSE;
}
return TRUE;
}
VOID
RegImportHive(PCHAR ChunkBase,
ULONG ChunkSize)
{
HKEY currentKey = NULL;
int newKeySize = 0;
char *newKeyName = NULL;
char dataFormat [10];
int keyValueType;
int dataSize = 0;
int dataBufferSize = 0;
PVOID data = 0;
PCHAR regChunk;
#ifndef NDEBUG
printf("ChunkBase 0x%x ChunkSize %x\n", ChunkBase, ChunkSize);
#endif
regChunk = checkAndSkipMagic (ChunkBase);
if (regChunk == 0)
return;
while (regChunk != 0 && *regChunk != 0 && (((ULONG)regChunk-(ULONG)ChunkBase) < ChunkSize))
{
regChunk = skipWhitespaceInChunk (regChunk);
if (regChunk == 0)
continue;
if (*regChunk == '[')
{
#ifndef NDEBUG
printf("Line: %s\n", regChunk);
#endif
if (currentKey != NULL)
{
#ifndef NDEBUG
printf("Closing current key: 0x%lx\n", currentKey);
#endif
currentKey = NULL;
}
regChunk++;
newKeySize = computeKeyNameSize (regChunk);
if (!allocateKeyName (&newKeyName, newKeySize))
{
regChunk = 0;
continue;
}
regChunk = getKeyNameFromChunk (regChunk, newKeyName);
if (regChunk == 0)
continue;
currentKey = createNewKey (newKeyName);
if (currentKey == NULL)
{
regChunk = skipToNextKeyInChunk (regChunk);
continue;
}
regChunk++;
}
else
{
if (currentKey == NULL)
{
regChunk = skipToNextKeyInChunk (regChunk);
continue;
}
newKeySize = computeKeyValueNameSize(regChunk);
if (!allocateKeyName (&newKeyName, newKeySize))
{
regChunk = 0;
continue;
}
regChunk = getKeyValueNameFromChunk (regChunk, newKeyName);
if (regChunk == 0)
continue;
if (*regChunk != '=')
{
regChunk = skipToNextKeyValueInChunk (regChunk);
continue;
}
regChunk++;
regChunk = getKeyValueTypeFromChunk (regChunk, dataFormat, &keyValueType);
if (regChunk == 0)
continue;
dataSize = computeKeyValueDataSize (regChunk, dataFormat);
if (!allocateDataBuffer (&data, &dataBufferSize, dataSize))
{
regChunk = 0;
continue;
}
regChunk = getKeyValueDataFromChunk (regChunk, dataFormat, data);
if (regChunk == 0)
continue;
if (!setKeyValue (currentKey, newKeyName, keyValueType, data, dataSize))
{
regChunk = 0;
continue;
}
}
}
if (newKeyName != NULL)
{
FreeMemory(newKeyName);
}
if (data != NULL)
{
FreeMemory(data);
}
return;
}
static PCHAR
bprintf(char *buffer, char *format, ... )
{
int *dataptr = (int *) &format;
char c, *ptr, str[16];
char *p = buffer;
dataptr++;
while ((c = *(format++)))
{
if (c != '%')
{
*p = c;
p++;
}
else
switch (c = *(format++))
{
case 'd': case 'u': case 'x':
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
ptr = str;
while (*ptr)
{
*p = *(ptr++);
p++;
}
break;
case 'c':
*p = (*(dataptr++))&0xff;
p++;
break;
case 's':
ptr = (char *)(*(dataptr++));
while ((c = *(ptr++)))
{
*p = c;
p++;
}
break;
}
}
return(p);
}
BOOL
RegExportHive(PCHAR ChunkBase, PULONG ChunkSize)
{
return(TRUE);
}
/* EOF */

View File

@@ -1,596 +0,0 @@
/*
* FreeLoader
*
* Copyright (C) 2001 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.
*/
/*
* TODO:
* - Implement RegDeleteKey().
* - Implement RegQueryMultipleValue().
* - Fix RegEnumValue().
*/
#include <freeldr.h>
#include <mm.h>
#include <rtl.h>
#include "registry.h"
#define NDEBUG
static HKEY RootKey;
VOID
RegInitializeRegistry(VOID)
{
RootKey = (HKEY)AllocateMemory(sizeof(KEY));
InitializeListHead(&RootKey->SubKeyList);
InitializeListHead(&RootKey->ValueList);
InitializeListHead(&RootKey->KeyList);
RootKey->NameSize = 2;
RootKey->Name = (PUCHAR)AllocateMemory(2);
strcpy(RootKey->Name, "\\");
RootKey->Type = 0;
RootKey->DataSize = 0;
RootKey->Data = NULL;
}
LONG
RegCreateKey(HKEY ParentKey,
PCHAR KeyName,
PHKEY Key)
{
PLIST_ENTRY Ptr;
HKEY SearchKey;
HKEY CurrentKey;
HKEY NewKey;
PCHAR p;
PCHAR name;
int subkeyLength;
int stringLength;
#ifndef NDEBUG
printf("RegCreateKey(%s) called\n", KeyName);
#endif
if (*KeyName == '\\')
{
KeyName++;
CurrentKey = RootKey;
}
else if (ParentKey == NULL)
{
CurrentKey = RootKey;
}
else
{
CurrentKey = ParentKey;
}
while (*KeyName != 0)
{
#ifndef NDEBUG
printf("RegCreateKey(): KeyName '%s'\n", KeyName);
#endif
if (*KeyName == '\\')
KeyName++;
p = strchr(KeyName, '\\');
if ((p != NULL) && (p != KeyName))
{
subkeyLength = p - KeyName;
stringLength = subkeyLength + 1;
name = KeyName;
}
else
{
subkeyLength = strlen(KeyName);
stringLength = subkeyLength;
name = KeyName;
}
Ptr = CurrentKey->SubKeyList.Flink;
while (Ptr != &CurrentKey->SubKeyList)
{
#ifndef NDEBUG
printf("RegCreateKey(): Ptr 0x%x\n", Ptr);
#endif
SearchKey = CONTAINING_RECORD(Ptr,
KEY,
KeyList);
#ifndef NDEBUG
printf("RegCreateKey(): SearchKey 0x%x\n", SearchKey);
printf("RegCreateKey(): searching '%s'\n", SearchKey->Name);
#endif
if (strncmp(SearchKey->Name, name, subkeyLength) == 0)
break;
Ptr = Ptr->Flink;
}
if (Ptr == &CurrentKey->SubKeyList)
{
/* no key found -> create new subkey */
NewKey = (HKEY)AllocateMemory(sizeof(KEY));
if (NewKey == NULL)
return(ERROR_OUTOFMEMORY);
InitializeListHead(&NewKey->SubKeyList);
InitializeListHead(&NewKey->ValueList);
NewKey->Type = 0;
NewKey->DataSize = 0;
NewKey->Data = NULL;
InsertTailList(&CurrentKey->SubKeyList, &NewKey->KeyList);
NewKey->NameSize = subkeyLength + 1;
NewKey->Name = (PCHAR)AllocateMemory(NewKey->NameSize);
if (NewKey->Name == NULL)
return(ERROR_OUTOFMEMORY);
memcpy(NewKey->Name, name, subkeyLength);
NewKey->Name[subkeyLength] = 0;
#ifndef NDEBUG
printf("RegCreateKey(): new key 0x%x\n", NewKey);
printf("RegCreateKey(): new key '%s' length %d\n", NewKey->Name, NewKey->NameSize);
#endif
CurrentKey = NewKey;
}
else
{
CurrentKey = SearchKey;
}
KeyName = KeyName + stringLength;
}
if (Key != NULL)
*Key = CurrentKey;
return(ERROR_SUCCESS);
}
LONG
RegDeleteKey(HKEY Key,
PCHAR Name)
{
if (strchr(Name, '\\') != NULL)
return(ERROR_INVALID_PARAMETER);
return(ERROR_SUCCESS);
}
LONG
RegEnumKey(HKEY Key,
ULONG Index,
PCHAR Name,
PULONG NameSize)
{
PLIST_ENTRY Ptr;
HKEY SearchKey;
ULONG Count = 0;
ULONG Size;
Ptr = Key->SubKeyList.Flink;
while (Ptr != &Key->SubKeyList)
{
if (Index == Count)
break;
Count++;
Ptr = Ptr->Flink;
}
if (Ptr == &Key->SubKeyList)
return(ERROR_NO_MORE_ITEMS);
SearchKey = CONTAINING_RECORD(Ptr,
KEY,
KeyList);
#ifndef NDEBUG
printf("RegEnumKey(): name '%s' length %d\n", SearchKey->Name, SearchKey->NameSize);
#endif
Size = min(SearchKey->NameSize, *NameSize);
*NameSize = Size;
memcpy(Name, SearchKey->Name, Size);
return(ERROR_SUCCESS);
}
LONG
RegOpenKey(HKEY ParentKey,
PCHAR KeyName,
PHKEY Key)
{
PLIST_ENTRY Ptr;
HKEY SearchKey;
HKEY CurrentKey;
PCHAR p;
PCHAR name;
int subkeyLength;
int stringLength;
#ifndef NDEBUG
printf("RegOpenKey(%s) called\n", KeyName);
#endif
*Key = NULL;
if (*KeyName == '\\')
{
KeyName++;
CurrentKey = RootKey;
}
else if (ParentKey == NULL)
{
CurrentKey = RootKey;
}
else
{
CurrentKey = ParentKey;
}
while (*KeyName != 0)
{
#ifndef NDEBUG
printf("RegOpenKey(): KeyName '%s'\n", KeyName);
#endif
if (*KeyName == '\\')
KeyName++;
p = strchr(KeyName, '\\');
if ((p != NULL) && (p != KeyName))
{
subkeyLength = p - KeyName;
stringLength = subkeyLength + 1;
name = KeyName;
}
else
{
subkeyLength = strlen(KeyName);
stringLength = subkeyLength;
name = KeyName;
}
Ptr = CurrentKey->SubKeyList.Flink;
while (Ptr != &CurrentKey->SubKeyList)
{
#ifndef NDEBUG
printf("RegCreateKey(): Ptr 0x%x\n", Ptr);
#endif
SearchKey = CONTAINING_RECORD(Ptr,
KEY,
KeyList);
#ifndef NDEBUG
printf("RegOpenKey(): SearchKey 0x%x\n", SearchKey);
printf("RegOpenKey(): searching '%s'\n", SearchKey->Name);
#endif
if (strncmp(SearchKey->Name, name, subkeyLength) == 0)
break;
Ptr = Ptr->Flink;
}
if (Ptr == &CurrentKey->SubKeyList)
{
return(ERROR_PATH_NOT_FOUND);
}
else
{
CurrentKey = SearchKey;
}
KeyName = KeyName + stringLength;
}
if (Key != NULL)
*Key = CurrentKey;
return(ERROR_SUCCESS);
}
LONG
RegSetValue(HKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
ULONG DataSize)
{
PLIST_ENTRY Ptr;
PVALUE Value;
#ifndef NDEBUG
printf("RegSetValue(%x, '%s', %d, %x, %d)\n", (int)Key, ValueName, (int)Type, (int)Data, (int)DataSize);
#endif
if ((ValueName == NULL) || (*ValueName == 0))
{
/* set default value */
if (Key->Data != NULL)
FreeMemory(Key->Data);
Key->Data = (PUCHAR)AllocateMemory(DataSize);
Key->DataSize = DataSize;
Key->Type = Type;
memcpy(Key->Data, Data, DataSize);
}
else
{
/* set non-default value */
Ptr = Key->ValueList.Flink;
while (Ptr != &Key->ValueList)
{
Value = CONTAINING_RECORD(Ptr,
VALUE,
ValueList);
#ifndef NDEBUG
printf("Value->Name: '%s'\n", Value->Name);
#endif
if (stricmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
}
if (Ptr == &Key->ValueList)
{
/* add new value */
#ifndef NDEBUG
printf("No value found - adding new value\n");
#endif
Value = (PVALUE)AllocateMemory(sizeof(VALUE));
if (Value == NULL)
return(ERROR_OUTOFMEMORY);
InsertTailList(&Key->ValueList, &Value->ValueList);
Value->NameSize = strlen(ValueName)+1;
Value->Name = (PCHAR)AllocateMemory(Value->NameSize);
if (Value->Name == NULL)
return(ERROR_OUTOFMEMORY);
strcpy(Value->Name, ValueName);
Value->Data = NULL;
}
/* set new value */
if (DataSize <= sizeof(PUCHAR))
{
Value->DataSize = DataSize;
Value->Type = Type;
memcpy(&Value->Data, Data, DataSize);
}
else
{
if(Value->Data != NULL)
FreeMemory(Value->Data);
Value->Data = (PUCHAR)AllocateMemory(DataSize);
if (Value->Data == NULL)
return(ERROR_OUTOFMEMORY);
Value->DataSize = DataSize;
Value->Type = Type;
memcpy(Value->Data, Data, DataSize);
}
}
return(ERROR_SUCCESS);
}
LONG
RegQueryValue(HKEY Key,
PCHAR ValueName,
PULONG Type,
PUCHAR Data,
PULONG DataSize)
{
ULONG Size;
PLIST_ENTRY Ptr;
PVALUE Value;
if ((ValueName == NULL) || (*ValueName == 0))
{
/* query default value */
if (Key->Data == NULL)
return(ERROR_INVALID_PARAMETER);
if (Type != NULL)
*Type = Key->Type;
if ((Data != NULL) && (DataSize != NULL))
{
Size = min(Key->DataSize, *DataSize);
memcpy(Data, Key->Data, Size);
*DataSize = Size;
}
}
else
{
/* query non-default value */
Ptr = Key->ValueList.Flink;
while (Ptr != &Key->ValueList)
{
Value = CONTAINING_RECORD(Ptr,
VALUE,
ValueList);
#ifndef NDEBUG
printf("Name: %s\n", Value->Name);
#endif
if (stricmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
}
if (Ptr == &Key->ValueList)
return(ERROR_INVALID_PARAMETER);
if (Type != NULL)
*Type = Value->Type;
if ((Data != NULL) && (DataSize != NULL))
{
if (Value->DataSize <= sizeof(PUCHAR))
{
Size = min(Value->DataSize, *DataSize);
memcpy(Data, &Value->Data, Size);
*DataSize = Size;
}
else
{
Size = min(Value->DataSize, *DataSize);
memcpy(Data, Value->Data, Size);
*DataSize = Size;
}
}
}
return(ERROR_SUCCESS);
}
LONG
RegDeleteValue(HKEY Key,
PCHAR ValueName)
{
PLIST_ENTRY Ptr;
PVALUE Value;
if ((ValueName == NULL) || (*ValueName == 0))
{
/* delete default value */
if (Key->Data != NULL)
FreeMemory(Key->Data);
Key->Data = NULL;
Key->DataSize = 0;
Key->Type = 0;
}
else
{
/* delete non-default value */
Ptr = Key->ValueList.Flink;
while (Ptr != &Key->ValueList)
{
Value = CONTAINING_RECORD(Ptr,
VALUE,
ValueList);
if (strcmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
}
if (Ptr == &Key->ValueList)
return(ERROR_INVALID_PARAMETER);
/* delete value */
if (Value->Name != NULL)
FreeMemory(Value->Name);
Value->Name = NULL;
Value->NameSize = 0;
if (Value->DataSize > sizeof(PUCHAR))
{
if (Value->Data != NULL)
FreeMemory(Value->Data);
}
Value->Data = NULL;
Value->DataSize = 0;
Value->Type = 0;
RemoveEntryList(&Value->ValueList);
FreeMemory(Value);
}
return(ERROR_SUCCESS);
}
LONG
RegEnumValue(HKEY Key,
ULONG Index,
PCHAR ValueName,
PULONG NameSize,
PULONG Type,
PUCHAR Data,
PULONG DataSize)
{
PLIST_ENTRY Ptr;
PVALUE Value;
ULONG Count = 0;
if (Key->Data != NULL)
{
if (Index > 0)
{
Index--;
}
else
{
/* enumerate default value */
if (ValueName != NULL)
*ValueName = 0;
if (Type != NULL)
*Type = Key->Type;
if (DataSize != NULL)
*DataSize = Key->DataSize;
/* FIXME: return more values */
}
}
Ptr = Key->ValueList.Flink;
while (Ptr != &Key->ValueList)
{
if (Index == Count)
break;
Count++;
Ptr = Ptr->Flink;
}
if (Ptr == &Key->ValueList)
return(ERROR_NO_MORE_ITEMS);
Value = CONTAINING_RECORD(Ptr,
VALUE,
ValueList);
/* FIXME: return values */
return(ERROR_SUCCESS);
}
#if 0
LONG
RegQueryMultipleValue(HKEY Key,
...)
{
return(ERROR_SUCCESS);
}
#endif
/* EOF */

View File

@@ -1,287 +0,0 @@
/*
* FreeLoader - registry.h
*
* Copyright (C) 2001 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 __REGISTRY_H
#define __REGISTRY_H
typedef struct _LIST_ENTRY
{
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY, *PLIST_ENTRY;
typedef struct _REG_KEY
{
LIST_ENTRY KeyList;
LIST_ENTRY SubKeyList;
LIST_ENTRY ValueList;
ULONG NameSize;
PUCHAR Name;
/* default data */
ULONG Type;
ULONG DataSize;
PUCHAR Data;
} KEY, *HKEY, **PHKEY;
typedef struct _REG_VALUE
{
LIST_ENTRY ValueList;
/* value name */
ULONG NameSize;
PUCHAR Name;
/* value data */
ULONG Type;
ULONG DataSize;
PUCHAR Data;
} VALUE, *PVALUE;
#define ERROR_SUCCESS 0L
#define ERROR_PATH_NOT_FOUND 2L
#define ERROR_OUTOFMEMORY 14L
#define ERROR_INVALID_PARAMETER 87L
#define ERROR_MORE_DATA 234L
#define ERROR_NO_MORE_ITEMS 259L
#define assert(x)
/*
* VOID
* InitializeListHead (
* PLIST_ENTRY ListHead
* );
*
* FUNCTION: Initializes a double linked list
* ARGUMENTS:
* ListHead = Caller supplied storage for the head of the list
*/
#define InitializeListHead(ListHead) \
{ \
(ListHead)->Flink = (ListHead); \
(ListHead)->Blink = (ListHead); \
}
/*
* VOID
* InsertHeadList (
* PLIST_ENTRY ListHead,
* PLIST_ENTRY Entry
* );
*
* FUNCTION: Inserts an entry in a double linked list
* ARGUMENTS:
* ListHead = Head of the list
* Entry = Entry to insert
*/
#define InsertHeadList(ListHead, ListEntry) \
{ \
PLIST_ENTRY OldFlink; \
OldFlink = (ListHead)->Flink; \
(ListEntry)->Flink = OldFlink; \
(ListEntry)->Blink = (ListHead); \
OldFlink->Blink = (ListEntry); \
(ListHead)->Flink = (ListEntry); \
assert((ListEntry) != NULL); \
assert((ListEntry)->Blink!=NULL); \
assert((ListEntry)->Blink->Flink == (ListEntry)); \
assert((ListEntry)->Flink != NULL); \
assert((ListEntry)->Flink->Blink == (ListEntry)); \
}
/*
* VOID
* InsertTailList (
* PLIST_ENTRY ListHead,
* PLIST_ENTRY Entry
* );
*
* FUNCTION:
* Inserts an entry in a double linked list
*
* ARGUMENTS:
* ListHead = Head of the list
* Entry = Entry to insert
*/
#define InsertTailList(ListHead, ListEntry) \
{ \
PLIST_ENTRY OldBlink; \
OldBlink = (ListHead)->Blink; \
(ListEntry)->Flink = (ListHead); \
(ListEntry)->Blink = OldBlink; \
OldBlink->Flink = (ListEntry); \
(ListHead)->Blink = (ListEntry); \
assert((ListEntry) != NULL); \
assert((ListEntry)->Blink != NULL); \
assert((ListEntry)->Blink->Flink == (ListEntry)); \
assert((ListEntry)->Flink != NULL); \
assert((ListEntry)->Flink->Blink == (ListEntry)); \
}
/*
* BOOLEAN
* IsListEmpty (
* PLIST_ENTRY ListHead
* );
*
* FUNCTION:
* Checks if a double linked list is empty
*
* ARGUMENTS:
* ListHead = Head of the list
*/
#define IsListEmpty(ListHead) \
((ListHead)->Flink == (ListHead))
/*
*VOID
*RemoveEntryList (
* PLIST_ENTRY Entry
* );
*
* FUNCTION:
* Removes an entry from a double linked list
*
* ARGUMENTS:
* ListEntry = Entry to remove
*/
#define RemoveEntryList(ListEntry) \
{ \
PLIST_ENTRY OldFlink; \
PLIST_ENTRY OldBlink; \
assert((ListEntry) != NULL); \
assert((ListEntry)->Blink!=NULL); \
assert((ListEntry)->Blink->Flink == (ListEntry)); \
assert((ListEntry)->Flink != NULL); \
assert((ListEntry)->Flink->Blink == (ListEntry)); \
OldFlink = (ListEntry)->Flink; \
OldBlink = (ListEntry)->Blink; \
OldFlink->Blink = OldBlink; \
OldBlink->Flink = OldFlink; \
(ListEntry)->Flink = NULL; \
(ListEntry)->Blink = NULL; \
}
/*
* PURPOSE: Returns the byte offset of a field within a structure
*/
#define FIELD_OFFSET(Type,Field) (LONG)(&(((Type *)(0))->Field))
/*
* PURPOSE: Returns the base address structure if the caller knows the
* address of a field within the structure
* ARGUMENTS:
* Address = address of the field
* Type = Type of the whole structure
* Field = Name of the field whose address is none
*/
#define CONTAINING_RECORD(Address,Type,Field) \
(Type *)(((LONG)Address) - FIELD_OFFSET(Type,Field))
//typedef struct _REG_KEY *HKEY, **PHKEY;
#define REG_NONE 0
#define REG_SZ 1
#define REG_EXPAND_SZ 2
#define REG_BINARY 3
#define REG_DWORD 4
#define REG_DWORD_BIG_ENDIAN 5
#define REG_DWORD_LITTLE_ENDIAN 4
#define REG_LINK 6
#define REG_MULTI_SZ 7
#define REG_RESOURCE_LIST 8
#define REG_FULL_RESOURCE_DESCRIPTOR 9
#define REG_RESOURCE_REQUIREMENTS_LIST 10
VOID
RegInitializeRegistry(VOID);
LONG
RegCreateKey(HKEY ParentKey,
PCHAR KeyName,
PHKEY Key);
LONG
RegDeleteKey(HKEY Key,
PCHAR Name);
LONG
RegEnumKey(HKEY Key,
ULONG Index,
PCHAR Name,
PULONG NameSize);
LONG
RegOpenKey(HKEY ParentKey,
PCHAR KeyName,
PHKEY Key);
LONG
RegSetValue(HKEY Key,
PCHAR ValueName,
ULONG Type,
PUCHAR Data,
ULONG DataSize);
LONG
RegQueryValue(HKEY Key,
PCHAR ValueName,
PULONG Type,
PUCHAR Data,
PULONG DataSize);
LONG
RegDeleteValue(HKEY Key,
PCHAR ValueName);
LONG
RegEnumValue(HKEY Key,
ULONG Index,
PCHAR ValueName,
PULONG NameSize,
PULONG Type,
PUCHAR Data,
PULONG DataSize);
VOID
RegImportHive(PCHAR ChunkBase,
ULONG ChunkSize);
#endif /* __REGISTRY_H */
/* EOF */

View File

@@ -1,175 +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.
*/
#include <rtl.h>
VOID RtlListInitializeHead(PLIST_ITEM ListHead)
{
ListHead->ListPrev = NULL;
ListHead->ListNext = NULL;
}
VOID RtlListInsertHead(PLIST_ITEM ListHead, PLIST_ITEM Entry)
{
ListHead = RtlListGetHead(ListHead);
ListHead->ListPrev = Entry;
Entry->ListNext = ListHead;
Entry->ListPrev = NULL;
}
VOID RtlListInsertTail(PLIST_ITEM ListHead, PLIST_ITEM Entry)
{
ListHead = RtlListGetTail(ListHead);
ListHead->ListNext = Entry;
Entry->ListNext = NULL;
Entry->ListPrev = ListHead;
}
PLIST_ITEM RtlListRemoveHead(PLIST_ITEM ListHead)
{
PLIST_ITEM OldListHead = RtlListGetHead(ListHead);
ListHead = ListHead->ListNext;
ListHead->ListPrev = NULL;
return OldListHead;
}
PLIST_ITEM RtlListRemoveTail(PLIST_ITEM ListHead)
{
PLIST_ITEM ListTail;
ListTail = RtlListGetTail(ListHead);
ListHead = ListTail->ListPrev;
ListHead->ListNext = NULL;
return ListTail;
}
PLIST_ITEM RtlListGetHead(PLIST_ITEM ListHead)
{
while (ListHead->ListPrev != NULL)
{
ListHead = ListHead->ListPrev;
}
return ListHead;
}
PLIST_ITEM RtlListGetTail(PLIST_ITEM ListHead)
{
while (ListHead->ListNext != NULL)
{
ListHead = ListHead->ListNext;
}
return ListHead;
}
BOOL RtlListIsEmpty(PLIST_ITEM ListHead)
{
if (ListHead == NULL)
{
return TRUE;
}
return (ListHead->ListNext == NULL);
}
ULONG RtlListCountEntries(PLIST_ITEM ListHead)
{
ULONG Count = 0;
while (ListHead != NULL)
{
Count++;
ListHead = ListHead->ListNext;
}
return Count;
}
PLIST_ITEM RtlListGetPrevious(PLIST_ITEM ListEntry)
{
return ListEntry->ListPrev;
}
PLIST_ITEM RtlListGetNext(PLIST_ITEM ListEntry)
{
return ListEntry->ListNext;
}
PLIST_ITEM RtlListRemoveEntry(PLIST_ITEM ListEntry)
{
PLIST_ITEM ListNext = RtlListGetNext(ListEntry);
PLIST_ITEM ListPrev = RtlListGetPrevious(ListEntry);
if (ListPrev != NULL)
{
ListPrev->ListNext = ListNext;
}
if (ListNext != NULL)
{
ListNext->ListPrev = ListPrev;
}
return ListNext;
}
VOID RtlListInsertEntry(PLIST_ITEM InsertAfter, PLIST_ITEM ListEntry)
{
PLIST_ITEM ListNext = RtlListGetNext(InsertAfter);
InsertAfter->ListNext = ListEntry;
ListEntry->ListPrev = InsertAfter;
ListEntry->ListNext = ListNext;
}
VOID RtlListMoveEntryPrevious(PLIST_ITEM ListEntry)
{
PLIST_ITEM ListPrev = RtlListGetPrevious(ListEntry);
if (ListPrev == NULL)
{
return;
}
//
// Move the previous entry after this one
//
RtlListRemoveEntry(ListPrev);
RtlListInsertEntry(ListEntry, ListPrev);
}
VOID RtlListMoveEntryNext(PLIST_ITEM ListEntry)
{
PLIST_ITEM ListNext = RtlListGetNext(ListEntry);
if (ListNext == NULL)
{
return;
}
//
// Move this entry after the next entry
//
RtlListRemoveEntry(ListEntry);
RtlListInsertEntry(ListNext, ListEntry);
}

View File

@@ -1,67 +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.
*/
#include <freeldr.h>
int RtlCompareMemory(const PVOID Source1, const PVOID Source2, ULONG Length)
{
ULONG i;
const PCHAR buffer1 = Source1;
const PCHAR buffer2 = Source2;
for (i=0; i<Length; i++)
{
if(buffer1[i] == buffer2[i])
continue;
else
return (buffer1[i] - buffer2[i]);
}
return 0;
}
VOID RtlCopyMemory(PVOID Destination, const PVOID Source, ULONG Length)
{
ULONG i;
PCHAR buf1 = Destination;
const PCHAR buf2 = Source;
for (i=0; i<Length; i++)
{
buf1[i] = buf2[i];
}
}
VOID RtlFillMemory(PVOID Destination, ULONG Length, UCHAR Fill)
{
ULONG i;
PUCHAR buf1 = Destination;
for (i=0; i<Length; i++)
{
buf1[i] = Fill;
}
}
VOID RtlZeroMemory(PVOID Destination, ULONG Length)
{
RtlFillMemory(Destination, Length, 0);
}

View File

@@ -1,121 +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.
*/
#include <rtl.h>
/*
* print() - prints unformatted text to stdout
*/
void print(char *str)
{
int i;
for(i=0; i<strlen(str); i++)
putchar(str[i]);
}
/*
* printf() - prints formatted text to stdout
* from:
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
*/
void printf(char *format, ... )
{
int *dataptr = (int *) &format;
char c, *ptr, str[16];
dataptr++;
while ((c = *(format++)))
{
if (c != '%')
putchar(c);
else
switch (c = *(format++))
{
case 'd': case 'u': case 'x':
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
ptr = str;
while (*ptr)
putchar(*(ptr++));
break;
case 'c': putchar((*(dataptr++))&0xff); break;
case 's':
ptr = (char *)(*(dataptr++));
while ((c = *(ptr++)))
putchar(c);
break;
}
}
}
void sprintf(char *buffer, char *format, ... )
{
int *dataptr = (int *) &format;
char c, *ptr, str[16];
char *p = buffer;
dataptr++;
while ((c = *(format++)))
{
if (c != '%')
{
*p = c;
p++;
}
else
switch (c = *(format++))
{
case 'd': case 'u': case 'x':
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
ptr = str;
while (*ptr)
{
*p = *(ptr++);
p++;
}
break;
case 'c':
*p = (*(dataptr++))&0xff;
p++;
break;
case 's':
ptr = (char *)(*(dataptr++));
while ((c = *(ptr++)))
{
*p = c;
p++;
}
break;
}
}
*p=0;
}

View File

@@ -1,135 +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.
*/
/*
* convert_to_ascii() - converts a number to it's ascii equivalent
* from:
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
*/
char *convert_to_ascii(char *buf, int c, ...)
{
unsigned long num = *((&c) + 1), mult = 10;
char *ptr = buf;
if (c == 'x')
mult = 16;
if ((num & 0x80000000uL) && c == 'd')
{
num = (~num)+1;
*(ptr++) = '-';
buf++;
}
do
{
int dig = num % mult;
*(ptr++) = ( (dig > 9) ? dig + 'a' - 10 : '0' + dig );
}
while (num /= mult);
/* reorder to correct direction!! */
{
char *ptr1 = ptr-1;
char *ptr2 = buf;
while (ptr1 > ptr2)
{
int c = *ptr1;
*ptr1 = *ptr2;
*ptr2 = c;
ptr1--;
ptr2++;
}
}
return ptr;
}
char *itoa(int value, char *string, int radix)
{
if(radix == 16)
*convert_to_ascii(string, 'x', value) = 0;
else
*convert_to_ascii(string, 'd', value) = 0;
return string;
}
int toupper(int c)
{
if((c >= 'a') && (c <= 'z'))
c -= 32;
return c;
}
int tolower(int c)
{
if((c >= 'A') && (c <= 'Z'))
c += 32;
return c;
}
int atoi(char *string)
{
int base;
int result = 0;
char *str;
if((string[0] == '0') && (string[1] == 'x'))
{
base = 16;
str = string + 2;
}
else
{
base = 10;
str = string;
}
while(1)
{
if((*str < '0') || (*str > '9'))
break;
result *= base;
result += (*str - '0');
str++;
}
return result;
}
int isspace(int c)
{
return(c == ' ' || (c >= 0x09 && c <= 0x0D));
}
int isdigit(int c)
{
return(c >= '0' && c <= '9');
}
int isxdigit(int c)
{
return((c >= '0' && c <= '9')||(c >= 'a' && c <= 'f')||(c >= 'A' && c <= 'F'));
}

View File

@@ -1,152 +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.
*/
#include <rtl.h>
int strlen(char *str)
{
int len;
for(len=0; str[len] != '\0'; len++);
return len;
}
char *strcpy(char *dest, char *src)
{
char *ret = dest;
while(*src)
*dest++ = *src++;
*dest = 0;
return ret;
}
char *strncpy(char *dest, char *src, size_t count)
{
char *ret = dest;
while((*src) && (count--))
*dest++ = *src++;
*dest = 0;
return ret;
}
char *strcat(char *dest, char *src)
{
char *ret = dest;
while(*dest)
dest++;
while(*src)
*dest++ = *src++;
*dest = 0;
return ret;
}
char *strchr(const char *s, int c)
{
char cc = c;
while (*s)
{
if (*s == cc)
return (char *)s;
s++;
}
if (cc == 0)
return (char *)s;
return 0;
}
char *strrchr(const char *s, int c)
{
char cc = c;
const char *sp=(char *)0;
while (*s)
{
if (*s == cc)
sp = s;
s++;
}
if (cc == 0)
sp = s;
return (char *)sp;
}
int strcmp(const char *string1, const char *string2)
{
while(*string1 == *string2)
{
if(*string1 == 0)
return 0;
string1++;
string2++;
}
return *(unsigned const char *)string1 - *(unsigned const char *)(string2);
}
int stricmp(const char *string1, const char *string2)
{
while(tolower(*string1) == tolower(*string2))
{
if(*string1 == 0)
return 0;
string1++;
string2++;
}
return (int)tolower(*string1) - (int)tolower(*string2);
}
int _strnicmp(const char *string1, const char *string2, size_t length)
{
if (length == 0)
return 0;
do
{
if (toupper(*string1) != toupper(*string2++))
return toupper(*(unsigned const char *)string1) - toupper(*(unsigned const char *)--string2);
if (*string1++ == 0)
break;
}
while (--length != 0);
return 0;
}
int strncmp(const char *string1, const char *string2, size_t length)
{
if (length == 0)
return 0;
do
{
if (*string1 != *string2++)
return *(unsigned const char *)string1 - *(unsigned const char *)--string2;
if (*string1++ == 0)
break;
}
while (--length != 0);
return 0;
}

View File

@@ -1,410 +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.
*/
#include <freeldr.h>
#include <rtl.h>
#include <ui.h>
#include <options.h>
#include <mm.h>
typedef struct
{
PUCHAR *MenuItemList;
ULONG MenuItemCount;
LONG MenuTimeRemaining;
ULONG SelectedMenuItem;
ULONG Left;
ULONG Top;
ULONG Right;
ULONG Bottom;
} MENU_INFO, *PMENU_INFO;
VOID CalcMenuBoxSize(PMENU_INFO MenuInfo);
VOID DrawMenu(PMENU_INFO MenuInfo);
VOID DrawMenuBox(PMENU_INFO MenuInfo);
VOID DrawMenuItem(PMENU_INFO MenuInfo, ULONG MenuItemNumber);
ULONG ProcessMenuKeyboardEvent(PMENU_INFO MenuInfo);
extern ULONG nScreenWidth; // Screen Width
extern ULONG nScreenHeight; // Screen Height
extern CHAR cStatusBarFgColor; // Status bar foreground color
extern CHAR cStatusBarBgColor; // Status bar background color
extern CHAR cBackdropFgColor; // Backdrop foreground color
extern CHAR cBackdropBgColor; // Backdrop background color
extern CHAR cBackdropFillStyle; // Backdrop fill style
extern CHAR cTitleBoxFgColor; // Title box foreground color
extern CHAR cTitleBoxBgColor; // Title box background color
extern CHAR cMessageBoxFgColor; // Message box foreground color
extern CHAR cMessageBoxBgColor; // Message box background color
extern CHAR cMenuFgColor; // Menu foreground color
extern CHAR cMenuBgColor; // Menu background color
extern CHAR cTextColor; // Normal text color
extern CHAR cSelectedTextColor; // Selected text color
extern CHAR cSelectedTextBgColor; // Selected text background color
BOOL DisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, PULONG SelectedMenuItem)
{
PUCHAR ScreenBuffer;
MENU_INFO MenuInformation;
ULONG CurrentClockSecond;
//
// The first thing we need to check is the timeout
// If it's zero then don't bother with anything,
// just return the default item
//
if (MenuTimeOut == 0)
{
if (SelectedMenuItem != NULL)
{
*SelectedMenuItem = DefaultMenuItem;
}
return TRUE;
}
//
// Allocate memory to hold screen contents before menu is drawn
//
ScreenBuffer = AllocateMemory(4000);
if (ScreenBuffer == NULL)
{
return FALSE;
}
//
// Save screen contents to our buffer
//
SaveScreen(ScreenBuffer);
//
// Setup the MENU_INFO structure
//
MenuInformation.MenuItemList = MenuItemList;
MenuInformation.MenuItemCount = MenuItemCount;
MenuInformation.MenuTimeRemaining = MenuTimeOut;
MenuInformation.SelectedMenuItem = DefaultMenuItem;
//
// Calculate the size of the menu box
//
CalcMenuBoxSize(&MenuInformation);
//
// Draw the menu
//
DrawMenu(&MenuInformation);
//
// Get the current second of time
//
CurrentClockSecond = getsecond();
//
// Process keys
//
while (1)
{
//
// Process key presses
//
if (ProcessMenuKeyboardEvent(&MenuInformation) == KEY_ENTER)
{
//
// If they pressed enter then exit this loop
//
break;
}
//
// Update the date & time
//
UpdateDateTime();
if (MenuInformation.MenuTimeRemaining > 0)
{
if (getsecond() != CurrentClockSecond)
{
//
// Update the time information
//
CurrentClockSecond = getsecond();
MenuInformation.MenuTimeRemaining--;
//
// Update the menu
//
DrawMenuBox(&MenuInformation);
}
}
else if (MenuInformation.MenuTimeRemaining == 0)
{
//
// A time out occurred, exit this loop and return default OS
//
break;
}
}
//
// Update the selected menu item information
//
if (SelectedMenuItem != NULL)
{
*SelectedMenuItem = MenuInformation.SelectedMenuItem;
}
//
// Restore screen and free the memory
//
RestoreScreen(ScreenBuffer);
FreeMemory(ScreenBuffer);
return TRUE;
}
VOID CalcMenuBoxSize(PMENU_INFO MenuInfo)
{
ULONG Idx;
ULONG Width;
ULONG Height;
ULONG Length;
//
// Height is the menu item count plus 2 (top border & bottom border)
//
Height = MenuInfo->MenuItemCount + 2;
Height -= 1; // Height is zero-based
//
// Find the length of the longest string in the menu
//
Width = 0;
for(Idx=0; Idx<MenuInfo->MenuItemCount; Idx++)
{
Length = strlen(MenuInfo->MenuItemList[Idx]);
if (Length > Width)
{
Width = Length;
}
}
//
// Allow room for left & right borders, plus 8 spaces on each side
//
Width += 18;
//
// Calculate the menu box area
//
MenuInfo->Left = (nScreenWidth - Width) / 2;
MenuInfo->Right = (MenuInfo->Left) + Width;
MenuInfo->Top = (( (nScreenHeight - TITLE_BOX_HEIGHT) - Height) / 2 + 1) + (TITLE_BOX_HEIGHT / 2);
MenuInfo->Bottom = (MenuInfo->Top) + Height;
}
VOID DrawMenu(PMENU_INFO MenuInfo)
{
ULONG Idx;
//
// Draw the menu box
//
DrawMenuBox(MenuInfo);
//
// Draw each line of the menu
//
for (Idx=0; Idx<MenuInfo->MenuItemCount; Idx++)
{
DrawMenuItem(MenuInfo, Idx);
}
}
VOID DrawMenuBox(PMENU_INFO MenuInfo)
{
UCHAR MenuLineText[80];
UCHAR TempString[80];
//
// Update the status bar
//
DrawStatusText(" Use \x18\x19 to select, ENTER to boot.");
//
// Draw the menu box
//
DrawBox(MenuInfo->Left,
MenuInfo->Top,
MenuInfo->Right,
MenuInfo->Bottom,
D_VERT,
D_HORZ,
FALSE, // Filled
TRUE, // Shadow
ATTR(cMenuFgColor, cMenuBgColor));
//
// If there is a timeout draw the time remaining
//
if (MenuInfo->MenuTimeRemaining >= 0)
{
strcpy(MenuLineText, "[ Time Remaining: ");
itoa(MenuInfo->MenuTimeRemaining, TempString, 10);
strcat(MenuLineText, TempString);
strcat(MenuLineText, " ]");
DrawText(MenuInfo->Right - strlen(MenuLineText) - 1,
MenuInfo->Bottom,
MenuLineText,
ATTR(cMenuFgColor, cMenuBgColor));
}
}
VOID DrawMenuItem(PMENU_INFO MenuInfo, ULONG MenuItemNumber)
{
ULONG Idx;
UCHAR MenuLineText[80];
ULONG SpaceTotal;
ULONG SpaceLeft;
ULONG SpaceRight;
//
// We will want the string centered so calculate
// how many spaces will be to the left and right
//
SpaceTotal = (MenuInfo->Right - MenuInfo->Left - 2) - strlen(MenuInfo->MenuItemList[MenuItemNumber]);
SpaceLeft = (SpaceTotal / 2) + 1;
SpaceRight = (SpaceTotal - SpaceLeft) + 1;
//
// Insert the spaces on the left
//
for (Idx=0; Idx<SpaceLeft; Idx++)
{
MenuLineText[Idx] = ' ';
}
MenuLineText[Idx] = '\0';
//
// Now append the text string
//
strcat(MenuLineText, MenuInfo->MenuItemList[MenuItemNumber]);
//
// Now append the spaces on the right
//
for (Idx=0; Idx<SpaceRight; Idx++)
{
strcat(MenuLineText, " ");
}
//
// If this is the selected menu item then draw it as selected
// otherwise just draw it using the normal colors
//
if (MenuItemNumber == MenuInfo->SelectedMenuItem)
{
DrawText(MenuInfo->Left + 1,
MenuInfo->Top + 1 + MenuItemNumber,
MenuLineText,
ATTR(cSelectedTextColor, cSelectedTextBgColor));
}
else
{
DrawText(MenuInfo->Left + 1,
MenuInfo->Top + 1 + MenuItemNumber,
MenuLineText,
ATTR(cTextColor, cMenuBgColor));
}
}
ULONG ProcessMenuKeyboardEvent(PMENU_INFO MenuInfo)
{
ULONG KeyEvent = 0;
//
// Check for a keypress
//
if (kbhit())
{
//
// Cancel the timeout
//
if (MenuInfo->MenuTimeRemaining != -1)
{
MenuInfo->MenuTimeRemaining = -1;
DrawMenuBox(MenuInfo);
}
//
// Get the key
//
KeyEvent = getch();
//
// Is it extended?
//
if (KeyEvent == 0)
KeyEvent = getch(); // Yes - so get the extended key
//
// Process the key
//
switch (KeyEvent)
{
case KEY_UP:
if (MenuInfo->SelectedMenuItem > 0)
{
MenuInfo->SelectedMenuItem--;
//
// Update the menu
//
DrawMenuItem(MenuInfo, MenuInfo->SelectedMenuItem + 1); // Deselect previous item
DrawMenuItem(MenuInfo, MenuInfo->SelectedMenuItem); // Select new item
}
break;
case KEY_DOWN:
if (MenuInfo->SelectedMenuItem < (MenuInfo->MenuItemCount - 1))
{
MenuInfo->SelectedMenuItem++;
//
// Update the menu
//
DrawMenuItem(MenuInfo, MenuInfo->SelectedMenuItem - 1); // Deselect previous item
DrawMenuItem(MenuInfo, MenuInfo->SelectedMenuItem); // Select new item
}
break;
}
}
return KeyEvent;
}

View File

@@ -1,761 +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.
*/
#include <freeldr.h>
#include <rtl.h>
#include <ui.h>
#include <mm.h>
#include <debug.h>
#include <inifile.h>
#include <version.h>
ULONG nScreenWidth = 80; // Screen Width
ULONG nScreenHeight = 25; // Screen Height
CHAR cStatusBarFgColor = COLOR_BLACK; // Status bar foreground color
CHAR cStatusBarBgColor = COLOR_CYAN; // Status bar background color
CHAR cBackdropFgColor = COLOR_WHITE; // Backdrop foreground color
CHAR cBackdropBgColor = COLOR_BLUE; // Backdrop background color
CHAR cBackdropFillStyle = MEDIUM_FILL; // Backdrop fill style
CHAR cTitleBoxFgColor = COLOR_WHITE; // Title box foreground color
CHAR cTitleBoxBgColor = COLOR_RED; // Title box background color
CHAR cMessageBoxFgColor = COLOR_WHITE; // Message box foreground color
CHAR cMessageBoxBgColor = COLOR_BLUE; // Message box background color
CHAR cMenuFgColor = COLOR_WHITE; // Menu foreground color
CHAR cMenuBgColor = COLOR_BLUE; // Menu background color
CHAR cTextColor = COLOR_YELLOW; // Normal text color
CHAR cSelectedTextColor = COLOR_BLACK; // Selected text color
CHAR cSelectedTextBgColor = COLOR_GRAY; // Selected text background color
CHAR szTitleBoxTitleText[260] = "Boot Menu"; // Title box's title text
PUCHAR szMessageBoxLineText = NULL;
BOOL UserInterfaceUp = FALSE; // Tells us if the user interface is displayed
BOOL InitUserInterface(VOID)
{
ULONG SectionId;
UCHAR SettingText[260];
DbgPrint((DPRINT_UI, "Initializing User Interface.\n"));
szMessageBoxLineText = AllocateMemory(4096);
if (szMessageBoxLineText == NULL)
{
return FALSE;
}
DbgPrint((DPRINT_UI, "Reading in UI settings from [Display] section.\n"));
if (IniOpenSection("Display", &SectionId))
{
if (IniReadSettingByName(SectionId, "TitleText", SettingText, 260))
{
strcpy(szTitleBoxTitleText, SettingText);
}
if (IniReadSettingByName(SectionId, "StatusBarColor", SettingText, 260))
{
cStatusBarBgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "StatusBarTextColor", SettingText, 260))
{
cStatusBarFgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "BackdropTextColor", SettingText, 260))
{
cBackdropFgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "BackdropColor", SettingText, 260))
{
cBackdropBgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "BackdropFillStyle", SettingText, 260))
{
cBackdropFillStyle = TextToFillStyle(SettingText);
}
if (IniReadSettingByName(SectionId, "TitleBoxTextColor", SettingText, 260))
{
cTitleBoxFgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "TitleBoxColor", SettingText, 260))
{
cTitleBoxBgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "MessageBoxTextColor", SettingText, 260))
{
cMessageBoxFgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "MessageBoxColor", SettingText, 260))
{
cMessageBoxBgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "MenuTextColor", SettingText, 260))
{
cMenuFgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "MenuColor", SettingText, 260))
{
cMenuBgColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "TextColor", SettingText, 260))
{
cTextColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "SelectedTextColor", SettingText, 260))
{
cSelectedTextColor = TextToColor(SettingText);
}
if (IniReadSettingByName(SectionId, "SelectedColor", SettingText, 260))
{
cSelectedTextBgColor = TextToColor(SettingText);
}
}
clrscr();
hidecursor();
// Draw the backdrop and title box
DrawBackdrop();
UserInterfaceUp = TRUE;
DbgPrint((DPRINT_UI, "InitUserInterface() returning TRUE.\n"));
return TRUE;
}
void DrawBackdrop(void)
{
//
// Fill in the background (excluding title box & status bar)
//
FillArea(0,
TITLE_BOX_HEIGHT,
nScreenWidth - 1,
nScreenHeight - 1,
cBackdropFillStyle,
ATTR(cBackdropFgColor, cBackdropBgColor));
//
// Draw the title box
//
DrawBox(1,
1,
nScreenWidth,
5,
D_VERT,
D_HORZ,
TRUE,
FALSE,
ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
//
// Draw version text
//
DrawText(3,
2,
GetFreeLoaderVersionString(),
ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
//
// Draw copyright
//
DrawText(3,
3,
"by Brian Palmer",
ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
DrawText(3,
4,
"<brianp@sginet.com>",
ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
//
// Draw help text
//
//DrawText(nScreenWidth-15, 4, /*"F1 for Help"*/"F8 for Options", ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
//
// Draw title text
//
DrawText( (nScreenWidth / 2) - (strlen(szTitleBoxTitleText)/2),
3,
szTitleBoxTitleText,
ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
//
// Draw status bar
//
DrawStatusText("");
//
// Update the date & time
//
UpdateDateTime();
}
/*
* FillArea()
* This function assumes coordinates are zero-based
*/
void FillArea(int nLeft, int nTop, int nRight, int nBottom, char cFillChar, char cAttr /* Color Attributes */)
{
char *screen = (char *)SCREEN_MEM;
int i, j;
for(i=nTop; i<=nBottom; i++)
{
for(j=nLeft; j<=nRight; j++)
{
screen[((i*2)*nScreenWidth)+(j*2)] = cFillChar;
screen[((i*2)*nScreenWidth)+(j*2)+1] = cAttr;
}
}
}
/*
* DrawShadow()
* This function assumes coordinates are zero-based
*/
void DrawShadow(int nLeft, int nTop, int nRight, int nBottom)
{
char *screen = (char *)SCREEN_MEM;
int i;
// Shade the bottom of the area
if(nBottom < (nScreenHeight-1))
{
for(i=nLeft+2; i<=nRight; i++)
screen[(((nBottom+1)*2)*nScreenWidth)+(i*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
// Shade the right of the area
if(nRight < (nScreenWidth-1))
{
for(i=nTop+1; i<=nBottom; i++)
screen[((i*2)*nScreenWidth)+((nRight+1)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
if(nRight+1 < (nScreenWidth-1))
{
for(i=nTop+1; i<=nBottom; i++)
screen[((i*2)*nScreenWidth)+((nRight+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
// Shade the bottom right corner
if((nRight < (nScreenWidth-1)) && (nBottom < (nScreenHeight-1)))
screen[(((nBottom+1)*2)*nScreenWidth)+((nRight+1)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
if((nRight+1 < (nScreenWidth-1)) && (nBottom < (nScreenHeight-1)))
screen[(((nBottom+1)*2)*nScreenWidth)+((nRight+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
/*
* DrawBox()
* This function assumes coordinates are one-based
*/
void DrawBox(int nLeft, int nTop, int nRight, int nBottom, int nVertStyle, int nHorzStyle, int bFill, int bShadow, char cAttr)
{
char cULCorner, cURCorner, cLLCorner, cLRCorner;
char cHorz, cVert;
nLeft--;
nTop--;
nRight--;
nBottom--;
cHorz = nHorzStyle;
cVert = nVertStyle;
if(nHorzStyle == HORZ)
{
if(nVertStyle == VERT)
{
cULCorner = UL;
cURCorner = UR;
cLLCorner = LL;
cLRCorner = LR;
}
else // nVertStyle == D_VERT
{
cULCorner = VD_UL;
cURCorner = VD_UR;
cLLCorner = VD_LL;
cLRCorner = VD_LR;
}
}
else // nHorzStyle == D_HORZ
{
if(nVertStyle == VERT)
{
cULCorner = HD_UL;
cURCorner = HD_UR;
cLLCorner = HD_LL;
cLRCorner = HD_LR;
}
else // nVertStyle == D_VERT
{
cULCorner = D_UL;
cURCorner = D_UR;
cLLCorner = D_LL;
cLRCorner = D_LR;
}
}
// Fill in box background
if(bFill)
FillArea(nLeft, nTop, nRight, nBottom, ' ', cAttr);
// Fill in corners
FillArea(nLeft, nTop, nLeft, nTop, cULCorner, cAttr);
FillArea(nRight, nTop, nRight, nTop, cURCorner, cAttr);
FillArea(nLeft, nBottom, nLeft, nBottom, cLLCorner, cAttr);
FillArea(nRight, nBottom, nRight, nBottom, cLRCorner, cAttr);
// Fill in left line
FillArea(nLeft, nTop+1, nLeft, nBottom-1, cVert, cAttr);
// Fill in top line
FillArea(nLeft+1, nTop, nRight-1, nTop, cHorz, cAttr);
// Fill in right line
FillArea(nRight, nTop+1, nRight, nBottom-1, cVert, cAttr);
// Fill in bottom line
FillArea(nLeft+1, nBottom, nRight-1, nBottom, cHorz, cAttr);
if(bShadow)
DrawShadow(nLeft, nTop, nRight, nBottom);
}
/*
* DrawText()
* This function assumes coordinates are one-based
*/
void DrawText(int nX, int nY, char *text, char cAttr)
{
char *screen = (char *)SCREEN_MEM;
int i, j;
nX--;
nY--;
// Draw the text
for(i=nX, j=0; text[j]; i++,j++)
{
screen[((nY*2)*nScreenWidth)+(i*2)] = text[j];
screen[((nY*2)*nScreenWidth)+(i*2)+1] = cAttr;
}
}
void DrawStatusText(char *text)
{
int i;
DrawText(1, nScreenHeight, text, ATTR(cStatusBarFgColor, cStatusBarBgColor));
for(i=strlen(text)+1; i<=nScreenWidth; i++)
DrawText(i, nScreenHeight, " ", ATTR(cStatusBarFgColor, cStatusBarBgColor));
}
void UpdateDateTime(void)
{
char date[40];
char time[40];
char temp[20];
int hour, minute, second, bPM=FALSE;
switch(getmonth())
{
case 1:
strcpy(date, "January ");
break;
case 2:
strcpy(date, "February ");
break;
case 3:
strcpy(date, "March ");
break;
case 4:
strcpy(date, "April ");
break;
case 5:
strcpy(date, "May ");
break;
case 6:
strcpy(date, "June ");
break;
case 7:
strcpy(date, "July ");
break;
case 8:
strcpy(date, "August ");
break;
case 9:
strcpy(date, "September ");
break;
case 10:
strcpy(date, "October ");
break;
case 11:
strcpy(date, "November ");
break;
case 12:
strcpy(date, "December ");
break;
}
itoa(getday(), temp, 10);
if((getday() == 1) || (getday() == 21) || (getday() == 31))
strcat(temp, "st");
else if((getday() == 2) || (getday() == 22))
strcat(temp, "nd");
else if((getday() == 3) || (getday() == 23))
strcat(temp, "rd");
else
strcat(temp, "th");
strcat(date, temp);
strcat(date, " ");
itoa(getyear(), temp, 10);
strcat(date, temp);
// Draw the date
DrawText(nScreenWidth-strlen(date)-1, 2, date, ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
hour = gethour();
if(hour > 12)
{
hour -= 12;
bPM = TRUE;
}
if (hour == 0)
hour = 12;
minute = getminute();
second = getsecond();
itoa(hour, temp, 10);
strcpy(time, " ");
strcat(time, temp);
strcat(time, ":");
itoa(minute, temp, 10);
if(minute < 10)
strcat(time, "0");
strcat(time, temp);
strcat(time, ":");
itoa(second, temp, 10);
if(second < 10)
strcat(time, "0");
strcat(time, temp);
if(bPM)
strcat(time, " PM");
else
strcat(time, " AM");
// Draw the time
DrawText(nScreenWidth-strlen(time)-1, 3, time, ATTR(cTitleBoxFgColor, cTitleBoxBgColor));
}
void SaveScreen(char *buffer)
{
char *screen = (char *)SCREEN_MEM;
int i;
for(i=0; i < (nScreenWidth * nScreenHeight * 2); i++)
buffer[i] = screen[i];
}
void RestoreScreen(char *buffer)
{
char *screen = (char *)SCREEN_MEM;
int i;
for(i=0; i < (nScreenWidth * nScreenHeight * 2); i++)
screen[i] = buffer[i];
}
void MessageBox(char *text)
{
int width = 8;
int height = 1;
int curline = 0;
int i , j, k;
int x1, x2, y1, y2;
PVOID savebuffer;
char temp[260];
char key;
if (!UserInterfaceUp)
{
printf("%s%s", szMessageBoxLineText, text);
printf("Press any key.\n");
getch();
return;
}
savebuffer = AllocateMemory(8000);
SaveScreen(savebuffer);
strcat(szMessageBoxLineText, text);
// Find the height
for(i=0; i<strlen(szMessageBoxLineText); i++)
{
if(szMessageBoxLineText[i] == '\n')
height++;
}
// Find the width
for(i=0,j=0,k=0; i<height; i++)
{
while((szMessageBoxLineText[j] != '\n') && (szMessageBoxLineText[j] != 0))
{
j++;
k++;
}
if(k > width)
width = k;
k = 0;
j++;
}
// Calculate box area
x1 = (nScreenWidth - (width+2))/2;
x2 = x1 + width + 3;
y1 = ((nScreenHeight - height - 2)/2) + 1;
y2 = y1 + height + 4;
// Draw the box
DrawBox(x1, y1, x2, y2, D_VERT, D_HORZ, TRUE, TRUE, ATTR(cMessageBoxFgColor, cMessageBoxBgColor));
// Draw the text
for(i=0,j=0; i<strlen(szMessageBoxLineText)+1; i++)
{
if((szMessageBoxLineText[i] == '\n') || (szMessageBoxLineText[i] == 0))
{
temp[j] = 0;
j = 0;
DrawText(x1+2, y1+1+curline, temp, ATTR(cMessageBoxFgColor, cMessageBoxBgColor));
curline++;
}
else
temp[j++] = szMessageBoxLineText[i];
}
// Draw OK button
strcpy(temp, " OK ");
DrawText(x1+((x2-x1)/2)-3, y2-2, temp, ATTR(COLOR_BLACK, COLOR_GRAY));
for(;;)
{
if(kbhit())
{
key = getch();
if(key == KEY_EXTENDED)
key = getch();
if(key == KEY_ENTER)
break;
else if(key == KEY_SPACE)
break;
}
UpdateDateTime();
}
RestoreScreen(savebuffer);
FreeMemory(savebuffer);
UpdateDateTime();
strcpy(szMessageBoxLineText, "");
}
void MessageLine(char *text)
{
strcat(szMessageBoxLineText, text);
strcat(szMessageBoxLineText, "\n");
}
BOOL IsValidColor(char *color)
{
if(stricmp(color, "Black") == 0)
return TRUE;
else if(stricmp(color, "Blue") == 0)
return TRUE;
else if(stricmp(color, "Green") == 0)
return TRUE;
else if(stricmp(color, "Cyan") == 0)
return TRUE;
else if(stricmp(color, "Red") == 0)
return TRUE;
else if(stricmp(color, "Magenta") == 0)
return TRUE;
else if(stricmp(color, "Brown") == 0)
return TRUE;
else if(stricmp(color, "Gray") == 0)
return TRUE;
else if(stricmp(color, "DarkGray") == 0)
return TRUE;
else if(stricmp(color, "LightBlue") == 0)
return TRUE;
else if(stricmp(color, "LightGreen") == 0)
return TRUE;
else if(stricmp(color, "LightCyan") == 0)
return TRUE;
else if(stricmp(color, "LightRed") == 0)
return TRUE;
else if(stricmp(color, "LightMagenta") == 0)
return TRUE;
else if(stricmp(color, "Yellow") == 0)
return TRUE;
else if(stricmp(color, "White") == 0)
return TRUE;
return FALSE;
}
char TextToColor(char *color)
{
if(stricmp(color, "Black") == 0)
return COLOR_BLACK;
else if(stricmp(color, "Blue") == 0)
return COLOR_BLUE;
else if(stricmp(color, "Green") == 0)
return COLOR_GREEN;
else if(stricmp(color, "Cyan") == 0)
return COLOR_CYAN;
else if(stricmp(color, "Red") == 0)
return COLOR_RED;
else if(stricmp(color, "Magenta") == 0)
return COLOR_MAGENTA;
else if(stricmp(color, "Brown") == 0)
return COLOR_BROWN;
else if(stricmp(color, "Gray") == 0)
return COLOR_GRAY;
else if(stricmp(color, "DarkGray") == 0)
return COLOR_DARKGRAY;
else if(stricmp(color, "LightBlue") == 0)
return COLOR_LIGHTBLUE;
else if(stricmp(color, "LightGreen") == 0)
return COLOR_LIGHTGREEN;
else if(stricmp(color, "LightCyan") == 0)
return COLOR_LIGHTCYAN;
else if(stricmp(color, "LightRed") == 0)
return COLOR_LIGHTRED;
else if(stricmp(color, "LightMagenta") == 0)
return COLOR_LIGHTMAGENTA;
else if(stricmp(color, "Yellow") == 0)
return COLOR_YELLOW;
else if(stricmp(color, "White") == 0)
return COLOR_WHITE;
return COLOR_BLACK;
}
BOOL IsValidFillStyle(char *fill)
{
if(stricmp(fill, "Light") == 0)
return TRUE;
else if(stricmp(fill, "Medium") == 0)
return TRUE;
else if(stricmp(fill, "Dark") == 0)
return TRUE;
return FALSE;
}
char TextToFillStyle(char *fill)
{
if(stricmp(fill, "Light") == 0)
return LIGHT_FILL;
else if(stricmp(fill, "Medium") == 0)
return MEDIUM_FILL;
else if(stricmp(fill, "Dark") == 0)
return DARK_FILL;
return LIGHT_FILL;
}
void DrawProgressBar(int nPos)
{
int left, top, right, bottom;
int width = 50; // Allow for 50 "bars"
int height = 2;
int i;
if(nPos > 100)
nPos = 100;
left = (nScreenWidth - width - 4) / 2;
right = left + width + 3;
top = (nScreenHeight - height - 2) / 2;
top += 4;
bottom = top + height + 1;
// Draw the box
DrawBox(left, top, right, bottom, VERT, HORZ, TRUE, TRUE, ATTR(cMenuFgColor, cMenuBgColor));
// Draw the "Loading..." text
DrawText(70/2, top+1, "Loading...", ATTR(cTextColor, cMenuBgColor));
// Draw the percent complete
for(i=0; i<(nPos/2); i++)
DrawText(left+2+i, top+2, "\xDB", ATTR(cTextColor, cMenuBgColor));
// Draw the rest
for(; i<50; i++)
DrawText(left+2+i, top+2, "\xB2", ATTR(cTextColor, cMenuBgColor));
UpdateDateTime();
}
void ShowMessageBoxesInSection(PUCHAR SectionName)
{
ULONG Idx;
UCHAR SettingName[80];
UCHAR SettingValue[80];
ULONG SectionId;
//
// Zero out message line text
//
strcpy(szMessageBoxLineText, "");
if (!IniOpenSection(SectionName, &SectionId))
{
sprintf(SettingName, "Section %s not found in freeldr.ini.\n", SectionName);
MessageBox(SettingName);
return;
}
//
// Find all the message box settings and run them
//
for (Idx=0; Idx<IniGetNumSectionItems(SectionId); Idx++)
{
IniReadSettingByNumber(SectionId, Idx, SettingName, 80, SettingValue, 80);
if (stricmp(SettingName, "MessageBox") == 0)
{
MessageBox(SettingValue);
}
else if (stricmp(SettingName, "MessageLine") == 0)
{
MessageLine(SettingValue);
}
}
//
// Zero out message line text
//
strcpy(szMessageBoxLineText, "");
}

View File

@@ -1,38 +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.
*/
#include <freeldr.h>
#include <version.h>
#include <rtl.h>
UCHAR FreeLoaderVersionString[80];
PUCHAR GetFreeLoaderVersionString(VOID)
{
if (FREELOADER_PATCH_VERSION == 0)
{
sprintf(FreeLoaderVersionString, "FreeLoader v%d.%d", FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION);
}
else
{
sprintf(FreeLoaderVersionString, "FreeLoader v%d.%d.%d", FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION, FREELOADER_PATCH_VERSION);
}
return FreeLoaderVersionString;
}

View File

@@ -1,49 +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.
#
export CC = gcc
export LD = ld
export AR = ar
export RM = cmd /C del
export CP = cmd /C copy
export NASM = nasm
export MAKE = make
FLAGS = -Wall
OBJS = install.o volume.o
LIBS = -lkernel32
.PHONY : clean
all: install.exe
install.exe: $(OBJS)
$(CC) $(FLAGS) -o install.exe $(OBJS)
install.o: install.c install.h volume.h
$(CC) $(FLAGS) -o install.o -c install.c
volume.o: volume.c volume.h install.h
$(CC) $(FLAGS) -o volume.o -c volume.c
clean:

View File

@@ -1,189 +0,0 @@
/*
* FreeLoader - install.c
*
* Copyright (C) 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.
*/
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include "install.h"
#include "volume.h"
#include "../bootsect/fat.h"
#include "../bootsect/fat32.h"
BOOL BackupBootSector(LPCTSTR lpszVolumeName);
BOOL InstallBootSector(LPCTSTR lpszVolumeType);
int main(int argc, char *argv[])
{
if (argc < 3)
{
_tprintf(_T("syntax: install x: [fs_type]\nwhere fs_type is fat or fat32\n"));
return -1;
}
if (!OpenVolume(argv[1]))
{
return -1;
}
BackupBootSector(argv[1]);
InstallBootSector(argv[2]);
_tprintf(_T("You must now copy freeldr.sys & freeldr.ini to %s.\n"), argv[1]);
CloseVolume();
return 0;
}
BOOL BackupBootSector(LPCTSTR lpszVolumeName)
{
HANDLE hBackupFile;
TCHAR szFileName[MAX_PATH];
ULONG Count;
BYTE BootSectorBuffer[512];
DWORD dwNumberOfBytesWritten;
BOOL bRetVal;
//
// Find the next unused filename and open it
//
for (Count=0; ; Count++)
{
//
// Generate the next filename
//
_stprintf(szFileName, _T("%s\\bootsect.%03d"), lpszVolumeName, Count);
//
// Try to create a new file, fail if exists
//
hBackupFile = CreateFile(szFileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, /*FILE_ATTRIBUTE_SYSTEM*/0, NULL);
//
// Check to see if it worked
//
if (hBackupFile != INVALID_HANDLE_VALUE)
{
break;
}
//
// Nope, didn't work
// Check to see if it already existed
//
if (!(GetLastError() != ERROR_ALREADY_EXISTS))
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("Boot sector backup failed. Error code %d.\n"), GetLastError());
return FALSE;
}
}
//
// Try to read the boot sector
//
if (!ReadVolumeSector(0, BootSectorBuffer))
{
CloseHandle(hBackupFile);
return FALSE;
}
//
// Try to write the boot sector data to the file
//
bRetVal = WriteFile(hBackupFile, BootSectorBuffer, 512, &dwNumberOfBytesWritten, NULL);
if (!bRetVal || (dwNumberOfBytesWritten != 512))
{
CloseHandle(hBackupFile);
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("WriteFile() failed. Error code %d.\n"), GetLastError());
return FALSE;
}
_tprintf(_T("Boot sector backed up to file: %s\n"), szFileName);
CloseHandle(hBackupFile);
return TRUE;
}
BOOL InstallBootSector(LPCTSTR lpszVolumeType)
{
BYTE BootSectorBuffer[512];
//
// Read in the old boot sector
//
if (!ReadVolumeSector(0, BootSectorBuffer))
{
return FALSE;
}
if (_tcsicmp(lpszVolumeType, _T("fat")) == 0)
{
//
// Update the BPB in the new boot sector
//
memcpy((fat_data+3), (BootSectorBuffer+3), 59 /*fat BPB length*/);
//
// Write out new boot sector
//
if (!WriteVolumeSector(0, fat_data))
{
return FALSE;
}
}
else if (_tcsicmp(lpszVolumeType, _T("fat32")) == 0)
{
//
// Update the BPB in the new boot sector
//
memcpy((fat32_data+3), (BootSectorBuffer+3), 87 /*fat32 BPB length*/);
//
// Write out new boot sector
//
if (!WriteVolumeSector(0, fat32_data))
{
return FALSE;
}
//
// Write out new extra sector
//
if (!WriteVolumeSector(14, (fat_data+512) ))
{
return FALSE;
}
}
else
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("File system type %s unknown.\n"), lpszVolumeType);
return FALSE;
}
_tprintf(_T("%s boot sector installed.\n"), lpszVolumeType);
return TRUE;
}

View File

@@ -1,24 +0,0 @@
/*
* FreeLoader - install.h
*
* Copyright (C) 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.
*/
#ifndef __INSTALL_H
#define __INSTALL_H
#endif // defined __INSTALL_H

View File

@@ -1,135 +0,0 @@
/*
* FreeLoader - volume.c
*
* Copyright (C) 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.
*/
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include "volume.h"
static HANDLE hDiskVolume = NULL;
BOOL OpenVolume(LPCTSTR lpszVolumeName)
{
TCHAR RealVolumeName[MAX_PATH];
//
// If they passed in a drive letter (e.g. "A:")
// then try to open the physical device volume,
// otherwise we will assume it is a disk image
// file they are writing to. (not fully supported yet)
//
if ((_tcslen(lpszVolumeName) == 2) && (lpszVolumeName[1] == _T(':')))
{
_tcscpy(RealVolumeName, _T("\\\\.\\"));
_tcscat(RealVolumeName, lpszVolumeName);
}
else
{
_tcscpy(RealVolumeName, lpszVolumeName);
}
_tprintf(_T("Opening volume \'%s\'\n"), lpszVolumeName);
hDiskVolume = CreateFile(RealVolumeName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
if (hDiskVolume == INVALID_HANDLE_VALUE)
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("Failed. Error code %d.\n"), GetLastError());
return FALSE;
}
return TRUE;
}
void CloseVolume(void)
{
CloseHandle(hDiskVolume);
}
BOOL ReadVolumeSector(ULONG SectorNumber, PVOID SectorBuffer)
{
DWORD dwNumberOfBytesRead;
DWORD dwFilePosition;
BOOL bRetVal;
//
// FIXME: this doesn't seem to handle the situation
// properly when SectorNumber is bigger than the
// amount of sectors on the disk. Seems to me that
// the call to SetFilePointer() should just give an
// out of bounds error or something but it doesn't.
//
dwFilePosition = SetFilePointer(hDiskVolume, (SectorNumber * 512), NULL, FILE_BEGIN);
if (dwFilePosition != (SectorNumber * 512))
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("SetFilePointer() failed. Error code %d.\n"), GetLastError());
return FALSE;
}
bRetVal = ReadFile(hDiskVolume, SectorBuffer, 512, &dwNumberOfBytesRead, NULL);
if (!bRetVal || (dwNumberOfBytesRead != 512))
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("ReadFile() failed. Error code %d.\n"), GetLastError());
return FALSE;
}
return TRUE;
}
BOOL WriteVolumeSector(ULONG SectorNumber, PVOID SectorBuffer)
{
DWORD dwNumberOfBytesWritten;
DWORD dwFilePosition;
BOOL bRetVal;
//
// FIXME: this doesn't seem to handle the situation
// properly when SectorNumber is bigger than the
// amount of sectors on the disk. Seems to me that
// the call to SetFilePointer() should just give an
// out of bounds error or something but it doesn't.
//
dwFilePosition = SetFilePointer(hDiskVolume, (SectorNumber * 512), NULL, FILE_BEGIN);
if (dwFilePosition != (SectorNumber * 512))
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("SetFilePointer() failed. Error code %d.\n"), GetLastError());
return FALSE;
}
bRetVal = WriteFile(hDiskVolume, SectorBuffer, 512, &dwNumberOfBytesWritten, NULL);
if (!bRetVal || (dwNumberOfBytesWritten != 512))
{
_tprintf(_T("%s:%d: "), __FILE__, __LINE__);
_tprintf(_T("WriteFile() failed. Error code %d.\n"), GetLastError());
return FALSE;
}
return TRUE;
}

View File

@@ -1,29 +0,0 @@
/*
* FreeLoader - volume.h
*
* Copyright (C) 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.
*/
#ifndef __VOLUME_H
#define __VOLUME_H
BOOL OpenVolume(LPCTSTR lpszVolumeName);
void CloseVolume(void);
BOOL ReadVolumeSector(ULONG SectorNumber, PVOID SectorBuffer);
BOOL WriteVolumeSector(ULONG SectorNumber, PVOID SectorBuffer);
#endif // defined __VOLUME_H

View File

@@ -1,50 +0,0 @@
FreeLoader notes
To build FreeLoader you will need DJGPP because Mingw32 doesn't support 16-bit code
ext2 filesystem support needs to be added.
The MessageBox() function needs to not allocate memory. Because it gets called when memory allocation fails.
Memory layout:
0000:0000 - 0000:0FFF: Interrupt vector table & BIOS data
0000:1000 - 0000:6FFF: Real mode stack area
0000:7000 - 0000:7FFF: Unused
0000:8000 - xxxx:xxxx: FreeLoader program & data area
xxxx:xxxx - 7000:7FFF: Random memory allocation heap
7000:8000 - 7000:FFFF: Protected mode stack area
8000:0000 - 8000:FFFF: File system read buffer
9000:0000 - 9000:FFFF: Disk read buffer for BIOS Int 13h
A000:0000 - FFFF:FFFF: reserved
FreeLoader Boot Process
FAT 12/16/32 Boot Sector
The BIOS loads the boot sector at 0000:7C00. The FAT32 boot sector
relocates itself higher in memory at 9000:0000 and loads it's extra sector
at 9000:0200 and then looks for freeldr.sys on the file system. Once found
it loads freeldr.sys to 0000:7E00 and then jumps to it's entry point at
0000:8000. The FAT12/16 boot sector does no relocation, it just searches for
the freeldr.sys and loads the first 512 bytes to 0000:7E00. This extra code
enables it to fully navigate the file allocation table. Then it loads
freeldr.sys to 0000:7E00 and jumps to it's entry point at 0000:8000. Before
FreeLoader gets control the boot sector saves the screen contents to a buffer
at 9000:8000 and the cursor x & y position to bytes at 9000:8FA0 & 9000:8FA1
respectively.
ISO-9660 (CD-ROM) Boot Sector
The BIOS loads the boot sector (2048 bytes) at 0000:7C00. First, the
boot sector relocates itself to 0000:7000 (up to 0000:7800). Then it looks
for the I386 directory and makes it the current directory. Next it looks for
FREELDR.SYS and loads it at 0000:8000. Finally it restores the boot drive
number in the DL register and jumps to FreeLoader's entry point at 0000:8000.
FreeLoader Initialization
When FreeLoader gets control it saves the boot drive, passed to it in
the DL register, and sets up the stack, enables protected mode, and calls
BootMain().

View File

@@ -1,85 +0,0 @@
/* Copyright (C) 2000 CW Sandmann (sandmann@clio.rice.edu) 1206 Braelinn, Sugar Land, TX 77479 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#ifdef GO32
#include <unistd.h>
#else
#include <io.h>
#endif
char view_only = 0;
const char *client_patch_code;
char buffer[20480];
unsigned long search_base = 0x4c800L;
int f;
char oldpatch[] = {0x3b, 0x05, 0xac, 0xe6 };
char newpatch[] = {0x3b, 0x05, 0x58, 0x5e };
void patch_image(char *filename)
{
int i,size;
view_only = 0;
f = open(filename, O_RDWR | O_BINARY);
if (f < 0) {
f = open(filename, O_RDONLY | O_BINARY);
if (f < 0) {
perror(filename);
return;
}
view_only = 1;
}
lseek(f, search_base, SEEK_SET);
size = read(f, buffer, sizeof(buffer));
client_patch_code = NULL;
for(i=0; i<size && !client_patch_code; i++)
if(!memcmp(buffer+i,oldpatch,sizeof(oldpatch)))
client_patch_code = (buffer+i);
if(!client_patch_code) {
printf("Old patch string not found in %s!\n",filename);
} else {
lseek(f, search_base+i-1, SEEK_SET); /* Ready to update */
if(!view_only) {
write(f, newpatch, sizeof(newpatch));
printf("%s patched\n",filename);
} else
printf("%s patchable (not changed, readonly)\n",filename);
}
close(f);
return;
}
int main(int argc, char **argv)
{
int i;
char filename[256];
char buf1[256];
char file2[256];
if (argc != 1) { /* If they specify names, patch them, exit */
for(i=1; i<argc; i++)
patch_image(argv[i]);
return 0;
}
fprintf(stderr, "This image patches Windows 2000 NTVDM to fix nesting DPMI bug.\n");
strcpy(filename,getenv("SYSTEMROOT"));
strcpy(file2,filename);
strcat(filename,"\\system32\\ntvdm.exe");
strcat(file2,"\\system32\\dllcache\\ntvdm.exe");
sprintf(buf1,"copy %s %s\\system32\\ntvdm.ori",filename,getenv("SYSTEMROOT"));
printf("%s\n",buf1);
system(buf1);
patch_image(file2);
patch_image(filename);
return 0;
}

Binary file not shown.

View File

@@ -1,18 +0,0 @@
Perform at your own risk.
Directions for patching NTVDM on Windows 2000
1) Start a Command Prompt Window
2) Start Task Manager. Sort by Name. If NTVDM.EXE is a task End Process.
3) Execute NTVDMPAT.EXE from this ZIP file.
Notes:
With no arguments the executable patches both the DLLCACHE (for system file
protection) and the version in SYSTEM32. The image is a Win32 executable
(launching a DJGPP image will require NTVDM, locking the DLL so it can't
be patched). It saves the old version into NTVDM.ORI if you want to go
back. If you specify arguments on the command line it will patch the
executables you specify instead of automating the process (if you want to
do the archives/patches/moves yourself). Good luck.
Source included if you want to hack your own version.

Binary file not shown.

View File

@@ -1,32 +0,0 @@
# $Id: Makefile,v 1.1 2002/03/23 19:23:27 robertk Exp $
#
# To run it in Win32 console mode, undefine __SUBSYSTEM_WINDOWS__
# and pass "console" in the ld's --subsystem option.
#
#
PATH_TO_TOP=../../../..
PATH_TO_OS2_TOP=../..
TARGET_NAME=bepslep
CFLAGS=-D__SUBSYSTEM_WINDOWS__
OBJECTS=$(TARGET_NAME).o
LIBRARIES=\
$(PATH_TO_OS2_TOP)/dll/doscalls.dll
$(TARGET_NAME): $(OBJECTS) $(LIBRARIES)
$(CC) \
$(CFLAGS) \
$(OBJECTS) \
$(LIBRARIES)\
-o $@ \
-Wl,--subsystem,windows\
-nostartfiles \
-nostdlib
include $(PATH_TO_TOP)/rules.mak
# EOF

View File

@@ -1,19 +0,0 @@
#include "../../dll/doscalls/doscalls.h"
void Eingang()
{
DosBeep(3000,300);
DosSleep(1000);
DosBeep(4000,200);
DosExit(0,0);
}
void WinMainCRTStartup()
{
int a, b;
a= b+3;
b=a+3;
Eingang();
}

View File

@@ -1,50 +0,0 @@
Win32 and os2ss sight to the system partition
+C < contains under os2ss a autogenerated config.sys
|
+-ROS
+-NATIVE < NTDLL, ntoskrnl, hal.dll, csrss.exe os2.exe psx.exe ...
| +-DRIVERS < *.SYS
| +-CONFIG < registry
+-WIN32
| +-SYSTEM < user32.dll kernel32.dll ...
| +-FONTS
| +...
+-OS2
| +-DLL < doscalls.dll ....
| +-SYSTEM
| +-...
+-PSX
+-etc < mountpoint for posix apps
+-bin
+-dev
+-lib < posix.dll
+-tmp
+-var
+-mnt < empty
posix sight to the system partition
/
+-etc < mountpoint for posix apps
+-bin
+-dev < link to OB-mans Devices
+-lib < posix.dll
+-tmp < alias to systemtemp
+-var
+-mnt
+-C < win32-driveletters
| |
| +-ROS
| +-NATIVE < NTDLL, ntoskrnl, hal.dll, csrss.exe os2.exe psx.exe ...
| | +-DRIVERS < *.SYS
| | +-CONFIG < registry
| +-WIN32
| | +-SYSTEM < user32.dll kernel32.dll ...
| | +-FONTS
| | +...
| +-OS2 <some apps
| | +-DLL < doscalls.dll ....
| | +-SYSTEM
| | +-...
| +-PSX < empty
+-D
+-E...

View File

@@ -1,67 +0,0 @@
<html>
<head>
<title>OS/2 subsystem for ReactOS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h1><b>OS/2 subsystem for ReactOS (ROS/2)</b></h1>
<h2><font color="#009966">Introduction</font></h2>
<p>The OS/2 subsystem is being developed to enable NT-like systems (like WinNT
and ReactOS) to run 32-Bit OS/2 applications natively. With this it shall provide
binary compatiblility on x86-Based systems. It is intended to port the ROS/2
also to other platforms supported by ReactOS / NT. It is planned to provide
source code compatibility on these platforms. Yeeahh, OS/2 for PowerPC is in
sight.</p>
<h2><font color="#009966">Components</font></h2>
<p>ROS/2 consists of the following components:</p>
<ul>
<li>OS2SS.EXE - A native application that implements the personality of the
OS/2 kernel.</li>
<li>OS2.EXE - A win32 application that does the interaction of the OS/2 apps
with the desktop.</li>
<li>Core DLLs - These DLLs that make OS/2 programs interface with the kernel/sub
system (i.E. DOSCALLS.DLL). </li>
<li>Additional DLLs - DLLs that provide additional APIs for OS/2 apps. This
includes Presentation Manager.</li>
</ul>
<h2><font color="#009966">Current state</font></h2>
<p>Up to now just a fragment of DOSCALLS.DLL exists. The biggest problem are the
os2 API headers which are (C) by IBM. So help is still welcome.</p>
<h2><font color="#009966">16-Bit issues</font></h2>
<p>It is not intended to support 16-bit OS/2 applications. This would make the
system inconsistent and produce much more work that use. But there is still
one issue: Current textmode applications are either 16-bit or use thunking to
call the 16-bit APIs. These 32-Bit thunking applications have to be supported.
We are still thinking how to accomplish that. </p>
<h2><font color="#009966">32-Bit issues</font></h2>
<p>It is planned to replace the current MOU- KBD- MSG- and VIO- subsystems with
the <a href="http://homepages.tesco.net/%7EJ.deBoynePollard/Softwares/conapi.html">Unicode
Console API</a>. This is also the foundation for other platforms we want to
provide source code compatibility with. So nearly every 32-Bit processor can
be supported. It sould even be possible to implement a 64-bit OS/2 API.</p>
<h2><font color="#009966">Architecture</font></h2>
<p>To understand the architecture of ReactOS or WinNT read a book from the &quot;Inside
Windows NT&quot;-series. The architecture of ROS/2 is like every normal subsystem.
When OS2SS.EXE starts, it creates an object directory named os2 and therein
it creates a port object with the name Os2API. A port is something like a socket.
Two programs can comunicate with each other via a port. The port Os2API provides
the LPC API of the OS2SS.EXE - the actual subsystem. <br>
Every OS/2 program that is loaded, is linked with DOSCALLS.DLL and NTDLL.DLL
- the interface to the NT-kernel. Since DOSCALLS is implemented using NTDLL.DLL,
every OS/2 app has it in its adress space. Many functions in DOSCALLS.DLL are
implemented by just wrapping NTDLL.DLL functions. Some functions however need
assistance by the subsystem. For this reason the app makes an LPC to OS2SS.EXE.
LPC means local procedure call and it is a very fast version of RPC. Together
with the first application also OS2.EXE starts up. OS2.EXE runs in the win32
subsystem with the security of the current user. OS2.EXE is used to gather keyboard
and mouse input and to show console windows and PM-windows of all OS/2 programms
of the current user. In order to accomplish this OS2.EXE creates a port object
in the os2 object directory named Os2Interact. OS/2 applications have a connection
to OS2.EXE, too. OS2SS.EXE and OS2.EXE also talk to each other. An OS/2 application
then makes LPCs either to OS2.EXE directly or if required via OS2SS.EXE.</p>
<p>Details</p>
<p>&nbsp;</p>
<p>LPC Documentation</p>
</body>
</html>

View File

@@ -1,23 +0,0 @@
; $Id: doscalls.def,v 1.3 2002/03/24 18:55:38 ea Exp $
;
; Def for doscalls.dll - part of the OS/2-sub system
; for ReactOS. Provides Access to OS/2 kernel services.
LIBRARY doscalls.dll
DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services to OS/2-apps"
EXPORTS
; FIXME: fill in all exports
Dos32Sleep@4 @229
Dos32Close@4 @257
Dos32Open@32 @273
Dos32Read@16 @281
Dos32Write@16 @282
Dos32DevIOCtl@36 @284
Dos32Beep@8 @286
Dos32Exit@8 @234
Dos32CreateThread@20 @311
; EOF

View File

@@ -1,23 +0,0 @@
; $Id: doscalls.edf,v 1.2 2002/03/24 18:55:38 ea Exp $
;
; Def for doscalls.dll - part of the OS/2-sub system
; for ReactOS. Provides Access to OS/2 kernel services.
LIBRARY doscalls.dll
DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services to OS/2-apps"
EXPORTS
; FIXME: fill in all exports
Dos32Sleep=Dos32Sleep@4 @229
Dos32Close=Dos32Close@4 @257
Dos32Open=Dos32Open@32 @273
Dos32Read=Dos32Read@16 @281
Dos32Write=Dos32Write@16 @282
Dos32DevIOCtl=Dos32DevIOCtl@36 @284
Dos32Beep=Dos32Beep@8 @286
Dos32Exit=Dos32Exit@8 @234
Dos32CreateThread=Dos32CreateThread@20 @311
; EOF

View File

@@ -1,38 +0,0 @@
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "OS2 subsystem base services\0"
VALUE "FileVersion", RES_STR_FILE_VERSION
VALUE "InternalName", "doscalls\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "doscalls.dll\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +0,0 @@
# $Id: makefile,v 1.2 2002/03/24 18:52:10 ea Exp $
PATH_TO_TOP = ../../../..
TARGET_TYPE = dynlink
TARGET_NAME = doscalls
TARGET_BASE = 0x30000000
TARGET_CFLAGS = -DDOSCALLS_BASE=$(TARGET_DLLBASE)
TARGET_LFLAGS = -nostartfiles
TARGET_SDKLIBS = ntdll.a
TARGET_GCCLIBS = gcc
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CLEAN = file/*.o vio/*.o sync/*.o mem/*.o \
misc/*.o mou/*.o kbd/*.o run/*.o
DOSCALLS_MISC_OBJECTS = misc/doscalls.o
#SYNC_OBJECTS =
TARGET_OBJECTS = $(DOSCALLS_MISC_OBJECTS)
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

Some files were not shown because too many files have changed in this diff Show More