-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More cleanups, put unicode in the right place
- Loading branch information
1 parent
5214130
commit 456507d
Showing
8 changed files
with
83 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
// Copyright 2020 the Tectonic Project | ||
// Licensed under the MIT License. | ||
|
||
//! No Rust code. This crate exists to export the ICU *C* API into the | ||
//! Cargo framework. | ||
#![allow(nonstandard_style)] | ||
|
||
//! This crate exists to export the ICU *C* API into the Cargo framework, as well as | ||
//! provide bindings to other tectonic crates. | ||
pub const UBIDI_DEFAULT_LTR: u8 = 0xFE; | ||
pub const UBIDI_DEFAULT_RTL: u8 = 0xFF; | ||
pub const U_ZERO_ERROR: UErrorCode = 0; | ||
|
||
pub type UErrorCode = libc::c_int; | ||
pub type UChar = u16; | ||
pub type UChar32 = i32; | ||
|
||
pub fn U_SUCCESS(code: UErrorCode) -> bool { | ||
code <= U_ZERO_ERROR | ||
} | ||
|
||
#[repr(C)] | ||
pub struct UConverter(()); | ||
|
||
extern "C" { | ||
pub fn ucnv_open(name: *const libc::c_char, err: *mut UErrorCode) -> *mut UConverter; | ||
pub fn ucnv_close(conv: *mut UConverter); | ||
pub fn ucnv_toUChars( | ||
conv: *mut UConverter, | ||
dest: *mut UChar, | ||
dest_capacity: i32, | ||
src: *const libc::c_char, | ||
src_len: i32, | ||
p_error_code: *mut UErrorCode, | ||
) -> i32; | ||
pub fn ucnv_fromUChars( | ||
conv: *mut UConverter, | ||
dest: *mut libc::c_char, | ||
dest_capacity: i32, | ||
src: *const UChar, | ||
src_len: i32, | ||
p_error_code: *mut UErrorCode, | ||
) -> i32; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters