From 34ff7e28c6f8ad888f8c83c3ff15f366788fba38 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Mon, 11 Jun 2007 15:05:49 +0200 Subject: [PATCH] Added GPL 2 notice to command-line usage of the Scyther backend. Modified '--version' to report the Scyther license briefly, and added '--license' to display the full license. --- src/switches.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/switches.c b/src/switches.c index 29d217c..3611678 100644 --- a/src/switches.c +++ b/src/switches.c @@ -1262,14 +1262,56 @@ switcher (const int process, int index, int commandline) else { printf ("'%s' model checker for security protocols.\n", progname); - printf ("Version %s.\n", TAGVERSION); + printf ("Scyther version %s.\n", TAGVERSION); if (switches.expert) { #ifdef DEBUG printf ("Compiled with debugging support.\n"); #endif } - printf ("Code by Cas Cremers\n"); + printf ("Copyright (C) 2007 Cas Cremers\n\n"); + printf ("Scyther comes with ABSOLUTELY NO WARRANTY.\n"); + printf ("This is free software, and you are welcome\n"); + printf ("to redistribute it under certain conditions.\n"); + printf ("Use the `--license' option for details.\n", progname); + exit (0); + } + } + + if (detect (' ', "license", 0)) + { + if (!process) + { + helptext (" --license", "show license"); + } + else + { + printf + ("Scyther : An automatic verifier for security protocols.\n"); + printf ("Copyright (C) 2007 Cas Cremers\n"); + printf ("\n"); + printf + ("This program is free software; you can redistribute it and/or\n"); + printf + ("modify it under the terms of the GNU General Public License\n"); + printf + ("as published by the Free Software Foundation; either version 2\n"); + printf ("of the License, or (at your option) any later version.\n"); + printf ("\n"); + printf + ("This program is distributed in the hope that it will be useful,\n"); + printf + ("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); + printf + ("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); + printf ("GNU General Public License for more details.\n"); + printf ("\n"); + printf + ("You should have received a copy of the GNU General Public License\n"); + printf + ("along with this program; if not, write to the Free Software\n"); + printf + ("Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"); exit (0); } }