85b3b7e36cbcd87e9d443ad64c60a047a7e661b6
[apps/madmutt.git] / doc / devel-notes.txt
1 Subject: Developers' notes
2 From: Thomas Roessler <roessler@guug.de>
3 Date: Tue,  9 May 2000 19:48:08 +0200
4
5
6 Required tools
7 --------------
8
9 If you are planning to hack on mutt-ng, please subscribe to the
10 mutt-dev mailinglist (mutt-ng-deve-@lists.berlios.de).
11 Announcements about recent development
12 versions go to that mailing list, as go technical discussions and
13 patches.
14
15 You'll need several GNU development utilities for working on mutt-ng:
16
17 - automake
18
19 - autoconf
20
21 - autoheader
22
23 - The i18n stuff requires GNU gettext.  See intl/VERSION for the
24   version we are currently relying on.  Please note that using
25   gettext-0.10 will most probably not work - get the latest test
26   release from alpha.gnu.org, it's the recommended version of
27   gettext anyway.
28
29   If you are experiencing problems with unknown "dcgettext" symbols,
30   the autoconf/automake macros from your gettext package are broken.
31   Apply the following patch to that macro file (usually found under
32   /usr/share/aclocal/gettext.m4):
33
34 --- gettext.m4.bak      Thu Jul  2 18:46:08 1998
35 +++ gettext.m4  Mon Oct  5 23:32:54 1998
36 @@ -46,12 +46,13 @@
37  
38            if test "$gt_cv_func_gettext_libc" != "yes"; then
39              AC_CHECK_LIB(intl, bindtextdomain,
40 -              [AC_CACHE_CHECK([for gettext in libintl],
41 -                gt_cv_func_gettext_libintl,
42 -                [AC_CHECK_LIB(intl, gettext,
43 -                 gt_cv_func_gettext_libintl=yes,
44 -                 gt_cv_func_gettext_libintl=no)],
45 +              [AC_CHECK_LIB(intl, gettext,
46 +                gt_cv_func_gettext_libintl=yes,
47                  gt_cv_func_gettext_libintl=no)])
48 +          fi
49 +
50 +          if test "$gt_cv_func_gettext_libintl" = "yes" ; then
51 +            LIBS="-lintl $LIBS"
52            fi
53  
54            if test "$gt_cv_func_gettext_libc" = "yes" \
55
56
57 - GNU make may be needed for the dependency tricks
58
59
60 Getting started from CVS
61 ------------------------
62
63 Once you've checked out a copy of the source from CVS, you'll need to
64 run the script called 'prepare' that is in the root directory.  The
65 script does all the automake/autoconf magic that needs to be done with
66 a fresh checkout.
67
68
69 A word about warnings
70 ---------------------
71
72 Mutt's default build process sets some pretty restrictive compiler
73 flags which may lead to lots of warnings.  Generally, warnings are
74 something which should be eliminated.
75
76 Nevertheless, the code in intl/ is said to generate some warnings with
77 the compiler settings we usually rely upon.  This code is not
78 maintained by the mutt-ng developpers, so please redirect any comments to
79 the GNU gettext library's developpers.
80
81
82 Style Guide
83 -----------
84
85 - global functions should have the prefix "mutt_".  All
86   other functions should be declared "static".
87
88 - avoid global vars where possible.  If one is required,
89   try to contain it to a single source file and declare it
90   "static".  Global vars should have the first letter of
91   each word capitilized, and no underscores should be used
92   (e.g., MailGid, LastFolder, MailDir).
93
94 - re-use code as much as possible.  There are a lot of
95   "library" functions. One of the biggest causes of bloat
96   in ELM and PINE is the tremendous duplication of code...
97   Help keep Mutt small!
98
99 - when adding new options, make the old behaviour the
100   default.
101
102 - try to keep mutt-ng as portable as possible.
103
104 - do not use C++-style comments (i.e. "// Comment")
105
106 Documentation
107 -------------
108
109 Please document your changes.  Note that there are several places
110 where you may have to add documentation:
111
112 - doc/manual.sgml.{head,tail} contain The Manual.
113
114 - doc/muttngrc.man.{head,tail} contain an abriged version of The
115   Manual in nroff format (see man(7)), which deals with
116   configuration file commands.
117
118 Configuration _variables_ are documented directly in init.h.   Note
119 that this includes documentation for possibly added format flags!
120
121 When adding variables which depend on system-functionality and/or
122 ./configure switches, you have to add additional availability
123 information to avoid confusion in the manual.
124
125 The parts of The Manual and the muttngrc manual page dealing with
126 these variables, and the global Muttrc, are generated automatically
127 from that documentation.  To start this process, type "make
128 update-doc" in the top-level source directory.
129
130 Note that you may have to update the makedoc utility (makedoc.c)
131 when adding new data types to init.h.
132
133 More precisely, variable name, type, and default value are directly
134 extracted from the initializer for the MuttVars array. Documentation
135 is exepected in special comments which _follow_ the initializer.
136 For a line to be included with the documentation, it must (after,
137 possibly, some white space) begin with with either "/**" or "**".
138 Any following white space is ignored. The rest of the line is
139 expected to be plain text, with some formatting instructions roughly
140 similar to [ntg]roff:
141
142  - \fI switches to italics
143  
144  - \fB switches to boldface
145
146  - \fP switches to normal display
147
148  - \(as can be used to represent an asterisk (*).  This is intended
149    to help avoiding character sequences such as /* or */ inside
150    comments.
151
152  - \(rs can be used to represent a backslash (\).  This is intended
153    to help avoiding poblems when trying to represent any of the \
154    sequences used by makedoc.
155
156  - .dl on a line starts a "definition list" environment (name taken
157     from HTML) where terms and definitions alternate.
158
159  - .dt marks a term in a definition list.
160
161  - .dd marks a definition in a definition list.
162
163  - .de on a line finishes a definition list environment.
164
165  - .ts on a line starts a "verbose tscreen" environment (name taken from
166    SGML).  Please try to keep lines inside such an environment
167    short; a length of abut 40 characters should be ok.  This is
168    necessary to avoid a really bad-looking muttngrc (5) manual page.
169
170  - .te on a line finishes this environment.
171
172  - .pp on a line starts a paragraph.
173
174  - $word will be converted to a reference to word, where appropriate.
175    Note that $$word is possible as well.
176    Use $$$ to get a literal $ without making a reference.
177
178  - '. ' in the beginning of a line expands to two space characters.
179    This is used to protect indentations in tables.
180
181 Do _not_ use any other SGML or nroff formatting instructions here!
182
183 $Id: devel-notes.txt,v 3.0 2002/01/24 13:35:07 roessler Exp $