mux/src/version.cpp File Reference

#include "copyright.h"
#include "autoconf.h"
#include "config.h"
#include "externs.h"
#include "_build.h"
#include "command.h"

Include dependency graph for version.cpp:

Go to the source code of this file.

Functions

void do_version (dbref executor, dbref caller, dbref enactor, int extra)
void build_version (void)
void init_version (void)


Function Documentation

void build_version ( void   ) 

Definition at line 27 of file version.cpp.

References mudstate, MUX_BUILD_NUM, MUX_RELEASE_DATE, MUX_VERSION, statedata::short_ver, and statedata::version.

Referenced by main().

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 }

void do_version ( dbref  executor,
dbref  caller,
dbref  enactor,
int  extra 
)

Definition at line 14 of file version.cpp.

References alloc_mbuf, free_mbuf, mudstate, MUX_BUILD_DATE, notify, UNUSED_PARAMETER, and statedata::version.

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 }

void init_version ( void   ) 

Definition at line 60 of file version.cpp.

References ENDLOG, LOG_ALWAYS, log_text(), mudstate, MUX_BUILD_DATE, STARTLOG, and statedata::version.

Referenced by main().

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:23 2007 for MUX by  doxygen 1.4.7