1*2fb4f839SGregory Neil Shapiro /* 2*2fb4f839SGregory Neil Shapiro * Copyright (c) 2020 Proofpoint, Inc. and its suppliers. 3*2fb4f839SGregory Neil Shapiro * All rights reserved. 4*2fb4f839SGregory Neil Shapiro * 5*2fb4f839SGregory Neil Shapiro * By using this file, you agree to the terms and conditions set 6*2fb4f839SGregory Neil Shapiro * forth in the LICENSE file which can be found at the top level of 7*2fb4f839SGregory Neil Shapiro * the sendmail distribution. 8*2fb4f839SGregory Neil Shapiro * 9*2fb4f839SGregory Neil Shapiro */ 10*2fb4f839SGregory Neil Shapiro 11*2fb4f839SGregory Neil Shapiro #include <sm/gen.h> 12*2fb4f839SGregory Neil Shapiro #include <sm/sendmail.h> 13*2fb4f839SGregory Neil Shapiro #include <sm/ixlen.h> 14*2fb4f839SGregory Neil Shapiro 15*2fb4f839SGregory Neil Shapiro #if _FFR_8BITENVADDR 16*2fb4f839SGregory Neil Shapiro /* 17*2fb4f839SGregory Neil Shapiro ** ILENX -- determine the e'x'ternal length of a string in 'i'internal format 18*2fb4f839SGregory Neil Shapiro ** 19*2fb4f839SGregory Neil Shapiro ** Parameters: 20*2fb4f839SGregory Neil Shapiro ** str -- string [i] 21*2fb4f839SGregory Neil Shapiro ** 22*2fb4f839SGregory Neil Shapiro ** Returns: 23*2fb4f839SGregory Neil Shapiro ** e'x'ternal length of a string in 'i'internal format 24*2fb4f839SGregory Neil Shapiro */ 25*2fb4f839SGregory Neil Shapiro 26*2fb4f839SGregory Neil Shapiro int ilenx(str)27*2fb4f839SGregory Neil Shapiroilenx(str) 28*2fb4f839SGregory Neil Shapiro const char *str; 29*2fb4f839SGregory Neil Shapiro { 30*2fb4f839SGregory Neil Shapiro char c; 31*2fb4f839SGregory Neil Shapiro int idx; 32*2fb4f839SGregory Neil Shapiro XLENDECL 33*2fb4f839SGregory Neil Shapiro 34*2fb4f839SGregory Neil Shapiro if (NULL == str) 35*2fb4f839SGregory Neil Shapiro return -1; 36*2fb4f839SGregory Neil Shapiro for (idx = 0; (c = str[idx]) != '\0'; idx++) 37*2fb4f839SGregory Neil Shapiro XLEN(c); 38*2fb4f839SGregory Neil Shapiro return xlen; 39*2fb4f839SGregory Neil Shapiro } 40*2fb4f839SGregory Neil Shapiro #endif /* _FFR_8BITENVADDR */ 41