home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
fileutil
/
scan.lha
/
src
/
lmovb.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-21
|
717b
|
30 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"
_lmovb(lp, c, st)
register int c, st;
register struct lextab *lp;
{
int base;
while ((base = lp->llbase[st]+c) > lp->llnxtmax ||
(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);
}