123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
- #include <stdio.h>
- #include "libguile/_scm.h"
- #include "libguile/strings.h"
- #include "libguile/version.h"
- #define SCM_TMP_MACRO_MKSTR(x) #x
- SCM_DEFINE (scm_major_version, "major-version", 0, 0, 0,
- (),
- "Return a string containing Guile's major version number.\n"
- "E.g., the 1 in \"1.6.5\".")
- #define FUNC_NAME s_scm_major_version
- {
- return scm_number_to_string (scm_from_int (SCM_MAJOR_VERSION),
- scm_from_int (10));
- }
- #undef FUNC_NAME
- SCM_DEFINE (scm_minor_version, "minor-version", 0, 0, 0,
- (),
- "Return a string containing Guile's minor version number.\n"
- "E.g., the 6 in \"1.6.5\".")
- #define FUNC_NAME s_scm_minor_version
- {
- return scm_number_to_string (scm_from_int (SCM_MINOR_VERSION),
- scm_from_int (10));
- }
- #undef FUNC_NAME
- SCM_DEFINE (scm_micro_version, "micro-version", 0, 0, 0,
- (),
- "Return a string containing Guile's micro version number.\n"
- "E.g., the 5 in \"1.6.5\".")
- #define FUNC_NAME s_scm_micro_version
- {
- return scm_number_to_string (scm_from_int (SCM_MICRO_VERSION),
- scm_from_int (10));
- }
- #undef FUNC_NAME
- SCM_DEFINE (scm_version, "version", 0, 0, 0,
- (),
- "@deffnx {Scheme Procedure} major-version\n"
- "@deffnx {Scheme Procedure} minor-version\n"
- "@deffnx {Scheme Procedure} micro-version\n"
- "Return a string describing Guile's version number, or its major, minor\n"
- "or micro version number, respectively.\n\n"
- "@lisp\n"
- "(version) @result{} \"1.6.0\"\n"
- "(major-version) @result{} \"1\"\n"
- "(minor-version) @result{} \"6\"\n"
- "(micro-version) @result{} \"0\"\n"
- "@end lisp")
- #define FUNC_NAME s_scm_version
- {
- return scm_from_locale_string (PACKAGE_VERSION);
- }
- #undef FUNC_NAME
- SCM_DEFINE (scm_effective_version, "effective-version", 0, 0, 0,
- (),
- "Return a string describing Guile's effective version number.\n"
- "@lisp\n"
- "(version) @result{} \"1.6.0\"\n"
- "(effective-version) @result{} \"1.6\"\n"
- "(major-version) @result{} \"1\"\n"
- "(minor-version) @result{} \"6\"\n"
- "(micro-version) @result{} \"0\"\n"
- "@end lisp")
- #define FUNC_NAME s_scm_effective_version
- {
- return scm_from_locale_string (SCM_EFFECTIVE_VERSION);
- }
- #undef FUNC_NAME
- void
- scm_init_version ()
- {
- #include "libguile/version.x"
- }
|