Mercurial > hg > octave-avbm
changeset 6109:c68896f193e3
[project @ 2006-10-27 02:16:18 by jwe]
author | jwe |
---|---|
date | Fri, 27 Oct 2006 02:16:19 +0000 |
parents | 143b556ce725 |
children | 8e5edd73e504 |
files | src/ChangeLog src/TEMPLATE-INST/Array-os.cc src/TEMPLATE-INST/Array-sym.cc src/TEMPLATE-INST/Array-tc.cc src/defun-int.h src/error.h src/file-io.h src/gripes.h src/ls-oct-ascii.h src/mexproto.h src/oct-map.h src/oct-obj.h src/oct-stream.cc src/oct-stream.h src/octave.h src/ov-base.h src/ov-bool-sparse.cc src/ov-bool-sparse.h src/ov-cx-sparse.cc src/ov-cx-sparse.h src/ov-fcn.h src/ov-re-sparse.cc src/ov-re-sparse.h src/ov-str-mat.h src/ov-typeinfo.cc src/ov-typeinfo.h src/ov.h src/pager.h src/parse.h src/pr-output.cc src/pr-output.h src/procstream.h src/sighandlers.h src/symtab.h src/unwind-prot.h src/utils.h src/variables.h |
diffstat | 37 files changed, 380 insertions(+), 323 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,17 @@ * file-io.cc: Include file-io.h. + * TEMPLATE-INST/Array-os.cc, TEMPLATE-INST/Array-sym.cc, + TEMPLATE-INST/Array-tc.cc, defun-int.h, error.h, file-io.h, + gripes.h, ls-oct-ascii.h, mexproto.h, oct-map.h, oct-obj.h, + oct-stream.cc, oct-stream.h, octave.h, ov-base.h, + ov-bool-sparse.cc, ov-bool-sparse.h, ov-cx-sparse.cc, + ov-cx-sparse.h, ov-fcn.h, ov-re-sparse.cc, ov-re-sparse.h, + ov-str-mat.h, ov-typeinfo.cc, ov-typeinfo.h, ov.h, pager.h, + parse.h, pr-output.cc, pr-output.h, procstream.h, sighandlers.h, + symtab.h, unwind-prot.h, utils.h, variables.h: + Sprinkle with OCTINTERP_API as needed. + 2006-10-26 John W. Eaton <jwe@octave.org> * ov-bool.h (octave_bool::sparse_matrix_value,
--- a/src/TEMPLATE-INST/Array-os.cc +++ b/src/TEMPLATE-INST/Array-os.cc @@ -35,6 +35,9 @@ typedef scanf_format_elt* scanf_format_elt_ptr; typedef printf_format_elt* printf_format_elt_ptr; +#undef OCTAVE_API +#define OCTAVE_API + INSTANTIATE_ARRAY (scanf_format_elt_ptr); INSTANTIATE_ARRAY (printf_format_elt_ptr);
--- a/src/TEMPLATE-INST/Array-sym.cc +++ b/src/TEMPLATE-INST/Array-sym.cc @@ -35,6 +35,9 @@ typedef symbol_record* symbol_record_ptr; +#undef OCTAVE_API +#define OCTAVE_API + INSTANTIATE_ARRAY (symbol_record_ptr); /*
--- a/src/TEMPLATE-INST/Array-tc.cc +++ b/src/TEMPLATE-INST/Array-tc.cc @@ -40,7 +40,7 @@ #include "oct-obj.h" -template<> +template<> OCTINTERP_API octave_value resize_fill_value<octave_value> (const octave_value&) { @@ -48,13 +48,16 @@ return retval; } -template class Array<octave_value>; +template class OCTINTERP_API Array<octave_value>; + +#undef OCTAVE_API +#define OCTAVE_API OCTINTERP_API INSTANTIATE_ARRAY_ASSIGN (octave_value, octave_value); -template class Array2<octave_value>; +template class OCTINTERP_API Array2<octave_value>; -template class ArrayN<octave_value>; +template class OCTINTERP_API ArrayN<octave_value>; /* ;;; Local Variables: ***
--- a/src/defun-int.h +++ b/src/defun-int.h @@ -34,33 +34,33 @@ class octave_value; -extern void print_usage (void); -extern void print_usage (const std::string&) GCC_ATTR_DEPRECATED; +extern OCTINTERP_API void print_usage (void); +extern OCTINTERP_API void print_usage (const std::string&) GCC_ATTR_DEPRECATED; -extern void check_version (const std::string& version, const std::string& fcn); +extern OCTINTERP_API void check_version (const std::string& version, const std::string& fcn); -extern void +extern OCTINTERP_API void install_builtin_mapper (octave_mapper *mf); -extern void +extern OCTINTERP_API void install_builtin_function (octave_builtin::fcn f, const std::string& name, const std::string& doc, bool is_text_fcn = false, bool can_hide_function = true); -extern void +extern OCTINTERP_API void install_dld_function (octave_dld_function::fcn f, const std::string& name, const octave_shlib& shl, const std::string& doc, bool is_text_fcn = false); -extern void +extern OCTINTERP_API void install_mex_function (void *fptr, bool fmex, const std::string& name, const octave_shlib& shl, bool is_text_fcn = false); -extern void +extern OCTINTERP_API void alias_builtin (const std::string& alias, const std::string& name); #define DECLARE_FUNX(name, args_name, nargout_name) \ - octave_value_list \ + OCTAVE_EXPORT octave_value_list \ name (const octave_value_list& args_name, int nargout_name) #define DECLARE_FUN(name, args_name, nargout_name) \ @@ -89,6 +89,7 @@ #define DEFINE_FUNX_INSTALLER_FUN3(name, fname, fsname, doc, cxx_abi) \ extern "C" \ + OCTAVE_EXPORT \ bool \ fsname ## _ ## cxx_abi (const octave_shlib& shl) \ { \
--- a/src/error.h +++ b/src/error.h @@ -30,55 +30,55 @@ panic ("impossible state reached in file `%s' at line %d", \ __FILE__, __LINE__) -extern void reset_error_handler (void); +extern OCTINTERP_API void reset_error_handler (void); -extern int warning_enabled (const std::string& id); +extern OCTINTERP_API int warning_enabled (const std::string& id); -extern void message (const char *name, const char *fmt, ...); -extern void usage (const char *fmt, ...); -extern void warning (const char *fmt, ...); -extern void error (const char *fmt, ...); -extern void parse_error (const char *fmt, ...); +extern OCTINTERP_API void message (const char *name, const char *fmt, ...); +extern OCTINTERP_API void usage (const char *fmt, ...); +extern OCTINTERP_API void warning (const char *fmt, ...); +extern OCTINTERP_API void error (const char *fmt, ...); +extern OCTINTERP_API void parse_error (const char *fmt, ...); -extern void +extern OCTINTERP_API void message_with_id (const char *id, const char *name, const char *fmt, ...); -extern void +extern OCTINTERP_API void usage_with_id (const char *id, const char *fmt, ...); -extern void +extern OCTINTERP_API void warning_with_id (const char *id, const char *fmt, ...); -extern void +extern OCTINTERP_API void error_with_id (const char *id, const char *fmt, ...); -extern void +extern OCTINTERP_API void parse_error_with_id (const char *id, const char *fmt, ...); -extern void panic (const char *fmt, ...) GCC_ATTR_NORETURN; +extern OCTINTERP_API void panic (const char *fmt, ...) GCC_ATTR_NORETURN; // Helper function for print_usage defined in defun.cc. -extern void defun_usage_message (const std::string& msg); +extern OCTINTERP_API void defun_usage_message (const std::string& msg); -extern void disable_warning (const std::string& id); -extern void initialize_default_warning_state (void); +extern OCTINTERP_API void disable_warning (const std::string& id); +extern OCTINTERP_API void initialize_default_warning_state (void); // Current error state. -extern int error_state; +extern OCTINTERP_API int error_state; // Current warning state. -extern int warning_state; +extern OCTINTERP_API int warning_state; // Tell the error handler whether to print messages, or just store // them for later. Used for handling errors in eval() and // the `unwind_protect' statement. -extern int buffer_error_messages; +extern OCTINTERP_API int buffer_error_messages; // TRUE means error messages are turned off. -extern bool discard_error_messages; +extern OCTINTERP_API bool discard_error_messages; // TRUE means warning messages are turned off. -extern bool discard_warning_messages; +extern OCTINTERP_API bool discard_warning_messages; #endif
--- a/src/file-io.h +++ b/src/file-io.h @@ -26,13 +26,13 @@ #if !defined (octave_file_io_h) #define octave_file_io_h 1 -extern void initialize_file_io (void); +extern OCTINTERP_API void initialize_file_io (void); -extern void close_files (void); +extern OCTINTERP_API void close_files (void); -extern void mark_for_deletion (const std::string&); +extern OCTINTERP_API void mark_for_deletion (const std::string&); -extern void cleanup_tmp_files (void); +extern OCTINTERP_API void cleanup_tmp_files (void); #endif
--- a/src/gripes.h +++ b/src/gripes.h @@ -30,80 +30,80 @@ class octave_value; -extern void +extern OCTINTERP_API void gripe_not_supported (const char *); -extern void +extern OCTINTERP_API void gripe_string_invalid (void); -extern void +extern OCTINTERP_API void gripe_range_invalid (void); -extern void +extern OCTINTERP_API void gripe_nonconformant (void); -extern void +extern OCTINTERP_API void gripe_nonconformant (octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2); -extern void +extern OCTINTERP_API void gripe_empty_arg (const char *name, bool is_error); -extern void +extern OCTINTERP_API void gripe_square_matrix_required (const char *name); -extern void +extern OCTINTERP_API void gripe_user_supplied_eval (const char *name); -extern void +extern OCTINTERP_API void gripe_user_returned_invalid (const char *name); -extern void +extern OCTINTERP_API void gripe_invalid_conversion (const std::string& from, const std::string& to); -extern void +extern OCTINTERP_API void gripe_invalid_value_specified (const char *name); -extern void +extern OCTINTERP_API void gripe_2_or_3_dim_plot (void); -extern void +extern OCTINTERP_API void gripe_unrecognized_float_fmt (void); -extern void +extern OCTINTERP_API void gripe_unrecognized_data_fmt (const char *warn_for); -extern void +extern OCTINTERP_API void gripe_data_conversion (const char *from, const char *to); -extern void +extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const char *s, bool is_error = true); -extern void +extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error = true); -extern void +extern OCTINTERP_API void gripe_wrong_type_arg (const char *name, const octave_value& tc, bool is_error = true); -extern void +extern OCTINTERP_API void gripe_wrong_type_arg_for_unary_op (const octave_value& op); -extern void +extern OCTINTERP_API void gripe_wrong_type_arg_for_binary_op (const octave_value& op); -extern void +extern OCTINTERP_API void gripe_implicit_conversion (const char *id, const char *from, const char *to); -extern void +extern OCTINTERP_API void gripe_implicit_conversion (const std::string& id, const std::string& from, const std::string& to); -extern void +extern OCTINTERP_API void gripe_divide_by_zero (void); -extern void +extern OCTINTERP_API void gripe_logical_conversion (void); #endif
--- a/src/ls-oct-ascii.h +++ b/src/ls-oct-ascii.h @@ -40,24 +40,24 @@ #define OCT_RBV DBL_MAX / 100.0 #endif -extern std::string +extern OCTINTERP_API std::string extract_keyword (std::istream& is, const char *keyword, const bool next_only = false); -extern std::string +extern OCTINTERP_API std::string read_ascii_data (std::istream& is, const std::string& filename, bool& global, octave_value& tc, octave_idx_type count); -extern bool +extern OCTINTERP_API bool save_ascii_data (std::ostream& os, const octave_value& val_arg, const std::string& name, bool& infnan_warned, bool mark_as_global, int precision); -extern bool +extern OCTINTERP_API bool save_ascii_data_for_plotting (std::ostream& os, const octave_value& t, const std::string& name); -extern bool +extern OCTINTERP_API bool save_three_d (std::ostream& os, const octave_value& t, bool parametric = false);
--- a/src/mexproto.h +++ b/src/mexproto.h @@ -61,172 +61,172 @@ #undef MXARRAY_TYPEDEFS_ONLY // Interface to the interpreter. -extern const char *mexFunctionName (void); +extern OCTINTERP_API const char *mexFunctionName (void); -extern int mexCallMATLAB (int nargout, mxArray *argout[], int nargin, +extern OCTINTERP_API int mexCallMATLAB (int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname); -extern void mexSetTrapFlag (int flag); -extern int mexEvalString (const char *s); -extern void mexErrMsgTxt (const char *s); -extern void mexErrMsgIdAndTxt (const char *id, const char *s); -extern void mexWarnMsgTxt (const char *s); -extern void mexWarnMsgIdAndTxt (const char *id, const char *s); -extern void mexPrintf (const char *fmt, ...); +extern OCTINTERP_API void mexSetTrapFlag (int flag); +extern OCTINTERP_API int mexEvalString (const char *s); +extern OCTINTERP_API void mexErrMsgTxt (const char *s); +extern OCTINTERP_API void mexErrMsgIdAndTxt (const char *id, const char *s); +extern OCTINTERP_API void mexWarnMsgTxt (const char *s); +extern OCTINTERP_API void mexWarnMsgIdAndTxt (const char *id, const char *s); +extern OCTINTERP_API void mexPrintf (const char *fmt, ...); -extern mxArray *mexGetVariable (const char *space, const char *name); -extern const mxArray *mexGetVariablePtr (const char *space, const char *name); +extern OCTINTERP_API mxArray *mexGetVariable (const char *space, const char *name); +extern OCTINTERP_API const mxArray *mexGetVariablePtr (const char *space, const char *name); -extern int mexPutVariable (const char *space, const char *name, mxArray *ptr); +extern OCTINTERP_API int mexPutVariable (const char *space, const char *name, mxArray *ptr); -extern void mexMakeArrayPersistent (mxArray *ptr); -extern void mexMakeMemoryPersistent (void *ptr); +extern OCTINTERP_API void mexMakeArrayPersistent (mxArray *ptr); +extern OCTINTERP_API void mexMakeMemoryPersistent (void *ptr); -extern int mexAtExit (void (*f) (void)); -extern const mxArray *mexGet (double handle, const char *property); -extern int mexIsGlobal (const mxArray *ptr); -extern int mexIsLocked (void); -extern void mexLock (void); -extern int mexSet (double handle, const char *property, mxArray *val); -extern void mexUnlock (void); +extern OCTINTERP_API int mexAtExit (void (*f) (void)); +extern OCTINTERP_API const mxArray *mexGet (double handle, const char *property); +extern OCTINTERP_API int mexIsGlobal (const mxArray *ptr); +extern OCTINTERP_API int mexIsLocked (void); +extern OCTINTERP_API void mexLock (void); +extern OCTINTERP_API int mexSet (double handle, const char *property, mxArray *val); +extern OCTINTERP_API void mexUnlock (void); // Floating point predicates. -extern int mxIsFinite (double v); -extern int mxIsInf (double v); -extern int mxIsNaN (double v); +extern OCTINTERP_API int mxIsFinite (double v); +extern OCTINTERP_API int mxIsInf (double v); +extern OCTINTERP_API int mxIsNaN (double v); // Floating point values. -extern double mxGetEps (void); -extern double mxGetInf (void); -extern double mxGetNaN (void); +extern OCTINTERP_API double mxGetEps (void); +extern OCTINTERP_API double mxGetInf (void); +extern OCTINTERP_API double mxGetNaN (void); // Memory management. -extern void *mxCalloc (size_t n, size_t size); -extern void *mxMalloc (size_t n); -extern void *mxRealloc (void *ptr, size_t size); -extern void mxFree (void *ptr); +extern OCTINTERP_API void *mxCalloc (size_t n, size_t size); +extern OCTINTERP_API void *mxMalloc (size_t n); +extern OCTINTERP_API void *mxRealloc (void *ptr, size_t size); +extern OCTINTERP_API void mxFree (void *ptr); // Constructors. -extern mxArray *mxCreateCellArray (int ndims, const int *dims); -extern mxArray *mxCreateCellMatrix (int m, int n); -extern mxArray *mxCreateCharArray (int ndims, const int *dims); -extern mxArray *mxCreateCharMatrixFromStrings (int m, const char **str); -extern mxArray *mxCreateDoubleMatrix (int nr, int nc, mxComplexity flag); -extern mxArray *mxCreateDoubleScalar (double val); -extern mxArray *mxCreateLogicalArray (int ndims, const int *dims); -extern mxArray *mxCreateLogicalMatrix (int m, int n); -extern mxArray *mxCreateLogicalScalar (int val); -extern mxArray *mxCreateNumericArray (int ndims, const int *dims, mxClassID class_id, mxComplexity flag); -extern mxArray *mxCreateNumericMatrix (int m, int n, mxClassID class_id, mxComplexity flag); -extern mxArray *mxCreateSparse (int m, int n, int nzmax, mxComplexity flag); -extern mxArray *mxCreateSparseLogicalMatrix (int m, int n, int nzmax); -extern mxArray *mxCreateString (const char *str); -extern mxArray *mxCreateStructArray (int ndims, int *dims, int num_keys, const char **keys); -extern mxArray *mxCreateStructMatrix (int rows, int cols, int num_keys, const char **keys); +extern OCTINTERP_API mxArray *mxCreateCellArray (int ndims, const int *dims); +extern OCTINTERP_API mxArray *mxCreateCellMatrix (int m, int n); +extern OCTINTERP_API mxArray *mxCreateCharArray (int ndims, const int *dims); +extern OCTINTERP_API mxArray *mxCreateCharMatrixFromStrings (int m, const char **str); +extern OCTINTERP_API mxArray *mxCreateDoubleMatrix (int nr, int nc, mxComplexity flag); +extern OCTINTERP_API mxArray *mxCreateDoubleScalar (double val); +extern OCTINTERP_API mxArray *mxCreateLogicalArray (int ndims, const int *dims); +extern OCTINTERP_API mxArray *mxCreateLogicalMatrix (int m, int n); +extern OCTINTERP_API mxArray *mxCreateLogicalScalar (int val); +extern OCTINTERP_API mxArray *mxCreateNumericArray (int ndims, const int *dims, mxClassID class_id, mxComplexity flag); +extern OCTINTERP_API mxArray *mxCreateNumericMatrix (int m, int n, mxClassID class_id, mxComplexity flag); +extern OCTINTERP_API mxArray *mxCreateSparse (int m, int n, int nzmax, mxComplexity flag); +extern OCTINTERP_API mxArray *mxCreateSparseLogicalMatrix (int m, int n, int nzmax); +extern OCTINTERP_API mxArray *mxCreateString (const char *str); +extern OCTINTERP_API mxArray *mxCreateStructArray (int ndims, int *dims, int num_keys, const char **keys); +extern OCTINTERP_API mxArray *mxCreateStructMatrix (int rows, int cols, int num_keys, const char **keys); // Copy constructor. -extern mxArray *mxDuplicateArray (const mxArray *v); +extern OCTINTERP_API mxArray *mxDuplicateArray (const mxArray *v); // Destructor. -extern void mxDestroyArray (mxArray *v); +extern OCTINTERP_API void mxDestroyArray (mxArray *v); // Type Predicates. -extern int mxIsCell (const mxArray *ptr); -extern int mxIsChar (const mxArray *ptr); -extern int mxIsClass (const mxArray *ptr, const char *name); -extern int mxIsComplex (const mxArray *ptr); -extern int mxIsDouble (const mxArray *ptr); -extern int mxIsInt16 (const mxArray *ptr); -extern int mxIsInt32 (const mxArray *ptr); -extern int mxIsInt64 (const mxArray *ptr); -extern int mxIsInt8 (const mxArray *ptr); -extern int mxIsLogical (const mxArray *ptr); -extern int mxIsNumeric (const mxArray *ptr); -extern int mxIsSingle (const mxArray *ptr); -extern int mxIsSparse (const mxArray *ptr); -extern int mxIsStruct (const mxArray *ptr); -extern int mxIsUint16 (const mxArray *ptr); -extern int mxIsUint32 (const mxArray *ptr); -extern int mxIsUint64 (const mxArray *ptr); -extern int mxIsUint8 (const mxArray *ptr); +extern OCTINTERP_API int mxIsCell (const mxArray *ptr); +extern OCTINTERP_API int mxIsChar (const mxArray *ptr); +extern OCTINTERP_API int mxIsClass (const mxArray *ptr, const char *name); +extern OCTINTERP_API int mxIsComplex (const mxArray *ptr); +extern OCTINTERP_API int mxIsDouble (const mxArray *ptr); +extern OCTINTERP_API int mxIsInt16 (const mxArray *ptr); +extern OCTINTERP_API int mxIsInt32 (const mxArray *ptr); +extern OCTINTERP_API int mxIsInt64 (const mxArray *ptr); +extern OCTINTERP_API int mxIsInt8 (const mxArray *ptr); +extern OCTINTERP_API int mxIsLogical (const mxArray *ptr); +extern OCTINTERP_API int mxIsNumeric (const mxArray *ptr); +extern OCTINTERP_API int mxIsSingle (const mxArray *ptr); +extern OCTINTERP_API int mxIsSparse (const mxArray *ptr); +extern OCTINTERP_API int mxIsStruct (const mxArray *ptr); +extern OCTINTERP_API int mxIsUint16 (const mxArray *ptr); +extern OCTINTERP_API int mxIsUint32 (const mxArray *ptr); +extern OCTINTERP_API int mxIsUint64 (const mxArray *ptr); +extern OCTINTERP_API int mxIsUint8 (const mxArray *ptr); // Odd type+size predicate. -extern int mxIsLogicalScalar (const mxArray *ptr); +extern OCTINTERP_API int mxIsLogicalScalar (const mxArray *ptr); // Odd type+size+value predicate. -extern int mxIsLogicalScalarTrue (const mxArray *ptr); +extern OCTINTERP_API int mxIsLogicalScalarTrue (const mxArray *ptr); // Size predicate. -extern int mxIsEmpty (const mxArray *ptr); +extern OCTINTERP_API int mxIsEmpty (const mxArray *ptr); // Just plain odd thing to ask of a value. -extern int mxIsFromGlobalWS (const mxArray *ptr); +extern OCTINTERP_API int mxIsFromGlobalWS (const mxArray *ptr); // Dimension extractors. -extern int mxGetM (const mxArray *ptr); -extern int mxGetN (const mxArray *ptr); -extern int *mxGetDimensions (const mxArray *ptr); -extern int mxGetNumberOfDimensions (const mxArray *ptr); -extern int mxGetNumberOfElements (const mxArray *ptr); +extern OCTINTERP_API int mxGetM (const mxArray *ptr); +extern OCTINTERP_API int mxGetN (const mxArray *ptr); +extern OCTINTERP_API int *mxGetDimensions (const mxArray *ptr); +extern OCTINTERP_API int mxGetNumberOfDimensions (const mxArray *ptr); +extern OCTINTERP_API int mxGetNumberOfElements (const mxArray *ptr); // Dimension setters. -extern void mxSetM (mxArray *ptr, int M); -extern void mxSetN (mxArray *ptr, int N); -extern void mxSetDimensions (mxArray *ptr, int *dims, int ndims); +extern OCTINTERP_API void mxSetM (mxArray *ptr, int M); +extern OCTINTERP_API void mxSetN (mxArray *ptr, int N); +extern OCTINTERP_API void mxSetDimensions (mxArray *ptr, int *dims, int ndims); // Data extractors. -extern double *mxGetPi (const mxArray *ptr); -extern double *mxGetPr (const mxArray *ptr); -extern double mxGetScalar (const mxArray *ptr); -extern mxChar *mxGetChars (const mxArray *ptr); -extern mxLogical *mxGetLogicals (const mxArray *ptr); -extern void *mxGetData (const mxArray *ptr); -extern void *mxGetImagData (const mxArray *ptr); +extern OCTINTERP_API double *mxGetPi (const mxArray *ptr); +extern OCTINTERP_API double *mxGetPr (const mxArray *ptr); +extern OCTINTERP_API double mxGetScalar (const mxArray *ptr); +extern OCTINTERP_API mxChar *mxGetChars (const mxArray *ptr); +extern OCTINTERP_API mxLogical *mxGetLogicals (const mxArray *ptr); +extern OCTINTERP_API void *mxGetData (const mxArray *ptr); +extern OCTINTERP_API void *mxGetImagData (const mxArray *ptr); // Data setters. -extern void mxSetPr (mxArray *ptr, double *pr); -extern void mxSetPi (mxArray *ptr, double *pi); -extern void mxSetData (mxArray *ptr, void *data); -extern void mxSetImagData (mxArray *ptr, void *pi); +extern OCTINTERP_API void mxSetPr (mxArray *ptr, double *pr); +extern OCTINTERP_API void mxSetPi (mxArray *ptr, double *pi); +extern OCTINTERP_API void mxSetData (mxArray *ptr, void *data); +extern OCTINTERP_API void mxSetImagData (mxArray *ptr, void *pi); // Classes. -extern mxClassID mxGetClassID (const mxArray *ptr); -extern const char *mxGetClassName (const mxArray *ptr); +extern OCTINTERP_API mxClassID mxGetClassID (const mxArray *ptr); +extern OCTINTERP_API const char *mxGetClassName (const mxArray *ptr); -extern void mxSetClassName (mxArray *ptr, const char *name); +extern OCTINTERP_API void mxSetClassName (mxArray *ptr, const char *name); // Cell support. -extern mxArray *mxGetCell (const mxArray *ptr, int idx); +extern OCTINTERP_API mxArray *mxGetCell (const mxArray *ptr, int idx); -extern void mxSetCell (mxArray *ptr, int idx, mxArray *val); +extern OCTINTERP_API void mxSetCell (mxArray *ptr, int idx, mxArray *val); // Sparse support. -extern int *mxGetIr (const mxArray *ptr); -extern int *mxGetJc (const mxArray *ptr); -extern int mxGetNzmax (const mxArray *ptr); +extern OCTINTERP_API int *mxGetIr (const mxArray *ptr); +extern OCTINTERP_API int *mxGetJc (const mxArray *ptr); +extern OCTINTERP_API int mxGetNzmax (const mxArray *ptr); -extern void mxSetIr (mxArray *ptr, int *ir); -extern void mxSetJc (mxArray *ptr, int *jc); -extern void mxSetNzmax (mxArray *ptr, int nzmax); +extern OCTINTERP_API void mxSetIr (mxArray *ptr, int *ir); +extern OCTINTERP_API void mxSetJc (mxArray *ptr, int *jc); +extern OCTINTERP_API void mxSetNzmax (mxArray *ptr, int nzmax); // Structure support. -extern int mxAddField (mxArray *ptr, const char *key); +extern OCTINTERP_API int mxAddField (mxArray *ptr, const char *key); -extern void mxRemoveField (mxArray *ptr, int key_num); +extern OCTINTERP_API void mxRemoveField (mxArray *ptr, int key_num); -extern mxArray *mxGetField (const mxArray *ptr, int index, const char *key); -extern mxArray *mxGetFieldByNumber (const mxArray *ptr, int index, int key_num); +extern OCTINTERP_API mxArray *mxGetField (const mxArray *ptr, int index, const char *key); +extern OCTINTERP_API mxArray *mxGetFieldByNumber (const mxArray *ptr, int index, int key_num); -extern void mxSetField (mxArray *ptr, int index, const char *key, mxArray *val); -extern void mxSetFieldByNumber (mxArray *ptr, int index, int key_num, mxArray *val); +extern OCTINTERP_API void mxSetField (mxArray *ptr, int index, const char *key, mxArray *val); +extern OCTINTERP_API void mxSetFieldByNumber (mxArray *ptr, int index, int key_num, mxArray *val); -extern int mxGetNumberOfFields (const mxArray *ptr); +extern OCTINTERP_API int mxGetNumberOfFields (const mxArray *ptr); -extern const char *mxGetFieldNameByNumber (const mxArray *ptr, int key_num); -extern int mxGetFieldNumber (const mxArray *ptr, const char *key); +extern OCTINTERP_API const char *mxGetFieldNameByNumber (const mxArray *ptr, int key_num); +extern OCTINTERP_API int mxGetFieldNumber (const mxArray *ptr, const char *key); -extern int mxGetString (const mxArray *ptr, char *buf, int buflen); -extern char *mxArrayToString (const mxArray *ptr); +extern OCTINTERP_API int mxGetString (const mxArray *ptr, char *buf, int buflen); +extern OCTINTERP_API char *mxArrayToString (const mxArray *ptr); // Miscellaneous. #ifdef NDEBUG @@ -257,9 +257,9 @@ #define mxAssertS(expr, msg) #endif -extern int mxCalcSingleSubscript (const mxArray *ptr, int nsubs, int *subs); +extern OCTINTERP_API int mxCalcSingleSubscript (const mxArray *ptr, int nsubs, int *subs); -extern int mxGetElementSize (const mxArray *ptr); +extern OCTINTERP_API int mxGetElementSize (const mxArray *ptr); #if defined (__cplusplus) }
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -33,6 +33,7 @@ class string_vector; class +OCTINTERP_API Octave_map { public:
--- a/src/oct-obj.h +++ b/src/oct-obj.h @@ -33,6 +33,7 @@ #include "ov.h" class +OCTINTERP_API octave_value_list { public:
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -53,6 +53,9 @@ #include "oct-obj.h" #include "utils.h" +#undef OCTAVE_API +#define OCTAVE_API + // Possible values for conv_err: // // 1 : not a real scalar
--- a/src/oct-stream.h +++ b/src/oct-stream.h @@ -39,6 +39,7 @@ #include "mach-info.h" class +OCTINTERP_API scanf_format_elt { public: @@ -97,6 +98,7 @@ }; class +OCTINTERP_API scanf_format_list { public: @@ -237,6 +239,7 @@ }; class +OCTINTERP_API printf_format_list { public: @@ -317,6 +320,7 @@ // Provide an interface for Octave streams. class +OCTINTERP_API octave_base_stream { friend class octave_stream; @@ -475,6 +479,7 @@ }; class +OCTINTERP_API octave_stream { public: @@ -614,6 +619,7 @@ }; class +OCTINTERP_API octave_stream_list { protected:
--- a/src/octave.h +++ b/src/octave.h @@ -28,7 +28,7 @@ extern "C" { #endif -extern int octave_main (int argc, char **argv, int embedded); +extern OCTINTERP_API int octave_main (int argc, char **argv, int embedded); #ifdef __cplusplus }
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -98,6 +98,7 @@ // octave_value). class +OCTINTERP_API octave_base_value { public:
--- a/src/ov-bool-sparse.cc +++ b/src/ov-bool-sparse.cc @@ -43,7 +43,7 @@ #include "ov-base-sparse.h" #include "ov-base-sparse.cc" -template class octave_base_sparse<SparseBoolMatrix>; +template class OCTINTERP_API octave_base_sparse<SparseBoolMatrix>; DEFINE_OCTAVE_ALLOCATOR (octave_sparse_bool_matrix);
--- a/src/ov-bool-sparse.h +++ b/src/ov-bool-sparse.h @@ -48,6 +48,7 @@ class tree_walker; class +OCTINTERP_API octave_sparse_bool_matrix : public octave_base_sparse<SparseBoolMatrix> { public:
--- a/src/ov-cx-sparse.cc +++ b/src/ov-cx-sparse.cc @@ -42,7 +42,7 @@ #include "ov-bool-sparse.h" -template class octave_base_sparse<SparseComplexMatrix>; +template class OCTINTERP_API octave_base_sparse<SparseComplexMatrix>; DEFINE_OCTAVE_ALLOCATOR (octave_sparse_complex_matrix);
--- a/src/ov-cx-sparse.h +++ b/src/ov-cx-sparse.h @@ -49,6 +49,7 @@ class tree_walker; class +OCTINTERP_API octave_sparse_complex_matrix : public octave_base_sparse<SparseComplexMatrix> { public:
--- a/src/ov-fcn.h +++ b/src/ov-fcn.h @@ -39,6 +39,7 @@ // Functions. class +OCTINTERP_API octave_function : public octave_base_value { public:
--- a/src/ov-re-sparse.cc +++ b/src/ov-re-sparse.cc @@ -42,7 +42,7 @@ #include "ov-bool-sparse.h" -template class octave_base_sparse<SparseMatrix>; +template class OCTINTERP_API octave_base_sparse<SparseMatrix>; DEFINE_OCTAVE_ALLOCATOR (octave_sparse_matrix);
--- a/src/ov-re-sparse.h +++ b/src/ov-re-sparse.h @@ -50,6 +50,7 @@ class tree_walker; class +OCTINTERP_API octave_sparse_matrix : public octave_base_sparse<SparseMatrix> { public:
--- a/src/ov-str-mat.h +++ b/src/ov-str-mat.h @@ -47,6 +47,7 @@ // strings. class +OCTINTERP_API octave_char_matrix_str : public octave_char_matrix { public:
--- a/src/ov-typeinfo.cc +++ b/src/ov-typeinfo.cc @@ -43,6 +43,9 @@ #include <Array.cc> +#undef OCTAVE_API +#define OCTAVE_API + INSTANTIATE_ARRAY (octave_value_typeinfo::unary_op_fcn); template class Array2<octave_value_typeinfo::unary_op_fcn>;
--- a/src/ov-typeinfo.h +++ b/src/ov-typeinfo.h @@ -35,6 +35,7 @@ class string_vector; class +OCTINTERP_API octave_value_typeinfo { public:
--- a/src/ov.h +++ b/src/ov.h @@ -63,6 +63,7 @@ class octave_value; class +OCTINTERP_API octave_value { public: @@ -755,7 +756,7 @@ // Unary and binary operations. - friend octave_value do_unary_op (unary_op op, + friend OCTINTERP_API octave_value do_unary_op (unary_op op, const octave_value& a); const octave_value& do_non_const_unary_op (unary_op op); @@ -765,11 +766,11 @@ octave_value do_non_const_unary_op (unary_op op, const std::string& type, const std::list<octave_value_list>& idx); - friend octave_value do_binary_op (binary_op op, + friend OCTINTERP_API octave_value do_binary_op (binary_op op, const octave_value& a, const octave_value& b); - friend octave_value do_cat_op (const octave_value& a, + friend OCTINTERP_API octave_value do_cat_op (const octave_value& a, const octave_value& b, const Array<int>& ra_idx); @@ -832,10 +833,10 @@ // Publish externally used friend functions. -extern octave_value +extern OCTINTERP_API octave_value do_unary_op (octave_value::unary_op op, const octave_value& a); -extern octave_value +extern OCTINTERP_API octave_value do_binary_op (octave_value::binary_op op, const octave_value& a, const octave_value& b); @@ -912,7 +913,7 @@ OV_BINOP_FN (op_struct_ref) -extern void install_types (void); +extern OCTINTERP_API void install_types (void); // FIXME -- these trait classes probably belong somehwere else...
--- a/src/pager.h +++ b/src/pager.h @@ -33,6 +33,7 @@ #endif class +OCTINTERP_API octave_pager_buf : public std::stringbuf { public: @@ -53,6 +54,7 @@ }; class +OCTINTERP_API octave_pager_stream : public std::ostream { protected: @@ -83,6 +85,7 @@ }; class +OCTINTERP_API octave_diary_buf : public std::stringbuf { public: @@ -95,6 +98,7 @@ }; class +OCTINTERP_API octave_diary_stream : public std::ostream { protected: @@ -124,7 +128,7 @@ #define octave_diary (octave_diary_stream::stream ()) -extern void flush_octave_stdout (void); +extern OCTINTERP_API void flush_octave_stdout (void); #endif
--- a/src/parse.h +++ b/src/parse.h @@ -82,53 +82,53 @@ // Keep a count of how many END tokens we expect. extern int end_tokens_expected; -extern void +extern OCTINTERP_API void parse_and_execute (FILE *f); -extern void +extern OCTINTERP_API void parse_and_execute (const std::string& s, bool verbose = false, const char *warn_for = 0); -extern std::string +extern OCTINTERP_API std::string get_help_from_file (const std::string& nm, bool& symbol_found, std::string& file); -extern std::string +extern OCTINTERP_API std::string get_help_from_file (const std::string& nm, bool& symbol_found); -extern std::string lookup_autoload (const std::string& nm); +extern OCTINTERP_API std::string lookup_autoload (const std::string& nm); -extern string_vector autoloaded_functions (void); +extern OCTINTERP_API string_vector autoloaded_functions (void); -extern string_vector reverse_lookup_autoload (const std::string& nm); +extern OCTINTERP_API string_vector reverse_lookup_autoload (const std::string& nm); -extern bool +extern OCTINTERP_API bool load_fcn_from_file (const std::string& nm, bool exec_script); -extern bool +extern OCTINTERP_API bool load_fcn_from_file (symbol_record *sym_rec, bool exec_script); -extern void +extern OCTINTERP_API void source_file (const std::string& file_name, const std::string& context = std::string ()); -extern octave_value_list +extern OCTINTERP_API octave_value_list feval (const std::string& name, const octave_value_list& args = octave_value_list (), int nargout = 0); -extern octave_value_list +extern OCTINTERP_API octave_value_list feval (octave_function *fcn, const octave_value_list& args = octave_value_list (), int nargout = 0); -extern octave_value_list +extern OCTINTERP_API octave_value_list feval (const octave_value_list& args, int nargout = 0); -extern octave_value_list +extern OCTINTERP_API octave_value_list eval_string (const std::string&, bool silent, int& parse_status, int hargout); -extern octave_value +extern OCTINTERP_API octave_value eval_string (const std::string&, bool silent, int& parse_status); #endif
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -2467,35 +2467,35 @@ template void pr_int (std::ostream&, const octave_uint64&, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_int8>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_int16>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_int32>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_int64>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_uint8>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_uint16>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_uint32>&, bool, int); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const intNDArray<octave_uint64>&, bool, int); @@ -2518,28 +2518,28 @@ // FIXME -- this is not the right spot for this... -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_int8&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_int16&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_int32&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_int64&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_uint8&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_uint16&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_uint32&, bool); -template void +template OCTINTERP_API void octave_print_internal (std::ostream&, const octave_uint64&, bool); extern void
--- a/src/pr-output.h +++ b/src/pr-output.h @@ -43,67 +43,67 @@ #include "intNDArray.h" #include "oct-inttypes.h" -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, double d, bool pr_as_read_syntax = false); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Matrix& m, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const NDArray& nda, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Complex& c, bool pr_as_read_syntax = false); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ComplexMatrix& cm, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ComplexNDArray& nda, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Range& r, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const boolMatrix& m, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const boolNDArray& m, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const charMatrix& chm, bool pr_as_read_syntax = false, int extra_indent = 0, bool pr_as_string = false); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const charNDArray& nda, bool pr_as_read_syntax = false, int extra_indent = 0, bool pr_as_string = false); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const std::string& s, bool pr_as_read_syntax = false, int extra_indent = 0); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const ArrayN<std::string>& sa, bool pr_as_read_syntax = false, int extra_indent = 0); @@ -119,7 +119,7 @@ octave_print_internal (std::ostream& os, const octave_int<T>& sa, bool pr_as_read_syntax = false); -extern void +extern OCTINTERP_API void octave_print_internal (std::ostream& os, const Cell& cell, bool pr_as_read_syntax = false, int extra_indent = 0,
--- a/src/procstream.h +++ b/src/procstream.h @@ -34,6 +34,7 @@ #include "oct-procbuf.h" class +OCTINTERP_API procstreambase : virtual public std::ios { public: @@ -69,6 +70,7 @@ }; class +OCTINTERP_API iprocstream : public std::istream, public procstreambase // iprocstream : public procstreambase, public std::istream { @@ -98,6 +100,7 @@ }; class +OCTINTERP_API oprocstream : public std::ostream, public procstreambase // oprocstream : public procstreambase, public std::ostream { @@ -127,6 +130,7 @@ }; class +OCTINTERP_API procstream : public std::iostream, public procstreambase // procstream : public procstreambase, public std::iostream {
--- a/src/sighandlers.h +++ b/src/sighandlers.h @@ -97,18 +97,18 @@ // TRUE means we can be interrupted. extern bool can_interrupt; -extern sig_handler *octave_set_signal_handler (int, sig_handler *, +extern OCTINTERP_API sig_handler *octave_set_signal_handler (int, sig_handler *, bool restart_syscalls = true); -extern void install_signal_handlers (void); +extern OCTINTERP_API void install_signal_handlers (void); -extern void octave_signal_handler (void); +extern OCTINTERP_API void octave_signal_handler (void); -extern octave_interrupt_handler octave_catch_interrupts (void); +extern OCTINTERP_API octave_interrupt_handler octave_catch_interrupts (void); -extern octave_interrupt_handler octave_ignore_interrupts (void); +extern OCTINTERP_API octave_interrupt_handler octave_ignore_interrupts (void); -extern octave_interrupt_handler +extern OCTINTERP_API octave_interrupt_handler octave_set_interrupt_handler (const volatile octave_interrupt_handler&, bool restart_syscalls = true); @@ -117,6 +117,7 @@ // Maybe this should be in a separate file? class +OCTINTERP_API octave_child { public: @@ -165,6 +166,7 @@ }; class +OCTINTERP_API octave_child_list { protected:
--- a/src/symtab.h +++ b/src/symtab.h @@ -58,6 +58,7 @@ // Individual records in a symbol table. class +OCTINTERP_API symbol_record { public: @@ -499,6 +500,7 @@ #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE) class +OCTINTERP_API symbol_table { public:
--- a/src/unwind-prot.h +++ b/src/unwind-prot.h @@ -30,6 +30,7 @@ #include <stack> class +OCTINTERP_API unwind_elem { public: @@ -75,6 +76,7 @@ }; class +OCTINTERP_API unwind_protect { public:
--- a/src/utils.h +++ b/src/utils.h @@ -36,74 +36,74 @@ class octave_value_list; class string_vector; -extern bool valid_identifier (const char *s); -extern bool valid_identifier (const std::string& s); +extern OCTINTERP_API bool valid_identifier (const char *s); +extern OCTINTERP_API bool valid_identifier (const std::string& s); -extern int almost_match (const std::string& std, const std::string& s, +extern OCTINTERP_API int almost_match (const std::string& std, const std::string& s, int min_match_len = 1, int case_sens = 1); -extern int +extern OCTINTERP_API int keyword_almost_match (const char * const *std, int *min_len, const std::string& s, int min_toks_to_match, int max_toks); -extern int empty_arg (const char *name, octave_idx_type nr, octave_idx_type nc); +extern OCTINTERP_API int empty_arg (const char *name, octave_idx_type nr, octave_idx_type nc); -extern std::string +extern OCTINTERP_API std::string search_path_for_file (const std::string&, const string_vector&); -extern string_vector +extern OCTINTERP_API string_vector search_path_for_all_files (const std::string&, const string_vector&); -extern std::string file_in_path (const std::string&, const std::string&); -extern std::string fcn_file_in_path (const std::string&); -extern std::string oct_file_in_path (const std::string&); -extern std::string mex_file_in_path (const std::string&); +extern OCTINTERP_API std::string file_in_path (const std::string&, const std::string&); +extern OCTINTERP_API std::string fcn_file_in_path (const std::string&); +extern OCTINTERP_API std::string oct_file_in_path (const std::string&); +extern OCTINTERP_API std::string mex_file_in_path (const std::string&); -extern std::string do_string_escapes (const std::string& s); +extern OCTINTERP_API std::string do_string_escapes (const std::string& s); -extern const char *undo_string_escape (char c); +extern OCTINTERP_API const char *undo_string_escape (char c); -extern std::string undo_string_escapes (const std::string& s); +extern OCTINTERP_API std::string undo_string_escapes (const std::string& s); -extern void +extern OCTINTERP_API void check_dimensions (dim_vector& dim, const char *warnfor); -extern void +extern OCTINTERP_API void get_dimensions (const octave_value& a, const char *warn_for, dim_vector& dim); -extern void +extern OCTINTERP_API void get_dimensions (const octave_value& a, const octave_value& b, const char *warn_for, octave_idx_type& nr, octave_idx_type& nc); -extern void +extern OCTINTERP_API void get_dimensions (const octave_value& a, const char *warn_for, octave_idx_type& nr, octave_idx_type& nc); -extern Matrix identity_matrix (octave_idx_type nr, octave_idx_type nc); +extern OCTINTERP_API Matrix identity_matrix (octave_idx_type nr, octave_idx_type nc); -extern int +extern OCTINTERP_API int octave_format (std::ostream& os, const char *fmt, ...); -extern int +extern OCTINTERP_API int octave_vformat (std::ostream& os, const char *fmt, va_list args); -extern char *octave_vsnprintf (const char *fmt, va_list args); +extern OCTINTERP_API char *octave_vsnprintf (const char *fmt, va_list args); -extern char *octave_snprintf (const char *fmt, ...); +extern OCTINTERP_API char *octave_snprintf (const char *fmt, ...); -extern void octave_sleep (double seconds); +extern OCTINTERP_API void octave_sleep (double seconds); -extern "C" void octave_sleep (unsigned int seconds); +extern "C" OCTINTERP_API void octave_sleep (unsigned int seconds); -extern "C" void octave_usleep (unsigned int useconds); +extern "C" OCTINTERP_API void octave_usleep (unsigned int useconds); -extern "C" int octave_strcasecmp (const char *s1, const char *s2); +extern "C" OCTINTERP_API int octave_strcasecmp (const char *s1, const char *s2); -extern "C" int octave_strncasecmp (const char *s1, const char *s2, size_t n); +extern "C" OCTINTERP_API int octave_strncasecmp (const char *s1, const char *s2, size_t n); -extern "C" int octave_raw_vsnprintf (char *buf, size_t n, const char *fmt, +extern "C" OCTINTERP_API int octave_raw_vsnprintf (char *buf, size_t n, const char *fmt, va_list args); #endif
--- a/src/variables.h +++ b/src/variables.h @@ -45,90 +45,90 @@ #include "ov-builtin.h" #include "symtab.h" -extern bool at_top_level (void); +extern OCTINTERP_API bool at_top_level (void); -extern void initialize_symbol_tables (void); -extern void clear_mex_functions (void); +extern OCTINTERP_API void initialize_symbol_tables (void); +extern OCTINTERP_API void clear_mex_functions (void); -extern bool is_command_name (const std::string&); +extern OCTINTERP_API bool is_command_name (const std::string&); // The next three are here temporarily... -extern bool is_marked_as_rawcommand (const std::string& s); -extern void mark_as_rawcommand (const std::string& s); -extern void unmark_rawcommand (const std::string& s); +extern OCTINTERP_API bool is_marked_as_rawcommand (const std::string& s); +extern OCTINTERP_API void mark_as_rawcommand (const std::string& s); +extern OCTINTERP_API void unmark_rawcommand (const std::string& s); -extern bool is_rawcommand_name (const std::string&); -extern bool is_mapper_function_name (const std::string&); -extern bool is_builtin_function_name (const std::string&); -extern bool is_globally_visible (const std::string&); +extern OCTINTERP_API bool is_rawcommand_name (const std::string&); +extern OCTINTERP_API bool is_mapper_function_name (const std::string&); +extern OCTINTERP_API bool is_builtin_function_name (const std::string&); +extern OCTINTERP_API bool is_globally_visible (const std::string&); -extern octave_function * +extern OCTINTERP_API octave_function * is_valid_function (const octave_value&, const std::string& = std::string (), bool warn = false); -extern octave_function * +extern OCTINTERP_API octave_function * is_valid_function (const std::string&, const std::string& = std::string (), bool warn = false); -extern octave_function * +extern OCTINTERP_API octave_function * extract_function (const octave_value& arg, const std::string& warn_for, const std::string& fname, const std::string& header, const std::string& trailer); -extern string_vector +extern OCTINTERP_API string_vector get_struct_elts (const std::string& text); -extern string_vector +extern OCTINTERP_API string_vector generate_struct_completions (const std::string& text, std::string& prefix, std::string& hint); -extern bool +extern OCTINTERP_API bool looks_like_struct (const std::string& text); -extern int +extern OCTINTERP_API int symbol_exist (const std::string& name, const std::string& type = "any"); -extern std::string +extern OCTINTERP_API std::string unique_symbol_name (const std::string& basename); -extern bool +extern OCTINTERP_API bool fcn_out_of_date (octave_function *fcn, const std::string& ff, time_t tp); -extern bool lookup (symbol_record *s, bool exec_script = true); +extern OCTINTERP_API bool lookup (symbol_record *s, bool exec_script = true); -extern symbol_record * +extern OCTINTERP_API symbol_record * lookup_by_name (const std::string& nm, bool exec_script = true); -extern octave_value lookup_function (const std::string& nm); +extern OCTINTERP_API octave_value lookup_function (const std::string& nm); -extern octave_value lookup_user_function (const std::string& nm); +extern OCTINTERP_API octave_value lookup_user_function (const std::string& nm); -extern octave_value lookup_function_handle (const std::string& nm); +extern OCTINTERP_API octave_value lookup_function_handle (const std::string& nm); -extern octave_value +extern OCTINTERP_API octave_value get_global_value (const std::string& nm, bool silent = false); -extern void set_global_value (const std::string& nm, const octave_value& val); +extern OCTINTERP_API void set_global_value (const std::string& nm, const octave_value& val); -extern octave_value +extern OCTINTERP_API octave_value set_internal_variable (bool& var, const octave_value_list& args, int nargout, const char *nm); -extern octave_value +extern OCTINTERP_API octave_value set_internal_variable (char& var, const octave_value_list& args, int nargout, const char *nm); -extern octave_value +extern OCTINTERP_API octave_value set_internal_variable (int& var, const octave_value_list& args, int nargout, const char *nm, int minval = INT_MIN, int maxval = INT_MAX); -extern octave_value +extern OCTINTERP_API octave_value set_internal_variable (double& var, const octave_value_list& args, int nargout, const char *nm, double minval = DBL_MIN, double maxval = DBL_MAX); -extern octave_value +extern OCTINTERP_API octave_value set_internal_variable (std::string& var, const octave_value_list& args, int nargout, const char *nm, bool empty_ok = true); @@ -141,42 +141,42 @@ #define SET_INTERNAL_VARIABLE_WITH_LIMITS(NM, MINVAL, MAXVAL) \ set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL) -extern std::string builtin_string_variable (const std::string&); -extern int builtin_real_scalar_variable (const std::string&, double&); -extern octave_value builtin_any_variable (const std::string&); +extern OCTINTERP_API std::string builtin_string_variable (const std::string&); +extern OCTINTERP_API int builtin_real_scalar_variable (const std::string&, double&); +extern OCTINTERP_API octave_value builtin_any_variable (const std::string&); -extern void link_to_global_variable (symbol_record *sr); -extern void link_to_builtin_or_function (symbol_record *sr); +extern OCTINTERP_API void link_to_global_variable (symbol_record *sr); +extern OCTINTERP_API void link_to_builtin_or_function (symbol_record *sr); -extern void force_link_to_function (const std::string&); +extern OCTINTERP_API void force_link_to_function (const std::string&); -extern void bind_ans (const octave_value& val, bool print); +extern OCTINTERP_API void bind_ans (const octave_value& val, bool print); -extern void +extern OCTINTERP_API void bind_internal_variable (const std::string& fname, const octave_value& val); -extern void mlock (const std::string&); -extern void munlock (const std::string&); -extern bool mislocked (const std::string&); +extern OCTINTERP_API void mlock (const std::string&); +extern OCTINTERP_API void munlock (const std::string&); +extern OCTINTERP_API bool mislocked (const std::string&); -extern bool clear_function (const std::string& nm); -extern bool clear_variable (const std::string& nm); -extern bool clear_symbol (const std::string& nm); +extern OCTINTERP_API bool clear_function (const std::string& nm); +extern OCTINTERP_API bool clear_variable (const std::string& nm); +extern OCTINTERP_API bool clear_symbol (const std::string& nm); // Symbol table for symbols at the top level. -extern symbol_table *top_level_sym_tab; +extern OCTINTERP_API symbol_table *top_level_sym_tab; // Symbol table for the current scope. -extern symbol_table *curr_sym_tab; +extern OCTINTERP_API symbol_table *curr_sym_tab; // Symbol table for the current caller scope. -extern symbol_table *curr_caller_sym_tab; +extern OCTINTERP_API symbol_table *curr_caller_sym_tab; // Symbol table for global symbols. -extern symbol_table *global_sym_tab; +extern OCTINTERP_API symbol_table *global_sym_tab; // Symbol table for functions and built-in symbols. -extern symbol_table *fbi_sym_tab; +extern OCTINTERP_API symbol_table *fbi_sym_tab; #endif