/*

    FUNCTION:  get_ref()

    #included BY:  ARRDEP, TIMSLIP

*/
#include "common.h"    /* FILE */
#include "dbhost.h"    /* PROTOTYPE_ALLOWED */
#include "cal.h"       /* VELOCITY_TYPE */

#if PROTOTYPE_ALLOWED
int read_ref(FILE *fp_ref, VELOCITY_TYPE *ref);
#else
int read_ref();
#endif

#if PROTOTYPE_ALLOWED
int get_ref(FILE *fp_ref, VELOCITY_TYPE refs[], int n_refs)
#else
int get_ref(fp_ref, refs, n_refs)
FILE *fp_ref;
VELOCITY_TYPE refs[];
int n_refs;
#endif
{
   /* shift all refs to the next lower index */
   memcpy(&(refs[0]), &(refs[1]), (n_refs-1)*sizeof(VELOCITY_TYPE));

   return(read_ref(fp_ref, &(refs[n_refs-1])));
}

