Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/core/src/document/djvulibre_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub type RenderMode = libc::c_uint;
pub type FormatStyle = libc::c_uint;

#[link(name="djvulibre")]
extern {
extern "C" {
pub fn ddjvu_context_create(name: *const libc::c_char) -> *mut ExoContext;
pub fn ddjvu_context_release(ctx: *mut ExoContext);
pub fn ddjvu_cache_set_size(ctx: *mut ExoContext, size: libc::c_ulong);
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/document/mupdf_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub enum FzImage {}
#[link(name="mupdf")]
#[link(name="mupdf_wrapper", kind="static")]

extern {
extern "C" {
pub fn fz_new_context_imp(alloc_ctx: *const FzAllocContext, locks_ctx: *const FzLocksContext, cache_size: libc::size_t, version: *const libc::c_char) -> *mut FzContext;
pub fn fz_drop_context(ctx: *mut FzContext);
pub fn fz_register_document_handlers(ctx: *mut FzContext);
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/font/freetype_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub type FtPos = libc::c_long;
pub type FtFixed = libc::c_long;
pub type FtGlyphFormat = libc::c_uint;
pub type GlyphBBoxMode = libc::c_uint;
pub type FtGenericFinalizer = extern fn(*mut libc::c_void);
pub type FtGenericFinalizer = extern "C" fn(*mut libc::c_void);

pub enum FtLibrary {}
pub enum FtCharMap {}
Expand All @@ -36,7 +36,7 @@ pub enum FtMemory {}
pub enum FtStream {}

#[link(name="freetype")]
extern {
extern "C" {
pub fn FT_Init_FreeType(lib: *mut *mut FtLibrary) -> FtError;
pub fn FT_Done_FreeType(lib: *mut FtLibrary) -> FtError;
pub fn FT_New_Face(lib: *mut FtLibrary, path: *const libc::c_char, idx: libc::c_long, face: *mut *mut FtFace) -> FtError;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/font/harfbuzz_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum HbBuffer {}
pub enum HbFont {}

#[link(name="harfbuzz")]
extern {
extern "C" {
pub fn hb_ft_font_create(face: *mut FtFace, destroy: *const libc::c_void) -> *mut HbFont;
pub fn hb_ft_font_changed(font: *mut HbFont);
pub fn hb_font_destroy(font: *mut HbFont);
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/font/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const MD_SIZE: Style = Style {

#[cfg(any(not(target_os = "linux"), target_arch = "arm"))]
#[link(name="mupdf")]
extern {
extern "C" {
// Based on the outputs of:
// arm-linux-gnueabihf-readelf -Ws ./libs/libmupdf.so | grep '\b_binary_' | \
// grep -v '_size$' | awk '{print $8, strtonum($3)-1}' | sort -u
Expand Down Expand Up @@ -255,7 +255,7 @@ extern {

#[cfg(all(target_os = "linux", not(target_arch = "arm")))]
#[link(name="mupdf")]
extern {
extern "C" {
pub static _binary_resources_fonts_droid_DroidSansFallback_ttf_start: [libc::c_uchar; 3556308];
pub static _binary_resources_fonts_noto_NotoEmoji_Regular_ttf_start: [libc::c_uchar; 418804];
pub static _binary_resources_fonts_noto_NotoMusic_Regular_otf_start: [libc::c_uchar; 60812];
Expand Down