# HG changeset patch # User jwe # Date 865285435 0 # Node ID 2e114e914b773facd9867d3b96003249218c7d4f # Parent 38de16594cb41e5409b2a658bcd96bb746683814 [project @ 1997-06-02 21:03:55 by jwe] diff -r 38de16594cb4 -r 2e114e914b77 src/defun-int.h --- a/src/defun-int.h Mon Jun 02 20:35:37 1997 +0000 +++ b/src/defun-int.h Mon Jun 02 21:03:55 1997 +0000 @@ -25,10 +25,14 @@ #include +#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; \ } diff -r 38de16594cb4 -r 2e114e914b77 src/defun.cc --- a/src/defun.cc Mon Jun 02 20:35:37 1997 +0000 +++ b/src/defun.cc Mon Jun 02 21:03:55 1997 +0000 @@ -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