mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 11:30:37 +00:00
(Automated push) Update internal/source/* from qb64.bas
This commit is contained in:
commit
f5285a1a61
106
LICENSE/COPYING.TXT
Normal file
106
LICENSE/COPYING.TXT
Normal file
|
@ -0,0 +1,106 @@
|
|||
=== IMPORTANT LICENSING NOTE FOR QB64 PROGRAMMERS ===
|
||||
All executables created with QB64 are subject to the LGPL licence conditions.
|
||||
All executables which read sound files are subject to the GPL license as well (due to incorporation of libsamplerate).
|
||||
When distributing your program as an executable all license requirements can be met by:
|
||||
i) Making your program's source code (.BAS) available and declaring it to be GPL as well as
|
||||
ii) Including this entire license folder distributed with QB64
|
||||
It should be noted that the above is not the sole method one could use to abide by the license conditions
|
||||
and that creating closed source QB64 programs is possible when LGPL (not GPL) code is dynamically
|
||||
linked to, not embedded within your executable.
|
||||
=====================================================
|
||||
|
||||
The license requirements for components of QB64 are as follows:
|
||||
|
||||
Software/Library Name: QB64 (inclusive of all parts of this distribution not covered by separate licence below)
|
||||
Website(s): http://www.qb64.net, http://code.google.com/p/qb64/
|
||||
License: LGPL with static linking of code required for generated programs to run permitted
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
License File: license/lgpl_2_1.txt
|
||||
|
||||
Software/Library Name: MinGW 64
|
||||
Website: http://mingw-w64.sourceforge.net/
|
||||
License: (see below)
|
||||
Each of the various packages, which is distributed by MinGW.org, is governed by its own individual copyright and licensing terms. In summary, for the most commonly deployed packages:
|
||||
MinGW runtime: The MinGW base runtime package has been placed in the public domain, and is not governed by copyright. This basically means that you can do what you like with the code.
|
||||
w32api: You are free to use, modify and copy this package. No restrictions are imposed on programs or object files linked with this library. You may not restrict the the usage of this library. You may distribute this library as part of another package or as a modified package if, and only if, you do not restrict the usage of the portions consisting of this (optionally modified) library. If distributed as a modified package, then a copy of this notice must be included.
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT WARRANTY OF ANY KIND; without even the implied warranties of MERCHANTABILITY or of FITNESS FOR A PARTICULAR PURPOSE.
|
||||
MinGW profiling code: MinGW profiling code is distributed under the terms of the GNU General Public License.
|
||||
Binutils, GCC, GDB, GNU Make: All of the GNU development tools, such as GNU binutils, GCC, GDB and GNU Make, are governed by the terms of the GNU General Public License.
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#GPL
|
||||
License File: license_gnu_gpl_3.txt
|
||||
Location in QB64 distribution: internal/c/c_compiler/
|
||||
|
||||
Software/Library Name: Secret Rabbit Code (libsamplerate)
|
||||
Website: http://www.mega-nerd.com/SRC/
|
||||
License: GPL 2
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#GPL
|
||||
License File: license_gnu_gpl_2.txt
|
||||
Location in QB64 distribution: internal/c/parts/audio/conversion/
|
||||
|
||||
Software/Library Name: mpglibdll
|
||||
Website(s):
|
||||
http://www.rz.uni-frankfurt.de/~pesch
|
||||
http://www.mpg123.de
|
||||
http://www.sulaco.org/mp3
|
||||
License: LGPL 2.1
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
License File: license_gnu_lgpl_2_1.txt
|
||||
Location in QB64 distribution: internal/c/parts/audio/decode/mp3/
|
||||
|
||||
Software/Library Name: Ogg Vorbis I audio decoder version 0.99996
|
||||
Website:http://nothings.org/stb_vorbis/
|
||||
Date:Written in April 2007
|
||||
Author:Sean Barrett, sponsored by RAD Game Tools
|
||||
License: Placed in the public domain April 2007 by the author: no copyright is claimed, and you may use it for any purpose you like.
|
||||
License Website: N/A - public domain
|
||||
License File: license_stbvorbis.txt
|
||||
Location in QB64 distribution: internal/c/parts/audio/decode/ogg/
|
||||
|
||||
Software/Library Name: OpenAL-soft
|
||||
Website:http://kcat.strangesoft.net/openal.html
|
||||
License: LGPL 2
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
License File: license_gnu_lgpl_2.txt
|
||||
Location in QB64 distribution: internal/c/parts/audio/out/
|
||||
|
||||
Software/Library Name: OpenAL-soft
|
||||
Website:http://kcat.strangesoft.net/openal.html
|
||||
License: LGPL 2
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
License File: license_gnu_lgpl_2.txt
|
||||
Location in QB64 distribution: internal/c/parts/audio/out/
|
||||
|
||||
Software/Library Name: FreeGLUT
|
||||
Website: http://freeglut.sourceforge.net/
|
||||
License: LGPL (note: website states LGPL, license file is not a copy of GNU LGPL)
|
||||
License Website: http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
License File: license_freeglut.txt
|
||||
Location in QB64 distribution: internal/c/parts/core/
|
||||
|
||||
Software/Library Name: FreeTYPE
|
||||
Website: http://www.freetype.org/
|
||||
License: GPL or FreeTYPE's FTL (programs must abide by one of these licenses)
|
||||
License Website(s): (see below)
|
||||
http://www.freetype.org/license.html
|
||||
http://www.gnu.org/licenses/licenses.html#GPL
|
||||
License File(s): (see below)
|
||||
license_freetype_ftl.txt
|
||||
license_gnu_gpl_2.txt
|
||||
Location in QB64 distribution: internal/c/parts/video/font/ttf/
|
||||
|
||||
Software/Library Name: NanoJPEG - KeyJ's Tiny Baseline JPEG Decoder
|
||||
Author: Martin J. Fiedler <martin.fiedler@gmx.net>
|
||||
License: (refer to license file)
|
||||
License File: nanojpeg_license.txt
|
||||
Location in QB64 distribution: internal/c/parts/video/image/decode/jpg
|
||||
|
||||
Software/Library Name: NanoJPEG - KeyJ's Tiny Baseline JPEG Decoder
|
||||
Author: Martin J. Fiedler <martin.fiedler@gmx.net>
|
||||
License: (refer to license file)
|
||||
License File: license_nanojpeg.txt
|
||||
Location in QB64 distribution: internal/c/parts/video/image/decode/jpg
|
||||
|
||||
Software/Library Name: LodePNG
|
||||
License: (refer to license file)
|
||||
License File: license_lodepng.txt
|
||||
Location in QB64 distribution: internal/c/parts/video/image/decode/png
|
27
LICENSE/license_freeglut.txt
Normal file
27
LICENSE/license_freeglut.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
Freeglut Copyright
|
||||
------------------
|
||||
|
||||
Freeglut code without an explicit copyright is covered by the following
|
||||
copyright:
|
||||
|
||||
Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Pawel W. Olszta shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Pawel W. Olszta.
|
169
LICENSE/license_freetype_ftl.txt
Normal file
169
LICENSE/license_freetype_ftl.txt
Normal file
|
@ -0,0 +1,169 @@
|
|||
The FreeType Project LICENSE
|
||||
----------------------------
|
||||
|
||||
2006-Jan-27
|
||||
|
||||
Copyright 1996-2002, 2006 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg
|
||||
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
The FreeType Project is distributed in several archive packages;
|
||||
some of them may contain, in addition to the FreeType font engine,
|
||||
various tools and contributions which rely on, or relate to, the
|
||||
FreeType Project.
|
||||
|
||||
This license applies to all files found in such packages, and
|
||||
which do not fall under their own explicit license. The license
|
||||
affects thus the FreeType font engine, the test programs,
|
||||
documentation and makefiles, at the very least.
|
||||
|
||||
This license was inspired by the BSD, Artistic, and IJG
|
||||
(Independent JPEG Group) licenses, which all encourage inclusion
|
||||
and use of free software in commercial and freeware products
|
||||
alike. As a consequence, its main points are that:
|
||||
|
||||
o We don't promise that this software works. However, we will be
|
||||
interested in any kind of bug reports. (`as is' distribution)
|
||||
|
||||
o You can use this software for whatever you want, in parts or
|
||||
full form, without having to pay us. (`royalty-free' usage)
|
||||
|
||||
o You may not pretend that you wrote this software. If you use
|
||||
it, or only parts of it, in a program, you must acknowledge
|
||||
somewhere in your documentation that you have used the
|
||||
FreeType code. (`credits')
|
||||
|
||||
We specifically permit and encourage the inclusion of this
|
||||
software, with or without modifications, in commercial products.
|
||||
We disclaim all warranties covering The FreeType Project and
|
||||
assume no liability related to The FreeType Project.
|
||||
|
||||
|
||||
Finally, many people asked us for a preferred form for a
|
||||
credit/disclaimer to use in compliance with this license. We thus
|
||||
encourage you to use the following text:
|
||||
|
||||
"""
|
||||
Portions of this software are copyright © <year> The FreeType
|
||||
Project (www.freetype.org). All rights reserved.
|
||||
"""
|
||||
|
||||
Please replace <year> with the value from the FreeType version you
|
||||
actually use.
|
||||
|
||||
|
||||
Legal Terms
|
||||
===========
|
||||
|
||||
0. Definitions
|
||||
--------------
|
||||
|
||||
Throughout this license, the terms `package', `FreeType Project',
|
||||
and `FreeType archive' refer to the set of files originally
|
||||
distributed by the authors (David Turner, Robert Wilhelm, and
|
||||
Werner Lemberg) as the `FreeType Project', be they named as alpha,
|
||||
beta or final release.
|
||||
|
||||
`You' refers to the licensee, or person using the project, where
|
||||
`using' is a generic term including compiling the project's source
|
||||
code as well as linking it to form a `program' or `executable'.
|
||||
This program is referred to as `a program using the FreeType
|
||||
engine'.
|
||||
|
||||
This license applies to all files distributed in the original
|
||||
FreeType Project, including all source code, binaries and
|
||||
documentation, unless otherwise stated in the file in its
|
||||
original, unmodified form as distributed in the original archive.
|
||||
If you are unsure whether or not a particular file is covered by
|
||||
this license, you must contact us to verify this.
|
||||
|
||||
The FreeType Project is copyright (C) 1996-2000 by David Turner,
|
||||
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
|
||||
specified below.
|
||||
|
||||
1. No Warranty
|
||||
--------------
|
||||
|
||||
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
|
||||
USE, OF THE FREETYPE PROJECT.
|
||||
|
||||
2. Redistribution
|
||||
-----------------
|
||||
|
||||
This license grants a worldwide, royalty-free, perpetual and
|
||||
irrevocable right and license to use, execute, perform, compile,
|
||||
display, copy, create derivative works of, distribute and
|
||||
sublicense the FreeType Project (in both source and object code
|
||||
forms) and derivative works thereof for any purpose; and to
|
||||
authorize others to exercise some or all of the rights granted
|
||||
herein, subject to the following conditions:
|
||||
|
||||
o Redistribution of source code must retain this license file
|
||||
(`FTL.TXT') unaltered; any additions, deletions or changes to
|
||||
the original files must be clearly indicated in accompanying
|
||||
documentation. The copyright notices of the unaltered,
|
||||
original files must be preserved in all copies of source
|
||||
files.
|
||||
|
||||
o Redistribution in binary form must provide a disclaimer that
|
||||
states that the software is based in part of the work of the
|
||||
FreeType Team, in the distribution documentation. We also
|
||||
encourage you to put an URL to the FreeType web page in your
|
||||
documentation, though this isn't mandatory.
|
||||
|
||||
These conditions apply to any software derived from or based on
|
||||
the FreeType Project, not just the unmodified files. If you use
|
||||
our work, you must acknowledge us. However, no fee need be paid
|
||||
to us.
|
||||
|
||||
3. Advertising
|
||||
--------------
|
||||
|
||||
Neither the FreeType authors and contributors nor you shall use
|
||||
the name of the other for commercial, advertising, or promotional
|
||||
purposes without specific prior written permission.
|
||||
|
||||
We suggest, but do not require, that you use one or more of the
|
||||
following phrases to refer to this software in your documentation
|
||||
or advertising materials: `FreeType Project', `FreeType Engine',
|
||||
`FreeType library', or `FreeType Distribution'.
|
||||
|
||||
As you have not signed this license, you are not required to
|
||||
accept it. However, as the FreeType Project is copyrighted
|
||||
material, only this license, or another one contracted with the
|
||||
authors, grants you the right to use, distribute, and modify it.
|
||||
Therefore, by using, distributing, or modifying the FreeType
|
||||
Project, you indicate that you understand and accept all the terms
|
||||
of this license.
|
||||
|
||||
4. Contacts
|
||||
-----------
|
||||
|
||||
There are two mailing lists related to FreeType:
|
||||
|
||||
o freetype@nongnu.org
|
||||
|
||||
Discusses general use and applications of FreeType, as well as
|
||||
future and wanted additions to the library and distribution.
|
||||
If you are looking for support, start in this list if you
|
||||
haven't found anything to help you in the documentation.
|
||||
|
||||
o freetype-devel@nongnu.org
|
||||
|
||||
Discusses bugs, as well as engine internals, design issues,
|
||||
specific licenses, porting, etc.
|
||||
|
||||
Our home page can be found at
|
||||
|
||||
http://www.freetype.org
|
||||
|
||||
|
||||
--- end of FTL.TXT ---
|
340
LICENSE/license_gnu_gpl_2.txt
Normal file
340
LICENSE/license_gnu_gpl_2.txt
Normal file
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
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 Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library General
|
||||
Public License instead of this License.
|
674
LICENSE/license_gnu_gpl_3.txt
Normal file
674
LICENSE/license_gnu_gpl_3.txt
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
484
LICENSE/license_gnu_lgpl_2.txt
Normal file
484
LICENSE/license_gnu_lgpl_2.txt
Normal file
|
@ -0,0 +1,484 @@
|
|||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, 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 library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, 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 companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the 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.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
504
LICENSE/license_gnu_lgpl_2_1.txt
Normal file
504
LICENSE/license_gnu_lgpl_2_1.txt
Normal file
|
@ -0,0 +1,504 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
22
LICENSE/license_lodepng.txt
Normal file
22
LICENSE/license_lodepng.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
LodePNG version 20120623
|
||||
|
||||
Copyright (c) 2005-2012 Lode Vandevenne
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
17
LICENSE/license_nanojpeg.txt
Normal file
17
LICENSE/license_nanojpeg.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
// NanoJPEG -- KeyJ's Tiny Baseline JPEG Decoder
|
||||
// version 1.3 (2012-03-05)
|
||||
// by Martin J. Fiedler <martin.fiedler@gmx.net>
|
||||
//
|
||||
// This software is published under the terms of KeyJ's Research License,
|
||||
// version 0.2. Usage of this software is subject to the following conditions:
|
||||
// 0. There's no warranty whatsoever. The author(s) of this software can not
|
||||
// be held liable for any damages that occur when using this software.
|
||||
// 1. This software may be used freely for both non-commercial and commercial
|
||||
// purposes.
|
||||
// 2. This software may be redistributed freely as long as no fees are charged
|
||||
// for the distribution and this license information is included.
|
||||
// 3. This software may be modified freely except for this license information,
|
||||
// which must not be changed in any way.
|
||||
// 4. If anything other than configuration, indentation or comments have been
|
||||
// altered in the code, the original author(s) must receive a copy of the
|
||||
// modified code.
|
12
LICENSE/license_stbvorbis.txt
Normal file
12
LICENSE/license_stbvorbis.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Ogg Vorbis I audio decoder -- version 0.99996
|
||||
//
|
||||
// Written in April 2007 by Sean Barrett, sponsored by RAD Game Tools.
|
||||
//
|
||||
// Placed in the public domain April 2007 by the author: no copyright is
|
||||
// claimed, and you may use it for any purpose you like.
|
||||
//
|
||||
// No warranty for any purpose is expressed or implied by the author (nor
|
||||
// by RAD Game Tools). Report bugs and send enhancements to the author.
|
||||
//
|
||||
// Get the latest version and other information at:
|
||||
// http://nothings.org/stb_vorbis/
|
BIN
cyberbit.ttf
Normal file
BIN
cyberbit.ttf
Normal file
Binary file not shown.
BIN
internal/c/c_compiler/7z/7-zip.chm
Normal file
BIN
internal/c/c_compiler/7z/7-zip.chm
Normal file
Binary file not shown.
BIN
internal/c/c_compiler/7z/7za.exe
Normal file
BIN
internal/c/c_compiler/7z/7za.exe
Normal file
Binary file not shown.
29
internal/c/c_compiler/7z/license.txt
Normal file
29
internal/c/c_compiler/7z/license.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
7-Zip Command line version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
7-Zip Copyright (C) 1999-2010 Igor Pavlov.
|
||||
|
||||
7za.exe is distributed under the GNU LGPL license
|
||||
|
||||
Notes:
|
||||
You can use 7-Zip on any computer, including a computer in a commercial
|
||||
organization. You don't need to register or pay for 7-Zip.
|
||||
|
||||
|
||||
GNU LGPL information
|
||||
--------------------
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You can receive a copy of the GNU Lesser General Public License from
|
||||
http://www.gnu.org/
|
41
internal/c/c_compiler/7z/readme.txt
Normal file
41
internal/c/c_compiler/7z/readme.txt
Normal file
|
@ -0,0 +1,41 @@
|
|||
7-Zip Command line version 9.20
|
||||
-------------------------------
|
||||
|
||||
7-Zip is a file archiver with high compression ratio.
|
||||
7za.exe is a standalone command line version of 7-Zip.
|
||||
|
||||
7-Zip Copyright (C) 1999-2010 Igor Pavlov.
|
||||
|
||||
Features of 7za.exe:
|
||||
- High compression ratio in new 7z format
|
||||
- Supported formats:
|
||||
- Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
|
||||
- Unpacking only: Z, lzma
|
||||
- Highest compression ratio for ZIP and GZIP formats.
|
||||
- Fast compression and decompression
|
||||
- Strong AES-256 encryption in 7z and ZIP formats.
|
||||
|
||||
7za.exe is a free software distributed under the GNU LGPL.
|
||||
Read license.txt for more information.
|
||||
|
||||
Source code of 7za.exe and 7-Zip can be found at
|
||||
http://www.7-zip.org/
|
||||
|
||||
7za.exe can work in Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7.
|
||||
|
||||
There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD,
|
||||
FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS:
|
||||
|
||||
http://p7zip.sourceforge.net/
|
||||
|
||||
|
||||
This distributive packet contains the following files:
|
||||
|
||||
7za.exe - 7-Zip standalone command line version.
|
||||
readme.txt - This file.
|
||||
license.txt - License information.
|
||||
7-zip.chm - User's Manual in HTML Help format.
|
||||
|
||||
|
||||
---
|
||||
End of document
|
12
internal/c/c_compiler/INSTALL_MINGW_HERE.txt
Normal file
12
internal/c/c_compiler/INSTALL_MINGW_HERE.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
Only Windows users need these files.
|
||||
|
||||
This is a copy of the "Mingw-w32 (i686) ToolChain" from "http://www.drangon.org/mingw/"
|
||||
|
||||
After extraction, the 7 (or so) folders should be manually placed directly into this folder named
|
||||
"internal\c\c_compiler\"
|
||||
|
||||
If you don't have a folder called "internal\c\c_compiler\bin" after extraction you have
|
||||
done something wrong. There should be about 6 other folders here too.
|
||||
|
||||
Due to the large size of the Windows C++ compiler it was not practical to distribute it uncompressed,
|
||||
expecially under a source revision system.
|
BIN
internal/c/c_compiler/c_compiler.7z
Normal file
BIN
internal/c/c_compiler/c_compiler.7z
Normal file
Binary file not shown.
444
internal/c/common.cpp
Normal file
444
internal/c/common.cpp
Normal file
|
@ -0,0 +1,444 @@
|
|||
#ifndef DEPENDENCY_NO_SOCKETS
|
||||
#define DEPENDENCY_SOCKETS
|
||||
#endif
|
||||
|
||||
#ifndef DEPENDENCY_NO_PRINTER
|
||||
#define DEPENDENCY_PRINTER
|
||||
#endif
|
||||
|
||||
#ifndef DEPENDENCY_NO_ICON
|
||||
#define DEPENDENCY_ICON
|
||||
#endif
|
||||
|
||||
#ifndef DEPENDENCY_NO_SCREENIMAGE
|
||||
#define DEPENDENCY_SCREENIMAGE
|
||||
#endif
|
||||
|
||||
#ifndef INC_COMMON_CPP
|
||||
#define INC_COMMON_CPP
|
||||
#include "os.h"
|
||||
|
||||
#ifdef QB64_ANDROID
|
||||
#define QB64_GLES1
|
||||
#define QB64_NOT_X86
|
||||
#define QB64_GLUT
|
||||
#else
|
||||
#define QB64_GL1
|
||||
#define QB64_GLUT
|
||||
#endif
|
||||
|
||||
#ifdef QB64_LINUX
|
||||
#ifndef QB64_MACOSX
|
||||
#ifndef QB64_ANDROID
|
||||
#define QB64_X11
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEPENDENCY_CONSOLE_ONLY
|
||||
#undef QB64_GLUT
|
||||
#else
|
||||
#define QB64_GUI
|
||||
#endif
|
||||
|
||||
#define NO_S_D_L
|
||||
|
||||
|
||||
/*
|
||||
#ifdef QB64_BACKSLASH_FILESYSTEM
|
||||
#include "parts\\core\\gl_headers\\glew\\glew.h"
|
||||
#else
|
||||
#include "parts/core/gl_headers/glew/glew.h"
|
||||
#endif
|
||||
*/
|
||||
|
||||
|
||||
//core
|
||||
#ifdef QB64_GUI
|
||||
#ifdef QB64_GLUT
|
||||
#ifdef QB64_BACKSLASH_FILESYSTEM
|
||||
#include "parts\\core\\src.c"
|
||||
#else
|
||||
#include "parts/core/src.c"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
|
||||
#ifndef QB64_GUI
|
||||
#undef int64 //definition of int64 from os.h conflicts with a definition within windows.h, temporarily undefine then redefine
|
||||
#include <windows.h>
|
||||
#define int64 __int64
|
||||
#endif
|
||||
|
||||
#include <float.h>
|
||||
#include <winbase.h>
|
||||
|
||||
#endif
|
||||
|
||||
//common includes
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
//OS/compiler specific includes
|
||||
#ifdef QB64_WINDOWS
|
||||
#include <direct.h>
|
||||
#ifdef DEPENDENCY_PRINTER
|
||||
#include <winspool.h>
|
||||
#endif
|
||||
#include <csignal>
|
||||
#include <process.h> //required for multi-threading
|
||||
#if defined DEPENDENCY_AUDIO_OUT || defined QB64_GUI
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#ifndef QB64_MACOSX
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef QB64_GUI
|
||||
#ifdef QB64_GLUT
|
||||
#ifndef QB64_ANDROID
|
||||
#ifdef QB64_BACKSLASH_FILESYSTEM
|
||||
#include "parts\\core\\gl_headers\\opengl_org_registery\\glext.h"
|
||||
#else
|
||||
#include "parts/core/gl_headers/opengl_org_registery/glext.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
//QB64 string descriptor structure
|
||||
struct qbs_field{
|
||||
int32 fileno;
|
||||
int64 fileid;
|
||||
int64 size;
|
||||
int64 offset;
|
||||
};
|
||||
|
||||
struct qbs{
|
||||
uint8 *chr;//a 32 bit pointer to the string's data
|
||||
int32 len;//must be signed for comparisons against signed int32s
|
||||
uint8 in_cmem;//set to 1 if in the conventional memory DBLOCK
|
||||
uint16 *cmem_descriptor;
|
||||
uint16 cmem_descriptor_offset;
|
||||
uint32 listi;//the index in the list of strings that references it
|
||||
uint8 tmp;//set to 1 if the string can be deleted immediately after being processed
|
||||
uint32 tmplisti;//the index in the list of strings that references it
|
||||
uint8 fixed;//fixed length string
|
||||
uint8 readonly;//set to 1 if string is read only
|
||||
qbs_field *field;
|
||||
};
|
||||
|
||||
//substitute functionality
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
inline void SDL_Delay(uint32 milliseconds){//redefine SDL_Delay to call Sleep
|
||||
Sleep(milliseconds);
|
||||
}
|
||||
#else
|
||||
inline void SDL_Delay(uint32 milliseconds){//redefine SDL_Delay to call Sleep
|
||||
static uint64 sec,nsec;
|
||||
sec=milliseconds/1000;
|
||||
nsec=(milliseconds%1000)*1000000;
|
||||
static timespec ts;
|
||||
ts.tv_sec = sec;
|
||||
ts.tv_nsec = nsec;
|
||||
nanosleep (&ts, NULL);
|
||||
}
|
||||
inline void Sleep(uint32 milliseconds){
|
||||
SDL_Delay(milliseconds);
|
||||
}
|
||||
inline uint32 _lrotl(uint32 word,uint32 shift){
|
||||
return (word << shift) | (word >> (32 - shift));
|
||||
}
|
||||
inline void ZeroMemory(void *ptr,int64 bytes){
|
||||
memset(ptr,0,bytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
struct img_struct{
|
||||
void *lock_offset;
|
||||
int64 lock_id;
|
||||
uint8 valid;//0,1 0=invalid
|
||||
uint8 text;//if set, surface is a text surface
|
||||
uint8 console;//dummy surface to absorb unimplemented console functionality
|
||||
uint16 width,height;
|
||||
uint8 bytes_per_pixel;//1,2,4
|
||||
uint8 bits_per_pixel;//1,2,4,8,16(text),32
|
||||
uint32 mask;//1,3,0xF,0xFF,0xFFFF,0xFFFFFFFF
|
||||
uint16 compatible_mode;//0,1,2,7,8,9,10,11,12,13,32,256
|
||||
uint32 color,background_color,draw_color;
|
||||
uint32 font;//8,14,16,?
|
||||
int16 top_row,bottom_row;//VIEW PRINT settings, unique (as in QB) to each "page"
|
||||
int16 cursor_x,cursor_y;//unique (as in QB) to each "page"
|
||||
uint8 cursor_show, cursor_firstvalue, cursor_lastvalue;
|
||||
union{
|
||||
uint8 *offset;
|
||||
uint32 *offset32;
|
||||
};
|
||||
uint32 flags;
|
||||
uint32 *pal;
|
||||
int32 transparent_color;//-1 means no color is transparent
|
||||
uint8 alpha_disabled;
|
||||
uint8 holding_cursor;
|
||||
uint8 print_mode;
|
||||
//BEGIN apm ('active page migration')
|
||||
//everything between apm points is migrated during active page changes
|
||||
//note: apm data is only relevent to graphics modes
|
||||
uint8 apm_p1;
|
||||
int32 view_x1,view_y1,view_x2,view_y2;
|
||||
int32 view_offset_x,view_offset_y;
|
||||
float x,y;
|
||||
uint8 clipping_or_scaling;
|
||||
float scaling_x,scaling_y,scaling_offset_x,scaling_offset_y;
|
||||
float window_x1,window_y1,window_x2,window_y2;
|
||||
double draw_ta;
|
||||
double draw_scale;
|
||||
uint8 apm_p2;
|
||||
//END apm
|
||||
};
|
||||
//img_struct flags
|
||||
#define IMG_FREEPAL 1 //free palette data before freeing image
|
||||
#define IMG_SCREEN 2 //img is linked to other screen pages
|
||||
#define IMG_FREEMEM 4 //if set, it means memory must be freed
|
||||
|
||||
#ifdef QB64_NOT_X86
|
||||
inline int64 qbr(long double f){if (f<0) return(f-0.5f); else return(f+0.5f);}
|
||||
inline uint64 qbr_longdouble_to_uint64(long double f){if (f<0) return(f-0.5f); else return(f+0.5f);}
|
||||
inline int32 qbr_float_to_long(float f){if (f<0) return(f-0.5f); else return(f+0.5f);}
|
||||
inline int32 qbr_double_to_long(double f){if (f<0) return(f-0.5f); else return(f+0.5f);}
|
||||
#else
|
||||
//QBASIC compatible rounding via FPU:
|
||||
#ifdef QB64_MICROSOFT
|
||||
inline int64 qbr(long double f){
|
||||
int64 i;
|
||||
__asm{
|
||||
fld f
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
inline uint64 qbr_longdouble_to_uint64(long double f){
|
||||
uint64 i;
|
||||
__asm{
|
||||
fld f
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
inline int32 qbr_float_to_long(float f){
|
||||
int32 i;
|
||||
__asm{
|
||||
fld f
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
inline int32 qbr_double_to_long(double f){
|
||||
int32 i;
|
||||
__asm{
|
||||
fld f
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
#else
|
||||
//FLDS=load single
|
||||
//FLDL=load double
|
||||
//FLDT=load long double
|
||||
inline int64 qbr(long double f){
|
||||
int64 i;
|
||||
__asm__ (
|
||||
"fldt %1;"
|
||||
"fistpll %0;"
|
||||
:"=m" (i)
|
||||
:"m" (f)
|
||||
);
|
||||
return i;
|
||||
}
|
||||
inline uint64 qbr_longdouble_to_uint64(long double f){
|
||||
uint64 i;
|
||||
__asm__ (
|
||||
"fldt %1;"
|
||||
"fistpll %0;"
|
||||
:"=m" (i)
|
||||
:"m" (f)
|
||||
);
|
||||
return i;
|
||||
}
|
||||
inline int32 qbr_float_to_long(float f){
|
||||
int32 i;
|
||||
__asm__ (
|
||||
"flds %1;"
|
||||
"fistpl %0;"
|
||||
:"=m" (i)
|
||||
:"m" (f)
|
||||
);
|
||||
return i;
|
||||
}
|
||||
inline int32 qbr_double_to_long(double f){
|
||||
int32 i;
|
||||
__asm__ (
|
||||
"fldl %1;"
|
||||
"fistpl %0;"
|
||||
:"=m" (i)
|
||||
:"m" (f)
|
||||
);
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
#endif //x86 support
|
||||
|
||||
//bit-array access functions (note: used to be included through 'bit.cpp')
|
||||
static int64 bmask;
|
||||
static uint64 *bptr64;
|
||||
static int64 bval64;
|
||||
inline uint64 getubits(uint32 bsize,uint8 *base,ptrszint i){
|
||||
bmask=~(-(((int64)1)<<bsize));
|
||||
i*=bsize;
|
||||
return ((*(uint64*)(base+(i>>3)))>>(i&7))&bmask;
|
||||
}
|
||||
inline int64 getbits(uint32 bsize,uint8 *base,ptrszint i){
|
||||
bmask=~(-(((int64)1)<<bsize));
|
||||
i*=bsize;
|
||||
bval64=((*(uint64*)(base+(i>>3)))>>(i&7))&bmask;
|
||||
if (bval64&(((int64)1)<<(bsize-1))) return bval64|(~bmask);
|
||||
return bval64;
|
||||
}
|
||||
inline void setbits(uint32 bsize,uint8 *base,ptrszint i,int64 val){
|
||||
bmask=(((uint64)1)<<bsize)-1;
|
||||
i*=bsize;
|
||||
bptr64=(uint64*)(base+(i>>3));
|
||||
*bptr64=(*bptr64&( ( (bmask<<(i&7)) ^-1) )) | ((val&bmask)<<(i&7));
|
||||
}
|
||||
|
||||
//QB64 internal variable type flags (internally referenced by some C functions)
|
||||
#define ISSTRING 1073741824
|
||||
#define ISFLOAT 536870912
|
||||
#define ISUNSIGNED 268435456
|
||||
#define ISPOINTER 134217728
|
||||
#define ISFIXEDLENGTH 67108864 //only set for strings with pointer flag
|
||||
#define ISINCONVENTIONALMEMORY 33554432
|
||||
#define ISOFFSETINBITS 16777216
|
||||
|
||||
struct ontimer_struct{
|
||||
uint8 allocated;
|
||||
uint32 id;//the event ID to trigger (0=no event)
|
||||
int64 pass;//the value to pass to the triggered event (only applicable to ON ... CALL ...(x)
|
||||
uint8 active;//0=OFF, 1=ON, 2=STOP
|
||||
uint8 state;//0=untriggered,1=triggered
|
||||
double seconds;//how many seconds between events
|
||||
double last_time;//the last time this event was triggered
|
||||
};
|
||||
|
||||
struct onkey_struct{
|
||||
uint32 id;//the event ID to trigger (0=no event)
|
||||
int64 pass;//the value to pass to the triggered event (only applicable to ON ... CALL ...(x)
|
||||
uint8 active;//0=OFF, 1=ON, 2=STOP
|
||||
uint8 state;//0=untriggered,1=triggered,2=in progress(TIMER only),2+=multiple events queued(KEY only)
|
||||
uint32 keycode;//32-bit code, same as what _KEYHIT returns
|
||||
uint32 keycode_alternate;//an alternate keycode which may also trigger event
|
||||
uint8 key_scancode;
|
||||
uint8 key_flags;
|
||||
//flags:
|
||||
//0 No keyboard flag, 1-3 Either Shift key, 4 Ctrl key, 8 Alt key,32 NumLock key,64 Caps Lock key, 128 Extended keys on a 101-key keyboard
|
||||
//To specify multiple shift states, add the values together. For example, a value of 12 specifies that the user-defined key is used in combination with the Ctrl and Alt keys.
|
||||
qbs *text;
|
||||
};
|
||||
|
||||
struct onstrig_struct{
|
||||
uint32 id;//the event ID to trigger (0=no event)
|
||||
int64 pass;//the value to pass to the triggered event (only applicable to ON ... CALL ...(x)
|
||||
uint8 active;//0=OFF, 1=ON, 2=STOP
|
||||
uint8 state;//0=untriggered,1=triggered,2=in progress(TIMER only),2+=multiple events queued(KEY only)
|
||||
};
|
||||
|
||||
struct byte_element_struct
|
||||
{
|
||||
uint64 offset;
|
||||
int32 length;
|
||||
};
|
||||
|
||||
struct device_struct{
|
||||
int32 used;
|
||||
int32 type;
|
||||
//0=Unallocated
|
||||
//1=Joystick/Gamepad
|
||||
//2=Keybaord
|
||||
//3=Mouse
|
||||
char *name;
|
||||
int32 connected;
|
||||
int32 lastbutton;
|
||||
int32 lastaxis;
|
||||
int32 lastwheel;
|
||||
//--------------
|
||||
int32 max_events;
|
||||
int32 queued_events;
|
||||
uint8 *events;//the structure and size of the events depends greatly on the device and its capabilities
|
||||
int32 event_size;
|
||||
//--------------
|
||||
uint8 STRIG_button_pressed[256];//checked and cleared by the STRIG function
|
||||
//--------------
|
||||
void *handle_pointer;//handle as pointer
|
||||
int64 handle_int;//handle as integer
|
||||
char *description;//description provided by manufacturer
|
||||
int64 product_id;
|
||||
int64 vendor_id;
|
||||
int32 buttons;
|
||||
int32 axes;
|
||||
int32 balls;
|
||||
int32 hats;
|
||||
};
|
||||
#define QUEUED_EVENTS_LIMIT 1024
|
||||
|
||||
struct mem_block{
|
||||
ptrszint offset;
|
||||
ptrszint size;
|
||||
int64 lock_id;//64-bit key, must be present at lock's offset or memory region is invalid
|
||||
ptrszint lock_offset;//pointer to lock
|
||||
int32 type;
|
||||
/*
|
||||
memorytype (4 bytes, but only the first used, for flags):
|
||||
1 integer values
|
||||
2 unsigned (set in conjunction with integer)
|
||||
4 floating point values
|
||||
8 char string(s) 'element-size is the memory size of 1 string
|
||||
*/
|
||||
ptrszint elementsize;
|
||||
int32 image;
|
||||
};
|
||||
struct mem_lock{
|
||||
uint64 id;
|
||||
int32 type;//required to know what action to take (if any) when a request is made to free the block
|
||||
//0=no security (eg. user defined block from _OFFSET)
|
||||
//1=C-malloc'ed block
|
||||
//2=image
|
||||
//3=sub/function scope block
|
||||
//4=array
|
||||
//---- type specific variables follow ----
|
||||
void *offset;//used by malloc'ed blocks to free them
|
||||
};
|
||||
|
||||
#endif //INC_COMMON_CPP
|
33272
internal/c/libqb.cpp
Normal file
33272
internal/c/libqb.cpp
Normal file
File diff suppressed because it is too large
Load diff
71
internal/c/libqb.h
Normal file
71
internal/c/libqb.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
#ifndef INC_LIBQB_H
|
||||
#define INC_LIBQB_H
|
||||
#include "common.cpp"
|
||||
|
||||
void error(int32 error_number);
|
||||
extern uint32 new_error;
|
||||
extern uint32 error_err; //=0;
|
||||
extern double error_erl; //=0;
|
||||
extern uint32 error_occurred;
|
||||
extern uint32 error_goto_line;
|
||||
extern uint32 error_handling;
|
||||
extern uint32 error_retry;
|
||||
|
||||
void sub_shell4(qbs*,int32);//_DONTWAIT & _HIDE
|
||||
int32 func__source();
|
||||
int32 func_pos(int32 ignore);
|
||||
void sub__printimage(int32 i);
|
||||
double func_timer(double accuracy,int32 passed);
|
||||
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed);
|
||||
void display();
|
||||
void validatepage(int32);
|
||||
void sub__dest(int32);
|
||||
void sub__source(int32);
|
||||
int32 func__printwidth(qbs*,int32,int32);
|
||||
void sub_cls(int32,uint32,int32);
|
||||
void qbs_print(qbs*,int32);
|
||||
int32 func__copyimage(int32 i,int32 mode,int32 passed);
|
||||
int32 func__dest();
|
||||
int32 func__display();
|
||||
void qbg_sub_view_print(int32,int32,int32);
|
||||
qbs *qbs_new(int32,uint8);
|
||||
qbs *qbs_new_txt(const char*);
|
||||
qbs *qbs_add(qbs*,qbs*);
|
||||
qbs *qbs_set(qbs*,qbs*);
|
||||
void qbg_sub_window(float,float,float,float,int32);
|
||||
extern int32 autodisplay;
|
||||
//GFS forward references
|
||||
int32 gfs_eof_passed(int32 i);
|
||||
int32 gfs_eof_reached(int32 i);
|
||||
int64 gfs_getpos(int32 i);
|
||||
int32 gfs_fileno_valid(int32 f);
|
||||
int32 gfs_fileno_freefile();//like FREEFILE
|
||||
void gfs_fileno_use(int32 f, int32 i);
|
||||
int32 gfs_open(qbs *filename,int32 access,int32 restrictions, int32 how);
|
||||
int32 gfs_close(int32 i);
|
||||
int64 gfs_lof(int32 i);
|
||||
int32 gfs_setpos(int32 i, int64 position);
|
||||
int32 gfs_write(int32 i,int64 position,uint8 *data,int64 size);
|
||||
int32 gfs_read(int32 i,int64 position,uint8 *data,int64 size);
|
||||
int64 gfs_read_bytes();
|
||||
|
||||
extern uint8 cmem[1114099];//16*65535+65535+3 (enough for highest referencable dword in conv memory)
|
||||
|
||||
//keyhit cyclic buffer
|
||||
extern int64 keyhit[8192];
|
||||
// keyhit specific internal flags: (stored in high 32-bits)
|
||||
// &4294967296->numpad was used
|
||||
extern int32 keyhit_nextfree;
|
||||
extern int32 keyhit_next;
|
||||
//note: if full, the oldest message is discarded to make way for the new message
|
||||
|
||||
|
||||
extern uint8 port60h_event[256];
|
||||
extern int32 port60h_events;
|
||||
|
||||
extern int32 window_exists;
|
||||
extern int32 no_control_characters2;
|
||||
|
||||
extern qbs *qbs_lcase(qbs *str);
|
||||
extern qbs *qbs_ucase(qbs *str);
|
||||
#endif
|
2195
internal/c/libqb/gui.cpp
Normal file
2195
internal/c/libqb/gui.cpp
Normal file
File diff suppressed because it is too large
Load diff
279
internal/c/libqb/gui.h
Normal file
279
internal/c/libqb/gui.h
Normal file
|
@ -0,0 +1,279 @@
|
|||
#ifndef QB64_GUI //begin stubs
|
||||
|
||||
//STUB: simulate generating a hardware surface
|
||||
int32 new_hardware_img(int32 x, int32 y, uint32 *pixels, int32 flags){
|
||||
//create hardware img
|
||||
int32 handle;
|
||||
hardware_img_struct* hardware_img;
|
||||
handle=list_add(hardware_img_handles);
|
||||
hardware_img=(hardware_img_struct*)list_get(hardware_img_handles,handle);
|
||||
hardware_img->w=x;
|
||||
hardware_img->h=y;
|
||||
hardware_img->dest_context_handle=0;
|
||||
hardware_img->depthbuffer_handle=0;
|
||||
hardware_img->pending_commands=0;
|
||||
hardware_img->remove=0;
|
||||
hardware_img->alpha_disabled=0;
|
||||
hardware_img->depthbuffer_mode=DEPTHBUFFER_MODE__ON;
|
||||
hardware_img->valid=1;
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__OFF;
|
||||
hardware_img->source_state.texture_wrap=TEXTURE_WRAP_MODE__UNKNOWN;
|
||||
hardware_img->source_state.smooth_stretched=SMOOTH_MODE__UNKNOWN;
|
||||
hardware_img->source_state.smooth_shrunk=SMOOTH_MODE__UNKNOWN;
|
||||
if (flags&NEW_HARDWARE_IMG__BUFFER_CONTENT){
|
||||
hardware_img->texture_handle=0;
|
||||
if (flags&NEW_HARDWARE_IMG__DUPLICATE_PROVIDED_BUFFER){
|
||||
hardware_img->software_pixel_buffer=NULL;
|
||||
}else{
|
||||
free(pixels);//the buffer was meant to be consumed, so we just free it immediately
|
||||
hardware_img->software_pixel_buffer=NULL;
|
||||
}
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#else //end stubs
|
||||
|
||||
|
||||
|
||||
int32 force_NPO2_fix=0;//This should only be set to 1 for debugging QB64
|
||||
|
||||
uint32 *NPO2_buffer=(uint32*)malloc(4);
|
||||
int32 NPO2_buffer_size_in_pixels=1;
|
||||
|
||||
uint32 *NPO2_texture_generate(int32 *px, int32 *py, uint32 *pixels){
|
||||
int32 ox=*px;
|
||||
int32 oy=*py;
|
||||
int32 nx=1;
|
||||
int32 ny=1;
|
||||
|
||||
//assume not negative & not 0
|
||||
while ((ox&1)==0){
|
||||
ox>>=1;
|
||||
nx<<=1;
|
||||
}
|
||||
if (ox!=1){//x is not a power of 2
|
||||
while (ox!=0){
|
||||
ox>>=1;
|
||||
nx<<=1;
|
||||
}
|
||||
nx<<1;
|
||||
}
|
||||
while ((oy&1)==0){
|
||||
oy>>=1;
|
||||
ny<<=1;
|
||||
}
|
||||
if (oy!=1){//y is not a power of 2
|
||||
while (oy!=0){
|
||||
oy>>=1;
|
||||
ny<<=1;
|
||||
}
|
||||
ny<<1;
|
||||
}
|
||||
|
||||
//reset original values
|
||||
ox=*px;
|
||||
oy=*py;
|
||||
|
||||
if (nx==ox&&ny==oy){ //no action required
|
||||
return pixels;
|
||||
}
|
||||
|
||||
int32 size_in_pixels=nx*ny;
|
||||
if (size_in_pixels>NPO2_buffer_size_in_pixels){
|
||||
NPO2_buffer=(uint32*)realloc(NPO2_buffer,size_in_pixels*4);
|
||||
NPO2_buffer_size_in_pixels=size_in_pixels;
|
||||
}
|
||||
|
||||
//copy source NPO2 rectangle into destination PO2 rectangle
|
||||
if (nx==ox){ //can copy as a single block
|
||||
memcpy(NPO2_buffer,pixels,ox*oy*4);
|
||||
}else{
|
||||
uint32 *dst_pixel_offset=NPO2_buffer;
|
||||
uint32 *src_pixel_offset=pixels;
|
||||
while (oy--){
|
||||
memcpy(dst_pixel_offset,src_pixel_offset,ox*4);
|
||||
dst_pixel_offset+=nx;
|
||||
src_pixel_offset+=ox;
|
||||
}
|
||||
oy=*py;
|
||||
}
|
||||
|
||||
//tidy edges - extend the right-most column and bottom-most row to avoid pixel/color bleeding
|
||||
//rhs column
|
||||
if (ox!=nx){
|
||||
for (int y=0;y<oy;y++){
|
||||
NPO2_buffer[ox+nx*y]=NPO2_buffer[ox+nx*y-1];
|
||||
}
|
||||
}
|
||||
//bottom row + 1 pixel for corner
|
||||
if (oy!=ny){
|
||||
for (int x=0;x<(ox+1);x++){
|
||||
NPO2_buffer[nx*oy+x]=NPO2_buffer[nx*oy+x-nx];
|
||||
}
|
||||
}
|
||||
|
||||
//int maxtexsize;
|
||||
//glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxtexsize);
|
||||
//alert(maxtexsize);
|
||||
|
||||
//alert(nx);
|
||||
//alert(ny);
|
||||
|
||||
*px=nx;
|
||||
*py=ny;
|
||||
|
||||
return NPO2_buffer;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32 new_texture_handle(){
|
||||
GLuint texture=0;
|
||||
glGenTextures(1,&texture);
|
||||
return (int32)texture;
|
||||
}
|
||||
|
||||
|
||||
int32 new_hardware_img(int32 x, int32 y, uint32 *pixels, int32 flags){
|
||||
//note: non power-of-2 dimensioned textures are supported on modern 3D cards and
|
||||
// even on some older cards, as long as mip-mapping is not being used
|
||||
// therefore, no attempt is made to convert the non-power-of-2 SCREEN sizes via software
|
||||
// to avoid the performance hit this would incur
|
||||
//create hardware img
|
||||
int32 handle;
|
||||
hardware_img_struct* hardware_img;
|
||||
handle=list_add(hardware_img_handles);
|
||||
hardware_img=(hardware_img_struct*)list_get(hardware_img_handles,handle);
|
||||
hardware_img->w=x;
|
||||
hardware_img->h=y;
|
||||
hardware_img->dest_context_handle=0;
|
||||
hardware_img->depthbuffer_handle=0;
|
||||
hardware_img->pending_commands=0;
|
||||
hardware_img->remove=0;
|
||||
hardware_img->alpha_disabled=0;
|
||||
hardware_img->depthbuffer_mode=DEPTHBUFFER_MODE__ON;
|
||||
hardware_img->valid=1;
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__OFF;
|
||||
hardware_img->source_state.texture_wrap=TEXTURE_WRAP_MODE__UNKNOWN;
|
||||
hardware_img->source_state.smooth_stretched=SMOOTH_MODE__UNKNOWN;
|
||||
hardware_img->source_state.smooth_shrunk=SMOOTH_MODE__UNKNOWN;
|
||||
|
||||
if (flags&NEW_HARDWARE_IMG__BUFFER_CONTENT){
|
||||
hardware_img->texture_handle=0;
|
||||
if (flags&NEW_HARDWARE_IMG__DUPLICATE_PROVIDED_BUFFER){
|
||||
hardware_img->software_pixel_buffer=(uint32*)malloc(x*y*4);
|
||||
memcpy(hardware_img->software_pixel_buffer,pixels,x*y*4);
|
||||
}else{
|
||||
hardware_img->software_pixel_buffer=pixels;
|
||||
}
|
||||
}else{
|
||||
hardware_img->software_pixel_buffer=NULL;
|
||||
hardware_img->texture_handle=new_texture_handle();
|
||||
glBindTexture (GL_TEXTURE_2D, hardware_img->texture_handle);
|
||||
//non-power of 2 dimensions fallback support
|
||||
static int glerrorcode;
|
||||
glerrorcode=glGetError();//clear any previous errors
|
||||
if (force_NPO2_fix==0) glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, x, y, 0, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode!=0||force_NPO2_fix==1){
|
||||
int32 nx=x,ny=y;
|
||||
uint32 *npixels=NPO2_texture_generate(&nx,&ny,pixels);
|
||||
glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, nx, ny, 0, GL_BGRA, GL_UNSIGNED_BYTE,npixels);
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__EXPANDED;
|
||||
hardware_img->PO2_w=nx;
|
||||
hardware_img->PO2_h=ny;
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode){
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, x, y, GL_BGRA, GL_UNSIGNED_BYTE, pixels );
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode){
|
||||
alert("gluBuild2DMipmaps failed");
|
||||
alert(glerrorcode);
|
||||
}
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__MIPMAPPED;
|
||||
hardware_img->PO2_w=x;
|
||||
hardware_img->PO2_h=y;
|
||||
}
|
||||
}
|
||||
set_render_source(INVALID_HARDWARE_HANDLE);
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
void hardware_img_buffer_to_texture(int32 handle){
|
||||
static hardware_img_struct* hardware_img;
|
||||
hardware_img=(hardware_img_struct*)list_get(hardware_img_handles,handle);
|
||||
if (hardware_img->texture_handle==0){
|
||||
hardware_img->texture_handle=new_texture_handle();
|
||||
glBindTexture (GL_TEXTURE_2D, hardware_img->texture_handle);
|
||||
//non-power of 2 dimensions fallback support
|
||||
static int glerrorcode;
|
||||
glerrorcode=glGetError();//clear any previous errors
|
||||
if (force_NPO2_fix==0) glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, hardware_img->w, hardware_img->h, 0, GL_BGRA, GL_UNSIGNED_BYTE, hardware_img->software_pixel_buffer);
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode!=0||force_NPO2_fix==1){
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__EXPANDED;
|
||||
int32 x=hardware_img->w;
|
||||
int32 y=hardware_img->h;
|
||||
uint32 *pixels=NPO2_texture_generate(&x,&y,hardware_img->software_pixel_buffer);
|
||||
hardware_img->PO2_w=x;
|
||||
hardware_img->PO2_h=y;
|
||||
glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, x, y, 0, GL_BGRA, GL_UNSIGNED_BYTE,pixels);
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode){
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, hardware_img->w, hardware_img->h, GL_BGRA, GL_UNSIGNED_BYTE, hardware_img->software_pixel_buffer);
|
||||
glerrorcode=glGetError();
|
||||
if (glerrorcode){
|
||||
alert("gluBuild2DMipmaps failed");
|
||||
alert(glerrorcode);
|
||||
}
|
||||
hardware_img->source_state.PO2_fix=PO2_FIX__MIPMAPPED;
|
||||
hardware_img->PO2_w=hardware_img->w;
|
||||
hardware_img->PO2_h=hardware_img->h;
|
||||
}
|
||||
}
|
||||
free(hardware_img->software_pixel_buffer);
|
||||
hardware_img->software_pixel_buffer=NULL;//2015 critical bug fix
|
||||
set_render_source(INVALID_HARDWARE_HANDLE);
|
||||
}
|
||||
}
|
||||
|
||||
void hardware_img_requires_depthbuffer(hardware_img_struct* hardware_img){
|
||||
if (hardware_img->depthbuffer_handle==0){
|
||||
//inspiration... http://www.opengl.org/wiki/Framebuffer_Object_Examples#Color_texture.2C_Depth_texture
|
||||
static GLuint depth_tex;
|
||||
glGenTextures(1, &depth_tex);
|
||||
glBindTexture(GL_TEXTURE_2D, depth_tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||
//NULL means reserve texture memory, but texels are undefined
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, hardware_img->w, hardware_img->h, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, depth_tex, 0/*mipmap level*/);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
hardware_img->depthbuffer_handle=depth_tex;
|
||||
set_render_source(INVALID_HARDWARE_HANDLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
12
internal/c/libqb/os/lnx/build_test.sh
Executable file
12
internal/c/libqb/os/lnx/build_test.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
g++ -c -w -Wall ../../../libqb.cpp -D FREEGLUT_STATIC -D DEPENDENCY_AUDIO_OUT -D DEPENDENCY_AUDIO_DECODE -D DEPENDENCY_AUDIO_CONVERSION -o libqb_test_only.o
|
||||
echo "Press any key to continue"
|
||||
Pause()
|
||||
{
|
||||
OLDCONFIG=`stty -g`
|
||||
stty -icanon -echo min 1 time 0
|
||||
dd count=1 2>/dev/null
|
||||
stty $OLDCONFIG
|
||||
}
|
||||
Pause
|
||||
|
3
internal/c/libqb/os/lnx/setup_build.sh
Executable file
3
internal/c/libqb/os/lnx/setup_build.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
g++ -c -w -Wall ../../../libqb.cpp -D DEPENDENCY_LOADFONT -D FREEGLUT_STATIC -o libqb_setup.o
|
||||
|
12
internal/c/libqb/os/osx/build_test.command
Normal file
12
internal/c/libqb/os/osx/build_test.command
Normal file
|
@ -0,0 +1,12 @@
|
|||
cd "$(dirname "$0")"
|
||||
g++ -c -w -Wall ../../../libqb.cpp -D DEPENDENCY_AUDIO_OUT -D DEPENDENCY_AUDIO_DECODE -D DEPENDENCY_AUDIO_CONVERSION -o libqb_test_only.o
|
||||
echo "Press any key to continue"
|
||||
Pause()
|
||||
{
|
||||
OLDCONFIG=`stty -g`
|
||||
stty -icanon -echo min 1 time 0
|
||||
dd count=1 2>/dev/null
|
||||
stty $OLDCONFIG
|
||||
}
|
||||
Pause
|
||||
|
3
internal/c/libqb/os/osx/setup_build.command
Normal file
3
internal/c/libqb/os/osx/setup_build.command
Normal file
|
@ -0,0 +1,3 @@
|
|||
cd "$(dirname "$0")"
|
||||
g++ -c -w -Wall ../../../libqb.cpp -D DEPENDENCY_LOADFONT -o libqb_setup.o
|
||||
|
2
internal/c/libqb/os/win/build_test.bat
Normal file
2
internal/c/libqb/os/win/build_test.bat
Normal file
|
@ -0,0 +1,2 @@
|
|||
..\..\..\c_compiler\bin\g++ -c -w -Wall ..\..\..\libqb.cpp -D DEPENDENCY_AUDIO_OUT -D DEPENDENCY_AUDIO_DECODE -D DEPENDENCY_AUDIO_CONVERSION -D FREEGLUT_STATIC -o libqb_test_only.o
|
||||
pause
|
1
internal/c/libqb/os/win/setup_build.bat
Normal file
1
internal/c/libqb/os/win/setup_build.bat
Normal file
|
@ -0,0 +1 @@
|
|||
..\..\..\c_compiler\bin\g++ -c -w -Wall ..\..\..\libqb.cpp -D DEPENDENCY_LOADFONT -D FREEGLUT_STATIC -o libqb_setup.o
|
80
internal/c/libqb/printer.cpp
Normal file
80
internal/c/libqb/printer.cpp
Normal file
|
@ -0,0 +1,80 @@
|
|||
#ifndef DEPENDENCY_PRINTER
|
||||
|
||||
//stubs
|
||||
void sub__printimage(int32 i){
|
||||
return;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void sub__printimage(int32 i){
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
|
||||
static LPSTR szPrinterName=NULL;
|
||||
DWORD dwNameLen;
|
||||
HDC dc;
|
||||
DOCINFO di;
|
||||
uint32 w,h;
|
||||
int32 x,y;
|
||||
int32 i2;
|
||||
BITMAPFILEHEADER bmfHeader;
|
||||
BITMAPINFOHEADER bi;
|
||||
img_struct *s,*s2;
|
||||
|
||||
if (i>=0){
|
||||
validatepage(i); s=&img[page[i]];
|
||||
}else{
|
||||
x=-i;
|
||||
if (x>=nextimg){error(258); return;}
|
||||
s=&img[x];
|
||||
if (!s->valid){error(258); return;}
|
||||
}
|
||||
|
||||
if (!szPrinterName) szPrinterName=(LPSTR)malloc(65536);
|
||||
dwNameLen=65536;
|
||||
GetDefaultPrinter(szPrinterName,&dwNameLen);
|
||||
if((dc=CreateDC(TEXT("WINSPOOL"),szPrinterName,NULL,NULL))==NULL) goto failed;
|
||||
ZeroMemory(&di,sizeof(DOCINFO));
|
||||
di.cbSize=sizeof(DOCINFO);
|
||||
di.lpszDocName=TEXT("Document");
|
||||
if(StartDoc(dc,&di)<=0){DeleteDC(dc); goto failed;}
|
||||
if(StartPage(dc)<=0){EndDoc(dc); DeleteDC(dc); goto failed;}
|
||||
|
||||
w=GetDeviceCaps(dc,HORZRES);
|
||||
h=GetDeviceCaps(dc,VERTRES);
|
||||
|
||||
i2=func__newimage(w,h,32,1);
|
||||
if (i2==-1){EndDoc(dc); DeleteDC(dc); goto failed;}
|
||||
s2=&img[-i2];
|
||||
sub__dontblend(i2,1);
|
||||
sub__putimage(NULL,NULL,NULL,NULL,i,i2,NULL,NULL,NULL,NULL,8+32);
|
||||
|
||||
ZeroMemory(&bi,sizeof(BITMAPINFOHEADER));
|
||||
|
||||
bi.biSize = sizeof(BITMAPINFOHEADER);
|
||||
bi.biWidth = w;
|
||||
bi.biHeight = h;
|
||||
bi.biPlanes = 1;
|
||||
bi.biBitCount = 32;
|
||||
bi.biCompression = BI_RGB;
|
||||
bi.biSizeImage = 0;
|
||||
bi.biXPelsPerMeter = 0;
|
||||
bi.biYPelsPerMeter = 0;
|
||||
bi.biClrUsed = 0;
|
||||
bi.biClrImportant = 0;
|
||||
|
||||
for (y=0;y<h;y++){
|
||||
SetDIBitsToDevice(dc,0,y,w,1,0,0,0,1,s2->offset32+(y*w),(BITMAPINFO*)&bi, DIB_RGB_COLORS);
|
||||
}
|
||||
|
||||
sub__freeimage(i2,1);
|
||||
|
||||
if(EndPage(dc)<=0){EndDoc(dc); DeleteDC(dc); goto failed;}
|
||||
if(EndDoc(dc)<=0){DeleteDC(dc); goto failed;}
|
||||
DeleteDC(dc);
|
||||
failed:;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
2
internal/c/libqb/printer.h
Normal file
2
internal/c/libqb/printer.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
//forward references
|
||||
void sub__printimage(int32 i);
|
1
internal/c/makedat_lnx32.txt
Normal file
1
internal/c/makedat_lnx32.txt
Normal file
|
@ -0,0 +1 @@
|
|||
objcopy -Ibinary -Oelf32-i386 -Bi386
|
3
internal/c/makedat_lnx64.txt
Normal file
3
internal/c/makedat_lnx64.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
objcopy -Ibinary -Oelf64-x86-64 -Bi386:x86-64
|
||||
|
||||
|
1
internal/c/makedat_win32.txt
Normal file
1
internal/c/makedat_win32.txt
Normal file
|
@ -0,0 +1 @@
|
|||
c_compiler\bin\objcopy -Ibinary -Oelf32-i386 -Bi386
|
1
internal/c/makedat_win64.txt
Normal file
1
internal/c/makedat_win64.txt
Normal file
|
@ -0,0 +1 @@
|
|||
c_compiler\bin\objcopy -Ibinary -Oelf64-x86-64 -Bi386:x86-64
|
2
internal/c/makeline_lnx.txt
Normal file
2
internal/c/makeline_lnx.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
g++ -w qbx.cpp parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o
|
||||
|
1
internal/c/makeline_osx.txt
Normal file
1
internal/c/makeline_osx.txt
Normal file
|
@ -0,0 +1 @@
|
|||
g++ -w qbx.cpp -framework GLUT -framework OpenGL -framework Cocoa -o
|
1
internal/c/makeline_win.txt
Normal file
1
internal/c/makeline_win.txt
Normal file
|
@ -0,0 +1 @@
|
|||
c_compiler\bin\g++ -s -Wfatal-errors -w -Wall qbx.cpp -lws2_32 -lwinspool parts\core\os\win\src.a -lopengl32 -lglu32 -lwinmm -lgdi32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lksguid -lole32 -lwinmm -ldxguid -o ..\..\
|
250
internal/c/msbin.c
Normal file
250
internal/c/msbin.c
Normal file
|
@ -0,0 +1,250 @@
|
|||
//
|
||||
// The following are implementations of Microsoft RTL functions not
|
||||
// include in the Borland RTL.
|
||||
//
|
||||
// Functions:
|
||||
// _fmsbintoieee()
|
||||
// _fieeetomsbin()
|
||||
// _dmsbintoieee()
|
||||
// _dieeetomsbin()
|
||||
//
|
||||
// These functions convert back and forth from Microsoft Binary Format
|
||||
// to IEEE floating point format.
|
||||
//
|
||||
// As with the Microsoft RTL functions,
|
||||
//
|
||||
// The argument srcX points to the value to be converted and the
|
||||
// result is stored at the location given at destX.
|
||||
//
|
||||
// These routines do not handle IEE NAN's and infinities. IEEE
|
||||
// denormals are treated as 0's.
|
||||
//
|
||||
// Return:
|
||||
//
|
||||
// These functions return 0 if the conversion is successful and 1
|
||||
// if the conversion causes an overflow.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Examples of the use of these functions can be found online as
|
||||
// MSBIN.ZIP.
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
//#include <string.h> /* for strncpy */
|
||||
|
||||
int32 _fmsbintoieee(float *src4, float *dest4)
|
||||
{
|
||||
unsigned char *msbin = (unsigned char *)src4;
|
||||
unsigned char *ieee = (unsigned char *)dest4;
|
||||
unsigned char sign = 0x00;
|
||||
unsigned char ieee_exp = 0x00;
|
||||
int32 i;
|
||||
|
||||
/* MS Binary Format */
|
||||
/* byte order => m3 | m2 | m1 | exponent */
|
||||
/* m1 is most significant byte => sbbb|bbbb */
|
||||
/* m3 is the least significant byte */
|
||||
/* m = mantissa byte */
|
||||
/* s = sign bit */
|
||||
/* b = bit */
|
||||
|
||||
sign = msbin[2] & 0x80; /* 1000|0000b */
|
||||
|
||||
/* IEEE Single Precision Float Format */
|
||||
/* m3 m2 m1 exponent */
|
||||
/* mmmm|mmmm mmmm|mmmm emmm|mmmm seee|eeee */
|
||||
/* s = sign bit */
|
||||
/* e = exponent bit */
|
||||
/* m = mantissa bit */
|
||||
|
||||
for (i=0; i<4; i++) ieee[i] = 0;
|
||||
|
||||
/* any msbin w/ exponent of zero = zero */
|
||||
if (msbin[3] == 0) return 0;
|
||||
|
||||
ieee[3] |= sign;
|
||||
|
||||
/* MBF is bias 128 and IEEE is bias 127. ALSO, MBF places */
|
||||
/* the decimal point before the assumed bit, while */
|
||||
/* IEEE places the decimal point after the assumed bit. */
|
||||
|
||||
ieee_exp = msbin[3] - 2; /* actually, msbin[3]-1-128+127 */
|
||||
|
||||
/* the first 7 bits of the exponent in ieee[3] */
|
||||
ieee[3] |= ieee_exp >> 1;
|
||||
|
||||
/* the one remaining bit in first bin of ieee[2] */
|
||||
ieee[2] |= ieee_exp << 7;
|
||||
|
||||
/* 0111|1111b : mask out the msbin sign bit */
|
||||
ieee[2] |= msbin[2] & 0x7f;
|
||||
|
||||
ieee[1] = msbin[1];
|
||||
ieee[0] = msbin[0];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32 _fieeetomsbin(float *src4, float *dest4)
|
||||
{
|
||||
unsigned char *ieee = (unsigned char *)src4;
|
||||
unsigned char *msbin = (unsigned char *)dest4;
|
||||
unsigned char sign = 0x00;
|
||||
unsigned char msbin_exp = 0x00;
|
||||
int32 i;
|
||||
|
||||
/* See _fmsbintoieee() for details of formats */
|
||||
sign = ieee[3] & 0x80;
|
||||
msbin_exp |= ieee[3] << 1;
|
||||
msbin_exp |= ieee[2] >> 7;
|
||||
|
||||
/* An ieee exponent of 0xfe overflows in MBF */
|
||||
if (msbin_exp == 0xfe) return 1;
|
||||
|
||||
msbin_exp += 2; /* actually, -127 + 128 + 1 */
|
||||
|
||||
for (i=0; i<4; i++) msbin[i] = 0;
|
||||
|
||||
msbin[3] = msbin_exp;
|
||||
|
||||
msbin[2] |= sign;
|
||||
msbin[2] |= ieee[2] & 0x7f;
|
||||
msbin[1] = ieee[1];
|
||||
msbin[0] = ieee[0];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int32 _dmsbintoieee(double *src8, double *dest8)
|
||||
{
|
||||
unsigned char msbin[8];
|
||||
unsigned char *ieee = (unsigned char *)dest8;
|
||||
unsigned char sign = 0x00;
|
||||
uint32 ieee_exp = 0x0000;
|
||||
int32 i;
|
||||
|
||||
/* A manipulatable copy of the msbin number */
|
||||
memcpy(msbin,src8,8); //strncpy((char *)msbin,(char *)src8,8);
|
||||
|
||||
|
||||
/* MS Binary Format */
|
||||
/* byte order => m7 | m6 | m5 | m4 | m3 | m2 | m1 | exponent */
|
||||
/* m1 is most significant byte => smmm|mmmm */
|
||||
/* m7 is the least significant byte */
|
||||
/* m = mantissa byte */
|
||||
/* s = sign bit */
|
||||
/* b = bit */
|
||||
|
||||
sign = msbin[6] & 0x80; /* 1000|0000b */
|
||||
|
||||
|
||||
/* IEEE Single Precision Float Format */
|
||||
/* byte 8 byte 7 byte 6 byte 5 byte 4 and so on */
|
||||
/* seee|eeee eeee|mmmm mmmm|mmmm mmmm|mmmm mmmm|mmmm ... */
|
||||
/* s = sign bit */
|
||||
/* e = exponent bit */
|
||||
/* m = mantissa bit */
|
||||
|
||||
for (i=0; i<8; i++) ieee[i] = 0;
|
||||
|
||||
/* any msbin w/ exponent of zero = zero */
|
||||
if (msbin[7] == 0) return 0;
|
||||
|
||||
|
||||
ieee[7] |= sign;
|
||||
|
||||
/* MBF is bias 128 and IEEE is bias 1023. ALSO, MBF places */
|
||||
/* the decimal point before the assumed bit, while */
|
||||
/* IEEE places the decimal point after the assumed bit. */
|
||||
|
||||
ieee_exp = msbin[7] - 128 - 1 + 1023;
|
||||
|
||||
/* First 4 bits of the msbin exponent */
|
||||
/* go into the last 4 bits of ieee[7] */
|
||||
ieee[7] |= ieee_exp >> 4;
|
||||
|
||||
/* The last 4 bits of msbin exponent */
|
||||
/* go into the first 4 bits of ieee[6] */
|
||||
ieee[6] |= ieee_exp << 4;
|
||||
|
||||
/* The msbin mantissa must be shifted to the right 1 bit. */
|
||||
/* Remember that the msbin number has its bytes reversed. */
|
||||
for (i=6; i>0; i--)
|
||||
{
|
||||
msbin[i] <<= 1;
|
||||
msbin[i] |= msbin[i-1] >> 7;
|
||||
}
|
||||
msbin[0] <<= 1;
|
||||
|
||||
/* Now the mantissa is put into the ieee array starting in */
|
||||
/* the middle of the second to last byte. */
|
||||
|
||||
for (i=6; i>0; i--)
|
||||
{
|
||||
ieee[i] |= msbin[i] >> 4;
|
||||
ieee[i-1] |= msbin[i] << 4;
|
||||
}
|
||||
ieee[0] |= msbin[0] >> 4;
|
||||
|
||||
/* IEEE has a half byte less for its mantissa. If the msbin */
|
||||
/* number has anything in this last half byte, then there is an */
|
||||
/* overflow. */
|
||||
if (msbin[0] & 0x0f)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32 _dieeetomsbin(double *src8, double *dest8)
|
||||
{
|
||||
unsigned char ieee[8];
|
||||
unsigned char *msbin = (unsigned char *)dest8;
|
||||
unsigned char sign = 0x00;
|
||||
unsigned char any_on = 0x00;
|
||||
uint32 msbin_exp = 0x0000;
|
||||
int32 i;
|
||||
|
||||
/* Make a clobberable copy of the source number */
|
||||
memcpy(ieee,src8,8); //strncpy((char *)ieee,(char *)src8,8);
|
||||
|
||||
for (i=0; i<8; i++) msbin[i] = 0;
|
||||
|
||||
/* If all are zero in src8, the msbin should be zero */
|
||||
for (i=0; i<8; i++) any_on |= ieee[i];
|
||||
if (!any_on) {return 0;}
|
||||
|
||||
sign = ieee[7] & 0x80;
|
||||
msbin[6] |= sign;
|
||||
msbin_exp = (unsigned)(ieee[7] & 0x7f) * 0x10;
|
||||
msbin_exp += ieee[6] >> 4;
|
||||
|
||||
if (msbin_exp-0x3ff > 0x80) return 1;
|
||||
|
||||
msbin[7] = msbin_exp - 0x3ff + 0x80 + 1;
|
||||
|
||||
/* The ieee mantissa must be shifted up 3 bits */
|
||||
ieee[6] &= 0x0f; /* mask out the exponent in the second byte */
|
||||
for (i=6; i>0; i--)
|
||||
{
|
||||
msbin[i] |= ieee[i] << 3;
|
||||
msbin[i] |= ieee[i-1] >> 5;
|
||||
}
|
||||
|
||||
msbin[0] |= ieee[0] << 3;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
199
internal/c/mtri1.cpp
Normal file
199
internal/c/mtri1.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
|
||||
mtri1_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri1_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri1_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(y*dwidth+x2))=src_offset32[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(y*dwidth+x1))=src_offset32[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri1_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(pixel_offset32++)=src_offset32[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri1_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri1_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri1_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
200
internal/c/mtri1s.cpp
Normal file
200
internal/c/mtri1s.cpp
Normal file
|
@ -0,0 +1,200 @@
|
|||
|
||||
mtri1s_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri1s_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri1s_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(x2*dheight+y))=src_offset32[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1s_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1s_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(x1*dheight+y))=src_offset32[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri1s_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*pixel_offset32=src_offset32[(ty>>16)*swidth+(tx>>16)];
|
||||
pixel_offset32+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri1s_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri1s_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri1s_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
199
internal/c/mtri1t.cpp
Normal file
199
internal/c/mtri1t.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
|
||||
mtri1t_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri1t_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri1t_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(y*dwidth+x2))=src_offset32[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1t_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1t_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(y*dwidth+x1))=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri1t_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(pixel_offset32++)=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri1t_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri1t_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri1t_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
200
internal/c/mtri1ts.cpp
Normal file
200
internal/c/mtri1ts.cpp
Normal file
|
@ -0,0 +1,200 @@
|
|||
|
||||
mtri1ts_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri1ts_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri1ts_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(x2*dheight+y))=src_offset32[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1ts_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri1ts_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset32+(x1*dheight+y))=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri1ts_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*pixel_offset32=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
pixel_offset32+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri1ts_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri1ts_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri1ts_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
268
internal/c/mtri2.cpp
Normal file
268
internal/c/mtri2.cpp
Normal file
|
@ -0,0 +1,268 @@
|
|||
|
||||
mtri2_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri2_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri2_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x2);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(g2ty>>16)*swidth+(g2tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(ty>>16)*swidth+(tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri2_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(ty>>16)*swidth+(tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
pixel_offset32++;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri2_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri2_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri2_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
268
internal/c/mtri2s.cpp
Normal file
268
internal/c/mtri2s.cpp
Normal file
|
@ -0,0 +1,268 @@
|
|||
|
||||
mtri2s_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri2s_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri2s_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x2*dheight+y);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(g2ty>>16)*swidth+(g2tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2s_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2s_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(ty>>16)*swidth+(tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri2s_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[(ty>>16)*swidth+(tx>>16)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
pixel_offset32+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri2s_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri2s_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri2s_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
268
internal/c/mtri2t.cpp
Normal file
268
internal/c/mtri2t.cpp
Normal file
|
@ -0,0 +1,268 @@
|
|||
|
||||
mtri2t_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri2t_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri2t_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x2);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2t_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2t_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri2t_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
pixel_offset32++;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri2t_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri2t_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri2t_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
268
internal/c/mtri2ts.cpp
Normal file
268
internal/c/mtri2ts.cpp
Normal file
|
@ -0,0 +1,268 @@
|
|||
|
||||
mtri2ts_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri2ts_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri2ts_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x2*dheight+y);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2ts_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri2ts_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri2ts_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset32=dst_offset32+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
//--------plot pixel--------
|
||||
switch((col=src_offset32[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)])&0xFF000000){
|
||||
case 0xFF000000:
|
||||
*pixel_offset32=col;
|
||||
break;
|
||||
case 0x0:
|
||||
break;
|
||||
case 0x80000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend128[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
case 0x7F000000:
|
||||
*pixel_offset32=(((*pixel_offset32&0xFEFEFE)+(col&0xFEFEFE))>>1)+(ablend127[*pixel_offset32>>24]<<24);
|
||||
break;
|
||||
default:
|
||||
destcol=*pixel_offset32;
|
||||
cp=cblend+(col>>24<<16);
|
||||
*pixel_offset32=
|
||||
cp[(col<<8&0xFF00)+(destcol&255) ]
|
||||
+(cp[(col&0xFF00) +(destcol>>8&255) ]<<8)
|
||||
+(cp[(col>>8&0xFF00)+(destcol>>16&255)]<<16)
|
||||
+(ablend[(col>>24)+(destcol>>16&0xFF00)]<<24);
|
||||
};//switch
|
||||
//--------done plot pixel--------
|
||||
pixel_offset32+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri2ts_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri2ts_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri2ts_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
199
internal/c/mtri3.cpp
Normal file
199
internal/c/mtri3.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
|
||||
mtri3_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri3_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri3_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(y*dwidth+x2))=src_offset[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(y*dwidth+x1))=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri3_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(pixel_offset++)=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri3_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri3_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri3_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
200
internal/c/mtri3s.cpp
Normal file
200
internal/c/mtri3s.cpp
Normal file
|
@ -0,0 +1,200 @@
|
|||
|
||||
mtri3s_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri3s_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri3s_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(x2*dheight+y))=src_offset[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3s_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3s_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(x1*dheight+y))=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri3s_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*pixel_offset=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
pixel_offset+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri3s_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri3s_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri3s_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
199
internal/c/mtri3t.cpp
Normal file
199
internal/c/mtri3t.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
|
||||
mtri3t_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri3t_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri3t_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(y*dwidth+x2))=src_offset[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3t_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3t_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(y*dwidth+x1))=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri3t_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(pixel_offset++)=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri3t_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri3t_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri3t_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
200
internal/c/mtri3ts.cpp
Normal file
200
internal/c/mtri3ts.cpp
Normal file
|
@ -0,0 +1,200 @@
|
|||
|
||||
mtri3ts_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri3ts_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri3ts_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(x2*dheight+y))=src_offset[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3ts_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri3ts_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*(dst_offset+(x1*dheight+y))=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri3ts_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
*pixel_offset=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
pixel_offset+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri3ts_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri3ts_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri3ts_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
203
internal/c/mtri4.cpp
Normal file
203
internal/c/mtri4.cpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
mtri4_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri4_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri4_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
if (col!=transparent_color) *(dst_offset+(y*dwidth+x2))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
if (col!=transparent_color) *(dst_offset+(y*dwidth+x1))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri4_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
if (col!=transparent_color) *pixel_offset=col;
|
||||
pixel_offset++;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri4_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri4_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri4_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
203
internal/c/mtri4s.cpp
Normal file
203
internal/c/mtri4s.cpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
mtri4s_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri4s_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri4s_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(g2ty>>16)*swidth+(g2tx>>16)];
|
||||
if (col!=transparent_color) *(dst_offset+(x2*dheight+y))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4s_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4s_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
if (col!=transparent_color) *(dst_offset+(x1*dheight+y))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri4s_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[(ty>>16)*swidth+(tx>>16)];
|
||||
if (col!=transparent_color) *pixel_offset=col;
|
||||
pixel_offset+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri4s_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri4s_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri4s_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
203
internal/c/mtri4t.cpp
Normal file
203
internal/c/mtri4t.cpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
mtri4t_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri4t_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri4t_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *(dst_offset+(y*dwidth+x2))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4t_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4t_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *(dst_offset+(y*dwidth+x1))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri4t_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(y*dwidth+x1);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *pixel_offset=col;
|
||||
pixel_offset++;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri4t_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri4t_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri4t_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
203
internal/c/mtri4ts.cpp
Normal file
203
internal/c/mtri4ts.cpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
mtri4ts_usegrad3:;
|
||||
|
||||
|
||||
if(final == 1){
|
||||
if(no_edge_overlap) y2 = y2 - 1;
|
||||
}
|
||||
|
||||
//not on screen?
|
||||
if(y1 >= dheight){
|
||||
return;
|
||||
}
|
||||
if(y2 < 0){
|
||||
if(final) return;
|
||||
//jump to y2's position
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = y2 - y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
goto mtri4ts_final;
|
||||
}
|
||||
|
||||
//clip top
|
||||
if(y1 < 0){
|
||||
//note; original point locations are referenced because they are unmodified & represent the true distance of the run
|
||||
y = -y1;
|
||||
p1 = g1->p1; p2 = g1->p2;
|
||||
d = g1->y2 - g1->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g1->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g1->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g1->x += i64 * y / d;
|
||||
p1 = g2->p1; p2 = g2->p2;
|
||||
}
|
||||
d = g2->y2 - g2->y1;
|
||||
if(d){
|
||||
i64 = p2->tx - p1->tx;
|
||||
g2->tx += i64 * y / d;
|
||||
i64 = p2->ty - p1->ty;
|
||||
g2->ty += i64 * y / d;
|
||||
i64 = p2->x - p1->x;
|
||||
g2->x += i64 * y / d;
|
||||
}
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if(y2 >= dheight){ //clip bottom
|
||||
y2 = dheight - 1;
|
||||
}
|
||||
|
||||
//move indexed variable values into direct variables for faster referencing within 2nd bottleneck
|
||||
g1x = g1->x; g2x = g2->x;
|
||||
g1tx = g1->tx; g2tx = g2->tx;
|
||||
g1ty = g1->ty; g2ty = g2->ty;
|
||||
g1xi = g1->xi; g2xi = g2->xi;
|
||||
g1txi = g1->txi; g2txi = g2->txi;
|
||||
g1tyi = g1->tyi; g2tyi = g2->tyi;
|
||||
|
||||
//2nd bottleneck
|
||||
for(y=y1;y<=y2;y++){
|
||||
|
||||
if(g1x < 0) x1 = (g1x - 65535) / 65536;else x1 = g1x / 65536; //int-style rounding of fixed-point value
|
||||
if(g2x < 0) x2 = (g2x - 65535) / 65536;else x2 = g2x / 65536;
|
||||
|
||||
if(x1 >= dwidth | x2 < 0) goto mtri4ts_donerow; //crop if(entirely offscreen
|
||||
|
||||
tx = g1tx; ty = g1ty;
|
||||
|
||||
//calculate gradients if they might be required
|
||||
if(x1 != x2){
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx; txi = (i64 << 16) / d;
|
||||
i64 = g2ty - g1ty; tyi = (i64 << 16) / d;
|
||||
}else{
|
||||
txi = 0; tyi = 0;
|
||||
}
|
||||
|
||||
//calculate pixel offsets from ideals
|
||||
loff = ((g1x & 65535) - 32768); //note; works for positive & negative values
|
||||
roff = ((g2x & 65535) - 32768);
|
||||
|
||||
if(roff < 0){ //not enough of rhs pixel exists to use
|
||||
if(x2 < dwidth & no_edge_overlap == 0){ //onscreen check
|
||||
//draw rhs pixel as is
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((g2ty>>16)%sheight)*swidth+((g2tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *(dst_offset+(x2*dheight+y))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//move left one position
|
||||
x2--;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4ts_donerow; //no more to do
|
||||
}else{
|
||||
if(no_edge_overlap){
|
||||
x2 = x2 - 1;
|
||||
if(x1 > x2 | x2 < 0) goto mtri4ts_donerow; //no more to do
|
||||
}
|
||||
}
|
||||
|
||||
if(loff > 0){
|
||||
//draw lhs pixel as is
|
||||
if(x1 >= 0){
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *(dst_offset+(x1*dheight+y))=col;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//skip to next x location, effectively reducing steps by 1
|
||||
x1++;
|
||||
if(x1 > x2) goto mtri4ts_donerow;
|
||||
loff = -(65536 - loff); //adjust alignment to jump to next ideal offset
|
||||
}
|
||||
|
||||
//align to loff
|
||||
i64 = -loff;
|
||||
tx += (i64 * txi) / 65536;
|
||||
ty += (i64 * tyi) / 65536;
|
||||
|
||||
if(x1 < 0){ //clip left
|
||||
d = g2x - g1x;
|
||||
i64 = g2tx - g1tx;
|
||||
tx += ((i64 << 16) * -x1) / d;
|
||||
i64 = g2ty - g1ty;
|
||||
ty += ((i64 << 16) * -x1) / d;
|
||||
if(x1 < 0) x1 = 0;
|
||||
}
|
||||
|
||||
if(x2 >= dwidth){
|
||||
x2 = dwidth - 1; //clip right
|
||||
}
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
pixel_offset=dst_offset+(x1*dheight+y);
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
//bottleneck
|
||||
for(x=x1;x<=x2;x++){
|
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
col=src_offset[((ty>>16)%sheight)*swidth+((tx>>16)%swidth)];
|
||||
if (col!=transparent_color) *pixel_offset=col;
|
||||
pixel_offset+=dheight;
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
tx += txi;
|
||||
ty += tyi;
|
||||
|
||||
}
|
||||
|
||||
mtri4ts_donerow:;
|
||||
|
||||
if(y != y2){
|
||||
g1x += g1xi; g1tx += g1txi; g1ty += g1tyi;
|
||||
g2x += g2xi; g2tx += g2txi; g2ty += g2tyi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(final == 0){
|
||||
|
||||
//update indexed variable values with direct variable values which have changed & may be required
|
||||
g1->x = g1x; g2->x = g2x;
|
||||
g1->tx = g1tx; g2->tx = g2tx;
|
||||
g1->ty = g1ty; g2->ty = g2ty;
|
||||
|
||||
mtri4ts_final:;
|
||||
if(y2 < dheight - 1){ //no point continuing if(offscreen!
|
||||
if(g1->y2 < g2->y2) g1 = g3;else g2 = g3;
|
||||
|
||||
//avoid doing the same row twice
|
||||
y1 = g3->y1 + 1;
|
||||
y2 = g3->y2;
|
||||
g1->x += g1->xi; g1->tx += g1->txi; g1->ty += g1->tyi;
|
||||
g2->x += g2->xi; g2->tx += g2->txi; g2->ty += g2->tyi;
|
||||
|
||||
final = 1;
|
||||
goto mtri4ts_usegrad3;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
209
internal/c/myip.cpp
Normal file
209
internal/c/myip.cpp
Normal file
|
@ -0,0 +1,209 @@
|
|||
//Note: Updated 26/3/2014: Switched to WWW.QB64.NET to avoid IP changes when QB64 moves servers
|
||||
//Note: Updated 16/1/2013: Switched to QB64.NET IP service
|
||||
//Note: Updated 15/7/2013: Switched to 223.27.25.123 because of DNS issues
|
||||
|
||||
/*
|
||||
PRINT whatismyip$
|
||||
|
||||
$CHECKING:OFF
|
||||
FUNCTION whatismyip$
|
||||
c = _OPENCLIENT("TCP/IP:80:www.qb64.net")
|
||||
IF c = 0 THEN EXIT FUNCTION
|
||||
'send request
|
||||
e$ = CHR$(13) + CHR$(10)
|
||||
x$ = "GET /ip.php HTTP/1.1" + e$
|
||||
x$ = x$ + "Host: www.qb64.net" + e$
|
||||
x$ = x$ + "" + e$
|
||||
PUT #c, , x$
|
||||
'wait for reply
|
||||
t! = TIMER
|
||||
DO
|
||||
IF TIMER - t! > 5 THEN CLOSE c: EXIT FUNCTION
|
||||
_DELAY 0.1
|
||||
GET #c, , a2$
|
||||
a$ = a$ + a2$
|
||||
dots = 0
|
||||
start = 0
|
||||
FOR x = 1 TO LEN(a$)
|
||||
a = ASC(a$, x)
|
||||
IF a >= 48 AND a <= 57 THEN
|
||||
IF start = 0 THEN start = x
|
||||
ELSE
|
||||
IF a = 46 AND start <> 0 THEN
|
||||
dots = dots + 1
|
||||
ELSE
|
||||
IF dots = 3 THEN
|
||||
ip$ = MID$(a$, start, x - start)
|
||||
EXIT DO
|
||||
END IF
|
||||
start = 0: dots = 0
|
||||
END IF
|
||||
END IF
|
||||
NEXT
|
||||
LOOP
|
||||
CLOSE c
|
||||
whatismyip$ = ip$
|
||||
END FUNCTION
|
||||
$CHECKING:ON
|
||||
*/
|
||||
|
||||
qbs* WHATISMYIP(){ //changed name from FUNC_WHATISMYIP to WHATISMYIP
|
||||
qbs *tqbs;
|
||||
ptrszint tmp_long;
|
||||
int32 tmp_fileno;
|
||||
uint32 qbs_tmp_base=qbs_tmp_list_nexti;
|
||||
uint8 *tmp_mem_static_pointer=mem_static_pointer;
|
||||
uint32 tmp_cmem_sp=cmem_sp;
|
||||
|
||||
|
||||
//data.txt
|
||||
qbs *_FUNC_WHATISMYIP_STRING_WHATISMYIP=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_WHATISMYIP)_FUNC_WHATISMYIP_STRING_WHATISMYIP=qbs_new(0,0);
|
||||
float *_FUNC_WHATISMYIP_SINGLE_C=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_C==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_C=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_C=0;
|
||||
}
|
||||
qbs *_FUNC_WHATISMYIP_STRING_E=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_E)_FUNC_WHATISMYIP_STRING_E=qbs_new(0,0);
|
||||
qbs *_FUNC_WHATISMYIP_STRING_X=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_X)_FUNC_WHATISMYIP_STRING_X=qbs_new(0,0);
|
||||
byte_element_struct *byte_element_5276=NULL;
|
||||
if (!byte_element_5276){
|
||||
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5276=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5276=(byte_element_struct*)mem_static_malloc(12);
|
||||
}
|
||||
float *_FUNC_WHATISMYIP_SINGLE_T=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_T==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_T=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_T=0;
|
||||
}
|
||||
qbs *_FUNC_WHATISMYIP_STRING_A2=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_A2)_FUNC_WHATISMYIP_STRING_A2=qbs_new(0,0);
|
||||
qbs *_FUNC_WHATISMYIP_STRING_A=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_A)_FUNC_WHATISMYIP_STRING_A=qbs_new(0,0);
|
||||
float *_FUNC_WHATISMYIP_SINGLE_DOTS=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_DOTS==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_DOTS=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_DOTS=0;
|
||||
}
|
||||
float *_FUNC_WHATISMYIP_SINGLE_START=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_START==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_START=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_START=0;
|
||||
}
|
||||
float *_FUNC_WHATISMYIP_SINGLE_X=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_X==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_X=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_X=0;
|
||||
}
|
||||
double fornext_value5279;
|
||||
double fornext_finalvalue5279;
|
||||
double fornext_step5279;
|
||||
uint8 fornext_step_negative5279;
|
||||
byte_element_struct *byte_element_5280=NULL;
|
||||
if (!byte_element_5280){
|
||||
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5280=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5280=(byte_element_struct*)mem_static_malloc(12);
|
||||
}
|
||||
float *_FUNC_WHATISMYIP_SINGLE_A=NULL;
|
||||
if(_FUNC_WHATISMYIP_SINGLE_A==NULL){
|
||||
_FUNC_WHATISMYIP_SINGLE_A=(float*)mem_static_malloc(4);
|
||||
*_FUNC_WHATISMYIP_SINGLE_A=0;
|
||||
}
|
||||
qbs *_FUNC_WHATISMYIP_STRING_IP=NULL;
|
||||
if (!_FUNC_WHATISMYIP_STRING_IP)_FUNC_WHATISMYIP_STRING_IP=qbs_new(0,0);
|
||||
|
||||
|
||||
|
||||
if (new_error) goto exit_subfunc;
|
||||
mem_lock *sf_mem_lock;
|
||||
new_mem_lock();
|
||||
sf_mem_lock=mem_lock_tmp;
|
||||
sf_mem_lock->type=3;
|
||||
*_FUNC_WHATISMYIP_SINGLE_C=func__openclient(qbs_new_txt_len("TCP/IP:80:www.qb64.net",22));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
if ((-(*_FUNC_WHATISMYIP_SINGLE_C== 0 ))||new_error){
|
||||
goto exit_subfunc;
|
||||
}
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_E,qbs_add(func_chr( 13 ),func_chr( 10 )));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_X,qbs_add(qbs_new_txt_len("GET /ip.php HTTP/1.1",20),_FUNC_WHATISMYIP_STRING_E));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_X,qbs_add(qbs_add(_FUNC_WHATISMYIP_STRING_X,qbs_new_txt_len("Host: www.qb64.net",18)),_FUNC_WHATISMYIP_STRING_E));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_X,qbs_add(qbs_add(_FUNC_WHATISMYIP_STRING_X,qbs_new_txt_len("",0)),_FUNC_WHATISMYIP_STRING_E));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
sub_put2(qbr(*_FUNC_WHATISMYIP_SINGLE_C),NULL,byte_element((uint64)_FUNC_WHATISMYIP_STRING_X->chr,_FUNC_WHATISMYIP_STRING_X->len,byte_element_5276),0);
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
*_FUNC_WHATISMYIP_SINGLE_T=func_timer(NULL,0);
|
||||
do{
|
||||
if ((-((func_timer(NULL,0)-*_FUNC_WHATISMYIP_SINGLE_T)>( 5 )))||new_error){
|
||||
sub_close(qbr(*_FUNC_WHATISMYIP_SINGLE_C),1);
|
||||
goto exit_subfunc;
|
||||
}
|
||||
sub__delay( 0.1E+0 );
|
||||
sub_get2(qbr(*_FUNC_WHATISMYIP_SINGLE_C),NULL,_FUNC_WHATISMYIP_STRING_A2,0);
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_A,qbs_add(_FUNC_WHATISMYIP_STRING_A,_FUNC_WHATISMYIP_STRING_A2));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
*_FUNC_WHATISMYIP_SINGLE_DOTS= 0 ;
|
||||
*_FUNC_WHATISMYIP_SINGLE_START= 0 ;
|
||||
fornext_value5279= 1 ;
|
||||
fornext_finalvalue5279=_FUNC_WHATISMYIP_STRING_A->len;
|
||||
fornext_step5279= 1 ;
|
||||
if (fornext_step5279<0) fornext_step_negative5279=1; else fornext_step_negative5279=0;
|
||||
if (new_error) goto fornext_error5279;
|
||||
goto fornext_entrylabel5279;
|
||||
while(1){
|
||||
fornext_value5279=fornext_step5279+(*_FUNC_WHATISMYIP_SINGLE_X);
|
||||
fornext_entrylabel5279:
|
||||
*_FUNC_WHATISMYIP_SINGLE_X=fornext_value5279;
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
if (fornext_step_negative5279){
|
||||
if (fornext_value5279<fornext_finalvalue5279) break;
|
||||
}else{
|
||||
if (fornext_value5279>fornext_finalvalue5279) break;
|
||||
}
|
||||
fornext_error5279:;
|
||||
*_FUNC_WHATISMYIP_SINGLE_A=qbs_asc(_FUNC_WHATISMYIP_STRING_A,qbr(*_FUNC_WHATISMYIP_SINGLE_X));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
if (((-(*_FUNC_WHATISMYIP_SINGLE_A>= 48 ))&(-(*_FUNC_WHATISMYIP_SINGLE_A<= 57 )))||new_error){
|
||||
if ((-(*_FUNC_WHATISMYIP_SINGLE_START== 0 ))||new_error){
|
||||
*_FUNC_WHATISMYIP_SINGLE_START=*_FUNC_WHATISMYIP_SINGLE_X;
|
||||
}
|
||||
}else{
|
||||
if (((-(*_FUNC_WHATISMYIP_SINGLE_A== 46 ))&(-(*_FUNC_WHATISMYIP_SINGLE_START!= 0 )))||new_error){
|
||||
*_FUNC_WHATISMYIP_SINGLE_DOTS=*_FUNC_WHATISMYIP_SINGLE_DOTS+ 1 ;
|
||||
}else{
|
||||
if ((-(*_FUNC_WHATISMYIP_SINGLE_DOTS== 3 ))||new_error){
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_IP,func_mid(_FUNC_WHATISMYIP_STRING_A,qbr(*_FUNC_WHATISMYIP_SINGLE_START),qbr(*_FUNC_WHATISMYIP_SINGLE_X-*_FUNC_WHATISMYIP_SINGLE_START),1));
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
goto dl_exit_5277;
|
||||
}
|
||||
*_FUNC_WHATISMYIP_SINGLE_START= 0 ;
|
||||
*_FUNC_WHATISMYIP_SINGLE_DOTS= 0 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
fornext_exit_5278:;
|
||||
}while(1);
|
||||
dl_exit_5277:;
|
||||
sub_close(qbr(*_FUNC_WHATISMYIP_SINGLE_C),1);
|
||||
qbs_set(_FUNC_WHATISMYIP_STRING_WHATISMYIP,_FUNC_WHATISMYIP_STRING_IP);
|
||||
qbs_cleanup(qbs_tmp_base,0);
|
||||
exit_subfunc:;
|
||||
free_mem_lock(sf_mem_lock);
|
||||
|
||||
|
||||
//free.txt
|
||||
qbs_free(_FUNC_WHATISMYIP_STRING_E);
|
||||
qbs_free(_FUNC_WHATISMYIP_STRING_X);
|
||||
qbs_free(_FUNC_WHATISMYIP_STRING_A2);
|
||||
qbs_free(_FUNC_WHATISMYIP_STRING_A);
|
||||
qbs_free(_FUNC_WHATISMYIP_STRING_IP);
|
||||
|
||||
|
||||
|
||||
if ((tmp_mem_static_pointer>=mem_static)&&(tmp_mem_static_pointer<=mem_static_limit)) mem_static_pointer=tmp_mem_static_pointer; else mem_static_pointer=mem_static;
|
||||
cmem_sp=tmp_cmem_sp;
|
||||
qbs_maketmp(_FUNC_WHATISMYIP_STRING_WHATISMYIP);return _FUNC_WHATISMYIP_STRING_WHATISMYIP;
|
||||
}
|
73
internal/c/os.h
Normal file
73
internal/c/os.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
//OS/compiler detection
|
||||
#ifdef WIN32
|
||||
#define QB64_WINDOWS
|
||||
#define QB64_BACKSLASH_FILESYSTEM
|
||||
#define NO_STDIO_REDIRECT
|
||||
#ifdef _MSC_VER
|
||||
#define QB64_MICROSOFT
|
||||
#else
|
||||
#define QB64_GCC
|
||||
#define QB64_MINGW
|
||||
#endif
|
||||
#else
|
||||
#define QB64_LINUX
|
||||
#define QB64_GCC
|
||||
#ifdef __APPLE__
|
||||
#define QB64_MACOSX
|
||||
#endif
|
||||
#ifdef __ANDROID__
|
||||
#define QB64_ANDROID
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//common types
|
||||
#ifndef QB64_OS_H_NO_TYPES
|
||||
#ifdef QB64_WINDOWS
|
||||
#define uint64 unsigned __int64
|
||||
#define uint32 unsigned __int32
|
||||
#define uint16 unsigned __int16
|
||||
#define uint8 unsigned __int8
|
||||
#define int64 __int64
|
||||
#define int32 __int32
|
||||
#define int16 __int16
|
||||
#define int8 __int8
|
||||
#else
|
||||
#define int64 int64_t
|
||||
#define int32 int32_t
|
||||
#define int16 int16_t
|
||||
#define int8 int8_t
|
||||
#define uint64 uint64_t
|
||||
#define uint32 uint32_t
|
||||
#define uint16 uint16_t
|
||||
#define uint8 uint8_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Check windows
|
||||
#if _WIN32 || _WIN64
|
||||
#if _WIN64
|
||||
#define QB64_64
|
||||
#else
|
||||
#define QB64_32
|
||||
#endif
|
||||
#endif
|
||||
// Check GCC
|
||||
#if __GNUC__
|
||||
#if __x86_64__ || __ppc64__
|
||||
#define QB64_64
|
||||
#else
|
||||
#define QB64_32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef QB64_OS_H_NO_TYPES
|
||||
#ifdef QB64_64
|
||||
#define ptrszint int64
|
||||
#define uptrszint uint64
|
||||
#define ptrsz 8
|
||||
#else
|
||||
#define ptrszint int32
|
||||
#define uptrszint uint32
|
||||
#define ptrsz 4
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1 @@
|
|||
Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
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 Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,143 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1561
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/config.guess
vendored
Normal file
1561
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load diff
1686
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/config.sub
vendored
Normal file
1686
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,630 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,520 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
9642
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/ltmain.sh
Executable file
9642
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/Cfg/ltmain.sh
Executable file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,376 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar*)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar*)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,117 @@
|
|||
Install Instructions for libsamplerate
|
||||
======================================
|
||||
|
||||
The following instructions explain how to install libsamplerate under
|
||||
Linux and other Unix like systems including Mac OSX. (For windows,
|
||||
see http://www.mega-nerd.com/SRC/win32.html).
|
||||
|
||||
Preliminaries
|
||||
-------------
|
||||
1) Included with libsamplerate is a command line program named
|
||||
sndfile-resample which uses libnsdile:
|
||||
|
||||
http://www.mega-nerd.com/libsndfile/
|
||||
|
||||
for file I/O. If you want to use sndfile-resample you need to
|
||||
ensure that libsndfile is correctly installed first. If it is, the
|
||||
command "pkg-config --cflags --libs sndfile" should print out
|
||||
something like this:
|
||||
|
||||
-lsndfile
|
||||
|
||||
If pkg-config doesn't exist you will need need to install it. If
|
||||
pkg-config cannot find libsndfile you may need install it. If you
|
||||
install from from a Linux distribution package, make sure you also
|
||||
install the libsndfile-devel package which contains the header files.
|
||||
|
||||
If libsndfile is installed, you may need to set the PKG_CONFIG_PATH
|
||||
environment variable. If libsndfile is installed in /usr/local/lib,
|
||||
you will need to set PKG_CONFIG_PATH using:
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
|
||||
Pkg-config should now work. If it doesn't you need to fix it if you
|
||||
want to use sndfile-resample.
|
||||
|
||||
2) The included tests suite for libsamplerate needs libfftw3 which is
|
||||
available here:
|
||||
|
||||
http://www.fftw.org/
|
||||
|
||||
If FFTW3 is not available, libsamplerate should still compile and
|
||||
install without problems but the test suite will not be as
|
||||
comprehensive as it normally is.
|
||||
|
||||
Building
|
||||
--------
|
||||
Building and verifying libsamplerate is a four or five step process.
|
||||
|
||||
1) The first step is to run configure
|
||||
|
||||
./configure
|
||||
|
||||
which should print out something like the following:
|
||||
|
||||
checking build system type...
|
||||
...
|
||||
...
|
||||
-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
Configuration summary :
|
||||
|
||||
Version : ..................... X.Y.Z
|
||||
Enable debugging : ............ no
|
||||
|
||||
Tools :
|
||||
|
||||
Compiler is GCC : ............. yes
|
||||
GCC major version : ........... 3
|
||||
|
||||
Extra tools required for testing and examples :
|
||||
|
||||
Use FFTW : .................... yes
|
||||
Have libsndfile : ............. yes
|
||||
|
||||
Installation directories :
|
||||
|
||||
Library directory : ........... /usr/local/lib
|
||||
Program directory : ........... /usr/local/bin
|
||||
Pkgconfig directory : ......... /usr/local/lib/pkgconfig
|
||||
|
||||
Compiling some other packages against libsamplerate may require
|
||||
the addition of "/usr/local/lib/pkgconfig" to the
|
||||
PKG_CONFIG_PATH environment variable.
|
||||
|
||||
There are a number of configure options. See the output of
|
||||
configure when run with the --help command line option.
|
||||
|
||||
2) If all goes well with the above then compiling the library can be
|
||||
done with
|
||||
|
||||
make
|
||||
|
||||
3) When that has finished, the test suite can be run using:
|
||||
|
||||
make check
|
||||
|
||||
4) The final step is to install the library. This step needs to be
|
||||
carried out as the root user (or with sudo):
|
||||
|
||||
make install
|
||||
|
||||
This command will by default install the library in the directory
|
||||
/usr/local/lib. It can in installed in other location by using the
|
||||
--prefix option in step 1).
|
||||
|
||||
5) On linux, one more step is required, the registering of the library
|
||||
with the system. This is done by running the following command
|
||||
(also as the root user):
|
||||
|
||||
ldconfig -v
|
||||
|
||||
As a final test, you can run
|
||||
|
||||
sndfile-resample
|
||||
|
||||
to make sure everything is installed correctly.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = add_cflags.m4 endian.m4
|
||||
|
|
@ -0,0 +1,392 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = M4
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/check_signal.m4 \
|
||||
$(top_srcdir)/M4/clip_mode.m4 $(top_srcdir)/M4/endian.m4 \
|
||||
$(top_srcdir)/M4/libtool.m4 $(top_srcdir)/M4/lrint.m4 \
|
||||
$(top_srcdir)/M4/lrintf.m4 $(top_srcdir)/M4/ltoptions.m4 \
|
||||
$(top_srcdir)/M4/ltsugar.m4 $(top_srcdir)/M4/ltversion.m4 \
|
||||
$(top_srcdir)/M4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILER_IS_GCC = @COMPILER_IS_GCC@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLLWRAP = @DLLWRAP@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFTW3_CFLAGS = @FFTW3_CFLAGS@
|
||||
FFTW3_LIBS = @FFTW3_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_FFTW3 = @HAVE_FFTW3@
|
||||
HAVE_SNDFILE = @HAVE_SNDFILE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_SPECIFIC_INCLUDES = @OS_SPECIFIC_INCLUDES@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PEXPORTS = @PEXPORTS@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
htmldocdir = @htmldocdir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = add_cflags.m4 endian.m4
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu M4/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu M4/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,17 @@
|
|||
dnl @synopsis AC_ADD_CFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CFLAGS, if it doesn't break the compiler
|
||||
|
||||
AC_DEFUN([AC_ADD_CFLAGS],
|
||||
[AC_MSG_CHECKING([if $CC accepts $1])
|
||||
ac_add_cflags__old_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$ac_add_cflags__old_cflags"
|
||||
)
|
||||
])# AC_ADD_CFLAGS
|
|
@ -0,0 +1,26 @@
|
|||
dnl @synopsis AC_CHECK_SIGNAL(SIGNAME)
|
||||
dnl
|
||||
dnl
|
||||
dnl @category C
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl @version 1.0 Jul 07 2007
|
||||
|
||||
AC_DEFUN([AC_CHECK_SIGNAL],
|
||||
[AC_CACHE_CHECK(for $1,
|
||||
ac_cv_signal_$1,
|
||||
[
|
||||
AC_TRY_LINK([
|
||||
#include <signal.h>
|
||||
|
||||
], signal($1, SIG_DFL) ;, ac_cv_signal_$1=yes, ac_cv_signal_$1=no)
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_signal_$1" = yes; then
|
||||
AC_DEFINE(HAVE_$1, 1,
|
||||
[Define if you have signal $1.])
|
||||
fi
|
||||
])# AC_CHECK_SIGNAL
|
||||
|
||||
|
||||
## AC_CHECK_SIGNALS
|
|
@ -0,0 +1,124 @@
|
|||
dnl @synopsis AC_C_CLIP_MODE
|
||||
dnl
|
||||
dnl Determine the clipping mode when converting float to int.
|
||||
dnl @version 1.0 May 17 2003
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dnl Find the clipping mode in the following way:
|
||||
dnl 1) If we are not cross compiling test it.
|
||||
dnl 2) IF we are cross compiling, assume that clipping isn't done correctly.
|
||||
|
||||
AC_DEFUN([AC_C_CLIP_MODE],
|
||||
[AC_CACHE_CHECK(processor clipping capabilities,
|
||||
ac_cv_c_clip_type,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_clip_positive=unknown
|
||||
ac_cv_c_clip_negative=unknown
|
||||
|
||||
|
||||
if test $ac_cv_c_clip_positive = unknown ; then
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = 1.0 * 0x7FFFFFFF ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != 127)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_positive=yes,
|
||||
ac_cv_c_clip_positive=no,
|
||||
ac_cv_c_clip_positive=unknown
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = -8.0 * 0x10000000 ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != -128)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_negative=yes,
|
||||
ac_cv_c_clip_negative=no,
|
||||
ac_cv_c_clip_negative=unknown
|
||||
)
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_positive = yes ; then
|
||||
ac_cv_c_clip_positive=1
|
||||
else
|
||||
ac_cv_c_clip_positive=0
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_negative = yes ; then
|
||||
ac_cv_c_clip_negative=1
|
||||
else
|
||||
ac_cv_c_clip_negative=0
|
||||
fi
|
||||
|
||||
[[
|
||||
case "$ac_cv_c_clip_positive$ac_cv_c_clip_negative" in
|
||||
"00")
|
||||
ac_cv_c_clip_type="none"
|
||||
;;
|
||||
"10")
|
||||
ac_cv_c_clip_type="positive"
|
||||
;;
|
||||
"01")
|
||||
ac_cv_c_clip_type="negative"
|
||||
;;
|
||||
"11")
|
||||
ac_cv_c_clip_type="both"
|
||||
;;
|
||||
esac
|
||||
]]
|
||||
|
||||
)
|
||||
]
|
||||
|
||||
)# AC_C_CLIP_MODE
|
||||
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
dnl @synopsis AC_C_FIND_ENDIAN
|
||||
dnl
|
||||
dnl Determine endian-ness of target processor.
|
||||
dnl @version 1.1 Mar 03 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Majority written from scratch to replace the standard autoconf macro
|
||||
dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
|
||||
dnl of the AC_TRY_RUN macro.
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
|
||||
dnl Find endian-ness in the following way:
|
||||
dnl 1) Look in <endian.h>.
|
||||
dnl 2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
|
||||
dnl 3) If 1) and 2) fails and not cross compiling run a test program.
|
||||
dnl 4) If 1) and 2) fails and cross compiling then guess based on target.
|
||||
|
||||
AC_DEFUN([AC_C_FIND_ENDIAN],
|
||||
[AC_CACHE_CHECK(processor byte ordering,
|
||||
ac_cv_c_byte_order,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_byte_order=unknown
|
||||
|
||||
if test x$ac_cv_header_endian_h = xyes ; then
|
||||
|
||||
# First try <endian.h> which should set BYTE_ORDER.
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != BIG_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=big
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||
bogus endian macros
|
||||
#endif
|
||||
], return 0 ;,
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
if test $cross_compiling = yes ; then
|
||||
# This is the last resort. Try to guess the target processor endian-ness
|
||||
# by looking at the target CPU type.
|
||||
[
|
||||
case "$target_cpu" in
|
||||
alpha* | i?86* | mipsel* | ia64*)
|
||||
ac_cv_c_byte_order=little
|
||||
;;
|
||||
|
||||
m68* | mips* | powerpc* | hppa* | sparc*)
|
||||
ac_cv_c_byte_order=big
|
||||
;;
|
||||
|
||||
esac
|
||||
]
|
||||
else
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [sizeof (long) - 1] == 1);
|
||||
}
|
||||
]], , ac_cv_c_byte_order=big,
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [0] == 1);
|
||||
}]], , ac_cv_c_byte_order=little,
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
)
|
||||
|
||||
if test $ac_cv_c_byte_order = big ; then
|
||||
ac_cv_c_big_endian=1
|
||||
ac_cv_c_little_endian=0
|
||||
elif test $ac_cv_c_byte_order = little ; then
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=1
|
||||
else
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=0
|
||||
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
|
||||
AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
|
||||
AC_MSG_WARN([[*** src/config.h may need to be hand editied. ]])
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
fi
|
||||
|
||||
]
|
||||
)# AC_C_FIND_ENDIAN
|
||||
|
||||
|
7851
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/libtool.m4
vendored
Normal file
7851
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,37 @@
|
|||
dnl @synopsis AC_C99_FUNC_LRINT
|
||||
dnl
|
||||
dnl Check whether C99's lrint function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINT],
|
||||
[AC_CACHE_CHECK(for lrint,
|
||||
ac_cv_c99_lrint,
|
||||
[
|
||||
lrint_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
|
||||
|
||||
CFLAGS=$lrint_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrint" = yes; then
|
||||
AC_DEFINE(HAVE_LRINT, 1,
|
||||
[Define if you have C99's lrint function.])
|
||||
fi
|
||||
])# AC_C99_FUNC_LRINT
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
dnl @synopsis AC_C99_FUNC_LRINTF
|
||||
dnl
|
||||
dnl Check whether C99's lrintf function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINTF],
|
||||
[AC_CACHE_CHECK(for lrintf,
|
||||
ac_cv_c99_lrintf,
|
||||
[
|
||||
lrintf_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
|
||||
|
||||
CFLAGS=$lrintf_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrintf" = yes; then
|
||||
AC_DEFINE(HAVE_LRINTF, 1,
|
||||
[Define if you have C99's lrintf function.])
|
||||
fi
|
||||
])# AC_C99_FUNC_LRINTF
|
||||
|
369
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltoptions.m4
vendored
Normal file
369
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltoptions.m4
vendored
Normal file
|
@ -0,0 +1,369 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[pic_mode="$withval"],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
123
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltsugar.m4
vendored
Normal file
123
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltsugar.m4
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
23
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltversion.m4
vendored
Normal file
23
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/ltversion.m4
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3293 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3293])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4'
|
||||
macro_revision='1.3293'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
98
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/lt~obsolete.m4
vendored
Normal file
98
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/M4/lt~obsolete.m4
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
@ -0,0 +1,22 @@
|
|||
@echo off
|
||||
|
||||
if "%1"=="check" GOTO CHECK
|
||||
if "%1"=="clean" GOTO CLEAN
|
||||
|
||||
copy /y Win32\config.h src\config.h
|
||||
copy /y Win32\unistd.h examples\unistd.h
|
||||
|
||||
nmake -f Win32\Makefile.msvc
|
||||
goto END
|
||||
|
||||
|
||||
:CHECK
|
||||
nmake -f Win32\Makefile.msvc check
|
||||
goto END
|
||||
|
||||
:CLEAN
|
||||
nmake -f Win32\Makefile.msvc clean
|
||||
goto END
|
||||
|
||||
:END
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
|
||||
|
||||
SUBDIRS = M4 src doc examples tests
|
||||
DIST_SUBDIRS = Win32 $(SUBDIRS)
|
||||
|
||||
EXTRA_DIST = autogen.sh libsamplerate.spec.in samplerate.pc.in Make.bat
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = samplerate.pc
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
|
||||
# Some people prefer "make test" to "make check".
|
||||
|
||||
test:
|
||||
make check
|
||||
|
||||
check-asm :
|
||||
(cd src && make check-asm)
|
||||
|
|
@ -0,0 +1,806 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/libsamplerate.spec.in \
|
||||
$(srcdir)/samplerate.pc.in $(top_srcdir)/configure AUTHORS \
|
||||
COPYING Cfg/compile Cfg/config.guess Cfg/config.sub \
|
||||
Cfg/depcomp Cfg/install-sh Cfg/ltmain.sh Cfg/missing ChangeLog \
|
||||
INSTALL NEWS
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/check_signal.m4 \
|
||||
$(top_srcdir)/M4/clip_mode.m4 $(top_srcdir)/M4/endian.m4 \
|
||||
$(top_srcdir)/M4/libtool.m4 $(top_srcdir)/M4/lrint.m4 \
|
||||
$(top_srcdir)/M4/lrintf.m4 $(top_srcdir)/M4/ltoptions.m4 \
|
||||
$(top_srcdir)/M4/ltsugar.m4 $(top_srcdir)/M4/ltversion.m4 \
|
||||
$(top_srcdir)/M4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES = libsamplerate.spec samplerate.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILER_IS_GCC = @COMPILER_IS_GCC@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLLWRAP = @DLLWRAP@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFTW3_CFLAGS = @FFTW3_CFLAGS@
|
||||
FFTW3_LIBS = @FFTW3_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_FFTW3 = @HAVE_FFTW3@
|
||||
HAVE_SNDFILE = @HAVE_SNDFILE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_SPECIFIC_INCLUDES = @OS_SPECIFIC_INCLUDES@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PEXPORTS = @PEXPORTS@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
htmldocdir = @htmldocdir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
|
||||
SUBDIRS = M4 src doc examples tests
|
||||
DIST_SUBDIRS = Win32 $(SUBDIRS)
|
||||
EXTRA_DIST = autogen.sh libsamplerate.spec.in samplerate.pc.in Make.bat
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = samplerate.pc
|
||||
m4datadir = $(datadir)/aclocal
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
libsamplerate.spec: $(top_builddir)/config.status $(srcdir)/libsamplerate.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
samplerate.pc: $(top_builddir)/config.status $(srcdir)/samplerate.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
|
||||
distcheck distclean distclean-generic distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
|
||||
# Some people prefer "make test" to "make check".
|
||||
|
||||
test:
|
||||
make check
|
||||
|
||||
check-asm :
|
||||
(cd src && make check-asm)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,36 @@
|
|||
Version 0.1.8 (2011-08-15)
|
||||
* Minor bug fixes and upates.
|
||||
|
||||
Version 0.1.7 (2009-02-14)
|
||||
* Fix a segfault which occurs when memcpy is passed a bad length parameter.
|
||||
* Fix compilation under MSVC.
|
||||
|
||||
Version 0.1.6 (2009-01-27)
|
||||
* Minor bug fix in test suite (account for rounding error on x86_64).
|
||||
|
||||
Version 0.1.5 (2009-01-11)
|
||||
* Optimisation resulting dramatic throughput improvements.
|
||||
|
||||
Version 0.1.4 (2008-07-02)
|
||||
* Fix bug which causes a segfault with extremely low conversion ratios.
|
||||
|
||||
Version 0.1.3 (2008-03-23)
|
||||
* Huge improvement to the quality of conversion with the
|
||||
SRC_SINC_MEDIUM_QUALITY and SRC_SINC_BEST_QUALITY converters.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.2 (2004-09-12)
|
||||
* Fixed where callback based API wasn't being reset properly.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.1 (2004-07-17)
|
||||
* Fixed bug in callback based API.
|
||||
* Fixed a bug brought to light by aggressive optimisations of gcc-3.4.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.0 (2004-03-14)
|
||||
* Added callback based API.
|
||||
* Added a pair of functions for doing short to float and float to short
|
||||
conversions on an arrays of data.
|
||||
* Many minor bug fixes.
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
This is libsamplerate, 0.1.8
|
||||
|
||||
libsamplerate (also known as Secret Rabbit Code) is a library for
|
||||
perfroming sample rate conversion of audio data.
|
||||
|
||||
The src/ directory contains the source code for library itself.
|
||||
|
||||
The doc/ directory contains the libsamplerate documentation.
|
||||
|
||||
The examples/ directory contains examples of how to write code using
|
||||
libsamplerate.
|
||||
|
||||
The tests/ directory contains programs which link against
|
||||
libsamplerate and test its functionality.
|
||||
|
||||
The Win32/ directory contains files and documentation to allow
|
||||
libsamplerate to compile under Win32 with the Microsoft Visual C++
|
||||
compiler.
|
||||
|
||||
Win32
|
||||
-----
|
||||
There are detailed instructions for building libsamplerate on Win32
|
||||
in the file
|
||||
|
||||
doc/win32.html
|
||||
|
||||
|
||||
MacOSX
|
||||
------
|
||||
Building on MacOSX should be the same as building it on any other
|
||||
Unix.
|
||||
|
||||
|
||||
OTHER PLATFORMS
|
||||
---------------
|
||||
To compile libsamplerate on platforms which have a Bourne Shell compatible
|
||||
shell, an ANSI C compiler and a make utility should require no more that
|
||||
the following three commands :
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
CONTACTS
|
||||
--------
|
||||
|
||||
libsamplerate was written by Erik de Castro Lopo (erikd AT mega-nerd DOT com).
|
||||
The libsamplerate home page is at :
|
||||
|
||||
http://www.mega-nerd.com/libsamplerate/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
EXTRA_DIST = Makefile.msvc config.h unistd.h unistd.h libsamplerate-0.def
|
||||
|
|
@ -0,0 +1,395 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = Win32
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/Makefile.mingw.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/check_signal.m4 \
|
||||
$(top_srcdir)/M4/clip_mode.m4 $(top_srcdir)/M4/endian.m4 \
|
||||
$(top_srcdir)/M4/libtool.m4 $(top_srcdir)/M4/lrint.m4 \
|
||||
$(top_srcdir)/M4/lrintf.m4 $(top_srcdir)/M4/ltoptions.m4 \
|
||||
$(top_srcdir)/M4/ltsugar.m4 $(top_srcdir)/M4/ltversion.m4 \
|
||||
$(top_srcdir)/M4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES = Makefile.mingw
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILER_IS_GCC = @COMPILER_IS_GCC@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLLWRAP = @DLLWRAP@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFTW3_CFLAGS = @FFTW3_CFLAGS@
|
||||
FFTW3_LIBS = @FFTW3_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_FFTW3 = @HAVE_FFTW3@
|
||||
HAVE_SNDFILE = @HAVE_SNDFILE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_SPECIFIC_INCLUDES = @OS_SPECIFIC_INCLUDES@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PEXPORTS = @PEXPORTS@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
htmldocdir = @htmldocdir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = Makefile.msvc config.h unistd.h unistd.h libsamplerate-0.def
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Win32/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Win32/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
Makefile.mingw: $(top_builddir)/config.status $(srcdir)/Makefile.mingw.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,155 @@
|
|||
# MinGW specific Makefile for libsamplerate.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
PROGRAMS = sndfile-resample.exe
|
||||
TARGETS = libsamplerate.dll $(PROGRAMS) varispeed-play.exe samplerate.pc
|
||||
|
||||
AR = @AR@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ -Isrc
|
||||
COMPILER_IS_GCC = @COMPILER_IS_GCC@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLLWRAP = @DLLWRAP@
|
||||
FFTW3_CFLAGS = @FFTW3_CFLAGS@
|
||||
FFTW3_LIBS = @FFTW3_LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
install_sh = @install_sh@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LN_S = @LN_S@
|
||||
PEXPORTS = @PEXPORTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
RANLIB = @RANLIB@
|
||||
SNDFILE_CFLAGS = -std=c99 @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
STRIP = @STRIP@
|
||||
|
||||
#====================================================================
|
||||
# Target directories.
|
||||
|
||||
bindir = @bindir@
|
||||
exec_prefix = @exec_prefix@
|
||||
htmldocdir = @htmldocdir@
|
||||
includedir = @includedir@
|
||||
libdir = @libdir@
|
||||
pkgconfigdir = @libdir@/pkgconfig
|
||||
prefix = @prefix@
|
||||
|
||||
#====================================================================
|
||||
# Targets
|
||||
|
||||
all : $(TARGETS)
|
||||
|
||||
clean :
|
||||
rm -f $(TARGETS) *.del *.lib src/*.o tests/*.o tests/*.exe
|
||||
|
||||
install : $(TARGETS)
|
||||
$(install_sh) -c libsamplerate.dll $(libdir)
|
||||
$(install_sh) -c samplerate.pc $(pkgconfigdir)
|
||||
@for prog in $(PROGRAMS); do \
|
||||
echo "installing ... $$prog" ; \
|
||||
$(install_sh) -c "$$prog" $(bindir) ; \
|
||||
done;
|
||||
$(install_sh) -c src/samplerate.h $(includedir)
|
||||
|
||||
uninstall :
|
||||
rm -f $(libdir)/libsamplerate.dll
|
||||
rm -f $(pkgconfigdir)/samplerate.pc
|
||||
@for prog in $(PROGRAMS); do \
|
||||
echo "removing ... $(bindir)/$$prog" ; \
|
||||
rm -f $(bindir)/"$$prog" ; \
|
||||
done;
|
||||
rm -f $(includedir)/samplerate.h
|
||||
|
||||
#====================================================================
|
||||
|
||||
LINK_OBJS = \
|
||||
src/src_linear.o \
|
||||
src/src_sinc.o \
|
||||
src/src_zoh.o \
|
||||
src/samplerate.o
|
||||
|
||||
libsamplerate.dll libsamplerate.lib : $(LINK_OBJS)
|
||||
$(DLLWRAP) --def Win32/libsamplerate.def $(LINK_OBJS) --output-lib libsamplerate.lib -o libsamplerate.dll
|
||||
$(STRIP) libsamplerate.dll
|
||||
|
||||
sndfile-resample.exe : examples/sndfile-resample.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $(SNDFILE_CFLAGS) $+ $(SNDFILE_LIBS) -o $@
|
||||
|
||||
varispeed-play.exe : examples/varispeed-play.c examples/audio_out.o libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $(SNDFILE_CFLAGS) $+ $(SNDFILE_LIBS) -lwinmm -o $@
|
||||
|
||||
examples/audio_out.o : examples/audio_out.c
|
||||
$(CC) $(CFLAGS) $(SNDFILE_CFLAGS) -c $+ -o $@
|
||||
|
||||
samplerate.pc : samplerate.pc.in config.status
|
||||
@./config.status $@
|
||||
|
||||
config.status :
|
||||
./configure
|
||||
|
||||
#====================================================================
|
||||
# Testing programs.
|
||||
|
||||
TEST_PROGS = \
|
||||
tests/misc_test.exe \
|
||||
tests/termination_test.exe \
|
||||
tests/simple_test.exe \
|
||||
tests/callback_test.exe \
|
||||
tests/reset_test.exe \
|
||||
tests/multi_channel_test.exe \
|
||||
tests/float_short_test.exe \
|
||||
tests/snr_bw_test.exe
|
||||
|
||||
|
||||
check : $(TEST_PROGS)
|
||||
tests/misc_test.exe
|
||||
tests/termination_test.exe
|
||||
tests/simple_test.exe
|
||||
tests/callback_test.exe
|
||||
tests/reset_test.exe
|
||||
tests/multi_channel_test.exe
|
||||
tests/float_short_test.exe
|
||||
tests/snr_bw_test.exe
|
||||
@echo ----------------------------------------------------------------------
|
||||
@echo libsamplerate passed all tests
|
||||
@echo ----------------------------------------------------------------------
|
||||
|
||||
#====================================================================
|
||||
# Test programs.
|
||||
|
||||
tests/misc_test.exe : tests/misc_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/termination_test.exe : tests/termination_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/simple_test.exe : tests/simple_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/callback_test.exe : tests/callback_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/reset_test.exe : tests/reset_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/float_short_test.exe : tests/float_short_test.c tests/util.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $+ -o $@
|
||||
|
||||
tests/multi_channel_test.exe : tests/multi_channel_test.c tests/util.c tests/calc_snr.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $(FFTW3_CFLAGS) $+ $(FFTW3_LIBS) -o $@
|
||||
|
||||
tests/snr_bw_test.exe : tests/snr_bw_test.c tests/util.c tests/calc_snr.c libsamplerate.lib
|
||||
$(CC) $(CFLAGS) $(FFTW3_CFLAGS) $+ $(FFTW3_LIBS) -o $@
|
||||
|
||||
# End of Makefile
|
||||
#====================================================================
|
|
@ -0,0 +1,150 @@
|
|||
|
||||
# Set the value of $(MSVCDir) for your installation.
|
||||
|
||||
# MSVCDir="C:\Progra~1\Micros~1\VC98"
|
||||
# CFLAGS=/nologo /MD /W1 /GX /O2 /I "$(MSVCDir)\Include" /I . /I "Win32" /I "src" /D "WIN32" /D "_USRDLL" /YX /FD /Zm1000
|
||||
# PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic
|
||||
|
||||
MSVCDir="C:\Progra~1\Micros~1.Net\Vc7"
|
||||
CFLAGS=/nologo /MD /W1 /GX /O2 /Zm200 /I "$(MSVCDir)\Include" /I "$(MSVCDir)\PlatformSDK\Include" /I . /I "Win32" /I "src" /D "WIN32" /D "_USRDLL" /YX /FD /Zm1000
|
||||
PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /libpath:"$(MSVCDir)\PlatformSDK\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic
|
||||
|
||||
CPP=cl.exe
|
||||
LINK32=link.exe
|
||||
DLL_LINK_FLAGS=/nologo /dll /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /implib:".\libsamplerate-0.lib" /machine:I386 /out:"libsamplerate-0.dll"
|
||||
|
||||
#====================================================================
|
||||
# Targets
|
||||
|
||||
ALL : libsndfile-1.lib libsamplerate-0.dll \
|
||||
".\examples\sndfile-resample.exe" \
|
||||
".\examples\varispeed-play.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "src\*.obj"
|
||||
-@erase "tests\*.exe"
|
||||
|
||||
#====================================================================
|
||||
|
||||
LINK32_OBJS= \
|
||||
".\src\samplerate.obj" \
|
||||
".\src\src_linear.obj" \
|
||||
".\src\src_zoh.obj" \
|
||||
".\src\src_sinc.obj"
|
||||
|
||||
libsamplerate-0.dll : $(LINK32_OBJS) ".\Win32\libsamplerate-0.def"
|
||||
$(LINK32) $(DLL_LINK_FLAGS) /def:".\Win32\libsamplerate-0.def" $(LINK32_OBJS)
|
||||
|
||||
".\examples\sndfile-resample.exe" : ".\examples\sndfile-resample.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\examples\sndfile-resample.obj" /c ".\examples\sndfile-resample.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\examples\sndfile-resample.exe" ".\examples\sndfile-resample.obj" libsamplerate-0.lib libsndfile-1.lib
|
||||
|
||||
".\examples\varispeed-play.exe" : ".\examples\varispeed-play.c" ".\examples\audio_out.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\examples\varispeed-play.obj" /c ".\examples\varispeed-play.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\examples\varispeed-play.exe" ".\examples\varispeed-play.obj" ".\examples\audio_out.obj" libsamplerate-0.lib libsndfile-1.lib winmm.lib
|
||||
|
||||
".\examples\audio_out.obj" : ".\examples\audio_out.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\examples\audio_out.obj" /c ".\examples\audio_out.c"
|
||||
|
||||
TEST_PROGS= \
|
||||
".\tests\misc_test.exe" \
|
||||
".\tests\termination_test.exe" \
|
||||
".\tests\simple_test.exe" \
|
||||
".\tests\reset_test.exe" \
|
||||
".\tests\multi_channel_test.exe" \
|
||||
".\tests\snr_bw_test.exe" \
|
||||
".\tests\throughput_test.exe"
|
||||
|
||||
CHECK: $(TEST_PROGS)
|
||||
".\tests\misc_test.exe"
|
||||
".\tests\termination_test.exe"
|
||||
".\tests\simple_test.exe"
|
||||
".\tests\reset_test.exe"
|
||||
".\tests\multi_channel_test.exe"
|
||||
".\tests\snr_bw_test.exe"
|
||||
".\tests\throughput_test.exe"
|
||||
-@echo ----------------------------------------------------------------------
|
||||
-@echo libsamplerate passed all tests
|
||||
-@echo ----------------------------------------------------------------------
|
||||
|
||||
#====================================================================
|
||||
# C files in src.
|
||||
|
||||
".\src\samplerate.obj" : ".\src\samplerate.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\src\samplerate.obj" /c ".\src\samplerate.c"
|
||||
|
||||
".\src\src_linear.obj" : ".\src\src_linear.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\src\src_linear.obj" /c ".\src\src_linear.c"
|
||||
|
||||
".\src\src_zoh.obj" : ".\src\src_zoh.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\src\src_zoh.obj" /c ".\src\src_zoh.c"
|
||||
|
||||
".\src\src_sinc.obj" : ".\src\src_sinc.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\src\src_sinc.obj" /c ".\src\src_sinc.c"
|
||||
|
||||
#====================================================================
|
||||
# Object files for test programs.
|
||||
|
||||
".\tests\util.obj" : ".\tests\util.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\util.obj" /c ".\tests\util.c"
|
||||
|
||||
".\tests\calc_snr.obj" : ".\tests\calc_snr.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\calc_snr.obj" /c ".\tests\calc_snr.c"
|
||||
|
||||
".\tests\dft_cmp.obj" : ".\tests\dft_cmp.c"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\dft_cmp.obj" /c ".\tests\dft_cmp.c"
|
||||
|
||||
#====================================================================
|
||||
# Test programs.
|
||||
|
||||
".\tests\misc_test.exe" : ".\tests\misc_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\misc_test.obj" /c ".\tests\misc_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\misc_test.exe" ".\tests\misc_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\termination_test.exe" : ".\tests\termination_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\termination_test.obj" /c ".\tests\termination_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\termination_test.exe" ".\tests\termination_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\streaming_test.exe" : ".\tests\streaming_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\streaming_test.obj" /c ".\tests\streaming_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\streaming_test.exe" ".\tests\streaming_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\simple_test.exe" : ".\tests\simple_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\simple_test.obj" /c ".\tests\simple_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\simple_test.exe" ".\tests\simple_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\reset_test.exe" : ".\tests\reset_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\reset_test.obj" /c ".\tests\reset_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\reset_test.exe" ".\tests\reset_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\multi_channel_test.exe" : ".\tests\multi_channel_test.c" ".\tests\util.obj" ".\tests\calc_snr.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\multi_channel_test.obj" /c ".\tests\multi_channel_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\multi_channel_test.exe" ".\tests\multi_channel_test.obj" ".\tests\util.obj" ".\tests\calc_snr.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\snr_bw_test.exe" : ".\tests\snr_bw_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\snr_bw_test.obj" /c ".\tests\snr_bw_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\snr_bw_test.exe" ".\tests\snr_bw_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
".\tests\throughput_test.exe" : ".\tests\throughput_test.c" ".\tests\util.obj"
|
||||
$(CPP) $(CFLAGS) /Fo".\tests\throughput_test.obj" /c ".\tests\throughput_test.c"
|
||||
$(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\throughput_test.exe" ".\tests\throughput_test.obj" ".\tests\util.obj" libsamplerate-0.lib
|
||||
|
||||
#====================================================================
|
||||
# Bit of extra trickery.
|
||||
|
||||
sndfile.h libsndfile-1.dll libsndfile-1.def :
|
||||
-@echo *---------------------------------------------------------------
|
||||
-@echo * You need to get the pre-built Win32 binaries for libsndfile
|
||||
-@echo * from : http://www.mega-nerd.com/libsndfile
|
||||
-@echo * The prebuilt binaries will be in a ZIP file which contains
|
||||
-@echo * the files :
|
||||
-@echo * sndfile.h libsndfile-1.dll libsndfile-1.def
|
||||
-@echo * which need to be copied to this directory.
|
||||
-@echo *---------------------------------------------------------------
|
||||
-@exit 1
|
||||
|
||||
libsndfile-1.lib : libsndfile-1.dll libsndfile-1.def
|
||||
lib /machine:i386 /def:libsndfile-1.def
|
||||
|
||||
# End of Makefile
|
||||
#====================================================================
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This is the Win32 specific config.h header file.
|
||||
**
|
||||
** On Unix (including MacOSX), this header file is automatically generated
|
||||
** during the configure process while on Win32 this has to be hand edited
|
||||
** to keep it up to date.
|
||||
**
|
||||
** This is also a good file to add Win32 specific things.
|
||||
*/
|
||||
|
||||
/*
|
||||
** MSVC++ assumes that all floating point constants without a trailing
|
||||
** letter 'f' are double precision.
|
||||
**
|
||||
** If this assumption is incorrect and one of these floating point constants
|
||||
** is assigned to a float variable MSVC++ generates a warning.
|
||||
**
|
||||
** Since there are currently about 25000 of these warnings generated in
|
||||
** src/src_sinc.c this slows down compile times considerably. The
|
||||
** following #pragma disables the warning.
|
||||
*/
|
||||
|
||||
#pragma warning(disable: 4305)
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
** Normal #defines follow.
|
||||
*/
|
||||
|
||||
/* Set to 1 if the compile is GNU GCC. */
|
||||
#define COMPILER_IS_GCC 0
|
||||
|
||||
/* Target processor clips on negative float to int conversion. */
|
||||
#define CPU_CLIPS_NEGATIVE 0
|
||||
|
||||
/* Target processor clips on positive float to int conversion. */
|
||||
#define CPU_CLIPS_POSITIVE 0
|
||||
|
||||
/* Target processor is big endian. */
|
||||
#define CPU_IS_BIG_ENDIAN 0
|
||||
|
||||
/* Target processor is little endian. */
|
||||
#define CPU_IS_LITTLE_ENDIAN 1
|
||||
|
||||
/* Set to 1 to enable debugging. */
|
||||
#define ENABLE_DEBUG 0
|
||||
|
||||
/* Major version of GCC or 3 otherwise. */
|
||||
/* #undef GCC_MAJOR_VERSION */
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
/* #undef HAVE_ALARM */
|
||||
|
||||
/* Define to 1 if you have the `calloc' function. */
|
||||
#define HAVE_CALLOC 1
|
||||
|
||||
/* Define to 1 if you have the `ceil' function. */
|
||||
#define HAVE_CEIL 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Set to 1 if you have libfftw3. */
|
||||
/* #undef HAVE_FFTW3 */
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#define HAVE_FLOOR 1
|
||||
|
||||
/* Define to 1 if you have the `fmod' function. */
|
||||
#define HAVE_FMOD 1
|
||||
|
||||
/* Define to 1 if you have the `free' function. */
|
||||
#define HAVE_FREE 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H */
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
/* #undef HAVE_LIBM */
|
||||
|
||||
/* Define if you have C99's lrint function. */
|
||||
/* #undef HAVE_LRINT */
|
||||
|
||||
/* Define if you have C99's lrintf function. */
|
||||
/* #undef HAVE_LRINTF */
|
||||
|
||||
/* Define to 1 if you have the `malloc' function. */
|
||||
#define HAVE_MALLOC 1
|
||||
|
||||
/* Define to 1 if you have the `memcpy' function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have signal SIGALRM. */
|
||||
/* #undef HAVE_SIGALRM */
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
/* #undef HAVE_SIGNAL */
|
||||
|
||||
/* Set to 1 if you have libsndfile. */
|
||||
#define HAVE_SNDFILE 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
/* #undef HAVE_STDINT_H */
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
/* #undef HAVE_SYS_TIMES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Set to 1 if compiling for Win32 */
|
||||
#define OS_IS_WIN32 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libsamplerate"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "erikd@mega-nerd.com"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libsamplerate"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libsamplerate 0.1.8"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libsamplerate"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "http://www.mega-nerd.com/libsamplerate/"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.1.8"
|
||||
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#define SIZEOF_DOUBLE 8
|
||||
|
||||
/* The size of `float', as computed by sizeof. */
|
||||
#define SIZEOF_FLOAT 4
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.1.8"
|
||||
|
||||
|
||||
|
||||
/* Extra Win32 hacks. */
|
||||
|
||||
/*
|
||||
** Microsoft's compiler still does not support the 1999 ISO C Standard
|
||||
** which includes 'inline'.
|
||||
*/
|
||||
|
||||
#define inline __inline
|
|
@ -0,0 +1,28 @@
|
|||
LIBRARY libsamplerate-0.dll
|
||||
EXPORTS
|
||||
|
||||
src_new @1
|
||||
src_delete @2
|
||||
|
||||
src_get_name @10
|
||||
src_get_description @11
|
||||
src_get_version @12
|
||||
|
||||
src_process @20
|
||||
src_reset @21
|
||||
src_set_ratio @22
|
||||
|
||||
src_error @30
|
||||
src_strerror @31
|
||||
|
||||
src_simple @40
|
||||
|
||||
src_is_valid_ratio @50
|
||||
|
||||
src_callback_new @60
|
||||
src_callback_read @61
|
||||
|
||||
src_short_to_float_array @70
|
||||
src_float_to_short_array @71
|
||||
src_int_to_float_array @80
|
||||
src_float_to_int_array @81
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
** the Free Software Foundation; either version 2.1 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This 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 Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Emtpy file to prevent Win32 compiler from complaining that the
|
||||
** file doesn't exist.
|
||||
*/
|
1183
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/aclocal.m4
vendored
Normal file
1183
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
129
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/autogen.sh
Executable file
129
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/autogen.sh
Executable file
|
@ -0,0 +1,129 @@
|
|||
#!/bin/sh
|
||||
# Run this to set up the build system: configure, makefiles, etc.
|
||||
# (based on the version in enlightenment's cvs)
|
||||
|
||||
package="libsamplerate"
|
||||
|
||||
ACLOCAL_FLAGS="-I M4"
|
||||
|
||||
olddir=`pwd`
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
cd "$srcdir"
|
||||
DIE=0
|
||||
|
||||
echo "checking for autoconf... "
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $package."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
|
||||
VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
|
||||
VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
|
||||
|
||||
# do we need automake?
|
||||
if test -r Makefile.am; then
|
||||
AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
|
||||
AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
|
||||
if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
|
||||
AM_NEEDED=""
|
||||
fi
|
||||
if test -z $AM_NEEDED; then
|
||||
echo -n "checking for automake... "
|
||||
AUTOMAKE=automake
|
||||
ACLOCAL=aclocal
|
||||
if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no"
|
||||
AUTOMAKE=
|
||||
fi
|
||||
else
|
||||
echo -n "checking for automake $AM_NEEDED or later... "
|
||||
majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
|
||||
minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
|
||||
for am in automake-$AM_NEEDED automake$AM_NEEDED \
|
||||
automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
|
||||
($am --version < /dev/null > /dev/null 2>&1) || continue
|
||||
ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
|
||||
maj=`echo $ver | $VERSIONMKMAJ`
|
||||
min=`echo $ver | $VERSIONMKMIN`
|
||||
if test $maj -eq $majneeded -a $min -ge $minneeded; then
|
||||
AUTOMAKE=$am
|
||||
echo $AUTOMAKE
|
||||
break
|
||||
fi
|
||||
done
|
||||
test -z $AUTOMAKE && echo "no"
|
||||
echo -n "checking for aclocal $AM_NEEDED or later... "
|
||||
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
|
||||
aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
|
||||
($ac --version < /dev/null > /dev/null 2>&1) || continue
|
||||
ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
|
||||
maj=`echo $ver | $VERSIONMKMAJ`
|
||||
min=`echo $ver | $VERSIONMKMIN`
|
||||
if test $maj -eq $majneeded -a $min -ge $minneeded; then
|
||||
ACLOCAL=$ac
|
||||
echo $ACLOCAL
|
||||
break
|
||||
fi
|
||||
done
|
||||
test -z $ACLOCAL && echo "no"
|
||||
fi
|
||||
test -z $AUTOMAKE || test -z $ACLOCAL && {
|
||||
echo
|
||||
echo "You must have automake installed to compile $package."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
echo -n "checking for libtool... "
|
||||
for LIBTOOLIZE in libtoolize glibtoolize nope; do
|
||||
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
|
||||
done
|
||||
if test x$LIBTOOLIZE = xnope; then
|
||||
echo "nope."
|
||||
LIBTOOLIZE=libtoolize
|
||||
else
|
||||
echo $LIBTOOLIZE
|
||||
fi
|
||||
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile $package."
|
||||
echo "Download the appropriate package for your system,"
|
||||
echo "or get the source from one of the GNU ftp sites"
|
||||
echo "listed in http://www.gnu.org/order/ftp.html"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
echo "Generating configuration files for $package, please wait...."
|
||||
|
||||
echo " $ACLOCAL $ACLOCAL_FLAGS"
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit 1
|
||||
echo " $LIBTOOLIZE --automake"
|
||||
$LIBTOOLIZE --automake || exit 1
|
||||
echo " autoheader"
|
||||
autoheader || exit 1
|
||||
echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
|
||||
$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
|
||||
echo " autoconf"
|
||||
autoconf || exit 1
|
||||
|
||||
cd $olddir
|
||||
$srcdir/configure --enable-gcc-werror "$@" && echo
|
20141
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/configure
vendored
Normal file
20141
internal/c/parts/audio/conversion/download/libsamplerate-0.1.8/configure
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,342 @@
|
|||
# Copyright (C) 2002-2011 Erik de Castro Lopo (erikd AT mega-nerd DOT com).
|
||||
|
||||
dnl Require autoconf version
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
AC_INIT([libsamplerate],[0.1.8],[erikd@mega-nerd.com],
|
||||
[libsamplerate],[http://www.mega-nerd.com/libsamplerate/])
|
||||
|
||||
# Put config stuff in Cfg.
|
||||
AC_CONFIG_AUX_DIR(Cfg)
|
||||
|
||||
AC_CONFIG_SRCDIR([src/samplerate.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([M4])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
dnl Add parameters for aclocal
|
||||
AC_SUBST(ACLOCAL_AMFLAGS, "-I M4")
|
||||
|
||||
AC_LANG([C])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_PROG_SED
|
||||
|
||||
# Do not check for F77.
|
||||
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
LT_PROG_RC
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
#------------------------------------------------------------------------------------
|
||||
# Rules for library version information:
|
||||
#
|
||||
# 1. Start with version information of `0:0:0' for each libtool library.
|
||||
# 2. Update the version information only immediately before a public release of
|
||||
# your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
# 3. If the library source code has changed at all since the last update, then
|
||||
# increment revision (`c:r:a' becomes `c:r+1:a').
|
||||
# 4. If any interfaces have been added, removed, or changed since the last update,
|
||||
# increment current, and set revision to 0.
|
||||
# 5. If any interfaces have been added since the last public release, then increment
|
||||
# age.
|
||||
# 6. If any interfaces have been removed since the last public release, then set age
|
||||
# to 0.
|
||||
|
||||
SHARED_VERSION_INFO="1:8:1"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
if test "x-$build_os-$host_os-$target_os" = x-mingw32-mingw32-mingw32 ; then
|
||||
AC_CHECK_PROG(DLLTOOL, dlltool, dlltool)
|
||||
AC_CHECK_PROG(DLLWRAP, dllwrap, dllwrap)
|
||||
AC_CHECK_PROG(PEXPORTS, pexports, pexports)
|
||||
fi
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(stdint.h sys/times.h)
|
||||
|
||||
#====================================================================================
|
||||
# Couple of initializations here. Fill in real values later.
|
||||
|
||||
SHLIB_VERSION_ARG=""
|
||||
|
||||
#====================================================================================
|
||||
# Finished checking, handle options.
|
||||
|
||||
AC_ARG_ENABLE(gcc-werror,
|
||||
AC_HELP_STRING([--enable-gcc-werror], [enable -Werror in all Makefiles]),
|
||||
ac_arg_gcc_werror=yes, ac_arg_gcc_werror=no)
|
||||
|
||||
AC_ARG_ENABLE(gcc-pipe,
|
||||
AC_HELP_STRING([--disable-gcc-pipe], [disable gcc -pipe option ]),
|
||||
ac_arg_gcc_pipe="N", ac_arg_gcc_pipe="Y")
|
||||
|
||||
AC_ARG_ENABLE(gcc-opt,
|
||||
AC_HELP_STRING([--disable-gcc-opt], [disable gcc optimisations ]),
|
||||
ac_arg_gcc_opt="N", ac_arg_gcc_opt="Y")
|
||||
|
||||
AC_ARG_ENABLE(fftw,
|
||||
AC_HELP_STRING([--disable-fftw], [disable usage of FFTW ]),
|
||||
ac_arg_fftw="N", ac_arg_fftw="Y")
|
||||
|
||||
AC_ARG_ENABLE(cpu-clip,
|
||||
AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]),
|
||||
ac_arg_cpu_clip="N", ac_arg_cpu_clip="Y")
|
||||
|
||||
#====================================================================================
|
||||
# Check types and their sizes.
|
||||
|
||||
AC_CHECK_SIZEOF(int,0)
|
||||
AC_CHECK_SIZEOF(long,0)
|
||||
AC_CHECK_SIZEOF(float,4)
|
||||
AC_CHECK_SIZEOF(double,8)
|
||||
|
||||
#====================================================================================
|
||||
# Determine endian-ness of target processor.
|
||||
|
||||
AC_C_FIND_ENDIAN
|
||||
|
||||
AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
|
||||
[Target processor is big endian.])
|
||||
AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},
|
||||
[Target processor is little endian.])
|
||||
|
||||
#====================================================================================
|
||||
# Check for functions.
|
||||
|
||||
AC_CHECK_FUNCS(malloc calloc free memcpy memmove alarm signal)
|
||||
|
||||
AC_CHECK_LIB([m],floor)
|
||||
AC_CHECK_FUNCS(floor ceil fmod)
|
||||
|
||||
AC_CHECK_SIGNAL(SIGALRM)
|
||||
|
||||
AC_C99_FUNC_LRINT
|
||||
AC_C99_FUNC_LRINTF
|
||||
# AC_C99_FUNC_LLRINT Don't need this (yet?).
|
||||
|
||||
case "x$ac_cv_c99_lrint$ac_cv_c99_lrintf" in
|
||||
xyesyes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([[*** Missing C99 standard functions lrint() and lrintf().]])
|
||||
AC_MSG_WARN([[*** This may cause benign compiler warnings on some systems (ie Solaris).]])
|
||||
;;
|
||||
esac
|
||||
|
||||
#====================================================================================
|
||||
# Determine if the processor can do clipping on float to int conversions.
|
||||
|
||||
if test x$ac_arg_cpu_clip = "xY" ; then
|
||||
AC_C_CLIP_MODE
|
||||
else
|
||||
echo "checking processor clipping capabilities... disabled"
|
||||
ac_cv_c_clip_positive=0
|
||||
ac_cv_c_clip_negative=0
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CPU_CLIPS_POSITIVE, ${ac_cv_c_clip_positive},
|
||||
[Target processor clips on positive float to int conversion.])
|
||||
AC_DEFINE_UNQUOTED(CPU_CLIPS_NEGATIVE, ${ac_cv_c_clip_negative},
|
||||
[Target processor clips on negative float to int conversion.])
|
||||
|
||||
#====================================================================================
|
||||
# Check for libsndfile which is required for the test and example programs.
|
||||
|
||||
AC_ARG_ENABLE(sndfile,
|
||||
AC_HELP_STRING([--disable-sndfile], [disable support for sndfile (default=autodetect)]),
|
||||
[ enable_sndfile=$enableval ], [ enable_sndfile=yes ])
|
||||
|
||||
# Check for pkg-config outside the if statement.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
if test "x$enable_sndfile" = "xyes"; then
|
||||
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.6, ac_cv_sndfile=1, ac_cv_sndfile=0)
|
||||
else
|
||||
ac_cv_sndfile=0
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_SNDFILE],$ac_cv_sndfile,[Set to 1 if you have libsndfile.])
|
||||
|
||||
if test x$ac_cv_sndfile = x1 ; then
|
||||
ac_cv_sndfile=yes
|
||||
HAVE_SNDFILE=1
|
||||
else
|
||||
ac_cv_sndfile=no
|
||||
HAVE_SNDFILE=0
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Check for libfftw3 which is required for the test and example programs.
|
||||
|
||||
if test $ac_arg_fftw = "Y" ; then
|
||||
PKG_CHECK_MODULES(FFTW3, fftw3 >= 0.15.0, ac_cv_fftw3=1, ac_cv_fftw3=0)
|
||||
AC_DEFINE_UNQUOTED([HAVE_FFTW3],$ac_cv_fftw3,[Set to 1 if you have libfftw3.])
|
||||
|
||||
if test x$ac_cv_fftw3 = x1 ; then
|
||||
ac_cv_fftw3=yes
|
||||
HAVE_FFTW3=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$ac_cv_fftw3 != xyes ; then
|
||||
ac_cv_fftw3=no
|
||||
HAVE_FFTW3=0
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# GCC stuff.
|
||||
|
||||
if test $ac_cv_c_compiler_gnu = yes ; then
|
||||
CFLAGS="$CFLAGS -std=gnu99 -W -Wstrict-prototypes -Wmissing-prototypes -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wpointer-arith"
|
||||
# -Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion -Winline"
|
||||
if test "$ac_arg_gcc_opt" = "N" ; then
|
||||
temp_CFLAGS=`echo $CFLAGS | sed "s/O2/O0/"`
|
||||
CFLAGS=$temp_CFLAGS
|
||||
AC_MSG_WARN([[*** Compiler optimisations switched off. ***]])
|
||||
fi
|
||||
|
||||
# Disable -Wall for Apple Darwin/Rhapsody.
|
||||
# System headers on these systems are broken.
|
||||
case "$target_os" in
|
||||
darwin* | rhapsody*)
|
||||
temp_CFLAGS=`echo $CFLAGS | sed "s/-Wall//"`
|
||||
CFLAGS=$temp_CFLAGS
|
||||
;;
|
||||
|
||||
linux*|kfreebsd*-gnu*|gnu*)
|
||||
SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
if test x$ac_arg_gcc_pipe != "xN" ; then
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
fi
|
||||
|
||||
if test x$ac_arg_gcc_werror = "xyes" ; then
|
||||
CFLAGS="-Werror $CFLAGS"
|
||||
fi
|
||||
|
||||
AC_DEFINE([COMPILER_IS_GCC],1, [Set to 1 if the compile is GNU GCC.])
|
||||
GCC_MAJOR_VERSION=`$CC -dumpversion | sed "s/\..*//"`
|
||||
AC_DEFINE_UNQUOTED([GCC_MAJOR_VERSION],${GCC_MAJOR_VERSION}, [Major version of GCC or 3 otherwise.])
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Find known target OS.
|
||||
|
||||
OS_SPECIFIC_INCLUDES=""
|
||||
os_is_win32=0
|
||||
|
||||
case "$target_os" in
|
||||
darwin* | rhapsody*)
|
||||
OS_SPECIFIC_INCLUDES="-fpascal-strings -I/Developer/Headers/FlatCarbon"
|
||||
OS_SPECIFIC_LINKS="-framework CoreAudio"
|
||||
;;
|
||||
mingw32*)
|
||||
OS_SPECIFIC_LINKS="-lwinmm"
|
||||
os_is_win32=1
|
||||
;;
|
||||
*)
|
||||
OS_SPECIFIC_INCLUDES=""
|
||||
OS_SPECIFIC_LINKS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
htmldocdir=$prefix/share/doc/libsamplerate0-dev/html
|
||||
|
||||
if test $prefix = "NONE" ; then
|
||||
htmldocdir=/usr/local/share/doc/libsamplerate0-dev/html
|
||||
else
|
||||
htmldocdir=$prefix/share/doc/libsamplerate0-dev/html
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Now use the information from the checking stage.
|
||||
|
||||
AC_DEFINE_UNQUOTED(OS_IS_WIN32, ${os_is_win32}, [Set to 1 if compiling for Win32])
|
||||
|
||||
AC_SUBST(htmldocdir)
|
||||
|
||||
AC_SUBST(SHLIB_VERSION_ARG)
|
||||
AC_SUBST(SHARED_VERSION_INFO)
|
||||
AC_SUBST(OS_SPECIFIC_INCLUDES)
|
||||
AC_SUBST(OS_SPECIFIC_LINKS)
|
||||
|
||||
AC_SUBST(COMPILER_IS_GCC)
|
||||
AC_SUBST(GCC_MAJOR_VERSION)
|
||||
|
||||
AC_SUBST(HAVE_FFTW3)
|
||||
AC_SUBST(FFTW3_CFLAGS)
|
||||
AC_SUBST(FFTW3_LIBS)
|
||||
|
||||
AC_SUBST(HAVE_SNDFILE)
|
||||
AC_SUBST(SNDFILE_CFLAGS)
|
||||
AC_SUBST(SNDFILE_LIBS)
|
||||
|
||||
AC_CONFIG_FILES([Makefile M4/Makefile src/Version_script \
|
||||
Win32/Makefile Win32/Makefile.mingw \
|
||||
src/Makefile examples/Makefile tests/Makefile doc/Makefile \
|
||||
libsamplerate.spec samplerate.pc])
|
||||
AC_OUTPUT
|
||||
|
||||
#====================================================================================
|
||||
|
||||
AC_MSG_RESULT([
|
||||
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
Configuration summary :
|
||||
|
||||
Version : ..................... ${VERSION}
|
||||
|
||||
Host CPU : .................... ${host_cpu}
|
||||
Host Vendor : ................. ${host_vendor}
|
||||
Host OS : ..................... ${host_os}
|
||||
])
|
||||
|
||||
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
||||
echo -e " Tools :\n"
|
||||
echo " Compiler is GCC : ............. ${ac_cv_c_compiler_gnu}"
|
||||
echo " GCC major version : ........... ${GCC_MAJOR_VERSION}"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([
|
||||
Extra tools required for testing and examples :
|
||||
|
||||
Use FFTW : .................... ${ac_cv_fftw3}])
|
||||
|
||||
AC_MSG_RESULT([ Have libsndfile : ............. ${ac_cv_sndfile}
|
||||
])
|
||||
|
||||
AC_MSG_RESULT([ Installation directories :
|
||||
|
||||
Library directory : ........... ${prefix}/lib
|
||||
Program directory : ........... ${prefix}/bin
|
||||
Pkgconfig directory : ......... ${prefix}/lib/pkgconfig
|
||||
])
|
||||
|
||||
if test x$prefix != "x/usr" ; then
|
||||
echo "Compiling some other packages against ${PACKAGE} may require "
|
||||
echo -e "the addition of \"${prefix}/lib/pkgconfig\" to the "
|
||||
echo -e "PKG_CONFIG_PATH environment variable.\n"
|
||||
fi
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,7 @@
|
|||
htmldir = $(htmldocdir)
|
||||
html_DATA = SRC.png SRC.css index.html license.html history.html download.html \
|
||||
lists.html quality.html win32.html faq.html api.html \
|
||||
api_simple.html api_callback.html api_full.html api_misc.html
|
||||
|
||||
EXTRA_DIST = $(html_DATA)
|
||||
|
|
@ -0,0 +1,445 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog \
|
||||
NEWS
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/check_signal.m4 \
|
||||
$(top_srcdir)/M4/clip_mode.m4 $(top_srcdir)/M4/endian.m4 \
|
||||
$(top_srcdir)/M4/libtool.m4 $(top_srcdir)/M4/lrint.m4 \
|
||||
$(top_srcdir)/M4/lrintf.m4 $(top_srcdir)/M4/ltoptions.m4 \
|
||||
$(top_srcdir)/M4/ltsugar.m4 $(top_srcdir)/M4/ltversion.m4 \
|
||||
$(top_srcdir)/M4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(htmldir)"
|
||||
DATA = $(html_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILER_IS_GCC = @COMPILER_IS_GCC@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLLWRAP = @DLLWRAP@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFTW3_CFLAGS = @FFTW3_CFLAGS@
|
||||
FFTW3_LIBS = @FFTW3_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_FFTW3 = @HAVE_FFTW3@
|
||||
HAVE_SNDFILE = @HAVE_SNDFILE@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OS_SPECIFIC_INCLUDES = @OS_SPECIFIC_INCLUDES@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PEXPORTS = @PEXPORTS@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = $(htmldocdir)
|
||||
htmldocdir = @htmldocdir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
html_DATA = SRC.png SRC.css index.html license.html history.html download.html \
|
||||
lists.html quality.html win32.html faq.html api.html \
|
||||
api_simple.html api_callback.html api_full.html api_misc.html
|
||||
|
||||
EXTRA_DIST = $(html_DATA)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-htmlDATA: $(html_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(htmldir)" && rm -f $$files
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(htmldir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-htmlDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-htmlDATA
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-htmlDATA install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-htmlDATA
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,36 @@
|
|||
Version 0.1.8 (2011-08-15)
|
||||
* Minor bug fixes and upates.
|
||||
|
||||
Version 0.1.7 (2009-02-14)
|
||||
* Fix a segfault which occurs when memcpy is passed a bad length parameter.
|
||||
* Fix compilation under MSVC.
|
||||
|
||||
Version 0.1.6 (2009-01-27)
|
||||
* Minor bug fix in test suite (account for rounding error on x86_64).
|
||||
|
||||
Version 0.1.5 (2009-01-11)
|
||||
* Optimisation resulting dramatic throughput improvements.
|
||||
|
||||
Version 0.1.4 (2008-07-02)
|
||||
* Fix bug which causes a segfault with extremely low conversion ratios.
|
||||
|
||||
Version 0.1.3 (2008-03-23)
|
||||
* Huge improvement to the quality of conversion with the
|
||||
SRC_SINC_MEDIUM_QUALITY and SRC_SINC_BEST_QUALITY converters.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.2 (2004-09-12)
|
||||
* Fixed where callback based API wasn't being reset properly.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.1 (2004-07-17)
|
||||
* Fixed bug in callback based API.
|
||||
* Fixed a bug brought to light by aggressive optimisations of gcc-3.4.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 0.1.0 (2004-03-14)
|
||||
* Added callback based API.
|
||||
* Added a pair of functions for doing short to float and float to short
|
||||
conversions on an arrays of data.
|
||||
* Many minor bug fixes.
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue