/*
 *   Copyright (C) 1988-2006 Lucent Technologies Inc. and others.
 *   All Rights Reserved.
 */

#ifndef MULTILINGUAL
#ident "@(#)/usr/src/lib/libl/lib/yyless.c	3.1 1/14/88 18:33:05 - (c) Copyright 1988, 1989, 1990 Amdahl Corporation"
yyless(x)
{
extern char yytext[];
register char *lastch, *ptr;
extern int yyleng;
extern int yyprevious;
lastch = yytext+yyleng;
if (x>=0 && x <= yyleng)
	ptr = x + yytext;
else
#if defined(INTSIZE) && defined(PTRSIZE) && (INTSIZE < PTRSIZE)
	/* the suggested cast WON'T WORK, so there's no use in trying */
	abort();
#else
	/*
	 * The cast on the next line papers over an unconscionable nonportable
	 * glitch to allow the caller to hand the function a pointer instead of
	 * an integer and hope that it gets figured out properly.  But it's
	 * that way on all systems .   
	 */
	ptr = (char *) x;
#endif
while (lastch > ptr)
	yyunput(*--lastch);
*lastch = 0;
if (ptr >yytext)
	yyprevious = *--lastch;
yyleng = ptr-yytext;
}
#endif
