Mercurial > masqmail
diff src/address.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 | 55b7bde95d37 |
children | b27f66555ba8 |
line wrap: on
line diff
--- a/src/address.c Wed Sep 14 12:20:40 2011 +0200 +++ b/src/address.c Thu Sep 22 15:07:40 2011 +0200 @@ -19,7 +19,7 @@ #include "masqmail.h" address* -create_address(gchar * path, gboolean is_rfc821) +create_address(gchar *path, gboolean is_rfc821) { address *addr; addr = _create_address(path, NULL, is_rfc821); @@ -31,7 +31,7 @@ } address* -create_address_qualified(gchar * path, gboolean is_rfc821, gchar * domain) +create_address_qualified(gchar *path, gboolean is_rfc821, gchar *domain) { address *addr = create_address(path, is_rfc821); @@ -43,7 +43,7 @@ /* nothing special about pipes here, but its only called for that purpose */ address* -create_address_pipe(gchar * path) +create_address_pipe(gchar *path) { address *addr = g_malloc(sizeof(address)); @@ -58,7 +58,7 @@ } void -destroy_address(address * addr) +destroy_address(address *addr) { DEBUG(6) debugf("destroy_address entered\n"); @@ -70,7 +70,7 @@ } address* -copy_modify_address(const address * orig, gchar * l_part, gchar * dom) +copy_modify_address(const address *orig, gchar *l_part, gchar *dom) { address *addr = NULL; @@ -101,7 +101,7 @@ } gboolean -addr_isequal(address * addr1, address * addr2, int (*cmpfunc) (const char*, const char*)) +addr_isequal(address *addr1, address *addr2, int (*cmpfunc) (const char*, const char*)) { return (cmpfunc(addr1->local_part, addr2->local_part) == 0) && (strcasecmp(addr1->domain, addr2->domain) == 0); @@ -109,7 +109,7 @@ /* searches in ancestors of addr1 */ gboolean -addr_isequal_parent(address* addr1, address* addr2, int (*cmpfunc) (const char*, const char*)) +addr_isequal_parent(address *addr1, address *addr2, int (*cmpfunc) (const char*, const char*)) { address *addr; @@ -123,7 +123,7 @@ /* careful, this is recursive */ /* returns TRUE if ALL children have been delivered */ gboolean -addr_is_delivered_children(address * addr) +addr_is_delivered_children(address *addr) { GList *addr_node; @@ -141,7 +141,7 @@ /* careful, this is recursive */ /* returns TRUE if ALL children have been either delivered or have failed */ gboolean -addr_is_finished_children(address * addr) +addr_is_finished_children(address *addr) { GList *addr_node; @@ -158,7 +158,7 @@ /* find original address */ address* -addr_find_ancestor(address * addr) +addr_find_ancestor(address *addr) { while (addr->parent) addr = addr->parent; @@ -166,7 +166,7 @@ } gchar* -addr_string(address * addr) +addr_string(address *addr) { static gchar *buffer = NULL;