/*
 * Copyright (c) 2002, 2004 Sendmail, 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/generic.h"
SM_RCSID("@(#)$Id: strrdelem.c,v 1.4 2007/07/26 15:26:33 ca Exp $")

#include "sm/assert.h"
#include "sm/magic.h"
#include "sm/memops.h"
#include "sm/rpool.h"
#include "sm/str.h"
#include "sm/str-int.h"

#if SM_STR_CHECK
/*
**  SM_STR_RD_ELEM -- read an element from a str
**
**	Parameters:
**		str -- string to read an element from
**		i -- index
**
**	Returns:
*/

uchar
sm_str_rd_elem(sm_str_P str, uint i)
{
	SM_IS_BUF(str);
	SM_REQUIRE(str->sm_str_len > i);
	return str->sm_str_base[i];
}
#endif /* SM_STR_CHECK */


syntax highlighted by Code2HTML, v. 0.9.1