home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / corelib / ncbibs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  4.4 KB  |  107 lines  |  [TEXT/R*ch]

  1. /*  ncbibs.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. * File Name:  ncbibs.h
  27. *
  28. * Author:  Jim Ostell
  29. *
  30. * Version Creation Date:  1/1/91
  31. *
  32. * $Revision: 2.3 $
  33. *
  34. * File Description:
  35. *   ByteStore typedefs, prototypes, and defines
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. * 04-15-93 Schuler     Changed _cdecl to LIBCALL
  42. *
  43. *
  44. * ==========================================================================
  45. */
  46.  
  47. #ifndef _NCBIBS_
  48. #define _NCBIBS_
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53.  
  54. typedef struct bsunit {             /* for building multiline strings */
  55.     Nlm_Handle str;            /* the string piece */
  56.     Nlm_Int2 len_avail,
  57.          len;
  58.     struct bsunit PNTR next; }       /* the next one */
  59. Nlm_BSUnit, PNTR Nlm_BSUnitPtr;
  60.  
  61. typedef struct bytestore {
  62.     Nlm_Int4 seekptr,       /* current position */
  63.         totlen,             /* total stored data length in bytes */
  64.         chain_offset;       /* offset in ByteStore of first byte in curchain */
  65.     Nlm_BSUnitPtr chain,       /* chain of elements */
  66.         curchain;           /* the BSUnit containing seekptr */
  67. } Nlm_ByteStore, PNTR Nlm_ByteStorePtr;
  68.  
  69. Nlm_VoidPtr LIBCALL Nlm_BSMerge PROTO((Nlm_ByteStorePtr ssp, Nlm_VoidPtr dest));
  70. Nlm_ByteStorePtr LIBCALL Nlm_BSNew PROTO((Nlm_Int4 len));
  71. Nlm_Int2 LIBCALL Nlm_BSSeek PROTO((Nlm_ByteStorePtr bsp, Nlm_Int4 offset, Nlm_Int2 origin));
  72. Nlm_Int4 LIBCALL Nlm_BSTell PROTO((Nlm_ByteStorePtr bsp));
  73. Nlm_Int4 LIBCALL Nlm_BSDelete PROTO((Nlm_ByteStorePtr bsp, Nlm_Int4 len));
  74. Nlm_Int4 LIBCALL Nlm_BSWrite PROTO((Nlm_ByteStorePtr bsp, Nlm_VoidPtr ptr, Nlm_Int4 len));
  75. Nlm_Int4 LIBCALL Nlm_BSInsert PROTO((Nlm_ByteStorePtr bsp, Nlm_VoidPtr ptr, Nlm_Int4 len));
  76. Nlm_Int4 LIBCALL Nlm_BSInsertFromBS PROTO((Nlm_ByteStorePtr bsp, Nlm_ByteStorePtr bsp2, Nlm_Int4 len));
  77. Nlm_Int4 LIBCALL Nlm_BSRead PROTO((Nlm_ByteStorePtr bsp, Nlm_VoidPtr ptr, Nlm_Int4 len));
  78. Nlm_Int2 LIBCALL Nlm_BSGetByte PROTO((Nlm_ByteStorePtr bsp));
  79. Nlm_Int2 LIBCALL Nlm_BSPutByte PROTO((Nlm_ByteStorePtr bsp, Nlm_Int2 value));
  80. Nlm_Int4 LIBCALL Nlm_BSAdd PROTO((Nlm_ByteStorePtr ssp, Nlm_Int4 len));
  81. Nlm_Int4 LIBCALL Nlm_BSLen PROTO((Nlm_ByteStorePtr ssp));
  82. Nlm_ByteStorePtr LIBCALL Nlm_BSFree PROTO((Nlm_ByteStorePtr ssp));
  83. Nlm_ByteStorePtr LIBCALL Nlm_BSDup PROTO((Nlm_ByteStorePtr source));
  84.  
  85. #define ByteStore Nlm_ByteStore
  86. #define ByteStorePtr Nlm_ByteStorePtr
  87. #define BSMerge Nlm_BSMerge
  88. #define BSNew Nlm_BSNew
  89. #define BSLen Nlm_BSLen
  90. #define BSFree Nlm_BSFree
  91. #define BSSeek Nlm_BSSeek
  92. #define BSTell Nlm_BSTell
  93. #define BSDelete Nlm_BSDelete
  94. #define BSWrite Nlm_BSWrite
  95. #define BSInsert Nlm_BSInsert
  96. #define BSInsertFromBS Nlm_BSInsertFromBS
  97. #define BSDup Nlm_BSDup
  98. #define BSRead Nlm_BSRead
  99. #define BSGetByte Nlm_BSGetByte
  100. #define BSPutByte Nlm_BSPutByte
  101.  
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105.  
  106. #endif
  107.