Skip to content

Commit dd6ea75

Browse files
committed
Modified to show that Code Snippets Database code is MIT licensed and copyright.
1 parent 86802ac commit dd6ea75

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

Src/USaveUnitMgr.pas

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at http://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com).
6+
* Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com).
77
*
88
* $Rev$
99
* $Date$
@@ -115,17 +115,16 @@ implementation
115115
// Error message
116116
sErrorMsg = 'Filename is not valid for a Pascal unit';
117117
// Unit header comments
118-
sLicense = 'This unit may be freely distributed and used on the condition '
119-
+ 'that this comment is not removed from the unit.';
120-
sMainDescription = 'The unit was generated automatically from a '
118+
sLicense = 'This unit is copyright © %0:s by the Code Snippets Database '
119+
+ 'Contributors (http://snippets.delphidabbler.com/contributors) and '
120+
+ 'is licensed under the MIT license '
121+
+ '(http://opensource.org/licenses/MIT).';
122+
sMainDescription = 'The unit was generated automatically and incorporates a '
121123
+ 'selection of source code taken from the Code Snippets Database at %0:s.';
122-
sDisclaimer = 'The source code contained in this unit is made available on '
123-
+ 'an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or '
124-
+ 'implied. The code is used entirely at your own risk.';
125124
sGenerated = 'Generated on : %0:s.';
126125
sGenerator = 'Generated by : %0:s %1:s.';
127-
sAdvert = 'The latest version of %0:s is available from the %1:s website '
128-
+ 'at %2:s.';
126+
sAdvert = 'The latest version of %0:s is available from the %0:s website '
127+
+ 'at %1:s.';
129128
sUserDescription = 'This unit was generated automatically.';
130129
// Output document title
131130
sDocTitle = 'Pascal unit generated by %s';
@@ -152,12 +151,10 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList;
152151
if fContainsMainDBSnippets then
153152
begin
154153
// Result used for units that contain at snippet(s) from main database
155-
Result.Add(sLicense);
154+
Result.Add(Format(sLicense, [FormatDateTime('YYYY', Now)]));
156155
Result.Add('');
157156
Result.Add(Format(sMainDescription, [TWebInfo.DatabaseURL]));
158157
Result.Add('');
159-
Result.Add(sDisclaimer);
160-
Result.Add('');
161158
Result.Add(Format(sGenerated, [RFC1123DateStamp]));
162159
Result.Add(
163160
Format(
@@ -166,10 +163,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList;
166163
);
167164
Result.Add('');
168165
Result.Add(
169-
Format(
170-
sAdvert,
171-
[TAppInfo.ProgramName, TAppInfo.CompanyName, TWebInfo.ProgramHomeURL]
172-
)
166+
Format(sAdvert, [TAppInfo.ProgramName, TWebInfo.ProgramHomeURL])
173167
);
174168
end
175169
else

Src/USnippetDoc.pas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at http://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com).
6+
* Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com).
77
*
88
* $Rev$
99
* $Date$
@@ -158,7 +158,9 @@ function TSnippetDoc.Generate(const Snippet: TSnippet): TEncodedData;
158158
sDependListTitle = 'Required snippets:';
159159
sXRefListTitle = 'See also:';
160160
sCompilers = 'Supported compilers:';
161-
sMainDatabaseInfo = 'A snippet from the DelphiDabbler CodeSnip Database (%s)';
161+
sMainDatabaseInfo = 'A snippet from the DelphiDabbler CodeSnip Database '
162+
+ '(%s), licensed under the MIT License '
163+
+ '(http://opensource.org/licenses/MIT).';
162164
begin
163165
Assert(Assigned(Snippet), ClassName + '.Create: Snippet is nil');
164166
// generate document

Src/USnippetSourceGen.pas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at http://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com).
6+
* Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com).
77
*
88
* $Rev$
99
* $Date$
@@ -104,9 +104,9 @@ function TSnippetSourceGen.BuildHeaderComments: IStringList;
104104
resourcestring
105105
// Comment to be included at top of snippet
106106
// header used if snippet includes code from main database
107-
sMainHeader = 'This code snippet was generated by %0:s %1:s on %2:s. It is '
108-
+ 'made available on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, '
109-
+ 'either express or implied. The code is used entirely at your own risk.';
107+
sMainHeader = 'This code snippet was generated by %0:s %1:s on %2:s. It '
108+
+ 'includes code taken from the DelphiDabbler Code Snippets database that '
109+
+ 'is covered by the MIT license (http://opensource.org/licenses/MIT).';
110110
// header used if snippet contains only user defined snippets
111111
sUserHeader = 'This user defined code snippet was generated by '
112112
+ '%0:s %1:s on %2:s.';

0 commit comments

Comments
 (0)