annotate liboctave/util/oct-glob.h @ 21726:f05a00e611ff

use namespace for glob and fnmatch wrapper functions * oct-glob.h, oct-glob.cc: Put fnmatch and glob in octave::sys namespace. (octave_fnmatch, octave_glob): Now deprecated aliases for functions in octave::sys namespace. * glob-match.cc: Use new names. * oct-conf-post.in.h, mk-octave-config-h.sh: Define OCTAVE_USE_DEPRECATED_FUNCTIONS.
author John W. Eaton <jwe@octave.org>
date Wed, 18 May 2016 15:17:00 -0400
parents 1473547f50f5
children 11af9c03400c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 /*
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 17822
diff changeset
3 Copyright (C) 2010-2015 John W. Eaton
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 This file is part of Octave.
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 option) any later version.
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 for more details.
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, see
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>.
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 */
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
23 #if ! defined (octave_oct_glob_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17744
diff changeset
24 #define octave_oct_glob_h 1
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
26 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
27
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 #include "str-vec.h"
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29
21726
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
30 namespace
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
31 octave
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
32 {
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
33 namespace
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
34 sys
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
35 {
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
36 extern bool
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
37 fnmatch (const string_vector& pat, const std::string& str,
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
38 int fnmatch_flags);
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39
21726
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
40 extern string_vector
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
41 glob (const string_vector&);
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
42 }
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
43 }
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
44
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
45 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
46
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
47 OCTAVE_DEPRECATED ("use octave::sys::fnmatch instead")
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
48 const auto octave_fnmatch = octave::sys::fnmatch;
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
49
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
50 OCTAVE_DEPRECATED ("use octave::sys::glob instead")
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
51 const auto octave_glob = octave::sys::glob;
10138
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52
805a83ecd3da avoid conflict between glob.h definition of glob and glob_match::glob function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 #endif
21726
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
54
f05a00e611ff use namespace for glob and fnmatch wrapper functions
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
55 #endif