diff options
author | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:25:09 +0000 |
---|---|---|
committer | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:25:09 +0000 |
commit | 1bd4094341bcada53540b6f51833c30d61f1dcd6 (patch) | |
tree | 917cfd1e4ff9e34dcf7f7a7aaaa78d875bf6d0b8 /server/version.c | |
parent | fe7095d1dc0a6a79810cc2e81df3fa70370385be (diff) |
Converted back to ANSI C (with ifdef's for standard C)
Diffstat (limited to 'server/version.c')
-rw-r--r-- | server/version.c | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/server/version.c b/server/version.c index fe0400c..587028f 100644 --- a/server/version.c +++ b/server/version.c @@ -13,20 +13,76 @@ #include <zephyr/mit-copyright.h> +#include <string.h> +#include <zephyr/zephyr.h> +#include "version.h" + #ifdef DEBUG -extern const char version[] = "Zephyr Server (DEBUG) $Revision$"; +Zconst char version[] = "Zephyr Server (DEBUG) $Revision$"; #else -extern const char version[] = "Zephyr Server $Revision$"; +Zconst char version[] = "Zephyr Server $Revision$"; #endif #if !defined (lint) && !defined (SABER) -static const char rcsid_version_c[] = +Zconst char rcsid_version_c[] = "$Id$"; -extern const char copyright[] = +Zconst char copyright[] = "Copyright (c) 1987,1988,1989,1990 Massachusetts Institute of Technology.\n"; #ifdef CONCURRENT -extern const char concurrent[] = "Brain-dump concurrency enabled"; +Zconst char concurrent[] = "Brain-dump concurrency enabled"; #else -extern const char concurrent[] = "no brain-dump concurrency"; +Zconst char concurrent[] = "no brain-dump concurrency"; #endif #endif + +char * +get_version() +{ + static char vers_buf[256]; + + if (vers_buf[0] == '\0') { +#ifdef DEBUG + sprintf(vers_buf,"Zephyr Server (DEBUG) $Revision$: %s", + ZSERVER_VERSION_STRING); +#else + sprintf(vers_buf,"Zephyr Server $Revision$: %s", + ZSERVER_VERSION_STRING); +#endif /* DEBUG */ + + (void) strcat(vers_buf, "/"); +#ifdef vax + (void) strcat(vers_buf, "VAX"); +#endif /* vax */ +#ifdef ibm032 + (void) strcat(vers_buf, "IBM RT"); +#endif /* ibm032 */ +#ifdef _IBMR2 + (void) strcat(vers_buf, "IBM RS/6000"); +#endif /* _IBMR2 */ +#ifdef sun + (void) strcat(vers_buf, "SUN"); +#ifdef sparc + (void) strcat (vers_buf, "-4"); +#endif /* sparc */ +#ifdef sun386 + (void) strcat (vers_buf, "-386I"); +#endif /* sun386 */ +#endif /* sun */ + +#ifdef mips +#ifdef ultrix /* DECstation */ + (void) strcat (vers_buf, "DEC-"); +#endif /* ultrix */ + (void) strcat(vers_buf, "MIPS"); +#endif /* mips */ +#ifdef NeXT + (void) strcat(vers_buf, "NeXT"); +#endif /* NeXT */ + } + return(vers_buf); +} + + + + + |