File: rfc2231encode.C

package info (click to toggle)
maildrop 3.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,896 kB
  • sloc: ansic: 29,827; cpp: 18,027; sh: 5,993; makefile: 882; perl: 94
file content (33 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
** Copyright 2025 Double Precision, Inc.  See COPYING for
** distribution information.
*/

/*
*/

#if    HAVE_CONFIG_H
#include "rfc2045_config.h"
#endif
#include	"rfc2045.h"
#include	<errno.h>

int rfc2231_attrCreate(const char *name, const char *value,
		       const char *charset,
		       const char *language,
		       int (*cb_func)(const char *param,
				      const char *value,
				      void *void_arg),
		       void *cb_arg)
{
	return rfc2231_attr_encode(
		name, value,
		charset ? charset:"",
		language ? language:"",
		[=]
		(const char *name, const char *value)
		{
			return cb_func(name, value, cb_arg);
		}
	);
}