comparison libinterp/corefcn/dirfns.cc @ 19119:f506de9089e8

Deprecate fnmatch function. * NEWS: Announce deprecation. * scripts/deprecated/fnmatch.m: m-file to replace C++ function and issue deprecated warning. * scripts/deprecated/module.mk: Add fnmatch.m to build system. * dirfns.cc: Rename fnmatch to __fnmatch__ internal version. Switch DEFUNX to DEFUN. * test/system.tst: Remove fnmatch tests
author Rik <rik@octave.org>
date Sat, 20 Sep 2014 21:17:43 -0700
parents 175b392e91fe
children 6ca096827123
comparison
equal deleted inserted replaced
19118:9c5a17d5fc19 19119:f506de9089e8
606 @{\n\ 606 @{\n\
607 [1,1] = file1\n\ 607 [1,1] = file1\n\
608 [2,1] = file2\n\ 608 [2,1] = file2\n\
609 @}\n\ 609 @}\n\
610 @end example\n\ 610 @end example\n\
611 @seealso{ls, dir, readdir, what, fnmatch}\n\ 611 @seealso{ls, dir, readdir, what}\n\
612 @end deftypefn") 612 @end deftypefn")
613 { 613 {
614 octave_value retval; 614 octave_value retval;
615 615
616 if (args.length () == 1) 616 if (args.length () == 1)
662 %! assert (result1, {"file1"; "myfile1"}); 662 %! assert (result1, {"file1"; "myfile1"});
663 %! assert (result2, {"myfile1"}); 663 %! assert (result2, {"myfile1"});
664 %! assert (result3, {"file1"; "file2"}); 664 %! assert (result3, {"file1"; "file2"});
665 */ 665 */
666 666
667 DEFUNX ("fnmatch", Ffnmatch, args, , 667 DEFUN (__fnmatch__, args, ,
668 "-*- texinfo -*-\n\ 668 "-*- texinfo -*-\n\
669 @deftypefn {Built-in Function} {} fnmatch (@var{pattern}, @var{string})\n\ 669 @deftypefn {Built-in Function} {} fnmatch (@var{pattern}, @var{string})\n\
670 Return true or false for each element of @var{string} that matches any of\n\ 670 Return true or false for each element of @var{string} that matches any of\n\
671 the elements of the string array @var{pattern}, using the rules of\n\ 671 the elements of the string array @var{pattern}, using the rules of\n\
672 filename pattern matching. For example:\n\ 672 filename pattern matching. For example:\n\