/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1996-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> *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
/* Radix sort.
** Strategy:
** 1. All records are kept on a linked list.
** 2. In each phase, portions of the linked list are sorted using
** bucketing based on the byte at the position for that phase.
**
** Written by Kiem-Phong Vo (07/08/96).
*/
#include "rshdr.h"
typedef struct rsradix_s
} Rsradix_t;
#if __STD_C
#else
#endif
{
return 0;
}
#if __STD_C
#else
#endif
{
if(!(r = *bin) )
n += 1;
}
}
{ if(!(r = *bin) )
continue;
n -= 1;
}
}
else
if((r = *bin) )
else
n += 1;
}
}
ph += 1;
{ if((r = *bin) )
{ n -= 1;
t->right = r;
t = r->left;
}
}
}
break;
}
}
}
}
else
{ if(!empty)
}
else
if((r = *bin) )
else
n += 1;
}
}
}
if(empty)
{ if(list)
}
if(n <= 0)
else
{ ph += 1;
{ if((r = *bin) )
{ n -= 1;
t->right = r;
t = r->left;
}
}
}
break;
}
}
}
}
if(list)
}
return list;
}
/* public method */
{ radixinsert,
sizeof(Rsradix_t),
"radix",
"Radix sort."
};
#ifdef NoF
#endif