Mercurial > hg > octave-lojdl
changeset 1104:3535aa4d38c6
[project @ 1995-02-14 22:12:34 by jwe]
author | jwe |
---|---|
date | Tue, 14 Feb 1995 22:20:16 +0000 |
parents | a6f341c1b47c |
children | 05611efd5bfe |
files | acconfig.h configure.in src/octave.cc src/utils.cc src/variables.cc |
diffstat | 5 files changed, 22 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/acconfig.h +++ b/acconfig.h @@ -55,6 +55,14 @@ /* Define if this is Octave. */ #undef OCTAVE_SOURCE +/* Define this to be the path separator for your system, as a + character constant */ +#undef SEPCHAR + +/* Define this to be the path separator for your system, as a + character string */ +#undef SEPCHAR_STR + /* Define if you don't have QPSOL. */ #undef QPSOL_MISSING
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### along with Octave; see the file COPYING. If not, write to the Free ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -AC_REVISION($Revision: 1.91 $) +AC_REVISION($Revision: 1.92 $) AC_PREREQ(2.0) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h kpathsea/c-auto.h) @@ -122,6 +122,11 @@ AC_SUBST(imagedir) AC_SUBST(imagepath) +### Path separator. + +AC_DEFINE(SEPCHAR, [':']) +AC_DEFINE(SEPCHAR_STR, [":"]) + ### Do special stuff if using dld. DLD_DIR=
--- a/src/octave.cc +++ b/src/octave.cc @@ -225,12 +225,14 @@ { len += strlen (shell_path) + 1; putenv_cmd = new char [len]; - sprintf (putenv_cmd, "PATH=%s:%s:%s", shell_path, arch_dir, bin_dir); + sprintf (putenv_cmd, + "PATH=%s" SEPCHAR_STR "%s" SEPCHAR_STR "%s", + shell_path, arch_dir, bin_dir); } else { putenv_cmd = new char [len]; - sprintf (putenv_cmd, "PATH=%s:%s", arch_dir, bin_dir); + sprintf (putenv_cmd, "PATH=%s" SEPCHAR_STR "%s", arch_dir, bin_dir); } putenv (putenv_cmd);
--- a/src/utils.cc +++ b/src/utils.cc @@ -234,7 +234,7 @@ char *ptr = tmp_path; while (*ptr != '\0') { - if (*ptr == ':') + if (*ptr == SEPCHAR) nelem++; ptr++; } @@ -252,7 +252,7 @@ char *ptr = tmp_path; while (i < nelem) { - char *end = strchr (ptr, ':'); + char *end = strchr (ptr, SEPCHAR); if (end) *end = '\0'; char *result = tilde_expand (ptr);
--- a/src/variables.cc +++ b/src/variables.cc @@ -407,7 +407,7 @@ { pathstring = strsave (oct_path); - if (pathstring[0] == ':') + if (pathstring[0] == SEPCHAR) { char *tmp = pathstring; pathstring = strconcat (std_path, pathstring); @@ -415,7 +415,7 @@ } int tmp_len = strlen (pathstring); - if (pathstring[tmp_len-1] == ':') + if (pathstring[tmp_len-1] == SEPCHAR) { char *tmp = pathstring; pathstring = strconcat (pathstring, std_path);