Subversion Repositories Kolibri OS

Rev

Rev 7927 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7883 leency 1
 
7942 leency 2
 * Backy_lib.h
3
 * Author: JohnXenox aka Aleksandr Igorevich.
4
 */
5
6
 
7883 leency 7
#define __jxl_Date_get_h__
8
9
 
7942 leency 10
7883 leency 11
 
7942 leency 12
typedef  unsigned char       uint8_t;
13
typedef  unsigned short int  uint16_t;
14
typedef  unsigned long long  uint64_t;
15
typedef  char                int8_t;
16
typedef  short int           int16_t;
17
typedef  int                 int32_t;
18
typedef  long long           int64_t;
19
7883 leency 20
 
7942 leency 21
{
7883 leency 22
    int32_t val;
7942 leency 23
7883 leency 24
 
7942 leency 25
7883 leency 26
 
7942 leency 27
    (uint32_t)  dt[4]  = 0;       // reserved.
28
    (uint32_t)  dt[8]  = 0;       // reserved.
29
    (uint32_t)  dt[12] = nbytes;  // number of bytes to write.
30
    (uint8_t *) dt[16] = data;    // pointer to data.
31
    (uint32_t)  dt[20] = enc;     // string encoding (0 = default, 1 = cp866, 2 = UTF-16LE, 3 = UTF-8).
32
    (uint8_t *) dt[24] = path;    // pointer to path.
33
7883 leency 34
 
7942 leency 35
7883 leency 36
 
7942 leency 37
}
7883 leency 38
39
 
7942 leency 40
7883 leency 41
 
7942 leency 42
7883 leency 43
 
44
{
45
    int32_t val;
46
47
 
7927 Boppan 48
    {
49
        uint32_t    fn;
50
        uint32_t    reserved0;
51
        uint32_t    reserved1;
52
        uint32_t    number_of_bytes_to_write;
53
        void *      pointer_to_data;
54
        char        path[1];
55
    } *file_op = calloc(sizeof(*file_op) + strlen(path) + 2, 1); // FIXME: Not works on UTF16LE enc
56
57
 
58
    file_op->number_of_bytes_to_write = nbytes;
59
    file_op->pointer_to_data = data;
60
    if (enc != 0)
61
    {
62
        file_op->path[0] = enc;
63
        strcpy(file_op->path + 1, path);
64
    }
65
    else
66
    {
67
        strcpy(file_op->path, path);
68
    }
69
70
 
71
    return val;
7883 leency 72
}
73
74
 
7942 leency 75
7883 leency 76
 
7942 leency 77
{
78
    uint32_t date;
79
    __asm__ __volatile__("int $0x40":"=a"(date):"a"(29));
80
    return date;
81
}
82
83
 
84
 
85
 
86
{
87
    uint32_t time;
88
    __asm__ __volatile__("int $0x40":"=a"(time):"a"(3));
89
    return time;
90
}
91
92
 
93
 
94
 
95
{
96
    uint8_t *fd;
97
98
 
99
100
 
101
}
102
103
 
7883 leency 104