masqmail

diff src/tables.c @ 366:41958685480d

Switched to `type *name' style Andrew Koenig's ``C Traps and Pitfalls'' (Ch.2.1) convinced me that it is best to go with the way C had been designed. The ``declaration reflects use'' concept conflicts with a ``type* name'' notation. Hence I switched.
author markus schnalke <meillo@marmaro.de>
date Thu, 22 Sep 2011 15:07:40 +0200
parents ec28ce798b79
children b27f66555ba8
line diff
     1.1 --- a/src/tables.c	Wed Sep 14 12:20:40 2011 +0200
     1.2 +++ b/src/tables.c	Thu Sep 22 15:07:40 2011 +0200
     1.3 @@ -22,7 +22,7 @@
     1.4  #include "masqmail.h"
     1.5  
     1.6  table_pair*
     1.7 -create_pair(gchar * key, gpointer value)
     1.8 +create_pair(gchar *key, gpointer value)
     1.9  {
    1.10  	table_pair *pair;
    1.11  
    1.12 @@ -34,7 +34,7 @@
    1.13  }
    1.14  
    1.15  table_pair*
    1.16 -create_pair_string(gchar * key, gpointer value)
    1.17 +create_pair_string(gchar *key, gpointer value)
    1.18  {
    1.19  	table_pair *pair;
    1.20  
    1.21 @@ -46,7 +46,7 @@
    1.22  }
    1.23  
    1.24  table_pair*
    1.25 -parse_table_pair(gchar * line, char delim)
    1.26 +parse_table_pair(gchar *line, char delim)
    1.27  {
    1.28  	gchar buf[256];
    1.29  	gchar *p, *q;
    1.30 @@ -72,7 +72,7 @@
    1.31  }
    1.32  
    1.33  gpointer*
    1.34 -table_find_func(GList * table_list, gchar * key, int (*cmp_func) (const char *, const char *))
    1.35 +table_find_func(GList *table_list, gchar *key, int (*cmp_func) (const char *, const char *))
    1.36  {
    1.37  	GList *node;
    1.38  
    1.39 @@ -85,13 +85,13 @@
    1.40  }
    1.41  
    1.42  gpointer*
    1.43 -table_find(GList * table_list, gchar * key)
    1.44 +table_find(GList *table_list, gchar *key)
    1.45  {
    1.46  	return table_find_func(table_list, key, strcmp);
    1.47  }
    1.48  
    1.49  gpointer*
    1.50 -table_find_case(GList * table_list, gchar * key)
    1.51 +table_find_case(GList *table_list, gchar *key)
    1.52  {
    1.53  	return table_find_func(table_list, key, strcasecmp);
    1.54  }
    1.55 @@ -103,13 +103,13 @@
    1.56  }
    1.57  
    1.58  gpointer*
    1.59 -table_find_fnmatch(GList * table_list, gchar * key)
    1.60 +table_find_fnmatch(GList *table_list, gchar *key)
    1.61  {
    1.62  	return table_find_func(table_list, key, fnmatch0);
    1.63  }
    1.64  
    1.65  GList*
    1.66 -table_read(gchar * fname, gchar delim)
    1.67 +table_read(gchar *fname, gchar delim)
    1.68  {
    1.69  	GList *list = NULL;
    1.70  	FILE *fptr;
    1.71 @@ -137,7 +137,7 @@
    1.72  }
    1.73  
    1.74  void
    1.75 -destroy_table(GList * table)
    1.76 +destroy_table(GList *table)
    1.77  {
    1.78  	GList *node;
    1.79