Commit 19f006cd 19f006cd913e886c19e48aed683d19d512758d6f by Sergey Poznyakoff

Begin rewriting the docs.

* configure.ac: Configure doc hints.
* config/mailutils-config.c (main): Use mu_fprint_conf_option.
* mailbox/version.c (mu_conf_option): Change type.
(mu_fprint_conf_option): New function.
(mu_fprint_options): Use mu_fprint_conf_option.
(mu_print_options): Fix signature
(mu_check_option): Change return type.
* testsuite/lib/mailutils.exp (mu_version): Reflect changes in the
output produced by --show-config-options.

* include/mailutils/version.h (struct mu_conf_option): New data
type.
(mu_check_option): Change return type.
(mu_fprint_conf_option): New prototype.
* libargp/common.c (mu_common_argp): Rename --rcfile-* options
to --config-*. Retain old names for a while.

* doc/texinfo/Makefile.am (RENDITION_TEXI): New variable.
(check-format, check-refs, check-fixmes, check-unrevised)
(all-check-docs, check-docs): New rules.
* doc/texinfo/rendition.texi: New file.
* doc/texinfo/macros.texi: New file.
* doc/texinfo/mailutils.texi: Start rewriting
* doc/texinfo/programs.texi: Likewise.

* doc/texinfo/c-api.texi: Reformat.
* doc/texinfo/fdl.texi: Likewise.
* doc/texinfo/libmuauth.texi: Likewise.
* doc/texinfo/libsieve.texi: Likewise.
* doc/texinfo/mu-mh.texi: Likewise.
* doc/texinfo/sieve.texi: Likewise.

* doc/texinfo/gendocs_template: Rewrite.
1 parent 3f88df00
1 2008-09-21 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * configure.ac: Configure doc hints.
4 * config/mailutils-config.c (main): Use mu_fprint_conf_option.
5 * mailbox/version.c (mu_conf_option): Change type.
6 (mu_fprint_conf_option): New function.
7 (mu_fprint_options): Use mu_fprint_conf_option.
8 (mu_print_options): Fix signature
9 (mu_check_option): Change return type.
10 * testsuite/lib/mailutils.exp (mu_version): Reflect changes in the
11 output produced by --show-config-options.
12
13 * include/mailutils/version.h (struct mu_conf_option): New data
14 type.
15 (mu_check_option): Change return type.
16 (mu_fprint_conf_option): New prototype.
17 * libargp/common.c (mu_common_argp): Rename --rcfile-* options
18 to --config-*. Retain old names for a while.
19
20 * doc/texinfo/Makefile.am (RENDITION_TEXI): New variable.
21 (check-format, check-refs, check-fixmes, check-unrevised)
22 (all-check-docs, check-docs): New rules.
23 * doc/texinfo/rendition.texi: New file.
24 * doc/texinfo/macros.texi: New file.
25 * doc/texinfo/mailutils.texi: Start rewriting
26 * doc/texinfo/programs.texi: Likewise.
27
28 * doc/texinfo/c-api.texi: Reformat.
29 * doc/texinfo/fdl.texi: Likewise.
30 * doc/texinfo/libmuauth.texi: Likewise.
31 * doc/texinfo/libsieve.texi: Likewise.
32 * doc/texinfo/mu-mh.texi: Likewise.
33 * doc/texinfo/sieve.texi: Likewise.
34
35 * doc/texinfo/gendocs_template: Rewrite.
36
1 2008-08-24 Sergey Poznyakoff <gray@gnu.org.ua> 37 2008-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
2 38
3 Fix testsuite to avoid spawning /bin/cp. 39 Fix testsuite to avoid spawning /bin/cp.
......
...@@ -276,11 +276,11 @@ main (int argc, char **argv) ...@@ -276,11 +276,11 @@ main (int argc, char **argv)
276 276
277 for (i = 0; i < argc; i++) 277 for (i = 0; i < argc; i++)
278 { 278 {
279 const char *val = mu_check_option (argv[i]); 279 const struct mu_conf_option *opt = mu_check_option (argv[i]);
280 if (val) 280 if (opt)
281 { 281 {
282 found++; 282 found++;
283 printf ("%s\n", val); 283 mu_fprint_conf_option (stdout, opt);
284 } 284 }
285 } 285 }
286 return found == argc ? 0 : 1; 286 return found == argc ? 0 : 1;
......
...@@ -1103,6 +1103,24 @@ dnl get sysconfdir expanded. ...@@ -1103,6 +1103,24 @@ dnl get sysconfdir expanded.
1103 1103
1104 CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\"" 1104 CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\""
1105 1105
1106 # Doc hints.
1107 # Select a rendition level:
1108 # DISTRIB for stable releases (at most one dot in the version number)
1109 # and maintenance releases (two dots, patchlevel < 50)
1110 # PROOF for alpha releases.
1111 # PUBLISH can only be required manually when running make in doc/
1112 AC_SUBST(RENDITION)
1113 case `echo $VERSION|sed 's/[[^.]]//g'` in
1114 ""|".") RENDITION=DISTRIB;;
1115 "..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then
1116 RENDITION=DISTRIB
1117 else
1118 RENDITION=PROOF
1119 fi;;
1120 *) RENDITION=PROOF;;
1121 esac
1122
1123
1106 AC_CONFIG_COMMANDS([status],[ 1124 AC_CONFIG_COMMANDS([status],[
1107 cat <<EOF 1125 cat <<EOF
1108 1126
......
...@@ -28,6 +28,8 @@ INCFILES = \ ...@@ -28,6 +28,8 @@ INCFILES = \
28 sfrom.inc\ 28 sfrom.inc\
29 url-parse.inc 29 url-parse.inc
30 30
31 RENDITION_TEXI=rendition.texi macros.texi
32
31 mailutils_TEXINFOS = \ 33 mailutils_TEXINFOS = \
32 address.texi\ 34 address.texi\
33 attribute.texi\ 35 attribute.texi\
...@@ -70,12 +72,9 @@ mailutils_TEXINFOS = \ ...@@ -70,12 +72,9 @@ mailutils_TEXINFOS = \
70 smtp.texi\ 72 smtp.texi\
71 stream.texi\ 73 stream.texi\
72 url.texi\ 74 url.texi\
75 $(RENDITION_TEXI)\
73 $(INCFILES) 76 $(INCFILES)
74 77
75 muint_TEXINFOS = \
76 muint.texi\
77 mom.texi
78
79 ## Fake configure into including srcdir to VPATH: 78 ## Fake configure into including srcdir to VPATH:
80 s=${srcdir}:${top_srcdir}/examples/ 79 s=${srcdir}:${top_srcdir}/examples/
81 VPATH = $(s) 80 VPATH = $(s)
...@@ -89,9 +88,12 @@ MAINTAINERCLEANFILES=$(INCFILES) ...@@ -89,9 +88,12 @@ MAINTAINERCLEANFILES=$(INCFILES)
89 clean-local: 88 clean-local:
90 rm -rf manual 89 rm -rf manual
91 90
91 # The rendering level is one of PUBLISH, DISTRIB or PROOF.
92 # Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
93
94 MAKEINFOFLAGS=-D$(RENDITION)
92 GENDOCS=gendocs.sh 95 GENDOCS=gendocs.sh
93 TEXI2DVI=texi2dvi 96 TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
94 MAKEINFOFLAGS=
95 97
96 # Make sure you set TEXINPUTS. 98 # Make sure you set TEXINPUTS.
97 # TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions 99 # TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions
...@@ -114,3 +116,57 @@ untabify: ...@@ -114,3 +116,57 @@ untabify:
114 emacs -batch -l untabify.el $(info_TEXINFOS) $(mailutils_TEXINFOS) 116 emacs -batch -l untabify.el $(info_TEXINFOS) $(mailutils_TEXINFOS)
115 117
116 final: untabify master-menu 118 final: untabify master-menu
119
120
121 # Checks
122 check-format:
123 @if test -n "`cat $(info_TEXINFOS) $(mailutils_TEXINFOS) |\
124 tr -d -c '\t'`"; then \
125 echo "Sources contain tabs; run make untabify"; \
126 false; \
127 fi
128
129 check-refs:
130 @for file in $(info_TEXINFOS) $(dico_TEXINFOS); \
131 do \
132 sed -e = $$file | \
133 sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \
134 done > $@-t; \
135 if [ -s $@-t ]; then \
136 echo "Unresolved cross-references:"; \
137 cat $@-t;\
138 rm $@-t; \
139 else \
140 rm -f $@-t; \
141 fi
142
143 check-fixmes:
144 @for file in $(info_TEXINFOS); \
145 do \
146 sed -e = $$file | \
147 sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
148 done > $@-t; \
149 if [ -s $@-t ]; then \
150 echo "Unresolved FIXMEs:"; \
151 cat $@-t; \
152 rm $@-t; \
153 false; \
154 else \
155 rm -f $@-t; \
156 fi
157
158 check-unrevised:
159 @grep -Hn @UNREVISED $(info_TEXINFOS) $(dico_TEXINFOS) > $@-t; \
160 if [ -s $@-t ]; then \
161 echo "Unrevised nodes:"; \
162 cat $@-t; \
163 rm $@-t; \
164 false;\
165 else \
166 rm $@-t; \
167 fi
168
169 all-check-docs: check-format check-refs check-fixmes check-unrevised
170
171 check-docs:
172 $(MAKE) -k all-check-docs
......
...@@ -16,49 +16,41 @@ ...@@ -16,49 +16,41 @@
16 @end menu 16 @end menu
17 17
18 @node POP3 18 @node POP3
19 @comment node-name, next, previous, up
20 @section POP3 19 @section POP3
21 @cindex POP3 20 @cindex POP3
22 @include pop3.texi 21 @include pop3.texi
23 22
24 @node IMAP4 23 @node IMAP4
25 @comment node-name, next, previous, up
26 @section IMAP4 24 @section IMAP4
27 @cindex IMAP4 25 @cindex IMAP4
28 @include imap4.texi 26 @include imap4.texi
29 27
30 @node Mbox 28 @node Mbox
31 @comment node-name, next, previous, up
32 @section Mbox 29 @section Mbox
33 @cindex Mbox 30 @cindex Mbox
34 @include mbox.texi 31 @include mbox.texi
35 32
36 @node Mh 33 @node Mh
37 @comment node-name, next, previous, up
38 @section Mh 34 @section Mh
39 @cindex Mh 35 @cindex Mh
40 @include mh.texi 36 @include mh.texi
41 37
42 @node Maildir 38 @node Maildir
43 @comment node-name, next, previous, up
44 @section Maildir 39 @section Maildir
45 @cindex Maildir 40 @cindex Maildir
46 @include maildir.texi 41 @include maildir.texi
47 42
48 @node SMTP 43 @node SMTP
49 @comment node-name, next, previous, up
50 @section SMTP 44 @section SMTP
51 @cindex SMTP 45 @cindex SMTP
52 @include smtp.texi 46 @include smtp.texi
53 47
54 @node Sendmail 48 @node Sendmail
55 @comment node-name, next, previous, up
56 @section Sendmail 49 @section Sendmail
57 @cindex Sendmail 50 @cindex Sendmail
58 @include sendmail.texi 51 @include sendmail.texi
59 52
60 @node Parse822 53 @node Parse822
61 @comment node-name, next, previous, up
62 @section Parse822 54 @section Parse822
63 @cindex Parse822 55 @cindex Parse822
64 @include parse822.texi 56 @include parse822.texi
......
1 @setfilename fdl.info 1 @setfilename fdl.info
2 @node GNU FDL
2 @appendix GNU Free Documentation License 3 @appendix GNU Free Documentation License
3 @cindex FDL, GNU Free Documentation License 4 @cindex FDL, GNU Free Documentation License
4 @center Version 1.2, November 2002 5 @center Version 1.2, November 2002
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 </p> 34 </p>
35 <hr /> 35 <hr />
36 36
37 The manual for %%PACKAGE%% is available in the following formats:</p> 37 <p>The manual for %%PACKAGE%% is available in the following formats:</p>
38 38
39 <ul> 39 <ul>
40 <li><a href="%%PACKAGE%%.html">HTML 40 <li><a href="%%PACKAGE%%.html">HTML
...@@ -44,10 +44,10 @@ The manual for %%PACKAGE%% is available in the following formats:</p> ...@@ -44,10 +44,10 @@ The manual for %%PACKAGE%% is available in the following formats:</p>
44 <li><a href="%%PACKAGE%%.html.gz">HTML compressed 44 <li><a href="%%PACKAGE%%.html.gz">HTML compressed
45 (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on 45 (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
46 one web page.</li> 46 one web page.</li>
47 <li><a href="%%PACKAGE%%_html_node.tar.gz">HTML compressed 47 <li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
48 (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> - 48 (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
49 with one web page per node.</li> 49 with one web page per node.</li>
50 <li><a href="%%PACKAGE%%-info.tar.gz">Info document 50 <li><a href="%%PACKAGE%%.info.tar.gz">Info document
51 (%%INFO_TGZ_SIZE%%K characters gzipped tar file)</a>.</li> 51 (%%INFO_TGZ_SIZE%%K characters gzipped tar file)</a>.</li>
52 <li><a href="%%PACKAGE%%.txt">ASCII text 52 <li><a href="%%PACKAGE%%.txt">ASCII text
53 (%%ASCII_SIZE%%K characters)</a>.</li> 53 (%%ASCII_SIZE%%K characters)</a>.</li>
...@@ -77,7 +77,9 @@ href="%%SCRIPTURL%%">%%SCRIPTNAME%%</a> script.) ...@@ -77,7 +77,9 @@ href="%%SCRIPTURL%%">%%SCRIPTNAME%%</a> script.)
77 <p> 77 <p>
78 Return to the <a href="/home.html">GNU Project home page</a>. 78 Return to the <a href="/home.html">GNU Project home page</a>.
79 </p> 79 </p>
80 80 <p>
81 Return to <a href="/software/%%PACKAGE%%">GNU %%PACKAGE%% home page</a>.
82 </p>
81 <p> 83 <p>
82 Please send FSF &amp; GNU inquiries to 84 Please send FSF &amp; GNU inquiries to
83 <a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>. 85 <a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
...@@ -89,8 +91,8 @@ Please send broken links and other corrections (or suggestions) to ...@@ -89,8 +91,8 @@ Please send broken links and other corrections (or suggestions) to
89 </p> 91 </p>
90 92
91 <p> 93 <p>
92 Copyright (C) 2004 Free Software Foundation, Inc., 94 Copyright (C) 2005 Free Software Foundation, Inc.,
93 59 Temple Place - Suite 330, Boston, MA 02111, USA 95 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA
94 <br /> 96 <br />
95 Verbatim copying and distribution of this entire article is 97 Verbatim copying and distribution of this entire article is
96 permitted in any medium, provided this notice is preserved. 98 permitted in any medium, provided this notice is preserved.
......
...@@ -216,7 +216,7 @@ credentials for accessing the database are taken from global variables ...@@ -216,7 +216,7 @@ credentials for accessing the database are taken from global variables
216 and @code{sql_db}. The SQL queries for retrieving user information 216 and @code{sql_db}. The SQL queries for retrieving user information
217 from global variables @code{sql_getpwnam_query} and 217 from global variables @code{sql_getpwnam_query} and
218 @code{sql_getpwuid_query}. The variable @code{sql_getpass_query} keeps 218 @code{sql_getpwuid_query}. The variable @code{sql_getpass_query} keeps
219 the query used for retrieving user's password. @xref{auth}, for 219 the query used for retrieving user's password. @FIXME-xref{auth}, for
220 information on command line options used to set these variables. 220 information on command line options used to set these variables.
221 @end defvar 221 @end defvar
222 222
......
1 @macro xopindex{option,text}
2 @opindex \option\, --\option\ @r{option, \text\}
3 @end macro
...@@ -6,14 +6,9 @@ ...@@ -6,14 +6,9 @@
6 @finalout 6 @finalout
7 @c %**end of header 7 @c %**end of header
8 8
9 @c This file has the new style title page commands.
10 @c Run `makeinfo' rather than `texinfo-format-buffer'.
11 @c smallbook
12 @c tex
13 @c \overfullrule=0pt
14 @c end tex
15
16 @include version.texi 9 @include version.texi
10 @include macros.texi
11 @include rendition.texi
17 12
18 @c Combine indices. 13 @c Combine indices.
19 @defcodeindex op 14 @defcodeindex op
...@@ -23,7 +18,7 @@ ...@@ -23,7 +18,7 @@
23 @ifinfo 18 @ifinfo
24 @dircategory Email 19 @dircategory Email
25 @direntry 20 @direntry
26 * Mailutils: (mailutils). Utilities & library for mailboxes, protocols. 21 * Mailutils: (mailutils). GNU Mail Utilities.
27 @end direntry 22 @end direntry
28 @dircategory Individual utilities 23 @dircategory Individual utilities
29 @direntry 24 @direntry
...@@ -45,7 +40,7 @@ Published by the Free Software Foundation, ...@@ -45,7 +40,7 @@ Published by the Free Software Foundation,
45 51 Franklin Street, Fifth Floor 40 51 Franklin Street, Fifth Floor
46 Boston, MA 02110-1301, USA 41 Boston, MA 02110-1301, USA
47 42
48 Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 43 Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2008
49 Free Software Foundation, Inc. 44 Free Software Foundation, Inc.
50 45
51 Permission is granted to copy, distribute and/or modify this document 46 Permission is granted to copy, distribute and/or modify this document
...@@ -63,7 +58,7 @@ Software Foundation raise funds for GNU development.'' ...@@ -63,7 +58,7 @@ Software Foundation raise funds for GNU development.''
63 @titlepage 58 @titlepage
64 @title GNU Mailutils 59 @title GNU Mailutils
65 @subtitle version @value{VERSION}, @value{UPDATED} 60 @subtitle version @value{VERSION}, @value{UPDATED}
66 @author Alain Magloire et al. 61 @author Alain Magloire, Sergey Pozbyakoff et al.
67 @page 62 @page
68 @vskip 0pt plus 1filll 63 @vskip 0pt plus 1filll
69 @insertcopying 64 @insertcopying
...@@ -74,14 +69,13 @@ Software Foundation raise funds for GNU development.'' ...@@ -74,14 +69,13 @@ Software Foundation raise funds for GNU development.''
74 @page 69 @page
75 @contents 70 @contents
76 71
77 @node Top, Introduction, (dir), (dir) 72 @ifnottex
78 @comment node-name, next, previous, up 73 @node Top
74 @top GNU Mailutils
79 75
80 @ifinfo 76 This edition of the @cite{GNU Mailutils Manual}, last updated on
81 @chapter GNU Mailutils 77 @value{UPDATED}, documents GNU Mailutils Version @value{VERSION}.
82 This edition of the @cite{GNU Mailutils Manual}, last updated @value{UPDATED}, 78 @end ifnottex
83 documents GNU Mailutils Version @value{VERSION}.
84 @end ifinfo
85 79
86 @menu 80 @menu
87 * Introduction:: Preliminary Information. 81 * Introduction:: Preliminary Information.
...@@ -89,12 +83,13 @@ documents GNU Mailutils Version @value{VERSION}. ...@@ -89,12 +83,13 @@ documents GNU Mailutils Version @value{VERSION}.
89 * Libraries:: Mailutils Libraries. 83 * Libraries:: Mailutils Libraries.
90 * Sieve Language:: The Sieve Language. 84 * Sieve Language:: The Sieve Language.
91 * Reporting Bugs:: How to Report a Bug. 85 * Reporting Bugs:: How to Report a Bug.
92 * News:: Getting News About @sc{gnu} Mailutils. 86 * News:: Getting News About GNU Mailutils.
93 * Acknowledgement:: Thanks and Credits. 87 * Acknowledgement:: Thanks and Credits.
94 88
95 Appendices 89 Appendices
96 90
97 * References:: References. 91 * References:: References.
92 * Usage Vars:: Configuring Help Summary
98 * GNU FDL:: This manual is under the GNU Free 93 * GNU FDL:: This manual is under the GNU Free
99 Documentation License. 94 Documentation License.
100 95
...@@ -136,18 +131,6 @@ Mailutils Programs ...@@ -136,18 +131,6 @@ Mailutils Programs
136 131
137 * mailutils-config:: Get the Information about the Mailutils Build. 132 * mailutils-config:: Get the Information about the Mailutils Build.
138 133
139 Mailutils Configuration File
140
141 * common:: Options understood by most @sc{gnu} utilities.
142 * mailbox:: Specifies the mail spool location, and locking strategy.
143 * mailer:: Sets the mailer URL.
144 * address:: Specifies the default email address and domain.
145 * daemon:: Options common for daemon programs.
146 * auth:: Authentication-specific options.
147 * encryption:: Encryption options.
148 * logging:: Logging control options.
149 * sieve: sieve group. Sieve specific options
150 * config sample:: A sample configuration file.
151 134
152 @command{mail} --- Send and Receive Mail 135 @command{mail} --- Send and Receive Mail
153 136
...@@ -360,24 +343,60 @@ Preprocessor ...@@ -360,24 +343,60 @@ Preprocessor
360 @end detailmenu 343 @end detailmenu
361 @end menu 344 @end menu
362 345
363 @node Introduction, Programs, Top, Top 346 @node Introduction
364 @comment node-name, next, previous, up
365 @chapter Introduction 347 @chapter Introduction
366 348
367 @sc{gnu} Mailutils contains a series of useful mail clients, servers, 349 GNU Mailutils contains a series of useful mail clients, servers,
368 and libraries. These are the primary mail utilities of the GNU system. 350 and libraries. These are the primary mail utilities of the GNU system.
369 Specifically, this package contains a POP3 server, an IMAP4 server, 351 Specifically, this package contains a POP3 server, an IMAP4 server,
370 and a Sieve mail filter. It also provides a POSIX `mailx' client, 352 and a Sieve mail filter. It also provides a POSIX `mailx' client,
371 and a collection of other tools. The central library is capable of 353 and a collection of other tools. All utilities can manipulate the
372 accessing different mailbox formats and mailers as well as off of 354 mailboxes of various formats, both local, stored on the hard disk,
373 local or remote POP3 and IMAP4 servers. 355 and remote, accessed via network protocols, such as POP3 or IMAP4.
356
357 The GNU Mailutils libraries supply a rich set of primitives for
358 handling electronic mail in programs written in C, C++ or Scheme.
374 359
375 This software is part of the GNU Project and belongs to the Free 360 This software is part of the GNU Project and belongs to the Free
376 Software Foundation. All libraries are licensed using the GNU LGPL. 361 Software Foundation. All libraries are licensed using the GNU LGPL.
377 The documentation is licensed under the GNU FDL, and everything 362 The documentation is licensed under the GNU FDL, and everything
378 else is licensed using the GNU GPL. 363 else is licensed using the GNU GPL.
379 364
380 @subheading Why use this package? 365 @menu
366 * Book Contents:: What this Book Contains
367 * History:: A bit of History
368 @end menu
369
370 @node Book Contents
371 @section What this Book Contains
372 @UNREVISED
373
374 @FIXME{This is more a plan on how the document should be structured,
375 than a description of its actual structure. However it is:}
376
377 This book addresses a wide audience of both system administrators
378 and users that aim to use Mailutils programs, and programmers who wish
379 to use Mailutils libraries in their programs. Given this audience,
380 the book is divided in three major parts.
381
382 The first part provides a detailed description of each Mailutils
383 utility, and advices on how to use them in various situations. This
384 part is intended for users and system administrators who are using
385 Mailutils programs. If you are not interested in programming using
386 Mailutils, this is the only part you need to read.
387
388 Subsequent parts address programmers.
389
390 The second part is a tutorial which provides an introduction to
391 programming techniques for writing mail applications using GNU
392 Mailutils.
393
394 Finally, the third part contains a complete Mailutils library
395 reference.
396
397 @node History
398 @section A bit of History, and why use this package?
399 @UNREVISED
381 400
382 This package started off to try and handle large mailbox files more 401 This package started off to try and handle large mailbox files more
383 gracefully then current POP3 servers did. While it handles this task, 402 gracefully then current POP3 servers did. While it handles this task,
...@@ -386,14 +405,12 @@ without any real effort on your part. Also, if a new format is added ...@@ -386,14 +405,12 @@ without any real effort on your part. Also, if a new format is added
386 at a later date, your program will support that new format 405 at a later date, your program will support that new format
387 automatically as soon as it is compiled against the new library. 406 automatically as soon as it is compiled against the new library.
388 407
389 @node Programs, Libraries, Introduction, Top 408 @node Programs
390 @comment node-name, next, previous, up
391 @chapter Mailutils Programs 409 @chapter Mailutils Programs
392 @cindex Programs 410 @cindex Programs
393 @include programs.texi 411 @include programs.texi
394 412
395 @node Libraries, Sieve Language, Programs, Top 413 @node Libraries
396 @comment node-name, next, previous, up
397 @chapter Mailutils Libraries 414 @chapter Mailutils Libraries
398 @cindex Libraries 415 @cindex Libraries
399 416
...@@ -404,46 +421,38 @@ automatically as soon as it is compiled against the new library. ...@@ -404,46 +421,38 @@ automatically as soon as it is compiled against the new library.
404 * libsieve:: GNU Implementation of Sieve Mail Filtering. 421 * libsieve:: GNU Implementation of Sieve Mail Filtering.
405 @end menu 422 @end menu
406 423
407 @node libmailbox, libmuauth, Libraries, Libraries 424 @node libmailbox
408 @comment node-name, next, previous, up
409 @section Framework 425 @section Framework
410 @cindex Framework 426 @cindex Framework
411 @include framework.texi 427 @include framework.texi
412 428
413 @node libmuauth, libmu_scm, libmailbox, Libraries 429 @node libmuauth
414 @comment node-name, next, previous, up
415 @section Authentication Library 430 @section Authentication Library
416 @cindex Authentication Library 431 @cindex Authentication Library
417 @cindex libmuauth 432 @cindex libmuauth
418 @include libmuauth.texi 433 @include libmuauth.texi
419 434
420 @node libmu_scm, libsieve, libmuauth, Libraries 435 @node libmu_scm
421 @comment node-name, next, previous, up
422 @section Mailutils to Scheme Interface 436 @section Mailutils to Scheme Interface
423 @cindex Scheme 437 @cindex Scheme
424 @cindex libmu_scm 438 @cindex libmu_scm
425 @include libmu_scm.texi 439 @include libmu_scm.texi
426 440
427 @node libsieve, , libmu_scm, Libraries 441 @node libsieve
428 @comment node-name, next, previous, up
429 @section Sieve Library 442 @section Sieve Library
430 @cindex Sieve Library 443 @cindex Sieve Library
431 @cindex libsieve 444 @cindex libsieve
432 @include libsieve.texi 445 @include libsieve.texi
433 446
434 @node Sieve Language, Reporting Bugs, Libraries, Top 447 @node Sieve Language
435 @comment node-name, next, previous, up
436 @chapter Sieve Language 448 @chapter Sieve Language
437 @cindex Sieve Language 449 @cindex Sieve Language
438 @include sieve.texi 450 @include sieve.texi
439 451
440 @node Reporting Bugs, News, Sieve Language, Top 452 @node Reporting Bugs
441 @comment node-name, next, previous, up
442 @chapter Reporting Bugs 453 @chapter Reporting Bugs
443 454
444 Email bug reports to @email{bug-mailutils@@gnu.org}. 455 Email bug reports to @email{bug-mailutils@@gnu.org}.
445 Be sure to include the word ``mailutils'' somewhere
446 in the ``Subject:'' field.
447 456
448 As the purpose of bug reporting is to improve software, please be sure 457 As the purpose of bug reporting is to improve software, please be sure
449 to include maximum information when reporting a bug. The information 458 to include maximum information when reporting a bug. The information
...@@ -458,19 +467,17 @@ needed is: ...@@ -458,19 +467,17 @@ needed is:
458 The archives of bug-mailutils mailing list are available from 467 The archives of bug-mailutils mailing list are available from
459 @url{http://mail.gnu.org/@/mailman/@/listinfo/@/bug-mailutils}. 468 @url{http://mail.gnu.org/@/mailman/@/listinfo/@/bug-mailutils}.
460 469
461 @node News, Acknowledgement, Reporting Bugs, Top 470 @node News
462 @comment node-name, next, previous, up 471 @chapter Getting News About GNU Mailutils
463 @chapter Getting News About @sc{gnu} Mailutils
464 472
465 The two places to look for any news regarding @sc{gnu} Mailutils are the 473 The two places to look for any news regarding GNU Mailutils are the
466 Mailutils homepage at @url{http://www.gnu.org/@/software/@/mailutils}, and the 474 Mailutils homepage at @url{http://www.gnu.org/@/software/@/mailutils}, and the
467 project page at @url{http://savannah.gnu.org/@/projects/@/mailutils}. 475 project page at @url{http://savannah.gnu.org/@/projects/@/mailutils}.
468 476
469 The updated versions of this manual are available online from 477 The updated versions of this manual are available online from
470 @url{http://www.gnu.org/@/software/@/mailutils/@/manual}. 478 @url{http://www.gnu.org/@/software/@/mailutils/@/manual}.
471 479
472 @node Acknowledgement, References, News, Top 480 @node Acknowledgement
473 @comment node-name, next, previous, up
474 @chapter Acknowledgement 481 @chapter Acknowledgement
475 482
476 In no particular order, 483 In no particular order,
...@@ -500,8 +507,7 @@ Jordi Mallach @email{jordi@@sindominio.net} ...@@ -500,8 +507,7 @@ Jordi Mallach @email{jordi@@sindominio.net}
500 Wojciech Polak @email{polak@@gnu.org} 507 Wojciech Polak @email{polak@@gnu.org}
501 @end itemize 508 @end itemize
502 509
503 @node References, GNU FDL, Acknowledgement, Top 510 @node References
504 @comment node-name, next, previous, up
505 @appendix References 511 @appendix References
506 512
507 @itemize @bullet 513 @itemize @bullet
...@@ -619,12 +625,11 @@ Notifications} ...@@ -619,12 +625,11 @@ Notifications}
619 @end itemize 625 @end itemize
620 @end itemize 626 @end itemize
621 627
622 @node GNU FDL, Function Index, References, Top 628 @include usage.texi
623 @comment node-name, next, previous, up 629
624 @include fdl.texi 630 @include fdl.texi
625 631
626 @node Function Index, Variable Index, GNU FDL, Top 632 @node Function Index
627 @comment node-name, next, previous, up
628 @unnumbered Function Index 633 @unnumbered Function Index
629 634
630 This is an alphabetical list of all Mailutils functions. 635 This is an alphabetical list of all Mailutils functions.
...@@ -632,25 +637,23 @@ This is an alphabetical list of all Mailutils functions. ...@@ -632,25 +637,23 @@ This is an alphabetical list of all Mailutils functions.
632 @printindex fn 637 @printindex fn
633 @page 638 @page
634 639
635 @node Variable Index, Keyword Index, Function Index, Top 640 @node Variable Index
636 @unnumbered Variable Index 641 @unnumbered Variable Index
637 @printindex vr 642 @printindex vr
638 @page 643 @page
639 644
640 @node Keyword Index, Program Index, Variable Index, Top 645 @node Keyword Index
641 @unnumbered Keyword Index 646 @unnumbered Keyword Index
642 @printindex ky 647 @printindex ky
643 @page 648 @page
644 649
645 @node Program Index, Concept Index, Keyword Index, Top 650 @node Program Index
646 @comment node-name, next, previous, up
647 @unnumbered Program Index 651 @unnumbered Program Index
648 652
649 @printindex pg 653 @printindex pg
650 @page 654 @page
651 655
652 @node Concept Index, , Program Index, Top 656 @node Concept Index
653 @comment node-name, next, previous, up
654 @unnumbered Concept Index 657 @unnumbered Concept Index
655 658
656 This is a general index of all issues discussed in this manual 659 This is a general index of all issues discussed in this manual
......
1 @c Let's use the concept of 'renditions' by Fra@,{c}ois Pinard
2 @c I extended it by adding a FIXME_FOOTNOTE variable, which controls
3 @c whether FIXME information should be placed in footnotes or
4 @c inlined.
5
6 @c ======================================================================
7 @c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF,
8 @c as decided by @set symbols. The PUBLISH rendition does not show
9 @c notes or marks asking for revision. Most users will prefer having more
10 @c information, even if this information is not fully revised for adequacy,
11 @c so DISTRIB is the default for distributions. The PROOF rendition
12 @c show all marks to the point of ugliness, but is nevertheless useful to
13 @c those working on the manual itself.
14 @c ======================================================================
15
16 @c Set this symbol if you wish FIXMEs to appear in footnotes, instead
17 @c of being inserted into the text.
18 @c @set PROOF_FOOTNOTED
19
20 @ifclear PUBLISH
21 @ifclear DISTRIB
22 @ifclear PROOF
23 @set DISTRIB
24 @end ifclear
25 @end ifclear
26 @end ifclear
27
28 @ifset PUBLISH
29 @set RENDITION The book, version
30 @end ifset
31
32 @ifset DISTRIB
33 @set RENDITION FTP release, version
34 @end ifset
35
36 @ifset PROOF
37 @set RENDITION Proof reading version
38 @end ifset
39
40 @c Output marks for nodes needing revision, but not in PUBLISH rendition.
41
42 @macro UNREVISED
43 @ifclear PUBLISH
44 @quotation
45 (@emph{The information in this node may be obsolete or otherwise inaccurate.}
46 This message will disappear, once this node revised.)
47 @end quotation
48 @end ifclear
49 @end macro
50
51 @c Output various FIXME information only in PROOF rendition.
52
53 @macro FIXME{string}
54 @ifset PROOF
55 @ifset PROOF_FOOTNOTED
56 @footnote{@strong{FIXME:} \string\}
57 @end ifset
58 @ifclear PROOF_FOOTNOTED
59 @cartouche
60 @strong{<FIXME>} \string\ @strong{</>}
61 @end cartouche
62 @end ifclear
63 @end ifset
64
65 @end macro
66
67 @macro FIXME-ref{string}
68 @ifset PROOF
69 @strong{<REF>} \string\ @strong{</>}
70 @end ifset
71
72 @end macro
73
74 @macro FIXME-pxref{string}
75 @ifset PROOF
76 @strong{<PXREF>} \string\ @strong{</>}
77 @end ifset
78
79 @end macro
80
81 @macro FIXME-xref{string}
82 @ifset PROOF
83 @strong{<XREF>} \string\ @strong{</>}
84 @end ifset
85
86 @end macro
...@@ -392,7 +392,7 @@ If @var{filename} starts with a directory separator character ...@@ -392,7 +392,7 @@ If @var{filename} starts with a directory separator character
392 The @code{#searchpath} directive adds its argument to the list of 392 The @code{#searchpath} directive adds its argument to the list of
393 directories searched for loadable modules. It has the same effect 393 directories searched for loadable modules. It has the same effect
394 as @option{-L} command line switch used by @sc{gnu} sieve utility 394 as @option{-L} command line switch used by @sc{gnu} sieve utility
395 (@pxref{sieve group}). 395 (@FIXME-pxref{sieve group}).
396 396
397 @node Require Statement 397 @node Require Statement
398 @section Require Statement 398 @section Require Statement
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 2007 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2008 Free Software Foundation, Inc.
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public 5 modify it under the terms of the GNU Lesser General Public
...@@ -25,10 +25,17 @@ ...@@ -25,10 +25,17 @@
25 extern "C" { 25 extern "C" {
26 #endif 26 #endif
27 27
28 struct mu_conf_option
29 {
30 char *name;
31 char *descr;
32 };
33
28 extern char *mu_license_text; 34 extern char *mu_license_text;
29 extern void mu_print_options (void); 35 extern void mu_print_options (void);
30 extern void mu_fprint_options (FILE *fp); 36 extern void mu_fprint_options (FILE *fp);
31 extern const char *mu_check_option (char *name); 37 extern void mu_fprint_conf_option (FILE *fp, const struct mu_conf_option *opt);
38 extern const struct mu_conf_option *mu_check_option (char *name);
32 39
33 #ifdef __cplusplus 40 #ifdef __cplusplus
34 } 41 }
......
...@@ -58,16 +58,21 @@ static struct argp_option mu_common_argp_options[] = ...@@ -58,16 +58,21 @@ static struct argp_option mu_common_argp_options[] =
58 N_("Show compilation options"), 0 }, 58 N_("Show compilation options"), 0 },
59 { "config-help", OPT_HELP_CONFIG, NULL, 0, 59 { "config-help", OPT_HELP_CONFIG, NULL, 0,
60 N_("Show configuration file summary"), 0 }, 60 N_("Show configuration file summary"), 0 },
61 { "no-user-rcfile", OPT_NO_USER_RCFILE, NULL, 0, 61 { "no-user-config", OPT_NO_USER_RCFILE, NULL, 0,
62 N_("Do not load user configuration file"), 0 }, 62 N_("Do not load user configuration file"), 0 },
63 { "no-site-rcfile", OPT_NO_SITE_RCFILE, NULL, 0, 63 { "no-user-rcfile", 0, NULL, OPTION_ALIAS, NULL },
64 { "no-site-config", OPT_NO_SITE_RCFILE, NULL, 0,
64 N_("Do not load site configuration file"), 0 }, 65 N_("Do not load site configuration file"), 0 },
65 { "rcfile", OPT_RCFILE, N_("FILE"), 0, 66 { "no-site-rcfile", 0, NULL, OPTION_ALIAS, NULL },
67 { "config-file", OPT_RCFILE, N_("FILE"), 0,
66 N_("Load this configuration file"), 0, }, 68 N_("Load this configuration file"), 0, },
67 { "rcfile-verbose", OPT_RCFILE_VERBOSE, NULL, 0, 69 { "rcfile", 0, NULL, OPTION_ALIAS, NULL },
70 { "config-verbose", OPT_RCFILE_VERBOSE, NULL, 0,
68 N_("Verbosely log parsing of the configuration files"), 0 }, 71 N_("Verbosely log parsing of the configuration files"), 0 },
69 { "rcfile-lint", OPT_RCFILE_LINT, NULL, 0, 72 { "rcfile-verbose", 0, NULL, OPTION_ALIAS, NULL },
73 { "config-lint", OPT_RCFILE_LINT, NULL, 0,
70 N_("Check configuration file syntax and exit"), 0 }, 74 N_("Check configuration file syntax and exit"), 0 },
75 { "rcfile-lint", 0, NULL, OPTION_ALIAS, NULL },
71 { NULL, 0, NULL, 0, NULL, 0 } 76 { NULL, 0, NULL, 0, NULL, 0 }
72 }; 77 };
73 78
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
21 #endif 21 #endif
22 22
23 #include <mailutils/nls.h> 23 #include <mailutils/nls.h>
24 #include <mailutils/version.h>
24 #include <stdio.h> 25 #include <stdio.h>
25 #include <string.h> 26 #include <string.h>
26 27
...@@ -42,121 +43,130 @@ char *mu_license_text = ...@@ -42,121 +43,130 @@ char *mu_license_text =
42 "\n" 43 "\n"
43 ); 44 );
44 45
45 static char *mu_conf_option[] = { 46 static struct mu_conf_option mu_conf_option[] = {
46 "VERSION=" VERSION, 47 { "VERSION=" VERSION, N_("Version of this package") },
47 #ifdef USE_LIBPAM 48 #ifdef USE_LIBPAM
48 "USE_LIBPAM", 49 { "USE_LIBPAM", N_("PAM support") },
49 #endif 50 #endif
50 #ifdef HAVE_LIBLTDL 51 #ifdef HAVE_LIBLTDL
51 "HAVE_LIBLTDL", 52 { "HAVE_LIBLTDL", N_("a portable `dlopen' wrapper library") },
52 #endif 53 #endif
53 #ifdef WITH_BDB2 54 #ifdef WITH_BDB2
54 "WITH_BDB2", 55 { "WITH_BDB2", N_("Berkeley DB v. 2") },
55 #endif 56 #endif
56 #ifdef WITH_NDBM 57 #ifdef WITH_NDBM
57 "WITH_NDBM", 58 { "WITH_NDBM", },
58 #endif 59 #endif
59 #ifdef WITH_OLD_DBM 60 #ifdef WITH_OLD_DBM
60 "WITH_OLD_DBM", 61 { "WITH_OLD_DBM", N_("Old DBM support") },
61 #endif 62 #endif
62 #ifdef WITH_GDBM 63 #ifdef WITH_GDBM
63 "WITH_GDBM", 64 { "WITH_GDBM", N_("GNU DBM") },
64 #endif 65 #endif
65 #ifdef WITH_GNUTLS 66 #ifdef WITH_GNUTLS
66 "WITH_GNUTLS", 67 { "WITH_GNUTLS", N_("TLS support using GNU TLS") },
67 #endif 68 #endif
68 #ifdef WITH_GSASL 69 #ifdef WITH_GSASL
69 "WITH_GSASL", 70 { "WITH_GSASL", N_("SASL support using GNU SASL") },
70 #endif 71 #endif
71 #ifdef WITH_GSSAPI 72 #ifdef WITH_GSSAPI
72 "WITH_GSSAPI", 73 { "WITH_GSSAPI", N_("GSSAPI support") },
73 #endif 74 #endif
74 #ifdef WITH_GUILE 75 #ifdef WITH_GUILE
75 "WITH_GUILE", 76 { "WITH_GUILE", N_("Support for Guile as extension language") },
76 #endif 77 #endif
77 #ifdef WITH_PTHREAD 78 #ifdef WITH_PTHREAD
78 "WITH_PTHREAD", 79 { "WITH_PTHREAD", N_("Support for POSIX threads") },
79 #endif 80 #endif
80 #ifdef WITH_READLINE 81 #ifdef WITH_READLINE
81 "WITH_READLINE", 82 { "WITH_READLINE", N_("GNU Readline") },
82 #endif 83 #endif
83 #ifdef HAVE_MYSQL 84 #ifdef HAVE_MYSQL
84 "HAVE_MYSQL", 85 { "HAVE_MYSQL", N_("MySQL") },
85 #endif 86 #endif
86 #ifdef HAVE_PGSQL 87 #ifdef HAVE_PGSQL
87 "HAVE_PGSQL", 88 { "HAVE_PGSQL", N_("PostgreSQL") },
88 #endif 89 #endif
89 #ifdef WITH_LDAP 90 #ifdef WITH_LDAP
90 "WITH_LDAP", 91 { "WITH_LDAP", },
91 #endif 92 #endif
92 #ifdef ENABLE_VIRTUAL_DOMAINS 93 #ifdef ENABLE_VIRTUAL_DOMAINS
93 "ENABLE_VIRTUAL_DOMAINS", 94 { "ENABLE_VIRTUAL_DOMAINS", N_("Support for virtual mail domains") },
94 #endif 95 #endif
95 #ifdef ENABLE_IMAP 96 #ifdef ENABLE_IMAP
96 "ENABLE_IMAP", 97 { "ENABLE_IMAP", N_("IMAP4D protocol support") },
97 #endif 98 #endif
98 #ifdef ENABLE_POP 99 #ifdef ENABLE_POP
99 "ENABLE_POP", 100 { "ENABLE_POP", N_("POP3D protocol support") },
100 #endif 101 #endif
101 #ifdef ENABLE_MH 102 #ifdef ENABLE_MH
102 "ENABLE_MH", 103 { "ENABLE_MH", N_("MH mail storage support") },
103 #endif 104 #endif
104 #ifdef ENABLE_MAILDIR 105 #ifdef ENABLE_MAILDIR
105 "ENABLE_MAILDIR", 106 { "ENABLE_MAILDIR", N_("Maildir mail storage support") },
106 #endif 107 #endif
107 #ifdef ENABLE_SMTP 108 #ifdef ENABLE_SMTP
108 "ENABLE_SMTP", 109 { "ENABLE_SMTP", N_("SMTP protocol support") },
109 #endif 110 #endif
110 #ifdef ENABLE_SENDMAIL 111 #ifdef ENABLE_SENDMAIL
111 "ENABLE_SENDMAIL", 112 { "ENABLE_SENDMAIL", N_("Sendmail command line interface support")},
112 #endif 113 #endif
113 #ifdef ENABLE_NNTP 114 #ifdef ENABLE_NNTP
114 "ENABLE_NNTP", 115 { "ENABLE_NNTP", N_("NNTP protocol support") },
115 #endif 116 #endif
116 #ifdef ENABLE_RADIUS 117 #ifdef ENABLE_RADIUS
117 "ENABLE_RADIUS", 118 { "ENABLE_RADIUS", N_("RADIUS protocol support") },
118 #endif 119 #endif
119 #ifdef WITH_INCLUDED_LIBINTL 120 #ifdef WITH_INCLUDED_LIBINTL
120 "WITH_INCLUDED_LIBINTL", 121 { "WITH_INCLUDED_LIBINTL", N_("GNU libintl compiled in") },
121 #endif 122 #endif
122 NULL 123 { NULL }
123 }; 124 };
124 125
125 void 126 void
127 mu_fprint_conf_option (FILE *fp, const struct mu_conf_option *opt)
128 {
129 fprintf (fp, "%s", opt->name);
130 if (opt->descr)
131 fprintf (fp, "\t- %s", _(opt->descr));
132 fputc('\n', fp);
133 }
134
135 void
126 mu_fprint_options (FILE *fp) 136 mu_fprint_options (FILE *fp)
127 { 137 {
128 int i; 138 int i;
129 139
130 for (i = 0; mu_conf_option[i]; i++) 140 for (i = 0; mu_conf_option[i].name; i++)
131 fprintf (fp, "%s\n", mu_conf_option[i]); 141 mu_fprint_conf_option (fp, mu_conf_option + i);
132 } 142 }
133 143
134 void 144 void
135 mu_print_options (FILE *fp) 145 mu_print_options ()
136 { 146 {
137 mu_fprint_options (stdout); 147 mu_fprint_options (stdout);
138 } 148 }
139 149
140 const char * 150 const struct mu_conf_option *
141 mu_check_option (char *name) 151 mu_check_option (char *name)
142 { 152 {
143 int i; 153 int i;
144 154
145 for (i = 0; mu_conf_option[i]; i++) 155 for (i = 0; mu_conf_option[i].name; i++)
146 { 156 {
147 int len; 157 int len;
148 char *q, *p = strchr (mu_conf_option[i], '='); 158 char *q, *p = strchr (mu_conf_option[i].name, '=');
149 if (p) 159 if (p)
150 len = p - mu_conf_option[i]; 160 len = p - mu_conf_option[i].name;
151 else 161 else
152 len = strlen (mu_conf_option[i]); 162 len = strlen (mu_conf_option[i].name);
153 163
154 if (strncasecmp (mu_conf_option[i], name, len) == 0) 164 if (strncasecmp (mu_conf_option[i].name, name, len) == 0)
155 return mu_conf_option[i]; 165 return &mu_conf_option[i];
156 else if ((q = strchr (mu_conf_option[i], '_')) != NULL 166 else if ((q = strchr (mu_conf_option[i].name, '_')) != NULL
157 && strncasecmp (q + 1, name, 167 && strncasecmp (q + 1, name,
158 len - (q - mu_conf_option[i]) - 1) == 0) 168 len - (q - mu_conf_option[i].name) - 1) == 0)
159 return mu_conf_option[i]; 169 return &mu_conf_option[i];
160 } 170 }
161 return NULL; 171 return NULL;
162 } 172 }
......
...@@ -370,12 +370,13 @@ proc mu_version {} { ...@@ -370,12 +370,13 @@ proc mu_version {} {
370 } 370 }
371 371
372 set output [remote_exec host "$MU_TOOL --show-config-options"] 372 set output [remote_exec host "$MU_TOOL --show-config-options"]
373 set flg [split [lindex $output 1]] 373 set flg [split [lindex $output 1] "\n"]
374 for {set i 0} {$i < [llength $flg]} {incr i} { 374 for {set i 0} {$i < [llength $flg]} {incr i} {
375 if [regexp "(.*)=(.*)" [lindex $flg $i] var name value] { 375 regsub "(\t.*)?\r" [lindex $flg $i] "" string
376 if [regexp "(.*)=(.*)" $string var name value] {
376 set MU_CAPABILITY($name) $value 377 set MU_CAPABILITY($name) $value
377 } else { 378 } elseif {$string != ""} {
378 set MU_CAPABILITY([lindex $flg $i]) 1 379 set MU_CAPABILITY($string) 1
379 } 380 }
380 } 381 }
381 if [info exists MU_CAPABILITY(VERSION)] { 382 if [info exists MU_CAPABILITY(VERSION)] {
......