Commit graph

1686 commits

Author SHA1 Message Date
Mark Jansen 3da04a9b68
[RAPPS] Remove string casts after the conutils fix 2020-09-25 22:03:28 +02:00
Kyle Katarn b9754fa5d6
[SETUP][MMSYS][SHELL32] Adding missing French translation (and update existing ones) (#3232)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-25 01:39:31 +02:00
Hermès Bélusca-Maïto 17e094cd34
[CMD] SET: Diverse fixes for the arithmetic-expression parser (/A option).
- Detect whether a division by zero is done, and fail if so.

- Detect whether an invalid number is provided:
  * If _tcstol() fails with errno == ERANGE, we've got an overflow or
    underflow.
  * If the next character where _tcstol() is not a whitespace but is a
    character compatible with the first character of an identifier, the
    number is invalid.

- Add + to the list of existing unary operators (!,~,-), and parse them
  where many of these are present. Indeed, expressions like: +3, -+-+3,
  !!-+3 (or with other unary ops, etc.) are valid.

- Operators constituted of more than one characters, can contain
  whitespace separating their constituting characters.
  Thus, "a + = 3" is equivalent to "a += 3" (and the same for -=, *=,
  /=, %=, &=, |= and ^=), and "a < < 3" is equivalent to "a << 3" (and
  the same for >>, <<= and >>=).

- After evaluating everything, if unparsed data remains, fail and bail out.

- Return Windows' CMD-compatible errorlevels.

See https://ss64.com/nt/set.html for more details.

Fixes some cmd_winetests.
2020-09-23 00:22:48 +02:00
Hermès Bélusca-Maïto 87a5403318
[CMD] Add a MSCMD_BATCH_ECHO define for enabling Windows' CMD.EXE way of preserving/restoring the echo flag across batch calls.
Observation shows that this is done only when the top-level batch file
is being run (and then terminates); the echo flag is not restored to its
previous state when a child batch file terminates and gives main back to
its parent batch.
2020-09-23 00:22:47 +02:00
Hermès Bélusca-Maïto 141378cfc8
[CMD] ASSOC: Simplify the code and make it more robust; fix returned ERRORLEVEL values.
- Make sure that non-administrator users can list associations, and
  display appropriate error messages when e.g. they don't have sufficient
  privileges to perform an operation.

- Make the helper functions all return Win32 values, used as the
  ERRORVALUE, except when a specific extension association fails to be
  displayed, in which case the ERRORVALUE is normalized to 1.

- Since the 'param' is a modifiable string (that can be modified by the
  command, independently of the way it's called), just use it to isolate
  the extension by zeroing out the equls-sign separator.
2020-09-23 00:22:47 +02:00
Hermès Bélusca-Maïto 63316df520
[CMD] Change ERRORLEVEL behaviour for commands ASSOC, PATH, PROMPT and SET.
Commands APPEND/DPATH and FTYPE are also concerned by this; however
we do not implement them in our CMD.EXE yet.

These commands set the ERRORLEVEL differently, whether or not they are
run manually from the command-line/from a .BAT file, or from a .CMD file:

- From command-line/.BAT file, these commands set the ERRORLEVEL only if
  an error occurs. So, if two commands are run consecutively and the first
  one fails, the ERRORLEVEL will remain set even if the second command
  succeeds.

- However, when being run from a .CMD file, these command will always
  set the ERRORLEVEL. In the example case described above, the second
  command that succeeds will reset the ERRORLEVEL to 0.

This behaviour is determined from the top-level batch/script file being
run. This means that, if a .BAT file is first started, then starts a
.CMD file, the commands will still behave the .BAT way; on the opposite,
if a .CMD file is first started, then starts a .BAT file, these commands
will still behave the .CMD way.

To implement this we introduce one global BATCH_TYPE enum variable that
is initialized to the corresponding batch/script file type when the
top-level script is loaded. It is reset to "none" when that script
terminates.

See https://ss64.com/nt/errorlevel.html for more details,
section "Old style .bat Batch files vs .cmd Batch scripts",
and https://groups.google.com/forum/#!msg/microsoft.public.win2000.cmdprompt.admin/XHeUq8oe2wk/LIEViGNmkK0J
(comment by Mark Zbikowski).
2020-09-23 00:22:46 +02:00
Hermès Bélusca-Maïto a5d7a2cd61
[CMD] Code style and formatting fixes for assoc.c and path.c 2020-09-23 00:22:45 +02:00
Hermès Bélusca-Maïto 0695ecbfd6
[CMD] FOR: Additional Windows' CMD compatibility "fixes" for FOR /F token parsing command.
This compatibility behaviour implements the buggy behaviour of FOR /F
token parsing that can be observed in Windows' CMD, and that is tested
by the cmd_winetests.
It can be disabled at compile time via the MSCMD_FOR_QUIRKS define.

It fixes additional cmd_winetests, in concert with commit cb2a9c31.

Explanation of the implemented buggy behaviour
==============================================

In principle, the "tokens=x,y,m-n[*]" option describes a list of token
numbers (must be between 1 and 31) that will be assigned into variables.
Theoretically this option does not cumulate: only the latest 'tokens='
specification should be taken into account.

However things are not that simple in practice. First, not all of the
"tokens=" option state is reset when more than one specification is
provided. Second, when specifying a token range, e.g. "1-5", Windows'
CMD just ignores without error ranges that are not specified in
increasing order. Thus for example, a range "5-1" is ignored without
error. Then, token numbers strictly greater than 31 are just ignored,
and if they appear in a range, the whole range is ignored.

Another bug is the following one: suppose that the 'tokens'
specification reads:
  "tokens=1-5,1-30" , or: "tokens=1-5,3" ,
i.e. more than one range, that overlap partially. Then the actual total
number of variables will not be of the larger range size, but will be
the sum, instead.
Thus, in the first example, a total of 5 + 30 == 35 variables (> 31) is
allocated, while in the second example, a total of 5 + 1 == 6 variables
is allocated, even if they won't all store data !!
In the first example, only the first 30 FOR variables will be used, and
the 5 others will contain an empty string. In the second example, only
the first 5 FOR variables will be used, and the other one will be empty.

We also see that due to that, the "Variables" buffer of fixed size
cannot always be used (since it can contain at most 32 variables).

Last but not least, when more than one "tokens=" specification is
provided, for example:
  "tokens=1-31 tokens=1-20"
a total number of 31 FOR variables (because 31 is the max of 31 and 20)
is allocated, **but** only 20 are actually used, and the 11 others
return an empty string.

And in the specification: "tokens=1-31,* tokens=1-20", a total of
31 + 1 + 20 = 52 variables is initialized, but only the first 20 will
be used, and no "remaining-line" token (the '*' one) is used.
2020-09-21 03:31:01 +02:00
Hermès Bélusca-Maïto e904471023
[CMD] IF: Fix x64 warning C4267. 2020-09-21 03:31:01 +02:00
Oleg Dubinskiy b62948ef77 [RAPPS] Use RegDeleteKeyExW for deleting the apps strings from registry only if it is available in advapi32
Otherwise, use `RegDeleteKeyW` instead, on Windows versions whose don't have the Ex function (XP SP3 x32, Server 2003 SP0 and earlier).
It will fix regression with Rapps startup there, due to that missing function.
CORE-17264
2020-09-20 19:23:06 +02:00
Oleg Dubinskiy 7eb90143f8
[RAPPS] Display custom applications icons for installed applications CORE-17257 (#3144)
* [RAPPS] Display custom applications icons for installed applications
- Implement `RetrieveIcon` helper function in `CInstalledApplicationInfo` class, which retrueves the current app's icon from registry, same as it done for `CAvailableApplicationInfo`.
- Use it for loading the icon in `CAppsListView::AddInstalledApplication` function, via `ExtractIconW`. Load default Rapps icon only when the app has no its custom icon.
- Retrieve `DisplayIcon` value from registry in `CInstalledApps::Enum` function, same as other registry values (like app name, description, etc).Store it in `szDisplayIcon` string, which is used in `CInstalledApplicationInfo::RetrieveIcon` for retrieving the data of that value.
- Increase `LISTVIEW_ICON_SIZE` macro from 24 to 32, so 32x32 icon size is now used instead of 24x24. This makes displayed icons more accurate, since most of apps contain 32x32 icon, so they look a bit distorted with 24x24 size.
2020-09-20 19:19:59 +02:00
Mark Jansen 7119b13a28
[CREATECABFILE] Update rapps example scripts for new usage 2020-09-20 17:30:26 +02:00
Katayama Hirofumi MZ a9f60321f0
[MORE] Implement 'Q' key for 'Quit' (#3210)
Implement 'Quit' action for keyboard key 'Q'. CORE-4019
2020-09-20 07:16:21 +09:00
Hermès Bélusca-Maïto 5d5a1a455c
[CMD] FOR: Fix a bug when parsing the "delims=" option in FOR loops.
Suppose the following FOR-loop command, to be run from the command-line
(if using a batch file, double each percent '%' sign):

  FOR %l IN ("a,b,c,d,e" "f,g,h,i,j") DO (
    FOR /F "delims=, tokens=1-3*" %a IN (%l) DO @echo %a-%b-%c-%d
  )

The outermost FOR-loop enumerates the two strings "a,b,c,d,e" and
"f,g,h,i,j" (placed in %l), and parse each of these in turn, splitting
them at each specified delimiter (here only one character) ',' and storing
the results in consecutive tokens %a, %b, %c, %d, with the last token %d
containing all the remaining string (non-split).
The expected result is:

  a-b-c-d,e
  f-g-h-i,j

However, due to the way the delimiters string specified by the "delims="
option is stored (no stack/heap duplication of the FOR-option substring,
but reading from it directly), during the first run of the innermost
FOR-loop, the option string "delims=, tokens=1-3*" was truncated to just
after the ',' due to the erroneous "delims=" parsing, so that when this
FOR-loop ran for a second time (to deal with the second string), the option
string was already erroneously truncated, without the "tokens=..." part,
so that the parsing results were not stored in the tokens and resulting in:

  a-b-c-d,e
  f-%b-%c-%d

instead. The solution is to save where the "delims=" string needs to be
cut, but wait until running the actual FOR-loop to terminate it (and
saving the original character too), run the FOR-loop body, and then
restore the original character where termination took place. This allows
having the FOR-loop option string valid for the next execution of the
FOR-loop.
2020-09-19 19:44:56 +02:00
Hermès Bélusca-Maïto 5cf0517be1
[CMD] Code formatting in SubstituteVar(). 2020-09-19 19:44:55 +02:00
Hermès Bélusca-Maïto cdc8e45b48
[CMD] Fix delayed expansion of variables.
CORE-13682

- Split SubstituteVars() into its main loop and a helper SubstituteVar()
  that just substitutes only one variable.

- Use this new helper as the basis of the proper implementation of the
  delayed expansion of variables.

- Fix a bug introduced in commit 495c82cc, when GetBatchVar() fails.
2020-09-19 19:44:55 +02:00
Hermès Bélusca-Maïto cb2a9c31a6
[CMD] Some fixes for getting the enhanced '%~XXX' batch/FOR variables.
CORE-11857 CORE-13736

It will be followed with a separate fix for the FOR-loop code.
Fixes some cmd_winetests.

A NULL pointer can be returned for a valid existing batch/FOR variable,
in which case the enhanced-variable getter should return an empty string.
This situation can happen e.g. when forcing a FOR-loop to tokenize a
text line with not enough tokens in it.
2020-09-19 19:44:54 +02:00
He Yang fbbc3efd60
[RAPPS] Update help command (#3209)
Add missing FIND and INFO commands to the usage help string.
2020-09-19 15:20:14 +03:00
Aobi Chan CL e160524395
[TRANSLATION] Chinese Traditional translation improvements (#3085)
- Add Chinese Traditional language support for CHARMAP_NEW, DRWTSN32, UTILMAN, CHKDSK.
- Improve translation for CLIPBRD, MSCONFIG(_NEW), NOTEPAD, SHUTDOWN, SNDREC32, WINHLP32, DISKPART, FORMAT, REGSVR32, RUNDLL32, USERINIT, DESK.CPL and TIMEDATE.CPL.
2020-09-18 00:50:27 +02:00
Kyle Katarn ac2b2ef8c7
[CMD] HISTORY: Fix command output (missing linefeed) (#3205)
CORE-12603

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-18 00:17:08 +02:00
Kyle Katarn 579f501215
[RAPPS] Fix of unhandled exception when trying to modify/uninstall without selection (#3185)
CORE-17279
2020-09-15 22:50:12 +02:00
Serge Gautherie a04831677e
[PROGMAN][CRT][USER32] Do not use LoadLibraryEx() NT6+ flags (#3152)
CORE-12004
2020-09-13 23:42:09 +02:00
Jose Carlos Jesus b52189873d
[TRANSLATION][SCREENSAVERS][SYSSETUP] Add Portuguese (PT) translation (#3156) 2020-09-13 23:14:05 +02:00
Kyle Katarn f07ace6aa2
[RAPPS][CONSRV] French translation update (#3160)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-13 23:12:52 +02:00
Kyle Katarn 860a985f26
[FORMAT] Fix of output text overlap in console when finished (#3177)
At the end of the format operation, text in console got overwritten and leftovers from previous line remained displayed.
2020-09-13 23:02:09 +02:00
Kyle Katarn 51023e3a2e
[FORMAT] French translation fix (#3178)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-13 23:01:07 +02:00
Hermès Bélusca-Maïto c58a601602
[CMD] Document the two extra file attributes the enhanced batch/FOR variables %~aX could handle on Windows >= 8.
They are currently specified for documentation purposes (i.e. what
Windows 8+ CMD.EXE can report) but not used yet, since ReactOS does not
support them.
2020-09-13 22:50:11 +02:00
Hermès Bélusca-Maïto 95466904db
[CMD] SHIFT: Use _istdigit(). 2020-09-13 22:50:10 +02:00
Hermès Bélusca-Maïto 00ce3c48fe
[CMD] Use pointers to const strings in error functions, where applicable. 2020-09-13 22:50:09 +02:00
Hermès Bélusca-Maïto 3f8f3a2bba
[CMD] Minor formatting only. 2020-09-13 22:50:09 +02:00
He Yang 5077e400d5
[RAPPS] Update Chinese Simplified (zh-CN) translation (#3155)
Addendum to 7a11c65.
2020-09-13 22:00:08 +03:00
Katayama Hirofumi MZ f1e2c3f70e [MSPAINT] Improve Japanese (ja-JP) translation 3 2020-09-13 17:33:57 +09:00
Katayama Hirofumi MZ b88717f5c4 [MSPAINT] Improve Japanese (ja-JP) translation 2 2020-09-13 17:15:05 +09:00
Katayama Hirofumi MZ bd7ad59a48 [MSPAINT] Improve Japanese (ja-JP) translation 2020-09-13 17:01:49 +09:00
Mark Jansen ee69ca786a [CERTUTIL] Add skeleton application with support for -hashfile 2020-09-11 15:29:28 +02:00
Kyle Katarn d54e50f3dc
[EXPLORER] Registry key not closed on error (#3136)
CORE-14519
2020-09-08 21:55:45 +02:00
Kyle Katarn 2c7ccf4bc9
[SOLITAIRE] French translation update (#3138)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-08 21:52:24 +02:00
He Yang e1974d21dc
[RAPPS] settings read/write refactor (#3101)
* [RAPPS] move settings-related stuff to a separate file
* [RAPPS] refactor reg read/write
* [RAPPS] add params for Load/SaveSettings, no longer use global vars
2020-09-06 17:10:18 +02:00
He Yang ce0110195b
[RAPPS] improve ConInitStdStreams initialization logic (#3098) 2020-09-06 17:10:18 +02:00
He Yang 7a11c65561
[RAPPS] cmdline enhancement (#3087)
* [RAPPS] now command-line option supports begin with both / and -
* [RAPPS] Add help command with /?
* [RAPPS] add /find command
* [RAPPS] add /info option
* [RAPPS] add copyright and contact e-mail
2020-09-06 17:10:18 +02:00
赫杨 997650d424
[RAPPS] Display package name in UI too 2020-09-06 17:10:17 +02:00
赫杨 a4ac3c84b2
[RAPPS] now /INSTALL option use PkgName instead of software name
currently, PkgName is the name of ini file in DB (without suffix)
2020-09-06 17:10:17 +02:00
赫杨 da8810ab88
[RAPPS] add m_szPkgName for AvailableApps 2020-09-06 17:10:17 +02:00
赫杨 c5e111427c
[RAPPS] reduce the chance assert failed 2020-09-06 17:10:16 +02:00
赫杨 4c524ee3d5
[RAPPS] some renaming 2020-09-06 17:10:16 +02:00
赫杨 d29fba7f7a
[RAPPS] fix the bug that Toolbar is not working 2020-09-06 17:10:16 +02:00
赫杨 36870a02f7
[RAPPS] update some file-header
update some header to newer format, update purpose and add my name to those file I've modified
2020-09-06 17:10:16 +02:00
He Yang 4c7bd34a47
[RAPPS] appview displaymode support (#3008)
* [RAPPS] add function to set view-mode
* [RAPPS] move toolbar and searchbar into appview
* [RAPPS] remove settings and exit button from toolbar
* [RAPPS] add code to switch between list and tile mode
* [RAPPS] add auto-arrange for listview
* [RAPPS] adjust the minimum size of AppView
* [RAPPS] now image list of listview is stored inside the class
* [RAPPS] add list mode, and old list-mode are detail mode now
* [RAPPS] add check for unimplemented view mode
2020-09-06 17:10:08 +02:00
He Yang e44c9b6630
[RAPPS] application-view refactor (#3003)
* [RAPPS] separate application-view from gui.cpp
* [RAPPS] make the code looks more clear
* [RAPPS] fix &  improve tab-order handle
* [RAPPS] now double-click / right-click & install an item will install exactly this app
* [RAPPS] add handling for DWORD timestamp for InstallDate
* [RAPPS] make the code setting column style more clear
* [RAPPS] change the owner of popup-menu
* [RAPPS] now the popup menu (the one when right-click listview) now belongs to application-view
2020-09-06 17:09:21 +02:00
He Yang 10c0ff7416
[RAPPS] listview refactor (#2970)
This makes it easier to maintain the listview, and better separates the application list and listview.

* [RAPPS] fix memory leak when cleanup. some renaming are also done
* [RAPPS] move the code adding apps info inside class CAppsListView
* [RAPPS] add table view, create listview and AppInfoDisplay inside it
* [RAPPS] rename INSTALLED_INFO as CInstalledApplicationInfo
now it corresponds with CAvailableApplicationInfo
* [RAPPS] add CInstalledApps
* [RAPPS] optimize the speed when refreshing listview
* [RAPPS] correctly handle Enum for InstalledApps
* [RAPPS] make check all working properly (this also fixes some bugs)
the old version has some bugs when check all items after switching tags in tree-view
* [RAPPS] add handling for wow64
* [RAPPS] use an inline function to replace INSERT_TEXT macro
* [RAPPS] fix the bug that StatusBar won't update when switching tags
* [RAPPS] now TableView always reset bIsAscending in SetDisplayMode
* [RAPPS] rename TableView to ApplicationView
* [RAPPS] now bIsAscending would be reset when switching column in listview
2020-09-06 17:09:20 +02:00
He Yang 4482d0f455
[RAPPS] move icon to a field in .txt file (#2941)
* [RAPPS] move icon to a field in .txt file
* [RAPPS] add function PathAppendNoDirEscapeW, apply it.
2020-09-06 17:09:20 +02:00
He Yang e636373016
[RAPPS] rename snapshot to screenshot, filename to location (#2939) 2020-09-06 17:09:20 +02:00
赫杨 cfb0963c1f
[RAPPS] update broken-img icon 2020-09-06 17:09:20 +02:00
He Yang e506581454
[RAPPS] snapshot url support (#2925)
* [RAPPS] add snapshot url support
* [RAPPS] fix snapshot prev window won't update if size not changed
* [RAPPS] fix crash after cancel download
* [RAPPS] show broken-img if failed to create file / make network request
* [RAPPS] create a snapshots folder if it does not exist
* [RAPPS] add a helper function to perform callback
* [RAPPS] check bIsCancelled when handling ERROR_INVALID_HANDLE
* [RAPPS] remove W suffix for AsyncInetDownload
* [RAPPS] add assert for unknown event
* [RAPPS] Improve AsyncInetDownload error handling
* [RAPPS] move DisplayFailed to private, fix crash when cancelling
* [RAPPS] check for ERROR_INTERNET_OPERATION_CANCELLED
* [RAPPS] improve error logging
* [RAPPS] remove \r in error logging
* [RAPPS] rewrite AsyncInet
2020-09-06 17:09:19 +02:00
He Yang fbf119fde1
[RAPPS] Screenshot preview and other trivial fixes (#2894)
* add one more layer of window
* using Path* API to operate path
* always use rappmgr.cab as file name when downloading db. ignore the URL
* add snapshot preview window
* show a broken-image icon when failed to load image
* add a padding between image and content, and make sure always some space is reserved for richedit
* hide the padding if snapshot window does not have a width
* some work to avoid blinking when window resizing
* add WM_PRINTCLIENT handling
2020-09-06 17:09:19 +02:00
He Yang eacaf65459
[RAPPS] add a layer of window above the richedit (#2871)
* add one more layer of window
* use ATL to create window
* set pLink to NULL to avoid wild pointer
2020-09-06 17:09:12 +02:00
Katayama Hirofumi MZ fb529605a6
[EXPLORER] Implement HSHELL_ACTIVATESHELLWINDOW (#3125)
Implement HSHELL_ACTIVATESHELLWINDOW shell hook.
2020-09-05 18:46:49 +09:00
Hermès Bélusca-Maïto 050df0f56d
[CMD] Code formatting for IsValidPathName, IsExistingFile, IsExistingDirectory, and use INVALID_FILE_ATTRIBUTES instead of an hardcoded value. 2020-09-04 00:24:45 +02:00
Kyle Katarn a5634138c3
[SETUP] French translation of missing elements (#3111)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-03 21:20:54 +02:00
Hermès Bélusca-Maïto c81bf4f823
[CMD] IF: Add extra validity checks in ExecuteIf(). 2020-09-03 16:05:55 +02:00
Kyle Katarn 038daa6367
[SHELL32][PAINT][DRIVERS][SHELLEXT] French translation update (#3092)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-09-03 15:16:44 +02:00
Catalin Gabriel Draghita 0ab63f9590
[BASE] Improve Spanish (es-ES) translation (#3088) 2020-08-25 18:10:23 +03:00
Jose Carlos Jesus ea5c612b00
[REACTOS][USETUP] Update Portuguese PT translation (#3081)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2020-08-23 14:34:28 +02:00
Aobi Chan CL 018d4d39a3
[TRANSLATION] Chinese Traditional translation for "Problem with Shortcut" dialog and improvements (#3079)
- Translation for: setup-reactos, welcome, explorer, appwiz, hdwwiz, intl, mmsys, netid, shell32, syssetup, tapiui.
- Update zh-TW.rc of shell32 (#3075)
- Just found more Simplified Chinese characters, fixed them. (装 > 裝)
2020-08-23 14:28:55 +02:00
Thomas Faber 44ae567e39
[TELNET] Don't build this for clang due to compiler errors. CORE-17202 2020-08-23 12:07:38 +02:00
Adam Stachowicz ca68686a98
[CMD] Update Polish (pl-PL) translation (#3082)
Addendum to 7c175d4.
2020-08-20 12:25:52 +03:00
Stanislav Motylkov fa120ac0cd
[CMD] Update Russian (ru-RU) translation
Addendum to 7c175d4.
2020-08-20 02:04:17 +03:00
Hermès Bélusca-Maïto 6925ca37ab
[CMD] Add mention of the /Y switch in MORE command help; re-position the STRING_PAUSE_HELP1 string. 2020-08-19 21:39:23 +02:00
Hermès Bélusca-Maïto 6a8754c83a
[CMD] TYPE: Rewrite the command so as to fix some of its behaviour.
- Display the names of the files being TYPEd only if more than one file
  has been specified on the command-line, or if a file specification
  (with wildcards) is present (even just for one).
  These names are displayed on STDERR while the files are TYPEd on
  STDOUT, therefore allowing concatenating files by just redirecting
  STDOUT to a destination, without corrupting it with the displayed file
  names. Also, add a /N option to force not displaying these file names.

- When file specifications (with wildcards) are being processed, silently
  ignore any directories matching them. If no corresponding files have
  been found, display a file-not-found error.

- When explicitly directory names are specified, don't do any special
  treatment; the CreateFile() call will fail and return the appropriate
  error.

- Fix the returned errorlevel values.

See https://ss64.com/nt/type.html for more information.

Fixes some cmd_winetests.

- When reading from a file, retrieve its original size so that
  we can stop reading it once we are beyond its original ending.
  This allows avoiding an infinite read loop in case the output of
  the file is redirected back to it.

  Fixes CORE-17208

- Move the FileGetString() helper to the only file where it is
  actually used.
2020-08-19 21:39:22 +02:00
Hermès Bélusca-Maïto 3d4af22328
[CMD] CHDIR: Some features are available only when extensions are enabled. Update the SetRootPath() as well. 2020-08-19 21:39:21 +02:00
Hermès Bélusca-Maïto fe9aa42d5f
[CMD] SET: Fix displaying the environment variables with a given prefix.
- Restore any truncated space in the name prefix, before displaying
  any error message.

- When trimming the name prefix from "special" characters (spaces, comma
  and semicolon), so that e.g. "set ,; ,;FOO" displays all the variables
  starting by "FOO", save also a pointer to the original name prefix, that
  we will use for variables lookup as well.

  This is done, because the SET command allows setting an environment variable
  whose name actually contains these characters (e.g. "set ,; ,;FOO=42"),
  however, by trimming the characters, doing "set ,; ,;FOO" would not allow
  seeing such variables.
  With the fix, it is now possible to show them.
2020-08-19 21:39:18 +02:00
Hermès Bélusca-Maïto 8cea82b14c
[CMD] REPLACE: Fix a memory leak. 2020-08-19 20:36:13 +02:00
Hermès Bélusca-Maïto 1cb7e08522
[CMD] SETLOCAL / ENDLOCAL: Save / Restore as well the current drive and current directory.
That's an actual fact, done on original MS-DOS COMMAND.COM, FreeCOM,
Windows' CMD.EXE, etc., but is strangely undocumented on MSDN documentation.

See https://www.dostips.com/forum/viewtopic.php?t=4436

Fixes some cmd_winetests.
2020-08-19 20:36:13 +02:00
Hermès Bélusca-Maïto e8e31267c5
[CMD] setlocal.c : Code style and formatting fixes 2020-08-19 20:36:13 +02:00
Hermès Bélusca-Maïto 90159e1e51
[CMD] Implement provisional support for the HIGHESTNUMANODENUMBER environment-like variable.
This variable is available only in Win7+, even if the underlying API
GetNumaHighestNodeNumber() is available in Win2003+
2020-08-19 20:36:12 +02:00
Hermès Bélusca-Maïto 04e0fe0652
[CMD] The "special" environment-like variables are available only when extensions are enabled.
The "special" variables are: CD, DATE, TIME, RANDOM,
CMDCMDLINE, CMDEXTVERSION, ERRORLEVEL (and on Win7+,
HIGHESTNUMANODENUMBER).
2020-08-19 20:36:12 +02:00
Hermès Bélusca-Maïto 41a93a4e58
[CMD] FOR: Some functionality is available only when extensions are enabled.
This is basically all the advanced functionality enabled with the /D,
/R, /L and /F flags, and the usage of enhanced variables.
2020-08-19 20:36:11 +02:00
Hermès Bélusca-Maïto fedc68aea8
[CMD] IF: Some functionality is available only when extensions are enabled.
This functionality is: case insensitivity comparisons (/I);
CMDEXTVERSION and DEFINED unary operators; EQU, NEQ, LSS, LEQ, GTR, GEQ
generic string comparators.
2020-08-19 20:36:11 +02:00
Hermès Bélusca-Maïto 80844dc185
[CMD] DATE: Simplify the input loop, based on the TIME command.
Set also the ERRORLEVEL in case of error.
2020-08-19 20:36:10 +02:00
Hermès Bélusca-Maïto a151893351
[CMD] DATE: The /T option is available only when extensions are enabled. 2020-08-19 20:36:10 +02:00
Hermès Bélusca-Maïto 682875d070
[CMD] TIME: The /T option is available only when extensions are enabled.
And merge two string buffers into one.
2020-08-19 20:36:09 +02:00
Hermès Bélusca-Maïto aab632644f
[CMD] Some code style and formatting fixes 2020-08-19 20:36:09 +02:00
Hermès Bélusca-Maïto 47d7de4b7b
[CMD] Simplify GetRootPath() and mark its InPath parameter pointer to const string. 2020-08-19 20:36:08 +02:00
Hermès Bélusca-Maïto f43ee81573
[CMD] CHDIR: Adjust ERROR_FILE_NOT_FOUND into ERROR_PATH_NOT_FOUND if _tchdir() fails. 2020-08-19 20:36:08 +02:00
Hermès Bélusca-Maïto 9871becced
[CMD] It is not the job of ErrorMessage() to set the errorlevel! It is set only by the commands that want it. 2020-08-19 20:36:08 +02:00
Hermès Bélusca-Maïto 3b960a1c21
[CMD] MOVE: Set the errorlevel on failure.
CORE-14261
2020-08-19 20:36:07 +02:00
Hermès Bélusca-Maïto ae649656db
[CMD] RMDIR: Improve some aspects of the /S option.
- First, the option and the APIs called by it can work directly on
  paths relative to the current directory. So there is no need to
  call GetFullPathName(), with the risk of going over MAX_PATH if the
  current path is quite long (or nested) but the RMDIR is called on a
  (short-length) relative sub-directory.

- Append a path-separator (backslash), only if the specified directory
  does not have one already, and, that it does not specify a current
  directory via the "drive-root" method, e.g. "C:" without any trailing
  backslash.

- In case there are errors during deletion of sub-directories or
  sub-files, print the error but continue deleting the other sub-dirs
  or files.

- Monitor the Ctrl-C breaker as well, and stop deleting if it has been
  triggered.

- When removing file/directory read-only attribute, just remove this
  attribute, but keep the other ones.

- When deleting the directory, first try to do it directly; if it fails
  with access denied, check whether it was read-only, and if so, remove
  this attribute and retry deletion, otherwise fails.

- When recursively deleting a drive root directory, ultimately resolve
  the dir pattern and check whether it's indeed a drive root, e.g.
  "C:\\", and if so, just return success. Indeed, calling
  RemoveDirectory() on such drive roots will return ERROR_ACCESS_DENIED
  otherwise, but we want to succeed even if, of course, we won't
  actually "delete" the drive root.
2020-08-19 20:36:07 +02:00
Hermès Bélusca-Maïto 2f9b4a2e9f
[CMD] RMDIR: Force directory deletion even if it's read-only, only when recursing over subdirectories (via the /S option). 2020-08-19 20:36:06 +02:00
Hermès Bélusca-Maïto 7c175d4999
[CMD] PATH, SET: Fix the returned error message when an environment variable does not exist.
Translators, please update the translations!
2020-08-19 20:36:06 +02:00
Hermès Bélusca-Maïto 6e09a6a3ff
[CMD] Use kernel32!lstrcmp(i) when comparing strings with the IF command.
Use kernel32!lstrcmp(i) instead of CRT!_tcs(i)cmp, so as to use the correct
current thread locale information when comparing user-specific strings.
As a result, the following comparison: 'b LSS B' will return TRUE,
instead of FALSE as it would be by using the CRT functions (and by
naively considering the lexicographical order in ANSI).
This behaviour has been introduced in Windows 2000 onwards.
2020-08-19 20:36:05 +02:00
Hermès Bélusca-Maïto 5830ccb85e
[CMD] Improve the way the ErrorMessage() helper and the MKDIR and RMDIR commands report their errors.
For MKDIR, also properly support the case of ERROR_FILE_EXISTS and
ERROR_ALREADY_EXISTS last-errors by displaying the standard error
"A subdirectory or file XXX already exists.\n"
2020-08-19 20:36:05 +02:00
Hermès Bélusca-Maïto 1efbcd3d5d
[CMD] Improve RMDIR help and MD error message. 2020-08-19 20:36:04 +02:00
Hermès Bélusca-Maïto e3ed502bb6
[CMD] Fix the output of the SET command. 2020-08-19 20:36:04 +02:00
Hermès Bélusca-Maïto ca4523658c
[CMD] Some code style and formatting fixes 2020-08-19 20:36:04 +02:00
Hermès Bélusca-Maïto 82bcb3f9f0
[CMD] Fix the implementation of EXIT /B when a batch context is active. 2020-08-19 20:36:03 +02:00
Hermès Bélusca-Maïto d78e8029b8
[CMD] Additional fixes for ERRORLEVEL and last returned exit code from EXIT, CALL commands and CMD.
CORE-10495 CORE-13672

- Fix how the ERRORLEVEL and the last returned exit code are set by
  EXIT and CALL commands, when batch contexts terminate, and when CMD
  runs in single-command mode (with /C).

  Addendum to commit 26ff2c8e, and reverts commit 7bd33ac4.
  See also commit 8cf11060 (r40474).

  More information can be found at:
  https://ss64.com/nt/exit.html
  https://stackoverflow.com/a/34987886/13530036
  https://stackoverflow.com/a/34937706/13530036

- Move the actual execution of the CMD command-line (in /C or /K
  single-command mode) from Initialize() to _tmain(), to put it on par
  with the ProcessInput() interactive mode.

- Make ProcessInput() also return the last command's exit code.
2020-08-19 20:36:03 +02:00
Hermès Bélusca-Maïto 2e4c8c019e
[CMD] GOTO: Fix label parsing.
We note two things, when CMD searches for the corresponding label in the
batch file:
- the first character of the line is always ignored, unless it's a colon;
- the escape caret ^ is supported and interpreted.

Fixes some cmd_winetests.
2020-08-19 20:36:01 +02:00
Hermès Bélusca-Maïto c5e6e5a19c
[CMD] GOTO: Fix handling of the ':EOF' label handling.
- The ':EOF' label feature is available only when extensions are enabled.

- Anything that follows the ':EOF' label, separated by at least one
  whitespace character, is ignored, and the batch file terminates.
2020-08-19 20:36:01 +02:00
Hermès Bélusca-Maïto f911bb482d
[CMD] GOTO: The command should search labels from its position down to the end, then loop back to the beginning of the batch and down to the original position. 2020-08-19 20:36:00 +02:00
Hermès Bélusca-Maïto 495c82ccde
[CMD] Syntax errors during parsing of batch parameters expansion, or FOR and IF commands, are fatal, and batch execution should stop.
- To this purpose use the ParseErrorEx() that correctly sets the
  bParseError flag, and return the partially-parsed command so that
  it gets echoed as well for diagnostics purposes (Windows-compatible).

- Any other parameters specified after (or before) the '/?' switch for
  the FOR and IF commands, are considered fatal syntax errors as well,
  thus we employ the ParseErrorEx() as well.
2020-08-19 20:35:59 +02:00
Hermès Bélusca-Maïto 6eb1cae348
[CMD] Fixes for Batch error execution control flow.
CORE-13713 CORE-13736

- In case execution of all batch contexts is stopped (by selecting "All"
  at the Ctrl-C/Ctrl-Break prompt), notify as well the CheckCtrlBreak()
  signal handler once there are no more batch contexts (this in effect
  resets the internal 'bLeaveAll' static flag in CheckCtrlBreak).
  This is an adaptation of the fix present in FreeCOM 1.5, first
  described in https://gcfl.net/FreeDOS/command.com/bugs074g.html .

- Introduce a ParseErrorEx() helper that sets the 'bParseError' flag and
  displays a customized syntax-error message, only for the first syntax
  error encountered. Implement ParseError() around the *Ex function.

- In batch mode, echo the original pre-parsed batch file line if a parse
  error has been encountered.

- When running a compound command - including IF, FOR, command blocks -,
  and that control flow is modified by any CALL/GOTO/EXIT command,
  detect this while running the compound command so as to stop it and go
  back to the main batch execution loop, that will then set up the actual
  new command to run.

- In GOTO, do not process any more parts of a compound command only when
  we have found a valid label.
2020-08-19 20:35:58 +02:00
Hermès Bélusca-Maïto ca912d7b36
[CMD] Further code style and formatting fixes. 2020-08-19 20:35:57 +02:00
Hermès Bélusca-Maïto c93f511241
[CMD] Reduce stack memory usage when parsing or echoing commands recursively.
- Use a common large string buffer for temporary command substitutions/expansions,
  instead of having such a buffer in the local stack of the parsing and
  echoing functions that may be called recursively. Since CMD executes
  synchronously we know that this common buffer can only be used once at
  a time.

- Also do a small code cleanup in ParseIf(), ParseFor() and ParseCommandPart().
2020-08-19 20:35:57 +02:00
Hermès Bélusca-Maïto 26cfadc352
[CMD] Make the command echoer Windows-CMD-compatible. CORE-14025
Add a MSCMD_ECHO_COMMAND_COMPAT define to be able to switch back to our
older but less broken behaviour at compile-time.

- Append a trailing space to commands when those have a parameter,
  as well as after a command-block closing parenthesis.

- Space around redirection strings need to be switched around.
2020-08-19 20:35:56 +02:00
Hermès Bélusca-Maïto 47ea3f1faa
[CMD] Fix the command echo-er/unparser.
- Use ConOutPuts() instead of ConOutPrintf() for displaying strings that
  are not printf formatted.

- When echo-ing/unparsing FOR command, any possible FOR variables
  present in the FOR parenthesized list (before the "do" part) should be
  substituted as well.
2020-08-19 20:35:56 +02:00
Hermès Bélusca-Maïto 6f87d45e1c
[CMD] Add a command tree dumper, for debugging purposes of the parser code.
This feature is also present in Windows' CMD, and has been documented
e.g. at:
https://www.fireeye.com/blog/threat-research/2018/11/cmd-and-conquer-de-dosfuscation-with-flare-qdb.html
https://www.real-sec.com/2019/08/cmd-and-conquer-de-dosfuscation-with-flare-qdb/
2020-08-19 20:35:55 +02:00
Hermès Bélusca-Maïto 04eef6d20c
[CMD] parser.c, cmd.c/h : Code style and formatting fixes.
- Change C_IFFAILURE, C_IFSUCCESS into C_OR, C_AND respectively.
2020-08-19 20:35:54 +02:00
Hermès Bélusca-Maïto 93ee4e7efa
[CMD] Fix some messages formatting.
- Fix ECHO state output string.
- Add missing newlines to some help and error messages.
- Add trailing space after the PAUSE command message.
2020-08-19 20:35:54 +02:00
Hermès Bélusca-Maïto ea801338f6
[CMD] todo.txt: Remove some points that have already been implemented since ages. 2020-08-19 20:35:52 +02:00
Hermès Bélusca-Maïto 86c5e7e41f
[CMD] Remove deprecated definition in CMakeLists.txt. 2020-08-19 20:35:52 +02:00
Stanislav Motylkov f7e84e231b
[TASKMGR] Revert 535e262 (#3016)
This reverts a change which introduced a regression.

CORE-17115
2020-08-18 20:23:34 +03:00
Zheng Jianping 5b80b5db17
[UMANDLG] Update Chinese Simplified (zh-CN) translation (#2545) 2020-08-18 15:26:06 +03:00
Zheng Jianping 4a3ef0d053
[OSK] Update Chinese Simplified (zh-CN) translation (#2546) 2020-08-18 14:52:06 +03:00
Aobi Chan CL 53bb510352
[TRANSLATION] Improve Chinese Traditional (zh-TW) translation (#3065) 2020-08-18 14:26:04 +03:00
Piotr Hetnarowicz da895c2f99
[EXPLORER] Polish description fix for Taskbar properties dialog. (#3073) 2020-08-18 12:55:52 +02:00
Aobi Chan CL 860b45aca1
[USERINIT][WINLOGON][USER32][USERSRV] Update Traditional Chinese (Taiwan) translation (#3018) 2020-08-16 15:13:55 +03:00
Oleg Dubinskiy 25f78cda99
[REGEDIT] Improve message box for importing registry files (#3006)
- Change the messagebox's icon type from warning icon to question icon, because this is done in Windows Regedit too.
- Use two buttons (Yes and No) or three buttons (Yes, No, and Cancel) depending on the file count.

CORE-15494

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2020-08-16 02:25:44 +03:00
Aidan Case 535e262b78
[TASKMGR] Fix display of process command-line string (#3016)
The CMD_LINE_CACHE index (idx) does not update when programs are closed.
Compare it with the process id (pid) in the cache and determine the pid
by the index in the same cache.

CORE-17115
2020-08-16 00:52:48 +03:00
Katayama Hirofumi MZ 49be08bc69
[FONTVIEW] Fix regression; opening files won't list files (#3045)
Based on Mark Jansen's patch in CORE-17001.
2020-08-15 07:08:40 +09:00
Katayama Hirofumi MZ 451a9c6f52
[EXPLORER] Implement ABN_WINDOWARRANGE (#3033)
The AppBar window has to receive the ABN_WINDOWARRANGE notification message before and after the window arrangement from taskbar. CORE-7237
2020-08-12 06:00:09 +09:00
Katayama Hirofumi MZ 1c40070561
[EXPLORER] Improve CTrayWindow::OnCopyData (#3028)
Check pCopyData->dwData value. Don't send message needlessly.
CORE-7237
2020-08-10 07:15:21 +09:00
Stanislav Motylkov 21b56d77c6
[EXPLORER] Allocate the string for expanded command line from heap
Addendum to 6fe704b.

CORE-12973 CORE-17168
2020-07-21 19:50:45 +03:00
Stanislav Motylkov 6fe704b0f0
[EXPLORER] Fix auto startup behavior
Command line should be expanded only for REG_EXPAND_SZ values.

CORE-17168
2020-07-21 17:28:48 +03:00
Serge Gautherie 98bbe8358c
[REACTOS] Fix GetTokenInformation() usage (#2997)
The first call to GetTokenInformation is used to determine the size of a TokenInformation buffer.
It should fail and return ERROR_INSUFFICIENT_BUFFER
2020-07-21 15:39:11 +03:00
Serge Gautherie b509658280
[CMAKE] Remove obsolete 'CMAKE_CXX_COMPILER_VERSION' checks (#2981)
Following upgrade to RosBE 2.2.0 support and GCC 8.4.
2020-07-18 15:37:29 +02:00
Arjav Garg 3b983e57b0
[OSK] Meta key modifier behaviour added (#2973)
Make the meta key in the OSK have modifier key behaviour.
Changed all the .rc files in the OSK so that the meta key doesn't release on it's own and needs a second click to release.
CORE-17161
2020-07-18 15:33:43 +02:00
Serge Gautherie f91144364b [TASKMGR] CachedGetUserFromSid(): Fix user name length on cache hit 2020-07-11 01:37:53 +02:00
Serge Gautherie 353b544047 [AUDIOSRV] logmsg(): Disable its file part
Mininal workaround for
CORE-16814
2020-07-11 01:22:56 +02:00
Colin Finck 5f37b687b0
[OSK] Fix some mistakes in the German translation I just spotted 2020-07-08 23:32:17 +02:00
Mark Jansen 6859348aea
[SVCHOST] Fix PSID initialization
CORE-17151
2020-07-04 19:39:06 +02:00
FritzsHero fbb612f41a
[OSK] Updated German On-Screen Keyboard translation (#2882) 2020-07-04 15:17:26 +02:00
Serge Gautherie 4292fdd8aa
[NET] cmdAccounts(): Set ProductType default value (#2365) 2020-07-04 15:16:22 +02:00
Oleg Dubinskiy dcc5dd2a69
[SDK][SVCHOST] Move all global svchost declarations to public header.
Also update the includes.
It will allow to use those declarations globally where they are required (e. g. for SvchostPushServiceGlobals functions in some services).
No functional changes.
2020-06-27 14:54:22 +02:00
Serge Gautherie ed7196d964 [TASKMGR] Remove 'Debug Channels' feature, which is Wine-specific 2020-06-25 22:08:03 +02:00
He Yang 393a2c42fe
[RAPPS] delete obsolete field 2020-06-14 20:34:43 +02:00
Joachim Henze 1b8b339aae [DNSRSLVR] Define NDEBUG in cache.c
To avoid leaking private data into logs by default.
Some testers may consider their DNS-suffix private data.
And DnsIntCacheAddEntry() logs that via Record->pName.
2020-06-14 20:03:33 +02:00
Oleg Dubinskiy 3cb8ee6d7e
Revert "[FONTS] Add Selawik as a substitution for Segoe UI" CORE-17122 (#2921)
This reverts commit 97fb49a3d2.
2020-06-14 19:09:41 +09:00
Charles Ambrye 99dd292553
[CHARMAP] Functionality Improvements and Bug Fixes (#2560)
- Resize the window slightly when compiled with REMOVE_ADVANCED to avoid deadspace at the bottom of the window.

- Skip over the non-printable characters by starting with character ' ' + 1.

- Instead of iterating over every cell, simply compute the cell x and y using the CellSize.

- Modify behaviour of charmap to allow large character render on mouse move, only hiding the larger character on double click.

- Simplify math for moving window to be on desktop.
Added FIXME to highlight this doesn't work well on multi-monitor setups.
Changed xPos and yPos to LONG since negative numbers are valid on multi-monitor setups.

- Do not draw invalid glyphs on the map (can happen when switching fonts or filtering existing font).
- Do not allow mouse-over of invalid glyphs.

- Fix bug that caused the Help button to remain enabled as it was being modified before it was even created.
- Do a better job at finding the correct glyph under the mouse.

- Ensure the active cell is cleared correctly.

- Invalidate the rect around the previously active cell to ensure it gets redrawn as inactive.

- Fix bug from CORE-10518 (initial active cell was not being invalidated on scroll).

- Do not try to copy a character to the output if there is no active cell selected.

- Populate the advanced portion of the screen with several built-in code pages (the list is hardcoded so that we don't enumerate everything).

- Add functionality to filter the character map by a code page (called a character set in this program).

- Some fonts list 0x0000 as drawable, even when it isn't, so ignore any valid glyphs that contain it.
2020-06-07 19:34:45 +02:00
Amine Khaldi 139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905 2020-06-06 21:58:41 +03:00
Serge Gautherie 1e861d9759
[NFSD] readdir_copy_shortname(): Add needed brackets to '*name_size_out' (#2856)
CORE-17078
2020-06-06 18:21:05 +02:00
He Yang e5886f862f
[RAPPS] Update Chinese (Taiwan) translation (#2873) 2020-06-01 14:30:53 +03:00
Serge Gautherie 701e6c6a2f
[SNDREC32] Use ShellAboutW(..., ..., NULL, ...) (#2827)
Addendum to 82e4efea77.
2020-06-01 12:17:29 +03:00
Eric Kohl 505b9f8052 [SCHEDSVC] Implement the job start time calculation for given days of month 2020-05-31 22:33:49 +02:00
Eric Kohl d70c64bde0 [SCHEDSVC] Fix the job start time calculation for given days of week. 2020-05-31 15:49:22 +02:00
Serge Gautherie 9a614c82e1
[LABEL] wmain(): Initialize 'szBuffer' (#2867)
Detected by Cppcheck: uninitvar.
2020-05-27 17:05:33 +02:00
Serge Gautherie 11345aedd8
[FORMATTING] [CMAKE] Remove space in 'if (' (#2847) 2020-05-26 20:24:02 +02:00
Jose Carlos Jesus 9619dd4598
[RAPPS] Update Portuguese translation (#2820)
Update translation following PR #2792.
2020-05-23 15:17:52 +02:00
Eric Kohl 1b90e54242 [BROWSER] Add the browser service 2020-05-21 22:49:33 +02:00
Eric Kohl 80b139d726 [UMPNPMGR] Start work on PNP_GetNextResDes() 2020-05-21 21:51:06 +02:00
He Yang e5336bd2af
[RAPPS] Rapps trivial fixes (#2819)
- Specify W explicitly for URL_COMPONENTS;
- Remove malloc/free for once used HostName in urlComponents;
- Use PathAppendW to operate on path string.
2020-05-21 00:21:26 +02:00
Eric Kohl 38494d0997 [UMPNPMGR] Improve some debug messages 2020-05-20 19:56:30 +02:00
Kyle Katarn 637b1e8661
[RAPPS] French translation update following PR #2792 (#2815) 2020-05-20 16:05:12 +02:00
He Yang a21d959e90
[RAPPS] Move database source URL to settings dialog (#2792)
- Add download source in settings dialog, and apply it when download .cab file
- Now user should specify full rappmgr.cab URL
- Check if URL is vaild in settings dialog
- Move source settings to the end of struct (will refactor settings to one value per option later)
2020-05-19 20:06:10 +03:00
Hermès Bélusca-Maïto 240f6737e9
[CMD] Add a ExecuteCommandWithEcho() helper and use it in Batch() and as the implementation of RunInstance() FOR-loop helper. 2020-05-18 02:21:57 +02:00
Hermès Bélusca-Maïto ce543fbb72
[CMD] Fix the stop-batch prompt appearance: do not display it more than once in a row. 2020-05-18 02:21:57 +02:00
Hermès Bélusca-Maïto d0ced4ffdf
[CMD] Fix the ErrorMessage() function.
Specify its szFormat parameter optional, and correctly initialize the
szMessage buffer.
2020-05-18 02:21:56 +02:00
Adam Stachowicz cc662bfde8
[EVENTVWR] Update polish translation (#2804)
After commit 8756cec0.
2020-05-17 23:39:56 +02:00
Kyle Katarn 8756cec0e3
[EVENTVWR] Implementation of Properties page functionnal code. (#2744)
Implementation of functional code for log properties page in order to allow user to :
- Make modification and have them taken into account when properties page is closed / apply is used;
- Set defaults (including correction of default max size);
- Delete content of log;
- Make "Apply" button functional based on user inputs;
- Correct default value during installation (duration, size).

- Improve InitPropertiesDlg() error;
- Fix SavePropertiesDlg(): When the event log key does not exist, it is not recreated by the event log viewer.
- GetDisplayNameFileAndID(): Show the error also when opening the event log key fails.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-05-17 18:54:39 +02:00
Hermès Bélusca-Maïto 591f7ff5d7
[CHARMAP_NEW] Remove non-existing entries. 2020-05-17 18:46:42 +02:00
Julen Urizar Compains 546862babc
[TRANSLATION] Update Spanish, and add Basque translation (#2667)
Add/update translation for:
charmap_new, logoff, mspaint, notepad, usetup, welcome,
hotplug.cpl, sysdm.cpl, aclui.dll, comctl32.dll, comdlg32.dll,
hhctrl.ocx, kernel32.dll, msi.dll, oledlg.dll, shell32.dll,
tapiui.dll, themeui.dll, wininet.dll, winmm.dll, wldap32.dll,
winsrv.dll.
2020-05-17 18:46:36 +02:00
Katayama Hirofumi MZ fe9838f578
[SERVICES][DCOMLAUNCH] Don't hardcode C: drive (#2779)
CORE-13235
2020-05-17 17:45:56 +09:00
Kyle Katarn 4d1cd72317
[REGEDIT] Fix and improvement in TreeView (Null handle check, incorrect display after edit, WM_NOTIFY refactor) (#2733)
* - Fix of missing invalid handle check
- Fix of Address & status bar incorrect display after rename
- Refactoring of Treeview WM_NOTIFY code, for better consistency with WM_NOTIFY management for ListView

* Fix following review (space in #define)

* Cleanup following review

* fix following review

* Fix of round 3 of review comments

* UpdateAdress kept in its original location

* fix

* fix (extern missing)

* both extern removed

* Review comments
Error message being added in order to support CORE-17048
2020-05-16 21:23:20 +09:00
Kyle Katarn 82e4efea77
[SNDREC32] Use the ShellAboutW API routine to display the about dialog (#2754) 2020-05-14 14:30:57 +02:00
Kyle Katarn 4b479d19e6
[SERVMAN] Use the ShellAboutW API routine to display the about dialog (#2752) 2020-05-14 14:30:35 +02:00
Kyle Katarn a6084d7440
[RAPPS] Use ShellAbout() to display the about dialog (#2751)
As the dialog simply displays the copyright names and nothing particular it makes sense to use ShellAboutW() instead.
2020-05-14 15:28:57 +03:00
Katayama Hirofumi MZ b1519f65a7
[MPLAY32] Don't hardcode C: drive (#2778)
CORE-13235
2020-05-13 22:36:44 +09:00
He Yang 2f56ccafe0
[RAPPS] Corrections for Chinese Simplified dialog UI translation (#2781) 2020-05-13 15:26:29 +03:00
Yaroslav Kibysh a76c7ea9fc
[NOTEPAD] Update Ukrainian translation (#2775) 2020-05-13 15:12:22 +03:00
Katayama Hirofumi MZ 278f563e04
[FTP] Don't hardcode C: drive (#2767)
CORE-13235
2020-05-13 13:42:18 +09:00
Mark Jansen 909f50a857
[FONTVIEW] Ensure the extension filter is properly double-null terminated 2020-05-11 20:52:30 +02:00
Hermès Bélusca-Maïto 9c11be5a3a
[CMD] Quick fix for the REM command parser. CORE-17030 2020-05-11 04:27:12 +02:00
Eric Kohl 4246b64dcb [UMPNPMGR] Implement PNP_GetFirstLogConf and PNP_GetNextLogConf (WIP)
- PNP_GetFirstLogConf only works for resources lists.
- PNP_GetNextLogConf does not return a valid tag yet.
2020-05-10 20:46:41 +02:00
Kyle Katarn a2a24cadae
[SNDREC32] French translation update (#2761)
And add/fix colliding keyboard accelerators.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-05-10 18:22:13 +02:00
Eric Kohl 592bafd60a [ARP] Print a message when there is no relevant entry to be shown 2020-05-10 09:05:52 +02:00
Eric Kohl 5ebde7139a [ARP] Coding style fixes only 2020-05-10 08:24:10 +02:00
Eric Kohl e31069738f [ARP] Improvements to ARP
- Print message on failed memory allocations.
- Functions return error code instead of exit code.
- Convert error code to exit code in the main function only.
- Always free the allocated memory.
- Fix bug from previous commit: Use _tprintf instead _putts to print messages.
2020-05-10 00:46:42 +02:00
Kyle Katarn d839e3d9b4
[SNDREC32] Fix incorrect opaque text rendering (#2760)
Remove "Opaque" parameter so that the transparency can be correctly used.
2020-05-09 21:09:58 +09:00
Eric Kohl ac01e4cd72 [ARP] Replace some hard-coded strings by message resources 2020-05-09 12:30:11 +02:00
George Bișoc 2c80432268
[UTILMAN] Use the ShellAboutW API routine to display the about dialog (#2743)
In addition to that, add the missing function prototypes in the DLL dialog header of Utilman, add missing IN/OUT annotations and remove CheckUtilityState() prototype which is barely used (it's not implemented either).
2020-05-07 13:01:36 +02:00
Kyle Katarn d635ce0cc0
[SYSDM][DESK] Fix GetDC/ReleaseDC error management (#2707)
## Purpose
[SYSDM]
- When closing System Properties page, log show
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
because GetDC() is called (multiple times) without properly calling ReleaseDC() as required in order to release a device context.
- This module also lacks some error management in case null DC are provided (on error).
- LiveCD Userinit, based on SYSDM is affected too.

[DESK]
- Fix missing ReleaseDC related to the spectrum (color depth)

## Proposed changes
- ReleaseDC() added.
- Error management in case of null DC.
- Overall alignement of LiveCD Userinit and SYSDM.
2020-05-07 12:57:46 +02:00
He Yang a7b111f550
[RAPPS] 64bit compatibility fix (#2748)
Change SetWindowLongW to SetWindowLongPtrW.

It's the same (because the value is 0) but I think it's better.
2020-05-07 18:08:08 +09:00
Mark Jansen a0e32d4f48
[USERINIT] Add unattend.inf functionality to livecd 2020-05-05 20:54:30 +02:00
Kyle Katarn 0461de33c5
[REGEDIT] Fix HeapFree() on the wrong variable (#2736)
- When exporting registry keys (to .reg files) some variables from the heap are not free'd while the debug log indicates "HEAP: Trying to free an invalid address".
- This is due to the export_registry_key() function that calls
HeapFree() for reg_key_name. But this variable is an argument provided by the caller, which is always a statically defined array of WCHAR.
- Meanwhile reg_key_name_buf is never free'd and cause a memory leak each time the function gets called.
2020-05-05 11:44:45 +03:00
Mark Jansen 86572f1f69
[RAPPS] Fix the locale fix 2020-05-03 20:33:23 +02:00
Mark Jansen cf9ba2b9ce
[RAPPS] Fix locale fallback code 2020-05-03 18:33:06 +02:00
Piotr Hetnarowicz 4d8a5e921e
[WELCOME] pl-pl update (#2717)
welcome.exe pl-pl update
2020-05-03 15:30:04 +02:00
Adam Stachowicz d53ee9c69e [RAPPS] Polish translation
After fb1582d330
2020-05-02 13:22:48 +02:00
Kyle Katarn bfd02fa107
[SNDVOL32] Fix GetDC/ReleaseDC error management (#2713)
GetDC() is called without properly calling ReleaseDC() as required in order to releases a device context. Similar to #2707
2020-05-02 18:43:30 +09:00
Kyle Katarn fb1582d330
[RAPPS] Add error messages on all download failure cases
- Implement error message for all failure condition of RAPPS Download
- Implement logging for failure conditions not needing user complementary awareness (cancellation)
- Support for localization
CORE-16851
2020-05-01 23:52:57 +02:00
Kyle Katarn b3947d5283
[SERVMAN] UI update and Error Management (#2653)
Purpose
=======
- Current design does not warn user nor logs DEBUG traces when Service Start/Stop command fails or reach timeout.
- Current Service Start/Stop progress window are WS_EX_TOOLWINDOW which reduce lisibility, is a ReactOS specificity without good reason.

Proposed changes
================
- DPRINT1 traces added on failure cases.
- Error Message box presented to user upon failure with explicit root cause identification.
- Change Dialog definition to standard window.
2020-05-01 19:01:59 +02:00
Eric Kohl 16d136a63e [NET][MC] Replace the last string resource by a message from netmsg.dll.
- Move translations to netmsg.dll.
- Keep italian translation as a comment because netmsg.dll does not have an italian translation yet.
- Remove obsolete resource files.
2020-05-01 10:27:26 +02:00
Katayama Hirofumi MZ 5765c5be26 [UTILMAN] Add Japanese translation 2020-05-01 10:34:36 +09:00
Katayama Hirofumi MZ 4fda2f9753 [CMDUTILS][LABEL] Improve Japanese translation 2020-05-01 10:31:11 +09:00
Stanislav Motylkov 3846bd87d9
[UTILMAN] Fix build
Addendum to ac87614.
2020-04-30 21:18:14 +03:00
Stanislav Motylkov e1aa9a9c46
[LABEL] Update Russian translation
Addendum to 6bfe4f6 and 87ecf82. CORE-9444
2020-04-30 20:59:53 +03:00
Stanislav Motylkov ac876146bc
[UTILMAN] Add Russian translation
Addendum to 975d417.
2020-04-30 20:59:25 +03:00
Hermès Bélusca-Maïto 7ba93b9463
[SMSS] Fix build complaint. 2020-04-30 18:39:07 +02:00
Hermès Bélusca-Maïto 756152936b
[SMSS] Fix PROCESSOR_IDENTIFIER environment variable assignment.
The swprintf() formatting string slot was incorrect.
Adapted from a patch by Kyle Katarn, PR #2697.
2020-04-30 14:02:04 +02:00
He Yang 2b6b873cdd
[LABEL] Update Chinese Simplified translation (#2692) 2020-04-29 16:01:10 +03:00
Katayama Hirofumi MZ 7fe7f5e4c1 [MSPAINT] Follow-up of #2686
Show error message if SaveDIBToFile failed.
CORE-16982, CORE-16979
2020-04-29 08:39:47 +09:00
Katayama Hirofumi MZ 036206a1c3
[MSPAINT] Refactor loading/saving image file (#2686)
- Add DoLoadImageFile, CreateWhiteDIB, and CMainWindow::ConfirmSave functions.
- Replace LoadDIBFromFile function with DoLoadImageFile.
- Fix the empty file loading.
- Delete UpdateApplicationProperties function.
- Rewrite SaveDIBToFile function.
CORE-16982, CORE-16979
2020-04-29 07:44:18 +09:00
Piotr Hetnarowicz df00137ccc
[LABEL] Update Polish translation (#2678)
Co-Authored-By: Adam Słaboń <asaillen456esx@gmail.com>
2020-04-27 22:49:33 +03:00
Kyle Katarn 6133d55190
[EXPLORER] Fix incorrect component position and size for French language (#2671)
CORE-16930, CORE-12386
2020-04-27 12:32:42 +02:00
Serge Gautherie 96b7cb1a4f [EXPLORER] trayclock: Update timer delay when showing seconds is modified 2020-04-26 21:41:39 +03:00
Serge Gautherie e68bee7518 [EXPLORER] trayclock: Better handle timers, especially when it is hidden 2020-04-26 21:41:39 +03:00
Serge Gautherie e45b15aca2 [EXPLORER] CTrayClockWnd::CalculateDueTime(): Fix uiDueTime value
when showing seconds.
2020-04-26 21:41:39 +03:00
Mark Jansen 1439bbdea0
[USETUP] Fix the build for msvc 2020-04-26 17:01:08 +02:00
Hervé Poussineau 2391e31cf0 [USETUP] Move loading of requested font from blue.sys to usetup 2020-04-26 14:59:04 +02:00
Hervé Poussineau 04ec14e23e [USETUP] Support a custom way to extract files for cabinet files
This will be used to extract files from cabinet to memory, instead of
writing them to disk.
2020-04-26 14:57:40 +02:00
Hervé Poussineau 0d51c71ed7 [USETUP] Optimize font loading
Reload a new font only if codepage changed.
2020-04-26 14:57:38 +02:00
William Kent 97fb49a3d2
[FONTS] Add Selawik as a substitution for Segoe UI 2020-04-26 15:31:16 +03:00
Bișoc George e4f70e5434
[UTILMAN] Properly annotate some variables (#2561)
Previously the code had a mixture of 'sz', 'wsz', 'lp' and 'lpwsz' Hungarian annotation prefixes which could bring confusions about the nature of the annotated variables. From now on all of these variables have a well defined annotation. Furthermore, add a missing argument annotation to LaunchProcess().
2020-04-26 14:14:17 +02:00
47b0f9a907
Update zh-CN.rc (#2522) 2020-04-26 15:00:02 +03:00
Bișoc George 4247e3f838
[UTILMAN] Add Romanian and Italian translations (#2562) 2020-04-26 13:14:44 +02:00
Victor Perevertkin ba0a3d4032
[IEXPLORE] Make duckduckgo our default search engine 2020-04-26 13:36:33 +03:00
Katayama Hirofumi MZ 0cc32161d1
[MSPAINT] Add to recent documents (#2651)
Add to recent documents upon file save. CORE-3588
2020-04-26 09:07:14 +09:00
Katayama Hirofumi MZ f28cc0fc78
[NOTEPAD] Add to recent documents (#2649)
Add to recent documents upon file save. CORE-3588
2020-04-26 09:06:39 +09:00
Robert Naumann 032b5aacd2 [CONTROL] Fix hang while calling RunControlPanel() CORE-11373
- based on a patch by Jira user "wimh"
- also addressed Hermes' suggestion to use ARRAYSIZE instead of MAX_PATH
2020-04-25 19:04:09 +02:00
Serge Gautherie 5ce61092b5 [EXPLORER] Update now-redirected 'http' and 'www.reactos.org' URLs 2020-04-23 10:20:15 +02:00
Thomas Faber 5a5ba1ad10
[SHSVCS] Don't call UnregisterWait from within the wait callback.
Doing this causes deadlocks, the process runs out of worker threads and
the system runs out of memory by allocating too many I/O completion ports
when using ntdll.dll from Windows.
2020-04-22 12:37:26 +02:00
Serge Gautherie 333b7f254b
[IEXPLORE] Update now-redirected 'http' and 'www.reactos.org' URLs (#2619) 2020-04-22 14:45:12 +09:00
Serge Gautherie c62b7a67ef
[USETUP] Update now-redirected 'http' and 'www.reactos.org' URLs (#2622)
NB:
http://www.reactos.org/uk/
is not updated, as it returns
Error 404 - Page not found.
2020-04-22 14:44:13 +09:00
Serge Gautherie 03006ecfad
[RAPPS] Update now-redirected 'http' and 'www.reactos.org' URLs (#2621)
NB:
http://www.reactos.org/wiki/Bulgarian_translation
is not updated, as it returns
Error 404 - Page not found.
2020-04-22 14:42:43 +09:00
Stanislav Motylkov bc7c8ed45b
[REGEDIT] Improve Russian translation
Also fix minor issues in other translations. CORE-16914
2020-04-21 02:30:21 +03:00
Sylvain Deverre 0a271bb106 [RAPPS] Addendum to previous commit, fix condition 2020-04-20 18:45:37 +02:00
Kyle Katarn 779f31a731
[RAPPS] Proxy fields default state fix (CORE-16853) (#2594)
* Fix for CORE-16853 https://jira.reactos.org/browse/CORE-16853

Co-authored-by: Sylvain Deverre <deverre.sylv@gmail.com>
2020-04-20 18:30:33 +02:00
Mark Jansen 5cee1b95c0 [EXPLORER] Keep processing messages while waiting for a startup task
CORE-16909
2020-04-20 15:37:19 +03:00
Stanislav Motylkov 435d2b5652
[REGEDIT] Improve Russian translation
CORE-16913
2020-04-20 01:44:45 +03:00
Eric Kohl c832112771 [REGEDIT] Fix tree view popup menu issues
Move the tree view popup menu code from the childwindow to the framewindow.

CORE-16887
2020-04-19 15:14:44 +02:00
Piotr Hetnarowicz 154917e72e
[TASKKILL] Polish translation update (#2566) 2020-04-18 19:19:31 +02:00
Joachim Henze 25fd966e1b [SERVMAN] CORE-16879 fr-FR Update
Avoid text truncation and realign controls.
2020-04-18 16:38:59 +02:00
Joachim Henze 47744a97a9 [SERVMAN] CORE-16879 RC en-US & de-DE Pixel Tweaking
The left x-margin was inconsistent within 'General'-tab
and tabbing through multiple tabs looked unprofessional
because 'General'-tab had much smaller left-margin.
2020-04-18 15:34:04 +02:00
Joachim Henze c6dc574390 [SERVMAN] RC Update All languages
Align a treeviews horizontal and vertical size
to exactly fit its neighbor treeview in last
tab 'Dependencies'.
Slightly related to CORE-16879.
2020-04-18 14:14:55 +02:00
Kyle Katarn 40e82c4b94
[INETCPL][SERVMAN] French translation update (#2572)
CORE-16900

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-04-18 13:21:37 +02:00
Eric Kohl 45ad7a7ac3 [NOTEPAD] Fix missing french 'About notepad' menu item translation
CORE-16886
2020-04-18 11:28:42 +02:00
Eric Kohl 763de230b2 [REGEIT] Fix inconsistent menu state for 'Permissions'
- Disable the 'Permissions' item in the main menu, when 'My Computer' is selected.
- Enable the 'Permissions' item in the tree view context menu.

CORE-16889
2020-04-18 09:59:41 +02:00
Eric Kohl b280615b85 [REGEDIT] Add a special popup menu for the tree view root item
CORE-16888
2020-04-18 08:53:17 +02:00
Joachim Henze 13dd917589 [REGEDIT] CORE-16892 fr-FR Translation update
Fix 3 text truncations in search-dlg
2020-04-18 01:59:39 +02:00
He Yang 2ac13afefc
[RAPPS] Use _beginthreadex instead of CreateThread (#2552) 2020-04-17 19:27:16 +02:00
Bișoc George 975d417b34
[UTILMAN] Move most of the code in a library (#2530)
Windows XP and Server 2003 Utility Manager has a dedicated library for the resources and other stuff. Utility Manager is just a simple process that loads it. Hence create a library for the program, UManDlg.dll, and move the resources and other stuff there.

In addition to that, use ExtractIconW to get the icon resource from the program (the DLL doesn't share icons by default) and remove the icon resource from the "About" dialog window. Also change the encoding type of other translation files to UTF-8 (which were previously set with UTF-8 with BOM).
2020-04-17 13:42:47 +03:00
Piotr Hetnarowicz eba6f7dad0
[SHUTDOWN] Update Polish translation (#2557) 2020-04-16 21:48:16 +02:00
Piotr Hetnarowicz 864271120d
[CHARMAP] Update Polish translation (#2555) 2020-04-16 21:47:51 +02:00
Piotr Hetnarowicz 9b43dce094 [attrib] pl-pl lang update 2020-04-16 18:32:22 +02:00
Piotr Hetnarowicz cd5364ae8e [cmd] pl-pl update 2020-04-16 18:32:08 +02:00
Victor Perevertkin 7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00
Piotr Hetnarowicz 97bb1fa49a
[WINLOGON] Update Polish translation (#2363) 2020-04-16 12:17:02 +03:00
Charles Ambrye d90e1061e1
[CHARMAP] Updates to behaviour and UI (#2543)
Purpose
~=~=~=~

This pull request updates charmap to look a bit better (removes gap at bottom of the window), removes the blank space character (0x0020) from the charmap, and also modifies the behaviour of when a larger glyph is rendered (allowing the user to select a new glyph by holding down the mouse button). This better mimics the charmap.exe that is bundled by Microsoft.

Proposed changes
~=~=~=~=~=~=~=~=

- Remove gap where the advanced button is normally rendered when compiled with REMOVE_ADVANCED (which is the default behaviour).
- Skip over the blank space character.
- Change behaviour of rendering large glyphs to allow mouse move, and to hide on double click.
- Optimize search for glyph under the mouse by using the cellSize instead of PtInRect.


* [CHARMAP] Resize the window slightly when compiled with REMOVE_ADVANCED to avoid deadspace at the bottom of the window

* [CHARMAP] Skip over the non-printable characters by starting with character ' ' + 1

* [CHARMAP] Instead of iterating over every cell, simply compute the cell x and y using the CellSize

Modify behaviour of charmap to allow large character render on mouse move, only hiding the larger character on double click.
2020-04-15 23:31:16 +02:00
Julen Urizar Compains d7a632a094
[TRANSLATION] Spanish minor fixes (#2547)
Translations for:
- Applications: clipbrd, dxdiag, rapps,
- cmdutils: attrib, find, help, label, reg, xcopy
- usetup
- dlls: browseui, shell32, syssetup

- Add Spanish translation for Accesibility Utility (utilman).

Update for the "Choose product options" strings in syssetup:

Originally "ProductType" and "ProductSuite" (typesetted without spaces) were the registry value names where these settings would go, but since it's meaningless to show these values it's better instead to use human-readable names with correct translation and spacing.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-04-15 13:27:36 +02:00
Joachim Henze 951e5f2851 [DXDIAG] fr-FR Translation Addendum CORE-12477 part 3/3
Leave english strings untouched regarding space before colon.
Thanks to HBelusca for review as well.
I hope next one translating these will take care still.
2020-04-14 00:42:33 +02:00
Joachim Henze f03c4c4378 [DXDIAG] fr-FR Translation Addendum CORE-12477
Addendum to 0.4.14-dev-1405-g
dcc6dcb0bd

Readd all spaces before the colons that I removed,
as that is a french speciality and was correct,
and also add some more of those that were missing even
before my commit (was inconsistent).

Thanks to Serge Gautherie, Thomas Faber and hpoussin
for the review.
2020-04-14 00:06:48 +02:00