9 # extract enum definition
10 dispatch_list
=$
(sed '/__GLXdispatchIndex/,/__GLXdispatchIndex/!d' \
11 "$srcdir"/..
/g_glxglvnddispatchindices.h
)
13 # extract values inside of enum
14 dispatch_list
=$
(sed '1d;$d' <<< "$dispatch_list")
17 dispatch_list
=$
(sed 's/^\s\+//' <<< "$dispatch_list")
19 # extract function names
20 dispatch_list
=$
(sed 's/DI_//;s/,//' <<< "$dispatch_list")
22 # same for commented functions, we want to keep them sorted too
23 dispatch_list
=$
(sed 's#// ##;s/ implemented by [a-z]\+//' <<< "$dispatch_list")
25 # remove LAST_INDEX, as it will not be in alphabetical order
26 dispatch_list
=$
(sed '/LAST_INDEX/d' <<< "$dispatch_list")
28 sorted
=$
(LC_ALL
=C
sort <<< "$dispatch_list")
30 test "$dispatch_list" = "$sorted"