summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorredman <redman>1999-03-10 22:55:51 (GMT)
committerredman <redman>1999-03-10 22:55:51 (GMT)
commitafe8ba0aa0149beda44b0a95e50fde0897a619e4 (patch)
tree193cbcdde0237a3271891c52a8249cfff38a083a /generic/tclBasic.c
parent10a767e6406260972a8899c07a945a9460f30258 (diff)
downloadtcl-afe8ba0aa0149beda44b0a95e50fde0897a619e4.zip
tcl-afe8ba0aa0149beda44b0a95e50fde0897a619e4.tar.gz
tcl-afe8ba0aa0149beda44b0a95e50fde0897a619e4.tar.bz2
Add Tcl_GetVersion C API
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 74d8bd1..7a41b21 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.16 1999/03/10 05:52:46 stanton Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.17 1999/03/10 22:55:51 redman Exp $
*/
#include "tclInt.h"
@@ -4153,3 +4153,42 @@ Tcl_AllowExceptions(interp)
iPtr->evalFlags |= TCL_ALLOW_EXCEPTIONS;
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_GetVersion
+ *
+ * Get the Tcl major, minor, and patchlevel version numbers and
+ * the release type. A patch is a release type TCL_FINAL_RELEASE
+ * with a patchLevel > 0.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void Tcl_GetVersion(major, minor, patchLevel, type)
+ int *major;
+ int *minor;
+ int *patchLevel;
+ Tcl_ReleaseType *type;
+{
+ if (major != NULL) {
+ *major = TCL_MAJOR_VERSION;
+ }
+ if (minor != NULL) {
+ *minor = TCL_MINOR_VERSION;
+ }
+ if (patchLevel != NULL) {
+ *patchLevel = TCL_RELEASE_SERIAL;
+ }
+ if (type != NULL) {
+ *type = TCL_RELEASE_LEVEL;
+ }
+}
+