Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
69aac49f
Commit
69aac49f
authored
16 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
made %llu work for printing unsigned long longs, added the generic curl source
header
parent
67f139e0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mprintf.c
+27
-14
27 additions, 14 deletions
lib/mprintf.c
with
27 additions
and
14 deletions
lib/mprintf.c
+
27
−
14
View file @
69aac49f
/****************************************************************************
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
* Copyright (C) 1999 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
*************************************************************************
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
* $Id$
*
* Purpose:
* A merge of Bjorn Reese's format() function and Daniel's dsprintf()
...
...
@@ -29,7 +36,6 @@
* page at http://daniel.haxx.se/trio/
*/
#include
"setup.h"
#include
<stdio.h>
#include
<stdlib.h>
...
...
@@ -559,10 +565,12 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
vto
[
i
].
data
.
lnum
=
va_arg
(
arglist
,
LONG_LONG
);
else
#endif
{
if
(
vto
[
i
].
flags
&
FLAGS_LONG
)
vto
[
i
].
data
.
num
=
va_arg
(
arglist
,
long
);
else
vto
[
i
].
data
.
num
=
va_arg
(
arglist
,
int
);
else
vto
[
i
].
data
.
num
=
va_arg
(
arglist
,
int
);
}
break
;
case
FORMAT_DOUBLE
:
...
...
@@ -700,7 +708,12 @@ static int dprintf_formatf(
switch
(
p
->
type
)
{
case
FORMAT_INT
:
num
=
p
->
data
.
num
;
#ifdef ENABLE_64BIT
if
(
p
->
flags
&
FLAGS_LONGLONG
)
num
=
p
->
data
.
lnum
;
else
#endif
num
=
p
->
data
.
num
;
if
(
p
->
flags
&
FLAGS_CHAR
)
{
/* Character. */
if
(
!
(
p
->
flags
&
FLAGS_LEFT
))
...
...
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