Subversion Repositories Kolibri OS

Rev

Rev 4874 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4349 Serge 1
 
2
#define __KOS_IO_H__
3
4
 
5808 serge 5
extern "C" {
6
#endif
7
8
 
4349 Serge 9
typedef struct
10
{
11
  char sec;
12
  char min;
13
  char hour;
14
  char rsv;
15
}detime_t;
16
17
 
18
{
19
  char  day;
20
  char  month;
21
  short year;
22
}dedate_t;
23
24
 
25
{
26
  unsigned    attr;
27
  unsigned    flags;
28
  union
29
  {
30
     detime_t  ctime;
31
     unsigned  cr_time;
32
  };
33
  union
34
  {
35
     dedate_t  cdate;
36
     unsigned  cr_date;
37
  };
38
  union
39
  {
40
     detime_t  atime;
41
     unsigned  acc_time;
42
  };
43
  union
44
  {
45
     dedate_t  adate;
46
     unsigned  acc_date;
47
  };
48
  union
49
  {
50
     detime_t  mtime;
51
     unsigned  mod_time;
52
  };
53
  union
54
  {
55
     dedate_t  mdate;
56
     unsigned  mod_date;
57
  };
58
  unsigned    size;
59
  unsigned    size_high;
60
} fileinfo_t;
61
62
 
63
64
 
65
int get_fileinfo(const char *path, fileinfo_t *info);
66
int read_file(const char *path, void *buff,
67
               size_t offset, size_t count, size_t *reads);
68
int write_file(const char *path,const void *buff,
69
               size_t offset, size_t count, size_t *writes);
70
int set_file_size(const char *path, unsigned size);
71
void unpack(void* packed_data, void* unpacked_data) __attribute__((stdcall)) ;
4806 Serge 72
4349 Serge 73
 
74
{
75
    __asm__ __volatile__(
76
    "int $0x40"
77
    ::"a"(30),"b"(1),"c"(cwd));
78
};
79
80
 
5808 serge 81
}
82
#endif
4349 Serge 83
#endif
5808 serge 84