xref: /freebsd/contrib/sendmail/include/sm/sendmail.h (revision 2fb4f839f3fc72ce2bab12f9ba4760f97f73e97f)
1d0cef73dSGregory Neil Shapiro /*
2*2fb4f839SGregory Neil Shapiro  * Copyright (c) 2006, 2020 Proofpoint, Inc. and its suppliers.
3d0cef73dSGregory Neil Shapiro  *	All rights reserved.
4d0cef73dSGregory Neil Shapiro  *
5d0cef73dSGregory Neil Shapiro  * By using this file, you agree to the terms and conditions set
6d0cef73dSGregory Neil Shapiro  * forth in the LICENSE file which can be found at the top level of
7d0cef73dSGregory Neil Shapiro  * the sendmail distribution.
8d0cef73dSGregory Neil Shapiro  */
9d0cef73dSGregory Neil Shapiro 
10d0cef73dSGregory Neil Shapiro /*
11d0cef73dSGregory Neil Shapiro **  SENDMAIL.H -- MTA-specific definitions for sendmail.
12d0cef73dSGregory Neil Shapiro */
13d0cef73dSGregory Neil Shapiro 
14d0cef73dSGregory Neil Shapiro #ifndef _SM_SENDMAIL_H
15d0cef73dSGregory Neil Shapiro # define _SM_SENDMAIL_H 1
16d0cef73dSGregory Neil Shapiro 
17*2fb4f839SGregory Neil Shapiro #include <sm/rpool.h>
18*2fb4f839SGregory Neil Shapiro 
19d0cef73dSGregory Neil Shapiro /* "out of band" indicator */
20d0cef73dSGregory Neil Shapiro #define METAQUOTE	((unsigned char)0377)	/* quotes the next octet */
21*2fb4f839SGregory Neil Shapiro #define SM_MM_QUOTE(ch) (((ch) & 0377) == METAQUOTE || (((ch) & 0340) == 0200))
22d0cef73dSGregory Neil Shapiro 
23d0cef73dSGregory Neil Shapiro extern int	dequote_internal_chars __P((char *, char *, int));
24*2fb4f839SGregory Neil Shapiro #if SM_HEAP_CHECK > 2
25*2fb4f839SGregory Neil Shapiro extern char	*quote_internal_chars_tagged __P((char *, char *, int *, SM_RPOOL_T *, char *, int, int));
26*2fb4f839SGregory Neil Shapiro # define quote_internal_chars(ibp, obp, bsp, rpool) quote_internal_chars_tagged(ibp, obp, bsp, rpool, "quote_internal_chars:" __FILE__, __LINE__, SmHeapGroup)
27*2fb4f839SGregory Neil Shapiro #else
28*2fb4f839SGregory Neil Shapiro extern char	*quote_internal_chars __P((char *, char *, int *, SM_RPOOL_T *));
29*2fb4f839SGregory Neil Shapiro # define quote_internal_chars_tagged(ibp, obp, bsp, rpool, file, line, group) quote_internal_chars(ibp, obp, bsp, rpool)
30*2fb4f839SGregory Neil Shapiro #endif
31d0cef73dSGregory Neil Shapiro extern char	*str2prt __P((char *));
32d0cef73dSGregory Neil Shapiro 
33*2fb4f839SGregory Neil Shapiro extern char	*makelower __P((char *));
34*2fb4f839SGregory Neil Shapiro #if USE_EAI
35*2fb4f839SGregory Neil Shapiro extern bool	sm_strcaseeq __P((const char *, const char *));
36*2fb4f839SGregory Neil Shapiro extern bool	sm_strncaseeq __P((const char *, const char *, size_t));
37*2fb4f839SGregory Neil Shapiro # define SM_STRCASEEQ(a, b)	sm_strcaseeq((a), (b))
38*2fb4f839SGregory Neil Shapiro # define SM_STRNCASEEQ(a, b, n)	sm_strncaseeq((a), (b), (n))
39*2fb4f839SGregory Neil Shapiro #else
40*2fb4f839SGregory Neil Shapiro # define SM_STRCASEEQ(a, b)	(sm_strcasecmp((a), (b)) == 0)
41*2fb4f839SGregory Neil Shapiro # define SM_STRNCASEEQ(a, b, n)	(sm_strncasecmp((a), (b), (n)) == 0)
42*2fb4f839SGregory Neil Shapiro #endif
43*2fb4f839SGregory Neil Shapiro 
44d0cef73dSGregory Neil Shapiro #endif /* ! _SM_SENDMAIL_H */
45