From a7a80a2a69c7c8a4b8fe17b5fd345ddca990e6a6 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Thu, 5 Nov 2015 17:38:51 +0200 Subject: curvetun: Move copyright text to separate variable Use copyright text from one place when print it in version or help output. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- curvetun.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/curvetun.c b/curvetun.c index 5dbc320..cf47510 100644 --- a/curvetun.c +++ b/curvetun.c @@ -73,6 +73,14 @@ static const struct option long_options[] = { {NULL, 0, NULL, 0} }; +static const char *copyright = + "Please report bugs to \n" + "Copyright (C) 2011-2013 Daniel Borkmann ,\n" + "Swiss federal institute of technology (ETH Zurich)\n" + "License: GNU GPL version 2.0\n" + "This is free software: you are free to change and redistribute it.\n" + "There is NO WARRANTY, to the extent permitted by law."; + static void signal_handler(int number) { switch (number) { @@ -117,13 +125,8 @@ static void __noreturn help(void) " There is no default port specified, so that you are forced\n" " to select your own! For client/server status messages see syslog!\n" " This software is an experimental prototype intended for researchers.\n\n" - "Secret ingredient: 7647-14-5\n\n" - "Please report bugs to \n" - "Copyright (C) 2011-2013 Daniel Borkmann ,\n" - "Swiss federal institute of technology (ETH Zurich)\n" - "License: GNU GPL version 2.0\n" - "This is free software: you are free to change and redistribute it.\n" - "There is NO WARRANTY, to the extent permitted by law.\n"); + "Secret ingredient: 7647-14-5\n\n"); + puts(copyright); die(); } @@ -132,13 +135,8 @@ static void __noreturn version(void) printf("curvetun %s, Git id: %s\n", VERSION_LONG, GITVERSION); puts("lightweight curve25519-based IP tunnel\n" "Note: Einstein-Rosen bridge not yet supported\n" - "http://www.netsniff-ng.org\n\n" - "Please report bugs to \n" - "Copyright (C) 2011-2013 Daniel Borkmann ,\n" - "Swiss federal institute of technology (ETH Zurich)\n" - "License: GNU GPL version 2.0\n" - "This is free software: you are free to change and redistribute it.\n" - "There is NO WARRANTY, to the extent permitted by law.\n"); + "http://www.netsniff-ng.org\n\n"); + puts(copyright); die(); } -- cgit v1.2.3-54-g00ecf