mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fmt: align the custom values of the enum fields (#19331)
This commit is contained in:
parent
c98e00c01f
commit
55ca8d8d8e
47 changed files with 1342 additions and 1322 deletions
|
@ -27,13 +27,13 @@ import os
|
|||
*
|
||||
******************************************************************************/
|
||||
enum Item_type {
|
||||
file = 0
|
||||
file = 0
|
||||
folder
|
||||
// archive format
|
||||
zip = 16
|
||||
zip = 16
|
||||
archive_file
|
||||
// graphic format, MUST stay after the other types!!
|
||||
bmp = 32
|
||||
bmp = 32
|
||||
jpg
|
||||
png
|
||||
gif
|
||||
|
|
|
@ -1,105 +1,105 @@
|
|||
module builtin
|
||||
|
||||
enum SigIndex {
|
||||
si_signo = 0x00
|
||||
si_code = 0x02
|
||||
si_pid = 0x04
|
||||
si_uid = 0x05
|
||||
si_signo = 0x00
|
||||
si_code = 0x02
|
||||
si_pid = 0x04
|
||||
si_uid = 0x05
|
||||
si_status = 0x06
|
||||
si_size = 0x80
|
||||
si_size = 0x80
|
||||
}
|
||||
|
||||
enum Signo {
|
||||
sighup = 1 // Hangup.
|
||||
sigint = 2 // Interactive attention signal.
|
||||
sigquit = 3 // Quit.
|
||||
sigill = 4 // Illegal instruction.
|
||||
sigtrap = 5 // Trace/breakpoint trap.
|
||||
sigabrt = 6 // Abnormal termination.
|
||||
sigbus = 7
|
||||
sigfpe = 8 // Erroneous arithmetic operation.
|
||||
sigkill = 9 // Killed.
|
||||
sigusr1 = 10
|
||||
sigsegv = 11 // Invalid access to memory.
|
||||
sigusr2 = 12
|
||||
sigpipe = 13 // Broken pipe.
|
||||
sigalrm = 14 // Alarm clock.
|
||||
sigterm = 15 // Termination request.
|
||||
sighup = 1 // Hangup.
|
||||
sigint = 2 // Interactive attention signal.
|
||||
sigquit = 3 // Quit.
|
||||
sigill = 4 // Illegal instruction.
|
||||
sigtrap = 5 // Trace/breakpoint trap.
|
||||
sigabrt = 6 // Abnormal termination.
|
||||
sigbus = 7
|
||||
sigfpe = 8 // Erroneous arithmetic operation.
|
||||
sigkill = 9 // Killed.
|
||||
sigusr1 = 10
|
||||
sigsegv = 11 // Invalid access to memory.
|
||||
sigusr2 = 12
|
||||
sigpipe = 13 // Broken pipe.
|
||||
sigalrm = 14 // Alarm clock.
|
||||
sigterm = 15 // Termination request.
|
||||
sigstkflt = 16
|
||||
sigchld = 17
|
||||
sigcont = 18
|
||||
sigstop = 19
|
||||
sigtstp = 20
|
||||
sigttin = 21 // Background read from control terminal.
|
||||
sigttou = 22 // Background write to control terminal.
|
||||
sigurg = 23
|
||||
sigxcpu = 24 // CPU time limit exceeded.
|
||||
sigxfsz = 25 // File size limit exceeded.
|
||||
sigchld = 17
|
||||
sigcont = 18
|
||||
sigstop = 19
|
||||
sigtstp = 20
|
||||
sigttin = 21 // Background read from control terminal.
|
||||
sigttou = 22 // Background write to control terminal.
|
||||
sigurg = 23
|
||||
sigxcpu = 24 // CPU time limit exceeded.
|
||||
sigxfsz = 25 // File size limit exceeded.
|
||||
sigvtalrm = 26 // Virtual timer expired.
|
||||
sigprof = 27 // Profiling timer expired.
|
||||
sigwinch = 28
|
||||
sigpoll = 29
|
||||
sigsys = 31
|
||||
sigprof = 27 // Profiling timer expired.
|
||||
sigwinch = 28
|
||||
sigpoll = 29
|
||||
sigsys = 31
|
||||
}
|
||||
|
||||
// List of all the errors returned by syscalls
|
||||
enum Errno {
|
||||
enoerror = 0x00000000
|
||||
eperm = 0x00000001
|
||||
enoent = 0x00000002
|
||||
esrch = 0x00000003
|
||||
eintr = 0x00000004
|
||||
eio = 0x00000005
|
||||
enxio = 0x00000006
|
||||
e2big = 0x00000007
|
||||
enoexec = 0x00000008
|
||||
ebadf = 0x00000009
|
||||
echild = 0x0000000a
|
||||
eagain = 0x0000000b
|
||||
enomem = 0x0000000c
|
||||
eacces = 0x0000000d
|
||||
efault = 0x0000000e
|
||||
enotblk = 0x0000000f
|
||||
ebusy = 0x00000010
|
||||
eexist = 0x00000011
|
||||
exdev = 0x00000012
|
||||
enodev = 0x00000013
|
||||
enotdir = 0x00000014
|
||||
eisdir = 0x00000015
|
||||
einval = 0x00000016
|
||||
enfile = 0x00000017
|
||||
emfile = 0x00000018
|
||||
enotty = 0x00000019
|
||||
etxtbsy = 0x0000001a
|
||||
efbig = 0x0000001b
|
||||
enospc = 0x0000001c
|
||||
espipe = 0x0000001d
|
||||
erofs = 0x0000001e
|
||||
emlink = 0x0000001f
|
||||
epipe = 0x00000020
|
||||
edom = 0x00000021
|
||||
erange = 0x00000022
|
||||
eperm = 0x00000001
|
||||
enoent = 0x00000002
|
||||
esrch = 0x00000003
|
||||
eintr = 0x00000004
|
||||
eio = 0x00000005
|
||||
enxio = 0x00000006
|
||||
e2big = 0x00000007
|
||||
enoexec = 0x00000008
|
||||
ebadf = 0x00000009
|
||||
echild = 0x0000000a
|
||||
eagain = 0x0000000b
|
||||
enomem = 0x0000000c
|
||||
eacces = 0x0000000d
|
||||
efault = 0x0000000e
|
||||
enotblk = 0x0000000f
|
||||
ebusy = 0x00000010
|
||||
eexist = 0x00000011
|
||||
exdev = 0x00000012
|
||||
enodev = 0x00000013
|
||||
enotdir = 0x00000014
|
||||
eisdir = 0x00000015
|
||||
einval = 0x00000016
|
||||
enfile = 0x00000017
|
||||
emfile = 0x00000018
|
||||
enotty = 0x00000019
|
||||
etxtbsy = 0x0000001a
|
||||
efbig = 0x0000001b
|
||||
enospc = 0x0000001c
|
||||
espipe = 0x0000001d
|
||||
erofs = 0x0000001e
|
||||
emlink = 0x0000001f
|
||||
epipe = 0x00000020
|
||||
edom = 0x00000021
|
||||
erange = 0x00000022
|
||||
}
|
||||
|
||||
enum MemProt {
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_growsdown = 0x01000000
|
||||
prot_growsup = 0x02000000
|
||||
prot_growsup = 0x02000000
|
||||
}
|
||||
|
||||
enum MapFlags {
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared_validate = 0x03
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
}
|
||||
|
||||
// const (
|
||||
|
@ -208,17 +208,17 @@ const (
|
|||
|
||||
// First argument to waitid:
|
||||
enum WiWhich {
|
||||
p_all = 0
|
||||
p_pid = 1
|
||||
p_all = 0
|
||||
p_pid = 1
|
||||
p_pgid = 2
|
||||
}
|
||||
|
||||
enum WiSiCode {
|
||||
cld_exited = 1 // child has exited
|
||||
cld_killed = 2 // child was killed
|
||||
cld_dumped = 3 // child terminated abnormally
|
||||
cld_trapped = 4 // traced child has trapped
|
||||
cld_stopped = 5 // child has stopped
|
||||
cld_exited = 1 // child has exited
|
||||
cld_killed = 2 // child was killed
|
||||
cld_dumped = 3 // child terminated abnormally
|
||||
cld_trapped = 4 // traced child has trapped
|
||||
cld_stopped = 5 // child has stopped
|
||||
cld_continued = 6 // stopped child has continued
|
||||
}
|
||||
|
||||
|
|
|
@ -18,17 +18,17 @@ pub const (
|
|||
|
||||
// First argument to waitid:
|
||||
pub enum Wi_which {
|
||||
p_all = 0
|
||||
p_pid = 1
|
||||
p_all = 0
|
||||
p_pid = 1
|
||||
p_pgid = 2
|
||||
}
|
||||
|
||||
pub enum Wi_si_code {
|
||||
cld_exited = 1 // child has exited
|
||||
cld_killed = 2 // child was killed
|
||||
cld_dumped = 3 // child terminated abnormally
|
||||
cld_trapped = 4 // traced child has trapped
|
||||
cld_stopped = 5 // child has stopped
|
||||
cld_exited = 1 // child has exited
|
||||
cld_killed = 2 // child was killed
|
||||
cld_dumped = 3 // child terminated abnormally
|
||||
cld_trapped = 4 // traced child has trapped
|
||||
cld_stopped = 5 // child has stopped
|
||||
cld_continued = 6 // stopped child has continued
|
||||
}
|
||||
|
||||
|
@ -66,45 +66,45 @@ Paraphrased from "man 2 waitid" on Linux
|
|||
*/
|
||||
|
||||
pub enum Sig_index {
|
||||
si_signo = 0x00
|
||||
si_code = 0x02
|
||||
si_pid = 0x04
|
||||
si_uid = 0x05
|
||||
si_signo = 0x00
|
||||
si_code = 0x02
|
||||
si_pid = 0x04
|
||||
si_uid = 0x05
|
||||
si_status = 0x06
|
||||
si_size = 0x80
|
||||
si_size = 0x80
|
||||
}
|
||||
|
||||
pub enum Signo {
|
||||
sighup = 1 // Hangup.
|
||||
sigint = 2 // Interactive attention signal.
|
||||
sigquit = 3 // Quit.
|
||||
sigill = 4 // Illegal instruction.
|
||||
sigtrap = 5 // Trace/breakpoint trap.
|
||||
sigabrt = 6 // Abnormal termination.
|
||||
sigbus = 7
|
||||
sigfpe = 8 // Erroneous arithmetic operation.
|
||||
sigkill = 9 // Killed.
|
||||
sigusr1 = 10
|
||||
sigsegv = 11 // Invalid access to storage.
|
||||
sigusr2 = 12
|
||||
sigpipe = 13 // Broken pipe.
|
||||
sigalrm = 14 // Alarm clock.
|
||||
sigterm = 15 // Termination request.
|
||||
sighup = 1 // Hangup.
|
||||
sigint = 2 // Interactive attention signal.
|
||||
sigquit = 3 // Quit.
|
||||
sigill = 4 // Illegal instruction.
|
||||
sigtrap = 5 // Trace/breakpoint trap.
|
||||
sigabrt = 6 // Abnormal termination.
|
||||
sigbus = 7
|
||||
sigfpe = 8 // Erroneous arithmetic operation.
|
||||
sigkill = 9 // Killed.
|
||||
sigusr1 = 10
|
||||
sigsegv = 11 // Invalid access to storage.
|
||||
sigusr2 = 12
|
||||
sigpipe = 13 // Broken pipe.
|
||||
sigalrm = 14 // Alarm clock.
|
||||
sigterm = 15 // Termination request.
|
||||
sigstkflt = 16
|
||||
sigchld = 17
|
||||
sigcont = 18
|
||||
sigstop = 19
|
||||
sigtstp = 20
|
||||
sigttin = 21 // Background read from control terminal.
|
||||
sigttou = 22 // Background write to control terminal.
|
||||
sigurg = 23
|
||||
sigxcpu = 24 // CPU time limit exceeded.
|
||||
sigxfsz = 25 // File size limit exceeded.
|
||||
sigchld = 17
|
||||
sigcont = 18
|
||||
sigstop = 19
|
||||
sigtstp = 20
|
||||
sigttin = 21 // Background read from control terminal.
|
||||
sigttou = 22 // Background write to control terminal.
|
||||
sigurg = 23
|
||||
sigxcpu = 24 // CPU time limit exceeded.
|
||||
sigxfsz = 25 // File size limit exceeded.
|
||||
sigvtalrm = 26 // Virtual timer expired.
|
||||
sigprof = 27 // Profiling timer expired.
|
||||
sigwinch = 28
|
||||
sigpoll = 29
|
||||
sigsys = 31
|
||||
sigprof = 27 // Profiling timer expired.
|
||||
sigwinch = 28
|
||||
sigpoll = 29
|
||||
sigsys = 31
|
||||
}
|
||||
|
||||
pub const (
|
||||
|
@ -168,61 +168,61 @@ pub const (
|
|||
|
||||
pub enum Errno {
|
||||
enoerror = 0x00000000
|
||||
e2big = 0x00000007
|
||||
eacces = 0x0000000d
|
||||
eagain = 0x0000000b
|
||||
ebadf = 0x00000009
|
||||
ebusy = 0x00000010
|
||||
echild = 0x0000000a
|
||||
edom = 0x00000021
|
||||
eexist = 0x00000011
|
||||
efault = 0x0000000e
|
||||
efbig = 0x0000001b
|
||||
eintr = 0x00000004
|
||||
einval = 0x00000016
|
||||
eio = 0x00000005
|
||||
eisdir = 0x00000015
|
||||
emfile = 0x00000018
|
||||
emlink = 0x0000001f
|
||||
enfile = 0x00000017
|
||||
enodev = 0x00000013
|
||||
enoent = 0x00000002
|
||||
enoexec = 0x00000008
|
||||
enomem = 0x0000000c
|
||||
enospc = 0x0000001c
|
||||
enotblk = 0x0000000f
|
||||
enotdir = 0x00000014
|
||||
enotty = 0x00000019
|
||||
enxio = 0x00000006
|
||||
eperm = 0x00000001
|
||||
epipe = 0x00000020
|
||||
erange = 0x00000022
|
||||
erofs = 0x0000001e
|
||||
espipe = 0x0000001d
|
||||
esrch = 0x00000003
|
||||
etxtbsy = 0x0000001a
|
||||
exdev = 0x00000012
|
||||
e2big = 0x00000007
|
||||
eacces = 0x0000000d
|
||||
eagain = 0x0000000b
|
||||
ebadf = 0x00000009
|
||||
ebusy = 0x00000010
|
||||
echild = 0x0000000a
|
||||
edom = 0x00000021
|
||||
eexist = 0x00000011
|
||||
efault = 0x0000000e
|
||||
efbig = 0x0000001b
|
||||
eintr = 0x00000004
|
||||
einval = 0x00000016
|
||||
eio = 0x00000005
|
||||
eisdir = 0x00000015
|
||||
emfile = 0x00000018
|
||||
emlink = 0x0000001f
|
||||
enfile = 0x00000017
|
||||
enodev = 0x00000013
|
||||
enoent = 0x00000002
|
||||
enoexec = 0x00000008
|
||||
enomem = 0x0000000c
|
||||
enospc = 0x0000001c
|
||||
enotblk = 0x0000000f
|
||||
enotdir = 0x00000014
|
||||
enotty = 0x00000019
|
||||
enxio = 0x00000006
|
||||
eperm = 0x00000001
|
||||
epipe = 0x00000020
|
||||
erange = 0x00000022
|
||||
erofs = 0x0000001e
|
||||
espipe = 0x0000001d
|
||||
esrch = 0x00000003
|
||||
etxtbsy = 0x0000001a
|
||||
exdev = 0x00000012
|
||||
}
|
||||
|
||||
pub enum Mm_prot {
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_growsdown = 0x01000000
|
||||
prot_growsup = 0x02000000
|
||||
prot_growsup = 0x02000000
|
||||
}
|
||||
|
||||
pub enum Map_flags {
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared_validate = 0x03
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
}
|
||||
|
||||
fn sys_call0(scn u64) u64 {
|
||||
|
|
|
@ -126,16 +126,16 @@ const (
|
|||
// in the future, maybe we can extend this
|
||||
// to support other mime types
|
||||
enum AtomType {
|
||||
xa_atom = 0 // value 4
|
||||
xa_string = 1 // value 31
|
||||
targets = 2
|
||||
clipboard = 3
|
||||
primary = 4
|
||||
secondary = 5
|
||||
text = 6
|
||||
xa_atom = 0 // value 4
|
||||
xa_string = 1 // value 31
|
||||
targets = 2
|
||||
clipboard = 3
|
||||
primary = 4
|
||||
secondary = 5
|
||||
text = 6
|
||||
utf8_string = 7
|
||||
text_plain = 8
|
||||
text_html = 9
|
||||
text_plain = 8
|
||||
text_html = 9
|
||||
}
|
||||
|
||||
[heap]
|
||||
|
|
|
@ -22,7 +22,7 @@ pub enum FieldType {
|
|||
type_timestamp2
|
||||
type_datetime2
|
||||
type_time2
|
||||
type_json = 245
|
||||
type_json = 245
|
||||
type_newdecimal
|
||||
type_enum
|
||||
type_set
|
||||
|
|
|
@ -3,17 +3,17 @@ module mysql
|
|||
// Values for the capabilities flag bitmask used by the MySQL protocol.
|
||||
// See more on https://dev.mysql.com/doc/dev/mysql-server/latest/group__group__cs__capabilities__flags.html#details
|
||||
pub enum ConnectionFlag {
|
||||
client_compress = C.CLIENT_COMPRESS
|
||||
client_found_rows = C.CLIENT_FOUND_ROWS
|
||||
client_ignore_sigpipe = C.CLIENT_IGNORE_SIGPIPE
|
||||
client_ignore_space = C.CLIENT_IGNORE_SPACE
|
||||
client_interactive = C.CLIENT_INTERACTIVE
|
||||
client_local_files = C.CLIENT_LOCAL_FILES
|
||||
client_multi_results = C.CLIENT_MULTI_RESULTS
|
||||
client_compress = C.CLIENT_COMPRESS
|
||||
client_found_rows = C.CLIENT_FOUND_ROWS
|
||||
client_ignore_sigpipe = C.CLIENT_IGNORE_SIGPIPE
|
||||
client_ignore_space = C.CLIENT_IGNORE_SPACE
|
||||
client_interactive = C.CLIENT_INTERACTIVE
|
||||
client_local_files = C.CLIENT_LOCAL_FILES
|
||||
client_multi_results = C.CLIENT_MULTI_RESULTS
|
||||
client_multi_statements = C.CLIENT_MULTI_STATEMENTS
|
||||
client_no_schema = C.CLIENT_NO_SCHEMA
|
||||
client_odbc = C.CLIENT_ODBC
|
||||
client_ssl = C.CLIENT_SSL
|
||||
client_no_schema = C.CLIENT_NO_SCHEMA
|
||||
client_odbc = C.CLIENT_ODBC
|
||||
client_ssl = C.CLIENT_SSL
|
||||
client_remember_options = C.CLIENT_REMEMBER_OPTIONS
|
||||
}
|
||||
|
||||
|
|
330
vlib/db/pg/oid.v
330
vlib/db/pg/oid.v
|
@ -1,171 +1,171 @@
|
|||
module pg
|
||||
|
||||
pub enum Oid {
|
||||
t_bool = 16
|
||||
t_bytea = 17
|
||||
t_char = 18
|
||||
t_name = 19
|
||||
t_int8 = 20
|
||||
t_int2 = 21
|
||||
t_int2vector = 22
|
||||
t_int4 = 23
|
||||
t_regproc = 24
|
||||
t_text = 25
|
||||
t_oid = 26
|
||||
t_tid = 27
|
||||
t_xid = 28
|
||||
t_cid = 29
|
||||
t_vector = 30
|
||||
t_pg_ddl_command = 32
|
||||
t_pg_type = 71
|
||||
t_pg_attribute = 75
|
||||
t_pg_proc = 81
|
||||
t_pg_class = 83
|
||||
t_json = 114
|
||||
t_xml = 142
|
||||
t__xml = 143
|
||||
t_pg_node_tree = 194
|
||||
t__json = 199
|
||||
t_smgr = 210
|
||||
t_bool = 16
|
||||
t_bytea = 17
|
||||
t_char = 18
|
||||
t_name = 19
|
||||
t_int8 = 20
|
||||
t_int2 = 21
|
||||
t_int2vector = 22
|
||||
t_int4 = 23
|
||||
t_regproc = 24
|
||||
t_text = 25
|
||||
t_oid = 26
|
||||
t_tid = 27
|
||||
t_xid = 28
|
||||
t_cid = 29
|
||||
t_vector = 30
|
||||
t_pg_ddl_command = 32
|
||||
t_pg_type = 71
|
||||
t_pg_attribute = 75
|
||||
t_pg_proc = 81
|
||||
t_pg_class = 83
|
||||
t_json = 114
|
||||
t_xml = 142
|
||||
t__xml = 143
|
||||
t_pg_node_tree = 194
|
||||
t__json = 199
|
||||
t_smgr = 210
|
||||
t_index_am_handler = 325
|
||||
t_point = 600
|
||||
t_lseg = 601
|
||||
t_path = 602
|
||||
t_box = 603
|
||||
t_polygon = 604
|
||||
t_line = 628
|
||||
t__line = 629
|
||||
t_cidr = 650
|
||||
t__cidr = 651
|
||||
t_float4 = 700
|
||||
t_float8 = 701
|
||||
t_abstime = 702
|
||||
t_reltime = 703
|
||||
t_tinterval = 704
|
||||
t_unknown = 705
|
||||
t_circle = 718
|
||||
t__circle = 719
|
||||
t_money = 790
|
||||
t__money = 791
|
||||
t_macaddr = 829
|
||||
t_inet = 869
|
||||
t__bool = 1000
|
||||
t__bytea = 1001
|
||||
t__char = 1002
|
||||
t__name = 1003
|
||||
t__int2 = 1005
|
||||
t__int2vector = 1006
|
||||
t__int4 = 1007
|
||||
t__regproc = 1008
|
||||
t__text = 1009
|
||||
t__tid = 1010
|
||||
t__xid = 1011
|
||||
t__cid = 1012
|
||||
t__vector = 1013
|
||||
t__bpchar = 1014
|
||||
t__varchar = 1015
|
||||
t__int8 = 1016
|
||||
t__point = 1017
|
||||
t__lseg = 1018
|
||||
t__path = 1019
|
||||
t__box = 1020
|
||||
t__float4 = 1021
|
||||
t__float8 = 1022
|
||||
t__abstime = 1023
|
||||
t__reltime = 1024
|
||||
t__tinterval = 1025
|
||||
t__polygon = 1027
|
||||
t__ = 1028
|
||||
t_aclitem = 1033
|
||||
t__aclitem = 1034
|
||||
t__macaddr = 1040
|
||||
t__inet = 1041
|
||||
t_bpchar = 1042
|
||||
t_varchar = 1043
|
||||
t_date = 1082
|
||||
t_time = 1083
|
||||
t_timestamp = 1114
|
||||
t__timestamp = 1115
|
||||
t__date = 1182
|
||||
t__time = 1183
|
||||
t_timestamptz = 1184
|
||||
t__timestamptz = 1185
|
||||
t_interval = 1186
|
||||
t__interval = 1187
|
||||
t__numeric = 1231
|
||||
t_pg_database = 1248
|
||||
t__cstring = 1263
|
||||
t_timetz = 1266
|
||||
t__timetz = 1270
|
||||
t_bit = 1560
|
||||
t__bit = 1561
|
||||
t_varbit = 1562
|
||||
t__varbit = 1563
|
||||
t_numeric = 1700
|
||||
t_refcursor = 1790
|
||||
t__refcursor = 2201
|
||||
t_regprocedure = 2202
|
||||
t_regoper = 2203
|
||||
t_regoperator = 2204
|
||||
t_regclass = 2205
|
||||
t_regtype = 2206
|
||||
t__regprocedure = 2207
|
||||
t__regoper = 2208
|
||||
t__regoperator = 2209
|
||||
t__regclass = 2210
|
||||
t__regtype = 2211
|
||||
t_record = 2249
|
||||
t_cstring = 2275
|
||||
t_any = 2276
|
||||
t_anyarray = 2277
|
||||
t_v = 2278
|
||||
t_trigger = 2279
|
||||
t_point = 600
|
||||
t_lseg = 601
|
||||
t_path = 602
|
||||
t_box = 603
|
||||
t_polygon = 604
|
||||
t_line = 628
|
||||
t__line = 629
|
||||
t_cidr = 650
|
||||
t__cidr = 651
|
||||
t_float4 = 700
|
||||
t_float8 = 701
|
||||
t_abstime = 702
|
||||
t_reltime = 703
|
||||
t_tinterval = 704
|
||||
t_unknown = 705
|
||||
t_circle = 718
|
||||
t__circle = 719
|
||||
t_money = 790
|
||||
t__money = 791
|
||||
t_macaddr = 829
|
||||
t_inet = 869
|
||||
t__bool = 1000
|
||||
t__bytea = 1001
|
||||
t__char = 1002
|
||||
t__name = 1003
|
||||
t__int2 = 1005
|
||||
t__int2vector = 1006
|
||||
t__int4 = 1007
|
||||
t__regproc = 1008
|
||||
t__text = 1009
|
||||
t__tid = 1010
|
||||
t__xid = 1011
|
||||
t__cid = 1012
|
||||
t__vector = 1013
|
||||
t__bpchar = 1014
|
||||
t__varchar = 1015
|
||||
t__int8 = 1016
|
||||
t__point = 1017
|
||||
t__lseg = 1018
|
||||
t__path = 1019
|
||||
t__box = 1020
|
||||
t__float4 = 1021
|
||||
t__float8 = 1022
|
||||
t__abstime = 1023
|
||||
t__reltime = 1024
|
||||
t__tinterval = 1025
|
||||
t__polygon = 1027
|
||||
t__ = 1028
|
||||
t_aclitem = 1033
|
||||
t__aclitem = 1034
|
||||
t__macaddr = 1040
|
||||
t__inet = 1041
|
||||
t_bpchar = 1042
|
||||
t_varchar = 1043
|
||||
t_date = 1082
|
||||
t_time = 1083
|
||||
t_timestamp = 1114
|
||||
t__timestamp = 1115
|
||||
t__date = 1182
|
||||
t__time = 1183
|
||||
t_timestamptz = 1184
|
||||
t__timestamptz = 1185
|
||||
t_interval = 1186
|
||||
t__interval = 1187
|
||||
t__numeric = 1231
|
||||
t_pg_database = 1248
|
||||
t__cstring = 1263
|
||||
t_timetz = 1266
|
||||
t__timetz = 1270
|
||||
t_bit = 1560
|
||||
t__bit = 1561
|
||||
t_varbit = 1562
|
||||
t__varbit = 1563
|
||||
t_numeric = 1700
|
||||
t_refcursor = 1790
|
||||
t__refcursor = 2201
|
||||
t_regprocedure = 2202
|
||||
t_regoper = 2203
|
||||
t_regoperator = 2204
|
||||
t_regclass = 2205
|
||||
t_regtype = 2206
|
||||
t__regprocedure = 2207
|
||||
t__regoper = 2208
|
||||
t__regoperator = 2209
|
||||
t__regclass = 2210
|
||||
t__regtype = 2211
|
||||
t_record = 2249
|
||||
t_cstring = 2275
|
||||
t_any = 2276
|
||||
t_anyarray = 2277
|
||||
t_v = 2278
|
||||
t_trigger = 2279
|
||||
t_language_handler = 2280
|
||||
t_internal = 2281
|
||||
t_opaque = 2282
|
||||
t_anyelement = 2283
|
||||
t__record = 2287
|
||||
t_anynonarray = 2776
|
||||
t_pg_authid = 2842
|
||||
t_pg_auth_members = 2843
|
||||
t__txid_snapshot = 2949
|
||||
t_uuid = 2950
|
||||
t__uuid = 2951
|
||||
t_txid_snapshot = 2970
|
||||
t_fdw_handler = 3115
|
||||
t_pg_lsn = 3220
|
||||
t__pg_lsn = 3221
|
||||
t_tsm_handler = 3310
|
||||
t_anyenum = 3500
|
||||
t_tsvector = 3614
|
||||
t_tsquery = 3615
|
||||
t_gtsvector = 3642
|
||||
t__tsvector = 3643
|
||||
t__gtsvector = 3644
|
||||
t__tsquery = 3645
|
||||
t_regconfig = 3734
|
||||
t__regconfig = 3735
|
||||
t_regdictionary = 3769
|
||||
t__regdictionary = 3770
|
||||
t_jsonb = 3802
|
||||
t__jsonb = 3807
|
||||
t_anyrange = 3831
|
||||
t_event_trigger = 3838
|
||||
t_int4range = 3904
|
||||
t__int4range = 3905
|
||||
t_numrange = 3906
|
||||
t__numrange = 3907
|
||||
t_tsrange = 3908
|
||||
t__tsrange = 3909
|
||||
t_tstzrange = 3910
|
||||
t__tstzrange = 3911
|
||||
t_daterange = 3912
|
||||
t__daterange = 3913
|
||||
t_int8range = 3926
|
||||
t__int8range = 3927
|
||||
t_pg_shseclabel = 4066
|
||||
t_regnamespace = 4089
|
||||
t__regnamespace = 4090
|
||||
t_regrole = 4096
|
||||
t__regrole = 4097
|
||||
t_internal = 2281
|
||||
t_opaque = 2282
|
||||
t_anyelement = 2283
|
||||
t__record = 2287
|
||||
t_anynonarray = 2776
|
||||
t_pg_authid = 2842
|
||||
t_pg_auth_members = 2843
|
||||
t__txid_snapshot = 2949
|
||||
t_uuid = 2950
|
||||
t__uuid = 2951
|
||||
t_txid_snapshot = 2970
|
||||
t_fdw_handler = 3115
|
||||
t_pg_lsn = 3220
|
||||
t__pg_lsn = 3221
|
||||
t_tsm_handler = 3310
|
||||
t_anyenum = 3500
|
||||
t_tsvector = 3614
|
||||
t_tsquery = 3615
|
||||
t_gtsvector = 3642
|
||||
t__tsvector = 3643
|
||||
t__gtsvector = 3644
|
||||
t__tsquery = 3645
|
||||
t_regconfig = 3734
|
||||
t__regconfig = 3735
|
||||
t_regdictionary = 3769
|
||||
t__regdictionary = 3770
|
||||
t_jsonb = 3802
|
||||
t__jsonb = 3807
|
||||
t_anyrange = 3831
|
||||
t_event_trigger = 3838
|
||||
t_int4range = 3904
|
||||
t__int4range = 3905
|
||||
t_numrange = 3906
|
||||
t__numrange = 3907
|
||||
t_tsrange = 3908
|
||||
t__tsrange = 3909
|
||||
t_tstzrange = 3910
|
||||
t__tstzrange = 3911
|
||||
t_daterange = 3912
|
||||
t__daterange = 3913
|
||||
t_int8range = 3926
|
||||
t__int8range = 3927
|
||||
t_pg_shseclabel = 4066
|
||||
t_regnamespace = 4089
|
||||
t__regnamespace = 4090
|
||||
t_regrole = 4096
|
||||
t__regrole = 4097
|
||||
}
|
||||
|
|
|
@ -68,34 +68,34 @@ pub struct C.PGresult {}
|
|||
pub struct C.PGconn {}
|
||||
|
||||
pub enum ConnStatusType {
|
||||
ok = C.CONNECTION_OK
|
||||
bad = C.CONNECTION_BAD
|
||||
ok = C.CONNECTION_OK
|
||||
bad = C.CONNECTION_BAD
|
||||
// Non-blocking mode only below here
|
||||
// The existence of these should never be relied upon - they should only be used for user feedback or similar purposes.
|
||||
started = C.CONNECTION_STARTED // Waiting for connection to be made.
|
||||
made = C.CONNECTION_MADE // Connection OK; waiting to send.
|
||||
started = C.CONNECTION_STARTED // Waiting for connection to be made.
|
||||
made = C.CONNECTION_MADE // Connection OK; waiting to send.
|
||||
awaiting_response = C.CONNECTION_AWAITING_RESPONSE // Waiting for a response from the postmaster.
|
||||
auth_ok = C.CONNECTION_AUTH_OK // Received authentication; waiting for backend startup.
|
||||
setenv = C.CONNECTION_SETENV // Negotiating environment.
|
||||
ssl_startup = C.CONNECTION_SSL_STARTUP // Negotiating SSL.
|
||||
needed = C.CONNECTION_NEEDED // Internal state: connect() needed . Available in PG 8
|
||||
check_writable = C.CONNECTION_CHECK_WRITABLE // Check if we could make a writable connection. Available since PG 10
|
||||
consume = C.CONNECTION_CONSUME // Wait for any pending message and consume them. Available since PG 10
|
||||
gss_startup = C.CONNECTION_GSS_STARTUP // Negotiating GSSAPI; available since PG 12
|
||||
auth_ok = C.CONNECTION_AUTH_OK // Received authentication; waiting for backend startup.
|
||||
setenv = C.CONNECTION_SETENV // Negotiating environment.
|
||||
ssl_startup = C.CONNECTION_SSL_STARTUP // Negotiating SSL.
|
||||
needed = C.CONNECTION_NEEDED // Internal state: connect() needed . Available in PG 8
|
||||
check_writable = C.CONNECTION_CHECK_WRITABLE // Check if we could make a writable connection. Available since PG 10
|
||||
consume = C.CONNECTION_CONSUME // Wait for any pending message and consume them. Available since PG 10
|
||||
gss_startup = C.CONNECTION_GSS_STARTUP // Negotiating GSSAPI; available since PG 12
|
||||
}
|
||||
|
||||
[typedef]
|
||||
pub enum ExecStatusType {
|
||||
empty_query = C.PGRES_EMPTY_QUERY // empty query string was executed
|
||||
command_ok = C.PGRES_COMMAND_OK // a query command that doesn't return anything was executed properly by the backend
|
||||
tuples_ok = C.PGRES_TUPLES_OK // a query command that returns tuples was executed properly by the backend, PGresult contains the result tuples
|
||||
copy_out = C.PGRES_COPY_OUT // Copy Out data transfer in progress
|
||||
copy_in = C.PGRES_COPY_IN // Copy In data transfer in progress
|
||||
bad_response = C.PGRES_BAD_RESPONSE // an unexpected response was recv'd from the backend
|
||||
empty_query = C.PGRES_EMPTY_QUERY // empty query string was executed
|
||||
command_ok = C.PGRES_COMMAND_OK // a query command that doesn't return anything was executed properly by the backend
|
||||
tuples_ok = C.PGRES_TUPLES_OK // a query command that returns tuples was executed properly by the backend, PGresult contains the result tuples
|
||||
copy_out = C.PGRES_COPY_OUT // Copy Out data transfer in progress
|
||||
copy_in = C.PGRES_COPY_IN // Copy In data transfer in progress
|
||||
bad_response = C.PGRES_BAD_RESPONSE // an unexpected response was recv'd from the backend
|
||||
nonfatal_error = C.PGRES_NONFATAL_ERROR // notice or warning message
|
||||
fatal_error = C.PGRES_FATAL_ERROR // query failed
|
||||
copy_both = C.PGRES_COPY_BOTH // Copy In/Out data transfer in progress
|
||||
single_tuple = C.PGRES_SINGLE_TUPLE // single tuple from larger resultset
|
||||
fatal_error = C.PGRES_FATAL_ERROR // query failed
|
||||
copy_both = C.PGRES_COPY_BOTH // Copy In/Out data transfer in progress
|
||||
single_tuple = C.PGRES_SINGLE_TUPLE // single tuple from larger resultset
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -3,108 +3,108 @@ module sqlite
|
|||
// Result represents Sqlite Result and Error Codes
|
||||
// see https://www.sqlite.org/rescode.html
|
||||
pub enum Result {
|
||||
ok = 0
|
||||
error = 1
|
||||
internal = 2
|
||||
perm = 3
|
||||
abort = 4
|
||||
busy = 5
|
||||
locked = 6
|
||||
nomem = 7
|
||||
readonly = 8
|
||||
interrupt = 9
|
||||
ioerr = 10
|
||||
corrupt = 11
|
||||
notfound = 12
|
||||
full = 13
|
||||
cantopen = 14
|
||||
protocol = 15
|
||||
empty = 16
|
||||
schema = 17
|
||||
toobig = 18
|
||||
constraint = 19
|
||||
mismatch = 20
|
||||
misuse = 21
|
||||
nolfs = 22
|
||||
auth = 23
|
||||
format = 24
|
||||
range = 25
|
||||
notadb = 26
|
||||
notice = 27
|
||||
warning = 28
|
||||
row = 100
|
||||
done = 101
|
||||
ok_load_permanently = 256
|
||||
error_missing_collseq = 257
|
||||
busy_recovery = 261
|
||||
locked_sharedcache = 262
|
||||
readonly_recovery = 264
|
||||
ioerr_read = 266
|
||||
corrupt_vtab = 267
|
||||
cantopen_notempdir = 270
|
||||
constraint_check = 275
|
||||
notice_recover_wal = 283
|
||||
warning_autoindex = 284
|
||||
error_retry = 513
|
||||
abort_rollback = 516
|
||||
busy_snapshot = 517
|
||||
locked_vtab = 518
|
||||
readonly_cantlock = 520
|
||||
ioerr_short_read = 522
|
||||
corrupt_sequence = 523
|
||||
cantopen_isdir = 526
|
||||
constraint_commithook = 531
|
||||
ok = 0
|
||||
error = 1
|
||||
internal = 2
|
||||
perm = 3
|
||||
abort = 4
|
||||
busy = 5
|
||||
locked = 6
|
||||
nomem = 7
|
||||
readonly = 8
|
||||
interrupt = 9
|
||||
ioerr = 10
|
||||
corrupt = 11
|
||||
notfound = 12
|
||||
full = 13
|
||||
cantopen = 14
|
||||
protocol = 15
|
||||
empty = 16
|
||||
schema = 17
|
||||
toobig = 18
|
||||
constraint = 19
|
||||
mismatch = 20
|
||||
misuse = 21
|
||||
nolfs = 22
|
||||
auth = 23
|
||||
format = 24
|
||||
range = 25
|
||||
notadb = 26
|
||||
notice = 27
|
||||
warning = 28
|
||||
row = 100
|
||||
done = 101
|
||||
ok_load_permanently = 256
|
||||
error_missing_collseq = 257
|
||||
busy_recovery = 261
|
||||
locked_sharedcache = 262
|
||||
readonly_recovery = 264
|
||||
ioerr_read = 266
|
||||
corrupt_vtab = 267
|
||||
cantopen_notempdir = 270
|
||||
constraint_check = 275
|
||||
notice_recover_wal = 283
|
||||
warning_autoindex = 284
|
||||
error_retry = 513
|
||||
abort_rollback = 516
|
||||
busy_snapshot = 517
|
||||
locked_vtab = 518
|
||||
readonly_cantlock = 520
|
||||
ioerr_short_read = 522
|
||||
corrupt_sequence = 523
|
||||
cantopen_isdir = 526
|
||||
constraint_commithook = 531
|
||||
notice_recover_rollback = 539
|
||||
error_snapshot = 769
|
||||
busy_timeout = 773
|
||||
readonly_rollback = 776
|
||||
ioerr_write = 778
|
||||
corrupt_index = 779
|
||||
cantopen_fullpath = 782
|
||||
constraint_foreignkey = 787
|
||||
readonly_dbmoved = 1032
|
||||
ioerr_fsync = 1034
|
||||
cantopen_convpath = 1038
|
||||
constraint_function = 1043
|
||||
readonly_cantinit = 1288
|
||||
ioerr_dir_fsync = 1290
|
||||
cantopen_dirtywal = 1294
|
||||
constraint_notnull = 1299
|
||||
readonly_directory = 1544
|
||||
ioerr_truncate = 1546
|
||||
cantopen_symlink = 1550
|
||||
constraint_primarykey = 1555
|
||||
ioerr_fstat = 1802
|
||||
constraint_trigger = 1811
|
||||
ioerr_unlock = 2058
|
||||
constraint_unique = 2067
|
||||
ioerr_rdlock = 2314
|
||||
constraint_vtab = 2323
|
||||
ioerr_delete = 2570
|
||||
constraint_rowid = 2579
|
||||
ioerr_blocked = 2826
|
||||
constraint_pinned = 2835
|
||||
ioerr_nomem = 3082
|
||||
ioerr_access = 3338
|
||||
error_snapshot = 769
|
||||
busy_timeout = 773
|
||||
readonly_rollback = 776
|
||||
ioerr_write = 778
|
||||
corrupt_index = 779
|
||||
cantopen_fullpath = 782
|
||||
constraint_foreignkey = 787
|
||||
readonly_dbmoved = 1032
|
||||
ioerr_fsync = 1034
|
||||
cantopen_convpath = 1038
|
||||
constraint_function = 1043
|
||||
readonly_cantinit = 1288
|
||||
ioerr_dir_fsync = 1290
|
||||
cantopen_dirtywal = 1294
|
||||
constraint_notnull = 1299
|
||||
readonly_directory = 1544
|
||||
ioerr_truncate = 1546
|
||||
cantopen_symlink = 1550
|
||||
constraint_primarykey = 1555
|
||||
ioerr_fstat = 1802
|
||||
constraint_trigger = 1811
|
||||
ioerr_unlock = 2058
|
||||
constraint_unique = 2067
|
||||
ioerr_rdlock = 2314
|
||||
constraint_vtab = 2323
|
||||
ioerr_delete = 2570
|
||||
constraint_rowid = 2579
|
||||
ioerr_blocked = 2826
|
||||
constraint_pinned = 2835
|
||||
ioerr_nomem = 3082
|
||||
ioerr_access = 3338
|
||||
ioerr_checkreservedlock = 3594
|
||||
ioerr_lock = 3850
|
||||
ioerr_close = 4106
|
||||
ioerr_dir_close = 4362
|
||||
ioerr_shmopen = 4618
|
||||
ioerr_shmsize = 4874
|
||||
ioerr_shmlock = 5130
|
||||
ioerr_shmmap = 5386
|
||||
ioerr_seek = 5642
|
||||
ioerr_delete_noent = 5898
|
||||
ioerr_mmap = 6154
|
||||
ioerr_gettemppath = 6410
|
||||
ioerr_convpath = 6666
|
||||
ioerr_vnode = 6922
|
||||
ioerr_auth = 7178
|
||||
ioerr_begin_atomic = 7434
|
||||
ioerr_commit_atomic = 7690
|
||||
ioerr_rollback_atomic = 7946
|
||||
ioerr_data = 8202
|
||||
ioerr_lock = 3850
|
||||
ioerr_close = 4106
|
||||
ioerr_dir_close = 4362
|
||||
ioerr_shmopen = 4618
|
||||
ioerr_shmsize = 4874
|
||||
ioerr_shmlock = 5130
|
||||
ioerr_shmmap = 5386
|
||||
ioerr_seek = 5642
|
||||
ioerr_delete_noent = 5898
|
||||
ioerr_mmap = 6154
|
||||
ioerr_gettemppath = 6410
|
||||
ioerr_convpath = 6666
|
||||
ioerr_vnode = 6922
|
||||
ioerr_auth = 7178
|
||||
ioerr_begin_atomic = 7434
|
||||
ioerr_commit_atomic = 7690
|
||||
ioerr_rollback_atomic = 7946
|
||||
ioerr_data = 8202
|
||||
}
|
||||
|
||||
// is_error checks if it is an error code.
|
||||
|
|
|
@ -128,17 +128,17 @@ fn C.sqlite3_open_v2(&char, &&C.sqlite3, int, &char) int
|
|||
|
||||
// https://www.sqlite.org/c3ref/c_open_autoproxy.html
|
||||
pub enum OpenModeFlag {
|
||||
readonly = 0x00000001
|
||||
readwrite = 0x00000002
|
||||
create = 0x00000004
|
||||
uri = 0x00000040
|
||||
memory = 0x00000080
|
||||
nomutex = 0x00008000
|
||||
fullmutex = 0x00010000
|
||||
sharedcache = 0x00020000
|
||||
readonly = 0x00000001
|
||||
readwrite = 0x00000002
|
||||
create = 0x00000004
|
||||
uri = 0x00000040
|
||||
memory = 0x00000080
|
||||
nomutex = 0x00008000
|
||||
fullmutex = 0x00010000
|
||||
sharedcache = 0x00020000
|
||||
privatecache = 0x00040000
|
||||
exrescode = 0x02000000
|
||||
nofollow = 0x01000000
|
||||
exrescode = 0x02000000
|
||||
nofollow = 0x01000000
|
||||
}
|
||||
|
||||
// connect_full Opens connection to sqlite database. It gives more control than `open`.
|
||||
|
|
|
@ -9,45 +9,45 @@ fn C.mremap(ptr voidptr, old usize, new usize, flags usize) voidptr
|
|||
fn C.mmap(base voidptr, len usize, prot int, flags int, fd int, offset i64) voidptr
|
||||
|
||||
pub enum Mm_prot {
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_growsdown = 0x01000000
|
||||
prot_growsup = 0x02000000
|
||||
prot_growsup = 0x02000000
|
||||
}
|
||||
|
||||
pub enum Map_flags {
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared_validate = 0x03
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
}
|
||||
|
||||
enum MemProt {
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_read = 0x1
|
||||
prot_write = 0x2
|
||||
prot_exec = 0x4
|
||||
prot_none = 0x0
|
||||
prot_growsdown = 0x01000000
|
||||
prot_growsup = 0x02000000
|
||||
prot_growsup = 0x02000000
|
||||
}
|
||||
|
||||
enum MapFlags {
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared = 0x01
|
||||
map_private = 0x02
|
||||
map_shared_validate = 0x03
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
map_type = 0x0f
|
||||
map_fixed = 0x10
|
||||
map_file = 0x00
|
||||
map_anonymous = 0x20
|
||||
map_huge_shift = 26
|
||||
map_huge_mask = 0x3f
|
||||
}
|
||||
|
||||
fn system_alloc(_ voidptr, size usize) (voidptr, usize, u32) {
|
||||
|
|
|
@ -21,11 +21,11 @@ pub enum Align {
|
|||
|
||||
pub enum ErrorCode {
|
||||
// Font atlas is full.
|
||||
atlas_full = 1
|
||||
atlas_full = 1
|
||||
// Scratch memory used to render glyphs is full, requested size reported in 'val', you may need to bump up FONS_SCRATCH_BUF_SIZE.
|
||||
scratch_full = 2
|
||||
scratch_full = 2
|
||||
// Calls to fonsPushState has created too large stack, if you need deep state stack bump up FONS_MAX_STATES.
|
||||
states_overflow = 3
|
||||
states_overflow = 3
|
||||
// Trying to pop too many states fonsPopState().
|
||||
states_underflow = 4
|
||||
}
|
||||
|
|
244
vlib/gg/enums.v
244
vlib/gg/enums.v
|
@ -3,9 +3,9 @@
|
|||
module gg
|
||||
|
||||
pub enum MouseButton {
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
invalid = 256
|
||||
}
|
||||
|
||||
|
@ -35,127 +35,127 @@ pub enum PenLineType {
|
|||
}
|
||||
|
||||
pub enum KeyCode {
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
right_bracket = 93 //]
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
right_control = 345
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
}
|
||||
|
||||
const key_code_max = 512
|
||||
|
|
254
vlib/gg/gg.js.v
254
vlib/gg/gg.js.v
|
@ -59,143 +59,143 @@ pub mut:
|
|||
|
||||
pub enum DOMMouseButton {
|
||||
invalid = -1
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
}
|
||||
|
||||
pub enum DOMModifier {
|
||||
shift = 1 //(1<<0)
|
||||
ctrl = 2 //(1<<1)
|
||||
alt = 4 //(1<<2)
|
||||
ctrl = 2 //(1<<1)
|
||||
alt = 4 //(1<<2)
|
||||
super = 8 //(1<<3)
|
||||
lmb = 0x100
|
||||
rmb = 0x200
|
||||
mmb = 0x400
|
||||
lmb = 0x100
|
||||
rmb = 0x200
|
||||
mmb = 0x400
|
||||
}
|
||||
|
||||
pub enum DOMKeyCode {
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
right_bracket = 93 //]
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
right_control = 345
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
}
|
||||
|
||||
pub struct Config {
|
||||
|
|
|
@ -5,14 +5,14 @@ import fontstash
|
|||
const used_import = fontstash.used_import
|
||||
|
||||
pub enum HorizontalAlign {
|
||||
left = C.FONS_ALIGN_LEFT
|
||||
left = C.FONS_ALIGN_LEFT
|
||||
center = C.FONS_ALIGN_CENTER
|
||||
right = C.FONS_ALIGN_RIGHT
|
||||
right = C.FONS_ALIGN_RIGHT
|
||||
}
|
||||
|
||||
pub enum VerticalAlign {
|
||||
top = C.FONS_ALIGN_TOP
|
||||
middle = C.FONS_ALIGN_MIDDLE
|
||||
bottom = C.FONS_ALIGN_BOTTOM
|
||||
top = C.FONS_ALIGN_TOP
|
||||
middle = C.FONS_ALIGN_MIDDLE
|
||||
bottom = C.FONS_ALIGN_BOTTOM
|
||||
baseline = C.FONS_ALIGN_BASELINE
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@ import json
|
|||
|
||||
[json_as_number]
|
||||
pub enum MessageType {
|
||||
error = 1
|
||||
error = 1
|
||||
warning = 2
|
||||
info = 3
|
||||
log = 4
|
||||
info = 3
|
||||
log = 4
|
||||
}
|
||||
|
||||
pub enum MessageType2 {
|
||||
error = 1
|
||||
error = 1
|
||||
warning = 2
|
||||
info = 3
|
||||
log = 4
|
||||
info = 3
|
||||
log = 4
|
||||
}
|
||||
|
||||
enum TestEnum {
|
||||
|
|
|
@ -222,8 +222,8 @@ const div_mod_test_data = [
|
|||
// vfmt on
|
||||
|
||||
enum Comparison {
|
||||
less = -1
|
||||
equal = 0
|
||||
less = -1
|
||||
equal = 0
|
||||
greater = 1
|
||||
}
|
||||
|
||||
|
|
|
@ -28,16 +28,16 @@ enum Select {
|
|||
|
||||
// SocketType are the available sockets
|
||||
pub enum SocketType {
|
||||
udp = C.SOCK_DGRAM
|
||||
tcp = C.SOCK_STREAM
|
||||
udp = C.SOCK_DGRAM
|
||||
tcp = C.SOCK_STREAM
|
||||
seqpacket = C.SOCK_SEQPACKET
|
||||
}
|
||||
|
||||
// AddrFamily are the available address families
|
||||
pub enum AddrFamily {
|
||||
unix = C.AF_UNIX
|
||||
ip = C.AF_INET
|
||||
ip6 = C.AF_INET6
|
||||
unix = C.AF_UNIX
|
||||
ip = C.AF_INET
|
||||
ip6 = C.AF_INET6
|
||||
unspec = C.AF_UNSPEC
|
||||
}
|
||||
|
||||
|
|
|
@ -7,72 +7,72 @@ module http
|
|||
// available at:
|
||||
// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
||||
pub enum Status {
|
||||
unknown = -1
|
||||
unassigned = 0
|
||||
cont = 100
|
||||
switching_protocols = 101
|
||||
processing = 102
|
||||
checkpoint_draft = 103
|
||||
ok = 200
|
||||
created = 201
|
||||
accepted = 202
|
||||
non_authoritative_information = 203
|
||||
no_content = 204
|
||||
reset_content = 205
|
||||
partial_content = 206
|
||||
multi_status = 207
|
||||
already_reported = 208
|
||||
im_used = 226
|
||||
multiple_choices = 300
|
||||
moved_permanently = 301
|
||||
found = 302
|
||||
see_other = 303
|
||||
not_modified = 304
|
||||
use_proxy = 305
|
||||
switch_proxy = 306
|
||||
temporary_redirect = 307
|
||||
permanent_redirect = 308
|
||||
bad_request = 400
|
||||
unauthorized = 401
|
||||
payment_required = 402
|
||||
forbidden = 403
|
||||
not_found = 404
|
||||
method_not_allowed = 405
|
||||
not_acceptable = 406
|
||||
proxy_authentication_required = 407
|
||||
request_timeout = 408
|
||||
conflict = 409
|
||||
gone = 410
|
||||
length_required = 411
|
||||
precondition_failed = 412
|
||||
request_entity_too_large = 413
|
||||
request_uri_too_long = 414
|
||||
unsupported_media_type = 415
|
||||
unknown = -1
|
||||
unassigned = 0
|
||||
cont = 100
|
||||
switching_protocols = 101
|
||||
processing = 102
|
||||
checkpoint_draft = 103
|
||||
ok = 200
|
||||
created = 201
|
||||
accepted = 202
|
||||
non_authoritative_information = 203
|
||||
no_content = 204
|
||||
reset_content = 205
|
||||
partial_content = 206
|
||||
multi_status = 207
|
||||
already_reported = 208
|
||||
im_used = 226
|
||||
multiple_choices = 300
|
||||
moved_permanently = 301
|
||||
found = 302
|
||||
see_other = 303
|
||||
not_modified = 304
|
||||
use_proxy = 305
|
||||
switch_proxy = 306
|
||||
temporary_redirect = 307
|
||||
permanent_redirect = 308
|
||||
bad_request = 400
|
||||
unauthorized = 401
|
||||
payment_required = 402
|
||||
forbidden = 403
|
||||
not_found = 404
|
||||
method_not_allowed = 405
|
||||
not_acceptable = 406
|
||||
proxy_authentication_required = 407
|
||||
request_timeout = 408
|
||||
conflict = 409
|
||||
gone = 410
|
||||
length_required = 411
|
||||
precondition_failed = 412
|
||||
request_entity_too_large = 413
|
||||
request_uri_too_long = 414
|
||||
unsupported_media_type = 415
|
||||
requested_range_not_satisfiable = 416
|
||||
expectation_failed = 417
|
||||
im_a_teapot = 418
|
||||
misdirected_request = 421
|
||||
unprocessable_entity = 422
|
||||
locked = 423
|
||||
failed_dependency = 424
|
||||
unordered_collection = 425
|
||||
upgrade_required = 426
|
||||
precondition_required = 428
|
||||
too_many_requests = 429
|
||||
expectation_failed = 417
|
||||
im_a_teapot = 418
|
||||
misdirected_request = 421
|
||||
unprocessable_entity = 422
|
||||
locked = 423
|
||||
failed_dependency = 424
|
||||
unordered_collection = 425
|
||||
upgrade_required = 426
|
||||
precondition_required = 428
|
||||
too_many_requests = 429
|
||||
request_header_fields_too_large = 431
|
||||
unavailable_for_legal_reasons = 451
|
||||
client_closed_request = 499
|
||||
internal_server_error = 500
|
||||
not_implemented = 501
|
||||
bad_gateway = 502
|
||||
service_unavailable = 503
|
||||
gateway_timeout = 504
|
||||
http_version_not_supported = 505
|
||||
variant_also_negotiates = 506
|
||||
insufficient_storage = 507
|
||||
loop_detected = 508
|
||||
bandwidth_limit_exceeded = 509
|
||||
not_extended = 510
|
||||
unavailable_for_legal_reasons = 451
|
||||
client_closed_request = 499
|
||||
internal_server_error = 500
|
||||
not_implemented = 501
|
||||
bad_gateway = 502
|
||||
service_unavailable = 503
|
||||
gateway_timeout = 504
|
||||
http_version_not_supported = 505
|
||||
variant_also_negotiates = 506
|
||||
insufficient_storage = 507
|
||||
loop_detected = 508
|
||||
bandwidth_limit_exceeded = 509
|
||||
not_extended = 510
|
||||
network_authentication_required = 511
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A blocking operation was interrupted by a call to WSACancelBlockingCall.
|
||||
//
|
||||
wsaeintr = 10004
|
||||
wsaeintr = 10004
|
||||
//
|
||||
// MessageId: WSAEBADF
|
||||
//
|
||||
|
@ -19,7 +19,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The file handle supplied is not valid.
|
||||
//
|
||||
wsaebadf = 10009
|
||||
wsaebadf = 10009
|
||||
//
|
||||
// MessageId: WSAEACCES
|
||||
//
|
||||
|
@ -27,7 +27,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An attempt was made to access a socket in a way forbidden by its access permissions.
|
||||
//
|
||||
wsaeacces = 10013
|
||||
wsaeacces = 10013
|
||||
//
|
||||
// MessageId: WSAEFAULT
|
||||
//
|
||||
|
@ -35,7 +35,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The system detected an invalid pointer address in attempting to use a pointer argument in a call.
|
||||
//
|
||||
wsaefault = 10014
|
||||
wsaefault = 10014
|
||||
//
|
||||
// MessageId: WSAEINVAL
|
||||
//
|
||||
|
@ -43,7 +43,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid argument was supplied.
|
||||
//
|
||||
wsaeinval = 10022
|
||||
wsaeinval = 10022
|
||||
//
|
||||
// MessageId: WSAEMFILE
|
||||
//
|
||||
|
@ -51,7 +51,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Too many open sockets.
|
||||
//
|
||||
wsaemfile = 10024
|
||||
wsaemfile = 10024
|
||||
//
|
||||
// MessageId: WSAEWOULDBLOCK
|
||||
//
|
||||
|
@ -59,7 +59,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A non-blocking socket operation could not be completed immediately.
|
||||
//
|
||||
wsaewouldblock = 10035
|
||||
wsaewouldblock = 10035
|
||||
//
|
||||
// MessageId: WSAEINPROGRESS
|
||||
//
|
||||
|
@ -67,7 +67,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A blocking operation is currently executing.
|
||||
//
|
||||
wsaeinprogress = 10036
|
||||
wsaeinprogress = 10036
|
||||
//
|
||||
// MessageId: WSAEALREADY
|
||||
//
|
||||
|
@ -75,7 +75,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An operation was attempted on a non-blocking socket that already had an operation in progress.
|
||||
//
|
||||
wsaealready = 10037
|
||||
wsaealready = 10037
|
||||
//
|
||||
// MessageId: WSAENOTSOCK
|
||||
//
|
||||
|
@ -83,7 +83,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An operation was attempted on something that is not a socket.
|
||||
//
|
||||
wsaenotsock = 10038
|
||||
wsaenotsock = 10038
|
||||
//
|
||||
// MessageId: WSAEDESTADDRREQ
|
||||
//
|
||||
|
@ -91,7 +91,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A required address was omitted from an operation on a socket.
|
||||
//
|
||||
wsaedestaddrreq = 10039
|
||||
wsaedestaddrreq = 10039
|
||||
//
|
||||
// MessageId: WSAEMSGSIZE
|
||||
//
|
||||
|
@ -99,7 +99,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
|
||||
//
|
||||
wsaemsgsize = 10040
|
||||
wsaemsgsize = 10040
|
||||
//
|
||||
// MessageId: WSAEPROTOTYPE
|
||||
//
|
||||
|
@ -107,7 +107,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
|
||||
//
|
||||
wsaeprototype = 10041
|
||||
wsaeprototype = 10041
|
||||
//
|
||||
// MessageId: WSAENOPROTOOPT
|
||||
//
|
||||
|
@ -115,7 +115,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
|
||||
//
|
||||
wsaenoprotoopt = 10042
|
||||
wsaenoprotoopt = 10042
|
||||
//
|
||||
// MessageId: WSAEPROTONOSUPPORT
|
||||
//
|
||||
|
@ -123,7 +123,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The requested protocol has not been configured into the system, or no implementation for it exists.
|
||||
//
|
||||
wsaeprotonosupport = 10043
|
||||
wsaeprotonosupport = 10043
|
||||
//
|
||||
// MessageId: WSAESOCKTNOSUPPORT
|
||||
//
|
||||
|
@ -131,7 +131,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The support for the specified socket type does not exist in this address family.
|
||||
//
|
||||
wsaesocktnosupport = 10044
|
||||
wsaesocktnosupport = 10044
|
||||
//
|
||||
// MessageId: WSAEOPNOTSUPP
|
||||
//
|
||||
|
@ -139,7 +139,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The attempted operation is not supported for the type of object referenced.
|
||||
//
|
||||
wsaeopnotsupp = 10045
|
||||
wsaeopnotsupp = 10045
|
||||
//
|
||||
// MessageId: WSAEPFNOSUPPORT
|
||||
//
|
||||
|
@ -147,7 +147,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The protocol family has not been configured into the system or no implementation for it exists.
|
||||
//
|
||||
wsaepfnosupport = 10046
|
||||
wsaepfnosupport = 10046
|
||||
//
|
||||
// MessageId: WSAEAFNOSUPPORT
|
||||
//
|
||||
|
@ -155,7 +155,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An address incompatible with the requested protocol was used.
|
||||
//
|
||||
wsaeafnosupport = 10047
|
||||
wsaeafnosupport = 10047
|
||||
//
|
||||
// MessageId: WSAEADDRINUSE
|
||||
//
|
||||
|
@ -163,7 +163,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Only one usage of each socket address (protocol/network address/port) is normally permitted.
|
||||
//
|
||||
wsaeaddrinuse = 10048
|
||||
wsaeaddrinuse = 10048
|
||||
//
|
||||
// MessageId: WSAEADDRNOTAVAIL
|
||||
//
|
||||
|
@ -171,7 +171,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The requested address is not valid in its context.
|
||||
//
|
||||
wsaeaddrnotavail = 10049
|
||||
wsaeaddrnotavail = 10049
|
||||
//
|
||||
// MessageId: WSAENETDOWN
|
||||
//
|
||||
|
@ -179,7 +179,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A socket operation encountered a dead network.
|
||||
//
|
||||
wsaenetdown = 10050
|
||||
wsaenetdown = 10050
|
||||
//
|
||||
// MessageId: WSAENETUNREACH
|
||||
//
|
||||
|
@ -187,7 +187,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A socket operation was attempted to an unreachable network.
|
||||
//
|
||||
wsaenetunreach = 10051
|
||||
wsaenetunreach = 10051
|
||||
//
|
||||
// MessageId: WSAENETRESET
|
||||
//
|
||||
|
@ -195,7 +195,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
|
||||
//
|
||||
wsaenetreset = 10052
|
||||
wsaenetreset = 10052
|
||||
//
|
||||
// MessageId: WSAECONNABORTED
|
||||
//
|
||||
|
@ -203,7 +203,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An established connection was aborted by the software in your host machine.
|
||||
//
|
||||
wsaeconnaborted = 10053
|
||||
wsaeconnaborted = 10053
|
||||
//
|
||||
// MessageId: WSAECONNRESET
|
||||
//
|
||||
|
@ -211,7 +211,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An existing connection was forcibly closed by the remote host.
|
||||
//
|
||||
wsaeconnreset = 10054
|
||||
wsaeconnreset = 10054
|
||||
//
|
||||
// MessageId: WSAENOBUFS
|
||||
//
|
||||
|
@ -219,7 +219,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
|
||||
//
|
||||
wsaenobufs = 10055
|
||||
wsaenobufs = 10055
|
||||
//
|
||||
// MessageId: WSAEISCONN
|
||||
//
|
||||
|
@ -227,7 +227,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A connect request was made on an already connected socket.
|
||||
//
|
||||
wsaeisconn = 10056
|
||||
wsaeisconn = 10056
|
||||
//
|
||||
// MessageId: WSAENOTCONN
|
||||
//
|
||||
|
@ -235,7 +235,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
|
||||
//
|
||||
wsaenotconn = 10057
|
||||
wsaenotconn = 10057
|
||||
//
|
||||
// MessageId: WSAESHUTDOWN
|
||||
//
|
||||
|
@ -243,7 +243,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
|
||||
//
|
||||
wsaeshutdown = 10058
|
||||
wsaeshutdown = 10058
|
||||
//
|
||||
// MessageId: WSAETOOMANYREFS
|
||||
//
|
||||
|
@ -251,7 +251,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Too many references to some kernel object.
|
||||
//
|
||||
wsaetoomanyrefs = 10059
|
||||
wsaetoomanyrefs = 10059
|
||||
//
|
||||
// MessageId: WSAETIMEDOUT
|
||||
//
|
||||
|
@ -259,7 +259,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||
//
|
||||
wsaetimedout = 10060
|
||||
wsaetimedout = 10060
|
||||
//
|
||||
// MessageId: WSAECONNREFUSED
|
||||
//
|
||||
|
@ -267,7 +267,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No connection could be made because the target machine actively refused it.
|
||||
//
|
||||
wsaeconnrefused = 10061
|
||||
wsaeconnrefused = 10061
|
||||
//
|
||||
// MessageId: WSAELOOP
|
||||
//
|
||||
|
@ -275,7 +275,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Cannot translate name.
|
||||
//
|
||||
wsaeloop = 10062
|
||||
wsaeloop = 10062
|
||||
//
|
||||
// MessageId: WSAENAMETOOLONG
|
||||
//
|
||||
|
@ -283,7 +283,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Name component or name was too long.
|
||||
//
|
||||
wsaenametoolong = 10063
|
||||
wsaenametoolong = 10063
|
||||
//
|
||||
// MessageId: WSAEHOSTDOWN
|
||||
//
|
||||
|
@ -291,7 +291,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A socket operation failed because the destination host was down.
|
||||
//
|
||||
wsaehostdown = 10064
|
||||
wsaehostdown = 10064
|
||||
//
|
||||
// MessageId: WSAEHOSTUNREACH
|
||||
//
|
||||
|
@ -299,7 +299,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A socket operation was attempted to an unreachable host.
|
||||
//
|
||||
wsaehostunreach = 10065
|
||||
wsaehostunreach = 10065
|
||||
//
|
||||
// MessageId: WSAENOTEMPTY
|
||||
//
|
||||
|
@ -307,7 +307,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Cannot remove a directory that is not empty.
|
||||
//
|
||||
wsaenotempty = 10066
|
||||
wsaenotempty = 10066
|
||||
//
|
||||
// MessageId: WSAEPROCLIM
|
||||
//
|
||||
|
@ -315,7 +315,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously.
|
||||
//
|
||||
wsaeproclim = 10067
|
||||
wsaeproclim = 10067
|
||||
//
|
||||
// MessageId: WSAEUSERS
|
||||
//
|
||||
|
@ -323,7 +323,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Ran out of quota.
|
||||
//
|
||||
wsaeusers = 10068
|
||||
wsaeusers = 10068
|
||||
//
|
||||
// MessageId: WSAEDQUOT
|
||||
//
|
||||
|
@ -331,7 +331,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Ran out of disk quota.
|
||||
//
|
||||
wsaedquot = 10069
|
||||
wsaedquot = 10069
|
||||
//
|
||||
// MessageId: WSAESTALE
|
||||
//
|
||||
|
@ -339,7 +339,7 @@ pub enum WsaError {
|
|||
//
|
||||
// File handle reference is no longer available.
|
||||
//
|
||||
wsaestale = 10070
|
||||
wsaestale = 10070
|
||||
//
|
||||
// MessageId: WSAEREMOTE
|
||||
//
|
||||
|
@ -347,7 +347,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Item is not available locally.
|
||||
//
|
||||
wsaeremote = 10071
|
||||
wsaeremote = 10071
|
||||
//
|
||||
// MessageId: WSASYSNOTREADY
|
||||
//
|
||||
|
@ -355,7 +355,7 @@ pub enum WsaError {
|
|||
//
|
||||
// WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
|
||||
//
|
||||
wsasysnotready = 10091
|
||||
wsasysnotready = 10091
|
||||
//
|
||||
// MessageId: WSAVERNOTSUPPORTED
|
||||
//
|
||||
|
@ -363,7 +363,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The Windows Sockets version requested is not supported.
|
||||
//
|
||||
wsavernotsupported = 10092
|
||||
wsavernotsupported = 10092
|
||||
//
|
||||
// MessageId: WSANOTINITIALISED
|
||||
//
|
||||
|
@ -371,7 +371,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Either the application has not called WSAStartup, or WSAStartup failed.
|
||||
//
|
||||
wsanotinitialised = 10093
|
||||
wsanotinitialised = 10093
|
||||
//
|
||||
// MessageId: WSAEDISCON
|
||||
//
|
||||
|
@ -379,7 +379,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
|
||||
//
|
||||
wsaediscon = 10101
|
||||
wsaediscon = 10101
|
||||
//
|
||||
// MessageId: WSAENOMORE
|
||||
//
|
||||
|
@ -387,7 +387,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No more results can be returned by WSALookupServiceNext.
|
||||
//
|
||||
wsaenomore = 10102
|
||||
wsaenomore = 10102
|
||||
//
|
||||
// MessageId: WSAECANCELLED
|
||||
//
|
||||
|
@ -395,7 +395,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
||||
//
|
||||
wsaecancelled = 10103
|
||||
wsaecancelled = 10103
|
||||
//
|
||||
// MessageId: WSAEINVALIDPROCTABLE
|
||||
//
|
||||
|
@ -403,7 +403,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The procedure call table is invalid.
|
||||
//
|
||||
wsaeinvalidproctable = 10104
|
||||
wsaeinvalidproctable = 10104
|
||||
//
|
||||
// MessageId: WSAEINVALIDPROVIDER
|
||||
//
|
||||
|
@ -411,7 +411,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The requested service provider is invalid.
|
||||
//
|
||||
wsaeinvalidprovider = 10105
|
||||
wsaeinvalidprovider = 10105
|
||||
//
|
||||
// MessageId: WSAEPROVIDERFAILEDINIT
|
||||
//
|
||||
|
@ -419,7 +419,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The requested service provider could not be loaded or initialized.
|
||||
//
|
||||
wsaeproviderfailedinit = 10106
|
||||
wsaeproviderfailedinit = 10106
|
||||
//
|
||||
// MessageId: WSASYSCALLFAILURE
|
||||
//
|
||||
|
@ -427,7 +427,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A system call has failed.
|
||||
//
|
||||
wsasyscallfailure = 10107
|
||||
wsasyscallfailure = 10107
|
||||
//
|
||||
// MessageId: WSASERVICE_NOT_FOUND
|
||||
//
|
||||
|
@ -435,7 +435,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No such service is known. The service cannot be found in the specified name space.
|
||||
//
|
||||
wsaservice_not_found = 10108
|
||||
wsaservice_not_found = 10108
|
||||
//
|
||||
// MessageId: WSATYPE_NOT_FOUND
|
||||
//
|
||||
|
@ -443,7 +443,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The specified class was not found.
|
||||
//
|
||||
wsatype_not_found = 10109
|
||||
wsatype_not_found = 10109
|
||||
//
|
||||
// MessageId: WSA_E_NO_MORE
|
||||
//
|
||||
|
@ -451,7 +451,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No more results can be returned by WSALookupServiceNext.
|
||||
//
|
||||
wsa_e_no_more = 10110
|
||||
wsa_e_no_more = 10110
|
||||
//
|
||||
// MessageId: WSA_E_CANCELLED
|
||||
//
|
||||
|
@ -459,7 +459,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
||||
//
|
||||
wsa_e_cancelled = 10111
|
||||
wsa_e_cancelled = 10111
|
||||
//
|
||||
// MessageId: WSAEREFUSED
|
||||
//
|
||||
|
@ -467,7 +467,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A database query failed because it was actively refused.
|
||||
//
|
||||
wsaerefused = 10112
|
||||
wsaerefused = 10112
|
||||
//
|
||||
// MessageId: WSAHOST_NOT_FOUND
|
||||
//
|
||||
|
@ -475,7 +475,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No such host is known.
|
||||
//
|
||||
wsahost_not_found = 11001
|
||||
wsahost_not_found = 11001
|
||||
//
|
||||
// MessageId: WSATRY_AGAIN
|
||||
//
|
||||
|
@ -483,7 +483,7 @@ pub enum WsaError {
|
|||
//
|
||||
// This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
|
||||
//
|
||||
wsatry_again = 11002
|
||||
wsatry_again = 11002
|
||||
//
|
||||
// MessageId: WSANO_RECOVERY
|
||||
//
|
||||
|
@ -491,7 +491,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A non-recoverable error occurred during a database lookup.
|
||||
//
|
||||
wsano_recovery = 11003
|
||||
wsano_recovery = 11003
|
||||
//
|
||||
// MessageId: WSANO_DATA
|
||||
//
|
||||
|
@ -499,7 +499,7 @@ pub enum WsaError {
|
|||
//
|
||||
// The requested name is valid, but no data of the requested type was found.
|
||||
//
|
||||
wsano_data = 11004
|
||||
wsano_data = 11004
|
||||
//
|
||||
// MessageId: WSA_QOS_RECEIVERS
|
||||
//
|
||||
|
@ -507,7 +507,7 @@ pub enum WsaError {
|
|||
//
|
||||
// At least one reserve has arrived.
|
||||
//
|
||||
wsa_qos_receivers = 11005
|
||||
wsa_qos_receivers = 11005
|
||||
//
|
||||
// MessageId: WSA_QOS_SENDERS
|
||||
//
|
||||
|
@ -515,7 +515,7 @@ pub enum WsaError {
|
|||
//
|
||||
// At least one path has arrived.
|
||||
//
|
||||
wsa_qos_senders = 11006
|
||||
wsa_qos_senders = 11006
|
||||
//
|
||||
// MessageId: WSA_QOS_NO_SENDERS
|
||||
//
|
||||
|
@ -523,7 +523,7 @@ pub enum WsaError {
|
|||
//
|
||||
// There are no senders.
|
||||
//
|
||||
wsa_qos_no_senders = 11007
|
||||
wsa_qos_no_senders = 11007
|
||||
//
|
||||
// MessageId: WSA_QOS_NO_RECEIVERS
|
||||
//
|
||||
|
@ -531,7 +531,7 @@ pub enum WsaError {
|
|||
//
|
||||
// There are no receivers.
|
||||
//
|
||||
wsa_qos_no_receivers = 11008
|
||||
wsa_qos_no_receivers = 11008
|
||||
//
|
||||
// MessageId: WSA_QOS_REQUEST_CONFIRMED
|
||||
//
|
||||
|
@ -539,7 +539,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Reserve has been confirmed.
|
||||
//
|
||||
wsa_qos_request_confirmed = 11009
|
||||
wsa_qos_request_confirmed = 11009
|
||||
//
|
||||
// MessageId: WSA_QOS_ADMISSION_FAILURE
|
||||
//
|
||||
|
@ -547,7 +547,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Error due to lack of resources.
|
||||
//
|
||||
wsa_qos_admission_failure = 11010
|
||||
wsa_qos_admission_failure = 11010
|
||||
//
|
||||
// MessageId: WSA_QOS_POLICY_FAILURE
|
||||
//
|
||||
|
@ -555,7 +555,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Rejected for administrative reasons - bad credentials.
|
||||
//
|
||||
wsa_qos_policy_failure = 11011
|
||||
wsa_qos_policy_failure = 11011
|
||||
//
|
||||
// MessageId: WSA_QOS_BAD_STYLE
|
||||
//
|
||||
|
@ -563,7 +563,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Unknown or conflicting style.
|
||||
//
|
||||
wsa_qos_bad_style = 11012
|
||||
wsa_qos_bad_style = 11012
|
||||
//
|
||||
// MessageId: WSA_QOS_BAD_OBJECT
|
||||
//
|
||||
|
@ -571,7 +571,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Problem with some part of the filterspec or providerspecific buffer in general.
|
||||
//
|
||||
wsa_qos_bad_object = 11013
|
||||
wsa_qos_bad_object = 11013
|
||||
//
|
||||
// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR
|
||||
//
|
||||
|
@ -579,7 +579,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Problem with some part of the flowspec.
|
||||
//
|
||||
wsa_qos_traffic_ctrl_error = 11014
|
||||
wsa_qos_traffic_ctrl_error = 11014
|
||||
//
|
||||
// MessageId: WSA_QOS_GENERIC_ERROR
|
||||
//
|
||||
|
@ -587,7 +587,7 @@ pub enum WsaError {
|
|||
//
|
||||
// General QOS error.
|
||||
//
|
||||
wsa_qos_generic_error = 11015
|
||||
wsa_qos_generic_error = 11015
|
||||
//
|
||||
// MessageId: WSA_QOS_ESERVICETYPE
|
||||
//
|
||||
|
@ -595,7 +595,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid or unrecognized service type was found in the flowspec.
|
||||
//
|
||||
wsa_qos_eservicetype = 11016
|
||||
wsa_qos_eservicetype = 11016
|
||||
//
|
||||
// MessageId: WSA_QOS_EFLOWSPEC
|
||||
//
|
||||
|
@ -603,7 +603,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid or inconsistent flowspec was found in the QOS structure.
|
||||
//
|
||||
wsa_qos_eflowspec = 11017
|
||||
wsa_qos_eflowspec = 11017
|
||||
//
|
||||
// MessageId: WSA_QOS_EPROVSPECBUF
|
||||
//
|
||||
|
@ -611,7 +611,7 @@ pub enum WsaError {
|
|||
//
|
||||
// Invalid QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_eprovspecbuf = 11018
|
||||
wsa_qos_eprovspecbuf = 11018
|
||||
//
|
||||
// MessageId: WSA_QOS_EFILTERSTYLE
|
||||
//
|
||||
|
@ -619,7 +619,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid QOS filter style was used.
|
||||
//
|
||||
wsa_qos_efilterstyle = 11019
|
||||
wsa_qos_efilterstyle = 11019
|
||||
//
|
||||
// MessageId: WSA_QOS_EFILTERTYPE
|
||||
//
|
||||
|
@ -627,7 +627,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid QOS filter type was used.
|
||||
//
|
||||
wsa_qos_efiltertype = 11020
|
||||
wsa_qos_efiltertype = 11020
|
||||
//
|
||||
// MessageId: WSA_QOS_EFILTERCOUNT
|
||||
//
|
||||
|
@ -635,7 +635,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
|
||||
//
|
||||
wsa_qos_efiltercount = 11021
|
||||
wsa_qos_efiltercount = 11021
|
||||
//
|
||||
// MessageId: WSA_QOS_EOBJLENGTH
|
||||
//
|
||||
|
@ -643,7 +643,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_eobjlength = 11022
|
||||
wsa_qos_eobjlength = 11022
|
||||
//
|
||||
// MessageId: WSA_QOS_EFLOWCOUNT
|
||||
//
|
||||
|
@ -651,7 +651,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An incorrect number of flow descriptors was specified in the QOS structure.
|
||||
//
|
||||
wsa_qos_eflowcount = 11023
|
||||
wsa_qos_eflowcount = 11023
|
||||
//
|
||||
// MessageId: WSA_QOS_EUNKOWNPSOBJ
|
||||
//
|
||||
|
@ -659,7 +659,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An unrecognized object was found in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_eunkownpsobj = 11024
|
||||
wsa_qos_eunkownpsobj = 11024
|
||||
//
|
||||
// MessageId: WSA_QOS_EPOLICYOBJ
|
||||
//
|
||||
|
@ -667,7 +667,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid policy object was found in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_epolicyobj = 11025
|
||||
wsa_qos_epolicyobj = 11025
|
||||
//
|
||||
// MessageId: WSA_QOS_EFLOWDESC
|
||||
//
|
||||
|
@ -675,7 +675,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid QOS flow descriptor was found in the flow descriptor list.
|
||||
//
|
||||
wsa_qos_eflowdesc = 11026
|
||||
wsa_qos_eflowdesc = 11026
|
||||
//
|
||||
// MessageId: WSA_QOS_EPSFLOWSPEC
|
||||
//
|
||||
|
@ -683,7 +683,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
|
||||
//
|
||||
wsa_qos_epsflowspec = 11027
|
||||
wsa_qos_epsflowspec = 11027
|
||||
//
|
||||
// MessageId: WSA_QOS_EPSFILTERSPEC
|
||||
//
|
||||
|
@ -691,7 +691,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid FILTERSPEC was found in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_epsfilterspec = 11028
|
||||
wsa_qos_epsfilterspec = 11028
|
||||
//
|
||||
// MessageId: WSA_QOS_ESDMODEOBJ
|
||||
//
|
||||
|
@ -699,7 +699,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid shape discard mode object was found in the QOS provider specific buffer.
|
||||
//
|
||||
wsa_qos_esdmodeobj = 11029
|
||||
wsa_qos_esdmodeobj = 11029
|
||||
//
|
||||
// MessageId: WSA_QOS_ESHAPERATEOBJ
|
||||
//
|
||||
|
@ -707,7 +707,7 @@ pub enum WsaError {
|
|||
//
|
||||
// An invalid shaping rate object was found in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_eshaperateobj = 11030
|
||||
wsa_qos_eshaperateobj = 11030
|
||||
//
|
||||
// MessageId: WSA_QOS_RESERVED_PETYPE
|
||||
//
|
||||
|
@ -715,7 +715,7 @@ pub enum WsaError {
|
|||
//
|
||||
// A reserved policy element was found in the QOS provider-specific buffer.
|
||||
//
|
||||
wsa_qos_reserved_petype = 11031
|
||||
wsa_qos_reserved_petype = 11031
|
||||
//
|
||||
// MessageId: WSA_SECURE_HOST_NOT_FOUND
|
||||
//
|
||||
|
@ -723,7 +723,7 @@ pub enum WsaError {
|
|||
//
|
||||
// No such host is known securely.
|
||||
//
|
||||
wsa_secure_host_not_found = 11032
|
||||
wsa_secure_host_not_found = 11032
|
||||
//
|
||||
// MessageId: WSA_IPSEC_NAME_POLICY_ERROR
|
||||
//
|
||||
|
|
|
@ -20,16 +20,16 @@ fn ssl_error(ret int, ssl voidptr) !SSLError {
|
|||
}
|
||||
|
||||
enum SSLError {
|
||||
ssl_error_none = 0 // SSL_ERROR_NONE
|
||||
ssl_error_ssl = 1 // SSL_ERROR_SSL
|
||||
ssl_error_want_read = 2 // SSL_ERROR_WANT_READ
|
||||
ssl_error_want_write = 3 // SSL_ERROR_WANT_WRITE
|
||||
ssl_error_none = 0 // SSL_ERROR_NONE
|
||||
ssl_error_ssl = 1 // SSL_ERROR_SSL
|
||||
ssl_error_want_read = 2 // SSL_ERROR_WANT_READ
|
||||
ssl_error_want_write = 3 // SSL_ERROR_WANT_WRITE
|
||||
ssl_error_want_x509_lookup = 4 // SSL_ERROR_WANT_X509_LOOKUP
|
||||
ssl_error_syscall = 5 // SSL_ERROR_SYSCALL
|
||||
ssl_error_zero_return = 6 // SSL_ERROR_ZERO_RETURN
|
||||
ssl_error_want_connect = 7 // SSL_ERROR_WANT_CONNECT
|
||||
ssl_error_want_accept = 8 // SSL_ERROR_WANT_ACCEPT
|
||||
ssl_error_want_async = 9 // SSL_ERROR_WANT_ASYNC
|
||||
ssl_error_want_async_job = 10 // SSL_ERROR_WANT_ASYNC_JOB
|
||||
ssl_error_want_early = 11 // SSL_ERROR_WANT_EARLY
|
||||
ssl_error_syscall = 5 // SSL_ERROR_SYSCALL
|
||||
ssl_error_zero_return = 6 // SSL_ERROR_ZERO_RETURN
|
||||
ssl_error_want_connect = 7 // SSL_ERROR_WANT_CONNECT
|
||||
ssl_error_want_accept = 8 // SSL_ERROR_WANT_ACCEPT
|
||||
ssl_error_want_async = 9 // SSL_ERROR_WANT_ASYNC
|
||||
ssl_error_want_async_job = 10 // SSL_ERROR_WANT_ASYNC_JOB
|
||||
ssl_error_want_early = 11 // SSL_ERROR_WANT_EARLY
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@ const (
|
|||
)
|
||||
|
||||
enum ReplyCode {
|
||||
ready = 220
|
||||
close = 221
|
||||
auth_ok = 235
|
||||
action_ok = 250
|
||||
ready = 220
|
||||
close = 221
|
||||
auth_ok = 235
|
||||
action_ok = 250
|
||||
mail_start = 354
|
||||
}
|
||||
|
||||
|
|
|
@ -3,22 +3,22 @@ module net
|
|||
pub enum SocketOption {
|
||||
// TODO: SO_ACCEPT_CONN is not here because windows doesn't support it
|
||||
// and there is no easy way to define it
|
||||
broadcast = C.SO_BROADCAST
|
||||
debug = C.SO_DEBUG
|
||||
dont_route = C.SO_DONTROUTE
|
||||
error = C.SO_ERROR
|
||||
keep_alive = C.SO_KEEPALIVE
|
||||
linger = C.SO_LINGER
|
||||
oob_inline = C.SO_OOBINLINE
|
||||
reuse_addr = C.SO_REUSEADDR
|
||||
broadcast = C.SO_BROADCAST
|
||||
debug = C.SO_DEBUG
|
||||
dont_route = C.SO_DONTROUTE
|
||||
error = C.SO_ERROR
|
||||
keep_alive = C.SO_KEEPALIVE
|
||||
linger = C.SO_LINGER
|
||||
oob_inline = C.SO_OOBINLINE
|
||||
reuse_addr = C.SO_REUSEADDR
|
||||
receive_buf_size = C.SO_RCVBUF
|
||||
receive_low_size = C.SO_RCVLOWAT
|
||||
receive_timeout = C.SO_RCVTIMEO
|
||||
send_buf_size = C.SO_SNDBUF
|
||||
send_low_size = C.SO_SNDLOWAT
|
||||
send_timeout = C.SO_SNDTIMEO
|
||||
socket_type = C.SO_TYPE
|
||||
ipv6_only = C.IPV6_V6ONLY
|
||||
receive_timeout = C.SO_RCVTIMEO
|
||||
send_buf_size = C.SO_SNDBUF
|
||||
send_low_size = C.SO_SNDLOWAT
|
||||
send_timeout = C.SO_SNDTIMEO
|
||||
socket_type = C.SO_TYPE
|
||||
ipv6_only = C.IPV6_V6ONLY
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
|
@ -77,11 +77,11 @@ pub:
|
|||
// OPCode represents the supported websocket frame types
|
||||
pub enum OPCode {
|
||||
continuation = 0x00
|
||||
text_frame = 0x01
|
||||
text_frame = 0x01
|
||||
binary_frame = 0x02
|
||||
close = 0x08
|
||||
ping = 0x09
|
||||
pong = 0x0A
|
||||
close = 0x08
|
||||
ping = 0x09
|
||||
pong = 0x0A
|
||||
}
|
||||
|
||||
[params]
|
||||
|
|
|
@ -5,10 +5,10 @@ module os
|
|||
#include <android/native_activity.h>
|
||||
|
||||
pub enum AssetMode {
|
||||
buffer = C.AASSET_MODE_BUFFER // Caller plans to ask for a read-only buffer with all data.
|
||||
random = C.AASSET_MODE_RANDOM // Read chunks, and seek forward and backward.
|
||||
buffer = C.AASSET_MODE_BUFFER // Caller plans to ask for a read-only buffer with all data.
|
||||
random = C.AASSET_MODE_RANDOM // Read chunks, and seek forward and backward.
|
||||
streaming = C.AASSET_MODE_STREAMING // Read sequentially, with an occasional forward seek.
|
||||
unknown = C.AASSET_MODE_UNKNOWN // No specific information about how data will be accessed.
|
||||
unknown = C.AASSET_MODE_UNKNOWN // No specific information about how data will be accessed.
|
||||
}
|
||||
|
||||
// See https://developer.android.com/ndk/reference/struct/a-native-activity for more info.
|
||||
|
|
|
@ -7,37 +7,37 @@ module os
|
|||
// consult man pages / signal.h .
|
||||
|
||||
pub enum Signal {
|
||||
hup = 1
|
||||
int = 2
|
||||
quit = 3
|
||||
ill = 4
|
||||
trap = 5
|
||||
abrt = 6
|
||||
bus = 7
|
||||
fpe = 8
|
||||
kill = 9
|
||||
usr1 = 10
|
||||
segv = 11
|
||||
usr2 = 12
|
||||
pipe = 13
|
||||
alrm = 14
|
||||
term = 15
|
||||
hup = 1
|
||||
int = 2
|
||||
quit = 3
|
||||
ill = 4
|
||||
trap = 5
|
||||
abrt = 6
|
||||
bus = 7
|
||||
fpe = 8
|
||||
kill = 9
|
||||
usr1 = 10
|
||||
segv = 11
|
||||
usr2 = 12
|
||||
pipe = 13
|
||||
alrm = 14
|
||||
term = 15
|
||||
stkflt = 16
|
||||
chld = 17
|
||||
cont = 18
|
||||
stop = 19
|
||||
tstp = 20
|
||||
ttin = 21
|
||||
ttou = 22
|
||||
urg = 23
|
||||
xcpu = 24
|
||||
xfsz = 25
|
||||
chld = 17
|
||||
cont = 18
|
||||
stop = 19
|
||||
tstp = 20
|
||||
ttin = 21
|
||||
ttou = 22
|
||||
urg = 23
|
||||
xcpu = 24
|
||||
xfsz = 25
|
||||
vtalrm = 26
|
||||
prof = 27
|
||||
winch = 28
|
||||
poll = 29
|
||||
pwr = 30
|
||||
sys = 31
|
||||
prof = 27
|
||||
winch = 28
|
||||
poll = 29
|
||||
pwr = 30
|
||||
sys = 31
|
||||
}
|
||||
|
||||
pub type SignalHandler = fn (Signal)
|
||||
|
|
|
@ -1674,7 +1674,7 @@ fn (mut re RE) group_continuous_save(g_index int) {
|
|||
*
|
||||
******************************************************************************/
|
||||
enum Match_state {
|
||||
start = 0
|
||||
start = 0
|
||||
stop
|
||||
end
|
||||
new_line
|
||||
|
|
|
@ -281,13 +281,13 @@ pub enum BlendOp {
|
|||
|
||||
pub enum ColorMask {
|
||||
_default = 0 // value 0 reserved for default-init
|
||||
@none = 0x10 // special value for 'all channels disabled
|
||||
r = 1
|
||||
g = 2
|
||||
b = 4
|
||||
a = 8
|
||||
rgb = 0x7
|
||||
rgba = 0xF
|
||||
@none = 0x10 // special value for 'all channels disabled
|
||||
r = 1
|
||||
g = 2
|
||||
b = 4
|
||||
a = 8
|
||||
rgb = 0x7
|
||||
rgba = 0xF
|
||||
}
|
||||
|
||||
pub enum Action {
|
||||
|
|
|
@ -31,157 +31,157 @@ pub enum EventType {
|
|||
|
||||
pub enum MouseButton {
|
||||
invalid = -1
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
left = 0
|
||||
right = 1
|
||||
middle = 2
|
||||
}
|
||||
|
||||
pub enum MouseCursor {
|
||||
default = C.SAPP_MOUSECURSOR_DEFAULT
|
||||
arrow = C.SAPP_MOUSECURSOR_ARROW
|
||||
ibeam = C.SAPP_MOUSECURSOR_IBEAM
|
||||
crosshair = C.SAPP_MOUSECURSOR_CROSSHAIR
|
||||
default = C.SAPP_MOUSECURSOR_DEFAULT
|
||||
arrow = C.SAPP_MOUSECURSOR_ARROW
|
||||
ibeam = C.SAPP_MOUSECURSOR_IBEAM
|
||||
crosshair = C.SAPP_MOUSECURSOR_CROSSHAIR
|
||||
pointing_hand = C.SAPP_MOUSECURSOR_POINTING_HAND
|
||||
resize_ew = C.SAPP_MOUSECURSOR_RESIZE_EW
|
||||
resize_ns = C.SAPP_MOUSECURSOR_RESIZE_NS
|
||||
resize_nwse = C.SAPP_MOUSECURSOR_RESIZE_NWSE
|
||||
resize_nesw = C.SAPP_MOUSECURSOR_RESIZE_NESW
|
||||
resize_all = C.SAPP_MOUSECURSOR_RESIZE_ALL
|
||||
not_allowed = C.SAPP_MOUSECURSOR_NOT_ALLOWED
|
||||
resize_ew = C.SAPP_MOUSECURSOR_RESIZE_EW
|
||||
resize_ns = C.SAPP_MOUSECURSOR_RESIZE_NS
|
||||
resize_nwse = C.SAPP_MOUSECURSOR_RESIZE_NWSE
|
||||
resize_nesw = C.SAPP_MOUSECURSOR_RESIZE_NESW
|
||||
resize_all = C.SAPP_MOUSECURSOR_RESIZE_ALL
|
||||
not_allowed = C.SAPP_MOUSECURSOR_NOT_ALLOWED
|
||||
}
|
||||
|
||||
pub enum Modifier {
|
||||
shift = 1 //(1<<0)
|
||||
ctrl = 2 //(1<<1)
|
||||
alt = 4 //(1<<2)
|
||||
ctrl = 2 //(1<<1)
|
||||
alt = 4 //(1<<2)
|
||||
super = 8 //(1<<3)
|
||||
lmb = 0x100
|
||||
rmb = 0x200
|
||||
mmb = 0x400
|
||||
lmb = 0x100
|
||||
rmb = 0x200
|
||||
mmb = 0x400
|
||||
}
|
||||
|
||||
pub enum KeyCode {
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
invalid = 0
|
||||
space = 32
|
||||
apostrophe = 39 //'
|
||||
comma = 44 //,
|
||||
minus = 45 //-
|
||||
period = 46 //.
|
||||
slash = 47 ///
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
semicolon = 59 //;
|
||||
equal = 61 //=
|
||||
a = 65
|
||||
b = 66
|
||||
c = 67
|
||||
d = 68
|
||||
e = 69
|
||||
f = 70
|
||||
g = 71
|
||||
h = 72
|
||||
i = 73
|
||||
j = 74
|
||||
k = 75
|
||||
l = 76
|
||||
m = 77
|
||||
n = 78
|
||||
o = 79
|
||||
p = 80
|
||||
q = 81
|
||||
r = 82
|
||||
s = 83
|
||||
t = 84
|
||||
u = 85
|
||||
v = 86
|
||||
w = 87
|
||||
x = 88
|
||||
y = 89
|
||||
z = 90
|
||||
left_bracket = 91 //[
|
||||
backslash = 92 //\
|
||||
right_bracket = 93 //]
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
grave_accent = 96 //`
|
||||
world_1 = 161 // non-us #1
|
||||
world_2 = 162 // non-us #2
|
||||
escape = 256
|
||||
enter = 257
|
||||
tab = 258
|
||||
backspace = 259
|
||||
insert = 260
|
||||
delete = 261
|
||||
right = 262
|
||||
left = 263
|
||||
down = 264
|
||||
up = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
caps_lock = 280
|
||||
scroll_lock = 281
|
||||
num_lock = 282
|
||||
print_screen = 283
|
||||
pause = 284
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
f25 = 314
|
||||
kp_0 = 320
|
||||
kp_1 = 321
|
||||
kp_2 = 322
|
||||
kp_3 = 323
|
||||
kp_4 = 324
|
||||
kp_5 = 325
|
||||
kp_6 = 326
|
||||
kp_7 = 327
|
||||
kp_8 = 328
|
||||
kp_9 = 329
|
||||
kp_decimal = 330
|
||||
kp_divide = 331
|
||||
kp_multiply = 332
|
||||
kp_subtract = 333
|
||||
kp_add = 334
|
||||
kp_enter = 335
|
||||
kp_equal = 336
|
||||
left_shift = 340
|
||||
left_control = 341
|
||||
left_alt = 342
|
||||
left_super = 343
|
||||
right_shift = 344
|
||||
right_control = 345
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
right_alt = 346
|
||||
right_super = 347
|
||||
menu = 348
|
||||
}
|
||||
|
||||
// TouchToolType is an Android specific 'tool type' enum for touch events.
|
||||
|
|
|
@ -2,11 +2,11 @@ module sgl
|
|||
|
||||
// SglError is C.sgl_error_t
|
||||
pub enum SglError {
|
||||
no_error = C.SGL_NO_ERROR // 0
|
||||
vertices_full = C.SGL_ERROR_VERTICES_FULL
|
||||
uniforms_full = C.SGL_ERROR_UNIFORMS_FULL
|
||||
commands_full = C.SGL_ERROR_COMMANDS_FULL
|
||||
stack_overflow = C.SGL_ERROR_STACK_OVERFLOW
|
||||
no_error = C.SGL_NO_ERROR // 0
|
||||
vertices_full = C.SGL_ERROR_VERTICES_FULL
|
||||
uniforms_full = C.SGL_ERROR_UNIFORMS_FULL
|
||||
commands_full = C.SGL_ERROR_COMMANDS_FULL
|
||||
stack_overflow = C.SGL_ERROR_STACK_OVERFLOW
|
||||
stack_underfloat = C.SGL_ERROR_STACK_UNDERFLOW
|
||||
no_context = C.SGL_ERROR_NO_CONTEXT
|
||||
no_context = C.SGL_ERROR_NO_CONTEXT
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ This file contains the printf/sprintf functions
|
|||
import strings
|
||||
|
||||
pub enum Align_text {
|
||||
right = 0
|
||||
right = 0
|
||||
left
|
||||
center
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ const (
|
|||
)
|
||||
|
||||
enum BufferElemStat {
|
||||
unused = 0
|
||||
unused = 0
|
||||
writing
|
||||
written
|
||||
reading
|
||||
|
|
|
@ -57,11 +57,11 @@ fn cb_zip_extract(filename &&char, arg &&char) int {
|
|||
|
||||
// CompressionLevel lists compression levels, see in "thirdparty/zip/miniz.h"
|
||||
pub enum CompressionLevel {
|
||||
no_compression = 0
|
||||
best_speed = 1
|
||||
best_compression = 9
|
||||
uber_compression = 10
|
||||
default_level = 6
|
||||
no_compression = 0
|
||||
best_speed = 1
|
||||
best_compression = 9
|
||||
uber_compression = 10
|
||||
default_level = 6
|
||||
default_compression = -1
|
||||
}
|
||||
|
||||
|
|
|
@ -6,114 +6,114 @@ module ui
|
|||
import os
|
||||
|
||||
pub enum KeyCode {
|
||||
null = 0
|
||||
tab = 9
|
||||
enter = 10
|
||||
escape = 27
|
||||
space = 32
|
||||
backspace = 127
|
||||
exclamation = 33
|
||||
double_quote = 34
|
||||
hashtag = 35
|
||||
dollar = 36
|
||||
percent = 37
|
||||
ampersand = 38
|
||||
single_quote = 39
|
||||
left_paren = 40
|
||||
right_paren = 41
|
||||
asterisk = 42
|
||||
plus = 43
|
||||
comma = 44
|
||||
minus = 45
|
||||
period = 46
|
||||
slash = 47
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
colon = 58
|
||||
semicolon = 59
|
||||
less_than = 60
|
||||
equal = 61
|
||||
greater_than = 62
|
||||
question_mark = 63
|
||||
at = 64
|
||||
a = 97
|
||||
b = 98
|
||||
c = 99
|
||||
d = 100
|
||||
e = 101
|
||||
f = 102
|
||||
g = 103
|
||||
h = 104
|
||||
i = 105
|
||||
j = 106
|
||||
k = 107
|
||||
l = 108
|
||||
m = 109
|
||||
n = 110
|
||||
o = 111
|
||||
p = 112
|
||||
q = 113
|
||||
r = 114
|
||||
s = 115
|
||||
t = 116
|
||||
u = 117
|
||||
v = 118
|
||||
w = 119
|
||||
x = 120
|
||||
y = 121
|
||||
z = 122
|
||||
left_square_bracket = 91
|
||||
backslash = 92
|
||||
null = 0
|
||||
tab = 9
|
||||
enter = 10
|
||||
escape = 27
|
||||
space = 32
|
||||
backspace = 127
|
||||
exclamation = 33
|
||||
double_quote = 34
|
||||
hashtag = 35
|
||||
dollar = 36
|
||||
percent = 37
|
||||
ampersand = 38
|
||||
single_quote = 39
|
||||
left_paren = 40
|
||||
right_paren = 41
|
||||
asterisk = 42
|
||||
plus = 43
|
||||
comma = 44
|
||||
minus = 45
|
||||
period = 46
|
||||
slash = 47
|
||||
_0 = 48
|
||||
_1 = 49
|
||||
_2 = 50
|
||||
_3 = 51
|
||||
_4 = 52
|
||||
_5 = 53
|
||||
_6 = 54
|
||||
_7 = 55
|
||||
_8 = 56
|
||||
_9 = 57
|
||||
colon = 58
|
||||
semicolon = 59
|
||||
less_than = 60
|
||||
equal = 61
|
||||
greater_than = 62
|
||||
question_mark = 63
|
||||
at = 64
|
||||
a = 97
|
||||
b = 98
|
||||
c = 99
|
||||
d = 100
|
||||
e = 101
|
||||
f = 102
|
||||
g = 103
|
||||
h = 104
|
||||
i = 105
|
||||
j = 106
|
||||
k = 107
|
||||
l = 108
|
||||
m = 109
|
||||
n = 110
|
||||
o = 111
|
||||
p = 112
|
||||
q = 113
|
||||
r = 114
|
||||
s = 115
|
||||
t = 116
|
||||
u = 117
|
||||
v = 118
|
||||
w = 119
|
||||
x = 120
|
||||
y = 121
|
||||
z = 122
|
||||
left_square_bracket = 91
|
||||
backslash = 92
|
||||
right_square_bracket = 93
|
||||
caret = 94
|
||||
underscore = 95
|
||||
backtick = 96
|
||||
left_curly_bracket = 123
|
||||
vertical_bar = 124
|
||||
right_curly_bracket = 125
|
||||
tilde = 126
|
||||
insert = 260
|
||||
delete = 261
|
||||
up = 262
|
||||
down = 263
|
||||
right = 264
|
||||
left = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
caret = 94
|
||||
underscore = 95
|
||||
backtick = 96
|
||||
left_curly_bracket = 123
|
||||
vertical_bar = 124
|
||||
right_curly_bracket = 125
|
||||
tilde = 126
|
||||
insert = 260
|
||||
delete = 261
|
||||
up = 262
|
||||
down = 263
|
||||
right = 264
|
||||
left = 265
|
||||
page_up = 266
|
||||
page_down = 267
|
||||
home = 268
|
||||
end = 269
|
||||
f1 = 290
|
||||
f2 = 291
|
||||
f3 = 292
|
||||
f4 = 293
|
||||
f5 = 294
|
||||
f6 = 295
|
||||
f7 = 296
|
||||
f8 = 297
|
||||
f9 = 298
|
||||
f10 = 299
|
||||
f11 = 300
|
||||
f12 = 301
|
||||
f13 = 302
|
||||
f14 = 303
|
||||
f15 = 304
|
||||
f16 = 305
|
||||
f17 = 306
|
||||
f18 = 307
|
||||
f19 = 308
|
||||
f20 = 309
|
||||
f21 = 310
|
||||
f22 = 311
|
||||
f23 = 312
|
||||
f24 = 313
|
||||
}
|
||||
|
||||
pub enum Direction {
|
||||
|
|
|
@ -876,7 +876,7 @@ pub fn (mut f Fmt) comptime_for(node ast.ComptimeFor) {
|
|||
f.writeln('}')
|
||||
}
|
||||
|
||||
struct ConstAlignInfo {
|
||||
struct ValAlignInfo {
|
||||
mut:
|
||||
max int
|
||||
last_idx int
|
||||
|
@ -896,10 +896,10 @@ pub fn (mut f Fmt) const_decl(node ast.ConstDecl) {
|
|||
f.inside_const = false
|
||||
}
|
||||
f.write('const ')
|
||||
mut align_infos := []ConstAlignInfo{}
|
||||
mut align_infos := []ValAlignInfo{}
|
||||
if node.is_block {
|
||||
f.writeln('(')
|
||||
mut info := ConstAlignInfo{}
|
||||
mut info := ValAlignInfo{}
|
||||
for i, field in node.fields {
|
||||
if field.name.len > info.max {
|
||||
info.max = field.name.len
|
||||
|
@ -907,14 +907,14 @@ pub fn (mut f Fmt) const_decl(node ast.ConstDecl) {
|
|||
if !expr_is_single_line(field.expr) {
|
||||
info.last_idx = i
|
||||
align_infos << info
|
||||
info = ConstAlignInfo{}
|
||||
info = ValAlignInfo{}
|
||||
}
|
||||
}
|
||||
info.last_idx = node.fields.len
|
||||
align_infos << info
|
||||
f.indent++
|
||||
} else {
|
||||
align_infos << ConstAlignInfo{0, 1}
|
||||
align_infos << ValAlignInfo{0, 1}
|
||||
}
|
||||
mut prev_field := if node.fields.len > 0 {
|
||||
ast.Node(node.fields[0])
|
||||
|
@ -1002,9 +1002,29 @@ pub fn (mut f Fmt) enum_decl(node ast.EnumDecl) {
|
|||
}
|
||||
f.writeln('enum ${name} {')
|
||||
f.comments(node.comments, same_line: true, level: .indent)
|
||||
for field in node.fields {
|
||||
mut align_infos := []ValAlignInfo{}
|
||||
mut info := ValAlignInfo{}
|
||||
for i, field in node.fields {
|
||||
if field.name.len > info.max {
|
||||
info.max = field.name.len
|
||||
}
|
||||
if !expr_is_single_line(field.expr) {
|
||||
info.last_idx = i
|
||||
align_infos << info
|
||||
info = ValAlignInfo{}
|
||||
}
|
||||
}
|
||||
info.last_idx = node.fields.len
|
||||
align_infos << info
|
||||
|
||||
mut align_idx := 0
|
||||
for i, field in node.fields {
|
||||
if i > align_infos[align_idx].last_idx {
|
||||
align_idx++
|
||||
}
|
||||
f.write('\t${field.name}')
|
||||
if field.has_expr {
|
||||
f.write(strings.repeat(` `, align_infos[align_idx].max - field.name.len))
|
||||
f.write(' = ')
|
||||
f.expr(field.expr)
|
||||
}
|
||||
|
|
|
@ -27,6 +27,6 @@ struct User {
|
|||
|
||||
[_allow_multiple_values]
|
||||
enum Example {
|
||||
value1 = 1
|
||||
value1 = 1
|
||||
value1_again = 1
|
||||
}
|
||||
|
|
|
@ -63,17 +63,17 @@ enum Amd64SSERegister {
|
|||
}
|
||||
|
||||
enum Amd64SetOp {
|
||||
e = 0x940f
|
||||
e = 0x940f
|
||||
ne = 0x950f
|
||||
g = 0x9f0f
|
||||
g = 0x9f0f
|
||||
ge = 0x9d0f
|
||||
l = 0x9c0f
|
||||
l = 0x9c0f
|
||||
le = 0x9e0f
|
||||
a = 0x970f
|
||||
a = 0x970f
|
||||
ae = 0x930f
|
||||
b = 0x920f
|
||||
b = 0x920f
|
||||
be = 0x960f
|
||||
p = 0x9a0f
|
||||
p = 0x9a0f
|
||||
np = 0x9b0f
|
||||
}
|
||||
|
||||
|
|
|
@ -72,21 +72,21 @@ const (
|
|||
)
|
||||
|
||||
enum PeMachine as u16 {
|
||||
i386 = 0x014c
|
||||
i386 = 0x014c
|
||||
amd64 = 0x8664
|
||||
arm64 = 0xaa64
|
||||
}
|
||||
|
||||
enum PeMagic as u16 {
|
||||
mz = 0x5a4d // dos(mz)-header magic number
|
||||
pe = 0x4550 // pe-header magic number
|
||||
pe32 = 0x010b // PE32 optional header magic number
|
||||
mz = 0x5a4d // dos(mz)-header magic number
|
||||
pe = 0x4550 // pe-header magic number
|
||||
pe32 = 0x010b // PE32 optional header magic number
|
||||
pe32plus = 0x020b // PE32+ optional header magic number
|
||||
}
|
||||
|
||||
// reference: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN#windows-subsystem
|
||||
enum PeSubsystem as u16 {
|
||||
unknown = 0
|
||||
unknown = 0
|
||||
native
|
||||
windows_gui
|
||||
windows_cui
|
||||
|
@ -104,16 +104,16 @@ enum PeSubsystem as u16 {
|
|||
|
||||
// reference: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN#dll-characteristics
|
||||
enum DllCharacteristics as u16 {
|
||||
high_entropy_va = 0x0020
|
||||
dynamic_base = 0x0040
|
||||
force_integrity = 0x0080
|
||||
nx_compat = 0x0100
|
||||
no_isolation = 0x0200
|
||||
no_seh = 0x0400
|
||||
no_bind = 0x0800
|
||||
appcontainer = 0x1000
|
||||
wdm_driver = 0x2000
|
||||
guard_cf = 0x4000
|
||||
high_entropy_va = 0x0020
|
||||
dynamic_base = 0x0040
|
||||
force_integrity = 0x0080
|
||||
nx_compat = 0x0100
|
||||
no_isolation = 0x0200
|
||||
no_seh = 0x0400
|
||||
no_bind = 0x0800
|
||||
appcontainer = 0x1000
|
||||
wdm_driver = 0x2000
|
||||
guard_cf = 0x4000
|
||||
terminal_server_aware = 0x8000
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
enum Foo {
|
||||
zero
|
||||
first = 1
|
||||
third = 3
|
||||
first = 1
|
||||
third = 3
|
||||
fourth
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// see: https://discordapp.com/channels/592103645835821068/592114487759470596/762270244566728704
|
||||
enum WireType {
|
||||
varint = 0
|
||||
_64bit = 1
|
||||
varint = 0
|
||||
_64bit = 1
|
||||
length_prefixed = 2
|
||||
_32bit = 5
|
||||
_32bit = 5
|
||||
}
|
||||
|
||||
fn pack_wire_type(w WireType) u8 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
enum Color {
|
||||
red = 1 + 1 [json: 'Red']
|
||||
red = 1 + 1 [json: 'Red']
|
||||
blue = 10 / 2 [json: 'Blue']
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
enum MyEnum {
|
||||
first = 20
|
||||
first = 20
|
||||
second
|
||||
third
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ enum Color1 {
|
|||
enum Color2 as i64 {
|
||||
unknown
|
||||
red
|
||||
blue = 123456789012345
|
||||
blue = 123456789012345
|
||||
green
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ fn test_enum() {
|
|||
|
||||
enum PowerDuration {
|
||||
invulntics = 30 * 35
|
||||
invistics = 60 * 35
|
||||
infratics = 120 * 35
|
||||
invistics = 60 * 35
|
||||
infratics = 120 * 35
|
||||
}
|
||||
|
||||
fn test_custom_values() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module builtin
|
||||
|
||||
pub enum BTest_enum {
|
||||
v0 = 0
|
||||
v0 = 0
|
||||
v1
|
||||
v2
|
||||
v3
|
||||
|
|
|
@ -41,17 +41,17 @@ pub enum NumType as u8 {
|
|||
}
|
||||
|
||||
pub enum ValType as u8 {
|
||||
i32_t = 0x7f
|
||||
i64_t = 0x7e
|
||||
f32_t = 0x7d
|
||||
f64_t = 0x7c
|
||||
v128_t = 0x7b
|
||||
funcref_t = 0x70
|
||||
i32_t = 0x7f
|
||||
i64_t = 0x7e
|
||||
f32_t = 0x7d
|
||||
f64_t = 0x7c
|
||||
v128_t = 0x7b
|
||||
funcref_t = 0x70
|
||||
externref_t = 0x6f
|
||||
}
|
||||
|
||||
pub enum RefType as u8 {
|
||||
funcref_t = 0x70
|
||||
funcref_t = 0x70
|
||||
externref_t = 0x6f
|
||||
}
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ enum TokenKind {
|
|||
eof
|
||||
comma = 44 // ,
|
||||
colon = 58 // :
|
||||
lsbr = 91 // [
|
||||
rsbr = 93 // ]
|
||||
lcbr = 123 // {
|
||||
rcbr = 125 // }
|
||||
lsbr = 91 // [
|
||||
rsbr = 93 // ]
|
||||
lcbr = 123 // {
|
||||
rcbr = 125 // }
|
||||
}
|
||||
|
||||
pub struct Token {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue