mux/src/version.cpp

Go to the documentation of this file.
00001 // version.cpp -- Version information.
00002 //
00003 // $Id: version.cpp,v 1.2 2006/01/07 01:50:19 sdennis Exp $
00004 //
00005 
00006 #include "copyright.h"
00007 #include "autoconf.h"
00008 #include "config.h"
00009 #include "externs.h"
00010 
00011 #include "_build.h"
00012 #include "command.h"
00013 
00014 void do_version(dbref executor, dbref caller, dbref enactor, int extra)
00015 {
00016     UNUSED_PARAMETER(caller);
00017     UNUSED_PARAMETER(enactor);
00018     UNUSED_PARAMETER(extra);
00019 
00020     notify(executor, mudstate.version);
00021     char *buff = alloc_mbuf("do_version");
00022     sprintf(buff, "Build date: %s", MUX_BUILD_DATE);
00023     notify(executor, buff);
00024     free_mbuf(buff);
00025 }
00026 
00027 void build_version(void)
00028 {
00029 #ifdef WIN32
00030 #if defined(ALPHA)
00031         sprintf( mudstate.version, "MUX %s for Win32 #%s [ALPHA]",
00032             MUX_VERSION, MUX_BUILD_NUM);
00033         sprintf( mudstate.short_ver, "MUX %s Alpha Win32", MUX_VERSION);
00034 #elif defined(BETA)
00035         sprintf( mudstate.version, "MUX %s for Win32 #%s [BETA]",
00036             MUX_VERSION, MUX_BUILD_NUM);
00037         sprintf( mudstate.short_ver, "MUX %s Beta Win32", MUX_VERSION);
00038 #else // RELEASED
00039         sprintf( mudstate.version, "MUX %s for Win32 #%s [%s]",
00040             MUX_VERSION, MUX_BUILD_NUM, MUX_RELEASE_DATE);
00041         sprintf( mudstate.short_ver, "MUX %s Win32", MUX_VERSION);
00042 #endif // ALPHA, BETA, RELEASED
00043 #else // WIN32
00044 #if defined(ALPHA)
00045         sprintf( mudstate.version, "MUX %s #%s [ALPHA]", MUX_VERSION,
00046             MUX_BUILD_NUM);
00047         sprintf( mudstate.short_ver, "MUX %s Alpha", MUX_VERSION);
00048 #elif defined(BETA)
00049         sprintf( mudstate.version, "MUX %s #%s [BETA]", MUX_VERSION,
00050             MUX_BUILD_NUM);
00051         sprintf( mudstate.short_ver, "MUX %s Beta", MUX_VERSION);
00052 #else // RELEASED
00053         sprintf( mudstate.version, "MUX %s #%s [%s]", MUX_VERSION,
00054             MUX_BUILD_NUM, MUX_RELEASE_DATE);
00055         sprintf( mudstate.short_ver, "MUX %s", MUX_VERSION);
00056 #endif // ALPHA, BETA, RELEASED
00057 #endif // WIN32
00058 }
00059 
00060 void init_version(void)
00061 {
00062     STARTLOG(LOG_ALWAYS, "INI", "START");
00063     log_text("Starting: ");
00064     log_text(mudstate.version);
00065     ENDLOG;
00066     STARTLOG(LOG_ALWAYS, "INI", "START");
00067     log_text("Build date: ");
00068     log_text(MUX_BUILD_DATE);
00069     ENDLOG;
00070 }

Generated on Mon May 28 04:40:12 2007 for MUX by  doxygen 1.4.7