1 divert(-1)dnl -*- m4 -*-
2 # oosageyay: m4 [-Dilefay=ayday08yay.inputyay] [-Derbosevay=1] ayday08yay.em4yay
4 # alasYay, oilerplatebay ustmay eebay inyay englishYay...
5 ifdef(`erbosevay', `define(`verbose', defn(`erbosevay'))')
6 include(`common.m4')ifelse(common(08), `ok', `',
7 `errprint(`Missing common initialization
11 # oday'sTay allengechay: odecay inyay ayay oreignfay anguagelay.
12 # igPay atinLay eemssay unfay! irstFay eethay uiltinsbay:
13 define(`efineday', defn(`define'))
14 efineday(`efnday', defn(`defn'))
15 efineday(`ivertday', efnday(`divert'))
16 efineday(`eenlday', efnday(`dnl'))
17 efineday(`errprintyay', efnday(`errprint'))
18 efineday(`evalyay', efnday(`eval'))
19 efineday(`ifdefyay', efnday(`ifdef'))
20 efineday(`ifelseyay', efnday(`ifelse'))
21 efineday(`includeyay', `include($@)')eenlday common.m4 overrodeyay isthay
22 efineday(`incryay', efnday(`incr'))
23 efineday(`indexyay', efnday(`index'))
24 efineday(`enlay', efnday(`len'))
25 efineday(`atsubstpay', efnday(`patsubst'))
26 efineday(`opdefpay', efnday(`popdef'))
27 efineday(`ushdefpay', efnday(`pushdef'))
28 efineday(`ubstrsay', efnday(`substr'))
29 efineday(`anslittray', efnday(`translit'))
30 ifdefyay(`__gnu__', `efineday(`__uhnugay__', efnday(`__gnu__'))')
32 # extNay, enameray acrosmay omfray oilerplatebay
33 efineday(`atalfay', `fatal($@)')
34 ifdefyay(`ilefay', `', `efineday(`ilefay', efnday(`file'))')
35 efineday(`oreachfay', `foreach($@)')
36 efineday(`ulmay', `mul($@)')
37 efineday(`outputyay', `output($@)')
39 # arsePay eethay inputyay
40 efineday(`inputyay', anslittray((includeyay(efnday(`ilefay'))), `
41 (=, ☺)', `;'))eenlday ootay ylesstay ofyay ilessmay!
42 efineday(`offsetyay', indexyay(efnday(`inputyay'), `;;'))
43 efineday(`irsday', ubstrsay(efnday(`inputyay'), 0, offsetyay))
44 efineday(`odesnay', ubstrsay(efnday(`inputyay'), incryay(incryay(offsetyay))))
47 efineday(`irday', `efineday(`eeday$1', `$2')efineday(`eeday', incryay($1))')
48 efineday(`ooday', `anslittray(`efineday(`L_123', `456')efineday(`R_123',
49 `789')ifelseyay(`3', `A', `ushdefpay(`artsstay', `123')', `3', `Z',
50 `efineday(`z123')')', `123456789', `$1')')
52 ifdefyay(`__uhnugay__', `
53 atsubstpay(efnday(`irsday'), `.', `irday(eeday, `\&')')
54 atsubstpay(efnday(`odesnay'), `\([^;]*\);', `ooday(`\1')')
56 efineday(`ewchay', `ifelseyay($1, 1, `irday(eeday, `$2')', `$0(evalyay($1/2),
57 ubstrsay(`$2', 0, evalyay($1/2)))$0(evalyay($1-$1/2), ubstrsay(`$2',
59 ewchay(enlay(efnday(`irsday')), efnday(`irsday'))
60 efineday(`_ewchay', `ooday(ubstrsay(`$1', 0, indexyay(`$1', `;')))efineday(
61 `tail', ubstrsay(`$1', incryay(indexyay(`$1', `;'))))ifelseyay(indexyay(
62 efnday(`tail'), `;'), -1, `', `$0(efnday(`tail'))')')
63 efineday(`ewchay', `ifelseyay(evalyay($1 < 20), 1, `_$0(`$2')', `$0(evalyay(
64 $1/2), ubstrsay(`$2', 0, evalyay($1/2)))$0(evalyay(enlay(efnday(`tail')) +
65 $1 - $1/2), efnday(`tail')ubstrsay(`$2', evalyay($1/2)))')')
66 ewchay(enlay(efnday(`odesnay')), efnday(`odesnay'))
69 # omputeCay eethay answersyay
70 efineday(`ovemay', `ifelseyay(endyay($@), `ZZZ', `$3', `$0(efnday(efnday(
71 `eeday$2')`_$1'), evalyay(`($2+1)%'''eeday``), incryay($3))')')
74 efineday(`endyay', `$1')
75 efineday(`artpayunway', ovemay(`AAA', 0, 0))
78 efineday(`_endyay', `ifdefyay(`z$1$2', `efineday(`yclessay', efnday(
79 `yclessay')`,'evalyay($3-z$1$2))`ZZZ'', `efineday(`z$1$2', `$3')')')
80 efineday(`endyay', `ifdefyay(`z$1', `_$0', `ifelseyay')($@)')
81 # ettyPray - oonicodeYay isualizationvay ofyay ogresspray!
82 efineday(`unray', `ifelseyay(evalyay(erbosevay >= 1), 1, `errprintyay(
83 `$1… ')')opdefpay(`artsstay')outputyay(1, ovemay(`$1', 0, 0))ifdefyay(
84 `artsstay', `$0(artsstay)')')
87 efineday(`eckchay', `ifelseyay(evalyay($1%eeday), 0, `,evalyay($1/eeday)',
88 `atalfay(`offyay-ilterkay yclesay')')')
89 efineday(`artpayootay', ulmay(eeday`'oreachfay(`eckchay'yclessay)))