Compare commits

..

38 Commits

Author SHA1 Message Date
Thomas Bluemel
8511832eb4 proper line endings
svn path=/branches/new_headers/; revision=11460
2004-10-25 21:52:24 +00:00
Alex Ionescu
854a2181c8 Merge with HEAD.
svn path=/branches/new_headers/; revision=11459
2004-10-25 14:48:58 +00:00
Alex Ionescu
c2908da73c Delete outdated directories.
svn path=/branches/new_headers/; revision=11458
2004-10-25 14:38:05 +00:00
Alex Ionescu
4b121d6cda Merge with HEAD
svn path=/branches/new_headers/; revision=11456
2004-10-25 03:48:25 +00:00
Alex Ionescu
72ebaa9dc2 *** empty log message ***
svn path=/branches/new_headers/; revision=11455
2004-10-25 03:44:35 +00:00
Alex Ionescu
f64db49677 Merge with HEAD...
svn path=/branches/new_headers/; revision=11454
2004-10-25 03:42:35 +00:00
Alex Ionescu
9634363d10 Merge with HEAD
svn path=/branches/new_headers/; revision=11453
2004-10-25 03:35:51 +00:00
Alex Ionescu
ba36819f21 Merge with HEAD
svn path=/branches/new_headers/; revision=11452
2004-10-25 03:25:47 +00:00
Alex Ionescu
b8896867db merge
svn path=/branches/new_headers/; revision=11451
2004-10-25 03:17:50 +00:00
Alex Ionescu
d2a89785ba cm.h not needed anymore
svn path=/branches/new_headers/; revision=11450
2004-10-25 03:10:21 +00:00
Alex Ionescu
654143716a replaced by helper.h
svn path=/branches/new_headers/; revision=11449
2004-10-25 03:10:02 +00:00
Alex Ionescu
30f570c8ea fix
svn path=/branches/new_headers/; revision=11448
2004-10-25 03:09:39 +00:00
Alex Ionescu
9a754ff4c8 Header fixes, hal fixes.
svn path=/branches/new_headers/; revision=11447
2004-10-25 02:57:20 +00:00
Alex Ionescu
6d74819fdd Fixed hal to build with new headers (Dma patch included, need to test and update in HEAD)
svn path=/branches/new_headers/; revision=11446
2004-10-25 02:26:26 +00:00
Alex Ionescu
6602ba8818 Fix static libs with new headers.
svn path=/branches/new_headers/; revision=11445
2004-10-25 02:25:02 +00:00
Alex Ionescu
aaa290b846 Small fixes to tools.
svn path=/branches/new_headers/; revision=11444
2004-10-25 01:41:01 +00:00
Alex Ionescu
8e937942e8 Update to HEAD makefile
svn path=/branches/new_headers/; revision=11443
2004-10-25 01:36:56 +00:00
Alex Ionescu
744163037a Final addition, regtests. (These additions are due due cvs crashing when making the branch and not adding everythign properly)
svn path=/branches/new_headers/; revision=11442
2004-10-25 01:36:39 +00:00
Alex Ionescu
cb9b3953e0 Add apps/testsets
svn path=/branches/new_headers/; revision=11441
2004-10-25 01:34:08 +00:00
Alex Ionescu
4d771194a4 add wshtcpip
svn path=/branches/new_headers/; revision=11440
2004-10-25 01:32:12 +00:00
Alex Ionescu
9483802604 syscall interfaces
svn path=/branches/new_headers/; revision=11439
2004-10-25 01:29:47 +00:00
Alex Ionescu
055d984e0c Delete loaders
svn path=/branches/new_headers/; revision=11438
2004-10-25 01:28:27 +00:00
Alex Ionescu
612443c871 Reactos/Wine Headers
svn path=/branches/new_headers/; revision=11437
2004-10-25 01:25:27 +00:00
Alex Ionescu
9d4c85dc92 NDK Headers
svn path=/branches/new_headers/; revision=11436
2004-10-25 01:24:07 +00:00
Alex Ionescu
1e7dfe89cb GL Headers
svn path=/branches/new_headers/; revision=11435
2004-10-25 01:23:08 +00:00
Alex Ionescu
57cbe8d030 New DDK Headers
svn path=/branches/new_headers/; revision=11434
2004-10-25 01:19:40 +00:00
Alex Ionescu
5b41408513 *** empty log message ***
svn path=/branches/new_headers/; revision=11433
2004-10-25 01:18:26 +00:00
Alex Ionescu
bc1c5d2191 New Headers
svn path=/branches/new_headers/; revision=11432
2004-10-25 01:17:29 +00:00
Alex Ionescu
59f2e2567a Fix the mess CVS did
svn path=/branches/new_headers/; revision=11431
2004-10-25 01:10:20 +00:00
Alex Ionescu
e97660370d Headers..
svn path=/branches/new_headers/; revision=11430
2004-10-24 23:10:56 +00:00
Alex Ionescu
cf448f5d64 Headers
svn path=/branches/new_headers/; revision=11429
2004-10-24 23:09:23 +00:00
Alex Ionescu
94d7be9414 Some lib fixes for static libs with new headers..ongoing..buggy.
svn path=/branches/new_headers/; revision=11428
2004-10-24 23:07:05 +00:00
Alex Ionescu
b761049235 Headers...
svn path=/branches/new_headers/; revision=11427
2004-10-24 23:06:03 +00:00
Alex Ionescu
28a79f0e6d half header-fixed ntoskrnl...ongoing work.
svn path=/branches/new_headers/; revision=11426
2004-10-24 22:59:45 +00:00
Alex Ionescu
a8082ac387 New Headers, ongoing.
svn path=/branches/new_headers/; revision=11425
2004-10-24 22:58:35 +00:00
Alex Ionescu
a8826aa01f Header-fixed HAL
svn path=/branches/new_headers/; revision=11424
2004-10-24 22:57:52 +00:00
Alex Ionescu
b9cc0c40c0 *** empty log message ***
svn path=/branches/new_headers/; revision=11423
2004-10-24 22:51:28 +00:00
The ReactOS Team
288b7807a5 This commit was manufactured by cvs2svn to create branch 'new_headers'.
svn path=/branches/new_headers/; revision=11421
2004-10-24 17:51:29 +00:00
26101 changed files with 1953336 additions and 7240648 deletions

22
reactos/.cvsignore Normal file
View File

@@ -0,0 +1,22 @@
dist
reactos
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.zip
*.iso
*.cab
doxy-doc

View File

@@ -1,31 +0,0 @@
[patterns]
**.txt = native
**.cmake = native
**.asm = native
**.S = native
**.cxx = native
**.cpp = native
**.hpp = native
**.hxx = native
**.c = native
**.h = native
**.py = native
**.rc = native
**.html = native
**.bat = native
**.cmd = native
**.mak = native
**makefile = native
**.manifest = native
**.properties = native
**.dsp = native
**.sln = native
**.vcproj = native
**.gen = native
**.bmp = BIN
**.cur = BIN
**.ico = BIN
**.jpg = BIN
**.png = BIN
tgzsrc = LF
scripts/ba = LF

View File

@@ -1,235 +0,0 @@
cmake_minimum_required(VERSION 2.6)
if(POLICY CMP0017)
# Shadow cmake provided modules
cmake_policy(SET CMP0017 OLD)
endif()
project(REACTOS)
# Versioning
include(include/reactos/version.cmake)
# Don't escape preprocessor definition values added via add_definitions
cmake_policy(SET CMP0005 OLD)
cmake_policy(SET CMP0002 NEW)
if(POLICY CMP0018)
cmake_policy(SET CMP0018 OLD)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
set(CMAKE_COLOR_MAKEFILE OFF)
#set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
if(NOT ARCH)
set(ARCH i386)
endif()
# Now the ARCH variable will be in lowercase.
# It is needed because STREQUAL comparison
# is case-sensitive.
# See http://cmake.3232098.n2.nabble.com/Case-insensitive-string-compare-td7580269.html
# for more information.
string(TOLOWER ${ARCH} ARCH)
# Compile options
if(ARCH STREQUAL "i386")
include(cmake/config.cmake)
elseif(ARCH STREQUAL "amd64")
include(cmake/config-amd64.cmake)
elseif(ARCH STREQUAL "arm")
include(cmake/config-arm.cmake)
endif()
# Compiler flags handling
include(cmake/compilerflags.cmake)
add_definitions(-D__REACTOS__)
if(NOT CMAKE_CROSSCOMPILING)
add_definitions(-DTARGET_${ARCH})
if(MSVC)
if(ARCH STREQUAL "i386")
add_definitions(/D_X86_ /DWIN32 /D_WINDOWS)
endif()
add_definitions(/Dinline=__inline)
else()
add_compile_flags("-fshort-wchar -Wno-multichar")
endif()
include_directories(include/host)
if(NOT MSVC)
add_subdirectory(dll/win32/dbghelp)
endif()
add_subdirectory(tools)
add_subdirectory(lib)
if(NOT MSVC)
export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
else()
export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
else()
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
#useful stuff!
include(CMakeParseArguments)
if(ENABLE_CCACHE)
set(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES OFF)
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES OFF)
endif()
# Default to Debug for the build type
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
# Do some cleanup
file(REMOVE
${REACTOS_BINARY_DIR}/dependencies.graphml
${REACTOS_BINARY_DIR}/boot/ros_livecd.txt
${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt
${REACTOS_BINARY_DIR}/boot/ros_minicd.txt
${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt
${REACTOS_BINARY_DIR}/boot/ros_cab.txt
${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt)
if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR)
set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build)
endif()
set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables")
include(${IMPORT_EXECUTABLES})
if(DBG)
add_definitions(-DDBG=1 -D_SEH_ENABLE_TRACE)
else()
add_definitions(-DDBG=0)
endif()
if(KDBG)
add_definitions(-DKDBG=1)
endif()
if(_WINKD_)
add_definitions(-D_WINKD_=1)
endif()
# Version Options
add_definitions(-DWINVER=0x502
-D_WIN32_IE=0x600
-D_WIN32_WINNT=0x502
-D_WIN32_WINDOWS=0x502
-D_SETUPAPI_VER=0x502)
# Arch Options
if(ARCH STREQUAL "i386")
add_definitions(-D_M_IX86 -D_X86_ -D__i386__ -Di386)
elseif(ARCH STREQUAL "amd64")
add_definitions(-D_M_AMD64 -D_AMD64_ -D__x86_64__ -D_WIN64)
elseif(ARCH STREQUAL "arm")
# _M_ARM is already defined by toolchain
add_definitions(-D_ARM_ -D__arm__)
endif()
# Other
if(ARCH STREQUAL "i386")
add_definitions(-DUSE_COMPILER_EXCEPTIONS -D_USE_32BIT_TIME_T)
elseif(ARCH STREQUAL "amd64")
add_definitions(-DUSE_COMPILER_EXCEPTIONS -DNO_UNDERSCORE_PREFIX)
elseif(ARCH STREQUAL "arm")
add_definitions(-DUSE_COMPILER_EXCEPTIONS)
endif()
# Activate support for assembly source files
enable_language(ASM)
# Activate language support for resource files
enable_language(RC)
# Localization definitions
include(cmake/localization.cmake)
set(I18N_DEFS "")
# This will set I18N_DEFS for later use
set_i18n_language(${I18N_LANG})
# Compiler specific definitions and macros
if(MSVC)
include(cmake/msvc.cmake)
else()
include(cmake/gcc.cmake)
endif()
# Generic macros
include(cmake/CMakeMacros.cmake)
# IDL macros for widl/midl
# We're using widl now for both MSVC and GCC builds
include(cmake/widl-support.cmake)
include_directories(
include
include/psdk
include/dxsdk
${REACTOS_BINARY_DIR}/include
${REACTOS_BINARY_DIR}/include/psdk
${REACTOS_BINARY_DIR}/include/dxsdk
${REACTOS_BINARY_DIR}/include/reactos
include/crt
include/ddk
include/ndk
include/reactos
include/reactos/libs)
if(ARCH STREQUAL "arm")
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/arm)
endif()
add_dependency_header()
add_subdirectory(include/psdk)
add_subdirectory(include/dxsdk)
add_subdirectory(include/reactos/wine)
add_subdirectory(include/reactos/mc)
add_subdirectory(include/asm)
include(cmake/baseaddress.cmake)
# For MSVC builds, this puts all debug symbols file in the same directory.
set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/msvc_pdb")
#begin with boot so reactos_cab target is defined before all other modules
add_subdirectory(boot)
add_subdirectory(base)
add_subdirectory(dll)
add_subdirectory(drivers)
add_subdirectory(hal)
add_subdirectory(lib)
add_subdirectory(media)
add_subdirectory(modules)
add_subdirectory(ntoskrnl)
add_subdirectory(subsystems)
add_subdirectory(tools/wpp)
add_subdirectory(win32ss)
# Create {bootcd, livecd, bootcdregtest}.lst
create_iso_lists()
file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/include/reactos)
add_dependency_footer()
endif()

View File

@@ -1,12 +1,13 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +16,7 @@ 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 Lesser General Public License instead.) You can apply it to
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
@@ -55,8 +56,8 @@ 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
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +111,7 @@ above, provided that you also meet all of these conditions:
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
@@ -168,7 +169,7 @@ 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
@@ -225,7 +226,7 @@ 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
@@ -255,7 +256,7 @@ 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
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
@@ -277,9 +278,9 @@ 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
How to Apply These Terms to Your New Programs
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
@@ -291,7 +292,7 @@ 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) <year> <name of author>
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
@@ -303,16 +304,16 @@ the "copyright" line and a pointer to where the full notice is found.
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.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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) year name of author
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.
@@ -335,14 +336,5 @@ necessary. Here is a sample; alter the names:
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 Lesser General
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
ReactOS may be used, runtime linked, and distributed with non-free software
(meaning that such software has no obligations to open-source, or render
free, their non-free code) such as commercial device drivers and commercial
applications. This exception does not alter any other responsibilities of
the licensee under the GPL (meaning that such software must still obey
the GPL for the free ("open-sourced") code that has been integrated into
the said software).

View File

@@ -1,23 +0,0 @@
Copyright 2008 ReactOS Portable Systems Group. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE REACTOS PORTABLE SYSTEMS GROUP ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REACTOS PORTABLE SYSTEMS GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of the ReactOS
Project.

View File

@@ -1,504 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, 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 library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License along with the
Library.
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 Library or any portion
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
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 Library, 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 Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you 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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
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 with
this License.
11. 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 Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
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 Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
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
state 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) <year> <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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser 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
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1,82 +1,78 @@
ReactOS is available thanks to the work of:
ReactOS is available thanks to the work of
Aleksey Bragin <aleksey at reactos org>
Alex Ionescu <alex.ionescu@reactos.org>
Amine Khaldi <amine.khaldi@reactos.org>
Andrew Greenwood <lists@silverblade.co.uk>
Andrew Munger <waxdragon@gmail.com>
Arindam Das
Art Yerkes <ayerkes@speakeasy.net>
Ariadne
Brandon Turner <turnerb7@msu.edu>
Brian Palmer <brianp@sginet.com>
Cameron M. Gutman <cgutman@reactos.org>
Casper S. Hornstrup <chorns@users.sourceforge.net>
Christoph von Wittich <christoph_vw@reactos.org>
Daniel Reimer <reimer.daniel@freenet.de>
David Welch <welch@cwcom.net>
Dmitry Chapyshev <dmitry@reactos.org>
Emanuele Aliberti <ea@iol.it>
Eric Kohl
Eugene Ingerman <geneing@myrealbox.com>
Filip Navara <xnavara@volny.cz>
Frederik Leemans
Ge van Geldorp <ge@gse.nl>
Ged Murphy <gedmurphy@reactos.org>
Gregor Brunmar <gregor brunmar at home se>
Gregor Schneider <grschneider@gmail.com>
Guido de Jong
Gunnar Andre' Dalsnes <hardon@online.no>
Hans Kremer
Hartmut Birr <hartmut.birr@gmx.de>
Hernan Ochoa
Herve Poussineau <hpoussin@reactos.com>
Iwan Fatahi <i_fatahi@hotmail.com>
James Tabor <james.tabor@reactos.org> <jimtabor.rosdev@gmail.com> <jamestabor_rosdev@yahoo.com>
Jason Eager
Jason Filby <jasonfilby@yahoo.com>
Jason Weiler
Jean Michault
Jeffrey Morlan <mrnobo1024@yahoo.com>
Jim Noeth
Johannes Anderwald <johannes.anderwald@reactos.org>
Jonathan Wilson <jonwil@tpgi.com.au>
Jurgen van Gael <jurgen.vangael@student.kuleuven.ac.be>
KJK::Hyperion <noog@libero.it>
Klemens R. Friedl <klemens_friedl@gmx.net>
Maarten Bosma <maarten.paul@bosma.de>
Magnus Olsen <magnus@greatlord.com>
Mark Tempel <mtempel@visi.com>
Mark Weaver <mark@npsl.co.uk>
Martin Fuchs <martin-fuchs@gmx.net>
Marty Dill <mdill@uvic.ca>
Matthias Kupfer <mkupfer@reactos.org>
Matt Pyne
Mike Nordell <"tamlin">
Nathan Woods <npwoods@mess.org>
Pablo Borobia <pborobia@gmail.com>
Paolo Pantaleo <paolopan@freemail.it>
Peter Ward <dralnix@gmail.com>
Pierre Schweitzer <pschweitzer@reactos.org>
Phillip Susi <phreak@iag.net>
Rafal Harabien <rafalh@reactos.org>
Rex Jolliff <rex@lvcablemodem.com>
Richard Campbell <betam4x@gmail.com>
Robert Bergkvist <fragdance@hotmail.com>
Hartmut Birr <hartmut.birr@gmx.de>
Aleksey Bragin <aleksey@studiocerebral.com>
Richard Campbell <eek2121@comcast.net>
Gunnar Andre' Dalsnes <hardon@online.no>
Arindam Das
Boudewijn Dekker <ariadne@xs4all.nl>
Robert Dickenson <robd@reactos.org>
Royce Mitchell III <royce3@ev1.net>
Samuel Serapi<70>n <samdwise51@gmail.com>
Saveliy Tretiakov <saveliyt@mail.ru>
Stefan Ginsberg <stefan__100__@hotmail.com>
Steven Edwards <winehacker@gmail.com>
Thomas Weidenmueller <w3seek@users.sourceforge.net>
Timo Kreuzer <timo.kreuzer@reactos.org>
Marty Dill <mdill@uvic.ca>
Jason Eager
Steven Edwards <steven_ed4153@yahoo.com>
Iwan Fatahi <i_fatahi@hotmail.com>
Jason Filby <jasonfilby@yahoo.com>
Martin Fuchs <martin-fuchs@gmx.net>
Jurgen van Gael <jurgen.vangael@student.kuleuven.ac.be>
Ge van Geldorp <ge@gse.nl>
Andrew Greenwood <lists@silverblade.co.uk>
Casper S. Hornstrup <chorns@users.sourceforge.net>
KJK::Hyperion <noog@libero.it>
Eugene Ingerman <geneing@myrealbox.com>
Rex Jolliff <rex@lvcablemodem.com>
Guido de Jong
Victor Kirhenshtein <sauros@iname.com>
Eric Kohl <ekohl@rz-online.de>
Hans Kremer
Frederik Leemans
Jean Michault
Royce Mitchell III <royce3@ev1.net>
Filip Navara <xnavara@volny.cz>
Jim Noeth
Mike Nordell ("tamlin")
Hernan Ochoa
Brian Palmer <brianp@sginet.com>
Paolo Pantaleo <paolopan@freemail.it>
Matt Pyne
Phillip Susi <phreak@iag.net>
James B. Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
Mark Tempel <mtempel@visi.com>
Vizzini <vizzini@plasmic.com>
Mark Weaver <mark@npsl.co.uk>
Thomas Weidenmueller <w3seek@users.sourceforge.net>
Jason Weiler
David Welch <welch@cwcom.net>
Jonathan Wilson <jonwil@tpgi.com.au>
Art Yerkes <ayerkes@speakeasy.net>
Graphic Design from
Mindflyer <mf@mufunyo.net>
Tango Desktop Project <http://tango-project.org>
Everaldo <http://everaldo.com>
Everaldo (http://everaldo.com) for Explorer icons
Source and inspiration from
WINE (http://www.winehq.com)
WinFree (http://www.stack.nl/~onno/win32/)
Linux (http://www.kernel.org)
XFree86 (http://www.xfree86.org/)
References (Rex's at least)
Baker, Art. The Windows NT Device Driver Book. Prentice Hall, 1997.
Borate, Dabak & Phadke. Undocumented Windows NT. M&T Books, 1999.
Brain, Marshall. Win32 System Services. Prentice Hall, 1996.
Cant, Chris. Writing Windows WDM Device Drivers. R&D Books, 1999.
Canton & Sanchez. IBM Microcomputers: A Programmer's Handbook. McGraw Hill, 1990.
Davis & Wallace. Windows Undocumented File Formats. R&D Books, 1997.
Mason & Viscarola. Windows NT Device Driver Development. Macmillan, 1999.
Mitchell, Stan. Inside the Windows 95 File System. O'Reilly, 1997.
Murray, James D. Windows NT Event Logging. O'Reilly, 1998.
Nagar, Rajeev. Windows NT File System Internals. O'Reilly, 1997.
Osbourne, Sandra. Windows NT Registry: A Settings Reference. New Riders, 1998.
Pietrek, Matt. Windows 95 System Programming Secrets. IDG, 1995.
Richter, Jeffery. Advanced Windows, 3rd ed. Microsoft, 1997.
Simon, Richard J. Windows NT Win32 API Superbible. Waite Group, 1996.
Solomon, David A. Inside Windows NT, 2nd Ed. Microsoft, 1998.
"The NT Insider." Open Systems Resources, 1999-2000.

3534
reactos/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,79 +2,72 @@
To build the system you need either mingw32 installed on Windows or a mingw32
cross compiler running on unix. You may obtain MinGW binaries that build
ReactOS from http://www.reactos.org/.
ReactOS from http://www.reactos.com.
2. Building ReactOS
2.1 Building the binaries
To build ReactOS run 'make' (without the quotes) if you are building on Linux
or 'mingw32-make' if you are building on Windows (or ReactOS) from the top
directory. If you are using RosBE, follow on-screen instructions.
2.2 Building a bootable CD image
To build a bootable CD image run 'make bootcd' (without the quotes) if you are
building on Linux or 'mingw32-make bootcd' if you are building on Windows (or
ReactOS) from the top directory. This will create a CD image with a filename,
ReactOS.iso, in the top directory.
To build from Windows run 'make' (wihout the quotes) from the top directory.
To build from unix, edit rules.mak and change the PREFIX variable to the
correct value for your cross-compiler. Run 'export HOST=mingw32-linux' to
tell the ReactOS build system that it is building ReactOS on a linux machine.
Now run 'make'.
3. Installation
ReactOS 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.
The system can only be installed on the first partition on the first harddisk.
The partition must be formatted as FAT16 or FAT32. The system can only be
started from DOS and not from a Windows DOS-prompt.
ReactOS can be installed from the source distribution or from the bootable CD
ReactOS can be installed from the source distribution or from the binary
distribution. The two ways to install ReactOS are explained below.
3.1 Installation from sources
If you don't have an existing ReactOS installation you want to upgrade, then
build a bootable CD as described above. Burn the CD image, boot from it, and
follow the instructions to install ReactOS.
To install ReactOS after building it, type 'make install'. This will create
the directory 'reactos' in the top directory. Copy this directory to the root
of your first partition on your first harddisk. This is usually c:\ on a
Windows machine.
If you have an existing ReactOS installation you want to upgrade, then to
install ReactOS after building it, type 'make install' or
'mingw32-make install'. This will create the directory 'reactos' in the top
directory. Copy the contents of this directory over the existing installation.
If you don't want to copy the files manually every time you run a 'make install',
you can specify the directory where the files are to be copied to during
installation.
If you don't want to copy the files manually every time you run a
'make install' or 'mingw32-make install', then you can specify the directory
where the files are to be copied to during installation.
In rules.mak find the variable INSTALL_DIR and change the assigned value to the
name of the directory where the files are to be copied to. If you are using
Windows this could be:
Set the ROS_INSTALL environment variable. If you are on Windows this could be
done by:
INSTALL_DIR = c:\reactos
set ROS_INSTALL=c:\reactos
If you are on linux this could be:
If you are on Linux this could be done by:
INSTALL_DIR = /mnt/windows/reactos
export ROS_INSTALL=/mnt/windows/reactos
Now run 'make install' or 'mingw32-make install' to install the files to the
new location.
Save the changes to rules.mak and run 'make install' to install the files to
the new location. If you don't want to change rules.mak, you can specify the
installtion directory when invoking make. Run
'make INSTALL_DIR=c:\reactos install' to install to c:\reactos.
3.2 Installation from bootable CD distribution
3.2 Installation from binany distribution
To install ReactOS from the bootable CD distribution, extract the archive
contents. Then burn the CD image, boot from it, and follow instructions.
To install ReactOS from the binary distribution, extract the archive contents
to c:\reactos. Remember to extract the files with full paths.
4. Booting ReactOS
Startup in DOS mode. 'cd' to c:\reactos and type 'boot' and press <enter>.
A simple shell is started where you can use simple commands like 'cd' and 'dir'.
5. Help
If you run into problems or have suggestions for making ReactOS better, please
visit the address below. Mailing lists are available for a variety of topics,
bugs should be submitted to JIRA and general chat takes place in the forums,
or #reactos on freenode
surf to the address below and subscribe to one or more of the mailing lists.
http://www.reactos.org/
http://www.reactos.com/index.php?tab=discussion&section=lists
ReactOS Development Team

5
reactos/Jamfile Normal file
View File

@@ -0,0 +1,5 @@
# Main jamfile for ReactOS
SubDir ROS_TOP ;
SubInclude ROS_TOP Lib ;

54
reactos/Jamrules Normal file
View File

@@ -0,0 +1,54 @@
# customization for ReactOS goes here
# The SharedLibrary and SharedLibraryFromObjects rules were
# borrowed from here:
# http://www.differentpla.net/~roger/devel/jam/tutorial/shared_lib/index.html
SUFSHR = .dll ;
RM = rm ; # rm comes with MinGW, and the default del doesn't work in some cases
rule SharedLibrary
{
SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
Objects $(>) ;
}
rule SharedLibraryFromObjects
{
local _s _t ;
# Add grist to file names
# Add suffix to dll
_s = [ FGristFiles $(>) ] ;
_t = [ FAppendSuffix $(<) : $(SUFSHR) ] ;
if $(_t) != $(<)
{
DEPENDS $(<) : $(_t) ;
NOTFILE $(<) ;
}
# make compiled sources a dependency of target
DEPENDS exe : $(_t) ;
DEPENDS $(_t) : $(_s) ;
MakeLocate $(_t) : $(LOCATE_TARGET) ;
Clean clean : $(_t) ;
Link $(_t) : $(_s) ;
}
# nasm needs to know the output file first, or it doesn't
# recognize -I :(
actions As
{
$(AS) -o $(<) $(ASFLAGS) -I$(HDRS) $(>)
}
AS = nasm ;
# why isn't DEFINES working? :(
#DEFINES += _M_IX86 ;
CCFLAGS += -D_M_IX86 ;

504
reactos/LGPL.txt Normal file
View File

@@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, 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 library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License along with the
Library.
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 Library or any portion
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
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 Library, 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 Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you 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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
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 with
this License.
11. 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 Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
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 Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

987
reactos/Makefile Normal file
View File

@@ -0,0 +1,987 @@
# $Id: Makefile,v 1.251.4.4 2004/10/25 03:46:45 ion Exp $
#
# Global makefile
#
PATH_TO_TOP = .
include $(PATH_TO_TOP)/rules.mak
#
# Define to build ReactOS external targets
#
ifeq ($(ROS_BUILD_EXT),)
ROS_BUILD_EXT = no
else
ROS_BUILD_EXT = yes
endif
ifneq ($(MINIMALDEPENDENCIES),no)
IMPLIB =
else
IMPLIB = implib
endif
# Required to run the system
COMPONENTS = ntoskrnl
# Hardware Abstraction Layers
# halx86
HALS = halx86
# Bus drivers
# acpi isapnp pci
BUS = acpi isapnp pci
# Filesystem libraries
# vfatlib
LIB_FSLIB = vfatlib
# Static libraries
LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns
# Keyboard layout libraries
DLLS_KBD = kbddv kbdfr kbdgr kbdse kbduk kbdus
# Control Panels
DLLS_CPL = cpl
# Shell extensions
DLLS_SHELLEXT = shellext
# User mode libraries
# libpcap packet epsapi
DLLS = acledit aclui advapi32 advpack cabinet comctl32 crtdll comdlg32 d3d8thk expat fmifs freetype \
gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 mpr msacm msafd msgina \
msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg opengl32 packet psapi \
richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup twain unicode user32 \
userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda \
dnsapi \
$(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
SUBSYS = smss win32k csrss ntvdm
#
# Select the server(s) you want to build
#
#SERVERS = posix linux os2
SERVERS = win32
# Driver support libraries
#bzip2 zlib oskittcp
DRIVERS_LIB = bzip2 oskittcp ip csq
# Kernel mode device drivers
# Obsolete: ide
# beep blue floppy null parallel ramdrv serenum serial
DEVICE_DRIVERS = beep blue debugout null serial bootvid
# Kernel mode input drivers
INPUT_DRIVERS = keyboard mouclass psaux sermouse
# Kernel mode file system drivers
# cdfs ext2 fs_rec ms np vfat
FS_DRIVERS = cdfs fs_rec ms np vfat mup ntfs
# Kernel mode networking drivers
# afd ndis npf tcpip tdi wshtcpip
NET_DRIVERS = afd ndis npf tcpip tdi wshtcpip
# Kernel mode networking device drivers
# ne2000 pcnet
NET_DEVICE_DRIVERS = ne2000 pcnet
# Kernel mode storage drivers
# atapi cdrom class2 disk scsiport
STORAGE_DRIVERS = atapi cdrom class2 disk floppy scsiport diskdump
# System applications
# autochk cmd format services setup usetup welcome winlogon
SYS_APPS = autochk cmd explorer expand format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit winefile
# System services
# rpcss eventlog
SYS_SVC = rpcss eventlog
APPS = testsets utils
# External modules and (sub)systems for ReactOS
# rosapps posix os2 (requires c++) java (non-existant)
EXTERNALS = rosapps
ifeq ($(ROS_BUILD_EXT),yes)
EXT_MODULES = $(EXTERNALS)
else
EXT_MODULES =
endif
KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
$(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS) VIDEO_DRIVERS
# Regression tests
REGTESTS = regtests
all: bootstrap $(COMPONENTS) $(REGTESTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
$(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
$(APPS) $(EXT_MODULES)
bootstrap: dk implib iface_native iface_additional
#config: $(TOOLS:%=%_config)
depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) msvcrt_depends $(DLLS:%=%_depends) \
$(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
$(EXT_MODULES:%=%_depends) $(POSIX_LIBS:%=%_depends)
implib: hallib $(LIB_STATIC) $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
$(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) msvcrt_implib $(DLLS:%=%_implib) \
$(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
$(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) $(EXT_MODULES:%=%_implib) \
$(REGTESTS:%=%_implib)
test: $(COMPONENTS:%=%_test) $(HALS:%=%_test) $(BUS:%=%_test) \
$(LIB_STATIC:%=%_test) $(LIB_FSLIB:%=%_test) msvcrt_test $(DLLS:%=%_test) \
$(KERNEL_DRIVERS:%=%_test) $(SUBSYS:%=%_test) \
$(SYS_SVC:%=%_test) $(EXT_MODULES:%=%_test)
clean: tools dk_clean iface_native_clean iface_additional_clean hallib_clean \
$(HALS:%=%_clean) $(COMPONENTS:%=%_clean) $(BUS:%=%_clean) \
$(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) msvcrt_clean \
$(DLLS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) \
$(SUBSYS:%=%_clean) $(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) \
$(NET_APPS:%=%_clean) $(APPS:%=%_clean) $(EXT_MODULES:%=%_clean) \
$(REGTESTS:%=%_clean) clean_after tools_clean
clean_after:
$(RM) $(PATH_TO_TOP)/include/roscfg.h
fastinstall: tools install_dirs install_before \
$(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
$(LIB_STATIC:%=%_install) $(LIB_FSLIB:%=%_install) msvcrt_install $(DLLS:%=%_install) \
$(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
$(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
$(APPS:%=%_install) $(EXT_MODULES:%=%_install) $(REGTESTS:%=%_install)
install: fastinstall registry
FREELDR_DIR = ../freeldr
freeldr:
$(MAKE) -C $(FREELDR_DIR)
bootcd_directory_layout:
$(RMKDIR) $(BOOTCD_DIR)
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
$(RMKDIR) $(BOOTCD_DIR)/loader
$(RMKDIR) $(BOOTCD_DIR)/reactos
$(RMKDIR) $(BOOTCD_DIR)/reactos/system32
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
$(CP) ${FREELDR_DIR}/bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
$(CP) ${FREELDR_DIR}/bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
$(CP) ${FREELDR_DIR}/bootsect/fat.bin ${BOOTCD_DIR}/loader/fat.bin
$(CP) ${FREELDR_DIR}/bootsect/fat32.bin ${BOOTCD_DIR}/loader/fat32.bin
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
$(LIB_STATIC:%=%_bootcd) $(LIB_FSLIB:%=%_bootcd) msvcrt_bootcd $(DLLS:%=%_bootcd) \
$(KERNEL_DRIVERS:%=%_bootcd) $(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
bootcd_install_before:
$(RLINE) bootdata/autorun.inf $(BOOTCD_DIR)/autorun.inf
$(RLINE) bootdata/readme.txt $(BOOTCD_DIR)/readme.txt
$(RLINE) bootdata/hivecls.inf $(BOOTCD_DIR)/reactos/hivecls.inf
$(RLINE) bootdata/hivedef.inf $(BOOTCD_DIR)/reactos/hivedef.inf
$(RLINE) bootdata/hivesft.inf $(BOOTCD_DIR)/reactos/hivesft.inf
$(RLINE) bootdata/hivesys.inf $(BOOTCD_DIR)/reactos/hivesys.inf
$(RLINE) bootdata/txtsetup.sif $(BOOTCD_DIR)/reactos/txtsetup.sif
$(CP) bootdata/icon.ico $(BOOTCD_DIR)/icon.ico
$(CP) subsys/system/welcome/welcome.exe $(BOOTCD_DIR)/reactos/welcome.exe
$(CP) media/nls/c_1252.nls $(BOOTCD_DIR)/reactos/c_1252.nls
$(CP) media/nls/c_437.nls $(BOOTCD_DIR)/reactos/c_437.nls
$(CP) media/nls/l_intl.nls $(BOOTCD_DIR)/reactos/l_intl.nls
$(CP) media/drivers/etc/services $(BOOTCD_DIR)/reactos/services
bootcd_basic: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
bootcd_makecd:
$(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
$(CABMAN) /C bootdata/packages/reactos.dff /RC $(BOOTCD_DIR)/reactos/reactos.inf /L $(BOOTCD_DIR)/reactos /N
- $(RM) $(BOOTCD_DIR)/reactos/reactos.inf
$(CDMAKE) -v -m -b $(BOOTCD_DIR)/../isoboot.bin $(BOOTCD_DIR) REACTOS ReactOS.iso
ubootcd_unattend:
$(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
livecd_directory_layout:
$(RMKDIR) $(LIVECD_DIR)
$(RMKDIR) $(LIVECD_DIR)/loader
$(RMKDIR) $(LIVECD_DIR)/reactos
$(RMKDIR) $(LIVECD_DIR)/Profiles/All\ Users/Desktop
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/Desktop
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/My\ Documents
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${LIVECD_DIR}/../isoboot.bin
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${LIVECD_DIR}/loader/setupldr.sys
$(RLINE) bootdata/livecd.ini $(LIVECD_DIR)/freeldr.ini
livecd_bootstrap_files:
$(MAKE) LIVECD_INSTALL=yes fastinstall
livecd_install_before:
$(MKHIVE) bootdata $(LIVECD_DIR)/reactos/system32/config bootdata/livecd.inf bootdata/hiveinst.inf
livecd_basic: livecd_directory_layout livecd_bootstrap_files livecd_install_before
livecd_makecd:
$(CDMAKE) -m -j -b $(LIVECD_DIR)/../isoboot.bin $(LIVECD_DIR) REACTOS roslive.iso
bootcd: bootcd_basic bootcd_makecd
ubootcd: bootcd_basic ubootcd_unattend bootcd_makecd
livecd: livecd_basic livecd_makecd
registry: tools
$(MKHIVE) bootdata $(INSTALL_DIR)/system32/config bootdata/hiveinst.inf
.PHONY: all bootstrap depends implib test clean clean_before install freeldr bootcd_directory_layout \
bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
$(COMPONENTS): dk
#
# System Applications
#
$(SYS_APPS): %: $(IMPLIB)
$(MAKE) -C subsys/system/$*
$(SYS_APPS:%=%_implib): %_implib: dk
$(MAKE) --silent -C subsys/system/$* implib
$(SYS_APPS:%=%_test): %_test:
$(MAKE) -C subsys/system/$* test
$(SYS_APPS:%=%_clean): %_clean:
$(MAKE) -C subsys/system/$* clean
$(SYS_APPS:%=%_install): %_install:
$(MAKE) -C subsys/system/$* install
$(SYS_APPS:%=%_bootcd): %_bootcd:
$(MAKE) -C subsys/system/$* bootcd
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_test) \
$(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_bootcd)
#
# System Services
#
$(SYS_SVC): %: $(IMPLIB)
$(MAKE) -C services/$*
$(SYS_SVC:%=%_depends): %_depends:
$(MAKE) -C services/$* depends
$(SYS_SVC:%=%_implib): %_implib: dk
$(MAKE) --silent -C services/$* implib
$(SYS_SVC:%=%_test): %_test:
$(MAKE) -C services/$* test
$(SYS_SVC:%=%_clean): %_clean:
$(MAKE) -C services/$* clean
$(SYS_SVC:%=%_install): %_install:
$(MAKE) -C services/$* install
.PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) \
$(SYS_SVC:%=%_test) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install)
#
# Applications
#
#
# Extra (optional system) Applications
#
$(APPS): %: $(IMPLIB)
$(MAKE) -C apps/$*
# Not needed
# $(APPS:%=%_implib): %_implib: dk
# $(MAKE) --silent -C apps/$* implib
$(APPS:%=%_test): %_test:
$(MAKE) -C apps/$* test
$(APPS:%=%_clean): %_clean:
$(MAKE) -C apps/$* clean
$(APPS:%=%_install): %_install:
$(MAKE) -C apps/$* install
.PHONY: $(APPS) $(APPS:%=%_test) $(APPS:%=%_clean) $(APPS:%=%_install)
#
# External ports and subsystem personalities
#
$(EXTERNALS): %:
$(MAKE) -C $(ROOT_PATH)/$*
$(EXTERNALS:%=%_depends): %_depends:
$(MAKE) -C $(ROOT_PATH)/$* depends
$(EXTERNALS:%=%_implib): %_implib: dk
$(MAKE) --silent -C $(ROOT_PATH)/$* implib
$(EXTERNALS:%=%_clean): %_clean:
$(MAKE) -C $(ROOT_PATH)/$* clean
$(EXTERNALS:%=%_install): %_install:
$(MAKE) -C $(ROOT_PATH)/$* install
.PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install)
#
# Tools
#
tools:
$(MAKE) --silent -C tools
tools_implib:
tools_test:
tools_clean:
$(MAKE) -C tools clean
tools_install:
.PHONY: tools tools_implib tools_test tools_clean tools_install
#
# Developer Kits
#
dk: tools
@$(RMKDIR) $(DK_PATH)
@$(RMKDIR) $(DDK_PATH)
@$(RMKDIR) $(DDK_PATH_LIB)
@$(RMKDIR) $(DDK_PATH_INC)
@$(RMKDIR) $(SDK_PATH)
@$(RMKDIR) $(SDK_PATH_LIB)
@$(RMKDIR) $(SDK_PATH_INC)
@$(RMKDIR) $(XDK_PATH)
@$(RMKDIR) $(XDK_PATH_LIB)
# @$(RMKDIR) $(XDK_PATH_INC)
dk_implib:
# WARNING! Be very sure that there are no important files
# in these directories before cleaning them!!!
dk_clean:
$(RM) $(DDK_PATH_LIB)/*.a
# $(RM) $(DDK_PATH_INC)/*.h
$(RMDIR) $(DDK_PATH_LIB)
# $(RMDIR) $(DDK_PATH_INC)
$(RM) $(SDK_PATH_LIB)/*.a
# $(RM) $(SDK_PATH_INC)/*.h
$(RMDIR) $(SDK_PATH_LIB)
# $(RMDIR) $(SDK_PATH_INC)
$(RM) $(XDK_PATH_LIB)/*.a
# $(RM) $(XDK_PATH_INC)/*.h
$(RMDIR) $(XDK_PATH_LIB)
# $(RMDIR) $(XDK_PATH_INC)
dk_install:
.PHONY: dk dk_implib dk_clean dk_install
#
# Interfaces
#
iface_native:
$(MAKE) --silent -C iface/native
iface_native_implib:
iface_native_test:
iface_native_clean:
$(MAKE) --silent -C iface/native clean
iface_native_install:
iface_native_bootcd:
iface_additional:
$(MAKE) --silent -C iface/addsys
iface_additional_implib:
iface_additional_test:
iface_additional_clean:
$(MAKE) --silent -C iface/addsys clean
iface_additional_install:
iface_additional_bootcd:
.PHONY: iface_native iface_native_implib iface_native_test iface_native_clean \
iface_native_install iface_native_bootcd iface_additional \
iface_additional_implib iface_additional_test iface_additional_clean \
iface_additional_install iface_additional_bootcd
#
# Bus driver rules
#
$(BUS): %: $(IMPLIB)
$(MAKE) -C drivers/bus/$*
$(BUS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/bus/$* implib
$(BUS:%=%_test): %_test:
$(MAKE) -C drivers/bus/$* test
$(BUS:%=%_clean): %_clean:
$(MAKE) -C drivers/bus/$* clean
$(BUS:%=%_install): %_install:
$(MAKE) -C drivers/bus/$* install
$(BUS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/bus/$* bootcd
.PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
$(BUS:%=%_install) $(BUS:%=%_bootcd)
#
# Driver support libraries rules
#
$(DRIVERS_LIB): %: $(IMPLIB)
$(MAKE) -C drivers/lib/$*
$(DRIVERS_LIB:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/lib/$* implib
$(DRIVERS_LIB:%=%_test): %_test:
$(MAKE) -C drivers/lib/$* test
$(DRIVERS_LIB:%=%_clean): %_clean:
$(MAKE) -C drivers/lib/$* clean
$(DRIVERS_LIB:%=%_install): %_install:
$(MAKE) -C drivers/lib/$* install
$(DRIVERS_LIB:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/lib/$* bootcd
.PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_test) \
$(DRIVERS_LIB:%=%_clean) $(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_bootcd)
#
# Device driver rules
#
$(DEVICE_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/dd/$*
$(DEVICE_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/dd/$* implib
$(DEVICE_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/dd/$* test
$(DEVICE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/dd/$* clean
$(DEVICE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/dd/$* install
$(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/dd/$* bootcd
.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_test) \
$(DEVICE_DRIVERS:%=%_clean) $(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_bootcd)
#
# Video device driver rules
#
VIDEO_DRIVERS: $(IMPLIB)
$(MAKE) -C drivers/video
VIDEO_DRIVERS_implib: dk
$(MAKE) --silent -C drivers/video implib
VIDEO_DRIVERS_test:
$(MAKE) -C drivers/video test
VIDEO_DRIVERS_clean:
$(MAKE) -C drivers/video clean
VIDEO_DRIVERS_install:
$(MAKE) -C drivers/video install
VIDEO_DRIVERS_bootcd:
$(MAKE) -C drivers/video bootcd
.PHONY: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_test\
VIDEO_DRIVERS_clean VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
#
# Input driver rules
#
$(INPUT_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/input/$*
$(INPUT_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/input/$* implib
$(INPUT_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/input/$* test
$(INPUT_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/input/$* clean
$(INPUT_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/input/$* install
$(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/input/$* bootcd
.PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_test) \
$(INPUT_DRIVERS:%=%_clean) $(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_bootcd)
#
# Filesystem driver rules
#
$(FS_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/fs/$*
$(FS_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/fs/$* implib
$(FS_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/fs/$* test
$(FS_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/fs/$* clean
$(FS_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/fs/$* install
$(FS_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/fs/$* bootcd
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_test) \
$(FS_DRIVERS:%=%_clean) $(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_bootcd)
#
# Network driver rules
#
$(NET_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/net/$*
$(NET_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/net/$* implib
$(NET_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/net/$* test
$(NET_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/net/$* clean
$(NET_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/net/$* install
$(NET_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/net/$* bootcd
.PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_test) \
$(NET_DRIVERS:%=%_clean) $(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_bootcd)
#
# Network device driver rules
#
$(NET_DEVICE_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/net/dd/$*
$(NET_DEVICE_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/net/dd/$* implib
$(NET_DEVICE_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/net/dd/$* test
$(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/net/dd/$* clean
$(NET_DEVICE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/net/dd/$* install
$(NET_DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/net/dd/$* bootcd
.PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) \
$(NET_DEVICE_DRIVERS:%=%_implib) $(NET_DEVICE_DRIVERS:%=%_test) \
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_bootcd)
#
# storage driver rules
#
$(STORAGE_DRIVERS): %: $(IMPLIB)
$(MAKE) -C drivers/storage/$*
$(STORAGE_DRIVERS:%=%_implib): %_implib: dk
$(MAKE) --silent -C drivers/storage/$* implib
$(STORAGE_DRIVERS:%=%_test): %_test:
$(MAKE) -C drivers/storage/$* test
$(STORAGE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/storage/$* clean
$(STORAGE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/storage/$* install
$(STORAGE_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/storage/$* bootcd
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) \
$(STORAGE_DRIVERS:%=%_implib) $(STORAGE_DRIVERS:%=%_test) \
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_bootcd)
#
# Required system components
#
ntoskrnl: bootstrap
$(MAKE) -C ntoskrnl
ntoskrnl_implib: dk
$(MAKE) --silent -C ntoskrnl implib
ntoskrnl_test:
$(MAKE) -C ntoskrnl test
ntoskrnl_clean:
$(MAKE) -C ntoskrnl clean
ntoskrnl_install:
$(MAKE) -C ntoskrnl install
ntoskrnl_bootcd:
$(MAKE) -C ntoskrnl bootcd
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_test \
ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
#
# Hardware Abstraction Layer import library
#
hallib: $(PATH_TO_TOP)/include/roscfg.h ntoskrnl_implib
$(MAKE) --silent -C hal/hal
hallib_implib: dk ntoskrnl_implib
$(MAKE) --silent -C hal/hal implib
hallib_test:
$(MAKE) -C hal/hal test
hallib_clean:
$(MAKE) -C hal/hal clean
hallib_install:
$(MAKE) -C hal/hal install
hallib_bootcd:
$(MAKE) -C hal/hal bootcd
.PHONY: hallib hallib_implib hallib_test hallib_clean \
hallib_install hallib_bootcd
#
# Hardware Abstraction Layers
#
$(HALS): %: $(IMPLIB)
$(MAKE) -C hal/$*
$(HALS:%=%_implib): %_implib: dk
$(MAKE) --silent -C hal/$* implib
$(HALS:%=%_test): %_test:
$(MAKE) -C hal/$* test
$(HALS:%=%_clean): %_clean:
$(MAKE) -C hal/$* clean
$(HALS:%=%_install): %_install:
$(MAKE) -C hal/$* install
$(HALS:%=%_bootcd): %_bootcd:
$(MAKE) -C hal/$* bootcd
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_test) \
$(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_bootcd)
#
# File system libraries
#
$(LIB_FSLIB): %: dk
$(MAKE) -C lib/fslib/$*
$(LIB_FSLIB:%=%_depends): %_depends:
$(MAKE) -C lib/fslib/$* depends
$(LIB_FSLIB:%=%_implib): %_implib: dk
$(MAKE) --silent -C lib/fslib/$* implib
$(LIB_FSLIB:%=%_test): %_test:
$(MAKE) -C lib/fslib/$* test
$(LIB_FSLIB:%=%_clean): %_clean:
$(MAKE) -C lib/fslib/$* clean
$(LIB_FSLIB:%=%_install): %_install:
$(MAKE) -C lib/fslib/$* install
$(LIB_FSLIB:%=%_bootcd): %_bootcd:
$(MAKE) -C lib/fslib/$* bootcd
.PHONY: $(LIB_FSLIB) $(LIB_FSLIB:%=%_depends) $(LIB_FSLIB:%=%_implib) \
$(LIB_FSLIB:%=%_test) $(LIB_FSLIB:%=%_clean) \
$(LIB_FSLIB:%=%_install) $(LIB_FSLIB:%=%_bootcd)
#
# Static libraries
#
$(LIB_STATIC): %: dk
$(MAKE) --silent -C lib/$*
$(LIB_STATIC:%=%_depends): %_depends:
$(MAKE) -C lib/string depends
$(LIB_STATIC:%=%_implib): %_implib: dk
$(MAKE) --silent -C lib/$* implib
$(LIB_STATIC:%=%_test): %_test:
$(MAKE) -C lib/$* test
$(LIB_STATIC:%=%_clean): %_clean:
$(MAKE) -C lib/$* clean
$(LIB_STATIC:%=%_install): %_install:
$(MAKE) -C lib/$* install
$(LIB_STATIC:%=%_bootcd): %_bootcd:
$(MAKE) -C lib/$* bootcd
.PHONY: $(LIB_STATIC) $(LIB_STATIC:%=%_depends) $(LIB_STATIC:%=%_implib) \
$(LIB_STATIC:%=%_test) $(LIB_STATIC:%=%_clean) \
$(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_bootcd)
#
# MSVCRT is seperate since CRTDLL depend on this
#
msvcrt: $(IMPLIB)
$(MAKE) -C lib/msvcrt
msvcrt_depends:
$(MAKE) -C lib/msvcrt depends
msvcrt_implib: dk
$(MAKE) --silent -C lib/msvcrt implib
msvcrt_test:
$(MAKE) -C lib/msvcrt test
msvcrt_clean:
$(MAKE) -C lib/msvcrt clean
msvcrt_install:
$(MAKE) -C lib/msvcrt install
msvcrt_bootcd:
$(MAKE) -C lib/msvcrt bootcd
.PHONY: msvcrt msvcrt_depends msvcrt_implib msvcrt_test \
msvcrt_clean msvcrt_install msvcrt_bootcd
#
# DLLs
#
$(DLLS): %: $(IMPLIB) msvcrt
$(MAKE) -C lib/$*
$(DLLS:%=%_depends): %_depends:
$(MAKE) -C lib/$* depends
$(DLLS:%=%_implib): %_implib: dk
$(MAKE) --silent -C lib/$* implib
$(DLLS:%=%_test): %_test:
$(MAKE) -C lib/$* test
$(DLLS:%=%_clean): %_clean:
$(MAKE) -C lib/$* clean
$(DLLS:%=%_install): %_install:
$(MAKE) -C lib/$* install
$(DLLS:%=%_bootcd): %_bootcd:
$(MAKE) -C lib/$* bootcd
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_test) \
$(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_bootcd)
#
# Subsystem support modules
#
$(SUBSYS): %: $(IMPLIB)
$(MAKE) -C subsys/$*
$(SUBSYS:%=%_depends): %_depends:
$(MAKE) -C subsys/$* depends
$(SUBSYS:%=%_implib): %_implib: dk
$(MAKE) --silent -C subsys/$* implib
$(SUBSYS:%=%_test): %_test:
$(MAKE) -C subsys/$* test
$(SUBSYS:%=%_clean): %_clean:
$(MAKE) -C subsys/$* clean
$(SUBSYS:%=%_install): %_install:
$(MAKE) -C subsys/$* install
$(SUBSYS:%=%_bootcd): %_bootcd:
$(MAKE) -C subsys/$* bootcd
.PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_test) \
$(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) $(SUBSYS:%=%_bootcd)
#
# Regression testsuite
#
$(REGTESTS): %: $(IMPLIB)
$(MAKE) --silent -C regtests
$(REGTESTS:%=%_implib): %_implib: dk
$(MAKE) --silent -C regtests implib
$(REGTESTS:%=%_clean): %_clean:
$(MAKE) -C regtests clean
$(REGTESTS:%=%_install): %_install:
$(MAKE) -C regtests install
.PHONY: $(REGTESTS) $(REGTESTS:%=%_depends) $(SUBSYS:%=%_clean) $(REGTESTS:%=%_install)
#
# Create an installation
#
install_clean:
$(RM) $(INSTALL_DIR)/system32/drivers/*.*
$(RM) $(INSTALL_DIR)/system32/config/*.*
$(RM) $(INSTALL_DIR)/system32/*.*
$(RM) $(INSTALL_DIR)/symbols/*.*
$(RM) $(INSTALL_DIR)/media/fonts/*.*
$(RM) $(INSTALL_DIR)/media/*.*
$(RM) $(INSTALL_DIR)/inf/*.*
$(RM) $(INSTALL_DIR)/bin/*.*
$(RMDIR) $(INSTALL_DIR)/system32/drivers
$(RMDIR) $(INSTALL_DIR)/system32/config
$(RMDIR) $(INSTALL_DIR)/system32
$(RMDIR) $(INSTALL_DIR)/symbols
$(RMDIR) $(INSTALL_DIR)/media/fonts
$(RMDIR) $(INSTALL_DIR)/media
$(RMDIR) $(INSTALL_DIR)/inf
$(RMDIR) $(INSTALL_DIR)/bin
$(RMDIR) $(INSTALL_DIR)
install_dirs:
$(RMKDIR) $(INSTALL_DIR)
$(RMKDIR) $(INSTALL_DIR)/bin
$(RMKDIR) $(INSTALL_DIR)/inf
$(RMKDIR) $(INSTALL_DIR)/media
$(RMKDIR) $(INSTALL_DIR)/media/fonts
$(RMKDIR) $(INSTALL_DIR)/symbols
$(RMKDIR) $(INSTALL_DIR)/system32
$(RMKDIR) $(INSTALL_DIR)/system32/config
$(RMKDIR) $(INSTALL_DIR)/system32/drivers
$(RMKDIR) $(INSTALL_DIR)/system32/drivers/etc
install_before:
$(CP) media/inf $(INSTALL_DIR)/inf
$(CP) media/fonts $(INSTALL_DIR)/media/fonts
$(CP) media/nls $(INSTALL_DIR)/system32
$(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
$(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
$(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
$(CP) media/drivers/etc/services \
$(INSTALL_DIR)/system32/drivers/etc/services
.PHONY: install_clean install_dirs install_before
etags:
find . -name "*.[ch]" -print | etags --language=c -
docu:
echo generating ReactOS NTOSKRNL documentation ...
$(MAKE) -C ntoskrnl docu
echo generating ReactOS drivers documentation ...
$(MAKE) -C drivers docu
echo generating ReactOS NTDLL documentation ...
$(MAKE) -C lib/ntdll docu
echo generating ReactOS Freetype documentation ...
$(MAKE) -C lib/freetype docu
echo generating ReactOS libs documentation ...
$(MAKE) -C lib docu
echo generating ReactOS WIN32K documentation ...
$(MAKE) -C subsys/win32k docu
echo generating ReactOS apps+tools documentation ...
$(MAKE) -C apps docu
echo generating ReactOS explorer documentation ...
$(MAKE) -C subsys/system/explorer full-docu
echo generating remaining ReactOS documentation ...
doxygen Doxyfile
.PHONY: docu
include $(TOOLS_PATH)/config.mk

View File

@@ -1,10 +0,0 @@
# small trick to get the real source directory at this stage
STRING(REPLACE "/PreLoad.cmake" "" REACTOS_HOME_DIR ${CMAKE_CURRENT_LIST_FILE})
#message("/PreLoad.cmake ... ${REACTOS_HOME_DIR}")
SET(CMAKE_MODULE_PATH "${REACTOS_HOME_DIR}/cmake" CACHE INTERNAL "")
#message("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")

View File

@@ -1,6 +1,6 @@
========================
ReactOS Version 0.3.x
Updated Dec 16, 2006
ReactOS Version 0.2.x
Updated June 23rd, 2004
========================
1. What is ReactOS?
@@ -8,13 +8,12 @@ Updated Dec 16, 2006
ReactOS is an Open Source effort to develop a quality operating system
that is compatible with Windows NT applications and drivers.
The ReactOS project, although currently focused on Windows XP/2003
drivers compatibility, is always keeping an eye toward compatibility with
older version of Windows NT family ( NT 4.0, 2000 (NT 5.0)) and new
Windows NT releases (Vista, etc). Applications (Win32 API) compatibility
focus is Windows XP.
The ReactOS project, although currently focused on Windows NT 4.0
compatibility, is always keeping an eye towards compatibility with
future Windows NT releases, that is, Windows 2000 (NT 5.0) and
Windows XP (NT 5.1).
More information is available at http://www.reactos.org/.
More information is available at http://www.reactos.com.
2. Building ReactOS
@@ -22,8 +21,8 @@ See the INSTALL file for more details.
3. More information
See the media\doc subdirectory for some sparse notes.
See the doc subdirectory for some sparse notes
4. Who is responsible
See the CREDITS file.
See the CREDITS file

59
reactos/apistatus.lst Normal file → Executable file
View File

@@ -1,30 +1,33 @@
; Format:
; COMPONENT_NAME PATH_TO_COMPONENT_SOURCES
; COMPONENT_NAME - Name of the module. Eg. kernel32.
; PATH_TO_COMPONENT_SOURCES - Relative path to sources (relative to where rgenstat is run from).
advapi32 ../reactos/dll/win32/advapi32
crtdll ../reactos/dll/win32/crtdll
gdi32 ../reactos/dll/win32/gdi32
gdiplus ../reactos/dll/win32/gdiplus
iphlpapi ../reactos/dll/win32/iphlpapi
kernel32 ../reactos/dll/win32/kernel32
msvcrt ../reactos/dll/win32/msvcrt
rasapi32 ../reactos/dll/win32/rasapi32
rasdlg ../reactos/dll/win32/rasdlg
rasman ../reactos/dll/win32/rasman
rpcrt4 ../reactos/dll/win32/rpcrt4
secur32 ../reactos/dll/win32/secur32
snmpapi ../reactos/dll/win32/snmpapi
user32 ../reactos/dll/win32/user32
version ../reactos/dll/win32/version
winspool ../reactos/dll/win32/winspool
ws2_32 ../reactos/dll/win32/ws2_32
wsock32 ../reactos/dll/win32/wsock32
videoprt ../reactos/drivers/video/videoprt
ndis ../reactos/drivers/network/ndis
tdi ../reactos/drivers/network/tdi
scsiport ../reactos/drivers/storage/scsiport
ntoskrnl ../reactos/ntoskrnl
rtl ../reactos/lib/rtl
win32k ../reactos/subsystems/win32/win32k
; COMPONENT_NAME - Name of the component. Eg. kernel32.dll.
; PATH_TO_COMPONENT_SOURCES - Relative path to sources (relative to
; where rgenstat is run from).
advapi32.dll reactos/lib/advapi32
crtdll.dll reactos/lib/crtdll
gdi32.dll reactos/lib/gdi32
gdiplus.dll reactos/lib/gdiplus
iphlpapi.dll reactos/lib/iphlpapi
kernel32.dll reactos/lib/kernel32
lz32.dll reactos/lib/lzexpand
msvcrt.dll reactos/lib/msvcrt
ole32.dll reactos/lib/ole32
oleaut32.dll reactos/lib/oleaut32
rpcrt4.dll reactos/lib/rpcrt4
secur32.dll reactos/lib/secur32
shell32.dll reactos/lib/shell32
snmpapi.dll reactos/lib/snmpapi
user32.dll reactos/lib/user32
version.dll reactos/lib/version
winmm.dll reactos/lib/winmm
winspool.dll reactos/lib/winspool
ws2_32.dll reactos/lib/ws2_32
wsock32.dll reactos/lib/wsock32
videoprt.dll reactos/drivers/video/videoprt
ndis.sys reactos/drivers/net/ndis
tdi.sys reactos/drivers/net/tdi
class2.sys reactos/drivers/storage/class2
scsiport.sys reactos/drivers/storage/scsiport
ntoskrnl.exe reactos/ntoskrnl
ntoskrnl.exe reactos/lib/rtl
win32k.sys reactos/subsys/win32k

1
reactos/apps/.cvsignore Normal file
View File

@@ -0,0 +1 @@
doxy-doc

207
reactos/apps/Doxyfile Normal file
View File

@@ -0,0 +1,207 @@
# Doxyfile 1.3.5
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "ReactOS Apps & Tools"
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxy-doc
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ..
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = NO
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = . \
../tools
FILE_PATTERNS = *.c \
*.h
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = YES
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 200
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = YES
RTF_HYPERLINKS = YES
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = NO
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../include
INCLUDE_FILE_PATTERNS = *.h
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = YES

13
reactos/apps/Makefile Normal file
View File

@@ -0,0 +1,13 @@
# $Id: Makefile,v 1.1 2003/12/06 23:10:50 mf Exp $
#
# ReactOS apps and tools makefile to generate Doxygen documentation
#
docu:
doxygen Doxyfile
.PHONY: docu
# EOF

View File

@@ -0,0 +1,162 @@
#
# ReactOS system testsets makefile
#
PATH_TO_TOP = ../..
include $(PATH_TO_TOP)/rules.mak
# Testset applications
TEST_SETS = loadlib
TEST_KERNEL32 =
TEST_MSVCRT =
TEST_COM =
TEST_SEH =
TEST_REGRESSIONS =
all: $(TEST_SETS) $(TEST_KERNEL32) $(TEST_MSVCRT) $(TEST_COM) $(TEST_SEH) $(TEST_REGRESSIONS)
depends:
implib: $(TEST_SETS:%=%_implib) \
$(TEST_KERNEL32:%=%_implib) \
$(TEST_MSVCRT:%=%_implib) \
$(TEST_COM:%=%_implib) \
$(TEST_SEH:%=%_implib) \
$(TEST_REGRESSIONS:%=%_implib)
clean: $(TEST_SETS:%=%_clean) \
$(TEST_KERNEL32:%=%_clean) \
$(TEST_MSVCRT:%=%_clean) \
$(TEST_COM:%=%_clean) \
$(TEST_SEH:%=%_clean) \
$(TEST_REGRESSIONS:%=%_clean)
install: $(TEST_SETS:%=%_install) \
$(TEST_KERNEL32:%=%_install) \
$(TEST_MSVCRT:%=%_install) \
$(TEST_COM:%=%_install) \
$(TEST_SEH:%=%_install) \
$(TEST_REGRESSIONS:%=%_install)
.PHONY: all depends implib clean install
#
# Testset Applications
#
$(TEST_SETS): %:
$(MAKE) -C $*
$(TEST_SETS:%=%_implib): %_implib:
$(MAKE) -C $* implib
$(TEST_SETS:%=%_clean): %_clean:
$(MAKE) -C $* clean
$(TEST_SETS:%=%_install): %_install:
$(MAKE) -C $* install
.PHONY: $(TEST_SETS) $(TEST_SETS:%=%_implib) $(TEST_SETS:%=%_clean) $(TEST_SETS:%=%_install)
#
# Kernel32 Test Applications
#
$(TEST_KERNEL32): %:
$(MAKE) -C kernel32/$*
$(TEST_KERNEL32:%=%_implib): %_implib:
$(MAKE) -C kernel32/$* implib
$(TEST_KERNEL32:%=%_clean): %_clean:
$(MAKE) -C kernel32/$* clean
$(TEST_KERNEL32:%=%_install): %_install:
$(MAKE) -C kernel32/$* install
.PHONY: $(TEST_KERNEL32) $(TEST_KERNEL32:%=%_implib) $(TEST_KERNEL32:%=%_clean) $(TEST_KERNEL32:%=%_install)
#
# msvcrt Test Applications
#
$(TEST_MSVCRT): %:
$(MAKE) -C msvcrt/$*
$(TEST_MSVCRT:%=%_implib): %_implib:
$(MAKE) -C msvcrt/$* implib
$(TEST_MSVCRT:%=%_clean): %_clean:
$(MAKE) -C msvcrt/$* clean
$(TEST_MSVCRT:%=%_install): %_install:
$(MAKE) -C msvcrt/$* install
.PHONY: $(TEST_MSVCRT) $(TEST_MSVCRT:%=%_implib) $(TEST_MSVCRT:%=%_clean) $(TEST_MSVCRT:%=%_install)
#
# COM Test Applications
#
$(TEST_COM): %:
$(MAKE) -C com/$*
$(TEST_COM:%=%_implib): %_implib:
$(MAKE) -C com/$* implib
$(TEST_COM:%=%_clean): %_clean:
$(MAKE) -C com/$* clean
$(TEST_COM:%=%_install): %_install:
$(MAKE) -C com/$* install
.PHONY: $(TEST_COM) $(TEST_COM:%=%_implib) $(TEST_COM:%=%_clean) $(TEST_COM:%=%_install)
#
# SEH Test Applications
#
$(TEST_SEH): %:
$(MAKE) -C seh/$*
$(TEST_SEH:%=%_implib): %_implib:
$(MAKE) -C seh/$* implib
$(TEST_SEH:%=%_clean): %_clean:
$(MAKE) -C seh/$* clean
$(TEST_SEH:%=%_install): %_install:
$(MAKE) -C seh/$* install
.PHONY: $(TEST_SEH) $(TEST_SEH:%=%_implib) $(TEST_SEH:%=%_clean) $(TEST_SEH:%=%_install)
#
# Regression Test Applications
#
$(TEST_REGRESSIONS): %:
$(MAKE) -C regres/$*
$(TEST_REGRESSIONS:%=%_implib): %_implib:
$(MAKE) -C regres/$* implib
$(TEST_REGRESSIONS:%=%_clean): %_clean:
$(MAKE) -C regres/$* clean
$(TEST_REGRESSIONS:%=%_install): %_install:
$(MAKE) -C regres/$* install
.PHONY: $(TEST_REGRESSIONS) $(TEST_REGRESSIONS:%=%_implib) $(TEST_REGRESSIONS:%=%_clean) $(TEST_REGRESSIONS:%=%_install)
etags:
find . -name "*.[ch]" -print | etags --language=c -
# EOF

View File

@@ -0,0 +1,10 @@
*.o
*.d
*.exe
*.coff
*.sym
*.dsp
*.dsw
*.ncb
*.opt
*.map

View File

@@ -1,5 +1,5 @@
/*
* ReactOS test program -
* ReactOS test program -
*
* loadlib.c
*
@@ -23,7 +23,6 @@
#include <windows.h>
#include "loadlib.h"
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#define APP_VERSION 1
@@ -91,7 +90,7 @@ const char* appName(const char* argv0)
const char* name;
name = (const char*)strrchr(argv0, '\\');
if (name != NULL)
if (name != NULL)
return name + 1;
return argv0;
}

View File

@@ -1,5 +1,5 @@
/*
* ReactOS test program -
* ReactOS test program -
*
* loadlib.h
*

View File

@@ -0,0 +1,26 @@
#
# $Id: makefile,v 1.0
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = loadlib
TARGET_CFLAGS = -Wall -Werror
#TARGET_CFLAGS = -DDBG -DUNICODE -D_UNICODE
TARGET_SDKLIBS = kernel32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,5 +1,5 @@
/*
* ReactOS test program -
* ReactOS test program -
*
* _tfileio.c
*
@@ -31,8 +31,8 @@
#define _tfopen _wfopen
#define _tunlink _wunlink
#define _TEOF WEOF
#define _gettchar getwchar
#define _puttchar putwchar
#define _gettchar getwchar
#define _puttchar putwchar
#define _THEX_FORMAT _T("0x%04x ")
#else /*UNICODE*/
#define _tfopen fopen

View File

@@ -1,5 +1,5 @@
/*
* ReactOS test program -
* ReactOS test program -
*
* _fileio.c
*

View File

@@ -0,0 +1,124 @@
/*
* ReactOS test program -
*
* main.c
*
* Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
*
* 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.
*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
#include "main.h"
#define VERSION 1
#ifdef UNICODE
#define TARGET "UNICODE"
#else
#define TARGET "MBCS"
#endif
BOOL verbose_flagged = 0;
BOOL status_flagged = 0;
int usage(char* argv0)
{
printf("USAGE: %s test_id [unicode]|[ansi] [clean]|[status][verbose]\n", argv0);
printf("\tWhere test_id is one of:\n");
printf("\t0 - (default) regression mode, run tests 1-4 displaying failures only\n");
printf("\t1 - Write DOS style eol data to file in text mode (text.dos)\n");
printf("\t2 - Write NIX style eol data to file in binary mode (binary.dos)\n");
printf("\t3 - Write DOS style eol data to file in text mode (text.nix)\n");
printf("\t4 - Write NIX style eol data to file in binary mode (binary.nix)\n");
printf("\t5 - Echo console line input\n");
printf("\t6 - Dump console line input in hex format\n");
printf("\t7 - The source code is your friend\n");
printf("\t[unicode] - perform tests using UNICODE versions of library functions\n");
printf("\t[ansi] - perform tests using ANSI versions of library functions\n");
printf("\t If neither unicode or ansi is specified build default is used\n");
printf("\t[clean] - delete all temporary test output files\n");
printf("\t[status] - enable extra status display while running\n");
printf("\t[verbose] - enable verbose output when running\n");
return 0;
}
int __cdecl main(int argc, char* argv[])
{
int test_num = 0;
int version = 0;
int result = 0;
int i = 0;
printf("%s test application - build %03d (default: %s)\n", argv[0], VERSION, TARGET);
if (argc < 2) {
return usage(argv[0]);
}
for (i = 1; i < argc; i++) {
if (strstr(argv[i], "ansi") || strstr(argv[i], "ANSI")) {
version = 1;
} else if (strstr(argv[i], "unicode") || strstr(argv[i], "UNICODE")) {
version = 2;
} else if (strstr(argv[i], "clean") || strstr(argv[i], "CLEAN")) {
test_num = -1;
} else if (strstr(argv[i], "verbose") || strstr(argv[i], "VERBOSE")) {
verbose_flagged = 1;
} else if (strstr(argv[i], "status") || strstr(argv[i], "STATUS")) {
status_flagged = 1;
} else {
test_num = atoi(argv[1]);
//if (test_num < 0
}
}
for (i = test_num; i <= test_num; i++) {
if (!test_num) {
test_num = 4;
i = 1;
}
switch (version) {
case 1:
result = run_ansi_tests(i);
break;
case 2:
result = run_unicode_tests(i);
break;
default:
result = run_ansi_tests(i);
result = run_unicode_tests(i);
break;
}
}
printf("finished\n");
return result;
}
#ifndef __GNUC__
char* args[] = { "fileio.exe", "0", "unicode", "verbose"};
int __cdecl mainCRTStartup(void)
{
main(2, args);
return 0;
}
#endif /*__GNUC__*/

View File

@@ -0,0 +1,42 @@
/*
* ReactOS test program -
*
* main.h
*
* Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
*
* 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 __MAIN_H__
#define __MAIN_H__
#ifdef __cplusplus
extern "C" {
#endif
int app_main(int argc, char* argv[]);
DWORD GetInput(char* Buffer, int buflen);
int test_ansi_files(int test_num);
int test_unicode_files(int test_num);
#ifdef __cplusplus
};
#endif
#endif // __MAIN_H__

View File

@@ -0,0 +1,27 @@
#
# $Id: makefile,v 1.0
PATH_TO_TOP = ../../../..
TEST_ROOT = $(PATH_TO_TOP)/apps/testsets/test
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = fileio
#TARGET_CFLAGS = -I$(TEST_ROOT) -DDBG -DUNICODE -D_UNICODE
TARGET_CFLAGS = -I$(TEST_ROOT) -DDBG
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o wfileio.o main.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,5 +1,5 @@
/*
* ReactOS test program -
* ReactOS test program -
*
* wfileio.c
*

View File

@@ -0,0 +1,71 @@
#
# ReactOS system utilities makefile
#
PATH_TO_TOP = ../..
include $(PATH_TO_TOP)/rules.mak
# Console system utilities
# cabman cat net objdir partinfo pice ps sc stats
UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount consw rundll32 regsvr32 ps
UTIL_NET_APPS =
all: $(UTIL_APPS) $(UTIL_NET_APPS)
depends:
implib: $(UTIL_APPS:%=%_implib) \
$(UTIL_NET_APPS:%=%_implib)
clean: $(UTIL_APPS:%=%_clean) \
$(UTIL_NET_APPS:%=%_clean)
install: $(UTIL_APPS:%=%_install) \
$(UTIL_NET_APPS:%=%_install)
.PHONY: all depends implib clean install
#
# Utility Applications
#
$(UTIL_APPS): %:
$(MAKE) -C $*
$(UTIL_APPS:%=%_implib): %_implib:
$(MAKE) -C $* implib
$(UTIL_APPS:%=%_clean): %_clean:
$(MAKE) -C $* clean
$(UTIL_APPS:%=%_install): %_install:
$(MAKE) -C $* install
.PHONY: $(UTIL_APPS) $(UTIL_APPS:%=%_implib) $(UTIL_APPS:%=%_clean) $(UTIL_APPS:%=%_install)
#
# GUI Utility Applications
#
$(UTIL_NET_APPS): %:
$(MAKE) -C net/$*
$(UTIL_NET_APPS:%=%_implib): %_implib:
$(MAKE) -C net/$* implib
$(UTIL_NET_APPS:%=%_clean): %_clean:
$(MAKE) -C net/$* clean
$(UTIL_NET_APPS:%=%_install): %_install:
$(MAKE) -C net/$* install
.PHONY: $(UTIL_NET_APPS) $(UTIL_NET_APPS:%=%_implib) $(UTIL_NET_APPS:%=%_clean) $(UTIL_NET_APPS:%=%_install)
etags:
find . -name "*.[ch]" -print | etags --language=c -
# EOF

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,26 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i;
FILE* in;
char ch;
for (i=1; i<argc; i++)
{
in = fopen(argv[i],"r");
if (in == NULL)
{
printf("Failed to open file %s\n", argv[i]);
return(0);
}
while ((ch = fgetc(in)) != EOF)
{
putchar(ch);
}
fclose(in);
}
return 0;
}

View File

@@ -0,0 +1,21 @@
# $Id: makefile,v 1.11 2003/11/14 17:13:22 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = cat
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,7 @@
consw.exe
consw.nostrip.exe
consw.sym
consw.coff
*.d
*.o
*.map

View File

@@ -0,0 +1,30 @@
/* $Id: consw.c,v 1.2 2003/11/14 17:13:22 weiden Exp $
*
* DESCRIPTION: Console mode switcher
* PROGRAMMER: Art Yerkes
* REVISIONS
* 2003-07-26 (arty)
*/
#include <windows.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void STDCALL SetConsoleHardwareState( HANDLE conhandle,
DWORD flags,
DWORD state );
int main(int argc, char* argv[])
{
if( argc > 1 ) {
SetConsoleHardwareState( GetStdHandle( STD_INPUT_HANDLE ),
0,
!strcmp( argv[1], "hw" ) );
}
return 0;
}
/* EOF */

View File

@@ -0,0 +1,23 @@
# $Id: makefile,v 1.2 2003/11/14 17:13:22 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = consw
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,5 @@
@echo off
rem Turn off cosole, run a program, turn console on
\reactos\bin\consw sw
"%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"
\reactos\bin\consw hw

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,32 @@
/*
* Load a device driver
*/
#include <windows.h>
#include <ntos/zw.h>
int
main(int argc, char *argv[])
{
NTSTATUS Status;
UNICODE_STRING ServiceName;
if (argc != 2)
{
printf("Usage: load <ServiceName>\n");
return 0;
}
ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR);
ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL));
wsprintf(ServiceName.Buffer,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S",
argv[1]);
wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer));
Status = NtLoadDriver(&ServiceName);
free(ServiceName.Buffer);
if (!NT_SUCCESS(Status))
{
printf("Failed: %X\n", Status);
return 1;
}
return 0;
}

View File

@@ -0,0 +1,21 @@
PATH_TO_TOP = ../../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = load
TARGET_CFLAGS = -DUNICODE -D_UNICODE
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,21 @@
PATH_TO_TOP = ../../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = unload
TARGET_CFLAGS = -DUNICODE -D_UNICODE
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,32 @@
/*
* Unload a device driver
*/
#include <windows.h>
#include <ntos/zw.h>
int
main(int argc, char *argv[])
{
NTSTATUS Status;
UNICODE_STRING ServiceName;
if (argc != 2)
{
printf("Usage: unload <ServiceName>\n");
return 0;
}
ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR);
ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL));
wsprintf(ServiceName.Buffer,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S",
argv[1]);
wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer));
Status = NtUnloadDriver(&ServiceName);
free(ServiceName.Buffer);
if (!NT_SUCCESS(Status))
{
printf("Failed: %X\n", Status);
return 1;
}
return 0;
}

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,21 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = infinst
TARGET_SDKLIBS = comdlg32.a setupapi.a
TARGET_OBJECTS = infinst.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,2 @@
*.coff
*.map

View File

@@ -1,3 +1,4 @@
/* $Id: roshttpd.rc,v 1.1.34.1 2004/10/25 03:17:50 ion Exp $ */
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS HTTP Win32 Server\0"
#define REACTOS_STR_INTERNAL_NAME "roshttpd\0"

View File

@@ -7,9 +7,9 @@
* REVISIONS:
* CSH 01/09/2000 Created
*/
#include <socket.h>
#include <string.h>
#include <error.h>
#include <socket.h>
#include <iterator.h>
// ***************************** CSocket *****************************
@@ -28,7 +28,7 @@ CSocket::CSocket()
// Any address will do
SockAddrIn.sin_addr.s_addr = INADDR_ANY;
// Convert to network ordering
// Convert to network ordering
SockAddrIn.sin_port = htons(0);
}
@@ -48,7 +48,7 @@ VOID CSocket::SetSocket(SOCKET socket)
{
Socket = socket;
}
// Return socket address
SOCKADDR_IN CSocket::GetSockAddrIn()
@@ -71,7 +71,7 @@ VOID CSocket::SetEvents(LONG lEvents)
if (Event == WSA_INVALID_EVENT)
throw ESocketOpen(TS("Unable to create event."));
}
if (lEvents != Events) {
// Associate network events with socket
if (WSAEventSelect(Socket, Event, lEvents) == SOCKET_ERROR)
@@ -102,43 +102,43 @@ VOID CSocket::Close()
// Constructor with serversocket as parameter
CServerClientSocket::CServerClientSocket(LPCServerSocket lpServerSocket)
{
ServerSocket = lpServerSocket;
ServerSocket = lpServerSocket;
}
// Transmit data to socket
INT CServerClientSocket::Transmit( LPCSTR lpsBuffer, UINT nLength)
INT CServerClientSocket::Transmit( LPSTR lpsBuffer, UINT nLength)
{
return send(Socket, lpsBuffer, nLength, 0);
}
// Send a string to socket
INT CServerClientSocket::SendText( LPCSTR lpsText)
INT CServerClientSocket::SendText( LPSTR lpsText)
{
static CHAR crlf[3] = {0x0D, 0x0A, 0x00};
INT nCount;
INT nCount;
nCount = Transmit(lpsText, strlen(lpsText));
nCount += Transmit(crlf, strlen(crlf));
return nCount;
nCount += Transmit(crlf, strlen(crlf));
return nCount;
}
// Receive data from socket
INT CServerClientSocket::Receive(LPSTR lpsBuffer, UINT nLength)
{
return recv(Socket, lpsBuffer, nLength, 0);
return recv(Socket, lpsBuffer, nLength, 0);
}
// Process winsock messages if any
VOID CServerClientSocket::MessageLoop()
{
UINT nStatus;
UINT nStatus;
WSANETWORKEVENTS NetworkEvents;
nStatus = WSAWaitForMultipleEvents(1, &Event, FALSE, 0, FALSE);
if ((nStatus == 0) && (WSAEnumNetworkEvents(Socket, Event, &NetworkEvents) != SOCKET_ERROR)) {
if ((NetworkEvents.lNetworkEvents & FD_READ) != 0) {
OnRead();
}
}
if ((NetworkEvents.lNetworkEvents & FD_CLOSE) != 0) {
OnClose();
}
@@ -165,7 +165,7 @@ CServerClientThread::~CServerClientThread()
}
// ************************** CServerSocket **************************
// ************************** CServerSocket **************************
// Default constructor
CServerSocket::CServerSocket()
@@ -183,8 +183,8 @@ CServerSocket::~CServerSocket()
VOID CServerSocket::Open()
{
assert(!Active);
// Convert to network ordering
// Convert to network ordering
SockAddrIn.sin_port = htons(Port);
if (Socket == INVALID_SOCKET) {
@@ -222,7 +222,7 @@ VOID CServerSocket::Close()
throw ESocketClose(TS("Unable to close socket event."));
Event = WSA_INVALID_EVENT;
}
CIterator<LPCServerClientThread> *i = Connections.CreateIterator();
// Terminate and free all client threads
@@ -257,7 +257,7 @@ VOID CServerSocket::MessageLoop()
WSANETWORKEVENTS NetworkEvents;
LPCServerClientSocket lpClient;
LPCServerClientThread lpThread;
nStatus = WSAWaitForMultipleEvents(1, &Event, FALSE, 0, FALSE);
if ((nStatus == 0) && (WSAEnumNetworkEvents(Socket, Event, &NetworkEvents) != SOCKET_ERROR)) {
if ((NetworkEvents.lNetworkEvents & FD_ACCEPT) != 0) {
@@ -322,13 +322,13 @@ VOID InitWinsock()
WSADATA wsaData;
wVersionRequested = MAKEWORD(2, 0);
if (WSAStartup(wVersionRequested, &wsaData) != 0)
// Return FALSE as we couldn't find a usable WinSock DLL
throw ESocketWinsock(TS("Unable to initialize winsock dll."));
/* Confirm that the WinSock DLL supports 2.0 */
if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) {
// We couldn't find a usable winsock dll
WSACleanup();

View File

@@ -42,7 +42,7 @@ void CConfig::Reset()
void CConfig::Default()
{
Clear();
MainBase = _wcsdup((LPWSTR)dcfgMainBase);
MainBase = (LPWSTR)_wcsdup(dcfgMainBase);
HttpBase = _strdup(dcfgHttpBase);
LPSTR lpsStr;

View File

@@ -12,14 +12,14 @@
* - Implement more entity-header entries
*/
#include <debug.h>
#include <iostream>
#include <iostream.h>
#include <string.h>
#include <http.h>
CHAR MethodTable[NUMMETHODS][8] = {"OPTIONS", "GET", "HEAD", "POST", "PUT",
CHAR MethodTable[NUMMETHODS][8] = {"OPTIONS", "GET", "HEAD", "POST", "PUT",
"DELETE", "TRACE"};
CHAR GenerelTable[NUMGENERELS][18] = {"Cache-Control", "Connection", "Date", "Pragma",
CHAR GenerelTable[NUMGENERELS][18] = {"Cache-Control", "Connection", "Date", "Pragma",
"Transfer-Encoding", "Upgrade", "Via"};
CHAR RequestTable[NUMREQUESTS][20] = {"Accept", "Accept-Charset", "Accept-Encoding",
@@ -98,7 +98,7 @@ BOOL CHttpParser::ReadChar(LPSTR lpsStr)
BOOL CHttpParser::PeekChar(LPSTR lpsStr)
{
UINT nFakeTail;
if (nTail == sizeof(sBuffer))
nFakeTail = 0;
else
@@ -117,10 +117,10 @@ BOOL CHttpParser::ReadString(LPSTR lpsStr, UINT nLength)
{
UINT i = 0;
CHAR sTmp;
while (PeekChar(&sTmp)) {
if (((sTmp >= 'A') && (sTmp <= 'Z')) || ((sTmp >= 'a') && (sTmp <= 'z')) ||
((sTmp >= '0') && (sTmp <= '9')) || (sTmp == '-')) {
((sTmp >= '0') && (sTmp <= '9')) || (sTmp == '-')) {
if (i >= (nLength - 1)) {
lpsStr[0] = 0;
return FALSE;
@@ -137,13 +137,13 @@ BOOL CHttpParser::ReadString(LPSTR lpsStr, UINT nLength)
return FALSE;
}
// Read a string from buffer. Stop if SP or CR is found or when there are no more
// Read a string from buffer. Stop if SP or CR is found or when there are no more
// characters
BOOL CHttpParser::ReadSpecial(LPSTR lpsStr, UINT nLength)
{
UINT i = 0;
CHAR sTmp;
while (PeekChar(&sTmp) && (sTmp != ' ') && (sTmp != 13)) {
if (i >= (nLength - 1)) {
lpsStr[nLength - 1] = 0;
@@ -186,12 +186,15 @@ BOOL CHttpParser::ExpectCRLF()
return (Expect(13) && Expect(10));
}
// Request = RequestLine | *( GenerelHeader | RequestHeader | EntityHeader )
// Request = RequestLine | *( GenerelHeader | RequestHeader | EntityHeader )
// CRLF [ MessageBody ]
BOOL CHttpParser::Parse()
{
BOOL bStatus;
CHAR ch;
if (RequestLine()) {
do {
if (!ReadString(sHeader, sizeof(sHeader)))
@@ -217,10 +220,10 @@ BOOL CHttpParser::RequestLine()
bUnknownMethod = FALSE;
// RFC 2068 states that servers SHOULD ignore any empty nine(s) received where a
// RFC 2068 states that servers SHOULD ignore any empty nine(s) received where a
// Request-Line is expected
while (PeekChar(&sCh) && ((sCh == 13) || (sCh == 10)));
if (!ReadString(sMethod, sizeof(sMethod)))
return FALSE;
@@ -248,7 +251,7 @@ BOOL CHttpParser::RequestLine()
return FALSE;
}
// GenerelHeader = Cache-Control | Connection | Date | Pragma | Transfer-Encoding |
// GenerelHeader = Cache-Control | Connection | Date | Pragma | Transfer-Encoding |
// Upgrade | Via
BOOL CHttpParser::GenerelHeader()
{
@@ -354,9 +357,9 @@ BOOL CHttpParser::EntityHeader()
for (i = 0; i < NUMENTITIES; i++) {
if (strcmp(EntityTable[i], sHeader) == 0) {
switch (i) {
case 0:
case 0:
default: {
//cout << "<Entity-Header>: #" << i << endl;
//cout << "<Entity-Header>: #" << i << endl;
Expect(':');
Expect(' ');
Skip(13);

View File

@@ -41,7 +41,7 @@ CHttpClient::CHttpClient(CServerSocket *serversocket)
VOID CHttpClient::SplitUri(LPSTR lpsUri, LPSTR lpsHost, LPSTR lpsResource, LPSTR lpsParams)
{
LPSTR lpsPos;
LPSTR lpsStr;
LPSTR lpsStr;
UINT i;
strcpy(lpsHost, "");
@@ -53,7 +53,7 @@ VOID CHttpClient::SplitUri(LPSTR lpsUri, LPSTR lpsHost, LPSTR lpsResource, LPSTR
lpsStr = &lpsPos[3];
else
lpsStr = lpsUri;
lpsPos = strstr(lpsStr, "/");
if (lpsPos != NULL) {
strncat(lpsHost, lpsPos, lpsPos - lpsStr);
@@ -80,11 +80,11 @@ VOID CHttpClient::SplitUri(LPSTR lpsUri, LPSTR lpsHost, LPSTR lpsResource, LPSTR
VOID CHttpClient::SplitResource(LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilename, LPSTR lpsExtension)
{
INT i,len,fileptr,extptr;
strcpy(lpsPath, "");
strcpy(lpsFilename, "");
strcpy(lpsExtension, "");
len = strlen(lpsResource);
if (len != 0) {
if (lpsResource[len - 1] == '/') {
@@ -102,7 +102,7 @@ VOID CHttpClient::SplitResource(LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilen
strncat(lpsPath, lpsResource, fileptr);
} else
fileptr = 1;
// Get filename and possibly extension
if (extptr != 0) {
strncat(lpsFilename, &lpsResource[fileptr], extptr - fileptr);
@@ -118,7 +118,7 @@ VOID CHttpClient::SplitResource(LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilen
VOID CHttpClient::ProcessRequest()
{
CHAR sStr[255];
CHAR sHost[255];
CHAR sHost[255];
CHAR sResource[255];
CHAR sParams[255];
@@ -126,7 +126,7 @@ VOID CHttpClient::ProcessRequest()
switch (Parser.nMethodNo) {
case hmGET: {
SplitUri(Parser.sUri, sHost, sResource, sParams);
// Default resource?
if (strlen(sResource) == 0) {
CIterator<LPSTR> *i = pConfiguration->GetDefaultResources()->CreateIterator();
@@ -145,7 +145,7 @@ VOID CHttpClient::ProcessRequest()
}
}
strcpy(sStr, pConfiguration->GetHttpBase());
strcat(sStr, sResource);
strcat(sStr, sResource);
SendFile(sStr);
break;
}
@@ -166,7 +166,7 @@ VOID CHttpClient::SendFile(LPSTR lpsFilename)
unsigned long long Big;
struct {
DWORD Low;
DWORD High;
DWORD High;
} u;
} nTotalBytes;
DWORD nBytesToRead;
@@ -175,16 +175,16 @@ VOID CHttpClient::SendFile(LPSTR lpsFilename)
// Try to open file
hFile = CreateFileA(lpsFilename,
GENERIC_READ, // Open for reading
FILE_SHARE_READ, // Share for reading
NULL, // No security
OPEN_EXISTING, // Existing file only
FILE_ATTRIBUTE_NORMAL, // Normal file
NULL); // No attr. template
if (hFile == INVALID_HANDLE_VALUE) {
GENERIC_READ, // Open for reading
FILE_SHARE_READ, // Share for reading
NULL, // No security
OPEN_EXISTING, // Existing file only
FILE_ATTRIBUTE_NORMAL, // Normal file
NULL); // No attr. template
if (hFile == INVALID_HANDLE_VALUE) {
// File not found
Report("404 Not Found", HttpMsg404);
return;
return;
}
// Get file size
nTotalBytes.u.Low = GetFileSize(hFile, &nTotalBytes.u.High);
@@ -212,7 +212,7 @@ VOID CHttpClient::SendFile(LPSTR lpsFilename)
return;
}
SendText("HTTP/1.1 200 OK");
SendText("HTTP/1.1 200 OK");
SendText("Server: ROSHTTPD");
SendText("MIME-version: 1.0");
SendText("Content-Type: text/plain");
@@ -251,7 +251,7 @@ VOID CHttpClient::SendFile(LPSTR lpsFilename)
// We can't send an error message here as we are in the process of sending a file.
// We have to terminate the connection instead
Close();
// Free allocated memory
free(lpsBuffer);
@@ -260,11 +260,11 @@ VOID CHttpClient::SendFile(LPSTR lpsFilename)
}
// Report something to client
VOID CHttpClient::Report(LPCSTR lpsCode, LPSTR lpsStr)
VOID CHttpClient::Report(LPSTR lpsCode, LPSTR lpsStr)
{
CHAR sTmp[128];
CHAR sTmp2[16];
strcpy(sTmp, "HTTP/1.1 ");
strcat(sTmp, lpsCode);
SendText(sTmp);
@@ -407,9 +407,9 @@ BOOL CHttpDaemon::Start()
SetPort(pConfiguration->GetPort());
Open();
State = hsRunning;
return TRUE;
}
@@ -449,7 +449,7 @@ VOID CHttpDaemon::OnAccept(LPCServerClientThread lpThread)
VOID CHttpDaemonThread::Execute()
{
MSG Msg;
try {
Daemon = NULL;
Daemon = new CHttpDaemon;

View File

@@ -0,0 +1,49 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS HTTP Daemon
* FILE: include/config.h
*/
#ifndef __CONFIG_H
#define __CONFIG_H
#include <list.h>
#include <httpd.h>
// General constants
#define APP_DESCRIPTION _T("ReactOS HTTP Daemon")
// Default configuration
#define dcfgDescription _T("Default configuration")
#define dcfgMainBase _T("C:\\roshttpd\\")
#define dcfgHttpBase "C:\\roshttpd\\HttpBase\\"
#define dcfgDefaultResource "index.html"
#define dcfgDefaultPort 80
class CConfig {
public:
CConfig();
~CConfig();
VOID Default();
VOID Clear();
BOOL Load();
BOOL Save();
LPWSTR GetMainBase();
VOID SetMainBase(LPWSTR lpwsMainBase);
LPSTR GetHttpBase();
VOID SetHttpBase(LPSTR lpsHttpBase);
CList<LPSTR>* GetDefaultResources();
USHORT GetPort();
VOID SetPort(USHORT wPort);
private:
VOID Reset();
LPWSTR MainBase;
LPSTR HttpBase;
CList<LPSTR> DefaultResources;
USHORT Port;
};
typedef CConfig* LPCConfig;
extern LPCConfig pConfiguration;
extern LPCHttpDaemonThread pDaemonThread;
#endif /* __CONFIG_H */

View File

@@ -0,0 +1,17 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS HTTP Daemon
* FILE: include/debug.h
*/
#ifndef __DEBUG_H
#define __DEBUG_H
#include <stdio.h>
#ifdef DBG
#define DPRINT(x...) printf(x)
#else
#define DPRINT(x...)
#endif
#endif /* __DEBUG_H */

View File

@@ -6,8 +6,8 @@
#ifndef __HTTPD_H
#define __HTTPD_H
#include <socket.h>
#include <thread.h>
#include <socket.h>
#include <http.h>
#define HTTPD_START WM_USER + 1
@@ -37,7 +37,7 @@ public:
void SplitResource(const LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilename, LPSTR lpsExtension);
void ProcessRequest();
void SendFile(const LPSTR lpsFilename);
void Report(LPCSTR lpsCode, const LPSTR lpsStr);
void Report(const LPSTR lpsCode, const LPSTR lpsStr);
private:
BOOL bStop;
LPSTR lpsBuffer;

View File

@@ -11,8 +11,6 @@
template <class Item>
class CIterator {
public:
virtual ~CIterator()
{}
virtual VOID First() = 0;
virtual VOID Next() = 0;
virtual BOOL IsDone() const = 0;

View File

@@ -0,0 +1,233 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS HTTP Daemon
* FILE: include/list.h
*/
#ifndef __LIST_H
#define __LIST_H
#include <windows.h>
#include <iterator.h>
class CListNode {
public:
CListNode();
CListNode(VOID *element, CListNode *next, CListNode *prev);
~CListNode() {};
void* operator new(/*size_t s*/ UINT s);
VOID operator delete(void* p);
VOID SetElement(PVOID element);
VOID SetNext(CListNode *next);
VOID SetPrev(CListNode *prev);
PVOID GetElement();
CListNode *GetNext();
CListNode *GetPrev();
private:
PVOID Element;
CListNode *Next;
CListNode *Prev;
static HANDLE hHeap;
static INT nRef;
};
template <class Item> class CList {
public:
//CList(CList&);
CList();
~CList();
CList& operator=(CList&);
CIterator<Item> *CreateIterator() const;
LONG Count() const;
Item& Get(const LONG index) const;
// Can throw bad_alloc
VOID Insert(Item& element);
VOID Remove(Item& element);
VOID RemoveAll();
CListNode *GetHeader() const;
CListNode *GetTrailer() const;
private:
CListNode *Search(Item& element) const;
LONG NodeCount;
CListNode *Header;
CListNode *Trailer;
};
template <class Item> class CListIterator : public CIterator<Item> {
public:
CListIterator(const CList<Item> *list);
virtual VOID First();
virtual VOID Next();
virtual BOOL IsDone() const;
virtual Item CurrentItem() const;
private:
const CList<Item> *List;
CListNode *Current;
};
// ****************************** CList ******************************
// Default constructor
template <class Item>
CList<Item>::CList()
{
// Create dummy nodes
Trailer = new CListNode;
Header = new CListNode;
Header->SetNext(Trailer);
Trailer->SetPrev(Header);
}
// Default destructor
template <class Item>
CList<Item>::~CList()
{
RemoveAll();
delete Trailer;
delete Header;
}
// Create an iterator for the list
template <class Item>
CIterator<Item> *CList<Item>::CreateIterator() const
{
return new CListIterator<Item>((CList<Item> *) this);
}
// Return number of elements in list
template <class Item>
LONG CList<Item>::Count() const
{
return NodeCount;
}
// Return element at index
template <class Item>
Item& CList<Item>::Get(const LONG index) const
{
CListNode *node;
if ((index < 0) || (index >= NodeCount))
return NULL;
node = Header;
for (i = 0; i <= index; i++)
node = node->GetNext();
return (Item *) node->GetElement();
}
// Insert an element into the list
template <class Item>
VOID CList<Item>::Insert(Item& element)
{
CListNode *node;
node = new CListNode((PVOID)element, Trailer, Trailer->GetPrev());
Trailer->GetPrev()->SetNext(node);
Trailer->SetPrev(node);
NodeCount++;
}
// Remove an element from the list
template <class Item>
VOID CList<Item>::Remove(Item& element)
{
CListNode *node;
node = Search(element);
if (node != NULL) {
node->GetPrev()->SetNext(node->GetNext());
node->GetNext()->SetPrev(node->GetPrev());
NodeCount--;
delete node;
}
}
// Remove all elements in list
template <class Item>
VOID CList<Item>::RemoveAll()
{
CListNode *node;
CListNode *tmp;
node = Header->GetNext();
while (node != Trailer) {
tmp = node->GetNext();
delete node;
node = tmp;
}
Header->SetNext(Trailer);
Trailer->SetPrev(Header);
NodeCount = 0;
}
// Return header node
template <class Item>
CListNode *CList<Item>::GetHeader() const
{
return Header;
}
// Return trailer node
template <class Item>
CListNode *CList<Item>::GetTrailer() const
{
return Trailer;
}
// Searches for a node that contains the element. Returns NULL if element is not found
template <class Item>
CListNode *CList<Item>::Search(Item& element) const
{
CListNode *node;
node = Header;
while (((node = node->GetNext()) != Trailer) && (node->GetElement() != element));
if (node != Trailer)
return node;
else
return NULL;
}
// ************************** CListIterator **************************
// Default constructor
template <class Item>
CListIterator<Item>::CListIterator(const CList<Item> *list) : List(list)
{
First();
}
// Go to first element in list
template <class Item>
VOID CListIterator<Item>::First()
{
Current = List->GetHeader()->GetNext();
}
// Go to next element in list
template <class Item>
VOID CListIterator<Item>::Next()
{
if (!IsDone())
Current = Current->GetNext();
}
// Return FALSE when there are more elements in list and TRUE when there are no more
template <class Item>
BOOL CListIterator<Item>::IsDone() const
{
return (Current == List->GetTrailer());
}
// Return current element
template <class Item>
Item CListIterator<Item>::CurrentItem() const
{
return IsDone()? NULL : (Item) Current->GetElement();
}
#endif /* __LIST_H */

View File

@@ -0,0 +1,141 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS HTTP Daemon
* FILE: include/socket.h
*/
#ifndef __SOCKET_H
#define __SOCKET_H
#include <msvcrt/stdio.h>
#include <windows.h>
#include <winsock2.h>
#include <thread.h>
#include <list.h>
#include <exception>
#include <assert.h>
#define MAX_PENDING_CONNECTS 4 // The backlog allowed for listen()
VOID InitWinsock();
VOID DeinitWinsock();
class CSocket;
class CClientSocket;
class CServerClientSocket;
class CServerClientThread;
class CServerSocket;
typedef CSocket* LPCSocket;
typedef CClientSocket* LPCClientSocket;
typedef CServerClientSocket* LPCServerClientSocket;
typedef CServerClientThread* LPCServerClientThread;
typedef CServerSocket* LPCServerSocket;
class ESocket {
public:
ESocket() { Description = NULL; }
ESocket(LPTSTR description) { Description = description; }
LPTSTR what() { return Description; }
protected:
LPTSTR Description;
};
class ESocketWinsock : public ESocket {
public:
ESocketWinsock(LPTSTR description) { Description = description; }
};
class ESocketDll : public ESocket {
public:
ESocketDll(LPTSTR description) { Description = description; }
};
class ESocketOpen : public ESocket {
public:
ESocketOpen(LPTSTR description) { Description = description; }
};
class ESocketClose : public ESocket {
public:
ESocketClose(LPTSTR description) { Description = description; }
};
class ESocketSend : public ESocket {
public:
ESocketSend(LPTSTR description) { Description = description; }
};
class ESocketReceive : public ESocket {
public:
ESocketReceive(LPTSTR description) { Description = description; }
};
class CSocket {
public:
CSocket();
virtual ~CSocket();
virtual SOCKET GetSocket();
virtual VOID SetSocket(SOCKET socket);
virtual SOCKADDR_IN GetSockAddrIn();
virtual VOID SetSockAddrIn(SOCKADDR_IN sockaddrin);
virtual VOID SetEvents(LONG lEvents);
virtual LONG GetEvents();
virtual VOID SetPort( UINT nPort) {};
virtual VOID Open();
virtual VOID Close();
virtual INT Transmit( LPSTR lpsBuffer, UINT nLength) { return 0; };
virtual INT Receive(LPSTR lpsBuffer, UINT nLength) { return 0; };
virtual INT SendText( LPSTR lpsStr) { return 0; };
protected:
SOCKET Socket;
SOCKADDR_IN SockAddrIn;
WSAEVENT Event;
UINT Port;
BOOL Active;
private:
LONG Events;
};
class CServerClientSocket : public CSocket {
public:
CServerClientSocket() {};
CServerClientSocket(LPCServerSocket lpServerSocket);
CServerSocket *GetServerSocket();
virtual INT Transmit( LPSTR lpsBuffer, UINT nLength);
virtual INT Receive(LPSTR lpsBuffer, UINT nLength);
virtual INT SendText( LPSTR lpsText);
virtual VOID MessageLoop();
virtual VOID OnRead() {};
//virtual VOID OnWrite() {};
virtual VOID OnClose() {};
protected:
LPCServerSocket ServerSocket;
};
class CServerClientThread : public CThread {
public:
CServerClientThread() {};
CServerClientThread(CServerClientSocket *socket);
virtual ~CServerClientThread();
protected:
CServerClientSocket *ClientSocket;
};
class CServerSocket : public CSocket {
public:
CServerSocket();
virtual ~CServerSocket();
virtual VOID SetPort( UINT nPort);
virtual VOID Open();
virtual VOID Close();
virtual LPCServerClientSocket OnGetSocket(LPCServerSocket lpServerSocket);
virtual LPCServerClientThread OnGetThread(LPCServerClientSocket lpSocket);
virtual VOID OnAccept( LPCServerClientThread lpThread) {};
virtual VOID MessageLoop();
VOID InsertClient(LPCServerClientThread lpClient);
VOID RemoveClient(LPCServerClientThread lpClient);
protected:
CList<LPCServerClientThread> Connections;
};
#endif /* __SOCKET_H */

View File

@@ -0,0 +1,31 @@
# $Id: makefile,v 1.8 2004/02/23 20:56:50 navaraf Exp $
PATH_TO_TOP = ../../../..
TARGET_PATH = common
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = roshttpd
TARGET_CPPFLAGS = -I./include -DUNICODE -D_UNICODE -DDBG -D__USE_W32API -Wno-deprecated
TARGET_GCCLIBS = stdc++
TARGET_SDKLIBS = kernel32.a ws2_32.a user32.a
MAIN_OBJECTS = roshttpd.o config.o error.o http.o httpd.o
COMMON_OBJECTS = common/list.o common/socket.o common/thread.o
TARGET_OBJECTS = $(MAIN_OBJECTS) $(COMMON_OBJECTS)
TARGET_CLEAN = common/*.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,26 @@
# $Id: Makefile,v 1.5 2002/06/07 22:58:02 ekohl Exp $
PATH_TO_TOP = ../../../..
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = telnet
TARGET_SDKLIBS = kernel32.a ws2_32.a
TARGET_OBJECTS = \
ansi.o \
console.o \
helpsock.o \
main.o \
nvt.o \
telnet.o \
vm.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,307 @@
/* $Id: ansi.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : ansi.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
*/
#include <winsock.h>
#include <windows.h>
#include "telnet.h"
// Need to implement a Keymapper.
// here are some example key maps
// vt100 f1 - \eOP
// vt100 f2 - \eOQ
// ansi f5 - \e[17~
// f6 - \e[18~
// f7 - \e[20~
// f10- \e[[V
enum _ansi_state
{
as_normal,
as_esc,
as_esc1
};
//SetConsoleMode
///////////////////////////////////////////////////////////////////////////////
// SET SCREEN ATTRIBUTE
/*
ESC [ Ps..Ps m Ps refers to selective parameter. Multiple parameters are
separated by the semicolon character (073 octal). The param-
eters are executed in order and have the following meaning:
0 or none All attributes off
1 Bold on
4 Underscore on
5 Blink on
7 Reverse video on
3x set foreground color to x
nx set background color to x
Any other parameters are ignored.
*/
static int sa = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
void ansi_set_screen_attribute(char* buffer)
{
while(*buffer)
{
switch(*buffer++)
{
case '0': //Normal
sa = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
break;
case '1': //Hign Intensity
sa |= FOREGROUND_INTENSITY;
break;
case '4': //Underscore
break;
case '5': //Blink.
sa |= BACKGROUND_INTENSITY;
break;
case '7':
sa = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE;
break;
case '8':
sa = 0;
break;
case '3':
sa = sa & (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY) |
(*buffer & 1)?FOREGROUND_RED:0 |
(*buffer & 2)?FOREGROUND_GREEN:0 |
(*buffer & 4)?FOREGROUND_BLUE:0;
if(*buffer)
buffer++;
break;
case '6':
sa = sa & (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY) |
(*buffer & 1)?BACKGROUND_RED:0 |
(*buffer & 2)?BACKGROUND_GREEN:0 |
(*buffer & 4)?BACKGROUND_BLUE:0;
if(*buffer)
buffer++;
break;
}
if(*buffer && *buffer == ';')
buffer++;
}
SetConsoleTextAttribute(StandardOutput,sa);
}
///////////////////////////////////////////////////////////////////////////////
// ERASE LINE
/*
ESC [ 0K Same *default*
ESC [ 1K Erase from beginning of line to cursor
ESC [ 2K Erase line containing cursor
*/
void ansi_erase_line(char* buffer)
{
int act = 0;
while(*buffer)
{
act = (*buffer++) - '0';
}
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(StandardOutput,&csbi);
COORD pos;
DWORD n;
switch(act)
{
case 0: //erase to end of line
pos.X = csbi.dwCursorPosition.X;
pos.Y = csbi.dwCursorPosition.Y;
n = csbi.dwSize.X - csbi.dwCursorPosition.X;
break;
case 1: //erase from beginning
pos.X = 0;
pos.Y = csbi.dwCursorPosition.Y;
n = csbi.dwCursorPosition.X;
break;
case 2: // erase whole line
pos.X = 0;
pos.Y = csbi.dwCursorPosition.Y;
n = csbi.dwSize.X;
break;
}
DWORD w;
FillConsoleOutputCharacter(StandardOutput,' ',n,pos,&w);
}
///////////////////////////////////////////////////////////////////////////////
// SET POSITION
// ESC [ Pl;PcH Direct cursor addressing, where Pl is line#, Pc is column#
// default = (1,1)
void ansi_set_position(char* buffer)
{
COORD pos = {0,0};
// Grab line
while(*buffer && *buffer != ';')
pos.Y = pos.Y*10 + *buffer++ - '0';
if(*buffer)
buffer++;
// Grab y
while(*buffer && *buffer != ';')
pos.X = pos.X*10 + *buffer++ - '0';
(pos.X)?pos.X--:0;
(pos.Y)?pos.Y--:0;
SetConsoleCursorPosition(StandardOutput,pos);
}
///////////////////////////////////////////////////////////////////////////////
// ERASE SCREEN
/*
ESC [ 0J Same *default*
ESC [ 2J Erase entire screen
*/
void ansi_erase_screen(char* buffer)
{
int act = 0;
while(*buffer)
{
act = (*buffer++) - '0';
}
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(StandardOutput,&csbi);
COORD pos;
DWORD n;
switch(act)
{
case 0:
pos.X = csbi.dwCursorPosition.X;
pos.Y = csbi.dwCursorPosition.Y;
n = csbi.dwSize.X*csbi.dwSize.Y;
break;
case 2:
pos.X = 0;
pos.Y = 0;
n = csbi.dwSize.X*csbi.dwSize.Y;
break;
}
DWORD w;
FillConsoleOutputCharacter(StandardOutput,' ',n,pos,&w);
SetConsoleCursorPosition(StandardOutput,pos);
}
///////////////////////////////////////////////////////////////////////////////
// MOVE UP
// ESC [ Pn A Cursor up Pn lines (Pn default=1)
void ansi_move_up(char* buffer)
{
int cnt = *buffer?0:1;
while(*buffer)
{
cnt = cnt*10 + (*buffer++) - '0';
}
COORD pos;
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(StandardOutput,&csbi);
pos.X = csbi.dwCursorPosition.X;
pos.Y = ((csbi.dwCursorPosition.Y-cnt)>=0)?(csbi.dwCursorPosition.Y-cnt):0;
SetConsoleCursorPosition(StandardOutput,pos);
}
///////////////////////////////////////////////////////////////////////////////
char codebuf[256];
unsigned char codeptr;
#define NUM_CODEC 6
typedef void (*LPCODEPROC)(char*);
struct
{
unsigned char cmd;
LPCODEPROC proc;
} codec[NUM_CODEC] = {
{'m',ansi_set_screen_attribute},
{'H',ansi_set_position},
{'K',ansi_erase_line},
{'J',ansi_erase_screen},
{'A',ansi_move_up},
{0,0}
};
void ansi(SOCKET server,unsigned char data)
{
static _ansi_state state = as_normal;
DWORD z;
switch( state)
{
case as_normal:
switch(data)
{
case 0: //eat null codes.
break;
case 27: //ANSI esc.
state = as_esc;
break;
default: //Send all else to the console.
WriteConsole(StandardOutput,&data,1,&z,NULL);
break;
}
break;
case as_esc:
state = as_esc1;
codeptr=0;
codebuf[codeptr] = 0;
break;
case as_esc1:
if(data > 64)
{
int i = 0;
codebuf[codeptr] = 0;
for(i=0; codec[i].cmd && codec[i].cmd != data; i++);
if(codec[i].proc)
codec[i].proc(codebuf);
#ifdef _DEBUG
else
{
char buf[256];
wsprintf(buf,"Unknown Ansi code:'%c' (%s)\n",data,codebuf);
OutputDebugString(buf);
}
#endif
state = as_normal;
}
else
codebuf[codeptr++] = data;
break;
}
}
/* EOF */

View File

@@ -0,0 +1,43 @@
/* $Id: console.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : console.cpp
* AUTHOR : E.Aliberti
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea added to group console-related methods
*/
#include <windows.h>
const char * title = "telnet - ";
// Set console's title
void console_title_connecting (
char const* pszHostName,
const int nPort
)
{
char t[256];
wsprintf(t,"%sconnecting to %s:%i", title, pszHostName, nPort);
SetConsoleTitle(t);
}
void console_title_connected (
char const* pszHostName,
const int nPort
)
{
char t[256];
wsprintf(t,"%sconnected to %s:%i", title, pszHostName, nPort);
SetConsoleTitle(t);
}
void console_title_not_connected (void)
{
char t[256];
wsprintf(t,"%snot connected", title);
SetConsoleTitle(t);
}
/* EOF */

View File

@@ -0,0 +1,12 @@
#ifndef _APPS_NET_TELNET_CONSOLE_H
#define _APPS_NET_TELNET_CONSOLE_H
void console_title_connecting (
char const* pszHostName,
const int nPort
);
void console_title_connected (
char const* pszHostName,
const int nPort
);
void console_title_not_connected (void);
#endif /* _APPS_NET_TELNET_CONSOLE_H */

View File

@@ -0,0 +1,40 @@
/* $Id: helpsock.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : helpsock.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
*/
#include <winsock.h>
#include <windows.h>
#include <process.h>
#include "telnet.h"
char const* sockmsg(int ecode)
{
switch(ecode)
{
// programming errors
// (should never occour in release code?)
case WSASYSNOTREADY: return "tcp/ip network not ready";
case WSAEINVAL: return "invalid winsock version";
case WSAVERNOTSUPPORTED: return "wrong winsock version";
case WSANOTINITIALISED: return "winsock not initialized";
case WSAEINTR: "The call was canceled";
case WSAEINPROGRESS: "A blocking winsock operation is in progress";
default: return "unknown winsock error";
// general TCP problems
case WSAENETDOWN: return "winsock has detected that the network subsystem has failed";
// GetXbyY related errors:
case WSAHOST_NOT_FOUND: return "Authoritative Answer Host not found";
case WSATRY_AGAIN: return "Non-Authoritative Host not found, or SERVERFAIL";
case WSANO_RECOVERY: "Nonrecoverable errors: FORMERR, REFUSED, NOTIMP";
case WSANO_DATA: "Valid name, no data record of requested type";
}
}
/* EOF */

View File

@@ -0,0 +1,180 @@
/* $Id: main.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : main.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
* 2001-02-27 ea If run with no argument, it asks for a hostname.
*/
///////////////////////////////////////////////////////////////////////////////
//
// File:
// main.cpp
//
// Purpose:
// This file provdes the main entry point for the project, and all the
// global scope support routines.
//
// Notes:
// This file expects to be linked without the C-Runtime. If compiling,
// please force the entry point symbol to be "main", and do not link in
// the default librarys.
// This means that no c-runtime functions can be used anywhere in the
// project. I expect this will also exclude any MFC based additions.
//
///////////////////////////////////////////////////////////////////////////////
#include <winsock.h>
#include <windows.h>
#include <process.h>
#include <stdlib.h>
#include "telnet.h"
///////////////////////////////////////////////////////////////////////////////
//
// Our simple replacement for the c-runtime includes getting the StandardInput,
// StandardOutput & StandardError handles, and providing new and delete operators, that work
// with the win32 heap functions.
//
//
// standard handles needed for CRT emulation
//
HANDLE hHeap;
HANDLE StandardInput;
HANDLE StandardOutput;
HANDLE StandardError;
//
// new will use the win32 heap functions.
//
void* operator new(unsigned int nSize)
{
return HeapAlloc(hHeap,0,nSize);
}
//
// delete operator provides all memory de-allocation.
// HeapFree doesn't accept NULL.
//
void operator delete(void* pMem)
{
if(pMem) HeapFree(hHeap,0,pMem);
}
void err(char const* s, ...)
{
char buf [1024];
DWORD nout;
wvsprintf (buf, s, (char*)(s + sizeof(int)));
WriteFile (StandardError,"Error: ", 7, & nout, NULL);
WriteFile (StandardError, buf, lstrlen(buf), & nout, NULL);
WriteFile (StandardError, "\r\n\r\n", 4, & nout, NULL);
#ifdef _DEBUG
OutputDebugString(buf);
OutputDebugString("\n");
#endif
ExitProcess (ERROR_SUCCESS);
}
int main(int argc, char * argv[])
{
WSADATA wd;
int errn;
char name [256] = {'\0'};
short port = IPPORT_TELNET; /* default tcp port */
///////////////////////////////////////
// CRT emulation init
// Get the IO handles
StandardInput = GetStdHandle(STD_INPUT_HANDLE);
StandardOutput = GetStdHandle(STD_OUTPUT_HANDLE);
StandardError = GetStdHandle(STD_ERROR_HANDLE);
// Get the heap
hHeap = GetProcessHeap();
// Explicitly force the console into a good mode (actually all we are doing is turning
// mouse input off.
SetConsoleMode (
StandardInput,
(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT)
);
///////////////////////////////////////
// Init winsock
if (errn = WSAStartup (0x0101, & wd))
{
err(sockmsg(errn));
}
/* hostname */
if (1 < argc)
{
lstrcpy (name, argv [1]);
}
/*
* Default port is IPPORT_TELNET.
* User may hand one.
*/
if (3 == argc)
{
port = atoi (argv[2]);
if (port <= 0)
{
struct servent * service = NULL;
service = getservbyname (argv[2], "tcp");
if (NULL == service)
{
err("Invalid service name specified");
}
port = service->s_port;
}
else
{
err("Invalid port specified");
}
}
/* Too many arguments */
if (3 < argc)
{
err("Usage: telnet <hostname> [<port>]");
}
/* No argument */
if (1 == argc)
{
DWORD Count;
char *c;
WriteFile (StandardError,"host: ", 6, & Count, NULL);
ReadFile (StandardInput, name, sizeof name, & Count, NULL);
c = name;
while (*c > ' ') ++ c;
*c = '\0';
}
// guess what this does.
telnet (name, port);
//Bye bye...
WSACleanup ();
// Exit process terminates any waiting threads.
// (Its the CRT that makes a process close when the main thread exits.
// The WinAPI will leave the process as is for as long as it has a
// thread any thread.
ExitProcess (EXIT_SUCCESS);
}
/* EOF */

View File

@@ -0,0 +1,296 @@
/* $Id: nvt.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : nvt.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
*/
///////////////////////////////////////////////////////////////////////////////
//
// file: nvt.cpp
//
// purpose: Provides the "bare bones" telnet "Network Virtual Terminal"
// that is our default. We only se a more capable terminal, if
// properly requested via the telnet option.
//
// refrence: The following excerpt from rfc 854
//
///////////////////////////////////////////////////////////////////////////////
/*
THE NETWORK VIRTUAL TERMINAL
The Network Virtual Terminal (NVT) is a bi-directional character
device. The NVT has a printer and a keyboard. The printer responds
to incoming data and the keyboard produces outgoing data which is
sent over the TELNET connection and, if "echoes" are desired, to the
NVT's printer as well. "Echoes" will not be expected to traverse the
network (although options exist to enable a "remote" echoing mode of
operation, no host is required to implement this option). The code
set is seven-bit USASCII in an eight-bit field, except as modified
herein. Any code conversion and timing considerations are local
problems and do not affect the NVT.
TRANSMISSION OF DATA
Although a TELNET connection through the network is intrinsically
full duplex, the NVT is to be viewed as a half-duplex device
operating in a line-buffered mode. That is, unless and until
options are negotiated to the contrary, the following default
conditions pertain to the transmission of data over the TELNET
connection:
1) Insofar as the availability of local buffer space permits,
data should be accumulated in the host where it is generated
until a complete line of data is ready for transmission, or
until some locally-defined explicit signal to transmit occurs.
This signal could be generated either by a process or by a
human user.
The motivation for this rule is the high cost, to some hosts,
of processing network input interrupts, coupled with the
default NVT specification that "echoes" do not traverse the
network. Thus, it is reasonable to buffer some amount of data
at its source. Many systems take some processing action at the
end of each input line (even line printers or card punches
frequently tend to work this way), so the transmission should
be triggered at the end of a line. On the other hand, a user
or process may sometimes find it necessary or desirable to
provide data which does not terminate at the end of a line;
therefore implementers are cautioned to provide methods of
locally signaling that all buffered data should be transmitted
immediately.
2) When a process has completed sending data to an NVT printer
and has no queued input from the NVT keyboard for further
processing (i.e., when a process at one end of a TELNET
connection cannot proceed without input from the other end),
the process must transmit the TELNET Go Ahead (GA) command.
This rule is not intended to require that the TELNET GA command
be sent from a terminal at the end of each line, since server
hosts do not normally require a special signal (in addition to
end-of-line or other locally-defined characters) in order to
commence processing. Rather, the TELNET GA is designed to help
a user's local host operate a physically half duplex terminal
which has a "lockable" keyboard such as the IBM 2741. A
description of this type of terminal may help to explain the
proper use of the GA command.
The terminal-computer connection is always under control of
either the user or the computer. Neither can unilaterally
seize control from the other; rather the controlling end must
relinguish its control explicitly. At the terminal end, the
hardware is constructed so as to relinquish control each time
that a "line" is terminated (i.e., when the "New Line" key is
typed by the user). When this occurs, the attached (local)
computer processes the input data, decides if output should be
generated, and if not returns control to the terminal. If
output should be generated, control is retained by the computer
until all output has been transmitted.
The difficulties of using this type of terminal through the
network should be obvious. The "local" computer is no longer
able to decide whether to retain control after seeing an
end-of-line signal or not; this decision can only be made by
the "remote" computer which is processing the data. Therefore,
the TELNET GA command provides a mechanism whereby the "remote"
(server) computer can signal the "local" (user) computer that
it is time to pass control to the user of the terminal. It
should be transmitted at those times, and only at those times,
when the user should be given control of the terminal. Note
that premature transmission of the GA command may result in the
blocking of output, since the user is likely to assume that the
transmitting system has paused, and therefore he will fail to
turn the line around manually.
The foregoing, of course, does not apply to the user-to-server
direction of communication. In this direction, GAs may be sent at
any time, but need not ever be sent. Also, if the TELNET
connection is being used for process-to-process communication, GAs
need not be sent in either direction. Finally, for
terminal-to-terminal communication, GAs may be required in
neither, one, or both directions. If a host plans to support
terminal-to-terminal communication it is suggested that the host
provide the user with a means of manually signaling that it is
time for a GA to be sent over the TELNET connection; this,
however, is not a requirement on the implementer of a TELNET
process.
Note that the symmetry of the TELNET model requires that there is
an NVT at each end of the TELNET connection, at least
conceptually.
*//*
THE NVT PRINTER AND KEYBOARD
The NVT printer has an unspecified carriage width and page length
and can produce representations of all 95 USASCII graphics (codes
32 through 126). Of the 33 USASCII control codes (0 through 31
and 127), and the 128 uncovered codes (128 through 255), the
following have specified meaning to the NVT printer:
NAME CODE MEANING
NULL (NUL) 0 No Operation
Line Feed (LF) 10 Moves the printer to the
next print line, keeping the
same horizontal position.
Carriage Return (CR) 13 Moves the printer to the left
margin of the current line.
In addition, the following codes shall have defined, but not
required, effects on the NVT printer. Neither end of a TELNET
connection may assume that the other party will take, or will
have taken, any particular action upon receipt or transmission
of these:
BELL (BEL) 7 Produces an audible or
visible signal (which does
NOT move the print head).
Back Space (BS) 8 Moves the print head one
character position towards
the left margin.
Horizontal Tab (HT) 9 Moves the printer to the
next horizontal tab stop.
It remains unspecified how
either party determines or
establishes where such tab
stops are located.
Vertical Tab (VT) 11 Moves the printer to the
next vertical tab stop. It
remains unspecified how
either party determines or
establishes where such tab
stops are located.
Form Feed (FF) 12 Moves the printer to the top
of the next page, keeping
the same horizontal position.
All remaining codes do not cause the NVT printer to take any
action.
The sequence "CR LF", as defined, will cause the NVT to be
positioned at the left margin of the next print line (as would,
for example, the sequence "LF CR"). However, many systems and
terminals do not treat CR and LF independently, and will have to
go to some effort to simulate their effect. (For example, some
terminals do not have a CR independent of the LF, but on such
terminals it may be possible to simulate a CR by backspacing.)
Therefore, the sequence "CR LF" must be treated as a single "new
line" character and used whenever their combined action is
intended; the sequence "CR NUL" must be used where a carriage
return alone is actually desired; and the CR character must be
avoided in other contexts. This rule gives assurance to systems
which must decide whether to perform a "new line" function or a
multiple-backspace that the TELNET stream contains a character
following a CR that will allow a rational decision.
Note that "CR LF" or "CR NUL" is required in both directions
(in the default ASCII mode), to preserve the symmetry of the
NVT model. Even though it may be known in some situations
(e.g., with remote echo and suppress go ahead options in
effect) that characters are not being sent to an actual
printer, nonetheless, for the sake of consistency, the protocol
requires that a NUL be inserted following a CR not followed by
a LF in the data stream. The converse of this is that a NUL
received in the data stream after a CR (in the absence of
options negotiations which explicitly specify otherwise) should
be stripped out prior to applying the NVT to local character
set mapping.
The NVT keyboard has keys, or key combinations, or key sequences,
for generating all 128 USASCII codes. Note that although many
have no effect on the NVT printer, the NVT keyboard is capable of
generating them.
In addition to these codes, the NVT keyboard shall be capable of
generating the following additional codes which, except as noted,
have defined, but not reguired, meanings. The actual code
assignments for these "characters" are in the TELNET Command
section, because they are viewed as being, in some sense, generic
and should be available even when the data stream is interpreted
as being some other character set.
Synch
This key allows the user to clear his data path to the other
party. The activation of this key causes a DM (see command
section) to be sent in the data stream and a TCP Urgent
notification is associated with it. The pair DM-Urgent is to
have required meaning as defined previously.
Break (BRK)
This code is provided because it is a signal outside the
USASCII set which is currently given local meaning within many
systems. It is intended to indicate that the Break Key or the
Attention Key was hit. Note, however, that this is intended to
provide a 129th code for systems which require it, not as a
synonym for the IP standard representation.
Interrupt Process (IP)
Suspend, interrupt, abort or terminate the process to which the
NVT is connected. Also, part of the out-of-band signal for
other protocols which use TELNET.
Abort Output (AO)
Allow the current process to (appear to) run to completion, but
do not send its output to the user. Also, send a Synch to the
user.
Are You There (AYT)
Send back to the NVT some visible (i.e., printable) evidence
that the AYT was received.
Erase Character (EC)
The recipient should delete the last preceding undeleted
character or "print position" from the data stream.
Erase Line (EL)
The recipient should delete characters from the data stream
back to, but not including, the last "CR LF" sequence sent over
the TELNET connection.
The spirit of these "extra" keys, and also the printer format
effectors, is that they should represent a natural extension of
the mapping that already must be done from "NVT" into "local".
Just as the NVT data byte 68 (104 octal) should be mapped into
whatever the local code for "uppercase D" is, so the EC character
should be mapped into whatever the local "Erase Character"
function is. Further, just as the mapping for 124 (174 octal) is
somewhat arbitrary in an environment that has no "vertical bar"
character, the EL character may have a somewhat arbitrary mapping
(or none at all) if there is no local "Erase Line" facility.
Similarly for format effectors: if the terminal actually does
have a "Vertical Tab", then the mapping for VT is obvious, and
only when the terminal does not have a vertical tab should the
*/
#include <winsock.h>
#include <windows.h>
#include "telnet.h"
void nvt(SOCKET server,unsigned char data)
{
DWORD z;
switch(data)
{
case 0: //eat null codes.
break;
default: //Send all else to the console.
WriteConsole(StandardOutput, & data, 1, & z, NULL);
break;
}
}
/* EOF */

View File

@@ -0,0 +1,130 @@
/* $Id: telnet.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : telnet.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
*/
#include <winsock.h>
#include <windows.h>
#include "telnet.h"
#include "console.h"
//
// sock_loop is the thread dedicatd to reading socket input.
// It waits for data from the socket, and then gives it one byte at a time
// to the telnet vm to process.
//
DWORD sock_loop(SOCKET server)
{
char buf[256];
unsigned long read;
char* scan;
while( (read = recv(server,buf,sizeof(buf),0)) && read != SOCKET_ERROR )
{
scan = buf;
while(read--)
vm(server,*scan++);
}
int x = WSAGetLastError();
return 0;
}
DWORD input_loop(SOCKET server)
{
char buf[256];
DWORD read;
do
{
WaitForSingleObject(StandardInput, INFINITE);
ReadFile(StandardInput, buf, sizeof buf, & read, NULL);
}
while(SOCKET_ERROR != send(server, buf, read, 0));
return 0;
}
void telnet(SOCKET server)
{
DWORD dwThreadIdsock;
DWORD dwThreadIdinput;
HANDLE threads[2];
threads[0] = CreateThread(
NULL, /* no security attributes */
0, /* use default stack size */
(LPTHREAD_START_ROUTINE) sock_loop, /* thread function */
(LPVOID)server, /* argument to thread function */
0, /* use default creation flags */
&dwThreadIdsock); /* returns the thread identifier */
//wait for the other thread to complete any setup negotiation...
//Sleep(500); //- this is not the problem - its just bloody stuffing up!
threads[1] = CreateThread(
NULL, /* no security attributes */
0, /* use default stack size */
(LPTHREAD_START_ROUTINE) input_loop, /* thread function */
(LPVOID)server, /* argument to thread function */
0, /* use default creation flags */
&dwThreadIdinput); /* returns the thread identifier */
WaitForMultipleObjects(2,threads,FALSE,INFINITE);
}
//
// connect to the hostname,port
//
void telnet(
char const* pszHostName,
const short nPort)
{
unsigned long ip;
if((*pszHostName <= '9') && (*pszHostName >= '0'))
{
if((ip = inet_addr(pszHostName)) == INADDR_NONE)
err("invalid host IP address given");
}
else
{
hostent* ent = gethostbyname(pszHostName);
if(!ent)
err(sockmsg(WSAGetLastError()));
ip = *(unsigned long*)(ent->h_addr);
}
sockaddr_in name;
name.sin_family = AF_INET;
name.sin_port = htons(nPort);
name.sin_addr = *(in_addr*)&ip;
console_title_connecting (pszHostName, nPort);
SOCKET server;
if((server = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP))==INVALID_SOCKET)
err(sockmsg(WSAGetLastError()));
if(SOCKET_ERROR == connect(server,(sockaddr*)&name,sizeof(sockaddr)))
err(sockmsg(WSAGetLastError()));
console_title_connected (pszHostName, nPort);
telnet(server);
closesocket(server);
}
/* EOF */

View File

@@ -0,0 +1,24 @@
#ifndef _APPS_NET_TELNET_H
#define _APPS_NET_TELNET_H
//Global Handles
extern HANDLE StandardInput;
extern HANDLE StandardOutput;
extern HANDLE StandardError;
extern char const* sockmsg(int ecode);
extern void err(char const* s,...);
extern void telnet(char const* pszHostName,const short nPort);
extern void vm(SOCKET,unsigned char);
// terminal handlers:
void ansi(SOCKET server,unsigned char data);
void nvt(SOCKET server,unsigned char data);
// helpsock
char const* sockmsg(int ecode);
// command shell
int shell(char const* pszHostName,const int nPort);
#endif /* ndef _APPS_NET_TELNET_H */

View File

@@ -0,0 +1,6 @@
/* $Id: telnet.rc,v 1.1.34.1 2004/10/25 03:18:18 ion Exp $ */
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Telnet Win32 Client\0"
#define REACTOS_STR_INTERNAL_NAME "telnet\0"
#define REACTOS_STR_ORIGINAL_FILENAME "telnet.exe\0"
#include <reactos/version.rc>

View File

@@ -0,0 +1,424 @@
/* $Id: vm.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
*
* FILE : vm.cpp
* AUTHOR : unknown (sources found on www.telnet.org)
* PROJECT : ReactOS Operating System
* DESCRIPTION: telnet client for the W32 subsystem
* DATE : 2001-01-21
* REVISIONS
* 2001-02-21 ea Modified to compile under 0.0.16 src tree
*/
#include <winsock.h>
#include <windows.h>
#include "telnet.h"
// NAME CODE MEANING
// NVT codes
#define NUL 0 // No Operation
#define BEL 7 // BELL
#define BS 8 // Back Space
#define HT 9 // Horizontal Tab
#define LF 10 // Line Feed
#define VT 11 // Vertical Tab
#define FF 12 // Form Feed
#define CR 13 // Carriage Return
// telnet command codes
#define SE 240 // End of subnegotiation parameters.
#define NOP 241 // No operation.
#define DM 242 // Data Mark
#define BRK 243 // Break
#define IP 244 // Interrupt Process
#define AO 245 // Abort output
#define AYT 246 // Are You There
#define EC 247 // Erase character
#define EL 248 // Erase Line
#define GA 249 // Go ahead
#define SB 250 // SuBnegotiate
#define WILL 251 //
#define WONT 252 //
#define DO 253 //
#define DONT 254 //
#define IAC 255 // Interpret As Command
//Telnet options:
// 0x00 - binary mode
// 0x01 - Local Echo
// 0x03 - Suppress GA (char at a time)
// 0x05 - status
// 0x06 - Timing Mark
//
// do 0x25 - zub?
//
// 0xff - Extended Options List
enum _option
{
TOPT_BIN = 0, // Binary Transmission
TOPT_ECHO = 1, // Echo
TOPT_RECN = 2, // Reconnection
TOPT_SUPP = 3, // Suppress Go Ahead
TOPT_APRX = 4, // Approx Message Size Negotiation
TOPT_STAT = 5, // Status
TOPT_TIM = 6, // Timing Mark
TOPT_REM = 7, // Remote Controlled Trans and Echo
TOPT_OLW = 8, // Output Line Width
TOPT_OPS = 9, // Output Page Size
TOPT_OCRD = 10, // Output Carriage-Return Disposition
TOPT_OHT = 11, // Output Horizontal Tabstops
TOPT_OHTD = 12, // Output Horizontal Tab Disposition
TOPT_OFD = 13, // Output Formfeed Disposition
TOPT_OVT = 14, // Output Vertical Tabstops
TOPT_OVTD = 15, // Output Vertical Tab Disposition
TOPT_OLD = 16, // Output Linefeed Disposition
TOPT_EXT = 17, // Extended ASCII
TOPT_LOGO = 18, // Logout
TOPT_BYTE = 19, // Byte Macro
TOPT_DATA = 20, // Data Entry Terminal
TOPT_SUP = 21, // SUPDUP
TOPT_SUPO = 22, // SUPDUP Output
TOPT_SNDL = 23, // Send Location
TOPT_TERM = 24, // Terminal Type
TOPT_EOR = 25, // End of Record
TOPT_TACACS = 26, // TACACS User Identification
TOPT_OM = 27, // Output Marking
TOPT_TLN = 28, // Terminal Location Number
TOPT_3270 = 29, // Telnet 3270 Regime
TOPT_X3 = 30, // X.3 PAD
TOPT_NAWS = 31, // Negotiate About Window Size
TOPT_TS = 32, // Terminal Speed
TOPT_RFC = 33, // Remote Flow Control
TOPT_LINE = 34, // Linemode
TOPT_XDL = 35, // X Display Location
TOPT_ENVIR = 36,// Telnet Environment Option
TOPT_AUTH = 37, // Telnet Authentication Option
TOPT_NENVIR = 39,// Telnet Environment Option
TOPT_EXTOP = 255, // Extended-Options-List
TOPT_ERROR = 256 // Magic number
};
// Wanted by linux box:
// 37 - TOPT_AUTH
// 24 - TOPT_TERM
enum _verb
{
verb_sb = 250,
verb_will = 251,
verb_wont = 252,
verb_do = 253,
verb_dont = 254
};
enum _state
{
state_data, //we expect a data byte
state_code, //we expect a code
state_option //we expect an option
};
int option_error(_verb,_option,int,SOCKET);
typedef void(*LPOPTIONPROC)(SOCKET,_verb,_option);
typedef void(*LPDATAPROC)(SOCKET,unsigned char data);
///////////////////////////////////////////////////////////////////////////////
inline void yesreply(SOCKET server, _verb verb,_option option)
{
unsigned char buf[3];
buf[0] = IAC;
buf[1] = (verb==verb_do)?WILL:(verb==verb_dont)?WONT:(verb==verb_will)?DO:DONT;
buf[2] = (unsigned char)option;
send(server,(char*)buf,3,0);
}
inline void noreply(SOCKET server, _verb verb,_option option)
{
unsigned char buf[3];
buf[0] = IAC;
buf[1] = (verb==verb_do)?WONT:(verb==verb_dont)?WILL:(verb==verb_will)?DONT:DO;
buf[2] = (unsigned char)option;
send(server,(char*)buf,3,0);
}
inline void askfor(SOCKET server, _verb verb,_option option)
{
unsigned char buf[3];
buf[0] = IAC;
buf[1] = (unsigned char)verb;
buf[2] = (unsigned char)option;
send(server,(char*)buf,3,0);
}
void ddww_error(SOCKET server,_verb verb,_option option)
{
#ifdef _DEBUG
char tmp[256];
wsprintf(tmp,"Unknown Option Code: %s, %i\n",(verb==verb_do)?"DO":(verb==verb_dont)?"DON'T":(verb==verb_will)?"WILL":"WONT",(int)option);
OutputDebugString(tmp);
#endif
switch(verb)
{
case verb_will: // server wants to support something
noreply(server,verb,option); // I don't want that.
break;
case verb_wont: // server waants to disable support
return; // don't confirm - already disabled.
case verb_do: // server wants me to support something
noreply(server,verb,option); //I won't do that
break;
case verb_dont: // server wants me to disable something
return; // don't worry, we don't do that anyway (I hope :)
}
}
///////////////////////////////////////////////////////////////////////////////
// Option ECHO & SUPPRESS GA
//
// These options are curiously intertwined...
// The Win32 console doesn't support ECHO_INPUT (echo) if
// LINE_INPUT (==GA) isn't set.
// I can't see how to code this negotiation without using
// some form of Lock-Step algorythm
// ie: if("WILL ECHO")
// Send "DO SUPP"
// if("WILL SUPP")
// Send "DO ECHO"
// else
// Send "DONT ECHO"
void ddww_echo(SOCKET server,_verb verb, _option option)
{
DWORD mode;
GetConsoleMode(StandardInput, & mode); // ENABLE_ECHO_INPUT
int set = !(mode & ENABLE_ECHO_INPUT);
switch(verb)
{
case verb_will: // server wants to echo stuff
if(set) return; //don't confirm - already set.
SetConsoleMode(StandardInput,mode & (~ENABLE_ECHO_INPUT));
break;
case verb_wont: // server don't want to echo
if(!set) return; //don't confirm - already unset.
SetConsoleMode(StandardInput,mode | ENABLE_ECHO_INPUT);
break;
case verb_do: // server wants me to loopback
noreply(server,verb,option);
return;
case verb_dont: // server doesn't want me to echo
break; // don't bother to reply - I don't
}
yesreply(server,verb,option);
}
void ddww_supp(SOCKET server,_verb verb,_option option) //Suppress GA
{
DWORD mode;
GetConsoleMode(StandardInput,&mode); // ENABLE_LINE_INPUT
int set = !(mode & ENABLE_LINE_INPUT);
switch(verb)
{
case verb_will: // server wants to suppress GA's
if(set) break; //don't confirm - already set.
SetConsoleMode(StandardInput,mode & (~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT)));
askfor(server,verb_do,TOPT_SUPP);
askfor(server,verb_will,TOPT_SUPP);
askfor(server,verb_do,TOPT_ECHO);
break;
case verb_wont: // server wants to send GA's
if(!set) break; //don't confirm - already unset.
SetConsoleMode(StandardInput,mode | ENABLE_LINE_INPUT);
askfor(server,verb_dont,TOPT_SUPP);
askfor(server,verb_wont,TOPT_SUPP);
break;
case verb_do: // server wants me to suppress GA's
if(set) break;
askfor(server,verb_do,TOPT_SUPP);
break;
case verb_dont: // server wants me to send GA's
if(!set) break;
askfor(server,verb_dont,TOPT_SUPP);
break;
}
}
///////////////////////////////////////////////////////////////////////////////
// Option TERMINAL-TYPE
void ddww_term(SOCKET server,_verb verb,_option option) //Subnegotiate terminal type
{
switch(verb)
{
case verb_will:
noreply(server,verb,option); // I don't want terminal info
break;
case verb_wont:
//dat be cool - its not going to send. no need to confirm
break;
case verb_do:
yesreply(server,verb,option); //I'll send it when asked
break;
case verb_dont://Ok - I won't
break;
}
}
// TERMINAL TYPE subnegotation
enum
{
SB_TERM_IS = 0,
SB_TERM_SEND = 1
};
#define NUM_TERMINALS 2
struct
{
char* name;
LPDATAPROC termproc;
//pre requsites.
} terminal[NUM_TERMINALS] = {
{ "NVT", nvt },
{ "ANSI", ansi }
};
int term_index = 0;
void sbproc_term(SOCKET server,unsigned char data)
{
if(data == SB_TERM_SEND)
{
if(term_index == NUM_TERMINALS)
term_index = 0;
else
term_index++;
char buf[16]; //pls limit
buf[0] = IAC;
buf[1] = SB;
buf[2] = TOPT_TERM;
buf[3] = SB_TERM_IS;
lstrcpy(&buf[4],terminal[(term_index==NUM_TERMINALS)?(NUM_TERMINALS-1):term_index].name);
int nlen = lstrlen(&buf[4]);
buf[4+nlen] = IAC;
buf[5+nlen] = SE;
send(server,buf,4+nlen+2,0);
}
}
///////////////////////////////////////////////////////////////////////////////
struct
{
_option option;
LPOPTIONPROC OptionProc;
LPDATAPROC DataProc;
} ol[] = {
{TOPT_ECHO, ddww_echo, NULL},
{TOPT_SUPP, ddww_supp, NULL},
{TOPT_TERM, ddww_term, sbproc_term},
{TOPT_ERROR, ddww_error, NULL}
};
void vm(SOCKET server,unsigned char code)
{
//These vars are the finite state
static int state = state_data;
static _verb verb = verb_sb;
static LPDATAPROC DataProc = terminal[(term_index==NUM_TERMINALS)?(NUM_TERMINALS-1):term_index].termproc;
// for index
int i=0;
//Decide what to do (state based)
switch(state)
{
case state_data:
switch(code)
{
case IAC: state = state_code; break;
default: DataProc(server,code);
}
break;
case state_code:
state = state_data;
switch(code)
{
// State transition back to data
case IAC:
DataProc(server,code);
break;
// Code state transitions back to data
case SE:
DataProc = terminal[(term_index==NUM_TERMINALS)?(NUM_TERMINALS-1):term_index].termproc;
break;
case NOP:
break;
case DM:
break;
case BRK:
break;
case IP:
break;
case AO:
break;
case AYT:
break;
case EC:
break;
case EL:
break;
case GA:
break;
// Transitions to option state
case SB:
verb = verb_sb;
state = state_option;
break;
case WILL:
verb = verb_will;
state = state_option;
break;
case WONT:
verb = verb_wont;
state = state_option;
break;
case DO:
verb = verb_do;
state = state_option;
break;
case DONT:
verb = verb_dont;
state = state_option;
break;
}
break;
case state_option:
state = state_data;
//Find the option entry
for(
i = 0;
ol[i].option != TOPT_ERROR && ol[i].option != code;
i++);
//Do some verb specific stuff
if(verb == verb_sb)
DataProc = ol[i].DataProc;
else
ol[i].OptionProc(server,verb,(_option)code);
break;
}
}
/* EOF */

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,23 @@
# $Id: makefile,v 1.1 2004/01/11 17:06:21 ea Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = nts2w32err
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,20 +1,19 @@
/*
/* $Id: nts2w32err.c,v 1.1 2004/01/11 17:06:21 ea Exp $
*
* Convert NTSTATUS codes to Win32 error codes: run it
* on a NT box AND on a ROS box, then diff the results.
*
* This utility should help keeping correct how Ros
* translates executive's errors codes into Win32 error
* codes.
*
*
* Usage: nts2w32err [MaxStatusCode] > log.txt
*
*
* 2004-01-10 Emanuele Aliberti
*
*
*/
#define WIN32_NO_STATUS
#include <ddk/ntddk.h>
#include <windows.h>
#include <stdlib.h>
#include <ntndk.h>
#include <stdio.h>
int main (int argc, char * argv [])

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,23 @@
# $Id: makefile,v 1.11 2003/11/11 17:00:41 ekohl Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = objdir
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,4 +1,5 @@
/*
/* $Id: objdir.c,v 1.14 2004/08/05 12:11:49 ea Exp $
*
* DESCRIPTION: Object Manager Simple Explorer
* PROGRAMMER: David Welch
* REVISIONS
@@ -16,25 +17,25 @@
* Added -r option.
*/
#define WIN32_NO_STATUS
#include <windows.h>
#include <stdlib.h>
#include <ntndk.h>
#include <ddk/ntddk.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_DIR_ENTRY 256
static
PCHAR
WINAPI
STDCALL
RawUszAsz (
PWCHAR szU,
PCHAR szA
)
{
register PCHAR a = szA;
while (*szU) {*szA++ = (CHAR) (0x00ff & * szU++);}
*szA = '\0';
return a;
@@ -43,14 +44,14 @@ RawUszAsz (
static
PWCHAR
WINAPI
STDCALL
RawAszUsz (
PCHAR szA,
PWCHAR szW
)
{
register PWCHAR w = szW;
while (*szA) {*szW++ = (WCHAR) *szA++;}
*szW = L'\0';
return w;
@@ -59,11 +60,11 @@ RawAszUsz (
static
const char *
WINAPI
STDCALL
StatusToName (NTSTATUS Status)
{
static char RawValue [16];
switch (Status)
{
case STATUS_BUFFER_TOO_SMALL:
@@ -78,14 +79,10 @@ StatusToName (NTSTATUS Status)
return "STATUS_PATH_SYNTAX_BAD";
case STATUS_NO_MORE_ENTRIES:
return "STATUS_NO_MORE_ENTRIES";
case STATUS_MORE_ENTRIES:
return "STATUS_MORE_ENTRIES";
case STATUS_ACCESS_DENIED:
return "STATUS_ACCESS_DENIED";
case STATUS_UNSUCCESSFUL:
return "STATUS_UNSUCCESSFUL";
case STATUS_INVALID_HANDLE:
return "STATUS_INVALID_HANDLE";
}
sprintf (RawValue, "0x%08lx", Status);
return (const char *) RawValue;
@@ -93,7 +90,7 @@ StatusToName (NTSTATUS Status)
BOOL
WINAPI
STDCALL
ExpandSymbolicLink (
IN PUNICODE_STRING DirectoryName,
IN PUNICODE_STRING SymbolicLinkName,
@@ -111,7 +108,7 @@ ExpandSymbolicLink (
Path.Buffer = PathBuffer;
Path.Length = 0;
Path.MaximumLength = sizeof PathBuffer;
RtlCopyUnicodeString (& Path, DirectoryName);
if (L'\\' != Path.Buffer [(Path.Length / sizeof Path.Buffer[0]) - 1])
{
@@ -166,7 +163,7 @@ ExpandSymbolicLink (
BOOL
WINAPI
STDCALL
ListDirectory (
IN PUNICODE_STRING DirectoryNameW,
IN BOOL Recurse
@@ -176,13 +173,12 @@ ListDirectory (
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
HANDLE DirectoryHandle;
BYTE DirectoryEntry [512];
POBJECT_DIRECTORY_INFORMATION pDirectoryEntry = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry;
POBJECT_DIRECTORY_INFORMATION pDirectoryEntries = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry;
BYTE DirectoryEntry [MAX_DIR_ENTRY * sizeof(DIRECTORY_BASIC_INFORMATION)];
PDIRECTORY_BASIC_INFORMATION pDirectoryEntry = (PDIRECTORY_BASIC_INFORMATION) DirectoryEntry;
ULONG Context = 0;
ULONG ReturnLength = 0;
ULONG EntryCount = 0;
/* For expanding symbolic links */
WCHAR TargetName [2 * MAX_PATH];
UNICODE_STRING TargetObjectName = {
@@ -221,23 +217,25 @@ ListDirectory (
return (FALSE);
}
printf ("\n Directory of %s\n\n", DirectoryNameA);
for(;;)
{
/*
* Enumerate each item in the directory.
*/
Status = NtQueryDirectoryObject (
DirectoryHandle,
pDirectoryEntries,
pDirectoryEntry,
sizeof DirectoryEntry,
FALSE,/* ReturnSingleEntry */
FALSE, /* RestartScan */
TRUE, /* RestartScan */
& Context,
& ReturnLength
);
if (!NT_SUCCESS(Status) && Status != STATUS_NO_MORE_ENTRIES)
if (!NT_SUCCESS(Status))
{
if (STATUS_NO_MORE_ENTRIES == Status)
{
NtClose (DirectoryHandle);
return TRUE;
}
printf (
"Failed to query directory object (Status: %s)\n",
StatusToName (Status)
@@ -245,31 +243,26 @@ ListDirectory (
NtClose (DirectoryHandle);
return (FALSE);
}
if (Status == STATUS_NO_MORE_ENTRIES)
{
break;
}
pDirectoryEntry = pDirectoryEntries;
while (EntryCount < Context)
while (0 != pDirectoryEntry->ObjectTypeName.Length)
{
CHAR ObjectNameA [MAX_PATH];
CHAR TypeNameA [MAX_PATH];
CHAR TargetNameA [MAX_PATH];
if (0 == wcscmp (L"SymbolicLink", pDirectoryEntry->TypeName.Buffer))
if (0 == wcscmp (L"SymbolicLink", pDirectoryEntry->ObjectTypeName.Buffer))
{
if (TRUE == ExpandSymbolicLink (
DirectoryNameW,
& pDirectoryEntry->Name,
& pDirectoryEntry->ObjectName,
& TargetObjectName
)
)
{
printf (
"%-16s %s -> %s\n",
RawUszAsz (pDirectoryEntry->TypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->Name.Buffer, ObjectNameA),
RawUszAsz (pDirectoryEntry->ObjectTypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->ObjectName.Buffer, ObjectNameA),
RawUszAsz (TargetObjectName.Buffer, TargetNameA)
);
}
@@ -277,8 +270,8 @@ ListDirectory (
{
printf (
"%-16s %s -> (error!)\n",
RawUszAsz (pDirectoryEntry->TypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->Name.Buffer, ObjectNameA)
RawUszAsz (pDirectoryEntry->ObjectTypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->ObjectName.Buffer, ObjectNameA)
);
}
}
@@ -286,14 +279,13 @@ ListDirectory (
{
printf (
"%-16s %s\n",
RawUszAsz (pDirectoryEntry->TypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->Name.Buffer, ObjectNameA)
RawUszAsz (pDirectoryEntry->ObjectTypeName.Buffer, TypeNameA),
RawUszAsz (pDirectoryEntry->ObjectName.Buffer, ObjectNameA)
);
}
++ pDirectoryEntry;
++ EntryCount;
++ pDirectoryEntry;
}
};
printf ("\n\t%lu object(s)\n", EntryCount);
/*
* Free any resource.
@@ -304,10 +296,10 @@ ListDirectory (
*/
if (FALSE != Recurse)
{
pDirectoryEntry = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry;
while (0 != pDirectoryEntry->TypeName.Length)
pDirectoryEntry = (PDIRECTORY_BASIC_INFORMATION) DirectoryEntry;
while (0 != pDirectoryEntry->ObjectTypeName.Length)
{
if (0 == wcscmp (L"Directory", pDirectoryEntry->TypeName.Buffer))
if (0 == wcscmp (L"Directory", pDirectoryEntry->ObjectTypeName.Buffer))
{
WCHAR CurrentName [MAX_PATH];
UNICODE_STRING CurrentDirectory;
@@ -318,7 +310,7 @@ ListDirectory (
{
wcscat (CurrentName, L"\\");
}
wcscat (CurrentName, pDirectoryEntry->Name.Buffer);
wcscat (CurrentName, pDirectoryEntry->ObjectName.Buffer);
RtlInitUnicodeString (& CurrentDirectory, CurrentName);
ListDirectory (& CurrentDirectory, Recurse);
}
@@ -354,7 +346,7 @@ int main(int argc, char* argv[])
return EXIT_FAILURE;
}
RawAszUsz (argv[2], DirectoryNameW);
Recurse = TRUE;
Recurse = TRUE;
break;
default:
fprintf (

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,23 @@
# $Id: makefile,v 1.5 2003/11/14 17:13:22 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = partinfo
TARGET_CFLAGS = -Wall -Werror -Wno-format
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -2,15 +2,15 @@
* partinfo - partition info program
*/
#define WIN32_NO_STATUS
#include <windows.h>
#include <stdlib.h>
#include <ntndk.h>
//#include <winioctl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
//#define DUMP_DATA
#define DUMP_SIZE_INFO
#define UNICODE
#ifdef DUMP_DATA
void HexDump(char *buffer, ULONG size)

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,21 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = patchnv4
TARGET_SDKLIBS =
TARGET_OBJECTS = patchnv4.o
TARGET_CFLAGS += -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -0,0 +1,132 @@
<!-- $Id: nv4_howto.html,v 1.2 2003/11/08 08:13:27 navaraf Exp $ -->
<HTML>
<HEAD>
<TITLE>Using NVidia drivers on ReactOS How-to</TITLE>
</HEAD>
<BODY>
<CENTER><H1>Using NVidia drivers on ReactOS How-to</H1></CENTER>
<H2>1. Introduction</H2>
There is little support for changing video drivers (or any other driver for that
matter) in ReactOS at the moment. You have to know how to access the CVS repository
and how to compile (simple) programs. If this is too complicated, please wait a few
months, we should have better installation tools then.
<H2>2. Supported hardware</H2>
The NVidia drivers were tested on the following video card:
<UL>
<LI>NVidia Riva TNT2 Model 64</LI>
<LI>NVidia GeForce4 MX400</LI>
</UL>
However, according to the NVidia website, the same driver supports a whole series
of video cards. If you find this driver works under ReactOS with other cards, please
let us know on the <A HREF="mailto:ros-general@reactos.com">ros-general mailing list</A>
<H2>3. Download the drivers</H2>
First, go to the NVidia website, <A HREF="http://www.nvidia.com">www.nvidia.com</A>,
choose "DOWNLOAD&nbsp;DRIVERS" from the menu at the top of the page (and
"Download&nbsp;Drivers" again from the drop-down menu). Choose "Graphics&nbsp;Driver"
in the first box, "GeForce&nbsp;and&nbsp;TNT2" in the second box and "Windows&nbsp;NT4"
in the third box, then click "Go!". This How-to assumes you see a page identifying the
driver you are about to download as version 43.45, release on April&nbsp;10, 2003.
Download the English version.<BR>
(<A HREF="http://www.nvidia.com/object/winnt_43.45">This</A> is a direct link to the
download page.)
<H2>4. Unpack the drivers</H2>
Start the file you just downloaded (note: you need to do this on a MS-Windows computer,
doesn't work on ReactOS yet). It will ask you for a directory where to save the files.
You can accept the default of C:\NVIDIA\WinNT4\43.45 or change it to your liking, just
remember where you put them.... After the files are unpacked, the install wizard will
start. Just press "Cancel" on the Welcome screen and tell the thing that, yes, you
are quite sure you want to cancel the installation.<BR>
Open a Command Prompt window and cd to C:\NVIDIA\WinNT4\43.45 (or wherever you put
the files). You should have a nv4_mini.sy_ and a nv4_disp.dl_ file. Issue the following
commands:
<PRE>
expand nv4_mini.sy_ nv4_mini.sys
expand nv4_disp.dl_ nv4_disp.dll
</PRE>
After this, you should have a nv4_mini.sys file of 1511936 bytes and a nv4_disp.dll file
of 569807 bytes.
<H2>5. Patch the miniport driver</H2>
Since ReactOS is not 100% binary compatible with MS-Windows yet, the miniport driver
(nv4_mini.sys) needs to be patched. There is a small patch program in the ReactOS CVS
tree at reactos/apps/utils/patchnv4 which you need to compile. Copy the patchnv4.exe
to the directory where you have your nv4_mini.sys file and run it. Afterwards, you
should have a nv4_mini.sys.orig (the original) and a nv4_mini.sys (the patched
version).<BR>
Note that we're working towards binary compatibility, so if you're not reading this
on the <A HREF="http://www.reactos.com">ReactOS website</A>, please go there and check
if the patching is still necessary (ReactOS might have been fixed...).
<H2>6. Install the drivers</H2>
The first step is simple, copy the (patched) nv4_mini.sys file to \ReactOS\System32\drivers
and the nv4_disp.dll file to \ReactOS\System32. The second step is to update the
registry to actually load the driver. Check out the CVS tree and edit the file
reactos/bootdata/hivesys.inf. Add the following lines:
<PRE>
; NVidia driver
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","ErrorControl",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Group",0x00000000,"Video"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","ImagePath",0x00020000,"system32\drivers\nv4_mini.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Start",0x00010001,0x00000004
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Type",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","CapabilityOverride",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","EnableVia4x",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","InstalledDisplayDrivers",0x00010000,"nv4_disp"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","NVREGSWITCHES",0x00000001,43,52,54,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,\
2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,\
34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,\
2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,\
34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,44,4d,54,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,01,00,\
00,00,00,04,00,00,40,00,00,00,00,04,00,00,00,06,00,00,00,00,00,00,01,00,00,\
00,00,00,00,00,00,00,00,00,05,00,00,00,00,00,04,00,00,00,50,00,00,00,01,00,\
00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,99,99,99,99,99,\
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,00,00,\
00,00
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.ToDesktop",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.RelativeX",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.RelativeY",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.BitsPerPel",0x00010001,16
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.XResolution",0x00010001,1152
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.YResolution",0x00010001,864
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.VRefresh",0x00010001,85
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.Flags",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.XPanning",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.YPanning",0x00010001,0
</PRE>
Feel free to adjust the DefaultSettings.BitsPerPel, DefaultSettings.XResolution,
DefaultSettings.YResolution and DefaultSettings.VRefresh (check the Display control
panel applet in MS-Windows for available settings for your card/monitor combo).<BR>
Search that same file for the "VGA miniport driver" section and change the "Start"
line in that section to:
<PRE>
HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000004
</PRE>
(i.e. set the last value on that line to 4).<BR>
Rebuild the registry with the command "make registry" and copy the resulting SYSTEM file
to /ReactOS/System32/config. Reboot and enjoy.
</BODY>
</HTML>

View File

@@ -0,0 +1,127 @@
/* $Id: patchnv4.c,v 1.1 2003/11/07 20:10:13 gvg Exp $
*
* Patch the NVidia miniport driver to work with ReactOS
*
* Should become obsolete
*/
#include <stdio.h>
#include <stdlib.h>
struct Patch
{
long Offset;
unsigned char ExpectedValue;
unsigned char NewValue;
};
static struct Patch Patches[ ] =
{
{ 0x1EBA9, 0x30, 0x3C },
{ 0x1EBAA, 0xC0, 0xF0 },
{ 0x1EC0B, 0x04, 0x01 },
{ 0x1EC67, 0x30, 0x3C },
{ 0x1EC68, 0xC0, 0xF0 }
};
int
main(int argc, char *argv[])
{
static char OriginalName[] = "nv4_mini.sys";
static char TempName[] = "nv4_mini.tmp";
static char BackupName[] = "nv4_mini.sys.orig";
FILE *File;
unsigned char *Buffer;
long Size;
unsigned n;
/* Read the whole file in memory */
File = fopen(OriginalName, "rb");
if (NULL == File)
{
perror("Unable to open original file");
exit(1);
}
if (fseek(File, 0, SEEK_END))
{
perror("Unable to determine file length");
fclose(File);
exit(1);
}
Size = ftell(File);
if (-1 == Size)
{
perror("Unable to determine file length");
fclose(File);
exit(1);
}
Buffer = malloc(Size);
if (NULL == Buffer)
{
perror("Can't allocate buffer");
fclose(File);
exit(1);
}
rewind(File);
if (Size != fread(Buffer, 1, Size, File))
{
perror("Error reading from original file");
free(Buffer);
fclose(File);
exit(1);
}
fclose(File);
/* Patch the file */
for (n = 0; n < sizeof(Patches) / sizeof(struct Patch); n++)
{
if (Buffer[Patches[n].Offset] != Patches[n].ExpectedValue)
{
fprintf(stderr, "Expected value 0x%02x at offset 0x%lx but found 0x%02x\n",
Patches[n].ExpectedValue, Patches[n].Offset,
Buffer[Patches[n].Offset]);
free(Buffer);
exit(1);
}
Buffer[Patches[n].Offset] = Patches[n].NewValue;
}
/* Write the new file */
File = fopen(TempName, "wb");
if (NULL == File)
{
perror("Unable to open output file");
free(Buffer);
exit(1);
}
if (Size != fwrite(Buffer, 1, Size, File))
{
perror("Error writing to output file");
fclose(File);
remove(TempName);
free(Buffer);
exit(1);
}
fclose(File);
free(Buffer);
/* Rename the original file, removing an existing backup */
remove(BackupName);
if (0 != rename(OriginalName, BackupName))
{
perror("Failed to rename original file");
remove(TempName);
exit(1);
}
/* Rename the new file */
if (0 != rename(TempName, OriginalName))
{
perror("Failed to rename new file");
remove(TempName);
rename(BackupName, OriginalName);
exit(1);
}
return 0;
}

View File

@@ -0,0 +1,4 @@
*.o
*.exe
*.sym
*.map

View File

@@ -0,0 +1,20 @@
# $Id: makefile,v 1.1 2004/02/11 21:04:18 hbirr Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = pesum
TARGET_OBJECTS = $(TARGET_NAME).o
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