use core::ffi::{c_char, c_int};

#[repr(C)]
pub struct glob_t {
    pub gl_pathc: usize,
    pub gl_pathv: *mut *mut c_char,
    pub gl_offs: usize,
}

pub const GLOB_APPEND: c_int = 1 << 0;
pub const GLOB_DOOFFS: c_int = 1 << 1;
pub const GLOB_ERR: c_int = 1 << 2;
pub const GLOB_MARK: c_int = 1 << 3;
pub const GLOB_NOCHECK: c_int = 1 << 4;
pub const GLOB_NOESCAPE: c_int = 1 << 5;
pub const GLOB_NOSORT: c_int = 1 << 6;

pub const GLOB_ABORTED: c_int = -1;
pub const GLOB_NOMATCH: c_int = -2;
pub const GLOB_NOSPACE: c_int = -3;

#[no_mangle]
unsafe extern "C" fn glob(
    _pattern: *const c_char,
    _flags: c_int,
    _errfunc: extern "C" fn(*const c_char, c_int) -> c_int,
    _pglob: *mut glob_t,
) -> c_int {
    todo!("glob()")
}

#[no_mangle]
unsafe extern "C" fn globfree(_pglob: *mut glob_t) {
    todo!("globfree()")
}
