File: xfile.h

package info (click to toggle)
craft 3.5-12
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,172 kB
  • ctags: 1,605
  • sloc: cpp: 3,794; makefile: 2,322; ansic: 857; sh: 842
file content (53 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download | duplicates (3)
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
#ifndef xfile_h
#define xfile_h

/*======================================================================*/
/*                                                                      */
/* Routines for file access                                             */
/*                                                                      */
/*======================================================================*/

#include "stdio.h"
#include "sys/types.h"
#include "sys/stat.h"

#include "io.h"
#include "bool.h"

double d_get              (FILE *f, bool &is_eof);
/*
 * gcc 2.96 doesn't like functions declared to return a type that
 * don't, so we'll #if 0 this out.
 */
#if 0
time_t f_date             (char f_name []);
#endif
bool   f_exists           (char f_name []);
void   f_open             (FILE *&f, char name [], char mode []);
void   f_open_with_extend (FILE *&f, char name [], char mode [], int max_no);
char   *f_getline         (FILE *f,  char line [], int  max_length); 

char   *f_postfix         (char full_path []);
char   *f_name            (char full_path []);
char   *f_tail            (char full_path []);
char   *f_path            (char full_path []);
char   *f_home_dir        (char full_path []);
bool   f_is_pattern       (char f_name    []);
bool   f_is_dir           (char f_name    []);
bool   f_is_home_dir      (char f_name    []);

bool   sel_get_name       (char name   [],
                           char f_name [],
                           char f_pat  [],
                           char mode   []);

char   *complete          (char name [],
                           char tail []);

void   bprintf            (FILE *f, int num_bytes, int i);
bool   bscanf             (FILE *f, int num_bytes, int &i);

#endif