VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed@ 38510

最後變更 在這個檔案從38510是 18117,由 vboxsync 提交於 16 年 前

sed(1): make these locale independent by using [:alnum:] and friends.
See also #3743: “tstAsmStructsAsm-lst.sed locale sensitive”

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:keywords 設為 Id
檔案大小: 1012 位元組
 
1#
2# Strip stuff lines and spaces we don't care about.
3#
4/ %line /d
5/\[section /d
6/\[bits /d
7/\[absolute /d
8/ times /d
9s/ *[[:digit:]]* //
10/^ *$/d
11s/ *$//g
12s/^ *//g
13/^\.text$/d
14/^\.data$/d
15/^\.bss$/d
16
17#
18# Figure which type of line this is and process it accordingly.
19#
20/^[[:alpha:]_][[:alnum:]_]*:/b struct
21/<gap>/b member
22/^\.[[:alpha:]_][[:alnum:]_.:]* res.*$/b member_two
23b error
24b member_two
25
26
27#
28# Struct start / end.
29#
30:struct
31s/:$//
32h
33s/^/global /
34s/$/ ; struct/
35b end
36
37
38#
39# Struct member
40# Note: the 't' command doesn't seem to be working right with 's'.
41#
42:member
43s/[[:xdigit:]]* *//
44s/<gap> *//
45/^\.[[:alnum:]_.]*[:]* .*$/!t error
46s/\(\.[[:alnum:]_]*\)[:]* .*$/\1 /
47G
48s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
49s/\n//m
50
51b end
52
53
54#
55# Struct member, no address. yasm r1842 and later.
56#
57:member_two
58s/[:]* *res[bwdtq] .*$//
59s/$/ /
60/^\.[[:alnum:]_.]* *$/!t error
61G
62s/^\([^ ]*\) \(.*\)$/global \2\1 ; member2/
63s/\n//m
64
65b end
66
67
68:error
69s/^/\nSed script logic error!\nBuffer: /
70s/$/\nHold: /
71G
72q 1
73b end
74
75
76:end
77
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette