helper/command: change prototype of command_print/command_print_sameline
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 3 Apr 2019 08:37:24 +0000 (10:37 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 14 May 2019 18:37:11 +0000 (19:37 +0100)
commit6cb5ba6f1136df2986850f5c176cb38e34ca1795
tree0cbc15e5119fe4d60760cd2cff7c13834c92942c
parent69165509386efffc2848ac3b345be750f1ddbe56
helper/command: change prototype of command_print/command_print_sameline

To prepare for handling TCL return values consistently, all calls
to command_print/command_print_sameline should switch to CMD as
first parameter.

Change prototype of command_print() and command_print_sameline()
to pass CMD instead of CMD_CTX.
Since the first parameter is currently not used, the change can be
done though scripts without manual coding.
This patch is created using the command:
sed -i PATTERN $(find src/ doc/ -type f)
with all the following patters:
's/\(command_print(cmd\)->ctx,/\1,/'
's/\(command_print(CMD\)_CTX,/\1,/'
's/\(command_print(struct command_\)context \*context,/\1invocation *cmd,/'
's/\(command_print_sameline(cmd\)->ctx,/\1,/'
's/\(command_print_sameline(CMD\)_CTX,/\1,/'
's/\(command_print_sameline(struct command_\)context \*context,/\1invocation *cmd,/'

This change is inspired by http://openocd.zylin.com/1815 from Paul
Fertser but is now done through scripting.

Change-Id: I3386d8f96cdc477e7a2308dd18269de3bed04385
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/5081
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
105 files changed:
doc/manual/primer/commands.txt
src/flash/mflash.c
src/flash/nand/at91sam9.c
src/flash/nand/core.c
src/flash/nand/fileio.c
src/flash/nand/lpc3180.c
src/flash/nand/lpc32xx.c
src/flash/nand/mxc.c
src/flash/nand/tcl.c
src/flash/nor/ambiqmicro.c
src/flash/nor/at91sam3.c
src/flash/nor/at91sam4.c
src/flash/nor/at91sam7.c
src/flash/nor/at91samd.c
src/flash/nor/atsame5.c
src/flash/nor/atsamv.c
src/flash/nor/avrf.c
src/flash/nor/efm32.c
src/flash/nor/em357.c
src/flash/nor/esirisc_flash.c
src/flash/nor/fm3.c
src/flash/nor/kinetis.c
src/flash/nor/lpc2000.c
src/flash/nor/lpc2900.c
src/flash/nor/max32xxx.c
src/flash/nor/niietcm4.c
src/flash/nor/numicro.c
src/flash/nor/pic32mx.c
src/flash/nor/psoc4.c
src/flash/nor/psoc5lp.c
src/flash/nor/stellaris.c
src/flash/nor/stm32f1x.c
src/flash/nor/stm32f2x.c
src/flash/nor/stm32h7x.c
src/flash/nor/stm32l4x.c
src/flash/nor/stm32lx.c
src/flash/nor/str9xpec.c
src/flash/nor/tcl.c
src/flash/nor/tms470.c
src/flash/nor/xmc4xxx.c
src/hello.c
src/helper/command.c
src/helper/command.h
src/helper/ioutil.c
src/helper/log.c
src/jtag/adapter.c
src/jtag/aice/aice_interface.c
src/jtag/aice/aice_transport.c
src/jtag/drivers/amt_jtagaccel.c
src/jtag/drivers/bcm2835gpio.c
src/jtag/drivers/ft232r.c
src/jtag/drivers/ftdi.c
src/jtag/drivers/gw16012.c
src/jtag/drivers/imx_gpio.c
src/jtag/drivers/jlink.c
src/jtag/drivers/opendous.c
src/jtag/drivers/parport.c
src/jtag/drivers/sysfsgpio.c
src/jtag/tcl.c
src/pld/pld.c
src/pld/virtex2.c
src/server/gdb_server.c
src/server/server.c
src/svf/svf.c
src/target/aarch64.c
src/target/arm720t.c
src/target/arm7_9_common.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm946e.c
src/target/arm966e.c
src/target/arm9tdmi.c
src/target/arm_adi_v5.c
src/target/arm_cti.c
src/target/armv4_5.c
src/target/armv4_5_cache.c
src/target/armv7a.c
src/target/armv7a_cache.c
src/target/armv7a_cache_l2x.c
src/target/armv8.c
src/target/armv8_cache.c
src/target/cortex_a.c
src/target/cortex_m.c
src/target/dsp563xx.c
src/target/esirisc.c
src/target/esirisc_trace.c
src/target/etb.c
src/target/etm.c
src/target/etm_dummy.c
src/target/mips32.c
src/target/mips_m4k.c
src/target/nds32_cmd.c
src/target/oocd_trace.c
src/target/openrisc/or1k.c
src/target/riscv/riscv.c
src/target/semihosting_common.c
src/target/smp.c
src/target/stm8.c
src/target/target.c
src/target/target_request.c
src/target/trace.c
src/target/x86_32_common.c
src/target/xscale.c
src/transport/transport.c
src/xsvf/xsvf.c