| 823 | |
| 824 | |
| 825 | LIST * glob1( OBJECT * dirname, OBJECT * pattern ) |
| 826 | { |
| 827 | LIST * const plist = list_new( object_copy( pattern ) ); |
| 828 | struct globbing globbing; |
| 829 | |
| 830 | globbing.results = L0; |
| 831 | globbing.patterns = plist; |
| 832 | |
| 833 | globbing.case_insensitive |
| 834 | # if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) |
| 835 | = plist; /* always case-insensitive if any files can be found */ |
| 836 | # else |
| 837 | = L0; |
| 838 | # endif |
| 839 | |
| 840 | if ( globbing.case_insensitive ) |
| 841 | globbing.patterns = downcase_list( plist ); |
| 842 | |
| 843 | file_dirscan( dirname, builtin_glob_back, &globbing ); |
| 844 | |
| 845 | if ( globbing.case_insensitive ) |
| 846 | list_free( globbing.patterns ); |
| 847 | |
| 848 | list_free( plist ); |
| 849 | |
| 850 | return globbing.results; |
| 851 | } |
| 852 | |
| 853 | |
| 854 | LIST * glob_recursive( char const * pattern ) |
no test coverage detected