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 "from.bi"
29 /* This file is part of Mailfromd.             -*- c -*-
30    Copyright (C) 2015-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_set_from(eval_environ_t env)49 bi_set_from(eval_environ_t env)
50 #line 19
51 
52 #line 19
53 
54 #line 19 "from.bi"
55 {
56 #line 19
57 
58 #line 19
59 
60 #line 19
61 long __bi_argcnt;
62 #line 19
63 char *  addr;
64 #line 19
65         char *  args;
66 #line 19
67 
68 #line 19
69 get_string_arg(env, 1, &addr);
70 #line 19
71         get_string_arg(env, 2, &args);
72 #line 19
73 
74 #line 19
75 get_numeric_arg(env, 0, &__bi_argcnt);
76 #line 19
77         adjust_stack(env, __bi_argcnt + 1);
78 #line 19
79 
80 #line 19
81 
82 #line 19
83 	if (builtin_module_trace(BUILTIN_IDX_from))
84 #line 19
85 		prog_trace(env, "set_from %s %s",addr, ((__bi_argcnt > 1) ? args : ""));;
86 #line 19
87 
88 {
89 	struct mu_locus_range locus;
90 
91 	env_get_locus(env, &locus);
92 
93 	trace("%s%s:%u: %s %s",
94 	      mailfromd_msgid(env_get_context(env)),
95 	      locus.beg.mu_file, locus.beg.mu_line,
96 	      msgmod_opcode_str(set_from),
97 	      addr);
98 	env_msgmod_append(env, set_from, addr, ((__bi_argcnt > 1) ? args : NULL), 0);
99 }
100 
101 #line 32
102         env_function_cleanup_flush(env, NULL);
103 #line 32
104 	return;
105 #line 32
106 }
107 
108 #line 982 "../../src/builtin/snarf.m4"
109 
110 #line 982
111 
112 #line 982
113 
114 #line 982
115 void
116 #line 982
from_init_builtin(void)117 from_init_builtin(void)
118 #line 982
119 {
120 #line 982
121 
122 #line 982
123 	#line 19 "from.bi"
124 va_builtin_install_ex("set_from", bi_set_from, 0, dtype_unspecified, 2, 1, 0|0, dtype_string, dtype_string);
125 
126 #line 982 "../../src/builtin/snarf.m4"
127 
128 #line 982
129 }
130 #line 982 "../../src/builtin/snarf.m4"
131 
132