* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
{
char *b1, *b2;
size_t n1, n2;
+ char *tmp = p->t;
+ const size_t s = p->s;
+ GCompareDataFunc cmp = p->cmp;
+ void *arg = p->arg;
if (n <= 1)
return;
msort_with_tmp (p, b1, n1);
msort_with_tmp (p, b2, n2);
- char *tmp = p->t;
- const size_t s = p->s;
- GCompareDataFunc cmp = p->cmp;
- void *arg = p->arg;
switch (p->var)
{
case 0:
}
else
{
- mempcpy (tmp, b2, s);
+ memcpy (tmp, b2, s);
tmp += s;
b2 += s;
--n2;
void **tp = (void **) (p.t + n * sizeof (void *));
void **t = tp;
void *tmp_storage = (void *) (tp + n);
+ char *kp;
+ size_t i;
while ((void *) t < tmp_storage)
{
/* tp[0] .. tp[n - 1] is now sorted, copy around entries of
the original array. Knuth vol. 3 (2nd ed.) exercise 5.2-10. */
- char *kp;
- size_t i;
for (i = 0, ip = (char *) b; i < n; i++, ip += s)
if ((kp = tp[i]) != ip)
{
GCompareDataFunc compare_func,
gpointer user_data)
{
- return msort_r (pbase, total_elems, size, compare_func, user_data);
+ msort_r ((gpointer)pbase, total_elems, size, compare_func, user_data);
}