Skip to content

Commit 55ca8d8

Browse files
authored
fmt: align the custom values of the enum fields (#19331)
1 parent c98e00c commit 55ca8d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1342
-1322
lines changed

examples/viewer/file_scan.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ import os
2727
*
2828
******************************************************************************/
2929
enum Item_type {
30-
file = 0
30+
file = 0
3131
folder
3232
// archive format
33-
zip = 16
33+
zip = 16
3434
archive_file
3535
// graphic format, MUST stay after the other types!!
36-
bmp = 32
36+
bmp = 32
3737
jpg
3838
png
3939
gif

vlib/builtin/linux_bare/linux_syscalls.v

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
11
module builtin
22

33
enum SigIndex {
4-
si_signo = 0x00
5-
si_code = 0x02
6-
si_pid = 0x04
7-
si_uid = 0x05
4+
si_signo = 0x00
5+
si_code = 0x02
6+
si_pid = 0x04
7+
si_uid = 0x05
88
si_status = 0x06
9-
si_size = 0x80
9+
si_size = 0x80
1010
}
1111

1212
enum Signo {
13-
sighup = 1 // Hangup.
14-
sigint = 2 // Interactive attention signal.
15-
sigquit = 3 // Quit.
16-
sigill = 4 // Illegal instruction.
17-
sigtrap = 5 // Trace/breakpoint trap.
18-
sigabrt = 6 // Abnormal termination.
19-
sigbus = 7
20-
sigfpe = 8 // Erroneous arithmetic operation.
21-
sigkill = 9 // Killed.
22-
sigusr1 = 10
23-
sigsegv = 11 // Invalid access to memory.
24-
sigusr2 = 12
25-
sigpipe = 13 // Broken pipe.
26-
sigalrm = 14 // Alarm clock.
27-
sigterm = 15 // Termination request.
13+
sighup = 1 // Hangup.
14+
sigint = 2 // Interactive attention signal.
15+
sigquit = 3 // Quit.
16+
sigill = 4 // Illegal instruction.
17+
sigtrap = 5 // Trace/breakpoint trap.
18+
sigabrt = 6 // Abnormal termination.
19+
sigbus = 7
20+
sigfpe = 8 // Erroneous arithmetic operation.
21+
sigkill = 9 // Killed.
22+
sigusr1 = 10
23+
sigsegv = 11 // Invalid access to memory.
24+
sigusr2 = 12
25+
sigpipe = 13 // Broken pipe.
26+
sigalrm = 14 // Alarm clock.
27+
sigterm = 15 // Termination request.
2828
sigstkflt = 16
29-
sigchld = 17
30-
sigcont = 18
31-
sigstop = 19
32-
sigtstp = 20
33-
sigttin = 21 // Background read from control terminal.
34-
sigttou = 22 // Background write to control terminal.
35-
sigurg = 23
36-
sigxcpu = 24 // CPU time limit exceeded.
37-
sigxfsz = 25 // File size limit exceeded.
29+
sigchld = 17
30+
sigcont = 18
31+
sigstop = 19
32+
sigtstp = 20
33+
sigttin = 21 // Background read from control terminal.
34+
sigttou = 22 // Background write to control terminal.
35+
sigurg = 23
36+
sigxcpu = 24 // CPU time limit exceeded.
37+
sigxfsz = 25 // File size limit exceeded.
3838
sigvtalrm = 26 // Virtual timer expired.
39-
sigprof = 27 // Profiling timer expired.
40-
sigwinch = 28
41-
sigpoll = 29
42-
sigsys = 31
39+
sigprof = 27 // Profiling timer expired.
40+
sigwinch = 28
41+
sigpoll = 29
42+
sigsys = 31
4343
}
4444

4545
// List of all the errors returned by syscalls
4646
enum Errno {
4747
enoerror = 0x00000000
48-
eperm = 0x00000001
49-
enoent = 0x00000002
50-
esrch = 0x00000003
51-
eintr = 0x00000004
52-
eio = 0x00000005
53-
enxio = 0x00000006
54-
e2big = 0x00000007
55-
enoexec = 0x00000008
56-
ebadf = 0x00000009
57-
echild = 0x0000000a
58-
eagain = 0x0000000b
59-
enomem = 0x0000000c
60-
eacces = 0x0000000d
61-
efault = 0x0000000e
62-
enotblk = 0x0000000f
63-
ebusy = 0x00000010
64-
eexist = 0x00000011
65-
exdev = 0x00000012
66-
enodev = 0x00000013
67-
enotdir = 0x00000014
68-
eisdir = 0x00000015
69-
einval = 0x00000016
70-
enfile = 0x00000017
71-
emfile = 0x00000018
72-
enotty = 0x00000019
73-
etxtbsy = 0x0000001a
74-
efbig = 0x0000001b
75-
enospc = 0x0000001c
76-
espipe = 0x0000001d
77-
erofs = 0x0000001e
78-
emlink = 0x0000001f
79-
epipe = 0x00000020
80-
edom = 0x00000021
81-
erange = 0x00000022
48+
eperm = 0x00000001
49+
enoent = 0x00000002
50+
esrch = 0x00000003
51+
eintr = 0x00000004
52+
eio = 0x00000005
53+
enxio = 0x00000006
54+
e2big = 0x00000007
55+
enoexec = 0x00000008
56+
ebadf = 0x00000009
57+
echild = 0x0000000a
58+
eagain = 0x0000000b
59+
enomem = 0x0000000c
60+
eacces = 0x0000000d
61+
efault = 0x0000000e
62+
enotblk = 0x0000000f
63+
ebusy = 0x00000010
64+
eexist = 0x00000011
65+
exdev = 0x00000012
66+
enodev = 0x00000013
67+
enotdir = 0x00000014
68+
eisdir = 0x00000015
69+
einval = 0x00000016
70+
enfile = 0x00000017
71+
emfile = 0x00000018
72+
enotty = 0x00000019
73+
etxtbsy = 0x0000001a
74+
efbig = 0x0000001b
75+
enospc = 0x0000001c
76+
espipe = 0x0000001d
77+
erofs = 0x0000001e
78+
emlink = 0x0000001f
79+
epipe = 0x00000020
80+
edom = 0x00000021
81+
erange = 0x00000022
8282
}
8383

8484
enum MemProt {
85-
prot_read = 0x1
86-
prot_write = 0x2
87-
prot_exec = 0x4
88-
prot_none = 0x0
85+
prot_read = 0x1
86+
prot_write = 0x2
87+
prot_exec = 0x4
88+
prot_none = 0x0
8989
prot_growsdown = 0x01000000
90-
prot_growsup = 0x02000000
90+
prot_growsup = 0x02000000
9191
}
9292

9393
enum MapFlags {
94-
map_shared = 0x01
95-
map_private = 0x02
94+
map_shared = 0x01
95+
map_private = 0x02
9696
map_shared_validate = 0x03
97-
map_type = 0x0f
98-
map_fixed = 0x10
99-
map_file = 0x00
100-
map_anonymous = 0x20
101-
map_huge_shift = 26
102-
map_huge_mask = 0x3f
97+
map_type = 0x0f
98+
map_fixed = 0x10
99+
map_file = 0x00
100+
map_anonymous = 0x20
101+
map_huge_shift = 26
102+
map_huge_mask = 0x3f
103103
}
104104

105105
// const (
@@ -208,17 +208,17 @@ const (
208208

209209
// First argument to waitid:
210210
enum WiWhich {
211-
p_all = 0
212-
p_pid = 1
211+
p_all = 0
212+
p_pid = 1
213213
p_pgid = 2
214214
}
215215

216216
enum WiSiCode {
217-
cld_exited = 1 // child has exited
218-
cld_killed = 2 // child was killed
219-
cld_dumped = 3 // child terminated abnormally
220-
cld_trapped = 4 // traced child has trapped
221-
cld_stopped = 5 // child has stopped
217+
cld_exited = 1 // child has exited
218+
cld_killed = 2 // child was killed
219+
cld_dumped = 3 // child terminated abnormally
220+
cld_trapped = 4 // traced child has trapped
221+
cld_stopped = 5 // child has stopped
222222
cld_continued = 6 // stopped child has continued
223223
}
224224

0 commit comments

Comments
 (0)