summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-02-19 08:12:56 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-02-19 08:12:56 (GMT)
commit59570db68d1c94a36d82d4ede356880d2dcea0ef (patch) (side-by-side diff)
tree75b75e29c05b6106c253124e65cd897c27777ebe /src/main.c
parentfd20b4cc9033e02cd41fc91265c70b2b078cf478 (diff)
downloadmailfromd-59570db68d1c94a36d82d4ede356880d2dcea0ef.tar.gz
mailfromd-59570db68d1c94a36d82d4ede356880d2dcea0ef.tar.bz2
Syntax cleanup
git-svn-id: file:///svnroot/mailfromd/trunk@1254 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/main.c64
1 files changed, 33 insertions, 31 deletions
diff --git a/src/main.c b/src/main.c
index 8e8dbb6..44b488a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -450,15 +450,17 @@ host_in_relayed_domain_p(char *client)
values in option_cache. Finally, process_options() is called that scans the
cache and actually sets any options found there. */
+static int option_string(char *opt, void **pval, char *newval);
+
/* Deprecated options: */
-int
+static int
option_deprecated(char *opt, void **pval, char *newval)
{
parse_warning("deprecated option %s ignored", opt);
return 0;
}
-int
+static int
option_ehlo(char *opt, void **pval, char *newval)
{
if (get_locus()->file)
@@ -474,13 +476,13 @@ option_ehlo(char *opt, void **pval, char *newval)
return option_string(opt, pval, newval);
}
-void
+static void
set_ehlo(void *value)
{
defer_initialize_variable("ehlo_domain", value);
}
-int
+static int
option_mailfrom(char *opt, void **pval, char *newval)
{
int rc;
@@ -510,7 +512,7 @@ option_mailfrom(char *opt, void **pval, char *newval)
return option_string(opt, pval, newval);
}
-void
+static void
set_mailfrom(void *value)
{
int rc;
@@ -533,53 +535,53 @@ set_mailfrom(void *value)
/* Other options */
-void
+static void
set_debug(void *value)
{
enable_debug_list(value);
}
-void
+static void
set_positive_expire(void *value)
{
cache_format->expire_interval = *(time_t*) value;
free(value);
}
-void
+static void
set_negative_expire(void *value)
{
negative_expire_interval = *(time_t*) value;
free(value);
}
-void
+static void
set_expire(void *value)
{
expire_interval = *(time_t*) value;
free(value);
}
-void
+static void
set_rates_expire(void *value)
{
rate_format->expire_interval = *(time_t*) value;
free(value);
}
-void
+static void
set_port(void *value)
{
portspec = value;
}
-void
+static void
set_user(void *value)
{
user = value;
}
-void
+static void
set_milter_timeout(void *value)
{
time_t to = *(time_t*) value;
@@ -590,27 +592,27 @@ set_milter_timeout(void *value)
}
}
-void
+static void
set_pidfile(void *value)
{
pidfile = value;
}
-void
+static void
set_io_timeout(void *value)
{
io_timeout = *(time_t*) value;
free(value);
}
-void
+static void
set_connect_timeout(void *value)
{
connect_timeout = *(time_t*) value;
free(value);
}
-void
+static void
set_response_timeout(void *value)
{
response_timeout = *(time_t*) value;
@@ -624,19 +626,19 @@ load_relay_file(void *item, void *data)
return 0;
}
-void
+static void
set_relay(void *value)
{
mu_list_do(value, load_relay_file, NULL);
}
-void
+static void
set_source(void *value)
{
source_address = *(unsigned long*)value;
}
-void
+static void
set_group(void *value)
{
/* do nothing */
@@ -648,20 +650,20 @@ set_source_info(void *value)
source_info_option = (int) value;
}
-void
+static void
set_lock_retry_count(void *value)
{
lock_retry_count_option = strtoul(value, NULL, 0);
}
-void
+static void
set_lock_retry_timeout(void *value)
{
lock_retry_timeout_option = *(time_t*) value;
free(value);
}
-int
+static int
option_string(char *opt, void **pval, char *newval)
{
if (*pval)
@@ -670,7 +672,7 @@ option_string(char *opt, void **pval, char *newval)
return 0;
}
-int
+static int
option_number(char *opt, void **pval, char *newval)
{
char *p;
@@ -683,7 +685,7 @@ option_number(char *opt, void **pval, char *newval)
return option_string(opt, pval, newval);
}
-int
+static int
option_boolean(char *opt, void **pval, char *newval)
{
int val;
@@ -710,13 +712,13 @@ option_boolean(char *opt, void **pval, char *newval)
return 0;
}
-int
+static int
option_debug(char *opt, void **pval, char *newval)
{
return option_string(opt, pval, newval);
}
-int
+static int
option_time(char *opt, void **pval, char *newval)
{
time_t interval;
@@ -732,7 +734,7 @@ option_time(char *opt, void **pval, char *newval)
return 0;
}
-int
+static int
option_pidfile(char *opt, void **pval, char *newval)
{
if (newval[0] != '/') {
@@ -743,7 +745,7 @@ option_pidfile(char *opt, void **pval, char *newval)
return 0;
}
-int
+static int
option_relay(char *opt, void **pval, char *newval)
{
if (!*pval)
@@ -752,7 +754,7 @@ option_relay(char *opt, void **pval, char *newval)
return 0;
}
-int
+static int
option_source(char *opt, void **pval, char *newval)
{
unsigned long address = inet_addr (newval);
@@ -780,7 +782,7 @@ gid_comp(const void *item, const void *data)
return (gid_t) item != (gid_t) data;
}
-int
+static int
option_group(char *opt, void **pval, char *newval)
{
struct group *group = getgrnam(newval);

Return to:

Send suggestions and report system problems to the System administrator.