Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
96c023df
Commit
96c023df
authored
9 years ago
by
Alexander Alashkin
Committed by
rojer
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add zx/zd/zu support to c_vsnprintf
PUBLISHED_FROM=83bf0e541a8541e484a83390108ca73d3af95c38
parent
44f37f49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
mongoose.c
mongoose.c
+8
-0
No files found.
mongoose.c
View file @
96c023df
...
...
@@ -1786,6 +1786,11 @@ int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) {
}
else
if
(
ch
==
'd'
&&
len_mod
==
'l'
)
{
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
long
),
10
,
flags
,
field_width
);
#ifdef SSIZE_MAX
}
else
if
(
ch
==
'd'
&&
len_mod
==
'z'
)
{
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
ssize_t
),
10
,
flags
,
field_width
);
#endif
}
else
if
(
ch
==
'd'
&&
len_mod
==
'q'
)
{
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
int64_t
),
10
,
flags
,
field_width
);
...
...
@@ -1795,6 +1800,9 @@ int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) {
}
else
if
((
ch
==
'x'
||
ch
==
'u'
)
&&
len_mod
==
'l'
)
{
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
unsigned
long
),
ch
==
'x'
?
16
:
10
,
flags
,
field_width
);
}
else
if
((
ch
==
'x'
||
ch
==
'u'
)
&&
len_mod
==
'z'
)
{
i
+=
c_itoa
(
buf
+
i
,
buf_size
-
i
,
va_arg
(
ap
,
size_t
),
ch
==
'x'
?
16
:
10
,
flags
,
field_width
);
}
else
if
(
ch
==
'p'
)
{
unsigned
long
num
=
(
unsigned
long
)
va_arg
(
ap
,
void
*
);
C_SNPRINTF_APPEND_CHAR
(
'0'
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment