mirror of
				https://gitlab.com/sortix/sortix.git
				synced 2023-02-13 20:55:38 -05:00 
			
		
		
		
	Convert libc to C.
This commit is contained in:
		
							parent
							
								
									f633942124
								
							
						
					
					
						commit
						01b59c1947
					
				
					 668 changed files with 1895 additions and 1851 deletions
				
			
		| 
						 | 
				
			
			@ -17,13 +17,14 @@
 | 
			
		|||
    You should have received a copy of the GNU Lesser General Public License
 | 
			
		||||
    along with the Sortix C Library. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
    fnmatch/fnmatch.cpp
 | 
			
		||||
    fnmatch/fnmatch.c
 | 
			
		||||
    Filename matching.
 | 
			
		||||
 | 
			
		||||
*******************************************************************************/
 | 
			
		||||
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <fnmatch.h>
 | 
			
		||||
#include <stdbool.h>
 | 
			
		||||
#include <stddef.h>
 | 
			
		||||
 | 
			
		||||
#define __FNM_NOT_LEADING (1 << 31)
 | 
			
		||||
| 
						 | 
				
			
			@ -91,7 +92,7 @@ static bool matches_bracket_pattern(char c, const char* pattern, int flags)
 | 
			
		|||
	return negated || matched_any;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extern "C" int fnmatch(const char* pattern, const char* string, int flags)
 | 
			
		||||
int fnmatch(const char* pattern, const char* string, int flags)
 | 
			
		||||
{
 | 
			
		||||
	int next_flags = flags | __FNM_NOT_LEADING;
 | 
			
		||||
	const char* pattern_end;
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue