general function for distributing details
authorMischa POSLAWSKY <netris@shiar.org>
Tue, 27 Feb 2007 10:48:03 +0000 (11:48 +0100)
committerMischa POSLAWSKY <netris@shiar.org>
Tue, 27 Feb 2007 10:48:03 +0000 (11:48 +0100)
Don't include program header in DistInfo() so it's usable in both
server and client.

game.c
server.c
util.c

diff --git a/game.c b/game.c
index 6ad7e8b53a77c4e8291c3d16b71571c7732d5b27..79520aa47c9d7fa0e9172412e58ee2bc05e6a8ac 100644 (file)
--- a/game.c
+++ b/game.c
@@ -161,6 +161,7 @@ void HandleOption(char tag, char *value)
                case 'k':       //keys
                        MapKeys(value); break;
                case 'H':       //info
+                       Header();
                        DistInfo(); exit(0);
                case 'R':       //rules
                        Rules(); exit(0);
index 39222bf6da6623ee14838c5bd426cae2ab8c6c7c..7d63e022ac06db2281ce6ec27a24f1664fb2b3a5 100644 (file)
--- a/server.c
+++ b/server.c
@@ -447,28 +447,6 @@ void SUsage(void)
          "\n", DEFAULT_PORT);
 }
 
-/*
-void DistInfo(void)
-{
-       SHeader();
-       fprintf(stderr,
-         "This program is free software; you can redistribute it and/or modify\n"
-         "it under the terms of the GNU General Public License as published by\n"
-         "the Free Software Foundation; either version 2 of the License, or\n"
-         "(at your option) any later version.\n"
-         "\n"
-         "This program is distributed in the hope that it will be useful,\n"
-         "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-         "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-         "GNU General Public License for more details.\n"
-         "\n"
-         "You should have received a copy of the GNU General Public License\n"
-         "along with this program; if not, write to the Free Software\n"
-         "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n"
-         "\n");
-} //DistInfo
-*/
-
 void WriteConf(void)
 {
        FILE *file_out;
@@ -515,6 +493,7 @@ void HandleOption(char tag, char *value)
                        Game.seed = atoi(value);
                        break;
                case 'H':       //info
+                       SHeader();
                        DistInfo(); exit(0);
                case 'h':       //help
                        SUsage(); exit(0);
diff --git a/util.c b/util.c
index a55aeb0abc825fd1b64ec43198ebd7922ff049a3..791a007324ebad637c60bceeeee21585134a8212 100644 (file)
--- a/util.c
+++ b/util.c
@@ -91,7 +91,6 @@ void Usage(void)
 
 void DistInfo(void)
 {
-       Header();
        fprintf(stderr,
          "This program is free software; you can redistribute it and/or modify\n"
          "it under the terms of the GNU General Public License as published by\n"