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
78a5a246
...
78a5a2460f380a4856fb8116153c8747b40dbcb6
authored
2001-12-16 16:57:31 +0000
by
Sam Roberts
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added -d flags.
1 parent
a37b1105
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
examples/mbox-dates.c
examples/mbox-explode.c
examples/mbox-dates.c
View file @
78a5a24
...
...
@@ -30,6 +30,8 @@ UserAgent (header_t hdr)
&&
sz
!=
0
)
return
agent
;
/* Some MUAs, like Pine, put their name in the Message-Id, so print it as
a last ditch attempt at getting an idea who produced the date. */
if
(
header_get_value
(
hdr
,
"Message-Id"
,
agent
,
sizeof
(
agent
),
&
sz
)
==
0
&&
sz
!=
0
)
return
agent
;
...
...
@@ -45,6 +47,19 @@ main (int argc, char **argv)
size_t
count
=
0
;
char
*
mboxname
=
argv
[
1
];
int
status
;
int
debug
=
0
;
if
(
strcmp
(
"-d"
,
mboxname
)
==
0
)
{
mboxname
=
argv
[
2
];
debug
=
1
;
}
if
(
mboxname
==
NULL
)
{
printf
(
"Usage: mbox-dates [-d] <mbox>
\n
"
);
exit
(
1
);
}
/* Register desired mailbox formats. */
{
...
...
@@ -62,11 +77,12 @@ main (int argc, char **argv)
exit
(
1
);
}
{
mu_debug_t
debug
;
mailbox_get_debug
(
mbox
,
&
debug
);
// mu_debug_set_level (debug, MU_DEBUG_TRACE|MU_DEBUG_PROT);
}
if
(
debug
)
{
mu_debug_t
debug
;
mailbox_get_debug
(
mbox
,
&
debug
);
mu_debug_set_level
(
debug
,
MU_DEBUG_TRACE
|
MU_DEBUG_PROT
);
}
if
((
status
=
mailbox_open
(
mbox
,
MU_STREAM_READ
))
!=
0
)
{
...
...
examples/mbox-explode.c
View file @
78a5a24
...
...
@@ -23,7 +23,15 @@ main (int argc, char **argv)
char
*
mbox_name
=
0
;
char
*
dir_name
=
0
;
int
status
;
int
debug
=
0
;
if
(
strcmp
(
"-d"
,
argv
[
1
])
==
0
&&
argc
==
4
)
{
debug
=
1
;
argc
--
;
argv
[
1
]
=
argv
[
2
];
argv
[
2
]
=
argv
[
3
];
}
if
(
argc
!=
3
)
{
printf
(
"usage: mbox-explode <mbox> <directory>
\n
"
);
...
...
@@ -46,6 +54,7 @@ main (int argc, char **argv)
mbox_name
,
strerror
(
status
));
exit
(
1
);
}
if
(
debug
)
{
mu_debug_t
debug
;
mailbox_get_debug
(
mbox
,
&
debug
);
...
...
@@ -119,3 +128,4 @@ main (int argc, char **argv)
return
status
;
}
...
...
Please
register
or
sign in
to post a comment