first commit
This commit is contained in:
174
tools/vispatch-1.4.6/bin/dos32/cwsdpmi.doc
Normal file
174
tools/vispatch-1.4.6/bin/dos32/cwsdpmi.doc
Normal file
@@ -0,0 +1,174 @@
|
||||
CWSDPMI is Copyright (C) 1995-2008 Charles W Sandmann (cwsdpmi@earthlink.net)
|
||||
1206 Braelinn, Sugar Land, TX 77479
|
||||
|
||||
This is release 5, 2008 refresh. It contains minor bug fixes and SSE support.
|
||||
The files in this binary distribution may be redistributed under the GPL
|
||||
(with source) or without the source code provided:
|
||||
|
||||
* CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM.
|
||||
|
||||
* CWSDSTUB.EXE internal contents are not modified in any way except via
|
||||
CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it.
|
||||
|
||||
* Notice to users that they have the right to receive the source code and/or
|
||||
binary updates for CWSDPMI. Distributors should indicate a site for the
|
||||
source in their documentation.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
CWSDPMI was written to provide DPMI services for V2 of DJGPP. It currently
|
||||
does not support 16-bit DPMI applications, or DPMI applications requiring a
|
||||
built in extender. It does support virtual memory and hardware interrupt
|
||||
reflection from real mode to protected mode. DJGPP V1.1x and RSX applications
|
||||
will also run using this server, which can be used to provide enhanced control
|
||||
over hardware interrupts. Some DPMI 1.0 extensions (0x506, 0x507, 0x508) have
|
||||
been implemented.
|
||||
|
||||
CWSDPR0.EXE is an alternate version which runs at ring 0 with virtual memory
|
||||
disabled. It may be used if access to ring-0 features are desired. It
|
||||
currently does not switch stacks on HW interrupts, so some DJGPP features
|
||||
such as SIGINT and SIGFPE are not supported and will generate a double fault
|
||||
or stack fault error (to be fixed someday).
|
||||
|
||||
CWSDSTUB.EXE is a stub loader image for DJGPP which includes CWSDPMI. This
|
||||
allows single executable image distributions. You can use the EXE2COFF
|
||||
program and COPY /B CWSDSTUB.EXE+yourimage yourimage.exe to create a
|
||||
standalone executable image.
|
||||
|
||||
Some of the internal tuning and configuration parameters may be modified
|
||||
in the image using CWSPARAM.EXE (see CWSPARAM.DOC).
|
||||
|
||||
If you want to use CWSDPMI with DJGPP, you expand the distribution into the
|
||||
DJGPP directory tree. CWSDPMI.EXE will be put in the BIN directory with your
|
||||
DJGPP images and it will automatically be loaded when they run.
|
||||
|
||||
Directions for use (server can be used in either of two different ways):
|
||||
|
||||
1) "cwsdpmi" alone with no parameters will terminate and stay resident
|
||||
FOR A SINGLE DPMI PROCESS. This means it unloads itself when your
|
||||
DPMI application exits. This mode is useful in software which needs
|
||||
DPMI services, since CWSDPMI can be exec'ed and then will unload on exit.
|
||||
|
||||
2) "cwsdpmi -p" will terminate and stay resident until you remove it.
|
||||
It can be loaded into UMBs with LH. "cwsdpmi -u" will unload the TSR.
|
||||
|
||||
3) The file used for virtual memory swapping, if desired, is controlled
|
||||
by the "-sc:\cwsdpmi.swp" syntax on the command line. You must specify
|
||||
either a file with full disk/directory syntax, or "-s-" which disables
|
||||
virtual memory.
|
||||
|
||||
4) The default swap file name is c:\cwsdpmi.swp, but this can be changed
|
||||
with the CWSPARAM image, as can some other parameters.
|
||||
|
||||
5) You can disable the DPMI 1.0 extensions by starting the image with the
|
||||
"cwsdpmi -x" syntax. This feature allows you to run programs developed
|
||||
under other DPMI providers which do not behave properly with these
|
||||
extensions enabled (typically use of NULL pointers).
|
||||
|
||||
I would like to give special thanks to DJ Delorie who wrote the original
|
||||
GO32 code on which CWSDPMI is based. Morten Welinder also provided and
|
||||
improved much of the code in this program.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This section contains a list of the error messages you might see out of
|
||||
CWSDPMI and some details on what they mean.
|
||||
|
||||
Exceptions are only handled by CWSDPMI if the application does not establish
|
||||
an exception handler, exceptions nest 5 deep, or the error is particularly bad:
|
||||
|
||||
"Page fault" -
|
||||
1) an illegal page fault happens in a RMCB or HW interrupt, (lock all pages!)
|
||||
2) all available pages have been locked,
|
||||
3) the application is using non-committed pages for null pointer protection.
|
||||
"Double Fault" - multiple exceptions occurred
|
||||
"Invalid TSS" - typically due to RMCB or HW interrupt being called after the
|
||||
selectors/memory have been deallocated (remember to reset the mouse)
|
||||
"General Protection Fault" - bad parameter sent to a DPMI call
|
||||
|
||||
"80386 required."
|
||||
|
||||
Since 80286 and lesser processors don't have the hardware necessary to
|
||||
run CWSDPMI. No workaround, upgrade.
|
||||
|
||||
"DOS 3 required."
|
||||
|
||||
A few interrupts are used which need DOS 3.0 or higher. I don't expect to
|
||||
ever see this message, since 80386 machines were introduced after DOS 3.0
|
||||
and that check is made first.
|
||||
|
||||
"CWSDPMI V0.90+ (r5) Copyright (C) 2000 CW Sandmann ABSOLUTELY NO WARRANTY"
|
||||
|
||||
An informational message displayed if the program is not run in one-pass mode.
|
||||
|
||||
"Protected mode not accessible."
|
||||
|
||||
This message should only be displayed if running CWSDPMI in a protected
|
||||
environment with no access to protected mode. In this case, DPMI should
|
||||
already be available and CWSDPMI would not be needed. This might happen if
|
||||
a 16-bit DPMI client is loaded and a DJGPP image attempts to load CWSDPMI
|
||||
to provide 32-bit DPMI services under Windows.
|
||||
|
||||
"Warning: cannot open swap file c:\cwsdpmi.swp"
|
||||
|
||||
Maybe you are out of file handles, or the swap file name is incorrectly
|
||||
specified in the image (change the name with cwsparam).
|
||||
|
||||
"No swap space!"
|
||||
|
||||
This message means you tried to use more paging file than CWSDPMI was
|
||||
configured to handle. Since this is protected against in the memory
|
||||
allocation code, you should never see this message.
|
||||
|
||||
"Swap disk full!"
|
||||
|
||||
This means the paging file could not be expanded when trying to page
|
||||
memory out to disk. This would normally not be seen, unless you are
|
||||
writing output to the same disk which holds the paging file. Decrease
|
||||
the amount of memory your DPMI application is using or free up disk space.
|
||||
|
||||
"Interrupt 0x??"
|
||||
|
||||
Your application tried to call an interrupt from protected mode which
|
||||
normally shouldn't be called (something like a data pointer). If the
|
||||
request was allowed to continue it would likely hang your machine. If you
|
||||
see this message and think the interrupt should be allowed to continue, let
|
||||
me know.
|
||||
|
||||
"Error: Using XMS switched CPU into V86 mode."
|
||||
|
||||
This message might be seen if you have your memory manager in AUTO mode. The
|
||||
only workaround in this case is to stop using AUTO mode.
|
||||
|
||||
"Error: could not allocate page table memory"
|
||||
|
||||
The page table memory (a minimum of 16Kb) is allocated from conventional
|
||||
memory (either in the 640Kb region or UMBs). If CWSDPMI cannot allocate the
|
||||
minimum necessary memory, you would see this message. Free up some
|
||||
conventional memory. You may also see this message if a page directory needs
|
||||
to be faulted in, and there are no available pages. This means too many pages
|
||||
have been locked for the allocated page tables available. While CWSDPMI
|
||||
tries to dynamically allocate these if needed, this effort failed. You need
|
||||
to increase the number of page tables with CWSPARAM, or increase the amount
|
||||
of free conventional memory if it is low. If the application which calls
|
||||
CWSDPMI internally manages all the DOS memory, the page tables may need to
|
||||
be pre-allocated at DPMI startup time (if this is needed, try using the
|
||||
run option flag 2 in cwsparam).
|
||||
|
||||
"16-bit DPMI unsupported."
|
||||
|
||||
CWSDPMI is a 32-bit only DPMI server. Ideally, on the request to enter DPMI's
|
||||
PM with a 16-bit request, we would just fail the call setting the carry bit
|
||||
like the DPMI specification describes. Some buggy 16-bit compiler tools don't
|
||||
check the return status and will hang the machine in this case. So, I issue
|
||||
an error message and exit the image instead.
|
||||
|
||||
"Descriptors exhausted."
|
||||
|
||||
An attempt to nest a DPMI client failed in the setup phase due to insufficient
|
||||
free selectors in the LDT.
|
||||
|
||||
"CWSDPMI not removed"
|
||||
|
||||
When the -u parameter is specified, if DPMI is not detected this message is
|
||||
printed. Informational.
|
||||
BIN
tools/vispatch-1.4.6/bin/dos32/cwsdpmi.exe
Normal file
BIN
tools/vispatch-1.4.6/bin/dos32/cwsdpmi.exe
Normal file
Binary file not shown.
BIN
tools/vispatch-1.4.6/bin/dos32/vispatch.exe
Normal file
BIN
tools/vispatch-1.4.6/bin/dos32/vispatch.exe
Normal file
Binary file not shown.
BIN
tools/vispatch-1.4.6/bin/linux-x86/vispatch
Executable file
BIN
tools/vispatch-1.4.6/bin/linux-x86/vispatch
Executable file
Binary file not shown.
BIN
tools/vispatch-1.4.6/bin/linux-x86_64/vispatch
Executable file
BIN
tools/vispatch-1.4.6/bin/linux-x86_64/vispatch
Executable file
Binary file not shown.
BIN
tools/vispatch-1.4.6/bin/win32/vispatch.exe
Normal file
BIN
tools/vispatch-1.4.6/bin/win32/vispatch.exe
Normal file
Binary file not shown.
BIN
tools/vispatch-1.4.6/bin/win64/vispatch.exe
Normal file
BIN
tools/vispatch-1.4.6/bin/win64/vispatch.exe
Normal file
Binary file not shown.
340
tools/vispatch-1.4.6/source/COPYING
Normal file
340
tools/vispatch-1.4.6/source/COPYING
Normal file
@@ -0,0 +1,340 @@
|
||||
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
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
BIN
tools/vispatch-1.4.6/source/VisualStudio2005.zip
Normal file
BIN
tools/vispatch-1.4.6/source/VisualStudio2005.zip
Normal file
Binary file not shown.
164
tools/vispatch-1.4.6/source/arch_def.h
Normal file
164
tools/vispatch-1.4.6/source/arch_def.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
arch_def.h
|
||||
platform specific definitions
|
||||
- standalone header
|
||||
- doesn't and must not include any other headers
|
||||
- shouldn't depend on compiler.h, q_stdinc.h, or
|
||||
any other headers
|
||||
|
||||
$Id: arch_def.h,v 1.2 2011/10/08 12:33:03 sezero Exp $
|
||||
|
||||
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
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:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __HX2_ARCHDEFS__
|
||||
#define __HX2_ARCHDEFS__
|
||||
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
# if !defined(__MACOSX__)
|
||||
# define __MACOSX__ 1
|
||||
# endif
|
||||
#elif defined(macintosh) /* MacOS Classic */
|
||||
# if !defined(__MACOS__)
|
||||
# define __MACOS__ 1
|
||||
# endif
|
||||
#elif (defined(__sun) || defined(sun)) && \
|
||||
(defined(__svr4__) || defined(__SVR4))
|
||||
# if !defined(__SOLARIS__)
|
||||
# define __SOLARIS__ 1
|
||||
# endif
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# if !defined(__SUNOS__)
|
||||
# define __SUNOS__ 1
|
||||
# endif
|
||||
#elif defined(__sgi) || defined(sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
|
||||
# if !defined(__IRIX__)
|
||||
# define __IRIX__ 1
|
||||
# endif
|
||||
#elif defined(__QNXNTO__)
|
||||
# if !defined(__QNX__)
|
||||
# define __QNX__ 1
|
||||
# endif
|
||||
#elif defined(__amigados__) || defined(__amigaos4__) || \
|
||||
defined(__AMIGA) || defined(__amigaos__)
|
||||
# if !defined(__AMIGA__)
|
||||
# define __AMIGA__ 1
|
||||
# endif
|
||||
#endif /* end of custom definitions */
|
||||
|
||||
|
||||
#if defined(__DJGPP__) || defined(MSDOS) || defined(__MSDOS__) || defined(__DOS__)
|
||||
|
||||
# if !defined(PLATFORM_DOS)
|
||||
# define PLATFORM_DOS 1
|
||||
# endif
|
||||
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
|
||||
# if !defined(PLATFORM_WINDOWS)
|
||||
# define PLATFORM_WINDOWS 1
|
||||
# endif
|
||||
|
||||
#elif defined(__MACOS__) || defined(__MACOSX__)
|
||||
|
||||
# if !defined(PLATFORM_MAC)
|
||||
# define PLATFORM_MAC 1
|
||||
# endif
|
||||
|
||||
#elif defined(__MORPHOS__) || defined(__AMIGA__)
|
||||
|
||||
# if !defined(PLATFORM_AMIGA)
|
||||
# define PLATFORM_AMIGA 1
|
||||
# endif
|
||||
|
||||
#else /* here goes the unix platforms */
|
||||
|
||||
#if defined(__unix) || defined(__unix__) || defined(unix) || \
|
||||
defined(__linux__) || defined(__linux) || \
|
||||
defined(__FreeBSD__) || defined(__DragonFly__) || \
|
||||
defined(__OpenBSD__) || defined(__NetBSD__) || \
|
||||
defined(__hpux) || defined(__hpux__) || defined(_hpux) || \
|
||||
defined(__sun) || defined(sun) || defined(__IRIX__) || \
|
||||
defined(__QNX__)
|
||||
# if !defined(PLATFORM_UNIX)
|
||||
# define PLATFORM_UNIX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* end of PLATFORM_ definitions */
|
||||
|
||||
|
||||
/* Hack section: Platforms that are mostly fine when
|
||||
* classified under PLATFORM_UNIX :
|
||||
*/
|
||||
#if defined(__MACOSX__)
|
||||
|
||||
# if !defined(PLATFORM_UNIX)
|
||||
# define PLATFORM_UNIX 2
|
||||
# endif
|
||||
|
||||
#endif /* end of PLATFORM_UNIX hacks */
|
||||
|
||||
|
||||
#if defined(_WIN64)
|
||||
# define PLATFORM_STRING "Win64"
|
||||
#elif defined(_WIN32)
|
||||
# define PLATFORM_STRING "Windows"
|
||||
#elif defined(PLATFORM_DOS)
|
||||
# define PLATFORM_STRING "DOS"
|
||||
#elif defined(__linux__) || defined(__linux)
|
||||
# define PLATFORM_STRING "Linux"
|
||||
#elif defined(__DragonFly__)
|
||||
# define PLATFORM_STRING "DragonFly"
|
||||
#elif defined(__FreeBSD__)
|
||||
# define PLATFORM_STRING "FreeBSD"
|
||||
#elif defined(__NetBSD__)
|
||||
# define PLATFORM_STRING "NetBSD"
|
||||
#elif defined(__OpenBSD__)
|
||||
# define PLATFORM_STRING "OpenBSD"
|
||||
#elif defined(__MORPHOS__)
|
||||
# define PLATFORM_STRING "MorphOS"
|
||||
#elif defined(__AMIGA__)
|
||||
# define PLATFORM_STRING "AmigaOS"
|
||||
#elif defined(__QNX__)
|
||||
# define PLATFORM_STRING "QNX"
|
||||
#elif defined(__MACOSX__)
|
||||
# define PLATFORM_STRING "MacOSX"
|
||||
#elif defined(__MACOS__)
|
||||
# define PLATFORM_STRING "MacOS"
|
||||
#elif defined(__hpux) || defined(__hpux__) || defined(_hpux)
|
||||
# define PLATFORM_STRING "HP-UX"
|
||||
#elif defined(__SOLARIS__)
|
||||
# define PLATFORM_STRING "Solaris"
|
||||
#elif defined(__SUNOS__)
|
||||
# define PLATFORM_STRING "SunOS"
|
||||
#elif defined(__IRIX__)
|
||||
# define PLATFORM_STRING "Irix"
|
||||
#elif defined(PLATFORM_UNIX)
|
||||
# define PLATFORM_STRING "Unix"
|
||||
#else
|
||||
# define PLATFORM_STRING "Unknown"
|
||||
# warning "Platform is UNKNOWN."
|
||||
#endif /* end of PLATFORM_STRING definitions */
|
||||
|
||||
#endif /* __HX2_ARCHDEFS__ */
|
||||
|
||||
41
tools/vispatch-1.4.6/source/build_dos.sh
Executable file
41
tools/vispatch-1.4.6/source/build_dos.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
# used for building with djgpp cross toolchain
|
||||
|
||||
TARGET=i586-pc-msdosdjgpp
|
||||
PREFIX=/usr/local/cross-djgpp
|
||||
|
||||
PATH="$PREFIX/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
DOSBUILD=1
|
||||
export DOSBUILD
|
||||
|
||||
CC="$TARGET-gcc"
|
||||
AS="$TARGET-as"
|
||||
RANLIB="$TARGET-ranlib"
|
||||
AR="$TARGET-ar"
|
||||
export CC AS RANLIB AR
|
||||
|
||||
STRIPPER="$TARGET-strip"
|
||||
if [ "$1" = "strip" ]; then
|
||||
$STRIPPER vispatch.exe
|
||||
exit 0
|
||||
fi
|
||||
|
||||
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
|
||||
|
||||
case "$HOST_OS" in
|
||||
freebsd|openbsd|netbsd)
|
||||
MAKE_CMD=gmake
|
||||
;;
|
||||
linux)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
*)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
esac
|
||||
|
||||
$MAKE_CMD -f makefile.djgpp $*
|
||||
|
||||
43
tools/vispatch-1.4.6/source/build_w64.sh
Executable file
43
tools/vispatch-1.4.6/source/build_w64.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Change this script to meet your needs and/or environment.
|
||||
|
||||
#TARGET=x86_64-pc-mingw32
|
||||
TARGET=x86_64-w64-mingw32
|
||||
PREFIX=/opt/cross_win64
|
||||
|
||||
PATH="$PREFIX/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
W64BUILD=1
|
||||
export W64BUILD
|
||||
|
||||
CC="$TARGET-gcc"
|
||||
AS="$TARGET-as"
|
||||
RANLIB="$TARGET-ranlib"
|
||||
AR="$TARGET-ar"
|
||||
WINDRES="$TARGET-windres"
|
||||
export CC AS RANLIB AR WINDRES
|
||||
|
||||
STRIPPER="$TARGET-strip"
|
||||
if [ "$1" = "strip" ]; then
|
||||
$STRIPPER vispatch.exe
|
||||
exit 0
|
||||
fi
|
||||
|
||||
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
|
||||
|
||||
case "$HOST_OS" in
|
||||
linux)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
freebsd|openbsd|netbsd)
|
||||
MAKE_CMD=gmake
|
||||
;;
|
||||
*)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $MAKE_CMD -f makefile.mingw $*
|
||||
|
||||
45
tools/vispatch-1.4.6/source/build_win.sh
Executable file
45
tools/vispatch-1.4.6/source/build_win.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Change this script to meet your needs and/or environment.
|
||||
|
||||
#TARGET=i386-mingw32msvc
|
||||
#TARGET=i686-w64-mingw32
|
||||
TARGET=i686-pc-mingw32
|
||||
#PREFIX=/opt/cross_win32
|
||||
PREFIX=/usr/local/cross-win32
|
||||
|
||||
PATH="$PREFIX/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
W32BUILD=1
|
||||
export W32BUILD
|
||||
|
||||
CC="$TARGET-gcc"
|
||||
AS="$TARGET-as"
|
||||
RANLIB="$TARGET-ranlib"
|
||||
AR="$TARGET-ar"
|
||||
WINDRES="$TARGET-windres"
|
||||
export CC AS RANLIB AR WINDRES
|
||||
|
||||
STRIPPER="$TARGET-strip"
|
||||
if [ "$1" = "strip" ]; then
|
||||
$STRIPPER vispatch.exe
|
||||
exit 0
|
||||
fi
|
||||
|
||||
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
|
||||
|
||||
case "$HOST_OS" in
|
||||
freebsd|openbsd|netbsd)
|
||||
MAKE_CMD=gmake
|
||||
;;
|
||||
linux)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
*)
|
||||
MAKE_CMD=make
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $MAKE_CMD -f makefile.mingw $*
|
||||
|
||||
49
tools/vispatch-1.4.6/source/compiler.h
Normal file
49
tools/vispatch-1.4.6/source/compiler.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
compiler.h
|
||||
compiler specific definitions and settings
|
||||
|
||||
$Id: compiler.h,v 1.6 2011/10/08 12:33:03 sezero Exp $
|
||||
|
||||
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
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:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __VP_COMPILER_H
|
||||
#define __VP_COMPILER_H
|
||||
|
||||
#if !defined(__GNUC__)
|
||||
#define __attribute__(x)
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
/* Some compilers, such as OpenWatcom, and possibly other compilers
|
||||
* from the DOS universe, define __386__ instead of __i386__
|
||||
*/
|
||||
#if defined(__386__) && !defined(__i386__)
|
||||
#define __i386__ 1
|
||||
#endif
|
||||
|
||||
/* inline keyword: */
|
||||
#if defined(_MSC_VER) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
#endif /* __VP_COMPILER_H */
|
||||
|
||||
48
tools/vispatch-1.4.6/source/djlib/COPYING.DJ
Normal file
48
tools/vispatch-1.4.6/source/djlib/COPYING.DJ
Normal file
@@ -0,0 +1,48 @@
|
||||
This is the file "copying.dj". It does NOT apply to any sources or
|
||||
binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
|
||||
any other agency besides DJ Delorie and others who have agreed to
|
||||
allow their sources to be distributed under these terms.
|
||||
|
||||
Copyright Information for sources and executables that are marked
|
||||
Copyright (C) DJ Delorie
|
||||
334 North Rd
|
||||
Deerfield NH 03037-1110
|
||||
|
||||
This document is Copyright (C) DJ Delorie and may be distributed
|
||||
verbatim, but changing it is not allowed.
|
||||
|
||||
Source code copyright DJ Delorie is distributed under the terms of the
|
||||
GNU General Public Licence, with the following exceptions:
|
||||
|
||||
* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
|
||||
libemu.a are distributed under the terms of the GNU Library General
|
||||
Public License, rather than the GNU GPL.
|
||||
|
||||
* Any existing copyright or authorship information in any given source
|
||||
file must remain intact. If you modify a source file, a notice to that
|
||||
effect must be added to the authorship information in the source file.
|
||||
|
||||
* Runtime binaries, as provided by DJ in DJGPP, may be distributed
|
||||
without sources ONLY if the recipient is given sufficient information
|
||||
to obtain a copy of djgpp themselves. This primarily applies to
|
||||
go32-v2.exe, emu387.dxe, and stubedit.exe.
|
||||
|
||||
* Runtime objects and libraries, as provided by DJ in DJGPP, when
|
||||
linked into an application, may be distributed without sources ONLY
|
||||
if the recipient is given sufficient information to obtain a copy of
|
||||
djgpp themselves. This primarily applies to crt0.o and libc.a.
|
||||
|
||||
-----
|
||||
|
||||
Changes to source code copyright BSD, FSF, or others, by DJ Delorie
|
||||
fall under the terms of the original copyright. Such files usually
|
||||
have multiple copyright notices in them.
|
||||
|
||||
A copy of the files "COPYING" and "COPYING.LIB" are included with this
|
||||
document. If you did not receive a copy of these files, you may
|
||||
obtain one from whence this document was obtained, or by writing:
|
||||
|
||||
Free Software Foundation
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307
|
||||
USA
|
||||
57
tools/vispatch-1.4.6/source/djlib/vsnprntf.c
Normal file
57
tools/vispatch-1.4.6/source/djlib/vsnprntf.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* DJGPP < v2.04 doesn't have vsnprintf(). The following are
|
||||
* copied over from DJGPP 2.04. */
|
||||
|
||||
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <libc/file.h>
|
||||
|
||||
#if !defined(_IONTERM)
|
||||
#define _IONTERM 0 /* dummy value */
|
||||
#endif /* _IONTERM */
|
||||
|
||||
static __inline__ void __stropenw(FILE *p, char *str, int len)
|
||||
{
|
||||
p->_flag = _IOWRT | _IOSTRG | _IONTERM;
|
||||
p->_ptr = str;
|
||||
p->_cnt = len;
|
||||
}
|
||||
|
||||
static __inline__ void __strclosew(FILE *p)
|
||||
{
|
||||
*p->_ptr = '\0';
|
||||
}
|
||||
|
||||
int
|
||||
vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
|
||||
{
|
||||
FILE _strbuf;
|
||||
int len;
|
||||
|
||||
/* _cnt is an int in the FILE structure. To prevent wrap-around, we limit
|
||||
* n to between 0 and INT_MAX inclusively. */
|
||||
if (n > INT_MAX)
|
||||
{
|
||||
errno = EFBIG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&_strbuf, 0, sizeof(_strbuf));
|
||||
|
||||
/* If n == 0, just querying how much space is needed. */
|
||||
if (n > 0)
|
||||
__stropenw(&_strbuf, str, n - 1);
|
||||
else
|
||||
__stropenw(&_strbuf, NULL, 0);
|
||||
|
||||
len = _doprnt(fmt, ap, &_strbuf);
|
||||
|
||||
/* Ensure nul termination */
|
||||
if (n > 0)
|
||||
__strclosew(&_strbuf);
|
||||
|
||||
return len;
|
||||
}
|
||||
48
tools/vispatch-1.4.6/source/djstdint/COPYING.DJ
Normal file
48
tools/vispatch-1.4.6/source/djstdint/COPYING.DJ
Normal file
@@ -0,0 +1,48 @@
|
||||
This is the file "copying.dj". It does NOT apply to any sources or
|
||||
binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
|
||||
any other agency besides DJ Delorie and others who have agreed to
|
||||
allow their sources to be distributed under these terms.
|
||||
|
||||
Copyright Information for sources and executables that are marked
|
||||
Copyright (C) DJ Delorie
|
||||
334 North Rd
|
||||
Deerfield NH 03037-1110
|
||||
|
||||
This document is Copyright (C) DJ Delorie and may be distributed
|
||||
verbatim, but changing it is not allowed.
|
||||
|
||||
Source code copyright DJ Delorie is distributed under the terms of the
|
||||
GNU General Public Licence, with the following exceptions:
|
||||
|
||||
* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
|
||||
libemu.a are distributed under the terms of the GNU Library General
|
||||
Public License, rather than the GNU GPL.
|
||||
|
||||
* Any existing copyright or authorship information in any given source
|
||||
file must remain intact. If you modify a source file, a notice to that
|
||||
effect must be added to the authorship information in the source file.
|
||||
|
||||
* Runtime binaries, as provided by DJ in DJGPP, may be distributed
|
||||
without sources ONLY if the recipient is given sufficient information
|
||||
to obtain a copy of djgpp themselves. This primarily applies to
|
||||
go32-v2.exe, emu387.dxe, and stubedit.exe.
|
||||
|
||||
* Runtime objects and libraries, as provided by DJ in DJGPP, when
|
||||
linked into an application, may be distributed without sources ONLY
|
||||
if the recipient is given sufficient information to obtain a copy of
|
||||
djgpp themselves. This primarily applies to crt0.o and libc.a.
|
||||
|
||||
-----
|
||||
|
||||
Changes to source code copyright BSD, FSF, or others, by DJ Delorie
|
||||
fall under the terms of the original copyright. Such files usually
|
||||
have multiple copyright notices in them.
|
||||
|
||||
A copy of the files "COPYING" and "COPYING.LIB" are included with this
|
||||
document. If you did not receive a copy of these files, you may
|
||||
obtain one from whence this document was obtained, or by writing:
|
||||
|
||||
Free Software Foundation
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307
|
||||
USA
|
||||
204
tools/vispatch-1.4.6/source/djstdint/inttypes.h
Normal file
204
tools/vispatch-1.4.6/source/djstdint/inttypes.h
Normal file
@@ -0,0 +1,204 @@
|
||||
/* Hacked from DJGPP v2.04 for use with older DJGPP versions */
|
||||
|
||||
/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
|
||||
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
|
||||
#ifndef __dj_inttypes__h_
|
||||
#define __dj_inttypes__h_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* ANSI/ISO C99 says these should not be visible in C++ unless
|
||||
explicitly requested. */
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
||||
|
||||
#define PRId8 "hhd"
|
||||
#define PRId16 "hd"
|
||||
#define PRId32 "ld"
|
||||
#define PRId64 "lld"
|
||||
#define PRIdLEAST8 "hhd"
|
||||
#define PRIdLEAST16 "hd"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdLEAST64 "lld"
|
||||
#define PRIdFAST8 "hhd"
|
||||
#define PRIdFAST16 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIdFAST64 "lld"
|
||||
#define PRIdMAX "lld"
|
||||
#define PRIdPTR "ld"
|
||||
|
||||
#define PRIi8 "hhi"
|
||||
#define PRIi16 "hi"
|
||||
#define PRIi32 "li"
|
||||
#define PRIi64 "lli"
|
||||
#define PRIiLEAST8 "hhi"
|
||||
#define PRIiLEAST16 "hi"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiLEAST64 "lli"
|
||||
#define PRIiFAST8 "hhi"
|
||||
#define PRIiFAST16 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIiFAST64 "lli"
|
||||
#define PRIiMAX "lli"
|
||||
#define PRIiPTR "li"
|
||||
|
||||
#define PRIo8 "hho"
|
||||
#define PRIo16 "ho"
|
||||
#define PRIo32 "lo"
|
||||
#define PRIo64 "llo"
|
||||
#define PRIoLEAST8 "hho"
|
||||
#define PRIoLEAST16 "ho"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoLEAST64 "llo"
|
||||
#define PRIoFAST8 "hho"
|
||||
#define PRIoFAST16 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIoFAST64 "llo"
|
||||
#define PRIoMAX "llo"
|
||||
#define PRIoPTR "lo"
|
||||
|
||||
#define PRIu8 "hhu"
|
||||
#define PRIu16 "hu"
|
||||
#define PRIu32 "lu"
|
||||
#define PRIu64 "llu"
|
||||
#define PRIuLEAST8 "hhu"
|
||||
#define PRIuLEAST16 "hu"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuLEAST64 "llu"
|
||||
#define PRIuFAST8 "hhu"
|
||||
#define PRIuFAST16 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIuFAST64 "llu"
|
||||
#define PRIuMAX "llu"
|
||||
#define PRIuPTR "lu"
|
||||
|
||||
#define PRIx8 "hhx"
|
||||
#define PRIx16 "hx"
|
||||
#define PRIx32 "lx"
|
||||
#define PRIx64 "llx"
|
||||
#define PRIxLEAST8 "hhx"
|
||||
#define PRIxLEAST16 "hx"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxLEAST64 "llx"
|
||||
#define PRIxFAST8 "hhx"
|
||||
#define PRIxFAST16 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIxFAST64 "llx"
|
||||
#define PRIxMAX "llx"
|
||||
#define PRIxPTR "lx"
|
||||
|
||||
#define PRIX8 "hhX"
|
||||
#define PRIX16 "hX"
|
||||
#define PRIX32 "lX"
|
||||
#define PRIX64 "llX"
|
||||
#define PRIXLEAST8 "hhX"
|
||||
#define PRIXLEAST16 "hX"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXLEAST64 "llX"
|
||||
#define PRIXFAST8 "hhX"
|
||||
#define PRIXFAST16 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
#define PRIXFAST64 "llX"
|
||||
#define PRIXMAX "llX"
|
||||
#define PRIXPTR "lX"
|
||||
|
||||
#define SCNd8 "hhd"
|
||||
#define SCNd16 "hd"
|
||||
#define SCNd32 "ld"
|
||||
#define SCNd64 "lld"
|
||||
#define SCNdLEAST8 "hhd"
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdLEAST64 "lld"
|
||||
#define SCNdFAST8 "hhd"
|
||||
#define SCNdFAST16 "d"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNdFAST64 "lld"
|
||||
#define SCNdMAX "lld"
|
||||
#define SCNdPTR "ld"
|
||||
|
||||
#define SCNi8 "hhi"
|
||||
#define SCNi16 "hi"
|
||||
#define SCNi32 "li"
|
||||
#define SCNi64 "lli"
|
||||
#define SCNiLEAST8 "hhi"
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiLEAST64 "lli"
|
||||
#define SCNiFAST8 "hhi"
|
||||
#define SCNiFAST16 "i"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNiFAST64 "lli"
|
||||
#define SCNiMAX "lli"
|
||||
#define SCNiPTR "li"
|
||||
|
||||
#define SCNo8 "hho"
|
||||
#define SCNo16 "ho"
|
||||
#define SCNo32 "lo"
|
||||
#define SCNo64 "llo"
|
||||
#define SCNoLEAST8 "hho"
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoLEAST64 "llo"
|
||||
#define SCNoFAST8 "hho"
|
||||
#define SCNoFAST16 "o"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNoFAST64 "llo"
|
||||
#define SCNoMAX "llo"
|
||||
#define SCNoPTR "lo"
|
||||
|
||||
#define SCNu8 "hhu"
|
||||
#define SCNu16 "hu"
|
||||
#define SCNu32 "lu"
|
||||
#define SCNu64 "llu"
|
||||
#define SCNuLEAST8 "hhu"
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuLEAST64 "llu"
|
||||
#define SCNuFAST8 "hhu"
|
||||
#define SCNuFAST16 "u"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNuFAST64 "llu"
|
||||
#define SCNuMAX "llu"
|
||||
#define SCNuPTR "lu"
|
||||
|
||||
#define SCNx8 "hhx"
|
||||
#define SCNx16 "hx"
|
||||
#define SCNx32 "lx"
|
||||
#define SCNx64 "llx"
|
||||
#define SCNxLEAST8 "hhx"
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxLEAST64 "llx"
|
||||
#define SCNxFAST8 "hhx"
|
||||
#define SCNxFAST16 "x"
|
||||
#define SCNxFAST32 "x"
|
||||
#define SCNxFAST64 "llx"
|
||||
#define SCNxMAX "llx"
|
||||
#define SCNxPTR "lx"
|
||||
|
||||
#endif /* !__cplusplus || __STDC_FORMAT_MACROS */
|
||||
|
||||
/* we don't need the functions below.
|
||||
* when/if we do, enable the prototypes and implement them... */
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
intmax_t imaxabs (intmax_t _j);
|
||||
imaxdiv_t imaxdiv (intmax_t _numer, intmax_t _denom);
|
||||
intmax_t strtoimax (const char *_nptr, char **_endptr, int _base);
|
||||
uintmax_t strtoumax (const char *_nptr, char **_endptr, int _base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#endif /* __dj_inttypes__h_ */
|
||||
135
tools/vispatch-1.4.6/source/djstdint/stdint.h
Normal file
135
tools/vispatch-1.4.6/source/djstdint/stdint.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/* Hacked from DJGPP v2.04 for use with older DJGPP versions */
|
||||
|
||||
/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
|
||||
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
|
||||
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
|
||||
#ifndef __dj_stdint__h_
|
||||
#define __dj_stdint__h_
|
||||
|
||||
typedef signed char int_least8_t;
|
||||
typedef unsigned char uint_least8_t;
|
||||
typedef signed char int_fast8_t;
|
||||
typedef unsigned char uint_fast8_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
typedef signed short int int_least16_t;
|
||||
typedef unsigned short int uint_least16_t;
|
||||
typedef signed int int_fast16_t;
|
||||
typedef unsigned int uint_fast16_t;
|
||||
typedef signed short int int16_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
|
||||
typedef signed int int_least32_t;
|
||||
typedef unsigned int uint_least32_t;
|
||||
typedef signed int int_fast32_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
typedef signed long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
|
||||
__extension__ typedef signed long long int_least64_t;
|
||||
__extension__ typedef unsigned long long uint_least64_t;
|
||||
__extension__ typedef signed long long int_fast64_t;
|
||||
__extension__ typedef unsigned long long uint_fast64_t;
|
||||
__extension__ typedef signed long long int64_t;
|
||||
__extension__ typedef unsigned long long uint64_t;
|
||||
|
||||
typedef long int intptr_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
|
||||
__extension__ typedef signed long long intmax_t;
|
||||
__extension__ typedef unsigned long long uintmax_t;
|
||||
|
||||
/* ANSI/ISO C99 says these should not be visible in C++ unless
|
||||
explicitly requested. */
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
|
||||
|
||||
#define INT_LEAST8_MAX 127
|
||||
#define UINT_LEAST8_MAX 255
|
||||
#define INT_FAST8_MAX 127
|
||||
#define UINT_FAST8_MAX 255
|
||||
#define INT8_MAX 127
|
||||
#define UINT8_MAX 255
|
||||
#define INT_LEAST8_MIN (-128)
|
||||
#define INT_FAST8_MIN (-128)
|
||||
#define INT8_MIN (-128)
|
||||
|
||||
#define INT_LEAST16_MAX 32767
|
||||
#define UINT_LEAST16_MAX 65535
|
||||
#define INT_FAST16_MAX 2147483647
|
||||
#define UINT_FAST16_MAX 4294967295U
|
||||
#define INT16_MAX 32767
|
||||
#define UINT16_MAX 65535
|
||||
#define INT_LEAST16_MIN (-32768)
|
||||
#define INT_FAST16_MIN (-2147483647-1)
|
||||
#define INT16_MIN (-32768)
|
||||
|
||||
#define INT_LEAST32_MAX 2147483647
|
||||
#define UINT_LEAST32_MAX 4294967295U
|
||||
#define INT_FAST32_MAX 2147483647
|
||||
#define UINT_FAST32_MAX 4294967295U
|
||||
#define INT32_MAX 2147483647L
|
||||
#define UINT32_MAX 4294967295UL
|
||||
#define INT_LEAST32_MIN (-2147483647-1)
|
||||
#define INT_FAST32_MIN (-2147483647-1)
|
||||
#define INT32_MIN (-2147483647L-1)
|
||||
|
||||
#define INT_LEAST64_MAX 9223372036854775807LL
|
||||
#define UINT_LEAST64_MAX 18446744073709551615ULL
|
||||
#define INT_FAST64_MAX 9223372036854775807LL
|
||||
#define UINT_FAST64_MAX 18446744073709551615ULL
|
||||
#define INT64_MAX 9223372036854775807LL
|
||||
#define UINT64_MAX 18446744073709551615ULL
|
||||
#define INT_LEAST64_MIN (-9223372036854775807LL-1LL)
|
||||
#define INT_FAST64_MIN (-9223372036854775807LL-1LL)
|
||||
#define INT64_MIN (-9223372036854775807LL-1LL)
|
||||
|
||||
#define INTPTR_MAX 2147483647L
|
||||
#define INTPTR_MIN (-2147483647L-1L)
|
||||
#define UINTPTR_MAX 0xffffffffUL
|
||||
|
||||
#define INTMAX_MAX 9223372036854775807LL
|
||||
#define UINTMAX_MAX 18446744073709551615ULL
|
||||
#define INTMAX_MIN (-9223372036854775807LL-1LL)
|
||||
|
||||
#define PTRDIFF_MAX 2147483647
|
||||
#define PTRDIFF_MIN (-2147483647-1)
|
||||
#define SIG_ATOMIC_MAX 2147483647
|
||||
#define SIG_ATOMIC_MIN (-2147483647-1)
|
||||
#define SIZE_MAX 4294967295U
|
||||
|
||||
/* These are defined by limits.h, so make them conditional. */
|
||||
#ifndef WCHAR_MAX
|
||||
#define WCHAR_MAX 65535
|
||||
#endif
|
||||
#ifndef WCHAR_MIN
|
||||
#define WCHAR_MIN 0
|
||||
#endif
|
||||
#ifndef WINT_MAX
|
||||
#define WINT_MAX 2147483647
|
||||
#endif
|
||||
#ifndef WINT_MIN
|
||||
#define WINT_MIN (-2147483647-1)
|
||||
#endif
|
||||
|
||||
#endif /* !__cplusplus || __STDC_LIMIT_MACROS */
|
||||
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
|
||||
|
||||
#define INT8_C(x) ((int8_t)x)
|
||||
#define UINT8_C(x) ((uint8_t)x ## U)
|
||||
#define INT16_C(x) ((int16_t)x)
|
||||
#define UINT16_C(x) ((uint16_t)x ## U)
|
||||
#define INT32_C(x) x ## L
|
||||
#define UINT32_C(x) x ## UL
|
||||
#define INT64_C(x) x ## LL
|
||||
#define UINT64_C(x) x ## ULL
|
||||
|
||||
#define INTMAX_C(x) x ## LL
|
||||
#define UINTMAX_C(x) x ## ULL
|
||||
|
||||
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
|
||||
|
||||
#endif /* !__dj_stdint__h_ */
|
||||
26
tools/vispatch-1.4.6/source/makefile
Normal file
26
tools/vispatch-1.4.6/source/makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
# GNU Makefile for vispatch binaries using GCC.
|
||||
# $Id: makefile,v 1.4 2011/10/08 14:10:04 sezero Exp $
|
||||
|
||||
CC ?= gcc
|
||||
|
||||
OBJECTS:= utilslib.o \
|
||||
strlcat.o \
|
||||
strlcpy.o \
|
||||
vispatch.o
|
||||
|
||||
OPTIMIZATIONS= -O2
|
||||
|
||||
CFLAGS = -g -Wall -W -Wshadow $(OPTIMIZATIONS)
|
||||
LDFLAGS=
|
||||
|
||||
all: vispatch
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $*.c
|
||||
|
||||
vispatch: $(OBJECTS)
|
||||
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.res *.d
|
||||
|
||||
26
tools/vispatch-1.4.6/source/makefile.djgpp
Normal file
26
tools/vispatch-1.4.6/source/makefile.djgpp
Normal file
@@ -0,0 +1,26 @@
|
||||
# GNU Makefile for vispatch 32 bit DOS binaries using GCC (DJGPP).
|
||||
# $Id: makefile.djgpp,v 1.5 2011/10/08 14:10:04 sezero Exp $
|
||||
|
||||
CC ?= gcc
|
||||
|
||||
OBJECTS:= utilslib.o \
|
||||
strlcat.o \
|
||||
strlcpy.o \
|
||||
vispatch.o
|
||||
|
||||
OPTIMIZATIONS= -O2
|
||||
|
||||
CFLAGS = -g -Wall -W -Wshadow $(OPTIMIZATIONS)
|
||||
LDFLAGS= -lc
|
||||
|
||||
all: vispatch.exe
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $*.c
|
||||
|
||||
vispatch.exe: $(OBJECTS)
|
||||
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.res *.d
|
||||
|
||||
36
tools/vispatch-1.4.6/source/makefile.mingw
Normal file
36
tools/vispatch-1.4.6/source/makefile.mingw
Normal file
@@ -0,0 +1,36 @@
|
||||
# GNU Makefile for vispatch windows binaries using GCC (MinGW).
|
||||
# $Id: makefile.mingw,v 1.5 2011/10/08 14:10:04 sezero Exp $
|
||||
|
||||
CC ?= gcc
|
||||
WINDRES ?= windres
|
||||
|
||||
OBJECTS:= utilslib.o \
|
||||
strlcat.o \
|
||||
strlcpy.o \
|
||||
vispatch.o \
|
||||
vispatch.res
|
||||
|
||||
OPTIMIZATIONS= -O2
|
||||
|
||||
CFLAGS = -g -Wall -W -Wshadow -DWIN32_LEAN_AND_MEAN $(OPTIMIZATIONS)
|
||||
LDFLAGS= -mconsole
|
||||
|
||||
all: vispatch.exe
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $*.c
|
||||
|
||||
# the program name is vispatch.exe and "patch" keyword is red-flagged
|
||||
# by Windows Vista and newer to trigger UAC for X86 applications.
|
||||
# So we need a manifest to set requestedExecutionLevel as "asInvoker"
|
||||
# and uiAccess as "false". Not needed for AMD64, but doesn't hurt,
|
||||
# either.
|
||||
vispatch.res: vispatch.rc vispatch.exe.manifest
|
||||
$(WINDRES) -DWIN32_LEAN_AND_MEAN --output-format=coff -o $@ $<
|
||||
|
||||
vispatch.exe: $(OBJECTS)
|
||||
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.res *.d
|
||||
|
||||
6
tools/vispatch-1.4.6/source/msinttypes/README.txt
Normal file
6
tools/vispatch-1.4.6/source/msinttypes/README.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
msinttypes-r26 from:
|
||||
|
||||
http://msinttypes.googlecode.com/
|
||||
http://code.google.com/p/msinttypes/
|
||||
|
||||
138
tools/vispatch-1.4.6/source/msinttypes/changelog.txt
Normal file
138
tools/vispatch-1.4.6/source/msinttypes/changelog.txt
Normal file
@@ -0,0 +1,138 @@
|
||||
------------------------------------------------------------------------
|
||||
r26 | 2009-10-02 13:36:47 +0400 | 2 lines
|
||||
|
||||
[Issue 5] Change <stdint.h> to "stdint.h" to let compiler search for it in local directory.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r25 | 2009-09-17 23:46:49 +0400 | 2 lines
|
||||
|
||||
[Issue 4] Fix incorrect int8_t behaviour if compiled with /J flag.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r24 | 2009-05-13 14:53:48 +0400 | 2 lines
|
||||
|
||||
Forgot about #ifdef __cplusplus guard around 'extern "C"', so inclusion to C files has been broken.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r23 | 2009-05-12 01:27:45 +0400 | 3 lines
|
||||
|
||||
[Issue 2] Always wrap <wchar<61><72><EFBFBD> with external "C" {}.
|
||||
It turns out that not only Visual Studio 6 requires this, but also newer versions when compiling for ARM.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r22 | 2009-05-11 22:22:15 +0400 | 3 lines
|
||||
|
||||
[Issue 3] Visual Studio 6 and Embedded Visual C++ 4 doesn't realize that, e.g. char has the same size as __int8 so we give up on __intX for them.
|
||||
his should close Issue 3 in issue tracker.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r21 | 2008-07-17 09:47:22 +0400 | 4 lines
|
||||
|
||||
Get rid of these compiler warnings when compiling for 32-bit:
|
||||
warning C4311: 'type cast' : pointer truncation from 'void *' to 'uintptr_t'
|
||||
warning C4312: 'type cast' : conversion from 'uintptr_t' to 'const void *' of greater size
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r20 | 2007-10-09 16:54:27 +0400 | 2 lines
|
||||
|
||||
Better C99 conformance: macros for format specifiers should only be included in C++ implementations if __STDC_FORMAT_MACROS is defined before <inttypes.h> is included.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r19 | 2007-07-04 02:14:40 +0400 | 3 lines
|
||||
|
||||
Explicitly cast to appropriate type INT8_MIN, INT16_MIN, INT32_MIN and INT64_MIN constants.
|
||||
Due to their unusual definition in Visual Studio headers (-_Ix_MAX-1) they are propagated to int and thus do not have expected type, causing VS6 strict compiler to claim about type inconsistency.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r18 | 2007-06-26 16:53:23 +0400 | 2 lines
|
||||
|
||||
Better handling of (U)INTx_C macros - now they generate constants of exact width.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r17 | 2007-03-29 20:16:14 +0400 | 2 lines
|
||||
|
||||
Fix typo: Miscrosoft -> Microsoft.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r16 | 2007-02-24 17:32:58 +0300 | 4 lines
|
||||
|
||||
Remove <BaseTsd.h> include, as it is not present in Visual Studio 2005 Epxress Edition and required only for INT_PTR and UINT_PTR types.
|
||||
|
||||
'intptr_t' and 'uintptr_t' types now defined explicitly with #ifdef _WIN64.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r15 | 2007-02-11 20:53:05 +0300 | 2 lines
|
||||
|
||||
More correct fix for compilation under VS6.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r14 | 2007-02-11 20:04:32 +0300 | 2 lines
|
||||
|
||||
Bugfix: fix compiling under VS6, when stdint.h enclosed in 'extern "C" {}'.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r13 | 2006-12-13 16:53:11 +0300 | 2 lines
|
||||
|
||||
Make _inline modifier for imaxdiv default option. Use STATIC_IMAXDIV to make it static.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r12 | 2006-12-13 16:42:24 +0300 | 2 lines
|
||||
|
||||
Error message changed: VC6 supported from now.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r11 | 2006-12-13 16:39:33 +0300 | 2 lines
|
||||
|
||||
All (U)INT* types changed to (unsigned) __int*. This should make stdint.h compatible with VC6.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r10 | 2006-12-13 16:20:57 +0300 | 3 lines
|
||||
|
||||
Added INLINE_IMAXDIV define switch.
|
||||
If INLINE_IMAXDIV is defined imaxdiv() have static modifier. If not - it is _inline.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r9 | 2006-12-13 15:53:52 +0300 | 2 lines
|
||||
|
||||
Error message for non-MSC compiler changed.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r8 | 2006-12-13 12:47:48 +0300 | 2 lines
|
||||
|
||||
Added #ifndef for SIZE_MAX (it is defined in limits.h on MSVSC 8).
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r7 | 2006-12-13 01:08:02 +0300 | 2 lines
|
||||
|
||||
License chaged to BSD-derivative.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r6 | 2006-12-13 00:53:20 +0300 | 2 lines
|
||||
|
||||
Added <wchar.h> include to avoid warnings when it is included after stdint.h.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r5 | 2006-12-12 00:58:05 +0300 | 2 lines
|
||||
|
||||
BUGFIX: Definitions of INTPTR_MIN, INTPTR_MAX and UINTPTR_MAX for WIN32 and WIN64 was mixed up.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r4 | 2006-12-12 00:51:55 +0300 | 2 lines
|
||||
|
||||
Rise #error if _MSC_VER is not defined. I.e. compiler other then Microsoft Visual C++ is used.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r3 | 2006-12-11 22:54:14 +0300 | 2 lines
|
||||
|
||||
Added <limits.h> include to stdint.h.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r2 | 2006-12-11 21:39:27 +0300 | 2 lines
|
||||
|
||||
Initial check in.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r1 | 2006-12-11 21:30:23 +0300 | 1 line
|
||||
|
||||
Initial directory structure.
|
||||
------------------------------------------------------------------------
|
||||
305
tools/vispatch-1.4.6/source/msinttypes/inttypes.h
Normal file
305
tools/vispatch-1.4.6/source/msinttypes/inttypes.h
Normal file
@@ -0,0 +1,305 @@
|
||||
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_INTTYPES_H_ // [
|
||||
#define _MSC_INTTYPES_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
// 7.8 Format conversion of integer types
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
// 7.8.1 Macros for format specifiers
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
|
||||
|
||||
// The fprintf macros for signed integers are:
|
||||
#define PRId8 "d"
|
||||
#define PRIi8 "i"
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIiFAST8 "i"
|
||||
|
||||
#define PRId16 "hd"
|
||||
#define PRIi16 "hi"
|
||||
#define PRIdLEAST16 "hd"
|
||||
#define PRIiLEAST16 "hi"
|
||||
#define PRIdFAST16 "hd"
|
||||
#define PRIiFAST16 "hi"
|
||||
|
||||
#define PRId32 "I32d"
|
||||
#define PRIi32 "I32i"
|
||||
#define PRIdLEAST32 "I32d"
|
||||
#define PRIiLEAST32 "I32i"
|
||||
#define PRIdFAST32 "I32d"
|
||||
#define PRIiFAST32 "I32i"
|
||||
|
||||
#define PRId64 "I64d"
|
||||
#define PRIi64 "I64i"
|
||||
#define PRIdLEAST64 "I64d"
|
||||
#define PRIiLEAST64 "I64i"
|
||||
#define PRIdFAST64 "I64d"
|
||||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIiMAX "I64i"
|
||||
|
||||
#define PRIdPTR "Id"
|
||||
#define PRIiPTR "Ii"
|
||||
|
||||
// The fprintf macros for unsigned integers are:
|
||||
#define PRIo8 "o"
|
||||
#define PRIu8 "u"
|
||||
#define PRIx8 "x"
|
||||
#define PRIX8 "X"
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIXFAST8 "X"
|
||||
|
||||
#define PRIo16 "ho"
|
||||
#define PRIu16 "hu"
|
||||
#define PRIx16 "hx"
|
||||
#define PRIX16 "hX"
|
||||
#define PRIoLEAST16 "ho"
|
||||
#define PRIuLEAST16 "hu"
|
||||
#define PRIxLEAST16 "hx"
|
||||
#define PRIXLEAST16 "hX"
|
||||
#define PRIoFAST16 "ho"
|
||||
#define PRIuFAST16 "hu"
|
||||
#define PRIxFAST16 "hx"
|
||||
#define PRIXFAST16 "hX"
|
||||
|
||||
#define PRIo32 "I32o"
|
||||
#define PRIu32 "I32u"
|
||||
#define PRIx32 "I32x"
|
||||
#define PRIX32 "I32X"
|
||||
#define PRIoLEAST32 "I32o"
|
||||
#define PRIuLEAST32 "I32u"
|
||||
#define PRIxLEAST32 "I32x"
|
||||
#define PRIXLEAST32 "I32X"
|
||||
#define PRIoFAST32 "I32o"
|
||||
#define PRIuFAST32 "I32u"
|
||||
#define PRIxFAST32 "I32x"
|
||||
#define PRIXFAST32 "I32X"
|
||||
|
||||
#define PRIo64 "I64o"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRIx64 "I64x"
|
||||
#define PRIX64 "I64X"
|
||||
#define PRIoLEAST64 "I64o"
|
||||
#define PRIuLEAST64 "I64u"
|
||||
#define PRIxLEAST64 "I64x"
|
||||
#define PRIXLEAST64 "I64X"
|
||||
#define PRIoFAST64 "I64o"
|
||||
#define PRIuFAST64 "I64u"
|
||||
#define PRIxFAST64 "I64x"
|
||||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIoMAX "I64o"
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIXMAX "I64X"
|
||||
|
||||
#define PRIoPTR "Io"
|
||||
#define PRIuPTR "Iu"
|
||||
#define PRIxPTR "Ix"
|
||||
#define PRIXPTR "IX"
|
||||
|
||||
// The fscanf macros for signed integers are:
|
||||
#define SCNd8 "d"
|
||||
#define SCNi8 "i"
|
||||
#define SCNdLEAST8 "d"
|
||||
#define SCNiLEAST8 "i"
|
||||
#define SCNdFAST8 "d"
|
||||
#define SCNiFAST8 "i"
|
||||
|
||||
#define SCNd16 "hd"
|
||||
#define SCNi16 "hi"
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNdFAST16 "hd"
|
||||
#define SCNiFAST16 "hi"
|
||||
|
||||
#define SCNd32 "ld"
|
||||
#define SCNi32 "li"
|
||||
#define SCNdLEAST32 "ld"
|
||||
#define SCNiLEAST32 "li"
|
||||
#define SCNdFAST32 "ld"
|
||||
#define SCNiFAST32 "li"
|
||||
|
||||
#define SCNd64 "I64d"
|
||||
#define SCNi64 "I64i"
|
||||
#define SCNdLEAST64 "I64d"
|
||||
#define SCNiLEAST64 "I64i"
|
||||
#define SCNdFAST64 "I64d"
|
||||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNiMAX "I64i"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNdPTR "I64d"
|
||||
# define SCNiPTR "I64i"
|
||||
#else // _WIN64 ][
|
||||
# define SCNdPTR "ld"
|
||||
# define SCNiPTR "li"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// The fscanf macros for unsigned integers are:
|
||||
#define SCNo8 "o"
|
||||
#define SCNu8 "u"
|
||||
#define SCNx8 "x"
|
||||
#define SCNX8 "X"
|
||||
#define SCNoLEAST8 "o"
|
||||
#define SCNuLEAST8 "u"
|
||||
#define SCNxLEAST8 "x"
|
||||
#define SCNXLEAST8 "X"
|
||||
#define SCNoFAST8 "o"
|
||||
#define SCNuFAST8 "u"
|
||||
#define SCNxFAST8 "x"
|
||||
#define SCNXFAST8 "X"
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNu16 "hu"
|
||||
#define SCNx16 "hx"
|
||||
#define SCNX16 "hX"
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNXLEAST16 "hX"
|
||||
#define SCNoFAST16 "ho"
|
||||
#define SCNuFAST16 "hu"
|
||||
#define SCNxFAST16 "hx"
|
||||
#define SCNXFAST16 "hX"
|
||||
|
||||
#define SCNo32 "lo"
|
||||
#define SCNu32 "lu"
|
||||
#define SCNx32 "lx"
|
||||
#define SCNX32 "lX"
|
||||
#define SCNoLEAST32 "lo"
|
||||
#define SCNuLEAST32 "lu"
|
||||
#define SCNxLEAST32 "lx"
|
||||
#define SCNXLEAST32 "lX"
|
||||
#define SCNoFAST32 "lo"
|
||||
#define SCNuFAST32 "lu"
|
||||
#define SCNxFAST32 "lx"
|
||||
#define SCNXFAST32 "lX"
|
||||
|
||||
#define SCNo64 "I64o"
|
||||
#define SCNu64 "I64u"
|
||||
#define SCNx64 "I64x"
|
||||
#define SCNX64 "I64X"
|
||||
#define SCNoLEAST64 "I64o"
|
||||
#define SCNuLEAST64 "I64u"
|
||||
#define SCNxLEAST64 "I64x"
|
||||
#define SCNXLEAST64 "I64X"
|
||||
#define SCNoFAST64 "I64o"
|
||||
#define SCNuFAST64 "I64u"
|
||||
#define SCNxFAST64 "I64x"
|
||||
#define SCNXFAST64 "I64X"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNXMAX "I64X"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNoPTR "I64o"
|
||||
# define SCNuPTR "I64u"
|
||||
# define SCNxPTR "I64x"
|
||||
# define SCNXPTR "I64X"
|
||||
#else // _WIN64 ][
|
||||
# define SCNoPTR "lo"
|
||||
# define SCNuPTR "lu"
|
||||
# define SCNxPTR "lx"
|
||||
# define SCNXPTR "lX"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
#endif // __STDC_FORMAT_MACROS ]
|
||||
|
||||
// 7.8.2 Functions for greatest-width integer types
|
||||
|
||||
// 7.8.2.1 The imaxabs function
|
||||
#define imaxabs _abs64
|
||||
|
||||
// 7.8.2.2 The imaxdiv function
|
||||
|
||||
// This is modified version of div() function from Microsoft's div.c found
|
||||
// in %MSVC.NET%\crt\src\div.c
|
||||
#ifdef STATIC_IMAXDIV // [
|
||||
static
|
||||
#else // STATIC_IMAXDIV ][
|
||||
_inline
|
||||
#endif // STATIC_IMAXDIV ]
|
||||
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
|
||||
{
|
||||
imaxdiv_t result;
|
||||
|
||||
result.quot = numer / denom;
|
||||
result.rem = numer % denom;
|
||||
|
||||
if (numer < 0 && result.rem > 0) {
|
||||
// did division wrong; must fix up
|
||||
++result.quot;
|
||||
result.rem -= denom;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 7.8.2.3 The strtoimax and strtoumax functions
|
||||
#define strtoimax _strtoi64
|
||||
#define strtoumax _strtoui64
|
||||
|
||||
// 7.8.2.4 The wcstoimax and wcstoumax functions
|
||||
#define wcstoimax _wcstoi64
|
||||
#define wcstoumax _wcstoui64
|
||||
|
||||
|
||||
#endif // _MSC_INTTYPES_H_ ]
|
||||
247
tools/vispatch-1.4.6/source/msinttypes/stdint.h
Normal file
247
tools/vispatch-1.4.6/source/msinttypes/stdint.h
Normal file
@@ -0,0 +1,247 @@
|
||||
// ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006-2008 Alexander Chemeris
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
|
||||
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
|
||||
// or compiler give many errors like this:
|
||||
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// Define _W64 macros to mark types changing their size, like intptr_t.
|
||||
#ifndef _W64
|
||||
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
# define _W64 __w64
|
||||
# else
|
||||
# define _W64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
// 7.18.1 Integer types
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
|
||||
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
|
||||
// realize that, e.g. char has the same size as __int8
|
||||
// so we give up on __intX for them.
|
||||
#if (_MSC_VER < 1300)
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
#endif
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
typedef signed __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else // _WIN64 ][
|
||||
typedef _W64 signed int intptr_t;
|
||||
typedef _W64 unsigned int uintptr_t;
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
|
||||
// 7.18.2 Limits of specified-width integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
|
||||
|
||||
// 7.18.2.1 Limits of exact-width integer types
|
||||
#define INT8_MIN ((int8_t)_I8_MIN)
|
||||
#define INT8_MAX _I8_MAX
|
||||
#define INT16_MIN ((int16_t)_I16_MIN)
|
||||
#define INT16_MAX _I16_MAX
|
||||
#define INT32_MIN ((int32_t)_I32_MIN)
|
||||
#define INT32_MAX _I32_MAX
|
||||
#define INT64_MIN ((int64_t)_I64_MIN)
|
||||
#define INT64_MAX _I64_MAX
|
||||
#define UINT8_MAX _UI8_MAX
|
||||
#define UINT16_MAX _UI16_MAX
|
||||
#define UINT32_MAX _UI32_MAX
|
||||
#define UINT64_MAX _UI64_MAX
|
||||
|
||||
// 7.18.2.2 Limits of minimum-width integer types
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.3 Limits of fastest minimum-width integer types
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.4 Limits of integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
# define INTPTR_MIN INT64_MIN
|
||||
# define INTPTR_MAX INT64_MAX
|
||||
# define UINTPTR_MAX UINT64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.2.5 Limits of greatest-width integer types
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
// 7.18.3 Limits of other integer types
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define PTRDIFF_MIN _I64_MIN
|
||||
# define PTRDIFF_MAX _I64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define PTRDIFF_MIN _I32_MIN
|
||||
# define PTRDIFF_MAX _I32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
|
||||
#ifndef SIZE_MAX // [
|
||||
# ifdef _WIN64 // [
|
||||
# define SIZE_MAX _UI64_MAX
|
||||
# else // _WIN64 ][
|
||||
# define SIZE_MAX _UI32_MAX
|
||||
# endif // _WIN64 ]
|
||||
#endif // SIZE_MAX ]
|
||||
|
||||
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
|
||||
#ifndef WCHAR_MIN // [
|
||||
# define WCHAR_MIN 0
|
||||
#endif // WCHAR_MIN ]
|
||||
#ifndef WCHAR_MAX // [
|
||||
# define WCHAR_MAX _UI16_MAX
|
||||
#endif // WCHAR_MAX ]
|
||||
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX _UI16_MAX
|
||||
|
||||
#endif // __STDC_LIMIT_MACROS ]
|
||||
|
||||
|
||||
// 7.18.4 Limits of other integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
|
||||
|
||||
// 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
#define INT8_C(val) val##i8
|
||||
#define INT16_C(val) val##i16
|
||||
#define INT32_C(val) val##i32
|
||||
#define INT64_C(val) val##i64
|
||||
|
||||
#define UINT8_C(val) val##ui8
|
||||
#define UINT16_C(val) val##ui16
|
||||
#define UINT32_C(val) val##ui32
|
||||
#define UINT64_C(val) val##ui64
|
||||
|
||||
// 7.18.4.2 Macros for greatest-width integer constants
|
||||
#define INTMAX_C INT64_C
|
||||
#define UINTMAX_C UINT64_C
|
||||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
||||
BIN
tools/vispatch-1.4.6/source/old1997/unixvis.zip
Normal file
BIN
tools/vispatch-1.4.6/source/old1997/unixvis.zip
Normal file
Binary file not shown.
91
tools/vispatch-1.4.6/source/old1997/vispatch12.txt
Normal file
91
tools/vispatch-1.4.6/source/old1997/vispatch12.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
VisPatch 1.2
|
||||
|
||||
simple:
|
||||
VisPatch file.pak or file.bsp (wildcards ok) -extract
|
||||
that retrieves all data nessisary for vis updates.
|
||||
|
||||
VisPatch file.xxx -new:
|
||||
for bsps:
|
||||
makes bakups of the old bsps as file.bak.
|
||||
It will only patch bsp's that it has data for and skips those that it does not.
|
||||
for Paks:
|
||||
Puts all levels into one pak file that is incrementally higher than
|
||||
your last one.
|
||||
|
||||
"Vispatch file.xxx" replaces the file.
|
||||
"vispatch file.xxx -extract" retrives all the vis data from the current file.
|
||||
"vispatch file.xxx -data some.dat" uses some.dat instead of vispatch.dat.
|
||||
"vispatch file.xxx -data some.dat -extract" puts data into some.dat instead of vispatch.dat.
|
||||
|
||||
List of parameters:
|
||||
|
||||
-extract puts the vis data into a data file.
|
||||
-dir specifies the directory the level files are in.
|
||||
-data specifies the vis data file (no wildcards)
|
||||
-new puts the modifies levels into a new pak file if they were in a pak
|
||||
file. Renames the unmodified bsp files to name.bak and saves it as
|
||||
the original name.
|
||||
|
||||
Revision history:
|
||||
Version 1.2:
|
||||
Fixed the NT file loop by using the archive attribute.
|
||||
It simply removes the attribute on the files then checks
|
||||
the files for the attribute before processing them. If
|
||||
they have the attribute, then they aren't the originals and
|
||||
we are done with it.
|
||||
Now Dumps you out and cleans up when out of disk space.
|
||||
|
||||
Version 1.1:
|
||||
Now doesn't put unmodified levels in paks and do anything to unmodified
|
||||
BSP's.
|
||||
Note: I didn't want this released because I had already finished and
|
||||
sent Ken 1.2 when it was released. Ugh.
|
||||
|
||||
Version 1.0b:
|
||||
Added -dir for Ken's install batch program.
|
||||
Added -data for Ken's install batch program.
|
||||
|
||||
Version 1.0a:
|
||||
Minor bug fixes.(ie I forgot.)
|
||||
|
||||
Version 1.0:
|
||||
And there was light (on the other side of the water.)
|
||||
|
||||
Installation:
|
||||
|
||||
If you just want to patch your data, just use the batch files Ken made.
|
||||
If you use VisPatch without it,
|
||||
"Vispatch" all by it's lonesome will update all the pak?.pak files in the
|
||||
current directory with the vispatch.dat file in the directory.
|
||||
|
||||
If you want to make your own patches to use Ken's program use this format:
|
||||
|
||||
Files:
|
||||
MyPatch.vis Actual data. -data MyPatch.vis
|
||||
MyPatch.dat 4 line description of your patch.
|
||||
|
||||
Probably a text file saying how to get this program.
|
||||
|
||||
If you want to merge two data sets, just do
|
||||
"copy /b file1.ext+file2.ext newfile.ext"
|
||||
I chose the file format for that reason. (I was expecting about 20 sources
|
||||
for all ID's levels alone and needed a good way to combine them.)
|
||||
|
||||
Andy Bay
|
||||
ABay@teir.com
|
||||
|
||||
Credits:
|
||||
|
||||
Ken Alverson - The neat WQBSP he made, and organizing the data collection for this.
|
||||
Alex Moon - Making a BSP2Prt file making the fastest available vis tables.
|
||||
ID - Making such cool games.
|
||||
DeathDealer - Being such a sport about Water Transperency.
|
||||
http://www.allgames.com/quake/
|
||||
Razor - The other cool place to get this.
|
||||
http://razor.stomped.com/water/
|
||||
WaterVIS - Another cool place to get this
|
||||
http://www.sod.net/vis/
|
||||
CDROM.COM:
|
||||
ftp://ftp.cdrom.com/pub/quake/utils/bsp_pak_tools/
|
||||
|
||||
All our Data donators. (Ken listed them.)
|
||||
BIN
tools/vispatch-1.4.6/source/old1997/vispatch12.zip
Normal file
BIN
tools/vispatch-1.4.6/source/old1997/vispatch12.zip
Normal file
Binary file not shown.
BIN
tools/vispatch-1.4.6/source/old1997/vispsrc.zip
Normal file
BIN
tools/vispatch-1.4.6/source/old1997/vispsrc.zip
Normal file
Binary file not shown.
203
tools/vispatch-1.4.6/source/q_endian.h
Normal file
203
tools/vispatch-1.4.6/source/q_endian.h
Normal file
@@ -0,0 +1,203 @@
|
||||
/*
|
||||
q_endian.h
|
||||
endianness handling
|
||||
|
||||
$Id: q_endian.h,v 1.5 2011/10/08 12:33:03 sezero Exp $
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
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:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __QENDIAN_H
|
||||
#define __QENDIAN_H
|
||||
|
||||
/*
|
||||
* endianness stuff: <sys/types.h> is supposed
|
||||
* to succeed in locating the correct endian.h
|
||||
* this BSD style may not work everywhere.
|
||||
*/
|
||||
|
||||
#undef ENDIAN_GUESSED_SAFE
|
||||
#undef ENDIAN_ASSUMED_UNSAFE
|
||||
|
||||
#undef ENDIAN_RUNTIME_DETECT
|
||||
/* if you want to detect byte order at runtime
|
||||
* instead of compile time, define this as 1 :
|
||||
*/
|
||||
#define ENDIAN_RUNTIME_DETECT 0
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* include more if it didn't work: */
|
||||
#if !defined(BYTE_ORDER)
|
||||
|
||||
# if defined(__linux__) || defined(__linux)
|
||||
# include <endian.h>
|
||||
# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
# include <machine/endian.h>
|
||||
# elif defined(__sun) || defined(__svr4__)
|
||||
# include <sys/byteorder.h>
|
||||
# elif defined(_AIX)
|
||||
# include <sys/machine.h>
|
||||
# elif defined(sgi)
|
||||
# include <sys/endian.h>
|
||||
# elif defined(__DJGPP__)
|
||||
# include <machine/endian.h>
|
||||
# endif
|
||||
|
||||
#endif /* endian includes */
|
||||
|
||||
|
||||
#if defined(__BYTE_ORDER) && !defined(BYTE_ORDER)
|
||||
#define BYTE_ORDER __BYTE_ORDER
|
||||
#endif /* __BYTE_ORDER */
|
||||
|
||||
#if !defined(PDP_ENDIAN)
|
||||
#if defined(__PDP_ENDIAN)
|
||||
#define PDP_ENDIAN __PDP_ENDIAN
|
||||
#else
|
||||
#define PDP_ENDIAN 3412
|
||||
#endif
|
||||
#endif /* NUXI endian (not supported) */
|
||||
|
||||
#if defined(__LITTLE_ENDIAN) && !defined(LITTLE_ENDIAN)
|
||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#endif /* __LITTLE_ENDIAN */
|
||||
|
||||
#if defined(__BIG_ENDIAN) && !defined(BIG_ENDIAN)
|
||||
#define BIG_ENDIAN __BIG_ENDIAN
|
||||
#endif /* __LITTLE_ENDIAN */
|
||||
|
||||
|
||||
#if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
|
||||
|
||||
# if (BYTE_ORDER != LITTLE_ENDIAN) && (BYTE_ORDER != BIG_ENDIAN)
|
||||
# error "Unsupported endianness."
|
||||
# endif
|
||||
|
||||
#else /* one of the definitions is mising. */
|
||||
|
||||
# undef BYTE_ORDER
|
||||
# undef LITTLE_ENDIAN
|
||||
# undef BIG_ENDIAN
|
||||
# undef PDP_ENDIAN
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BIG_ENDIAN 4321
|
||||
# define PDP_ENDIAN 3412
|
||||
|
||||
#endif /* byte order defs */
|
||||
|
||||
|
||||
#if !defined(BYTE_ORDER)
|
||||
/* supposedly safe assumptions: these may actually
|
||||
* be OS dependant and listing all possible compiler
|
||||
* macros here is impossible (the ones here are gcc
|
||||
* flags, mostly.) so, proceed carefully..
|
||||
*/
|
||||
|
||||
# if defined(__DJGPP__) || defined(MSDOS) || defined(__MSDOS__)
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* DOS */
|
||||
|
||||
# elif defined(__sun) || defined(__svr4__) /* solaris */
|
||||
# if defined(_LITTLE_ENDIAN) /* x86 */
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
# elif defined(_BIG_ENDIAN) /* sparc */
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
# endif
|
||||
|
||||
# elif defined(__i386) || defined(__i386__) || defined(__386__) || defined(_M_IX86)
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* any x86 */
|
||||
|
||||
# elif defined(__amd64) || defined(__x86_64__) || defined(_M_X64)
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* any x64 */
|
||||
|
||||
# elif defined(_M_IA64)
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* ia64 / Visual C */
|
||||
|
||||
# elif defined (__ppc__) || defined(__POWERPC__) || defined(_M_PPC)
|
||||
# define BYTE_ORDER BIG_ENDIAN /* PPC: big endian */
|
||||
|
||||
# elif (defined(__alpha__) || defined(__alpha)) || defined(_M_ALPHA)
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* should be safe */
|
||||
|
||||
# elif defined(_WIN32) || defined(_WIN64) /* windows : */
|
||||
# define BYTE_ORDER LITTLE_ENDIAN /* should be safe */
|
||||
|
||||
# elif defined(__hppa) || defined(__hppa__) || defined(__sparc) || defined(__sparc__) /* others: check! */
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
|
||||
# endif
|
||||
|
||||
# if defined(BYTE_ORDER)
|
||||
/* raise a flag, just in case: */
|
||||
# define ENDIAN_GUESSED_SAFE BYTE_ORDER
|
||||
# endif
|
||||
|
||||
#endif /* supposedly safe assumptions */
|
||||
|
||||
|
||||
#if !defined(BYTE_ORDER)
|
||||
|
||||
/* brain-dead fallback: default to little endian.
|
||||
* change if necessary, or use runtime detection!
|
||||
*/
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
# define ENDIAN_ASSUMED_UNSAFE BYTE_ORDER
|
||||
|
||||
#endif /* fallback. */
|
||||
|
||||
|
||||
extern int host_byteorder;
|
||||
extern int host_bigendian; /* bool */
|
||||
extern int DetectByteorder (void);
|
||||
extern void ByteOrder_Init (void);
|
||||
|
||||
|
||||
/* byte swapping. most times we want to convert to
|
||||
* little endian: our data files are written in LE
|
||||
* format. sometimes, such as when writing to net,
|
||||
* we also convert to big endian.
|
||||
*/
|
||||
#if ENDIAN_RUNTIME_DETECT
|
||||
|
||||
extern int (*BigLong) (int);
|
||||
extern int (*LittleLong) (int);
|
||||
|
||||
#else /* ! ENDIAN_RUNTIME_DETECT */
|
||||
|
||||
extern int LongSwap (int);
|
||||
|
||||
#if (BYTE_ORDER == BIG_ENDIAN)
|
||||
|
||||
#define BigLong(l) (l)
|
||||
#define LittleLong(l) LongSwap((l))
|
||||
|
||||
#else /* BYTE_ORDER == LITTLE_ENDIAN */
|
||||
|
||||
#define BigLong(l) LongSwap((l))
|
||||
#define LittleLong(l) (l)
|
||||
|
||||
#endif /* swap macros */
|
||||
|
||||
#endif /* runtime det */
|
||||
|
||||
#endif /* __QENDIAN_H */
|
||||
|
||||
83
tools/vispatch-1.4.6/source/q_stdinc.h
Normal file
83
tools/vispatch-1.4.6/source/q_stdinc.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
q_stdinc.h
|
||||
includes the minimum necessary stdc headers,
|
||||
|
||||
$Id: q_stdinc.h,v 1.8 2011/10/08 12:33:03 sezero Exp $
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
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:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __QSTDINC_H
|
||||
#define __QSTDINC_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if 0
|
||||
#include "q_stdint.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <strings.h> /* strcasecmp and strncasecmp */
|
||||
#endif /* ! PLATFORM_WINDOWS */
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
#ifndef NULL
|
||||
#if defined(__cplusplus)
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Make sure the types really have the right
|
||||
* sizes: These macros are from SDL headers.
|
||||
*/
|
||||
#define COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int dummy_ ## name[(x) * 2 - 1]
|
||||
|
||||
COMPILE_TIME_ASSERT(char, sizeof(char) == 1);
|
||||
COMPILE_TIME_ASSERT(long, sizeof(long) >= 4);
|
||||
COMPILE_TIME_ASSERT(int, sizeof(int) == 4);
|
||||
COMPILE_TIME_ASSERT(short, sizeof(short) == 2);
|
||||
|
||||
|
||||
/* Provide a substitute for offsetof() if we don't have one.
|
||||
* This variant works on most (but not *all*) systems...
|
||||
*/
|
||||
#ifndef offsetof
|
||||
#define offsetof(t,m) ((size_t)&(((t *)0)->m))
|
||||
#endif
|
||||
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
|
||||
#endif /* __QSTDINC_H */
|
||||
|
||||
24
tools/vispatch-1.4.6/source/q_stdint.h
Normal file
24
tools/vispatch-1.4.6/source/q_stdint.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* q_stdint.h: include a proper stdint.h header */
|
||||
|
||||
#ifndef __QSTDINT_H
|
||||
#define __QSTDINT_H
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* MS Visual Studio provides stdint.h only starting with
|
||||
* version 2010. Even in VS2010, there is no inttypes.h.. */
|
||||
#include "msinttypes/stdint.h"
|
||||
|
||||
#elif defined(__DJGPP__) && \
|
||||
(!defined(__DJGPP_MINOR__) || __DJGPP_MINOR__ < 4)
|
||||
/* DJGPP < v2.04 doesn't have stdint.h and inttypes.h. */
|
||||
/* to ensure a proper version check, include stdio.h
|
||||
* or go32.h which includes sys/version.h since djgpp
|
||||
* versions >= 2.02 and defines __DJGPP_MINOR__ */
|
||||
#include "djstdint/stdint.h"
|
||||
|
||||
#else /* assume presence of a stdint.h from the SDK. */
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#endif /* __QSTDINT_H */
|
||||
|
||||
28
tools/vispatch-1.4.6/source/strl_fn.h
Normal file
28
tools/vispatch-1.4.6/source/strl_fn.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
strl_fn.h
|
||||
header file for BSD strlcat and strlcpy
|
||||
|
||||
$Id: strl_fn.h,v 1.2 2008/01/18 09:57:01 sezero Exp $
|
||||
*/
|
||||
|
||||
#ifndef __STRLFUNCS_H
|
||||
#define __STRLFUNCS_H
|
||||
|
||||
/* do we have strlcpy and strlcat as native library functions? */
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__MACOSX__) || defined(__DragonFly__)
|
||||
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
|
||||
#else
|
||||
|
||||
#define HAVE_STRLCPY 0
|
||||
#define HAVE_STRLCAT 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __STRLFUNCS_H */
|
||||
|
||||
61
tools/vispatch-1.4.6/source/strlcat.c
Normal file
61
tools/vispatch-1.4.6/source/strlcat.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "arch_def.h"
|
||||
#include "strl_fn.h"
|
||||
|
||||
/*
|
||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||
* full size of dst, not space left). At most siz-1 characters
|
||||
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
|
||||
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
|
||||
* If retval >= siz, truncation occurred.
|
||||
*/
|
||||
#if !HAVE_STRLCAT
|
||||
size_t
|
||||
q_strlcat (char *dst, const char *src, size_t siz)
|
||||
{
|
||||
char *d = dst;
|
||||
const char *s = src;
|
||||
size_t n = siz;
|
||||
size_t dlen;
|
||||
|
||||
/* Find the end of dst and adjust bytes left but don't go past end */
|
||||
while (n-- != 0 && *d != '\0')
|
||||
d++;
|
||||
dlen = d - dst;
|
||||
n = siz - dlen;
|
||||
|
||||
if (n == 0)
|
||||
return(dlen + strlen(s));
|
||||
while (*s != '\0') {
|
||||
if (n != 1) {
|
||||
*d++ = *s;
|
||||
n--;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
*d = '\0';
|
||||
|
||||
return(dlen + (s - src)); /* count does not include NUL */
|
||||
}
|
||||
#endif
|
||||
|
||||
186
tools/vispatch-1.4.6/source/strlcpy.3
Normal file
186
tools/vispatch-1.4.6/source/strlcpy.3
Normal file
@@ -0,0 +1,186 @@
|
||||
.\" $OpenBSD: strlcpy.3,v 1.18 2005/08/06 03:24:19 jaredy Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd June 22, 1998
|
||||
.Dt STRLCPY 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm strlcpy ,
|
||||
.Nm strlcat
|
||||
.Nd size-bounded string copying and concatenation
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <string.h>
|
||||
.Ft size_t
|
||||
.Fn strlcpy "char *dst" "const char *src" "size_t size"
|
||||
.Ft size_t
|
||||
.Fn strlcat "char *dst" "const char *src" "size_t size"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat
|
||||
functions copy and concatenate strings respectively.
|
||||
They are designed
|
||||
to be safer, more consistent, and less error prone replacements for
|
||||
.Xr strncpy 3
|
||||
and
|
||||
.Xr strncat 3 .
|
||||
Unlike those functions,
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat
|
||||
take the full size of the buffer (not just the length) and guarantee to
|
||||
NUL-terminate the result (as long as
|
||||
.Fa size
|
||||
is larger than 0 or, in the case of
|
||||
.Fn strlcat ,
|
||||
as long as there is at least one byte free in
|
||||
.Fa dst ) .
|
||||
Note that a byte for the NUL should be included in
|
||||
.Fa size .
|
||||
Also note that
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat
|
||||
only operate on true
|
||||
.Dq C
|
||||
strings.
|
||||
This means that for
|
||||
.Fn strlcpy
|
||||
.Fa src
|
||||
must be NUL-terminated and for
|
||||
.Fn strlcat
|
||||
both
|
||||
.Fa src
|
||||
and
|
||||
.Fa dst
|
||||
must be NUL-terminated.
|
||||
.Pp
|
||||
The
|
||||
.Fn strlcpy
|
||||
function copies up to
|
||||
.Fa size
|
||||
- 1 characters from the NUL-terminated string
|
||||
.Fa src
|
||||
to
|
||||
.Fa dst ,
|
||||
NUL-terminating the result.
|
||||
.Pp
|
||||
The
|
||||
.Fn strlcat
|
||||
function appends the NUL-terminated string
|
||||
.Fa src
|
||||
to the end of
|
||||
.Fa dst .
|
||||
It will append at most
|
||||
.Fa size
|
||||
- strlen(dst) - 1 bytes, NUL-terminating the result.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat
|
||||
functions return the total length of the string they tried to create.
|
||||
For
|
||||
.Fn strlcpy
|
||||
that means the length of
|
||||
.Fa src .
|
||||
For
|
||||
.Fn strlcat
|
||||
that means the initial length of
|
||||
.Fa dst
|
||||
plus
|
||||
the length of
|
||||
.Fa src .
|
||||
While this may seem somewhat confusing, it was done to make
|
||||
truncation detection simple.
|
||||
.Pp
|
||||
Note, however, that if
|
||||
.Fn strlcat
|
||||
traverses
|
||||
.Fa size
|
||||
characters without finding a NUL, the length of the string is considered
|
||||
to be
|
||||
.Fa size
|
||||
and the destination string will not be NUL-terminated (since there was
|
||||
no space for the NUL).
|
||||
This keeps
|
||||
.Fn strlcat
|
||||
from running off the end of a string.
|
||||
In practice this should not happen (as it means that either
|
||||
.Fa size
|
||||
is incorrect or that
|
||||
.Fa dst
|
||||
is not a proper
|
||||
.Dq C
|
||||
string).
|
||||
The check exists to prevent potential security problems in incorrect code.
|
||||
.Sh EXAMPLES
|
||||
The following code fragment illustrates the simple case:
|
||||
.Bd -literal -offset indent
|
||||
char *s, *p, buf[BUFSIZ];
|
||||
|
||||
\&...
|
||||
|
||||
(void)strlcpy(buf, s, sizeof(buf));
|
||||
(void)strlcat(buf, p, sizeof(buf));
|
||||
.Ed
|
||||
.Pp
|
||||
To detect truncation, perhaps while building a pathname, something
|
||||
like the following might be used:
|
||||
.Bd -literal -offset indent
|
||||
char *dir, *file, pname[MAXPATHLEN];
|
||||
|
||||
\&...
|
||||
|
||||
if (strlcpy(pname, dir, sizeof(pname)) >= sizeof(pname))
|
||||
goto toolong;
|
||||
if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname))
|
||||
goto toolong;
|
||||
.Ed
|
||||
.Pp
|
||||
Since it is known how many characters were copied the first time, things
|
||||
can be sped up a bit by using a copy instead of an append:
|
||||
.Bd -literal -offset indent
|
||||
char *dir, *file, pname[MAXPATHLEN];
|
||||
size_t n;
|
||||
|
||||
\&...
|
||||
|
||||
n = strlcpy(pname, dir, sizeof(pname));
|
||||
if (n >= sizeof(pname))
|
||||
goto toolong;
|
||||
if (strlcpy(pname + n, file, sizeof(pname) - n) >= sizeof(pname) - n)
|
||||
goto toolong;
|
||||
.Ed
|
||||
.Pp
|
||||
However, one may question the validity of such optimizations, as they
|
||||
defeat the whole purpose of
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat .
|
||||
As a matter of fact, the first version of this manual page got it wrong.
|
||||
.Sh SEE ALSO
|
||||
.Xr snprintf 3 ,
|
||||
.Xr strncat 3 ,
|
||||
.Xr strncpy 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn strlcpy
|
||||
and
|
||||
.Fn strlcat
|
||||
functions first appeared in
|
||||
.Ox 2.4 .
|
||||
57
tools/vispatch-1.4.6/source/strlcpy.c
Normal file
57
tools/vispatch-1.4.6/source/strlcpy.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "arch_def.h"
|
||||
#include "strl_fn.h"
|
||||
|
||||
/*
|
||||
* Copy src to string dst of size siz. At most siz-1 characters
|
||||
* will be copied. Always NUL terminates (unless siz == 0).
|
||||
* Returns strlen(src); if retval >= siz, truncation occurred.
|
||||
*/
|
||||
#if !HAVE_STRLCPY
|
||||
size_t
|
||||
q_strlcpy (char *dst, const char *src, size_t siz)
|
||||
{
|
||||
char *d = dst;
|
||||
const char *s = src;
|
||||
size_t n = siz;
|
||||
|
||||
/* Copy as many bytes as will fit */
|
||||
if (n != 0) {
|
||||
while (--n != 0) {
|
||||
if ((*d++ = *s++) == '\0')
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Not enough room in dst, add NUL and traverse rest of src */
|
||||
if (n == 0) {
|
||||
if (siz != 0)
|
||||
*d = '\0'; /* NUL-terminate dst */
|
||||
while (*s++)
|
||||
;
|
||||
}
|
||||
|
||||
return(s - src - 1); /* count does not include NUL */
|
||||
}
|
||||
#endif
|
||||
|
||||
529
tools/vispatch-1.4.6/source/utilslib.c
Normal file
529
tools/vispatch-1.4.6/source/utilslib.c
Normal file
@@ -0,0 +1,529 @@
|
||||
/*
|
||||
* VisPatch : Quake level patcher for water visibility.
|
||||
*
|
||||
* Copyright (C) 1996-1997 Id Software, Inc.
|
||||
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
|
||||
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
|
||||
*
|
||||
* $Id: utilslib.c,v 1.13 2011/10/08 12:33:03 sezero Exp $
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "arch_def.h"
|
||||
#include "compiler.h"
|
||||
#include "q_stdinc.h"
|
||||
#include "q_endian.h"
|
||||
#include <sys/stat.h>
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
#if defined(PLATFORM_DOS)
|
||||
#include <unistd.h>
|
||||
#include <dos.h>
|
||||
#include <io.h>
|
||||
#include <dir.h>
|
||||
#include <fcntl.h>
|
||||
#endif /* PLATFORM_DOS */
|
||||
#if defined(PLATFORM_UNIX)
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <fnmatch.h>
|
||||
#endif /* PLATFORM_UNIX */
|
||||
#include <ctype.h>
|
||||
#include "utilslib.h"
|
||||
|
||||
/*============================================================================*/
|
||||
|
||||
#if defined(__DJGPP__) && \
|
||||
(!defined(__DJGPP_MINOR__) || __DJGPP_MINOR__ < 4)
|
||||
/* DJGPP < v2.04 doesn't have [v]snprintf(). */
|
||||
/* to ensure a proper version check, include stdio.h
|
||||
* or go32.h which includes sys/version.h since djgpp
|
||||
* versions >= 2.02 and defines __DJGPP_MINOR__ */
|
||||
#include "djlib/vsnprntf.c"
|
||||
#endif /* __DJGPP_MINOR__ < 4 */
|
||||
|
||||
int q_vsnprintf(char *str, size_t size, const char *format, va_list args)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = vsnprintf_func (str, size, format, args);
|
||||
|
||||
if (ret < 0)
|
||||
ret = (int)size;
|
||||
|
||||
if ((size_t)ret >= size)
|
||||
str[size - 1] = '\0';
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int q_snprintf (char *str, size_t size, const char *format, ...)
|
||||
{
|
||||
int ret;
|
||||
va_list argptr;
|
||||
|
||||
va_start (argptr, format);
|
||||
ret = q_vsnprintf (str, size, format, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *q_strlwr (char *str)
|
||||
{
|
||||
char *c;
|
||||
c = str;
|
||||
while (*c)
|
||||
{
|
||||
*c = tolower(*c);
|
||||
c++;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
char *q_strrev (char *str)
|
||||
{
|
||||
char a, *b, *e;
|
||||
|
||||
b = e = str;
|
||||
|
||||
while (*e++)
|
||||
;
|
||||
e -= 2;
|
||||
|
||||
while ( b < e )
|
||||
{
|
||||
a = *b;
|
||||
*b = *e;
|
||||
*e = a;
|
||||
b++;
|
||||
e--;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/*============================================================================*/
|
||||
|
||||
void Error (const char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
fprintf (stderr, "*** ERROR: ***\n");
|
||||
va_start (argptr, error);
|
||||
vfprintf (stderr, error, argptr);
|
||||
va_end (argptr);
|
||||
fprintf (stderr, "\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/*============================================================================*/
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
|
||||
static HANDLE findhandle = INVALID_HANDLE_VALUE;
|
||||
static WIN32_FIND_DATA finddata;
|
||||
|
||||
char *Sys_FindFirstFile (const char *path, const char *pattern)
|
||||
{
|
||||
char tmp_buf[256];
|
||||
if (findhandle != INVALID_HANDLE_VALUE)
|
||||
Error ("Sys_FindFirst without FindClose");
|
||||
q_snprintf (tmp_buf, sizeof(tmp_buf), "%s/%s", path, pattern);
|
||||
findhandle = FindFirstFile(tmp_buf, &finddata);
|
||||
if (findhandle == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
return Sys_FindNextFile();
|
||||
return finddata.cFileName;
|
||||
}
|
||||
|
||||
char *Sys_FindNextFile (void)
|
||||
{
|
||||
if (findhandle == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
while (FindNextFile(findhandle, &finddata) != 0)
|
||||
{
|
||||
if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
return finddata.cFileName;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Sys_FindClose (void)
|
||||
{
|
||||
if (findhandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FindClose(findhandle);
|
||||
findhandle = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
int Sys_filesize (const char *filename)
|
||||
{
|
||||
HANDLE fh;
|
||||
WIN32_FIND_DATA data;
|
||||
int size;
|
||||
|
||||
fh = FindFirstFile(filename, &data);
|
||||
if (fh == INVALID_HANDLE_VALUE)
|
||||
return -1;
|
||||
FindClose(fh);
|
||||
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
return -1;
|
||||
// we're not dealing with gigabytes of files.
|
||||
// size should normally smaller than INT_MAX.
|
||||
// size = (data.nFileSizeHigh * (MAXDWORD + 1)) + data.nFileSizeLow;
|
||||
size = (int) data.nFileSizeLow;
|
||||
return size;
|
||||
}
|
||||
|
||||
int Sys_getcwd (char *buf, size_t size)
|
||||
{
|
||||
if (_getcwd(buf, size) == NULL)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
#if defined(PLATFORM_DOS)
|
||||
|
||||
static struct ffblk finddata;
|
||||
static int findhandle = -1;
|
||||
|
||||
char *Sys_FindFirstFile (const char *path, const char *pattern)
|
||||
{
|
||||
char tmp_buf[256];
|
||||
|
||||
if (findhandle == 0)
|
||||
Error ("Sys_FindFirst without FindClose");
|
||||
|
||||
q_snprintf (tmp_buf, sizeof(tmp_buf), "%s/%s", path, pattern);
|
||||
memset (&finddata, 0, sizeof(finddata));
|
||||
|
||||
findhandle = findfirst(tmp_buf, &finddata, FA_ARCH | FA_RDONLY);
|
||||
if (findhandle == 0)
|
||||
return finddata.ff_name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *Sys_FindNextFile (void)
|
||||
{
|
||||
if (findhandle != 0)
|
||||
return NULL;
|
||||
|
||||
if (findnext(&finddata) == 0)
|
||||
return finddata.ff_name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Sys_FindClose (void)
|
||||
{
|
||||
findhandle = -1;
|
||||
}
|
||||
|
||||
int Sys_filesize (const char *filename)
|
||||
{
|
||||
struct ffblk f;
|
||||
|
||||
if (findfirst(filename, &f, FA_ARCH | FA_RDONLY) != 0)
|
||||
return -1;
|
||||
|
||||
return (int) f.ff_fsize;
|
||||
}
|
||||
|
||||
int Sys_getcwd (char *buf, size_t size)
|
||||
{
|
||||
if (getcwd(buf, size) == NULL)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* PLATFORM_DOS */
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
#if defined(PLATFORM_UNIX)
|
||||
|
||||
static DIR *finddir;
|
||||
static struct dirent *finddata;
|
||||
static char *findpath, *findpattern;
|
||||
static char matchpath[256];
|
||||
|
||||
char *Sys_FindFirstFile (const char *path, const char *pattern)
|
||||
{
|
||||
if (finddir)
|
||||
Error ("Sys_FindFirst without FindClose");
|
||||
|
||||
finddir = opendir (path);
|
||||
if (!finddir)
|
||||
return NULL;
|
||||
|
||||
findpattern = strdup (pattern);
|
||||
if (!findpattern)
|
||||
{
|
||||
Sys_FindClose();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
findpath = strdup (path);
|
||||
if (!findpath)
|
||||
{
|
||||
Sys_FindClose();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (*findpath != '\0')
|
||||
{
|
||||
/* searching under "/" won't be a good idea, for example.. */
|
||||
size_t siz = strlen(findpath) - 1;
|
||||
if (findpath[siz] == '/' || findpath[siz] == '\\')
|
||||
findpath[siz] = '\0';
|
||||
}
|
||||
|
||||
return Sys_FindNextFile();
|
||||
}
|
||||
|
||||
char *Sys_FindNextFile (void)
|
||||
{
|
||||
struct stat test;
|
||||
|
||||
if (!finddir)
|
||||
return NULL;
|
||||
|
||||
while ((finddata = readdir(finddir)) != NULL)
|
||||
{
|
||||
if (!fnmatch (findpattern, finddata->d_name, FNM_PATHNAME))
|
||||
{
|
||||
q_snprintf(matchpath, sizeof(matchpath), "%s/%s", findpath, finddata->d_name);
|
||||
if ( (stat(matchpath, &test) == 0)
|
||||
&& S_ISREG(test.st_mode))
|
||||
return finddata->d_name;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Sys_FindClose (void)
|
||||
{
|
||||
if (finddir != NULL)
|
||||
{
|
||||
closedir(finddir);
|
||||
finddir = NULL;
|
||||
}
|
||||
if (findpath != NULL)
|
||||
{
|
||||
free (findpath);
|
||||
findpath = NULL;
|
||||
}
|
||||
if (findpattern != NULL)
|
||||
{
|
||||
free (findpattern);
|
||||
findpattern = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int Sys_filesize (const char *filename)
|
||||
{
|
||||
struct stat status;
|
||||
|
||||
if (stat(filename, &status) == -1)
|
||||
return -1;
|
||||
if (! S_ISREG(status.st_mode))
|
||||
return -1;
|
||||
|
||||
return (int) status.st_size;
|
||||
}
|
||||
|
||||
int Sys_getcwd (char *buf, size_t size)
|
||||
{
|
||||
if (getcwd(buf, size) == NULL)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* PLATFORM_UNIX */
|
||||
|
||||
|
||||
/*============================================================================*/
|
||||
|
||||
/*========== BYTE ORDER STUFF ================================================*/
|
||||
|
||||
#if ENDIAN_RUNTIME_DETECT
|
||||
#define __byteswap_func static
|
||||
#else
|
||||
#define __byteswap_func
|
||||
#endif /* ENDIAN_RUNTIME_DETECT */
|
||||
|
||||
#if ENDIAN_RUNTIME_DETECT
|
||||
/*
|
||||
# warning "Byte order will be detected at runtime"
|
||||
*/
|
||||
#elif defined(ENDIAN_ASSUMED_UNSAFE)
|
||||
# warning "Cannot determine byte order:"
|
||||
# if (ENDIAN_ASSUMED_UNSAFE == LITTLE_ENDIAN)
|
||||
# warning "Using LIL endian as an UNSAFE default."
|
||||
# elif (ENDIAN_ASSUMED_UNSAFE == BIG_ENDIAN)
|
||||
# warning "Using BIG endian as an UNSAFE default."
|
||||
# endif
|
||||
# warning "Revise the macros in q_endian.h for this"
|
||||
# warning "machine or use runtime detection !!!"
|
||||
#endif /* ENDIAN_ASSUMED_UNSAFE */
|
||||
|
||||
|
||||
int host_byteorder;
|
||||
int host_bigendian; /* bool */
|
||||
|
||||
int DetectByteorder (void)
|
||||
{
|
||||
int i = 0x12345678;
|
||||
/* U N I X */
|
||||
|
||||
/*
|
||||
BE_ORDER: 12 34 56 78
|
||||
U N I X
|
||||
|
||||
LE_ORDER: 78 56 34 12
|
||||
X I N U
|
||||
|
||||
PDP_ORDER: 34 12 78 56
|
||||
N U X I
|
||||
*/
|
||||
|
||||
if ( *(char *)&i == 0x12 )
|
||||
return BIG_ENDIAN;
|
||||
else if ( *(char *)&i == 0x78 )
|
||||
return LITTLE_ENDIAN;
|
||||
else if ( *(char *)&i == 0x34 )
|
||||
return PDP_ENDIAN;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
__byteswap_func
|
||||
int LongSwap (int l)
|
||||
{
|
||||
unsigned char b1, b2, b3, b4;
|
||||
|
||||
b1 = l & 255;
|
||||
b2 = (l>>8 ) & 255;
|
||||
b3 = (l>>16) & 255;
|
||||
b4 = (l>>24) & 255;
|
||||
|
||||
return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
|
||||
}
|
||||
|
||||
#if ENDIAN_RUNTIME_DETECT
|
||||
|
||||
__byteswap_func
|
||||
int LongNoSwap (int l)
|
||||
{
|
||||
return l;
|
||||
}
|
||||
|
||||
int (*BigLong) (int);
|
||||
int (*LittleLong) (int);
|
||||
|
||||
#endif /* ENDIAN_RUNTIME_DETECT */
|
||||
|
||||
void ByteOrder_Init (void)
|
||||
{
|
||||
host_byteorder = DetectByteorder ();
|
||||
host_bigendian = (host_byteorder == BIG_ENDIAN);
|
||||
|
||||
#if ENDIAN_RUNTIME_DETECT
|
||||
switch (host_byteorder)
|
||||
{
|
||||
case BIG_ENDIAN:
|
||||
BigLong = LongNoSwap;
|
||||
LittleLong = LongSwap;
|
||||
break;
|
||||
|
||||
case LITTLE_ENDIAN:
|
||||
BigLong = LongSwap;
|
||||
LittleLong = LongNoSwap;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif /* ENDIAN_RUNTIME_DETECT */
|
||||
}
|
||||
|
||||
void ValidateByteorder (void)
|
||||
{
|
||||
const char *endianism[] = { "BE", "LE", "PDP", "Unknown" };
|
||||
int i;
|
||||
|
||||
ByteOrder_Init ();
|
||||
switch (host_byteorder)
|
||||
{
|
||||
case BIG_ENDIAN:
|
||||
i = 0; break;
|
||||
case LITTLE_ENDIAN:
|
||||
i = 1; break;
|
||||
case PDP_ENDIAN:
|
||||
host_byteorder = -1; /* not supported */
|
||||
i = 2; break;
|
||||
default:
|
||||
i = 3; break;
|
||||
}
|
||||
if (host_byteorder < 0)
|
||||
Error ("Unsupported byte order.");
|
||||
/*
|
||||
printf("Detected byte order: %s\n", endianism[i]);
|
||||
*/
|
||||
#if !ENDIAN_RUNTIME_DETECT
|
||||
if (host_byteorder != BYTE_ORDER)
|
||||
{
|
||||
int j;
|
||||
|
||||
switch (BYTE_ORDER)
|
||||
{
|
||||
case BIG_ENDIAN:
|
||||
j = 0; break;
|
||||
case LITTLE_ENDIAN:
|
||||
j = 1; break;
|
||||
case PDP_ENDIAN:
|
||||
j = 2; break;
|
||||
default:
|
||||
j = 3; break;
|
||||
}
|
||||
Error ("Detected byte order %s doesn't match compiled %s order!",
|
||||
endianism[i], endianism[j]);
|
||||
}
|
||||
#endif /* ENDIAN_RUNTIME_DETECT */
|
||||
}
|
||||
|
||||
92
tools/vispatch-1.4.6/source/utilslib.h
Normal file
92
tools/vispatch-1.4.6/source/utilslib.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* VisPatch : Quake level patcher for water visibility.
|
||||
*
|
||||
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
|
||||
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
|
||||
*
|
||||
* $Id: utilslib.h,v 1.4 2011/10/08 12:33:03 sezero Exp $
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __QLIBUTILS_H
|
||||
#define __QLIBUTILS_H
|
||||
|
||||
#if defined(PLATFORM_WINDOWS) && !defined(F_OK)
|
||||
// values for the mode argument of access(). MS does not define them
|
||||
#define R_OK 4 /* Test for read permission. */
|
||||
#define W_OK 2 /* Test for write permission. */
|
||||
#define X_OK 1 /* Test for execute permission. */
|
||||
#define F_OK 0 /* Test for existence. */
|
||||
#endif
|
||||
|
||||
/* strlcpy and strlcat : */
|
||||
#include "strl_fn.h"
|
||||
|
||||
#if HAVE_STRLCAT && HAVE_STRLCPY
|
||||
/* use native library functions */
|
||||
#define q_strlcat strlcat
|
||||
#define q_strlcpy strlcpy
|
||||
#else
|
||||
/* use our own copies of strlcpy and strlcat taken from OpenBSD */
|
||||
extern size_t q_strlcpy (char *dst, const char *src, size_t size);
|
||||
extern size_t q_strlcat (char *dst, const char *src, size_t size);
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
#define q_strcasecmp _stricmp
|
||||
#define q_strncasecmp _strnicmp
|
||||
#else
|
||||
#define q_strcasecmp strcasecmp
|
||||
#define q_strncasecmp strncasecmp
|
||||
#endif
|
||||
|
||||
/* snprintf, vsnprintf : always use our versions. */
|
||||
/* platform dependant (v)snprintf function names: */
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
#define snprintf_func _snprintf
|
||||
#define vsnprintf_func _vsnprintf
|
||||
#else
|
||||
#define snprintf_func snprintf
|
||||
#define vsnprintf_func vsnprintf
|
||||
#endif
|
||||
|
||||
extern int q_snprintf (char *str, size_t size, const char *format, ...) __attribute__((__format__(__printf__,3,4)));
|
||||
extern int q_vsnprintf(char *str, size_t size, const char *format, va_list args)
|
||||
__attribute__((__format__(__printf__,3,0)));
|
||||
|
||||
extern char *q_strlwr (char *str);
|
||||
extern char *q_strupr (char *str);
|
||||
extern char *q_strrev (char *str);
|
||||
|
||||
extern int Sys_getcwd (char *buf, size_t size);
|
||||
extern int Sys_filesize (const char *filename);
|
||||
|
||||
/* simplified findfirst/findnext implementation */
|
||||
extern char *Sys_FindFirstFile (const char *path, const char *pattern);
|
||||
extern char *Sys_FindNextFile (void);
|
||||
extern void Sys_FindClose (void);
|
||||
|
||||
extern void Error (const char *error, ...) __attribute__((__format__(__printf__,1,2), __noreturn__));
|
||||
|
||||
extern void ValidateByteorder (void); /* call this from your main() */
|
||||
|
||||
#endif /* __QLIBUTILS_H */
|
||||
|
||||
1077
tools/vispatch-1.4.6/source/vispatch.c
Normal file
1077
tools/vispatch-1.4.6/source/vispatch.c
Normal file
File diff suppressed because it is too large
Load Diff
12
tools/vispatch-1.4.6/source/vispatch.exe.manifest
Normal file
12
tools/vispatch-1.4.6/source/vispatch.exe.manifest
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="vispatch.exe" type="win32"/>
|
||||
<description>A WaterVIS utility for glquake</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
112
tools/vispatch-1.4.6/source/vispatch.h
Normal file
112
tools/vispatch-1.4.6/source/vispatch.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* VisPatch : Quake level patcher for water visibility.
|
||||
*
|
||||
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
|
||||
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
|
||||
*
|
||||
* $Id: vispatch.h,v 1.6 2011/10/08 14:15:02 sezero Exp $
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __QVISPATCH_H
|
||||
#define __QVISPATCH_H
|
||||
|
||||
/* Version numbers */
|
||||
#define VP_VER_MAJ 1
|
||||
#define VP_VER_MID 4
|
||||
#define VP_VER_MIN 6
|
||||
|
||||
/* NOTE: We actually need int32_t, not int, as the types
|
||||
for sizes and offsets. If someone ever wants to compile
|
||||
this on a 16 bit system like DOS, expect trouble if
|
||||
the compiler is not djgpp.
|
||||
*/
|
||||
|
||||
// on-disk bsp file structures
|
||||
|
||||
typedef struct // A Directory entry
|
||||
{ int offset; // Offset to entry, in bytes, from start of file
|
||||
int size; // Size of entry in file, in bytes
|
||||
} dentry_t;
|
||||
|
||||
typedef struct // The BSP file header
|
||||
{ int version; // Model version, must be 0x17 (23).
|
||||
dentry_t entities; // List of Entities.
|
||||
dentry_t planes; // Map Planes.
|
||||
// numplanes = size/sizeof(plane_t)
|
||||
dentry_t miptex; // Wall Textures.
|
||||
dentry_t vertices; // Map Vertices.
|
||||
// numvertices = size/sizeof(vertex_t)
|
||||
dentry_t visilist; // Leaves Visibility lists.
|
||||
dentry_t nodes; // BSP Nodes.
|
||||
// numnodes = size/sizeof(node_t)
|
||||
dentry_t texinfo; // Texture Info for faces.
|
||||
// numtexinfo = size/sizeof(texinfo_t)
|
||||
dentry_t faces; // Faces of each surface.
|
||||
// numfaces = size/sizeof(face_t)
|
||||
dentry_t lightmaps; // Wall Light Maps.
|
||||
dentry_t clipnodes; // clip nodes, for Models.
|
||||
// numclips = size/sizeof(clipnode_t)
|
||||
dentry_t leaves; // BSP Leaves.
|
||||
// numlaves = size/sizeof(leaf_t)
|
||||
dentry_t lface; // List of Faces.
|
||||
dentry_t edges; // Edges of faces.
|
||||
// numedges = Size/sizeof(edge_t)
|
||||
dentry_t ledges; // List of Edges.
|
||||
dentry_t models; // List of Models.
|
||||
// nummodels = Size/sizeof(model_t)
|
||||
} dheader_t;
|
||||
|
||||
|
||||
// on-disk pak file structures
|
||||
|
||||
#define MAX_FILES_IN_PACK 2048
|
||||
|
||||
typedef struct
|
||||
{ char magic[4]; // Pak Name of the new WAD format
|
||||
int diroffset; // Position of WAD directory from start of file
|
||||
int dirsize; // Number of entries * 0x40 (64 char)
|
||||
} pakheader_t;
|
||||
|
||||
typedef struct
|
||||
{ char filename[56]; // Name of the file, Unix style, with extension,
|
||||
// 50 chars, padded with '\0'.
|
||||
int offset; // Position of the entry in PACK file
|
||||
int size; // Size of the entry in PACK file
|
||||
} pakentry_t;
|
||||
|
||||
|
||||
// on-disk vis data structure: stored in little endian format
|
||||
|
||||
#define VISPATCH_IDLEN 32
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char File[VISPATCH_IDLEN];
|
||||
int len;
|
||||
int vislen;
|
||||
unsigned char *visdata;
|
||||
int leaflen;
|
||||
unsigned char *leafdata;
|
||||
} visdat_t;
|
||||
|
||||
|
||||
#endif /* __QVISPATCH_H */
|
||||
|
||||
2
tools/vispatch-1.4.6/source/vispatch.rc
Normal file
2
tools/vispatch-1.4.6/source/vispatch.rc
Normal file
@@ -0,0 +1,2 @@
|
||||
#include <winuser.h>
|
||||
1 RT_MANIFEST "vispatch.exe.manifest"
|
||||
121
tools/vispatch-1.4.6/source/vispatch.txt
Normal file
121
tools/vispatch-1.4.6/source/vispatch.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
|
||||
VisPatch, version 1.4.6
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
A WaterVIS utility for glquake
|
||||
|
||||
http://vispatch.sourceforge.net/
|
||||
http://sourceforge.net/projects/vispatch/
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
VisPatch is a tool for patching quake maps for transparent water
|
||||
in glquake. Original quake didn't have their maps water-vis'ed,
|
||||
so people did that by themselves and prepared patch data files.
|
||||
This tool is used for preparing and applying those patch files.
|
||||
|
||||
At the time this tool was written, re-vis'ing maps took a lot of
|
||||
time, but applying a vispatch took less than minutes, so this was
|
||||
a necessity. Even today, if people don't want going into a
|
||||
'complex' job of vising, this tool comes as a great convenience
|
||||
because there are a lot of vispatch data files around.
|
||||
|
||||
This is a revised version of Andy Bay's 1.2a source code for unix
|
||||
(linux, freebsd, ...), as well as windows. It fixes a number of
|
||||
compilation issues, crashes and some other bugs, and adds support
|
||||
for big endian systems. The source code is licensed under GPLv2,
|
||||
and is maintained here with portability in mind.
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Links :
|
||||
|
||||
Homepage of Andy Bay, the original author:
|
||||
http://www.imarvintpa.com/
|
||||
|
||||
The (latest) website for WaterVIS:
|
||||
http://www.inside3d.com/qip/vispatch/
|
||||
|
||||
The patch data file downloads:
|
||||
http://www.inside3d.com/qip/vispatch/files.htm
|
||||
3ddownloads mirror:
|
||||
http://www.atomicgamer.com/directory.php?id=3138
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Usage: vispatch <file> [arguments]
|
||||
|
||||
<file> : Level filename pattern, bsp or pak type, wildcards
|
||||
are allowed, relative paths not allowed. See the
|
||||
examples.
|
||||
|
||||
-dir : Specify the directory that the level files are in.
|
||||
|
||||
-data : Specify the vis data file. Wildcards are not allowed.
|
||||
|
||||
-new : Tells the program not to overwrite the original level
|
||||
files. In case of pak files, the patched the levels
|
||||
will be put into a new pak file. In case of standalone
|
||||
maps files, the original maps are renamed to name.bak,
|
||||
and the patched ones are saved as name.bsp .
|
||||
Can not be used in combination with -extract.
|
||||
|
||||
-extract: Retrieve all the vis data from the given file.
|
||||
Can not be used in combination with -new.
|
||||
|
||||
IMPORTANT: All files must be of lowercase names for vispatch to
|
||||
find and work with them.
|
||||
|
||||
Examples:
|
||||
|
||||
vispatch map25.bsp
|
||||
Patch and overwrite map25.bsp using vis data from the default
|
||||
data file vispatch.dat
|
||||
|
||||
vispatch map25.bsp -data map25.vis
|
||||
Use map25.vis as the data file instead of vispatch.dat
|
||||
|
||||
vispatch -dir hipnotic -data hipnotic.vis
|
||||
Patch levels in pak files under the directory named hipnotic,
|
||||
using hipnotic.vis as the data.
|
||||
|
||||
vispatch "*.bsp" -dir hipnotic -data hipnotic.vis
|
||||
Patch bsp levels NOT residing in pak files under the directory
|
||||
named hipnotic, using hipnotic.vis as the data.
|
||||
|
||||
vispatch somefile.bsp -extract
|
||||
Retrieve all vis data from somefile.bsp and put it into a file
|
||||
named vispatch.dat (If you don't backup any previous one, it
|
||||
will append the data into it!)
|
||||
|
||||
vispatch somefile.bsp -data some.dat -extract
|
||||
Retrieve all vis data from the somefile.bsp and dump it into
|
||||
a file named some.dat instead of vispatch.dat
|
||||
|
||||
vispatch "*.bsp" -data some.dat -extract
|
||||
Retrieve all vis data from all bsp level files and put them
|
||||
into the file some.dat
|
||||
|
||||
vispatch -dir hipnotic -extract
|
||||
Retrieve all vis data from the levels residing in pak files in
|
||||
the directory hipnotic, and put them into vispatch.dat
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
COPYRIGHT
|
||||
|
||||
Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
|
||||
Copyright (C) 2006-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
VisPatch 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, or (at your
|
||||
option) any later version. See the accompanying COPYING file for
|
||||
details.
|
||||
|
||||
$Id: vispatch.txt,v 1.9 2011/10/08 14:15:02 sezero Exp $
|
||||
|
||||
121
tools/vispatch-1.4.6/vispatch.txt
Normal file
121
tools/vispatch-1.4.6/vispatch.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
|
||||
VisPatch, version 1.4.6
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
A WaterVIS utility for glquake
|
||||
|
||||
http://vispatch.sourceforge.net/
|
||||
http://sourceforge.net/projects/vispatch/
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
VisPatch is a tool for patching quake maps for transparent water
|
||||
in glquake. Original quake didn't have their maps water-vis'ed,
|
||||
so people did that by themselves and prepared patch data files.
|
||||
This tool is used for preparing and applying those patch files.
|
||||
|
||||
At the time this tool was written, re-vis'ing maps took a lot of
|
||||
time, but applying a vispatch took less than minutes, so this was
|
||||
a necessity. Even today, if people don't want going into a
|
||||
'complex' job of vising, this tool comes as a great convenience
|
||||
because there are a lot of vispatch data files around.
|
||||
|
||||
This is a revised version of Andy Bay's 1.2a source code for unix
|
||||
(linux, freebsd, ...), as well as windows. It fixes a number of
|
||||
compilation issues, crashes and some other bugs, and adds support
|
||||
for big endian systems. The source code is licensed under GPLv2,
|
||||
and is maintained here with portability in mind.
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Links :
|
||||
|
||||
Homepage of Andy Bay, the original author:
|
||||
http://www.imarvintpa.com/
|
||||
|
||||
The (latest) website for WaterVIS:
|
||||
http://www.inside3d.com/qip/vispatch/
|
||||
|
||||
The patch data file downloads:
|
||||
http://www.inside3d.com/qip/vispatch/files.htm
|
||||
3ddownloads mirror:
|
||||
http://www.atomicgamer.com/directory.php?id=3138
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Usage: vispatch <file> [arguments]
|
||||
|
||||
<file> : Level filename pattern, bsp or pak type, wildcards
|
||||
are allowed, relative paths not allowed. See the
|
||||
examples.
|
||||
|
||||
-dir : Specify the directory that the level files are in.
|
||||
|
||||
-data : Specify the vis data file. Wildcards are not allowed.
|
||||
|
||||
-new : Tells the program not to overwrite the original level
|
||||
files. In case of pak files, the patched the levels
|
||||
will be put into a new pak file. In case of standalone
|
||||
maps files, the original maps are renamed to name.bak,
|
||||
and the patched ones are saved as name.bsp .
|
||||
Can not be used in combination with -extract.
|
||||
|
||||
-extract: Retrieve all the vis data from the given file.
|
||||
Can not be used in combination with -new.
|
||||
|
||||
IMPORTANT: All files must be of lowercase names for vispatch to
|
||||
find and work with them.
|
||||
|
||||
Examples:
|
||||
|
||||
vispatch map25.bsp
|
||||
Patch and overwrite map25.bsp using vis data from the default
|
||||
data file vispatch.dat
|
||||
|
||||
vispatch map25.bsp -data map25.vis
|
||||
Use map25.vis as the data file instead of vispatch.dat
|
||||
|
||||
vispatch -dir hipnotic -data hipnotic.vis
|
||||
Patch levels in pak files under the directory named hipnotic,
|
||||
using hipnotic.vis as the data.
|
||||
|
||||
vispatch "*.bsp" -dir hipnotic -data hipnotic.vis
|
||||
Patch bsp levels NOT residing in pak files under the directory
|
||||
named hipnotic, using hipnotic.vis as the data.
|
||||
|
||||
vispatch somefile.bsp -extract
|
||||
Retrieve all vis data from somefile.bsp and put it into a file
|
||||
named vispatch.dat (If you don't backup any previous one, it
|
||||
will append the data into it!)
|
||||
|
||||
vispatch somefile.bsp -data some.dat -extract
|
||||
Retrieve all vis data from the somefile.bsp and dump it into
|
||||
a file named some.dat instead of vispatch.dat
|
||||
|
||||
vispatch "*.bsp" -data some.dat -extract
|
||||
Retrieve all vis data from all bsp level files and put them
|
||||
into the file some.dat
|
||||
|
||||
vispatch -dir hipnotic -extract
|
||||
Retrieve all vis data from the levels residing in pak files in
|
||||
the directory hipnotic, and put them into vispatch.dat
|
||||
|
||||
|
||||
-----------------------------------------------------------------
|
||||
|
||||
COPYRIGHT
|
||||
|
||||
Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
|
||||
Copyright (C) 2006-2011 O.Sezer <sezero@users.sourceforge.net>
|
||||
|
||||
VisPatch 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, or (at your
|
||||
option) any later version. See the accompanying COPYING file for
|
||||
details.
|
||||
|
||||
$Id: vispatch.txt,v 1.9 2011/10/08 14:15:02 sezero Exp $
|
||||
|
||||
Reference in New Issue
Block a user