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
35ae733d
...
35ae733daab73282b969003796781063ac4ddd15
authored
2003-02-08 15:57:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mh_usedraft): New function.
1 parent
c67dfff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
mh/mh_whatnow.c
mh/mh_whatnow.c
View file @
35ae733
...
...
@@ -576,3 +576,57 @@ mh_disposition (const char *filename)
wh
.
prompt
=
_
(
"Disposition?"
);
return
_whatnow
(
&
wh
,
disp_tab
);
}
/* Use draft shell */
/* Help table for ``use draft'' shell */
static
struct
helpdata
usedraft_helptab
[]
=
{
{
"no"
,
N_
(
"Don't use the draft."
)
},
{
"yes"
,
N_
(
"Use the draft."
)
},
{
"list"
,
N_
(
"List the draft on the terminal."
)
},
{
NULL
},
};
static
int
usedraft_help
(
struct
mh_whatnow_env
*
wh
,
int
argc
,
char
**
argv
,
int
*
status
)
{
return
_help
(
usedraft_helptab
,
argv
[
0
]);
}
static
int
yes
(
struct
mh_whatnow_env
*
wh
,
int
argc
,
char
**
argv
,
int
*
status
)
{
*
status
=
1
;
return
1
;
}
static
int
no
(
struct
mh_whatnow_env
*
wh
,
int
argc
,
char
**
argv
,
int
*
status
)
{
*
status
=
0
;
return
1
;
}
static
struct
action_tab
usedraft_tab
[]
=
{
{
"help"
,
usedraft_help
},
{
"?"
,
usedraft_help
},
{
"yes"
,
yes
},
{
"no"
,
no
},
{
"list"
,
list
},
{
NULL
}
};
int
mh_usedraft
(
const
char
*
filename
)
{
struct
mh_whatnow_env
wh
;
int
rc
;
memset
(
&
wh
,
0
,
sizeof
(
wh
));
wh
.
file
=
filename
;
asprintf
(
&
wh
.
prompt
,
_
(
"Use
\"
%s
\"
?"
),
filename
);
rc
=
_whatnow
(
&
wh
,
usedraft_tab
);
free
(
wh
.
prompt
);
return
rc
;
}
...
...
Please
register
or
sign in
to post a comment