Mercurial > masqmail
comparison src/alias.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 | 273f6c9eb6a2 |
children | b27f66555ba8 |
comparison
equal
deleted
inserted
replaced
365:934a223e4ee8 | 366:41958685480d |
---|---|
19 | 19 |
20 #include "masqmail.h" | 20 #include "masqmail.h" |
21 #include <fnmatch.h> | 21 #include <fnmatch.h> |
22 | 22 |
23 gboolean | 23 gboolean |
24 addr_is_local(address * addr) | 24 addr_is_local(address *addr) |
25 { | 25 { |
26 GList *dom_node; | 26 GList *dom_node; |
27 GList *addr_node; | 27 GList *addr_node; |
28 address *a; | 28 address *a; |
29 | 29 |
63 } | 63 } |
64 return FALSE; | 64 return FALSE; |
65 } | 65 } |
66 | 66 |
67 static GList* | 67 static GList* |
68 parse_list(gchar * line) | 68 parse_list(gchar *line) |
69 { | 69 { |
70 GList *list = NULL; | 70 GList *list = NULL; |
71 gchar buf[256]; | 71 gchar buf[256]; |
72 gchar *p, *q; | 72 gchar *p, *q; |
73 | 73 |
105 | 105 |
106 /* | 106 /* |
107 addr is assumed to be local and no pipe address nor not-to-expand | 107 addr is assumed to be local and no pipe address nor not-to-expand |
108 */ | 108 */ |
109 static GList* | 109 static GList* |
110 expand_one(GList* alias_table, address* addr) | 110 expand_one(GList *alias_table, address *addr) |
111 { | 111 { |
112 GList *val_list; | 112 GList *val_list; |
113 GList *val_node; | 113 GList *val_node; |
114 GList *alias_list = NULL; | 114 GList *alias_list = NULL; |
115 GList *alias_node; | 115 GList *alias_node; |
116 gchar *val; | 116 gchar *val; |
117 address* alias_addr; | 117 address *alias_addr; |
118 | 118 |
119 /* expand the local alias */ | 119 /* expand the local alias */ |
120 DEBUG(6) debugf("alias: '%s' is local and will get expanded\n", addr->local_part); | 120 DEBUG(6) debugf("alias: '%s' is local and will get expanded\n", addr->local_part); |
121 | 121 |
122 if (strcasecmp(addr->local_part, "postmaster") == 0) { | 122 if (strcasecmp(addr->local_part, "postmaster") == 0) { |
196 | 196 |
197 return alias_list; | 197 return alias_list; |
198 } | 198 } |
199 | 199 |
200 GList* | 200 GList* |
201 alias_expand(GList* alias_table, GList* rcpt_list, GList* non_rcpt_list) | 201 alias_expand(GList *alias_table, GList *rcpt_list, GList *non_rcpt_list) |
202 { | 202 { |
203 GList *rcpt_node = NULL; | 203 GList *rcpt_node = NULL; |
204 GList *alias_list = NULL; | 204 GList *alias_list = NULL; |
205 GList *done_list = NULL; | 205 GList *done_list = NULL; |
206 GList *rcpt_node_next = NULL; | 206 GList *rcpt_node_next = NULL; |