date and time created 85/05/23 14:06:03 by miriam
[unix-history] / usr / src / old / lex / libln / yyless.c
CommitLineData
87c14f42 1/* @(#)yyless.c 4.2 %G% */
b04bff35
SL
2
3yyless(x)
4{
5extern char yytext[];
6register char *lastch, *ptr;
7extern int yyleng;
8extern int yyprevious;
9lastch = yytext+yyleng;
10if (x>=0 && x <= yyleng)
11 ptr = x + yytext;
12else
87c14f42 13 ptr = (char *) x;
b04bff35
SL
14while (lastch > ptr)
15 yyunput(*--lastch);
16*lastch = 0;
17if (ptr >yytext)
18 yyprevious = *--lastch;
19yyleng = ptr-yytext;
20}