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
797e305b
...
797e305b125b24c0e5998a92d8dd5a2534a82e6d
authored
2004-01-13 15:06:36 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Removed file_record
1 parent
8e868bf1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
28 deletions
examples/mimetest.c
include/mailutils/registrar.h
mailbox/include/registrar0.h
mailbox/mbox/folder.c
examples/mimetest.c
View file @
797e305
...
...
@@ -83,7 +83,6 @@ main (int argc, char **argv)
{
list_t
bookie
;
registrar_get_list
(
&
bookie
);
list_append
(
bookie
,
file_record
);
list_append
(
bookie
,
imap_record
);
list_append
(
bookie
,
mbox_record
);
list_append
(
bookie
,
path_record
);
...
...
include/mailutils/registrar.h
View file @
797e305
...
...
@@ -91,8 +91,6 @@ extern record_t pop_record;
/* Local Mailbox Unix Mailbox, "mbox:" */
extern
record_t
mbox_record
;
/* Local Folder/Mailbox, "file:" */
extern
record_t
file_record
;
/* Local Folder/Mailbox, / */
extern
record_t
path_record
;
/* Local MH, "mh:" */
...
...
@@ -109,7 +107,6 @@ extern record_t sendmail_record;
list_t bookie = 0;\
registrar_get_list (&bookie);\
list_append (bookie, path_record);\
list_append (bookie, file_record);\
list_append (bookie, mbox_record);\
list_append (bookie, pop_record);\
list_append (bookie, imap_record);\
...
...
mailbox/include/registrar0.h
View file @
797e305
...
...
@@ -56,9 +56,6 @@ extern int _folder_mbox_init __P ((folder_t));
#define MU_FILE_SCHEME "file:"
#define MU_FILE_SCHEME_LEN (sizeof (MU_FILE_SCHEME) - 1)
extern
int
_url_file_init
__P
((
url_t
));
extern
int
_mailbox_file_init
__P
((
mailbox_t
));
extern
int
_folder_file_init
__P
((
folder_t
));
#define MU_PATH_SCHEME "/"
#define MU_PATH_SCHEME_LEN (sizeof (MU_PATH_SCHEME) - 1)
...
...
mailbox/mbox/folder.c
View file @
797e305
...
...
@@ -57,32 +57,20 @@ static struct _record _mbox_record =
};
record_t
mbox_record
=
&
_mbox_record
;
static
struct
_record
_file_record
=
{
MU_FILE_SCHEME
,
_url_file_init
,
/* Mailbox init. */
_mailbox_file_init
,
/* Mailbox init. */
NULL
,
/* Mailer init. */
_folder_mbox_init
,
/* Folder init. */
NULL
,
/* No need for an owner. */
NULL
,
/* _is_scheme method. */
NULL
,
/* _get_url method. */
NULL
,
/* _get_mailbox method. */
NULL
,
/* _get_mailer method. */
NULL
/* _get_folder method. */
};
record_t
file_record
=
&
_file_record
;
static
int
_path_is_scheme
(
record_t
record
,
const
char
*
url
)
{
if
(
url
&&
record
->
scheme
&&
strncasecmp
(
record
->
scheme
,
url
,
strlen
(
record
->
scheme
))
==
0
)
const
char
*
path
;
if
(
!
url
||
!
record
->
scheme
)
return
0
;
if
(
mu_scheme_autodetect_p
(
url
,
&
path
))
/* implies if (strncmp (record->scheme, url, strlen(record->scheme)) == 0)*/
{
struct
stat
st
;
if
(
stat
(
url
,
&
st
)
<
0
)
if
(
stat
(
path
,
&
st
)
<
0
)
return
1
;
/* mailbox_open will complain */
return
S_ISREG
(
st
.
st_mode
)
||
S_ISCHR
(
st
.
st_mode
);
...
...
@@ -94,7 +82,7 @@ static struct _record _path_record =
{
MU_PATH_SCHEME
,
_url_path_init
,
/* Mailbox init. */
_mailbox_
file
_init
,
/* Mailbox init. */
_mailbox_
mbox
_init
,
/* Mailbox init. */
NULL
,
/* Mailer init. */
_folder_mbox_init
,
/* Folder init. */
NULL
,
/* No need for an owner. */
...
...
Please
register
or
sign in
to post a comment