...
 
Commits (2)
git_branch.h
git_hash.h
......@@ -787,7 +787,7 @@ void sbbs_t::inc_row(int count)
}
}
void sbbs_t::center(char *instr, unsigned int columns)
void sbbs_t::center(const char *instr, unsigned int columns)
{
char str[256];
size_t len;
......
......@@ -21,6 +21,8 @@
#include "msg_id.h"
#include "smblib.h"
#include "git_branch.h"
#include "git_hash.h"
static ulong msg_number(smbmsg_t* msg)
{
......@@ -242,8 +244,9 @@ char* DLLCALL msg_program_id(char* pid, size_t maxlen)
char compiler[64];
DESCRIBE_COMPILER(compiler);
snprintf(pid, maxlen, "%.10s %s%c-%s %s %s"
snprintf(pid, maxlen, "%.10s %s%c-%s %s/%s %s %s"
,VERSION_NOTICE,VERSION,REVISION,PLATFORM_DESC
,GIT_BRANCH, GIT_HASH
,__DATE__,compiler);
return pid;
}
......
......@@ -759,7 +759,7 @@ public:
int outchar(enum unicode_codepoint, const char* cp437_fallback = NULL);
void inc_row(int count);
void inc_column(int count);
void center(char *str, unsigned int columns = 0);
void center(const char *str, unsigned int columns = 0);
void wide(const char*);
void clearscreen(long term);
void clearline(void);
......
......@@ -114,6 +114,17 @@ symlinks: all
ln -sfr */$(EXEODIR)/* $(SBBSEXEC)
endif
.PHONY: FORCE
FORCE:
ifneq ($(GIT), NO)
git_hash.h: FORCE ../../.git
echo '#define GIT_HASH "'`git log -1 HEAD --format=%h`\" > $@
git_branch.h: FORCE ../../.git
echo '#define GIT_BRANCH "'`git rev-parse --abbrev-ref HEAD`\" > $@
endif
ifeq ($(os),linux)
.PHONY: setcap
setcap: all
......
......@@ -38,6 +38,8 @@
#include "sbbs.h"
#include "ssl.h"
#include "git_hash.h"
#include "git_branch.h"
const char* beta_version = " "; /* Space if non-beta, " beta" otherwise */
......@@ -96,7 +98,10 @@ void sbbs_t::ver()
center(str);
CRLF;
sprintf(str,"%s - http://www.synchro.net", COPYRIGHT_NOTICE);
center("https://gitlab.synchro.net - " GIT_BRANCH " " GIT_HASH);
CRLF;
sprintf(str,"%s - http://synchro.net", COPYRIGHT_NOTICE);
center(str);
CRLF;
......