aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-02-19 08:12:56 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-02-19 08:12:56 +0000
commit59570db68d1c94a36d82d4ede356880d2dcea0ef (patch)
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')
-rw-r--r--src/main.c64
1 files changed, 33 insertions, 31 deletions
diff --git a/src/main.c b/src/main.c
index 8e8dbb6a..44b488aa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -450,15 +450,17 @@ host_in_relayed_domain_p(char *client)
450 values in option_cache. Finally, process_options() is called that scans the 450 values in option_cache. Finally, process_options() is called that scans the
451 cache and actually sets any options found there. */ 451 cache and actually sets any options found there. */
452 452
453static int option_string(char *opt, void **pval, char *newval);
454
453/* Deprecated options: */ 455/* Deprecated options: */
454int 456static int
455option_deprecated(char *opt, void **pval, char *newval) 457option_deprecated(char *opt, void **pval, char *newval)
456{ 458{
457 parse_warning("deprecated option %s ignored", opt); 459 parse_warning("deprecated option %s ignored", opt);
458 return 0; 460 return 0;
459} 461}
460 462
461int 463static int
462option_ehlo(char *opt, void **pval, char *newval) 464option_ehlo(char *opt, void **pval, char *newval)
463{ 465{
464 if (get_locus()->file) 466 if (get_locus()->file)
@@ -474,13 +476,13 @@ option_ehlo(char *opt, void **pval, char *newval)
474 return option_string(opt, pval, newval); 476 return option_string(opt, pval, newval);
475} 477}
476 478
477void 479static void
478set_ehlo(void *value) 480set_ehlo(void *value)
479{ 481{
480 defer_initialize_variable("ehlo_domain", value); 482 defer_initialize_variable("ehlo_domain", value);
481} 483}
482 484
483int 485static int
484option_mailfrom(char *opt, void **pval, char *newval) 486option_mailfrom(char *opt, void **pval, char *newval)
485{ 487{
486 int rc; 488 int rc;
@@ -510,7 +512,7 @@ option_mailfrom(char *opt, void **pval, char *newval)
510 return option_string(opt, pval, newval); 512 return option_string(opt, pval, newval);
511} 513}
512 514
513void 515static void
514set_mailfrom(void *value) 516set_mailfrom(void *value)
515{ 517{
516 int rc; 518 int rc;
@@ -533,53 +535,53 @@ set_mailfrom(void *value)
533 535
534/* Other options */ 536/* Other options */
535 537
536void 538static void
537set_debug(void *value) 539set_debug(void *value)
538{ 540{
539 enable_debug_list(value); 541 enable_debug_list(value);
540} 542}
541 543
542void 544static void
543set_positive_expire(void *value) 545set_positive_expire(void *value)
544{ 546{
545 cache_format->expire_interval = *(time_t*) value; 547 cache_format->expire_interval = *(time_t*) value;
546 free(value); 548 free(value);
547} 549}
548 550
549void 551static void
550set_negative_expire(void *value) 552set_negative_expire(void *value)
551{ 553{
552 negative_expire_interval = *(time_t*) value; 554 negative_expire_interval = *(time_t*) value;
553 free(value); 555 free(value);
554} 556}
555 557
556void 558static void
557set_expire(void *value) 559set_expire(void *value)
558{ 560{
559 expire_interval = *(time_t*) value; 561 expire_interval = *(time_t*) value;
560 free(value); 562 free(value);
561} 563}
562 564
563void 565static void
564set_rates_expire(void *value) 566set_rates_expire(void *value)
565{ 567{
566 rate_format->expire_interval = *(time_t*) value; 568 rate_format->expire_interval = *(time_t*) value;
567 free(value); 569 free(value);
568} 570}
569 571
570void 572static void
571set_port(void *value) 573set_port(void *value)
572{ 574{
573 portspec = value; 575 portspec = value;
574} 576}
575 577
576void 578static void
577set_user(void *value) 579set_user(void *value)
578{ 580{
579 user = value; 581 user = value;
580} 582}
581 583
582void 584static void
583set_milter_timeout(void *value) 585set_milter_timeout(void *value)
584{ 586{
585 time_t to = *(time_t*) value; 587 time_t to = *(time_t*) value;
@@ -590,27 +592,27 @@ set_milter_timeout(void *value)
590 } 592 }
591} 593}
592 594
593void 595static void
594set_pidfile(void *value) 596set_pidfile(void *value)
595{ 597{
596 pidfile = value; 598 pidfile = value;
597} 599}
598 600
599void 601static void
600set_io_timeout(void *value) 602set_io_timeout(void *value)
601{ 603{
602 io_timeout = *(time_t*) value; 604 io_timeout = *(time_t*) value;
603 free(value); 605 free(value);
604} 606}
605 607
606void 608static void
607set_connect_timeout(void *value) 609set_connect_timeout(void *value)
608{ 610{
609 connect_timeout = *(time_t*) value; 611 connect_timeout = *(time_t*) value;
610 free(value); 612 free(value);
611} 613}
612 614
613void 615static void
614set_response_timeout(void *value) 616set_response_timeout(void *value)
615{ 617{
616 response_timeout = *(time_t*) value; 618 response_timeout = *(time_t*) value;
@@ -624,19 +626,19 @@ load_relay_file(void *item, void *data)
624 return 0; 626 return 0;
625} 627}
626 628
627void 629static void
628set_relay(void *value) 630set_relay(void *value)
629{ 631{
630 mu_list_do(value, load_relay_file, NULL); 632 mu_list_do(value, load_relay_file, NULL);
631} 633}
632 634
633void 635static void
634set_source(void *value) 636set_source(void *value)
635{ 637{
636 source_address = *(unsigned long*)value; 638 source_address = *(unsigned long*)value;
637} 639}
638 640
639void 641static void
640set_group(void *value) 642set_group(void *value)
641{ 643{
642 /* do nothing */ 644 /* do nothing */
@@ -648,20 +650,20 @@ set_source_info(void *value)
648 source_info_option = (int) value; 650 source_info_option = (int) value;
649} 651}
650 652
651void 653static void
652set_lock_retry_count(void *value) 654set_lock_retry_count(void *value)
653{ 655{
654 lock_retry_count_option = strtoul(value, NULL, 0); 656 lock_retry_count_option = strtoul(value, NULL, 0);
655} 657}
656 658
657void 659static void
658set_lock_retry_timeout(void *value) 660set_lock_retry_timeout(void *value)
659{ 661{
660 lock_retry_timeout_option = *(time_t*) value; 662 lock_retry_timeout_option = *(time_t*) value;
661 free(value); 663 free(value);
662} 664}
663 665
664int 666static int
665option_string(char *opt, void **pval, char *newval) 667option_string(char *opt, void **pval, char *newval)
666{ 668{
667 if (*pval) 669 if (*pval)
@@ -670,7 +672,7 @@ option_string(char *opt, void **pval, char *newval)
670 return 0; 672 return 0;
671} 673}
672 674
673int 675static int
674option_number(char *opt, void **pval, char *newval)