Update upstream source from tag 'upstream/2.4'
Update to upstream version '2.4'
with Debian dir 85e2d576e687850f6a94e77d1585c4c16e86ef29
Emmanuel Bourg
6 years ago
0 | GNU GENERAL PUBLIC LICENSE | |
1 | Version 2, June 1991 | |
2 | ||
3 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., | |
4 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
5 | Everyone is permitted to copy and distribute verbatim copies | |
6 | of this license document, but changing it is not allowed. | |
7 | ||
8 | Preamble | |
9 | ||
10 | The licenses for most software are designed to take away your | |
11 | freedom to share and change it. By contrast, the GNU General Public | |
12 | License is intended to guarantee your freedom to share and change free | |
13 | software--to make sure the software is free for all its users. This | |
14 | General Public License applies to most of the Free Software | |
15 | Foundation's software and to any other program whose authors commit to | |
16 | using it. (Some other Free Software Foundation software is covered by | |
17 | the GNU Lesser General Public License instead.) You can apply it to | |
18 | your programs, too. | |
19 | ||
20 | When we speak of free software, we are referring to freedom, not | |
21 | price. Our General Public Licenses are designed to make sure that you | |
22 | have the freedom to distribute copies of free software (and charge for | |
23 | this service if you wish), that you receive source code or can get it | |
24 | if you want it, that you can change the software or use pieces of it | |
25 | in new free programs; and that you know you can do these things. | |
26 | ||
27 | To protect your rights, we need to make restrictions that forbid | |
28 | anyone to deny you these rights or to ask you to surrender the rights. | |
29 | These restrictions translate to certain responsibilities for you if you | |
30 | distribute copies of the software, or if you modify it. | |
31 | ||
32 | For example, if you distribute copies of such a program, whether | |
33 | gratis or for a fee, you must give the recipients all the rights that | |
34 | you have. You must make sure that they, too, receive or can get the | |
35 | source code. And you must show them these terms so they know their | |
36 | rights. | |
37 | ||
38 | We protect your rights with two steps: (1) copyright the software, and | |
39 | (2) offer you this license which gives you legal permission to copy, | |
40 | distribute and/or modify the software. | |
41 | ||
42 | Also, for each author's protection and ours, we want to make certain | |
43 | that everyone understands that there is no warranty for this free | |
44 | software. If the software is modified by someone else and passed on, we | |
45 | want its recipients to know that what they have is not the original, so | |
46 | that any problems introduced by others will not reflect on the original | |
47 | authors' reputations. | |
48 | ||
49 | Finally, any free program is threatened constantly by software | |
50 | patents. We wish to avoid the danger that redistributors of a free | |
51 | program will individually obtain patent licenses, in effect making the | |
52 | program proprietary. To prevent this, we have made it clear that any | |
53 | patent must be licensed for everyone's free use or not licensed at all. | |
54 | ||
55 | The precise terms and conditions for copying, distribution and | |
56 | modification follow. | |
57 | ||
58 | GNU GENERAL PUBLIC LICENSE | |
59 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
60 | ||
61 | 0. This License applies to any program or other work which contains | |
62 | a notice placed by the copyright holder saying it may be distributed | |
63 | under the terms of this General Public License. The "Program", below, | |
64 | refers to any such program or work, and a "work based on the Program" | |
65 | means either the Program or any derivative work under copyright law: | |
66 | that is to say, a work containing the Program or a portion of it, | |
67 | either verbatim or with modifications and/or translated into another | |
68 | language. (Hereinafter, translation is included without limitation in | |
69 | the term "modification".) Each licensee is addressed as "you". | |
70 | ||
71 | Activities other than copying, distribution and modification are not | |
72 | covered by this License; they are outside its scope. The act of | |
73 | running the Program is not restricted, and the output from the Program | |
74 | is covered only if its contents constitute a work based on the | |
75 | Program (independent of having been made by running the Program). | |
76 | Whether that is true depends on what the Program does. | |
77 | ||
78 | 1. You may copy and distribute verbatim copies of the Program's | |
79 | source code as you receive it, in any medium, provided that you | |
80 | conspicuously and appropriately publish on each copy an appropriate | |
81 | copyright notice and disclaimer of warranty; keep intact all the | |
82 | notices that refer to this License and to the absence of any warranty; | |
83 | and give any other recipients of the Program a copy of this License | |
84 | along with the Program. | |
85 | ||
86 | You may charge a fee for the physical act of transferring a copy, and | |
87 | you may at your option offer warranty protection in exchange for a fee. | |
88 | ||
89 | 2. You may modify your copy or copies of the Program or any portion | |
90 | of it, thus forming a work based on the Program, and copy and | |
91 | distribute such modifications or work under the terms of Section 1 | |
92 | above, provided that you also meet all of these conditions: | |
93 | ||
94 | a) You must cause the modified files to carry prominent notices | |
95 | stating that you changed the files and the date of any change. | |
96 | ||
97 | b) You must cause any work that you distribute or publish, that in | |
98 | whole or in part contains or is derived from the Program or any | |
99 | part thereof, to be licensed as a whole at no charge to all third | |
100 | parties under the terms of this License. | |
101 | ||
102 | c) If the modified program normally reads commands interactively | |
103 | when run, you must cause it, when started running for such | |
104 | interactive use in the most ordinary way, to print or display an | |
105 | announcement including an appropriate copyright notice and a | |
106 | notice that there is no warranty (or else, saying that you provide | |
107 | a warranty) and that users may redistribute the program under | |
108 | these conditions, and telling the user how to view a copy of this | |
109 | License. (Exception: if the Program itself is interactive but | |
110 | does not normally print such an announcement, your work based on | |
111 | the Program is not required to print an announcement.) | |
112 | ||
113 | These requirements apply to the modified work as a whole. If | |
114 | identifiable sections of that work are not derived from the Program, | |
115 | and can be reasonably considered independent and separate works in | |
116 | themselves, then this License, and its terms, do not apply to those | |
117 | sections when you distribute them as separate works. But when you | |
118 | distribute the same sections as part of a whole which is a work based | |
119 | on the Program, the distribution of the whole must be on the terms of | |
120 | this License, whose permissions for other licensees extend to the | |
121 | entire whole, and thus to each and every part regardless of who wrote it. | |
122 | ||
123 | Thus, it is not the intent of this section to claim rights or contest | |
124 | your rights to work written entirely by you; rather, the intent is to | |
125 | exercise the right to control the distribution of derivative or | |
126 | collective works based on the Program. | |
127 | ||
128 | In addition, mere aggregation of another work not based on the Program | |
129 | with the Program (or with a work based on the Program) on a volume of | |
130 | a storage or distribution medium does not bring the other work under | |
131 | the scope of this License. | |
132 | ||
133 | 3. You may copy and distribute the Program (or a work based on it, | |
134 | under Section 2) in object code or executable form under the terms of | |
135 | Sections 1 and 2 above provided that you also do one of the following: | |
136 | ||
137 | a) Accompany it with the complete corresponding machine-readable | |
138 | source code, which must be distributed under the terms of Sections | |
139 | 1 and 2 above on a medium customarily used for software interchange; or, | |
140 | ||
141 | b) Accompany it with a written offer, valid for at least three | |
142 | years, to give any third party, for a charge no more than your | |
143 | cost of physically performing source distribution, a complete | |
144 | machine-readable copy of the corresponding source code, to be | |
145 | distributed under the terms of Sections 1 and 2 above on a medium | |
146 | customarily used for software interchange; or, | |
147 | ||
148 | c) Accompany it with the information you received as to the offer | |
149 | to distribute corresponding source code. (This alternative is | |
150 | allowed only for noncommercial distribution and only if you | |
151 | received the program in object code or executable form with such | |
152 | an offer, in accord with Subsection b above.) | |
153 | ||
154 | The source code for a work means the preferred form of the work for | |
155 | making modifications to it. For an executable work, complete source | |
156 | code means all the source code for all modules it contains, plus any | |
157 | associated interface definition files, plus the scripts used to | |
158 | control compilation and installation of the executable. However, as a | |
159 | special exception, the source code distributed need not include | |
160 | anything that is normally distributed (in either source or binary | |
161 | form) with the major components (compiler, kernel, and so on) of the | |
162 | operating system on which the executable runs, unless that component | |
163 | itself accompanies the executable. | |
164 | ||
165 | If distribution of executable or object code is made by offering | |
166 | access to copy from a designated place, then offering equivalent | |
167 | access to copy the source code from the same place counts as | |
168 | distribution of the source code, even though third parties are not | |
169 | compelled to copy the source along with the object code. | |
170 | ||
171 | 4. You may not copy, modify, sublicense, or distribute the Program | |
172 | except as expressly provided under this License. Any attempt | |
173 | otherwise to copy, modify, sublicense or distribute the Program is | |
174 | void, and will automatically terminate your rights under this License. | |
175 | However, parties who have received copies, or rights, from you under | |
176 | this License will not have their licenses terminated so long as such | |
177 | parties remain in full compliance. | |
178 | ||
179 | 5. You are not required to accept this License, since you have not | |
180 | signed it. However, nothing else grants you permission to modify or | |
181 | distribute the Program or its derivative works. These actions are | |
182 | prohibited by law if you do not accept this License. Therefore, by | |
183 | modifying or distributing the Program (or any work based on the | |
184 | Program), you indicate your acceptance of this License to do so, and | |
185 | all its terms and conditions for copying, distributing or modifying | |
186 | the Program or works based on it. | |
187 | ||
188 | 6. Each time you redistribute the Program (or any work based on the | |
189 | Program), the recipient automatically receives a license from the | |
190 | original licensor to copy, distribute or modify the Program subject to | |
191 | these terms and conditions. You may not impose any further | |
192 | restrictions on the recipients' exercise of the rights granted herein. | |
193 | You are not responsible for enforcing compliance by third parties to | |
194 | this License. | |
195 | ||
196 | 7. If, as a consequence of a court judgment or allegation of patent | |
197 | infringement or for any other reason (not limited to patent issues), | |
198 | conditions are imposed on you (whether by court order, agreement or | |
199 | otherwise) that contradict the conditions of this License, they do not | |
200 | excuse you from the conditions of this License. If you cannot | |
201 | distribute so as to satisfy simultaneously your obligations under this | |
202 | License and any other pertinent obligations, then as a consequence you | |
203 | may not distribute the Program at all. For example, if a patent | |
204 | license would not permit royalty-free redistribution of the Program by | |
205 | all those who receive copies directly or indirectly through you, then | |
206 | the only way you could satisfy both it and this License would be to | |
207 | refrain entirely from distribution of the Program. | |
208 | ||
209 | If any portion of this section is held invalid or unenforceable under | |
210 | any particular circumstance, the balance of the section is intended to | |
211 | apply and the section as a whole is intended to apply in other | |
212 | circumstances. | |
213 | ||
214 | It is not the purpose of this section to induce you to infringe any | |
215 | patents or other property right claims or to contest validity of any | |
216 | such claims; this section has the sole purpose of protecting the | |
217 | integrity of the free software distribution system, which is | |
218 | implemented by public license practices. Many people have made | |
219 | generous contributions to the wide range of software distributed | |
220 | through that system in reliance on consistent application of that | |
221 | system; it is up to the author/donor to decide if he or she is willing | |
222 | to distribute software through any other system and a licensee cannot | |
223 | impose that choice. | |
224 | ||
225 | This section is intended to make thoroughly clear what is believed to | |
226 | be a consequence of the rest of this License. | |
227 | ||
228 | 8. If the distribution and/or use of the Program is restricted in | |
229 | certain countries either by patents or by copyrighted interfaces, the | |
230 | original copyright holder who places the Program under this License | |
231 | may add an explicit geographical distribution limitation excluding | |
232 | those countries, so that distribution is permitted only in or among | |
233 | countries not thus excluded. In such case, this License incorporates | |
234 | the limitation as if written in the body of this License. | |
235 | ||
236 | 9. The Free Software Foundation may publish revised and/or new versions | |
237 | of the General Public License from time to time. Such new versions will | |
238 | be similar in spirit to the present version, but may differ in detail to | |
239 | address new problems or concerns. | |
240 | ||
241 | Each version is given a distinguishing version number. If the Program | |
242 | specifies a version number of this License which applies to it and "any | |
243 | later version", you have the option of following the terms and conditions | |
244 | either of that version or of any later version published by the Free | |
245 | Software Foundation. If the Program does not specify a version number of | |
246 | this License, you may choose any version ever published by the Free Software | |
247 | Foundation. | |
248 | ||
249 | 10. If you wish to incorporate parts of the Program into other free | |
250 | programs whose distribution conditions are different, write to the author | |
251 | to ask for permission. For software which is copyrighted by the Free | |
252 | Software Foundation, write to the Free Software Foundation; we sometimes | |
253 | make exceptions for this. Our decision will be guided by the two goals | |
254 | of preserving the free status of all derivatives of our free software and | |
255 | of promoting the sharing and reuse of software generally. | |
256 | ||
257 | NO WARRANTY | |
258 | ||
259 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | |
260 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | |
261 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | |
262 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | |
263 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
264 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | |
265 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | |
266 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | |
267 | REPAIR OR CORRECTION. | |
268 | ||
269 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
270 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | |
271 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |
272 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | |
273 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | |
274 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | |
275 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | |
276 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |
277 | POSSIBILITY OF SUCH DAMAGES. | |
278 | ||
279 | END OF TERMS AND CONDITIONS | |
280 | ||
281 | How to Apply These Terms to Your New Programs | |
282 | ||
283 | If you develop a new program, and you want it to be of the greatest | |
284 | possible use to the public, the best way to achieve this is to make it | |
285 | free software which everyone can redistribute and change under these terms. | |
286 | ||
287 | To do so, attach the following notices to the program. It is safest | |
288 | to attach them to the start of each source file to most effectively | |
289 | convey the exclusion of warranty; and each file should have at least | |
290 | the "copyright" line and a pointer to where the full notice is found. | |
291 | ||
292 | <one line to give the program's name and a brief idea of what it does.> | |
293 | Copyright (C) <year> <name of author> | |
294 | ||
295 | This program is free software; you can redistribute it and/or modify | |
296 | it under the terms of the GNU General Public License as published by | |
297 | the Free Software Foundation; either version 2 of the License, or | |
298 | (at your option) any later version. | |
299 | ||
300 | This program is distributed in the hope that it will be useful, | |
301 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
302 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
303 | GNU General Public License for more details. | |
304 | ||
305 | You should have received a copy of the GNU General Public License along | |
306 | with this program; if not, write to the Free Software Foundation, Inc., | |
307 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
308 | ||
309 | Also add information on how to contact you by electronic and paper mail. | |
310 | ||
311 | If the program is interactive, make it output a short notice like this | |
312 | when it starts in an interactive mode: | |
313 | ||
314 | Gnomovision version 69, Copyright (C) year name of author | |
315 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | |
316 | This is free software, and you are welcome to redistribute it | |
317 | under certain conditions; type `show c' for details. | |
318 | ||
319 | The hypothetical commands `show w' and `show c' should show the appropriate | |
320 | parts of the General Public License. Of course, the commands you use may | |
321 | be called something other than `show w' and `show c'; they could even be | |
322 | mouse-clicks or menu items--whatever suits your program. | |
323 | ||
324 | You should also get your employer (if you work as a programmer) or your | |
325 | school, if any, to sign a "copyright disclaimer" for the program, if | |
326 | necessary. Here is a sample; alter the names: | |
327 | ||
328 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program | |
329 | `Gnomovision' (which makes passes at compilers) written by James Hacker. | |
330 | ||
331 | <signature of Ty Coon>, 1 April 1989 | |
332 | Ty Coon, President of Vice | |
333 | ||
334 | This General Public License does not permit incorporating your program into | |
335 | proprietary programs. If your program is a subroutine library, you may | |
336 | consider it more useful to permit linking proprietary applications with the | |
337 | library. If this is what you want to do, use the GNU Lesser General | |
338 | Public License instead of this License. |
0 | 0 | |
1 | Copyright (C) 2011-2017 Andrey Ponomarenko's ABI Laboratory | |
1 | Copyright (C) 2011-2018 Andrey Ponomarenko's ABI Laboratory | |
2 | 2 | |
3 | 3 | All rights reserved. |
4 | 4 | |
26 | 26 | 1. REQUIREMENTS FOR LINUX, FREEBSD and MAC OS X |
27 | 27 | =============================================== |
28 | 28 | |
29 | 1. JDK or OpenJDK - development files (javap, javac) | |
29 | 1. JDK or OpenJDK - development files (javap, javac, jar, jmod) | |
30 | 30 | 2. Perl 5 (5.8 or newer) |
31 | 31 | |
32 | 32 | |
34 | 34 | 2. REQUIREMENTS FOR MS WINDOWS |
35 | 35 | ============================== |
36 | 36 | |
37 | 1. JDK or OpenJDK (javap, javac) | |
37 | 1. JDK or OpenJDK (javap, javac, jar, jmod) | |
38 | 38 | 2. Active Perl 5 (5.8 or newer) |
39 | 39 | |
40 | 40 | |
57 | 57 | ======== |
58 | 58 | |
59 | 59 | 1. japi-compliance-checker OLD.jar NEW.jar |
60 | 2. japi-compliance-checker OLD.jmod NEW.jmod | |
60 | 61 | |
61 | 62 | |
62 | 63 | |
70 | 71 | </version> |
71 | 72 | |
72 | 73 | <archives> |
73 | /path1/to/JAR(s)/ | |
74 | /path2/to/JAR(s)/ | |
74 | /path1/to/JAR(s) OR JMOD(s)/ | |
75 | /path2/to/JAR(s) OR JMOD(s)/ | |
75 | 76 | ... |
76 | 77 | </archives> |
77 | 78 |
0 | GNU LESSER GENERAL PUBLIC LICENSE | |
1 | Version 2.1, February 1999 | |
2 | ||
3 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. | |
4 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
5 | Everyone is permitted to copy and distribute verbatim copies | |
6 | of this license document, but changing it is not allowed. | |
7 | ||
8 | [This is the first released version of the Lesser GPL. It also counts | |
9 | as the successor of the GNU Library Public License, version 2, hence | |
10 | the version number 2.1.] | |
11 | ||
12 | Preamble | |
13 | ||
14 | The licenses for most software are designed to take away your | |
15 | freedom to share and change it. By contrast, the GNU General Public | |
16 | Licenses are intended to guarantee your freedom to share and change | |
17 | free software--to make sure the software is free for all its users. | |
18 | ||
19 | This license, the Lesser General Public License, applies to some | |
20 | specially designated software packages--typically libraries--of the | |
21 | Free Software Foundation and other authors who decide to use it. You | |
22 | can use it too, but we suggest you first think carefully about whether | |
23 | this license or the ordinary General Public License is the better | |
24 | strategy to use in any particular case, based on the explanations below. | |
25 | ||
26 | When we speak of free software, we are referring to freedom of use, | |
27 | not price. Our General Public Licenses are designed to make sure that | |
28 | you have the freedom to distribute copies of free software (and charge | |
29 | for this service if you wish); that you receive source code or can get | |
30 | it if you want it; that you can change the software and use pieces of | |
31 | it in new free programs; and that you are informed that you can do | |
32 | these things. | |
33 | ||
34 | To protect your rights, we need to make restrictions that forbid | |
35 | distributors to deny you these rights or to ask you to surrender these | |
36 | rights. These restrictions translate to certain responsibilities for | |
37 | you if you distribute copies of the library or if you modify it. | |
38 | ||
39 | For example, if you distribute copies of the library, whether gratis | |
40 | or for a fee, you must give the recipients all the rights that we gave | |
41 | you. You must make sure that they, too, receive or can get the source | |
42 | code. If you link other code with the library, you must provide | |
43 | complete object files to the recipients, so that they can relink them | |
44 | with the library after making changes to the library and recompiling | |
45 | it. And you must show them these terms so they know their rights. | |
46 | ||
47 | We protect your rights with a two-step method: (1) we copyright the | |
48 | library, and (2) we offer you this license, which gives you legal | |
49 | permission to copy, distribute and/or modify the library. | |
50 | ||
51 | To protect each distributor, we want to make it very clear that | |
52 | there is no warranty for the free library. Also, if the library is | |
53 | modified by someone else and passed on, the recipients should know | |
54 | that what they have is not the original version, so that the original | |
55 | author's reputation will not be affected by problems that might be | |
56 | introduced by others. | |
57 | ||
58 | Finally, software patents pose a constant threat to the existence of | |
59 | any free program. We wish to make sure that a company cannot | |
60 | effectively restrict the users of a free program by obtaining a | |
61 | restrictive license from a patent holder. Therefore, we insist that | |
62 | any patent license obtained for a version of the library must be | |
63 | consistent with the full freedom of use specified in this license. | |
64 | ||
65 | Most GNU software, including some libraries, is covered by the | |
66 | ordinary GNU General Public License. This license, the GNU Lesser | |
67 | General Public License, applies to certain designated libraries, and | |
68 | is quite different from the ordinary General Public License. We use | |
69 | this license for certain libraries in order to permit linking those | |
70 | libraries into non-free programs. | |
71 | ||
72 | When a program is linked with a library, whether statically or using | |
73 | a shared library, the combination of the two is legally speaking a | |
74 | combined work, a derivative of the original library. The ordinary | |
75 | General Public License therefore permits such linking only if the | |
76 | entire combination fits its criteria of freedom. The Lesser General | |
77 | Public License permits more lax criteria for linking other code with | |
78 | the library. | |
79 | ||
80 | We call this license the "Lesser" General Public License because it | |
81 | does Less to protect the user's freedom than the ordinary General | |
82 | Public License. It also provides other free software developers Less | |
83 | of an advantage over competing non-free programs. These disadvantages | |
84 | are the reason we use the ordinary General Public License for many | |
85 | libraries. However, the Lesser license provides advantages in certain | |
86 | special circumstances. | |
87 | ||
88 | For example, on rare occasions, there may be a special need to | |
89 | encourage the widest possible use of a certain library, so that it becomes | |
90 | a de-facto standard. To achieve this, non-free programs must be | |
91 | allowed to use the library. A more frequent case is that a free | |
92 | library does the same job as widely used non-free libraries. In this | |
93 | case, there is little to gain by limiting the free library to free | |
94 | software only, so we use the Lesser General Public License. | |
95 | ||
96 | In other cases, permission to use a particular library in non-free | |
97 | programs enables a greater number of people to use a large body of | |
98 | free software. For example, permission to use the GNU C Library in | |
99 | non-free programs enables many more people to use the whole GNU | |
100 | operating system, as well as its variant, the GNU/Linux operating | |
101 | system. | |
102 | ||
103 | Although the Lesser General Public License is Less protective of the | |
104 | users' freedom, it does ensure that the user of a program that is | |
105 | linked with the Library has the freedom and the wherewithal to run | |
106 | that program using a modified version of the Library. | |
107 | ||
108 | The precise terms and conditions for copying, distribution and | |
109 | modification follow. Pay close attention to the difference between a | |
110 | "work based on the library" and a "work that uses the library". The | |
111 | former contains code derived from the library, whereas the latter must | |
112 | be combined with the library in order to run. | |
113 | ||
114 | GNU LESSER GENERAL PUBLIC LICENSE | |
115 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
116 | ||
117 | 0. This License Agreement applies to any software library or other | |
118 | program which contains a notice placed by the copyright holder or | |
119 | other authorized party saying it may be distributed under the terms of | |
120 | this Lesser General Public License (also called "this License"). | |
121 | Each licensee is addressed as "you". | |
122 | ||
123 | A "library" means a collection of software functions and/or data | |
124 | prepared so as to be conveniently linked with application programs | |
125 | (which use some of those functions and data) to form executables. | |
126 | ||
127 | The "Library", below, refers to any such software library or work | |
128 | which has been distributed under these terms. A "work based on the | |
129 | Library" means either the Library or any derivative work under | |
130 | copyright law: that is to say, a work containing the Library or a | |
131 | portion of it, either verbatim or with modifications and/or translated | |
132 | straightforwardly into another language. (Hereinafter, translation is | |
133 | included without limitation in the term "modification".) | |
134 | ||
135 | "Source code" for a work means the preferred form of the work for | |
136 | making modifications to it. For a library, complete source code means | |
137 | all the source code for all modules it contains, plus any associated | |
138 | interface definition files, plus the scripts used to control compilation | |
139 | and installation of the library. | |
140 | ||
141 | Activities other than copying, distribution and modification are not | |
142 | covered by this License; they are outside its scope. The act of | |
143 | running a program using the Library is not restricted, and output from | |
144 | such a program is covered only if its contents constitute a work based | |
145 | on the Library (independent of the use of the Library in a tool for | |
146 | writing it). Whether that is true depends on what the Library does | |
147 | and what the program that uses the Library does. | |
148 | ||
149 | 1. You may copy and distribute verbatim copies of the Library's | |
150 | complete source code as you receive it, in any medium, provided that | |
151 | you conspicuously and appropriately publish on each copy an | |
152 | appropriate copyright notice and disclaimer of warranty; keep intact | |
153 | all the notices that refer to this License and to the absence of any | |
154 | warranty; and distribute a copy of this License along with the | |
155 | Library. | |
156 | ||
157 | You may charge a fee for the physical act of transferring a copy, | |
158 | and you may at your option offer warranty protection in exchange for a | |
159 | fee. | |
160 | ||
161 | 2. You may modify your copy or copies of the Library or any portion | |
162 | of it, thus forming a work based on the Library, and copy and | |
163 | distribute such modifications or work under the terms of Section 1 | |
164 | above, provided that you also meet all of these conditions: | |
165 | ||
166 | a) The modified work must itself be a software library. | |
167 | ||
168 | b) You must cause the files modified to carry prominent notices | |
169 | stating that you changed the files and the date of any change. | |
170 | ||
171 | c) You must cause the whole of the work to be licensed at no | |
172 | charge to all third parties under the terms of this License. | |
173 | ||
174 | d) If a facility in the modified Library refers to a function or a | |
175 | table of data to be supplied by an application program that uses | |
176 | the facility, other than as an argument passed when the facility | |
177 | is invoked, then you must make a good faith effort to ensure that, | |
178 | in the event an application does not supply such function or | |
179 | table, the facility still operates, and performs whatever part of | |
180 | its purpose remains meaningful. | |
181 | ||
182 | (For example, a function in a library to compute square roots has | |
183 | a purpose that is entirely well-defined independent of the | |
184 | application. Therefore, Subsection 2d requires that any | |
185 | application-supplied function or table used by this function must | |
186 | be optional: if the application does not supply it, the square | |
187 | root function must still compute square roots.) | |
188 | ||
189 | These requirements apply to the modified work as a whole. If | |
190 | identifiable sections of that work are not derived from the Library, | |
191 | and can be reasonably considered independent and separate works in | |
192 | themselves, then this License, and its terms, do not apply to those | |
193 | sections when you distribute them as separate works. But when you | |
194 | distribute the same sections as part of a whole which is a work based | |
195 | on the Library, the distribution of the whole must be on the terms of | |
196 | this License, whose permissions for other licensees extend to the | |
197 | entire whole, and thus to each and every part regardless of who wrote | |
198 | it. | |
199 | ||
200 | Thus, it is not the intent of this section to claim rights or contest | |
201 | your rights to work written entirely by you; rather, the intent is to | |
202 | exercise the right to control the distribution of derivative or | |
203 | collective works based on the Library. | |
204 | ||
205 | In addition, mere aggregation of another work not based on the Library | |
206 | with the Library (or with a work based on the Library) on a volume of | |
207 | a storage or distribution medium does not bring the other work under | |
208 | the scope of this License. | |
209 | ||
210 | 3. You may opt to apply the terms of the ordinary GNU General Public | |
211 | License instead of this License to a given copy of the Library. To do | |
212 | this, you must alter all the notices that refer to this License, so | |
213 | that they refer to the ordinary GNU General Public License, version 2, | |
214 | instead of to this License. (If a newer version than version 2 of the | |
215 | ordinary GNU General Public License has appeared, then you can specify | |
216 | that version instead if you wish.) Do not make any other change in | |
217 | these notices. | |
218 | ||
219 | Once this change is made in a given copy, it is irreversible for | |
220 | that copy, so the ordinary GNU General Public License applies to all | |
221 | subsequent copies and derivative works made from that copy. | |
222 | ||
223 | This option is useful when you wish to copy part of the code of | |
224 | the Library into a program that is not a library. | |
225 | ||
226 | 4. You may copy and distribute the Library (or a portion or | |
227 | derivative of it, under Section 2) in object code or executable form | |
228 | under the terms of Sections 1 and 2 above provided that you accompany | |
229 | it with the complete corresponding machine-readable source code, which | |
230 | must be distributed under the terms of Sections 1 and 2 above on a | |
231 | medium customarily used for software interchange. | |
232 | ||
233 | If distribution of object code is made by offering access to copy | |
234 | from a designated place, then offering equivalent access to copy the | |
235 | source code from the same place satisfies the requirement to | |
236 | distribute the source code, even though third parties are not | |
237 | compelled to copy the source along with the object code. | |
238 | ||
239 | 5. A program that contains no derivative of any portion of the | |
240 | Library, but is designed to work with the Library by being compiled or | |
241 | linked with it, is called a "work that uses the Library". Such a | |
242 | work, in isolation, is not a derivative work of the Library, and | |
243 | therefore falls outside the scope of this License. | |
244 | ||
245 | However, linking a "work that uses the Library" with the Library | |
246 | creates an executable that is a derivative of the Library (because it | |
247 | contains portions of the Library), rather than a "work that uses the | |
248 | library". The executable is therefore covered by this License. | |
249 | Section 6 states terms for distribution of such executables. | |
250 | ||
251 | When a "work that uses the Library" uses material from a header file | |
252 | that is part of the Library, the object code for the work may be a | |
253 | derivative work of the Library even though the source code is not. | |
254 | Whether this is true is especially significant if the work can be | |
255 | linked without the Library, or if the work is itself a library. The | |
256 | threshold for this to be true is not precisely defined by law. | |
257 | ||
258 | If such an object file uses only numerical parameters, data | |
259 | structure layouts and accessors, and small macros and small inline | |
260 | functions (ten lines or less in length), then the use of the object | |
261 | file is unrestricted, regardless of whether it is legally a derivative | |
262 | work. (Executables containing this object code plus portions of the | |
263 | Library will still fall under Section 6.) | |
264 | ||
265 | Otherwise, if the work is a derivative of the Library, you may | |
266 | distribute the object code for the work under the terms of Section 6. | |
267 | Any executables containing that work also fall under Section 6, | |
268 | whether or not they are linked directly with the Library itself. | |
269 | ||
270 | 6. As an exception to the Sections above, you may also combine or | |
271 | link a "work that uses the Library" with the Library to produce a | |
272 | work containing portions of the Library, and distribute that work | |
273 | under terms of your choice, provided that the terms permit | |
274 | modification of the work for the customer's own use and reverse | |
275 | engineering for debugging such modifications. | |
276 | ||
277 | You must give prominent notice with each copy of the work that the | |
278 | Library is used in it and that the Library and its use are covered by | |
279 | this License. You must supply a copy of this License. If the work | |
280 | during execution displays copyright notices, you must include the | |
281 | copyright notice for the Library among them, as well as a reference | |
282 | directing the user to the copy of this License. Also, you must do one | |
283 | of these things: | |
284 | ||
285 | a) Accompany the work with the complete corresponding | |
286 | machine-readable source code for the Library including whatever | |
287 | changes were used in the work (which must be distributed under | |
288 | Sections 1 and 2 above); and, if the work is an executable linked | |
289 | with the Library, with the complete machine-readable "work that | |
290 | uses the Library", as object code and/or source code, so that the | |
291 | user can modify the Library and then relink to produce a modified | |
292 | executable containing the modified Library. (It is understood | |
293 | that the user who changes the contents of definitions files in the | |
294 | Library will not necessarily be able to recompile the application | |
295 | to use the modified definitions.) | |
296 | ||
297 | b) Use a suitable shared library mechanism for linking with the | |
298 | Library. A suitable mechanism is one that (1) uses at run time a | |
299 | copy of the library already present on the user's computer system, | |
300 | rather than copying library functions into the executable, and (2) | |
301 | will operate properly with a modified version of the library, if | |
302 | the user installs one, as long as the modified version is | |
303 | interface-compatible with the version that the work was made with. | |
304 | ||
305 | c) Accompany the work with a written offer, valid for at | |
306 | least three years, to give the same user the materials | |
307 | specified in Subsection 6a, above, for a charge no more | |
308 | than the cost of performing this distribution. | |
309 | ||
310 | d) If distribution of the work is made by offering access to copy | |
311 | from a designated place, offer equivalent access to copy the above | |
312 | specified materials from the same place. | |
313 | ||
314 | e) Verify that the user has already received a copy of these | |
315 | materials or that you have already sent this user a copy. | |
316 | ||
317 | For an executable, the required form of the "work that uses the | |
318 | Library" must include any data and utility programs needed for | |
319 | reproducing the executable from it. However, as a special exception, | |
320 | the materials to be distributed need not include anything that is | |
321 | normally distributed (in either source or binary form) with the major | |
322 | components (compiler, kernel, and so on) of the operating system on | |
323 | which the executable runs, unless that component itself accompanies | |
324 | the executable. | |
325 | ||
326 | It may happen that this requirement contradicts the license | |
327 | restrictions of other proprietary libraries that do not normally | |
328 | accompany the operating system. Such a contradiction means you cannot | |
329 | use both them and the Library together in an executable that you | |
330 | distribute. | |
331 | ||
332 | 7. You may place library facilities that are a work based on the | |
333 | Library side-by-side in a single library together with other library | |
334 | facilities not covered by this License, and distribute such a combined | |
335 | library, provided that the separate distribution of the work based on | |
336 | the Library and of the other library facilities is otherwise | |
337 | permitted, and provided that you do these two things: | |
338 | ||
339 | a) Accompany the combined library with a copy of the same work | |
340 | based on the Library, uncombined with any other library | |
341 | facilities. This must be distributed under the terms of the | |
342 | Sections above. | |
343 | ||
344 | b) Give prominent notice with the combined library of the fact | |
345 | that part of it is a work based on the Library, and explaining | |
346 | where to find the accompanying uncombined form of the same work. | |
347 | ||
348 | 8. You may not copy, modify, sublicense, link with, or distribute | |
349 | the Library except as expressly provided under this License. Any | |
350 | attempt otherwise to copy, modify, sublicense, link with, or | |
351 | distribute the Library is void, and will automatically terminate your | |
352 | rights under this License. However, parties who have received copies, | |
353 | or rights, from you under this License will not have their licenses | |
354 | terminated so long as such parties remain in full compliance. | |
355 | ||
356 | 9. You are not required to accept this License, since you have not | |
357 | signed it. However, nothing else grants you permission to modify or | |
358 | distribute the Library or its derivative works. These actions are | |
359 | prohibited by law if you do not accept this License. Therefore, by | |
360 | modifying or distributing the Library (or any work based on the | |
361 | Library), you indicate your acceptance of this License to do so, and | |
362 | all its terms and conditions for copying, distributing or modifying | |
363 | the Library or works based on it. | |
364 | ||
365 | 10. Each time you redistribute the Library (or any work based on the | |
366 | Library), the recipient automatically receives a license from the | |
367 | original licensor to copy, distribute, link with or modify the Library | |
368 | subject to these terms and conditions. You may not impose any further | |
369 | restrictions on the recipients' exercise of the rights granted herein. | |
370 | You are not responsible for enforcing compliance by third parties with | |
371 | this License. | |
372 | ||
373 | 11. If, as a consequence of a court judgment or allegation of patent | |
374 | infringement or for any other reason (not limited to patent issues), | |
375 | conditions are imposed on you (whether by court order, agreement or | |
376 | otherwise) that contradict the conditions of this License, they do not | |
377 | excuse you from the conditions of this License. If you cannot | |
378 | distribute so as to satisfy simultaneously your obligations under this | |
379 | License and any other pertinent obligations, then as a consequence you | |
380 | may not distribute the Library at all. For example, if a patent | |
381 | license would not permit royalty-free redistribution of the Library by | |
382 | all those who receive copies directly or indirectly through you, then | |
383 | the only way you could satisfy both it and this License would be to | |
384 | refrain entirely from distribution of the Library. | |
385 | ||
386 | If any portion of this section is held invalid or unenforceable under any | |
387 | particular circumstance, the balance of the section is intended to apply, | |
388 | and the section as a whole is intended to apply in other circumstances. | |
389 | ||
390 | It is not the purpose of this section to induce you to infringe any | |
391 | patents or other property right claims or to contest validity of any | |
392 | such claims; this section has the sole purpose of protecting the | |
393 | integrity of the free software distribution system which is | |
394 | implemented by public license practices. Many people have made | |
395 | generous contributions to the wide range of software distributed | |
396 | through that system in reliance on consistent application of that | |
397 | system; it is up to the author/donor to decide if he or she is willing | |
398 | to distribute software through any other system and a licensee cannot | |
399 | impose that choice. | |
400 | ||
401 | This section is intended to make thoroughly clear what is believed to | |
402 | be a consequence of the rest of this License. | |
403 | ||
404 | 12. If the distribution and/or use of the Library is restricted in | |
405 | certain countries either by patents or by copyrighted interfaces, the | |
406 | original copyright holder who places the Library under this License may add | |
407 | an explicit geographical distribution limitation excluding those countries, | |
408 | so that distribution is permitted only in or among countries not thus | |
409 | excluded. In such case, this License incorporates the limitation as if | |
410 | written in the body of this License. | |
411 | ||
412 | 13. The Free Software Foundation may publish revised and/or new | |
413 | versions of the Lesser General Public License from time to time. | |
414 | Such new versions will be similar in spirit to the present version, | |
415 | but may differ in detail to address new problems or concerns. | |
416 | ||
417 | Each version is given a distinguishing version number. If the Library | |
418 | specifies a version number of this License which applies to it and | |
419 | "any later version", you have the option of following the terms and | |
420 | conditions either of that version or of any later version published by | |
421 | the Free Software Foundation. If the Library does not specify a | |
422 | license version number, you may choose any version ever published by | |
423 | the Free Software Foundation. | |
424 | ||
425 | 14. If you wish to incorporate parts of the Library into other free | |
426 | programs whose distribution conditions are incompatible with these, | |
427 | write to the author to ask for permission. For software which is | |
428 | copyrighted by the Free Software Foundation, write to the Free | |
429 | Software Foundation; we sometimes make exceptions for this. Our | |
430 | decision will be guided by the two goals of preserving the free status | |
431 | of all derivatives of our free software and of promoting the sharing | |
432 | and reuse of software generally. | |
433 | ||
434 | NO WARRANTY | |
435 | ||
436 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | |
437 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | |
438 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | |
439 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | |
440 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | |
441 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
442 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | |
443 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | |
444 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |
445 | ||
446 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | |
447 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | |
448 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | |
449 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | |
450 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | |
451 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | |
452 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | |
453 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | |
454 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | |
455 | DAMAGES. | |
456 | ||
457 | END OF TERMS AND CONDITIONS | |
458 | ||
459 | How to Apply These Terms to Your New Libraries | |
460 | ||
461 | If you develop a new library, and you want it to be of the greatest | |
462 | possible use to the public, we recommend making it free software that | |
463 | everyone can redistribute and change. You can do so by permitting | |
464 | redistribution under these terms (or, alternatively, under the terms of the | |
465 | ordinary General Public License). | |
466 | ||
467 | To apply these terms, attach the following notices to the library. It is | |
468 | safest to attach them to the start of each source file to most effectively | |
469 | convey the exclusion of warranty; and each file should have at least the | |
470 | "copyright" line and a pointer to where the full notice is found. | |
471 | ||
472 | <one line to give the library's name and a brief idea of what it does.> | |
473 | Copyright (C) <year> <name of author> | |
474 | ||
475 | This library is free software; you can redistribute it and/or | |
476 | modify it under the terms of the GNU Lesser General Public | |
477 | License as published by the Free Software Foundation; either | |
478 | version 2.1 of the License, or (at your option) any later version. | |
479 | ||
480 | This library is distributed in the hope that it will be useful, | |
481 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
482 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
483 | Lesser General Public License for more details. | |
484 | ||
485 | You should have received a copy of the GNU Lesser General Public | |
486 | License along with this library; if not, write to the Free Software | |
487 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
488 | ||
489 | Also add information on how to contact you by electronic and paper mail. | |
490 | ||
491 | You should also get your employer (if you work as a programmer) or your | |
492 | school, if any, to sign a "copyright disclaimer" for the library, if | |
493 | necessary. Here is a sample; alter the names: | |
494 | ||
495 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | |
496 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. | |
497 | ||
498 | <signature of Ty Coon>, 1 April 1990 | |
499 | Ty Coon, President of Vice | |
500 | ||
501 | That's all there is to it! |
0 | This program is free software. You may use, redistribute and/or modify it | |
1 | under the terms of either GPL 2.0+ or LGPL 2.1+. | |
0 | GNU LESSER GENERAL PUBLIC LICENSE | |
1 | Version 2.1, February 1999 | |
2 | ||
3 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. | |
4 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
5 | Everyone is permitted to copy and distribute verbatim copies | |
6 | of this license document, but changing it is not allowed. | |
7 | ||
8 | [This is the first released version of the Lesser GPL. It also counts | |
9 | as the successor of the GNU Library Public License, version 2, hence | |
10 | the version number 2.1.] | |
11 | ||
12 | Preamble | |
13 | ||
14 | The licenses for most software are designed to take away your | |
15 | freedom to share and change it. By contrast, the GNU General Public | |
16 | Licenses are intended to guarantee your freedom to share and change | |
17 | free software--to make sure the software is free for all its users. | |
18 | ||
19 | This license, the Lesser General Public License, applies to some | |
20 | specially designated software packages--typically libraries--of the | |
21 | Free Software Foundation and other authors who decide to use it. You | |
22 | can use it too, but we suggest you first think carefully about whether | |
23 | this license or the ordinary General Public License is the better | |
24 | strategy to use in any particular case, based on the explanations below. | |
25 | ||
26 | When we speak of free software, we are referring to freedom of use, | |
27 | not price. Our General Public Licenses are designed to make sure that | |
28 | you have the freedom to distribute copies of free software (and charge | |
29 | for this service if you wish); that you receive source code or can get | |
30 | it if you want it; that you can change the software and use pieces of | |
31 | it in new free programs; and that you are informed that you can do | |
32 | these things. | |
33 | ||
34 | To protect your rights, we need to make restrictions that forbid | |
35 | distributors to deny you these rights or to ask you to surrender these | |
36 | rights. These restrictions translate to certain responsibilities for | |
37 | you if you distribute copies of the library or if you modify it. | |
38 | ||
39 | For example, if you distribute copies of the library, whether gratis | |
40 | or for a fee, you must give the recipients all the rights that we gave | |
41 | you. You must make sure that they, too, receive or can get the source | |
42 | code. If you link other code with the library, you must provide | |
43 | complete object files to the recipients, so that they can relink them | |
44 | with the library after making changes to the library and recompiling | |
45 | it. And you must show them these terms so they know their rights. | |
46 | ||
47 | We protect your rights with a two-step method: (1) we copyright the | |
48 | library, and (2) we offer you this license, which gives you legal | |
49 | permission to copy, distribute and/or modify the library. | |
50 | ||
51 | To protect each distributor, we want to make it very clear that | |
52 | there is no warranty for the free library. Also, if the library is | |
53 | modified by someone else and passed on, the recipients should know | |
54 | that what they have is not the original version, so that the original | |
55 | author's reputation will not be affected by problems that might be | |
56 | introduced by others. | |
57 | ||
58 | Finally, software patents pose a constant threat to the existence of | |
59 | any free program. We wish to make sure that a company cannot | |
60 | effectively restrict the users of a free program by obtaining a | |
61 | restrictive license from a patent holder. Therefore, we insist that | |
62 | any patent license obtained for a version of the library must be | |
63 | consistent with the full freedom of use specified in this license. | |
64 | ||
65 | Most GNU software, including some libraries, is covered by the | |
66 | ordinary GNU General Public License. This license, the GNU Lesser | |
67 | General Public License, applies to certain designated libraries, and | |
68 | is quite different from the ordinary General Public License. We use | |
69 | this license for certain libraries in order to permit linking those | |
70 | libraries into non-free programs. | |
71 | ||
72 | When a program is linked with a library, whether statically or using | |
73 | a shared library, the combination of the two is legally speaking a | |
74 | combined work, a derivative of the original library. The ordinary | |
75 | General Public License therefore permits such linking only if the | |
76 | entire combination fits its criteria of freedom. The Lesser General | |
77 | Public License permits more lax criteria for linking other code with | |
78 | the library. | |
79 | ||
80 | We call this license the "Lesser" General Public License because it | |
81 | does Less to protect the user's freedom than the ordinary General | |
82 | Public License. It also provides other free software developers Less | |
83 | of an advantage over competing non-free programs. These disadvantages | |
84 | are the reason we use the ordinary General Public License for many | |
85 | libraries. However, the Lesser license provides advantages in certain | |
86 | special circumstances. | |
87 | ||
88 | For example, on rare occasions, there may be a special need to | |
89 | encourage the widest possible use of a certain library, so that it becomes | |
90 | a de-facto standard. To achieve this, non-free programs must be | |
91 | allowed to use the library. A more frequent case is that a free | |
92 | library does the same job as widely used non-free libraries. In this | |
93 | case, there is little to gain by limiting the free library to free | |
94 | software only, so we use the Lesser General Public License. | |
95 | ||
96 | In other cases, permission to use a particular library in non-free | |
97 | programs enables a greater number of people to use a large body of | |
98 | free software. For example, permission to use the GNU C Library in | |
99 | non-free programs enables many more people to use the whole GNU | |
100 | operating system, as well as its variant, the GNU/Linux operating | |
101 | system. | |
102 | ||
103 | Although the Lesser General Public License is Less protective of the | |
104 | users' freedom, it does ensure that the user of a program that is | |
105 | linked with the Library has the freedom and the wherewithal to run | |
106 | that program using a modified version of the Library. | |
107 | ||
108 | The precise terms and conditions for copying, distribution and | |
109 | modification follow. Pay close attention to the difference between a | |
110 | "work based on the library" and a "work that uses the library". The | |
111 | former contains code derived from the library, whereas the latter must | |
112 | be combined with the library in order to run. | |
113 | ||
114 | GNU LESSER GENERAL PUBLIC LICENSE | |
115 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
116 | ||
117 | 0. This License Agreement applies to any software library or other | |
118 | program which contains a notice placed by the copyright holder or | |
119 | other authorized party saying it may be distributed under the terms of | |
120 | this Lesser General Public License (also called "this License"). | |
121 | Each licensee is addressed as "you". | |
122 | ||
123 | A "library" means a collection of software functions and/or data | |
124 | prepared so as to be conveniently linked with application programs | |
125 | (which use some of those functions and data) to form executables. | |
126 | ||
127 | The "Library", below, refers to any such software library or work | |
128 | which has been distributed under these terms. A "work based on the | |
129 | Library" means either the Library or any derivative work under | |
130 | copyright law: that is to say, a work containing the Library or a | |
131 | portion of it, either verbatim or with modifications and/or translated | |
132 | straightforwardly into another language. (Hereinafter, translation is | |
133 | included without limitation in the term "modification".) | |
134 | ||
135 | "Source code" for a work means the preferred form of the work for | |
136 | making modifications to it. For a library, complete source code means | |
137 | all the source code for all modules it contains, plus any associated | |
138 | interface definition files, plus the scripts used to control compilation | |
139 | and installation of the library. | |
140 | ||
141 | Activities other than copying, distribution and modification are not | |
142 | covered by this License; they are outside its scope. The act of | |
143 | running a program using the Library is not restricted, and output from | |
144 | such a program is covered only if its contents constitute a work based | |
145 | on the Library (independent of the use of the Library in a tool for | |
146 | writing it). Whether that is true depends on what the Library does | |
147 | and what the program that uses the Library does. | |
148 | ||
149 | 1. You may copy and distribute verbatim copies of the Library's | |
150 | complete source code as you receive it, in any medium, provided that | |
151 | you conspicuously and appropriately publish on each copy an | |
152 | appropriate copyright notice and disclaimer of warranty; keep intact | |
153 | all the notices that refer to this License and to the absence of any | |
154 | warranty; and distribute a copy of this License along with the | |
155 | Library. | |
156 | ||
157 | You may charge a fee for the physical act of transferring a copy, | |
158 | and you may at your option offer warranty protection in exchange for a | |
159 | fee. | |
160 | ||
161 | 2. You may modify your copy or copies of the Library or any portion | |
162 | of it, thus forming a work based on the Library, and copy and | |
163 | distribute such modifications or work under the terms of Section 1 | |
164 | above, provided that you also meet all of these conditions: | |
165 | ||
166 | a) The modified work must itself be a software library. | |
167 | ||
168 | b) You must cause the files modified to carry prominent notices | |
169 | stating that you changed the files and the date of any change. | |
170 | ||
171 | c) You must cause the whole of the work to be licensed at no | |
172 | charge to all third parties under the terms of this License. | |
173 | ||
174 | d) If a facility in the modified Library refers to a function or a | |
175 | table of data to be supplied by an application program that uses | |
176 | the facility, other than as an argument passed when the facility | |
177 | is invoked, then you must make a good faith effort to ensure that, | |
178 | in the event an application does not supply such function or | |
179 | table, the facility still operates, and performs whatever part of | |
180 | its purpose remains meaningful. | |
181 | ||
182 | (For example, a function in a library to compute square roots has | |
183 | a purpose that is entirely well-defined independent of the | |
184 | application. Therefore, Subsection 2d requires that any | |
185 | application-supplied function or table used by this function must | |
186 | be optional: if the application does not supply it, the square | |
187 | root function must still compute square roots.) | |
188 | ||
189 | These requirements apply to the modified work as a whole. If | |
190 | identifiable sections of that work are not derived from the Library, | |
191 | and can be reasonably considered independent and separate works in | |
192 | themselves, then this License, and its terms, do not apply to those | |
193 | sections when you distribute them as separate works. But when you | |
194 | distribute the same sections as part of a whole which is a work based | |
195 | on the Library, the distribution of the whole must be on the terms of | |
196 | this License, whose permissions for other licensees extend to the | |
197 | entire whole, and thus to each and every part regardless of who wrote | |
198 | it. | |
199 | ||
200 | Thus, it is not the intent of this section to claim rights or contest | |
201 | your rights to work written entirely by you; rather, the intent is to | |
202 | exercise the right to control the distribution of derivative or | |
203 | collective works based on the Library. | |
204 | ||
205 | In addition, mere aggregation of another work not based on the Library | |
206 | with the Library (or with a work based on the Library) on a volume of | |
207 | a storage or distribution medium does not bring the other work under | |
208 | the scope of this License. | |
209 | ||
210 | 3. You may opt to apply the terms of the ordinary GNU General Public | |
211 | License instead of this License to a given copy of the Library. To do | |
212 | this, you must alter all the notices that refer to this License, so | |
213 | that they refer to the ordinary GNU General Public License, version 2, | |
214 | instead of to this License. (If a newer version than version 2 of the | |
215 | ordinary GNU General Public License has appeared, then you can specify | |
216 | that version instead if you wish.) Do not make any other change in | |
217 | these notices. | |
218 | ||
219 | Once this change is made in a given copy, it is irreversible for | |
220 | that copy, so the ordinary GNU General Public License applies to all | |
221 | subsequent copies and derivative works made from that copy. | |
222 | ||
223 | This option is useful when you wish to copy part of the code of | |
224 | the Library into a program that is not a library. | |
225 | ||
226 | 4. You may copy and distribute the Library (or a portion or | |
227 | derivative of it, under Section 2) in object code or executable form | |
228 | under the terms of Sections 1 and 2 above provided that you accompany | |
229 | it with the complete corresponding machine-readable source code, which | |
230 | must be distributed under the terms of Sections 1 and 2 above on a | |
231 | medium customarily used for software interchange. | |
232 | ||
233 | If distribution of object code is made by offering access to copy | |
234 | from a designated place, then offering equivalent access to copy the | |
235 | source code from the same place satisfies the requirement to | |
236 | distribute the source code, even though third parties are not | |
237 | compelled to copy the source along with the object code. | |
238 | ||
239 | 5. A program that contains no derivative of any portion of the | |
240 | Library, but is designed to work with the Library by being compiled or | |
241 | linked with it, is called a "work that uses the Library". Such a | |
242 | work, in isolation, is not a derivative work of the Library, and | |
243 | therefore falls outside the scope of this License. | |
244 | ||
245 | However, linking a "work that uses the Library" with the Library | |
246 | creates an executable that is a derivative of the Library (because it | |
247 | contains portions of the Library), rather than a "work that uses the | |
248 | library". The executable is therefore covered by this License. | |
249 | Section 6 states terms for distribution of such executables. | |
250 | ||
251 | When a "work that uses the Library" uses material from a header file | |
252 | that is part of the Library, the object code for the work may be a | |
253 | derivative work of the Library even though the source code is not. | |
254 | Whether this is true is especially significant if the work can be | |
255 | linked without the Library, or if the work is itself a library. The | |
256 | threshold for this to be true is not precisely defined by law. | |
257 | ||
258 | If such an object file uses only numerical parameters, data | |
259 | structure layouts and accessors, and small macros and small inline | |
260 | functions (ten lines or less in length), then the use of the object | |
261 | file is unrestricted, regardless of whether it is legally a derivative | |
262 | work. (Executables containing this object code plus portions of the | |
263 | Library will still fall under Section 6.) | |
264 | ||
265 | Otherwise, if the work is a derivative of the Library, you may | |
266 | distribute the object code for the work under the terms of Section 6. | |
267 | Any executables containing that work also fall under Section 6, | |
268 | whether or not they are linked directly with the Library itself. | |
269 | ||
270 | 6. As an exception to the Sections above, you may also combine or | |
271 | link a "work that uses the Library" with the Library to produce a | |
272 | work containing portions of the Library, and distribute that work | |
273 | under terms of your choice, provided that the terms permit | |
274 | modification of the work for the customer's own use and reverse | |
275 | engineering for debugging such modifications. | |
276 | ||
277 | You must give prominent notice with each copy of the work that the | |
278 | Library is used in it and that the Library and its use are covered by | |
279 | this License. You must supply a copy of this License. If the work | |
280 | during execution displays copyright notices, you must include the | |
281 | copyright notice for the Library among them, as well as a reference | |
282 | directing the user to the copy of this License. Also, you must do one | |
283 | of these things: | |
284 | ||
285 | a) Accompany the work with the complete corresponding | |
286 | machine-readable source code for the Library including whatever | |
287 | changes were used in the work (which must be distributed under | |
288 | Sections 1 and 2 above); and, if the work is an executable linked | |
289 | with the Library, with the complete machine-readable "work that | |
290 | uses the Library", as object code and/or source code, so that the | |
291 | user can modify the Library and then relink to produce a modified | |
292 | executable containing the modified Library. (It is understood | |
293 | that the user who changes the contents of definitions files in the | |
294 | Library will not necessarily be able to recompile the application | |
295 | to use the modified definitions.) | |
296 | ||
297 | b) Use a suitable shared library mechanism for linking with the | |
298 | Library. A suitable mechanism is one that (1) uses at run time a | |
299 | copy of the library already present on the user's computer system, | |
300 | rather than copying library functions into the executable, and (2) | |
301 | will operate properly with a modified version of the library, if | |
302 | the user installs one, as long as the modified version is | |
303 | interface-compatible with the version that the work was made with. | |
304 | ||
305 | c) Accompany the work with a written offer, valid for at | |
306 | least three years, to give the same user the materials | |
307 | specified in Subsection 6a, above, for a charge no more | |
308 | than the cost of performing this distribution. | |
309 | ||
310 | d) If distribution of the work is made by offering access to copy | |
311 | from a designated place, offer equivalent access to copy the above | |
312 | specified materials from the same place. | |
313 | ||
314 | e) Verify that the user has already received a copy of these | |
315 | materials or that you have already sent this user a copy. | |
316 | ||
317 | For an executable, the required form of the "work that uses the | |
318 | Library" must include any data and utility programs needed for | |
319 | reproducing the executable from it. However, as a special exception, | |
320 | the materials to be distributed need not include anything that is | |
321 | normally distributed (in either source or binary form) with the major | |
322 | components (compiler, kernel, and so on) of the operating system on | |
323 | which the executable runs, unless that component itself accompanies | |
324 | the executable. | |
325 | ||
326 | It may happen that this requirement contradicts the license | |
327 | restrictions of other proprietary libraries that do not normally | |
328 | accompany the operating system. Such a contradiction means you cannot | |
329 | use both them and the Library together in an executable that you | |
330 | distribute. | |
331 | ||
332 | 7. You may place library facilities that are a work based on the | |
333 | Library side-by-side in a single library together with other library | |
334 | facilities not covered by this License, and distribute such a combined | |
335 | library, provided that the separate distribution of the work based on | |
336 | the Library and of the other library facilities is otherwise | |
337 | permitted, and provided that you do these two things: | |
338 | ||
339 | a) Accompany the combined library with a copy of the same work | |
340 | based on the Library, uncombined with any other library | |
341 | facilities. This must be distributed under the terms of the | |
342 | Sections above. | |
343 | ||
344 | b) Give prominent notice with the combined library of the fact | |
345 | that part of it is a work based on the Library, and explaining | |
346 | where to find the accompanying uncombined form of the same work. | |
347 | ||
348 | 8. You may not copy, modify, sublicense, link with, or distribute | |
349 | the Library except as expressly provided under this License. Any | |
350 | attempt otherwise to copy, modify, sublicense, link with, or | |
351 | distribute the Library is void, and will automatically terminate your | |
352 | rights under this License. However, parties who have received copies, | |
353 | or rights, from you under this License will not have their licenses | |
354 | terminated so long as such parties remain in full compliance. | |
355 | ||
356 | 9. You are not required to accept this License, since you have not | |
357 | signed it. However, nothing else grants you permission to modify or | |
358 | distribute the Library or its derivative works. These actions are | |
359 | prohibited by law if you do not accept this License. Therefore, by | |
360 | modifying or distributing the Library (or any work based on the | |
361 | Library), you indicate your acceptance of this License to do so, and | |
362 | all its terms and conditions for copying, distributing or modifying | |
363 | the Library or works based on it. | |
364 | ||
365 | 10. Each time you redistribute the Library (or any work based on the | |
366 | Library), the recipient automatically receives a license from the | |
367 | original licensor to copy, distribute, link with or modify the Library | |
368 | subject to these terms and conditions. You may not impose any further | |
369 | restrictions on the recipients' exercise of the rights granted herein. | |
370 | You are not responsible for enforcing compliance by third parties with | |
371 | this License. | |
372 | ||
373 | 11. If, as a consequence of a court judgment or allegation of patent | |
374 | infringement or for any other reason (not limited to patent issues), | |
375 | conditions are imposed on you (whether by court order, agreement or | |
376 | otherwise) that contradict the conditions of this License, they do not | |
377 | excuse you from the conditions of this License. If you cannot | |
378 | distribute so as to satisfy simultaneously your obligations under this | |
379 | License and any other pertinent obligations, then as a consequence you | |
380 | may not distribute the Library at all. For example, if a patent | |
381 | license would not permit royalty-free redistribution of the Library by | |
382 | all those who receive copies directly or indirectly through you, then | |
383 | the only way you could satisfy both it and this License would be to | |
384 | refrain entirely from distribution of the Library. | |
385 | ||
386 | If any portion of this section is held invalid or unenforceable under any | |
387 | particular circumstance, the balance of the section is intended to apply, | |
388 | and the section as a whole is intended to apply in other circumstances. | |
389 | ||
390 | It is not the purpose of this section to induce you to infringe any | |
391 | patents or other property right claims or to contest validity of any | |
392 | such claims; this section has the sole purpose of protecting the | |
393 | integrity of the free software distribution system which is | |
394 | implemented by public license practices. Many people have made | |
395 | generous contributions to the wide range of software distributed | |
396 | through that system in reliance on consistent application of that | |
397 | system; it is up to the author/donor to decide if he or she is willing | |
398 | to distribute software through any other system and a licensee cannot | |
399 | impose that choice. | |
400 | ||
401 | This section is intended to make thoroughly clear what is believed to | |
402 | be a consequence of the rest of this License. | |
403 | ||
404 | 12. If the distribution and/or use of the Library is restricted in | |
405 | certain countries either by patents or by copyrighted interfaces, the | |
406 | original copyright holder who places the Library under this License may add | |
407 | an explicit geographical distribution limitation excluding those countries, | |
408 | so that distribution is permitted only in or among countries not thus | |
409 | excluded. In such case, this License incorporates the limitation as if | |
410 | written in the body of this License. | |
411 | ||
412 | 13. The Free Software Foundation may publish revised and/or new | |
413 | versions of the Lesser General Public License from time to time. | |
414 | Such new versions will be similar in spirit to the present version, | |
415 | but may differ in detail to address new problems or concerns. | |
416 | ||
417 | Each version is given a distinguishing version number. If the Library | |
418 | specifies a version number of this License which applies to it and | |
419 | "any later version", you have the option of following the terms and | |
420 | conditions either of that version or of any later version published by | |
421 | the Free Software Foundation. If the Library does not specify a | |
422 | license version number, you may choose any version ever published by | |
423 | the Free Software Foundation. | |
424 | ||
425 | 14. If you wish to incorporate parts of the Library into other free | |
426 | programs whose distribution conditions are incompatible with these, | |
427 | write to the author to ask for permission. For software which is | |
428 | copyrighted by the Free Software Foundation, write to the Free | |
429 | Software Foundation; we sometimes make exceptions for this. Our | |
430 | decision will be guided by the two goals of preserving the free status | |
431 | of all derivatives of our free software and of promoting the sharing | |
432 | and reuse of software generally. | |
433 | ||
434 | NO WARRANTY | |
435 | ||
436 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | |
437 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | |
438 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | |
439 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | |
440 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | |
441 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
442 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | |
443 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | |
444 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |
445 | ||
446 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | |
447 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | |
448 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | |
449 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | |
450 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | |
451 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | |
452 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | |
453 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | |
454 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | |
455 | DAMAGES. | |
456 | ||
457 | END OF TERMS AND CONDITIONS | |
458 | ||
459 | How to Apply These Terms to Your New Libraries | |
460 | ||
461 | If you develop a new library, and you want it to be of the greatest | |
462 | possible use to the public, we recommend making it free software that | |
463 | everyone can redistribute and change. You can do so by permitting | |
464 | redistribution under these terms (or, alternatively, under the terms of the | |
465 | ordinary General Public License). | |
466 | ||
467 | To apply these terms, attach the following notices to the library. It is | |
468 | safest to attach them to the start of each source file to most effectively | |
469 | convey the exclusion of warranty; and each file should have at least the | |
470 | "copyright" line and a pointer to where the full notice is found. | |
471 | ||
472 | <one line to give the library's name and a brief idea of what it does.> | |
473 | Copyright (C) <year> <name of author> | |
474 | ||
475 | This library is free software; you can redistribute it and/or | |
476 | modify it under the terms of the GNU Lesser General Public | |
477 | License as published by the Free Software Foundation; either | |
478 | version 2.1 of the License, or (at your option) any later version. | |
479 | ||
480 | This library is distributed in the hope that it will be useful, | |
481 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
482 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
483 | Lesser General Public License for more details. | |
484 | ||
485 | You should have received a copy of the GNU Lesser General Public | |
486 | License along with this library; if not, write to the Free Software | |
487 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
488 | ||
489 | Also add information on how to contact you by electronic and paper mail. | |
490 | ||
491 | You should also get your employer (if you work as a programmer) or your | |
492 | school, if any, to sign a "copyright disclaimer" for the library, if | |
493 | necessary. Here is a sample; alter the names: | |
494 | ||
495 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | |
496 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. | |
497 | ||
498 | <signature of Ty Coon>, 1 April 1990 | |
499 | Ty Coon, President of Vice | |
500 | ||
501 | That's all there is to it! |
0 | 0 | prefix ?= /usr |
1 | 1 | |
2 | .PHONY: install | |
2 | .PHONY: all | |
3 | ||
4 | all: | |
5 | echo "Nothing to build." | |
6 | ||
3 | 7 | install: |
4 | 8 | perl Makefile.pl -install -prefix "$(prefix)" |
5 | 9 | |
6 | 10 | uninstall: |
7 | 11 | perl Makefile.pl -remove -prefix "$(prefix)" |
12 | ||
13 | clean: | |
14 | echo "Nothing to clean up." |
2 | 2 | # Makefile for Java API Compliance Checker |
3 | 3 | # Install/remove the tool for GNU/Linux, FreeBSD and Mac OS X |
4 | 4 | # |
5 | # Copyright (C) 2011-2016 Andrey Ponomarenko's ABI Laboratory | |
5 | # Copyright (C) 2011-2018 Andrey Ponomarenko's ABI Laboratory | |
6 | 6 | # |
7 | 7 | # Written by Andrey Ponomarenko |
8 | 8 | # |
9 | # This program is free software: you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License or the GNU Lesser | |
11 | # General Public License as published by the Free Software Foundation. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
9 | # This library is free software; you can redistribute it and/or | |
10 | # modify it under the terms of the GNU Lesser General Public | |
11 | # License as published by the Free Software Foundation; either | |
12 | # version 2.1 of the License, or (at your option) any later version. | |
13 | # | |
14 | # This library is distributed in the hope that it will be useful, | |
14 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # and the GNU Lesser General Public License along with this program. | |
20 | # If not, see <http://www.gnu.org/licenses/>. | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | # Lesser General Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the GNU Lesser General Public | |
20 | # License along with this library; if not, write to the Free Software | |
21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
22 | # MA 02110-1301 USA. | |
21 | 23 | ########################################################################### |
22 | 24 | use strict; |
23 | 25 | use Getopt::Long; |
123 | 125 | print STDERR "ERROR: destdir is not absolute path\n"; |
124 | 126 | exit(1); |
125 | 127 | } |
126 | if(not -d $DESTDIR) | |
127 | { | |
128 | print STDERR "ERROR: you should create destdir directory first\n"; | |
129 | exit(1); | |
130 | } | |
131 | 128 | $PREFIX = $DESTDIR.$PREFIX; |
132 | if(not -d $PREFIX) | |
133 | { | |
134 | print STDERR "ERROR: you should create installation directory first (destdir + prefix):\n mkdir -p $PREFIX\n"; | |
135 | exit(1); | |
136 | } | |
137 | 129 | } |
138 | 130 | else |
139 | 131 | { |
142 | 134 | print STDERR "ERROR: prefix is not absolute path\n"; |
143 | 135 | exit(1); |
144 | 136 | } |
145 | if(not -d $PREFIX) | |
146 | { | |
147 | print STDERR "ERROR: you should create prefix directory first\n"; | |
137 | } | |
138 | ||
139 | if($Install) | |
140 | { | |
141 | if(not -d $PREFIX) { | |
142 | mkpath($PREFIX); | |
143 | } | |
144 | elsif(not -w $PREFIX) | |
145 | { | |
146 | print STDERR "ERROR: you should be root\n"; | |
148 | 147 | exit(1); |
149 | 148 | } |
150 | 149 | } |
157 | 156 | my $REL_PATH = catFile("..", "share", $TOOL_SNAME); |
158 | 157 | my $TOOL_PATH = catFile($EXE_PATH, $TOOL_SNAME); |
159 | 158 | |
160 | if(not -w $PREFIX) | |
161 | { | |
162 | print STDERR "ERROR: you should be root\n"; | |
163 | exit(1); | |
164 | } | |
165 | 159 | if($Remove) |
166 | 160 | { |
167 | 161 | if(-e $EXE_PATH."/".$TOOL_SNAME) |
211 | 205 | copyDir($ARCHIVE_DIR."/modules", $MODULES_PATH); |
212 | 206 | } |
213 | 207 | |
214 | # check PATH | |
215 | my $Warn = "WARNING: your PATH variable doesn't include \'$EXE_PATH\'\n"; | |
216 | ||
217 | if($Config{"osname"}=~/win/i) | |
218 | { | |
219 | if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/i) { | |
220 | print $Warn; | |
208 | if(not $DESTDIR) | |
209 | { # check PATH | |
210 | my $Warn = "WARNING: your PATH variable doesn't include \'$EXE_PATH\'\n"; | |
211 | ||
212 | if($Config{"osname"}=~/win/i) | |
213 | { | |
214 | if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/i) { | |
215 | print $Warn; | |
216 | } | |
221 | 217 | } |
222 | } | |
223 | else | |
224 | { | |
225 | if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/) { | |
226 | print $Warn; | |
218 | else | |
219 | { | |
220 | if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/) { | |
221 | print $Warn; | |
222 | } | |
227 | 223 | } |
228 | 224 | } |
229 | 225 | } |
0 | JAPICC 2.2 | |
0 | JAPICC 2.4 | |
1 | 1 | ========== |
2 | 2 | |
3 | 3 | NAME: |
7 | 7 | |
8 | 8 | The Scala language is supported since 1.7 version of the tool. |
9 | 9 | |
10 | The tool is developed by Andrey Ponomarenko: https://abi-laboratory.pro/ | |
10 | Java 9 is supported since 2.4 version of the tool. | |
11 | 11 | |
12 | 12 | The tool is a core of the Java API Tracker project: https://abi-laboratory.pro/java/tracker/ |
13 | 13 | |
20 | 20 | |
21 | 21 | USAGE: |
22 | 22 | japi-compliance-checker OLD.jar NEW.jar |
23 | ||
24 | USAGE (JAVA 9): | |
25 | japi-compliance-checker OLD.jmod NEW.jmod | |
23 | 26 | |
24 | 27 | API DUMPS: |
25 | 28 | japi-compliance-checker -dump LIB.jar -dump-path ./API.dump |
43 | 43 | <p/> |
44 | 44 | <br/> |
45 | 45 | |
46 | <b>Version 2.4 (January 20, 2018)</b><br/> | |
47 | <b>Improvements</b> | |
48 | <ul> | |
49 | <li> | |
50 | Support for Java 9 | |
51 | </li> | |
52 | <li> | |
53 | Check for changes in annotation elements | |
54 | </li> | |
55 | <li> | |
56 | Dump default values of annotation elements | |
57 | </li> | |
58 | <li> | |
59 | Added -non-impl option to specify interfaces that should not be implemented by users | |
60 | </li> | |
61 | <li> | |
62 | Added -non-impl-all option to tell the tool that all interfaces should not be implemented by users | |
63 | </li> | |
64 | <li> | |
65 | Added -check-annotations option to check for changes in annotation types like in other interfaces | |
66 | </li> | |
67 | <li> | |
68 | Added more regression tests | |
69 | </li> | |
70 | </ul> | |
71 | <b>Other</b> | |
72 | <ul> | |
73 | <li> | |
74 | Changed license to LGPL-2.1+ | |
75 | </li> | |
76 | <li> | |
77 | Bumped API dump version to 2.4 | |
78 | </li> | |
79 | </ul> | |
80 | <br/> | |
81 | ||
46 | 82 | <b>Version 2.3 (August 30, 2017)</b><br/> |
47 | 83 | <b>Bug Fixes</b> |
48 | 84 | <ul> |
63 | 63 | The <b>Scala</b> language is supported since <b>1.7</b> version of the tool. |
64 | 64 | |
65 | 65 | <p/> |
66 | <b>Java 9</b> is supported since <b>2.4</b> version of the tool. | |
67 | ||
68 | <p/> | |
66 | 69 | The tool is a core of the <a href='https://abi-laboratory.pro/java/tracker/'>Java API Tracker</a> project. |
67 | 70 | |
68 | 71 | <table class='summary'><tr><td> |
100 | 103 | |
101 | 104 | <a name="License"></a> |
102 | 105 | <h2>License</h2> |
103 | <p>This program is free software. You may use, redistribute and/or modify it under the terms of the <a href="http://www.gnu.org/licenses/">GNU GPL</a> or <a href="http://www.gnu.org/licenses/">GNU LGPL</a></p> | |
106 | <p>This program is free software. You may use, redistribute and/or modify it under the terms of the <a href="http://www.gnu.org/licenses/">GNU LGPL</a></p> | |
104 | 107 | |
105 | 108 | <a name="Supported_Platforms"></a> |
106 | 109 | <h2>Supported Platforms</h2> |
446 | 449 | |
447 | 450 | <ul> |
448 | 451 | <li> |
449 | <a href='http://wiki.eclipse.org/Evolving_Java-based_APIs_2'>“Evolving Java-based APIs: Achieving API Binary Compatibility”</a>, Jim des Rivières | |
452 | <a href='http://wiki.eclipse.org/Evolving_Java-based_APIs_2'>“Evolving Java-based APIs: Achieving API Binary Compatibility”</a>, Jim des Rivières | |
450 | 453 | </li> |
451 | 454 | <li> |
452 | 455 | <a href='http://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html'>“Binary Compatibility”</a>, Java Language Specification |
453 | 456 | </li> |
454 | 457 | <li> |
455 | <a href='https://blogs.oracle.com/darcy/entry/kinds_of_compatibility'> “Kinds of Compatibility: Source, Binary, and Behavioral”</a>, Joseph D. Darcy's Oracle Weblog | |
458 | <a href='http://danamlund.dk/backwards_compatibility_with_java_bytecode_editing.html'> “Backwards compatibility with Java bytecode editing”</a>, Dan Amlund Thomsen | |
459 | </li> | |
460 | <li> | |
461 | <a href='https://blogs.oracle.com/darcy/entry/kinds_of_compatibility'> “Kinds of Compatibility: Source, Binary, and Behavioral”</a>, Joseph D. Darcy's Oracle Weblog | |
456 | 462 | </li> |
457 | 463 | </ul> |
458 | 464 |
0 | 0 | #!/usr/bin/perl |
1 | ########################################################################### | |
2 | # Java API Compliance Checker (JAPICC) 2.3 | |
1 | ######################################################################### | |
2 | # Java API Compliance Checker (JAPICC) 2.4 | |
3 | 3 | # A tool for checking backward compatibility of a Java library API |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # Copyright (C) 2011-2017 Andrey Ponomarenko's ABI Laboratory | |
7 | # Copyright (C) 2011-2018 Andrey Ponomarenko's ABI Laboratory | |
8 | 8 | # |
9 | 9 | # PLATFORMS |
10 | 10 | # ========= |
13 | 13 | # REQUIREMENTS |
14 | 14 | # ============ |
15 | 15 | # Linux, FreeBSD, Mac OS X |
16 | # - JDK or OpenJDK - development files (javap, javac) | |
16 | # - JDK or OpenJDK - development files (javap, javac, jar, jmod) | |
17 | 17 | # - Perl 5 (5.8 or newer) |
18 | 18 | # |
19 | 19 | # MS Windows |
20 | # - JDK or OpenJDK (javap, javac) | |
20 | # - JDK or OpenJDK (javap, javac, jar, jmod) | |
21 | 21 | # - Active Perl 5 (5.8 or newer) |
22 | 22 | # |
23 | # This program is free software: you can redistribute it and/or modify | |
24 | # it under the terms of the GNU General Public License or the GNU Lesser | |
25 | # General Public License as published by the Free Software Foundation. | |
23 | # This library is free software; you can redistribute it and/or | |
24 | # modify it under the terms of the GNU Lesser General Public | |
25 | # License as published by the Free Software Foundation; either | |
26 | # version 2.1 of the License, or (at your option) any later version. | |
26 | 27 | # |
27 | # This program is distributed in the hope that it will be useful, | |
28 | # This library is distributed in the hope that it will be useful, | |
28 | 29 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
30 | # GNU General Public License for more details. | |
30 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
31 | # Lesser General Public License for more details. | |
31 | 32 | # |
32 | # You should have received a copy of the GNU General Public License | |
33 | # and the GNU Lesser General Public License along with this program. | |
34 | # If not, see <http://www.gnu.org/licenses/>. | |
35 | ########################################################################### | |
33 | # You should have received a copy of the GNU Lesser General Public | |
34 | # License along with this library; if not, write to the Free Software | |
35 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
36 | # MA 02110-1301 USA. | |
37 | ######################################################################### | |
36 | 38 | use Getopt::Long; |
37 | 39 | Getopt::Long::Configure ("posix_default", "no_ignore_case", "permute"); |
38 | 40 | use File::Path qw(mkpath rmtree); |
41 | 43 | use Cwd qw(abs_path cwd); |
42 | 44 | use Data::Dumper; |
43 | 45 | |
44 | my $TOOL_VERSION = "2.3"; | |
45 | my $API_DUMP_VERSION = "2.2"; | |
46 | my $TOOL_VERSION = "2.4"; | |
47 | my $API_DUMP_VERSION = "2.4"; | |
46 | 48 | my $API_DUMP_VERSION_MIN = "2.2"; |
47 | 49 | |
48 | 50 | # Internal modules |
76 | 78 | |
77 | 79 | my $ShortUsage = "Java API Compliance Checker (JAPICC) $TOOL_VERSION |
78 | 80 | A tool for checking backward compatibility of a Java library API |
79 | Copyright (C) 2017 Andrey Ponomarenko's ABI Laboratory | |
80 | License: GNU LGPL or GNU GPL | |
81 | Copyright (C) 2018 Andrey Ponomarenko's ABI Laboratory | |
82 | License: LGPLv2.1+ | |
81 | 83 | |
82 | 84 | Usage: $CmdName [options] |
83 | Example: $CmdName OLD.jar NEW.jar | |
85 | Example: | |
86 | $CmdName OLD.jar NEW.jar | |
87 | $CmdName OLD.jmod NEW.jmod | |
84 | 88 | |
85 | 89 | More info: $CmdName --help"; |
86 | 90 | |
108 | 112 | "skip-internal-packages|skip-internal=s" => \$In::Opt{"SkipInternalPackages"}, |
109 | 113 | "skip-internal-types=s" => \$In::Opt{"SkipInternalTypes"}, |
110 | 114 | "dump|dump-api=s" => \$In::Opt{"DumpAPI"}, |
115 | "check-annotations!" => \$In::Opt{"CheckAnnotations"}, | |
111 | 116 | "check-packages=s" => \$In::Opt{"CheckPackages"}, |
112 | 117 | "classes-list=s" => \$In::Opt{"ClassListPath"}, |
113 | 118 | "annotations-list=s" => \$In::Opt{"AnnotationsListPath"}, |
115 | 120 | "skip-deprecated!" => \$In::Opt{"SkipDeprecated"}, |
116 | 121 | "skip-classes=s" => \$In::Opt{"SkipClassesList"}, |
117 | 122 | "skip-packages=s" => \$In::Opt{"SkipPackagesList"}, |
123 | "non-impl=s" => \$In::Opt{"NonImplClassesList"}, | |
124 | "non-impl-all!" => \$In::Opt{"NonImplAll"}, | |
118 | 125 | "short" => \$In::Opt{"ShortMode"}, |
119 | 126 | "dump-path=s" => \$In::Opt{"OutputDumpPath"}, |
120 | 127 | "report-path=s" => \$In::Opt{"OutputReportPath"}, |
187 | 194 | versions. |
188 | 195 | |
189 | 196 | This tool is free software: you can redistribute it and/or modify it |
190 | under the terms of the GNU LGPL or GNU GPL. | |
197 | under the terms of the GNU LGPL. | |
191 | 198 | |
192 | 199 | USAGE: |
193 | 200 | $CmdName [options] |
194 | 201 | |
195 | EXAMPLE 1: | |
202 | EXAMPLE (1): | |
196 | 203 | $CmdName OLD.jar NEW.jar |
197 | 204 | |
198 | EXAMPLE 2: | |
205 | EXAMPLE (2): | |
206 | $CmdName OLD.jmod NEW.jmod | |
207 | ||
208 | EXAMPLE (3): | |
199 | 209 | $CmdName -lib NAME -old OLD.xml -new NEW.xml |
200 | 210 | OLD.xml and NEW.xml are XML-descriptors: |
201 | 211 | |
204 | 214 | </version> |
205 | 215 | |
206 | 216 | <archives> |
207 | /path1/to/JAR(s)/ | |
208 | /path2/to/JAR(s)/ | |
217 | /path1/to/JAR(s) OR JMOD(s)/ | |
218 | /path2/to/JAR(s) OR JMOD(s)/ | |
209 | 219 | ... |
210 | 220 | </archives> |
211 | 221 | |
227 | 237 | Descriptor of the 1st (old) library version. |
228 | 238 | It may be one of the following: |
229 | 239 | |
230 | 1. Java archive (*.jar) | |
240 | 1. Java archive (*.jar or *.jmod) | |
231 | 241 | 2. XML-descriptor (VERSION.xml file): |
232 | 242 | |
233 | 243 | <version> |
235 | 245 | </version> |
236 | 246 | |
237 | 247 | <archives> |
238 | /path1/to/JAR(s)/ | |
239 | /path2/to/JAR(s)/ | |
248 | /path1/to/JAR(s) OR JMOD(s)/ | |
249 | /path2/to/JAR(s) OR JMOD(s)/ | |
240 | 250 | ... |
241 | 251 | </archives> |
242 | 252 | |
244 | 254 | |
245 | 255 | 3. API dump generated by -dump option |
246 | 256 | |
247 | If you are using *.jar as a descriptor then you should | |
248 | specify version numbers with -v1 and -v2 options too. | |
249 | If version numbers are not specified then the tool will | |
250 | try to detect them automatically. | |
257 | If you are using *.jar or *.jmod as a descriptor then | |
258 | you should specify version numbers with -v1 and -v2 | |
259 | options too. If version numbers are not specified then | |
260 | the tool will try to detect them automatically. | |
251 | 261 | |
252 | 262 | -new|-d2 PATH |
253 | 263 | Descriptor of the 2nd (new) library version. |
302 | 312 | anywhere and pass instead of the descriptor. Also it may be used |
303 | 313 | for debugging the tool. PATH is the path to the Java archive or |
304 | 314 | XML descriptor of the library. |
315 | ||
316 | -check-annotations | |
317 | Check for changes in annotations like in any other interfaces. | |
305 | 318 | |
306 | 319 | -check-packages PATTERN |
307 | 320 | Check packages matched by the regular expression. Other packages |
323 | 336 | Skip analysis of deprecated methods and classes. |
324 | 337 | |
325 | 338 | -skip-classes PATH |
326 | This option allows to specify a file with a list | |
327 | of classes that should not be checked. | |
328 | ||
339 | List of classes that should not be checked. | |
340 | ||
329 | 341 | -skip-packages PATH |
330 | This option allows to specify a file with a list | |
331 | of packages that should not be checked. | |
332 | ||
342 | List of packages that should not be checked. | |
343 | ||
344 | -non-impl PATH | |
345 | List of interfaces that should not be implemented by users. | |
346 | ||
347 | -non-impl-all | |
348 | All interfaces should not be implemented by users. | |
349 | ||
333 | 350 | -short |
334 | 351 | Do not list added/removed methods. |
335 | 352 | |
803 | 820 | } |
804 | 821 | } |
805 | 822 | } |
823 | ||
824 | if(defined $Class1->{"Annotation"}) | |
825 | { | |
826 | my %AnnParam = (); | |
827 | foreach my $VN (1, 2) | |
828 | { | |
829 | foreach my $Method (keys(%{$Class_Methods{$VN}{$ClassName}})) | |
830 | { | |
831 | my $MInfo = $MethodInfo{$VN}{$Method}; | |
832 | $AnnParam{$VN}{$MInfo->{"ShortName"}} = {"Default"=>$MInfo->{"Default"}, "Return"=>getTypeName($MInfo->{"Return"}, $VN)}; | |
833 | } | |
834 | } | |
835 | foreach my $AParam (sort keys(%{$AnnParam{1}})) | |
836 | { | |
837 | my $R1 = $AnnParam{1}{$AParam}{"Return"}; | |
838 | my $D1 = $AnnParam{1}{$AParam}{"Default"}; | |
839 | ||
840 | if(defined $AnnParam{2}{$AParam}) | |
841 | { | |
842 | my $R2 = $AnnParam{2}{$AParam}{"Return"}; | |
843 | my $D2 = $AnnParam{2}{$AParam}{"Default"}; | |
844 | ||
845 | if($R1 ne $R2) | |
846 | { | |
847 | if($R1 eq "java.lang.String" and $R2 eq "java.lang.String[]") | |
848 | { | |
849 | %{$CompatProblems{".client_method"}{"Annotation_Element_Changed_Type_Safe"}{$AParam}} = ( | |
850 | "Type_Name"=>$ClassName, | |
851 | "Old_Value"=>$R1, | |
852 | "New_Value"=>$R2, | |
853 | "Target"=>$AParam); | |
854 | } | |
855 | else | |
856 | { | |
857 | %{$CompatProblems{".client_method"}{"Annotation_Element_Changed_Type"}{$AParam}} = ( | |
858 | "Type_Name"=>$ClassName, | |
859 | "Old_Value"=>$R1, | |
860 | "New_Value"=>$R2, | |
861 | "Target"=>$AParam); | |
862 | } | |
863 | } | |
864 | ||
865 | if(defined $D1 and not defined $D2) | |
866 | { | |
867 | %{$CompatProblems{".client_method"}{"Annotation_Element_Removed_Default_Value"}{$AParam}} = ( | |
868 | "Type_Name"=>$ClassName, | |
869 | "Old_Value"=>$D1, | |
870 | "Target"=>$AParam); | |
871 | } | |
872 | elsif(not defined $D1 and defined $D2) | |
873 | { | |
874 | %{$CompatProblems{".client_method"}{"Annotation_Element_Added_Default_Value"}{$AParam}} = ( | |
875 | "Type_Name"=>$ClassName, | |
876 | "New_Value"=>$D2, | |
877 | "Target"=>$AParam); | |
878 | } | |
879 | elsif($D1 ne $D2) | |
880 | { | |
881 | %{$CompatProblems{".client_method"}{"Annotation_Element_Changed_Default_Value"}{$AParam}} = ( | |
882 | "Type_Name"=>$ClassName, | |
883 | "Old_Value"=>$D1, | |
884 | "New_Value"=>$D2, | |
885 | "Target"=>$AParam); | |
886 | } | |
887 | } | |
888 | else | |
889 | { | |
890 | if(defined $D1) | |
891 | { | |
892 | %{$CompatProblems{".client_method"}{"Removed_Annotation_Default_Element"}{$AParam}} = ( | |
893 | "Type_Name"=>$ClassName, | |
894 | "Elem_Type"=>$R1, | |
895 | "Old_Value"=>$D1, | |
896 | "Target"=>$AParam); | |
897 | } | |
898 | else | |
899 | { | |
900 | %{$CompatProblems{".client_method"}{"Removed_Annotation_NonDefault_Element"}{$AParam}} = ( | |
901 | "Type_Name"=>$ClassName, | |
902 | "Elem_Type"=>$R1, | |
903 | "Target"=>$AParam); | |
904 | } | |
905 | } | |
906 | } | |
907 | ||
908 | foreach my $AParam (sort keys(%{$AnnParam{2}})) | |
909 | { | |
910 | if(not defined $AnnParam{1}{$AParam}) | |
911 | { | |
912 | my $R2 = $AnnParam{2}{$AParam}{"Return"}; | |
913 | ||
914 | if(defined $AnnParam{2}{$AParam}{"Default"}) | |
915 | { | |
916 | my $D2 = $AnnParam{2}{$AParam}{"Default"}; | |
917 | %{$CompatProblems{".client_method"}{"Added_Annotation_Default_Element"}{$AParam}} = ( | |
918 | "Type_Name"=>$ClassName, | |
919 | "Elem_Type"=>$R2, | |
920 | "New_Value"=>$D2, | |
921 | "Target"=>$AParam); | |
922 | } | |
923 | else | |
924 | { | |
925 | %{$CompatProblems{".client_method"}{"Added_Annotation_NonDefault_Element"}{$AParam}} = ( | |
926 | "Type_Name"=>$ClassName, | |
927 | "Elem_Type"=>$R2, | |
928 | "Target"=>$AParam); | |
929 | } | |
930 | } | |
931 | } | |
932 | } | |
806 | 933 | } |
807 | 934 | else |
808 | 935 | { # removed |
1049 | 1176 | } |
1050 | 1177 | else |
1051 | 1178 | { |
1052 | if(my @InvokedBy = sort keys(%{$MethodUsed{2}{$AddedMethod}})) | |
1179 | if(nonImplClass(\%Type1)) | |
1180 | { | |
1181 | %{$SubProblems{"NonImpl_Interface_Added_Abstract_Method"}{getSFormat($AddedMethod)}} = ( | |
1182 | "Type_Name"=>$Type1{"Name"}, | |
1183 | "Type_Type"=>$Type1{"Type"}, | |
1184 | "Target"=>$AddedMethod); | |
1185 | } | |
1186 | elsif(my @InvokedBy = sort keys(%{$MethodUsed{2}{$AddedMethod}})) | |
1053 | 1187 | { |
1054 | 1188 | %{$SubProblems{"Interface_Added_Abstract_Method_Invoked_By_Others"}{getSFormat($AddedMethod)}} = ( |
1055 | 1189 | "Type_Name"=>$Type1{"Name"}, |
1752 | 1886 | } |
1753 | 1887 | |
1754 | 1888 | my $ClassId1 = $MethodInfo{1}{$Method}{"Class"}; |
1755 | my $Class1_Name = getTypeName($ClassId1, 1); | |
1756 | my $Class1_Type = getTypeType($ClassId1, 1); | |
1889 | my $Class1 = getType($ClassId1, 1); | |
1890 | ||
1891 | if(not defined $In::Opt{"CheckAnnotations"} and $Class1->{"Annotation"}) { | |
1892 | next; | |
1893 | } | |
1894 | ||
1895 | my $Class1_Name = $Class1->{"Name"}; | |
1896 | my $Class1_Type = $Class1->{"Type"}; | |
1757 | 1897 | |
1758 | 1898 | $CheckedTypes{$Class1_Name} = 1; |
1759 | 1899 | $CheckedMethods{$Method} = 1; |
2518 | 2658 | # check rules |
2519 | 2659 | foreach my $Method (sort keys(%CompatProblems)) |
2520 | 2660 | { |
2521 | foreach my $Kind (keys(%{$CompatProblems{$Method}})) | |
2661 | foreach my $Kind (sort keys(%{$CompatProblems{$Method}})) | |
2522 | 2662 | { |
2523 | 2663 | if(not defined $CompatRules{"Binary"}{$Kind} and not defined $CompatRules{"Source"}{$Kind}) |
2524 | 2664 | { # unknown rule |
2525 | 2665 | if(not $UnknownRules{$Level}{$Kind}) |
2526 | 2666 | { # only one warning |
2527 | 2667 | printMsg("WARNING", "unknown rule \"$Kind\" (\"$Level\")"); |
2528 | $UnknownRules{$Level}{$Kind}=1; | |
2668 | $UnknownRules{$Level}{$Kind} = 1; | |
2529 | 2669 | } |
2530 | 2670 | } |
2531 | 2671 | } |
2692 | 2832 | my $Checked_Archives_Link = "0"; |
2693 | 2833 | $Checked_Archives_Link = "<a href='#Checked_Archives' style='color:Blue;'>".keys(%{$LibArchives{1}})."</a>" if(keys(%{$LibArchives{1}})>0); |
2694 | 2834 | |
2695 | $TestResults .= "<tr><th>Total JARs</th><td>$Checked_Archives_Link</td></tr>\n"; | |
2835 | $TestResults .= "<tr><th>Total Java Modules</th><td>$Checked_Archives_Link</td></tr>\n"; | |
2696 | 2836 | $TestResults .= "<tr><th>Total Methods / Classes</th><td>".keys(%CheckedMethods)." / ".keys(%CheckedTypes)."</td></tr>\n"; |
2697 | 2837 | |
2698 | 2838 | $RESULT{$Level}{"Problems"} += $Removed+$M_Problems_High+$T_Problems_High+$T_Problems_Medium+$M_Problems_Medium; |
3361 | 3501 | sub showType($$$) |
3362 | 3502 | { |
3363 | 3503 | my ($Name, $Html, $LVer) = @_; |
3364 | my $TType = $TypeInfo{$LVer}{$TName_Tid{$LVer}{$Name}}{"Type"}; | |
3504 | my $TInfo = $TypeInfo{$LVer}{$TName_Tid{$LVer}{$Name}}; | |
3505 | my $TType = $TInfo->{"Type"}; | |
3506 | ||
3507 | if($TInfo->{"Annotation"}) { | |
3508 | $TType = '@'.$TType; | |
3509 | } | |
3510 | ||
3365 | 3511 | if($Html) { |
3366 | 3512 | $Name = "<span class='ttype'>".$TType."</span> ".specChars($Name); |
3367 | 3513 | } |
3892 | 4038 | $Head .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; |
3893 | 4039 | $Head .= "<head>\n"; |
3894 | 4040 | $Head .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; |
4041 | $Head .= "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n"; | |
3895 | 4042 | $Head .= "<meta name=\"keywords\" content=\"$Keywords\" />\n"; |
3896 | 4043 | $Head .= "<meta name=\"description\" content=\"$Description\" />\n"; |
3897 | 4044 | |
3971 | 4118 | } |
3972 | 4119 | |
3973 | 4120 | my $Class = getType($MethodInfo{2}{$Method}{"Class"}, 2); |
4121 | ||
4122 | if(not defined $In::Opt{"CheckAnnotations"} and $Class->{"Annotation"}) { | |
4123 | next; | |
4124 | } | |
3974 | 4125 | |
3975 | 4126 | $CheckedTypes{$Class->{"Name"}} = 1; |
3976 | 4127 | $CheckedMethods{$Method} = 1; |
4046 | 4197 | |
4047 | 4198 | my $Class = getType($MethodInfo{1}{$Method}{"Class"}, 1); |
4048 | 4199 | |
4200 | if(not defined $In::Opt{"CheckAnnotations"} and $Class->{"Annotation"}) { | |
4201 | next; | |
4202 | } | |
4203 | ||
4049 | 4204 | $CheckedTypes{$Class->{"Name"}} = 1; |
4050 | 4205 | $CheckedMethods{$Method} = 1; |
4051 | 4206 | |
4077 | 4232 | } |
4078 | 4233 | } |
4079 | 4234 | |
4080 | sub getArchivePaths($$) | |
4081 | { | |
4082 | my ($Dest, $LVer) = @_; | |
4083 | if(-f $Dest) { | |
4084 | return ($Dest); | |
4085 | } | |
4086 | elsif(-d $Dest) | |
4087 | { | |
4088 | $Dest=~s/[\/\\]+\Z//g; | |
4089 | next if(not $Dest); | |
4090 | ||
4091 | my @Archives = (); | |
4092 | foreach my $Path (cmdFind($Dest, "", "*\\.jar")) | |
4093 | { | |
4094 | next if(ignorePath($Path, $Dest)); | |
4095 | push(@Archives, realpath_F($Path)); | |
4096 | } | |
4097 | return @Archives; | |
4098 | } | |
4099 | return (); | |
4100 | } | |
4101 | ||
4102 | 4235 | sub isCyclical($$) { |
4103 | 4236 | return (grep {$_ eq $_[1]} @{$_[0]}); |
4104 | 4237 | } |
4204 | 4337 | return; |
4205 | 4338 | } |
4206 | 4339 | |
4207 | if($Path!~/\.jar\Z/i) { | |
4340 | if($Path!~/\.(jar|jmod)\Z/i) { | |
4208 | 4341 | return; |
4209 | 4342 | } |
4210 | 4343 | |
4211 | 4344 | my $Ver = undef; |
4212 | 4345 | |
4213 | if(not defined $Ver) { | |
4214 | $Ver = getManifestVersion(getAbsPath($Path)); | |
4346 | if($Path=~/\.jar\Z/i) | |
4347 | { | |
4348 | if(not defined $Ver) { | |
4349 | $Ver = getManifestVersion(getAbsPath($Path)); | |
4350 | } | |
4215 | 4351 | } |
4216 | 4352 | |
4217 | 4353 | if(not defined $Ver) { |
4873 | 5009 | } |
4874 | 5010 | if(defined $In::Opt{"ShowVersion"}) |
4875 | 5011 | { |
4876 | printMsg("INFO", "Java API Compliance Checker (JAPICC) $TOOL_VERSION\nCopyright (C) 2017 Andrey Ponomarenko's ABI Laboratory\nLicense: LGPL or GPL <http://www.gnu.org/licenses/>\nThis program is free software: you can redistribute it and/or modify it.\n\nWritten by Andrey Ponomarenko."); | |
5012 | printMsg("INFO", "Java API Compliance Checker (JAPICC) $TOOL_VERSION\nCopyright (C) 2018 Andrey Ponomarenko's ABI Laboratory\nLicense: LGPLv2.1+ <http://www.gnu.org/licenses/>\nThis program is free software: you can redistribute it and/or modify it.\n\nWritten by Andrey Ponomarenko."); | |
4877 | 5013 | exit(0); |
4878 | 5014 | } |
4879 | 5015 | if(defined $In::Opt{"DumpVersion"}) |
4909 | 5045 | { |
4910 | 5046 | if($In::Opt{"DumpAPI"}) |
4911 | 5047 | { |
4912 | if($In::Opt{"DumpAPI"}=~/\.jar\Z/) | |
5048 | if($In::Opt{"DumpAPI"}=~/\.(jar|jmod)\Z/) | |
4913 | 5049 | { # short usage |
4914 | 5050 | my ($Name, $Version) = getPkgVersion(getFilename($In::Opt{"DumpAPI"})); |
4915 | 5051 | if($Name and $Version ne "") |
4923 | 5059 | } |
4924 | 5060 | else |
4925 | 5061 | { |
4926 | if($In::Desc{1}{"Path"}=~/\.jar\Z/ and $In::Desc{2}{"Path"}=~/\.jar\Z/) | |
5062 | if($In::Desc{1}{"Path"}=~/\.(jar|jmod)\Z/ and $In::Desc{2}{"Path"}=~/\.(jar|jmod)\Z/) | |
4927 | 5063 | { # short usage |
4928 | 5064 | my ($Name1, $Version1) = getPkgVersion(getFilename($In::Desc{1}{"Path"})); |
4929 | 5065 | my ($Name2, $Version2) = getPkgVersion(getFilename($In::Desc{2}{"Path"})); |
4997 | 5133 | $In::Opt{"SkipClasses"}{$Class} = 1; |
4998 | 5134 | } |
4999 | 5135 | } |
5136 | if(my $NonImplClassesList = $In::Opt{"NonImplClassesList"}) | |
5137 | { | |
5138 | if(not -f $NonImplClassesList) { | |
5139 | exitStatus("Access_Error", "can't access file \'$NonImplClassesList\'"); | |
5140 | } | |
5141 | foreach my $Class (split(/\n/, readFile($NonImplClassesList))) | |
5142 | { | |
5143 | $Class=~s/\//./g; | |
5144 | $In::Opt{"NonImplClasses"}{$Class} = 1; | |
5145 | } | |
5146 | } | |
5000 | 5147 | if(my $SkipPackagesList = $In::Opt{"SkipPackagesList"}) |
5001 | 5148 | { |
5002 | 5149 | if(not -f $SkipPackagesList) { |
0 | 0 | ########################################################################### |
1 | 1 | # A module to create API dump from disassembled code |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | use IPC::Open3; |
108 | 110 | sub readArchive($$) |
109 | 111 | { # 1, 2 - library, 0 - client |
110 | 112 | my ($LVer, $Path) = @_; |
111 | ||
112 | 113 | $Path = getAbsPath($Path); |
113 | my $JarCmd = getCmdPath("jar"); | |
114 | if(not $JarCmd) { | |
115 | exitStatus("Not_Found", "can't find \"jar\" command"); | |
116 | } | |
114 | ||
115 | my $ExtractCmd = undef; | |
116 | ||
117 | if($Path=~/\.jar\Z/) | |
118 | { | |
119 | $ExtractCmd = getCmdPath("jar"); | |
120 | if(not $ExtractCmd) { | |
121 | exitStatus("Not_Found", "can't find \"jar\" command"); | |
122 | } | |
123 | $ExtractCmd .= " -xf \"$Path\""; | |
124 | } | |
125 | elsif($Path=~/\.jmod\Z/) | |
126 | { | |
127 | $ExtractCmd = getCmdPath("jmod"); | |
128 | if(not $ExtractCmd) { | |
129 | exitStatus("Not_Found", "can't find \"jmod\" command"); | |
130 | } | |
131 | $ExtractCmd .= " extract \"$Path\""; | |
132 | } | |
133 | else { | |
134 | exitStatus("Error", "unknown format of \'$Path\'"); | |
135 | } | |
136 | ||
117 | 137 | my $ExtractPath = join_P($In::Opt{"Tmp"}, $ExtractCounter); |
118 | 138 | if(-d $ExtractPath) { |
119 | 139 | rmtree($ExtractPath); |
120 | 140 | } |
121 | 141 | mkpath($ExtractPath); |
142 | ||
122 | 143 | chdir($ExtractPath); |
123 | system($JarCmd." -xf \"$Path\""); | |
144 | system($ExtractCmd); | |
124 | 145 | if($?) { |
125 | 146 | exitStatus("Error", "can't extract \'$Path\'"); |
126 | 147 | } |
127 | 148 | chdir($In::Opt{"OrigDir"}); |
149 | ||
128 | 150 | my @Classes = (); |
129 | 151 | foreach my $ClassPath (cmdFind($ExtractPath, "", "*\\.class")) |
130 | 152 | { |
175 | 197 | if($LVer) |
176 | 198 | { |
177 | 199 | foreach my $SubArchive (cmdFind($ExtractPath, "", "*\\.jar")) |
200 | { # recursive step | |
201 | readArchive($LVer, $SubArchive); | |
202 | } | |
203 | ||
204 | foreach my $SubArchive (cmdFind($ExtractPath, "", "*\\.jmod")) | |
178 | 205 | { # recursive step |
179 | 206 | readArchive($LVer, $SubArchive); |
180 | 207 | } |
303 | 330 | } |
304 | 331 | |
305 | 332 | my $TmpDir = $In::Opt{"Tmp"}; |
333 | my $DumpFile = undef; | |
334 | ||
335 | if(defined $In::Opt{"Debug"}) | |
336 | { | |
337 | if(my $DebugDir = getDebugDir($LVer)) | |
338 | { | |
339 | mkpath($DebugDir); | |
340 | $DumpFile = $DebugDir."/class-dump.txt"; | |
341 | } | |
342 | } | |
306 | 343 | |
307 | 344 | # ! private info should be processed |
308 | 345 | my @Cmd = ($JavapCmd, "-s", "-private"); |
313 | 350 | @Cmd = (@Cmd, @{$Paths}); |
314 | 351 | |
315 | 352 | chdir($TmpDir."/".$ExtractCounter); |
353 | ||
354 | my ($Err, $ErrMsg) = (); | |
355 | ||
316 | 356 | my $Pid = open3(*IN, *OUT, *ERR, @Cmd); |
357 | ($Err, $ErrMsg) = ($?, $!); | |
358 | ||
317 | 359 | close(IN); |
360 | close(ERR); | |
361 | ||
362 | chdir($In::Opt{"OrigDir"}); | |
363 | ||
364 | if($Err==-1 and $Err>>8 and $ErrMsg) { | |
365 | exitStatus("Error", "failed to run javap (".$ErrMsg.")"); | |
366 | } | |
318 | 367 | |
319 | 368 | my (%TypeAttr, $CurrentMethod, $CurrentPackage, $CurrentClass, $CurrentClass_Short) = (); |
320 | 369 | my ($InParamTable, $InVarTypeTable, $InExceptionTable, $InCode) = (0, 0, 0, 0); |
322 | 371 | my $InAnnotations = undef; |
323 | 372 | my $InAnnotations_Class = undef; |
324 | 373 | my $InAnnotations_Method = undef; |
325 | my %AnnotationName = (); | |
374 | my %ConstantTypeName = (); | |
326 | 375 | my %AnnotationNum = (); # support for Java 7 |
376 | my %ConstantName = (); | |
327 | 377 | |
328 | 378 | my ($ParamPos, $FieldPos) = (0, 0); |
329 | 379 | my ($LINE, $Stay, $Run, $NonEmpty) = (undef, 0, 1, undef); |
330 | 380 | |
331 | 381 | my $DContent = ""; |
332 | my $Debug = (defined $In::Opt{"Debug"}); | |
333 | 382 | |
334 | 383 | while($Run) |
335 | 384 | { |
341 | 390 | $NonEmpty = 1; |
342 | 391 | } |
343 | 392 | |
344 | if($Debug) { | |
393 | if(defined $In::Opt{"Debug"}) { | |
345 | 394 | $DContent .= $LINE; |
346 | 395 | } |
347 | 396 | } |
461 | 510 | $AName=~s/\$/./g; |
462 | 511 | $AName=~s/\//./g; |
463 | 512 | |
464 | $AnnotationName{$CNum} = $AName; | |
513 | $ConstantTypeName{$CNum} = $AName; | |
465 | 514 | |
466 | 515 | if(defined $AnnotationNum{$CNum}) |
467 | 516 | { # support for Java 7 |
469 | 518 | $TypeAttr{"Annotations"}{registerType($AName, $LVer)} = 1; |
470 | 519 | } |
471 | 520 | delete($AnnotationNum{$CNum}); |
521 | } | |
522 | } | |
523 | elsif($LINE=~/=\s*(Utf8|Integer|Long|Float|Double)\s+(.*?)\Z/) | |
524 | { | |
525 | if($1 eq "Utf8") { | |
526 | $ConstantName{$CNum} = "\"".$2."\""; | |
527 | } | |
528 | else { | |
529 | $ConstantName{$CNum} = $2; | |
472 | 530 | } |
473 | 531 | } |
474 | 532 | |
555 | 613 | { |
556 | 614 | if($LINE=~/\A\s*\d+\:\s*#(\d+)/) |
557 | 615 | { |
558 | if(my $AName = $AnnotationName{$1}) | |
616 | if(my $AName = $ConstantTypeName{$1}) | |
559 | 617 | { |
560 | 618 | if($InAnnotations_Class) { |
561 | 619 | $TypeAttr{"Annotations"}{registerType($AName, $LVer)} = 1; |
676 | 734 | |
677 | 735 | my $LINE_N = <OUT>; |
678 | 736 | |
679 | if($Debug) { | |
737 | if(defined $In::Opt{"Debug"}) { | |
680 | 738 | $DContent .= $LINE_N; |
681 | 739 | } |
682 | 740 | |
756 | 814 | $TypeAttr{"Fields"}{$FName}{"Pos"} = $FieldPos++; |
757 | 815 | |
758 | 816 | my $LINE_NP = <OUT>; |
759 | if($Debug) { | |
817 | if(defined $In::Opt{"Debug"}) { | |
760 | 818 | $DContent .= $LINE_NP; |
761 | 819 | } |
762 | 820 | |
771 | 829 | } |
772 | 830 | |
773 | 831 | $LINE_NP = <OUT>; |
774 | if($Debug) { | |
832 | if(defined $In::Opt{"Debug"}) { | |
775 | 833 | $DContent .= $LINE_NP; |
776 | 834 | } |
777 | 835 | |
778 | 836 | if($LINE_NP=~/flags:/i) |
779 | 837 | { # flags: ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ANNOTATION |
780 | 838 | $LINE_NP = <OUT>; |
781 | if($Debug) { | |
839 | if(defined $In::Opt{"Debug"}) { | |
782 | 840 | $DContent .= $LINE_NP; |
783 | 841 | } |
784 | 842 | } |
819 | 877 | } |
820 | 878 | |
821 | 879 | %TypeAttr = ("Type"=>$2, "Name"=>$3); # reset previous class |
822 | %AnnotationName = (); # reset annotations of the class | |
880 | %ConstantTypeName = (); # reset annotations of the class | |
823 | 881 | %AnnotationNum = (); # support for Java 7 |
882 | %ConstantName = (); | |
824 | 883 | $InAnnotations_Class = 1; |
825 | 884 | |
826 | 885 | $FieldPos = 0; # reset field position |
921 | 980 | elsif(defined $InAnnotations and index($LINE, "InnerClasses")!=-1) { |
922 | 981 | $InAnnotations = undef; |
923 | 982 | } |
983 | elsif($CurrentMethod and index($LINE, "default_value")!=-1) | |
984 | { | |
985 | if($LINE=~/default_value:\s*[sISJBFDCZ]#(\d+)/) | |
986 | { | |
987 | if(defined $ConstantName{$1}) { | |
988 | $MethodInfo{$LVer}{$MName_Mid{$CurrentMethod}}{"Default"} = $ConstantName{$1}; | |
989 | } | |
990 | } | |
991 | elsif($LINE=~/default_value:\s*e#(\d+)\.#(\d+)/) | |
992 | { | |
993 | my ($ET, $EV) = ($1, $2); | |
994 | if(defined $ConstantTypeName{$ET} and defined $ConstantName{$EV}) | |
995 | { | |
996 | $ET = $ConstantTypeName{$ET}; | |
997 | $EV = $ConstantName{$EV}; | |
998 | $EV=~s/\"//g; | |
999 | $MethodInfo{$LVer}{$MName_Mid{$CurrentMethod}}{"Default"} = $ET.".".$EV; | |
1000 | } | |
1001 | } | |
1002 | elsif($LINE=~/default_value:\s*\[(.*)\]/) | |
1003 | { | |
1004 | my $Arr = $1; | |
1005 | if($Arr) | |
1006 | { | |
1007 | my @ArrU = (); | |
1008 | foreach my $ArrP (split(/\s*,\s*/, $Arr)) | |
1009 | { | |
1010 | if($ArrP=~/[sISJBFDCZ]#(\d+)/) { | |
1011 | push(@ArrU, $ConstantName{$1}); | |
1012 | } | |
1013 | } | |
1014 | $MethodInfo{$LVer}{$MName_Mid{$CurrentMethod}}{"Default"} = "{".join(",", @ArrU)."}"; | |
1015 | } | |
1016 | else { | |
1017 | $MethodInfo{$LVer}{$MName_Mid{$CurrentMethod}}{"Default"} = "{}"; | |
1018 | } | |
1019 | } | |
1020 | } | |
924 | 1021 | else |
925 | 1022 | { |
926 | 1023 | # unparsed |
933 | 1030 | } |
934 | 1031 | |
935 | 1032 | waitpid($Pid, 0); |
936 | chdir($In::Opt{"OrigDir"}); | |
937 | ||
938 | if(my $Err = $?>>8) { | |
939 | exitStatus("Error", "failed to run javap"); | |
940 | } | |
1033 | close(OUT); | |
941 | 1034 | |
942 | 1035 | if(not $NonEmpty) { |
943 | 1036 | exitStatus("Error", "internal error in parser"); |
944 | 1037 | } |
945 | 1038 | |
946 | if($Debug) { | |
947 | appendFile(getDebugDir($LVer)."/class-dump.txt", $DContent); | |
1039 | if(defined $In::Opt{"Debug"}) { | |
1040 | appendFile($DumpFile, $DContent); | |
948 | 1041 | } |
949 | 1042 | } |
950 | 1043 |
0 | 0 | ########################################################################### |
1 | 1 | # A module with simple functions |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
11 | # | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | use Digest::MD5 qw(md5_hex); |
0 | 0 | ########################################################################### |
1 | 1 | # A module to handle XML descriptors |
2 | 2 | # |
3 | # Copyright (C) 2016 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | |
27 | 29 | return undef; |
28 | 30 | } |
29 | 31 | |
30 | if(-d $Path or $Path=~/\.jar\Z/) | |
32 | if(-d $Path or $Path=~/\.(jar|jmod)\Z/) | |
31 | 33 | { |
32 | 34 | return " |
33 | 35 | <version> |
0 | 0 | ########################################################################### |
1 | 1 | # A module to filter API symbols |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
11 | # | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | |
87 | 89 | } |
88 | 90 | |
89 | 91 | return 1; |
92 | } | |
93 | ||
94 | sub nonImplClass($) | |
95 | { | |
96 | my $Class = $_[0]; | |
97 | ||
98 | if(defined $In::Opt{"NonImplAll"}) { | |
99 | return 1; | |
100 | } | |
101 | ||
102 | if(defined $In::Opt{"NonImplClassesList"}) | |
103 | { # user defined classes | |
104 | if(defined $In::Opt{"NonImplClasses"}{$Class->{"Name"}}) { | |
105 | return 1; | |
106 | } | |
107 | } | |
108 | ||
109 | return 0; | |
90 | 110 | } |
91 | 111 | |
92 | 112 | sub methodFilter($$) |
0 | 0 | ########################################################################### |
1 | 1 | # A module to handle input data |
2 | 2 | # |
3 | # Copyright (C) 2016 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | package In; |
21 | 23 |
0 | 0 | ########################################################################### |
1 | 1 | # A module for logging |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | |
45 | 47 | { |
46 | 48 | my ($Code, $Msg) = @_; |
47 | 49 | print STDERR "ERROR: ". $Msg."\n"; |
50 | if(my $Orig = $In::Opt{"OrigDir"}) { | |
51 | chdir($Orig); | |
52 | } | |
48 | 53 | exit($ERROR_CODE{$Code}); |
49 | 54 | } |
50 | 55 |
0 | 0 | ########################################################################### |
1 | 1 | # A module to unmangle symbols |
2 | 2 | # |
3 | # Copyright (C) 2016 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | |
64 | 66 | elsif($Symbol eq "S") { |
65 | 67 | $CurParam = "short"; |
66 | 68 | } |
67 | elsif($Symbol eq "S") { | |
68 | $CurParam = "short"; | |
69 | } | |
70 | 69 | elsif($Symbol eq "I") { |
71 | 70 | $CurParam = "int"; |
72 | 71 | } |
78 | 77 | } |
79 | 78 | elsif($Symbol eq "D") { |
80 | 79 | $CurParam = "double"; |
80 | } | |
81 | elsif($Symbol eq "Z") { | |
82 | $CurParam = "boolean"; | |
81 | 83 | } |
82 | 84 | else { |
83 | 85 | printMsg("INFO", "WARNING: unmangling error"); |
0 | 0 | ########################################################################### |
1 | 1 | # A module with functions to handle paths |
2 | 2 | # |
3 | # Copyright (C) 2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2017-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | use Cwd qw(realpath); |
0 | 0 | ########################################################################### |
1 | 1 | # A module with regression test suite |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | use File::Copy qw(copy); |
382 | 384 | } |
383 | 385 | }"); |
384 | 386 | |
387 | # Added vararg parameter | |
388 | writeFile($Path_v1."/AddedVarargParam.java", | |
389 | "package $PackageName; | |
390 | public class AddedVarargParam { | |
391 | public void method(Integer x, String... y) { } | |
392 | }"); | |
393 | writeFile($Path_v2."/AddedVarargParam.java", | |
394 | "package $PackageName; | |
395 | public class AddedVarargParam { | |
396 | public void method(Integer x, String... y) { } | |
397 | }"); | |
398 | ||
399 | writeFile($TestsPath."/Test_AddedVarargParam.java", | |
400 | "import $PackageName.*; | |
401 | public class Test_AddedVarargParam | |
402 | { | |
403 | public static void main(String[] args) { | |
404 | AddedVarargParam X = new AddedVarargParam(); | |
405 | X.method(0); | |
406 | } | |
407 | }"); | |
408 | ||
385 | 409 | # Removed_Annotation |
386 | 410 | writeFile($Path_v1."/RemovedAnnotation.java", |
387 | 411 | "package $PackageName; |
400 | 424 | } |
401 | 425 | }"); |
402 | 426 | |
427 | # Changed Annotation | |
428 | writeFile($Path_v1."/ChangedAnnotation.java", | |
429 | "package $PackageName; | |
430 | ||
431 | enum MyEnum { | |
432 | SUNDAY, MONDAY | |
433 | } | |
434 | ||
435 | public \@interface ChangedAnnotation { | |
436 | String value(); | |
437 | String datatype() default \"Str\"; | |
438 | int num1() default 1; | |
439 | String[] values() default {\"Alice\", \"Bob\", \"Cindy\"}; | |
440 | int[] nums() default {1, 2, 3}; | |
441 | String safe_change() default \"Str\"; | |
442 | MyEnum day() default MyEnum.SUNDAY; | |
443 | short num2() default 1; | |
444 | long num3() default 1; | |
445 | byte num4() default 1; | |
446 | float num5() default 1.5f; | |
447 | double num6() default 1.5; | |
448 | boolean bit() default true; | |
449 | char ch() default 'A'; | |
450 | }"); | |
451 | ||
452 | writeFile($Path_v2."/ChangedAnnotation.java", | |
453 | "package $PackageName; | |
454 | ||
455 | enum MyEnum { | |
456 | SUNDAY, MONDAY | |
457 | } | |
458 | ||
459 | public \@interface ChangedAnnotation { | |
460 | String value() default \"Str\"; | |
461 | String datatype(); | |
462 | int[] values(); | |
463 | int[] nums() default {1, 2}; | |
464 | int[] new_default_param() default {1, 2}; | |
465 | int[] new_param(); | |
466 | String[] safe_change() default {\"Str\"}; | |
467 | MyEnum day() default MyEnum.MONDAY; | |
468 | }"); | |
469 | ||
470 | writeFile($TestsPath."/Test_ChangedAnnotation.java", | |
471 | "import $PackageName.*; | |
472 | public class Test_ChangedAnnotation { | |
473 | public static void main(String[] args) { | |
474 | testMethod(); | |
475 | } | |
476 | ||
477 | \@ChangedAnnotation(value=\"Val\") | |
478 | static void testMethod() { | |
479 | } | |
480 | }"); | |
481 | ||
403 | 482 | # Beta Annotation |
404 | 483 | writeFile($Path_v1."/Beta.java", |
405 | 484 | "package $PackageName; |
750 | 829 | writeFile($Path_v1."/ChangedFinalFieldValue.java", |
751 | 830 | "package $PackageName; |
752 | 831 | public class ChangedFinalFieldValue { |
753 | public final int field = 1; | |
832 | enum MyEnum { | |
833 | ONE, TWO | |
834 | } | |
835 | public final int field1 = 1; | |
754 | 836 | public final String field2 = \" \"; |
837 | public final MyEnum field3 = MyEnum.ONE; | |
755 | 838 | }"); |
756 | 839 | writeFile($Path_v2."/ChangedFinalFieldValue.java", |
757 | 840 | "package $PackageName; |
758 | 841 | public class ChangedFinalFieldValue { |
759 | public final int field = 2; | |
842 | enum MyEnum { | |
843 | ONE, TWO | |
844 | } | |
845 | public final int field1 = 2; | |
760 | 846 | public final String field2 = \"newValue\"; |
847 | public final MyEnum field3 = MyEnum.TWO; | |
761 | 848 | }"); |
762 | 849 | |
763 | 850 | # NonConstant_Field_Became_Static |
1918 | 2005 | if(defined $In::Opt{"OldStyle"}) { |
1919 | 2006 | $Cmd .= " -old-style"; |
1920 | 2007 | } |
2008 | if(my $JdkPath = $In::Opt{"JdkPath"}) { | |
2009 | $Cmd .= " -jdk-path \"$JdkPath\""; | |
2010 | } | |
1921 | 2011 | |
1922 | 2012 | my $TmpDir = $In::Opt{"Tmp"}; |
1923 | 2013 |
0 | 0 | ########################################################################### |
1 | 1 | # A module to find system files |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
11 | # | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | |
223 | 225 | } |
224 | 226 | } |
225 | 227 | |
228 | sub getArchivePaths($$) | |
229 | { | |
230 | my ($Dest, $LVer) = @_; | |
231 | if(-f $Dest) { | |
232 | return ($Dest); | |
233 | } | |
234 | elsif(-d $Dest) | |
235 | { | |
236 | $Dest=~s/[\/\\]+\Z//g; | |
237 | next if(not $Dest); | |
238 | ||
239 | my @Archives = (); | |
240 | foreach my $Path (cmdFind($Dest, "", "*\\.jar")) | |
241 | { | |
242 | next if(ignorePath($Path, $Dest)); | |
243 | push(@Archives, realpath_F($Path)); | |
244 | } | |
245 | foreach my $Path (cmdFind($Dest, "", "*\\.jmod")) | |
246 | { | |
247 | next if(ignorePath($Path, $Dest)); | |
248 | push(@Archives, realpath_F($Path)); | |
249 | } | |
250 | return @Archives; | |
251 | } | |
252 | return (); | |
253 | } | |
254 | ||
226 | 255 | return 1; |
0 | 0 | ########################################################################### |
1 | 1 | # A module to handle type attributes |
2 | 2 | # |
3 | # Copyright (C) 2016 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
10 | 11 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
15 | 16 | # |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 |
0 | 0 | ########################################################################### |
1 | 1 | # A module with basic functions |
2 | 2 | # |
3 | # Copyright (C) 2016-2017 Andrey Ponomarenko's ABI Laboratory | |
3 | # Copyright (C) 2016-2018 Andrey Ponomarenko's ABI Laboratory | |
4 | 4 | # |
5 | 5 | # Written by Andrey Ponomarenko |
6 | 6 | # |
7 | # This program is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License or the GNU Lesser | |
9 | # General Public License as published by the Free Software Foundation. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
7 | # This library is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU Lesser General Public | |
9 | # License as published by the Free Software Foundation; either | |
10 | # version 2.1 of the License, or (at your option) any later version. | |
11 | # | |
12 | # This library is distributed in the hope that it will be useful, | |
12 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # and the GNU Lesser General Public License along with this program. | |
18 | # If not, see <http://www.gnu.org/licenses/>. | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # Lesser General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU Lesser General Public | |
18 | # License along with this library; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
20 | # MA 02110-1301 USA. | |
19 | 21 | ########################################################################### |
20 | 22 | use strict; |
21 | 23 | use POSIX; |
187 | 189 | if($Type eq "d") { |
188 | 190 | push(@AbsPaths, $Path); |
189 | 191 | } |
192 | ||
193 | @AbsPaths = sort(@AbsPaths); | |
194 | ||
190 | 195 | return @AbsPaths; |
191 | 196 | } |
192 | 197 | else |
221 | 226 | { # regex |
222 | 227 | @Files = grep { /$Name/ } @Files; |
223 | 228 | } |
229 | ||
230 | @Files = sort(@Files); | |
231 | ||
224 | 232 | return @Files; |
225 | 233 | } |
226 | 234 | } |
489 | 489 | </change> |
490 | 490 | <effect> |
491 | 491 | A client program may be interrupted by **AbstractMethodError** exception. Added abstract method is called in 2nd library version by the method @invoked_by and may not be implemented by old clients. |
492 | </effect> | |
493 | </rule> | |
494 | ||
495 | <rule> | |
496 | <id> | |
497 | NonImpl_Interface_Added_Abstract_Method | |
498 | </id> | |
499 | <severity> | |
500 | Safe | |
501 | </severity> | |
502 | <kind> | |
503 | Types | |
504 | </kind> | |
505 | <change> | |
506 | Abstract method @target has been added to this interface. | |
507 | </change> | |
508 | <effect> | |
509 | No effect. | |
492 | 510 | </effect> |
493 | 511 | </rule> |
494 | 512 | |
1361 | 1379 | </effect> |
1362 | 1380 | </rule> |
1363 | 1381 | |
1382 | <rule> | |
1383 | <id> | |
1384 | Added_Annotation_Default_Element | |
1385 | </id> | |
1386 | <severity> | |
1387 | Safe | |
1388 | </severity> | |
1389 | <kind> | |
1390 | Types | |
1391 | </kind> | |
1392 | <change> | |
1393 | Element @target of type @elem_type with default value @new_value has been added to this annotation type. | |
1394 | </change> | |
1395 | <effect> | |
1396 | No effect. | |
1397 | </effect> | |
1398 | </rule> | |
1399 | ||
1400 | <rule> | |
1401 | <id> | |
1402 | Added_Annotation_NonDefault_Element | |
1403 | </id> | |
1404 | <severity> | |
1405 | Safe | |
1406 | </severity> | |
1407 | <kind> | |
1408 | Types | |
1409 | </kind> | |
1410 | <change> | |
1411 | Element @target of type @elem_type without a default value has been added to this annotation type. | |
1412 | </change> | |
1413 | <effect> | |
1414 | No effect. | |
1415 | </effect> | |
1416 | </rule> | |
1417 | ||
1418 | <rule> | |
1419 | <id> | |
1420 | Removed_Annotation_Default_Element | |
1421 | </id> | |
1422 | <severity> | |
1423 | Safe | |
1424 | </severity> | |
1425 | <kind> | |
1426 | Types | |
1427 | </kind> | |
1428 | <change> | |
1429 | Element @target of type @elem_type with default value @old_value has been removed from this annotation type. | |
1430 | </change> | |
1431 | <effect> | |
1432 | No effect. | |
1433 | </effect> | |
1434 | </rule> | |
1435 | ||
1436 | <rule> | |
1437 | <id> | |
1438 | Removed_Annotation_NonDefault_Element | |
1439 | </id> | |
1440 | <severity> | |
1441 | Safe | |
1442 | </severity> | |
1443 | <kind> | |
1444 | Types | |
1445 | </kind> | |
1446 | <change> | |
1447 | Element @target of type @elem_type without a default value has been removed from this annotation type. | |
1448 | </change> | |
1449 | <effect> | |
1450 | No effect. | |
1451 | </effect> | |
1452 | </rule> | |
1453 | ||
1454 | <rule> | |
1455 | <id> | |
1456 | Annotation_Element_Changed_Default_Value | |
1457 | </id> | |
1458 | <severity> | |
1459 | Safe | |
1460 | </severity> | |
1461 | <kind> | |
1462 | Types | |
1463 | </kind> | |
1464 | <change> | |
1465 | Changed default value of the element @target from @old_value to @new_value in this annotation type. | |
1466 | </change> | |
1467 | <effect> | |
1468 | No effect. | |
1469 | </effect> | |
1470 | </rule> | |
1471 | ||
1472 | <rule> | |
1473 | <id> | |
1474 | Annotation_Element_Removed_Default_Value | |
1475 | </id> | |
1476 | <severity> | |
1477 | Safe | |
1478 | </severity> | |
1479 | <kind> | |
1480 | Types | |
1481 | </kind> | |
1482 | <change> | |
1483 | Removed default value @old_value from the element @target of this annotation type. | |
1484 | </change> | |
1485 | <effect> | |
1486 | No effect. | |
1487 | </effect> | |
1488 | </rule> | |
1489 | ||
1490 | <rule> | |
1491 | <id> | |
1492 | Annotation_Element_Added_Default_Value | |
1493 | </id> | |
1494 | <severity> | |
1495 | Safe | |
1496 | </severity> | |
1497 | <kind> | |
1498 | Types | |
1499 | </kind> | |
1500 | <change> | |
1501 | Added default value @new_value for the element @target of this annotation type. | |
1502 | </change> | |
1503 | <effect> | |
1504 | No effect. | |
1505 | </effect> | |
1506 | </rule> | |
1507 | ||
1508 | <rule> | |
1509 | <id> | |
1510 | Annotation_Element_Changed_Type | |
1511 | </id> | |
1512 | <severity> | |
1513 | Safe | |
1514 | </severity> | |
1515 | <kind> | |
1516 | Types | |
1517 | </kind> | |
1518 | <change> | |
1519 | Changed type of the element @target from @old_value to @new_value in this annotation type. | |
1520 | </change> | |
1521 | <effect> | |
1522 | No effect. | |
1523 | </effect> | |
1524 | </rule> | |
1525 | ||
1526 | <rule> | |
1527 | <id> | |
1528 | Annotation_Element_Changed_Type_Safe | |
1529 | </id> | |
1530 | <severity> | |
1531 | Safe | |
1532 | </severity> | |
1533 | <kind> | |
1534 | Types | |
1535 | </kind> | |
1536 | <change> | |
1537 | Changed type of the element @target from @old_value to @new_value in this annotation type. | |
1538 | </change> | |
1539 | <effect> | |
1540 | No effect. | |
1541 | </effect> | |
1542 | </rule> | |
1543 | ||
1364 | 1544 | </rules> |
440 | 440 | |
441 | 441 | <rule> |
442 | 442 | <id> |
443 | NonImpl_Interface_Added_Abstract_Method | |
444 | </id> | |
445 | <severity> | |
446 | Safe | |
447 | </severity> | |
448 | <kind> | |
449 | Types | |
450 | </kind> | |
451 | <change> | |
452 | Abstract method @target has been added to this interface. | |
453 | </change> | |
454 | <effect> | |
455 | No effect. This interface is not meant to be implemented by users. | |
456 | </effect> | |
457 | </rule> | |
458 | ||
459 | <rule> | |
460 | <id> | |
443 | 461 | Class_Method_Became_Abstract |
444 | 462 | </id> |
445 | 463 | <severity> |
1267 | 1285 | </effect> |
1268 | 1286 | </rule> |
1269 | 1287 | |
1288 | <rule> | |
1289 | <id> | |
1290 | Added_Annotation_Default_Element | |
1291 | </id> | |
1292 | <severity> | |
1293 | Safe | |
1294 | </severity> | |
1295 | <kind> | |
1296 | Types | |
1297 | </kind> | |
1298 | <change> | |
1299 | Element @target of type @elem_type with default value @new_value has been added to this annotation type. | |
1300 | </change> | |
1301 | <effect> | |
1302 | No effect. | |
1303 | </effect> | |
1304 | </rule> | |
1305 | ||
1306 | <rule> | |
1307 | <id> | |
1308 | Added_Annotation_NonDefault_Element | |
1309 | </id> | |
1310 | <severity> | |
1311 | High | |
1312 | </severity> | |
1313 | <kind> | |
1314 | Types | |
1315 | </kind> | |
1316 | <change> | |
1317 | Element @target of type @elem_type without a default value has been added to this annotation type. | |
1318 | </change> | |
1319 | <effect> | |
1320 | Recompilation of a client program may be terminated with the error message: annotation **@**@type_name is missing a default value for the element '@target' | |
1321 | </effect> | |
1322 | </rule> | |
1323 | ||
1324 | <rule> | |
1325 | <id> | |
1326 | Removed_Annotation_Default_Element | |
1327 | </id> | |
1328 | <severity> | |
1329 | Medium | |
1330 | </severity> | |
1331 | <kind> | |
1332 | Types | |
1333 | </kind> | |
1334 | <change> | |
1335 | Element @target of type @elem_type with default value @old_value has been removed from this annotation type. | |
1336 | </change> | |
1337 | <effect> | |
1338 | Recompilation of a client program may be terminated with the error message: cannot find symbol **@**@type_name(@target=VAL) | |
1339 | </effect> | |
1340 | </rule> | |
1341 | ||
1342 | <rule> | |
1343 | <id> | |
1344 | Removed_Annotation_NonDefault_Element | |
1345 | </id> | |
1346 | <severity> | |
1347 | High | |
1348 | </severity> | |
1349 | <kind> | |
1350 | Types | |
1351 | </kind> | |
1352 | <change> | |
1353 | Element @target of type @elem_type without a default value has been removed from this annotation type. | |
1354 | </change> | |
1355 | <effect> | |
1356 | Recompilation of a client program may be terminated with the error message: cannot find symbol **@**@type_name(@target=VAL) | |
1357 | </effect> | |
1358 | </rule> | |
1359 | ||
1360 | <rule> | |
1361 | <id> | |
1362 | Annotation_Element_Changed_Default_Value | |
1363 | </id> | |
1364 | <severity> | |
1365 | Safe | |
1366 | </severity> | |
1367 | <kind> | |
1368 | Types | |
1369 | </kind> | |
1370 | <change> | |
1371 | Changed default value of the element @target from @old_value to @new_value in this annotation type. | |
1372 | </change> | |
1373 | <effect> | |
1374 | No effect. | |
1375 | </effect> | |
1376 | </rule> | |
1377 | ||
1378 | <rule> | |
1379 | <id> | |
1380 | Annotation_Element_Removed_Default_Value | |
1381 | </id> | |
1382 | <severity> | |
1383 | Medium | |
1384 | </severity> | |
1385 | <kind> | |
1386 | Types | |
1387 | </kind> | |
1388 | <change> | |
1389 | Removed default value @old_value from the element @target of this annotation type. | |
1390 | </change> | |
1391 | <effect> | |
1392 | Recompilation of a client program may be terminated with the error message: annotation **@**@type_name is missing a default value for the element '@target' | |
1393 | </effect> | |
1394 | </rule> | |
1395 | ||
1396 | <rule> | |
1397 | <id> | |
1398 | Annotation_Element_Added_Default_Value | |
1399 | </id> | |
1400 | <severity> | |
1401 | Safe | |
1402 | </severity> | |
1403 | <kind> | |
1404 | Types | |
1405 | </kind> | |
1406 | <change> | |
1407 | Added default value @new_value for the element @target of this annotation type. | |
1408 | </change> | |
1409 | <effect> | |
1410 | No effect. | |
1411 | </effect> | |
1412 | </rule> | |
1413 | ||
1414 | <rule> | |
1415 | <id> | |
1416 | Annotation_Element_Changed_Type | |
1417 | </id> | |
1418 | <severity> | |
1419 | Medium | |
1420 | </severity> | |
1421 | <kind> | |
1422 | Types | |
1423 | </kind> | |
1424 | <change> | |
1425 | Changed type of the element @target from @old_value to @new_value in this annotation type. | |
1426 | </change> | |
1427 | <effect> | |
1428 | Recompilation of a client program may be terminated with the error message: incompatible types: @old_value cannot be converted to @new_value or annotation value not of an allowable type | |
1429 | </effect> | |
1430 | </rule> | |
1431 | ||
1432 | <rule> | |
1433 | <id> | |
1434 | Annotation_Element_Changed_Type_Safe | |
1435 | </id> | |
1436 | <severity> | |
1437 | Safe | |
1438 | </severity> | |
1439 | <kind> | |
1440 | Types | |
1441 | </kind> | |
1442 | <change> | |
1443 | Changed type of the element @target from @old_value to @new_value in this annotation type. | |
1444 | </change> | |
1445 | <effect> | |
1446 | No effect. | |
1447 | </effect> | |
1448 | </rule> | |
1449 | ||
1270 | 1450 | </rules> |