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
57461449
...
574614498046b1d1765017ce0c41f7e71bcf4933
authored
2004-01-13 15:08:24 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_scheme_autodetect_p): New function
1 parent
797e305b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
include/mailutils/mutil.h
mailbox/mutil.c
include/mailutils/mutil.h
View file @
5746144
...
...
@@ -127,6 +127,7 @@ extern int munre_subject __P((const char *subject, const char **new_subject));
extern
char
*
mu_charset_lookup
__P
((
char
*
lang
,
char
*
terr
));
extern
int
mu_true_answer_p
__P
((
const
char
*
p
));
extern
int
mu_scheme_autodetect_p
__P
((
const
char
*
scheme
,
const
char
**
path
));
#ifdef __cplusplus
}
...
...
mailbox/mutil.c
View file @
5746144
...
...
@@ -51,6 +51,8 @@
#include <mailutils/envelope.h>
#include <mailutils/nls.h>
#include <registrar0.h>
/* convert a sequence of hex characters into an integer */
unsigned
long
...
...
@@ -1152,3 +1154,20 @@ mu_true_answer_p (const char *p)
return
0
;
return
-
1
;
}
/* Returns true if SCHEME represents a local mail folder. Stores
real folder path to PATH */
int
mu_scheme_autodetect_p
(
const
char
*
scheme
,
const
char
**
path
)
{
*
path
=
scheme
;
if
(
strncmp
(
MU_FILE_SCHEME
,
scheme
,
MU_FILE_SCHEME_LEN
)
==
0
)
{
*
path
+=
MU_FILE_SCHEME_LEN
;
return
1
;
}
if
(
strncmp
(
MU_PATH_SCHEME
,
scheme
,
MU_PATH_SCHEME_LEN
)
==
0
)
return
1
;
return
0
;
}
...
...
Please
register
or
sign in
to post a comment