summaryrefslogtreecommitdiff
path: root/update-constants.py
blob: 2dcacdae71c404cb28af82ea290df0a0b767ceff (plain)
1
2
3
4
5
6
7
8
9
import sys

for file in sys.argv[1:]:
    lines = iter(open(file).read().splitlines())
    for line in lines:
        if line.startswith('#define SD_MESSAGE') and '_STR ' not in line:
            if line.endswith('\\'):
                line = line[:-1] + next(lines)
            print(' '.join(line.split()))