2022 day 18 fix POSIX
[aoc_eblake.git] / 2019 / day9.m4
blobd2ff5ad0868b7649328fa109b30b434739a56d35
1 divert(-1)dnl -*- m4 -*-
2 # Usage: m4 [-Dfile=day9.input] day9.m4
4 include(`intcode.m4')ifelse(intcode(9), `ok', `',
5 `errprint(`Missing IntCode initialization
6 ')m4exit(1)')
8 parse(input)
9 define(`try', `
10   save()
11   define(`read', $1)
12   define(`write', `define(part$1, $'`1)')
13   run(0)
14   restore()')
15 try(1)
16 try(2)
17 divert`'part1
18 part2