/*****************************************************************************
*                                                                            *
*      COMMON OCEANOGRAPHIC DATA ACCESS SYSTEM (CODAS)                       *
*                                                                            *
*      WRITTEN BY:  RAMON CABRERA, ERIC FIRING, and JULIE RANADA             *
*                   JOINT INSTITUTE FOR MARINE AND ATMOSPHERIC RESEARCH      *
*                   1000 POPE ROAD  MSB 312                                  *
*                   HONOLULU, HI 96822                                       *
*                                                                            *
*      VERSION:     3.10                                                     *
*                                                                            *
*      DATE:        APRIL 1989, AUGUST 1995                                  *
*                                                                            *
*****************************************************************************/
/*

    FILE:  sort.h

           Sorting functions.

*/
#ifndef sort_included
#define sort_included
#ifndef dbhost_included
#include "dbhost.h"           /* PROTOTYPE_ALLOWED */
#endif
#ifndef dbext_included
#include "dbext.h"            /* LONG, etc. */
#endif
#if PROTOTYPE_ALLOWED
LONG DSRCHGE(ULONG *key, CHAR *key_base, int *entry_length, int *nentries);
int dir_search_GE_file(FILE *fp, ULONG key, ULONG key_base, int entry_length,
                       int nentries, int from, int to);
void DSORTAS(CHAR *dir_base, CHAR *key_base, int *entry_length, int *nentries);
void sort_dir_index(int n, int *indx, CHAR *key_base, int entry_length);
LONG read_long(FILE *fp, long ofs, int from, int to);
#else
LONG DSRCHGE();
int dir_search_GE_file();
void DSORTAS();
void sort_dir_index();
LONG read_long();
#endif
#endif /* ifndef sort_included */

