Commit graph

61 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 241cfca838 Code formatting only.
svn path=/branches/condrv_restructure/; revision=64012
2014-08-31 14:57:43 +00:00
Hermès Bélusca-Maïto 3e02669bee [CONSRV]: Continuing code refactoring of revisions 63866, 63867, 63868 and 63874.
svn path=/branches/condrv_restructure/; revision=64011
2014-08-31 14:04:03 +00:00
Hermès Bélusca-Maïto af311f30a9 [CONSRV]: Merge again ConDrvProcessKey and ConioProcessKey.
svn path=/branches/condrv_restructure/; revision=64010
2014-08-31 14:01:21 +00:00
Hermès Bélusca-Maïto ff5a8823e0 [CONSRV]
- Some code cleaning.
- Bring back the terminal bell that was added in revision 58253 and disabled in revision 58447.

svn path=/branches/condrv_restructure/; revision=64007
2014-08-31 11:58:50 +00:00
Hermès Bélusca-Maïto abe58c387a [CONSRV]: Code cleaning.
svn path=/branches/condrv_restructure/; revision=64005
2014-08-31 11:24:23 +00:00
Hermès Bélusca-Maïto b47d51c6a3 [CONSRV][CONDRV]
- Move CSR details (pre/post-processing, unicode translation) of reading/writing console inputs to consrv, where they belong.
- Add a temporary solution to screenbuffer resizing notifications, to be properly fixed later on.

svn path=/branches/condrv_restructure/; revision=64004
2014-08-31 11:07:09 +00:00
Hermès Bélusca-Maïto 0482248489 [CONSRV]: Start implementing popup windows (it's what you see when you press e.g. the F7 key in your console, when you run cmd.exe).
svn path=/branches/condrv_restructure/; revision=63992
2014-08-30 16:20:32 +00:00
Hermès Bélusca-Maïto a55a2fbbc4 [CONDRV]
- In ConDrvChangeScreenBufferAttributes, change also the popup attributes.
- In some functions we need to check validity of Read/WriteCoord parameters, add fixme for now, that need to be fixed later on.

svn path=/branches/condrv_restructure/; revision=63991
2014-08-30 16:18:07 +00:00
Hermès Bélusca-Maïto ccaa07fecf [CONSRV]: Code formatting only.
svn path=/branches/condrv_restructure/; revision=63990
2014-08-30 15:59:35 +00:00
Hermès Bélusca-Maïto e3e54a09b3 [CONSRV]
Commit my work that I've done during my trip from Albi back to Paris (part 2/2):
Remove terminal-specific line discipline code from CONDRV back to CONSRV.

svn path=/branches/condrv_restructure/; revision=63979
2014-08-29 19:54:10 +00:00
Hermès Bélusca-Maïto 742f7ebd4b [CONSRV]
Commit my work that I've done during my trip from Albi back to Paris (part 1/2):
- QuickEdit and InsertMode are input modes that are related to CONSRV terminal(s), therefore remove them from CONDRV that needs to be agnostic about terminal specificities.
- Separate history helper functions from the line discipline functions to different files.

svn path=/branches/condrv_restructure/; revision=63978
2014-08-29 19:45:45 +00:00
Hermès Bélusca-Maïto 89524de4be [CONSRV]: Add some accelerators and fix few french strings.
TO TRANSLATORS: Please add accelerators for the other languages!

svn path=/branches/condrv_restructure/; revision=63926
2014-08-23 16:38:22 +00:00
Hermès Bélusca-Maïto 73a66663c8 Sync to trunk revision 63922.
svn path=/branches/condrv_restructure/; revision=63923
2014-08-23 15:51:37 +00:00
Hermès Bélusca-Maïto 9fc8396088 [CONSOLE.CPL][CONSRV]: Font fix n°1: correctly use the font size (for TT fonts only, at the moment).
svn path=/branches/condrv_restructure/; revision=63896
2014-08-15 20:00:47 +00:00
Hermès Bélusca-Maïto 21b5377d35 [KERNEL32]
OpenConsoleW was implemented :P

[CONSOLE.CPL][CONSRV]
Create all the fonts needed at console startup, and then just select what's needed when fonts attributes need to be changed at run-time.

[CONSOLE.CPL][CONSRV]
- HACKFIX: Temporary use FW_NORMAL instead of FW_DONTCARE as default font weight (in ReactOS, FW_DONTCARE makes fonts bold by default, instead of normal)
- Use bold fonts instead of the underlined ones for underlined fonts in the terminal.

Timo, FIX THE FONTS !!!!!!!!!! :P

CORE-8439 #comment Should be fixed in revision 63885.

svn path=/branches/condrv_restructure/; revision=63885
2014-08-14 20:10:00 +00:00
Hermès Bélusca-Maïto de799f57dc Sync to trunk revision 63875.
svn path=/branches/condrv_restructure/; revision=63876
2014-08-12 18:49:17 +00:00
Hermès Bélusca-Maïto 73cdd53b1d [CONSRV]: Still some code refactoring....
svn path=/branches/condrv_restructure/; revision=63874
2014-08-12 14:59:13 +00:00
Hermès Bélusca-Maïto d9e86f8a78 [CONSRV]: Continuing 3/X, a small step for a brighter future, maybe!
svn path=/branches/condrv_restructure/; revision=63868
2014-08-11 20:55:50 +00:00
Hermès Bélusca-Maïto afd30b0e36 [CONSRV]: Continuing 2/X
svn path=/branches/condrv_restructure/; revision=63867
2014-08-11 20:39:06 +00:00
Hermès Bélusca-Maïto 991c1f0e88 [CONSRV]: Code refactoring 1/X (and move VDM support to where it belongs).
svn path=/branches/condrv_restructure/; revision=63866
2014-08-11 20:28:40 +00:00
Hermès Bélusca-Maïto 6671999847 [CONSRV]: Support reverse video bit COMMON_LVB_REVERSE_VIDEO
svn path=/branches/condrv_restructure/; revision=63865
2014-08-11 15:37:01 +00:00
Hermès Bélusca-Maïto 1581bcfc02 [CONSRV]: Support underline code COMMON_LVB_UNDERSCORE in the console via CreateFont* API.
svn path=/branches/condrv_restructure/; revision=63864
2014-08-11 14:38:07 +00:00
Hermès Bélusca-Maïto 23f16979ac [CONSOLE.CPL][CONSRV]
- Remove the unuseful UseRasterFonts member in console properties structure.
- Fix my FontSize.X / FontSize.Y mixing (X is width, Y is height) that I introduced in revision 63819.
- We are now able to change the console font via the console props control panel applet (work in progress, but it works!)

svn path=/branches/condrv_restructure/; revision=63863
2014-08-11 13:35:33 +00:00
Hermès Bélusca-Maïto 8e73c54f79 [CONSRV]: Some handle reworking commit, that might look like ridiculous at first, but is just the start of something bigger.
svn path=/branches/condrv_restructure/; revision=63862
2014-08-11 13:31:22 +00:00
Hermès Bélusca-Maïto e5b5525a8a Sync to trunk revision 63857.
svn path=/branches/condrv_restructure/; revision=63858
2014-08-10 21:33:21 +00:00
Hermès Bélusca-Maïto cc85bc57af [KERNEL32][CONSRV]: Implement a basic RegisterConsoleVDM (see revision 62371 for more details).
svn path=/branches/condrv_restructure/; revision=63849
2014-08-09 19:47:40 +00:00
Hermès Bélusca-Maïto 636d4cf0ce [KERNEL32][CONSRV]
For WriteConsoleOutput API only!! Diagnosed with ApiMonitor from Rohitab.

If one tries to write a too large buffer (>= 80*198 CHAR_INFO cells), the CsrAllocateCaptureBuffer API helper fails, because it uses the non-growable CSR port heap of fixed size 64kB.
Since many applications use the API with large buffers (for example, Far Manager <= 1.70, the Windows XTree app http://textmode.netne.net/Extreme.html , ...) and maybe NTVDM,
Windows (and hence ReactOS for compatibility reasons) allocates a buffer in the process' heap (and not in the CSR port heap via the CSR capture API), so that the big buffer allocation
should work. Then, to be able to access it, CSR needs to call NtReadVirtualMemory for capturing the buffer.

CORE-5006 CORE-6397 CORE-8424 #resolve

svn path=/branches/condrv_restructure/; revision=63841
2014-08-08 17:06:28 +00:00
Hermès Bélusca-Maïto 277e3473c4 Sync with trunk r63831.
svn path=/branches/condrv_restructure/; revision=63832
2014-08-07 12:54:03 +00:00
Hermès Bélusca-Maïto 18897fd933 [CONSRV]: Add a DPRINT for diagnostics purposes...
svn path=/branches/condrv_restructure/; revision=63831
2014-08-07 12:36:40 +00:00
Hermès Bélusca-Maïto 7a1f204af1 [KERNEL32][CONSRV]
- Fix FreeConsole API.
- Implement undocumented GetConsoleKeyboardLayoutNameA/W API (same usage as GetKeyboardLayoutName), needed for ConEmu.
  See some examples here: http://www.opensource.apple.com/source/vim/vim-44/src/os_win32.c , and there: 700bab23f2/lswitch.c

CORE-7931 #comment ConsolepFree fixed in revision 63820.

svn path=/branches/condrv_restructure/; revision=63820
2014-08-06 21:01:23 +00:00
Hermès Bélusca-Maïto e4f44047b6 [CONSOLE][CONSRV]
- Implement the undocumented WM_SETCONSOLEINFO window message (the equivalent of our PM_APPLY_CONSOLE_INFO), sent
  by the Windows' console control panel applet console.dll, when applying new console settings to the current opened console
  (and its associated data structure CONSOLE_STATE_INFO).
  This is used by the FAR plugin MinCE by Andrew Grechkin (see http://code.google.com/p/andrew-grechkin/source/browse/trunk/MinCE/src/setconsoleinfo.cpp for example)
- Convert GUI_CONSOLE_INFO::FontSize to COORD, as it should be.

See: http://www.catch22.net/sites/default/source/files/setconsoleinfo.c and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf for more information.

svn path=/branches/condrv_restructure/; revision=63819
2014-08-06 20:49:10 +00:00
Hermès Bélusca-Maïto 58f976d27f [CONDRV]: Quick fix for ASCII strings for ConDrvWriteConsoleOutputString.
[CONSRV]: Commit something forgotten from previous revision.

svn path=/branches/condrv_restructure/; revision=63808
2014-08-04 21:09:46 +00:00
Hermès Bélusca-Maïto 2c404d180a [CONSRV]
- Few code reshuffling before more restructuration.
- Some type fixes.

svn path=/branches/condrv_restructure/; revision=63806
2014-08-04 20:23:33 +00:00
Hermès Bélusca-Maïto d3043d040d [CONSRV]: Cosmetic changes only.
svn path=/branches/condrv_restructure/; revision=63805
2014-08-04 17:53:00 +00:00
Hermès Bélusca-Maïto e3a5ed0e2b [KERNEL32][CONSRV]
Fix few MSVC dword -> short warnings (basically). Thanks GCC for not having noticed them...

svn path=/branches/condrv_restructure/; revision=63804
2014-08-04 17:13:43 +00:00
Hermès Bélusca-Maïto 9fd5cfb5f8 [KERNEL32]
Add a bunch of missing _SEH_YIELD in 'return' clues in _SEH_TRY clauses.

[KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleOutput functions.
The last missing ones are Alloc/Attach/FreeConsole APIs!!

Part 9/10

CORE-7931

svn path=/branches/condrv_restructure/; revision=63803
2014-08-04 16:25:12 +00:00
Hermès Bélusca-Maïto e9c6ccbd0f [CONSRV]
Fix memory section protection flag, that made console settings application fail since some recent work on virtual memory...

svn path=/branches/condrv_restructure/; revision=63801
2014-08-04 14:36:26 +00:00
Hermès Bélusca-Maïto bf136052c0 Sync with trunk r63793.
svn path=/branches/condrv_restructure/; revision=63794
2014-08-01 18:39:52 +00:00
Hermès Bélusca-Maïto 22c9e139a1 [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsole functions.
  An attentive code reader will see that there are structure members in CONSOLE_WRITECONSOLE that are
  indeed unused by kernel32 that can be used in ReactOS for undocumented extensions of WriteConsole...
  (for instance, adding a parameter for ANSI codes support, who knows!... :P)
- Fix a bit the support for the CONSOLE_READCONSOLE_CONTROL parameter in ReadConsole (for unicode only).
- Use the actual exe name for command history management, given via a hackish way by ReadConsole:
  the exe name is passed via the 80-byte-length limited static buffer, and is of course retrieved before
  actually using the static buffer (if needed).

[CONSRV]
- Fix writing input events in the console, but first preprocessing them for pausing commands (we treat them separately and remove them),
  then, in case we write many single events, we merge them in case they are mouse moves or repeated key down presses. This helps in not
  overflowing too quickly the input buffer, and that fixes all the remaining kernel32:console winetests!! (see CORE-8256)
- Use the actual exe name for command history management, given via a hackish way by ReadConsole (blame MS!)

Part 8/X

CORE-7931
CORE-8256 #resolve #comment Fixed in the condrv_restructure branch in revision .

svn path=/branches/condrv_restructure/; revision=63793
2014-08-01 18:08:29 +00:00
Hermès Bélusca-Maïto ac51557c0a [CONSRV]
- Start a better fix for the mouse event problem described in r62739.
- Add a hack for the problem described in CORE-8394, that fixes some Far Manager mouse issues.
CORE-8394

svn path=/branches/condrv_restructure/; revision=63792
2014-08-01 13:36:44 +00:00
Hermès Bélusca-Maïto 2ae25e18a8 [CONSRV]
Fix returned number of read/write codes.

svn path=/branches/condrv_restructure/; revision=63770
2014-07-29 15:54:03 +00:00
Hermès Bélusca-Maïto 4a285f0633 [CONSRV]
Add the optional "number of things read/written" parameters back.

svn path=/branches/condrv_restructure/; revision=63769
2014-07-29 14:00:46 +00:00
Hermès Bélusca-Maïto 5ce6a6c12b Simplify code.
svn path=/branches/condrv_restructure/; revision=63768
2014-07-29 13:49:03 +00:00
Hermès Bélusca-Maïto 2d9a888371 [KERNEL32][CONSRV]
- Use a CODE_ELEMENT structure in order to simplify the code.
- Do not do an on-place ansi to unicode conversion.

svn path=/branches/condrv_restructure/; revision=63766
2014-07-29 13:18:59 +00:00
Hermès Bélusca-Maïto 6f772ac651 [CONSRV]
Add diagnostics ASSERTs for MultiByteToWideChar & its companion (the source and target pointers must not be the same, otherwise it doesn't work).

svn path=/branches/condrv_restructure/; revision=63764
2014-07-29 12:54:01 +00:00
Hermès Bélusca-Maïto 19e30db97b [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleCharacter/Attribute and FillConsoleOutputCharacter/Attribute functions.
  The underlying CONSOLE_READOUTPUTCODE and CONSOLE_WRITEOUTPUTCODE structures are the same.
  It should be noticed, as for the Read/WriteConsoleInput functions of r63754 and the other Read/WriteConsole*** functions, that for performance purposes Windows uses a local buffer for "small" sizes;
  we should do the same too because both the client and the server use the number of elements to actually read/write in order to determine which buffer one should use (local or some shared buffer).
- Some memcpy --> RtlCopyMemory.

Part 7/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63755
2014-07-29 00:00:21 +00:00
Hermès Bélusca-Maïto e9c7111b66 [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleInput functions.
- Really fix some ASSERTS from r63108.

Part 6/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63754
2014-07-28 21:20:36 +00:00
Hermès Bélusca-Maïto b06a89c070 [KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant.

- Fix UNICODE and ANSI versions of the Alias and History APIs. Tested with unicode and ansi version of our doskey.exe
- Implement GetNumberOfConsoleMouseButtons.

Part 5/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63751
2014-07-28 13:20:54 +00:00
Hermès Bélusca-Maïto 9ed2e0b5bc Sync with trunk r63743.
svn path=/branches/condrv_restructure/; revision=63744
2014-07-27 20:52:13 +00:00
Hermès Bélusca-Maïto 8a3822c4ea Sync with trunk r63647.
svn path=/branches/condrv_restructure/; revision=63648
2014-06-27 18:05:20 +00:00