-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathw3Fd.h
More file actions
38 lines (26 loc) · 697 Bytes
/
w3Fd.h
File metadata and controls
38 lines (26 loc) · 697 Bytes
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
// A WebAssembly codebase by Jay Krell
//
// https://webassembly.github.io/spec/core/binary/index.html
// https://webassembly.github.io/spec/core/_download/WebAssembly.pdf
#pragma once
struct w3Fd
{
int fd;
uint64_t get_file_size (PCSTR file_name = "");
#if 0 // C++11
explicit operator bool () { return valid (); } // C++11
#else
operator explicit_operator_bool::T () const;
#endif
bool operator ! ();
operator int ();
static bool static_valid (int fd);
int get () const;
bool valid () const;
static void static_cleanup (int fd);
int detach ();
void cleanup ();
w3Fd (int a = -1);
w3Fd& operator = (int a);
~w3Fd ();
};