Report SICS version information on "SICServer -v"

This commit is contained in:
Douglas Clowes
2013-02-15 13:27:03 +11:00
parent 639e7af80c
commit 0e52709cdc
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,12 @@ int main(int argc, char *argv[])
if (argv[i][0] == '-') {
if (strcasecmp(argv[i], "-nolog") == 0) {
SICSLogEnable(0);
#ifdef SITE_ANSTO
} else if (strcasecmp(argv[i], "-v") == 0) {
extern void SiteReportVersion(void);
SiteReportVersion();
return 0;
#endif
} else if (strcasecmp(argv[i], "-d") == 0) {
daemonize = 1;
} else {

View File

@ -105,6 +105,12 @@ int SICS_Revision(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, c
return OKOK;
};
void SiteReportVersion(void)
{
fprintf(stdout, "SICS version=%s revision=%s at %s\n",
SICS_VERSION, SICS_REVISION, SICS_SITE);
}
static int MacroFileEvalGlob(SConnection * pCon, SicsInterp * pInter, void *pData,
int argc, char *argv[])
{