Subject: Developers' notes
From: Thomas Roessler <roessler@guug.de>
Date: Wed, 21 Oct 1998 17:51:30 +0200


Required tools
--------------

If you are planning to hack on mutt, please subscribe to the
mutt-dev mailinglist (mutt-dev@mutt.org, contact
majordomo@mutt.org).  Announcements about recent development
versions go to that mailing list, as go technical discussions and
patches.

You'll need several GNU development utilities for working on mutt:

- automake

- autoconf

- autoheader

- The i18n stuff requires GNU gettext.  See intl/VERSION for the
  version we are currently relying on.  Please note that using
  gettext-0.10 will most probably not work - get the latest test
  release from alpha.gnu.org, it's the recommended version of
  gettext anyway.

  If you are experiencing problems with unknown "dcgettext" symbols,
  the autoconf/automake macros from your gettext package are broken.
  Apply the following patch to that macro file (usually found under
  /usr/share/aclocal/gettext.m4):

--- gettext.m4.bak	Thu Jul  2 18:46:08 1998
+++ gettext.m4	Mon Oct  5 23:32:54 1998
@@ -46,12 +46,13 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     AC_CHECK_LIB(intl, bindtextdomain,
-	       [AC_CACHE_CHECK([for gettext in libintl],
-		 gt_cv_func_gettext_libintl,
-		 [AC_CHECK_LIB(intl, gettext,
-		  gt_cv_func_gettext_libintl=yes,
-		  gt_cv_func_gettext_libintl=no)],
+	       [AC_CHECK_LIB(intl, gettext,
+	         gt_cv_func_gettext_libintl=yes,
 		 gt_cv_func_gettext_libintl=no)])
+	   fi
+
+	   if test "$gt_cv_func_gettext_libintl" = "yes" ; then
+	     LIBS="-lintl $LIBS"
 	   fi
 
 	   if test "$gt_cv_func_gettext_libc" = "yes" \


- GNU make may be needed for the dependency tricks



A word about warnings
---------------------

Mutt's default build process sets some pretty restrictive compiler
flags which may lead to lots of warnings.  Generally, warnings are
something which should be eliminated.

Nevertheless, there are two kinds of warnings about which you
shouldn't complain to us: _Every_ module in the mutt source code
will generate an "xxx.c:1: warning: `rcsid' defined but not used"
warning.  This is ok, as we define rcsid for reference purposes
only.

Second, the code in intl/ is said to generate some warnings with the
compiler settings we usually rely upon.  This code is not maintained
by the mutt developpers, so please redirect any comments to the GNU
gettext library's developpers.


Style Guide
-----------

- global functions should have the prefix "mutt_".  All
  other functions should be declared "static".

- avoid global vars where possible.  If one is required,
  try to contain it to a single source file and declare it
  "static".  Global vars should have the first letter of
  each word capitilized, and no underscores should be used
  (e.g., MailGid, LastFolder, MailDir).

- re-use code as much as possible.  There are a lot of
  "library" functions. One of the biggest causes of bloat
  in ELM and PINE is the tremendous duplication of code...
  Help keep Mutt small!

- when adding new options, make the old behaviour the
  default.  Please include the new option and it's default
  setting with the global Muttrc file.

- try to keep mutt as portable as possible.


$Id: devel-notes.txt,v 1.5 1998/10/21 15:57:41 roessler Rel $
