Codebase list japi-compliance-checker / fe485aa
Merge tag 'upstream/1.5' Upstream version 1.5 Emmanuel Bourg 8 years ago
6 changed file(s) with 1403 addition(s) and 1207 deletion(s). Raw diff Collapse all Expand all
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.
00
11 Copyright (C) 2011 Institute for System Programming, RAS
2 Copyright (C) 2011-2015 Andrey Ponomarenko's ABI Laboratory
2 Copyright (C) 2011-2016 Andrey Ponomarenko's ABI Laboratory
33
44 All rights reserved.
55
77 RELEASE INFORMATION
88
99 Project: Java API Compliance Checker (Java ACC)
10 Version: 1.4.3
11 Date: 2015-11-20
10 Version: 1.5
11 Date: 2016-03-24
1212
1313
1414 This file explains how to install and setup environment
1919
2020 1. Requirements for Linux, FreeBSD and Mac OS X
2121 2. Requirements for MS Windows
22 3. Configuring and Installing
23 4. Running the Tool
22 3. Configure and Install
23 4. Usage
2424 5. Advanced Usage
2525
2626
4040
4141
4242
43 3. CONFIGURING AND INSTALLING
44 =============================
43 3. CONFIGURE AND INSTALL
44 ========================
4545
4646 This command will install an japi-compliance-checker program in the
4747 PREFIX/bin system directory:
5454
5555
5656
57 4. RUNNING THE TOOL
58 ===================
57 4. USAGE
58 ========
5959
6060 1. japi-compliance-checker OLD.jar NEW.jar
6161
6262
6363
6464 5. ADVANCED USAGE
65 ===================
65 =================
66
6667 1. Create XML-descriptors for two versions
6768 of a library (OLD.xml and NEW.xml):
6869 <version>
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!
00 This program is free software. You may use, redistribute and/or modify it
1 under the terms of either the GNU General Public License (GPL) or the GNU
2 Lesser General Public License (LGPL).
3
4 ---------------------------------------------------------------------------
5
6 GNU GENERAL PUBLIC LICENSE
7 Version 2, June 1991
8
9 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
10 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
11 Everyone is permitted to copy and distribute verbatim copies
12 of this license document, but changing it is not allowed.
13
14 Preamble
15
16 The licenses for most software are designed to take away your
17 freedom to share and change it. By contrast, the GNU General Public
18 License is intended to guarantee your freedom to share and change free
19 software--to make sure the software is free for all its users. This
20 General Public License applies to most of the Free Software
21 Foundation's software and to any other program whose authors commit to
22 using it. (Some other Free Software Foundation software is covered by
23 the GNU Lesser General Public License instead.) You can apply it to
24 your programs, too.
25
26 When we speak of free software, we are referring to freedom, not
27 price. Our General Public Licenses are designed to make sure that you
28 have the freedom to distribute copies of free software (and charge for
29 this service if you wish), that you receive source code or can get it
30 if you want it, that you can change the software or use pieces of it
31 in new free programs; and that you know you can do these things.
32
33 To protect your rights, we need to make restrictions that forbid
34 anyone to deny you these rights or to ask you to surrender the rights.
35 These restrictions translate to certain responsibilities for you if you
36 distribute copies of the software, or if you modify it.
37
38 For example, if you distribute copies of such a program, whether
39 gratis or for a fee, you must give the recipients all the rights that
40 you have. You must make sure that they, too, receive or can get the
41 source code. And you must show them these terms so they know their
42 rights.
43
44 We protect your rights with two steps: (1) copyright the software, and
45 (2) offer you this license which gives you legal permission to copy,
46 distribute and/or modify the software.
47
48 Also, for each author's protection and ours, we want to make certain
49 that everyone understands that there is no warranty for this free
50 software. If the software is modified by someone else and passed on, we
51 want its recipients to know that what they have is not the original, so
52 that any problems introduced by others will not reflect on the original
53 authors' reputations.
54
55 Finally, any free program is threatened constantly by software
56 patents. We wish to avoid the danger that redistributors of a free
57 program will individually obtain patent licenses, in effect making the
58 program proprietary. To prevent this, we have made it clear that any
59 patent must be licensed for everyone's free use or not licensed at all.
60
61 The precise terms and conditions for copying, distribution and
62 modification follow.
63
64 GNU GENERAL PUBLIC LICENSE
65 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
66
67 0. This License applies to any program or other work which contains
68 a notice placed by the copyright holder saying it may be distributed
69 under the terms of this General Public License. The "Program", below,
70 refers to any such program or work, and a "work based on the Program"
71 means either the Program or any derivative work under copyright law:
72 that is to say, a work containing the Program or a portion of it,
73 either verbatim or with modifications and/or translated into another
74 language. (Hereinafter, translation is included without limitation in
75 the term "modification".) Each licensee is addressed as "you".
76
77 Activities other than copying, distribution and modification are not
78 covered by this License; they are outside its scope. The act of
79 running the Program is not restricted, and the output from the Program
80 is covered only if its contents constitute a work based on the
81 Program (independent of having been made by running the Program).
82 Whether that is true depends on what the Program does.
83
84 1. You may copy and distribute verbatim copies of the Program's
85 source code as you receive it, in any medium, provided that you
86 conspicuously and appropriately publish on each copy an appropriate
87 copyright notice and disclaimer of warranty; keep intact all the
88 notices that refer to this License and to the absence of any warranty;
89 and give any other recipients of the Program a copy of this License
90 along with the Program.
91
92 You may charge a fee for the physical act of transferring a copy, and
93 you may at your option offer warranty protection in exchange for a fee.
94
95 2. You may modify your copy or copies of the Program or any portion
96 of it, thus forming a work based on the Program, and copy and
97 distribute such modifications or work under the terms of Section 1
98 above, provided that you also meet all of these conditions:
99
100 a) You must cause the modified files to carry prominent notices
101 stating that you changed the files and the date of any change.
102
103 b) You must cause any work that you distribute or publish, that in
104 whole or in part contains or is derived from the Program or any
105 part thereof, to be licensed as a whole at no charge to all third
106 parties under the terms of this License.
107
108 c) If the modified program normally reads commands interactively
109 when run, you must cause it, when started running for such
110 interactive use in the most ordinary way, to print or display an
111 announcement including an appropriate copyright notice and a
112 notice that there is no warranty (or else, saying that you provide
113 a warranty) and that users may redistribute the program under
114 these conditions, and telling the user how to view a copy of this
115 License. (Exception: if the Program itself is interactive but
116 does not normally print such an announcement, your work based on
117 the Program is not required to print an announcement.)
118
119 These requirements apply to the modified work as a whole. If
120 identifiable sections of that work are not derived from the Program,
121 and can be reasonably considered independent and separate works in
122 themselves, then this License, and its terms, do not apply to those
123 sections when you distribute them as separate works. But when you
124 distribute the same sections as part of a whole which is a work based
125 on the Program, the distribution of the whole must be on the terms of
126 this License, whose permissions for other licensees extend to the
127 entire whole, and thus to each and every part regardless of who wrote it.
128
129 Thus, it is not the intent of this section to claim rights or contest
130 your rights to work written entirely by you; rather, the intent is to
131 exercise the right to control the distribution of derivative or
132 collective works based on the Program.
133
134 In addition, mere aggregation of another work not based on the Program
135 with the Program (or with a work based on the Program) on a volume of
136 a storage or distribution medium does not bring the other work under
137 the scope of this License.
138
139 3. You may copy and distribute the Program (or a work based on it,
140 under Section 2) in object code or executable form under the terms of
141 Sections 1 and 2 above provided that you also do one of the following:
142
143 a) Accompany it with the complete corresponding machine-readable
144 source code, which must be distributed under the terms of Sections
145 1 and 2 above on a medium customarily used for software interchange; or,
146
147 b) Accompany it with a written offer, valid for at least three
148 years, to give any third party, for a charge no more than your
149 cost of physically performing source distribution, a complete
150 machine-readable copy of the corresponding source code, to be
151 distributed under the terms of Sections 1 and 2 above on a medium
152 customarily used for software interchange; or,
153
154 c) Accompany it with the information you received as to the offer
155 to distribute corresponding source code. (This alternative is
156 allowed only for noncommercial distribution and only if you
157 received the program in object code or executable form with such
158 an offer, in accord with Subsection b above.)
159
160 The source code for a work means the preferred form of the work for
161 making modifications to it. For an executable work, complete source
162 code means all the source code for all modules it contains, plus any
163 associated interface definition files, plus the scripts used to
164 control compilation and installation of the executable. However, as a
165 special exception, the source code distributed need not include
166 anything that is normally distributed (in either source or binary
167 form) with the major components (compiler, kernel, and so on) of the
168 operating system on which the executable runs, unless that component
169 itself accompanies the executable.
170
171 If distribution of executable or object code is made by offering
172 access to copy from a designated place, then offering equivalent
173 access to copy the source code from the same place counts as
174 distribution of the source code, even though third parties are not
175 compelled to copy the source along with the object code.
176
177 4. You may not copy, modify, sublicense, or distribute the Program
178 except as expressly provided under this License. Any attempt
179 otherwise to copy, modify, sublicense or distribute the Program is
180 void, and will automatically terminate your rights under this License.
181 However, parties who have received copies, or rights, from you under
182 this License will not have their licenses terminated so long as such
183 parties remain in full compliance.
184
185 5. You are not required to accept this License, since you have not
186 signed it. However, nothing else grants you permission to modify or
187 distribute the Program or its derivative works. These actions are
188 prohibited by law if you do not accept this License. Therefore, by
189 modifying or distributing the Program (or any work based on the
190 Program), you indicate your acceptance of this License to do so, and
191 all its terms and conditions for copying, distributing or modifying
192 the Program or works based on it.
193
194 6. Each time you redistribute the Program (or any work based on the
195 Program), the recipient automatically receives a license from the
196 original licensor to copy, distribute or modify the Program subject to
197 these terms and conditions. You may not impose any further
198 restrictions on the recipients' exercise of the rights granted herein.
199 You are not responsible for enforcing compliance by third parties to
200 this License.
201
202 7. If, as a consequence of a court judgment or allegation of patent
203 infringement or for any other reason (not limited to patent issues),
204 conditions are imposed on you (whether by court order, agreement or
205 otherwise) that contradict the conditions of this License, they do not
206 excuse you from the conditions of this License. If you cannot
207 distribute so as to satisfy simultaneously your obligations under this
208 License and any other pertinent obligations, then as a consequence you
209 may not distribute the Program at all. For example, if a patent
210 license would not permit royalty-free redistribution of the Program by
211 all those who receive copies directly or indirectly through you, then
212 the only way you could satisfy both it and this License would be to
213 refrain entirely from distribution of the Program.
214
215 If any portion of this section is held invalid or unenforceable under
216 any particular circumstance, the balance of the section is intended to
217 apply and the section as a whole is intended to apply in other
218 circumstances.
219
220 It is not the purpose of this section to induce you to infringe any
221 patents or other property right claims or to contest validity of any
222 such claims; this section has the sole purpose of protecting the
223 integrity of the free software distribution system, which is
224 implemented by public license practices. Many people have made
225 generous contributions to the wide range of software distributed
226 through that system in reliance on consistent application of that
227 system; it is up to the author/donor to decide if he or she is willing
228 to distribute software through any other system and a licensee cannot
229 impose that choice.
230
231 This section is intended to make thoroughly clear what is believed to
232 be a consequence of the rest of this License.
233
234 8. If the distribution and/or use of the Program is restricted in
235 certain countries either by patents or by copyrighted interfaces, the
236 original copyright holder who places the Program under this License
237 may add an explicit geographical distribution limitation excluding
238 those countries, so that distribution is permitted only in or among
239 countries not thus excluded. In such case, this License incorporates
240 the limitation as if written in the body of this License.
241
242 9. The Free Software Foundation may publish revised and/or new versions
243 of the General Public License from time to time. Such new versions will
244 be similar in spirit to the present version, but may differ in detail to
245 address new problems or concerns.
246
247 Each version is given a distinguishing version number. If the Program
248 specifies a version number of this License which applies to it and "any
249 later version", you have the option of following the terms and conditions
250 either of that version or of any later version published by the Free
251 Software Foundation. If the Program does not specify a version number of
252 this License, you may choose any version ever published by the Free Software
253 Foundation.
254
255 10. If you wish to incorporate parts of the Program into other free
256 programs whose distribution conditions are different, write to the author
257 to ask for permission. For software which is copyrighted by the Free
258 Software Foundation, write to the Free Software Foundation; we sometimes
259 make exceptions for this. Our decision will be guided by the two goals
260 of preserving the free status of all derivatives of our free software and
261 of promoting the sharing and reuse of software generally.
262
263 NO WARRANTY
264
265 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
266 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
267 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
268 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
269 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
270 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
271 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
272 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
273 REPAIR OR CORRECTION.
274
275 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
276 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
277 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
278 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
279 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
280 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
281 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
282 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
283 POSSIBILITY OF SUCH DAMAGES.
284
285 END OF TERMS AND CONDITIONS
286
287 How to Apply These Terms to Your New Programs
288
289 If you develop a new program, and you want it to be of the greatest
290 possible use to the public, the best way to achieve this is to make it
291 free software which everyone can redistribute and change under these terms.
292
293 To do so, attach the following notices to the program. It is safest
294 to attach them to the start of each source file to most effectively
295 convey the exclusion of warranty; and each file should have at least
296 the "copyright" line and a pointer to where the full notice is found.
297
298 <one line to give the program's name and a brief idea of what it does.>
299 Copyright (C) <year> <name of author>
300
301 This program is free software; you can redistribute it and/or modify
302 it under the terms of the GNU General Public License as published by
303 the Free Software Foundation; either version 2 of the License, or
304 (at your option) any later version.
305
306 This program is distributed in the hope that it will be useful,
307 but WITHOUT ANY WARRANTY; without even the implied warranty of
308 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
309 GNU General Public License for more details.
310
311 You should have received a copy of the GNU General Public License along
312 with this program; if not, write to the Free Software Foundation, Inc.,
313 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
314
315 Also add information on how to contact you by electronic and paper mail.
316
317 If the program is interactive, make it output a short notice like this
318 when it starts in an interactive mode:
319
320 Gnomovision version 69, Copyright (C) year name of author
321 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
322 This is free software, and you are welcome to redistribute it
323 under certain conditions; type `show c' for details.
324
325 The hypothetical commands `show w' and `show c' should show the appropriate
326 parts of the General Public License. Of course, the commands you use may
327 be called something other than `show w' and `show c'; they could even be
328 mouse-clicks or menu items--whatever suits your program.
329
330 You should also get your employer (if you work as a programmer) or your
331 school, if any, to sign a "copyright disclaimer" for the program, if
332 necessary. Here is a sample; alter the names:
333
334 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
335 `Gnomovision' (which makes passes at compilers) written by James Hacker.
336
337 <signature of Ty Coon>, 1 April 1989
338 Ty Coon, President of Vice
339
340 This General Public License does not permit incorporating your program into
341 proprietary programs. If your program is a subroutine library, you may
342 consider it more useful to permit linking proprietary applications with the
343 library. If this is what you want to do, use the GNU Lesser General
344 Public License instead of this License.
345
346 ---------------------------------------------------------------------------
347
348 GNU LIBRARY GENERAL PUBLIC LICENSE
349 Version 2, June 1991
350
351 Copyright (C) 1991 Free Software Foundation, Inc.
352 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
353 Everyone is permitted to copy and distribute verbatim copies
354 of this license document, but changing it is not allowed.
355
356 [This is the first released version of the library GPL. It is
357 numbered 2 because it goes with version 2 of the ordinary GPL.]
358
359 Preamble
360
361 The licenses for most software are designed to take away your
362 freedom to share and change it. By contrast, the GNU General Public
363 Licenses are intended to guarantee your freedom to share and change
364 free software--to make sure the software is free for all its users.
365
366 This license, the Library General Public License, applies to some
367 specially designated Free Software Foundation software, and to any
368 other libraries whose authors decide to use it. You can use it for
369 your libraries, too.
370
371 When we speak of free software, we are referring to freedom, not
372 price. Our General Public Licenses are designed to make sure that you
373 have the freedom to distribute copies of free software (and charge for
374 this service if you wish), that you receive source code or can get it
375 if you want it, that you can change the software or use pieces of it
376 in new free programs; and that you know you can do these things.
377
378 To protect your rights, we need to make restrictions that forbid
379 anyone to deny you these rights or to ask you to surrender the rights.
380 These restrictions translate to certain responsibilities for you if
381 you distribute copies of the library, or if you modify it.
382
383 For example, if you distribute copies of the library, whether gratis
384 or for a fee, you must give the recipients all the rights that we gave
385 you. You must make sure that they, too, receive or can get the source
386 code. If you link a program with the library, you must provide
387 complete object files to the recipients so that they can relink them
388 with the library, after making changes to the library and recompiling
389 it. And you must show them these terms so they know their rights.
390
391 Our method of protecting your rights has two steps: (1) copyright
392 the library, and (2) offer you this license which gives you legal
393 permission to copy, distribute and/or modify the library.
394
395 Also, for each distributor's protection, we want to make certain
396 that everyone understands that there is no warranty for this free
397 library. If the library is modified by someone else and passed on, we
398 want its recipients to know that what they have is not the original
399 version, so that any problems introduced by others will not reflect on
400 the original authors' reputations.
401
402 Finally, any free program is threatened constantly by software
403 patents. We wish to avoid the danger that companies distributing free
404 software will individually obtain patent licenses, thus in effect
405 transforming the program into proprietary software. To prevent this,
406 we have made it clear that any patent must be licensed for everyone's
407 free use or not licensed at all.
408
409 Most GNU software, including some libraries, is covered by the ordinary
410 GNU General Public License, which was designed for utility programs. This
411 license, the GNU Library General Public License, applies to certain
412 designated libraries. This license is quite different from the ordinary
413 one; be sure to read it in full, and don't assume that anything in it is
414 the same as in the ordinary license.
415
416 The reason we have a separate public license for some libraries is that
417 they blur the distinction we usually make between modifying or adding to a
418 program and simply using it. Linking a program with a library, without
419 changing the library, is in some sense simply using the library, and is
420 analogous to running a utility program or application program. However, in
421 a textual and legal sense, the linked executable is a combined work, a
422 derivative of the original library, and the ordinary General Public License
423 treats it as such.
424
425 Because of this blurred distinction, using the ordinary General
426 Public License for libraries did not effectively promote software
427 sharing, because most developers did not use the libraries. We
428 concluded that weaker conditions might promote sharing better.
429
430 However, unrestricted linking of non-free programs would deprive the
431 users of those programs of all benefit from the free status of the
432 libraries themselves. This Library General Public License is intended to
433 permit developers of non-free programs to use free libraries, while
434 preserving your freedom as a user of such programs to change the free
435 libraries that are incorporated in them. (We have not seen how to achieve
436 this as regards changes in header files, but we have achieved it as regards
437 changes in the actual functions of the Library.) The hope is that this
438 will lead to faster development of free libraries.
439
440 The precise terms and conditions for copying, distribution and
441 modification follow. Pay close attention to the difference between a
442 "work based on the library" and a "work that uses the library". The
443 former contains code derived from the library, while the latter only
444 works together with the library.
445
446 Note that it is possible for a library to be covered by the ordinary
447 General Public License rather than by this special one.
448
449 GNU LIBRARY GENERAL PUBLIC LICENSE
450 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
451
452 0. This License Agreement applies to any software library which
453 contains a notice placed by the copyright holder or other authorized
454 party saying it may be distributed under the terms of this Library
455 General Public License (also called "this License"). Each licensee is
456 addressed as "you".
457
458 A "library" means a collection of software functions and/or data
459 prepared so as to be conveniently linked with application programs
460 (which use some of those functions and data) to form executables.
461
462 The "Library", below, refers to any such software library or work
463 which has been distributed under these terms. A "work based on the
464 Library" means either the Library or any derivative work under
465 copyright law: that is to say, a work containing the Library or a
466 portion of it, either verbatim or with modifications and/or translated
467 straightforwardly into another language. (Hereinafter, translation is
468 included without limitation in the term "modification".)
469
470 "Source code" for a work means the preferred form of the work for
471 making modifications to it. For a library, complete source code means
472 all the source code for all modules it contains, plus any associated
473 interface definition files, plus the scripts used to control compilation
474 and installation of the library.
475
476 Activities other than copying, distribution and modification are not
477 covered by this License; they are outside its scope. The act of
478 running a program using the Library is not restricted, and output from
479 such a program is covered only if its contents constitute a work based
480 on the Library (independent of the use of the Library in a tool for
481 writing it). Whether that is true depends on what the Library does
482 and what the program that uses the Library does.
483
484 1. You may copy and distribute verbatim copies of the Library's
485 complete source code as you receive it, in any medium, provided that
486 you conspicuously and appropriately publish on each copy an
487 appropriate copyright notice and disclaimer of warranty; keep intact
488 all the notices that refer to this License and to the absence of any
489 warranty; and distribute a copy of this License along with the
490 Library.
491
492 You may charge a fee for the physical act of transferring a copy,
493 and you may at your option offer warranty protection in exchange for a
494 fee.
495
496 2. You may modify your copy or copies of the Library or any portion
497 of it, thus forming a work based on the Library, and copy and
498 distribute such modifications or work under the terms of Section 1
499 above, provided that you also meet all of these conditions:
500
501 a) The modified work must itself be a software library.
502
503 b) You must cause the files modified to carry prominent notices
504 stating that you changed the files and the date of any change.
505
506 c) You must cause the whole of the work to be licensed at no
507 charge to all third parties under the terms of this License.
508
509 d) If a facility in the modified Library refers to a function or a
510 table of data to be supplied by an application program that uses
511 the facility, other than as an argument passed when the facility
512 is invoked, then you must make a good faith effort to ensure that,
513 in the event an application does not supply such function or
514 table, the facility still operates, and performs whatever part of
515 its purpose remains meaningful.
516
517 (For example, a function in a library to compute square roots has
518 a purpose that is entirely well-defined independent of the
519 application. Therefore, Subsection 2d requires that any
520 application-supplied function or table used by this function must
521 be optional: if the application does not supply it, the square
522 root function must still compute square roots.)
523
524 These requirements apply to the modified work as a whole. If
525 identifiable sections of that work are not derived from the Library,
526 and can be reasonably considered independent and separate works in
527 themselves, then this License, and its terms, do not apply to those
528 sections when you distribute them as separate works. But when you
529 distribute the same sections as part of a whole which is a work based
530 on the Library, the distribution of the whole must be on the terms of
531 this License, whose permissions for other licensees extend to the
532 entire whole, and thus to each and every part regardless of who wrote
533 it.
534
535 Thus, it is not the intent of this section to claim rights or contest
536 your rights to work written entirely by you; rather, the intent is to
537 exercise the right to control the distribution of derivative or
538 collective works based on the Library.
539
540 In addition, mere aggregation of another work not based on the Library
541 with the Library (or with a work based on the Library) on a volume of
542 a storage or distribution medium does not bring the other work under
543 the scope of this License.
544
545 3. You may opt to apply the terms of the ordinary GNU General Public
546 License instead of this License to a given copy of the Library. To do
547 this, you must alter all the notices that refer to this License, so
548 that they refer to the ordinary GNU General Public License, version 2,
549 instead of to this License. (If a newer version than version 2 of the
550 ordinary GNU General Public License has appeared, then you can specify
551 that version instead if you wish.) Do not make any other change in
552 these notices.
553
554 Once this change is made in a given copy, it is irreversible for
555 that copy, so the ordinary GNU General Public License applies to all
556 subsequent copies and derivative works made from that copy.
557
558 This option is useful when you wish to copy part of the code of
559 the Library into a program that is not a library.
560
561 4. You may copy and distribute the Library (or a portion or
562 derivative of it, under Section 2) in object code or executable form
563 under the terms of Sections 1 and 2 above provided that you accompany
564 it with the complete corresponding machine-readable source code, which
565 must be distributed under the terms of Sections 1 and 2 above on a
566 medium customarily used for software interchange.
567
568 If distribution of object code is made by offering access to copy
569 from a designated place, then offering equivalent access to copy the
570 source code from the same place satisfies the requirement to
571 distribute the source code, even though third parties are not
572 compelled to copy the source along with the object code.
573
574 5. A program that contains no derivative of any portion of the
575 Library, but is designed to work with the Library by being compiled or
576 linked with it, is called a "work that uses the Library". Such a
577 work, in isolation, is not a derivative work of the Library, and
578 therefore falls outside the scope of this License.
579
580 However, linking a "work that uses the Library" with the Library
581 creates an executable that is a derivative of the Library (because it
582 contains portions of the Library), rather than a "work that uses the
583 library". The executable is therefore covered by this License.
584 Section 6 states terms for distribution of such executables.
585
586 When a "work that uses the Library" uses material from a header file
587 that is part of the Library, the object code for the work may be a
588 derivative work of the Library even though the source code is not.
589 Whether this is true is especially significant if the work can be
590 linked without the Library, or if the work is itself a library. The
591 threshold for this to be true is not precisely defined by law.
592
593 If such an object file uses only numerical parameters, data
594 structure layouts and accessors, and small macros and small inline
595 functions (ten lines or less in length), then the use of the object
596 file is unrestricted, regardless of whether it is legally a derivative
597 work. (Executables containing this object code plus portions of the
598 Library will still fall under Section 6.)
599
600 Otherwise, if the work is a derivative of the Library, you may
601 distribute the object code for the work under the terms of Section 6.
602 Any executables containing that work also fall under Section 6,
603 whether or not they are linked directly with the Library itself.
604
605 6. As an exception to the Sections above, you may also compile or
606 link a "work that uses the Library" with the Library to produce a
607 work containing portions of the Library, and distribute that work
608 under terms of your choice, provided that the terms permit
609 modification of the work for the customer's own use and reverse
610 engineering for debugging such modifications.
611
612 You must give prominent notice with each copy of the work that the
613 Library is used in it and that the Library and its use are covered by
614 this License. You must supply a copy of this License. If the work
615 during execution displays copyright notices, you must include the
616 copyright notice for the Library among them, as well as a reference
617 directing the user to the copy of this License. Also, you must do one
618 of these things:
619
620 a) Accompany the work with the complete corresponding
621 machine-readable source code for the Library including whatever
622 changes were used in the work (which must be distributed under
623 Sections 1 and 2 above); and, if the work is an executable linked
624 with the Library, with the complete machine-readable "work that
625 uses the Library", as object code and/or source code, so that the
626 user can modify the Library and then relink to produce a modified
627 executable containing the modified Library. (It is understood
628 that the user who changes the contents of definitions files in the
629 Library will not necessarily be able to recompile the application
630 to use the modified definitions.)
631
632 b) Accompany the work with a written offer, valid for at
633 least three years, to give the same user the materials
634 specified in Subsection 6a, above, for a charge no more
635 than the cost of performing this distribution.
636
637 c) If distribution of the work is made by offering access to copy
638 from a designated place, offer equivalent access to copy the above
639 specified materials from the same place.
640
641 d) Verify that the user has already received a copy of these
642 materials or that you have already sent this user a copy.
643
644 For an executable, the required form of the "work that uses the
645 Library" must include any data and utility programs needed for
646 reproducing the executable from it. However, as a special exception,
647 the source code distributed need not include anything that is normally
648 distributed (in either source or binary form) with the major
649 components (compiler, kernel, and so on) of the operating system on
650 which the executable runs, unless that component itself accompanies
651 the executable.
652
653 It may happen that this requirement contradicts the license
654 restrictions of other proprietary libraries that do not normally
655 accompany the operating system. Such a contradiction means you cannot
656 use both them and the Library together in an executable that you
657 distribute.
658
659 7. You may place library facilities that are a work based on the
660 Library side-by-side in a single library together with other library
661 facilities not covered by this License, and distribute such a combined
662 library, provided that the separate distribution of the work based on
663 the Library and of the other library facilities is otherwise
664 permitted, and provided that you do these two things:
665
666 a) Accompany the combined library with a copy of the same work
667 based on the Library, uncombined with any other library
668 facilities. This must be distributed under the terms of the
669 Sections above.
670
671 b) Give prominent notice with the combined library of the fact
672 that part of it is a work based on the Library, and explaining
673 where to find the accompanying uncombined form of the same work.
674
675 8. You may not copy, modify, sublicense, link with, or distribute
676 the Library except as expressly provided under this License. Any
677 attempt otherwise to copy, modify, sublicense, link with, or
678 distribute the Library is void, and will automatically terminate your
679 rights under this License. However, parties who have received copies,
680 or rights, from you under this License will not have their licenses
681 terminated so long as such parties remain in full compliance.
682
683 9. You are not required to accept this License, since you have not
684 signed it. However, nothing else grants you permission to modify or
685 distribute the Library or its derivative works. These actions are
686 prohibited by law if you do not accept this License. Therefore, by
687 modifying or distributing the Library (or any work based on the
688 Library), you indicate your acceptance of this License to do so, and
689 all its terms and conditions for copying, distributing or modifying
690 the Library or works based on it.
691
692 10. Each time you redistribute the Library (or any work based on the
693 Library), the recipient automatically receives a license from the
694 original licensor to copy, distribute, link with or modify the Library
695 subject to these terms and conditions. You may not impose any further
696 restrictions on the recipients' exercise of the rights granted herein.
697 You are not responsible for enforcing compliance by third parties to
698 this License.
699
700 11. If, as a consequence of a court judgment or allegation of patent
701 infringement or for any other reason (not limited to patent issues),
702 conditions are imposed on you (whether by court order, agreement or
703 otherwise) that contradict the conditions of this License, they do not
704 excuse you from the conditions of this License. If you cannot
705 distribute so as to satisfy simultaneously your obligations under this
706 License and any other pertinent obligations, then as a consequence you
707 may not distribute the Library at all. For example, if a patent
708 license would not permit royalty-free redistribution of the Library by
709 all those who receive copies directly or indirectly through you, then
710 the only way you could satisfy both it and this License would be to
711 refrain entirely from distribution of the Library.
712
713 If any portion of this section is held invalid or unenforceable under any
714 particular circumstance, the balance of the section is intended to apply,
715 and the section as a whole is intended to apply in other circumstances.
716
717 It is not the purpose of this section to induce you to infringe any
718 patents or other property right claims or to contest validity of any
719 such claims; this section has the sole purpose of protecting the
720 integrity of the free software distribution system which is
721 implemented by public license practices. Many people have made
722 generous contributions to the wide range of software distributed
723 through that system in reliance on consistent application of that
724 system; it is up to the author/donor to decide if he or she is willing
725 to distribute software through any other system and a licensee cannot
726 impose that choice.
727
728 This section is intended to make thoroughly clear what is believed to
729 be a consequence of the rest of this License.
730
731 12. If the distribution and/or use of the Library is restricted in
732 certain countries either by patents or by copyrighted interfaces, the
733 original copyright holder who places the Library under this License may add
734 an explicit geographical distribution limitation excluding those countries,
735 so that distribution is permitted only in or among countries not thus
736 excluded. In such case, this License incorporates the limitation as if
737 written in the body of this License.
738
739 13. The Free Software Foundation may publish revised and/or new
740 versions of the Library General Public License from time to time.
741 Such new versions will be similar in spirit to the present version,
742 but may differ in detail to address new problems or concerns.
743
744 Each version is given a distinguishing version number. If the Library
745 specifies a version number of this License which applies to it and
746 "any later version", you have the option of following the terms and
747 conditions either of that version or of any later version published by
748 the Free Software Foundation. If the Library does not specify a
749 license version number, you may choose any version ever published by
750 the Free Software Foundation.
751
752 14. If you wish to incorporate parts of the Library into other free
753 programs whose distribution conditions are incompatible with these,
754 write to the author to ask for permission. For software which is
755 copyrighted by the Free Software Foundation, write to the Free
756 Software Foundation; we sometimes make exceptions for this. Our
757 decision will be guided by the two goals of preserving the free status
758 of all derivatives of our free software and of promoting the sharing
759 and reuse of software generally.
760
761 NO WARRANTY
762
763 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
764 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
765 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
766 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
767 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
768 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
769 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
770 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
771 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
772
773 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
774 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
775 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
776 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
777 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
778 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
779 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
780 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
781 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
782 DAMAGES.
783
784 END OF TERMS AND CONDITIONS
785
786 How to Apply These Terms to Your New Libraries
787
788 If you develop a new library, and you want it to be of the greatest
789 possible use to the public, we recommend making it free software that
790 everyone can redistribute and change. You can do so by permitting
791 redistribution under these terms (or, alternatively, under the terms of the
792 ordinary General Public License).
793
794 To apply these terms, attach the following notices to the library. It is
795 safest to attach them to the start of each source file to most effectively
796 convey the exclusion of warranty; and each file should have at least the
797 "copyright" line and a pointer to where the full notice is found.
798
799 <one line to give the library's name and a brief idea of what it does.>
800 Copyright (C) <year> <name of author>
801
802 This library is free software; you can redistribute it and/or
803 modify it under the terms of the GNU Library General Public
804 License as published by the Free Software Foundation; either
805 version 2 of the License, or (at your option) any later version.
806
807 This library is distributed in the hope that it will be useful,
808 but WITHOUT ANY WARRANTY; without even the implied warranty of
809 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
810 Library General Public License for more details.
811
812 You should have received a copy of the GNU Library General Public
813 License along with this library; if not, write to the Free
814 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
815
816 Also add information on how to contact you by electronic and paper mail.
817
818 You should also get your employer (if you work as a programmer) or your
819 school, if any, to sign a "copyright disclaimer" for the library, if
820 necessary. Here is a sample; alter the names:
821
822 Yoyodyne, Inc., hereby disclaims all copyright interest in the
823 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
824
825 <signature of Ty Coon>, 1 April 1990
826 Ty Coon, President of Vice
827
828 That's all there is to it!
1 under the terms of either GPL 2.0+ or LGPL 2.1+.
00 NAME:
1 Java API Compliance Checker (Java ACC) - a tool for checking backward binary and source-level compatibility of a Java library API.
1 Java API Compliance Checker (Java APICC) - a tool for checking backward binary and source-level compatibility of a Java library API.
22
33 The tool checks classes declarations of old and new versions and analyzes changes that may break compatibility: removed methods, removed class fields, added abstract methods, etc. The tool is intended for developers of software libraries and Linux maintainers who are interested in ensuring backward compatibility.
44
00 #!/usr/bin/perl
11 ###########################################################################
2 # Java API Compliance Checker (Java ACC) 1.4.3
2 # Java API Compliance Checker (Java APICC) 1.5
33 # A tool for checking backward compatibility of a Java library API
44 #
55 # Written by Andrey Ponomarenko
6 # LinkedIn: http://www.linkedin.com/pub/andrey-ponomarenko/67/366/818
76 #
87 # Copyright (C) 2011 Institute for System Programming, RAS
9 # Copyright (C) 2011-2015 Andrey Ponomarenko's ABI Laboratory
8 # Copyright (C) 2011-2016 Andrey Ponomarenko's ABI Laboratory
109 #
1110 # PLATFORMS
1211 # =========
4443 use Data::Dumper;
4544 use Config;
4645
47 my $TOOL_VERSION = "1.4.3";
48 my $API_DUMP_VERSION = "1.0";
46 my $TOOL_VERSION = "1.5";
47 my $API_DUMP_VERSION = "2.0";
4948 my $API_DUMP_MAJOR = majorVersion($API_DUMP_VERSION);
5049
5150 my ($Help, $ShowVersion, %Descriptor, $TargetLibraryName, $CheckSeparately,
5554 $SourceReportPath, $Debug, $Quick, $SortDump, $SkipDeprecated, $SkipClassesList,
5655 $ShowAccess, $AffectLimit, $JdkPath, $SkipInternal, $HideTemplates,
5756 $HidePackages, $ShowPackages, $Minimal, $AnnotationsListPath,
58 $SkipPackagesList);
57 $SkipPackagesList, $OutputDumpPath, $AllAffected);
5958
6059 my $CmdName = get_filename($0);
6160 my $OSgroup = get_OSgroup();
9392 "Wiki"=>"http://ispras.linuxbase.org/index.php/Java_API_Compliance_Checker"
9493 );
9594
96 my $ShortUsage = "Java API Compliance Checker (Java ACC) $TOOL_VERSION
95 my $ShortUsage = "Java API Compliance Checker (Java APICC) $TOOL_VERSION
9796 A tool for checking backward compatibility of a Java library API
98 Copyright (C) 2015 Andrey Ponomarenko's ABI Laboratory
97 Copyright (C) 2016 Andrey Ponomarenko's ABI Laboratory
9998 License: GNU LGPL or GNU GPL
10099
101100 Usage: $CmdName [options]
138137 "d2|new|n=s" => \$Descriptor{2}{"Path"},
139138 # extra options
140139 "client|app=s" => \$ClientPath,
141 "binary!" => \$BinaryOnly,
142 "source!" => \$SourceOnly,
143 "v1|version1=s" => \$TargetVersion{1},
140 "binary|bin!" => \$BinaryOnly,
141 "source|src!" => \$SourceOnly,
142 "v1|version1|vnum=s" => \$TargetVersion{1},
144143 "v2|version2=s" => \$TargetVersion{2},
145144 "s|strict!" => \$StrictCompat,
146145 "keep-internal!" => \$KeepInternal,
152151 "skip-classes=s" => \$SkipClassesList,
153152 "skip-packages=s" => \$SkipPackagesList,
154153 "short" => \$ShortMode,
154 "dump-path=s" => \$OutputDumpPath,
155155 "report-path=s" => \$OutputReportPath,
156156 "bin-report-path=s" => \$BinaryReportPath,
157157 "src-report-path=s" => \$SourceReportPath,
164164 # other options
165165 "test!" => \$TestSystem,
166166 "debug!" => \$Debug,
167 "title|l-full|lib-full=s" => \$TargetTitle,
167 "title=s" => \$TargetTitle,
168168 "jdk-path=s" => \$JdkPath,
169 "all-affected!" => \$AllAffected,
169170 # deprecated
170171 "minimal!" => \$Minimal,
171172 "hide-packages!" => \$HidePackages
197198 Check backward compatibility of a Java library API
198199
199200 DESCRIPTION:
200 Java API Compliance Checker (Java ACC) is a tool for checking backward
201 Java API Compliance Checker (Java APICC) is a tool for checking backward
201202 binary/source compatibility of a Java library API. The tool checks classes
202203 declarations of old and new versions and analyzes changes that may break
203204 compatibility: removed class members, added abstract methods, etc. Breakage
206207 new one. Breakage of the source compatibility may result in recompilation
207208 errors with a new library version.
208209
209 Java ACC is intended for library developers and operating system maintainers
210 Java APICC is intended for library developers and operating system maintainers
210211 who are interested in ensuring backward compatibility (i.e. allow old clients
211212 to run or to be recompiled with a new version of a library).
212213
266267 ...
267268
268269 3. API dump generated by -dump option
269 4. Directory with Java ARchives
270 5. Comma separated list of Java ARchives
271 6. Comma separated list of directories with Java ARchives
272270
273271 If you are using 1, 4-6 descriptor types then you should
274272 specify version numbers with -v1 and -v2 options too.
284282 This option allows to specify the client Java ARchive that should be
285283 checked for portability to the new library version.
286284
287 -binary
285 -binary|-bin
288286 Show \"Binary\" compatibility problems only.
289287 Generate report to \"bin_compat_report.html\".
290288
291 -source
289 -source|-src
292290 Show \"Source\" compatibility problems only.
293291 Generate report to \"src_compat_report.html\".
294292
303301
304302 -v2|-version2 NUM
305303 Specify 2nd library version outside the descriptor.
304
305 -vnum NUM
306 Specify the library version in the generated API dump.
306307
307308 -s|-strict
308309 Treat all API compatibility warnings as problems.
349350
350351 -short PATH
351352 Generate short report without 'Added Methods' section.
353
354 -dump-path PATH
355 Specify a *.api.$AR_EXT or *.api file path where to generate an API dump.
356 Default:
357 abi_dumps/LIB_NAME/LIB_NAME_VERSION.api.$AR_EXT
352358
353359 -report-path PATH
354360 Path to compatibility report.
659665 my %SkippedPackage;
660666
661667 #Report
662 my %Type_MaxPriority;
668 my %TypeChanges;
663669
664670 #Recursion locks
665671 my @RecurSymlink;
673679 my %CompatProblems;
674680 my %TotalAffected;
675681
682 #Speedup
683 my %TypeProblemsIndex;
684
676685 #Rerort
677686 my $ContentID = 1;
678 my $ContentSpanStart = "<span class=\"section\" onclick=\"javascript:showContent(this, 'CONTENT_ID')\">\n";
679 my $ContentSpanStart_Affected = "<span class=\"section_affected\" onclick=\"javascript:showContent(this, 'CONTENT_ID')\">\n";
687 my $ContentSpanStart = "<span class=\"section\" onclick=\"showContent(this, 'CONTENT_ID')\">\n";
688 my $ContentSpanStart_Affected = "<span class=\"section_affected\" onclick=\"showContent(this, 'CONTENT_ID')\">\n";
680689 my $ContentSpanEnd = "</span>\n";
681690 my $ContentDivStart = "<div id=\"CONTENT_ID\" style=\"display:none;\">\n";
682691 my $ContentDivEnd = "</div>\n";
10531062 {
10541063 my $Path = $_[0];
10551064 return "" if(not $Path or not -e $Path);
1065
1066 if(isDumpFile($Path)) {
1067 return $Path;
1068 }
1069
10561070 $Path = get_abs_path($Path);
10571071 $Path = path_format($Path, $OSgroup);
10581072 my ($Dir, $FileName) = separate_path($Path);
11921206 sub findFieldPair($$)
11931207 {
11941208 my ($Field_Pos, $Pair_Type) = @_;
1195 foreach my $Pair_Name (keys(%{$Pair_Type->{"Fields"}}))
1209 foreach my $Pair_Name (sort keys(%{$Pair_Type->{"Fields"}}))
11961210 {
11971211 if(defined $Pair_Type->{"Fields"}{$Pair_Name})
11981212 {
12111225 "Safe"=>-1
12121226 );
12131227
1214 sub maxSeverity($$)
1215 {
1216 my ($S1, $S2) = @_;
1217 if(cmpSeverities($S1, $S2)) {
1218 return $S1;
1219 }
1220 else {
1221 return $S2;
1222 }
1223 }
1224
1225 sub cmpSeverities($$)
1226 {
1227 my ($S1, $S2) = @_;
1228 if(not $S1) {
1229 return 0;
1230 }
1231 elsif(not $S2) {
1232 return 1;
1233 }
1234 return ($Severity_Val{$S1}>$Severity_Val{$S2});
1235 }
1236
12371228 sub getProblemSeverity($$$$)
12381229 {
12391230 my ($Level, $Kind, $TypeName, $Target) = @_;
13441335 sub mergeTypes($$)
13451336 {
13461337 my ($Type1_Id, $Type2_Id) = @_;
1347 return () if(not $Type1_Id or not $Type2_Id);
1348 my (%Sub_SubProblems, %SubProblems) = ();
1349 return %{$Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id}} if($Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id});
1338 return {} if(not $Type1_Id or not $Type2_Id);
1339
1340 if(defined $Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id})
1341 { # already merged
1342 return $Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id};
1343 }
1344
13501345 my %Type1 = get_Type($Type1_Id, 1);
13511346 my %Type2 = get_Type($Type2_Id, 2);
13521347 if(isRecurType($Type1_Id, $Type2_Id))
13531348 { # do not follow to recursive declarations
1354 return ();
1355 }
1356 return () if(not $Type1{"Name"} or not $Type2{"Name"});
1357 return () if(not $Type1{"Archive"} or not $Type2{"Archive"});
1358 return () if($Type1{"Name"} ne $Type2{"Name"});
1359 return () if(skip_package($Type1{"Package"}, 1));
1349 return {};
1350 }
1351 return {} if(not $Type1{"Name"} or not $Type2{"Name"});
1352 return {} if(not $Type1{"Archive"} or not $Type2{"Archive"});
1353 return {} if($Type1{"Name"} ne $Type2{"Name"});
1354 return {} if(skip_package($Type1{"Package"}, 1));
1355
13601356 $CheckedTypes{$Type1{"Name"}} = 1;
1357
1358 my %SubProblems = ();
1359
13611360 if($Type1{"BaseType"} and $Type2{"BaseType"})
13621361 { # check base type (arrays)
13631362 return mergeTypes($Type1{"BaseType"}, $Type2{"BaseType"});
13641363 }
1365 return () if($Type2{"Type"}!~/(class|interface)/);
1364
1365 if($Type2{"Type"}!~/(class|interface)/) {
1366 return {};
1367 }
1368
13661369 if($Type1{"Type"} eq "class" and not $Class_Constructed{1}{$Type1_Id})
13671370 { # class cannot be constructed or inherited by clients
1368 return ();
1369 }
1371 return {};
1372 }
1373
13701374 if($Type1{"Type"} eq "class"
13711375 and $Type2{"Type"} eq "interface")
13721376 {
13731377 %{$SubProblems{"Class_Became_Interface"}{""}}=(
13741378 "Type_Name"=>$Type1{"Name"} );
1375 %{$Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id}} = %SubProblems;
1376 pop(@RecurTypes);
1377 return %SubProblems;
1379
1380 return ($Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id} = \%SubProblems);
13781381 }
13791382 if($Type1{"Type"} eq "interface"
13801383 and $Type2{"Type"} eq "class")
13811384 {
13821385 %{$SubProblems{"Interface_Became_Class"}{""}}=(
13831386 "Type_Name"=>$Type1{"Name"} );
1384 %{$Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id}} = %SubProblems;
1385 pop(@RecurTypes);
1386 return %SubProblems;
1387
1388 return ($Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id} = \%SubProblems);
13871389 }
13881390 if(not $Type1{"Final"}
13891391 and $Type2{"Final"})
13981400 %{$SubProblems{"Class_Became_Abstract"}{""}}=(
13991401 "Type_Name"=>$Type1{"Name"} );
14001402 }
1403
14011404 pushType($Type1_Id, $Type2_Id);
1405
14021406 foreach my $AddedMethod (keys(%{$AddedMethod_Abstract{$Type1{"Name"}}}))
14031407 {
14041408 if($Type1{"Type"} eq "class")
14061410 if($Type1{"Abstract"})
14071411 {
14081412 my $Add_Effect = "";
1409 if(my @InvokedBy = keys(%{$MethodInvoked{2}{$AddedMethod}}))
1413 if(my @InvokedBy = sort keys(%{$MethodInvoked{2}{$AddedMethod}}))
14101414 {
14111415 my $MFirst = $InvokedBy[0];
14121416 $Add_Effect = " Added abstract method is called in 2nd library version by the method ".black_Name($MFirst, 1)." and may not be implemented by old clients.";
14281432 else
14291433 {
14301434 my $Add_Effect = "";
1431 if(my @InvokedBy = keys(%{$MethodInvoked{2}{$AddedMethod}}))
1435 if(my @InvokedBy = sort keys(%{$MethodInvoked{2}{$AddedMethod}}))
14321436 {
14331437 my $MFirst = $InvokedBy[0];
14341438 $Add_Effect = " Added abstract method is called in 2nd library version by the method ".black_Name($MFirst, 1)." and may not be implemented by old clients.";
14741478 and keys(%{$Class_AbstractMethods{2}{$SuperClass2{"Name"}}}))
14751479 {
14761480 my $Add_Effect = "";
1477 if(my @Invoked = keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
1481 if(my @Invoked = sort keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
14781482 {
14791483 my $MFirst = $Invoked[0];
14801484 my $MSignature = unmangle($MFirst);
15251529 or $SuperInterface=~/\Ajava\./)
15261530 {
15271531 my $Add_Effect = "";
1528 if(my @Invoked = keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
1532 if(my @Invoked = sort keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
15291533 {
15301534 my $MFirst = $Invoked[0];
15311535 my $MSignature = unmangle($MFirst);
15531557 if($Type1{"Abstract"} and $Type2{"Abstract"})
15541558 {
15551559 my $Add_Effect = "";
1556 if(my @Invoked = keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
1560 if(my @Invoked = sort keys(%{$ClassMethod_AddedInvoked{$Type1{"Name"}}}))
15571561 {
15581562 my $MFirst = $Invoked[0];
15591563 my $MSignature = unmangle($MFirst);
16011605 }
16021606 }
16031607 }
1604 foreach my $Field_Name (keys(%{$Type1{"Fields"}}))
1608
1609 foreach my $Field_Name (sort keys(%{$Type1{"Fields"}}))
16051610 {# check older fields
16061611 my $Access1 = $Type1{"Fields"}{$Field_Name}{"Access"};
1607 next if($Access1=~/private/);
1612 if($Access1=~/private/) {
1613 next;
1614 }
1615
16081616 my $Field_Pos1 = $Type1{"Fields"}{$Field_Name}{"Pos"};
16091617 my $FieldType1_Id = $Type1{"Fields"}{$Field_Name}{"Type"};
16101618 my %FieldType1 = get_Type($FieldType1_Id, 1);
1619
16111620 if(not $Type2{"Fields"}{$Field_Name})
16121621 {# removed fields
16131622 my $StraightPair_Name = findFieldPair($Field_Pos1, \%Type2);
17141723 "Old_Value"=>$Access1,
17151724 "New_Value"=>$Access2 );
17161725 }
1726
17171727 my $Value1 = get_ConstantValue($Type1{"Fields"}{$Field_Name}{"Value"}, $FieldType1{"Name"});
17181728 my $Value2 = get_ConstantValue($Type2{"Fields"}{$Field_Name}{"Value"}, $FieldType2{"Name"});
1729
17191730 if($Value1 ne $Value2)
17201731 {
17211732 if($Value1 and $Value2)
17321743 }
17331744 }
17341745 }
1735 %Sub_SubProblems = detectTypeChange($FieldType1_Id, $FieldType2_Id, "Field");
1736 foreach my $Sub_SubProblemType (keys(%Sub_SubProblems))
1746
1747 my %Sub_SubChanges = detectTypeChange($FieldType1_Id, $FieldType2_Id, "Field");
1748 foreach my $Sub_SubProblemType (keys(%Sub_SubChanges))
17371749 {
17381750 %{$SubProblems{$Sub_SubProblemType}{$Field_Name}}=(
17391751 "Target"=>$Field_Name,
1740 "Type_Name"=>$Type1{"Name"} );
1741 foreach my $Attr (keys(%{$Sub_SubProblems{$Sub_SubProblemType}}))
1742 {
1743 $SubProblems{$Sub_SubProblemType}{$Field_Name}{$Attr} = $Sub_SubProblems{$Sub_SubProblemType}{$Attr};
1744 }
1745 }
1752 "Type_Name"=>$Type1{"Name"});
1753
1754 foreach my $Attr (keys(%{$Sub_SubChanges{$Sub_SubProblemType}}))
1755 {
1756 $SubProblems{$Sub_SubProblemType}{$Field_Name}{$Attr} = $Sub_SubChanges{$Sub_SubProblemType}{$Attr};
1757 }
1758 }
1759
17461760 if($FieldType1_Id and $FieldType2_Id)
17471761 { # check field type change
1748 %Sub_SubProblems = mergeTypes($FieldType1_Id, $FieldType2_Id);
1749 foreach my $Sub_SubProblemType (keys(%Sub_SubProblems))
1750 {
1751 foreach my $Sub_SubLocation (keys(%{$Sub_SubProblems{$Sub_SubProblemType}}))
1762 my $Sub_SubProblems = mergeTypes($FieldType1_Id, $FieldType2_Id);
1763 my %DupProblems = ();
1764
1765 foreach my $Sub_SubProblemType (sort keys(%{$Sub_SubProblems}))
1766 {
1767 foreach my $Sub_SubLocation (sort {length($a)<=>length($b)} sort keys(%{$Sub_SubProblems->{$Sub_SubProblemType}}))
17521768 {
1769 if(not defined $AllAffected)
1770 {
1771 if(defined $DupProblems{$Sub_SubProblems->{$Sub_SubProblemType}{$Sub_SubLocation}}) {
1772 next;
1773 }
1774 }
1775
17531776 my $NewLocation = ($Sub_SubLocation)?$Field_Name.".".$Sub_SubLocation:$Field_Name;
1754 foreach my $Attr (keys(%{$Sub_SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}}))
1777 $SubProblems{$Sub_SubProblemType}{$NewLocation} = $Sub_SubProblems->{$Sub_SubProblemType}{$Sub_SubLocation};
1778
1779 if(not defined $AllAffected)
17551780 {
1756 $SubProblems{$Sub_SubProblemType}{$NewLocation}{$Attr} = $Sub_SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}{$Attr};
1781 $DupProblems{$Sub_SubProblems->{$Sub_SubProblemType}{$Sub_SubLocation}} = 1;
17571782 }
17581783 }
17591784 }
1760 }
1761 }
1785 %DupProblems = ();
1786 }
1787 }
1788
17621789 foreach my $Field_Name (sort keys(%{$Type2{"Fields"}}))
17631790 { # check added fields
1764 next if($Type2{"Fields"}{$Field_Name}{"Access"}=~/private/);
1791 if($Type2{"Fields"}{$Field_Name}{"Access"}=~/private/) {
1792 next;
1793 }
17651794 my $FieldPos2 = $Type2{"Fields"}{$Field_Name}{"Pos"};
17661795 my $FieldType2_Id = $Type2{"Fields"}{$Field_Name}{"Type"};
17671796 my %FieldType2 = get_Type($FieldType2_Id, 2);
1797
17681798 if(not $Type1{"Fields"}{$Field_Name})
17691799 {# added fields
17701800 my $StraightPair_Name = findFieldPair($FieldPos2, \%Type1);
17901820 }
17911821 }
17921822 }
1793 %{$Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id}} = %SubProblems;
1823
17941824 pop(@RecurTypes);
1795 return %SubProblems;
1825 return ($Cache{"mergeTypes"}{$Type1_Id}{$Type2_Id} = \%SubProblems);
17961826 }
17971827
17981828 sub unmangle($)
20942124 if(not defined $MethodInfo{$MethodVersion}{$Method}
20952125 or $MethodInfo{$MethodVersion}{$Method}{"Abstract"})
20962126 {
2097 if(my @SuperInterfaces = keys(%{$TypeInfo{$ClassVersion}{$ClassId}{"SuperInterface"}})) {
2127 if(my @SuperInterfaces = sort keys(%{$TypeInfo{$ClassVersion}{$ClassId}{"SuperInterface"}})) {
20982128 push(@Search, @SuperInterfaces);
20992129 }
21002130 }
21162146 my ($Method, $ClassName, $ClassVersion) = @_;
21172147 my $TargetSuffix = get_MSuffix($Method);
21182148 my $TargetShortName = get_MShort($Method);
2119 foreach my $Candidate (keys(%{$Class_Methods{$ClassVersion}{$ClassName}}))
2120 {# search for method with the same parameters suffix
2149 foreach my $Candidate (sort keys(%{$Class_Methods{$ClassVersion}{$ClassName}}))
2150 { # search for method with the same parameters suffix
21212151 next if($MethodInfo{$ClassVersion}{$Candidate}{"Constructor"});
21222152 if($TargetSuffix eq get_MSuffix($Candidate))
21232153 {
21482178
21492179 sub mergeMethods()
21502180 {
2151 my %SubProblems = ();
21522181 foreach my $Method (sort keys(%{$MethodInfo{1}}))
21532182 { # compare methods
21542183 next if(not defined $MethodInfo{2}{$Method});
23032332 }
23042333 }
23052334 }
2306 foreach my $ParamPos (sort {int($a) <=> int($b)} keys(%{$MethodInfo{1}{$Method}{"Param"}}))
2307 { # checking parameters
2308 mergeParameters($Method, $ParamPos, $ParamPos);
2309 }
2335
2336 if(defined $MethodInfo{1}{$Method}{"Param"})
2337 {
2338 foreach my $ParamPos (sort {int($a) <=> int($b)} keys(%{$MethodInfo{1}{$Method}{"Param"}}))
2339 { # checking parameters
2340 mergeParameters($Method, $ParamPos, $ParamPos);
2341 }
2342 }
2343
23102344 # check object type
23112345 my $ObjectType1_Id = $MethodInfo{1}{$Method}{"Class"};
23122346 my $ObjectType2_Id = $MethodInfo{2}{$Method}{"Class"};
23132347 if($ObjectType1_Id and $ObjectType2_Id)
23142348 {
2315 @RecurTypes = ();
2316 %SubProblems = mergeTypes($ObjectType1_Id, $ObjectType2_Id);
2317 foreach my $SubProblemType (keys(%SubProblems))
2318 {
2319 foreach my $SubLocation (keys(%{$SubProblems{$SubProblemType}}))
2349 my $SubProblems = mergeTypes($ObjectType1_Id, $ObjectType2_Id);
2350 foreach my $SubProblemType (keys(%{$SubProblems}))
2351 {
2352 foreach my $SubLocation (keys(%{$SubProblems->{$SubProblemType}}))
23202353 {
23212354 my $NewLocation = ($SubLocation)?"this.".$SubLocation:"this";
2322 @{$CompatProblems{$Method}{$SubProblemType}{$NewLocation}}{keys(%{$SubProblems{$SubProblemType}{$SubLocation}})} = values %{$SubProblems{$SubProblemType}{$SubLocation}};
2355 $CompatProblems{$Method}{$SubProblemType}{$NewLocation} = $SubProblems->{$SubProblemType}{$SubLocation};
23232356 }
23242357 }
23252358 }
23282361 my $ReturnType2_Id = $MethodInfo{2}{$Method}{"Return"};
23292362 if($ReturnType1_Id and $ReturnType2_Id)
23302363 {
2331 @RecurTypes = ();
2332 %SubProblems = mergeTypes($ReturnType1_Id, $ReturnType2_Id);
2333 foreach my $SubProblemType (keys(%SubProblems))
2334 {
2335 foreach my $SubLocation (keys(%{$SubProblems{$SubProblemType}}))
2364 my $SubProblems = mergeTypes($ReturnType1_Id, $ReturnType2_Id);
2365 foreach my $SubProblemType (keys(%{$SubProblems}))
2366 {
2367 foreach my $SubLocation (keys(%{$SubProblems->{$SubProblemType}}))
23362368 {
23372369 my $NewLocation = ($SubLocation)?"retval.".$SubLocation:"retval";
2338 @{$CompatProblems{$Method}{$SubProblemType}{$NewLocation}}{keys(%{$SubProblems{$SubProblemType}{$SubLocation}})} = values %{$SubProblems{$SubProblemType}{$SubLocation}};
2370 $CompatProblems{$Method}{$SubProblemType}{$NewLocation} = $SubProblems->{$SubProblemType}{$SubLocation};
23392371 }
23402372 }
23412373 }
23452377 sub mergeParameters($$$)
23462378 {
23472379 my ($Method, $ParamPos1, $ParamPos2) = @_;
2348 return if(not $Method or not defined $MethodInfo{1}{$Method}{"Param"}
2349 or not defined $MethodInfo{2}{$Method}{"Param"});
2380 if(not $Method or not defined $MethodInfo{1}{$Method}{"Param"}
2381 or not defined $MethodInfo{2}{$Method}{"Param"}) {
2382 return;
2383 }
2384
23502385 my $ParamType1_Id = $MethodInfo{1}{$Method}{"Param"}{$ParamPos1}{"Type"};
2386 my $ParamType2_Id = $MethodInfo{2}{$Method}{"Param"}{$ParamPos2}{"Type"};
2387
2388 if(not $ParamType1_Id or not $ParamType2_Id) {
2389 return;
2390 }
2391
23512392 my $Parameter_Name = $MethodInfo{1}{$Method}{"Param"}{$ParamPos1}{"Name"};
2352 my $ParamType2_Id = $MethodInfo{2}{$Method}{"Param"}{$ParamPos2}{"Type"};
2353 return if(not $ParamType1_Id or not $ParamType2_Id);
23542393 my $Parameter_Location = ($Parameter_Name)?$Parameter_Name:showPos($ParamPos1)." Parameter";
23552394
23562395 # checking type declaration changes
2357 my %SubProblems = mergeTypes($ParamType1_Id, $ParamType2_Id);
2358 foreach my $SubProblemType (keys(%SubProblems))
2359 {
2360 foreach my $SubLocation (keys(%{$SubProblems{$SubProblemType}}))
2396 my $SubProblems = mergeTypes($ParamType1_Id, $ParamType2_Id);
2397 foreach my $SubProblemType (keys(%{$SubProblems}))
2398 {
2399 foreach my $SubLocation (keys(%{$SubProblems->{$SubProblemType}}))
23612400 {
23622401 my $NewLocation = ($SubLocation)?$Parameter_Location.".".$SubLocation:$Parameter_Location;
2363 %{$CompatProblems{$Method}{$SubProblemType}{$NewLocation}}=(
2364 "Parameter_Type_Name"=>get_TypeName($ParamType1_Id, 1),
2365 "Parameter_Position"=>$ParamPos1,
2366 "Parameter_Name"=>$Parameter_Name);
2367 @{$CompatProblems{$Method}{$SubProblemType}{$NewLocation}}{keys(%{$SubProblems{$SubProblemType}{$SubLocation}})} = values %{$SubProblems{$SubProblemType}{$SubLocation}};
2402 $CompatProblems{$Method}{$SubProblemType}{$NewLocation} = $SubProblems->{$SubProblemType}{$SubLocation};
23682403 }
23692404 }
23702405 }
24472482 }
24482483
24492484 # settings
2450 my ($Full, $Html, $Italic, $Color, $Target) = (0, 0, 0, 0, undef);
2485 my ($Full, $Html, $Italic, $Color,
2486 $ShowParams, $ShowClass, $ShowAttr, $Target) = (0, 0, 0, 0, 0, 0, 0, undef);
24512487
24522488 if($Kind=~/Full/) {
24532489 $Full = 1;
24622498 $Color = 1;
24632499 }
24642500 if($Kind=~/Target=(\d+)/) {
2465 $Target = 1;
2501 $Target = $1;
2502 }
2503 if($Kind=~/Param/) {
2504 $ShowParams = 1;
2505 }
2506 if($Kind=~/Class/) {
2507 $ShowClass = 1;
2508 }
2509 if($Kind=~/Attr/) {
2510 $ShowAttr = 1;
24662511 }
24672512
24682513 my $Signature = $MethodInfo{$LibVersion}{$Method}{"ShortName"};
2469 if($Full)
2514 if($Full or $ShowClass)
24702515 {
24712516 my $Class = get_TypeName($MethodInfo{$LibVersion}{$Method}{"Class"}, $LibVersion);
24722517
24812526 $Signature = $Class.".".$Signature;
24822527 }
24832528 my @Params = ();
2484 foreach my $PPos (sort {int($a)<=>int($b)}
2485 keys(%{$MethodInfo{$LibVersion}{$Method}{"Param"}}))
2486 {
2487 my $PTid = $MethodInfo{$LibVersion}{$Method}{"Param"}{$PPos}{"Type"};
2488 if(my $PTName = get_TypeName($PTid, $LibVersion))
2489 {
2490 if($HideTemplates) {
2491 $PTName=~s/<.*>//g;
2492 }
2493
2494 if(not $ShowPackages) {
2495 $PTName=~s/(\A|\<\s*|\,\s*)[a-z0-9\.]+\./$1/g;
2496 }
2497
2498 if($Html) {
2499 $PTName = htmlSpecChars($PTName);
2500 }
2501
2502 if($Full)
2503 {
2504 my $PName = $MethodInfo{$LibVersion}{$Method}{"Param"}{$PPos}{"Name"};
2529
2530 if(defined $MethodInfo{$LibVersion}{$Method}{"Param"})
2531 {
2532 foreach my $PPos (sort {int($a)<=>int($b)}
2533 keys(%{$MethodInfo{$LibVersion}{$Method}{"Param"}}))
2534 {
2535 my $PTid = $MethodInfo{$LibVersion}{$Method}{"Param"}{$PPos}{"Type"};
2536 if(my $PTName = get_TypeName($PTid, $LibVersion))
2537 {
2538 if($HideTemplates) {
2539 $PTName=~s/<.*>//g;
2540 }
25052541
2506 if($Html)
2542 if(not $ShowPackages) {
2543 $PTName=~s/(\A|\<\s*|\,\s*)[a-z0-9\.]+\./$1/g;
2544 }
2545
2546 if($Html) {
2547 $PTName = htmlSpecChars($PTName);
2548 }
2549
2550 if($Full or $ShowParams)
25072551 {
2508 my $Style = "param";
2509 if(defined $Target and $Target==$PPos) {
2510 $Style = "focus_p";
2511 }
2512 elsif($Color) {
2513 $Style = "color_p";
2552 my $PName = $MethodInfo{$LibVersion}{$Method}{"Param"}{$PPos}{"Name"};
2553
2554 if($Html)
2555 {
2556 my $Style = "param";
2557
2558 if(defined $Target
2559 and $Target==$PPos) {
2560 $PName = "<span class='focus_p'>$PName</span>";
2561 }
2562 elsif($Color) {
2563 $PName = "<span class='color_p'>$PName</span>";
2564 }
2565 else {
2566 $PName = "<i>$PName</i>";
2567 }
25142568 }
25152569
2516 $PName = "<span class=\'$Style\'>$PName</span>";
2517 }
2518
2519 push(@Params, $PTName." ".$PName);
2520 }
2521 else {
2522 push(@Params, $PTName);
2523 }
2524 }
2525 }
2570 push(@Params, $PTName." ".$PName);
2571 }
2572 else {
2573 push(@Params, $PTName);
2574 }
2575 }
2576 }
2577 }
2578
25262579 if($Html)
25272580 {
25282581 $Signature .= "&#160;";
25392592
25402593 $Name .= $Params[$Pos];
25412594
2542 $Name = "<span class='nowrap'>".$Name."</span>";
2595 $Name = "<span>".$Name."</span>";
25432596
25442597 if($Pos==$#Params) {
25452598 $Name .= "&#160;)";
25592612 else {
25602613 $Signature .= "(".join(", ", @Params).")";
25612614 }
2562 if($Full)
2615
2616 if($Full or $ShowAttr)
25632617 {
25642618 if($MethodInfo{$LibVersion}{$Method}{"Static"}) {
25652619 $Signature .= " [static]";
25672621 elsif($MethodInfo{$LibVersion}{$Method}{"Abstract"}) {
25682622 $Signature .= " [abstract]";
25692623 }
2570
2624 }
2625
2626 if($Full)
2627 {
25712628 if($ShowAccess)
25722629 {
25732630 if(my $Access = $MethodInfo{$LibVersion}{$Method}{"Access"})
25772634 }
25782635 }
25792636 }
2637
25802638 if(my $ReturnId = $MethodInfo{$LibVersion}{$Method}{"Return"})
25812639 {
25822640 my $RName = get_TypeName($ReturnId, $LibVersion);
26032661 $Signature .= " *DEPRECATED*";
26042662 }
26052663 }
2664 }
2665
2666 $Signature=~s/java\.lang\.//g;
2667
2668 if($Html)
2669 {
2670 $Signature=~s!(\[static\]|\[abstract\]|\[public\]|\[private\]|\[protected\])!<span class='attr'>$1</span>!g;
26062671
2607 $Signature=~s/java\.lang\.//g;
2672 if(not $SkipDeprecated) {
2673 $Signature=~s!(\*deprecated\*)!<span class='deprecated'>$1</span>!ig;
2674 }
26082675
2609 if($Html)
2610 {
2611 $Signature=~s!(\[static\]|\[abstract\]|\[public\]|\[private\]|\[protected\])!<span class='attr'>$1</span>!g;
2612
2613 if(not $SkipDeprecated) {
2614 $Signature=~s!(\*deprecated\*)!<span class='deprecated'>$1</span>!ig;
2615 }
2616 }
2617 }
2618
2619 if($Html)
2620 {
26212676 $Signature=~s!\[\]![&#160;]!g;
26222677 $Signature=~s!operator=!operator&#160;=!g;
26232678 }
29222977 return $CheckedArchives;
29232978 }
29242979
2925 sub get_TypeProblems_Count($$$)
2926 {
2927 my ($TypeChanges, $TargetSeverity, $Level) = @_;
2980 sub get_TypeProblems_Count($$)
2981 {
2982 my ($TargetSeverity, $Level) = @_;
29282983 my $Type_Problems_Count = 0;
2929 foreach my $Type_Name (sort keys(%{$TypeChanges}))
2984
2985 foreach my $Type_Name (sort keys(%{$TypeChanges{$Level}}))
29302986 {
29312987 my %Kinds_Target = ();
2932 foreach my $Kind (sort keys(%{$TypeChanges->{$Type_Name}}))
2933 {
2934 foreach my $Location (sort keys(%{$TypeChanges->{$Type_Name}{$Kind}}))
2935 {
2936 my $Target = $TypeChanges->{$Type_Name}{$Kind}{$Location}{"Target"};
2937 my $Priority = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
2938 next if($Priority ne $TargetSeverity);
2988 foreach my $Kind (sort keys(%{$TypeChanges{$Level}{$Type_Name}}))
2989 {
2990 foreach my $Location (sort keys(%{$TypeChanges{$Level}{$Type_Name}{$Kind}}))
2991 {
2992 my $Target = $TypeChanges{$Level}{$Type_Name}{$Kind}{$Location}{"Target"};
2993 my $Severity = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
2994
2995 if($Severity ne $TargetSeverity) {
2996 next;
2997 }
2998
29392999 if($Kinds_Target{$Kind}{$Target}) {
29403000 next;
29413001 }
2942 if(cmpSeverities($Type_MaxPriority{$Level}{$Type_Name}{$Kind}{$Target}, $Priority))
2943 { # select a problem with the highest priority
2944 next;
2945 }
3002
29463003 $Kinds_Target{$Kind}{$Target} = 1;
29473004 $Type_Problems_Count += 1;
29483005 }
29493006 }
29503007 }
3008
29513009 return $Type_Problems_Count;
29523010 }
29533011
30053063 my $Level = $_[0];
30063064 my ($Added, $Removed, $M_Problems_High, $M_Problems_Medium, $M_Problems_Low,
30073065 $T_Problems_High, $T_Problems_Medium, $T_Problems_Low, $M_Other, $T_Other) = (0,0,0,0,0,0,0,0,0,0);
3066
30083067 %{$RESULT{$Level}} = (
30093068 "Problems"=>0,
30103069 "Warnings"=>0,
30113070 "Affected"=>0 );
3071
30123072 foreach my $Method (sort keys(%CompatProblems))
30133073 {
30143074 foreach my $Kind (sort keys(%{$CompatProblems{$Method}}))
30193079 {
30203080 my $Type_Name = $CompatProblems{$Method}{$Kind}{$Location}{"Type_Name"};
30213081 my $Target = $CompatProblems{$Method}{$Kind}{$Location}{"Target"};
3022 my $Priority = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
3082 my $Severity = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
30233083 if($Kind eq "Added_Method")
30243084 {
30253085 if($Level eq "Source")
30393099 }
30403100 }
30413101 $Removed+=1;
3042 $TotalAffected{$Level}{$Method} = $Priority;
3102 $TotalAffected{$Level}{$Method} = $Severity;
30433103 }
30443104 else
30453105 {
3046 if($Priority eq "Safe") {
3106 if($Severity eq "Safe") {
30473107 $M_Other += 1;
30483108 }
3049 elsif($Priority eq "High") {
3109 elsif($Severity eq "High") {
30503110 $M_Problems_High+=1;
30513111 }
3052 elsif($Priority eq "Medium") {
3112 elsif($Severity eq "Medium") {
30533113 $M_Problems_Medium+=1;
30543114 }
3055 elsif($Priority eq "Low") {
3115 elsif($Severity eq "Low") {
30563116 $M_Problems_Low+=1;
30573117 }
3058 if(($Priority ne "Low" or $StrictCompat)
3059 and $Priority ne "Safe") {
3060 $TotalAffected{$Level}{$Method} = $Priority;
3118 if(($Severity ne "Low" or $StrictCompat)
3119 and $Severity ne "Safe") {
3120 $TotalAffected{$Level}{$Method} = $Severity;
30613121 }
30623122 }
30633123 }
30643124 }
30653125 }
30663126 }
3067 my %TypeChanges = ();
3127
3128 my %MethodTypeIndex = ();
3129 my %SeverityIndex = ();
3130
30683131 foreach my $Method (sort keys(%CompatProblems))
30693132 {
3070 foreach my $Kind (sort keys(%{$CompatProblems{$Method}}))
3133 my @Kinds = sort keys(%{$CompatProblems{$Method}});
3134 foreach my $Kind (@Kinds)
30713135 {
30723136 if($TypeProblems_Kind{$Level}{$Kind})
30733137 {
3074 foreach my $Location (sort keys(%{$CompatProblems{$Method}{$Kind}}))
3138 my @Locs = sort {length($a)<=>length($b)} sort keys(%{$CompatProblems{$Method}{$Kind}});
3139 foreach my $Location (@Locs)
30753140 {
30763141 my $Type_Name = $CompatProblems{$Method}{$Kind}{$Location}{"Type_Name"};
30773142 my $Target = $CompatProblems{$Method}{$Kind}{$Location}{"Target"};
3078 my $Priority = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
3079 if(cmpSeverities($Type_MaxPriority{$Level}{$Type_Name}{$Kind}{$Target}, $Priority))
3080 { # select a problem with the highest priority
3143
3144 if(defined $MethodTypeIndex{$Method}{$Type_Name}{$Kind}{$Target})
3145 { # one location for one type and target
30813146 next;
30823147 }
3083 if(($Priority ne "Low" or $StrictCompat)
3084 and $Priority ne "Safe") {
3085 $TotalAffected{$Level}{$Method} = maxSeverity($TotalAffected{$Level}{$Method}, $Priority);
3148 $MethodTypeIndex{$Method}{$Type_Name}{$Kind}{$Target} = 1;
3149 $TypeChanges{$Level}{$Type_Name}{$Kind}{$Location} = $CompatProblems{$Method}{$Kind}{$Location};
3150
3151 my $Severity = undef;
3152 if(defined $SeverityIndex{$Type_Name}{$Kind}{$Target}) {
3153 $Severity = $SeverityIndex{$Type_Name}{$Kind}{$Target};
30863154 }
3087 %{$TypeChanges{$Type_Name}{$Kind}{$Location}} = %{$CompatProblems{$Method}{$Kind}{$Location}};
3088 $Type_MaxPriority{$Level}{$Type_Name}{$Kind}{$Target} = maxSeverity($Type_MaxPriority{$Level}{$Type_Name}{$Kind}{$Target}, $Priority);
3089 }
3090 }
3091 }
3092 }
3093 $T_Problems_High = get_TypeProblems_Count(\%TypeChanges, "High", $Level);
3094 $T_Problems_Medium = get_TypeProblems_Count(\%TypeChanges, "Medium", $Level);
3095 $T_Problems_Low = get_TypeProblems_Count(\%TypeChanges, "Low", $Level);
3096 $T_Other = get_TypeProblems_Count(\%TypeChanges, "Safe", $Level);
3097
3155 else {
3156 $Severity = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
3157 }
3158
3159 if(($Severity ne "Low" or $StrictCompat)
3160 and $Severity ne "Safe")
3161 {
3162 if(my $Sev = $TotalAffected{$Level}{$Method})
3163 {
3164 if($Severity_Val{$Severity}>$Severity_Val{$Sev}) {
3165 $TotalAffected{$Level}{$Method} = $Severity;
3166 }
3167 }
3168 else {
3169 $TotalAffected{$Level}{$Method} = $Severity;
3170 }
3171 }
3172 }
3173 }
3174 }
3175 }
3176
3177 %MethodTypeIndex = (); # clear memory
3178 %SeverityIndex = (); # clear memory
3179
3180
3181 $T_Problems_High = get_TypeProblems_Count("High", $Level);
3182 $T_Problems_Medium = get_TypeProblems_Count("Medium", $Level);
3183 $T_Problems_Low = get_TypeProblems_Count("Low", $Level);
3184 $T_Other = get_TypeProblems_Count("Safe", $Level);
3185
30983186 # changed and removed public symbols
30993187 my $SCount = keys(%CheckedMethods);
31003188 if($SCount)
31433231
31443232 my $Checked_Archives_Link = "0";
31453233 $Checked_Archives_Link = "<a href='#Checked_Archives' style='color:Blue;'>".keys(%{$LibArchives{1}})."</a>" if(keys(%{$LibArchives{1}})>0);
3146 $TestResults .= "<tr><th>Total Java ARchives</th><td>$Checked_Archives_Link</td></tr>";
3147
3148 $TestResults .= "<tr><th>Total Methods / Classes</th><td>".keys(%CheckedMethods)." / ".keys(%{$LibClasses{1}})."</td></tr>"; # keys(%CheckedTypes)
3149
3150 my $Verdict = "";
3234
3235 $TestResults .= "<tr><th>Total JARs</th><td>$Checked_Archives_Link</td></tr>\n";
3236 $TestResults .= "<tr><th>Total Methods / Classes</th><td>".keys(%CheckedMethods)." / ".keys(%{$LibClasses{1}})."</td></tr>\n"; # keys(%CheckedTypes)
3237
31513238 $RESULT{$Level}{"Problems"} += $Removed+$M_Problems_High+$T_Problems_High+$T_Problems_Medium+$M_Problems_Medium;
31523239 if($StrictCompat) {
31533240 $RESULT{$Level}{"Problems"}+=$T_Problems_Low+$M_Problems_Low;
31553242 else {
31563243 $RESULT{$Level}{"Warnings"}+=$T_Problems_Low+$M_Problems_Low;
31573244 }
3158 if($RESULT{$Level}{"Problems"}) {
3159 $Verdict = "<span style='color:Red;'><b>Incompatible</b></span>";
3160 }
3161 else {
3162 $Verdict = "<span style='color:Green;'><b>Compatible</b></span>";
3163 }
3245
31643246 my $META_DATA = "kind:".lc($Level).";";
31653247 $META_DATA .= $RESULT{$Level}{"Problems"}?"verdict:incompatible;":"verdict:compatible;";
3166 $TestResults .= "<tr><th>Verdict</th>";
3167 if($RESULT{$Level}{"Problems"}) {
3168 $TestResults .= "<td><span style='color:Red;'><b>Incompatible<br/>(".$RESULT{$Level}{"Affected"}."%)</b></span></td>";
3169 }
3170 else {
3171 $TestResults .= "<td><span style='color:Green;'><b>Compatible</b></span></td>";
3172 }
3248 $TestResults .= "<tr><th>Compatibility</th>\n";
3249
3250 my $BC_Rate = 100 - $RESULT{$Level}{"Affected"};
3251
3252 if($RESULT{$Level}{"Problems"})
3253 {
3254 my $Cl = "incompatible";
3255 if($BC_Rate>=90) {
3256 $Cl = "warning";
3257 }
3258 elsif($BC_Rate>=80) {
3259 $Cl = "almost_compatible";
3260 }
3261
3262 $TestResults .= "<td class=\'$Cl\'>".$BC_Rate."%</td>\n";
3263 }
3264 else
3265 {
3266 $TestResults .= "<td class=\'compatible\'>100%</td>\n";
3267 }
3268
31733269 $TestResults .= "</tr>\n";
31743270 $TestResults .= "</table>\n";
31753271
33083404 {
33093405 foreach my $Kind (sort keys(%{$CompatProblems{$Method}}))
33103406 {
3311 if($Kind eq "Added_Method") {
3407 if($Kind eq "Added_Method")
3408 {
33123409 my $ArchiveName = $MethodInfo{2}{$Method}{"Archive"};
33133410 my $ClassName = get_ShortName($MethodInfo{2}{$Method}{"Class"}, 2);
33143411 if($Level eq "Source")
34593556 my $ClassName_Full = get_TypeName($MethodInfo{1}{$Method}{"Class"}, 1);
34603557 my $MethodProblemsReport = "";
34613558 my $ProblemNum = 1;
3462 foreach my $Kind (keys(%{$CompatProblems{$Method}}))
3559 foreach my $Kind (sort keys(%{$CompatProblems{$Method}}))
34633560 {
3464 foreach my $Location (keys(%{$CompatProblems{$Method}{$Kind}}))
3561 foreach my $Location (sort keys(%{$CompatProblems{$Method}{$Kind}}))
34653562 {
34663563 my %Problems = %{$CompatProblems{$Method}{$Kind}{$Location}};
34673564 my $Type_Name = $Problems{"Type_Name"};
34733570 my ($Change, $Effect) = ("", "");
34743571 my $Old_Value = htmlSpecChars($Problems{"Old_Value"});
34753572 my $New_Value = htmlSpecChars($Problems{"New_Value"});
3476 my $Parameter_Position = $Problems{"Parameter_Position"};
3477 my $Parameter_Position_Str = showPos($Parameter_Position);
3573
34783574 if($Kind eq "Method_Became_Static")
34793575 {
34803576 $Change = "Method became <b>static</b>.\n";
36093705 }
36103706 }
36113707 if($ARCHIVE_CLASS_REPORT) {
3612 $METHOD_PROBLEMS .= "<span class='jar'>$ArchiveName</span>, <span class='cname'>$ClassName</span><br/>\n".$ARCHIVE_CLASS_REPORT."<br/>";
3708 $METHOD_PROBLEMS .= "<span class='jar'>$ArchiveName</span>, <span class='cname'>$ClassName.class</span><br/>\n".$ARCHIVE_CLASS_REPORT."<br/>";
36133709 }
36143710 }
36153711 }
36283724 sub get_Report_TypeProblems($$)
36293725 {
36303726 my ($TargetSeverity, $Level) = @_;
3631 my ($TYPE_PROBLEMS, %TypeArchive, %TypeChanges) = ();
3632
3633 foreach my $Method (sort keys(%CompatProblems))
3634 {
3635 foreach my $Kind (sort keys(%{$CompatProblems{$Method}}))
3636 {
3637 if($TypeProblems_Kind{$Level}{$Kind})
3638 {
3639 foreach my $Location (sort keys(%{$CompatProblems{$Method}{$Kind}}))
3640 {
3641 my $Type_Name = $CompatProblems{$Method}{$Kind}{$Location}{"Type_Name"};
3642 my $Target = $CompatProblems{$Method}{$Kind}{$Location}{"Target"};
3643 my $Severity = getProblemSeverity($Level, $Kind, $Type_Name, $Target);
3644 if($Severity eq "Safe"
3645 and $TargetSeverity ne "Safe") {
3646 next;
3647 }
3648 if(cmpSeverities($Type_MaxPriority{$Level}{$Type_Name}{$Kind}{$Target}, $Severity))
3649 {# select a problem with the highest priority
3650 next;
3651 }
3652 %{$TypeChanges{$Type_Name}{$Kind}{$Location}} = %{$CompatProblems{$Method}{$Kind}{$Location}};
3653 my $ArchiveName = $TypeInfo{1}{$TName_Tid{1}{$Type_Name}}{"Archive"};
3654 $TypeArchive{$ArchiveName}{$Type_Name} = 1;
3655 }
3656 }
3657 }
3658 }
3659
3660 my @Methods = sort {lc($tr_name{$a}) cmp lc($tr_name{$b})} keys(%CompatProblems);
3727 my ($TYPE_PROBLEMS, %TypeArchive) = ();
3728
3729 foreach my $TypeName (keys(%{$TypeChanges{$Level}}))
3730 {
3731 my $ArchiveName = $TypeInfo{1}{$TName_Tid{1}{$TypeName}}{"Archive"};
3732 $TypeArchive{$ArchiveName}{$TypeName} = 1;
3733 }
36613734
36623735 my $Problems_Number = 0;
36633736 foreach my $ArchiveName (sort {lc($a) cmp lc($b)} keys(%TypeArchive))
36763749 my $TypeId = $TName_Tid{1}{$TypeName};
36773750 my $ProblemNum = 1;
36783751 my ($TypeProblemsReport, %Kinds_Locations, %Kinds_Target) = ();
3679 foreach my $Kind (sort keys(%{$TypeChanges{$TypeName}}))
3752 foreach my $Kind (sort keys(%{$TypeChanges{$Level}{$TypeName}}))
36803753 {
3681 foreach my $Location (sort keys(%{$TypeChanges{$TypeName}{$Kind}}))
3754 foreach my $Location (sort keys(%{$TypeChanges{$Level}{$TypeName}{$Kind}}))
36823755 {
3683 my $Target = $TypeChanges{$TypeName}{$Kind}{$Location}{"Target"};
3684 my $Priority = getProblemSeverity($Level, $Kind, $TypeName, $Target);
3685 if($Priority ne $TargetSeverity) {
3756 my $Target = $TypeChanges{$Level}{$TypeName}{$Kind}{$Location}{"Target"};
3757 my $Severity = getProblemSeverity($Level, $Kind, $TypeName, $Target);
3758
3759 if($Severity ne $TargetSeverity) {
36863760 next;
36873761 }
3762
36883763 $Kinds_Locations{$Kind}{$Location} = 1;
36893764 my ($Change, $Effect) = ("", "");
3690 my %Problems = %{$TypeChanges{$TypeName}{$Kind}{$Location}};
3691 next if($Kinds_Target{$Kind}{$Target});
3765 my %Problems = %{$TypeChanges{$Level}{$TypeName}{$Kind}{$Location}};
3766
3767 if($Kinds_Target{$Kind}{$Target}) {
3768 next;
3769 }
36923770 $Kinds_Target{$Kind}{$Target} = 1;
3771
36933772 my $Old_Value = $Problems{"Old_Value"};
36943773 my $New_Value = $Problems{"New_Value"};
36953774 my $Field_Type = $Problems{"Field_Type"};
38913970 elsif($Kind eq "Class_Added_Field")
38923971 {
38933972 $Change = "Field <b>$Target</b> has been added to this class.";
3894 if($Level eq "Binary") {
3895 $Effect = "No effect.<br/><b>NOTE</b>: A static field from a super-interface of a client class may hide an added field (with the same name) inherited from the super-class of a client class and cause <b>IncompatibleClassChangeError</b> exception.";
3896 }
3897 else {
3898 $Effect = "No effect.<br/><b>NOTE</b>: A static field from a super-interface of a client class may hide an added field (with the same name) inherited from the super-class of a client class. Recompilation of a client class may be terminated with the message: reference to <b>$Target</b> is ambiguous.";
3973 if($Level eq "Binary")
3974 {
3975 $Effect = "No effect.";
3976 # $Effect .= "<br/><b>NOTE</b>: A static field from a super-interface of a client class may hide an added field (with the same name) inherited from the super-class of a client class and cause <b>IncompatibleClassChangeError</b> exception.";
3977 }
3978 else
3979 {
3980 $Effect = "No effect.";
3981 # $Effect .= "<br/><b>NOTE</b>: A static field from a super-interface of a client class may hide an added field (with the same name) inherited from the super-class of a client class. Recompilation of a client class may be terminated with the message: reference to <b>$Target</b> is ambiguous.";
38993982 }
39003983 }
39013984 elsif($Kind eq "Interface_Added_Field")
41014184 my $Affected = "";
41024185
41034186 if(not defined $TypeInfo{1}{$TypeId}{"Annotation"}) {
4104 $Affected = getAffectedMethods($Level, $TypeName, \%Kinds_Locations, \@Methods);
4187 $Affected = getAffectedMethods($Level, $TypeName, \%Kinds_Locations);
41054188 }
41064189
41074190 $NAMESPACE_REPORT .= $ContentSpanStart."<span class='extendable'>[+]</span> ".htmlSpecChars($TypeName)." ($ProblemNum)".$ContentSpanEnd."<br/>\n";
41414224 return $TYPE_PROBLEMS;
41424225 }
41434226
4144 sub getAffectedMethods($$$$)
4145 {
4146 my ($Level, $Target_TypeName, $Kinds_Locations, $Methods) = @_;
4227 sub getAffectedMethods($$$)
4228 {
4229 my ($Level, $Target_TypeName, $Kinds_Locations) = @_;
4230
41474231 my $LIMIT = 10;
4148
4149 if(defined $AffectLimit)
4150 {
4232 if(defined $AffectLimit) {
41514233 $LIMIT = $AffectLimit;
41524234 }
41534235 elsif(defined $ShortMode)
41564238 $LIMIT = $AffectLimit;
41574239 }
41584240
4159 my %SymSel = ();
4241 my @Kinds = sort keys(%{$Kinds_Locations});
4242 my %KLocs = ();
4243 foreach my $Kind (@Kinds)
4244 {
4245 my @Locs = sort {$a=~/retval/ cmp $b=~/retval/} sort {length($a)<=>length($b)} sort keys(%{$Kinds_Locations->{$Kind}});
4246 $KLocs{$Kind} = \@Locs;
4247 }
4248
41604249 my %SymLocKind = ();
4161
4162 foreach my $Method (@{$Methods})
4163 {
4164 foreach my $Kind (keys(%{$Kinds_Locations}))
4165 {
4166 if(not defined $CompatProblems{$Method}
4167 or not defined $CompatProblems{$Method}{$Kind}) {
4168 next;
4169 }
4170
4171 foreach my $Loc (keys(%{$Kinds_Locations->{$Kind}}))
4250 foreach my $Method (sort keys(%{$TypeProblemsIndex{$Target_TypeName}}))
4251 {
4252 foreach my $Kind (@Kinds)
4253 {
4254 foreach my $Loc (@{$KLocs{$Kind}})
41724255 {
41734256 if(not defined $CompatProblems{$Method}{$Kind}{$Loc}) {
41744257 next;
41804263 }
41814264
41824265 $SymLocKind{$Method}{$Loc}{$Kind} = 1;
4183 }
4184 }
4185 }
4186
4266 last;
4267 }
4268 }
4269 }
4270
4271 %KLocs = (); # clear
4272
4273 my %SymSel = ();
4274 my $Num = 0;
41874275 foreach my $Method (sort keys(%SymLocKind))
41884276 {
41894277 LOOP: foreach my $Loc (sort {$a=~/retval/ cmp $b=~/retval/} sort {length($a)<=>length($b)} sort keys(%{$SymLocKind{$Method}}))
41904278 {
4191 foreach my $Kind (keys(%{$SymLocKind{$Method}{$Loc}}))
4279 foreach my $Kind (sort keys(%{$SymLocKind{$Method}{$Loc}}))
41924280 {
41934281 $SymSel{$Method}{"Loc"} = $Loc;
41944282 $SymSel{$Method}{"Kind"} = $Kind;
4195
41964283 last LOOP;
41974284 }
41984285 }
4286
4287 $Num += 1;
4288
4289 if($Num>=$LIMIT) {
4290 last;
4291 }
41994292 }
42004293
42014294 my $Affected = "";
4202 my $Num = 0;
42034295
42044296 foreach my $Method (sort {lc($a) cmp lc($b)} keys(%SymSel))
42054297 {
42064298 my $Kind = $SymSel{$Method}{"Kind"};
42074299 my $Loc = $SymSel{$Method}{"Loc"};
42084300
4209 my $Param_Pos = $CompatProblems{$Method}{$Kind}{$Loc}{"Parameter_Position"};
42104301 my $Desc = getAffectDesc($Method, $Kind, $Loc, $Level);
4302 my $PName = getParamName($Loc);
4303 my $Pos = getParamPos($PName, $Method, 1);
42114304
4212 $Affected .= "<span class='iname_a'>".get_Signature($Method, 1, "HTML|Italic|Target=".$Param_Pos)."</span><br/>";
4305 $Affected .= "<span class='iname_a'>".get_Signature($Method, 1, "HTML|Italic|Param|Class|Target=".$Pos)."</span><br/>";
42134306 $Affected .= "<div class='affect'>".$Desc."</div>\n";
4214
4215 if($Num>$LIMIT) {
4216 last;
4217 }
4218
4219 $Num += 1;
4220 }
4221
4222 if(keys(%SymSel)>$LIMIT) {
4223 $Affected .= " ...<br/>"; # and others ...
4307 }
4308
4309 if(keys(%SymLocKind)>$LIMIT) {
4310 $Affected .= " <b>...</b>\n<br/>\n"; # and others ...
42244311 }
42254312
42264313 $Affected = "<div class='affected'>".$Affected."</div>";
42274314 if($Affected)
42284315 {
42294316 $Affected = $ContentDivStart.$Affected.$ContentDivEnd;
4230 $Affected = $ContentSpanStart_Affected."[+] affected methods (".keys(%SymSel).")".$ContentSpanEnd.$Affected;
4231 }
4317 $Affected = $ContentSpanStart_Affected."[+] affected methods (".keys(%SymLocKind).")".$ContentSpanEnd.$Affected;
4318 }
4319
42324320 return ($Affected);
42334321 }
42344322
42384326 my %Affect = %{$CompatProblems{$Method}{$Kind}{$Location}};
42394327 my $New_Value = $Affect{"New_Value"};
42404328 my $Type_Name = $Affect{"Type_Name"};
4241 my $Parameter_Name = $Affect{"Parameter_Name"};
4242 my $Parameter_Position_Str = showPos($Affect{"Parameter_Position"});
42434329 my @Sentence_Parts = ();
42444330
42454331 $Location=~s/\.[^.]+?\Z//;
42874373 my $PPos = getParamPos($PName, $Method, 1);
42884374
42894375 if($Location=~/\./) {
4290 push(@Sentence_Parts, "Field \'".htmlSpecChars($Location)."\' in $Parameter_Position_Str parameter");
4376 push(@Sentence_Parts, "Field \'".htmlSpecChars($Location)."\' in ".showPos($PPos)." parameter");
42914377 }
42924378 else {
4293 push(@Sentence_Parts, "$Parameter_Position_Str parameter");
4294 }
4295 if($Parameter_Name) {
4296 push(@Sentence_Parts, "\'$Parameter_Name\'");
4379 push(@Sentence_Parts, showPos($PPos)." parameter");
4380 }
4381 if($PName) {
4382 push(@Sentence_Parts, "\'$PName\'");
42974383 }
42984384
4299 $TypeID = $MInfo{"Param"}{$PPos}{"Type"};
4385 if(defined $MInfo{"Param"}) {
4386 $TypeID = $MInfo{"Param"}{$PPos}{"Type"};
4387 }
43004388 }
43014389 push(@Sentence_Parts, " of this$ABSTRACT_M method");
43024390
44844572 span.sym_p {
44854573 font-weight:normal;
44864574 white-space:normal;
4575 }
4576 span.sym_p span {
4577 white-space:nowrap;
44874578 }
44884579 span.attr {
44894580 color:Black;
45654656 }
45664657 span.focus_p {
45674658 font-style:italic;
4568 color:Red;
4659 background-color:#FFCCCC;
45694660 }
45704661 span.nowrap {
45714662 white-space:nowrap;
45824673 td.new {
45834674 background-color:#C6DEFF;
45844675 }
4676
4677 td.compatible {
4678 background-color:#CCFFCC;
4679 }
4680 td.almost_compatible {
4681 background-color:#FFDAA3;
4682 }
4683 td.incompatible {
4684 background-color:#FFCCCC;
4685 }
4686
45854687 .top_ref {
45864688 font-size:0.69em;
45874689 }
63366438 if($CurrentMethod)
63376439 {
63386440 if(defined $MethodInfo{$LibVersion}{$CurrentMethod}
6441 and defined $MethodInfo{$LibVersion}{$CurrentMethod}{"Param"}
63396442 and defined $MethodInfo{$LibVersion}{$CurrentMethod}{"Param"}{$ParamPos}
63406443 and defined $MethodInfo{$LibVersion}{$CurrentMethod}{"Param"}{$ParamPos}{"Type"})
63416444 {
68736976
68746977 sub isDump($)
68756978 {
6876 if(get_filename($_[0])=~/\A(.+)\.api(\Q.tar.gz\E|\Q.zip\E|)\Z/)
6979 if($_[0]=~/\A(.+)\.(api|dump|apidump)(\Q.tar.gz\E|\Q.zip\E|)\Z/)
68776980 { # returns a name of package
68786981 return $1;
68796982 }
68806983 return 0;
68816984 }
68826985
6986 sub isDumpFile($)
6987 {
6988 if($_[0]=~/\.(api|dump|apidump)\Z/)
6989 {
6990 return 1;
6991 }
6992 return 0;
6993 }
6994
68836995 sub read_API_Dump($$)
68846996 {
68856997 my ($LibVersion, $Path) = @_;
68866998 return if(not $LibVersion or not -e $Path);
6887 my $FileName = unpackDump($Path);
6888 if($FileName!~/\.api\Z/) {
6999
7000 my $FilePath = unpackDump($Path);
7001 if(not isDumpFile($FilePath)) {
68897002 exitStatus("Invalid_Dump", "specified API dump \'$Path\' is not valid, try to recreate it");
68907003 }
6891 my $Content = readFile($FileName);
6892 unlink($FileName);
7004 my $Content = readFile($FilePath);
7005 rmtree($TMP_DIR."/unpack");
7006
68937007 if($Content!~/};\s*\Z/) {
68947008 exitStatus("Invalid_Dump", "specified API dump \'$Path\' is not valid, try to recreate it");
68957009 }
69187032 }
69197033 }
69207034 }
6921 $MethodInfo{$LibVersion} = $LibraryAPI->{"MethodInfo"};
7035 my $MInfo = $LibraryAPI->{"MethodInfo"};
7036 foreach my $M_Id (keys(%{$MInfo}))
7037 {
7038 my $Name = $MInfo->{$M_Id}{"Name"};
7039 $MethodInfo{$LibVersion}{$Name} = $MInfo->{$M_Id};
7040 }
7041
69227042 foreach my $Method (keys(%{$MethodInfo{$LibVersion}}))
69237043 {
69247044 if(my $ClassId = $MethodInfo{$LibVersion}{$Method}{"Class"}
69347054 if(keys(%{$LibArchives{$LibVersion}})) {
69357055 $Descriptor{$LibVersion}{"Archives"}="OK";
69367056 }
6937 $Descriptor{$LibVersion}{"Version"} = $LibraryAPI->{"Version"};
6938 $Descriptor{$LibVersion}{"Dump"}=1;
7057 $Descriptor{$LibVersion}{"Version"} = $LibraryAPI->{"LibraryVersion"};
7058 $Descriptor{$LibVersion}{"Dump"} = 1;
69397059 }
69407060
69417061 sub createDescriptor($$)
70297149 if($VerNum)
70307150 {
70317151 $TargetVersion{$LibVersion} = $VerNum;
7032 printMsg("WARNING", "set ".($LibVersion==1?"1st":"2nd")." version number to $VerNum (use -v$LibVersion option to change it)");
7152 if($DumpAPI) {
7153 printMsg("WARNING", "set version number to $VerNum (use -vnum option to change it)");
7154 }
7155 else {
7156 printMsg("WARNING", "set ".($LibVersion==1?"1st":"2nd")." version number to $VerNum (use -v$LibVersion option to change it)");
7157 }
70337158 return $TargetVersion{$LibVersion};
70347159 }
70357160 }
72817406 }
72827407 if($JoinReport)
72837408 {
7284 printMsg("INFO", "see detailed report:\n ".getReportPath("Join"));
7409 printMsg("INFO", "report: ".getReportPath("Join"));
72857410 }
72867411 elsif($DoubleReport)
72877412 { # default
7288 printMsg("INFO", "see detailed reports:\n ".getReportPath("Binary")."\n ".getReportPath("Source"));
7413 printMsg("INFO", "\nreport (BC): ".getReportPath("Binary"));
7414 printMsg("INFO", "report (SC): ".getReportPath("Source"));
72897415 }
72907416 elsif($BinaryOnly)
72917417 { # --binary
7292 printMsg("INFO", "see detailed report:\n ".getReportPath("Binary"));
7418 printMsg("INFO", "report: ".getReportPath("Binary"));
72937419 }
72947420 elsif($SourceOnly)
72957421 { # --source
7296 printMsg("INFO", "see detailed report:\n ".getReportPath("Source"));
7422 printMsg("INFO", "report: ".getReportPath("Source"));
72977423 }
72987424 }
72997425
73607486 sub createArchive($$)
73617487 {
73627488 my ($Path, $To) = @_;
7489 if(not $To) {
7490 $To = ".";
7491 }
73637492 if(not $Path or not -e $Path
73647493 or not -d $To) {
73657494 return "";
74367565 }
74377566 if(defined $ShowVersion)
74387567 {
7439 printMsg("INFO", "Java API Compliance Checker (Java ACC) $TOOL_VERSION\nCopyright (C) 2015 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.");
7568 printMsg("INFO", "Java API Compliance Checker (Java APICC) $TOOL_VERSION\nCopyright (C) 2016 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.");
74407569 exit(0);
74417570 }
74427571 if(defined $DumpVersion)
75717700 exitStatus("Access_Error", "can't access \'$Part\'");
75727701 }
75737702 }
7703
75747704 detect_default_paths();
75757705 checkVersionNum(1, $DumpAPI);
7706
75767707 my $TarCmd = get_CmdPath("tar");
75777708 if(not $TarCmd) {
75787709 exitStatus("Not_Found", "can't find \"tar\"");
75877718 if(not $Descriptor{1}{"Archives"}) {
75887719 exitStatus("Error", "descriptor does not contain Java ARchives");
75897720 }
7721
75907722 initLogging(1);
75917723 readArchives(1);
7592 my %LibraryAPI = ();
7724
75937725 printMsg("INFO", "creating library API dump ...");
7594 $LibraryAPI{"MethodInfo"} = $MethodInfo{1};
7595 $LibraryAPI{"TypeInfo"} = $TypeInfo{1};
7596 $LibraryAPI{"Version"} = $Descriptor{1}{"Version"};
7597 $LibraryAPI{"Library"} = $TargetLibraryName;
7598 $LibraryAPI{"API_DUMP_VERSION"} = $API_DUMP_VERSION;
7599 $LibraryAPI{"TOOL_VERSION"} = $TOOL_VERSION;
7726
7727 my $MInfo = {};
7728 my $MNum = 0;
7729 foreach my $Method (sort keys(%{$MethodInfo{1}}))
7730 {
7731 $MInfo->{$MNum} = $MethodInfo{1}{$Method};
7732 $MInfo->{$MNum}{"Name"} = $Method;
7733
7734 $MNum+=1;
7735 }
7736
7737 my %API = (
7738 "MethodInfo" => $MInfo,
7739 "TypeInfo" => $TypeInfo{1},
7740 "LibraryVersion" => $Descriptor{1}{"Version"},
7741 "LibraryName" => $TargetLibraryName,
7742 "Language" => "Java",
7743 "API_DUMP_VERSION" => $API_DUMP_VERSION,
7744 "JAPI_COMPLIANCE_CHECKER_VERSION" => $TOOL_VERSION
7745 );
7746
76007747 my $DumpPath = "api_dumps/$TargetLibraryName/".$TargetLibraryName."_".$Descriptor{1}{"Version"}.".api.".$AR_EXT;
7601 if(not $DumpPath=~s/\Q.$AR_EXT\E\Z//g) {
7602 exitStatus("Error", "the dump path (-dump-path option) should be a path to a *.$AR_EXT file");
7603 }
7748 if($OutputDumpPath)
7749 { # user defined path
7750 $DumpPath = $OutputDumpPath;
7751 }
7752
7753 my $Archive = ($DumpPath=~s/\Q.$AR_EXT\E\Z//g);
7754
76047755 my ($DDir, $DName) = separate_path($DumpPath);
76057756 my $DPath = $TMP_DIR."/".$DName;
7757 if(not $Archive) {
7758 $DPath = $DumpPath;
7759 }
7760
76067761 mkpath($DDir);
7607 writeFile($DPath, Dumper(\%LibraryAPI));
7762
7763 open(DUMP, ">", $DPath) || die ("can't open file \'$DPath\': $!\n");
7764 print DUMP Dumper(\%API);
7765 close(DUMP);
7766
76087767 if(not -s $DPath) {
76097768 exitStatus("Error", "can't create API dump because something is going wrong with the Data::Dumper module");
76107769 }
7611 my $Pkg = createArchive($DPath, $DDir);
7612 printMsg("INFO", "library API has been dumped to:\n $Pkg");
7613 printMsg("INFO", "you can transfer this dump everywhere and use instead of the ".$Descriptor{1}{"Version"}." version descriptor");
7770
7771 if($Archive) {
7772 $DumpPath = createArchive($DPath, $DDir);
7773 }
7774
7775 if($OutputDumpPath) {
7776 printMsg("INFO", "dump path: $OutputDumpPath");
7777 }
7778 else {
7779 printMsg("INFO", "dump path: $DumpPath");
7780 }
76147781 exit(0);
76157782 }
76167783 if(not $Descriptor{1}{"Path"}) {
76837850
76847851 printMsg("INFO", "comparing classes ...");
76857852 mergeClasses();
7686
76877853 mergeMethods();
7854
7855 foreach my $M (keys(%CompatProblems))
7856 {
7857 foreach my $K (keys(%{$CompatProblems{$M}}))
7858 {
7859 foreach my $L (keys(%{$CompatProblems{$M}{$K}}))
7860 {
7861 if(my $T = $CompatProblems{$M}{$K}{$L}{"Type_Name"}) {
7862 $TypeProblemsIndex{$T}{$M} = 1;
7863 }
7864 }
7865 }
7866 }
7867
76887868 printReport();
7869
76897870 if($RESULT{"Source"}{"Problems"} + $RESULT{"Binary"}{"Problems"}) {
76907871 exit($ERROR_CODE{"Incompatible"});
76917872 }