23 #if ! defined (octave_shared_fcns_h)
24 #define octave_shared_fcns_h 1
26 #if defined (OCTAVE_USE_WINDOWS_API)
31 #if defined (_MSC_VER)
33 # define pclose _pclose
37 w32_get_octave_home (
void)
43 char namebuf[MAX_PATH+1];
44 if (GetModuleFileName (GetModuleHandle (NULL), namebuf, MAX_PATH))
46 namebuf[MAX_PATH] =
'\0';
49 size_t pos = exe_name.rfind (
"\\");
51 if (pos != std::string::npos)
52 bin_dir = exe_name.substr (0, pos + 1);
55 if (! bin_dir.empty ())
57 size_t pos = bin_dir.rfind (
"\\bin\\");
59 if (pos != std::string::npos)
60 retval = bin_dir.substr (0, pos);
71 #if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
72 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
75 static const char dir_sep_char =
'/';
81 char *
value = ::getenv (name.c_str ());
83 return value ? value :
"";
91 #if defined (OCTAVE_USE_WINDOWS_API)
93 oh = w32_get_octave_home ();
110 if (octave_home != prefix)
112 size_t len = prefix.length ();
114 if (s.substr (0, len) == prefix)
115 retval.replace (0, len, octave_home);
118 if (dir_sep_char !=
'/')
static std::string get_octave_home(void)
static std::string subst_octave_home(const std::string &s)
static void replace(QString &text, const QRegExp &re, const QString &after)
static const char dir_sep_char
static std::string octave_getenv(const std::string &name)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string