home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
OS2_LEX.ZIP
/
LMOVB.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-10-06
|
742b
|
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>
int _lmovb(register struct lextab *lp, register c, register st)
{
int base;
while ((base = lp->llbase[st]+c) > lp->llnxtmax ||
((int) lp->llcheck[base] & 0377) != st) {
if (st != lp->llendst) {
/*
* This miscompiled on Decus C many years ago:
* st = lp->lldefault[st] & 0377;
*/
base = lp->lldefault[st] & 0377;
st = base;
}
else
return(-1);
}
return(lp->llnext[base]&0377);
}