Nugget
Loading...
Searching...
No Matches
common
psxlibc
stdio.h
Go to the documentation of this file.
1
/*
2
3
MIT License
4
5
Copyright (c) 2020 PCSX-Redux authors
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software and associated documentation files (the "Software"), to deal
9
in the Software without restriction, including without limitation the rights
10
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
copies of the Software, and to permit persons to whom the Software is
12
furnished to do so, subject to the following conditions:
13
14
The above copyright notice and this permission notice shall be included in all
15
copies or substantial portions of the Software.
16
17
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
SOFTWARE.
24
25
*/
26
27
#pragma once
28
29
#include <stdint.h>
30
31
#include "
common/psxlibc/device.h
"
32
33
enum
{
34
PSXENOERR
,
35
PSXEPERM
,
36
PSXENOENT
,
37
PSXESRCH
,
38
PSXEINTR
,
39
PSXEIO
,
40
PSXENXIO
,
41
PSXE2BIG
,
42
PSXENOEXEC
,
43
PSXEBADF
,
44
PSXECHILD
,
45
PSXEAGAIN
,
46
PSXENOMEM
,
47
PSXEACCESS
,
48
PSXEFAULT
,
49
PSXENOTBLK
,
50
PSXEBUSY
,
51
PSXEEXIST
,
52
PSXEXDEV
,
53
PSXENODEV
,
54
PSXENOTDIR
,
55
PSXEISDIR
,
56
PSXEINVAL
,
57
PSXENFILE
,
58
PSXEMFILE
,
59
PSXENOTTY
,
60
PSXETXTBSY
,
61
PSXEFBIG
,
62
PSXENOSPC
,
63
PSXESPIPE
,
64
PSXEROFS
,
65
PSXEFORMAT
,
66
PSXEPIPE
,
67
PSXEDOM
,
68
PSXERANGE
,
69
PSXEWOULDBLOCK
,
70
PSXEINPROGRESS
,
71
PSXEALREADY
,
72
};
73
74
enum
{
75
PSXF_READ
= 0x0001,
76
PSXF_WRITE
= 0x0002,
77
PSXF_NBLOCK
= 0x0004,
78
PSXF_SCAN
= 0x0008,
79
PSXF_RLOCK
= 0x0010,
80
PSXF_WLOCK
= 0x0020,
81
PSXF_APPEND
= 0x0100,
82
PSXF_CREAT
= 0x0200,
83
PSXF_TRUNC
= 0x0400,
84
PSXF_SCAN2
= 0x1000,
85
PSXF_RCOM
= 0x2000,
86
PSXF_NBUF
= 0x4000,
87
PSXF_ASYNC
= 0x8000,
88
};
89
90
enum
{
91
PSXSEEK_SET
= 0,
92
PSXSEEK_CUR
= 1,
93
PSXSEEK_END
= 2,
94
};
95
96
struct
File
{
97
uint32_t
flags
/* PSXF_* */
,
deviceId
;
98
char
*
buffer
;
99
uint32_t
count
,
offset
,
deviceFlags
,
errno
;
100
struct
Device
*
device
;
101
uint32_t
length
,
LBA
,
fd
;
102
};
device.h
PSXSEEK_CUR
@ PSXSEEK_CUR
Definition
stdio.h:92
PSXSEEK_END
@ PSXSEEK_END
Definition
stdio.h:93
PSXSEEK_SET
@ PSXSEEK_SET
Definition
stdio.h:91
PSXF_APPEND
@ PSXF_APPEND
Definition
stdio.h:81
PSXF_READ
@ PSXF_READ
Definition
stdio.h:75
PSXF_NBUF
@ PSXF_NBUF
Definition
stdio.h:86
PSXF_WLOCK
@ PSXF_WLOCK
Definition
stdio.h:80
PSXF_ASYNC
@ PSXF_ASYNC
Definition
stdio.h:87
PSXF_TRUNC
@ PSXF_TRUNC
Definition
stdio.h:83
PSXF_SCAN2
@ PSXF_SCAN2
Definition
stdio.h:84
PSXF_CREAT
@ PSXF_CREAT
Definition
stdio.h:82
PSXF_RCOM
@ PSXF_RCOM
Definition
stdio.h:85
PSXF_WRITE
@ PSXF_WRITE
Definition
stdio.h:76
PSXF_RLOCK
@ PSXF_RLOCK
Definition
stdio.h:79
PSXF_NBLOCK
@ PSXF_NBLOCK
Definition
stdio.h:77
PSXF_SCAN
@ PSXF_SCAN
Definition
stdio.h:78
PSXEWOULDBLOCK
@ PSXEWOULDBLOCK
Definition
stdio.h:69
PSXERANGE
@ PSXERANGE
Definition
stdio.h:68
PSXEISDIR
@ PSXEISDIR
Definition
stdio.h:55
PSXEINVAL
@ PSXEINVAL
Definition
stdio.h:56
PSXECHILD
@ PSXECHILD
Definition
stdio.h:44
PSXEALREADY
@ PSXEALREADY
Definition
stdio.h:71
PSXENODEV
@ PSXENODEV
Definition
stdio.h:53
PSXESRCH
@ PSXESRCH
Definition
stdio.h:37
PSXEAGAIN
@ PSXEAGAIN
Definition
stdio.h:45
PSXESPIPE
@ PSXESPIPE
Definition
stdio.h:63
PSXEINTR
@ PSXEINTR
Definition
stdio.h:38
PSXE2BIG
@ PSXE2BIG
Definition
stdio.h:41
PSXENXIO
@ PSXENXIO
Definition
stdio.h:40
PSXEBADF
@ PSXEBADF
Definition
stdio.h:43
PSXEBUSY
@ PSXEBUSY
Definition
stdio.h:50
PSXEPIPE
@ PSXEPIPE
Definition
stdio.h:66
PSXENOMEM
@ PSXENOMEM
Definition
stdio.h:46
PSXENOTDIR
@ PSXENOTDIR
Definition
stdio.h:54
PSXEACCESS
@ PSXEACCESS
Definition
stdio.h:47
PSXENOTTY
@ PSXENOTTY
Definition
stdio.h:59
PSXEPERM
@ PSXEPERM
Definition
stdio.h:35
PSXEDOM
@ PSXEDOM
Definition
stdio.h:67
PSXEINPROGRESS
@ PSXEINPROGRESS
Definition
stdio.h:70
PSXEMFILE
@ PSXEMFILE
Definition
stdio.h:58
PSXEFBIG
@ PSXEFBIG
Definition
stdio.h:61
PSXENOENT
@ PSXENOENT
Definition
stdio.h:36
PSXEIO
@ PSXEIO
Definition
stdio.h:39
PSXEFORMAT
@ PSXEFORMAT
Definition
stdio.h:65
PSXENOSPC
@ PSXENOSPC
Definition
stdio.h:62
PSXETXTBSY
@ PSXETXTBSY
Definition
stdio.h:60
PSXEEXIST
@ PSXEEXIST
Definition
stdio.h:51
PSXENOEXEC
@ PSXENOEXEC
Definition
stdio.h:42
PSXEROFS
@ PSXEROFS
Definition
stdio.h:64
PSXEFAULT
@ PSXEFAULT
Definition
stdio.h:48
PSXENOTBLK
@ PSXENOTBLK
Definition
stdio.h:49
PSXEXDEV
@ PSXEXDEV
Definition
stdio.h:52
PSXENFILE
@ PSXENFILE
Definition
stdio.h:57
PSXENOERR
@ PSXENOERR
Definition
stdio.h:34
Device
Definition
device.h:62
File
Definition
stdio.h:96
File::errno
uint32_t errno
Definition
stdio.h:99
File::count
uint32_t count
Definition
stdio.h:99
File::flags
uint32_t flags
Definition
stdio.h:97
File::offset
uint32_t offset
Definition
stdio.h:99
File::device
struct Device * device
Definition
stdio.h:100
File::LBA
uint32_t LBA
Definition
stdio.h:101
File::length
uint32_t length
Definition
stdio.h:101
File::buffer
char * buffer
Definition
stdio.h:98
File::deviceId
uint32_t deviceId
Definition
stdio.h:97
File::fd
uint32_t fd
Definition
stdio.h:101
File::deviceFlags
uint32_t deviceFlags
Definition
stdio.h:99
uint32_t
void uint32_t(classId, spec)
Generated by
1.9.8