1 #line 982 "../../src/builtin/snarf.m4"
2 /* -*- buffer-read-only: t -*- vi: set ro:
3    THIS FILE IS GENERATED AUTOMATICALLY.  PLEASE DO NOT EDIT.
4 */
5 #line 982
6 #ifdef HAVE_CONFIG_H
7 #line 982
8 # include <config.h>
9 #line 982
10 #endif
11 #line 982
12 #include <sys/types.h>
13 #line 982
14 
15 #line 982
16 #include "mailfromd.h"
17 #line 982
18 #include "prog.h"
19 #line 982
20 #include "builtin.h"
21 #line 982
22 
23 #line 982
24 
25 #line 1022 "../../src/builtin/snarf.m4"
26 
27 /* End of snarf.m4 */
28 #line 1 "rcpt.bi"
29 /* This file is part of Mailfromd.             -*- c -*-
30    Copyright (C) 2008-2021 Sergey Poznyakoff
31 
32    This program is free software; you can redistribute it and/or modify
33    it under the terms of the GNU General Public License as published by
34    the Free Software Foundation; either version 3, or (at your option)
35    any later version.
36 
37    This program is distributed in the hope that it will be useful,
38    but WITHOUT ANY WARRANTY; without even the implied warranty of
39    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40    GNU General Public License for more details.
41 
42    You should have received a copy of the GNU General Public License
43    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
44 
45 
46 
47 void
48 #line 19
bi_rcpt_add(eval_environ_t env)49 bi_rcpt_add(eval_environ_t env)
50 #line 19
51 
52 #line 19
53 
54 #line 19 "rcpt.bi"
55 {
56 #line 19
57 
58 #line 19
59 
60 #line 19
61 
62 #line 19
63 char *  addr;
64 #line 19
65 
66 #line 19
67 get_string_arg(env, 0, &addr);
68 #line 19
69 
70 #line 19
71 
72 #line 19
73         adjust_stack(env, 1);
74 #line 19
75 
76 #line 19
77 
78 #line 19
79 	if (builtin_module_trace(BUILTIN_IDX_rcpt))
80 #line 19
81 		prog_trace(env, "rcpt_add %s",addr);;
82 #line 19
83 
84 {
85 	struct mu_locus_range locus;
86 
87 	env_get_locus(env, &locus);
88 
89 	trace("%s%s:%u: %s %s",
90 	      mailfromd_msgid(env_get_context(env)),
91 	      locus.beg.mu_file, locus.beg.mu_line,
92 	      msgmod_opcode_str(rcpt_add),
93 	      addr);
94 	env_msgmod_append(env, rcpt_add, addr, NULL, 0);
95 }
96 
97 #line 32
98         env_function_cleanup_flush(env, NULL);
99 #line 32
100 	return;
101 #line 32
102 }
103 
104 void
105 #line 34
bi_rcpt_delete(eval_environ_t env)106 bi_rcpt_delete(eval_environ_t env)
107 #line 34
108 
109 #line 34
110 
111 #line 34 "rcpt.bi"
112 {
113 #line 34
114 
115 #line 34
116 
117 #line 34
118 
119 #line 34
120 char *  addr;
121 #line 34
122 
123 #line 34
124 get_string_arg(env, 0, &addr);
125 #line 34
126 
127 #line 34
128 
129 #line 34
130         adjust_stack(env, 1);
131 #line 34
132 
133 #line 34
134 
135 #line 34
136 	if (builtin_module_trace(BUILTIN_IDX_rcpt))
137 #line 34
138 		prog_trace(env, "rcpt_delete %s",addr);;
139 #line 34
140 
141 {
142 	struct mu_locus_range locus;
143 
144 	env_get_locus(env, &locus);
145 
146 	trace("%s%s:%u: %s %s",
147 	      mailfromd_msgid(env_get_context(env)),
148 	      locus.beg.mu_file, locus.beg.mu_line,
149 	      msgmod_opcode_str(rcpt_delete),
150 	      addr);
151 	env_msgmod_append(env, rcpt_delete, addr, NULL, 0);
152 }
153 
154 #line 47
155         env_function_cleanup_flush(env, NULL);
156 #line 47
157 	return;
158 #line 47
159 }
160 
161 #line 982 "../../src/builtin/snarf.m4"
162 
163 #line 982
164 
165 #line 982
166 
167 #line 982
168 void
169 #line 982
rcpt_init_builtin(void)170 rcpt_init_builtin(void)
171 #line 982
172 {
173 #line 982
174 
175 #line 982
176 	#line 19 "rcpt.bi"
177 va_builtin_install_ex("rcpt_add", bi_rcpt_add, 0, dtype_unspecified, 1, 0, 0|0, dtype_string);
178 #line 34 "rcpt.bi"
179 va_builtin_install_ex("rcpt_delete", bi_rcpt_delete, 0, dtype_unspecified, 1, 0, 0|0, dtype_string);
180 
181 #line 982 "../../src/builtin/snarf.m4"
182 
183 #line 982
184 }
185 #line 982 "../../src/builtin/snarf.m4"
186 
187