| 760 | |
| 761 | |
| 762 | LIST * glob1( OBJECT * dirname, OBJECT * pattern ) |
| 763 | { |
| 764 | LIST * const plist = list_new( object_copy( pattern ) ); |
| 765 | struct globbing globbing; |
| 766 | |
| 767 | globbing.results = L0; |
| 768 | globbing.patterns = plist; |
| 769 | |
| 770 | globbing.case_insensitive |
| 771 | # if defined( OS_NT ) || defined( OS_CYGWIN ) |
| 772 | = plist; /* always case-insensitive if any files can be found */ |
| 773 | # else |
| 774 | = L0; |
| 775 | # endif |
| 776 | |
| 777 | if ( globbing.case_insensitive ) |
| 778 | globbing.patterns = downcase_list( plist ); |
| 779 | |
| 780 | file_dirscan( dirname, builtin_glob_back, &globbing ); |
| 781 | |
| 782 | if ( globbing.case_insensitive ) |
| 783 | list_free( globbing.patterns ); |
| 784 | |
| 785 | list_free( plist ); |
| 786 | |
| 787 | return globbing.results; |
| 788 | } |
| 789 | |
| 790 | |
| 791 | LIST * glob_recursive( char const * pattern ) |
no test coverage detected