version.c.in revision 0bbfda8a
10bbfda8aSnia/* 20bbfda8aSnia * Copyright 1988 by Evans & Sutherland Computer Corporation, 30bbfda8aSnia * Salt Lake City, Utah 40bbfda8aSnia * Portions Copyright 1989 by the Massachusetts Institute of Technology 50bbfda8aSnia * Cambridge, Massachusetts 60bbfda8aSnia * 70bbfda8aSnia * Copyright 1992 Claude Lecommandeur. 80bbfda8aSnia */ 90bbfda8aSnia 100bbfda8aSnia#include "ctwm.h" 110bbfda8aSnia#include "version.h" 120bbfda8aSnia 130bbfda8aSnia#define VERSION_MAJOR "@ctwm_version_major@" 140bbfda8aSnia#define VERSION_MINOR "@ctwm_version_minor@" 150bbfda8aSnia#define VERSION_PATCH "@ctwm_version_patch@" 160bbfda8aSnia#define VERSION_ADDL "@ctwm_version_addl@" 170bbfda8aSnia 180bbfda8aSnia#define VERSION_ID VERSION_MAJOR "." VERSION_MINOR "." VERSION_PATCH 190bbfda8aSnia#define VERSION_ID_FULL VERSION_ID VERSION_ADDL 200bbfda8aSnia 210bbfda8aSniaconst char *TwmVersion = "MIT X Consortium, R6, ctwm " VERSION_ID_FULL; 220bbfda8aSniaconst char *VersionNumber = VERSION_ID; 230bbfda8aSniaconst char *VersionNumberFull = VERSION_ID_FULL; 240bbfda8aSniaconst char *VersionNumber_major = VERSION_MAJOR; 250bbfda8aSniaconst char *VersionNumber_minor = VERSION_MINOR; 260bbfda8aSniaconst char *VersionNumber_patch = VERSION_PATCH; 270bbfda8aSniaconst char *VersionNumber_addl = VERSION_ADDL; 280bbfda8aSniaconst char *VCSType = "bzr"; 290bbfda8aSniaconst char *VCSRevision = "fullermd@over-yonder.net-20190721212859-1hko50q7rrvqttfb"; 300bbfda8aSnia 310bbfda8aSnia#ifdef BUILD_VERSION_BIN 320bbfda8aSnia#include <stdio.h> 330bbfda8aSnia#include <unistd.h> 340bbfda8aSnia 350bbfda8aSniaint 360bbfda8aSniamain(int argc, char *argv[]) 370bbfda8aSnia{ 380bbfda8aSnia int ch; 390bbfda8aSnia 400bbfda8aSnia if((ch = getopt(argc, argv, "Mmpa")) != -1) { 410bbfda8aSnia switch(ch) { 420bbfda8aSnia case 'M': 430bbfda8aSnia printf("%s\n", VersionNumber_major); 440bbfda8aSnia exit(0); 450bbfda8aSnia case 'm': 460bbfda8aSnia printf("%s\n", VersionNumber_minor); 470bbfda8aSnia exit(0); 480bbfda8aSnia case 'p': 490bbfda8aSnia printf("%s\n", VersionNumber_patch); 500bbfda8aSnia exit(0); 510bbfda8aSnia case 'a': 520bbfda8aSnia printf("%s\n", VersionNumber_addl); 530bbfda8aSnia exit(0); 540bbfda8aSnia default: 550bbfda8aSnia printf("Dunno.\n"); 560bbfda8aSnia exit(1); 570bbfda8aSnia } 580bbfda8aSnia } 590bbfda8aSnia 600bbfda8aSnia printf("%s\n", VersionNumberFull); 610bbfda8aSnia exit(0); 620bbfda8aSnia} 630bbfda8aSnia#endif /* BUILD_VERSION_BIN */ 64