PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/visualizations/Milkdrop/vis_milkdrop/evallib/Lmovb.c

http://github.com/xbmc/xbmc
C | 29 lines | 17 code | 4 blank | 8 comment | 4 complexity | d5f8359557f164de668b8e4dbf141227 MD5 | raw file
 1/*
 2 * Bob Denny	 28-Aug-82  Remove reference to stdio.h
 3 * Scott Guthery 20-Nov-83	Adapt for IBM PC & DeSmet C
 4 */
 5
 6#include "lex.h"
 7
 8_lmovb(lp, c, st)
 9register int c, st;
10register struct lextab *lp;
11{
12        int base;
13
14        while ((base = lp->llbase[st]+c) > lp->llnxtmax ||
15                        (lp->llcheck[base] & 0377) != st) {
16
17                if (st != lp->llendst) {
18/*
19 * This miscompiled on Decus C many years ago:
20 *                      st = lp->lldefault[st] & 0377;
21 */
22                        base = lp->lldefault[st] & 0377;
23                        st = base;
24                }
25                else
26                        return(-1);
27        }
28        return(lp->llnext[base]&0377);
29}