summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tile/pattern/global.m4.conf')
-rw-r--r--tile/pattern/global.m4.conf38
1 files changed, 38 insertions, 0 deletions
diff --git a/tile/pattern/global.m4.conf b/tile/pattern/global.m4.conf
new file mode 100644
index 0000000..724bfcc
--- /dev/null
+++ b/tile/pattern/global.m4.conf
@@ -0,0 +1,38 @@
+m4_define(
+ `__TILE_PATTERN_CHOOSE_STYLE',
+ `m4_define(
+ `__TILE_PATTERN',
+ m4_defn(`$1'))m4_dnl
+ m4_undefine(`$1')')m4_dnl
+m4_define(
+ `__TILE_PATTERN_NOT',
+ `{"c": "n"`,' "i": `$1'}')m4_dnl
+m4_define(
+ `__TILE_PATTERN_ANY',
+ `{"c": "n"`,' "i": -1}')m4_dnl
+m4_define(
+ `__TILE_PATTERN_JUST',
+ `{"c": "e"`,' "i": `$1'}')m4_dnl
+m4_define(
+ `__TILE_PATTERN_HEADER',
+ `m4_define(
+ `not',
+ m4_defn(`__TILE_PATTERN_NOT'))m4_dnl
+ m4_define(`TODO',`-1')m4_dnl
+ m4_define(
+ `any',
+ m4_defn(`__TILE_PATTERN_ANY'))m4_dnl
+ m4_define(
+ `just',
+ m4_defn(`__TILE_PATTERN_JUST'))m4_dnl')m4_dnl
+m4_define(`__TILE_PATTERN_JSON_STYLE',` {
+ "msg": "add_tile_pattern",
+ "s": `$5',
+ "t": `$10',
+ "p": [`$1', `$2', `$3', `$4', `$6', `$7', `$8', `$9']
+ },')m4_dnl
+m4_define(
+ `__TILE_PATTERN_FOOTER',
+ `m4_undefine(not)m4_undefine(`???')m4_undefine(any)m4_undefine(just)')m4_dnl
+m4_define(`__TILE_PATTERN_CATEGORY',`m4_define(`__TILE_PATTERN_CATEGORY_NAME', `$1')')m4_dnl
+m4_define(`__TILE_PATTERN_USE_JSON_STYLE',`__TILE_PATTERN_CHOOSE_STYLE(`__TILE_PATTERN_JSON_STYLE')')m4_dnl