diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-02-19 08:12:56 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-02-19 08:12:56 +0000 |
commit | 59570db68d1c94a36d82d4ede356880d2dcea0ef (patch) | |
tree | 75b75e29c05b6106c253124e65cd897c27777ebe /src/main.c | |
parent | fd20b4cc9033e02cd41fc91265c70b2b078cf478 (diff) | |
download | mailfromd-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.c | 64 |
1 files changed, 33 insertions, 31 deletions
@@ -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 | ||
453 | static int option_string(char *opt, void **pval, char *newval); | ||
454 | |||
453 | /* Deprecated options: */ | 455 | /* Deprecated options: */ |
454 | int | 456 | static int |
455 | option_deprecated(char *opt, void **pval, char *newval) | 457 | option_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 | ||
461 | int | 463 | static int |
462 | option_ehlo(char *opt, void **pval, char *newval) | 464 | option_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 | ||
477 | void | 479 | static void |
478 | set_ehlo(void *value) | 480 | set_ehlo(void *value) |
479 | { | 481 | { |
480 | defer_initialize_variable("ehlo_domain", value); | 482 | defer_initialize_variable("ehlo_domain", value); |
481 | } | 483 | } |
482 | 484 | ||
483 | int | 485 | static int |
484 | option_mailfrom(char *opt, void **pval, char *newval) | 486 | option_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 | ||
513 | void | 515 | static void |
514 | set_mailfrom(void *value) | 516 | set_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 | ||
536 | void | 538 | static void |
537 | set_debug(void *value) | 539 | set_debug(void *value) |
538 | { | 540 | { |
539 | enable_debug_list(value); | 541 | enable_debug_list(value); |
540 | } | 542 | } |
541 | 543 | ||
542 | void | 544 | static void |
543 | set_positive_expire(void *value) | 545 | set_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 | ||
549 | void | 551 | static void |
550 | set_negative_expire(void *value) | 552 | set_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 | ||
556 | void | 558 | static void |
557 | set_expire(void *value) | 559 | set_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 | ||
563 | void | 565 | static void |
564 | set_rates_expire(void *value) | 566 | set_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 | ||
570 | void | 572 | static void |
571 | set_port(void *value) | 573 | set_port(void *value) |
572 | { | 574 | { |
573 | portspec = value; | 575 | portspec = value; |
574 | } | 576 | } |
575 | 577 | ||
576 | void | 578 | static void |
577 | set_user(void *value) | 579 | set_user(void *value) |
578 | { | 580 | { |
579 | user = value; | 581 | user = value; |
580 | } | 582 | } |
581 | 583 | ||
582 | void | 584 | static void |
583 | set_milter_timeout(void *value) | 585 | set_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 | ||
593 | void | 595 | static void |
594 | set_pidfile(void *value) | 596 | set_pidfile(void *value) |
595 | { | 597 | { |
596 | pidfile = value; | 598 | pidfile = value; |
597 | } | 599 | } |
598 | 600 | ||
599 | void | 601 | static void |
600 | set_io_timeout(void *value) | 602 | set_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 | ||
606 | void | 608 | static void |
607 | set_connect_timeout(void *value) | 609 | set_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 | ||
613 | void | 615 | static void |
614 | set_response_timeout(void *value) | 616 | set_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 | ||
627 | void | 629 | static void |
628 | set_relay(void *value) | 630 | set_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 | ||
633 | void | 635 | static void |
634 | set_source(void *value) | 636 | set_source(void *value) |
635 | { | 637 | { |
636 | source_address = *(unsigned long*)value; | 638 | source_address = *(unsigned long*)value; |
637 | } | 639 | } |
638 | 640 | ||
639 | void | 641 | static void |
640 | set_group(void *value) | 642 | set_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 | ||
651 | void | 653 | static void |
652 | set_lock_retry_count(void *value) | 654 | set_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 | ||
657 | void | 659 | static void |
658 | set_lock_retry_timeout(void *value) | 660 | set_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 | ||
664 | int | 666 | static int |
665 | option_string(char *opt, void **pval, char *newval) | 667 | option_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 | ||
673 | int | 675 | static int |
674 | option_number(char *opt, void **pval, char *newval) |