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
746ee9e4
...
746ee9e48f5124fec880c01aedc915b08be78250
authored
2001-09-18 11:28:39 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Changed proto of mh_read_formfile()
1 parent
3d100a2d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
8 deletions
ChangeLog
mh/inc.c
mh/mh.h
mh/mh_init.c
mh/scan.c
ChangeLog
View file @
746ee9e
2001-09-18 Sergey Poznyakoff
* mh/mh.h: Changed proto of mh_read_formfile(). Thanks to Alain
for noticing.
* mh/inc.c: Likewise.
* mh/scan.c: Likewise.
* mh/mh_init.c: Likewise.
2001-09-18 Sergey Poznyakoff
* mailbox/mbx_mh.c: Optimized for speed.
_mh_message_save(): scan the message while saving it. If expunge==0,
do not create temporary, operate directly on the message file instead.
...
...
mh/inc.c
View file @
746ee9e
...
...
@@ -90,7 +90,7 @@ opt_handler (int key, char *arg, void *unused)
break
;
case
'F'
:
format_str
=
mh_read_formfile
(
arg
);
mh_read_formfile
(
arg
,
&
format_str
);
break
;
case
'i'
:
...
...
mh/mh.h
View file @
746ee9e
...
...
@@ -135,7 +135,7 @@ extern char mh_list_format[];
void
mh_init
(
void
);
int
mh_read_context_file
(
char
*
path
,
header_t
*
header
);
char
*
mh_read_formfile
(
char
*
name
);
int
mh_read_formfile
(
char
*
name
,
char
**
pformat
);
int
mh_format
(
mh_format_t
*
fmt
,
message_t
msg
,
size_t
msgno
,
char
*
buffer
,
size_t
bufsize
);
...
...
mh/mh_init.c
View file @
746ee9e
...
...
@@ -116,8 +116,8 @@ mh_read_context_file (char *path, header_t *header)
return
status
;
}
char
*
mh_read_formfile
(
char
*
name
)
int
mh_read_formfile
(
char
*
name
,
char
**
pformat
)
{
FILE
*
fp
;
struct
stat
st
;
...
...
@@ -128,14 +128,14 @@ mh_read_formfile (char *name)
if
(
stat
(
name
,
&
st
))
{
mh_error
(
"can't stat format file %s: %s"
,
name
,
strerror
(
errno
));
return
;
return
-
1
;
}
fp
=
fopen
(
name
,
"r"
);
if
(
!
fp
)
{
mh_error
(
"can't open format file %s: %s"
,
name
,
strerror
(
errno
));
return
;
return
-
1
;
}
format_str
=
xmalloc
(
st
.
st_size
+
1
);
...
...
@@ -150,7 +150,8 @@ mh_read_formfile (char *name)
}
format_str
[
off
]
=
0
;
fclose
(
fp
);
return
format_str
;
*
pformat
=
format_str
;
return
0
;
}
static
char
*
my_name
;
...
...
mh/scan.c
View file @
746ee9e
...
...
@@ -87,7 +87,7 @@ opt_handler (int key, char *arg, void *unused)
break
;
case
'F'
:
format_str
=
mh_read_formfile
(
arg
);
mh_read_formfile
(
arg
,
&
format_str
);
break
;
case
't'
:
...
...
Please
register
or
sign in
to post a comment