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
fe151e7f
...
fe151e7f99d98ad02398f0621dcc5e76bb536d42
authored
2003-02-10 11:59:33 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mh_annotate): New function.
1 parent
1335f254
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
mh/mh.h
mh/mh_init.c
mh/mh.h
View file @
fe151e7
...
...
@@ -290,3 +290,4 @@ int mh_disposition __P((const char *filename));
int
mh_usedraft
__P
((
const
char
*
filename
));
int
mh_file_copy
__P
((
const
char
*
from
,
const
char
*
to
));
void
mh_annotate
__P
((
message_t
msg
,
char
*
field
,
char
*
text
,
int
date
));
...
...
mh/mh_init.c
View file @
fe151e7
...
...
@@ -819,4 +819,30 @@ mh_install (char *name, int automode)
}
}
void
mh_annotate
(
message_t
msg
,
char
*
field
,
char
*
text
,
int
date
)
{
header_t
hdr
;
attribute_t
attr
;
if
(
message_get_header
(
msg
,
&
hdr
))
return
;
if
(
date
)
{
time_t
t
;
struct
tm
*
tm
;
char
datebuf
[
80
];
t
=
time
(
NULL
);
tm
=
localtime
(
&
t
);
strftime
(
datebuf
,
sizeof
datebuf
,
"%a, %d %b %Y %H:%M:%S %Z"
,
tm
);
header_set_value
(
hdr
,
field
,
datebuf
,
0
);
}
if
(
text
)
header_set_value
(
hdr
,
field
,
text
,
0
);
message_get_attribute
(
msg
,
&
attr
);
attribute_set_modified
(
attr
);
}
...
...
Please
register
or
sign in
to post a comment