A free Windows-compatible Operating System - mirrored from GitHub
Go to file
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
.github [GITHUB] Remove the hack for msvc-amd64 build 2020-08-31 03:53:25 +03:00
.theia [GITPOD]Add gitpod config 2020-04-02 18:03:18 +02:00
base [CMD] FOR: Additional Windows' CMD compatibility "fixes" for FOR /F token parsing command. 2020-09-21 03:31:01 +02:00
boot [BOOTDATA] Use reactos subfolder as source dir on bootcd for now 2020-09-20 23:08:17 +02:00
dll [RTL] Add code to SxS manifest parser to parse XML namespaces (#2512) 2020-09-20 22:56:42 +02:00
drivers [REACTOS] *.spec: Fix some function/parameter types (#3154) 2020-09-20 19:21:11 +02:00
hal [HAL] Use iretq instead of iret 2020-09-20 23:08:17 +02:00
media [DOC] Update README.WINE to reflect dbghelp latest status 2020-09-16 10:36:03 +02:00
modules [RTL] Add code to SxS manifest parser to parse XML namespaces (#2512) 2020-09-20 22:56:42 +02:00
ntoskrnl [NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything. 2020-09-20 23:08:17 +02:00
sdk [NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything. 2020-09-20 23:08:17 +02:00
subsystems [CSRSRV] CsrUnhandledExceptionFilter: Check RtlAdjustPrivilege() result (#2864) 2020-06-01 20:20:31 +02:00
win32ss [REACTOS] *.spec: Fix some function/parameter types (#3154) 2020-09-20 19:21:11 +02:00
.clang-format [REACTOS] Introduce .clang-format file 2019-12-28 01:23:49 +02:00
.editorconfig Remove the 'end_of_line' value. Addendum to 32db19f6 - PR #2528 2020-04-11 17:56:23 +02:00
.gitattributes Fix remaining text file line endings in the tree. (#18) 2017-10-06 15:00:36 +02:00
.gitignore [GITIGNORE] Remove "build" folder, which discards some commited files 2020-04-24 12:44:05 +03:00
.gitmessage [CONTRIBUTING] Update .gitmessage 2018-02-25 16:14:41 +02:00
.gitpod.Dockerfile [GITPOD]Add gitpod config 2020-04-02 18:03:18 +02:00
.gitpod.yml [GITPOD]Add gitpod config 2020-04-02 18:03:18 +02:00
apistatus.lst
CMakeLists.txt [CMAKE] Add baseaddress_msvc_x64.cmake 2020-09-20 23:08:17 +02:00
CODE_OF_CONDUCT.md Add a document on the rules we should follow while managing/reviewing PRs, 2018-06-24 17:00:00 +02:00
CODEOWNERS [CODEOWNERS] Update translation section (#2679) 2020-04-30 01:40:35 +03:00
configure.cmd [REACTOS] Drop support for Visual Studio below 2015 2020-05-04 21:47:37 +03:00
configure.sh Rework host tools 2019-08-17 17:39:31 +02:00
CONTRIBUTING.md [REACTOS] Remove some ending spaces 2020-04-24 02:32:05 +03:00
COPYING
COPYING.ARM
COPYING.LIB
COPYING3
COPYING3.LIB
CREDITS [CREDITS] Add myself to the credits document (#2747) 2020-05-07 12:39:44 +02:00
Doxyfile [DOXYGEN] Update Doxyfile for our build of Doxygen 1.8.15. 2019-01-15 09:37:54 +01:00
INSTALL [REACTOS] Remove some ending spaces 2020-04-24 02:32:05 +03:00
overrides-gcc.cmake [CMAKE] Clear CMAKE_<LANGUAGE>_IMPLICIT_LINK_LIBRARIES and 2019-04-06 17:43:38 +02:00
overrides-msvc.cmake CORE-14513 [CMAKE] Remove modules that are shipped with cmake (#575) 2018-08-19 22:01:31 +02:00
PreLoad.cmake
PULL_REQUEST_MANAGEMENT.md Add a document on the rules we should follow while managing/reviewing PRs, 2018-06-24 17:00:00 +02:00
README.md [README] Add a legal notice about WRK (#2953) 2020-08-16 15:52:57 +03:00
toolchain-clang.cmake [CMAKE] Remove obsolete '_ROSBE_VERSION' checks 2020-09-10 18:16:36 +02:00
toolchain-gcc.cmake [CMAKE] Remove obsolete '_ROSBE_VERSION' checks 2020-09-10 18:16:36 +02:00
toolchain-msvc.cmake [CMAKE] Avoid deprecated CMakeClDeps and CMakeForceCCompiler. CORE-17202 2020-08-23 12:07:32 +02:00

ReactOS


ReactOS 0.4.13 Release Download ReactOS SourceForge Download License Donate Follow on Twitter

WebsiteOfficial chatWikiForumJIRA Bug TrackerReactOS Git mirrorTestman

What is ReactOS?

ReactOS™ is an Open Source effort to develop a quality operating system that is compatible with applications and drivers written for the Microsoft® Windows™ NT family of operating systems (NT4, 2000, XP, 2003, Vista, Seven).

The ReactOS project, although currently focused on Windows Server 2003 compatibility, is always keeping an eye toward compatibility with Windows Vista and future Windows NT releases.

The code of ReactOS is licensed under GNU GPL 2.0.

ReactOS is currently an Alpha quality operating system. This means that ReactOS is under heavy development, things may not work well and it can corrupt the data present on your hard disk. It is recommended to test ReactOS on a virtual machine or on a computer with no sensitive or critical data!

Building

Build rosbewin.badge rosbeunix.badge coverity.badge

To build the system it is strongly advised to use the ReactOS Build Environment (RosBE). Up-to-date versions for Windows and for Unix/GNU-Linux are available from our download page at: "Build Environment".

Alternatively one can use Microsoft Visual C++ (MSVC) version 2015+. Building with MSVC is covered here: "Visual Studio or Microsoft Visual C++".

See "Building ReactOS" article for more details.

Binaries

To build ReactOS you must run the configure script in the directory you want to have your build files. Choose configure.cmd or configure.sh depending on your system. Then run ninja <modulename> to build a module you want or just ninja to build all modules.

Bootable images

To build a bootable CD image run ninja bootcd from the build directory. This will create a CD image with a filename bootcd.iso.

You can always download fresh binary builds of bootable images from the "Daily builds" page.

Installing

By default, ReactOS currently can only be installed on a machine that has a FAT16 or FAT32 partition as the active (bootable) partition. The partition on which ReactOS is to be installed (which may or may not be the bootable partition) must also be formatted as FAT16 or FAT32. ReactOS Setup can format the partitions if needed.

Starting with 0.4.10, ReactOS can be installed using the BtrFS file system. But consider this as an experimental feature and thus regressions not triggered on FAT setup may be observed.

To install ReactOS from the bootable CD distribution, extract the archive contents. Then burn the CD image, boot from it, and follow the instructions.

See "Installing ReactOS" Wiki page or INSTALL for more details.

Testing

If you discover a bug in ReactOS search on JIRA first - it might be reported already. If not report the bug providing logs and as much information as possible.

See "File Bugs" for a guide.

NOTE: The bug tracker is not for discussions. Please use our official chat or our forum.

Contributing prwelcome.badge

We are always looking for developers! Check how to contribute if you are willing to participate.

Legal notice: If you have seen proprietary Microsoft Windows source code (including but not limited to the leaked Windows NT 3.5, NT 4, 2000 source code and the Windows Research Kernel), your contribution won't be accepted because of potential copyright violation.

Try out cloud-based ReactOS development using Gitpod and Docker:

Open in Gitpod

You can also support ReactOS by donating! We rely on our backers to maintain our servers and accelerate development by hiring full-time devs.

More information

ReactOS is a Free and Open Source operating system based on the Windows architecture, providing support for existing applications and drivers, and an alternative to the current dominant consumer operating system.

It is not another wrapper built on Linux, like WINE. It does not attempt or plan to compete with WINE; in fact, the user-mode part of ReactOS is almost entirely WINE-based and our two teams have cooperated closely in the past.

ReactOS is also not "yet another OS". It does not attempt to be a third player like any other alternative OS out there. People are not meant to uninstall Linux and use ReactOS instead; ReactOS is a replacement for Windows users who want a Windows replacement that behaves just like Windows.

More information is available at: reactos.org.

Also see the media/doc subdirectory for some sparse notes.

Who is responsible

Active devs are listed as members of GitHub organization. See also the CREDITS file for others.

Code mirrors

The main development is done on GitHub. We have an alternative mirror in case GitHub is down.

There is also an obsolete SVN archive repository that is kept for historical purposes.