d4f8a4861db5fb1e1c36338ac90971eb288d144b
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
19 #include <sys/types.h>
27 char usage
[] = "Usage: ipsec _copyright";
28 struct option opts
[] = {
29 {"help", 0, NULL
, 'h',},
30 {"version", 0, NULL
, 'v',},
34 char me
[] = "ipsec _copyright"; /* for messages */
37 main(int argc
, char *argv
[])
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
++)