Debian Codegraph @

bin/counterproc

raw
1 #!/usr/bin/perl -w
2
3 # counterproc by Paul Hoffman (nkuitse AT nkuitse DOT com).
4 # Copyright 2008-2009 Paul M. Hoffman.
5 # This software is made available under the same terms as Perl;
6 # see below for details.
7
8 use strict;
9
10 # -------------------------------- Required modules
11
12 use Biblio::COUNTER::Processor::Simple;
13 use File::Basename qw(basename);
14 use Getopt::Long
15 qw(:config posix_default gnu_compat require_order pass_through no_ignore_case);
16
17 # -------------------------------- Variables
18
19 use vars qw($PROGRAM $VERSION $AUTHOR $COPYRIGHT $PAGER);
20
21 $PROGRAM = basename($0);
22 $VERSION = '0.03';
23 $AUTHOR = 'Paul Hoffman (nkuitse AT nkuitse DOT com)';
24 $COPYRIGHT = "Copyright 2008-2009 Paul M. Hoffman";
25
26 my $action = \&run;
27 my $verbose;
28
29 my $processor_class = 'Simple';
30 my @processor_args;
31 my @ignore;
32
33 # -------------------------------- Setup
34
35 $| = 1;
36
37 # -------------------------------- Read command-line options and arguments
38
39 GetOptions(
40 'P|processor=s' => \$processor_class,
41 'D|proc-arg=s' => \@processor_args,
42 'I|ignore=s' => \@ignore,
43 'u|unbuffered' => sub { $| = 1 },
44 'v|verbose' => sub { $verbose = 1; push @processor_args, 'verbose' },
45 'c|validate' => sub { $processor_class = 'Validate' },
46 'A|atomize' => sub { $processor_class = 'Atomize' },
47 'h|help' => sub { $action = \&help },
48 'V|version' => sub { $action = \&version },
49 'M|manual' => sub { $action = \&manual },
50 'L|license' => sub { $action = \&license },
51 ) or exit usage();
52
53 # -------------------------------- Perform the desired action
54
55 $action->();
56
57 # -------------------------------- Action functions
58
59 sub run {
60 if ($processor_class !~ /::/) {
61 $processor_class = 'Biblio::COUNTER::Processor::' . $processor_class;
62 }
63 die "Can't load processor '$processor_class': $@\n"
64 unless eval "use $processor_class; 1";
65 my %args;
66 foreach (@processor_args) {
67 my ($key, $val) = split /=/, $_, 2;
68 $args{$key} = defined($val) ? $val : 1;
69 }
70 my $processor = $processor_class->new(%args);
71 if (@ignore) {
72 if ($processor->can('ignore')) {
73 $processor->ignore(split /,/, @ignore);
74 }
75 else {
76 print STDERR "Processor '$processor' can't ignore events\n";
77 exit 2;
78 }
79 }
80 @ARGV = ('-') unless @ARGV;
81 exit usage() unless @ARGV == 1;
82 my $f = shift @ARGV;
83 my $report = $processor->run($f);
84 if ($report->is_valid) {
85 exit 0;
86 }
87 else {
88 exit -1;
89 }
90 }
91
92 sub help {
93 usage();
94 options();
95 exit 0;
96 }
97
98 sub version {
99 print "This is $PROGRAM " if $verbose;
100 print $VERSION;
101 print <<"EOS" if $verbose;
102 by $AUTHOR.
103 $COPYRIGHT.
104 This is free software, made available under the same terms as Perl itself.
105 EOS
106 print "\n" unless $verbose;
107 exit 0;
108 }
109
110 sub manual {
111 system(podder()) == 0
112 or print STDERR "I can't find a way to print the manual page for $PROGRAM.\n";
113 }
114
115 sub license {
116 my $pager = pager();
117 if ($pager and which('sed')) {
118 system(qq{sed '/^This software is made available/,/^The End/!d' "$0" | "$pager"});
119 } else {
120 print STDERR "I can't find a way to print the license for $PROGRAM\n";
121 }
122 }
123
124 # -------------------------------- Other functions
125
126 sub options {
127 print <<"EOS";
128 Options:
129 -v|--verbose Be verbose
130 EOS
131 }
132
133 sub usage {
134 print STDERR "$_\n" foreach @_;
135 print <<"EOS";
136 Usage:
137 $PROGRAM [OPTION...] [FILE...]
138 $PROGRAM -h|--help
139 $PROGRAM -V|--version
140 $PROGRAM -M|--manual
141 $PROGRAM -L|--license
142 EOS
143 return 1;
144 }
145
146 sub pager {
147 return $PAGER if defined $PAGER;
148 $PAGER = $ENV{'PAGER'} || which(qw(less more)) || which('cat') || 0;
149 return $PAGER;
150 }
151
152 sub podder {
153 return "cat $0 | pod2man -n $PROGRAM -s 1 -r $VERSION -c '' | nroff -man | " . pager()
154 if pager() and which('pod2man') and which('nroff');
155 return "man 1 $PROGRAM"
156 if manpage($PROGRAM);
157 return "perldoc -F $0"
158 if which('perldoc');
159 return undef;
160 }
161
162 sub which {
163 my $out;
164 no warnings;
165 foreach my $prog (@_) {
166 $out = `which $prog 2>/dev/null`;
167 if (defined $out) {
168 chomp $out;
169 return $out if -x $out;
170 }
171 }
172 return undef;
173 }
174
175 sub manpage {
176 return unless which('man');
177 my $out = `man -w 1 $PROGRAM 2>/dev/null`;
178 return unless defined $out;
179 chomp $out;
180 return $out;
181 }
182
183 =pod
184
185 =head1 NAME
186
187 counterproc - process a COUNTER report
188
189 =head1 SYNOPSIS
190
191 B<counterproc> [I<option>...] [I<file>...]
192
193 B<counterproc> B<-h>|B<--help>
194
195 B<counterproc> B<-V>|B<--version>
196
197 =head1 DESCRIPTION
198
199 B<counterproc> performs common operations on electronic resource reports that
200 conform (more or less) to the COUNTER Codes of Practice, Release 2. These
201 include report validation, correction of many common errors, and extraction of
202 raw usage data.
203
204 The action to take is specified as an option, and the file to process is the
205 sole non-option argument. Standard input is processed if no file is specified.
206
207 Output includes the (corrected) report, which is printed to standard output,
208 and whatever other output is appropriate for the desired action, which is
209 printed to standard error.
210
211 =head1 DIAGNOSTICS
212
213 The exit status of L<counterproc|counterproc> will be 0 if the report
214 is valid, or -1 if the report is B<not> valid.
215
216 =head1 OPTIONS
217
218 B<Note:> If none of B<-c>, B<--validate>, B<-A>, or B<--atomize> is specified,
219 the report will be processed using L<Biblio::COUNTER::Processor::Simple>, which
220 prints verbose diagnostic information to standard error and the (corrected)
221 report to standard output.
222
223 =over 4
224
225 =item B<-c>, B<--validate>
226
227 Validate the input.
228
229 L<Biblio::COUNTER::Processor::Validate|Biblio::COUNTER::Processor::Validate>
230 will be used to check the report, printing a count of errors and warnings to
231 standard error and the (corrected) output to standard output.
232
233 =item B<-A>, B<--atomize>
234
235 Extract data from the report, producing a single tab-delimited line for each
236 datum. The data lines are preceded by a single line containing column headers.
237
238 Each line of output has the following elements, which appear in the order
239 listed:
240
241 =over 4
242
243 =item B<code>
244
245 The short code that indicates the type of the report (e.g., C<JR1> or C<DB3>).
246
247 =item B<file>
248
249 The name of the file containing the report. Set to C<-> if processing
250 standard input.
251
252 =item B<processor>
253
254 The <Biblio::COUNTER::Processor::Atomize|Biblio::COUNTER::Processor::Atomize>
255 instance. (Just ignore this.)
256
257 =item B<report>
258
259 The instance of the appropriate subclass of
260 <Biblio::COUNTER::Report|Biblio::COUNTER::Report>. (Ignore this, too.)
261
262 =item B<period>
263
264 A string of the form I<YYYY-mm> denoting the period in question.
265
266 =item B<metric>
267
268 The type of event counted (C<requests>, C<sessions>, C<searches>, or
269 C<turnaways>).
270
271 =item B<count>
272
273 The count itself.
274
275 =item B<platform>
276
277 The platform on which the resource was provided.
278
279 =item B<title>
280
281 The resource title.
282
283 =item B<publisher>
284
285 The resource's publisher. May be the empty string.
286
287 =item B<print_issn> (journal reports only)
288
289 The journal's print ISSN.
290
291 =item B<online_issn> (journal reports only)
292
293 The journal's online ISSN.
294
295 =item B<isbn> (book reports only)
296
297 The book's ISBN.
298
299 =back
300
301 =item B<-v>, B<--verbose>
302
303 Be verbose. The effect of this depends on the action to be taken.
304
305 =item B<-h>, B<--help>
306
307 Print help information and exit.
308
309 =item B<-V>, B<--version>
310
311 Print the version number and exit. If the B<-v> or B<--verbose> option is
312 specified, print out additional information.
313
314 =item B<-M>, B<--manual>
315
316 View the manual page for B<counterproc>.
317
318 =item B<-L>, B<--license>
319
320 View the license under which B<counterproc> is distributed.
321
322 =back
323
324 =head1 AUTHOR
325
326 Paul Hoffman (nkuitse AT nkuitse DOT com)
327
328 =head1 COPYRIGHT
329
330 Copyright 2008-2009 Paul M. Hoffman.
331
332 This module is free software; you can redistribute it and/or modify it
333 under the same terms as Perl:
334
335 =over 4
336
337 =item a)
338
339 the GNU General Public License as published by the Free Software
340 Foundation; either version 1, or (at your option) any later version;
341
342 B<or>
343
344 =item b)
345
346 the "Artistic License".
347
348 For the full text of these licenses, see the script file itself or
349 enter the command B<counterproc -L>.
350
351 =back
352
353 =head1 SEE ALSO
354
355 L<Biblio::COUNTER>
356
357 L<Biblio::COUNTER::Report>
358
359 L<Biblio::COUNTER::Report::Processor::Simple>
360
361 L<Biblio::COUNTER::Report::Processor::Validate>
362
363 L<Biblio::COUNTER::Report::Processor::Atomize>
364
365 =begin license
366
367 This software is made available under the same terms as Perl:
368
369 a) the GNU General Public License as published by the Free
370 Software Foundation; either version 1, or (at your option) any
371 later version;
372
373 or (at your option)
374
375 b) the "Artistic License"
376
377 ----------------------------------------------------------------------------
378
379 The General Public License (GPL)
380 Version 2, June 1991
381
382 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge,
383 MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of
384 this license document, but changing it is not allowed.
385
386 Preamble
387
388 The licenses for most software are designed to take away your freedom to share
389 and change it. By contrast, the GNU General Public License is intended to
390 guarantee your freedom to share and change free software--to make sure the
391 software is free for all its users. This General Public License applies to most
392 of the Free Software Foundation's software and to any other program whose
393 authors commit to using it. (Some other Free Software Foundation software is
394 covered by the GNU Library General Public License instead.) You can apply it to
395 your programs, too.
396
397 When we speak of free software, we are referring to freedom, not price. Our
398 General Public Licenses are designed to make sure that you have the freedom to
399 distribute copies of free software (and charge for this service if you wish),
400 that you receive source code or can get it if you want it, that you can change
401 the software or use pieces of it in new free programs; and that you know you can
402 do these things.
403
404 To protect your rights, we need to make restrictions that forbid anyone to deny
405 you these rights or to ask you to surrender the rights. These restrictions
406 translate to certain responsibilities for you if you distribute copies of the
407 software, or if you modify it.
408
409 For example, if you distribute copies of such a program, whether gratis or for a
410 fee, you must give the recipients all the rights that you have. You must make
411 sure that they, too, receive or can get the source code. And you must show them
412 these terms so they know their rights.
413
414 We protect your rights with two steps: (1) copyright the software, and (2) offer
415 you this license which gives you legal permission to copy, distribute and/or
416 modify the software.
417
418 Also, for each author's protection and ours, we want to make certain that
419 everyone understands that there is no warranty for this free software. If the
420 software is modified by someone else and passed on, we want its recipients to
421 know that what they have is not the original, so that any problems introduced by
422 others will not reflect on the original authors' reputations.
423
424 Finally, any free program is threatened constantly by software patents. We wish
425 to avoid the danger that redistributors of a free program will individually
426 obtain patent licenses, in effect making the program proprietary. To prevent
427 this, we have made it clear that any patent must be licensed for everyone's free
428 use or not licensed at all.
429
430 The precise terms and conditions for copying, distribution and modification
431 follow.
432
433 GNU GENERAL PUBLIC LICENSE
434 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
435 MODIFICATION
436
437 0. This License applies to any program or other work which contains a notice
438 placed by the copyright holder saying it may be distributed under the terms of
439 this General Public License. The "Program", below, refers to any such program or
440 work, and a "work based on the Program" means either the Program or any
441 derivative work under copyright law: that is to say, a work containing the
442 Program or a portion of it, either verbatim or with modifications and/or
443 translated into another language. (Hereinafter, translation is included without
444 limitation in the term "modification".) Each licensee is addressed as "you".
445
446 Activities other than copying, distribution and modification are not covered by
447 this License; they are outside its scope. The act of running the Program is not
448 restricted, and the output from the Program is covered only if its contents
449 constitute a work based on the Program (independent of having been made by
450 running the Program). Whether that is true depends on what the Program does.
451
452 1. You may copy and distribute verbatim copies of the Program's source code as
453 you receive it, in any medium, provided that you conspicuously and appropriately
454 publish on each copy an appropriate copyright notice and disclaimer of warranty;
455 keep intact all the notices that refer to this License and to the absence of any
456 warranty; and give any other recipients of the Program a copy of this License
457 along with the Program.
458
459 You may charge a fee for the physical act of transferring a copy, and you may at
460 your option offer warranty protection in exchange for a fee.
461
462 2. You may modify your copy or copies of the Program or any portion of it, thus
463 forming a work based on the Program, and copy and distribute such modifications
464 or work under the terms of Section 1 above, provided that you also meet all of
465 these conditions:
466
467 a) You must cause the modified files to carry prominent notices stating that you
468 changed the files and the date of any change.
469
470 b) You must cause any work that you distribute or publish, that in whole or in
471 part contains or is derived from the Program or any part thereof, to be licensed
472 as a whole at no charge to all third parties under the terms of this License.
473
474 c) If the modified program normally reads commands interactively when run, you
475 must cause it, when started running for such interactive use in the most
476 ordinary way, to print or display an announcement including an appropriate
477 copyright notice and a notice that there is no warranty (or else, saying that
478 you provide a warranty) and that users may redistribute the program under these
479 conditions, and telling the user how to view a copy of this License. (Exception:
480 if the Program itself is interactive but does not normally print such an
481 announcement, your work based on the Program is not required to print an
482 announcement.)
483
484 These requirements apply to the modified work as a whole. If identifiable
485 sections of that work are not derived from the Program, and can be reasonably
486 considered independent and separate works in themselves, then this License, and
487 its terms, do not apply to those sections when you distribute them as separate
488 works. But when you distribute the same sections as part of a whole which is a
489 work based on the Program, the distribution of the whole must be on the terms of
490 this License, whose permissions for other licensees extend to the entire whole,
491 and thus to each and every part regardless of who wrote it.
492
493 Thus, it is not the intent of this section to claim rights or contest your
494 rights to work written entirely by you; rather, the intent is to exercise the
495 right to control the distribution of derivative or collective works based on the
496 Program.
497
498 In addition, mere aggregation of another work not based on the Program with the
499 Program (or with a work based on the Program) on a volume of a storage or
500 distribution medium does not bring the other work under the scope of this
501 License.
502
503 3. You may copy and distribute the Program (or a work based on it, under Section
504 2) in object code or executable form under the terms of Sections 1 and 2 above
505 provided that you also do one of the following:
506
507 a) Accompany it with the complete corresponding machine-readable source code,
508 which must be distributed under the terms of Sections 1 and 2 above on a medium
509 customarily used for software interchange; or,
510
511 b) Accompany it with a written offer, valid for at least three years, to give
512 any third party, for a charge no more than your cost of physically performing
513 source distribution, a complete machine-readable copy of the corresponding
514 source code, to be distributed under the terms of Sections 1 and 2 above on a
515 medium customarily used for software interchange; or,
516
517 c) Accompany it with the information you received as to the offer to distribute
518 corresponding source code. (This alternative is allowed only for noncommercial
519 distribution and only if you received the program in object code or executable
520 form with such an offer, in accord with Subsection b above.)
521
522 The source code for a work means the preferred form of the work for making
523 modifications to it. For an executable work, complete source code means all the
524 source code for all modules it contains, plus any associated interface
525 definition files, plus the scripts used to control compilation and installation
526 of the executable. However, as a special exception, the source code distributed
527 need not include anything that is normally distributed (in either source or
528 binary form) with the major components (compiler, kernel, and so on) of the
529 operating system on which the executable runs, unless that component itself
530 accompanies the executable.
531
532 If distribution of executable or object code is made by offering access to copy
533 from a designated place, then offering equivalent access to copy the source code
534 from the same place counts as distribution of the source code, even though third
535 parties are not compelled to copy the source along with the object code.
536
537 4. You may not copy, modify, sublicense, or distribute the Program except as
538 expressly provided under this License. Any attempt otherwise to copy, modify,
539 sublicense or distribute the Program is void, and will automatically terminate
540 your rights under this License. However, parties who have received copies, or
541 rights, from you under this License will not have their licenses terminated so
542 long as such parties remain in full compliance.
543
544 5. You are not required to accept this License, since you have not signed it.
545 However, nothing else grants you permission to modify or distribute the Program
546 or its derivative works. These actions are prohibited by law if you do not
547 accept this License. Therefore, by modifying or distributing the Program (or any
548 work based on the Program), you indicate your acceptance of this License to do
549 so, and all its terms and conditions for copying, distributing or modifying the
550 Program or works based on it.
551
552 6. Each time you redistribute the Program (or any work based on the Program),
553 the recipient automatically receives a license from the original licensor to
554 copy, distribute or modify the Program subject to these terms and conditions.
555 You may not impose any further restrictions on the recipients' exercise of the
556 rights granted herein. You are not responsible for enforcing compliance by third
557 parties to this License.
558
559 7. If, as a consequence of a court judgment or allegation of patent infringement
560 or for any other reason (not limited to patent issues), conditions are imposed
561 on you (whether by court order, agreement or otherwise) that contradict the
562 conditions of this License, they do not excuse you from the conditions of this
563 License. If you cannot distribute so as to satisfy simultaneously your
564 obligations under this License and any other pertinent obligations, then as a
565 consequence you may not distribute the Program at all. For example, if a patent
566 license would not permit royalty-free redistribution of the Program by all those
567 who receive copies directly or indirectly through you, then the only way you
568 could satisfy both it and this License would be to refrain entirely from
569 distribution of the Program.
570
571 If any portion of this section is held invalid or unenforceable under any
572 particular circumstance, the balance of the section is intended to apply and the
573 section as a whole is intended to apply in other circumstances.
574
575 It is not the purpose of this section to induce you to infringe any patents or
576 other property right claims or to contest validity of any such claims; this
577 section has the sole purpose of protecting the integrity of the free software
578 distribution system, which is implemented by public license practices. Many
579 people have made generous contributions to the wide range of software
580 distributed through that system in reliance on consistent application of that
581 system; it is up to the author/donor to decide if he or she is willing to
582 distribute software through any other system and a licensee cannot impose that
583 choice.
584
585 This section is intended to make thoroughly clear what is believed to be a
586 consequence of the rest of this License.
587
588 8. If the distribution and/or use of the Program is restricted in certain
589 countries either by patents or by copyrighted interfaces, the original copyright
590 holder who places the Program under this License may add an explicit
591 geographical distribution limitation excluding those countries, so that
592 distribution is permitted only in or among countries not thus excluded. In such
593 case, this License incorporates the limitation as if written in the body of this
594 License.
595
596 9. The Free Software Foundation may publish revised and/or new versions of the
597 General Public License from time to time. Such new versions will be similar in
598 spirit to the present version, but may differ in detail to address new problems
599 or concerns.
600
601 Each version is given a distinguishing version number. If the Program specifies
602 a version number of this License which applies to it and "any later version",
603 you have the option of following the terms and conditions either of that version
604 or of any later version published by the Free Software Foundation. If the
605 Program does not specify a version number of this License, you may choose any
606 version ever published by the Free Software Foundation.
607
608 10. If you wish to incorporate parts of the Program into other free programs
609 whose distribution conditions are different, write to the author to ask for
610 permission. For software which is copyrighted by the Free Software Foundation,
611 write to the Free Software Foundation; we sometimes make exceptions for this.
612 Our decision will be guided by the two goals of preserving the free status of
613 all derivatives of our free software and of promoting the sharing and reuse of
614 software generally.
615
616 NO WARRANTY
617
618 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
619 NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
620 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
621 COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
622 "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
623 IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
624 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
625 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
626 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
627 YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
628 CORRECTION.
629
630 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
631 TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY
632 WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS
633 PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
634 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
635 ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
636 (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
637 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
638 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
639 OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS
640 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
641
642 END OF TERMS AND CONDITIONS
643
644
645 ----------------------------------------------------------------------------
646
647 The Artistic License
648
649 Preamble
650
651 The intent of this document is to state the conditions under which a Package may
652 be copied, such that the Copyright Holder maintains some semblance of artistic
653 control over the development of the package, while giving the users of the
654 package the right to use and distribute the Package in a more-or-less customary
655 fashion, plus the right to make reasonable modifications.
656
657 Definitions:
658
659 - "Package" refers to the collection of files distributed by the Copyright
660 Holder, and derivatives of that collection of files created through textual
661 modification.
662 - "Standard Version" refers to such a Package if it has not been modified,
663 or has been modified in accordance with the wishes of the Copyright
664 Holder.
665 - "Copyright Holder" is whoever is named in the copyright or copyrights for
666 the package.
667 - "You" is you, if you're thinking about copying or distributing this Package.
668 - "Reasonable copying fee" is whatever you can justify on the basis of
669 media cost, duplication charges, time of people involved, and so on. (You
670 will not be required to justify it to the Copyright Holder, but only to the
671 computing community at large as a market that must bear the fee.)
672 - "Freely Available" means that no fee is charged for the item itself, though
673 there may be fees involved in handling the item. It also means that
674 recipients of the item may redistribute it under the same conditions they
675 received it.
676
677 1. You may make and give away verbatim copies of the source form of the Standard
678 Version of this Package without restriction, provided that you duplicate all of
679 the original copyright notices and associated disclaimers.
680
681 2. You may apply bug fixes, portability fixes and other modifications derived
682 from the Public Domain or from the Copyright Holder. A Package modified in such
683 a way shall still be considered the Standard Version.
684
685 3. You may otherwise modify your copy of this Package in any way, provided that
686 you insert a prominent notice in each changed file stating how and when you
687 changed that file, and provided that you do at least ONE of the following:
688
689 a) place your modifications in the Public Domain or otherwise
690 make them Freely Available, such as by posting said modifications
691 to Usenet or an equivalent medium, or placing the modifications on
692 a major archive site such as ftp.uu.net, or by allowing the
693 Copyright Holder to include your modifications in the Standard
694 Version of the Package.
695
696 b) use the modified Package only within your corporation or
697 organization.
698
699 c) rename any non-standard executables so the names do not
700 conflict with standard executables, which must also be provided,
701 and provide a separate manual page for each non-standard
702 executable that clearly documents how it differs from the Standard
703 Version.
704
705 d) make other distribution arrangements with the Copyright Holder.
706
707 4. You may distribute the programs of this Package in object code or executable
708 form, provided that you do at least ONE of the following:
709
710 a) distribute a Standard Version of the executables and library
711 files, together with instructions (in the manual page or equivalent)
712 on where to get the Standard Version.
713
714 b) accompany the distribution with the machine-readable source of
715 the Package with your modifications.
716
717 c) accompany any non-standard executables with their
718 corresponding Standard Version executables, giving the
719 non-standard executables non-standard names, and clearly
720 documenting the differences in manual pages (or equivalent),
721 together with instructions on where to get the Standard Version.
722
723 d) make other distribution arrangements with the Copyright Holder.
724
725 5. You may charge a reasonable copying fee for any distribution of this Package.
726 You may charge any fee you choose for support of this Package. You may not
727 charge a fee for this Package itself. However, you may distribute this Package
728 in aggregate with other (possibly commercial) programs as part of a larger
729 (possibly commercial) software distribution provided that you do not advertise
730 this Package as a product of your own.
731
732 6. The scripts and library files supplied as input to or produced as output from
733 the programs of this Package do not automatically fall under the copyright of
734 this Package, but belong to whomever generated them, and may be sold
735 commercially, and may be aggregated with this Package.
736
737 7. C or perl subroutines supplied by you and linked into this Package shall not
738 be considered part of this Package.
739
740 8. The name of the Copyright Holder may not be used to endorse or promote
741 products derived from this software without specific prior written permission.
742
743 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
744 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
745 WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
746 PURPOSE.
747
748 The End
749
750 =end license
751