/* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". * * Author: Hans van Staveren */ #include #include #include "assert.h" #include "param.h" #include "tables.h" #include "types.h" #include #include "data.h" #include "result.h" #include "extern.h" #include "fillem.h" #ifndef NDEBUG #include extern char em_mnem[][4]; #endif extern char em_flag[]; static int argtyp(int mn) { switch(em_flag[mn-sp_fmnem]&EM_PAR) { case PAR_W: case PAR_S: case PAR_Z: case PAR_O: case PAR_N: case PAR_L: case PAR_F: case PAR_R: case PAR_C: return(EV_INT); default: return(EV_STR); } } byte *trypat(register byte *bp, int len) { register int patlen,i; result_t result; getint(patlen,bp); if (len == 3) { if (patlen < 3) return(0); } else { if (patlen != len) return(0); } for(i=0;iemlines) { nemlines -= emp-emlines; for (i=0,ep=emlines;i=0;i--) { index = pathash[hash[i]&BMASK]; while (index != 0) { bp = &pattern[index]; if ( bp[PO_HASH] == (hash[i]>>8)) if ((cp=trypat(&bp[PO_MATCH],i+1)) != 0) return(cp); index = (bp[PO_NEXT]&BMASK) | (bp[PO_NEXT+1]<<8); } } return(0); }