unicorn/qemu/scripts
Markus Armbruster e100831af9
qapi: Clean up cgen() and mcgen()
Commit 05dfb26 added eatspace stripping to mcgen(). Move it to
cgen(), just in case somebody gets tempted to use cgen() directly
instead of via mcgen().

cgen() indents blank lines. No such lines get generated right now,
but fix it anyway.

We use triple-quoted strings for program text, like this:

'''
Program text
any number of lines
'''

Keeps the program text relatively readable, but puts an extra newline
at either end. mcgen() "fixes" that by dropping the first and last
line outright. Drop only the newlines.

This unmasks a bug in qapi-commands.py: four quotes instead of three.
Fix it up.

Output doesn't change

Backports commit 77e703b861d34bb2879f3e845482d5cf0a3a0ad1 from qemu
2018-02-19 16:04:37 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh fix file perms 2015-08-28 21:05:38 -07:00
ordereddict.py import 2015-08-21 15:04:50 +08:00
qapi-event.py qapi: Factor open_output(), close_output() out of generators 2018-02-19 15:32:28 -05:00
qapi-types.py qom: Make enum string tables const-correct 2018-02-19 16:02:23 -05:00
qapi-visit.py qapi: Factor open_output(), close_output() out of generators 2018-02-19 15:32:28 -05:00
qapi.py qapi: Clean up cgen() and mcgen() 2018-02-19 16:04:37 -05:00