Mercurial > hg > octave-max
changeset 3015:2e114e914b77
[project @ 1997-06-02 21:03:55 by jwe]
author | jwe |
---|---|
date | Mon, 02 Jun 1997 21:03:55 +0000 |
parents | 38de16594cb4 |
children | f512c16826d1 |
files | src/defun-int.h src/defun.cc |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/defun-int.h +++ b/src/defun-int.h @@ -25,10 +25,14 @@ #include <string> +#include "version.h" + class octave_value; extern void print_usage (const string& nm, bool just_usage = false); +extern void check_version (const string& version, const string& fcn); + // XXX FIXME XXX -- change to use actual pointer types instead of void* // when things are not changing as rapidly. @@ -93,7 +97,10 @@ { \ static bool installed = false; \ if (! installed) \ - install_builtin_function (F ## name, #name, doc); \ + { \ + check_version (OCTAVE_VERSION, #name); \ + install_builtin_function (F ## name, #name, doc); \ + } \ return installed; \ }
--- a/src/defun.cc +++ b/src/defun.cc @@ -58,6 +58,14 @@ warning ("no usage message found for `%s'", nm.c_str ()); } +void +check_version (const string& version, const string& fcn) +{ + if (version != OCTAVE_VERSION) + warning ("incompatible version %s found in function `%s'", + version.c_str (), fcn.c_str ()); +} + // Install variables and functions in the symbol tables. void