masqmail

diff src/parse.c @ 367:b27f66555ba8

Reformated multiline comments to have leading asterisks on each line Now we use: /* ** comment */ This makes the indent style simpler, too.
author markus schnalke <meillo@marmaro.de>
date Thu, 20 Oct 2011 10:20:59 +0200
parents 41958685480d
children cff967b2f51e
line diff
     1.1 --- a/src/parse.c	Thu Sep 22 15:07:40 2011 +0200
     1.2 +++ b/src/parse.c	Thu Oct 20 10:20:59 2011 +0200
     1.3 @@ -1,33 +1,35 @@
     1.4 -/*  MasqMail
     1.5 -    Copyright (C) 1999-2001 Oliver Kurth
     1.6 -    Copyright (C) 2010  markus schnalke <meillo@marmaro.de>
     1.7 -
     1.8 -    This program is free software; you can redistribute it and/or modify
     1.9 -    it under the terms of the GNU General Public License as published by
    1.10 -    the Free Software Foundation; either version 2 of the License, or
    1.11 -    (at your option) any later version.
    1.12 -
    1.13 -    This program is distributed in the hope that it will be useful,
    1.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.16 -    GNU General Public License for more details.
    1.17 -
    1.18 -    You should have received a copy of the GNU General Public License
    1.19 -    along with this program; if not, write to the Free Software
    1.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.21 +/*
    1.22 +**  MasqMail
    1.23 +**  Copyright (C) 1999-2001 Oliver Kurth
    1.24 +**  Copyright (C) 2010  markus schnalke <meillo@marmaro.de>
    1.25 +**
    1.26 +**  This program is free software; you can redistribute it and/or modify
    1.27 +**  it under the terms of the GNU General Public License as published by
    1.28 +**  the Free Software Foundation; either version 2 of the License, or
    1.29 +**  (at your option) any later version.
    1.30 +**
    1.31 +**  This program is distributed in the hope that it will be useful,
    1.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.34 +**  GNU General Public License for more details.
    1.35 +**
    1.36 +**  You should have received a copy of the GNU General Public License
    1.37 +**  along with this program; if not, write to the Free Software
    1.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.39  */
    1.40  
    1.41  #ifndef PARSE_TEST
    1.42  #include "masqmail.h"
    1.43  #endif
    1.44  
    1.45 -/* This is really dangerous. I hope that I was careful enough,
    1.46 -   but maybe there is some malformed address possible that causes
    1.47 -   this to segfault or be caught in endless loops.
    1.48 +/*
    1.49 +**  This is really dangerous. I hope that I was careful enough,
    1.50 +**  but maybe there is some malformed address possible that causes
    1.51 +**  this to segfault or be caught in endless loops.
    1.52  
    1.53 -   If you find something like that, PLEASE mail the string to me
    1.54 -   (no matter how idiotic it is), so that I can debug that.
    1.55 -   Those things really should not happen.
    1.56 +**  If you find something like that, PLEASE mail the string to me
    1.57 +**  (no matter how idiotic it is), so that I can debug that.
    1.58 +**  Those things really should not happen.
    1.59  */
    1.60  
    1.61  static gchar *specials = "()<>@,;:\\\".[]`";
    1.62 @@ -134,8 +136,8 @@
    1.63  }
    1.64  
    1.65  gboolean
    1.66 -parse_address_rfc822(gchar *string, gchar **local_begin, gchar **local_end, gchar **domain_begin,
    1.67 -                     gchar **domain_end, gchar **address_end)
    1.68 +parse_address_rfc822(gchar *string, gchar **local_begin, gchar **local_end,
    1.69 +		gchar **domain_begin, gchar **domain_end, gchar **address_end)
    1.70  {
    1.71  	gint angle_brackets = 0;
    1.72  
    1.73 @@ -183,8 +185,10 @@
    1.74  				p++;
    1.75  			}
    1.76  		}
    1.77 -		/* we now have a non-space char that is not
    1.78 -		   the beginning of a comment */
    1.79 +		/*
    1.80 +		**  we now have a non-space char that is not
    1.81 +		**  the beginning of a comment
    1.82 +		*/
    1.83  
    1.84  		if (*p == '@' || *p == ',') {
    1.85  			/* the last word was the local_part of an addr-spec */
    1.86 @@ -284,8 +288,8 @@
    1.87  }
    1.88  
    1.89  gboolean
    1.90 -parse_address_rfc821(gchar *string, gchar **local_begin, gchar **local_end, gchar **domain_begin,
    1.91 -                     gchar **domain_end, gchar **address_end)
    1.92 +parse_address_rfc821(gchar *string, gchar **local_begin, gchar **local_end,
    1.93 +		gchar **domain_begin, gchar **domain_end, gchar **address_end)
    1.94  {
    1.95  	gint angle_brackets = 0;
    1.96  
    1.97 @@ -371,12 +375,12 @@
    1.98  }
    1.99  
   1.100  /*
   1.101 -  allocate address, reading from string.
   1.102 -  On failure, returns NULL.
   1.103 -  after call, end contains a pointer to the end of the parsed string
   1.104 -  end may be NULL, if we are not interested.
   1.105 -
   1.106 -  parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
   1.107 +**  allocate address, reading from string.
   1.108 +**  On failure, returns NULL.
   1.109 +**  after call, end contains a pointer to the end of the parsed string
   1.110 +**  end may be NULL, if we are not interested.
   1.111 +**
   1.112 +**  parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
   1.113  */
   1.114  address*
   1.115  _create_address(gchar *string, gchar **end, gboolean is_rfc821)