Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | /** |
2 | * nInvaders - a space invaders clone for ncurses | |
3 | * Copyright (C) 2002-2003 Dettus | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation; either version 2 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | * | |
19 | * homepage: http://ninvaders.sourceforge.net | |
20 | * mailto: ninvaders-devel@lists.sourceforge.net | |
21 | * | |
22 | */ | |
23 | ||
24 | ||
25 | #include <stdio.h> | |
26 | #include <unistd.h> | |
27 | #include "globals.h" | |
28 | ||
29 | ||
30 | #define MAJOR 0 | |
31 | #define MINOR 1 | |
32 | #define RELEASE 1 | |
33 | ||
34 | ||
35 | ||
36 | #ifdef WIN32 | |
37 | #define usleep(x) Sleep(x/1000) | |
38 | #endif | |
39 | ||
40 | ||
41 | /** | |
42 | * sleep for specified time | |
43 | */ | |
44 | void doSleep(int microseconds) | |
45 | { | |
46 | usleep(microseconds); | |
47 | } | |
48 | ||
49 | ||
50 | /** | |
51 | * show version information | |
52 | */ | |
53 | void showVersion() | |
54 | { | |
55 | fprintf(stderr, "*** nInvaders %i.%i.%i\n", MAJOR, MINOR, RELEASE); | |
56 | fprintf(stderr, "*** (C)opyleft 2k2 by Dettus\n"); | |
57 | fprintf(stderr, "*** dettus@matrixx-bielefeld.de\n"); | |
58 | fprintf(stderr, "Additional code by Mike Saarna,\n"); | |
59 | fprintf(stderr, "Sebastian Gutsfeld -> segoh@gmx.net,\n"); | |
60 | fprintf(stderr, "Alexander Hollinger -> alexander.hollinger@gmx.net and\n"); | |
61 | fprintf(stderr, "Matthias Thar -> hiast2@compuserve.de\n"); | |
62 | } | |
63 | ||
64 | ||
65 | /** | |
66 | * show usage of command line parameters | |
67 | */ | |
68 | void showUsage() | |
69 | { | |
70 | ||
71 | fprintf(stderr, "\n\nUsage: nInvaders [-l skill] [-gpl]\n"); | |
72 | fprintf(stderr, " where -l 0=NIGHTMARE\n"); | |
73 | fprintf(stderr, " -l 1=okay\n"); | |
74 | fprintf(stderr, " -l 9=May I play daddy?!\n"); | |
75 | fprintf(stderr, "\n -gpl shows you the license file\n"); | |
76 | } | |
77 | ||
78 | ||
79 | /** | |
80 | * wait for input of return to continue | |
81 | */ | |
82 | void waitForReturn() | |
83 | { | |
84 | char b[2]; | |
85 | fprintf(stderr, "...Please press <Enter> to read on..."); | |
86 | fgets(b, sizeof(b), stdin); | |
87 | } | |
88 | ||
89 | /** | |
90 | * show short version of Gnu GPL | |
91 | */ | |
92 | void showGplShort() | |
93 | { | |
94 | fprintf(stderr,"\n"); | |
95 | fprintf(stderr,"This program is free software; you can redistribute it and/or modify\n"); | |
96 | fprintf(stderr,"it under the terms of the GNU General Public License as published by\n"); | |
97 | fprintf(stderr,"the Free Software Foundation; either version 2 of the License, or\n"); | |
98 | fprintf(stderr,"(at your option) any later version.\n"); | |
99 | fprintf(stderr,"\n"); | |
100 | fprintf(stderr,"This program is distributed in the hope that it will be useful,\n"); | |
101 | fprintf(stderr,"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); | |
102 | fprintf(stderr,"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); | |
103 | fprintf(stderr,"GNU General Public License for more details.\n"); | |
104 | fprintf(stderr,"\n"); | |
105 | fprintf(stderr,"You should have received a copy of the GNU General Public License\n"); | |
106 | fprintf(stderr,"along with this program; if not, write to the Free Software\n"); | |
107 | fprintf(stderr,"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"); | |
108 | fprintf(stderr,"\n"); | |
109 | fprintf(stderr,"Use the -gpl command line switch to see the full license of this program\n"); | |
110 | fprintf(stderr,"Use the -help command line switch to see who wrote this program \n"); | |
111 | fprintf(stderr,"\n"); | |
112 | } | |
113 | ||
114 | /** | |
115 | * show GNU GENERAL PUBLIC LICENSE | |
116 | */ | |
117 | void showGpl() | |
118 | { | |
119 | fprintf(stderr, "\n"); | |
120 | fprintf(stderr, " GNU GENERAL PUBLIC LICENSE\n"); | |
121 | fprintf(stderr, " Version 2, June 1991\n"); | |
122 | fprintf(stderr, "\n"); | |
123 | fprintf(stderr, " Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n"); | |
124 | fprintf(stderr, " 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"); | |
125 | fprintf(stderr, " Everyone is permitted to copy and distribute verbatim copies\n"); | |
126 | fprintf(stderr, " of this license document, but changing it is not allowed.\n"); | |
127 | fprintf(stderr, "\n"); | |
128 | fprintf(stderr, " Preamble\n"); | |
129 | fprintf(stderr, "\n"); | |
130 | fprintf(stderr, " The licenses for most software are designed to take away your\n"); | |
131 | fprintf(stderr, "freedom to share and change it. By contrast, the GNU General Public\n"); | |
132 | fprintf(stderr, "License is intended to guarantee your freedom to share and change free \n"); | |
133 | fprintf(stderr, "software--to make sure the software is free for all its users. This\n"); | |
134 | fprintf(stderr, "General Public License applies to most of the Free Software\n"); | |
135 | fprintf(stderr, "Foundation's software and to any other program whose authors commit to\n"); | |
136 | fprintf(stderr, "using it. (Some other Free Software Foundation software is covered by\n"); | |
137 | fprintf(stderr, "the GNU Library General Public License instead.) You can apply it to\n"); | |
138 | fprintf(stderr, "your programs, too.\n"); | |
139 | fprintf(stderr, "\n"); | |
140 | fprintf(stderr, " When we speak of free software, we are referring to freedom, not\n"); | |
141 | fprintf(stderr, "price. Our General Public Licenses are designed to make sure that you\n"); | |
142 | fprintf(stderr, "have the freedom to distribute copies of free software (and charge for\n"); | |
143 | fprintf(stderr, "\n"); | |
144 | ||
145 | waitForReturn(); | |
146 | ||
147 | fprintf(stderr, "this service if you wish), that you receive source code or can get it\n"); | |
148 | fprintf(stderr, "if you want it, that you can change the software or use pieces of it\n"); | |
149 | fprintf(stderr, "in new free programs; and that you know you can do these things.\n"); | |
150 | fprintf(stderr, "\n"); | |
151 | fprintf(stderr, " To protect your rights, we need to make restrictions that forbid\n"); | |
152 | fprintf(stderr, "anyone to deny you these rights or to ask you to surrender the rights.\n"); | |
153 | fprintf(stderr, "These restrictions translate to certain responsibilities for you if you\n"); | |
154 | fprintf(stderr, "distribute copies of the software, or if you modify it.\n"); | |
155 | fprintf(stderr, "\n"); | |
156 | fprintf(stderr, " For example, if you distribute copies of such a program, whether\n"); | |
157 | fprintf(stderr, "gratis or for a fee, you must give the recipients all the rights that\n"); | |
158 | fprintf(stderr, "you have. You must make sure that they, too, receive or can get the\n"); | |
159 | fprintf(stderr, "source code. And you must show them these terms so they know their\n"); | |
160 | fprintf(stderr, "rights.\n"); | |
161 | fprintf(stderr, "\n"); | |
162 | fprintf(stderr, " We protect your rights with two steps: (1) copyright the software, and\n"); | |
163 | fprintf(stderr, "(2) offer you this license which gives you legal permission to copy,\n"); | |
164 | fprintf(stderr, "distribute and/or modify the software.\n"); | |
165 | fprintf(stderr, "\n"); | |
166 | fprintf(stderr, " Also, for each author's protection and ours, we want to make certain\n"); | |
167 | fprintf(stderr, "that everyone understands that there is no warranty for this free\n"); | |
168 | fprintf(stderr, "software. If the software is modified by someone else and passed on, we\n"); | |
169 | fprintf(stderr, "want its recipients to know that what they have is not the original, so\n"); | |
170 | fprintf(stderr, "\n"); | |
171 | ||
172 | waitForReturn(); | |
173 | ||
174 | fprintf(stderr, "\n"); | |
175 | fprintf(stderr, "that any problems introduced by others will not reflect on the original\n"); | |
176 | fprintf(stderr, "authors' reputations.\n"); | |
177 | fprintf(stderr, "\n"); | |
178 | fprintf(stderr, " Finally, any free program is threatened constantly by software\n"); | |
179 | fprintf(stderr, "patents. We wish to avoid the danger that redistributors of a free\n"); | |
180 | fprintf(stderr, "program will individually obtain patent licenses, in effect making the\n"); | |
181 | fprintf(stderr, "program proprietary. To prevent this, we have made it clear that any\n"); | |
182 | fprintf(stderr, "patent must be licensed for everyone's free use or not licensed at all.\n"); | |
183 | fprintf(stderr, "\n"); | |
184 | fprintf(stderr, " The precise terms and conditions for copying, distribution and\n"); | |
185 | fprintf(stderr, "modification follow.\n"); | |
186 | fprintf(stderr, "\n"); | |
187 | fprintf(stderr, " GNU GENERAL PUBLIC LICENSE\n"); | |
188 | fprintf(stderr, " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n"); | |
189 | fprintf(stderr, "\n"); | |
190 | fprintf(stderr, " 0. This License applies to any program or other work which contains\n"); | |
191 | fprintf(stderr, "a notice placed by the copyright holder saying it may be distributed\n"); | |
192 | fprintf(stderr, "under the terms of this General Public License. The 'Program', below,\n"); | |
193 | fprintf(stderr, "refers to any such program or work, and a 'work based on the Program'\n"); | |
194 | fprintf(stderr, "means either the Program or any derivative work under copyright law:\n"); | |
195 | fprintf(stderr, "that is to say, a work containing the Program or a portion of it,\n"); | |
196 | fprintf(stderr, "either verbatim or with modifications and/or translated into another\n"); | |
197 | fprintf(stderr, "language. (Hereinafter, translation is included without limitation in\n"); | |
198 | fprintf(stderr, "\n"); | |
199 | ||
200 | waitForReturn(); | |
201 | ||
202 | fprintf(stderr, "\n"); | |
203 | fprintf(stderr, "the term 'modification'.) Each licensee is addressed as 'you'.\n"); | |
204 | fprintf(stderr, "\n"); | |
205 | fprintf(stderr, "Activities other than copying, distribution and modification are not\n"); | |
206 | fprintf(stderr, "covered by this License; they are outside its scope. The act of\n"); | |
207 | fprintf(stderr, "running the Program is not restricted, and the output from the Program\n"); | |
208 | fprintf(stderr, "is covered only if its contents constitute a work based on the\n"); | |
209 | fprintf(stderr, "Program (independent of having been made by running the Program).\n"); | |
210 | fprintf(stderr, "Whether that is true depends on what the Program does.\n"); | |
211 | fprintf(stderr, "\n"); | |
212 | fprintf(stderr, " 1. You may copy and distribute verbatim copies of the Program's\n"); | |
213 | fprintf(stderr, "source code as you receive it, in any medium, provided that you\n"); | |
214 | fprintf(stderr, "conspicuously and appropriately publish on each copy an appropriate\n"); | |
215 | fprintf(stderr, "copyright notice and disclaimer of warranty; keep intact all the\n"); | |
216 | fprintf(stderr, "notices that refer to this License and to the absence of any warranty;\n"); | |
217 | fprintf(stderr, "and give any other recipients of the Program a copy of this License\n"); | |
218 | fprintf(stderr, "along with the Program.\n"); | |
219 | fprintf(stderr, "\n"); | |
220 | fprintf(stderr, "You may charge a fee for the physical act of transferring a copy, and\n"); | |
221 | fprintf(stderr, "you may at your option offer warranty protection in exchange for a fee.\n"); | |
222 | fprintf(stderr, "\n"); | |
223 | fprintf(stderr, " 2. You may modify your copy or copies of the Program or any portion\n"); | |
224 | fprintf(stderr, "of it, thus forming a work based on the Program, and copy and\n"); | |
225 | fprintf(stderr, "distribute such modifications or work under the terms of Section 1\n"); | |
226 | fprintf(stderr, "\n"); | |
227 | ||
228 | waitForReturn(); | |
229 | ||
230 | fprintf(stderr, "\n"); | |
231 | fprintf(stderr, "above, provided that you also meet all of these conditions:\n"); | |
232 | fprintf(stderr, "\n"); | |
233 | fprintf(stderr, " a) You must cause the modified files to carry prominent notices\n"); | |
234 | fprintf(stderr, " stating that you changed the files and the date of any change.\n"); | |
235 | fprintf(stderr, "\n"); | |
236 | fprintf(stderr, " b) You must cause any work that you distribute or publish, that in\n"); | |
237 | fprintf(stderr, " whole or in part contains or is derived from the Program or any\n"); | |
238 | fprintf(stderr, " part thereof, to be licensed as a whole at no charge to all third\n"); | |
239 | fprintf(stderr, " parties under the terms of this License.\n"); | |
240 | fprintf(stderr, "\n"); | |
241 | fprintf(stderr, " c) If the modified program normally reads commands interactively\n"); | |
242 | fprintf(stderr, " when run, you must cause it, when started running for such\n"); | |
243 | fprintf(stderr, " interactive use in the most ordinary way, to print or display an\n"); | |
244 | fprintf(stderr, " announcement including an appropriate copyright notice and a\n"); | |
245 | fprintf(stderr, " notice that there is no warranty (or else, saying that you provide\n"); | |
246 | fprintf(stderr, " a warranty) and that users may redistribute the program under\n"); | |
247 | fprintf(stderr, " these conditions, and telling the user how to view a copy of this\n"); | |
248 | fprintf(stderr, " License. (Exception: if the Program itself is interactive but\n"); | |
249 | fprintf(stderr, " does not normally print such an announcement, your work based on\n"); | |
250 | fprintf(stderr, " the Program is not required to print an announcement.)\n"); | |
251 | fprintf(stderr, "\n"); | |
252 | fprintf(stderr, "These requirements apply to the modified work as a whole. If\n"); | |
253 | fprintf(stderr, "identifiable sections of that work are not derived from the Program,\n"); | |
254 | fprintf(stderr, "\n"); | |
255 | ||
256 | waitForReturn(); | |
257 | ||
258 | fprintf(stderr, "\n"); | |
259 | fprintf(stderr, "and can be reasonably considered independent and separate works in\n"); | |
260 | fprintf(stderr, "themselves, then this License, and its terms, do not apply to those\n"); | |
261 | fprintf(stderr, "sections when you distribute them as separate works. But when you\n"); | |
262 | fprintf(stderr, "distribute the same sections as part of a whole which is a work based\n"); | |
263 | fprintf(stderr, "on the Program, the distribution of the whole must be on the terms of\n"); | |
264 | fprintf(stderr, "this License, whose permissions for other licensees extend to the\n"); | |
265 | fprintf(stderr, "entire whole, and thus to each and every part regardless of who wrote it.\n"); | |
266 | fprintf(stderr, "\n"); | |
267 | fprintf(stderr, "Thus, it is not the intent of this section to claim rights or contest\n"); | |
268 | fprintf(stderr, "your rights to work written entirely by you; rather, the intent is to\n"); | |
269 | fprintf(stderr, "exercise the right to control the distribution of derivative or\n"); | |
270 | fprintf(stderr, "collective works based on the Program.\n"); | |
271 | fprintf(stderr, "\n"); | |
272 | fprintf(stderr, "In addition, mere aggregation of another work not based on the Program\n"); | |
273 | fprintf(stderr, "with the Program (or with a work based on the Program) on a volume of\n"); | |
274 | fprintf(stderr, "a storage or distribution medium does not bring the other work under\n"); | |
275 | fprintf(stderr, "the scope of this License.\n"); | |
276 | fprintf(stderr, "\n"); | |
277 | fprintf(stderr, " 3. You may copy and distribute the Program (or a work based on it,\n"); | |
278 | fprintf(stderr, "under Section 2) in object code or executable form under the terms of\n"); | |
279 | fprintf(stderr, "Sections 1 and 2 above provided that you also do one of the following:\n"); | |
280 | fprintf(stderr, "\n"); | |
281 | fprintf(stderr, " a) Accompany it with the complete corresponding machine-readable\n"); | |
282 | fprintf(stderr, "\n"); | |
283 | ||
284 | waitForReturn(); | |
285 | ||
286 | fprintf(stderr, "\n"); | |
287 | fprintf(stderr, " source code, which must be distributed under the terms of Sections\n"); | |
288 | fprintf(stderr, " 1 and 2 above on a medium customarily used for software interchange; or,\n"); | |
289 | fprintf(stderr, "\n"); | |
290 | fprintf(stderr, " b) Accompany it with a written offer, valid for at least three\n"); | |
291 | fprintf(stderr, " years, to give any third party, for a charge no more than your\n"); | |
292 | fprintf(stderr, " cost of physically performing source distribution, a complete\n"); | |
293 | fprintf(stderr, " machine-readable copy of the corresponding source code, to be\n"); | |
294 | fprintf(stderr, " distributed under the terms of Sections 1 and 2 above on a medium\n"); | |
295 | fprintf(stderr, " customarily used for software interchange; or,\n"); | |
296 | fprintf(stderr, "\n"); | |
297 | fprintf(stderr, " c) Accompany it with the information you received as to the offer\n"); | |
298 | fprintf(stderr, " to distribute corresponding source code. (This alternative is\n"); | |
299 | fprintf(stderr, " allowed only for noncommercial distribution and only if you\n"); | |
300 | fprintf(stderr, " received the program in object code or executable form with such\n"); | |
301 | fprintf(stderr, " an offer, in accord with Subsection b above.)\n"); | |
302 | fprintf(stderr, "\n"); | |
303 | fprintf(stderr, "The source code for a work means the preferred form of the work for\n"); | |
304 | fprintf(stderr, "making modifications to it. For an executable work, complete source\n"); | |
305 | fprintf(stderr, "code means all the source code for all modules it contains, plus any\n"); | |
306 | fprintf(stderr, "associated interface definition files, plus the scripts used to\n"); | |
307 | fprintf(stderr, "control compilation and installation of the executable. However, as a\n"); | |
308 | fprintf(stderr, "special exception, the source code distributed need not include\n"); | |
309 | fprintf(stderr, "anything that is normally distributed (in either source or binary\n"); | |
310 | fprintf(stderr, "\n"); | |
311 | ||
312 | waitForReturn(); | |
313 | ||
314 | fprintf(stderr, "\n"); | |
315 | fprintf(stderr, "form) with the major components (compiler, kernel, and so on) of the\n"); | |
316 | fprintf(stderr, "operating system on which the executable runs, unless that component\n"); | |
317 | fprintf(stderr, "itself accompanies the executable.\n"); | |
318 | fprintf(stderr, "\n"); | |
319 | fprintf(stderr, "If distribution of executable or object code is made by offering\n"); | |
320 | fprintf(stderr, "access to copy from a designated place, then offering equivalent\n"); | |
321 | fprintf(stderr, "access to copy the source code from the same place counts as\n"); | |
322 | fprintf(stderr, "distribution of the source code, even though third parties are not\n"); | |
323 | fprintf(stderr, "compelled to copy the source along with the object code.\n"); | |
324 | fprintf(stderr, "\n"); | |
325 | fprintf(stderr, " 4. You may not copy, modify, sublicense, or distribute the Program\n"); | |
326 | fprintf(stderr, "except as expressly provided under this License. Any attempt\n"); | |
327 | fprintf(stderr, "otherwise to copy, modify, sublicense or distribute the Program is\n"); | |
328 | fprintf(stderr, "void, and will automatically terminate your rights under this License.\n"); | |
329 | fprintf(stderr, "However, parties who have received copies, or rights, from you under\n"); | |
330 | fprintf(stderr, "this License will not have their licenses terminated so long as such\n"); | |
331 | fprintf(stderr, "parties remain in full compliance.\n"); | |
332 | fprintf(stderr, "\n"); | |
333 | fprintf(stderr, " 5. You are not required to accept this License, since you have not\n"); | |
334 | fprintf(stderr, "signed it. However, nothing else grants you permission to modify or\n"); | |
335 | fprintf(stderr, "distribute the Program or its derivative works. These actions are\n"); | |
336 | fprintf(stderr, "prohibited by law if you do not accept this License. Therefore, by\n"); | |
337 | fprintf(stderr, "modifying or distributing the Program (or any work based on the\n"); | |
338 | fprintf(stderr, "\n"); | |
339 | ||
340 | waitForReturn(); | |
341 | ||
342 | fprintf(stderr, "\n"); | |
343 | fprintf(stderr, "Program), you indicate your acceptance of this License to do so, and\n"); | |
344 | fprintf(stderr, "all its terms and conditions for copying, distributing or modifying\n"); | |
345 | fprintf(stderr, "the Program or works based on it.\n"); | |
346 | fprintf(stderr, "\n"); | |
347 | fprintf(stderr, " 6. Each time you redistribute the Program (or any work based on the\n"); | |
348 | fprintf(stderr, "Program), the recipient automatically receives a license from the\n"); | |
349 | fprintf(stderr, "original licensor to copy, distribute or modify the Program subject to\n"); | |
350 | fprintf(stderr, "these terms and conditions. You may not impose any further\n"); | |
351 | fprintf(stderr, "restrictions on the recipients' exercise of the rights granted herein.\n"); | |
352 | fprintf(stderr, "You are not responsible for enforcing compliance by third parties to\n"); | |
353 | fprintf(stderr, "this License.\n"); | |
354 | fprintf(stderr, "\n"); | |
355 | fprintf(stderr, " 7. If, as a consequence of a court judgment or allegation of patent\n"); | |
356 | fprintf(stderr, "infringement or for any other reason (not limited to patent issues),\n"); | |
357 | fprintf(stderr, "conditions are imposed on you (whether by court order, agreement or\n"); | |
358 | fprintf(stderr, "otherwise) that contradict the conditions of this License, they do not\n"); | |
359 | fprintf(stderr, "excuse you from the conditions of this License. If you cannot\n"); | |
360 | fprintf(stderr, "distribute so as to satisfy simultaneously your obligations under this\n"); | |
361 | fprintf(stderr, "License and any other pertinent obligations, then as a consequence you\n"); | |
362 | fprintf(stderr, "may not distribute the Program at all. For example, if a patent\n"); | |
363 | fprintf(stderr, "license would not permit royalty-free redistribution of the Program by\n"); | |
364 | fprintf(stderr, "all those who receive copies directly or indirectly through you, then\n"); | |
365 | fprintf(stderr, "the only way you could satisfy both it and this License would be to\n"); | |
366 | fprintf(stderr, "\n"); | |
367 | ||
368 | waitForReturn(); | |
369 | ||
370 | fprintf(stderr, "\n"); | |
371 | fprintf(stderr, "refrain entirely from distribution of the Program.\n"); | |
372 | fprintf(stderr, "\n"); | |
373 | fprintf(stderr, "If any portion of this section is held invalid or unenforceable under\n"); | |
374 | fprintf(stderr, "any particular circumstance, the balance of the section is intended to\n"); | |
375 | fprintf(stderr, "apply and the section as a whole is intended to apply in other\n"); | |
376 | fprintf(stderr, "circumstances.\n"); | |
377 | fprintf(stderr, "\n"); | |
378 | fprintf(stderr, "It is not the purpose of this section to induce you to infringe any\n"); | |
379 | fprintf(stderr, "patents or other property right claims or to contest validity of any\n"); | |
380 | fprintf(stderr, "such claims; this section has the sole purpose of protecting the\n"); | |
381 | fprintf(stderr, "integrity of the free software distribution system, which is\n"); | |
382 | fprintf(stderr, "implemented by public license practices. Many people have made\n"); | |
383 | fprintf(stderr, "generous contributions to the wide range of software distributed\n"); | |
384 | fprintf(stderr, "through that system in reliance on consistent application of that\n"); | |
385 | fprintf(stderr, "system; it is up to the author/donor to decide if he or she is willing\n"); | |
386 | fprintf(stderr, "to distribute software through any other system and a licensee cannot\n"); | |
387 | fprintf(stderr, "impose that choice.\n"); | |
388 | fprintf(stderr, "\n"); | |
389 | fprintf(stderr, "This section is intended to make thoroughly clear what is believed to\n"); | |
390 | fprintf(stderr, "be a consequence of the rest of this License.\n"); | |
391 | fprintf(stderr, " 8. If the distribution and/or use of the Program is restricted in\n"); | |
392 | fprintf(stderr, "certain countries either by patents or by copyrighted interfaces, the\n"); | |
393 | fprintf(stderr, "original copyright holder who places the Program under this License\n"); | |
394 | fprintf(stderr, "\n"); | |
395 | ||
396 | waitForReturn(); | |
397 | ||
398 | fprintf(stderr, "\n"); | |
399 | fprintf(stderr, "may add an explicit geographical distribution limitation excluding\n"); | |
400 | fprintf(stderr, "those countries, so that distribution is permitted only in or among\n"); | |
401 | fprintf(stderr, "countries not thus excluded. In such case, this License incorporates\n"); | |
402 | fprintf(stderr, "the limitation as if written in the body of this License.\n"); | |
403 | fprintf(stderr, "\n"); | |
404 | fprintf(stderr, " 9. The Free Software Foundation may publish revised and/or new versions\n"); | |
405 | fprintf(stderr, "of the General Public License from time to time. Such new versions will\n"); | |
406 | fprintf(stderr, "be similar in spirit to the present version, but may differ in detail to\n"); | |
407 | fprintf(stderr, "address new problems or concerns.\n"); | |
408 | fprintf(stderr, "\n"); | |
409 | fprintf(stderr, "Each version is given a distinguishing version number. If the Program\n"); | |
410 | fprintf(stderr, "specifies a version number of this License which applies to it and 'any\n"); | |
411 | fprintf(stderr, "later version', you have the option of following the terms and conditions\n"); | |
412 | fprintf(stderr, "either of that version or of any later version published by the Free\n"); | |
413 | fprintf(stderr, "Software Foundation. If the Program does not specify a version number of\n"); | |
414 | fprintf(stderr, "this License, you may choose any version ever published by the Free Software\n"); | |
415 | fprintf(stderr, "Foundation.\n"); | |
416 | fprintf(stderr, "\n"); | |
417 | fprintf(stderr, " 10. If you wish to incorporate parts of the Program into other free\n"); | |
418 | fprintf(stderr, "programs whose distribution conditions are different, write to the author\n"); | |
419 | fprintf(stderr, "to ask for permission. For software which is copyrighted by the Free\n"); | |
420 | fprintf(stderr, "Software Foundation, write to the Free Software Foundation; we sometimes\n"); | |
421 | fprintf(stderr, "make exceptions for this. Our decision will be guided by the two goals\n"); | |
422 | fprintf(stderr, "\n"); | |
423 | ||
424 | waitForReturn(); | |
425 | ||
426 | fprintf(stderr, "\n"); | |
427 | fprintf(stderr, "of preserving the free status of all derivatives of our free software and\n"); | |
428 | fprintf(stderr, "of promoting the sharing and reuse of software generally.\n"); | |
429 | fprintf(stderr, "\n"); | |
430 | fprintf(stderr, " NO WARRANTY\n"); | |
431 | fprintf(stderr, "\n"); | |
432 | fprintf(stderr, " 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n"); | |
433 | fprintf(stderr, "FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n"); | |
434 | fprintf(stderr, "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n"); | |
435 | fprintf(stderr, "PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n"); | |
436 | fprintf(stderr, "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n"); | |
437 | fprintf(stderr, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n"); | |
438 | fprintf(stderr, "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n"); | |
439 | fprintf(stderr, "PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n"); | |
440 | fprintf(stderr, "REPAIR OR CORRECTION.\n"); | |
441 | fprintf(stderr, "\n"); | |
442 | fprintf(stderr, " 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"); | |
443 | fprintf(stderr, "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n"); | |
444 | fprintf(stderr, "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n"); | |
445 | fprintf(stderr, "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n"); | |
446 | fprintf(stderr, "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n"); | |
447 | fprintf(stderr, "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n"); | |
448 | fprintf(stderr, "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n"); | |
449 | fprintf(stderr, "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n"); | |
450 | fprintf(stderr, "\n"); | |
451 | ||
452 | waitForReturn(); | |
453 | ||
454 | fprintf(stderr, "\n"); | |
455 | fprintf(stderr, "POSSIBILITY OF SUCH DAMAGES.\n"); | |
456 | fprintf(stderr, "\n"); | |
457 | fprintf(stderr, " END OF TERMS AND CONDITIONS\n"); | |
458 | fprintf(stderr, " How to Apply These Terms to Your New Programs\n"); | |
459 | fprintf(stderr, "\n"); | |
460 | fprintf(stderr, " If you develop a new program, and you want it to be of the greatest\n"); | |
461 | fprintf(stderr, "possible use to the public, the best way to achieve this is to make it\n"); | |
462 | fprintf(stderr, "free software which everyone can redistribute and change under these terms.\n"); | |
463 | fprintf(stderr, "\n"); | |
464 | fprintf(stderr, " To do so, attach the following notices to the program. It is safest\n"); | |
465 | fprintf(stderr, "to attach them to the start of each source file to most effectively\n"); | |
466 | fprintf(stderr, "convey the exclusion of warranty; and each file should have at least\n"); | |
467 | fprintf(stderr, "the 'copyright' line and a pointer to where the full notice is found.\n"); | |
468 | fprintf(stderr, "\n"); | |
469 | fprintf(stderr, " <one line to give the program's name and a brief idea of what it does.>\n"); | |
470 | fprintf(stderr, " Copyright (C) <year> <name of author>\n"); | |
471 | fprintf(stderr, "\n"); | |
472 | fprintf(stderr, " This program is free software; you can redistribute it and/or modify\n"); | |
473 | fprintf(stderr, " it under the terms of the GNU General Public License as published by\n"); | |
474 | fprintf(stderr, " the Free Software Foundation; either version 2 of the License, or\n"); | |
475 | fprintf(stderr, " (at your option) any later version.\n"); | |
476 | fprintf(stderr, "\n"); | |
477 | fprintf(stderr, " This program is distributed in the hope that it will be useful,\n"); | |
478 | fprintf(stderr, "\n"); | |
479 | ||
480 | waitForReturn(); | |
481 | ||
482 | fprintf(stderr, "\n"); | |
483 | fprintf(stderr, " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); | |
484 | fprintf(stderr, " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); | |
485 | fprintf(stderr, " GNU General Public License for more details.\n"); | |
486 | fprintf(stderr, "\n"); | |
487 | fprintf(stderr, " You should have received a copy of the GNU General Public License\n"); | |
488 | fprintf(stderr, " along with this program; if not, write to the Free Software\n"); | |
489 | fprintf(stderr, " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"); | |
490 | fprintf(stderr, "\n"); | |
491 | fprintf(stderr, "\n"); | |
492 | fprintf(stderr, "Also add information on how to contact you by electronic and paper mail.\n"); | |
493 | fprintf(stderr, "\n"); | |
494 | fprintf(stderr, "If the program is interactive, make it output a short notice like this\n"); | |
495 | fprintf(stderr, "when it starts in an interactive mode:\n"); | |
496 | fprintf(stderr, "\n"); | |
497 | fprintf(stderr, " Gnomovision version 69, Copyright (C) year name of author\n"); | |
498 | fprintf(stderr, " Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n"); | |
499 | fprintf(stderr, " This is free software, and you are welcome to redistribute it\n"); | |
500 | fprintf(stderr, " under certain conditions; type `show c' for details.\n"); | |
501 | fprintf(stderr, "\n"); | |
502 | fprintf(stderr, "The hypothetical commands `show w' and `show c' should show the appropriate\n"); | |
503 | fprintf(stderr, "parts of the General Public License. Of course, the commands you use may\n"); | |
504 | fprintf(stderr, "be called something other than `show w' and `show c'; they could even be\n"); | |
505 | fprintf(stderr, "mouse-clicks or menu items--whatever suits your program.\n"); | |
506 | fprintf(stderr, "\n"); | |
507 | ||
508 | waitForReturn(); | |
509 | ||
510 | fprintf(stderr, "\n"); | |
511 | fprintf(stderr, "You should also get your employer (if you work as a programmer) or your\n"); | |
512 | fprintf(stderr, "school, if any, to sign a 'copyright disclaimer' for the program, if\n"); | |
513 | fprintf(stderr, "necessary. Here is a sample; alter the names:\n"); | |
514 | fprintf(stderr, "\n"); | |
515 | fprintf(stderr, " Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n"); | |
516 | fprintf(stderr, " `Gnomovision' (which makes passes at compilers) written by James Hacker.\n"); | |
517 | fprintf(stderr, "\n"); | |
518 | fprintf(stderr, " <signature of Ty Coon>, 1 April 1989\n"); | |
519 | fprintf(stderr, " Ty Coon, President of Vice\n"); | |
520 | fprintf(stderr, "\n"); | |
521 | fprintf(stderr, "This General Public License does not permit incorporating your program into\n"); | |
522 | fprintf(stderr, "proprietary programs. If your program is a subroutine library, you may\n"); | |
523 | fprintf(stderr, "consider it more useful to permit linking proprietary applications with the\n"); | |
524 | fprintf(stderr, "library. If this is what you want to do, use the GNU Library General\n"); | |
525 | fprintf(stderr, "Public License instead of this License.\n"); | |
526 | fprintf(stderr, "\n"); | |
527 | ||
528 | waitForReturn(); | |
529 | ||
530 | } |