summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 16:53:52 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 16:53:52 +0000
commit1f6028de33eb55150418abf9e189ec25c16fae11 (patch)
tree4a45ca2b988d2db061ccbfdd85bd6fab6f5ef44b
parentb14acf4356b0377990d7769ebe5df3b84d3c26e0 (diff)
downloadfpc-1f6028de33eb55150418abf9e189ec25c16fae11.tar.gz
* eol style property in main branch fixed
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@19 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--install/macosx/resources/License.txt4
-rw-r--r--install/macosx/resources/ReadMe.txt6
-rw-r--r--packages/extra/winunits/jedi.inc2198
-rw-r--r--rtl/win32/mouse.pp504
4 files changed, 1356 insertions, 1356 deletions
diff --git a/install/macosx/resources/License.txt b/install/macosx/resources/License.txt
index beb4281f70..442749dd0f 100644
--- a/install/macosx/resources/License.txt
+++ b/install/macosx/resources/License.txt
@@ -1,2 +1,2 @@
- GNU GENERAL PUBLIC LICENSE
-Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble 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 Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it 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) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 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) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. 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. \ No newline at end of file
+GNU GENERAL PUBLIC LICENSE
+Version 2, June 1991Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.PreambleThe 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 MODIFICATION0. 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 WARRANTY11. 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 Appendix: How to Apply These Terms to Your New ProgramsIf 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) 19yy <name of author>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.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) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.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 ViceThis 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. \ No newline at end of file
diff --git a/install/macosx/resources/ReadMe.txt b/install/macosx/resources/ReadMe.txt
index 4f090c1b0f..463e6fc7c2 100644
--- a/install/macosx/resources/ReadMe.txt
+++ b/install/macosx/resources/ReadMe.txt
@@ -1,4 +1,4 @@
- Free Pascal Compiler Version 1.9.8 aka 2.0.0-Rc2 *********************************************************** * Introduction *********************************************************** *** WARNING *** WARNING *** WARNING *** This a beta release and it still contains some known bugs. However, it would be very useful if you could test your projects with it and tell us when you find bugs. You can submit bug reports on the website. *** WARNING *** WARNING *** WARNING *** This package contains a freeware 32-bit pascal compiler for several platforms. The language and the runtime library are almost compatible with Turbo Pascal 7.0 and recent Delphi releases. There is also partial support for the Macintosh pascal dialect. Free Pascal 1.9.8 is currently available for the following
+ Free Pascal Compiler Version 1.9.8 aka 2.0.0-Rc2************************************************************ Introduction************************************************************** WARNING *** WARNING *** WARNING ***This a beta release and it still contains some known bugs.However, it would be very useful if you could test yourprojects with it and tell us when you find bugs. You cansubmit bug reports on the website.*** WARNING *** WARNING *** WARNING ***This package contains a freeware 32-bit pascal compilerfor several platforms. The language and the runtimelibrary are almost compatible with Turbo Pascal 7.0 andrecent Delphi releases. There is also partial support forthe Macintosh pascal dialect.Free Pascal 1.9.8 is currently available for the following
platforms:
- Linux-i386
- Linux-powerpc
@@ -14,8 +14,8 @@ and eComStation)
- Netware-i386
- NetwLibc-i386 (LibC is preferred API under newer Netware
versions)
- More platforms will be supported in future 1.9.x beta releases. Because release building is quite time intensive, we decide to start the 2.0 beta series only with the most important targets. If you want to change this and create and maintain 2.0 beta releases for other platforms and targets, feel free to contact us, E-Mail addresses are listed below. ********************************************************** * Features ********************************************************** - high speed compiler - fully 32 or 64-bit code - language features: - almost fully compatible with Borland Pascal and Borland Delphi - ansi strings - wide strings - exception support - RTTI support - procedure overloading - operator overloading - COM, CORBA and raw interfaces support - dynamic array support - variant support - code optimizer: - peephole optimizer (80x86-only) - loading of variables into registers - assembler level dataflow analyzer (80x86-only) - stack frame eliminations - sophisticated register allocator - integrated BASM (built-in assembler) parser - supports ATT syntax used by GNU C - supports Intel syntax used by Turbo Pascal (80x86-only) - can compile code into assembler source code for these assemblers: - GNU Assembler (GAS) - Netwide assembler (Nasm) - Microsoft Assembler/Turbo Assembler (Masm/Tasm) - can call external C code - smartlinking (not yet supported under Mac OS X) - support for the GNU debugger - IDE (currently for GO32v2, Linux, FreeBSD and Win32 only, in beta testing phase) - can create binaries running natively under both DOS and OS/2 (EMX version) ********************************************************** * Minimum requirements ********************************************************** i386, x86_64, PowerPC or Sparc processor Win32: - Win95/98/Me/2000/XP or WinNT - 16 MB RAM OS/2:
+More platforms will be supported in future 1.9.x betareleases. Because release building is quite timeintensive, we decide to start the 2.0 beta series onlywith the most important targets. If you want to changethis and create and maintain 2.0 beta releases for otherplatforms and targets, feel free to contact us, E-Mailaddresses are listed below.*********************************************************** Features**********************************************************- high speed compiler- fully 32 or 64-bit code- language features: - almost fully compatible with Borland Pascal and Borland Delphi - ansi strings - wide strings - exception support - RTTI support - procedure overloading - operator overloading - COM, CORBA and raw interfaces support - dynamic array support - variant support- code optimizer: - peephole optimizer (80x86-only) - loading of variables into registers - assembler level dataflow analyzer (80x86-only) - stack frame eliminations - sophisticated register allocator- integrated BASM (built-in assembler) parser - supports ATT syntax used by GNU C - supports Intel syntax used by Turbo Pascal (80x86-only)- can compile code into assembler source code for these assemblers: - GNU Assembler (GAS) - Netwide assembler (Nasm) - Microsoft Assembler/Turbo Assembler (Masm/Tasm)- can call external C code- smartlinking (not yet supported under Mac OS X)- support for the GNU debugger- IDE (currently for GO32v2, Linux, FreeBSD and Win32 only, in beta testing phase)- can create binaries running natively under both DOS and OS/2 (EMX version)*********************************************************** Minimum requirements**********************************************************i386, x86_64, PowerPC or Sparc processorWin32: - Win95/98/Me/2000/XP or WinNT - 16 MB RAMOS/2:
- OS/2 Warp v3.0, OS/2 Warp v4.0, WSeB, MCP or any
eComStation version (OS/2 2.0/2.1 may work partly, but
not supported)
-Linux: - system running a 2.0.x kernel FreeBSD: - FreeBSD 4.x system or 5.x system that has COMPAT_4 system (which is default) Mac OS X: - Mac OS X 10.1 and higher (10.0 may also work, but is untested) Mac OS (classic) - Mac OS 9.2 has been tested, should probably also work from 7.5.3 and up. ********************************************************** * Quick start - Mac OS X ********************************************************** The easiest way to get started is by following the instructions to install the XCode integration kit at http://www.freepascal.org/xcode.html. However, for those interested in also compiling from the command line (or those under Mac OS X 10.2.x or earlier), command line instructions can be found below. The compiler is called "fpc" and will be installed in /usr/local/bin. This directory may not be in your PATH yet (if you type "fpc" in a Terminal window and you get something like "fpc: command not found", then it isn't). If the installation directory is not yet in your path, you will have to add it. Follow the instructions at "http://fink.sourceforge.net/doc/users-guide/install.php#setup" to determine which file you have to edit, but instead of adding the line suggested there, add the following at the end: - if your shell is the Bourne shell (bash): export PATH=/usr/local/bin:$PATH - if your shell is the C Shell (csh or tcsh): setenv PATH /usr/local/bin:${PATH} Next, close the Terminal window and open a new one. Now the path should be set correctly. After installing the package, you can write your source code in your favorite editor (including Project Builder and XCode). To compile something, go to the directory containing your source files in Terminal and type fpc name_of_your_source_file The compiler only accepts one file name as argument, but will automatically search for and compile any units used by the specified source file. Run "fpc" without any arguments to get an overview of the possible command line options. ********************************************************** * Documentation ********************************************************** The documentation is available as HTML pages, PDF, PS, and text although the recommended format is pdf. The PDF documentation is installed in "/Developer/Documentation/Free Pascal Compiler". The html version can be found on the website in the "More information" section, and on the ftp site at ftp://ftp.freepascal.org/fpc/docs ********************************************************** * Suggestions, Help, Bug reporting, snapshots, ... ********************************************************** Suggestions, Help ... --------------------- e-mail: fpc-devel@lists.freepascal.org (bugs, developer related questions) e-mail: fpc-pascal@lists.freepascal.org (general pascal related questions) Both these adresses are for mailing lists. If you're not subscribed, be sure to mention this fact when sending questions to these lists, so that people sending answers know about it and send you a copy. Information about available lists and subscription can be found on http://lists.freepascal.org/mailman/listinfo www: http://www.freepascal.org ftp: ftp://ftp.freepascal.org/fpc (several mirrors exist, see website for links) Additional information about mailing lists, news, future plans etc. can be found on the web site. SNAPSHOTS & SOURCES ------------------- One of the features of FPC is the snapshots. These are made daily or weekly from the developers' latest versions of the source. Snapshots are available for the GO32v2, Win32, OS/2 and Linux versions of the compiler/rtl. There is currently no daily snapshot of the Mac OS X version, but when significant bugs are fixed, a new version is made available at http://www.freepascal.org/fpcmac.html Making your own snapshots ------------------------- Instructions to do this can be found at http://www.surtec.com/~rj/Xcode-FreePascal/#FPC/CVS-Quickstart REPORTING BUGS ---------------- If you find a bug in the released version, you may want to try a snapshot (see SNAPSHOTS above) to see if it has been fixed before reporting it to the fpc-devel mailing list. If you find a fault or 'feature' in a release, please report it to the fpc-devel mailing list. PLEASE SEND ALSO A SMALL EXTRACT OF THE SOURCE CODE which caused the problem, and state the version eg Win32, GO32v2, and the date of the compiler etc on which you noticed the problem & any other useful info so the developers can reproduce the problem, otherwise they may not be willing/able to fix it. ********************************************************** * License ********************************************************** The compiler and most utilities and executables distributed in this package fall under the GPL, for more information read the file COPYING. Some specific utilities and programs come under the license described in COPYING.DJ, COPYING.EMX and COPYING.RSX. The documentation, unless otherwise noted, is distributed as free text, and is distributed under the GNU Library General Public License. The runtime library, package libraries, free component library, and other libraries which are used to create executables by the compiler come under a modified GNU Library General Public license. Additional information about the library license is found in COPYING.FPC. NOTE: OS/2 version of the installer uses the library UNZIP32.DLL from Info-ZIP. Info-ZIP's software (Zip, UnZip and related utilities) is free and can be obtained as source code or executables from Internet/WWW sites, including http://www.info-zip.org. \ No newline at end of file
+Linux: - system running a 2.0.x kernelFreeBSD:- FreeBSD 4.x system or 5.x system that has COMPAT_4 system (which is default)Mac OS X: - Mac OS X 10.1 and higher (10.0 may also work, but is untested)Mac OS (classic) - Mac OS 9.2 has been tested, should probably also work from 7.5.3 and up.*********************************************************** Quick start - Mac OS X**********************************************************The easiest way to get started is by following theinstructions to install the XCode integration kit athttp://www.freepascal.org/xcode.html. However, for thoseinterested in also compiling from the command line (orthose under Mac OS X 10.2.x or earlier), command lineinstructions can be found below.The compiler is called "fpc" and will be installed in/usr/local/bin. This directory may not be in your PATH yet(if you type "fpc" in a Terminal window and you getsomething like "fpc: command not found", then it isn't).If the installation directory is not yet in your path, youwill have to add it. Follow the instructions at"http://fink.sourceforge.net/doc/users-guide/install.php#setup"to determine which file you have to edit, but instead ofadding the line suggested there, add the following at theend:- if your shell is the Bourne shell (bash): export PATH=/usr/local/bin:$PATH- if your shell is the C Shell (csh or tcsh): setenv PATH /usr/local/bin:${PATH}Next, close the Terminal window and open a new one. Nowthe path should be set correctly.After installing the package, you can write your sourcecode in your favorite editor (including Project Builderand XCode). To compile something, go to the directorycontaining your source files in Terminal and type fpc name_of_your_source_fileThe compiler only accepts one file name as argument, butwill automatically search for and compile any units usedby the specified source file. Run "fpc" without anyarguments to get an overview of the possible command lineoptions.*********************************************************** Documentation**********************************************************The documentation is available as HTML pages, PDF, PS, andtext although the recommended format is pdf. The PDFdocumentation is installed in"/Developer/Documentation/Free Pascal Compiler". The htmlversion can be found on the website in the "Moreinformation" section, and on the ftp site atftp://ftp.freepascal.org/fpc/docs*********************************************************** Suggestions, Help, Bug reporting, snapshots, ...**********************************************************Suggestions, Help ...---------------------e-mail: fpc-devel@lists.freepascal.org (bugs, developer related questions)e-mail: fpc-pascal@lists.freepascal.org (general pascal related questions)Both these adresses are for mailing lists. If you're notsubscribed, be sure to mention this fact when sendingquestions to these lists, so that people sending answersknow about it and send you a copy. Information aboutavailable lists and subscription can be found onhttp://lists.freepascal.org/mailman/listinfowww: http://www.freepascal.orgftp: ftp://ftp.freepascal.org/fpc(several mirrors exist, see website for links)Additional information about mailing lists, news, futureplans etc. can be found on the web site.SNAPSHOTS & SOURCES-------------------One of the features of FPC is the snapshots. These aremade daily or weekly from the developers' latest versionsof the source. Snapshots are available for the GO32v2,Win32, OS/2 and Linux versions of the compiler/rtl. Thereis currently no daily snapshot of the Mac OS X version,but when significant bugs are fixed, a new version is madeavailable at http://www.freepascal.org/fpcmac.htmlMaking your own snapshots-------------------------Instructions to do this can be found athttp://www.surtec.com/~rj/Xcode-FreePascal/#FPC/CVS-QuickstartREPORTING BUGS----------------If you find a bug in the released version, you may want totry a snapshot (see SNAPSHOTS above) to see if it has beenfixed before reporting it to the fpc-devel mailing list.If you find a fault or 'feature' in a release, pleasereport it to the fpc-devel mailing list. PLEASE SEND ALSOA SMALL EXTRACT OF THE SOURCE CODE which caused theproblem, and state the version eg Win32, GO32v2, and thedate of the compiler etc on which you noticed the problem& any other useful info so the developers can reproducethe problem, otherwise they may not be willing/able to fixit.*********************************************************** License**********************************************************The compiler and most utilities and executablesdistributed in this package fall under the GPL, for moreinformation read the file COPYING.Some specific utilities and programs come under thelicense described in COPYING.DJ, COPYING.EMX andCOPYING.RSX.The documentation, unless otherwise noted, is distributedas free text, and is distributed under the GNU LibraryGeneral Public License.The runtime library, package libraries, free componentlibrary, and other libraries which are used to createexecutables by the compiler come under a modified GNULibrary General Public license. Additional informationabout the library license is found in COPYING.FPC.NOTE: OS/2 version of the installer uses the libraryUNZIP32.DLL from Info-ZIP. Info-ZIP's software (Zip, UnZipand related utilities) is free and can be obtained assource code or executables from Internet/WWW sites,including http://www.info-zip.org. \ No newline at end of file
diff --git a/packages/extra/winunits/jedi.inc b/packages/extra/winunits/jedi.inc
index e7340f5ae7..5920ea9676 100644
--- a/packages/extra/winunits/jedi.inc
+++ b/packages/extra/winunits/jedi.inc
@@ -1,1102 +1,1102 @@
-{$IFNDEF JEDI_INC}
-{$DEFINE JEDI_INC}
-
-{******************************************************************************}
-{ }
-{ The contents of this file are subject to the Mozilla Public License }
-{ Version 1.1 (the "License"); you may not use this file except in }
-{ compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/ }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License }
-{ for the specific language governing rights and limitations under the }
-{ License. }
-{ }
-{ The Original Code is: jedi.inc. }
-{ The Initial Developer of the Original Code is Project JEDI }
-{ http://www.delphi-jedi.org }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of }
-{ the GNU Lesser General Public License (the "LGPL License"), in which case }
-{ the provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this }
-{ file under the MPL, indicate your decision by deleting the provisions }
-{ above and replace them with the notice and other provisions required by }
-{ the LGPL License. If you do not delete the provisions above, a recipient }
-{ may use your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: }
-{ http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-{ }
-{ This file defines various generic compiler directives used in different }
-{ libraries, e.g. in the JEDI Code Library (JCL) and JEDI Visual Component }
-{ Library Library (J-VCL). The directives in this file are of generic nature }
-{ and consist mostly of mappings from the VERXXX directives defined by }
-{ Delphi, C++ Builder and FPC to friendly names such as DELPHI5 and }
-{ SUPPORTS_WIDESTRING. These friendly names are subsequently used in the }
-{ libraries to test for compiler versions and/or whether the compiler }
-{ supports certain features (such as widestrings or 64 bit integers. The }
-{ libraries provide an additional, library specific, include file. For the }
-{ JCL e.g. this is jcl.inc. These files should be included in source files }
-{ instead of this file (which is pulled in automatically). }
-{ }
-{******************************************************************************}
-
-// Last modified: $Date: 2005/04/04 07:56:11 $
-// For history see end of file
-
-(*
-
-- Development environment directives
-
- This file defines two directives to indicate which development environment the
- library is being compiled with. Currently this can either be Delphi, Kylix,
- C++ Builder or FPC.
-
- Directive Description
- ------------------------------------------------------------------------------
- DELPHI Defined if compiled with Delphi
- KYLIX Defined if compiled with Kylix
- DELPHICOMPILER Defined if compiled with Delphi or Kylix/Delphi
- BCB Defined if compiled with C++ Builder
- CPPBUILDER Defined if compiled with C++ Builder (alias for BCB)
- BCBCOMPILER Defined if compiled with C++ Builder or Kylix/C++
- DELPHILANGUAGE Defined if compiled with Delphi, Kylix or C++ Builder
- BORLAND Defined if compiled with Delphi, Kylix or C++ Builder
- FPC Defined if compiled with FPC
-
-- Platform Directives
-
- Platform directives are not all explicitly defined in this file, some are
- defined by the compiler itself. They are listed here only for completeness.
-
- Directive Description
- ------------------------------------------------------------------------------
- WIN32 Defined when target platform is 32 bit Windows
- MSWINDOWS Defined when target platform is 32 bit Windows
- LINUX Defined when target platform is Linux
- UNIX Defined when target platform is Linux or Unix
-
-
-- Visual library Directives
-
- The following directives indicate for a visual library. In a Delphi
- application you need to define VisualCLX in the project options, if you want
- to use the VisualCLX. Alternative you can use the IDE expert, which is distributed
- with the JCL to do this automatically.
-
- Directive Description
- ------------------------------------------------------------------------------
- COMPLIB_VCL Defined when application do not define VisualCLX, obsolete, use VCL
- COMPLIB_CLX Defined when application use the VisualCLX, obsolete, use VisualCLX
- VCL Defined when application do not define VisualCLX
- VisualCLX Defined when application use the VisualCLX
-
-
-- Delphi Versions
-
- The following directives are direct mappings from the VERXXX directives to a
- friendly name of the associated compiler. These directives are only defined if
- the compiler is Delphi (ie DELPHI is defined).
-
- Directive Description
- ------------------------------------------------------------------------------
- DELPHI1 Defined when compiling with Delphi 1
- DELPHI2 Defined when compiling with Delphi 2
- DELPHI3 Defined when compiling with Delphi 3
- DELPHI4 Defined when compiling with Delphi 4
- DELPHI5 Defined when compiling with Delphi 5
- DELPHI6 Defined when compiling with Delphi 6
- DELPHI7 Defined when compiling with Delphi 7
- DELPHI8 Defined when compiling with Delphi 8
- DELPHI9 Defined when compiling with Delphi 9
- DELPHI1_UP Defined when compiling with Delphi 1 or higher
- DELPHI2_UP Defined when compiling with Delphi 2 or higher
- DELPHI3_UP Defined when compiling with Delphi 3 or higher
- DELPHI4_UP Defined when compiling with Delphi 4 or higher
- DELPHI5_UP Defined when compiling with Delphi 5 or higher
- DELPHI6_UP Defined when compiling with Delphi 6 or higher
- DELPHI7_UP Defined when compiling with Delphi 7 or higher
- DELPHI8_UP Defined when compiling with Delphi 8 or higher
- DELPHI9_UP Defined when compiling with Delphi 9 or higher
-
-
-- Kylix Versions
-
- The following directives are direct mappings from the VERXXX directives to a
- friendly name of the associated compiler. These directives are only defined if
- the compiler is Kylix (ie KYLIX is defined).
-
- Directive Description
- ------------------------------------------------------------------------------
- KYLIX1 Defined when compiling with Kylix 1
- KYLIX2 Defined when compiling with Kylix 2
- KYLIX3 Defined when compiling with Kylix 3
- KYLIX1_UP Defined when compiling with Kylix 1 or higher
- KYLIX2_UP Defined when compiling with Kylix 2 or higher
- KYLIX3_UP Defined when compiling with Kylix 3 or higher
-
-
-- Delphi Compiler Versions (Delphi / Kylix, not in BCB mode)
-
- Directive Description
- ------------------------------------------------------------------------------
- DELPHICOMPILER1 Defined when compiling with Delphi 1
- DELPHICOMPILER2 Defined when compiling with Delphi 2
- DELPHICOMPILER3 Defined when compiling with Delphi 3
- DELPHICOMPILER4 Defined when compiling with Delphi 4
- DELPHICOMPILER5 Defined when compiling with Delphi 5
- DELPHICOMPILER6 Defined when compiling with Delphi 6 or Kylix 1, 2 or 3
- DELPHICOMPILER7 Defined when compiling with Delphi 7
- DELPHICOMPILER8 Defined when compiling with Delphi 8
- DELPHICOMPILER9 Defined when compiling with Delphi 9
- DELPHICOMPILER1_UP Defined when compiling with Delphi 1 or higher
- DELPHICOMPILER2_UP Defined when compiling with Delphi 2 or higher
- DELPHICOMPILER3_UP Defined when compiling with Delphi 3 or higher
- DELPHICOMPILER4_UP Defined when compiling with Delphi 4 or higher
- DELPHICOMPILER5_UP Defined when compiling with Delphi 5 or higher
- DELPHICOMPILER6_UP Defined when compiling with Delphi 6 or Kylix 1, 2 or 3 or higher
- DELPHICOMPILER7_UP Defined when compiling with Delphi 7 or higher
- DELPHICOMPILER8_UP Defined when compiling with Delphi 8 or higher
- DELPHICOMPILER9_UP Defined when compiling with Delphi 9 or higher
-
-
-- C++ Builder Versions
-
- The following directives are direct mappings from the VERXXX directives to a
- friendly name of the associated compiler. These directives are only defined if
- the compiler is C++ Builder (ie BCB is defined).
-
- Directive Description
- ------------------------------------------------------------------------------
- BCB1 Defined when compiling with C++ Builder 1
- BCB3 Defined when compiling with C++ Builder 3
- BCB4 Defined when compiling with C++ Builder 4
- BCB5 Defined when compiling with C++ Builder 5
- BCB6 Defined when compiling with C++ Builder 6
- BCB1_UP Defined when compiling with C++ Builder 1 or higher
- BCB3_UP Defined when compiling with C++ Builder 3 or higher
- BCB4_UP Defined when compiling with C++ Builder 4 or higher
- BCB5_UP Defined when compiling with C++ Builder 5 or higher
- BCB6_UP Defined when compiling with C++ Builder 6 or higher
-
-
-- Compiler Versions
-
- The following directives are direct mappings from the VERXXX directives to a
- friendly name of the associated compiler. Unlike the DELPHI_X and BCB_X
- directives, these directives are indepedent of the development environment.
- That is, they are defined regardless of whether compilation takes place using
- Delphi or C++ Builder.
-
- Directive Description
- ------------------------------------------------------------------------------
- COMPILER1 Defined when compiling with Delphi 1
- COMPILER2 Defined when compiling with Delphi 2 or C++ Builder 1
- COMPILER3 Defined when compiling with Delphi 3
- COMPILER35 Defined when compiling with C++ Builder 3
- COMPILER4 Defined when compiling with Delphi 4 or C++ Builder 4
- COMPILER5 Defined when compiling with Delphi 5 or C++ Builder 5
- COMPILER6 Defined when compiling with Delphi 6 or C++ Builder 6
- COMPILER7 Defined when compiling with Delphi 7
- COMPILER8 Defined when compiling with Delphi 8
- COMPILER9 Defined when compiling with Delphi 9
- COMPILER1_UP Defined when compiling with Delphi 1 or higher
- COMPILER2_UP Defined when compiling with Delphi 2 or C++ Builder 1 or higher
- COMPILER3_UP Defined when compiling with Delphi 3 or higher
- COMPILER35_UP Defined when compiling with C++ Builder 3 or higher
- COMPILER4_UP Defined when compiling with Delphi 4 or C++ Builder 4 or higher
- COMPILER5_UP Defined when compiling with Delphi 5 or C++ Builder 5 or higher
- COMPILER6_UP Defined when compiling with Delphi 6 or C++ Builder 6 or higher
- COMPILER7_UP Defined when compiling with Delphi 7
- COMPILER8_UP Defined when compiling with Delphi 8
- COMPILER9_UP Defined when compiling with Delphi 9
-
-
-- RTL Versions
-
- Use e.g. following to determine the exact RTL version since version 14.0:
- {$IFDEF CONDITIONALEXPRESSIONS}
- {$IF Declared(RTLVersion) and (RTLVersion >= 14.2)}
- // code for Delphi 6.02 or later, Kylix 2 or later, C++ Builder 6 or later
- ...
- {$IFEND}
- {$ENDIF}
-
- Directive Description
- ------------------------------------------------------------------------------
- RTL80_UP Defined when compiling with Delphi 1 or later
- RTL90_UP Defined when compiling with Delphi 2 or later
- RTL93_UP Defined when compiling with C++ Builder 1 or later
- RTL100_UP Defined when compiling with Delphi 3 or later
- RTL110_UP Defined when compiling with C++ Builder 3 or later
- RTL120_UP Defined when compiling with Delphi 4 or later
- RTL125_UP Defined when compiling with C++ Builder 4 or later
- RTL130_UP Defined when compiling with Delphi 5 or C++ Builder 5 or later
- RTL140_UP Defined when compiling with Delphi 6, Kylix 1, 2 or 3 or C++ Builder 6 or later
- RTL150_UP Defined when compiling with Delphi 7 or later
- RTL160_UP Defined when compiling with Delphi 8 or later
- RTL170_UP Defined when compiling with Delphi 9 or later
-
-
-- Feature Directives
-
- The features directives are used to test if the compiler supports specific
- features, such as method overloading, and adjust the sources accordingly. Use
- of these directives is preferred over the use of the DELPHI and COMPILER
- directives.
-
- Directive Description
- ------------------------------------------------------------------------------
- SUPPORTS_CONSTPARAMS Compiler supports const parameters (D1+)
- SUPPORTS_SINGLE Compiler supports the Single type (D1+)
- SUPPORTS_DOUBLE Compiler supports the Double type (D1+)
- SUPPORTS_EXTENDED Compiler supports the Extended type (D1+)
- SUPPORTS_CURRENCY Compiler supports the Currency type (D2+)
- SUPPORTS_THREADVAR Compiler supports threadvar declarations (D2+)
- SUPPORTS_OUTPARAMS Compiler supports out parameters (D3+)
- SUPPORTS_VARIANT Compiler supports variant (D2+)
- SUPPORTS_WIDECHAR Compiler supports the WideChar type (D2+)
- SUPPORTS_WIDESTRING Compiler supports the WideString type (D3+/BCB3+)
- SUPPORTS_INTERFACE Compiler supports interfaces (D3+/BCB3+)
- SUPPORTS_DISPINTERFACE Compiler supports dispinterfaces (D3+/BCB3+)
- SUPPORTS_EXTSYM Compiler supports the $EXTERNALSYM directive (D4+/BCB3+)
- SUPPORTS_NODEFINE Compiler supports the $NODEFINE directive (D4+/BCB3+)
- SUPPORTS_LONGWORD Compiler supports the LongWord type (unsigned 32 bit) (D4+/BCB4+)
- SUPPORTS_INT64 Compiler supports the Int64 type (D4+/BCB4+)
- SUPPORTS_DYNAMICARRAYS Compiler supports dynamic arrays (D4+/BCB4+)
- SUPPORTS_DEFAULTPARAMS Compiler supports default parameters (D4+/BCB4+)
- SUPPORTS_OVERLOAD Compiler supports overloading (D4+/BCB4+)
- SUPPORTS_IMPLEMENTS Compiler supports implements (D4+/BCB4+)
- SUPPORTS_DEPRECATED Compiler supports the deprecated directive (D6+/BCB6+)
- SUPPORTS_PLATFORM Compiler supports the platform directive (D6+/BCB6+)
- SUPPORTS_LIBRARY Compiler supports the library directive (D6+/BCB6+)
- SUPPORTS_LOCAL Compiler supports the local directive (D6+/BCB6+)
- ACCEPT_DEPRECATED Compiler supports or ignore the deprecated directive (D6/BCB6/FPC)
- ACCEPT_PLATFORM Compiler supports or ignore the platform directive (D6+/BCB6+)
- ACCEPT_LIBRARY Compiler supports or ignore the library directive (D6+/BCB6+)
- SUPPORTS_CUSTOMVARIANTS Compiler supports custom variants (D6+/BCB6+)
- SUPPORTS_VARARGS Compiler supports varargs (D6+/BCB6+)
- SUPPORTS_ENUMVALUE Compiler supports values for enums (D6+/BCB6+)
- SUPPORTS_DEPRECATED_WARNINGS Compiler supports deprecated warnings (D6+/BCB6+)
- SUPPORTS_LIBRARY_WARNINGS Compiler supports library warnings (D6+/BCB6+)
- SUPPORTS_PLATFORM_WARNINGS Compiler supports platform warnings (D6+/BCB6+)
- SUPPORTS_UNSAFE_WARNINGS Compiler supports unsafe warnings (D7)
- SUPPORTS_WEAKPACKAGEUNIT Compiler supports the WEAKPACKAGEUNIT directive
- SUPPORTS_COMPILETIME_MESSAGES Compiler supports the MESSAGE directive
- HAS_UNIT_LIBC The unit Libc exists (Kylix, FPC on Linux)
- HAS_UNIT_RTLCONSTS The unit RTLConsts exists (D6+/BCB6+)
- HAS_UNIT_TYPES The unit Types exists (D6+/BCB6+)
- HAS_UNIT_VARIANTS The unit Variants exists (D6+/BCB6+)
- HAS_UNIT_STRUTILS The unit StrUtils exists (D6+/BCB6+)
- XPLATFORM_RTL The RTL supports crossplatform function names (e.g. RaiseLastOSError) (D6+/BCB6+/FPC)
-
-- Compiler Settings
-
- The compiler settings directives indicate whether a specific compiler setting
- is in effect. This facilitates changing compiler settings locally in a more
- compact and readible manner.
-
- Directive Description
- ------------------------------------------------------------------------------
- ALIGN_ON Compiling in the A+ state (no alignment)
- BOOLEVAL_ON Compiling in the B+ state (complete boolean evaluation)
- ASSERTIONS_ON Compiling in the C+ state (assertions on)
- DEBUGINFO_ON Compiling in the D+ state (debug info generation on)
- IMPORTEDDATA_ON Compiling in the G+ state (creation of imported data references)
- LONGSTRINGS_ON Compiling in the H+ state (string defined as AnsiString)
- IOCHECKS_ON Compiling in the I+ state (I/O checking enabled)
- WRITEABLECONST_ON Compiling in the J+ state (typed constants can be modified)
- LOCALSYMBOLS Compiling in the L+ state (local symbol generation)
- TYPEINFO_ON Compiling in the M+ state (RTTI generation on)
- OPTIMIZATION_ON Compiling in the O+ state (code optimization on)
- OPENSTRINGS_ON Compiling in the P+ state (variable string parameters are openstrings)
- OVERFLOWCHECKS_ON Compiling in the Q+ state (overflow checing on)
- RANGECHECKS_ON Compiling in the R+ state (range checking on)
- TYPEDADDRESS_ON Compiling in the T+ state (pointers obtained using the @ operator are typed)
- SAFEDIVIDE_ON Compiling in the U+ state (save FDIV instruction through RTL emulation)
- VARSTRINGCHECKS_ON Compiling in the V+ state (type checking of shortstrings)
- STACKFRAMES_ON Compiling in the W+ state (generation of stack frames)
- EXTENDEDSYNTAX_ON Compiling in the X+ state (Delphi extended syntax enabled)
-*)
-
-{$DEFINE BORLAND}
-
-{ Set FreePascal to Delphi mode }
-{$IFDEF FPC}
- {$MODE DELPHI}
- {$ASMMODE Intel}
- {$UNDEF BORLAND}
-{$ENDIF}
-
-{$IFDEF BORLAND}
- {$IFDEF LINUX}
- {$DEFINE KYLIX}
- {$ENDIF LINUX}
-{$ENDIF BORLAND}
-
-{------------------------------------------------------------------------------}
-{ VERXXX to COMPILERX, DELPHIX and BCBX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF BORLAND}
- {$IFDEF KYLIX}
- {$I kylix.inc} // FPC incompatible stuff
- {$ELSE ~KYLIX}
-
- {$IFDEF VER170}
- {$DEFINE COMPILER9}
- {$DEFINE DELPHI9}
- {$DEFINE DELPHICOMPILER9}
- {$DEFINE RTL170_UP}
- {$ENDIF}
-
- {$IFDEF VER160}
- {$DEFINE COMPILER8}
- {$DEFINE DELPHI8}
- {$DEFINE DELPHICOMPILER8}
- {$DEFINE RTL160_UP}
- {$ENDIF}
-
- {$IFDEF VER150}
- {$DEFINE COMPILER7}
- {$IFDEF BCB}
- {$DEFINE BCB7}
- {$ELSE}
- {$DEFINE DELPHI7}
- {$DEFINE DELPHICOMPILER7}
- {$ENDIF}
- {$DEFINE RTL150_UP}
- {$ENDIF}
-
- {$IFDEF VER140}
- {$DEFINE COMPILER6}
- {$IFDEF BCB}
- {$DEFINE BCB6}
- {$ELSE}
- {$DEFINE DELPHI6}
- {$DEFINE DELPHICOMPILER6}
- {$ENDIF}
- {$DEFINE RTL140_UP}
- {$ENDIF}
-
- {$IFDEF VER130}
- {$DEFINE COMPILER5}
- {$IFDEF BCB}
- {$DEFINE BCB5}
- {$ELSE}
- {$DEFINE DELPHI5}
- {$DEFINE DELPHICOMPILER5}
- {$ENDIF}
- {$DEFINE RTL130_UP}
- {$ENDIF}
-
- {$IFDEF VER125}
- {$DEFINE COMPILER4}
- {$DEFINE BCB4}
- {$DEFINE BCB}
- {$DEFINE RTL125_UP}
- {$ENDIF}
-
- {$IFDEF VER120}
- {$DEFINE COMPILER4}
- {$DEFINE DELPHI4}
- {$DEFINE DELPHICOMPILER4}
- {$DEFINE RTL120_UP}
- {$ENDIF}
-
- {$IFDEF VER110}
- {$DEFINE COMPILER35}
- {$DEFINE BCB3}
- {$DEFINE RTL110_UP}
- {$ENDIF}
-
- {$IFDEF VER100}
- {$DEFINE COMPILER3}
- {$DEFINE DELPHI3}
- {$DEFINE DELPHICOMPILER3}
- {$DEFINE RTL100_UP}
- {$ENDIF}
-
- {$IFDEF VER93}
- {$DEFINE COMPILER2}
- {$DEFINE BCB1}
- {$DEFINE BCB}
- {$DEFINE RTL93_UP}
- {$ENDIF}
-
- {$IFDEF VER90}
- {$DEFINE COMPILER2}
- {$DEFINE DELPHI2}
- {$DEFINE DELPHICOMPILER2}
- {$DEFINE RTL90_UP}
- {$ENDIF}
-
- {$IFDEF VER80}
- {$DEFINE COMPILER1}
- {$DEFINE DELPHI1}
- {$DEFINE DELPHICOMPILER1}
- {$DEFINE RTL80_UP}
- {$ENDIF}
-
- {$ENDIF ~KYLIX}
-
- {$IFDEF BCB}
- {$DEFINE CPPBUILDER}
- {$DEFINE BCBCOMPILER}
- {$ELSE ~BCB}
- {$DEFINE DELPHI}
- {$DEFINE DELPHICOMPILER}
- {$ENDIF ~BCB}
-
-{$ENDIF BORLAND}
-
-{------------------------------------------------------------------------------}
-{ DELPHIX_UP from DELPHIX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF DELPHI9}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI8}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI7}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI6}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI5}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI4}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI3}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI1}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ KYLIXX_UP from KYLIXX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF KYLIX3}
- {$DEFINE KYLIX3_UP}
- {$DEFINE KYLIX2_UP}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-{$IFDEF KYLIX2}
- {$DEFINE KYLIX2_UP}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-{$IFDEF KYLIX1}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ BCBX_UP from BCBX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF BCB7}
- {$DEFINE BCB7_UP}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB6}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB5}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB4}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB3}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB1}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ DELPHICOMPILERX_UP from DELPHICOMPILERX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF DELPHICOMPILER9}
- {$DEFINE DELPHICOMPILER9_UP}
- {$DEFINE DELPHICOMPILER8_UP}
- {$DEFINE DELPHICOMPILER7_UP}
- {$DEFINE DELPHICOMPILER6_UP}
- {$DEFINE DELPHICOMPILER5_UP}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER8}
- {$DEFINE DELPHICOMPILER8_UP}
- {$DEFINE DELPHICOMPILER7_UP}
- {$DEFINE DELPHICOMPILER6_UP}
- {$DEFINE DELPHICOMPILER5_UP}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER7}
- {$DEFINE DELPHICOMPILER7_UP}
- {$DEFINE DELPHICOMPILER6_UP}
- {$DEFINE DELPHICOMPILER5_UP}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER6}
- {$DEFINE DELPHICOMPILER6_UP}
- {$DEFINE DELPHICOMPILER5_UP}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER5}
- {$DEFINE DELPHICOMPILER5_UP}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER4}
- {$DEFINE DELPHICOMPILER4_UP}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER3}
- {$DEFINE DELPHICOMPILER3_UP}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER2}
- {$DEFINE DELPHICOMPILER2_UP}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHICOMPILER1}
- {$DEFINE DELPHICOMPILER1_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ COMPILERX_UP from COMPILERX mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF COMPILER9}
- {$DEFINE COMPILER9_UP}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER8}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER7}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER6}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER5}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER4}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER35}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER3}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER2}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER1}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-
-{$IFDEF DELPHICOMPILER}
- {$DEFINE DELPHILANGUAGE}
-{$ENDIF}
-
-{$IFDEF BCBCOMPILER}
- {$DEFINE DELPHILANGUAGE}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ RTLX_UP from RTLX_UP mappings }
-{------------------------------------------------------------------------------}
-
-{$IFDEF RTL170_UP}
- {$DEFINE RTL160_UP}
-{$ENDIF}
-
-{$IFDEF RTL160_UP}
- {$DEFINE RTL150_UP}
-{$ENDIF}
-
-{$IFDEF RTL150_UP}
- {$DEFINE RTL145_UP}
-{$ENDIF}
-
-{$IFDEF RTL145_UP}
- {$DEFINE RTL142_UP}
-{$ENDIF}
-
-{$IFDEF RTL142_UP}
- {$DEFINE RTL140_UP}
-{$ENDIF}
-
-{$IFDEF RTL140_UP}
- {$DEFINE RTL130_UP}
-{$ENDIF}
-
-{$IFDEF RTL130_UP}
- {$DEFINE RTL125_UP}
-{$ENDIF}
-
-{$IFDEF RTL125_UP}
- {$DEFINE RTL120_UP}
-{$ENDIF}
-
-{$IFDEF RTL120_UP}
- {$DEFINE RTL110_UP}
-{$ENDIF}
-
-{$IFDEF RTL110_UP}
- {$DEFINE RTL100_UP}
-{$ENDIF}
-
-{$IFDEF RTL100_UP}
- {$DEFINE RTL93_UP}
-{$ENDIF}
-
-{$IFDEF RTL93_UP}
- {$DEFINE RTL90_UP}
-{$ENDIF}
-
-{$IFDEF RTL90_UP}
- {$DEFINE RTL80_UP}
-{$ENDIF}
-
-{------------------------------------------------------------------------------}
-{ Map COMPILERX_UP to friendly feature names }
-{------------------------------------------------------------------------------}
-
-{$IFDEF FPC}
- {$MODE Delphi}
- {$IFDEF VER1_0}
- Please use FPC 1.1 or later to compile this.
- {$ELSE}
- {$DEFINE SUPPORTS_OUTPARAMS}
- {$DEFINE SUPPORTS_WIDECHAR}
- {$DEFINE SUPPORTS_WIDESTRING}
- {$IFDEF HASINTF}
- {$DEFINE SUPPORTS_INTERFACE}
- {$ENDIF}
- {$IFDEF HASVARIANT}
- {$DEFINE SUPPORTS_VARIANT}
- {$ENDIF}
- {$IFDEF FPC_HAS_TYPE_SINGLE}
- {$DEFINE SUPPORTS_SINGLE}
- {$ENDIF}
- {$IFDEF FPC_HAS_TYPE_DOUBLE}
- {$DEFINE SUPPORTS_DOUBLE}
- {$ENDIF}
- {$IFDEF FPC_HAS_TYPE_EXTENDED}
- {$DEFINE SUPPORTS_EXTENDED}
- {$ENDIF}
- {$IFDEF HASCURRENCY}
- {$DEFINE SUPPORTS_CURRENCY}
- {$ENDIF}
- {$DEFINE SUPPORTS_THREADVAR}
- {$DEFINE SUPPORTS_CONSTPARAMS}
- {$DEFINE SUPPORTS_LONGWORD}
- {$DEFINE SUPPORTS_INT64}
- {$DEFINE SUPPORTS_DYNAMICARRAYS}
- {$DEFINE SUPPORTS_DEFAULTPARAMS}
- {$DEFINE SUPPORTS_OVERLOAD}
- {$DEFINE ACCEPT_DEPRECATED}
- {$DEFINE ACCEPT_PLATFORM}
- {$DEFINE ACCEPT_LIBRARY}
- {$DEFINE SUPPORTS_EXTSYM}
- {$DEFINE SUPPORTS_NODEFINE}
-
- {$DEFINE SUPPORTS_CUSTOMVARIANTS}
- {$DEFINE SUPPORTS_VARARGS}
- {$DEFINE SUPPORTS_ENUMVALUE}
- {$IFDEF LINUX}
- {$DEFINE HAS_UNIT_LIBC}
- {$ENDIF LINUX}
- {$DEFINE HAS_UNIT_TYPES}
- {$DEFINE HAS_UNIT_VARIANTS}
- {$DEFINE HAS_UNIT_STRUTILS}
-
- {$DEFINE XPLATFORM_RTL}
-
- {$UNDEF SUPPORTS_DISPINTERFACE}
- {$UNDEF SUPPORTS_DISPID} // is used outside of dispinterfaces
- {$UNDEF SUPPORTS_IMPLEMENTS}
- {$UNDEF SUPPORTS_UNSAFE_WARNINGS}
- {$ENDIF}
-{$ENDIF FPC}
-
-{$IFDEF COMPILER1_UP}
- {$DEFINE SUPPORTS_CONSTPARAMS}
- {$DEFINE SUPPORTS_SINGLE}
- {$DEFINE SUPPORTS_DOUBLE}
- {$DEFINE SUPPORTS_EXTENDED}
-{$ENDIF COMPILER1_UP}
-
-{$IFDEF COMPILER2_UP}
- {$DEFINE SUPPORTS_CURRENCY}
- {$DEFINE SUPPORTS_THREADVAR}
- {$DEFINE SUPPORTS_VARIANT}
- {$DEFINE SUPPORTS_WIDECHAR}
-{$ENDIF COMPILER2_UP}
-
-{$IFDEF COMPILER3_UP}
- {$DEFINE SUPPORTS_OUTPARAMS}
- {$DEFINE SUPPORTS_WIDESTRING}
- {$DEFINE SUPPORTS_INTERFACE}
- {$DEFINE SUPPORTS_DISPINTERFACE}
- {$DEFINE SUPPORTS_DISPID}
- {$DEFINE SUPPORTS_WEAKPACKAGEUNIT}
-{$ENDIF COMPILER3_UP}
-
-{$IFDEF COMPILER35_UP}
- {$DEFINE SUPPORTS_EXTSYM}
- {$DEFINE SUPPORTS_NODEFINE}
-{$ENDIF COMPILER35_UP}
-
-{$IFDEF COMPILER4_UP}
- {$DEFINE SUPPORTS_LONGWORD}
- {$DEFINE SUPPORTS_INT64}
- {$DEFINE SUPPORTS_DYNAMICARRAYS}
- {$DEFINE SUPPORTS_DEFAULTPARAMS}
- {$DEFINE SUPPORTS_OVERLOAD}
- {$DEFINE SUPPORTS_IMPLEMENTS}
-{$ENDIF COMPILER4_UP}
-
-{$IFDEF COMPILER6_UP}
- {$DEFINE SUPPORTS_DEPRECATED}
- {$DEFINE SUPPORTS_LIBRARY}
- {$DEFINE SUPPORTS_PLATFORM}
- {$DEFINE SUPPORTS_LOCAL}
- {$DEFINE ACCEPT_DEPRECATED}
- {$DEFINE ACCEPT_PLATFORM}
- {$DEFINE ACCEPT_LIBRARY}
- {$DEFINE SUPPORTS_DEPRECATED_WARNINGS}
- {$DEFINE SUPPORTS_LIBRARY_WARNINGS}
- {$DEFINE SUPPORTS_PLATFORM_WARNINGS}
- {$DEFINE SUPPORTS_CUSTOMVARIANTS}
- {$DEFINE SUPPORTS_VARARGS}
- {$DEFINE SUPPORTS_ENUMVALUE}
- {$DEFINE SUPPORTS_COMPILETIME_MESSAGES}
-{$ENDIF COMPILER6_UP}
-
-{$IFDEF COMPILER7_UP}
- {$DEFINE SUPPORTS_UNSAFE_WARNINGS}
-{$ENDIF COMPILER7_UP}
-
-{$IFDEF RTL140_UP}
- {$IFDEF LINUX}
- {$DEFINE HAS_UNIT_LIBC}
- {$ENDIF LINUX}
- {$DEFINE HAS_UNIT_RTLCONSTS}
- {$DEFINE HAS_UNIT_TYPES}
- {$DEFINE HAS_UNIT_VARIANTS}
- {$DEFINE HAS_UNIT_STRUTILS}
- {$DEFINE XPLATFORM_RTL}
-{$ENDIF RTL140_UP}
-
-{------------------------------------------------------------------------------}
-{ Cross-platform related defines }
-{------------------------------------------------------------------------------}
-
-{$IFDEF WIN32}
- {$DEFINE MSWINDOWS}
-{$ENDIF}
-
-{$IFDEF DELPHILANGUAGE}
- {$IFDEF LINUX}
- {$DEFINE UNIX}
- {$DEFINE VisualCLX}
- {$ENDIF}
-
- {$IFNDEF VisualCLX}
- {$DEFINE VCL}
- {$ENDIF}
-
- {$IFDEF VisualCLX}
- {$DEFINE COMPLIB_CLX} { kept for backward compatibility, use VisualCLX instead }
- {$ENDIF}
-
- {$IFDEF VCL}
- {$DEFINE COMPLIB_VCL} { kept for backward compatibility, use VCL instead }
- {$ENDIF}
-{$ENDIF DELPHILANGUAGE}
-
-{------------------------------------------------------------------------------}
-{ Compiler settings }
-{------------------------------------------------------------------------------}
-
-{$IFOPT A+} {$DEFINE ALIGN_ON} {$ENDIF}
-{$IFOPT B+} {$DEFINE BOOLEVAL_ON} {$ENDIF}
-{$IFDEF COMPILER2_UP}
- {$IFOPT C+} {$DEFINE ASSERTIONS_ON} {$ENDIF}
-{$ENDIF}
-{$IFOPT D+} {$DEFINE DEBUGINFO_ON} {$ENDIF}
-{$IFOPT G+} {$DEFINE IMPORTEDDATA_ON} {$ENDIF}
-{$IFDEF COMPILER2_UP}
- {$IFOPT H+} {$DEFINE LONGSTRINGS_ON} {$ENDIF}
-{$ENDIF}
-{ HINTS }
-{$IFOPT I+} {$DEFINE IOCHECKS_ON} {$ENDIF}
-{$IFDEF COMPILER2_UP}
- {$IFOPT J+} {$DEFINE WRITEABLECONST_ON} {$ENDIF}
-{$ENDIF}
-{$IFOPT L+} {$DEFINE LOCALSYMBOLS} {$ENDIF}
-{$IFOPT M+} {$DEFINE TYPEINFO_ON} {$ENDIF}
-{$IFOPT O+} {$DEFINE OPTIMIZATION_ON} {$ENDIF}
-{$IFOPT P+} {$DEFINE OPENSTRINGS_ON} {$ENDIF}
-{$IFOPT Q+} {$DEFINE OVERFLOWCHECKS_ON} {$ENDIF}
-{$IFOPT R+} {$DEFINE RANGECHECKS_ON} {$ENDIF}
-{ REALCOMPATIBILITY }
-{$IFOPT T+} {$DEFINE TYPEDADDRESS_ON} {$ENDIF}
-{$IFOPT U+} {$DEFINE SAFEDIVIDE_ON} {$ENDIF}
-{$IFOPT V+} {$DEFINE VARSTRINGCHECKS_ON} {$ENDIF}
-{$IFOPT W+} {$DEFINE STACKFRAMES_ON} {$ENDIF}
-{ WARNINGS }
-{$IFOPT X+} {$DEFINE EXTENDEDSYNTAX_ON} {$ENDIF}
-
-// for Delphi/BCB trial versions remove the point from the line below
-{.$UNDEF SUPPORTS_WEAKPACKAGEUNIT}
-
-// History:
-
+{$IFNDEF JEDI_INC}
+{$DEFINE JEDI_INC}
+
+{******************************************************************************}
+{ }
+{ The contents of this file are subject to the Mozilla Public License }
+{ Version 1.1 (the "License"); you may not use this file except in }
+{ compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/ }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License }
+{ for the specific language governing rights and limitations under the }
+{ License. }
+{ }
+{ The Original Code is: jedi.inc. }
+{ The Initial Developer of the Original Code is Project JEDI }
+{ http://www.delphi-jedi.org }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of }
+{ the GNU Lesser General Public License (the "LGPL License"), in which case }
+{ the provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this }
+{ file under the MPL, indicate your decision by deleting the provisions }
+{ above and replace them with the notice and other provisions required by }
+{ the LGPL License. If you do not delete the provisions above, a recipient }
+{ may use your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: }
+{ http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+{ }
+{ This file defines various generic compiler directives used in different }
+{ libraries, e.g. in the JEDI Code Library (JCL) and JEDI Visual Component }
+{ Library Library (J-VCL). The directives in this file are of generic nature }
+{ and consist mostly of mappings from the VERXXX directives defined by }
+{ Delphi, C++ Builder and FPC to friendly names such as DELPHI5 and }
+{ SUPPORTS_WIDESTRING. These friendly names are subsequently used in the }
+{ libraries to test for compiler versions and/or whether the compiler }
+{ supports certain features (such as widestrings or 64 bit integers. The }
+{ libraries provide an additional, library specific, include file. For the }
+{ JCL e.g. this is jcl.inc. These files should be included in source files }
+{ instead of this file (which is pulled in automatically). }
+{ }
+{******************************************************************************}
+
+// Last modified: $Date: 2005/04/04 07:56:11 $
+// For history see end of file
+
+(*
+
+- Development environment directives
+
+ This file defines two directives to indicate which development environment the
+ library is being compiled with. Currently this can either be Delphi, Kylix,
+ C++ Builder or FPC.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ DELPHI Defined if compiled with Delphi
+ KYLIX Defined if compiled with Kylix
+ DELPHICOMPILER Defined if compiled with Delphi or Kylix/Delphi
+ BCB Defined if compiled with C++ Builder
+ CPPBUILDER Defined if compiled with C++ Builder (alias for BCB)
+ BCBCOMPILER Defined if compiled with C++ Builder or Kylix/C++
+ DELPHILANGUAGE Defined if compiled with Delphi, Kylix or C++ Builder
+ BORLAND Defined if compiled with Delphi, Kylix or C++ Builder
+ FPC Defined if compiled with FPC
+
+- Platform Directives
+
+ Platform directives are not all explicitly defined in this file, some are
+ defined by the compiler itself. They are listed here only for completeness.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ WIN32 Defined when target platform is 32 bit Windows
+ MSWINDOWS Defined when target platform is 32 bit Windows
+ LINUX Defined when target platform is Linux
+ UNIX Defined when target platform is Linux or Unix
+
+
+- Visual library Directives
+
+ The following directives indicate for a visual library. In a Delphi
+ application you need to define VisualCLX in the project options, if you want
+ to use the VisualCLX. Alternative you can use the IDE expert, which is distributed
+ with the JCL to do this automatically.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ COMPLIB_VCL Defined when application do not define VisualCLX, obsolete, use VCL
+ COMPLIB_CLX Defined when application use the VisualCLX, obsolete, use VisualCLX
+ VCL Defined when application do not define VisualCLX
+ VisualCLX Defined when application use the VisualCLX
+
+
+- Delphi Versions
+
+ The following directives are direct mappings from the VERXXX directives to a
+ friendly name of the associated compiler. These directives are only defined if
+ the compiler is Delphi (ie DELPHI is defined).
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ DELPHI1 Defined when compiling with Delphi 1
+ DELPHI2 Defined when compiling with Delphi 2
+ DELPHI3 Defined when compiling with Delphi 3
+ DELPHI4 Defined when compiling with Delphi 4
+ DELPHI5 Defined when compiling with Delphi 5
+ DELPHI6 Defined when compiling with Delphi 6
+ DELPHI7 Defined when compiling with Delphi 7
+ DELPHI8 Defined when compiling with Delphi 8
+ DELPHI9 Defined when compiling with Delphi 9
+ DELPHI1_UP Defined when compiling with Delphi 1 or higher
+ DELPHI2_UP Defined when compiling with Delphi 2 or higher
+ DELPHI3_UP Defined when compiling with Delphi 3 or higher
+ DELPHI4_UP Defined when compiling with Delphi 4 or higher
+ DELPHI5_UP Defined when compiling with Delphi 5 or higher
+ DELPHI6_UP Defined when compiling with Delphi 6 or higher
+ DELPHI7_UP Defined when compiling with Delphi 7 or higher
+ DELPHI8_UP Defined when compiling with Delphi 8 or higher
+ DELPHI9_UP Defined when compiling with Delphi 9 or higher
+
+
+- Kylix Versions
+
+ The following directives are direct mappings from the VERXXX directives to a
+ friendly name of the associated compiler. These directives are only defined if
+ the compiler is Kylix (ie KYLIX is defined).
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ KYLIX1 Defined when compiling with Kylix 1
+ KYLIX2 Defined when compiling with Kylix 2
+ KYLIX3 Defined when compiling with Kylix 3
+ KYLIX1_UP Defined when compiling with Kylix 1 or higher
+ KYLIX2_UP Defined when compiling with Kylix 2 or higher
+ KYLIX3_UP Defined when compiling with Kylix 3 or higher
+
+
+- Delphi Compiler Versions (Delphi / Kylix, not in BCB mode)
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ DELPHICOMPILER1 Defined when compiling with Delphi 1
+ DELPHICOMPILER2 Defined when compiling with Delphi 2
+ DELPHICOMPILER3 Defined when compiling with Delphi 3
+ DELPHICOMPILER4 Defined when compiling with Delphi 4
+ DELPHICOMPILER5 Defined when compiling with Delphi 5
+ DELPHICOMPILER6 Defined when compiling with Delphi 6 or Kylix 1, 2 or 3
+ DELPHICOMPILER7 Defined when compiling with Delphi 7
+ DELPHICOMPILER8 Defined when compiling with Delphi 8
+ DELPHICOMPILER9 Defined when compiling with Delphi 9
+ DELPHICOMPILER1_UP Defined when compiling with Delphi 1 or higher
+ DELPHICOMPILER2_UP Defined when compiling with Delphi 2 or higher
+ DELPHICOMPILER3_UP Defined when compiling with Delphi 3 or higher
+ DELPHICOMPILER4_UP Defined when compiling with Delphi 4 or higher
+ DELPHICOMPILER5_UP Defined when compiling with Delphi 5 or higher
+ DELPHICOMPILER6_UP Defined when compiling with Delphi 6 or Kylix 1, 2 or 3 or higher
+ DELPHICOMPILER7_UP Defined when compiling with Delphi 7 or higher
+ DELPHICOMPILER8_UP Defined when compiling with Delphi 8 or higher
+ DELPHICOMPILER9_UP Defined when compiling with Delphi 9 or higher
+
+
+- C++ Builder Versions
+
+ The following directives are direct mappings from the VERXXX directives to a
+ friendly name of the associated compiler. These directives are only defined if
+ the compiler is C++ Builder (ie BCB is defined).
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ BCB1 Defined when compiling with C++ Builder 1
+ BCB3 Defined when compiling with C++ Builder 3
+ BCB4 Defined when compiling with C++ Builder 4
+ BCB5 Defined when compiling with C++ Builder 5
+ BCB6 Defined when compiling with C++ Builder 6
+ BCB1_UP Defined when compiling with C++ Builder 1 or higher
+ BCB3_UP Defined when compiling with C++ Builder 3 or higher
+ BCB4_UP Defined when compiling with C++ Builder 4 or higher
+ BCB5_UP Defined when compiling with C++ Builder 5 or higher
+ BCB6_UP Defined when compiling with C++ Builder 6 or higher
+
+
+- Compiler Versions
+
+ The following directives are direct mappings from the VERXXX directives to a
+ friendly name of the associated compiler. Unlike the DELPHI_X and BCB_X
+ directives, these directives are indepedent of the development environment.
+ That is, they are defined regardless of whether compilation takes place using
+ Delphi or C++ Builder.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ COMPILER1 Defined when compiling with Delphi 1
+ COMPILER2 Defined when compiling with Delphi 2 or C++ Builder 1
+ COMPILER3 Defined when compiling with Delphi 3
+ COMPILER35 Defined when compiling with C++ Builder 3
+ COMPILER4 Defined when compiling with Delphi 4 or C++ Builder 4
+ COMPILER5 Defined when compiling with Delphi 5 or C++ Builder 5
+ COMPILER6 Defined when compiling with Delphi 6 or C++ Builder 6
+ COMPILER7 Defined when compiling with Delphi 7
+ COMPILER8 Defined when compiling with Delphi 8
+ COMPILER9 Defined when compiling with Delphi 9
+ COMPILER1_UP Defined when compiling with Delphi 1 or higher
+ COMPILER2_UP Defined when compiling with Delphi 2 or C++ Builder 1 or higher
+ COMPILER3_UP Defined when compiling with Delphi 3 or higher
+ COMPILER35_UP Defined when compiling with C++ Builder 3 or higher
+ COMPILER4_UP Defined when compiling with Delphi 4 or C++ Builder 4 or higher
+ COMPILER5_UP Defined when compiling with Delphi 5 or C++ Builder 5 or higher
+ COMPILER6_UP Defined when compiling with Delphi 6 or C++ Builder 6 or higher
+ COMPILER7_UP Defined when compiling with Delphi 7
+ COMPILER8_UP Defined when compiling with Delphi 8
+ COMPILER9_UP Defined when compiling with Delphi 9
+
+
+- RTL Versions
+
+ Use e.g. following to determine the exact RTL version since version 14.0:
+ {$IFDEF CONDITIONALEXPRESSIONS}
+ {$IF Declared(RTLVersion) and (RTLVersion >= 14.2)}
+ // code for Delphi 6.02 or later, Kylix 2 or later, C++ Builder 6 or later
+ ...
+ {$IFEND}
+ {$ENDIF}
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ RTL80_UP Defined when compiling with Delphi 1 or later
+ RTL90_UP Defined when compiling with Delphi 2 or later
+ RTL93_UP Defined when compiling with C++ Builder 1 or later
+ RTL100_UP Defined when compiling with Delphi 3 or later
+ RTL110_UP Defined when compiling with C++ Builder 3 or later
+ RTL120_UP Defined when compiling with Delphi 4 or later
+ RTL125_UP Defined when compiling with C++ Builder 4 or later
+ RTL130_UP Defined when compiling with Delphi 5 or C++ Builder 5 or later
+ RTL140_UP Defined when compiling with Delphi 6, Kylix 1, 2 or 3 or C++ Builder 6 or later
+ RTL150_UP Defined when compiling with Delphi 7 or later
+ RTL160_UP Defined when compiling with Delphi 8 or later
+ RTL170_UP Defined when compiling with Delphi 9 or later
+
+
+- Feature Directives
+
+ The features directives are used to test if the compiler supports specific
+ features, such as method overloading, and adjust the sources accordingly. Use
+ of these directives is preferred over the use of the DELPHI and COMPILER
+ directives.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ SUPPORTS_CONSTPARAMS Compiler supports const parameters (D1+)
+ SUPPORTS_SINGLE Compiler supports the Single type (D1+)
+ SUPPORTS_DOUBLE Compiler supports the Double type (D1+)
+ SUPPORTS_EXTENDED Compiler supports the Extended type (D1+)
+ SUPPORTS_CURRENCY Compiler supports the Currency type (D2+)
+ SUPPORTS_THREADVAR Compiler supports threadvar declarations (D2+)
+ SUPPORTS_OUTPARAMS Compiler supports out parameters (D3+)
+ SUPPORTS_VARIANT Compiler supports variant (D2+)
+ SUPPORTS_WIDECHAR Compiler supports the WideChar type (D2+)
+ SUPPORTS_WIDESTRING Compiler supports the WideString type (D3+/BCB3+)
+ SUPPORTS_INTERFACE Compiler supports interfaces (D3+/BCB3+)
+ SUPPORTS_DISPINTERFACE Compiler supports dispinterfaces (D3+/BCB3+)
+ SUPPORTS_EXTSYM Compiler supports the $EXTERNALSYM directive (D4+/BCB3+)
+ SUPPORTS_NODEFINE Compiler supports the $NODEFINE directive (D4+/BCB3+)
+ SUPPORTS_LONGWORD Compiler supports the LongWord type (unsigned 32 bit) (D4+/BCB4+)
+ SUPPORTS_INT64 Compiler supports the Int64 type (D4+/BCB4+)
+ SUPPORTS_DYNAMICARRAYS Compiler supports dynamic arrays (D4+/BCB4+)
+ SUPPORTS_DEFAULTPARAMS Compiler supports default parameters (D4+/BCB4+)
+ SUPPORTS_OVERLOAD Compiler supports overloading (D4+/BCB4+)
+ SUPPORTS_IMPLEMENTS Compiler supports implements (D4+/BCB4+)
+ SUPPORTS_DEPRECATED Compiler supports the deprecated directive (D6+/BCB6+)
+ SUPPORTS_PLATFORM Compiler supports the platform directive (D6+/BCB6+)
+ SUPPORTS_LIBRARY Compiler supports the library directive (D6+/BCB6+)
+ SUPPORTS_LOCAL Compiler supports the local directive (D6+/BCB6+)
+ ACCEPT_DEPRECATED Compiler supports or ignore the deprecated directive (D6/BCB6/FPC)
+ ACCEPT_PLATFORM Compiler supports or ignore the platform directive (D6+/BCB6+)
+ ACCEPT_LIBRARY Compiler supports or ignore the library directive (D6+/BCB6+)
+ SUPPORTS_CUSTOMVARIANTS Compiler supports custom variants (D6+/BCB6+)
+ SUPPORTS_VARARGS Compiler supports varargs (D6+/BCB6+)
+ SUPPORTS_ENUMVALUE Compiler supports values for enums (D6+/BCB6+)
+ SUPPORTS_DEPRECATED_WARNINGS Compiler supports deprecated warnings (D6+/BCB6+)
+ SUPPORTS_LIBRARY_WARNINGS Compiler supports library warnings (D6+/BCB6+)
+ SUPPORTS_PLATFORM_WARNINGS Compiler supports platform warnings (D6+/BCB6+)
+ SUPPORTS_UNSAFE_WARNINGS Compiler supports unsafe warnings (D7)
+ SUPPORTS_WEAKPACKAGEUNIT Compiler supports the WEAKPACKAGEUNIT directive
+ SUPPORTS_COMPILETIME_MESSAGES Compiler supports the MESSAGE directive
+ HAS_UNIT_LIBC The unit Libc exists (Kylix, FPC on Linux)
+ HAS_UNIT_RTLCONSTS The unit RTLConsts exists (D6+/BCB6+)
+ HAS_UNIT_TYPES The unit Types exists (D6+/BCB6+)
+ HAS_UNIT_VARIANTS The unit Variants exists (D6+/BCB6+)
+ HAS_UNIT_STRUTILS The unit StrUtils exists (D6+/BCB6+)
+ XPLATFORM_RTL The RTL supports crossplatform function names (e.g. RaiseLastOSError) (D6+/BCB6+/FPC)
+
+- Compiler Settings
+
+ The compiler settings directives indicate whether a specific compiler setting
+ is in effect. This facilitates changing compiler settings locally in a more
+ compact and readible manner.
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ ALIGN_ON Compiling in the A+ state (no alignment)
+ BOOLEVAL_ON Compiling in the B+ state (complete boolean evaluation)
+ ASSERTIONS_ON Compiling in the C+ state (assertions on)
+ DEBUGINFO_ON Compiling in the D+ state (debug info generation on)
+ IMPORTEDDATA_ON Compiling in the G+ state (creation of imported data references)
+ LONGSTRINGS_ON Compiling in the H+ state (string defined as AnsiString)
+ IOCHECKS_ON Compiling in the I+ state (I/O checking enabled)
+ WRITEABLECONST_ON Compiling in the J+ state (typed constants can be modified)
+ LOCALSYMBOLS Compiling in the L+ state (local symbol generation)
+ TYPEINFO_ON Compiling in the M+ state (RTTI generation on)
+ OPTIMIZATION_ON Compiling in the O+ state (code optimization on)
+ OPENSTRINGS_ON Compiling in the P+ state (variable string parameters are openstrings)
+ OVERFLOWCHECKS_ON Compiling in the Q+ state (overflow checing on)
+ RANGECHECKS_ON Compiling in the R+ state (range checking on)
+ TYPEDADDRESS_ON Compiling in the T+ state (pointers obtained using the @ operator are typed)
+ SAFEDIVIDE_ON Compiling in the U+ state (save FDIV instruction through RTL emulation)
+ VARSTRINGCHECKS_ON Compiling in the V+ state (type checking of shortstrings)
+ STACKFRAMES_ON Compiling in the W+ state (generation of stack frames)
+ EXTENDEDSYNTAX_ON Compiling in the X+ state (Delphi extended syntax enabled)
+*)
+
+{$DEFINE BORLAND}
+
+{ Set FreePascal to Delphi mode }
+{$IFDEF FPC}
+ {$MODE DELPHI}
+ {$ASMMODE Intel}
+ {$UNDEF BORLAND}
+{$ENDIF}
+
+{$IFDEF BORLAND}
+ {$IFDEF LINUX}
+ {$DEFINE KYLIX}
+ {$ENDIF LINUX}
+{$ENDIF BORLAND}
+
+{------------------------------------------------------------------------------}
+{ VERXXX to COMPILERX, DELPHIX and BCBX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF BORLAND}
+ {$IFDEF KYLIX}
+ {$I kylix.inc} // FPC incompatible stuff
+ {$ELSE ~KYLIX}
+
+ {$IFDEF VER170}
+ {$DEFINE COMPILER9}
+ {$DEFINE DELPHI9}
+ {$DEFINE DELPHICOMPILER9}
+ {$DEFINE RTL170_UP}
+ {$ENDIF}
+
+ {$IFDEF VER160}
+ {$DEFINE COMPILER8}
+ {$DEFINE DELPHI8}
+ {$DEFINE DELPHICOMPILER8}
+ {$DEFINE RTL160_UP}
+ {$ENDIF}
+
+ {$IFDEF VER150}
+ {$DEFINE COMPILER7}
+ {$IFDEF BCB}
+ {$DEFINE BCB7}
+ {$ELSE}
+ {$DEFINE DELPHI7}
+ {$DEFINE DELPHICOMPILER7}
+ {$ENDIF}
+ {$DEFINE RTL150_UP}
+ {$ENDIF}
+
+ {$IFDEF VER140}
+ {$DEFINE COMPILER6}
+ {$IFDEF BCB}
+ {$DEFINE BCB6}
+ {$ELSE}
+ {$DEFINE DELPHI6}
+ {$DEFINE DELPHICOMPILER6}
+ {$ENDIF}
+ {$DEFINE RTL140_UP}
+ {$ENDIF}
+
+ {$IFDEF VER130}
+ {$DEFINE COMPILER5}
+ {$IFDEF BCB}
+ {$DEFINE BCB5}
+ {$ELSE}
+ {$DEFINE DELPHI5}
+ {$DEFINE DELPHICOMPILER5}
+ {$ENDIF}
+ {$DEFINE RTL130_UP}
+ {$ENDIF}
+
+ {$IFDEF VER125}
+ {$DEFINE COMPILER4}
+ {$DEFINE BCB4}
+ {$DEFINE BCB}
+ {$DEFINE RTL125_UP}
+ {$ENDIF}
+
+ {$IFDEF VER120}
+ {$DEFINE COMPILER4}
+ {$DEFINE DELPHI4}
+ {$DEFINE DELPHICOMPILER4}
+ {$DEFINE RTL120_UP}
+ {$ENDIF}
+
+ {$IFDEF VER110}
+ {$DEFINE COMPILER35}
+ {$DEFINE BCB3}
+ {$DEFINE RTL110_UP}
+ {$ENDIF}
+
+ {$IFDEF VER100}
+ {$DEFINE COMPILER3}
+ {$DEFINE DELPHI3}
+ {$DEFINE DELPHICOMPILER3}
+ {$DEFINE RTL100_UP}
+ {$ENDIF}
+
+ {$IFDEF VER93}
+ {$DEFINE COMPILER2}
+ {$DEFINE BCB1}
+ {$DEFINE BCB}
+ {$DEFINE RTL93_UP}
+ {$ENDIF}
+
+ {$IFDEF VER90}
+ {$DEFINE COMPILER2}
+ {$DEFINE DELPHI2}
+ {$DEFINE DELPHICOMPILER2}
+ {$DEFINE RTL90_UP}
+ {$ENDIF}
+
+ {$IFDEF VER80}
+ {$DEFINE COMPILER1}
+ {$DEFINE DELPHI1}
+ {$DEFINE DELPHICOMPILER1}
+ {$DEFINE RTL80_UP}
+ {$ENDIF}
+
+ {$ENDIF ~KYLIX}
+
+ {$IFDEF BCB}
+ {$DEFINE CPPBUILDER}
+ {$DEFINE BCBCOMPILER}
+ {$ELSE ~BCB}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHICOMPILER}
+ {$ENDIF ~BCB}
+
+{$ENDIF BORLAND}
+
+{------------------------------------------------------------------------------}
+{ DELPHIX_UP from DELPHIX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF DELPHI9}
+ {$DEFINE DELPHI9_UP}
+ {$DEFINE DELPHI8_UP}
+ {$DEFINE DELPHI7_UP}
+ {$DEFINE DELPHI6_UP}
+ {$DEFINE DELPHI5_UP}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI8}
+ {$DEFINE DELPHI8_UP}
+ {$DEFINE DELPHI7_UP}
+ {$DEFINE DELPHI6_UP}
+ {$DEFINE DELPHI5_UP}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI7}
+ {$DEFINE DELPHI7_UP}
+ {$DEFINE DELPHI6_UP}
+ {$DEFINE DELPHI5_UP}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI6}
+ {$DEFINE DELPHI6_UP}
+ {$DEFINE DELPHI5_UP}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI5}
+ {$DEFINE DELPHI5_UP}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI4}
+ {$DEFINE DELPHI4_UP}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI3}
+ {$DEFINE DELPHI3_UP}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI2}
+ {$DEFINE DELPHI2_UP}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHI1}
+ {$DEFINE DELPHI1_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ KYLIXX_UP from KYLIXX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF KYLIX3}
+ {$DEFINE KYLIX3_UP}
+ {$DEFINE KYLIX2_UP}
+ {$DEFINE KYLIX1_UP}
+{$ENDIF}
+
+{$IFDEF KYLIX2}
+ {$DEFINE KYLIX2_UP}
+ {$DEFINE KYLIX1_UP}
+{$ENDIF}
+
+{$IFDEF KYLIX1}
+ {$DEFINE KYLIX1_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ BCBX_UP from BCBX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF BCB7}
+ {$DEFINE BCB7_UP}
+ {$DEFINE BCB6_UP}
+ {$DEFINE BCB5_UP}
+ {$DEFINE BCB4_UP}
+ {$DEFINE BCB3_UP}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{$IFDEF BCB6}
+ {$DEFINE BCB6_UP}
+ {$DEFINE BCB5_UP}
+ {$DEFINE BCB4_UP}
+ {$DEFINE BCB3_UP}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{$IFDEF BCB5}
+ {$DEFINE BCB5_UP}
+ {$DEFINE BCB4_UP}
+ {$DEFINE BCB3_UP}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{$IFDEF BCB4}
+ {$DEFINE BCB4_UP}
+ {$DEFINE BCB3_UP}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{$IFDEF BCB3}
+ {$DEFINE BCB3_UP}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{$IFDEF BCB1}
+ {$DEFINE BCB1_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ DELPHICOMPILERX_UP from DELPHICOMPILERX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF DELPHICOMPILER9}
+ {$DEFINE DELPHICOMPILER9_UP}
+ {$DEFINE DELPHICOMPILER8_UP}
+ {$DEFINE DELPHICOMPILER7_UP}
+ {$DEFINE DELPHICOMPILER6_UP}
+ {$DEFINE DELPHICOMPILER5_UP}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER8}
+ {$DEFINE DELPHICOMPILER8_UP}
+ {$DEFINE DELPHICOMPILER7_UP}
+ {$DEFINE DELPHICOMPILER6_UP}
+ {$DEFINE DELPHICOMPILER5_UP}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER7}
+ {$DEFINE DELPHICOMPILER7_UP}
+ {$DEFINE DELPHICOMPILER6_UP}
+ {$DEFINE DELPHICOMPILER5_UP}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER6}
+ {$DEFINE DELPHICOMPILER6_UP}
+ {$DEFINE DELPHICOMPILER5_UP}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER5}
+ {$DEFINE DELPHICOMPILER5_UP}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER4}
+ {$DEFINE DELPHICOMPILER4_UP}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER3}
+ {$DEFINE DELPHICOMPILER3_UP}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER2}
+ {$DEFINE DELPHICOMPILER2_UP}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF DELPHICOMPILER1}
+ {$DEFINE DELPHICOMPILER1_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ COMPILERX_UP from COMPILERX mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF COMPILER9}
+ {$DEFINE COMPILER9_UP}
+ {$DEFINE COMPILER8_UP}
+ {$DEFINE COMPILER7_UP}
+ {$DEFINE COMPILER6_UP}
+ {$DEFINE COMPILER5_UP}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER8}
+ {$DEFINE COMPILER8_UP}
+ {$DEFINE COMPILER7_UP}
+ {$DEFINE COMPILER6_UP}
+ {$DEFINE COMPILER5_UP}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER7}
+ {$DEFINE COMPILER7_UP}
+ {$DEFINE COMPILER6_UP}
+ {$DEFINE COMPILER5_UP}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER6}
+ {$DEFINE COMPILER6_UP}
+ {$DEFINE COMPILER5_UP}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER5}
+ {$DEFINE COMPILER5_UP}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER4}
+ {$DEFINE COMPILER4_UP}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER35}
+ {$DEFINE COMPILER35_UP}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER3}
+ {$DEFINE COMPILER3_UP}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER2}
+ {$DEFINE COMPILER2_UP}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{$IFDEF COMPILER1}
+ {$DEFINE COMPILER1_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+
+{$IFDEF DELPHICOMPILER}
+ {$DEFINE DELPHILANGUAGE}
+{$ENDIF}
+
+{$IFDEF BCBCOMPILER}
+ {$DEFINE DELPHILANGUAGE}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ RTLX_UP from RTLX_UP mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF RTL170_UP}
+ {$DEFINE RTL160_UP}
+{$ENDIF}
+
+{$IFDEF RTL160_UP}
+ {$DEFINE RTL150_UP}
+{$ENDIF}
+
+{$IFDEF RTL150_UP}
+ {$DEFINE RTL145_UP}
+{$ENDIF}
+
+{$IFDEF RTL145_UP}
+ {$DEFINE RTL142_UP}
+{$ENDIF}
+
+{$IFDEF RTL142_UP}
+ {$DEFINE RTL140_UP}
+{$ENDIF}
+
+{$IFDEF RTL140_UP}
+ {$DEFINE RTL130_UP}
+{$ENDIF}
+
+{$IFDEF RTL130_UP}
+ {$DEFINE RTL125_UP}
+{$ENDIF}
+
+{$IFDEF RTL125_UP}
+ {$DEFINE RTL120_UP}
+{$ENDIF}
+
+{$IFDEF RTL120_UP}
+ {$DEFINE RTL110_UP}
+{$ENDIF}
+
+{$IFDEF RTL110_UP}
+ {$DEFINE RTL100_UP}
+{$ENDIF}
+
+{$IFDEF RTL100_UP}
+ {$DEFINE RTL93_UP}
+{$ENDIF}
+
+{$IFDEF RTL93_UP}
+ {$DEFINE RTL90_UP}
+{$ENDIF}
+
+{$IFDEF RTL90_UP}
+ {$DEFINE RTL80_UP}
+{$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ Map COMPILERX_UP to friendly feature names }
+{------------------------------------------------------------------------------}
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+ {$IFDEF VER1_0}
+ Please use FPC 1.1 or later to compile this.
+ {$ELSE}
+ {$DEFINE SUPPORTS_OUTPARAMS}
+ {$DEFINE SUPPORTS_WIDECHAR}
+ {$DEFINE SUPPORTS_WIDESTRING}
+ {$IFDEF HASINTF}
+ {$DEFINE SUPPORTS_INTERFACE}
+ {$ENDIF}
+ {$IFDEF HASVARIANT}
+ {$DEFINE SUPPORTS_VARIANT}
+ {$ENDIF}
+ {$IFDEF FPC_HAS_TYPE_SINGLE}
+ {$DEFINE SUPPORTS_SINGLE}
+ {$ENDIF}
+ {$IFDEF FPC_HAS_TYPE_DOUBLE}
+ {$DEFINE SUPPORTS_DOUBLE}
+ {$ENDIF}
+ {$IFDEF FPC_HAS_TYPE_EXTENDED}
+ {$DEFINE SUPPORTS_EXTENDED}
+ {$ENDIF}
+ {$IFDEF HASCURRENCY}
+ {$DEFINE SUPPORTS_CURRENCY}
+ {$ENDIF}
+ {$DEFINE SUPPORTS_THREADVAR}
+ {$DEFINE SUPPORTS_CONSTPARAMS}
+ {$DEFINE SUPPORTS_LONGWORD}
+ {$DEFINE SUPPORTS_INT64}
+ {$DEFINE SUPPORTS_DYNAMICARRAYS}
+ {$DEFINE SUPPORTS_DEFAULTPARAMS}
+ {$DEFINE SUPPORTS_OVERLOAD}
+ {$DEFINE ACCEPT_DEPRECATED}
+ {$DEFINE ACCEPT_PLATFORM}
+ {$DEFINE ACCEPT_LIBRARY}
+ {$DEFINE SUPPORTS_EXTSYM}
+ {$DEFINE SUPPORTS_NODEFINE}
+
+ {$DEFINE SUPPORTS_CUSTOMVARIANTS}
+ {$DEFINE SUPPORTS_VARARGS}
+ {$DEFINE SUPPORTS_ENUMVALUE}
+ {$IFDEF LINUX}
+ {$DEFINE HAS_UNIT_LIBC}
+ {$ENDIF LINUX}
+ {$DEFINE HAS_UNIT_TYPES}
+ {$DEFINE HAS_UNIT_VARIANTS}
+ {$DEFINE HAS_UNIT_STRUTILS}
+
+ {$DEFINE XPLATFORM_RTL}
+
+ {$UNDEF SUPPORTS_DISPINTERFACE}
+ {$UNDEF SUPPORTS_DISPID} // is used outside of dispinterfaces
+ {$UNDEF SUPPORTS_IMPLEMENTS}
+ {$UNDEF SUPPORTS_UNSAFE_WARNINGS}
+ {$ENDIF}
+{$ENDIF FPC}
+
+{$IFDEF COMPILER1_UP}
+ {$DEFINE SUPPORTS_CONSTPARAMS}
+ {$DEFINE SUPPORTS_SINGLE}
+ {$DEFINE SUPPORTS_DOUBLE}
+ {$DEFINE SUPPORTS_EXTENDED}
+{$ENDIF COMPILER1_UP}
+
+{$IFDEF COMPILER2_UP}
+ {$DEFINE SUPPORTS_CURRENCY}
+ {$DEFINE SUPPORTS_THREADVAR}
+ {$DEFINE SUPPORTS_VARIANT}
+ {$DEFINE SUPPORTS_WIDECHAR}
+{$ENDIF COMPILER2_UP}
+
+{$IFDEF COMPILER3_UP}
+ {$DEFINE SUPPORTS_OUTPARAMS}
+ {$DEFINE SUPPORTS_WIDESTRING}
+ {$DEFINE SUPPORTS_INTERFACE}
+ {$DEFINE SUPPORTS_DISPINTERFACE}
+ {$DEFINE SUPPORTS_DISPID}
+ {$DEFINE SUPPORTS_WEAKPACKAGEUNIT}
+{$ENDIF COMPILER3_UP}
+
+{$IFDEF COMPILER35_UP}
+ {$DEFINE SUPPORTS_EXTSYM}
+ {$DEFINE SUPPORTS_NODEFINE}
+{$ENDIF COMPILER35_UP}
+
+{$IFDEF COMPILER4_UP}
+ {$DEFINE SUPPORTS_LONGWORD}
+ {$DEFINE SUPPORTS_INT64}
+ {$DEFINE SUPPORTS_DYNAMICARRAYS}
+ {$DEFINE SUPPORTS_DEFAULTPARAMS}
+ {$DEFINE SUPPORTS_OVERLOAD}
+ {$DEFINE SUPPORTS_IMPLEMENTS}
+{$ENDIF COMPILER4_UP}
+
+{$IFDEF COMPILER6_UP}
+ {$DEFINE SUPPORTS_DEPRECATED}
+ {$DEFINE SUPPORTS_LIBRARY}
+ {$DEFINE SUPPORTS_PLATFORM}
+ {$DEFINE SUPPORTS_LOCAL}
+ {$DEFINE ACCEPT_DEPRECATED}
+ {$DEFINE ACCEPT_PLATFORM}
+ {$DEFINE ACCEPT_LIBRARY}
+ {$DEFINE SUPPORTS_DEPRECATED_WARNINGS}
+ {$DEFINE SUPPORTS_LIBRARY_WARNINGS}
+ {$DEFINE SUPPORTS_PLATFORM_WARNINGS}
+ {$DEFINE SUPPORTS_CUSTOMVARIANTS}
+ {$DEFINE SUPPORTS_VARARGS}
+ {$DEFINE SUPPORTS_ENUMVALUE}
+ {$DEFINE SUPPORTS_COMPILETIME_MESSAGES}
+{$ENDIF COMPILER6_UP}
+
+{$IFDEF COMPILER7_UP}
+ {$DEFINE SUPPORTS_UNSAFE_WARNINGS}
+{$ENDIF COMPILER7_UP}
+
+{$IFDEF RTL140_UP}
+ {$IFDEF LINUX}
+ {$DEFINE HAS_UNIT_LIBC}
+ {$ENDIF LINUX}
+ {$DEFINE HAS_UNIT_RTLCONSTS}
+ {$DEFINE HAS_UNIT_TYPES}
+ {$DEFINE HAS_UNIT_VARIANTS}
+ {$DEFINE HAS_UNIT_STRUTILS}
+ {$DEFINE XPLATFORM_RTL}
+{$ENDIF RTL140_UP}
+
+{------------------------------------------------------------------------------}
+{ Cross-platform related defines }
+{------------------------------------------------------------------------------}
+
+{$IFDEF WIN32}
+ {$DEFINE MSWINDOWS}
+{$ENDIF}
+
+{$IFDEF DELPHILANGUAGE}
+ {$IFDEF LINUX}
+ {$DEFINE UNIX}
+ {$DEFINE VisualCLX}
+ {$ENDIF}
+
+ {$IFNDEF VisualCLX}
+ {$DEFINE VCL}
+ {$ENDIF}
+
+ {$IFDEF VisualCLX}
+ {$DEFINE COMPLIB_CLX} { kept for backward compatibility, use VisualCLX instead }
+ {$ENDIF}
+
+ {$IFDEF VCL}
+ {$DEFINE COMPLIB_VCL} { kept for backward compatibility, use VCL instead }
+ {$ENDIF}
+{$ENDIF DELPHILANGUAGE}
+
+{------------------------------------------------------------------------------}
+{ Compiler settings }
+{------------------------------------------------------------------------------}
+
+{$IFOPT A+} {$DEFINE ALIGN_ON} {$ENDIF}
+{$IFOPT B+} {$DEFINE BOOLEVAL_ON} {$ENDIF}
+{$IFDEF COMPILER2_UP}
+ {$IFOPT C+} {$DEFINE ASSERTIONS_ON} {$ENDIF}
+{$ENDIF}
+{$IFOPT D+} {$DEFINE DEBUGINFO_ON} {$ENDIF}
+{$IFOPT G+} {$DEFINE IMPORTEDDATA_ON} {$ENDIF}
+{$IFDEF COMPILER2_UP}
+ {$IFOPT H+} {$DEFINE LONGSTRINGS_ON} {$ENDIF}
+{$ENDIF}
+{ HINTS }
+{$IFOPT I+} {$DEFINE IOCHECKS_ON} {$ENDIF}
+{$IFDEF COMPILER2_UP}
+ {$IFOPT J+} {$DEFINE WRITEABLECONST_ON} {$ENDIF}
+{$ENDIF}
+{$IFOPT L+} {$DEFINE LOCALSYMBOLS} {$ENDIF}
+{$IFOPT M+} {$DEFINE TYPEINFO_ON} {$ENDIF}
+{$IFOPT O+} {$DEFINE OPTIMIZATION_ON} {$ENDIF}
+{$IFOPT P+} {$DEFINE OPENSTRINGS_ON} {$ENDIF}
+{$IFOPT Q+} {$DEFINE OVERFLOWCHECKS_ON} {$ENDIF}
+{$IFOPT R+} {$DEFINE RANGECHECKS_ON} {$ENDIF}
+{ REALCOMPATIBILITY }
+{$IFOPT T+} {$DEFINE TYPEDADDRESS_ON} {$ENDIF}
+{$IFOPT U+} {$DEFINE SAFEDIVIDE_ON} {$ENDIF}
+{$IFOPT V+} {$DEFINE VARSTRINGCHECKS_ON} {$ENDIF}
+{$IFOPT W+} {$DEFINE STACKFRAMES_ON} {$ENDIF}
+{ WARNINGS }
+{$IFOPT X+} {$DEFINE EXTENDEDSYNTAX_ON} {$ENDIF}
+
+// for Delphi/BCB trial versions remove the point from the line below
+{.$UNDEF SUPPORTS_WEAKPACKAGEUNIT}
+
+// History:
+
// $Log: jedi.inc,v $
// Revision 1.1 2005/04/04 07:56:11 marco
// * Jedi Windows Api initial import
-//
-// Revision 1.1 2004/11/11 09:39:29 marquardt
-// added several directory trees, added jedi.inc to files, misc style changes
-//
-// Revision 1.19 2004/11/06 02:11:20 mthoma
-// history cleaning.
-//
-// Revision 1.18 2004/08/10 02:52:02 rrossmair
-// - moved {$ENDIF ~JEDI_INC} to EOF.
-//
-// Revision 1.17 2004/08/09 06:38:08 peter3
-// - D8 support added
-// - D9 support added (guesswork)
-//
-// Revision 1.16 2004/07/29 17:12:28 rrossmair
-// fixed comment ("KYLIXX_UP from KYLIXX mappings")
-//
-// Revision 1.15 2004/07/29 07:58:21 marquardt
-// inc files updated
-//
-// Revision 1.14 2004/06/21 01:10:17 rrossmair
-// - $IFDEFed contents (to prevent from repeated inclusion)
-// - introduced symbols SUPPORTS_DEPRECATED_WARNINGS, SUPPORTS_LIBRARY_WARNINGS, SUPPORTS_PLATFORM_WARNINGS, SUPPORTS_COMPILETIME_MESSAGES
-// - reordered pre-CVS history
-//
-// Revision 1.13 2004/05/08 08:44:20 rrossmair
-// introduced & applied symbol HAS_UNIT_LIBC
-//
-// Revision 1.12 2004/05/06 05:03:59 rrossmair
-// SUPPORTS_ENUMVALUE definition fixed for Free Pascal Compiler
-//
-// Revision 1.11 2004/05/05 03:20:13 rrossmair
-// jedi.inc: moved FPC-incompatible Kylix-related code to separate include file "kylix.inc", disposed of FPC-related TODOs
-//
-// Revision 1.10 2004/05/01 00:03:59 rrossmair
-// FPC workaround removed; didn't work with Kylix
-//
-// Revision 1.9 2004/04/30 18:25:15 rrossmair
-// added symbols BORLAND, CPPBUILDER, BCBCOMPILER
-// removed symbol NONBORLAND
-// cleanup (reduced redundancy)
-// corrected embarrassing typo "widestring's" (for the 3rd time, I believe)
-//
-// Revision 1.8 2004/04/14 20:26:33 mthoma
-// Changed data to date
-// Local is Delphi 6 - removed todo comment
-// Replaced CLX with VisualCLX to be consistent with Borlands current definition of what "CLX" is.
-//
-// Revision 1.7 2004/04/06 05:06:12
-// add support for Kylix, FPC, RTL, versions, some speaking directives
-//
-// 2004-03-22,
-// - add SUPPORTS_WEAKPACKAGEUNIT
-//
-// 2004-03-20,
-// - add SUPPORTS_LOCAL
-//
-// 2004-03-18,
-// - add SUPPORTS_LONGWORD
-//
-// 2004-03-16,
-// - add HAS_UNIT_STRUTILS
-// - add XPLATFORM_RTL
-//
-// 2003-12-03,
-// - add SUPPORTS_ENUMVALUE
-//
-// 2003-11-14,
-// - add SUPPORTS_VARARGS
-//
-// 2003-10-30,
-// - correct and complete comments
-// - add Kylix definitions
-// - add RTL definitions
-// - add FPC definitions
-
-{$ENDIF ~JEDI_INC}
+//
+// Revision 1.1 2004/11/11 09:39:29 marquardt
+// added several directory trees, added jedi.inc to files, misc style changes
+//
+// Revision 1.19 2004/11/06 02:11:20 mthoma
+// history cleaning.
+//
+// Revision 1.18 2004/08/10 02:52:02 rrossmair
+// - moved {$ENDIF ~JEDI_INC} to EOF.
+//
+// Revision 1.17 2004/08/09 06:38:08 peter3
+// - D8 support added
+// - D9 support added (guesswork)
+//
+// Revision 1.16 2004/07/29 17:12:28 rrossmair
+// fixed comment ("KYLIXX_UP from KYLIXX mappings")
+//
+// Revision 1.15 2004/07/29 07:58:21 marquardt
+// inc files updated
+//
+// Revision 1.14 2004/06/21 01:10:17 rrossmair
+// - $IFDEFed contents (to prevent from repeated inclusion)
+// - introduced symbols SUPPORTS_DEPRECATED_WARNINGS, SUPPORTS_LIBRARY_WARNINGS, SUPPORTS_PLATFORM_WARNINGS, SUPPORTS_COMPILETIME_MESSAGES
+// - reordered pre-CVS history
+//
+// Revision 1.13 2004/05/08 08:44:20 rrossmair
+// introduced & applied symbol HAS_UNIT_LIBC
+//
+// Revision 1.12 2004/05/06 05:03:59 rrossmair
+// SUPPORTS_ENUMVALUE definition fixed for Free Pascal Compiler
+//
+// Revision 1.11 2004/05/05 03:20:13 rrossmair
+// jedi.inc: moved FPC-incompatible Kylix-related code to separate include file "kylix.inc", disposed of FPC-related TODOs
+//
+// Revision 1.10 2004/05/01 00:03:59 rrossmair
+// FPC workaround removed; didn't work with Kylix
+//
+// Revision 1.9 2004/04/30 18:25:15 rrossmair
+// added symbols BORLAND, CPPBUILDER, BCBCOMPILER
+// removed symbol NONBORLAND
+// cleanup (reduced redundancy)
+// corrected embarrassing typo "widestring's" (for the 3rd time, I believe)
+//
+// Revision 1.8 2004/04/14 20:26:33 mthoma
+// Changed data to date
+// Local is Delphi 6 - removed todo comment
+// Replaced CLX with VisualCLX to be consistent with Borlands current definition of what "CLX" is.
+//
+// Revision 1.7 2004/04/06 05:06:12
+// add support for Kylix, FPC, RTL, versions, some speaking directives
+//
+// 2004-03-22,
+// - add SUPPORTS_WEAKPACKAGEUNIT
+//
+// 2004-03-20,
+// - add SUPPORTS_LOCAL
+//
+// 2004-03-18,
+// - add SUPPORTS_LONGWORD
+//
+// 2004-03-16,
+// - add HAS_UNIT_STRUTILS
+// - add XPLATFORM_RTL
+//
+// 2003-12-03,
+// - add SUPPORTS_ENUMVALUE
+//
+// 2003-11-14,
+// - add SUPPORTS_VARARGS
+//
+// 2003-10-30,
+// - correct and complete comments
+// - add Kylix definitions
+// - add RTL definitions
+// - add FPC definitions
+
+{$ENDIF ~JEDI_INC}
diff --git a/rtl/win32/mouse.pp b/rtl/win32/mouse.pp
index 33fce9a1cc..70c9491b1e 100644
--- a/rtl/win32/mouse.pp
+++ b/rtl/win32/mouse.pp
@@ -1,255 +1,255 @@
-{
- $Id: mouse.pp,v 1.11 2005/03/31 14:43:03 marco Exp $
- This file is part of the Free Pascal run time library.
- Copyright (c) 1999-2000 by Florian Klaempfl
- member of the Free Pascal development team
-
- Mouse unit for linux
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
-
- 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.
-
- **********************************************************************}
-unit Mouse;
-interface
-
-{$i mouseh.inc}
-
-implementation
-
-uses
- windows,dos,Winevent;
-
-{$i mouse.inc}
-
-var
- ChangeMouseEvents : TCriticalSection;
- LastHandlerMouseEvent : TMouseEvent;
-
-procedure MouseEventHandler(var ir:INPUT_RECORD);
-
- var
- e : TMouseEvent;
-
- begin
- EnterCriticalSection(ChangeMouseEvents);
- e.x:=ir.Event.MouseEvent.dwMousePosition.x;
- e.y:=ir.Event.MouseEvent.dwMousePosition.y;
- e.buttons:=0;
- e.action:=0;
- if (ir.Event.MouseEvent.dwButtonState and FROM_LEFT_1ST_BUTTON_PRESSED<>0) then
- e.buttons:=e.buttons or MouseLeftButton;
- if (ir.Event.MouseEvent.dwButtonState and FROM_LEFT_2ND_BUTTON_PRESSED<>0) then
- e.buttons:=e.buttons or MouseMiddleButton;
- if (ir.Event.MouseEvent.dwButtonState and RIGHTMOST_BUTTON_PRESSED<>0) then
- e.buttons:=e.buttons or MouseRightButton;
-
- if (Lasthandlermouseevent.x<>e.x) or (LasthandlerMouseEvent.y<>e.y) then
- e.Action:=MouseActionMove;
- if (LastHandlerMouseEvent.Buttons<>e.Buttons) then
- begin
- if (LasthandlerMouseEvent.Buttons and e.buttons<>LasthandlerMouseEvent.Buttons) then
- e.Action:=MouseActionUp
- else
- e.Action:=MouseActionDown;
- end;
-
-
-//
-// The mouse event compression here was flawed and could lead
-// to "zero" mouse actions if the new (x,y) was the same as the
-// previous one. (bug 2312)
-//
-
- { can we compress the events? }
- if (PendingMouseEvents>0) and
- (e.buttons=PendingMouseTail^.buttons) and
- (e.action=PendingMouseTail^.action) then
- begin
- PendingMouseTail^.x:=e.x;
- PendingMouseTail^.y:=e.y;
- end
- else
- begin
-
- if e.action<>0 then
- begin
- LastHandlermouseEvent:=e;
- PutMouseEvent(e);
- end;
- // this should be done in PutMouseEvent, now it is PM
- // inc(PendingMouseEvents);
- end;
- LastMouseEvent:=e;
- LeaveCriticalSection(ChangeMouseEvents);
- end;
-
-procedure SysInitMouse;
-
-var
- mode : dword;
-
-begin
- // enable mouse events
- GetConsoleMode(StdInputHandle,@mode);
- mode:=mode or ENABLE_MOUSE_INPUT;
- SetConsoleMode(StdInputHandle,mode);
-
- PendingMouseHead:=@PendingMouseEvent;
- PendingMouseTail:=@PendingMouseEvent;
- PendingMouseEvents:=0;
- FillChar(LastMouseEvent,sizeof(TMouseEvent),0);
- InitializeCriticalSection(ChangeMouseEvents);
- SetMouseEventHandler(@MouseEventHandler);
- ShowMouse;
-end;
-
-
-procedure SysDoneMouse;
-var
- mode : dword;
-begin
- HideMouse;
- // disable mouse events
- GetConsoleMode(StdInputHandle,@mode);
- mode:=mode and (not ENABLE_MOUSE_INPUT);
- SetConsoleMode(StdInputHandle,mode);
-
- SetMouseEventHandler(nil);
- DeleteCriticalSection(ChangeMouseEvents);
-end;
-
-
-function SysDetectMouse:byte;
-var
- num : dword;
-begin
- GetNumberOfConsoleMouseButtons(@num);
- SysDetectMouse:=num;
-end;
-
-
-procedure SysGetMouseEvent(var MouseEvent: TMouseEvent);
-
-var
- b : byte;
-
-begin
- repeat
- EnterCriticalSection(ChangeMouseEvents);
- b:=PendingMouseEvents;
- LeaveCriticalSection(ChangeMouseEvents);
- if b>0 then
- break
- else
- sleep(50);
- until false;
- EnterCriticalSection(ChangeMouseEvents);
- MouseEvent:=PendingMouseHead^;
- inc(PendingMouseHead);
- if longint(PendingMouseHead)=longint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
- PendingMouseHead:=@PendingMouseEvent;
- dec(PendingMouseEvents);
- if (LastMouseEvent.x<>MouseEvent.x) or (LastMouseEvent.y<>MouseEvent.y) then
- MouseEvent.Action:=MouseActionMove;
- if (LastMouseEvent.Buttons<>MouseEvent.Buttons) then
- begin
- if (LastMouseEvent.Buttons and MouseEvent.buttons<>LastMouseEvent.Buttons) then
- MouseEvent.Action:=MouseActionUp
- else
- MouseEvent.Action:=MouseActionDown;
- end;
- if MouseEvent.action=0 then MousEevent.action:=MouseActionMove; // can sometimes happen due to compression of events.
- LastMouseEvent:=MouseEvent;
- LeaveCriticalSection(ChangeMouseEvents);
-end;
-
-
-function SysPollMouseEvent(var MouseEvent: TMouseEvent):boolean;
-begin
- EnterCriticalSection(ChangeMouseEvents);
- if PendingMouseEvents>0 then
- begin
- MouseEvent:=PendingMouseHead^;
- SysPollMouseEvent:=true;
- end
- else
- SysPollMouseEvent:=false;
- LeaveCriticalSection(ChangeMouseEvents);
-end;
-
-
-procedure SysPutMouseEvent(const MouseEvent: TMouseEvent);
-begin
- if PendingMouseEvents<MouseEventBufSize then
- begin
- PendingMouseTail^:=MouseEvent;
- inc(PendingMouseTail);
- if longint(PendingMouseTail)=longint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
- PendingMouseTail:=@PendingMouseEvent;
- { why isn't this done here ?
- so the win32 version do this by hand:}
- inc(PendingMouseEvents);
- end;
-end;
-
-
-function SysGetMouseX:word;
-begin
- EnterCriticalSection(ChangeMouseEvents);
- SysGetMouseX:=LastMouseEvent.x;
- LeaveCriticalSection(ChangeMouseEvents);
-end;
-
-
-function SysGetMouseY:word;
-begin
- EnterCriticalSection(ChangeMouseEvents);
- SysGetMouseY:=LastMouseEvent.y;
- LeaveCriticalSection(ChangeMouseEvents);
-end;
-
-
-function SysGetMouseButtons:word;
-begin
- EnterCriticalSection(ChangeMouseEvents);
- SysGetMouseButtons:=LastMouseEvent.Buttons;
- LeaveCriticalSection(ChangeMouseEvents);
-end;
-
-Const
- SysMouseDriver : TMouseDriver = (
- UseDefaultQueue : False;
- InitDriver : @SysInitMouse;
- DoneDriver : @SysDoneMouse;
- DetectMouse : @SysDetectMouse;
- ShowMouse : Nil;
- HideMouse : Nil;
- GetMouseX : @SysGetMouseX;
- GetMouseY : @SysGetMouseY;
- GetMouseButtons : @SysGetMouseButtons;
- SetMouseXY : Nil;
- GetMouseEvent : @SysGetMouseEvent;
- PollMouseEvent : @SysPollMouseEvent;
- PutMouseEvent : @SysPutMouseEvent;
- );
-
-Begin
- SetMouseDriver(SysMouseDriver);
-end.
-{
+{
+ $Id: mouse.pp,v 1.11 2005/03/31 14:43:03 marco Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Florian Klaempfl
+ member of the Free Pascal development team
+
+ Mouse unit for linux
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ 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.
+
+ **********************************************************************}
+unit Mouse;
+interface
+
+{$i mouseh.inc}
+
+implementation
+
+uses
+ windows,dos,Winevent;
+
+{$i mouse.inc}
+
+var
+ ChangeMouseEvents : TCriticalSection;
+ LastHandlerMouseEvent : TMouseEvent;
+
+procedure MouseEventHandler(var ir:INPUT_RECORD);
+
+ var
+ e : TMouseEvent;
+
+ begin
+ EnterCriticalSection(ChangeMouseEvents);
+ e.x:=ir.Event.MouseEvent.dwMousePosition.x;
+ e.y:=ir.Event.MouseEvent.dwMousePosition.y;
+ e.buttons:=0;
+ e.action:=0;
+ if (ir.Event.MouseEvent.dwButtonState and FROM_LEFT_1ST_BUTTON_PRESSED<>0) then
+ e.buttons:=e.buttons or MouseLeftButton;
+ if (ir.Event.MouseEvent.dwButtonState and FROM_LEFT_2ND_BUTTON_PRESSED<>0) then
+ e.buttons:=e.buttons or MouseMiddleButton;
+ if (ir.Event.MouseEvent.dwButtonState and RIGHTMOST_BUTTON_PRESSED<>0) then
+ e.buttons:=e.buttons or MouseRightButton;
+
+ if (Lasthandlermouseevent.x<>e.x) or (LasthandlerMouseEvent.y<>e.y) then
+ e.Action:=MouseActionMove;
+ if (LastHandlerMouseEvent.Buttons<>e.Buttons) then
+ begin
+ if (LasthandlerMouseEvent.Buttons and e.buttons<>LasthandlerMouseEvent.Buttons) then
+ e.Action:=MouseActionUp
+ else
+ e.Action:=MouseActionDown;
+ end;
+
+
+//
+// The mouse event compression here was flawed and could lead
+// to "zero" mouse actions if the new (x,y) was the same as the
+// previous one. (bug 2312)
+//
+
+ { can we compress the events? }
+ if (PendingMouseEvents>0) and
+ (e.buttons=PendingMouseTail^.buttons) and
+ (e.action=PendingMouseTail^.action) then
+ begin
+ PendingMouseTail^.x:=e.x;
+ PendingMouseTail^.y:=e.y;
+ end
+ else
+ begin
+
+ if e.action<>0 then
+ begin
+ LastHandlermouseEvent:=e;
+ PutMouseEvent(e);
+ end;
+ // this should be done in PutMouseEvent, now it is PM
+ // inc(PendingMouseEvents);
+ end;
+ LastMouseEvent:=e;
+ LeaveCriticalSection(ChangeMouseEvents);
+ end;
+
+procedure SysInitMouse;
+
+var
+ mode : dword;
+
+begin
+ // enable mouse events
+ GetConsoleMode(StdInputHandle,@mode);
+ mode:=mode or ENABLE_MOUSE_INPUT;
+ SetConsoleMode(StdInputHandle,mode);
+
+ PendingMouseHead:=@PendingMouseEvent;
+ PendingMouseTail:=@PendingMouseEvent;
+ PendingMouseEvents:=0;
+ FillChar(LastMouseEvent,sizeof(TMouseEvent),0);
+ InitializeCriticalSection(ChangeMouseEvents);
+ SetMouseEventHandler(@MouseEventHandler);
+ ShowMouse;
+end;
+
+
+procedure SysDoneMouse;
+var
+ mode : dword;
+begin
+ HideMouse;
+ // disable mouse events
+ GetConsoleMode(StdInputHandle,@mode);
+ mode:=mode and (not ENABLE_MOUSE_INPUT);
+ SetConsoleMode(StdInputHandle,mode);
+
+ SetMouseEventHandler(nil);
+ DeleteCriticalSection(ChangeMouseEvents);
+end;
+
+
+function SysDetectMouse:byte;
+var
+ num : dword;
+begin
+ GetNumberOfConsoleMouseButtons(@num);
+ SysDetectMouse:=num;
+end;
+
+
+procedure SysGetMouseEvent(var MouseEvent: TMouseEvent);
+
+var
+ b : byte;
+
+begin
+ repeat
+ EnterCriticalSection(ChangeMouseEvents);
+ b:=PendingMouseEvents;
+ LeaveCriticalSection(ChangeMouseEvents);
+ if b>0 then
+ break
+ else
+ sleep(50);
+ until false;
+ EnterCriticalSection(ChangeMouseEvents);
+ MouseEvent:=PendingMouseHead^;
+ inc(PendingMouseHead);
+ if longint(PendingMouseHead)=longint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
+ PendingMouseHead:=@PendingMouseEvent;
+ dec(PendingMouseEvents);
+ if (LastMouseEvent.x<>MouseEvent.x) or (LastMouseEvent.y<>MouseEvent.y) then
+ MouseEvent.Action:=MouseActionMove;
+ if (LastMouseEvent.Buttons<>MouseEvent.Buttons) then
+ begin
+ if (LastMouseEvent.Buttons and MouseEvent.buttons<>LastMouseEvent.Buttons) then
+ MouseEvent.Action:=MouseActionUp
+ else
+ MouseEvent.Action:=MouseActionDown;
+ end;
+ if MouseEvent.action=0 then MousEevent.action:=MouseActionMove; // can sometimes happen due to compression of events.
+ LastMouseEvent:=MouseEvent;
+ LeaveCriticalSection(ChangeMouseEvents);
+end;
+
+
+function SysPollMouseEvent(var MouseEvent: TMouseEvent):boolean;
+begin
+ EnterCriticalSection(ChangeMouseEvents);
+ if PendingMouseEvents>0 then
+ begin
+ MouseEvent:=PendingMouseHead^;
+ SysPollMouseEvent:=true;
+ end
+ else
+ SysPollMouseEvent:=false;
+ LeaveCriticalSection(ChangeMouseEvents);
+end;
+
+
+procedure SysPutMouseEvent(const MouseEvent: TMouseEvent);
+begin
+ if PendingMouseEvents<MouseEventBufSize then
+ begin
+ PendingMouseTail^:=MouseEvent;
+ inc(PendingMouseTail);
+ if longint(PendingMouseTail)=longint(@PendingMouseEvent)+sizeof(PendingMouseEvent) then
+ PendingMouseTail:=@PendingMouseEvent;
+ { why isn't this done here ?
+ so the win32 version do this by hand:}
+ inc(PendingMouseEvents);
+ end;
+end;
+
+
+function SysGetMouseX:word;
+begin
+ EnterCriticalSection(ChangeMouseEvents);
+ SysGetMouseX:=LastMouseEvent.x;
+ LeaveCriticalSection(ChangeMouseEvents);
+end;
+
+
+function SysGetMouseY:word;
+begin
+ EnterCriticalSection(ChangeMouseEvents);
+ SysGetMouseY:=LastMouseEvent.y;
+ LeaveCriticalSection(ChangeMouseEvents);
+end;
+
+
+function SysGetMouseButtons:word;
+begin
+ EnterCriticalSection(ChangeMouseEvents);
+ SysGetMouseButtons:=LastMouseEvent.Buttons;
+ LeaveCriticalSection(ChangeMouseEvents);
+end;
+
+Const
+ SysMouseDriver : TMouseDriver = (
+ UseDefaultQueue : False;
+ InitDriver : @SysInitMouse;
+ DoneDriver : @SysDoneMouse;
+ DetectMouse : @SysDetectMouse;
+ ShowMouse : Nil;
+ HideMouse : Nil;
+ GetMouseX : @SysGetMouseX;
+ GetMouseY : @SysGetMouseY;
+ GetMouseButtons : @SysGetMouseButtons;
+ SetMouseXY : Nil;
+ GetMouseEvent : @SysGetMouseEvent;
+ PollMouseEvent : @SysPollMouseEvent;
+ PutMouseEvent : @SysPutMouseEvent;
+ );
+
+Begin
+ SetMouseDriver(SysMouseDriver);
+end.
+{
$Log: mouse.pp,v $
Revision 1.11 2005/03/31 14:43:03 marco
* fix to lastmouseevent update
-
- Revision 1.10 2005/02/14 17:13:32 peter
- * truncate log
-
- Revision 1.9 2005/01/12 10:25:48 armin
- * Patch for bug 3548 from Peter
-
-}
+
+ Revision 1.10 2005/02/14 17:13:32 peter
+ * truncate log
+
+ Revision 1.9 2005/01/12 10:25:48 armin
+ * Patch for bug 3548 from Peter
+
+}