/*---------------------------------------------------------------------------*\

    FILE....: GEN.C
    TYPE....: C Module
    AUTHOR..: David Rowe
    DATE....: 7/11/97

    General purpose C functions.

\*---------------------------------------------------------------------------*/

#include "gen.h"


/* returns the minimum of two shorts */

short smin(short a, short b) {
    if (a < b)
	return(a);
    else
	return(b);
}

/* returns the minimum of two longs */

long lmin(long a, long b) {
    if (a < b)
	return(a);
    else
	return(b);
}

/* returns the maximum of two shorts */

short smax(short a, short b) {
    if (a > b)
	return(a);
    else
	return(b);
}

/* returns the maximum of two longs */

long lmax(long a, long b) {
    if (a > b)
	return(a);
    else
	return(b);
}

