#ifndef __INT_SORT_H__ #define __INT_SORT_H__ /** * int-sort.h * A declaration of a generic sorting routine for arrays of * integers. */ // +--------------------+--------------------------------------------- // | Exported Functions | // +--------------------+ /** * Procedure: * int_sort * Parameters: * ints, an array of integers * size, a non-negative integer * Purpose: * Sort an array of integers from smallest to largest. * Produces: * [Nothing; called for the side effect] * Preconditions: * size is the length of ints. * Postconditions: * ints[i] <= ints[i+1] for all reasonable i (0 <= i < size-1) * values should be the same int both the original and the result * OR The final value of ints is a permutation of the original value. * OR The only mutations to ints are done through int_swap. */ void int_sort (int ints[], int size); #endif // __INT_SORT_H__