home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
c
/
lex.arc
/
LMOVI.C
< prev
next >
Wrap
Text File
|
1986-03-03
|
749b
|
29 lines
/*
* Bob Denny 28-Aug-82 Remove reference to stdio.h
* Scott Guthery 20-Nov-83 Adapt for IBM PC & DeSmet C
*/
#include <lex.h>
_lmovi(lp, c, st)
register int c;
register int st;
register struct lextab *lp;
{
int base;
while ((base = lp->llbase[st]+c) > lp->llnxtmax ||
(int)(lp->llcheck)[base] != st)
if (st != lp->llendst) {
/*
* This miscompiled on Decus C many years ago
* st = ((int *)lp->lldefault)[st];
*/
base = ((int *)lp->lldefault)[st];
st = base;
}
else
return(-1);
return(((int *)lp->llnext)[base]);
}