Mercurial > hg > batmud > ggrtf
annotate ggrtf-pre.tf @ 1655:356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Sep 2021 02:24:25 +0300 |
parents | 87f45da5abd1 |
children |
rev | line source |
---|---|
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ;; |
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 ;; GgrTF::PreInit - Module for loading saved settings and pre-initialization |
1655
356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
3 ;; (C) Copyright 2006-2015 Matti Hamalainen (Ggr) |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 ;; |
1454
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
6 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
7 ;; This program is free software; you can redistribute it and/or |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
8 ;; modify it under the terms of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
9 ;; version 2 as published by the Free Software Foundation. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
10 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
11 ;; This program is distributed in the hope that it will be useful, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
14 ;; file "COPYING.txt" for more details. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
15 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
16 ;; You should have received a copy of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
17 ;; along with this program; if not, write to the Free Software |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
19 ;; MA 02110-1301 USA. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
20 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1287
diff
changeset
|
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 ;; |
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 ;; This file should be loaded BEFORE loading of ggrtf.tf or modules. |
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 ;; |
336
f56c6dd17964
v0.5.10.4: Added /loaded to each module; Few more small namespace cleanups done;
Matti Hamalainen <ccr@tnsp.org>
parents:
333
diff
changeset
|
25 /loaded GgrTF:PreInit |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 |
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 /def -i gloadpreinit =\ |
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 /let _spreinit=%{set_datapath}%{set_saveprefix}pre.tf%;\ |
336
f56c6dd17964
v0.5.10.4: Added /loaded to each module; Few more small namespace cleanups done;
Matti Hamalainen <ccr@tnsp.org>
parents:
333
diff
changeset
|
29 /echo -p @{BCgreen}Loading pre-init settings from@{n} '@{Cyellow}%{_spreinit}@{n}'%;\ |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 /load -q %{_spreinit}%;\ |
336
f56c6dd17964
v0.5.10.4: Added /loaded to each module; Few more small namespace cleanups done;
Matti Hamalainen <ccr@tnsp.org>
parents:
333
diff
changeset
|
31 /echo -p @{BCgreen}Done.@{n}%;\ |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 |
1265
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
33 |
327
521d0c3233bd
v0.5.10.0: Major cleanup of namespace, many functions and variables renamed
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 /gloadpreinit |
1265
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
35 |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
36 ;; Filter out liting/attribute options |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
37 /def -i gfilterlites =\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
38 /let _new=%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
39 /while ({#})\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
40 /if (!regmatch("^(-aBC|-aC|-P|-ab)",{1}))\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
41 /let _new=%{_new} %{1}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
42 /endif%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
43 /shift%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
44 /done%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
45 /result _new |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
46 |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
47 ;; Magic happens here |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
48 /def -i gdef =\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
49 /if (opt_lites!~"on")\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
50 /split %{*}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
51 /let _opts=%{P1}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
52 /let _body=%{P2}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
53 /let _nopts=$(/gfilterlites %{_opts})%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
54 /def %{_nopts} = %{_body}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
55 /else \ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
56 /def %{*}%;\ |
d1d7c9ecd971
Add functionality for disabling certain hardcoded lites.
Matti Hamalainen <ccr@tnsp.org>
parents:
703
diff
changeset
|
57 /endif |
1270
30ec8596fb2d
Add new utility macro /glite for defining optionally enabled "plain" lites with no other functionality.
Matti Hamalainen <ccr@tnsp.org>
parents:
1265
diff
changeset
|
58 |
30ec8596fb2d
Add new utility macro /glite for defining optionally enabled "plain" lites with no other functionality.
Matti Hamalainen <ccr@tnsp.org>
parents:
1265
diff
changeset
|
59 ;; Macro for defining plain lites (with no functionality) |
30ec8596fb2d
Add new utility macro /glite for defining optionally enabled "plain" lites with no other functionality.
Matti Hamalainen <ccr@tnsp.org>
parents:
1265
diff
changeset
|
60 /def -i glite =\ |
1278
bb8fc935ddf4
Oops, /glite macros were not on when they should have been. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
61 /if (opt_lites!~"on")\ |
bb8fc935ddf4
Oops, /glite macros were not on when they should have been. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
62 /else \ |
1270
30ec8596fb2d
Add new utility macro /glite for defining optionally enabled "plain" lites with no other functionality.
Matti Hamalainen <ccr@tnsp.org>
parents:
1265
diff
changeset
|
63 /def -i -F -p1 %{*}%;\ |
30ec8596fb2d
Add new utility macro /glite for defining optionally enabled "plain" lites with no other functionality.
Matti Hamalainen <ccr@tnsp.org>
parents:
1265
diff
changeset
|
64 /endif |