Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tornax O7
relibc
Commits
17778ba1
Verified
Commit
17778ba1
authored
6 years ago
by
jD91mZM2
Browse files
Options
Downloads
Patches
Plain Diff
Remove missing rustfmt.toml options
parent
9c016734
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Cargo.lock
+1
-0
1 addition, 0 deletions
Cargo.lock
fmt.sh
+1
-1
1 addition, 1 deletion
fmt.sh
rustfmt.toml
+0
-6
0 additions, 6 deletions
rustfmt.toml
src/wchar/src/lib.rs
+6
-6
6 additions, 6 deletions
src/wchar/src/lib.rs
src/wchar/src/utf8.rs
+0
-2
0 additions, 2 deletions
src/wchar/src/utf8.rs
with
8 additions
and
15 deletions
Cargo.lock
+
1
−
0
View file @
17778ba1
...
...
@@ -419,6 +419,7 @@ dependencies = [
"platform 0.1.0",
"ralloc 1.0.0",
"rand 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"string 0.1.0",
"time 0.1.0",
"wchar 0.1.0",
]
...
...
This diff is collapsed.
Click to expand it.
fmt.sh
+
1
−
1
View file @
17778ba1
#!/
bin/
bash
#!/
usr/bin/env
bash
ARGS
=()
for
crate
in
relibc
$(
find src
-name
Cargo.toml |
cut
-d
'/'
-f2
|
grep
-v
template
)
...
...
This diff is collapsed.
Click to expand it.
rustfmt.toml
+
0
−
6
View file @
17778ba1
...
...
@@ -9,19 +9,13 @@ fn_single_line = false
where_single_line
=
false
imports_indent
=
"Visual"
imports_layout
=
"Mixed"
reorder_extern_crates
=
true
reorder_extern_crates_in_group
=
true
reorder_imports
=
false
reorder_imported_names
=
true
spaces_within_parens_and_brackets
=
false
remove_blank_lines_at_start_or_end_of_block
=
true
fn_args_density
=
"Tall"
brace_style
=
"SameLineWhere"
trailing_comma
=
"Vertical"
blank_lines_upper_bound
=
1
blank_lines_lower_bound
=
0
force_explicit_abi
=
true
write_mode
=
"Overwrite"
disable_all_formatting
=
false
skip_children
=
false
hide_parse_errors
=
false
...
...
This diff is collapsed.
Click to expand it.
src/wchar/src/lib.rs
+
6
−
6
View file @
17778ba1
...
...
@@ -27,7 +27,7 @@ const MB_LEN_MAX: c_int = 4;
#[repr(C)]
#[derive(Clone,
Copy)]
pub
struct
mbstate_t
{}
pub
struct
mbstate_t
;
#[no_mangle]
pub
unsafe
extern
"C"
fn
btowc
(
c
:
c_int
)
->
wint_t
{
...
...
@@ -38,7 +38,7 @@ pub unsafe extern "C" fn btowc(c: c_int) -> wint_t {
let
uc
=
c
as
u8
;
let
c
=
uc
as
c_char
;
let
mut
ps
:
mbstate_t
=
mbstate_t
{}
;
let
mut
ps
:
mbstate_t
=
mbstate_t
;
let
mut
wc
:
wchar_t
=
0
;
let
saved_errno
=
platform
::
errno
;
let
status
=
mbrtowc
(
&
mut
wc
,
&
c
as
(
*
const
c_char
),
1
,
&
mut
ps
);
...
...
@@ -52,7 +52,7 @@ pub unsafe extern "C" fn btowc(c: c_int) -> wint_t {
#[no_mangle]
pub
unsafe
extern
"C"
fn
fputwc
(
wc
:
wchar_t
,
stream
:
*
mut
FILE
)
->
wint_t
{
//Convert wchar_t to multibytes first
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
{}
;
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
;
let
mut
bytes
:
[
c_char
;
MB_CUR_MAX
as
usize
]
=
[
0
;
MB_CUR_MAX
as
usize
];
let
amount
=
wcrtomb
(
bytes
.as_mut_ptr
(),
wc
,
&
mut
INTERNAL
);
...
...
@@ -96,7 +96,7 @@ pub unsafe extern "C" fn mbsinit(ps: *const mbstate_t) -> c_int {
#[no_mangle]
pub
unsafe
extern
"C"
fn
mbrlen
(
s
:
*
const
c_char
,
n
:
usize
,
ps
:
*
mut
mbstate_t
)
->
usize
{
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
{}
;
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
;
mbrtowc
(
ptr
::
null_mut
(),
s
,
n
,
&
mut
INTERNAL
)
}
...
...
@@ -108,7 +108,7 @@ pub unsafe extern "C" fn mbrtowc(
n
:
usize
,
ps
:
*
mut
mbstate_t
,
)
->
usize
{
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
{}
;
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
;
if
ps
.is_null
()
{
let
ps
=
&
mut
INTERNAL
;
...
...
@@ -131,7 +131,7 @@ pub unsafe extern "C" fn mbsnrtowcs(
dst_len
:
usize
,
ps
:
*
mut
mbstate_t
,
)
->
usize
{
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
{}
;
static
mut
INTERNAL
:
mbstate_t
=
mbstate_t
;
if
ps
.is_null
()
{
let
ps
=
&
mut
INTERNAL
;
...
...
This diff is collapsed.
Click to expand it.
src/wchar/src/utf8.rs
+
0
−
2
View file @
17778ba1
//UTF implementation parts for wchar.h.
//Partially ported from the Sortix libc
#![no_std]
extern
crate
errno
;
extern
crate
platform
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment