summaryrefslogtreecommitdiffstats
path: root/lib/wordexp-rs/src/ll.rs
blob: f0474434f832e52efd416aac5de89c0654a6028d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
extern crate libc;

#[repr(C)]
#[derive(Clone, Debug)]
pub struct wordexp_t {
    pub we_wordc: libc::size_t,
    pub we_wordv: *const *const libc::c_char,
    pub we_offs: libc::size_t,
}

impl std::ops::Drop for wordexp_t {
    fn drop(&mut self)
    {
        unsafe { wordfree(self); }
    }
}

extern "C" {
/*
    pub static WRDE_APPEND: i32;
    pub static WRDE_DOOFFS: i32;
    pub static WRDE_NOCMD: i32;
    pub static WRDE_REUSE: i32;
    pub static WRDE_SHOWERR: i32;
    pub static WRDE_UNDEF: i32;

    pub static WRDE_BADCHAR: i32;
    pub static WRDE_BADVAL: i32;
    pub static WRDE_CMDSUB: i32;
    pub static WRDE_NOSPACE: i32;
    pub static WRDE_SYNTAX: i32;
*/

    pub fn wordexp(_: *const libc::c_char, _: &mut wordexp_t, _: i32) -> i32;
    pub fn wordfree(_: &mut wordexp_t);
}