File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / _copyright / _copyright.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 09:46:45 2020 UTC (4 years, 3 months ago) by misho
Branches: strongswan, MAIN
CVS tags: v5_9_2p0, v5_8_4p7, HEAD
Strongswan

    1: /*
    2:  * copyright reporter
    3:  * (just avoids having the info in more than one place in the source)
    4:  * Copyright (C) 2001  Henry Spencer.
    5:  *
    6:  * This program is free software; you can redistribute it and/or modify it
    7:  * under the terms of the GNU General Public License as published by the
    8:  * Free Software Foundation; either version 2 of the License, or (at your
    9:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
   10:  *
   11:  * This program is distributed in the hope that it will be useful, but
   12:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   13:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14:  * for more details.
   15:  */
   16: 
   17: #include <sys/types.h>
   18: #include <stdio.h>
   19: #include <stdlib.h>
   20: #include <string.h>
   21: #include <unistd.h>
   22: #include <getopt.h>
   23: 
   24: #include <library.h>
   25: 
   26: static const char *copyright[] = {
   27: 	"Copyright (C) 1999-2013",
   28: 	"    Henry Spencer, D. Hugh Redelmeier, Michael Richardson, Ken Bantoft,",
   29: 	"    Stephen J. Bevan, JuanJo Ciarlante, Thomas Egerer, Heiko Hund,",
   30: 	"    Mathieu Lafon, Stephane Laroche, Kai Martius, Stephan Scholz,",
   31: 	"    Tuomo Soini, Herbert Xu.",
   32: 	"",
   33: 	"    Martin Berner, Marco Bertossa, David Buechi, Ueli Galizzi,",
   34: 	"    Christoph Gysin, Andreas Hess, Patric Lichtsteiner, Michael Meier,",
   35: 	"    Andreas Schleiss, Ariane Seiler, Mario Strasser, Lukas Suter,",
   36: 	"    Roger Wegmann, Simon Zwahlen,",
   37: 	"    ZHW Zuercher Hochschule Winterthur (Switzerland).",
   38: 	"",
   39: 	"    Philip Boetschi, Tobias Brunner, Christoph Buehler, Reto Buerki,",
   40: 	"    Sansar Choinyambuu, Adrian Doerig, Andreas Eigenmann, Giuliano Grassi,",
   41: 	"    Reto Guadagnini, Fabian Hartmann, Noah Heusser, Jan Hutter,",
   42: 	"    Thomas Kallenberg, Patrick Loetscher, Daniel Roethlisberger,",
   43: 	"    Adrian-Ken Rueegsegger, Ralf Sager, Joel Stillhart, Daniel Wydler,",
   44: 	"    Andreas Steffen,",
   45: 	"    HSR Hochschule fuer Technik Rapperswil (Switzerland).",
   46: 	"",
   47: 	"    Martin Willi (revosec AG), Clavister (Sweden).",
   48: 	"",
   49: 	"This program is free software; you can redistribute it and/or modify it",
   50: 	"under the terms of the GNU General Public License as published by the",
   51: 	"Free Software Foundation; either version 2 of the License, or (at your",
   52: 	"option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.",
   53: 	"",
   54: 	"This program is distributed in the hope that it will be useful, but",
   55: 	"WITHOUT ANY WARRANTY; without even the implied warranty of",
   56: 	"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General",
   57: 	"Public License (file COPYING in the distribution) for more details.",
   58: 	NULL,
   59: };
   60: 
   61: static const char usage[] = "Usage: ipsec _copyright";
   62: static const struct option opts[] = {
   63:   {"help",	0,	NULL,	'h',},
   64:   {"version",	0,	NULL,	'v',},
   65:   {0,		0,	NULL,	0, },
   66: };
   67: 
   68: static const char me[] = "ipsec _copyright";	/* for messages */
   69: 
   70: int
   71: main(int argc, char *argv[])
   72: {
   73: 	int opt;
   74: 	extern int optind;
   75: 	int errflg = 0;
   76: 	const char **notice = copyright;
   77: 	const char **co;
   78: 
   79: 	library_init(NULL, "_copyright");
   80: 	atexit(library_deinit);
   81: 
   82: 	while ((opt = getopt_long(argc, argv, "", opts, NULL)) != EOF)
   83: 		switch (opt) {
   84: 		case 'h':	/* help */
   85: 			printf("%s\n", usage);
   86: 			exit(0);
   87: 		case 'v':	/* version */
   88: 			printf("%s strongSwan "VERSION"\n", me);
   89: 			exit(0);
   90: 		case '?':
   91: 		default:
   92: 			errflg = 1;
   93: 			break;
   94: 		}
   95: 	if (errflg || optind != argc) {
   96: 		fprintf(stderr, "%s\n", usage);
   97: 		exit(2);
   98: 	}
   99: 
  100: 	for (co = notice; *co != NULL; co++)
  101: 		printf("%s\n", *co);
  102: 	exit(0);
  103: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>