/*---------------------------------------------------------------*/
/*   Copyright (c) 1988 Regents of the University of California  */
/*                 All Rights Reserved                           */
/*---------------------------------------------------------------*/
/*
      %W%  (UCLA, IGPP) %G% 
 */

/* -- DESCEND ---------------------------------------------- */
/*                                                           */
/* ENTRY REQUIREMENTS:                                       */
/*   NONE                                                    */
/*                                                           */
/* RETURN VALUES:                                            */
/*   1 if the EODESC string is written; 0 otherwise.         */
/*                                                           */
/*      Development History:                                 */
/*              Begun:   3/3/87 - Marco Zagha                */
/*                  Under GG44 support.                      */
/*              Update:  5/18/87 - Marco Zagha (peof added)  */
/*                  Under GG44 support.                      */
/*              Update:  6/8/87  - Marco Zagha (peof removed)*/
/*                  Under GG44 support.                      */
/*              Update:  6/9/87  - Marco Zagha               */
/*                (Check of Descriptors_written added)       */
/*                  Under GG44 support.                      */
/*              Edited:04/14/94 - Gilbert Hyatt              */
/*                  Now uses pipec.h as entry point          */
/*                  into the library.                        */
/* --------------------------------------------------------- */
int
descend()
{
#include "pipec.h"

  extern int Descriptors_written;
  extern int Recl;
  extern int Next_start;

  if (!Descriptors_written)
  {
     pwrite(dataout, EODESC, strlen(EODESC));
     Descriptors_written = 1;
     if(Recl == -1) Recl = Next_start;	/* Undefined so no rdesc() before descend() */
     return (1);
  }
  else
    return (0);
}

