diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-09 10:09:50 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-09 10:09:50 +0000 |
commit | 5f555c4cb4ea9ba258605c5882b7712f3278a090 (patch) | |
tree | 10c8ec4293a143e3505ebddb61d23dbb94d672e7 | |
parent | 31fbfbfbc4fcb86988703eaf7106ab4ffc4c5a10 (diff) | |
download | mailutils-5f555c4cb4ea9ba258605c5882b7712f3278a090.tar.gz mailutils-5f555c4cb4ea9ba258605c5882b7712f3278a090.tar.bz2 |
* comsat/comsat.c (comsat_cfg_param): Reword a help message
for require-tty.
* examples/header.c (cmd_readline): New function.
New command 'readline'.
* po/POTFILES.in: Remove stray reference to muerrno.c
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | comsat/comsat.c | 2 | ||||
-rw-r--r-- | examples/header.c | 20 | ||||
-rw-r--r-- | po/POTFILES.in | 1 |
4 files changed, 29 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua> + + * comsat/comsat.c (comsat_cfg_param): Reword a help message + for require-tty. + * examples/header.c (cmd_readline): New function. + New command 'readline'. + * po/POTFILES.in: Remove stray reference to muerrno.c + 2008-02-08 Sergey Poznyakoff <gray@gnu.org.ua> * comsat/action.c (act_getline): Bugfix. Do not return eof diff --git a/comsat/comsat.c b/comsat/comsat.c index 7f09f8ce4..99b837216 100644 --- a/comsat/comsat.c +++ b/comsat/comsat.c @@ -122,7 +122,7 @@ struct mu_cfg_param comsat_cfg_param[] = { { "allow-biffrc", mu_cfg_bool, &allow_biffrc, 0, NULL, N_("Read .biffrc file from the user home directory") }, { "require-tty", mu_cfg_bool, &require_tty, 0, NULL, - N_("Notify only if the user be logged on one of the ttys.") }, + N_("Notify only if the user is logged on one of the ttys.") }, { "max-lines", mu_cfg_int, &maxlines, 0, NULL, N_("Maximum number of message body lines to be output.") }, { "max-requests", mu_cfg_uint, &maxrequests, 0, NULL, diff --git a/examples/header.c b/examples/header.c index bd2939181..84e9454b7 100644 --- a/examples/header.c +++ b/examples/header.c @@ -334,6 +334,25 @@ cmd_iterate (int argc, char **argv) } } +void +cmd_readline (int argc, char **argv) +{ + char *buf; + size_t size; + mu_stream_t stream; + size_t nbytes; + + if (check_args (argv[0], argc, 1, 2)) + return; + size = atoi (argv[1]); + buf = malloc (size); + if (!buf) + abort (); + mu_header_get_stream (header, &stream); + mu_stream_readline (stream, buf, size, 0, &nbytes); + printf ("\"%*.*s\"", nbytes, nbytes, buf); + free (buf); +} struct cmdtab @@ -354,6 +373,7 @@ static struct cmdtab cmdtab[] = { "find and print the Nth (by default, 1st) instance of header named NAME" }, { "dump", cmd_dump, NULL, "dump all headers on screen" }, { "itr", cmd_iterate, "[first|1|next|n]", "iterate over headers" }, + { "readline", cmd_readline, "[SIZE]", "read line" }, { "remove", cmd_remove, "NAME [N]", "remove the Nth (by default, 1st) instance of header named NAME" }, { "insert", cmd_insert, "NAME VALUE [REF [NUM] [before|after] [replace]]", diff --git a/po/POTFILES.in b/po/POTFILES.in index 6f566387e..2916dde5d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -150,7 +150,6 @@ mailbox/ipsrv.c mailbox/message.c mailbox/msrv.c mailbox/mu_auth.c -mailbox/muerrno.c mailbox/mutil.c mailbox/parsedate.y mailbox/registrar.c |