Skip to content

Conversation

@smoe
Copy link
Collaborator

@smoe smoe commented Feb 1, 2026

Let's see how this goes.

smoe and others added 9 commits January 31, 2026 22:29
Currently translated at 99.6% (33874 of 33994 strings)
Author: Steffen Möller <steffen_moeller@gmx.de>

Co-authored-by: Steffen Möller <steffen_moeller@gmx.de>
Translate-URL: https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/de/
Translation: LinuxCNC/LinuxCNC Documentation
Currently translated at 1.5% (542 of 33994 strings)
Author: Temuri Doghonadze <temuri.doghonadze@gmail.com>

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/ka/
Translation: LinuxCNC/LinuxCNC Documentation
Currently translated at 1.3% (450 of 33994 strings)
Author: Tron Lee <472734894@qq.com>

Co-authored-by: Tron Lee <472734894@qq.com>
Translate-URL: https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/zh_Hans/
Translation: LinuxCNC/LinuxCNC Documentation
Currently translated at 22.5% (7668 of 33994 strings)
Author: Salvador Peña <salvadorp74@hotmail.com>

Translated using Weblate (Spanish)

Currently translated at 22.4% (7625 of 33994 strings)
Author: Salvador Peña <salvadorp74@hotmail.com>

Co-authored-by: Salvador Peña <salvadorp74@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/es/
Translation: LinuxCNC/LinuxCNC Documentation
Currently translated at 22.4% (7625 of 33994 strings)
Author: Salvador Peña <salvadorp74@hotmail.com>

Co-authored-by: Salvador Peña <salvadorp74@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/es/
Translation: LinuxCNC/LinuxCNC Documentation
IniFile::Find() used a static buffer to return results, causing bugs
when multiple Find() calls were made before using the first result.

Change Find() to return std::optional<std::string> instead of
std::optional<const char*>. Each caller now owns their result copy.

Core changes:
- Remove static buffer from Find(), return std::string by value
- Update all callers to use s->c_str() where const char* is needed
- Use string methods (.empty(), .length(), ==) instead of C functions

C API compatibility maintained via static storage in iniFind() wrapper.

No functional changes - all updates are behavior-preserving.
Follow-up to the C++ IniFile::Find() reentrancy fix. The previous
commit changed Find() to return std::string by value, but the C API
wrapper iniFind() still used static storage, making it non-reentrant.

Add iniFindString() that takes a caller-provided buffer, making it
safe for concurrent use and multiple sequential calls. Reimplement
iniFind() as a deprecated wrapper around iniFindString().

Migrate all C callers to iniFindString():
- mb2hal: 11 call sites
- vfdb_vfd: 2 call sites
- vfs11_vfd: 4 call sites
- halcmd: 2 call sites

Also clean up dead commented-out code in mb2hal and halrmt.
@smoe
Copy link
Collaborator Author

smoe commented Feb 2, 2026

Resolved conflict (it is only the date in the es.po file), but somehow these commits that appear redundant appeared. Don't merge, yet.

@smoe smoe marked this pull request as draft February 2, 2026 00:21
@smoe smoe marked this pull request as ready for review February 2, 2026 00:27
@smoe
Copy link
Collaborator Author

smoe commented Feb 2, 2026

Tried again - same thing - will investigate tomorrow again. Expecting no harm from merging this PR. Weblate could not update its repository for a while, which may have caused what looks weird to me.

@smoe smoe merged commit e98464e into LinuxCNC:master Feb 2, 2026
14 checks passed
@smoe smoe deleted the weblate_changes_merged branch February 2, 2026 00:49
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.

6 participants