refactor: move aheader to safe rust

This commit is contained in:
dignifiedquire
2019-05-12 19:05:33 +01:00
parent 00314ffbe0
commit fdd870286e
17 changed files with 468 additions and 630 deletions

View File

@@ -266,7 +266,7 @@ pub unsafe fn dc_binary_to_uc_hex(buf: *const uint8_t, bytes: size_t) -> *mut li
}
/* remove all \r characters from string */
pub unsafe extern "C" fn dc_remove_cr_chars(buf: *mut libc::c_char) {
pub unsafe fn dc_remove_cr_chars(buf: *mut libc::c_char) {
/* search for first `\r` */
let mut p1: *const libc::c_char = buf;
while 0 != *p1 {