/*-------------------------------------------------------------------+
|                                                                    |
|                Copyright (c) 1996, SAS Institute Inc.              |
|                  Unpublished - All Rights Reserved                 |
|                      S A S / C   S A M P L E                       |
|         Name: PDSREADH                                             |
|     Language: C                                                    |
|      Purpose: Includes for library calls, various defines, and     |
|               prototypes for static functions.                     |
|                                                                    |
|   For Sample: prefix.SAMPLE.C(P2UREAD)                             |
|                                                                    |
+-------------------------------------------------------------------*/
#ifndef __PDSREADH__
#define __PDSREADH__
#include <stdlib.h>
#include <lclib.h>
#include <string.h>
#include <os.h>
#include <lcio.h>
#include <lcstring.h>
#undef NDEBUG
#include <assert.h>

#include "pdsmemh.h"           /* Structure maping a real PDS        */
                               /* directory entry                    */
#include "p2upnode.h"          /* Skiplist node structures           */
#include "p2upmh.h"            /* Public function prototypes for     */
                               /* PDS2UPDT                           */

#define SYSLIB_MODE  "rb"             /* Mode for input DD, read     */
                                      /* directory block in binary   */

#define MEMBER_READY      2000        /* Member returned to process  */
#define END_PDS_MEMBERS   2001        /* No more members to process  */
                                      /* Note: values for the above  */
                                      /* are arbitrary, except for   */
                                      /* needing to be different     */
                                      /* from EXIT_SUCCESS and       */
                                      /* EXIT_FAILURE.               */

#define ALIAS_BIT        0x80
#define LEN_TTR             3
#define TERMINATION_MEMBER "\xff\xff\xff\xff\xff\xff\xff\xff"

/*--------------------------------------------------------------------+
| Prototypes for static functions                                     |
+--------------------------------------------------------------------*/
static
 int pdsread (
              PDS_MBR *pds,       /* ptr to member information       */
              FILE *fp            /* PDS directory FILE pointer.     */
             );
static
 int pdsverfi(
              FILE * (*fp)        /* file pointer for input dd       */
             );
#endif /* __PDSREADH__ */