jslint 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.md +17 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/bin/jslint +33 -0
- data/jslint.gemspec +73 -0
- data/jslint/adsafe.js +1769 -0
- data/jslint/fulljslint.js +5664 -0
- data/jslint/intercept.js +86 -0
- data/jslint/json2.js +472 -0
- data/jslint/rhino.js +59 -0
- data/jslint/widget.js +155 -0
- data/lib/generators/jslint/update_config/templates/jslint.yml +44 -0
- data/lib/generators/jslint/update_config/update_config_generator.rb +17 -0
- data/lib/js-1.7R2.jar +0 -0
- data/lib/jslint.rb +8 -0
- data/lib/jslint/engine.rb +6 -0
- data/lib/tasks/jslint.rake +18 -0
- data/rhino-1.7R2-license.txt +851 -0
- data/spec/jslint_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- metadata +121 -0
data/jslint/rhino.js
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
// rhino.js
|
2
|
+
// 2009-09-11
|
3
|
+
/*
|
4
|
+
Copyright (c) 2002 Douglas Crockford (www.JSLint.com) Rhino Edition
|
5
|
+
*/
|
6
|
+
|
7
|
+
// This is the Rhino companion to fulljslint.js.
|
8
|
+
|
9
|
+
/*global JSLINT */
|
10
|
+
/*jslint rhino: true, strict: false */
|
11
|
+
|
12
|
+
(function (a) {
|
13
|
+
var e, i, options, arg;
|
14
|
+
if (!a[0]) {
|
15
|
+
print("Usage: jslint.js [options] file.js");
|
16
|
+
quit(1);
|
17
|
+
}
|
18
|
+
options = {
|
19
|
+
rhino: true, passfail:false,
|
20
|
+
bitwise: true, eqeqeq: true, immed: true,
|
21
|
+
newcap: true, nomen: true, onevar: true, plusplus: true,
|
22
|
+
regexp: true, undef: true, white: true
|
23
|
+
};
|
24
|
+
while((arg = a.shift())) {
|
25
|
+
if (arg.match(/^--no(\w+)$/)) {
|
26
|
+
options[RegExp.$1] = false;
|
27
|
+
}
|
28
|
+
else if (arg.match(/^--(\w+)=(\S.*)$/)) {
|
29
|
+
options[RegExp.$1] = JSON.parse(RegExp.$2);
|
30
|
+
}
|
31
|
+
else if (arg.match(/^--(\w+)$/)) {
|
32
|
+
options[RegExp.$1] = true;
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
var filename = arg
|
36
|
+
var input = readFile(filename);
|
37
|
+
if (!input) {
|
38
|
+
print("jslint: Couldn't open file '" + filename + "'.");
|
39
|
+
quit(1);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
if (!JSLINT(input, options)) {
|
44
|
+
for (i = 0; i < JSLINT.errors.length; i += 1) {
|
45
|
+
e = JSLINT.errors[i];
|
46
|
+
if (e) {
|
47
|
+
print('Lint at line ' + e.line + ' character ' +
|
48
|
+
e.character + ': ' + e.reason);
|
49
|
+
print((e.evidence || '').
|
50
|
+
replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
|
51
|
+
print('');
|
52
|
+
}
|
53
|
+
}
|
54
|
+
quit(2);
|
55
|
+
} else {
|
56
|
+
print("jslint: No problems found in " + a[0]);
|
57
|
+
quit();
|
58
|
+
}
|
59
|
+
}(arguments));
|
data/jslint/widget.js
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
// web.js
|
2
|
+
// 2009-10-03
|
3
|
+
|
4
|
+
// This is the web browser companion to fulljslint.js. It is an ADsafe
|
5
|
+
// lib file that implements a web ui by adding behavior to the widget's
|
6
|
+
// html tags.
|
7
|
+
|
8
|
+
// It stores a function in lib.init_jslint_ui. Calling that function will
|
9
|
+
// start up the JSLint widget ui.
|
10
|
+
|
11
|
+
// option = {adsafe: true, fragment: false}
|
12
|
+
|
13
|
+
/*members check, cookie, each, edition, get, getTitle, getValue, indent,
|
14
|
+
isArray, join, jslint, lib, maxerr, maxlen, on, passfail, predef, push,
|
15
|
+
q, select, set, split, value, white
|
16
|
+
*/
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
ADSAFE.lib("init_jslint_ui", function (lib) {
|
20
|
+
return function (dom) {
|
21
|
+
|
22
|
+
var checkboxes = dom.q('input_checkbox'),
|
23
|
+
goodparts = checkboxes.q('&goodpart'),
|
24
|
+
indent = dom.q('#JSLINT_INDENT'),
|
25
|
+
input = dom.q('#JSLINT_INPUT'),
|
26
|
+
jslintstring = dom.q('#JSLINT_JSLINTSTRING'),
|
27
|
+
maxerr = dom.q('#JSLINT_MAXERR'),
|
28
|
+
maxlen = dom.q('#JSLINT_MAXLEN'),
|
29
|
+
option = lib.cookie.get(),
|
30
|
+
output = dom.q('#JSLINT_OUTPUT'),
|
31
|
+
predefined = dom.q('#JSLINT_PREDEF');
|
32
|
+
|
33
|
+
function show_jslint_options() {
|
34
|
+
|
35
|
+
// Build and display a jslint control comment.
|
36
|
+
// The comment can be copied into a .js file.
|
37
|
+
|
38
|
+
var a = [], name;
|
39
|
+
for (name in option) {
|
40
|
+
if (typeof ADSAFE.get(option, name) === 'boolean') {
|
41
|
+
a.push(name + ': true');
|
42
|
+
}
|
43
|
+
}
|
44
|
+
if (+option.maxerr > 0) {
|
45
|
+
a.push('maxerr: ' + option.maxerr);
|
46
|
+
}
|
47
|
+
if (+option.maxlen > 0) {
|
48
|
+
a.push('maxlen: ' + option.maxlen);
|
49
|
+
}
|
50
|
+
if (+option.indent > 0) {
|
51
|
+
a.push('indent: ' + option.indent);
|
52
|
+
}
|
53
|
+
jslintstring.value('/*jslint ' + a.join(', ') + ' */');
|
54
|
+
}
|
55
|
+
|
56
|
+
|
57
|
+
function update_options() {
|
58
|
+
|
59
|
+
// Make an object containing the current options.
|
60
|
+
|
61
|
+
var value;
|
62
|
+
option = {};
|
63
|
+
checkboxes.q(':checked').each(function (bunch) {
|
64
|
+
ADSAFE.set(option, bunch.getTitle(), true);
|
65
|
+
});
|
66
|
+
if (option.white) {
|
67
|
+
value = +indent.getValue();
|
68
|
+
if (value && value !== 4) {
|
69
|
+
option.indent = value;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
if (!option.passfail) {
|
73
|
+
value = +maxerr.getValue();
|
74
|
+
if (value && value !== 50) {
|
75
|
+
option.maxerr = value;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
value = +maxlen.getValue();
|
79
|
+
option.maxlen = value && value > 0 ? value : 0;
|
80
|
+
value = predefined.getValue();
|
81
|
+
if (value) {
|
82
|
+
option.predef = value.split(/\s*,\s*/);
|
83
|
+
}
|
84
|
+
show_jslint_options();
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
// Restore the options from a JSON cookie.
|
89
|
+
|
90
|
+
if (!option || typeof option !== 'object') {
|
91
|
+
option = {};
|
92
|
+
} else {
|
93
|
+
checkboxes.each(function (bunch) {
|
94
|
+
bunch.check(ADSAFE.get(option, bunch.getTitle()));
|
95
|
+
});
|
96
|
+
indent.value(option.indent || '4');
|
97
|
+
maxlen.value(option.maxlen || '');
|
98
|
+
maxerr.value(option.maxerr || '50');
|
99
|
+
predefined.value(ADSAFE.isArray(option.predef) ?
|
100
|
+
option.predef.join(',') : '');
|
101
|
+
}
|
102
|
+
|
103
|
+
show_jslint_options();
|
104
|
+
|
105
|
+
// Display the edition.
|
106
|
+
|
107
|
+
dom.q('#JSLINT_EDITION').value('Edition ' + lib.edition());
|
108
|
+
|
109
|
+
// Add click event handlers to the [JSLint] and [clear] buttons.
|
110
|
+
|
111
|
+
dom.q('input&jslint').on('click', function (e) {
|
112
|
+
|
113
|
+
// Make a JSON cookie of the option object.
|
114
|
+
|
115
|
+
lib.cookie.set(option);
|
116
|
+
|
117
|
+
// Call JSLint and display the report.
|
118
|
+
|
119
|
+
lib.jslint(input.getValue(), option, output);
|
120
|
+
input.select();
|
121
|
+
return false;
|
122
|
+
});
|
123
|
+
|
124
|
+
dom.q('input&clear').on('click', function (e) {
|
125
|
+
output.value('');
|
126
|
+
input.value('').select();
|
127
|
+
});
|
128
|
+
|
129
|
+
dom.q('#JSLINT_CLEARALL').on('click', function (e) {
|
130
|
+
checkboxes.check(false);
|
131
|
+
indent.value(option.indent || '4');
|
132
|
+
maxlen.value(option.maxlen || '');
|
133
|
+
maxerr.value(option.maxerr || '50');
|
134
|
+
update_options();
|
135
|
+
});
|
136
|
+
|
137
|
+
dom.q('#JSLINT_GOODPARTS').on('click', function (e) {
|
138
|
+
goodparts.check(true);
|
139
|
+
update_options();
|
140
|
+
});
|
141
|
+
|
142
|
+
checkboxes.on('click', update_options);
|
143
|
+
|
144
|
+
indent.on('change', update_options);
|
145
|
+
maxerr.on('change', update_options);
|
146
|
+
maxlen.on('change', update_options);
|
147
|
+
predefined.on('change', update_options);
|
148
|
+
|
149
|
+
input
|
150
|
+
.on('change', function (e) {
|
151
|
+
output.value('');
|
152
|
+
})
|
153
|
+
.select();
|
154
|
+
};
|
155
|
+
});
|
@@ -0,0 +1,44 @@
|
|
1
|
+
jslint:
|
2
|
+
options:
|
3
|
+
passfail: false # Stop on first error
|
4
|
+
white: true # Strict white space
|
5
|
+
browser: true # Assume browser
|
6
|
+
devel: true # Allow console, alert, ...
|
7
|
+
widget: true # Assume Yahoo! widget
|
8
|
+
windows: true # Assume windows
|
9
|
+
safe: true # Safe subset
|
10
|
+
adsafe: true # Ad safe
|
11
|
+
|
12
|
+
debug: true # Tolerate debugger statements
|
13
|
+
evil: true # Tolerate eval
|
14
|
+
laxbreak: true # Tolerate sloppy line breaking
|
15
|
+
forin: true # Tolerate unfiltered for in
|
16
|
+
sub: true # Tolerate inefficient subscripting
|
17
|
+
css: true # Tolerate CSS workarounds
|
18
|
+
cap: true # Tolerate HTML case
|
19
|
+
on: true # Tolerate HTML event handlers
|
20
|
+
fragment: true # Tolerate HTML fragments
|
21
|
+
es5: true # Tolerate ES5 syntax
|
22
|
+
|
23
|
+
onevar: true # Allow one var statement per function
|
24
|
+
undef: true # Disallow undefined variables
|
25
|
+
nomem: true # Disallow dangling _ in identifiers
|
26
|
+
eqeqeq: true # Disallow == and !=
|
27
|
+
plusplus: true # Disallow ++ and --
|
28
|
+
bitwise: true # Disallow bitwise operators
|
29
|
+
regexp: true # Disallow insecure . and [^...] in /RegExp/
|
30
|
+
newcap: true # Require Initial Caps for constructors
|
31
|
+
immed: true # Require parens around immediate invocations
|
32
|
+
strict: true # Require "use strict";
|
33
|
+
|
34
|
+
indent: 2 # Strict white space indentation
|
35
|
+
maxlen: 120 # Maximum line length
|
36
|
+
maxerr: 50 # Maximum number of errors
|
37
|
+
|
38
|
+
predefined:
|
39
|
+
# list of predefined elements, comma separated
|
40
|
+
- "$, $$, $w, $h, $r, $a, $f, prototype, object, effect, event, element, class, form, hash, ajax, try"
|
41
|
+
|
42
|
+
scan:
|
43
|
+
include:
|
44
|
+
- 'public/javascripts/**/*.js'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Jslint
|
4
|
+
|
5
|
+
class UpdateConfigGenerator < ::Rails::Generators::Base
|
6
|
+
|
7
|
+
def install_update_config
|
8
|
+
copy_file('jslint.yml', 'config/jslint.yml')
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.source_root
|
12
|
+
File.join(File.dirname(__FILE__), 'templates')
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/lib/js-1.7R2.jar
ADDED
Binary file
|
data/lib/jslint.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
module Jslint
|
2
|
+
RhinoJar = File.expand_path('../js-1.7R2.jar', __FILE__)
|
3
|
+
Scripts = {}
|
4
|
+
Dir["#{File.expand_path("../../jslint", __FILE__)}/*.js"].each do |file_name|
|
5
|
+
Scripts[File.basename(file_name, '.js').to_sym] = file_name
|
6
|
+
end
|
7
|
+
end
|
8
|
+
require 'jslint/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
@@ -0,0 +1,18 @@
|
|
1
|
+
namespace :jslint do
|
2
|
+
|
3
|
+
desc 'Run JSlint against the directories specified in config/jslint.yml'
|
4
|
+
task :check do
|
5
|
+
|
6
|
+
end
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
def jslint_config
|
11
|
+
configuration_file = File.join(Rails.root, 'config/jslint.yml')
|
12
|
+
if File.exists? configuration_file
|
13
|
+
config = YAML.load_file(configuration_file)[source].symbolize_keys
|
14
|
+
else
|
15
|
+
$stderr.puts "config/jslint.yml' not found try rails g jslint:update_config"
|
16
|
+
exit 1
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,851 @@
|
|
1
|
+
The majority of Rhino is MPL 1.1 / GPL 2.0 dual licensed:
|
2
|
+
|
3
|
+
The Mozilla Public License (http://www.mozilla.org/MPL/MPL-1.1.txt):
|
4
|
+
============================================================================
|
5
|
+
MOZILLA PUBLIC LICENSE
|
6
|
+
Version 1.1
|
7
|
+
|
8
|
+
---------------
|
9
|
+
|
10
|
+
1. Definitions.
|
11
|
+
|
12
|
+
1.0.1. "Commercial Use" means distribution or otherwise making the
|
13
|
+
Covered Code available to a third party.
|
14
|
+
|
15
|
+
1.1. "Contributor" means each entity that creates or contributes to
|
16
|
+
the creation of Modifications.
|
17
|
+
|
18
|
+
1.2. "Contributor Version" means the combination of the Original
|
19
|
+
Code, prior Modifications used by a Contributor, and the Modifications
|
20
|
+
made by that particular Contributor.
|
21
|
+
|
22
|
+
1.3. "Covered Code" means the Original Code or Modifications or the
|
23
|
+
combination of the Original Code and Modifications, in each case
|
24
|
+
including portions thereof.
|
25
|
+
|
26
|
+
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
27
|
+
accepted in the software development community for the electronic
|
28
|
+
transfer of data.
|
29
|
+
|
30
|
+
1.5. "Executable" means Covered Code in any form other than Source
|
31
|
+
Code.
|
32
|
+
|
33
|
+
1.6. "Initial Developer" means the individual or entity identified
|
34
|
+
as the Initial Developer in the Source Code notice required by Exhibit
|
35
|
+
A.
|
36
|
+
|
37
|
+
1.7. "Larger Work" means a work which combines Covered Code or
|
38
|
+
portions thereof with code not governed by the terms of this License.
|
39
|
+
|
40
|
+
1.8. "License" means this document.
|
41
|
+
|
42
|
+
1.8.1. "Licensable" means having the right to grant, to the maximum
|
43
|
+
extent possible, whether at the time of the initial grant or
|
44
|
+
subsequently acquired, any and all of the rights conveyed herein.
|
45
|
+
|
46
|
+
1.9. "Modifications" means any addition to or deletion from the
|
47
|
+
substance or structure of either the Original Code or any previous
|
48
|
+
Modifications. When Covered Code is released as a series of files, a
|
49
|
+
Modification is:
|
50
|
+
A. Any addition to or deletion from the contents of a file
|
51
|
+
containing Original Code or previous Modifications.
|
52
|
+
|
53
|
+
B. Any new file that contains any part of the Original Code or
|
54
|
+
previous Modifications.
|
55
|
+
|
56
|
+
1.10. "Original Code" means Source Code of computer software code
|
57
|
+
which is described in the Source Code notice required by Exhibit A as
|
58
|
+
Original Code, and which, at the time of its release under this
|
59
|
+
License is not already Covered Code governed by this License.
|
60
|
+
|
61
|
+
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
62
|
+
hereafter acquired, including without limitation, method, process,
|
63
|
+
and apparatus claims, in any patent Licensable by grantor.
|
64
|
+
|
65
|
+
1.11. "Source Code" means the preferred form of the Covered Code for
|
66
|
+
making modifications to it, including all modules it contains, plus
|
67
|
+
any associated interface definition files, scripts used to control
|
68
|
+
compilation and installation of an Executable, or source code
|
69
|
+
differential comparisons against either the Original Code or another
|
70
|
+
well known, available Covered Code of the Contributor's choice. The
|
71
|
+
Source Code can be in a compressed or archival form, provided the
|
72
|
+
appropriate decompression or de-archiving software is widely available
|
73
|
+
for no charge.
|
74
|
+
|
75
|
+
1.12. "You" (or "Your") means an individual or a legal entity
|
76
|
+
exercising rights under, and complying with all of the terms of, this
|
77
|
+
License or a future version of this License issued under Section 6.1.
|
78
|
+
For legal entities, "You" includes any entity which controls, is
|
79
|
+
controlled by, or is under common control with You. For purposes of
|
80
|
+
this definition, "control" means (a) the power, direct or indirect,
|
81
|
+
to cause the direction or management of such entity, whether by
|
82
|
+
contract or otherwise, or (b) ownership of more than fifty percent
|
83
|
+
(50%) of the outstanding shares or beneficial ownership of such
|
84
|
+
entity.
|
85
|
+
|
86
|
+
2. Source Code License.
|
87
|
+
|
88
|
+
2.1. The Initial Developer Grant.
|
89
|
+
The Initial Developer hereby grants You a world-wide, royalty-free,
|
90
|
+
non-exclusive license, subject to third party intellectual property
|
91
|
+
claims:
|
92
|
+
(a) under intellectual property rights (other than patent or
|
93
|
+
trademark) Licensable by Initial Developer to use, reproduce,
|
94
|
+
modify, display, perform, sublicense and distribute the Original
|
95
|
+
Code (or portions thereof) with or without Modifications, and/or
|
96
|
+
as part of a Larger Work; and
|
97
|
+
|
98
|
+
(b) under Patents Claims infringed by the making, using or
|
99
|
+
selling of Original Code, to make, have made, use, practice,
|
100
|
+
sell, and offer for sale, and/or otherwise dispose of the
|
101
|
+
Original Code (or portions thereof).
|
102
|
+
|
103
|
+
(c) the licenses granted in this Section 2.1(a) and (b) are
|
104
|
+
effective on the date Initial Developer first distributes
|
105
|
+
Original Code under the terms of this License.
|
106
|
+
|
107
|
+
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
108
|
+
granted: 1) for code that You delete from the Original Code; 2)
|
109
|
+
separate from the Original Code; or 3) for infringements caused
|
110
|
+
by: i) the modification of the Original Code or ii) the
|
111
|
+
combination of the Original Code with other software or devices.
|
112
|
+
|
113
|
+
2.2. Contributor Grant.
|
114
|
+
Subject to third party intellectual property claims, each Contributor
|
115
|
+
hereby grants You a world-wide, royalty-free, non-exclusive license
|
116
|
+
|
117
|
+
(a) under intellectual property rights (other than patent or
|
118
|
+
trademark) Licensable by Contributor, to use, reproduce, modify,
|
119
|
+
display, perform, sublicense and distribute the Modifications
|
120
|
+
created by such Contributor (or portions thereof) either on an
|
121
|
+
unmodified basis, with other Modifications, as Covered Code
|
122
|
+
and/or as part of a Larger Work; and
|
123
|
+
|
124
|
+
(b) under Patent Claims infringed by the making, using, or
|
125
|
+
selling of Modifications made by that Contributor either alone
|
126
|
+
and/or in combination with its Contributor Version (or portions
|
127
|
+
of such combination), to make, use, sell, offer for sale, have
|
128
|
+
made, and/or otherwise dispose of: 1) Modifications made by that
|
129
|
+
Contributor (or portions thereof); and 2) the combination of
|
130
|
+
Modifications made by that Contributor with its Contributor
|
131
|
+
Version (or portions of such combination).
|
132
|
+
|
133
|
+
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
134
|
+
effective on the date Contributor first makes Commercial Use of
|
135
|
+
the Covered Code.
|
136
|
+
|
137
|
+
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
138
|
+
granted: 1) for any code that Contributor has deleted from the
|
139
|
+
Contributor Version; 2) separate from the Contributor Version;
|
140
|
+
3) for infringements caused by: i) third party modifications of
|
141
|
+
Contributor Version or ii) the combination of Modifications made
|
142
|
+
by that Contributor with other software (except as part of the
|
143
|
+
Contributor Version) or other devices; or 4) under Patent Claims
|
144
|
+
infringed by Covered Code in the absence of Modifications made by
|
145
|
+
that Contributor.
|
146
|
+
|
147
|
+
3. Distribution Obligations.
|
148
|
+
|
149
|
+
3.1. Application of License.
|
150
|
+
The Modifications which You create or to which You contribute are
|
151
|
+
governed by the terms of this License, including without limitation
|
152
|
+
Section 2.2. The Source Code version of Covered Code may be
|
153
|
+
distributed only under the terms of this License or a future version
|
154
|
+
of this License released under Section 6.1, and You must include a
|
155
|
+
copy of this License with every copy of the Source Code You
|
156
|
+
distribute. You may not offer or impose any terms on any Source Code
|
157
|
+
version that alters or restricts the applicable version of this
|
158
|
+
License or the recipients' rights hereunder. However, You may include
|
159
|
+
an additional document offering the additional rights described in
|
160
|
+
Section 3.5.
|
161
|
+
|
162
|
+
3.2. Availability of Source Code.
|
163
|
+
Any Modification which You create or to which You contribute must be
|
164
|
+
made available in Source Code form under the terms of this License
|
165
|
+
either on the same media as an Executable version or via an accepted
|
166
|
+
Electronic Distribution Mechanism to anyone to whom you made an
|
167
|
+
Executable version available; and if made available via Electronic
|
168
|
+
Distribution Mechanism, must remain available for at least twelve (12)
|
169
|
+
months after the date it initially became available, or at least six
|
170
|
+
(6) months after a subsequent version of that particular Modification
|
171
|
+
has been made available to such recipients. You are responsible for
|
172
|
+
ensuring that the Source Code version remains available even if the
|
173
|
+
Electronic Distribution Mechanism is maintained by a third party.
|
174
|
+
|
175
|
+
3.3. Description of Modifications.
|
176
|
+
You must cause all Covered Code to which You contribute to contain a
|
177
|
+
file documenting the changes You made to create that Covered Code and
|
178
|
+
the date of any change. You must include a prominent statement that
|
179
|
+
the Modification is derived, directly or indirectly, from Original
|
180
|
+
Code provided by the Initial Developer and including the name of the
|
181
|
+
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
182
|
+
Executable version or related documentation in which You describe the
|
183
|
+
origin or ownership of the Covered Code.
|
184
|
+
|
185
|
+
3.4. Intellectual Property Matters
|
186
|
+
(a) Third Party Claims.
|
187
|
+
If Contributor has knowledge that a license under a third party's
|
188
|
+
intellectual property rights is required to exercise the rights
|
189
|
+
granted by such Contributor under Sections 2.1 or 2.2,
|
190
|
+
Contributor must include a text file with the Source Code
|
191
|
+
distribution titled "LEGAL" which describes the claim and the
|
192
|
+
party making the claim in sufficient detail that a recipient will
|
193
|
+
know whom to contact. If Contributor obtains such knowledge after
|
194
|
+
the Modification is made available as described in Section 3.2,
|
195
|
+
Contributor shall promptly modify the LEGAL file in all copies
|
196
|
+
Contributor makes available thereafter and shall take other steps
|
197
|
+
(such as notifying appropriate mailing lists or newsgroups)
|
198
|
+
reasonably calculated to inform those who received the Covered
|
199
|
+
Code that new knowledge has been obtained.
|
200
|
+
|
201
|
+
(b) Contributor APIs.
|
202
|
+
If Contributor's Modifications include an application programming
|
203
|
+
interface and Contributor has knowledge of patent licenses which
|
204
|
+
are reasonably necessary to implement that API, Contributor must
|
205
|
+
also include this information in the LEGAL file.
|
206
|
+
|
207
|
+
(c) Representations.
|
208
|
+
Contributor represents that, except as disclosed pursuant to
|
209
|
+
Section 3.4(a) above, Contributor believes that Contributor's
|
210
|
+
Modifications are Contributor's original creation(s) and/or
|
211
|
+
Contributor has sufficient rights to grant the rights conveyed by
|
212
|
+
this License.
|
213
|
+
|
214
|
+
3.5. Required Notices.
|
215
|
+
You must duplicate the notice in Exhibit A in each file of the Source
|
216
|
+
Code. If it is not possible to put such notice in a particular Source
|
217
|
+
Code file due to its structure, then You must include such notice in a
|
218
|
+
location (such as a relevant directory) where a user would be likely
|
219
|
+
to look for such a notice. If You created one or more Modification(s)
|
220
|
+
You may add your name as a Contributor to the notice described in
|
221
|
+
Exhibit A. You must also duplicate this License in any documentation
|
222
|
+
for the Source Code where You describe recipients' rights or ownership
|
223
|
+
rights relating to Covered Code. You may choose to offer, and to
|
224
|
+
charge a fee for, warranty, support, indemnity or liability
|
225
|
+
obligations to one or more recipients of Covered Code. However, You
|
226
|
+
may do so only on Your own behalf, and not on behalf of the Initial
|
227
|
+
Developer or any Contributor. You must make it absolutely clear than
|
228
|
+
any such warranty, support, indemnity or liability obligation is
|
229
|
+
offered by You alone, and You hereby agree to indemnify the Initial
|
230
|
+
Developer and every Contributor for any liability incurred by the
|
231
|
+
Initial Developer or such Contributor as a result of warranty,
|
232
|
+
support, indemnity or liability terms You offer.
|
233
|
+
|
234
|
+
3.6. Distribution of Executable Versions.
|
235
|
+
You may distribute Covered Code in Executable form only if the
|
236
|
+
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
237
|
+
and if You include a notice stating that the Source Code version of
|
238
|
+
the Covered Code is available under the terms of this License,
|
239
|
+
including a description of how and where You have fulfilled the
|
240
|
+
obligations of Section 3.2. The notice must be conspicuously included
|
241
|
+
in any notice in an Executable version, related documentation or
|
242
|
+
collateral in which You describe recipients' rights relating to the
|
243
|
+
Covered Code. You may distribute the Executable version of Covered
|
244
|
+
Code or ownership rights under a license of Your choice, which may
|
245
|
+
contain terms different from this License, provided that You are in
|
246
|
+
compliance with the terms of this License and that the license for the
|
247
|
+
Executable version does not attempt to limit or alter the recipient's
|
248
|
+
rights in the Source Code version from the rights set forth in this
|
249
|
+
License. If You distribute the Executable version under a different
|
250
|
+
license You must make it absolutely clear that any terms which differ
|
251
|
+
from this License are offered by You alone, not by the Initial
|
252
|
+
Developer or any Contributor. You hereby agree to indemnify the
|
253
|
+
Initial Developer and every Contributor for any liability incurred by
|
254
|
+
the Initial Developer or such Contributor as a result of any such
|
255
|
+
terms You offer.
|
256
|
+
|
257
|
+
3.7. Larger Works.
|
258
|
+
You may create a Larger Work by combining Covered Code with other code
|
259
|
+
not governed by the terms of this License and distribute the Larger
|
260
|
+
Work as a single product. In such a case, You must make sure the
|
261
|
+
requirements of this License are fulfilled for the Covered Code.
|
262
|
+
|
263
|
+
4. Inability to Comply Due to Statute or Regulation.
|
264
|
+
|
265
|
+
If it is impossible for You to comply with any of the terms of this
|
266
|
+
License with respect to some or all of the Covered Code due to
|
267
|
+
statute, judicial order, or regulation then You must: (a) comply with
|
268
|
+
the terms of this License to the maximum extent possible; and (b)
|
269
|
+
describe the limitations and the code they affect. Such description
|
270
|
+
must be included in the LEGAL file described in Section 3.4 and must
|
271
|
+
be included with all distributions of the Source Code. Except to the
|
272
|
+
extent prohibited by statute or regulation, such description must be
|
273
|
+
sufficiently detailed for a recipient of ordinary skill to be able to
|
274
|
+
understand it.
|
275
|
+
|
276
|
+
5. Application of this License.
|
277
|
+
|
278
|
+
This License applies to code to which the Initial Developer has
|
279
|
+
attached the notice in Exhibit A and to related Covered Code.
|
280
|
+
|
281
|
+
6. Versions of the License.
|
282
|
+
|
283
|
+
6.1. New Versions.
|
284
|
+
Netscape Communications Corporation ("Netscape") may publish revised
|
285
|
+
and/or new versions of the License from time to time. Each version
|
286
|
+
will be given a distinguishing version number.
|
287
|
+
|
288
|
+
6.2. Effect of New Versions.
|
289
|
+
Once Covered Code has been published under a particular version of the
|
290
|
+
License, You may always continue to use it under the terms of that
|
291
|
+
version. You may also choose to use such Covered Code under the terms
|
292
|
+
of any subsequent version of the License published by Netscape. No one
|
293
|
+
other than Netscape has the right to modify the terms applicable to
|
294
|
+
Covered Code created under this License.
|
295
|
+
|
296
|
+
6.3. Derivative Works.
|
297
|
+
If You create or use a modified version of this License (which you may
|
298
|
+
only do in order to apply it to code which is not already Covered Code
|
299
|
+
governed by this License), You must (a) rename Your license so that
|
300
|
+
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
301
|
+
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
302
|
+
license (except to note that your license differs from this License)
|
303
|
+
and (b) otherwise make it clear that Your version of the license
|
304
|
+
contains terms which differ from the Mozilla Public License and
|
305
|
+
Netscape Public License. (Filling in the name of the Initial
|
306
|
+
Developer, Original Code or Contributor in the notice described in
|
307
|
+
Exhibit A shall not of themselves be deemed to be modifications of
|
308
|
+
this License.)
|
309
|
+
|
310
|
+
7. DISCLAIMER OF WARRANTY.
|
311
|
+
|
312
|
+
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
313
|
+
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
314
|
+
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
315
|
+
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
316
|
+
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
317
|
+
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
318
|
+
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
319
|
+
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
320
|
+
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
321
|
+
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
322
|
+
|
323
|
+
8. TERMINATION.
|
324
|
+
|
325
|
+
8.1. This License and the rights granted hereunder will terminate
|
326
|
+
automatically if You fail to comply with terms herein and fail to cure
|
327
|
+
such breach within 30 days of becoming aware of the breach. All
|
328
|
+
sublicenses to the Covered Code which are properly granted shall
|
329
|
+
survive any termination of this License. Provisions which, by their
|
330
|
+
nature, must remain in effect beyond the termination of this License
|
331
|
+
shall survive.
|
332
|
+
|
333
|
+
8.2. If You initiate litigation by asserting a patent infringement
|
334
|
+
claim (excluding declatory judgment actions) against Initial Developer
|
335
|
+
or a Contributor (the Initial Developer or Contributor against whom
|
336
|
+
You file such action is referred to as "Participant") alleging that:
|
337
|
+
|
338
|
+
(a) such Participant's Contributor Version directly or indirectly
|
339
|
+
infringes any patent, then any and all rights granted by such
|
340
|
+
Participant to You under Sections 2.1 and/or 2.2 of this License
|
341
|
+
shall, upon 60 days notice from Participant terminate prospectively,
|
342
|
+
unless if within 60 days after receipt of notice You either: (i)
|
343
|
+
agree in writing to pay Participant a mutually agreeable reasonable
|
344
|
+
royalty for Your past and future use of Modifications made by such
|
345
|
+
Participant, or (ii) withdraw Your litigation claim with respect to
|
346
|
+
the Contributor Version against such Participant. If within 60 days
|
347
|
+
of notice, a reasonable royalty and payment arrangement are not
|
348
|
+
mutually agreed upon in writing by the parties or the litigation claim
|
349
|
+
is not withdrawn, the rights granted by Participant to You under
|
350
|
+
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
351
|
+
the 60 day notice period specified above.
|
352
|
+
|
353
|
+
(b) any software, hardware, or device, other than such Participant's
|
354
|
+
Contributor Version, directly or indirectly infringes any patent, then
|
355
|
+
any rights granted to You by such Participant under Sections 2.1(b)
|
356
|
+
and 2.2(b) are revoked effective as of the date You first made, used,
|
357
|
+
sold, distributed, or had made, Modifications made by that
|
358
|
+
Participant.
|
359
|
+
|
360
|
+
8.3. If You assert a patent infringement claim against Participant
|
361
|
+
alleging that such Participant's Contributor Version directly or
|
362
|
+
indirectly infringes any patent where such claim is resolved (such as
|
363
|
+
by license or settlement) prior to the initiation of patent
|
364
|
+
infringement litigation, then the reasonable value of the licenses
|
365
|
+
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
366
|
+
into account in determining the amount or value of any payment or
|
367
|
+
license.
|
368
|
+
|
369
|
+
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
370
|
+
all end user license agreements (excluding distributors and resellers)
|
371
|
+
which have been validly granted by You or any distributor hereunder
|
372
|
+
prior to termination shall survive termination.
|
373
|
+
|
374
|
+
9. LIMITATION OF LIABILITY.
|
375
|
+
|
376
|
+
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
377
|
+
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
378
|
+
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
379
|
+
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
380
|
+
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
381
|
+
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
382
|
+
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
383
|
+
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
384
|
+
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
385
|
+
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
386
|
+
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
387
|
+
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
388
|
+
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
389
|
+
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
390
|
+
|
391
|
+
10. U.S. GOVERNMENT END USERS.
|
392
|
+
|
393
|
+
The Covered Code is a "commercial item," as that term is defined in
|
394
|
+
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
395
|
+
software" and "commercial computer software documentation," as such
|
396
|
+
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
397
|
+
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
398
|
+
all U.S. Government End Users acquire Covered Code with only those
|
399
|
+
rights set forth herein.
|
400
|
+
|
401
|
+
11. MISCELLANEOUS.
|
402
|
+
|
403
|
+
This License represents the complete agreement concerning subject
|
404
|
+
matter hereof. If any provision of this License is held to be
|
405
|
+
unenforceable, such provision shall be reformed only to the extent
|
406
|
+
necessary to make it enforceable. This License shall be governed by
|
407
|
+
California law provisions (except to the extent applicable law, if
|
408
|
+
any, provides otherwise), excluding its conflict-of-law provisions.
|
409
|
+
With respect to disputes in which at least one party is a citizen of,
|
410
|
+
or an entity chartered or registered to do business in the United
|
411
|
+
States of America, any litigation relating to this License shall be
|
412
|
+
subject to the jurisdiction of the Federal Courts of the Northern
|
413
|
+
District of California, with venue lying in Santa Clara County,
|
414
|
+
California, with the losing party responsible for costs, including
|
415
|
+
without limitation, court costs and reasonable attorneys' fees and
|
416
|
+
expenses. The application of the United Nations Convention on
|
417
|
+
Contracts for the International Sale of Goods is expressly excluded.
|
418
|
+
Any law or regulation which provides that the language of a contract
|
419
|
+
shall be construed against the drafter shall not apply to this
|
420
|
+
License.
|
421
|
+
|
422
|
+
12. RESPONSIBILITY FOR CLAIMS.
|
423
|
+
|
424
|
+
As between Initial Developer and the Contributors, each party is
|
425
|
+
responsible for claims and damages arising, directly or indirectly,
|
426
|
+
out of its utilization of rights under this License and You agree to
|
427
|
+
work with Initial Developer and Contributors to distribute such
|
428
|
+
responsibility on an equitable basis. Nothing herein is intended or
|
429
|
+
shall be deemed to constitute any admission of liability.
|
430
|
+
|
431
|
+
13. MULTIPLE-LICENSED CODE.
|
432
|
+
|
433
|
+
Initial Developer may designate portions of the Covered Code as
|
434
|
+
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
435
|
+
Developer permits you to utilize portions of the Covered Code under
|
436
|
+
Your choice of the NPL or the alternative licenses, if any, specified
|
437
|
+
by the Initial Developer in the file described in Exhibit A.
|
438
|
+
|
439
|
+
EXHIBIT A -Mozilla Public License.
|
440
|
+
|
441
|
+
``The contents of this file are subject to the Mozilla Public License
|
442
|
+
Version 1.1 (the "License"); you may not use this file except in
|
443
|
+
compliance with the License. You may obtain a copy of the License at
|
444
|
+
http://www.mozilla.org/MPL/
|
445
|
+
|
446
|
+
Software distributed under the License is distributed on an "AS IS"
|
447
|
+
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
448
|
+
License for the specific language governing rights and limitations
|
449
|
+
under the License.
|
450
|
+
|
451
|
+
The Original Code is ______________________________________.
|
452
|
+
|
453
|
+
The Initial Developer of the Original Code is ________________________.
|
454
|
+
Portions created by ______________________ are Copyright (C) ______
|
455
|
+
_______________________. All Rights Reserved.
|
456
|
+
|
457
|
+
Contributor(s): ______________________________________.
|
458
|
+
|
459
|
+
Alternatively, the contents of this file may be used under the terms
|
460
|
+
of the _____ license (the "[___] License"), in which case the
|
461
|
+
provisions of [______] License are applicable instead of those
|
462
|
+
above. If you wish to allow use of your version of this file only
|
463
|
+
under the terms of the [____] License and not to allow others to use
|
464
|
+
your version of this file under the MPL, indicate your decision by
|
465
|
+
deleting the provisions above and replace them with the notice and
|
466
|
+
other provisions required by the [___] License. If you do not delete
|
467
|
+
the provisions above, a recipient may use your version of this file
|
468
|
+
under either the MPL or the [___] License."
|
469
|
+
|
470
|
+
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
471
|
+
the notices in the Source Code files of the Original Code. You should
|
472
|
+
use the text of this Exhibit A rather than the text found in the
|
473
|
+
Original Code Source Code for Your Modifications.]
|
474
|
+
============================================================================
|
475
|
+
|
476
|
+
============================================================================
|
477
|
+
GNU GENERAL PUBLIC LICENSE
|
478
|
+
Version 2, June 1991
|
479
|
+
|
480
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
481
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
482
|
+
Everyone is permitted to copy and distribute verbatim copies
|
483
|
+
of this license document, but changing it is not allowed.
|
484
|
+
|
485
|
+
Preamble
|
486
|
+
|
487
|
+
The licenses for most software are designed to take away your
|
488
|
+
freedom to share and change it. By contrast, the GNU General Public
|
489
|
+
License is intended to guarantee your freedom to share and change free
|
490
|
+
software--to make sure the software is free for all its users. This
|
491
|
+
General Public License applies to most of the Free Software
|
492
|
+
Foundation's software and to any other program whose authors commit to
|
493
|
+
using it. (Some other Free Software Foundation software is covered by
|
494
|
+
the GNU Lesser General Public License instead.) You can apply it to
|
495
|
+
your programs, too.
|
496
|
+
|
497
|
+
When we speak of free software, we are referring to freedom, not
|
498
|
+
price. Our General Public Licenses are designed to make sure that you
|
499
|
+
have the freedom to distribute copies of free software (and charge for
|
500
|
+
this service if you wish), that you receive source code or can get it
|
501
|
+
if you want it, that you can change the software or use pieces of it
|
502
|
+
in new free programs; and that you know you can do these things.
|
503
|
+
|
504
|
+
To protect your rights, we need to make restrictions that forbid
|
505
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
506
|
+
These restrictions translate to certain responsibilities for you if you
|
507
|
+
distribute copies of the software, or if you modify it.
|
508
|
+
|
509
|
+
For example, if you distribute copies of such a program, whether
|
510
|
+
gratis or for a fee, you must give the recipients all the rights that
|
511
|
+
you have. You must make sure that they, too, receive or can get the
|
512
|
+
source code. And you must show them these terms so they know their
|
513
|
+
rights.
|
514
|
+
|
515
|
+
We protect your rights with two steps: (1) copyright the software, and
|
516
|
+
(2) offer you this license which gives you legal permission to copy,
|
517
|
+
distribute and/or modify the software.
|
518
|
+
|
519
|
+
Also, for each author's protection and ours, we want to make certain
|
520
|
+
that everyone understands that there is no warranty for this free
|
521
|
+
software. If the software is modified by someone else and passed on, we
|
522
|
+
want its recipients to know that what they have is not the original, so
|
523
|
+
that any problems introduced by others will not reflect on the original
|
524
|
+
authors' reputations.
|
525
|
+
|
526
|
+
Finally, any free program is threatened constantly by software
|
527
|
+
patents. We wish to avoid the danger that redistributors of a free
|
528
|
+
program will individually obtain patent licenses, in effect making the
|
529
|
+
program proprietary. To prevent this, we have made it clear that any
|
530
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
531
|
+
|
532
|
+
The precise terms and conditions for copying, distribution and
|
533
|
+
modification follow.
|
534
|
+
|
535
|
+
GNU GENERAL PUBLIC LICENSE
|
536
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
537
|
+
|
538
|
+
0. This License applies to any program or other work which contains
|
539
|
+
a notice placed by the copyright holder saying it may be distributed
|
540
|
+
under the terms of this General Public License. The "Program", below,
|
541
|
+
refers to any such program or work, and a "work based on the Program"
|
542
|
+
means either the Program or any derivative work under copyright law:
|
543
|
+
that is to say, a work containing the Program or a portion of it,
|
544
|
+
either verbatim or with modifications and/or translated into another
|
545
|
+
language. (Hereinafter, translation is included without limitation in
|
546
|
+
the term "modification".) Each licensee is addressed as "you".
|
547
|
+
|
548
|
+
Activities other than copying, distribution and modification are not
|
549
|
+
covered by this License; they are outside its scope. The act of
|
550
|
+
running the Program is not restricted, and the output from the Program
|
551
|
+
is covered only if its contents constitute a work based on the
|
552
|
+
Program (independent of having been made by running the Program).
|
553
|
+
Whether that is true depends on what the Program does.
|
554
|
+
|
555
|
+
1. You may copy and distribute verbatim copies of the Program's
|
556
|
+
source code as you receive it, in any medium, provided that you
|
557
|
+
conspicuously and appropriately publish on each copy an appropriate
|
558
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
559
|
+
notices that refer to this License and to the absence of any warranty;
|
560
|
+
and give any other recipients of the Program a copy of this License
|
561
|
+
along with the Program.
|
562
|
+
|
563
|
+
You may charge a fee for the physical act of transferring a copy, and
|
564
|
+
you may at your option offer warranty protection in exchange for a fee.
|
565
|
+
|
566
|
+
2. You may modify your copy or copies of the Program or any portion
|
567
|
+
of it, thus forming a work based on the Program, and copy and
|
568
|
+
distribute such modifications or work under the terms of Section 1
|
569
|
+
above, provided that you also meet all of these conditions:
|
570
|
+
|
571
|
+
a) You must cause the modified files to carry prominent notices
|
572
|
+
stating that you changed the files and the date of any change.
|
573
|
+
|
574
|
+
b) You must cause any work that you distribute or publish, that in
|
575
|
+
whole or in part contains or is derived from the Program or any
|
576
|
+
part thereof, to be licensed as a whole at no charge to all third
|
577
|
+
parties under the terms of this License.
|
578
|
+
|
579
|
+
c) If the modified program normally reads commands interactively
|
580
|
+
when run, you must cause it, when started running for such
|
581
|
+
interactive use in the most ordinary way, to print or display an
|
582
|
+
announcement including an appropriate copyright notice and a
|
583
|
+
notice that there is no warranty (or else, saying that you provide
|
584
|
+
a warranty) and that users may redistribute the program under
|
585
|
+
these conditions, and telling the user how to view a copy of this
|
586
|
+
License. (Exception: if the Program itself is interactive but
|
587
|
+
does not normally print such an announcement, your work based on
|
588
|
+
the Program is not required to print an announcement.)
|
589
|
+
|
590
|
+
These requirements apply to the modified work as a whole. If
|
591
|
+
identifiable sections of that work are not derived from the Program,
|
592
|
+
and can be reasonably considered independent and separate works in
|
593
|
+
themselves, then this License, and its terms, do not apply to those
|
594
|
+
sections when you distribute them as separate works. But when you
|
595
|
+
distribute the same sections as part of a whole which is a work based
|
596
|
+
on the Program, the distribution of the whole must be on the terms of
|
597
|
+
this License, whose permissions for other licensees extend to the
|
598
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
599
|
+
|
600
|
+
Thus, it is not the intent of this section to claim rights or contest
|
601
|
+
your rights to work written entirely by you; rather, the intent is to
|
602
|
+
exercise the right to control the distribution of derivative or
|
603
|
+
collective works based on the Program.
|
604
|
+
|
605
|
+
In addition, mere aggregation of another work not based on the Program
|
606
|
+
with the Program (or with a work based on the Program) on a volume of
|
607
|
+
a storage or distribution medium does not bring the other work under
|
608
|
+
the scope of this License.
|
609
|
+
|
610
|
+
3. You may copy and distribute the Program (or a work based on it,
|
611
|
+
under Section 2) in object code or executable form under the terms of
|
612
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
613
|
+
|
614
|
+
a) Accompany it with the complete corresponding machine-readable
|
615
|
+
source code, which must be distributed under the terms of Sections
|
616
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
617
|
+
|
618
|
+
b) Accompany it with a written offer, valid for at least three
|
619
|
+
years, to give any third party, for a charge no more than your
|
620
|
+
cost of physically performing source distribution, a complete
|
621
|
+
machine-readable copy of the corresponding source code, to be
|
622
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
623
|
+
customarily used for software interchange; or,
|
624
|
+
|
625
|
+
c) Accompany it with the information you received as to the offer
|
626
|
+
to distribute corresponding source code. (This alternative is
|
627
|
+
allowed only for noncommercial distribution and only if you
|
628
|
+
received the program in object code or executable form with such
|
629
|
+
an offer, in accord with Subsection b above.)
|
630
|
+
|
631
|
+
The source code for a work means the preferred form of the work for
|
632
|
+
making modifications to it. For an executable work, complete source
|
633
|
+
code means all the source code for all modules it contains, plus any
|
634
|
+
associated interface definition files, plus the scripts used to
|
635
|
+
control compilation and installation of the executable. However, as a
|
636
|
+
special exception, the source code distributed need not include
|
637
|
+
anything that is normally distributed (in either source or binary
|
638
|
+
form) with the major components (compiler, kernel, and so on) of the
|
639
|
+
operating system on which the executable runs, unless that component
|
640
|
+
itself accompanies the executable.
|
641
|
+
|
642
|
+
If distribution of executable or object code is made by offering
|
643
|
+
access to copy from a designated place, then offering equivalent
|
644
|
+
access to copy the source code from the same place counts as
|
645
|
+
distribution of the source code, even though third parties are not
|
646
|
+
compelled to copy the source along with the object code.
|
647
|
+
|
648
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
649
|
+
except as expressly provided under this License. Any attempt
|
650
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
651
|
+
void, and will automatically terminate your rights under this License.
|
652
|
+
However, parties who have received copies, or rights, from you under
|
653
|
+
this License will not have their licenses terminated so long as such
|
654
|
+
parties remain in full compliance.
|
655
|
+
|
656
|
+
5. You are not required to accept this License, since you have not
|
657
|
+
signed it. However, nothing else grants you permission to modify or
|
658
|
+
distribute the Program or its derivative works. These actions are
|
659
|
+
prohibited by law if you do not accept this License. Therefore, by
|
660
|
+
modifying or distributing the Program (or any work based on the
|
661
|
+
Program), you indicate your acceptance of this License to do so, and
|
662
|
+
all its terms and conditions for copying, distributing or modifying
|
663
|
+
the Program or works based on it.
|
664
|
+
|
665
|
+
6. Each time you redistribute the Program (or any work based on the
|
666
|
+
Program), the recipient automatically receives a license from the
|
667
|
+
original licensor to copy, distribute or modify the Program subject to
|
668
|
+
these terms and conditions. You may not impose any further
|
669
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
670
|
+
You are not responsible for enforcing compliance by third parties to
|
671
|
+
this License.
|
672
|
+
|
673
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
674
|
+
infringement or for any other reason (not limited to patent issues),
|
675
|
+
conditions are imposed on you (whether by court order, agreement or
|
676
|
+
otherwise) that contradict the conditions of this License, they do not
|
677
|
+
excuse you from the conditions of this License. If you cannot
|
678
|
+
distribute so as to satisfy simultaneously your obligations under this
|
679
|
+
License and any other pertinent obligations, then as a consequence you
|
680
|
+
may not distribute the Program at all. For example, if a patent
|
681
|
+
license would not permit royalty-free redistribution of the Program by
|
682
|
+
all those who receive copies directly or indirectly through you, then
|
683
|
+
the only way you could satisfy both it and this License would be to
|
684
|
+
refrain entirely from distribution of the Program.
|
685
|
+
|
686
|
+
If any portion of this section is held invalid or unenforceable under
|
687
|
+
any particular circumstance, the balance of the section is intended to
|
688
|
+
apply and the section as a whole is intended to apply in other
|
689
|
+
circumstances.
|
690
|
+
|
691
|
+
It is not the purpose of this section to induce you to infringe any
|
692
|
+
patents or other property right claims or to contest validity of any
|
693
|
+
such claims; this section has the sole purpose of protecting the
|
694
|
+
integrity of the free software distribution system, which is
|
695
|
+
implemented by public license practices. Many people have made
|
696
|
+
generous contributions to the wide range of software distributed
|
697
|
+
through that system in reliance on consistent application of that
|
698
|
+
system; it is up to the author/donor to decide if he or she is willing
|
699
|
+
to distribute software through any other system and a licensee cannot
|
700
|
+
impose that choice.
|
701
|
+
|
702
|
+
This section is intended to make thoroughly clear what is believed to
|
703
|
+
be a consequence of the rest of this License.
|
704
|
+
|
705
|
+
8. If the distribution and/or use of the Program is restricted in
|
706
|
+
certain countries either by patents or by copyrighted interfaces, the
|
707
|
+
original copyright holder who places the Program under this License
|
708
|
+
may add an explicit geographical distribution limitation excluding
|
709
|
+
those countries, so that distribution is permitted only in or among
|
710
|
+
countries not thus excluded. In such case, this License incorporates
|
711
|
+
the limitation as if written in the body of this License.
|
712
|
+
|
713
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
714
|
+
of the General Public License from time to time. Such new versions will
|
715
|
+
be similar in spirit to the present version, but may differ in detail to
|
716
|
+
address new problems or concerns.
|
717
|
+
|
718
|
+
Each version is given a distinguishing version number. If the Program
|
719
|
+
specifies a version number of this License which applies to it and "any
|
720
|
+
later version", you have the option of following the terms and conditions
|
721
|
+
either of that version or of any later version published by the Free
|
722
|
+
Software Foundation. If the Program does not specify a version number of
|
723
|
+
this License, you may choose any version ever published by the Free Software
|
724
|
+
Foundation.
|
725
|
+
|
726
|
+
10. If you wish to incorporate parts of the Program into other free
|
727
|
+
programs whose distribution conditions are different, write to the author
|
728
|
+
to ask for permission. For software which is copyrighted by the Free
|
729
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
730
|
+
make exceptions for this. Our decision will be guided by the two goals
|
731
|
+
of preserving the free status of all derivatives of our free software and
|
732
|
+
of promoting the sharing and reuse of software generally.
|
733
|
+
|
734
|
+
NO WARRANTY
|
735
|
+
|
736
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
737
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
738
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
739
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
740
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
741
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
742
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
743
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
744
|
+
REPAIR OR CORRECTION.
|
745
|
+
|
746
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
747
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
748
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
749
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
750
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
751
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
752
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
753
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
754
|
+
POSSIBILITY OF SUCH DAMAGES.
|
755
|
+
|
756
|
+
END OF TERMS AND CONDITIONS
|
757
|
+
|
758
|
+
How to Apply These Terms to Your New Programs
|
759
|
+
|
760
|
+
If you develop a new program, and you want it to be of the greatest
|
761
|
+
possible use to the public, the best way to achieve this is to make it
|
762
|
+
free software which everyone can redistribute and change under these terms.
|
763
|
+
|
764
|
+
To do so, attach the following notices to the program. It is safest
|
765
|
+
to attach them to the start of each source file to most effectively
|
766
|
+
convey the exclusion of warranty; and each file should have at least
|
767
|
+
the "copyright" line and a pointer to where the full notice is found.
|
768
|
+
|
769
|
+
<one line to give the program's name and a brief idea of what it does.>
|
770
|
+
Copyright (C) <year> <name of author>
|
771
|
+
|
772
|
+
This program is free software; you can redistribute it and/or modify
|
773
|
+
it under the terms of the GNU General Public License as published by
|
774
|
+
the Free Software Foundation; either version 2 of the License, or
|
775
|
+
(at your option) any later version.
|
776
|
+
|
777
|
+
This program is distributed in the hope that it will be useful,
|
778
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
779
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
780
|
+
GNU General Public License for more details.
|
781
|
+
|
782
|
+
You should have received a copy of the GNU General Public License along
|
783
|
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
784
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
785
|
+
|
786
|
+
Also add information on how to contact you by electronic and paper mail.
|
787
|
+
|
788
|
+
If the program is interactive, make it output a short notice like this
|
789
|
+
when it starts in an interactive mode:
|
790
|
+
|
791
|
+
Gnomovision version 69, Copyright (C) year name of author
|
792
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
793
|
+
This is free software, and you are welcome to redistribute it
|
794
|
+
under certain conditions; type `show c' for details.
|
795
|
+
|
796
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
797
|
+
parts of the General Public License. Of course, the commands you use may
|
798
|
+
be called something other than `show w' and `show c'; they could even be
|
799
|
+
mouse-clicks or menu items--whatever suits your program.
|
800
|
+
|
801
|
+
You should also get your employer (if you work as a programmer) or your
|
802
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
803
|
+
necessary. Here is a sample; alter the names:
|
804
|
+
|
805
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
806
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
807
|
+
|
808
|
+
<signature of Ty Coon>, 1 April 1989
|
809
|
+
Ty Coon, President of Vice
|
810
|
+
|
811
|
+
This General Public License does not permit incorporating your program into
|
812
|
+
proprietary programs. If your program is a subroutine library, you may
|
813
|
+
consider it more useful to permit linking proprietary applications with the
|
814
|
+
library. If this is what you want to do, use the GNU Lesser General
|
815
|
+
Public License instead of this License.
|
816
|
+
============================================================================
|
817
|
+
|
818
|
+
Additionally, some files (currently the contents of
|
819
|
+
toolsrc/org/mozilla/javascript/tools/debugger/treetable/) are available
|
820
|
+
only under the following license:
|
821
|
+
|
822
|
+
============================================================================
|
823
|
+
* Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
|
824
|
+
*
|
825
|
+
* Redistribution and use in source and binary forms, with or without
|
826
|
+
* modification, are permitted provided that the following conditions
|
827
|
+
* are met:
|
828
|
+
*
|
829
|
+
* - Redistributions of source code must retain the above copyright
|
830
|
+
* notice, this list of conditions and the following disclaimer.
|
831
|
+
*
|
832
|
+
* - Redistributions in binary form must reproduce the above copyright
|
833
|
+
* notice, this list of conditions and the following disclaimer in the
|
834
|
+
* documentation and/or other materials provided with the distribution.
|
835
|
+
*
|
836
|
+
* - Neither the name of Sun Microsystems nor the names of its
|
837
|
+
* contributors may be used to endorse or promote products derived
|
838
|
+
* from this software without specific prior written permission.
|
839
|
+
*
|
840
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
841
|
+
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
842
|
+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
843
|
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
844
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
845
|
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
846
|
+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
847
|
+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
848
|
+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
849
|
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
850
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
851
|
+
============================================================================
|