~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to corelib/ncbifile.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
*
33
33
* Version Creation Date:   1/1/91
34
34
*
35
 
* $Revision: 6.5 $
 
35
* $Revision: 6.6 $
36
36
*
37
37
* File Description:
38
38
*       prototypes for portable file routines
40
40
* Modifications:
41
41
* --------------------------------------------------------------------------
42
42
* $Log: ncbifile.h,v $
 
43
* Revision 6.6  2004/05/07 15:57:14  kans
 
44
* added FileCache functions for buffered read, graceful handing of Unix, Mac, and DOS line endings
 
45
*
43
46
* Revision 6.5  2001/04/05 21:36:05  juran
44
47
* EjectCd and MountCd #defined to FALSE.
45
48
*
98
101
NLM_EXTERN Nlm_CharPtr LIBCALL Nlm_TmpNam(Nlm_CharPtr s);
99
102
NLM_EXTERN void LIBCALL Nlm_SetFileOpenHook(Nlm_FileOpenHook hook);
100
103
 
 
104
/* FileCache provides buffered text read for handling Unix, Mac, and DOS line endings gracefully */
 
105
 
 
106
typedef struct nlm_filecachedata {
 
107
  FILE      *fp;
 
108
  Nlm_Char  buf [516];
 
109
  Nlm_Int2  ctr;
 
110
  Nlm_Int2  total;
 
111
  Nlm_Int4  offset;
 
112
} Nlm_FileCache, PNTR Nlm_FileCachePtr;
 
113
 
 
114
NLM_EXTERN Nlm_Boolean Nlm_FileCacheSetup (Nlm_FileCache PNTR fcp, FILE *fp);
 
115
NLM_EXTERN Nlm_CharPtr Nlm_FileCacheGetString (Nlm_FileCache PNTR fcp, Nlm_CharPtr str, size_t size);
 
116
NLM_EXTERN Nlm_CharPtr Nlm_FileCacheReadLine (Nlm_FileCache PNTR fcp, Nlm_CharPtr str, size_t size, Nlm_BoolPtr nonewline);
 
117
NLM_EXTERN void Nlm_FileCacheSeek (Nlm_FileCache PNTR fcp, Nlm_Int4 pos);
 
118
NLM_EXTERN Nlm_Int4 Nlm_FileCacheTell (Nlm_FileCache PNTR fcp);
 
119
NLM_EXTERN Nlm_Boolean Nlm_FileCacheFree (Nlm_FileCache PNTR fcp, Nlm_Boolean restoreFilePos);
 
120
 
 
121
 
 
122
 
101
123
#define FileOpen Nlm_FileOpen
102
124
#define FileClose Nlm_FileClose
103
125
#define FileRead Nlm_FileRead
115
137
#define CreateDir Nlm_CreateDir
116
138
#define DirCatalog Nlm_DirCatalog
117
139
#define TmpNam Nlm_TmpNam
 
140
 
 
141
#define FileCache Nlm_FileCache
 
142
#define FileCacheSetup Nlm_FileCacheSetup
 
143
#define FileCachePtr Nlm_FileCachePtr
 
144
 
 
145
#define FileCacheSetup Nlm_FileCacheSetup
 
146
#define FileCacheGetString Nlm_FileCacheGetString
 
147
#define FileCacheReadLine Nlm_FileCacheReadLine
 
148
#define FileCacheSeek Nlm_FileCacheSeek
 
149
#define FileCacheTell Nlm_FileCacheTell
 
150
#define FileCacheFree Nlm_FileCacheFree
 
151
 
118
152
#define EjectCd(sVolume, deviceName, rawDeviceName, mountPoint, mountCmd)  FALSE
119
153
#define MountCd(sVolume, deviceName, mountPoint, mountCmd)                 FALSE
120
154