/*
* Copyright (C) 2001, 2002, and 2003 Roy Keene
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* email: dact@rkeene.org
*/
#include "dact.h"
#include "sort.h"
#ifdef HAVE_STDLIB_H
#include
#endif
#ifdef HAVE_STRING_H
#include
#endif
#include
/*
Bubble Sort
*/
void int_sort (uint32_t array[], unsigned int listsize, int mode) {
uint32_t *mod_array=NULL;
unsigned int temp,i,j;
mode=(!!mode);
if (mode) {
mod_array=malloc(listsize*sizeof(uint32_t));
for (i=0;i hold_array[x]) {
if (x