| 803 | |
| 804 | |
| 805 | LIST * glob1( OBJECT * dirname, OBJECT * pattern ) |
| 806 | { |
| 807 | LIST * const plist = list_new( object_copy( pattern ) ); |
| 808 | struct globbing globbing; |
| 809 | |
| 810 | globbing.results = L0; |
| 811 | globbing.patterns = plist; |
| 812 | |
| 813 | globbing.case_insensitive |
| 814 | # if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) |
| 815 | = plist; /* always case-insensitive if any files can be found */ |
| 816 | # else |
| 817 | = L0; |
| 818 | # endif |
| 819 | |
| 820 | if ( globbing.case_insensitive ) |
| 821 | globbing.patterns = downcase_list( plist ); |
| 822 | |
| 823 | file_dirscan( dirname, builtin_glob_back, &globbing ); |
| 824 | |
| 825 | if ( globbing.case_insensitive ) |
| 826 | list_free( globbing.patterns ); |
| 827 | |
| 828 | list_free( plist ); |
| 829 | |
| 830 | return globbing.results; |
| 831 | } |
| 832 | |
| 833 | |
| 834 | LIST * glob_recursive( char const * pattern ) |
no test coverage detected