mirror of
https://github.com/chatmail/core.git
synced 2026-05-10 18:36:29 +03:00
remove extern c and no_mangle
This commit is contained in:
@@ -26,8 +26,7 @@ use crate::pgp;
|
||||
use crate::types::*;
|
||||
use crate::x::*;
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_receive_imf(
|
||||
pub unsafe fn dc_receive_imf(
|
||||
mut context: *mut dc_context_t,
|
||||
mut imf_raw_not_terminated: *const libc::c_char,
|
||||
mut imf_raw_bytes: size_t,
|
||||
@@ -1017,7 +1016,7 @@ pub unsafe extern "C" fn dc_receive_imf(
|
||||
/* ******************************************************************************
|
||||
* Misc. Tools
|
||||
******************************************************************************/
|
||||
unsafe extern "C" fn calc_timestamps(
|
||||
unsafe fn calc_timestamps(
|
||||
mut context: *mut dc_context_t,
|
||||
mut chat_id: uint32_t,
|
||||
mut from_id: uint32_t,
|
||||
@@ -1068,7 +1067,7 @@ which tries to create or find out the chat_id by:
|
||||
|
||||
So when the function returns, the caller has the group id matching the current
|
||||
state of the group. */
|
||||
unsafe extern "C" fn create_or_lookup_group(
|
||||
unsafe fn create_or_lookup_group(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mime_parser: *mut dc_mimeparser_t,
|
||||
mut allow_creation: libc::c_int,
|
||||
@@ -1534,7 +1533,7 @@ unsafe extern "C" fn create_or_lookup_group(
|
||||
/* ******************************************************************************
|
||||
* Handle groups for received messages
|
||||
******************************************************************************/
|
||||
unsafe extern "C" fn create_or_lookup_adhoc_group(
|
||||
unsafe fn create_or_lookup_adhoc_group(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mime_parser: *mut dc_mimeparser_t,
|
||||
mut allow_creation: libc::c_int,
|
||||
@@ -1650,7 +1649,7 @@ unsafe extern "C" fn create_or_lookup_adhoc_group(
|
||||
*ret_chat_id_blocked = chat_id_blocked
|
||||
};
|
||||
}
|
||||
unsafe extern "C" fn create_group_record(
|
||||
unsafe fn create_group_record(
|
||||
mut context: *mut dc_context_t,
|
||||
mut grpid: *const libc::c_char,
|
||||
mut grpname: *const libc::c_char,
|
||||
@@ -1683,7 +1682,7 @@ unsafe extern "C" fn create_group_record(
|
||||
sqlite3_finalize(stmt);
|
||||
return chat_id;
|
||||
}
|
||||
unsafe extern "C" fn create_adhoc_grp_id(
|
||||
unsafe fn create_adhoc_grp_id(
|
||||
mut context: *mut dc_context_t,
|
||||
mut member_ids: *mut dc_array_t,
|
||||
) -> *mut libc::c_char {
|
||||
@@ -1768,7 +1767,7 @@ unsafe extern "C" fn create_adhoc_grp_id(
|
||||
free(member_cs.buf as *mut libc::c_void);
|
||||
return ret;
|
||||
}
|
||||
unsafe extern "C" fn search_chat_ids_by_contact_ids(
|
||||
unsafe fn search_chat_ids_by_contact_ids(
|
||||
mut context: *mut dc_context_t,
|
||||
mut unsorted_contact_ids: *const dc_array_t,
|
||||
) -> *mut dc_array_t {
|
||||
@@ -1838,7 +1837,7 @@ unsafe extern "C" fn search_chat_ids_by_contact_ids(
|
||||
sqlite3_free(q3 as *mut libc::c_void);
|
||||
return chat_ids;
|
||||
}
|
||||
unsafe extern "C" fn check_verified_properties(
|
||||
unsafe fn check_verified_properties(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mimeparser: *mut dc_mimeparser_t,
|
||||
mut from_id: uint32_t,
|
||||
@@ -1983,7 +1982,7 @@ unsafe extern "C" fn check_verified_properties(
|
||||
sqlite3_free(q3 as *mut libc::c_void);
|
||||
return everythings_okay;
|
||||
}
|
||||
unsafe extern "C" fn set_better_msg(
|
||||
unsafe fn set_better_msg(
|
||||
mut mime_parser: *mut dc_mimeparser_t,
|
||||
mut better_msg: *mut *mut libc::c_char,
|
||||
) {
|
||||
@@ -1997,7 +1996,7 @@ unsafe extern "C" fn set_better_msg(
|
||||
}
|
||||
};
|
||||
}
|
||||
unsafe extern "C" fn dc_is_reply_to_known_message(
|
||||
unsafe fn dc_is_reply_to_known_message(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mime_parser: *mut dc_mimeparser_t,
|
||||
) -> libc::c_int {
|
||||
@@ -2046,7 +2045,7 @@ unsafe extern "C" fn dc_is_reply_to_known_message(
|
||||
}
|
||||
return 0i32;
|
||||
}
|
||||
unsafe extern "C" fn is_known_rfc724_mid_in_list(
|
||||
unsafe fn is_known_rfc724_mid_in_list(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mid_list: *const clist,
|
||||
) -> libc::c_int {
|
||||
@@ -2076,7 +2075,7 @@ unsafe extern "C" fn is_known_rfc724_mid_in_list(
|
||||
/* ******************************************************************************
|
||||
* Check if a message is a reply to a known message (messenger or non-messenger)
|
||||
******************************************************************************/
|
||||
unsafe extern "C" fn is_known_rfc724_mid(
|
||||
unsafe fn is_known_rfc724_mid(
|
||||
mut context: *mut dc_context_t,
|
||||
mut rfc724_mid: *const libc::c_char,
|
||||
) -> libc::c_int {
|
||||
@@ -2094,7 +2093,7 @@ unsafe extern "C" fn is_known_rfc724_mid(
|
||||
}
|
||||
return is_known;
|
||||
}
|
||||
unsafe extern "C" fn dc_is_reply_to_messenger_message(
|
||||
unsafe fn dc_is_reply_to_messenger_message(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mime_parser: *mut dc_mimeparser_t,
|
||||
) -> libc::c_int {
|
||||
@@ -2136,7 +2135,7 @@ unsafe extern "C" fn dc_is_reply_to_messenger_message(
|
||||
}
|
||||
return 0i32;
|
||||
}
|
||||
unsafe extern "C" fn is_msgrmsg_rfc724_mid_in_list(
|
||||
unsafe fn is_msgrmsg_rfc724_mid_in_list(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mid_list: *const clist,
|
||||
) -> libc::c_int {
|
||||
@@ -2165,7 +2164,7 @@ unsafe extern "C" fn is_msgrmsg_rfc724_mid_in_list(
|
||||
/* ******************************************************************************
|
||||
* Check if a message is a reply to any messenger message
|
||||
******************************************************************************/
|
||||
unsafe extern "C" fn is_msgrmsg_rfc724_mid(
|
||||
unsafe fn is_msgrmsg_rfc724_mid(
|
||||
mut context: *mut dc_context_t,
|
||||
mut rfc724_mid: *const libc::c_char,
|
||||
) -> libc::c_int {
|
||||
@@ -2184,7 +2183,7 @@ unsafe extern "C" fn is_msgrmsg_rfc724_mid(
|
||||
}
|
||||
return is_msgrmsg;
|
||||
}
|
||||
unsafe extern "C" fn dc_add_or_lookup_contacts_by_address_list(
|
||||
unsafe fn dc_add_or_lookup_contacts_by_address_list(
|
||||
mut context: *mut dc_context_t,
|
||||
mut adr_list: *const mailimf_address_list,
|
||||
mut origin: libc::c_int,
|
||||
@@ -2235,7 +2234,7 @@ unsafe extern "C" fn dc_add_or_lookup_contacts_by_address_list(
|
||||
}
|
||||
}
|
||||
}
|
||||
unsafe extern "C" fn dc_add_or_lookup_contacts_by_mailbox_list(
|
||||
unsafe fn dc_add_or_lookup_contacts_by_mailbox_list(
|
||||
mut context: *mut dc_context_t,
|
||||
mut mb_list: *const mailimf_mailbox_list,
|
||||
mut origin: libc::c_int,
|
||||
@@ -2272,7 +2271,7 @@ unsafe extern "C" fn dc_add_or_lookup_contacts_by_mailbox_list(
|
||||
/* ******************************************************************************
|
||||
* Add contacts to database on receiving messages
|
||||
******************************************************************************/
|
||||
unsafe extern "C" fn add_or_lookup_contact_by_addr(
|
||||
unsafe fn add_or_lookup_contact_by_addr(
|
||||
mut context: *mut dc_context_t,
|
||||
mut display_name_enc: *const libc::c_char,
|
||||
mut addr_spec: *const libc::c_char,
|
||||
|
||||
Reference in New Issue
Block a user