This file is indexed.

/usr/lib/emboss/include/ajfile.h is in emboss-lib 6.3.1-6ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
#ifdef __cplusplus
extern "C"
{
#endif

#ifndef ajfile_h
#define ajfile_h

#ifdef WIN32
#include "win32.h"
#endif

#include "ajlist.h"
#include <sys/stat.h>

#ifdef WIN32
#define pid_t void*
#else
#define HANDLE void*
#endif

/* @data AjPFile **************************************************************
**
** Ajax file object. Holds information for an open (unbuffered)
** input or output file.
**
** On output, conversion code "%F" writes the filename.
**
** @alias AjSFile
** @alias AjOFile
**
** @attr fp [FILE*] C file pointer
** @attr Name [AjPStr] File name as used when opening
** @attr List [AjPList] List of file names (first is open)
** @attr End [AjBool] True if EOF has been reached
** @attr App [AjBool] True if file was opened for append. 
** @attr Buff [AjPStr] Buffer for latest line read
** @attr Workbuffer [char*] Block as a buffer for fgets etc
** @attr Readblock [char*] Block as a buffer for fread
** @attr Filepos [ajlong] File offset for start of latest read
** @attr Blocksize [ajuint] Read block maximum size
** @attr Blockpos [ajuint] Read block position
** @attr Blocklen [ajuint] Read block length used
** @attr Buffsize [ajuint] Buffer size (zero for default size)
** @attr Handle [ajint] AJAX file number 0 if unused
** @attr Pid [pid_t] Process PID if any (non-WIN32 only)
** @attr Process [HANDLE] Process handle (WIN32 only)
** @attr Thread [HANDLE] Thread handle (WIN32 only)
** @@
******************************************************************************/

typedef struct AjSFile
{
    FILE *fp;
    AjPStr Name;
    AjPList List;
    AjBool End;
    AjBool App;
    AjPStr Buff;
    char *Workbuffer;
    char *Readblock;
    ajlong Filepos;
    ajuint Blocksize;
    ajuint Blockpos;
    ajuint Blocklen;
    ajuint Buffsize;
    ajint Handle;
    pid_t Pid;
    HANDLE Process;
    HANDLE Thread;
} AjOFile;

#define AjPFile AjOFile*




/* @data AjPFilebufflist ******************************************************
**
** Ajax file buffer, holding a simple linked list of buffered lines.
** This does not use the AjPList objects.
**
** This is a substructure of the AjPFilebuff object.
**
** @alias AjSFilebufflist
** @alias AjSOilebufflist
**
** @attr Line [AjPStr] String : this line
** @attr Next [struct AjSFilebufflist*] Next line in the list, NULL for last
** @attr Fpos [ajlong] File offset for start of this line
** @@
******************************************************************************/

typedef struct AjSFilebufflist {
  AjPStr Line;
  struct AjSFilebufflist* Next;
  ajlong Fpos;
} AjOFilebufflist;

#define AjPFilebufflist AjOFilebufflist*




/* @data AjPFilebuff **********************************************************
**
** Ajax buffered file object. Holds information for a buffered input file.
**
** @alias AjSFilebuff
** @alias AjOFilebuff
**
** @attr File [AjPFile] The input file - data to be buffered
** @attr Lines [AjPFilebufflist] All lines ... where the data really is
** @attr Freelines [AjPFilebufflist] Free list of lines for reuse
** @attr Curr [AjPFilebufflist] Current line in Lines list
** @attr Prev [AjPFilebufflist] Previous line (points to Curr for delete)
** @attr Last [AjPFilebufflist] Last line for quick appending
** @attr Freelast [AjPFilebufflist] Last free line for quick append
** @attr Nobuff [AjBool] if true, do not buffer the file
** @attr Pos [ajint] Position in list
** @attr Size [ajint] Size of list
** @attr FreeSize [ajint] Size of free list
** @attr Fpos [ajlong] File position in File
** @@
******************************************************************************/

typedef struct AjSFilebuff {
  AjPFile File;
  AjPFilebufflist Lines;
  AjPFilebufflist Freelines;
  AjPFilebufflist Curr;
  AjPFilebufflist Prev;
  AjPFilebufflist Last;
  AjPFilebufflist Freelast;
  AjBool Nobuff;
  ajint Pos;
  ajint Size;
  ajint FreeSize;
  ajlong Fpos;
} AjOFilebuff;

#define AjPFilebuff AjOFilebuff*




/* @data AjPDir **************************************************************
**
** Ajax directory object. Holds information for an open
** input directory.
**
** @alias AjSDir
** @alias AjODir
**
** @attr Name [AjPStr] Path
** @attr Prefix [AjPStr] Default filename prefix
** @attr Extension [AjPStr] Default file extension
** @@
******************************************************************************/

typedef struct AjSDir {
  AjPStr Name;
  AjPStr Prefix;
  AjPStr Extension;
} AjODir;

#define AjPDir AjODir*




/* @data AjPDirout ***********************************************************
**
** Ajax output directory object. Holds information for an open
** output directory.
**
** @alias AjSDirout
** @alias AjODirout
**
** @attr Name [AjPStr] Path
** @attr Extension [AjPStr] Default file extension
** @@
******************************************************************************/

typedef struct AjSDirout {
  AjPStr Name;
  AjPStr Extension;
} AjODirout;

#define AjPDirout AjODirout*




/* @data AjPOutfile ***********************************************************
**
** Ajax file object. Holds information for an open (unbuffered)
** input or output file.
**
** On output, conversion code "%F" writes the filename.
**
** @alias AjSOutfile
** @alias AjOOutfile
**
** @attr File [AjPFile] File object
** @attr Type [AjPStr] Named data file type
** @attr Formatstr [AjPStr] Format specific for this data type
** @attr Itype [ajint] Index number for Type
** @attr Format [ajint] Index for Formatstr for this data type
** @@
******************************************************************************/

typedef struct AjSOutfile {
  AjPFile File;
  AjPStr Type;
  AjPStr Formatstr;
  ajint Itype;
  ajint Format;
} AjOOutfile;

#define AjPOutfile AjOOutfile*

enum AjEOutfileType
{
    OUTFILE_UNKNOWN,			/* Unknown - none of these */
    OUTFILE_CODON,			/* Codon usage */
    OUTFILE_CPDB,			/* Clean PDB */
    OUTFILE_DISCRETE,			/* Discrete data */
    OUTFILE_DISTANCE,			/* Distance matrix data */
    OUTFILE_FREQ,			/* Frequency data */
    OUTFILE_MATRIX,			/* Integer matrix data */
    OUTFILE_MATRIXF,			/* Floating point matrix data */
    OUTFILE_PROPERTIES,			/* Phylogenetic properties */
    OUTFILE_SCOP,			/* SCOP data */
    OUTFILE_TREE			/* Phylogenetic tree data */
};


/*
** Prototype definitions
*/

void           ajDirDel(AjPDir* pthis);
void           ajDiroutDel(AjPDirout* pthis);
const AjPStr   ajDirGetExt(const AjPDir thys);
const AjPStr   ajDirGetPath(const AjPDir thys);
const AjPStr   ajDirGetPrefix(const AjPDir thys);
const AjPStr   ajDiroutGetExt(const AjPDirout thys);
const AjPStr   ajDiroutGetPath(const AjPDirout thys);
AjPDir         ajDirNewPath(const AjPStr path);
AjPDir         ajDirNewPathExt(const AjPStr path, const AjPStr ext);
AjPDir         ajDirNewPathPreExt(const AjPStr path, const AjPStr prefix,
                                const AjPStr ext);
AjBool         ajDiroutExists(AjPDirout thys);
AjPDirout      ajDiroutNewPath(const AjPStr name);
AjPDirout      ajDiroutNewPathExt(const AjPStr name, const AjPStr ext);
AjBool         ajDiroutOpen(AjPDirout thys);
ajint          ajFilelistAddDirectory(AjPList list,
                                      const AjPDir dir);
ajint          ajFilelistAddPathWildRecursiveIgnore(AjPList list,
						    const AjPStr path,
						    const AjPStr wildname,
						    AjPList ignorelist);
void           ajDirnamePrintRecursiveIgnore(const AjPStr path,
					     AjPList ignorelist,
					     AjPFile outfile);
ajint          ajFilelistAddPath(AjPList list,
				 const AjPStr path);
ajint          ajFilelistAddPathDir(AjPList list,
                                    const AjPStr path);
ajint          ajFilelistAddPathWild(AjPList list,
				     const AjPStr path,
				     const AjPStr filename);
ajint          ajFilelistAddPathWildDir(AjPList list,
				     const AjPStr path,
				     const AjPStr filename);

void           ajFilebuffDel(AjPFilebuff* pthis);
AjPFilebuff    ajFilebuffNewNofile(void);
AjPFilebuff    ajFilebuffNewNameS(const AjPStr name);
AjPFilebuff    ajFilebuffNewNamePathC(const char* filename, const AjPStr dir);
AjPFilebuff    ajFilebuffNewNamePathS(const AjPStr filename, const AjPStr dir);
AjPFilebuff    ajFilebuffNewPathWild(const AjPStr path,
                                     const AjPStr wildname);
AjPFilebuff    ajFilebuffNewPathWildExclude(const AjPStr path,
                                            const AjPStr wildname,
                                            const AjPStr exclude);
AjPFilebuff    ajFilebuffNewFromCfile(FILE *fp);
AjPFilebuff    ajFilebuffNewFromFile(AjPFile file);
AjPFilebuff    ajFilebuffNewLine(const AjPStr line);
AjPFilebuff    ajFilebuffNewListinList(AjPList list);
AjBool         ajFilebuffSetBuffered(AjPFilebuff thys);
void           ajFilebuffClear(AjPFilebuff thys, ajint lines);
void           ajFilebuffClearStore(AjPFilebuff thys, ajint lines,
                                    const AjPStr rdline, AjBool store,
                                    AjPStr *astr);
AjBool         ajFilebuffIsEmpty(const AjPFilebuff thys);
AjBool         ajFilebuffIsEnded(const AjPFilebuff thys);
AjBool         ajFilebuffIsEof(const AjPFilebuff thys);
AjPFile        ajFilebuffGetFile(const AjPFilebuff thys);
void           ajFilebuffFix(AjPFilebuff thys);
FILE*          ajFilebuffGetFileptr(const AjPFilebuff thys);
AjBool         ajFilebuffIsBuffered(const AjPFilebuff thys);
void           ajFilebuffLoadAll(AjPFilebuff buff);
void           ajFilebuffLoadC(AjPFilebuff thys, const char* str);
void           ajFilebuffLoadS(AjPFilebuff thys, const AjPStr str);
AjBool         ajFilebuffSetUnbuffered(AjPFilebuff thys);
void           ajFilebuffTraceTitle(const AjPFilebuff thys, const char* title);
void           ajFilebuffReset(AjPFilebuff thys);
void           ajFilebuffResetPos(AjPFilebuff thys);
void           ajFilebuffResetStore(AjPFilebuff thys,
                                    AjBool store, AjPStr *astr);
AjBool         ajFilebuffReopenFile(AjPFilebuff* Pbuff, AjPFile file);
void           ajFilebuffHtmlNoheader(AjPFilebuff buff);
void           ajFilebuffHtmlStrip(AjPFilebuff thys);
AjBool         ajFilebuffHtmlPre(AjPFilebuff thys);
void           ajFilebuffTrace(const AjPFilebuff thys);
void           ajFilebuffTraceFull(const AjPFilebuff thys, size_t nlines,
                                   size_t nfree);
void           ajFileClose(AjPFile *pthis);
AjBool         ajDirnameFixExists(AjPStr* dir);
void           ajDirnameFix(AjPStr* dir);
AjBool         ajDirnameUp(AjPStr* dir);
AjBool         ajDirnameFillPath(AjPStr* dir);
AjBool         ajFileDirTrim(AjPStr* name);
AjBool         ajFileExtnTrim(AjPStr* name);
AjBool         ajFileDirExtnTrim(AjPStr* name);
AjBool         ajFileIsEof(const AjPFile thys);
void           ajFileExit(void);
ajint          ajFilelistAddListname(AjPList list, const AjPStr files);
FILE*          ajFileGetFileptr(const AjPFile thys);
const AjPStr   ajFileValueCwd(void);
AjBool         ajFileIsAppend(const AjPFile thys);
const AjPStr   ajFileGetName(const AjPFile thys);
AjBool         ajFilenameHasPath(const AjPStr name);
ajlong         ajFilenameGetSize(const AjPStr fname);
AjBool         ajFilenameTrimAll(AjPStr *fname);
AjBool         ajFilenameTrimExt(AjPStr* Pfilename);
AjBool         ajFilenameTrimPath(AjPStr* Pfilename);
AjBool         ajFilenameTrimPathExt(AjPStr* Pfilename);
const char*    ajFileGetNameC(const AjPFile thys);
const AjPStr   ajFileGetNameS(const AjPFile thys);
AjBool         ajFilenameReplacePathS(AjPStr* filename, const AjPStr dir);
AjBool         ajFilenameReplacePathC(AjPStr* filename, const char* dir);
AjBool         ajFilenameReplaceExtC(AjPStr* filename, const char* extension);
AjBool         ajFilenameReplaceExtS(AjPStr* filename,
                                     const AjPStr extension);
AjBool         ajFilenameSetExtC(AjPStr* filename, const char* extension);
AjBool         ajFilenameSetExtS(AjPStr* filename,
                                 const AjPStr extension);
AjPFile        ajFileNewOutappendNameS(const AjPStr name);
AjPFile        ajFileNewListinList(AjPList list);
AjPFile        ajFileNewListinDirPre(const AjPDir dir, const AjPStr prefix);
AjPFile        ajFileNewListinNameDirS(const AjPStr name, const AjPDir dir);
AjPFile        ajFileNewListinPathWild(const AjPStr path,
                                       const AjPStr wildname);
AjPFile        ajFileNewListinPathWildExclude(const AjPStr path,
                                              const AjPStr wildname,
                                              const AjPStr exclude);

AjPFile        ajFileNewFromCfile(FILE* file);
AjPFile        ajFileNewInNameC(const char *name);
AjPFile        ajFileNewInNameS(const AjPStr name);
AjPFile        ajFileNewInBlockS(const AjPStr name, ajuint blocksize);
AjPFile        ajFileNewInPipe(const AjPStr name);
AjPFile        ajFileNewInNamePathC(const char* name, const AjPStr path);
AjPFile        ajFileNewInNamePathS(const AjPStr name, const AjPStr path);
AjPFile        ajFileNewOutNameC(const char *name);
AjPFile        ajFileNewOutNameS(const AjPStr name);
AjPFile        ajFileNewOutNameDirS(const AjPStr name, const AjPDirout dir);
AjPFile        ajFileNewOutNamePathS(const AjPStr name, const AjPStr path);
void           ajFileOutHeader(AjPFile thys);
AjBool         ajFileReopenName(AjPFile thys, const AjPStr name);
AjBool         ajFileReopenNext(AjPFile thys);
ajint 	       ajFileScan(const AjPStr path, const AjPStr filename,
                          AjPList *result,
                          AjBool show, AjBool dolist, AjPList *list,
                          AjPList rlist, AjBool recurs, AjPFile outf);
ajint          ajFileSeek(AjPFile thys, ajlong offset, ajint wherefrom);
AjBool         ajFilenameExists(const AjPStr filename);
AjBool         ajFilenameExistsDir(const AjPStr filename);
AjBool         ajFilenameExistsExec(const AjPStr filename);
AjBool         ajFilenameExistsRead(const AjPStr filename);
AjBool         ajFilenameExistsWrite(const AjPStr filename);
AjBool         ajFileValueRedirectStderr(void);
AjBool         ajFileValueRedirectStdin(void);
AjBool         ajFileValueRedirectStdout(void);
AjBool         ajFileIsFile(const AjPFile file);
AjBool         ajFileIsStderr(const AjPFile file);
AjBool         ajFileIsStdin(const AjPFile file);
AjBool         ajFileIsStdout(const AjPFile file);
AjBool         ajFileFix(AjPFile file);
AjBool         ajFileResetEof(AjPFile thys);
ajlong         ajFileResetPos(AjPFile thys);
AjBool         ajFilenameSetTempname(AjPStr* Pfilename);
AjBool         ajFilenameSetTempnamePathC(AjPStr* Pfilename,const char* txt);
AjBool         ajFilenameSetTempnamePathS(AjPStr* Pfilename, const AjPStr str);
AjBool         ajFilenameTestExclude(const AjPStr filename,
				     const AjPStr exclude,
				     const AjPStr include);
AjBool         ajFilenameTestInclude(const AjPStr filename,
				     const AjPStr exclude,
				     const AjPStr include);
AjBool         ajFilenameTestExcludePath(const AjPStr filename,
					 const AjPStr exclude,
					 const AjPStr include);
AjBool         ajFilenameTestIncludePath(const AjPStr filename,
					 const AjPStr exclude,
					 const AjPStr include);
void           ajFileTrace(const AjPFile thys);
void           ajFileSetUnbuffer(AjPFile thys);

ajuint         ajFileValueBuffsize(void);


AjPOutfile     ajOutfileNewNameS(const AjPStr name);
void           ajOutfileClose(AjPOutfile* pthis);
AjPFile        ajOutfileGetFile(const AjPOutfile thys);
FILE*          ajOutfileGetFileptr(const AjPOutfile thys);
const AjPStr   ajOutfileGetFormat(const AjPOutfile thys);

/*
** End of prototype definitions
*/

__deprecated ajint          ajFileBuffSize(void);
__deprecated void           ajFileBuffClearStore(AjPFilebuff buff, ajint lines,
                                                 const AjPStr rdline,
                                                 AjBool store, AjPStr *astr);
__deprecated AjBool         ajFileBuffBuff (AjPFilebuff thys);
__deprecated AjBool         ajFileBuffEmpty (const AjPFilebuff thys);
__deprecated AjBool         ajFileBuffEnd (const AjPFilebuff thys);
__deprecated AjBool         ajFileBuffEof (const AjPFilebuff thys);
__deprecated AjPFile        ajFileBuffFile (const AjPFilebuff thys);
__deprecated void           ajFileBuffFix (AjPFilebuff thys);
__deprecated AjBool         ajFileBuffIsBuffered (const AjPFilebuff thys);
__deprecated FILE*          ajFileBuffFp (const AjPFilebuff thys);
__deprecated void           ajFileBuffTrace (const AjPFilebuff thys);
__deprecated void           ajFileBuffLoadC(AjPFilebuff thys, const char* str);
__deprecated void           ajFileBuffLoadS(AjPFilebuff thys, const AjPStr str);
__deprecated AjBool         ajFileBuffNobuff (AjPFilebuff thys);
__deprecated void           ajFileBuffPrint (const AjPFilebuff thys,
                                             const char* title);
__deprecated void           ajFileBuffReset (AjPFilebuff thys);
__deprecated void           ajFileBuffResetPos (AjPFilebuff thys);
__deprecated void           ajFileBuffResetStore (AjPFilebuff thys,
                                                  AjBool store, AjPStr *astr);
__deprecated void           ajFileBuffTraceFull (const AjPFilebuff thys,
                                                 size_t nlines,
                                  size_t nfree);
__deprecated AjBool         ajFileGetwd (AjPStr* dir);
__deprecated AjBool         ajFileHasDir (const AjPStr name);
__deprecated ajlong         ajFileLength (const AjPStr fname);
__deprecated AjBool         ajFileNameShorten(AjPStr *fname);
__deprecated AjBool         ajFileNameTrim(AjPStr *fname);
__deprecated const char*    ajFileTempName (const char *dir);
__deprecated AjBool         ajFileTestSkip (const AjPStr fullname,
                             const AjPStr exc, const AjPStr inc,
                             AjBool keep, AjBool ignoredirectory);
__deprecated AjBool         ajFileDir (AjPStr* dir);
__deprecated void           ajFileDirFix (AjPStr* dir);
__deprecated AjBool         ajFileDirPath (AjPStr* dir);
__deprecated AjBool         ajFileDirUp (AjPStr* dir);
__deprecated ajint          ajDirScan(const AjPStr path,
				      const AjPStr filename,
				      AjPList *result);
    
__deprecated AjBool         ajFileSetDir (AjPStr *pname, const AjPStr dir);
__deprecated FILE*          ajOutfileFp (const AjPOutfile thys);
__deprecated AjBool         ajFileNameValid (const AjPStr filename);
__deprecated AjBool         ajFileStat (const AjPStr filename, ajint mode);
__deprecated AjPFile        ajOutfileFile (const AjPOutfile thys);
__deprecated AjPStr         ajOutfileFormat (const AjPOutfile thys);
__deprecated void           ajOutfileDel(AjPOutfile* pthis);
__deprecated AjPOutfile     ajOutfileNew(const AjPStr name);
__deprecated void           ajFileBuffStripHtml (AjPFilebuff thys);
__deprecated AjBool         ajFileBuffStripHtmlPre (AjPFilebuff thys);
__deprecated const AjPStr   ajFileNameS (const AjPFile thys);
__deprecated const char*    ajFileName (const AjPFile thys);
__deprecated AjPFilebuff ajFileBuffNewS(const AjPStr data);
__deprecated AjPFilebuff ajFileBuffNewList(AjPList list);
__deprecated AjBool         ajFileEof (const AjPFile thys);
__deprecated FILE*          ajFileFp (const AjPFile thys);
__deprecated AjBool         ajFileStderr (const AjPFile file);
__deprecated AjBool         ajFileStdin (const AjPFile file);
__deprecated AjBool         ajFileStdout (const AjPFile file);
__deprecated void           ajFileBuffDel (AjPFilebuff* pthis);
__deprecated AjPFilebuff    ajFileBuffNew (void);
__deprecated AjPFilebuff    ajFileBuffNewF (FILE *fp);
__deprecated void           ajFileBuffClear (AjPFilebuff thys, ajint lines);
__deprecated AjBool ajFileBuffSetFile (AjPFilebuff* pthys, AjPFile file,
                                       AjBool samefile);
__deprecated AjBool         ajFileGetApp (const AjPFile thys);
__deprecated ajlong         ajFileTell (AjPFile thys);
__deprecated AjBool         ajFileNext (AjPFile thys);
__deprecated FILE*          ajFileReopen (AjPFile thys, const AjPStr name);
__deprecated const AjPStr      ajDirExt(const AjPDir thys);
__deprecated const AjPStr      ajDirName(const AjPDir thys);
__deprecated AjPDir      ajDirNew (const AjPStr name);
__deprecated AjPDir      ajDirNewS (const AjPStr name, const AjPStr ext);
__deprecated AjPDir      ajDirNewSS (const AjPStr name, const AjPStr prefix,
			const AjPStr ext);
__deprecated AjPFile     ajFileNew(void);
__deprecated AjPFilebuff ajFileBuffNewIn(const AjPStr name);
__deprecated AjPFile     ajFileNewIn(const AjPStr name);
__deprecated AjPFile     ajFileNewInList(AjPList list);
__deprecated AjPFile     ajFileNewDW(const AjPStr dir, const AjPStr wildfile);
__deprecated AjPFile     ajFileNewDWE(const AjPStr dir, const AjPStr wildfile,
                                      const AjPStr exclude);


__deprecated AjPFilebuff ajFileBuffNewFile(AjPFile file);
__deprecated AjPFilebuff ajFileBuffNewDW(const AjPStr dir,
                                         const AjPStr wildfile);
__deprecated AjPFilebuff ajFileBuffNewDWE(const AjPStr dir,
                                          const AjPStr wildfile,
                                          const AjPStr exclude);

__deprecated AjPFile     ajFileNewApp(const AjPStr name);

__deprecated AjPFile ajFileNewOut(const AjPStr name);

__deprecated AjPFile     ajFileNewOutD (const AjPStr dir, const AjPStr name);
__deprecated AjPFile     ajFileNewOutDir(const AjPDirout dir,
                                         const AjPStr name);
__deprecated AjPFile     ajFileNewF (FILE* file);
__deprecated AjPDir ajDirOutNew(const AjPStr name);
__deprecated AjPDir ajDirOutNewS(const AjPStr name, const AjPStr ext);
__deprecated AjPDir ajDirOutNewSS(const AjPStr name,
                                  const AjPStr prefix, const AjPStr ext);

__deprecated AjPFilebuff  ajFileBuffNewDC (const AjPStr dir,
                                           const char* filename);
__deprecated AjPFilebuff  ajFileBuffNewDF (const AjPStr dir,
                                           const AjPStr filename);
__deprecated AjPFile      ajFileNewDC (const AjPStr dir,
                                       const char* filename);
__deprecated AjPFile      ajFileNewDF (const AjPStr dir,
                                       const AjPStr filename);

__deprecated AjBool       ajFileNameDirSet  (AjPStr* filename,
                                             const AjPStr dir);
__deprecated AjBool       ajFileNameDirSetC (AjPStr* filename,
                                             const char* dir);
__deprecated AjBool       ajFileNameExt  (AjPStr* filename,
                                          const AjPStr extension);
__deprecated AjBool       ajFileNameExtC (AjPStr* filename,
                                          const char* extension);

__deprecated AjPFile      ajFileNewDirF(const AjPDir dir,
                                        const AjPStr filename);

__deprecated void         ajFileUnbuffer (AjPFile thys);
__deprecated AjPFile        ajFileNewInC(const char *name);

#define    MAJFILETELL(file) (file->fp ? ftell(file->fp) : 0L)

/* ============= definitions =========================*/
#ifndef WIN32
#define AJ_FILE_R S_IRUSR
#define AJ_FILE_W S_IWUSR
#define AJ_FILE_X S_IXUSR
#else
#define AJ_FILE_R S_IREAD
#define AJ_FILE_W S_IWRITE
#define AJ_FILE_X S_IEXEC
#endif

#endif

#ifdef __cplusplus
}
#endif