File: ilenx.c

package info (click to toggle)
sendmail 8.18.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 12,496 kB
  • sloc: ansic: 105,736; perl: 7,504; sh: 5,488; makefile: 888
file content (40 lines) | stat: -rw-r--r-- 744 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
34
35
36
37
38
39
40
/*
 * Copyright (c) 2020 Proofpoint, Inc. and its suppliers.
 *	All rights reserved.
 *
 * By using this file, you agree to the terms and conditions set
 * forth in the LICENSE file which can be found at the top level of
 * the sendmail distribution.
 *
 */

#include <sm/gen.h>
#include <sm/sendmail.h>
#include <sm/ixlen.h>

#if _FFR_8BITENVADDR
/*
**  ILENX -- determine the e'x'ternal length of a string in 'i'internal format
**
**	Parameters:
**		str -- string [i]
**
**	Returns:
**		e'x'ternal length of a string in 'i'internal format
*/

int
ilenx(str)
	const char *str;
{
	char c;
	int idx;
	XLENDECL

	if (NULL == str)
		return -1;
	for (idx = 0; (c = str[idx]) != '\0'; idx++)
		XLEN(c);
	return xlen;
}
#endif /* _FFR_8BITENVADDR */