annotate liboctave/util/pathsearch.cc @ 21745:bf1121302404

use namespace for dir_path class * pathsearch.h, pathsearch.cc: Put dir_path class in octave namespace and rename to directory_path. Change all uses.
author John W. Eaton <jwe@octave.org>
date Thu, 19 May 2016 13:59:28 -0400
parents 6a1eded90355
children 0cdfd6d230e6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
1 /*
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 17769
diff changeset
3 Copyright (C) 1996-2015 John W. Eaton
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
4
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
6
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5777
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5777
diff changeset
10 option) any later version.
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
11
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
15 for more details.
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
16
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5777
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5777
diff changeset
19 <http://www.gnu.org/licenses/>.
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
20
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
21 */
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
22
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21301
diff changeset
23 #if defined (HAVE_CONFIG_H)
21301
40de9f8f23a6 Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents: 21202
diff changeset
24 # include "config.h"
2021
aa68db31dc34 [project @ 1996-03-23 05:53:57 by jwe]
jwe
parents: 2006
diff changeset
25 #endif
aa68db31dc34 [project @ 1996-03-23 05:53:57 by jwe]
jwe
parents: 2006
diff changeset
26
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
27 #include <cstdlib>
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
28
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
29 #include <string>
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
30
3024
95e8b5c4824a [project @ 1997-06-04 05:06:26 by jwe]
jwe
parents: 2847
diff changeset
31 #include "lo-utils.h"
3833
f3278ec3ccb7 [project @ 2001-05-17 12:31:52 by jwe]
jwe
parents: 3505
diff changeset
32 #include "oct-env.h"
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
33 #include "pathsearch.h"
13983
7dd7cccf0757 clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
34 #include "singleton-cleanup.h"
3024
95e8b5c4824a [project @ 1997-06-04 05:06:26 by jwe]
jwe
parents: 2847
diff changeset
35 #include "str-vec.h"
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
36
4399
286a3345aa8e [project @ 2003-05-01 03:00:28 by jwe]
jwe
parents: 4398
diff changeset
37 #include "kpse.cc"
4378
7d48a8fba1d4 [project @ 2003-04-19 00:03:47 by jwe]
jwe
parents: 4242
diff changeset
38
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
39 namespace octave
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
40 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
41 directory_path::static_members *directory_path::static_members::instance = 0;
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
42
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
43 directory_path::static_members::static_members (void)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
44 : xpath_sep_char (SEPCHAR), xpath_sep_str (SEPCHAR_STR) { }
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
45
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
46 bool
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
47 directory_path::static_members::instance_ok (void)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
48 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
49 bool retval = true;
5777
246b1fc1e628 [project @ 2006-04-26 18:16:24 by jwe]
jwe
parents: 5307
diff changeset
50
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
51 if (! instance)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
52 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
53 instance = new static_members ();
13983
7dd7cccf0757 clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
54
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
55 if (instance)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
56 singleton_cleanup_list::add (cleanup_instance);
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
57 }
5777
246b1fc1e628 [project @ 2006-04-26 18:16:24 by jwe]
jwe
parents: 5307
diff changeset
58
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
59 if (! instance)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
60 (*current_liboctave_error_handler)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
61 ("unable to create directory_path::static_members object!");
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
62
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
63 return retval;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
64 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
65
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
66 string_vector
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
67 directory_path::elements (void)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
68 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
69 return initialized ? pv : string_vector ();
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
70 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
71
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
72 string_vector
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
73 directory_path::all_directories (void)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
74 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
75 int count = 0;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
76 string_vector retval;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
77
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
78 if (initialized)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
79 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
80 int len = pv.numel ();
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
81
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
82 int nmax = len > 32 ? len : 32;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
83
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
84 retval.resize (len);
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
85
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
86 for (int i = 0; i < len; i++)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
87 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
88 str_llist_type *elt_dirs = kpse_element_dirs (pv[i]);
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
89
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
90 if (elt_dirs)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
91 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
92 str_llist_elt_type *dir;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
93
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
94 for (dir = *elt_dirs; dir; dir = STR_LLIST_NEXT (*dir))
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
95 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
96 const std::string elt_dir = STR_LLIST (*dir);
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
97
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
98 if (! elt_dir.empty ())
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
99 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
100 if (count == nmax)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
101 nmax *= 2;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
102
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
103 retval.resize (nmax);
3415
48aa44151317 [project @ 2000-01-10 19:27:43 by jwe]
jwe
parents: 3196
diff changeset
104
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
105 retval[count++] = elt_dir;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
106 }
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
107 }
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
108 }
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
109 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
110
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
111 retval.resize (count);
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
112 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
113
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
114 return retval;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
115 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
116
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
117 std::string
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
118 directory_path::find_first (const std::string& nm)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
119 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
120 return initialized ? kpse_path_search (p, nm, true) : "";
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
121 }
4242
4d3994172bd5 [project @ 2002-12-26 22:06:10 by jwe]
jwe
parents: 4126
diff changeset
122
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
123 string_vector
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
124 directory_path::find_all (const std::string& nm)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
125 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
126 return initialized ? kpse_all_path_search (p, nm) : string_vector ();
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
127 }
4242
4d3994172bd5 [project @ 2002-12-26 22:06:10 by jwe]
jwe
parents: 4126
diff changeset
128
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
129 std::string
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
130 directory_path::find_first_of (const string_vector& names)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
131 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
132 return initialized
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
133 ? kpse_path_find_first_of (p, names, true) : "";
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
134 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
135
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
136 string_vector
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
137 directory_path::find_all_first_of (const string_vector& names)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
138 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
139 return initialized
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
140 ? kpse_all_path_find_first_of (p, names) : string_vector ();
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
141 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
142
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
143 void
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
144 directory_path::init (void)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
145 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
146 static bool octave_kpathsea_initialized = false;
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
147
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
148 if (! octave_kpathsea_initialized)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
149 {
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
150 std::string val = octave::sys::env::getenv ("KPATHSEA_DEBUG");
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
151
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
152 if (! val.empty ())
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
153 kpathsea_debug |= atoi (val.c_str ());
3174
390d5e396682 [project @ 1998-05-04 16:36:17 by jwe]
jwe
parents: 3024
diff changeset
154
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
155 octave_kpathsea_initialized = true;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
156 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
157
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
158 p = kpse_path_expand (p_default.empty ()
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
159 ? p_orig : kpse_expand_default (p_orig, p_default));
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3185
diff changeset
160
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
161 int count = 0;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
162 for (kpse_path_iterator pi (p); pi != std::string::npos; pi++)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
163 count++;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
164
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
165 pv.resize (count);
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
166
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
167 kpse_path_iterator pi (p);
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
168
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
169 for (int i = 0; i < count; i++)
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
170 pv[i] = *pi++;
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
171
21745
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
172 initialized = true;
bf1121302404 use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents: 21732
diff changeset
173 }
1786
b9e8c73e154e [project @ 1996-01-24 20:36:22 by jwe]
jwe
parents:
diff changeset
174 }