继续按提示词推进:收紧NML状态shim源码锚点
This commit is contained in:
@@ -48,8 +48,17 @@ grep -F 'int hal_get_signal_value_by_name(' "$linuxcnc_root/src/hal/hal_lib.c" >
|
||||
grep -F 'int hal_get_param_value_by_name(' "$linuxcnc_root/src/hal/hal_lib.c" >/dev/null
|
||||
grep -F 'wordexp(basename, &exp_result, 0);' "$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
|
||||
grep -F 'EMC_STAT *emcStatus = new EMC_STAT;' "$linuxcnc_root/src/emc/sai/dummyemcstat.cc" >/dev/null
|
||||
grep -F 'int NMLmsg::automatically_clear = 1;' \
|
||||
"$linuxcnc_root/src/libnml/nml/nmlmsg.cc" >/dev/null
|
||||
grep -F 'NMLmsg::NMLmsg' "$linuxcnc_root/src/libnml/nml/nmlmsg.cc" >/dev/null
|
||||
grep -F 'void NMLmsg::clear()' "$linuxcnc_root/src/libnml/nml/nmlmsg.cc" >/dev/null
|
||||
grep -F 'memset((void *) this, 0, size);' \
|
||||
"$linuxcnc_root/src/libnml/nml/nmlmsg.cc" >/dev/null
|
||||
grep -F 'RCS_STAT_MSG::RCS_STAT_MSG' "$linuxcnc_root/src/libnml/nml/stat_msg.cc" >/dev/null
|
||||
grep -F 'command_type = -1;' "$linuxcnc_root/src/libnml/nml/stat_msg.cc" >/dev/null
|
||||
grep -F 'echo_serial_number = -1;' "$linuxcnc_root/src/libnml/nml/stat_msg.cc" >/dev/null
|
||||
grep -F 'status = RCS_STATUS::UNINITIALIZED;' "$linuxcnc_root/src/libnml/nml/stat_msg.cc" >/dev/null
|
||||
grep -F '_state = -1;' "$linuxcnc_root/src/libnml/nml/stat_msg.cc" >/dev/null
|
||||
grep -F 'extern int set_print_rcs_error_info(const char *file, int line);' \
|
||||
"$linuxcnc_root/src/libnml/rcs/rcs_print.hh" >/dev/null
|
||||
grep -F 'extern int print_rcs_error_new(const char *_fmt, ...)' \
|
||||
@@ -176,6 +185,18 @@ for needle in [
|
||||
]:
|
||||
if needle not in gettext_shim:
|
||||
raise SystemExit(f"gettext shim missing diagnostic passthrough boundary: {needle}")
|
||||
nml_status_shim = Path("core/wasm_shims/nml_status_shim.cc").read_text(encoding="utf-8")
|
||||
for needle in [
|
||||
"int NMLmsg::automatically_clear = 1;",
|
||||
"void NMLmsg::clear()",
|
||||
"std::memset(static_cast<void *>(this), 0, static_cast<size_t>(size));",
|
||||
"command_type = -1;",
|
||||
"echo_serial_number = -1;",
|
||||
"status = RCS_STATUS::UNINITIALIZED;",
|
||||
"_state = -1;",
|
||||
]:
|
||||
if needle not in nml_status_shim:
|
||||
raise SystemExit(f"NML status shim missing LinuxCNC constructor boundary: {needle}")
|
||||
for needle in [
|
||||
'extern "C" int hal_get_pin_value_by_name',
|
||||
'extern "C" int hal_get_signal_value_by_name',
|
||||
@@ -261,6 +282,8 @@ for phrase in [
|
||||
"browser-safe LinuxCNC adaptations",
|
||||
"LinuxCNC `_()` diagnostic call sites",
|
||||
"browser gettext catalogs unavailable",
|
||||
"LinuxCNC NML status constructors",
|
||||
"`RCS_STAT_MSG` default status fields",
|
||||
"dynamic loading unavailable",
|
||||
"unavailable HAL lookup",
|
||||
"must leave HAL values unavailable",
|
||||
|
||||
@@ -18,7 +18,7 @@ only; it must not add CNC behavior and must not expand the temporary smoke parse
|
||||
| `core/wasm_shims/emc_status_shim.cc` | `src/emc/sai/dummyemcstat.cc` | Provides the source-backed `emcStatus` singleton shape without task/NML startup. |
|
||||
| `core/wasm_shims/gettext_shim.cc` | `src/emc/rs274ngc/interp_internal.hh` | Preserves LinuxCNC `_()` diagnostic call sites by satisfying `gettext()` while leaving browser gettext catalogs unavailable. |
|
||||
| `core/wasm_shims/linuxcnc_runtime_shim.cc` | `src/emc/rs274ngc/gcodemodule.cc`, `src/emc/task/emctaskmain.cc`, `src/emc/task/taskclass.cc`, `src/emc/rs274ngc/interp_namedparams.cc`, `include/hal.h`, `src/hal/hal_lib.c`, `src/emc/rs274ngc/rs274ngc_pre.cc` | Keeps preview/task, builtin Python module, unavailable HAL lookup, and `wordexp()` edges compile-safe. |
|
||||
| `core/wasm_shims/nml_status_shim.cc` | `src/libnml/nml/nmlmsg.cc`, `src/libnml/nml/stat_msg.cc` | Provides NML status constructors needed by source-linked EMC status objects. |
|
||||
| `core/wasm_shims/nml_status_shim.cc` | `src/libnml/nml/nmlmsg.cc`, `src/libnml/nml/stat_msg.cc` | Provides LinuxCNC NML status constructors, clear behavior, and `RCS_STAT_MSG` default status fields needed by source-linked EMC status objects. |
|
||||
| `core/wasm_shims/python_c_api_shim.cc` | `src/emc/rs274ngc/interp_python.cc`, `src/emc/rs274ngc/interp_namedparams.cc`, `src/emc/rs274ngc/gcodemodule.cc`, `src/emc/pythonplugin/python_plugin.cc` | Satisfies Python C API symbols while Python/Boost.Python remap paths remain tracked blockers. |
|
||||
| `core/wasm_shims/rcs_print_shim.cc` | `src/libnml/rcs/rcs_print.cc`, `src/libnml/rcs/rcs_print.hh` | Provides the LinuxCNC `rcs_print_error` split entry points used by NML validation without native print routing. |
|
||||
| `core/wasm_shims/rtapi_compat.cc` | `src/rtapi/uspace_common.h`, `src/rtapi/rtapi.h` | Provides LinuxCNC userspace `rtapi_snprintf()` formatting by following the `rtapi.h` declaration and `uspace_common.h` `vsnprintf()` implementation path. |
|
||||
|
||||
Reference in New Issue
Block a user