
//
// cf.h - templates for comparison functions
//
#ifndef CF_H_INCLUDED
#define CF_H_INCLUDED

template <class T>
inline int cf(T a, T b)
    {
    return a < b ? -1 : a == b ? 0 : 1;
    }

inline int cf(int i, int j)
    {
    return i - j;
    }

inline int cf(const char *s, const char *t)
    {
    return strcmp(s, t);
    }

#endif

