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
e8548a14
...
e8548a14f1268da5cefe45656c7518148a504c75
authored
2004-01-05 18:09:32 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_true_answer_p()
1 parent
d12f61a6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
19 deletions
mail/var.c
mh/mh.h
mh/mh_init.c
sieve/sieve.c
mail/var.c
View file @
e8548a1
...
...
@@ -139,7 +139,7 @@ parse_headers (FILE *fp, compose_env_t *env)
header_destroy
(
&
header
,
NULL
);
p
=
ml_readline
(
_
(
"Edit again?"
));
if
(
*
p
==
'y'
||
*
p
==
'Y'
)
if
(
mu_true_answer_p
(
p
)
==
1
)
return
-
1
;
else
return
1
;
...
...
mh/mh.h
View file @
e8548a1
...
...
@@ -63,7 +63,7 @@ extern char *strchrnul __P((const char *s, int c_in));
#define MH_CONTEXT_FILE "context"
#define DEFAULT_ALIAS_FILE MHLIBDIR "/MailAliases"
#define is_true(arg) ((arg)
==NULL||(arg)[0] == 'y'
)
#define is_true(arg) ((arg)
== NULL||mu_true_answer_p (arg) == 1
)
enum
mh_opcode
{
...
...
mh/mh_init.c
View file @
e8548a1
...
...
@@ -256,7 +256,7 @@ mh_vgetyn (const char *fmt, va_list ap)
while
(
1
)
{
char
*
p
;
int
len
;
int
len
,
rc
;
vfprintf
(
stdout
,
fmt
,
ap
);
fprintf
(
stdout
,
"? "
);
...
...
@@ -270,16 +270,12 @@ mh_vgetyn (const char *fmt, va_list ap)
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
switch
(
p
[
0
])
{
case
'y'
:
case
'Y'
:
return
1
;
case
'n'
:
case
'N'
:
return
0
;
}
rc
=
mu_true_answer_p
(
p
);
if
(
rc
>=
0
)
return
rc
;
/* TRANSLATORS: See msgids "nN" and "yY". */
fprintf
(
stdout
,
_
(
"Please answer yes or no: "
));
}
return
0
;
/* to pacify gcc */
...
...
sieve/sieve.c
View file @
e8548a1
...
...
@@ -117,16 +117,12 @@ static int sieve_print_locus = 1; /* Should the log messages include the
static
int
is_true_p
(
char
*
p
)
{
int
rc
;
if
(
!
p
)
return
1
;
/* TRANSLATORS: This is the list of characters meaning 'Yes'. Please,
preserve yY in your translation, e.g., for German:
msgstr "yYjJ";
*/
if
(
strchr
(
_
(
"yY"
),
*
p
))
return
1
;
if
((
rc
=
mu_true_answer_p
(
p
))
==
-
1
)
return
0
;
return
rc
;
}
static
error_t
...
...
Please
register
or
sign in
to post a comment