/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1995-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#include "vdelhdr.h"
/* Squeeze a string.
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 2/15/95
*/
#ifdef DEBUG
#endif
(c) > 0 && C_ISTINY(c) && \
(k) >= K_SELF )
struct _table_s
int n_tar;
};
/* encode and output delta instructions */
#if __STD_C
#else
int n_copy; /* length of match */
#endif
{
k_type = 0;
if(copy >= 0) /* process the COPY instruction */
{ best = d;
}
for(n = 0; n < K_RTYPE; ++n)
continue;
best = d;
}
{ for(d = K_QTYPE-1; d > 0; --d)
if(n >= (d<<VD_BITS) )
break;
}
/* update address caches */
/* see if mergable to last ADD instruction */
}
else
}
}
if(n_add > 0)
}
if(n_copy > 0)
}
return 0;
}
/* Fold a string */
#if __STD_C
#else
#endif
{
curm = 0;
bestm = -1;
for(;;)
{ for(;;) /* search for the longest match */
goto endsearch;
if(bestm >= 0) /* skip over past elements */
goto endsearch;
for(;;)
{
if((n = m) < head)
goto next;
/* make sure that the M_MIN bytes match */
goto next;
/* make sure this is a real match */
goto next;
goto extend;
goto extend;
goto endsearch;
}
n = len;
goto endsearch;
/* check for a longer match */
if(len == n+1)
}
if(bestm >= 0)
return -1;
/* add a sufficient number of suffices */
bestm = -1;
}
else
{ if(!add)
add = s;
ss = s;
}
if((m = hash[n]) < 0 )
else
}
break;
}
{ if(!add)
add = s;
break;
}
}
}
#if __STD_C
#else
#endif
{
reg int k, n;
if(size <= 0)
return 0;
return -1;
/* space for the hash table */
k = size;
n = size/2;
do (size = n); while((n &= n-1) != 0);
if(size < 64)
size = 64;
k += size;
return -1;
/* initialize table before processing */
}