3 * (just avoids having the info in more than one place in the source)
4 * Copyright (C) 2001 Henry Spencer.
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>.
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
16 * RCSID $Id: _copyright.c,v 1.4 2001/11/22 04:15:56 henry Exp $
19 #include <sys/types.h>
26 char usage[] = "Usage: ipsec _copyright";
27 struct option opts[] = {
29 "version", 0, NULL, 'v',
33 char me[] = "ipsec _copyright"; /* for messages */
42 const char *version = ipsec_version_code();
43 const char **notice = ipsec_copyright_notice();
46 while ((opt = getopt_long(argc, argv, "", opts, NULL)) != EOF)
49 printf("%s\n", usage);
52 case 'v': /* version */
53 printf("%s %s\n", me, version);
61 if (errflg || optind != argc) {
62 fprintf(stderr, "%s\n", usage);
66 for (co = notice; *co != NULL; co++)