mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
reduce code duplication (round 1)
This commit is contained in:
@@ -1,45 +1,17 @@
|
||||
use libc;
|
||||
extern "C" {
|
||||
#[no_mangle]
|
||||
fn malloc(_: libc::c_ulong) -> *mut libc::c_void;
|
||||
#[no_mangle]
|
||||
fn free(_: *mut libc::c_void);
|
||||
#[no_mangle]
|
||||
fn realloc(_: *mut libc::c_void, _: libc::c_ulong) -> *mut libc::c_void;
|
||||
#[no_mangle]
|
||||
fn exit(_: libc::c_int) -> !;
|
||||
#[no_mangle]
|
||||
fn strcpy(_: *mut libc::c_char, _: *const libc::c_char) -> *mut libc::c_char;
|
||||
#[no_mangle]
|
||||
fn strlen(_: *const libc::c_char) -> libc::c_ulong;
|
||||
#[no_mangle]
|
||||
fn vsnprintf(
|
||||
_: *mut libc::c_char,
|
||||
_: libc::c_ulong,
|
||||
_: *const libc::c_char,
|
||||
_: ::std::ffi::VaList,
|
||||
) -> libc::c_int;
|
||||
}
|
||||
pub type __builtin_va_list = [__va_list_tag; 1];
|
||||
|
||||
use crate::types::*;
|
||||
use crate::x::*;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)]
|
||||
pub struct __va_list_tag {
|
||||
pub gp_offset: libc::c_uint,
|
||||
pub fp_offset: libc::c_uint,
|
||||
pub overflow_arg_area: *mut libc::c_void,
|
||||
pub reg_save_area: *mut libc::c_void,
|
||||
}
|
||||
pub type __darwin_va_list = __builtin_va_list;
|
||||
pub type va_list = __darwin_va_list;
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)]
|
||||
pub struct _dc_strbuilder {
|
||||
pub struct dc_strbuilder_t {
|
||||
pub buf: *mut libc::c_char,
|
||||
pub allocated: libc::c_int,
|
||||
pub free: libc::c_int,
|
||||
pub eos: *mut libc::c_char,
|
||||
}
|
||||
pub type dc_strbuilder_t = _dc_strbuilder;
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_strbuilder_init(
|
||||
mut strbuilder: *mut dc_strbuilder_t,
|
||||
|
||||
Reference in New Issue
Block a user