Mercurial > octave
changeset 29229:ed5eacd5c3ed
Set API tags in files in liboctave/system (patch #8919).
Add API tag to (un-defined) functions and member functions in headers.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 29 Dec 2020 17:53:59 +0100 |
parents | 5c14f81e0937 |
children | 6b3faa844395 |
files | liboctave/system/file-ops.h liboctave/system/lo-sysdep.h liboctave/system/lo-sysinfo.h liboctave/system/mach-info.h liboctave/system/oct-time.h |
diffstat | 5 files changed, 77 insertions(+), 76 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/system/file-ops.h Tue Dec 29 17:51:23 2020 +0100 +++ b/liboctave/system/file-ops.h Tue Dec 29 17:53:59 2020 +0100 @@ -48,7 +48,7 @@ // returns a malloc()'ed string which is the expansion, or a NULL // pointer if the expansion fails. - extern tilde_expansion_hook tilde_expansion_preexpansion_hook; + extern OCTAVE_API tilde_expansion_hook tilde_expansion_preexpansion_hook; // If non-null, this contains the address of a function to call if the // standard meaning for expanding a tilde fails. The function is @@ -56,61 +56,63 @@ // malloc()'ed string which is the expansion, or a NULL pointer if // there is no expansion. - extern tilde_expansion_hook tilde_expansion_failure_hook; + extern OCTAVE_API tilde_expansion_hook tilde_expansion_failure_hook; // When non-null, this is a NULL terminated array of strings which are // duplicates for a tilde prefix. Bash uses this to expand '=~' and // ':~'. - extern string_vector tilde_additional_prefixes; + extern OCTAVE_API string_vector tilde_additional_prefixes; // When non-null, this is a NULL terminated array of strings which // match the end of a username, instead of just "/". Bash sets this // to ':' and '=~'. - extern string_vector tilde_additional_suffixes; + extern OCTAVE_API string_vector tilde_additional_suffixes; // Find the start of a tilde expansion in S, and return the index // of the tilde which starts the expansion. Place the length of the // text which identified this tilde starter in LEN, excluding the // tilde itself. - char dev_sep_char (void); + extern OCTAVE_API char dev_sep_char (void); - bool is_dev_sep (char c); + extern OCTAVE_API bool is_dev_sep (char c); - char dir_sep_char (void); + extern OCTAVE_API char dir_sep_char (void); - std::string dir_sep_str (void); + extern OCTAVE_API std::string dir_sep_str (void); - std::string dir_sep_chars (void); + extern OCTAVE_API std::string dir_sep_chars (void); - bool is_dir_sep (char c); + extern OCTAVE_API bool is_dir_sep (char c); // If NAME has a leading ~ or ~user, Unix-style, expand it to the // user's home directory. If no ~, or no <pwd.h>, just return NAME. - std::string tilde_expand (const std::string&); + extern OCTAVE_API std::string tilde_expand (const std::string&); // A vector version of the above. - string_vector tilde_expand (const string_vector&); + extern OCTAVE_API string_vector tilde_expand (const string_vector&); - std::string concat (const std::string&, const std::string&); + extern OCTAVE_API std::string concat (const std::string&, const std::string&); // Return the directory part of a filename or an empty string if // there is no directory component. Does not check to see // whether the file exists or is a directory. - std::string dirname (const std::string& path); + extern OCTAVE_API std::string dirname (const std::string& path); // Return the tail member of a filename. - std::string tail (const std::string& path); + extern OCTAVE_API std::string tail (const std::string& path); - // convert path from UNIX type separators to whatever is the system separators + // Convert path from UNIX type separators to whatever is the + // system separators. - std::string native_separator_path (const std::string& path); + extern OCTAVE_API std::string + native_separator_path (const std::string& path); } extern OCTAVE_API int
--- a/liboctave/system/lo-sysdep.h Tue Dec 29 17:51:23 2020 +0100 +++ b/liboctave/system/lo-sysdep.h Tue Dec 29 17:53:59 2020 +0100 @@ -41,40 +41,45 @@ { namespace sys { - extern int system (const std::string& cmd_str); + extern OCTAVE_API int system (const std::string& cmd_str); - extern std::string getcwd (void); + extern OCTAVE_API std::string getcwd (void); - extern int chdir (const std::string&); + extern OCTAVE_API int chdir (const std::string&); - extern bool get_dirlist (const std::string& dirname, string_vector& dirlist, - std::string& msg); + extern OCTAVE_API bool + get_dirlist (const std::string& dirname, string_vector& dirlist, + std::string& msg); - extern std::FILE * fopen (const std::string& name, const std::string& mode); + extern OCTAVE_API std::FILE * + fopen (const std::string& name, const std::string& mode); - extern std::fstream fstream (const std::string& name, - const std::ios::openmode mode = - std::ios::in | std::ios::out); + extern OCTAVE_API std::fstream + fstream (const std::string& name, + const std::ios::openmode mode = std::ios::in | std::ios::out); - extern std::ifstream ifstream (const std::string& name, - const std::ios::openmode mode = std::ios::in); + extern OCTAVE_API std::ifstream + ifstream (const std::string& name, + const std::ios::openmode mode = std::ios::in); - extern std::ofstream ofstream (const std::string& name, - const std::ios::openmode mode = std::ios::out); + extern OCTAVE_API std::ofstream + ofstream (const std::string& name, + const std::ios::openmode mode = std::ios::out); - extern void putenv_wrapper (const std::string& name, - const std::string& value); + extern OCTAVE_API void + putenv_wrapper (const std::string& name, const std::string& value); - extern std::string getenv_wrapper (const std::string&); + extern OCTAVE_API std::string getenv_wrapper (const std::string&); - extern int unsetenv_wrapper (const std::string&); + extern OCTAVE_API int unsetenv_wrapper (const std::string&); + + extern OCTAVE_API std::wstring u8_to_wstring (const std::string&); - extern std::wstring u8_to_wstring (const std::string&); + extern OCTAVE_API std::string u8_from_wstring (const std::wstring&); - extern std::string u8_from_wstring (const std::wstring&); - - extern std::string get_ASCII_filename (const std::string& long_file_name, - const bool allow_locale = false); + extern OCTAVE_API std::string + get_ASCII_filename (const std::string& long_file_name, + const bool allow_locale = false); } }
--- a/liboctave/system/lo-sysinfo.h Tue Dec 29 17:51:23 2020 +0100 +++ b/liboctave/system/lo-sysinfo.h Tue Dec 29 17:53:59 2020 +0100 @@ -34,9 +34,9 @@ { namespace sys { - extern std::string blas_version (void); + extern OCTAVE_API std::string blas_version (void); - extern std::string lapack_version (void); + extern OCTAVE_API std::string lapack_version (void); } }
--- a/liboctave/system/mach-info.h Tue Dec 29 17:51:23 2020 +0100 +++ b/liboctave/system/mach-info.h Tue Dec 29 17:53:59 2020 +0100 @@ -44,15 +44,15 @@ flt_fmt_ieee_big_endian = 2, }; - float_format native_float_format (void); + OCTAVE_API float_format native_float_format (void); - bool words_big_endian (void); + OCTAVE_API bool words_big_endian (void); - bool words_little_endian (void); + OCTAVE_API bool words_little_endian (void); - float_format string_to_float_format (const std::string&); + OCTAVE_API float_format string_to_float_format (const std::string&); - std::string float_format_as_string (float_format); + OCTAVE_API std::string float_format_as_string (float_format); } }
--- a/liboctave/system/oct-time.h Tue Dec 29 17:51:23 2020 +0100 +++ b/liboctave/system/oct-time.h Tue Dec 29 17:53:59 2020 +0100 @@ -50,7 +50,6 @@ class base_tm; class - OCTAVE_API time { public: @@ -83,9 +82,9 @@ ot_unix_time += extra; } - time (double d); + OCTAVE_API time (double d); - time (const base_tm& tm); + OCTAVE_API time (const base_tm& tm); time (const time& ot) : ot_unix_time (ot.ot_unix_time), ot_usec (ot.ot_usec) { } @@ -103,7 +102,7 @@ ~time (void) = default; - void stamp (void); + OCTAVE_API void stamp (void); double double_value (void) const { @@ -114,9 +113,9 @@ long usec (void) const { return ot_usec; } - std::string ctime (void) const; + OCTAVE_API std::string ctime (void) const; - friend std::ostream& operator << (std::ostream& os, const time& ot); + friend OCTAVE_API std::ostream& operator << (std::ostream& os, const time& ot); private: @@ -185,7 +184,6 @@ } class - OCTAVE_API base_tm { public: @@ -239,20 +237,20 @@ long gmtoff (void) const { return m_gmtoff; } std::string zone (void) const { return m_zone; } - base_tm& usec (int v); - base_tm& sec (int v); - base_tm& min (int v); - base_tm& hour (int v); - base_tm& mday (int v); - base_tm& mon (int v); - base_tm& year (int v); - base_tm& wday (int v); - base_tm& yday (int v); - base_tm& isdst (int v); - base_tm& gmtoff (long v); - base_tm& zone (const std::string& s); + OCTAVE_API base_tm& usec (int v); + OCTAVE_API base_tm& sec (int v); + OCTAVE_API base_tm& min (int v); + OCTAVE_API base_tm& hour (int v); + OCTAVE_API base_tm& mday (int v); + OCTAVE_API base_tm& mon (int v); + OCTAVE_API base_tm& year (int v); + OCTAVE_API base_tm& wday (int v); + OCTAVE_API base_tm& yday (int v); + OCTAVE_API base_tm& isdst (int v); + OCTAVE_API base_tm& gmtoff (long v); + OCTAVE_API base_tm& zone (const std::string& s); - std::string strftime (const std::string& fmt) const; + OCTAVE_API std::string strftime (const std::string& fmt) const; std::string asctime (void) const { return strftime ("%a %b %d %H:%M:%S %Y\n"); } @@ -295,11 +293,10 @@ // Time zone. std::string m_zone; - void init (void *p); + OCTAVE_API void init (void *p); }; class - OCTAVE_API localtime : public base_tm { public: @@ -323,11 +320,10 @@ private: - void init (const time& ot); + OCTAVE_API void init (const time& ot); }; class - OCTAVE_API gmtime : public base_tm { public: @@ -348,11 +344,10 @@ private: - void init (const time& ot); + OCTAVE_API void init (const time& ot); }; class - OCTAVE_API strptime : public base_tm { public: @@ -381,11 +376,10 @@ int nchars; - void init (const std::string& str, const std::string& fmt); + OCTAVE_API void init (const std::string& str, const std::string& fmt); }; class - OCTAVE_API cpu_time { public: @@ -416,7 +410,7 @@ return *this; } - void stamp (void); + OCTAVE_API void stamp (void); double user (void) const { @@ -498,7 +492,7 @@ return *this; } - void stamp (void); + OCTAVE_API void stamp (void); cpu_time cpu (void) const { return m_cpu; }