Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
mail_addr_form.c
[詳解]
1
/*++
2
/* NAME
3
/* mail_addr_form 3
4
/* SUMMARY
5
/* mail address formats
6
/* SYNOPSIS
7
/* #include <mail_addr_form.h>
8
/*
9
/* int mail_addr_form_from_string(const char *addr_form_name)
10
/*
11
/* const char *mail_addr_form_to_string(int addr_form)
12
/* DESCRIPTION
13
/* mail_addr_form_from_string() converts a symbolic mail address
14
/* form name ("internal", "external", "internal-first") into the
15
/* corresponding internal code. The result is -1 if an unrecognized
16
/* name was specified.
17
/*
18
/* mail_addr_form_to_string() converts from internal code
19
/* to the corresponding symbolic name. The result is null if
20
/* an unrecognized code was specified.
21
/* LICENSE
22
/* .ad
23
/* .fi
24
/* The Secure Mailer license must be distributed with this software.
25
/* AUTHOR(S)
26
/* Wietse Venema
27
/* Google, Inc.
28
/* 111 8th Avenue
29
/* New York, NY 10011, USA
30
/*--*/
31
32
/*
33
* System library.
34
*/
35
#include <
sys_defs.h
>
36
37
/*
38
* Utility library.
39
*/
40
#include <
name_code.h
>
41
42
/*
43
* Global library.
44
*/
45
#include <
mail_addr_form.h
>
46
47
static
const
NAME_CODE
addr_form_table[] = {
48
"external"
,
MA_FORM_EXTERNAL
,
49
"internal"
,
MA_FORM_INTERNAL
,
50
"external-first"
,
MA_FORM_EXTERNAL_FIRST
,
51
"internal-first"
,
MA_FORM_INTERNAL_FIRST
,
52
0, -1,
53
};
54
55
/* mail_addr_form_from_string - symbolic mail address to internal form */
56
57
int
mail_addr_form_from_string
(
const
char
*addr_form_name)
58
{
59
return
(
name_code
(addr_form_table,
NAME_CODE_FLAG_NONE
, addr_form_name));
60
}
61
62
const
char
*
mail_addr_form_to_string
(
int
addr_form)
63
{
64
return
(
str_name_code
(addr_form_table, addr_form));
65
}
MA_FORM_INTERNAL_FIRST
#define MA_FORM_INTERNAL_FIRST
Definition:
mail_addr_form.h:20
MA_FORM_INTERNAL
#define MA_FORM_INTERNAL
Definition:
mail_addr_form.h:17
mail_addr_form.h
str_name_code
const char * str_name_code(const NAME_CODE *table, int code)
Definition:
name_code.c:83
NAME_CODE_FLAG_NONE
#define NAME_CODE_FLAG_NONE
Definition:
name_code.h:22
name_code
int name_code(const NAME_CODE *table, int flags, const char *name)
Definition:
name_code.c:65
sys_defs.h
name_code.h
NAME_CODE
Definition:
name_code.h:17
mail_addr_form_from_string
int mail_addr_form_from_string(const char *addr_form_name)
Definition:
mail_addr_form.c:57
MA_FORM_EXTERNAL
#define MA_FORM_EXTERNAL
Definition:
mail_addr_form.h:18
MA_FORM_EXTERNAL_FIRST
#define MA_FORM_EXTERNAL_FIRST
Definition:
mail_addr_form.h:19
mail_addr_form_to_string
const char * mail_addr_form_to_string(int addr_form)
Definition:
mail_addr_form.c:62
2018年11月10日(土) 18時59分37秒作成 - Postfix3.3.1 / 構成:
1.8.9.1