1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#!./sciteco-minimal -m
! ./symbols-extract.tes <input file> <output file> <prefix pattern list> <array name> !
! <pos1,pos2>Mc - Compare string at pos1 with string at pos2 !
@^Uc{
U.2U.1 -.%.1^[ -.%.2^[
<Q.1A-(Q.2A)U.c Q.1A"C|Q.2A"C|;'' Q.c"N;' %.1^[%.2>
Q.c
}
! <i,j>Mx - Exchange line at I with line at J (I < J), returning new J !
@^Ux{
U.jU.i
Q.jJ X.xK
Q.iJ G.x .-Q.i%.j^[ .-(X.xL.)%.j^[ -K
Q.jJ G.x
Q.j
}
! <i,j>Mq - Sort lines beginning at I until J using Quicksort algorithm !
@^Uq{
U.rU.l
Q.l-Q.r"<
Q.lU.i Q.rJB .U.j
<
Q.iJ <.,Q.rMc-1; .-Q.r; L> .U.i
Q.jJ <.,Q.rMc:; .-Q.l-1:; B> .U.j
Q.i-Q.j;
Q.i,Q.jMxU.j
>
Q.i,Q.rMc"> Q.i,Q.rMxU.r '
Q.l-Q.i"< Q.iJB Q.l,.Mq '
Q.i-Q.r"< Q.iJL .,Q.rMq '
'
}
! read commandline arguments !
LR 0Xi 2LR 0Xo 2LR 0Xp 2LR 0Xn HK
! copy all defines in input file beginning with prefix !
EBQi <S#defineS[Qp]; -SS :Xa> EF
! sort all defines !
Ga ZJB 0,.Mq J
! format as C/C++ array !
I/*
* AUTOGENERATED - DO NOT EDIT
*/
#include <glib.h>
#include "Qi"
#include "symbols.h"
static const SymbolList::Entry entries[] = {
<
.,W.Xa 0KK
I#ifdef Qa
{"Qa", ^EQa},
#endif
.-Z;>
I};
__attribute__((constructor(2000)))
static void
initialize(void)
{
Symbols::Qn.entries = entries;
Symbols::Qn.size = G_N_ELEMENTS(entries);
}
! write output file !
EWQo
EX
|