version output appearance bits

This commit is contained in:
nhmall
2018-01-26 17:25:21 -05:00
parent 9728616a21
commit d2245aab29
3 changed files with 25 additions and 14 deletions
+1 -1
View File
@@ -2567,7 +2567,7 @@ E unsigned long NDECL(get_current_feature_ver);
E const char *FDECL(copyright_banner_line, (int)); E const char *FDECL(copyright_banner_line, (int));
#ifdef RUNTIME_PORT_ID #ifdef RUNTIME_PORT_ID
E void FDECL(append_port_id, (char *)); E char *FDECL(get_port_id, (char *));
#endif #endif
/* ### video.c ### */ /* ### video.c ### */
+17 -6
View File
@@ -15,8 +15,6 @@
#include "patchlevel.h" #include "patchlevel.h"
#endif #endif
#define BETA_INFO ""
STATIC_DCL void FDECL(insert_rtoption, (char *)); STATIC_DCL void FDECL(insert_rtoption, (char *));
/* fill buffer with short version (so caller can avoid including date.h) */ /* fill buffer with short version (so caller can avoid including date.h) */
@@ -32,13 +30,26 @@ char *
getversionstring(buf) getversionstring(buf)
char *buf; char *buf;
{ {
int details = 0;
Strcpy(buf, VERSION_ID); Strcpy(buf, VERSION_ID);
#if defined(BETA) && defined(BETA_INFO)
Sprintf(eos(buf), " %s", BETA_INFO);
#endif
#if defined(RUNTIME_PORT_ID) #if defined(RUNTIME_PORT_ID)
append_port_id(buf); details++;
#endif #endif
if (details) {
int c = 0;
char tmpbuf[BUFSZ];
char *tmp = (char *)0;
Sprintf(eos(buf), " (");
#if defined(RUNTIME_PORT_ID)
tmp = get_port_id(tmpbuf);
if (tmp)
Sprintf(eos(buf), "%s%s", c++ ? "," : "", tmp);
#endif
Sprintf(eos(buf), ")");
}
return buf; return buf;
} }
+7 -7
View File
@@ -326,23 +326,23 @@ int interjection_type;
*/ */
#ifndef _M_IX86 #ifndef _M_IX86
#ifdef _M_X64 #ifdef _M_X64
#define TARGET_PORT "(x64) " #define TARGET_PORT "x64"
#endif #endif
#ifdef _M_IA64 #ifdef _M_IA64
#define TARGET_PORT "(IA64) " #define TARGET_PORT "IA64"
#endif #endif
#endif #endif
#ifndef TARGET_PORT #ifndef TARGET_PORT
#define TARGET_PORT "(x86) " #define TARGET_PORT "x86"
#endif #endif
void char *
append_port_id(buf) get_port_id(buf)
char *buf; char *buf;
{ {
char *portstr = TARGET_PORT; Strcpy(buf, TARGET_PORT);
Sprintf(eos(buf), " %s", portstr); return buf;
} }
#endif /* RUNTIME_PORT_ID */ #endif /* RUNTIME_PORT_ID */