use print_version

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5478 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1999-03-08 10:51:48 +00:00
parent d9df790930
commit 64d4aa49d8
10 changed files with 34 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -192,8 +192,10 @@ main(int argc, char **argv)
usage(1); usage(1);
if(help_flag) if(help_flag)
usage(0); usage(0);
if(version_flag) if(version_flag) {
krb5_errx(context, 0, "%s", heimdal_version); print_version(NULL);
exit(0);
}
if(unlog_flag){ if(unlog_flag){
k_unlog(); k_unlog();
exit(0); exit(0);

View File

@@ -242,11 +242,8 @@ pop_init(POP *p,int argcount,char **argmessage)
exit(0); exit(0);
} }
if(version_flag){ if(version_flag){
#ifdef KRB5 print_version(NULL);
krb5_errx(p->context, 0, "%s", heimdal_version); exit(0);
#else
errx(0, "%s", VERSION);
#endif
} }
argcount -= optind; argcount -= optind;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -78,8 +78,10 @@ common_setup(krb5_context *context, int *argc, char **argv,
if(help_flag) if(help_flag)
(*usage)(0, args, num_args); (*usage)(0, args, num_args);
if(version_flag) if(version_flag) {
krb5_errx(*context, 0, "%s", heimdal_version); print_version(NULL);
exit(0);
}
if(port_str){ if(port_str){
struct servent *s = roken_getservbyname(port_str, "tcp"); struct servent *s = roken_getservbyname(port_str, "tcp");

View File

@@ -212,8 +212,10 @@ main(int argc, char **argv)
if (help_flag) if (help_flag)
usage (0); usage (0);
if (version_flag) if (version_flag) {
krb5_errx(context, 0, "%s", heimdal_version); print_version(NULL);
exit(0);
}
argc -= optind; argc -= optind;
argv += optind; argv += optind;

View File

@@ -108,8 +108,10 @@ main(int argc, char **argv)
if (help_flag) if (help_flag)
usage (0); usage (0);
if (version_flag) if (version_flag) {
krb5_errx(context, 0, "%s", heimdal_version); print_version(NULL);
exit(0);
}
argc -= optind; argc -= optind;
argv += optind; argv += optind;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -131,8 +131,10 @@ configure(int argc, char **argv)
if(help_flag) if(help_flag)
usage (0); usage (0);
if (version_flag) if (version_flag) {
krb5_errx(context, 0, "%s", heimdal_version); print_version(NULL);
exit(0);
}
argc -= optind; argc -= optind;
argv += optind; argv += optind;

View File

@@ -452,7 +452,7 @@ int main(int argc, char **argv)
usage(0); usage(0);
if(version_flag){ if(version_flag){
fprintf(stderr, "%s (%s)\n", __progname, heimdal_version); print_version(NULL);
exit(0); exit(0);
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -136,8 +136,10 @@ int main(int argc, char **argv)
usage(1); usage(1);
if(help_flag) if(help_flag)
usage(0); usage(0);
if(version_flag) if(version_flag) {
krb5_errx(context, 0, "%s (%s)\n", __progname, heimdal_version); print_version(NULL);
exit(0);
}
argc -= optind; argc -= optind;
argv += optind; argv += optind;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -75,7 +75,7 @@ main (int argc, char **argv)
usage (0); usage (0);
if(version_flag){ if(version_flag){
printf("%s (%s)\n", __progname, heimdal_version); print_version(NULL);
exit(0); exit(0);
} }

View File

@@ -338,7 +338,7 @@ main (int argc, char **argv)
usage (0); usage (0);
if(version_flag){ if(version_flag){
printf("%s (%s-%s)\n", __progname, PACKAGE, VERSION); print_version(NULL);
exit(0); exit(0);
} }