Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
tuklib_mbstr_fw.c
Go to the documentation of this file.
1
//
5
//
6
// Author: Lasse Collin
7
//
8
// This file has been put into the public domain.
9
// You can do whatever you want with this file.
10
//
12
13
#include "
tuklib_mbstr.h
"
14
15
16
extern
int
17
tuklib_mbstr_fw
(
const
char
*
str
,
int
columns_min)
18
{
19
size_t
len
;
20
const
size_t
width
=
tuklib_mbstr_width
(
str
, &
len
);
21
if
(
width
== (
size_t
)-1)
22
return
-1;
23
24
if
(
width
> (
size_t
)columns_min)
25
return
0;
26
27
if
(
width
< (
size_t
)columns_min)
28
len
+= (
size_t
)columns_min -
width
;
29
30
return
len
;
31
}
len
size_t len
Definition:
6502dis.c:15
cmd_descs_generate.str
str
Definition:
cmd_descs_generate.py:785
size_t
int size_t
Definition:
sftypes.h:40
width
int width
Definition:
main.c:10
tuklib_mbstr.h
Utility functions for handling multibyte strings.
tuklib_mbstr_width
#define tuklib_mbstr_width
Definition:
tuklib_mbstr.h:24
tuklib_mbstr_fw
int tuklib_mbstr_fw(const char *str, int columns_min)
Get the field width for printf() e.g. to align table columns.
Definition:
tuklib_mbstr_fw.c:17
subprojects
xz-5.2.5
src
common
tuklib_mbstr_fw.c
Generated by
1.9.1