2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
9 * $Id: string.h,v 1.36 2001/06/17 21:31:11 ca Exp $
13 ** libsm string manipulation
20 # include <sm/varargs.h>
21 # include <string.h> /* strlc{py,at}, strerror */
23 /* return number of bytes left in a buffer */
24 #define SPACELEFT(buf, ptr) (sizeof buf - ((ptr) - buf))
26 extern int PRINTFLIKE(3, 4)
36 const char *_pattern
));
47 /* for "normal" data (free'd before end of process) */
48 # define sm_strdup_x(str) strcpy(sm_malloc_x(strlen(str) + 1), str)
50 /* for data that is supposed to be persistent. */
51 # define sm_pstrdup_x(str) strcpy(sm_pmalloc_x(strlen(str) + 1), str)
53 # define sm_strdup_tagged_x(str, file, line, group) \
54 strcpy(sm_malloc_tagged_x(strlen(str) + 1, file, line, group), str)
87 sm_strlcpyn(char *dst
, ssize_t len
, int n
, ...);
89 sm_strlcpyn
__P((char *,
99 # endif /* !HASSTRERROR */
107 sm_strrevcasecmp
__P((
133 stripquotes
__P((char *));
135 #endif /* SM_STRING_H */