patch from Francois Revol <revol@free.fr>. Updated documentation accordingly. Fixed compilation warnings.