5 PREFIX
= 'EGL_ENTRYPOINT('
9 parser
= argparse
.ArgumentParser()
10 parser
.add_argument('header')
11 args
= parser
.parse_args()
13 with
open(args
.header
) as header
:
14 lines
= header
.readlines()
19 if line
.startswith(PREFIX
):
20 assert line
.endswith(SUFFIX
)
21 entrypoints
.append(line
[len(PREFIX
):-len(SUFFIX
)])
23 print('Checking EGL API entrypoints are sorted')
25 for i
, _
in enumerate(entrypoints
):
26 # Can't compare the first one with the previous
29 if entrypoints
[i
- 1] > entrypoints
[i
]:
30 print('ERROR: ' + entrypoints
[i
] + ' should come before ' + entrypoints
[i
- 1])
35 if __name__
== '__main__':