Mercurial > octave-libgccjit
comparison src/dirfns.cc @ 9942:314d2234b660
return logical result from fnmatch
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 08 Dec 2009 12:57:01 +0100 |
parents | f9ac007bb926 |
children | cd96d29c5efa |
comparison
equal
deleted
inserted
replaced
9941:1369f13ae6b2 | 9942:314d2234b660 |
---|---|
614 gripe_wrong_type_arg ("fnmatch", args(0)); | 614 gripe_wrong_type_arg ("fnmatch", args(0)); |
615 else | 615 else |
616 { | 616 { |
617 glob_match pattern (file_ops::tilde_expand (pat)); | 617 glob_match pattern (file_ops::tilde_expand (pat)); |
618 | 618 |
619 Array<bool> tmp = pattern.match (str); | 619 retval = pattern.match (str); |
620 | |
621 octave_idx_type n = tmp.length (); | |
622 | |
623 ColumnVector result (n); | |
624 | |
625 for (octave_idx_type i = 0; i < n; i++) | |
626 result(i) = tmp(i); | |
627 | |
628 retval = result; | |
629 } | 620 } |
630 } | 621 } |
631 else | 622 else |
632 print_usage (); | 623 print_usage (); |
633 | 624 |