/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-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 "vchhdr.h"
/* Construct the code bits given their lengths.
**
** Written by Kiem-Phong Vo
*/
/* sort by code lengths */
#if __STD_C
#else
#endif
{
int d;
return (d = *o - *t) != 0 ? d : o < t ? -1 : o > t ? 1 : 0;
}
#if __STD_C
#else
#endif
{
int i, notz, k, s;
Vcbit_t b = 0;
return -1;
{ if(size[i] == 0)
continue;
}
for(i = 0; i < notz; i = k)
{ s = *sort[i];
if(k < notz)
b <<= (*sort[k] - s);
}
/* return the maximum size of any code */
return s;
}