comparison libinterp/corefcn/defun-int.h @ 22197:e43d83253e28

refill multi-line macro definitions Use the Emacs C++ mode style for line continuation markers in multi-line macro definitions. * make_int.cc, __dsearchn__.cc, __magick_read__.cc, besselj.cc, bitfcns.cc, bsxfun.cc, cellfun.cc, data.cc, defun-dld.h, defun-int.h, defun.h, det.cc, error.h, find.cc, gcd.cc, graphics.cc, interpreter.h, jit-ir.h, jit-typeinfo.h, lookup.cc, ls-mat5.cc, max.cc, mexproto.h, mxarray.in.h, oct-stream.cc, ordschur.cc, pr-output.cc, profiler.h, psi.cc, regexp.cc, sparse-xdiv.cc, sparse-xpow.cc, tril.cc, txt-eng.h, utils.cc, variables.cc, variables.h, xdiv.cc, xpow.cc, __glpk__.cc, ov-base.cc, ov-base.h, ov-cell.cc, ov-ch-mat.cc, ov-classdef.cc, ov-complex.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-int-traits.h, ov-lazy-idx.h, ov-perm.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-type-conv.h, ov.cc, ov.h, op-class.cc, op-int-conv.cc, op-int.h, op-str-str.cc, ops.h, lex.ll, Array.cc, CMatrix.cc, CSparse.cc, MArray.cc, MArray.h, MDiagArray2.cc, MDiagArray2.h, MSparse.h, Sparse.cc, dMatrix.cc, dSparse.cc, fCMatrix.cc, fMatrix.cc, idx-vector.cc, f77-fcn.h, quit.h, bsxfun-decl.h, bsxfun-defs.cc, lo-specfun.cc, oct-convn.cc, oct-convn.h, oct-norm.cc, oct-norm.h, oct-rand.cc, Sparse-op-decls.h, Sparse-op-defs.h, mx-inlines.cc, mx-op-decl.h, mx-op-defs.h, mach-info.cc, oct-group.cc, oct-passwd.cc, oct-syscalls.cc, oct-time.cc, data-conv.cc, kpse.cc, lo-ieee.h, lo-macros.h, oct-cmplx.h, oct-glob.cc, oct-inttypes.cc, oct-inttypes.h, oct-locbuf.h, oct-sparse.h, url-transfer.cc, oct-conf-post.in.h, shared-fcns.h: Refill macro definitions.
author John W. Eaton <jwe@octave.org>
date Mon, 01 Aug 2016 12:40:18 -0400
parents 78000c426b73
children bac0d6f07a3e
comparison
equal deleted inserted replaced
22196:dd992fd74fce 22197:e43d83253e28
78 defun_isargout (int, int); 78 defun_isargout (int, int);
79 79
80 extern OCTINTERP_API void 80 extern OCTINTERP_API void
81 defun_isargout (int, int, bool *); 81 defun_isargout (int, int, bool *);
82 82
83 #define FORWARD_DECLARE_FUNX(name) \ 83 #define FORWARD_DECLARE_FUNX(name) \
84 extern OCTAVE_EXPORT octave_value_list \ 84 extern OCTAVE_EXPORT octave_value_list \
85 name (const octave_value_list&, int) 85 name (const octave_value_list&, int)
86 86
87 #define FORWARD_DECLARE_FUN(name) \ 87 #define FORWARD_DECLARE_FUN(name) \
88 FORWARD_DECLARE_FUNX (F ## name) 88 FORWARD_DECLARE_FUNX (F ## name)
89 89
90 #define DECLARE_FUNX(name, args_name, nargout_name) \ 90 #define DECLARE_FUNX(name, args_name, nargout_name) \
91 OCTAVE_EXPORT octave_value_list \ 91 OCTAVE_EXPORT octave_value_list \
92 name (const octave_value_list& args_name, int nargout_name) 92 name (const octave_value_list& args_name, int nargout_name)
93 93
94 #define DECLARE_FUN(name, args_name, nargout_name) \ 94 #define DECLARE_FUN(name, args_name, nargout_name) \
95 DECLARE_FUNX (F ## name, args_name, nargout_name) 95 DECLARE_FUNX (F ## name, args_name, nargout_name)
96 96
97 // Define the code that will be used to insert the new function into 97 // Define the code that will be used to insert the new function into
98 // the symbol table. We look for this name instead of the actual 98 // the symbol table. We look for this name instead of the actual
99 // function so that we can easily install the doc std::string too. 99 // function so that we can easily install the doc std::string too.
102 102
103 typedef octave_function * 103 typedef octave_function *
104 (*octave_dld_fcn_getter) (const octave::dynamic_library&, bool relative); 104 (*octave_dld_fcn_getter) (const octave::dynamic_library&, bool relative);
105 105
106 #if defined (OCTAVE_SOURCE) 106 #if defined (OCTAVE_SOURCE)
107 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \ 107 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \
108 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, "external-doc") 108 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, "external-doc")
109 #else 109 #else
110 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \ 110 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \
111 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc) 111 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
112 #endif 112 #endif
113 113
114 #define DEFINE_FUNX_INSTALLER_FUN(name, fname, gname, doc) \ 114 #define DEFINE_FUNX_INSTALLER_FUN(name, fname, gname, doc) \
115 extern "C" \ 115 extern "C" \
116 OCTAVE_EXPORT \ 116 OCTAVE_EXPORT \
117 octave_function * \ 117 octave_function * \
118 gname (const octave::dynamic_library& shl, bool relative) \ 118 gname (const octave::dynamic_library& shl, bool relative) \
119 { \ 119 { \
120 check_version (OCTAVE_API_VERSION, name); \ 120 check_version (OCTAVE_API_VERSION, name); \
121 \ 121 \
122 octave_dld_function *fcn = octave_dld_function::create (fname, shl, name, doc); \ 122 octave_dld_function *fcn \
123 \ 123 = octave_dld_function::create (fname, shl, name, doc); \
124 if (relative) \ 124 \
125 fcn->mark_relative (); \ 125 if (relative) \
126 \ 126 fcn->mark_relative (); \
127 return fcn; \ 127 \
128 return fcn; \
128 } 129 }
129 130
130 #endif 131 #endif