/missing
/uxconfig.in
/uxconfig.h
+/licence.h
/*.a
/charset/sbcsdat.c
/contrib/cygtermd/cygtermd.exe
Locations of the licence
------------------------
-The PuTTY copyright notice and licence are stored in quite a few
+The PuTTY copyright notice and licence are stored in multiple
places. At the start of a new year, the copyright year needs
updating in all of them; and when someone sends a massive patch,
their name needs adding in all of them too.
- putty/LICENCE
-The various About and Licence boxes:
-
- - putty/windows/winpgnt.c
- + the copyright date appears twice, once in the About box and
- once in the Licence box. Don't forget to change both!
- - putty/windows/winpgen.c
- + the copyright date appears twice, once in the About box and
- once in the Licence box. Don't forget to change both!
- - putty/windows/windlg.c
- + the copyright date appears twice, once in the About box and
- once in the Licence box. Don't forget to change both!
- - putty/windows/version.rc2
- + the copyright date appears once only.
- - putty/unix/gtkdlg.c
- + the copyright date appears twice, once in the About box and
- once in the Licence box. Don't forget to change both!
-
The documentation (both the preamble blurb and the licence appendix):
- putty/doc/blurb.but
--- /dev/null
+#!/usr/bin/env perl -w
+
+# This script generates licence.h (containing the PuTTY licence in the
+# form of macros expanding to C string literals) from the LICENCE
+# master file.
+
+use File::Basename;
+
+$infile = "LICENCE";
+$outfile = "licence.h";
+open my $in, $infile or die "$infile: open: $!\n";
+open my $out, ">", $outfile or die "$outfile: open: $!\n";
+select $out;
+
+print "/*\n";
+print " * $outfile - macro definitions for the PuTTY licence.\n";
+print " *\n";
+print " * Generated by @{[basename __FILE__]} from $infile.\n";
+print " * You should edit those files rather than editing this one.\n";
+print " */\n";
+print "\n";
+
+my @lines = ();
+while (<$in>) {
+ chomp;
+ push @lines, $_;
+}
+close $in;
+
+# Format into paragraphs.
+my @paras = ();
+my $para = undef;
+for my $line (@lines) {
+ if ($line eq "") {
+ $para = undef;
+ } elsif (!defined $para) {
+ push @paras, $line;
+ $para = \$paras[$#paras];
+ } else {
+ $$para .= " " . $line;
+ }
+}
+
+print "#define LICENCE_TEXT(parsep) \\\n";
+for my $i (0..$#paras) {
+ my $lit = &stringlit($paras[$i]);
+ print " parsep \\\n" if $i > 0;
+ print " \"$lit\"";
+ print " \\" if $i < $#paras;
+ print "\n";
+}
+print "\n";
+
+die "bad format of first paragraph\n"
+ unless $paras[0] =~ m!copyright ([^\.]*)\.!i;
+
+printf "#define SHORT_COPYRIGHT_DETAILS \"%s\"\n", &stringlit($1);
+
+sub stringlit {
+ my ($lit) = @_;
+ $lit =~ s!\\!\\\\!g;
+ $lit =~ s!"!\\"!g;
+ return $lit;
+}
};
# HACK: One of the source files in `charset' is auto-generated by
-# sbcsgen.pl. We need to generate that _now_, before attempting
-# dependency analysis.
+# sbcsgen.pl, and licence.h is likewise generated by licence.pl. We
+# need to generate those _now_, before attempting dependency analysis.
eval 'chdir "charset"; require "sbcsgen.pl"; chdir ".."; select STDOUT;';
+eval 'require "licence.pl"; select STDOUT;';
@srcdirs = ("./");
#include "storage.h"
#include "dialog.h"
#include "tree234.h"
+#include "licence.h"
#if GTK_CHECK_VERSION(2,0,0)
/* Decide which of GtkFileChooserDialog and GtkFileSelection to use */
{
char *title;
- const char *licence =
- "Copyright 1997-2015 Simon Tatham.\n\n"
-
- "Portions copyright Robert de Bath, Joris van Rantwijk, Delian "
- "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas "
- "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, "
- "Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.\n\n"
-
- "Permission is hereby granted, free of charge, to any person "
- "obtaining a copy of this software and associated documentation "
- "files (the ""Software""), to deal in the Software without restriction, "
- "including without limitation the rights to use, copy, modify, merge, "
- "publish, distribute, sublicense, and/or sell copies of the Software, "
- "and to permit persons to whom the Software is furnished to do so, "
- "subject to the following conditions:\n\n"
-
- "The above copyright notice and this permission notice shall be "
- "included in all copies or substantial portions of the Software.\n\n"
-
- "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT "
- "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, "
- "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
- "MERCHANTABILITY, FITNESS FOR A PARTICULAR "
- "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
- "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES "
- "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
- "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
- "CONNECTION WITH THE SOFTWARE OR THE USE OR "
- "OTHER DEALINGS IN THE SOFTWARE.";
-
title = dupcat(appname, " Licence", NULL);
assert(aboutbox != NULL);
- messagebox(aboutbox, title, licence,
+ messagebox(aboutbox, title, LICENCE_TEXT("\n\n"),
string_width("LONGISH LINE OF TEXT SO THE LICENCE"
" BOX ISN'T EXCESSIVELY TALL AND THIN"),
TRUE, "OK", 'o', 1, 1, NULL);
char *label_text = dupprintf
("%s\n\n%s\n\n%s",
appname, ver,
- "Copyright 1997-2015 Simon Tatham. All rights reserved");
+ "Copyright " SHORT_COPYRIGHT_DETAILS ". All rights reserved");
w = gtk_label_new(label_text);
gtk_label_set_justify(GTK_LABEL(w), GTK_JUSTIFY_CENTER);
#if GTK_CHECK_VERSION(2,0,0)
*/
#include "version.h"
+#include "licence.h"
/*
* The actual VERSIONINFO resource.
VALUE "OriginalFilename", APPNAME
VALUE "FileVersion", TEXTVER
VALUE "ProductVersion", TEXTVER
- VALUE "LegalCopyright", "Copyright \251 1997-2015 Simon Tatham."
+ VALUE "LegalCopyright", "Copyright \251 " SHORT_COPYRIGHT_DETAILS "."
#if (!defined SNAPSHOT) && (!defined RELEASE) && (!defined PRERELEASE)
/* Only if VS_FF_PRIVATEBUILD. */
VALUE "PrivateBuild", TEXTVER /* NBI */
#include "win_res.h"
#include "storage.h"
#include "dialog.h"
+#include "licence.h"
#include <commctrl.h>
#include <commdlg.h>
char *str = dupprintf("%s Licence", appname);
SetWindowText(hwnd, str);
sfree(str);
-
- SetDlgItemText(hwnd, IDA_TEXT,
- "Copyright 1997-2015 Simon Tatham.\r\n\r\n"
-
- "Portions copyright Robert de Bath, Joris van Rantwijk, Delian "
- "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas "
- "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, "
- "Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.\r\n\r\n"
-
- "Permission is hereby granted, free of charge, to any person "
- "obtaining a copy of this software and associated documentation "
- "files (the ""Software""), to deal in the Software without restriction, "
- "including without limitation the rights to use, copy, modify, merge, "
- "publish, distribute, sublicense, and/or sell copies of the Software, "
- "and to permit persons to whom the Software is furnished to do so, "
- "subject to the following conditions:\r\n\r\n"
-
- "The above copyright notice and this permission notice shall be "
- "included in all copies or substantial portions of the Software.\r\n\r\n"
-
- "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT "
- "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, "
- "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
- "MERCHANTABILITY, FITNESS FOR A PARTICULAR "
- "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
- "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES "
- "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
- "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
- "CONNECTION WITH THE SOFTWARE OR THE USE OR "
- "OTHER DEALINGS IN THE SOFTWARE."
-);
+ SetDlgItemText(hwnd, IDA_TEXT, LICENCE_TEXT("\r\n\r\n"));
}
return 1;
case WM_COMMAND:
char *text = dupprintf
("%s\r\n\r\n%s\r\n\r\n%s",
appname, ver,
- "\251 1997-2015 Simon Tatham. All rights reserved.");
+ "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
SetDlgItemText(hwnd, IDA_TEXT, text);
sfree(text);
}
#include "putty.h"
#include "ssh.h"
+#include "licence.h"
#include <commctrl.h>
rd.right - rd.left, rd.bottom - rd.top, TRUE);
}
- SetDlgItemText(hwnd, 1000,
- "Copyright 1997-2015 Simon Tatham.\r\n\r\n"
-
- "Portions copyright Robert de Bath, Joris van Rantwijk, Delian "
- "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas "
- "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, "
- "Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.\r\n\r\n"
-
- "Permission is hereby granted, free of charge, to any person "
- "obtaining a copy of this software and associated documentation "
- "files (the ""Software""), to deal in the Software without restriction, "
- "including without limitation the rights to use, copy, modify, merge, "
- "publish, distribute, sublicense, and/or sell copies of the Software, "
- "and to permit persons to whom the Software is furnished to do so, "
- "subject to the following conditions:\r\n\r\n"
-
- "The above copyright notice and this permission notice shall be "
- "included in all copies or substantial portions of the Software.\r\n\r\n"
-
- "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT "
- "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, "
- "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
- "MERCHANTABILITY, FITNESS FOR A PARTICULAR "
- "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
- "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES "
- "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
- "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
- "CONNECTION WITH THE SOFTWARE OR THE USE OR "
- "OTHER DEALINGS IN THE SOFTWARE."
-);
+ SetDlgItemText(hwnd, 1000, LICENCE_TEXT("\r\n\r\n"));
return 1;
case WM_COMMAND:
switch (LOWORD(wParam)) {
char *text = dupprintf
("Pageant\r\n\r\n%s\r\n\r\n%s",
ver,
- "\251 1997-2015 Simon Tatham. All rights reserved.");
+ "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
SetDlgItemText(hwnd, 1000, text);
sfree(text);
}
#include "tree234.h"
#include "winsecur.h"
#include "pageant.h"
+#include "licence.h"
#include <shellapi.h>
{
switch (msg) {
case WM_INITDIALOG:
- SetDlgItemText(hwnd, 1000,
- "Copyright 1997-2015 Simon Tatham.\r\n\r\n"
-
- "Portions copyright Robert de Bath, Joris van Rantwijk, Delian "
- "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas "
- "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, "
- "Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.\r\n\r\n"
-
- "Permission is hereby granted, free of charge, to any person "
- "obtaining a copy of this software and associated documentation "
- "files (the ""Software""), to deal in the Software without restriction, "
- "including without limitation the rights to use, copy, modify, merge, "
- "publish, distribute, sublicense, and/or sell copies of the Software, "
- "and to permit persons to whom the Software is furnished to do so, "
- "subject to the following conditions:\r\n\r\n"
-
- "The above copyright notice and this permission notice shall be "
- "included in all copies or substantial portions of the Software.\r\n\r\n"
-
- "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT "
- "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, "
- "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
- "MERCHANTABILITY, FITNESS FOR A PARTICULAR "
- "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
- "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES "
- "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
- "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
- "CONNECTION WITH THE SOFTWARE OR THE USE OR "
- "OTHER DEALINGS IN THE SOFTWARE."
-);
+ SetDlgItemText(hwnd, 1000, LICENCE_TEXT("\r\n\r\n"));
return 1;
case WM_COMMAND:
switch (LOWORD(wParam)) {
char *text = dupprintf
("Pageant\r\n\r\n%s\r\n\r\n%s",
ver,
- "\251 1997-2015 Simon Tatham. All rights reserved.");
+ "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved.");
SetDlgItemText(hwnd, 1000, text);
sfree(text);
}