Skip to content

hal: Update halcmd to use the HAL query API and remove linkpp - #4269

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_halcmd-update
Jul 27, 2026
Merged

hal: Update halcmd to use the HAL query API and remove linkpp#4269
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_halcmd-update

Conversation

@BsAtHome

Copy link
Copy Markdown
Contributor

This PR updates halcmd to use the HAL query API instead of hooking directly into HAL's private data structures. This update also touches the Tcl side (while building tcl/hal.so), which uses the same source files as halcmd.

Several functions in halcmd had their char * arguments changed to const char *. Also, some static buffers used with snprintf have been removed and replaced with std::string and fmt::format.

Interactive halcmd is supposed to use readline. However, this has been non-functional ever since the library got changed from libreadline into libedit. The changed define was not taken into account. This has been fixed and both interactive history and tab-completion work again. There are still problems in interactive mode, like exiting if a command fails instead of returning to the interactive prompt. That must be sorted out later.

There is no functional change, except a very small one in the halcmd save command. There was a trailing space when saving components. This space has been removed and the test (tests/save.0) has been updated.

This PR also removes the linkpp command, as discussed and fixes #4265.

Comment thread src/hal/utils/halcmd_commands.cc Outdated
Comment thread src/hal/utils/halcmd_commands.cc
Comment thread src/hal/utils/halcmd_commands.cc Outdated
Comment thread src/hal/utils/halcmd_commands.cc Outdated
@BsAtHome
BsAtHome force-pushed the halgs_halcmd-update branch from 5f25407 to 539ff1a Compare July 27, 2026 09:51
@BsAtHome

Copy link
Copy Markdown
Contributor Author

@grandixximo Pushed the update. Have a look.

@grandixximo

Copy link
Copy Markdown
Contributor

lgtm

@grandixximo
grandixximo merged commit 6a2013d into LinuxCNC:master Jul 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: Remove linkpp from halcmd

2 participants