NCBI C Toolkit Cross Reference

C/cdromlib/casn.h


  1 /* casn.h
  2 * ===========================================================================
  3 *
  4 *                            PUBLIC DOMAIN NOTICE                          
  5 *               National Center for Biotechnology Information
  6 *                                                                          
  7 *  This software/database is a "United States Government Work" under the   
  8 *  terms of the United States Copyright Act.  It was written as part of    
  9 *  the author's official duties as a United States Government employee and 
 10 *  thus cannot be copyrighted.  This software/database is freely available 
 11 *  to the public for use. The National Library of Medicine and the U.S.    
 12 *  Government have not placed any restriction on its use or reproduction.  
 13 *                                                                          
 14 *  Although all reasonable efforts have been taken to ensure the accuracy  
 15 *  and reliability of the software and data, the NLM and the U.S.          
 16 *  Government do not and cannot warrant the performance or results that    
 17 *  may be obtained by using this software or data. The NLM and the U.S.    
 18 *  Government disclaim all warranties, express or implied, including       
 19 *  warranties of performance, merchantability or fitness for any particular
 20 *  purpose.                                                                
 21 *                                                                          
 22 *  Please cite the author in any work or product based on this material.   
 23 *
 24 * ===========================================================================
 25 *
 26 * RCS $Id: casn.h,v 6.0 1997/08/25 18:12:43 madden Exp $
 27 *
 28 * Author:  Greg Schuler
 29 *
 30 * Version Creation Date: 9/23/92
 31 *
 32 * File Description:
 33         functions to decompress a compressed ASN,1 (CASN) file.
 34 *
 35 * Modifications:  
 36 * --------------------------------------------------------------------------
 37 * Date     Name        Description of modification
 38 * -------  ----------  -----------------------------------------------------
 39 * 06-28-93 Schuler     New function:  CASN_Seek()
 40 * 10-05-94 Schuler     Prototype for CASN_NextBiostruc
 41 * 05-16-94 Schuler     Added RCS Log directive.  Comments will henceforth
 42 *                      be inserted automatically into the source at the
 43 *                      time it is checked into the system.
 44 
 45 $Log: casn.h,v $
 46 Revision 6.0  1997/08/25 18:12:43  madden
 47 Revision changed to 6.0
 48 
 49 Revision 5.1  1997/06/26 21:55:23  vakatov
 50 [PC] DLL'd "ncbicdr.lib", "ncbiacc.lib", "ncbinacc.lib" and "ncbicacc.lib"
 51 
 52 Revision 5.0  1996/05/28 13:55:34  ostell
 53 Set to revision 5.0
 54 
 55  * Revision 4.3  1995/08/28  23:20:47  kans
 56  * Biostruc_supported restored
 57  *
 58  * Revision 4.2  1995/08/24  13:13:00  schuler
 59  * Changed CASE_Type_ch to CASN_Type_ch
 60  *
 61  * Revision 4.1  1995/08/04  02:23:53  schuler
 62  * Added definition CASN_Type_ch (chromosome)
 63  *
 64  * Revision 4.0  1995/07/26  13:50:32  ostell
 65  * force revision to 4.0
 66  *
 67  * Revision 2.16  1995/07/25  18:47:57  kans
 68  * revert to no Biostruc_supported
 69  *
 70  * Revision 2.15  1995/06/26  18:07:13  kans
 71  * restored #define Biostruc_supported
 72  *
 73  * Revision 2.13  1995/06/23  16:02:43  kans
 74  * support for accmmdbs.c stub to resolve symbols without MMDB link
 75  *
 76  * Revision 2.12  1995/06/23  13:22:25  kans
 77  * Biostruc_CD_supported symbol needed for local MMDB access
 78  *
 79  * Revision 2.11  1995/06/22  21:21:22  kans
 80  * #define Biostruc_supported
 81  *
 82  * Revision 2.10  1995/05/16  14:12:46  schuler
 83  * Automatic comment insertion enabled
 84  *
 85 
 86 
 87 * ==========================================================================
 88 */
 89 #ifndef __CompressedASN1__
 90 #define __CompressedASN1__
 91 
 92 #ifndef Biostruc_supported
 93 #define Biostruc_supported
 94 #endif
 95 
 96 #include <objsset.h>
 97 
 98 #ifdef Biostruc_supported
 99 #include <mmdbapi1.h>
100 #include <mmdbapi2.h>
101 #include <mmdbapi3.h>
102 #endif
103 
104 #undef NLM_EXTERN
105 #ifdef NLM_IMPORT
106 #define NLM_EXTERN NLM_IMPORT
107 #else
108 #define NLM_EXTERN extern
109 #endif
110 
111 #ifdef __cplusplus
112 extern "C" {
113 #endif
114 
115 enum CASN_Error {
116         CASN_ErrNone,                   /* no error */
117         CASN_ErrGeneric,                /* general error, not one listed below */
118         CASN_ErrMemory,                 /* memory allocation failed */
119         CASN_ErrBadHandle,              /* CASN_Handle is invalid or corrupt */
120         CASN_ErrFileOpen,               /* unable to open file for reading */
121         CASN_ErrFileCreate,             /* unable to open file for writing */
122         CASN_ErrFileRead,               /* unable to read from open file */
123         CASN_ErrFileWrite,              /* unable to write to open file */
124         CASN_ErrFileSeek,               /* either seek or tell failed */
125         CASN_ErrFileFormat };   /* file format not recognized, or file corrupt */
126 
127 typedef enum CASN_Type
128 {
129         CASN_Type_ml,
130         CASN_Type_aa,
131         CASN_Type_nt,
132         CASN_Type_st,
133         CASN_Type_ch,
134         CASN_TypeMed = -1,      /* MEDLINE record (ASN.1 type Medline-entry)*/
135         CASN_TypeSeq = -2       /* Sequence record (ASN.1 type Seq-entry)*/
136 }
137 CASN_Type;
138 
139 struct casn_ioblock;
140 typedef struct casn_ioblock *CASN_Handle;
141 
142 
143 /* ----- high-level ----- */
144 NLM_EXTERN CASN_Handle   LIBCALL  CASN_Open PROTO((char *fname));
145 NLM_EXTERN void          LIBCALL  CASN_Close PROTO((CASN_Handle handle)); 
146 NLM_EXTERN AsnIo*        LIBCALL  CASN_GetAsnIoPtr PROTO((CASN_Handle handle));
147 NLM_EXTERN CASN_Type     LIBCALL  CASN_DocType PROTO((CASN_Handle handle));
148 NLM_EXTERN long          LIBCALL  CASN_DocCount PROTO((CASN_Handle handle));
149 NLM_EXTERN MedlineEntry* LIBCALL  CASN_NextMedlineEntry PROTO((CASN_Handle handle));
150 NLM_EXTERN SeqEntry*     LIBCALL  CASN_NextSeqEntry PROTO((CASN_Handle handle));
151 NLM_EXTERN int           LIBCALL  CASN_Seek PROTO((CASN_Handle,long offset,int origin));
152 
153 #ifdef Biostruc_supported
154 NLM_EXTERN Biostruc*     LIBCALL  CASN_NextBiostruc PROTO((CASN_Handle handle));
155 #endif
156 
157 /* ----- low-level ----- */
158 NLM_EXTERN CASN_Handle LIBCALL  CASN_New PROTO((CASN_Type doc_type, int huff_count));
159 NLM_EXTERN void        LIBCALL  CASN_Free PROTO((CASN_Handle));
160 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #undef NLM_EXTERN
166 #ifdef NLM_EXPORT
167 #define NLM_EXTERN NLM_EXPORT
168 #else
169 #define NLM_EXTERN
170 #endif
171 
172 #endif
173 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.