Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
94b312f2
...
94b312f2aab183c7822a3e8596fddf0b320b54df
authored
2006-04-19 15:21:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(parse_answer0,parse_answer1): Use strtoul instead of strtoumax. This is a temporary change.
1 parent
cc29a96f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
libproto/pop/mbox.c
libproto/pop/mbox.c
View file @
94b312f
...
...
@@ -1024,30 +1024,32 @@ pop_get_message (mu_mailbox_t mbox, size_t msgno, mu_message_t *pmsg)
return
0
;
}
/* FIXME: Should use strtoumax ideally */
static
int
parse_answer0
(
const
char
*
buffer
,
size_t
*
n1
,
size_t
*
n2
)
{
char
*
p
;
u
intmax_t
m
;
u
nsigned
long
m
;
if
(
strlen
(
buffer
)
<
3
||
memcmp
(
buffer
,
"+OK"
,
3
))
return
1
;
m
=
*
n1
=
strtou
max
(
buffer
+
3
,
&
p
,
10
);
m
=
*
n1
=
strtou
l
(
buffer
+
3
,
&
p
,
10
);
if
(
!
isspace
(
*
p
)
||
m
!=
*
n1
)
return
1
;
m
=
*
n2
=
strtou
max
(
p
,
&
p
,
10
);
m
=
*
n2
=
strtou
l
(
p
,
&
p
,
10
);
if
(
!
(
*
p
==
0
||
isspace
(
*
p
))
||
m
!=
*
n2
)
return
1
;
return
0
;
}
/* FIXME: Should use strtoumax ideally */
static
int
parse_answer1
(
const
char
*
buffer
,
size_t
*
n1
,
char
*
buf
,
size_t
bufsize
)
{
char
*
p
;
u
intmax_t
m
;
u
nsigned
long
m
;
if
(
strlen
(
buffer
)
<
3
||
memcmp
(
buffer
,
"+OK"
,
3
))
return
1
;
m
=
*
n1
=
strtou
max
(
buffer
+
3
,
&
p
,
0
);
m
=
*
n1
=
strtou
l
(
buffer
+
3
,
&
p
,
0
);
if
(
!
isspace
(
*
p
)
||
m
!=
*
n1
)
return
1
;
while
(
*
p
&&
isspace
(
*
p
))
...
...
Please
register
or
sign in
to post a comment