验证 Fanuc 子程序禁用

提示词:快速推进,非纯 source-map-only,保留源依据、自动测试、本地提交且不自动推送。

结论:基于 LinuxCNC rs274ngc_pre.cc 读取 DISABLE_FANUC_STYLE_SUB 以及 interp_read.cc 对 M98、Fanuc-style M99、bare O-word 的禁用分支,新增 INI/G-code fixture 并接入 native/source-link 错误断言;./test-native.sh 和 ./test-linuxcnc-source-link.sh 通过。
This commit is contained in:
cnc
2026-06-06 06:48:17 +08:00
parent 5aa328b413
commit 7ba3a22441
6 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
G21 G90
(Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc rejects bare O-word definitions when DISABLE_FANUC_STYLE_SUB is enabled.)
O100
M99
M30

View File

@@ -0,0 +1,6 @@
G21 G90
(Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc rejects M98 when DISABLE_FANUC_STYLE_SUB is enabled.)
M98 P100
M30
O100
M99

View File

@@ -0,0 +1,7 @@
G21 G90
(Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc rejects Fanuc-style M99 when DISABLE_FANUC_STYLE_SUB is enabled.)
O100 sub
M99
O100 endsub
O100 call
M30

View File

@@ -0,0 +1,2 @@
[RS274NGC]
DISABLE_FANUC_STYLE_SUB = 1