get rid of -DVERSION
authorAndre <maan@p133.(none)>
Wed, 28 Jun 2006 13:02:39 +0000 (15:02 +0200)
committerAndre <maan@p133.(none)>
Wed, 28 Jun 2006 13:02:39 +0000 (15:02 +0200)
It's identical to PACKAGE_VERSION, so use PACKAGE_VERSION in the
C Code and get rid of the preprocessor define.

Makefile.in
command.c
daemon.c
gui.c
http_recv.c
sdl_gui.c

index 2c47a2cdabe9abce63cfdbf15f520476350c5b00..e51a20eb77be646553e84ebd43d6b05c03fb1eb6 100644 (file)
@@ -16,7 +16,6 @@ install_sh = @install_sh@
 build_date = $(shell date)
 system = $(shell uname -rs)
 cc_version = $(shell $(CC) --version | head -n 1)
 build_date = $(shell date)
 system = $(shell uname -rs)
 cc_version = $(shell $(CC) --version | head -n 1)
-version = @PACKAGE_VERSION@
 codename = oriented abstraction
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 codename = oriented abstraction
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
@@ -42,7 +41,6 @@ CPPFLAGS += -DFONTDIR='"$(PKGDATADIR)/fonts"'
 CPPFLAGS += -DPICDIR='"$(PKGDATADIR)/pics"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DSYSTEM='"$(system)"'
 CPPFLAGS += -DPICDIR='"$(PKGDATADIR)/pics"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DSYSTEM='"$(system)"'
-CPPFLAGS += -DVERSION='"$(version)"'
 CPPFLAGS += -DCODENAME='"$(codename)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 CPPFLAGS += -Werror-implicit-function-declaration
 CPPFLAGS += -DCODENAME='"$(codename)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 CPPFLAGS += -Werror-implicit-function-declaration
index ea42ef4318119a13b0fd077fc7500913161bbe93..52d56c9eba015880000db26e4183814434ad6f39 100644 (file)
--- a/command.c
+++ b/command.c
@@ -603,7 +603,8 @@ static int com_version(int socket_fd, int argc, __a_unused char **argv)
 {
        if (argc != 1)
                return -E_COMMAND_SYNTAX;
 {
        if (argc != 1)
                return -E_COMMAND_SYNTAX;
-       return send_buffer(socket_fd, "para_server-" VERSION ", \"" CODENAME "\"\n"
+       return send_buffer(socket_fd, "para_server-" PACKAGE_VERSION ", \""
+                       CODENAME "\"\n"
                        COPYRIGHT "\n"
                        "built: " BUILD_DATE "\n"
                        SYSTEM ", " CC_VERSION "\n"
                        COPYRIGHT "\n"
                        "built: " BUILD_DATE "\n"
                        SYSTEM ", " CC_VERSION "\n"
@@ -1100,7 +1101,8 @@ int handle_connect(int fd, struct sockaddr_in *addr)
        in_addr = addr;
        challenge_nr = random();
        /* send Welcome message */
        in_addr = addr;
        challenge_nr = random();
        /* send Welcome message */
-       ret = send_va_buffer(fd, "This is para_server, version " VERSION  ".\n" );
+       ret = send_va_buffer(fd, "This is para_server, version "
+               PACKAGE_VERSION  ".\n" );
        if (ret < 0)
                goto err_out;
        /* recv auth request line */
        if (ret < 0)
                goto err_out;
        /* recv auth request line */
index d3a43b9a2de32fe50f2a42009cbcfb7830972985..edaf7f9c7872dad1808f941d99a9fb416a9c68f4 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -101,7 +101,8 @@ void close_log(FILE* logfile)
  */
 void log_welcome(const char *whoami, int loglevel)
 {
  */
 void log_welcome(const char *whoami, int loglevel)
 {
-       PARA_INFO_LOG("welcome to %s " VERSION " ("BUILD_DATE")\n", whoami);
+       PARA_INFO_LOG("welcome to %s " PACKAGE_VERSION " ("BUILD_DATE")\n",
+               whoami);
        PARA_DEBUG_LOG("using loglevel %d\n", loglevel);
 }
 
        PARA_DEBUG_LOG("using loglevel %d\n", loglevel);
 }
 
diff --git a/gui.c b/gui.c
index ffd1ea842039760bd6a1ec268a01423334bbb368..c0588197c553e1728713e0e964c61041eb02e7ef 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -31,7 +31,7 @@ INIT_GUI_ERRLISTS;
 extern const char *status_item_list[NUM_STAT_ITEMS];
 static char *stat_content[NUM_STAT_ITEMS];
 
 extern const char *status_item_list[NUM_STAT_ITEMS];
 static char *stat_content[NUM_STAT_ITEMS];
 
-#define STANDARD_STATUS_BAR "para_gui " VERSION " (hit ? for help)"
+#define STANDARD_STATUS_BAR "para_gui " PACKAGE_VERSION " (hit ? for help)"
 
 static int signal_pipe;
 
 
 static int signal_pipe;
 
@@ -339,7 +339,7 @@ static void print_status_bar(void)
        if (!curses_active)
                return;
        wmove(sb.win, 0, 0);
        if (!curses_active)
                return;
        wmove(sb.win, 0, 0);
-       align_str(sb.win,STANDARD_STATUS_BAR, sb.cols, CENTER);
+       align_str(sb.win, STANDARD_STATUS_BAR, sb.cols, CENTER);
        wrefresh(sb.win);
 }
 
        wrefresh(sb.win);
 }
 
@@ -540,7 +540,7 @@ static void print_welcome(void)
        int ll = conf.loglevel_arg;
        if (ll > NOTICE)
                return;
        int ll = conf.loglevel_arg;
        if (ll > NOTICE)
                return;
-       outputf(COLOR_WELCOME, "Welcome to para_gui " VERSION
+       outputf(COLOR_WELCOME, "Welcome to para_gui " PACKAGE_VERSION
                " \"" CODENAME "\". Theme: %s", theme.name);
        wclrtoeol(bot.win);
 }
                " \"" CODENAME "\". Theme: %s", theme.name);
        wclrtoeol(bot.win);
 }
@@ -1224,7 +1224,8 @@ static void com_enlarge_top_win(void)
 
 static void com_version(void)
 {
 
 static void com_version(void)
 {
-       print_in_bar(COLOR_MSG, "para_gui " VERSION " \"" CODENAME "\"");
+       print_in_bar(COLOR_MSG, "para_gui " PACKAGE_VERSION " \""
+               CODENAME "\"");
 }
 
 static void com_quit(void)
 }
 
 static void com_quit(void)
index 6a2f60f1b1b945befd179a28d609ea88e54938e4..386aacbcfc2c447e907e97c3bb630504ff87bdf9 100644 (file)
@@ -87,7 +87,7 @@ static char *make_request_msg(void)
 {
        char *ret, *hn = para_hostname();
        ret = make_message("%s1.0\nHost: %s\nUser-Agent: para_recv/%s\n\n\n",
 {
        char *ret, *hn = para_hostname();
        ret = make_message("%s1.0\nHost: %s\nUser-Agent: para_recv/%s\n\n\n",
-               HTTP_GET_MSG, hn, VERSION);
+               HTTP_GET_MSG, hn, PACKAGE_VERSION);
        free(hn);
        return ret;
 }
        free(hn);
        return ret;
 }
index b67b3d1e48554993f61f836e5bc3a60e23f828a1..3cfabbb5c8f2887444858362d029377dbcbcb935 100644 (file)
--- a/sdl_gui.c
+++ b/sdl_gui.c
@@ -356,7 +356,7 @@ static void init_SDL(void)
        SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE);
        /* Set the window manager title bar */
        SDL_WM_SetCaption("The Gui of death that makes you blind (paraslash "
        SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE);
        /* Set the window manager title bar */
        SDL_WM_SetCaption("The Gui of death that makes you blind (paraslash "
-               VERSION ")", "SFont");
+               PACKAGE_VERSION ")", "SFont");
 }
 
 /*
 }
 
 /*