Compare commits

...

185 Commits

Author SHA1 Message Date
Hanif Koh eef7710cb1 Set the Version to 2.5.1 2026-11-14 09:39:46 +08:00
Hanif Koh 4eda9b55c9 Refresh the Translation Catalogs for 2.5.1 2026-11-14 09:39:46 +08:00
HanifKoh 400fd8f98f Fix the Crash When Editing an Object's Speed on a Printer Without a Matching Variant (#17529)
A process whose print_extruder_variant has no entry for the printer's extruder type and nozzle volume (a Bowden
printer with a "Direct Drive Standard" process, or a bare "Bowden" variant) made Tab::switch_excluder return
before it mapped the page's variant fields. Editing a per-variant option on the Objects tab then read the end of
that empty map in TabPrintModel::on_value_change and crashed with std::bad_alloc.

switch_excluder now falls back to the extruder's first variant through find_variant_index, as slicing does,
and logs it; get_index_for_extruder keeps returning -1 for its other callers. on_value_change checks the map
lookup and otherwise takes the index from the field id.

(cherry picked from commit 71c9f556f0)
2026-11-14 09:39:46 +08:00
HanifKoh 0153b74f38 Skip the Final Wipe-Tower Unload on Toolchangers When the Tower Stops Short (#17496)
The short-tower final unload is only needed on single-extruder MMU printers, which have to pull the
last filament out. Without SEMM the final purge only rams, with no retraction or parking, so a
toolchanger whose filament has multitool ramming on printed those lines in mid-air above the tower.
Generate it for SEMM only.

(cherry picked from commit 2c50d15451)
2026-11-14 09:39:45 +08:00
yw4z 3cd587c693 Update setup_connection.gif (#17421)
(cherry picked from commit 57071c5991)
2026-11-14 09:39:45 +08:00
yw4z 374f49088f Profile folder fixes / improvements (#17348)
* vivedino xplorer

* prusa

* Delete error_hull_show

* vzbot match model name case

* chuanying match model name case

* flashforge adventurer 5m pro match model name case

* correct name of magicmaker hotend model

* Update BenFab 450_cover.png

* belt cover

* goofoo

* Update IdeaFormer IR3 V2_cover.png

* babybelt

* felix printers

* elegoo neptune 4

* Update CoLiDo DIY 4.0 V2_cover.png

* bump

* use lower case extension on all stl files

* update

* update goofoo

* update felix models

* update

* Update chuanying_x1_buildplate_model.stl

* remove duplicate keys from SeeMeCNC

* fix missing or wrong assets

* fix more assets

(cherry picked from commit 9005b64e13)
2026-11-14 09:39:45 +08:00
Eric Lin 7dd4bbb92a Fix CLI crash when filament presets set no diameter (#16911)
Since #16867 pads filament_colour to the filament count, every CLI run that loads filament presets without a colour recomputes the flush matrix. Standalone filament presets may omit the per-filament keys that block reads. A missing filament_diameter crashed the CLI, and a short filament_is_support failed the size check.

Grow both to the filament count before the recompute. A missing diameter follows the first filament, as get_at() reads it. A missing support flag is off.

get_min_flush_volumes() also read past the end of filament_long_retractions_when_cut and filament_retraction_distances_when_cut when a filament omitted them. Pad both with the first filament's value, so the flush matrix matches the print.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 7c76be2ebc)
2026-11-14 09:39:45 +08:00
TheLegendTubaGuy 9438d21fce Add a Reload from Disk Keyboard Shortcut (#17373)
(cherry picked from commit 4b21b29cd2)
2026-11-14 09:39:45 +08:00
yw4z 46f37be6fc Draw g-code marker tilted for belt printers (#17427)
* init

* update

* fix tilt for decoupled frames

(cherry picked from commit 9e554377a0)
2026-11-14 09:39:45 +08:00
HanifKoh ac448b85dc Ignore Modifiers When Focus Mode Decides Which Plate an Object Is On (#17474)
Focus mode hid an object only when its footprint missed the current plate, and the footprint included its modifiers, negative volumes and support enforcers/blockers. A large modifier reaching over another plate kept the object drawn there. Build the footprint from the model parts only, as plate membership does.

(cherry picked from commit 7cb97a82de)
2026-11-14 09:39:45 +08:00
raistlin7447 55d0762795 Include <utility> in UnsavedChangesDialog.cpp
The #17461 pick uses std::pair there. On main the include came in
with #16929, which isn't on this branch, so clang-tidy failed.
2026-11-14 09:39:45 +08:00
Ian Bassi 4adf1e9f2b Copy per-nozzle settings to every tool of a toolchanger, and choose which unsaved changes to keep (#17461)
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
(cherry picked from commit 34de2b49df)
2026-11-14 09:39:45 +08:00
HanifKoh 6b0d804828 Ignore a Print Sequence Count That Does Not Match Its Values (#17243)
* Ignore a Print Sequence Count That Does Not Match Its Values

get_other_layers_print_sequence split other_layers_print_sequence into
other_layers_print_sequence_nums groups and read the layer range from the
first two entries of each, checking the layout with an assert that Release
builds compile out. A count raised without its values, as a command line
override does on a project storing the default placeholder, read past a
one-element vector. A count that does not divide the values, or groups too
short for a range and one extruder, now give no custom sequence, as the
default pair does.

* Log the Ignored Print Sequence and Test the Two-Group Case

A pair that is ignored now says so in the log, since the removed assert was
the only sign of it. The test covers two groups that divide the values but
have no extruder, and names the negative-count case.

(cherry picked from commit 7e3d5d4d04)
2026-11-14 09:39:45 +08:00
HanifKoh 24752a2c94 Fix the Crash When the Per-Extruder Printable Areas Do Not Overlap (#17439)
When the per-extruder printable areas only touched or did not overlap, get_shared_poly read the first polygon of an empty intersection. That crashed the CLI on the bed shape, and the GUI in scale to fit, fill bed and prime tower placement.

The shared area is now empty in that case. An area with fewer than three points leaves its extruder the whole bed. Placement (get_bed_shape with use_share, PartPlate::get_build_volume(true)) falls back to the whole bed. The prime tower's default position and drag fall back to the plate's shape. Validation now says the extruder printable areas share no common area, instead of reporting the tower as partially outside the printable area.

Profiles whose areas overlap, and profiles without areas, get the same shapes as before.

(cherry picked from commit d7534d7fb9)
2026-11-14 09:39:45 +08:00
HanifKoh 2dff874832 Write One Nozzle Volume Type per Nozzle From the CLI (#17440)
The CLI now sets one nozzle_volume_type per nozzle, as the GUI does. A command-line value wins, then the project's own types, then the printer's defaults. A short list repeats its first entry and a long one is cut to the nozzle count. The sized list is written to the project config and over the command-line value, so the export has one type per nozzle, and reopening it in the CLI keeps the flush matrix the user set. The flush volume setup reads the sized types instead of indexing a short command-line list past its end.

Adds the cli_nozzle_volume_type test.

(cherry picked from commit 478cc90ae7)
2026-11-14 09:39:45 +08:00
SoftFever 832e2fc2de Select sketch constraints by clicking their badges instead of deleting them (#17459)
* Select sketch constraints by clicking their badges instead of deleting them

* Drop a selected sketch constraint when geometry is picked or the tool changes

(cherry picked from commit c872776d24)
2026-11-14 09:39:45 +08:00
SoftFever b2149b8dab Show a sketch's constraints and own name as soon as it opens for editing (#17458)
* Show a sketch's constraints in the sidebar as soon as it opens for editing

* Name the sketch being edited in the Design tab's sketch card and banner

* Keep an ampersand in an edited sketch's name on its card and banner

(cherry picked from commit 2ee47e29fb)
2026-11-14 09:39:45 +08:00
SoftFever 09a685181f Register Fill bed instances with the plate they land on (#17480)
(cherry picked from commit 40f43febbd)
2026-11-14 09:39:45 +08:00
Ian Chua 8600767d6a fix: skip cached updates for unused vendors (#17449)
* fix: skip cached updates for unused vendors

* refactor: clarify vendor selection helper and comments

(cherry picked from commit 021ef5506c)
2026-11-14 09:39:45 +08:00
Fernando Marino` a4faf61d29 Keep the final wipe-tower unload for ramming printers when the tower stops short (#15917)
Keep the final wipe-tower unload for ramming printers when the tower stops short of the object's top

The Type2 final purge was skipped whenever the tower stopped below the object's top layer,
so a ramming printer's last filament was never unloaded. Generate it again when the last
filament rams (single_extruder_multi_material or filament_multitool_ramming), placing it at
the object's top layer so the nozzle doesn't descend into the part, and keep skipping it
otherwise.

Co-authored-by: Fernando Marino <f.marino@rheagroup.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 163b95f93d)
2026-11-14 09:39:45 +08:00
DIEHARDave 34f791e31c Fix: Run slicing pipeline plugins whose manifest reference is missing (#16884)
When a capability named in `slicing_pipeline_plugin` has no entry in the derived `plugins` manifest, the slicing pipeline now finds it by name among the loaded plugins instead of skipping it. The lookup moved into `PluginManager::resolve_capability_ref()`, so the manifest resolver and this fallback use the same rule.

A capability that isn't loaded is still skipped. So is a manifest entry that points at a plugin that isn't installed. No local plugin with the same capability name runs in its place.

Adds a test that slices with an empty manifest and checks that the capability ran.

(cherry picked from commit bb81f6b39a)
2026-11-14 09:39:44 +08:00
Noisyfox 913e1ada42 Fix plate offsets in the preview tool position readout (#17172)
Fix preview tool position coordinates on additional plates

(cherry picked from commit af931e65fc)
2026-11-14 09:39:44 +08:00
Ian Bassi 91ae6023d7 Keep realistic view on while painting seams, supports and fuzzy skin (#17317)
(cherry picked from commit c78272f583)
2026-11-14 09:39:44 +08:00
HanifKoh d97a3969f4 Count the Fake Printer's Close Frame When It Arrives (#17210)
The fake printer counted a close frame when its read completed, which
Beast does only after sending the reply and tearing the socket down. The
agent's stop returns on the reply, and the test then releases the printer,
which closes the socket. When that close beat the teardown, the read
failed with another error, the frame went uncounted, and the test waited
out its 10 s for nothing.

The control callback sees the close frame before the reply goes out, so
counting there leaves no window, and the wait helper is no longer needed.

(cherry picked from commit 23f82fa631)
2026-11-14 09:39:44 +08:00
TheLegendTubaGuy aaf6e81680 Ignore BN_DBLCLK in toggle-button widgets on Windows (#17194)
CheckBox, SwitchButton and RadioBox are owner-drawn wxBitmapToggleButtons.
On a double click wxAnyButton turns the second click into a normal click,
but the button still sends BN_DBLCLK as well and wxToggleButton toggles on
both, so a quick double click toggled three times and looked like a lost
click. RadioBox callers select on mouse down, so there the extra toggle
cleared the value while the button still drew as selected.

(cherry picked from commit 41351efc34)
2026-11-14 09:39:44 +08:00
HanifKoh c6a218f722 Stop Re-Parenting the Settings Dialog on Windows (#17161)
Popup() called Reparent() on the first open, which is a plain SetParent:
the dialog kept its popup style but became a real child of the main
window. The Windows taskbar peek then drew it over the main window even
after it was closed and hidden.

The dialog already has the main window as its owner from creation, so
the call is not needed.

(cherry picked from commit 1898de34d1)
2026-11-14 09:39:44 +08:00
Lam Wei Lun 0d7fb9e6b1 Fix oversized "DEV" text in the mode switch on Retina macOS (#17197)
Fix oversized DEV text in the mode switch on Retina macOS

ModeSwitchButton::doRender() scaled the DEV font by mac_max_scaling_factor()
on macOS, but the paint DC there already works in logical points. On a 2x
Retina display the 12pt font was drawn at 24pt inside the FromDIP(48, 18)
switch, so it overflowed the track and got clipped.

Only the MSW path needs the scaled font: it draws through a wxGCDC over a
scale-1 memory DC, whose text is sized for 96 DPI. Keep that compensation
there and draw with the default font on macOS and GTK, which is also what
the rest of the panel uses. The MSW baseline offset is unchanged.

Fixes #17180

(cherry picked from commit 195fbe5ee9)
2026-11-14 09:39:44 +08:00
yw4z acd4d87abf Fix: Object list Name column not refitted when the vertical scrollbar toggles on Windows (#17169)
* init

* revert changes for linux

(cherry picked from commit e8ebe3451a)
2026-11-14 09:39:44 +08:00
Eldenroot d3f339ceb1 FIX: Disable "Scale to build volume" context menu item for volumes (#16353)
* Menu: disable "Scale to build volume" when it cannot apply

The enable condition Plater::can_scale_to_print_volume() already existed (used by the native command) but the context menu item ignored it, so the item was always enabled. Wire it in, so the item is greyed out for cut objects, for an empty selection and for bed shapes other than rectangle/circle. Matches BambuStudio.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7uDtamzhNGT6PFwmVdRJ8

* Menu: add "Scale to build volume" to the multi-selection context menu

The item was only offered when a single object was selected. Add it to the
context menu shown for several selected objects as well; it uses the same
enable condition, so it is greyed out when it cannot apply.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Menu: show "Scale to build volume" in the single-object context menu

create_object_menu() is not called (see MenuFactory::init), so the single-object
menu is built by create_extra_object_menu() and the item that lives in
create_common_object_menu() never reached it; only the SLA menu used it.
Add the item after "Drop" in the extra object menu.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Scale to build volume: disable it for a selection of parts, where it has no effect

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Disable menu item for context menu

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>
(cherry picked from commit b3819e7c9e)
2026-11-14 09:39:44 +08:00
Eldenroot 7a63fb0344 Clone dialog: the Fill button tooltip says instances, not copies (#17152)
The button fills the bed with instances of the object, like the "Fill bed with
instances" menu item, which already has translations. The copy method it used
to describe no longer exists.

Claude-Session: https://claude.ai/code/session_01QnfT3xX6vcDahKMAM9kgzT

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit b044fbacfa)
2026-11-14 09:39:44 +08:00
Kiss Lorand 3f683895cd Fix printable tooltip on rows without a printable checkbox (#17076)
(cherry picked from commit 49770913a5)
2026-11-14 09:39:44 +08:00
TheLegendTubaGuy 6b033d709b Keep Bambu LAN printers saved before printer agents in the Device tab (#17468)
Builds before 2.5.0 saved local machines without a printer_agent_id, and
DeviceManager hides and drops entries with no agent, so Bambu printers bound
over LAN in 2.4.x vanished after the upgrade. Assign them to the Bambu agent
when the config is loaded. Entries of the other agents stay unassigned: those
were keyed by their address, which equals the stored IP or contains a '.' or
':' that a Bambu serial number never has.

(cherry picked from commit 9696797638)
2026-11-14 09:39:44 +08:00
TheLegendTubaGuy 75d2de2078 Fix panning and rotating from the center of mass details box (#17137)
A drag that starts on the center of mass details box, off its close button, now turns or pans the view like a drag over empty space. Its release no longer opens the canvas context menu. A right click off the box now closes it, the same as a left click. A click inside the box always goes to ImGui, including the click that closes a context menu.

(cherry picked from commit 6d33e58347)
2026-11-14 09:39:44 +08:00
Kris Austin 81b8b3eb81 Fix crashes when clicking in the Measure tool (#17383)
The Measure and Assembly tools could crash on a click when the hovered gripper had nothing to select. That happened off the model over an edge's highlight, on a feature that Assembly mode filters out, or on a selection sphere that was just removed. The click dereferenced an empty `std::optional`, which aborts on builds with libstdc++ assertions, like the Flatpak.

The hover id now names only a gripper hit this frame. A click selects a selection sphere that still exists, or the hovered feature and, in point selection, its point. Otherwise it acts like a click on empty space.

The selected planes and circles no longer get pick raycasters, since a click selects from the hovered feature. The selected circles' raycasters pointed at the hovered circle's, which was freed on the next hover. Also fixes the selected circle's ring keeping the thickness from the zoom it was selected at, a missed ray storing `DBL_MAX` as the point in point selection, and a selected feature's volume being recorded from whatever was under the cursor a frame later.

Checked by hand on Windows and on the Linux Flatpak.

Fixes #17367

Co-authored-by: yw4z <28517890+yw4z@users.noreply.github.com>
(cherry picked from commit 91db25f2cf)
2026-11-14 09:39:44 +08:00
TheLegendTubaGuy c9b1b2ba07 Fix the mixed filament ratio pickers and dialog sizing (#16866)
The ratio triangle handle no longer jumps to the opposite side when it is dragged outside the triangle. It now snaps to the nearest point on the outline.

When the dialog grows for a third material or the gradient editor, it now stays inside its display and is never taller than the display, so Cancel and OK stay above the taskbar. A DPI change resizes it the same way.

The 10% minimum for each filament is now drawn as a dashed line on the triangle, the ratio bar and the gradient graph. The gradient grid is now 10x10, so the line falls on a grid line. The two-material ratio bar now spans the full dialog width, below the preview.

Part of #16781.

(cherry picked from commit 376fd433f2)
2026-11-14 09:39:44 +08:00
brumbear b2e0664195 Fix Flow Dynamics Calibration capability detection (#16055)
Older A1 and A1 mini firmware reports PA support through `support_flow_calibration` but leaves `home_flag` bit 16 clear, so `parse_home_flag` reset `is_support_pa_calibration` and the Flow Dynamics Calibration checkbox was hidden when sending a print. On series N printers, `home_flag` no longer clears the two calibration flags once either one is set. Other printers are unchanged.

(cherry picked from commit f9d5a614b0)
2026-11-14 09:39:44 +08:00
Niklas 6b754257dd Trust the per-printer CA file for Bambu LAN connections (#17062)
The HTTPS CA file in the IP and access code dialog had no effect for Bambu Lab printers. For Bambu printers, the CA path is now saved with the printer's local machine entry instead of being read from the selected preset. On connect, Orca builds `<data_dir>/cert` with the bundled `printer.cer` plus the CA of each printer connected in this session, and points the network plug-in there. The file must contain only CA certificates. If it doesn't, Orca logs a warning and keeps the bundled certs. Other printer agents still use `printhost_cafile` from the preset.

A CA chosen before this change is not migrated. Choose it again in the dialog.

Fixes #17061

(cherry picked from commit 96d7742974)
2026-11-14 09:39:44 +08:00
Eric Lin 27ca4169aa Fix filament sync showing a slot as another material (#17089)
When no visible filament preset matched the material a printer reported, first_visible_idx_by_type() returned an arbitrary visible preset, so the slot showed a different material. It now returns no match, and the Moonraker, Creality CFS, Qidi and Snapmaker agents fall back to the OrcaFilamentLibrary generic for that material.

The generic name table now maps PLA+, PLA PRO, ABS+ and PETG+ to their family, and adds PLA Matte, PETG HF, PETG-CF, PE-CF, PP-CF and PP-GF. The redundant visible-base check in the Creality CFS fallback is gone.

(cherry picked from commit fabad6114a)
2026-11-14 09:39:44 +08:00
Ian Bassi a6187a661e Show RepRapFirmware G10 temperature changes in the G-code preview (#17464)
(cherry picked from commit fb0c9884c9)
2026-11-14 09:39:44 +08:00
HanifKoh b4c70d0453 Bump the Bundled uv to 0.13.7 (#17292)
uv 0.11.21 verifies PyPI's TLS certificate against its vendored CA bundle,
which still trusts the emSign ECC Root CA - G3 whose eMudhra intermediates
were compromised (GHSA-hq85-5cpj-mr62). An on-path attacker holding one of
those keys could substitute the packages that plugin dependencies install.
0.13.4 drops that root; 0.13.7 is the current release. Hashes come from the
release's .sha256 assets; the Flatpak manifest fetches the same archives.

(cherry picked from commit 6bf8892f4c)
2026-11-14 09:39:44 +08:00
Kris Austin be8c4edb74 Fix Upload and Print not starting on the Ender-3 V3 KE (#17365)
Since 2.5.0 the CrealityPrint host starts a print with a /mnt/UDISK path
on every model outside the K1 family. The Ender-3 V3 KE (F005) keeps its
gcodes under /usr/data like the K1, so the firmware ignores the start
command and the uploaded file never prints. The Ender-3 V3 series (F001),
Ender-3 V3 Plus (F002), CR-10 SE (F003) and Ender-5 Max (F004) also keep
their gcodes under /usr/data and get the same wrong path.

The K2 SE (F016) keeps its gcodes under /usr/data too, unlike the other
K2 models. OrcaSlicer sent its CFS start commands with a /mnt/UDISK path,
so the printer ignored them.

Add those models to the /usr/data list, and rename the list since it
isn't only K1-family models anymore. Every other model still uses
/mnt/UDISK.

Fixes #17363
Fixes #8735
Fixes #17078
Fixes #17364

(cherry picked from commit e2db7e5ef1)
2026-11-14 09:39:44 +08:00
Eldenroot 65f51d61ec Fix objects printing in the wrong place when identical objects share sliced layers (#17183)
`is_print_object_the_same` now also compares `center_offset()`. Two objects with the same transform can have different offsets, because the offset comes from each object's first instance. Before, the object that took over the other's layers printed shifted.

(cherry picked from commit 0f15db8b83)
2026-11-14 09:39:44 +08:00
Arthur Porto aadcff35f8 Check the prime tower requirements only when a tower is printed (#16999)
A plate whose parts use one filament, with only the support on another, was refused for prime tower rules before slicing even when no part needed support and no tower would be printed.

- The layering checks run before slicing only when a tower is certain: the parts use more than one filament, custom G-code changes the tool, or wrapping detection or a smooth timelapse forces one. Otherwise they run in _make_wipe_tower() once the tool changes are known, and only if a tower is generated.
- The "No sparse layers" check before slicing still refuses objects next to the tower. Objects away from it are judged after slicing against the real tower height, and the drag preview draws the height limit plane only on objects the check before slicing refuses.
- The fake tower is reset at each slicing, and the conflict check only uses it when a tower is generated. It was read uninitialized on plates with no tool change.

Fixes #16936

(cherry picked from commit 7906d7e02a)
2026-11-14 09:39:44 +08:00
Arthur Porto 267306196f Do not share slices between objects whose height ranges differ (#17279)
Copies of an object with the same mesh, transform and settings reuse one set of sliced layers. The check ignored height range modifiers, so when only one copy had a range, that range was either dropped from the copy or applied to both.

The check now compares the ranges and their settings too, so objects whose ranges differ slice on their own.

(cherry picked from commit 6d312b0441)
2026-11-14 09:39:44 +08:00
Lam Wei Lun 95997277e2 Pin expat to 2.10.0 and restore its entity-amplification guard (#17290)
A crafted AMF could freeze Orca on Windows and macOS. The bundled expat 2.5.0 was built without XML_DTD, so its entity-amplification guard was compiled out. Expat 2.10.0 is now built from the release tarball with the guard on. Linux uses the system library only if it is already 2.10.0. Files that rely on unbounded entity expansion now fail to import instead of exhausting memory. The vendored 2.5.0 and 2.2.0 copies are removed, and the old expat.lib in existing Windows deps folders is overwritten. Deps need a rebuild on every platform.

(cherry picked from commit 7f124c1b0a)
2026-11-14 09:39:44 +08:00
Rodrigo Faselli 3d028820f6 Hide lightning angles if there is no infill (#17277)
(cherry picked from commit 834c6987e0)
2026-11-14 09:39:44 +08:00
Ian Bassi 5863a8d3e5 Fix multiline infill paths that start mid-line and end on themselves (#17341)
(cherry picked from commit 9612260bb5)
2026-11-13 19:40:16 +08:00
Rodrigo Faselli 06621274ce Fix stale focus-mode plate thumbnails (#17320)
(cherry picked from commit 051723ca24)
2026-11-13 19:40:16 +08:00
Grant Harkness 42990313bb Keep the Moonraker print host's port across sessions (#17257)
A print host with a port connected once, then failed in every later session. The agent announced the bare IP, that overwrote the saved address, and the next launch went to port 80. The announce now keeps host:port. For Moonraker, Qidi, Snapmaker and CrealityPrint, connect() also takes the port from the dev_id when the saved dev_ip has none, which repairs records saved by 2.5.0.

(cherry picked from commit bac7112046)
2026-11-13 19:40:16 +08:00
Ian Bassi 8288976daf Fix gap infill printing with the outer wall filament with classic walls (#17229)
(cherry picked from commit d607d7f4ad)
2026-11-13 19:40:16 +08:00
HanifKoh 135f383eb2 Join Precise-Z Sliver Layers to the Prime Tower Layer Below (#17204)
* Join Precise-Z Sliver Layers to the Prime Tower Layer Below

Precise Z height ends each object at its exact top, so another object's
layers can print a few microns above these. Each sliver became its own
wipe tower layer, and a tool change on it was sized for that height: a
0.0009 mm layer asked for a 230 mm ramming band, which grew the tower
past the bed ("Prime tower is partially outside the printable area").
Once sized correctly, G-code export lost step with the tower and threw
"append_tcr was asked to do a toolchange it didn't expect".

A tower layer thinner than half the printer's minimum layer height now
joins the tower layer below: ToolOrdering records the tower layer each
layer prints on and whether it finishes it, the tower plans the joined
tool changes on that layer's z and height, and the G-code neither
advances the tower on a joined layer nor finishes the layer before it.

* Finish a Joined Prime Tower Layer on Its Last Tool Change

The joined layer always finished the tower layer, so a joined layer that
changed no tools asked for a result after the layer below had taken them
all and threw "Wipe tower generation failed". The layer that finishes is
now the last of the group that changes tools, or the last one when none
does, matching how a single layer merges its finish into a tool change.

A joined layer also reset the Type 1 tower's first print, so smooth
timelapse replayed the tower layer's wall and threw the same error.

Layers are now joined below the printer's minimum layer height instead of
half of it: precise Z height can move a layer off by up to a layer height,
and the 0.04-0.08 mm layers left on their own still grew the tower off the
bed.

* Print Joined Prime Tower Purges at the Tower Layer's Z

A joined layer printed its purges at its own nozzle height, up to just
under the minimum layer height above the tower layer, so the beads were
not pressed onto it. The emitter now descends to the tower layer's z for
a joined layer, travelling over the tower first and climbing back after,
the way it already does for a tower compacted below the objects.

Layers sliced at exactly the minimum layer height sum to gaps a hair
under it and were joined to the layer below; an EPSILON margin keeps
them apart.

* Travel Over the Prime Tower Before a Joined Layer Descends

With no change_filament_gcode and no nozzle change, the Type 1 emitter
descended to the joined tower layer's z while the head was still over the
part, then travelled to the tower at that z. It now travels over the tower
first. The tests check that every descent below the object layer happens
over the tower.

(cherry picked from commit 1c9f6f9318)
2026-11-13 19:40:16 +08:00
Gazi Faysal Jubayer 3eb2d3ca35 Travel back from a lift at the lifted height, then descend (#16933)
* Travel back from a lift at the lifted height, then descend

After a tool change on the Bambu Lab prime tower, the nozzle is lifted
at the tower and then travels to the next object. That travel is forced
to set the layer Z, which sent it down the final branch of
travel_to_xyz(): it cancelled the lift and emitted one combined XYZ move,
so the nozzle sank over the print and left color streaks. When the
nozzle is lifted and the target is lower, move in XY first and descend
at the target, as the branch already does after a filament change.

Fixes #14968

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep a lifted nozzle up over every travel that descends to the print

A multi-point avoid-crossing or exclusion-volume travel now stays at the
lifted height and descends only at its last point. The split descent also
covers printers with an axis remap, takes its Z move from the target
position, and is skipped when X and Y do not change. The test parses with
GCodeReader and runs with arc fitting both off and on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Check exclusion volumes from the height a lifted nozzle travels at

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Merge the lifted and multi-point travel branches into one loop

The 2-point travel, the lifted detour and the avoid-crossing detour now
share one loop; a detour only moves to the layer height at its first point
when the nozzle is not staying lifted. A new test lifts at each layer change
of a concave part with avoid crossing walls on, so lifted detours of more
than two points are checked for a nozzle that comes down before the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep an exclusion-volume detour lifted when its lift is still pending

A retraction leaves its lift pending until the first leg of the travel.
The interpolated-Z detour only checked for a lift already made, so it
lifted on the first leg and then lowered at each later waypoint. A lift
the first leg will make now skips the interpolation, so the detour stays
lifted and descends at its last point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kris Austin <kris.austin@gmail.com>
(cherry picked from commit 99fada6aab)
2026-11-13 19:40:16 +08:00
Kiss Lorand 0b9905531d Fix spiral vase slicing with height ranges (#17154)
(cherry picked from commit 896557bce5)
2026-11-13 19:40:16 +08:00
fa1k3 e2c63b710f Apply the Z shrinkage compensation to height ranges (#16491)
The height ranges are uncompensated print heights. The layer height profile
clipped them against the compensated object height, and the region ranges
were compared with the compensated slices and volume boxes without scaling,
so the range's layer height and its settings ended up at different heights.

The region ranges are now scaled by the Z compensation (not on belt printers,
whose slices are taken in the rotated frame), and the cached regions are only
reused while their ranges are unchanged.

Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 5fd0edf5cc)
2026-11-13 19:40:16 +08:00
Kiss Lorand 7e5c60ff3e Fix false spiral vase material error for height range overrides (#17143)
(cherry picked from commit 2a8abac43d)
2026-11-13 19:40:16 +08:00
raistlin7447 79cdd0483b Set the version to 2.5.1-rc 2026-11-13 19:40:16 +08:00
SoftFever 40ecc66f78 Bump version to 2.5.0 2026-11-07 09:44:33 +08:00
Kris Austin 4f33435636 Give the plugin Permissions tab its own Processes translation (#17339)
(cherry picked from commit e2c2641acf)
2026-11-07 02:55:25 +08:00
Ian Bassi 803dddb0f5 Fix adaptive and TPMS infill paths that start mid-line and end on themselves (#17334)
(cherry picked from commit 4cfdccfe45)
2026-11-07 02:55:16 +08:00
raistlin7447 00c39d4dec adapt #17336 for release/v2.5.0
Regenerates the catalogs against the release branch sources and restores strings the branch still uses that the catalog changes on main dropped.
2026-11-07 02:14:51 +08:00
Kris Austin 146b78f5be Refresh the translation catalogs for 2.5.0 (#17336)
* Regenerate the translation template and catalogs for 2.5.0

* Restore and fill translations for the strings added since 2026-11-03

* correct Chinese translations

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 8b9e977458)
2026-11-07 02:14:51 +08:00
SoftFever c44e957730 Complete Simplified and Traditional Chinese translations (#17333)
(cherry picked from commit 10c9df3578)
2026-11-07 02:14:51 +08:00
SoftFever 6a0dbc61d8 Update translation catalogs and fix run_gettext warnings (#17332)
* update locales

* Stop marking the plugin permissions example URL for translation

(cherry picked from commit b11009123c)
2026-11-07 02:14:51 +08:00
Lim Jooyoung 89a5a57822 Remove settings OrcaSlicer ignores from the Prusa process profiles (#17231)
67 Prusa process profiles write keys that PrintConfigDef does not define,
so the loader drops them and they never reach a slice:

- inital_layer_height (64 files), a misspelling of initial_layer_print_height
- tree_support_bramch_diameter_angle (65 files), a misspelling of
  tree_support_branch_diameter_angle
- tree_support_branch_diameter_double_wall (17 files), an option OrcaSlicer
  removed in 2.3.0

The loader already drops these keys, so removing them changes no setting.
Each misspelled value in a selectable preset also equals the value the
correctly spelled key resolves to, so renaming them would only repeat values.
Bump the Prusa bundle version to 02.04.00.18.

(cherry picked from commit 6aaee84c1f)
2026-11-07 02:14:51 +08:00
Felix14_v2 479171d707 Update OrcaSlicer_ru.po (#17225)
* Update OrcaSlicer_ru.po

* Oops

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

(cherry picked from commit c43c560bbe)
2026-11-07 02:14:51 +08:00
TheLegendTubaGuy 22cad99a89 Fix Flashforge Creator 5 process list, default processes and Pro chamber heating (#17323)
* Fix Creator 5 0.32mm process nozzle and Flashforge default processes

The 0.32mm Standard @FF C5 0.8 nozzle process listed the Creator 5 and
Creator 5 Pro 0.6 nozzle printers, so it showed up for the 0.6 nozzle and
was missing for the 0.8 nozzle. It now lists the 0.8 nozzle printers, like
the other 0.8 nozzle processes.

23 Flashforge printers named a default process they cannot use: Creator 5
and 5 Pro 0.4, 0.6 and 0.8, AD5X, Guider4, Guider4 Pro, and Adventurer 3
Series 0.6, whose default process doesn't exist. Each now names its own
process at the usual layer height for its nozzle: 0.12mm for 0.25, 0.20mm
for 0.4, 0.30mm for 0.6 and 0.40mm for 0.8.

Fixes #17306

* Let Creator 5 Pro heat the chamber when chamber control is on

The Creator 5 Pro start G-code had M191 S0. Orca skips its own M191 when
the start G-code already sets the chamber temperature, so the chamber
never heated, even with chamber control on. The line is removed from all
four nozzles. Orca now writes M191 with the highest chamber temperature of
the filaments that turn chamber control on, and M141 S0 at the end.

The 0.8 nozzle had support_chamber_temp_control off, unlike the other
nozzles, which hid the chamber control setting. Fourteen C5P filaments,
ABS and ASA among them, turn it on, so it is now on for the 0.8 nozzle too.

Fixes #14353

(cherry picked from commit b46bf81396)
2026-11-07 02:14:51 +08:00
RecyclingRudi 0855c8098d Add Recycling Fabrik and EverLoop filament profiles (#17188)
* Add Recycling Fabrik and EverLoop filament profiles

Add six filament profiles for Recycling Fabrik (Braunschweig, Germany)
and its premium sub-brand EverLoop to OrcaFilamentLibrary:

- Recycling Fabrik rPLA, rPETG, rABS
- EverLoop rPLA Premium, rPLA Premium Matte, rPETG Premium

Values are the manufacturer's own print settings; temperature ranges
and densities follow the manufacturer's technical datasheets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reindex OrcaFilamentLibrary after merging main

main bumped OrcaFilamentLibrary to 02.04.00.25 as well, and the textual
merge of the index left it invalid JSON. Took main's index, re-ran
update-index to add the twelve new profiles and bumped the version to
02.04.00.26. No profile values changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit 6b0d50bf7c)
2026-11-07 02:14:51 +08:00
Thalis Antunes e712b4ed43 Sovol SV08: point the 0.4 and 0.8 nozzle printers at process profiles that exist (#17106)
"Sovol SV08 0.4 nozzle" named "0.20mm Standard @Sovol SV08" and "Sovol SV08
0.8 nozzle" named "0.20mm Standard @Sovol SV08 0.8 nozzle" as their
default_print_profile. Neither process exists in the Sovol bundle; the
processes shipped for these printers are "0.20mm Standard @Sovol SV08 0.4
nozzle" and "0.40mm Standard @Sovol SV08 0.8 nozzle". When the name is not
found, PresetCollection::select_preset_by_name falls back to the first visible
process preset, so selecting one of these printers does not land on its own
process.

Bump the Sovol bundle version to 02.04.00.10.

(cherry picked from commit ca9204927e)
2026-11-07 02:14:51 +08:00
Ian Chua 62e60b2896 feat: Add plugin permission management to the Plugins dialog (#17285)
* feat: permissions tab in plugin dialog ui draft

* feat: allow full access, make threading a boolean

* fix: clang-tidy

* feat: save changes button

* fix: clang-tidy

* fix: only allow permission editing when plugin not loaded

* fix: plugin permission drafts, target validation, and sidecar synchronization

* fix: minor html/css changes

* fix: Make plugin permission edits immediate and thread-safe

* refactor: rehaul UI

* fix: add don't show again to request permission dialog

* fix: permission request dialog ui

* fix: clean up plugin permission dialog and mutation APIs

* fix: retry Windows plugin permission file replacement

* test: extract and cover plugin permission validators

* fix: show clear denial for worker plugin file operations

* fix: clang-tidy

* docs: clarify plugin filesystem permissions and clean up declaration

* fix: handle the 3 states of install state read

* fix: match equivalent paths for exact filesystem grants

* fix: preserve unreadable plugin state and allow socket grant editing

* Recover plugins whose install-state file cannot be parsed

---------

Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 932b492252)
2026-11-07 02:14:51 +08:00
Kris Austin 1f32f5a99f Fill every filament slot when a project has fewer filaments than tools (#17330)
Opening a project with fewer filaments than the printer has tools tops
up filament_presets and the flush matrix, but leaves filament_colour
and the other per-filament arrays at the project's count. Slicing then
fails the flush matrix check, and an overwriting filament sync reads
past the end of those arrays.

load_current_presets() used to fill the arrays on every load. Since
#15385 it compares against filament_presets, which the top-up has
already raised, so it no longer runs. Grow the arrays where the project
is loaded.

(cherry picked from commit b5c4ccd9c5)
2026-11-07 02:14:51 +08:00
Alexandre Folle de Menezes 356883e971 Standardize the spelling of "RepRapFirmware" (#17174)
Standardize the spelling of "RepRap Firmware"

(cherry picked from commit 26a3937771)
2026-11-07 02:14:51 +08:00
Alexandre Folle de Menezes 7a2c9960a2 UTF-8, SVG and STEP should always be in UPPERCASE (#17092)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
(cherry picked from commit 95a2732145)
2026-11-07 02:14:51 +08:00
Kris Austin dff9401d44 Bump the Orca Filament Library version to 02.04.00.25 (#17331)
#17029 added the PrintaLot PETG profiles without a version bump, so the bundle changed but its version did not. This fails the version check on the 2.5.0 branch.

(cherry picked from commit d76276778c)
2026-11-07 02:14:51 +08:00
Eric McCann 505e136874 Prusa XL: "detraction_speed" does not exist (#17259)
Fix Prusa XL deretraction speed profile keys

Use the recognized deretraction_speed key so XL presets apply their specified 25 mm/s and 15 mm/s speeds instead of inheriting 30 mm/s.

Co-authored-by: Codex <codex@openai.com>
(cherry picked from commit 0edd6693a6)
2026-11-07 02:14:51 +08:00
Thalis Antunes fe3238dea4 Sovol SV08 MAX: add 0.2 and 1.0 nozzle variants (#17108)
The SV08 MAX ships with 0.2, 0.4, 0.6, 0.8 and 1.0 mm nozzles and uses the
same extruder as the Sovol Zero, but the bundle only had 0.4, 0.6 and 0.8.

Machines copy the MAX 0.4 and 0.8 printers; layer-height range and
retraction come from the Sovol Zero 0.2 and 1.0 printers. The 0.2 process
applies to the MAX 0.4 process the same changes Sovol made between its SV08
0.4 and SV08 0.2 processes. The 1.0 process takes line widths, layer heights
and extrusion speeds from the Sovol Zero 1.0 process and keeps the MAX 0.8
accelerations, overhang speeds and shells. The eight SV08 MAX filaments list
the two new variants, and the model advertises all five nozzles.

Bump the Sovol bundle version to 02.04.00.10.

(cherry picked from commit 1f7e195d88)
2026-11-07 02:14:51 +08:00
sirjassam 4220b0055f Add PrintaLot PETG profiles for Bambu Lab printers (#17029)
* Add PrintaLot PETG profiles for Bambu Lab printers

* Remove redundant PETG defaults after independent review

* Declare PrintaLot PETG's own values on its base

The type, 255 °C and the 17 mm³/s limit are PrintaLot's values, not the
library's PETG defaults, so they should not change if fdm_filament_pet
does. filament_type is also part of the filament_id.

* Drop PrintaLot PETG values Bambu Lab printers never read

- The multitool ramming values: only the Type 2 prime tower reads them,
  and Bambu Lab printers always use Type 1.
- volumetric_speed_coefficients: only read with adaptive volumetric
  speed, which is off.
- filament_retract_length_nc outside the H2C: only the H2C's
  change-filament G-code reads it.
- retraction_distances_when_ec where long retraction on extruder change
  is off.
- filament_preheat_temperature_delta outside the H2C: only used on
  printers with several nozzles per extruder.
- filament_flush_temp_fast 0 and filament_extruder_variant
  "Direct Drive Standard": both are the defaults.

* Move values shared by the PrintaLot PETG presets to the base

The 17 mm³/s limit and slow_down_min_speed are the same in every preset
except the 0.2 nozzles (1 mm³/s) and the A2L 0.2 nozzle (40 mm/s), and
most presets write the same placeholder filament start and end G-code.
Presets with other values keep their own.

* bump OrcaFilamentLibrary.json

---------

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
(cherry picked from commit 7374b734d3)
2026-11-07 02:14:51 +08:00
Lam Wei Lun fe9a99bb32 fix: stop the Speed Dial dismissing itself on the first open (#17245)
* fix: stop the Speed Dial dismissing itself on the first open

Opening the dial with Space and not touching anything closed it again a
moment later, on GNOME and KDE, X11 and Wayland, and only on the first open.

The dial hides on wxEVT_ACTIVATE(false), but wxGTK does not deliver that
event to the window that lost the focus: gtk_frame_focus_out_callback sends
it to g_activeFrame, the toplevel that was activated last (wx
src/gtk/toplevel.cpp:192-205). A deactivation that belongs to another
window, or the same one arriving while the dial is still taking the focus,
therefore read as "the user dismissed the dial". The first open is the only
one that maps the window, moves it, resizes it to its content and grabs
focus into a web view that has never held it, so it is the only open
exposed to that ordering.

Validate the dismissal instead of trusting the event: arm a 150 ms one-shot,
cancelled by any activation, and hide only if the dial is still shown and
its window is no longer active. On GTK ask the window with
gtk_window_is_active(), because wxTopLevelWindow::IsActive() resolves
through wx focus tracking, which does not follow the focus that WebKit's
native widget takes. Also skip the pre-map focus grab on the first open: at
that point wxGTK has not mapped the window yet, so the grab cannot land.

speed_dial_should_hide() is a free function, so the rule is covered by
tests/slic3rutils/test_speed_dial_dismiss.cpp without a GUI.

* docs(wxwidgets-skill): document the validated Speed Dial deactivation

Section 10 described the dial's old handler, which hid on every
wxEVT_ACTIVATE(false). The skill is the review ground truth, so it has to
match the code: the deactivation is now validated after a settle interval
against the window's real active state, because wxGTK sends that event to
the last activated toplevel whatever window lost the focus.

* Ignore Page Changes of Inner Books in the Main Tab Handler

The main frame's tab-panel handler receives the page-changed event of
any book inside a page, because wxBookCtrlEvent propagates and the
Calibration page's Tabbook has no handler of its own. It then treated
the inner page switch as a main tab change: it reset the selected tab,
toggled the undo/redo buttons and called SetFocus() on the current page.

On wxGTK, SetFocus() on a child of a visible but inactive top-level
window presents that window. While the Calibration page is built in the
background after start-up, this re-activated the main window and the
Speed Dial, which hides when it loses the focus, closed by itself a
moment after its first open on Linux.

Only act on events whose object is the main tab panel.

* Include wx/timer.h Where the Speed Dial Binds Its Timer

* Describe the Real Cause of the Speed Dial's First-Open Close

The deferred, re-checked hide absorbs a focus bounce shorter than its
delay. It did not stop the first-open close, which was the main frame
activating itself from its tab handler; say so in the comments, the
test and the skill reference instead of describing a misdelivered
deactivation.

---------

Co-authored-by: Hanif Koh <hanifkoh@outlook.com>
(cherry picked from commit bd3e9aeb96)
2026-11-07 02:14:51 +08:00
Lam Wei Lun 63085be729 fix: let the 3D navigator keep the mouse for the whole drag (#17284)
The navigator is drawn into ImGuizmo's NoInputs "gizmo" window, so ImGui
never owns the press (mouse_avail_to_imgui is false) and WantCaptureMouse
only reflects what the previous frame requested. ViewManipulate asked for
capture only on frames with a non-zero MouseDelta, so the still frame that
follows the press dropped it.

The next motion event then reached the canvas, which latched it as a camera
drag. With an object behind the navigator that drag is refused at
GLCanvas3D::on_mouse (the m_hover_volume_idxs gate of the rotate branch),
so nothing marked the scene dirty, no frame rendered, and the navigator never
rotated. The armed isClicking survived to the release frame and snapped the
view to the pressed panel instead.

Request capture for as long as the press is held, so the navigator owns the
whole gesture.

Fixes #17282

(cherry picked from commit 61e1841f9d)
2026-11-07 02:14:51 +08:00
Sergei 34c8e78e31 Fix/wipetower klipper m400 stalls (#17246)
* WipeTower2: on Klipper, sync motion only before temperature commands

Follow-up to #15133. On Klipper, flush_planner_queue() emitted M400 at
every toolchange boundary, stalling the toolhead over the tower. Keep the
sync only before M104/M109/M591, and drop the sync line left behind when
GCode.cpp strips the interface-temperature M109.

End the deretraction placeholder with a newline: without the M400 that
used to follow it, the next tower move was glued to the placeholder line,
skipped post_process_wipe_tower_moves and kept tower-local Y.

Creator 5 Pro, 247 toolchanges: 1235 M400 -> 247 (~30 min saved).

* Update src/libslic3r/GCode.cpp

Good point, done. The strip now uses flush_planner_queue_command() and follows whatever the tower writes.

Co-authored-by: Kris Austin <kris.austin@gmail.com>

* tests: move the wipe tower slice and shared checks into one helper

* WipeTower2: keep the sync at the end of the unload on Klipper

[change_filament_gcode] and Tn are macros on Klipper; their non-motion
parts run when parsed, so without the sync a filament-change macro could
run while the unload and ramming moves are still queued.

Creator 5 Pro, 247 toolchanges: 494 M400 instead of 1235 (247 in this PR
before). The other boundary flushes, which stalled the toolhead over the
tower, stay removed.

* tests: check the unload sync before each change_filament_gcode

* WipeTower2: don't sync the cooldown after the interface wipe

The reset to the base temperature after the interface wipe isn't
timing-critical, but its M400 stopped the head over the tower before the
tower perimeter. Test print, Creator 5 Pro, 247 toolchanges: 3:22 with
the sync, 3:17 without it.

* tests: check only the interface cooldown for a missing sync

* WipeTower2: skip the cooldown sync on Klipper only

---------

Co-authored-by: Kris Austin <kris.austin@gmail.com>
Co-authored-by: GhZserG <ghzserg@zmod.link>
(cherry picked from commit cb80a0db84)
2026-11-07 02:14:51 +08:00
HanifKoh e7e731429e Restore the Custom Camera Source in the Device Tab (#17326)
* Restore the Custom Camera Source in the Device Tab

The printer-agent refactor reused the Device tab's WebView for the
generic snapshot stream and dropped the "Custom camera source" row from
the Camera Setting popup along with the code that showed the user's URL
in that WebView. The two app-config keys were then read nowhere, so
anyone who had a custom camera configured lost it on upgrade.

Bring the row back and show the stored URL when the source is enabled,
with the title-bar switch button toggling between it and the printer's
own stream. The agent-driven snapshot path leaves the WebView alone while
a custom source is enabled, a URL without a scheme gets http://, and the
Enable/Disable labels are translatable separately.

* Offer the Custom Camera Source Only Alongside the Bambu Native Stream

The custom view hides the Device tab's media control and play bar, which
every agent camera mode plays through (snapshot mode via the very WebView
the custom source takes over), and the 2.4.2 feature was only ever used
against the Bambu native stream. Gate the row and the stored URL on camera
mode none, which is that stream, so the custom source never contends with
an agent's own playback. Stop the native stream when the custom view takes
over, reapply the switch icon on rescale and theme change, trim and
normalise the URL in one shared helper, and reword the hint to say a URL
is expected.

* Keep the Custom Camera View in Step With the Agent's Camera Mode

Selecting a printer whose agent streams through the shared WebView
leaves the stored custom source unsupported, so reapply the view
whenever the stored state and the applied one differ, on every camera
tick and on the no-printer reset. Read the config flag before asking
the agent for its mode, so users without a custom source pay one config
lookup per tick. Stop the printer stream for the view switch without the
failure bookkeeping, which could open the LAN dialog mid-connect. Write
the trimmed URL back into the field and store it only when enabling.

* Load the Custom Camera Page Only While It Is On Screen

Let the show helper own the WebView page: it stops the native stream,
then loads the URL when the custom view comes up and a blank page when
it goes away, so a hidden view pulls no stream and the load never races
the stop. Track the applied state in a member and evaluate the stored
state once per tick. A view-switch stop leaves no retry count or
back-off behind, the URL field is read-only while the source is
enabled, and the gating comment says what mode none actually is.

* Pass the Custom Camera URL Through Once Per Tick

Read the stored URL once per camera tick and hand it to the sync, apply
and show helpers, so a toggle can no longer show a blank page when the
URL is empty and the camera-state branches no longer start with an empty
if. Disable the URL field while the source is enabled, which greys it
out, instead of a read-only state with no visual cue. The gating comment
now gives the real reason: the custom view hides the media control and
play bar that every agent mode plays through, and the feature was only
ever used against the Bambu native stream.

* Offer the Custom Camera Source With the Bambu Printer Agent Only

Printer agents are not for general use in 2.5.0, so gate the row on the
active printer agent being the Bambu one instead of on its camera mode.
The interaction with the other agents' camera modes gets a proper design
after the release.

* Note That the Custom Camera Source Is a Temporary Bambu-Only Patch

Say at the gate and in the header that the feature is a patch for the
Bambu printer agent and is to be deprecated or extended to the other
agents once printer agents are fully implemented.

(cherry picked from commit 606b50f187)
2026-11-07 02:14:51 +08:00
SoftFever afee6f954f Sign Windows release and nightly builds in CI (#17305)
* Sign Windows release and nightly builds in CI

* Replace the README's SignPath signing policy with a signed-builds note

(cherry picked from commit 73e64d3bc5)
2026-11-07 02:14:51 +08:00
Lam Wei Lun 8a13952593 Speed Dial: fix side effects of single-click launch (#17301)
* Speed Dial: fix side effects of single-click launch

Follow-up to the single-click launch behaviour:
- hovering a row or favourite previews it in the footer, so its description
  and wiki link stay readable without running it
- the click that dismisses the pin menu only closes the menu instead of also
  running the row under the cursor
- a double-click on "Go to tab..." no longer jumps to the tab that renders
  under the cursor

* Speed Dial: keep the hover preview on the row the pointer rests on

mouseenter also fires when rows move under a stationary pointer, so typing
a search or pressing the arrow keys moved the footer onto whatever row
scrolled beneath it while Enter still ran the highlighted one. Listen to
mousemove instead: only the pointer's own motion previews a row.

Moving from a row to the footer crosses the rows below it, and each of
them replaced the preview, so the Wiki link belonged to the last row
crossed. Commit the preview only after the pointer rests (150 ms) and
drop a pending one when it leaves the list, so the footer keeps the row
the pointer came from.

* Speed Dial: restart the hover preview timer on pointer movement

The 150 ms settle timer ran from the moment the pointer entered a row, so a row that took longer than that to cross was previewed on the way down to the footer; the wiki link then described a crossed row instead of the row the pointer came from.

Restart the wait on every move of 6 px or more and cap it at 1 s, so a crossed row is never committed while a pointer that never rests still previews the row it stays on. Moves under 6 px are hand jitter and keep the running timer, so a shake still previews. The timing is pinned by a node-vm regression test with faked timers.

---------

Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit d2ade00ad8)
2026-11-07 02:14:51 +08:00
Lam Wei Lun ba5a61dd51 Speed Dial Minor QOLs (#17291)
Single click to launch actions. Close button removed to prevent cluttering

(cherry picked from commit f96bbe8db1)
2026-11-07 02:14:51 +08:00
GNUGiminot 84a2400a90 Plugin audit: keep non-Latin path names intact in the keyword check (#16925)
* Keep non-Latin path names intact in the plugin audit keyword check

is_denied_path_keyword() lowercased every path component with
std::tolower(), which follows the C locale. With a single-byte locale,
which the UI language sets on Windows (Russian_Russia.1251), that
rewrites bytes of UTF-8 sequences: "Новая папка" is no longer valid
UTF-8, and has_denied_config_extension() then throws "boost::filesystem
::path codecvt to wstring: partial" while turning it back into a path.
The exception left the CPython audit hook, so the plugin call never
returned, and the app crashed later in PyFrame_GetCode.

The keyword check now uses the file's ascii_lower(), which lowercases
A-Z only; the keywords are ASCII, so matching stays case-insensitive.
ascii_lower() itself no longer goes through a locale-aware
boost::algorithm::to_lower(), so the network permission keys get the
same guarantee. The audit hook also no longer lets any C++ exception
reach the interpreter: a check that fails denies the event, like an
unanswered prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review: narrower try in audit_hook, shorter comments, a test for the catch

- Wrap only audit_plugin_event() in the try, so release_frames() is called
  once after the event is decided.
- Shorten the ascii_lower() comment and drop the one that repeated it.
- Use only the .1251 locale in the non-Latin path test.
- Test that a permission prompt that throws denies the event, which
  reaches the new catch on every platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: GNUGiminot <215263196+GNUGiminot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit 2ec1a0732f)
2026-11-07 02:14:51 +08:00
Lam Wei Lun 69f66d781e By layer: keep As object list copies in their list order (#17232)
By layer: order As object list copies by their list position

sort_object_instances_by_model_order() keyed every instance on its object's
index when it initialized the order, so all copies of an object tied.
print.objects() does not list the copies in list order either: copies with a
different rotation live in separate PrintObjects, ordered by transformation,
so the ties were broken by that grouping and the copies printed as 2, 4, 6,
1, 3, 5. std::sort reordering the ties made it worse from 17 instances up.

Number the instances by their position in the model's object and instance
lists instead. No order key repeats, so a plain sort is enough; the renumber
after it compacts this print's instances to 1..n. The other intra-layer orders
and the by-object path are unaffected.

The new test rotates every second copy, which fails on every platform before
this change, MSVC included.

(cherry picked from commit a620d804ef)
2026-11-07 02:14:51 +08:00
SoftFever ae73431f30 Enable vendor profile updates by default, except in stealth mode (#17289)
* always enable OTA

* Stop vendor profile update checks in stealth mode

* Keep vendor profile updates off in dev builds

(cherry picked from commit 637d7a9ce6)
2026-11-07 02:14:51 +08:00
HanifKoh 02169c4ff3 Keep a Filament Slot Past the Colour Arrays From Staying Frozen (#17262)
PlaterPresetComboBox::update() froze the combo and returned without
thawing it when the slot had no colour icon, which happens on a tool
changer whenever filament_presets is topped up to the tool count while
the colour arrays keep the project's shorter length. The leaked freeze
count left the combo unpainted for the rest of the session.

The slot now shows a blank swatch and still fills its list, and
update_ams_color() grows the colour arrays to the slot before writing,
as sync_colour_config() already does.

(cherry picked from commit 1a61ffd32e)
2026-11-07 02:14:51 +08:00
HanifKoh 2c7d5a4b88 Start the Orca Cloud Sync Cursor at Zero (#17263)
Fixes #17256

On a machine with no saved `sync_state`, the first `sync/pull` sent whatever was in memory as `?cursor=`. The server answered 400, nothing was downloaded, and the account's presets never arrived because only a 410 clears the cursor.

`SyncState::last_sync_timestamp` now starts at zero, so a session with no saved state pulls everything. `SyncPullResponse::next_cursor` had the same problem on a 304, where a stray value would have been saved to `sync_state` and sent on every later pull, so it and the other scalars in `ProfileUpsert` and `SyncPushResult` start at zero too.

(cherry picked from commit dd0079ec64)
2026-11-07 02:14:51 +08:00
Kris Austin b39046ad04 Fix the freeze before the Creality send dialog opens on a printer without a CFS (#17177)
Fixes #17128

Clicking Print on a Creality printer asked it for its CFS slots on the UI thread, with the 10 s command timeout. A K1C without a CFS never answers that query, so OrcaSlicer froze for 10 s on every click.

The send dialog now opens right away and reads the printer on a background thread. Upload works at once, and Upload and Print turns on when the read ends. The slot query waits 5 s, or the full 10 s once the printer reports `"cfsConnect": 1`, and stops as soon as it reports `"cfsConnect": 0`. When there is no filament mapping, the dialog says whether the printer reports no CFS, lists no slots, or can't be reached.

(cherry picked from commit 0b1d825142)
2026-11-07 02:14:51 +08:00
Ian Bassi 7fb4d72dff Draw the Spiral Inset icon as a square spiral that follows the outline
(cherry picked from commit 2873db9e06)
2026-11-07 02:14:51 +08:00
Ian Bassi 3886779138 Fill internal solid Spiral Inset with Arachne walls
Internal solid infill fell back to fixed width loops so that Arachne's open
walls would not be printed after an outward spiral, which ends at the edge
and travelled back to the centre for them. Fixed width loops leave strips
up to two lines wide in the middle of an island and wedges where it
branches: on calicat.3mf they need 218 mm of gap fill against 53 mm with
Arachne, and with gap fill off for internal solid those gaps stay empty.

Keep Arachne for every solid surface and print each open wall at the centre
end of the nearest spiral instead: before an outward spiral, which starts
there, and after an inward one, which ends there.

(cherry picked from commit 9afa96e92f)
2026-11-07 02:14:51 +08:00
Ian Bassi 9ccc83fc64 Print gap fill after the lines next to it in fills that keep their order
insert_gap_fill() put each piece of gap fill wherever it added the least
travel, which could be before the extrusions bordering it: the centre gap
of a Spiral Inset printed before the spiral that starts there, and gaps
where spirals meet printed before the later spiral. Each piece now only
goes after the last extrusion of its fill that passes within half its
widest width and a line spacing of it.

(cherry picked from commit 88c4c1e915)
2026-11-07 02:14:51 +08:00
Lam Wei Lun 05a9af75f9 Keep the Speed Dial anchored to the main window (#17242)
fix: keep the Speed Dial anchored to the main window

The dial is a long-lived hidden window. Its origin was computed once, at
construction (DPIAware's CenterOnParent and create_webview's), and never
again, so moving or resizing the main frame - or dragging it to another
display - left the dial at the centre of the frame's original rect. Wayland
only looked correct because the compositor places the window there.

Re-derive the origin from the parent's current screen rect on every open,
again once the window is mapped (GTK drops a position requested before the
map), and on a DPI change. The origin comes from the fixed 540x282 box
rather than the current client height, so the content-driven resize does
not move the window while the user types. On GTK, clear the dialog's
default CENTER_ON_PARENT hint so the window manager stops overriding the
computed coordinates.

The geometry is a free function, so the centring and the work-area clamp
are testable without a GUI.

(cherry picked from commit 78134d24c6)
2026-11-07 02:14:51 +08:00
TheLegendTubaGuy bd15c1c8c1 Connect the selected printer agent to a printer saved under the Orca agent (#17141)
A printer saved while its preset used the default Orca agent stayed tagged "orca" after the preset moved to another agent such as Moonraker. select_machine() reused that entry as is, but the new agent's machine list can't see it, so the printer never connected and filament sync did nothing.

select_machine() now re-inserts such an entry for the active agent, which retags it and replaces the placeholder access code with the preset's API key. Entries saved under any other agent are left alone, so a code entered for that agent is kept.

Fixes #17004

(cherry picked from commit a30aa7ba8d)
2026-11-07 02:14:51 +08:00
akaitsukiakari 035a96e968 Fix crash when syncing filaments after a plate is deleted (#17042)
The sync dialog is reused between syncs, and its plate index is left over from the last one. If that plate no longer exists, because it was deleted or a project with fewer plates was loaded, the next sync read the thumbnail of a null plate and crashed. reinit_dialog() now falls back to the current plate when the index is out of range.

(cherry picked from commit 70bc685101)
2026-11-07 02:14:51 +08:00
Valerii Bokhan 9ed545fae6 Fix Wipe Inward retraction splitting and sandwich wall offsets (#17160)
(cherry picked from commit 0b041740b1)
2026-11-07 02:14:51 +08:00
SoftFever d11925ea1c Split .py plugin dependencies only at the commas between items (#17196)
(cherry picked from commit 55e760a483)
2026-11-07 02:14:51 +08:00
Joseph Robertson 6bb2578951 Belt printer: lay the brim as high above the belt as the part's outer wall (#16757)
On a belt the brim and the part's outer wall didn't land at the same
height above the belt, so no single endstop or Y offset setting worked
for both (#16705). Brim lines sat at a fixed 0.75 layer height above
the belt. The outer wall where it rests on the belt sits half a layer
up, because the layer is sliced at mid-height, plus half its width
times tan(tilt), because it is inset half a width from the slice edge.
At 45 degrees with 0.32 mm layers and a 0.4 mm wall that is 0.24
against 0.36 mm. Brim lines now sit at the clearance of the outer wall
that rests on the belt in their own band's layer, with XY contour
compensation included. Each line's bead is built from its spacing and
clearance, so it fills its cell however small the clearance gets.
Flow::with_cross_section(), used before, delivers only a quarter of the
area once it falls back to a round bead.

The first-layer test measured from the nozzle, so a wall resting on
the belt never counted as first layer and printed at full speed with
the fan on, and the raised brim would have dropped out too. It now
measures from the belt under the edge of the bead. Travels use the
width of the path they lead to. Brim lines are as wide as the bands
are far apart, not as a bead, so they always count as resting on the
belt.

Speed, flow ratio and acceleration are chosen once per path, and a
wall loop runs from the belt up the part, so the whole loop took
whatever its seam point got. Belt paths are now cut where they cross
the edge of the first-layer band or a step of the slow_down_layers
ramp. Each piece is judged by the heights of all its points. Small-area
flow compensation keeps using the original line lengths.

Non-belt printers are unaffected.

Claude-Session: https://claude.ai/code/session_01Ux9BwdWCA7N8UG7ftaNkWg

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3ac1b0078d)
2026-11-07 02:14:51 +08:00
fa1k3 c66adc3534 Apply the Z shrinkage compensation once to the belt height (#16490)
On a belt printer the slicing height comes from the box of the mesh under
trafo_centered(), which already carries the shrinkage compensation, and
SlicingParameters::create_from_config() scaled it by the Z compensation again.
With a Z shrinkage above 100 % the top of the part was not sliced.

The belt build height check now also compares the compensated height when the
object is too tall, so an object that only fits after the compensation is no
longer refused.

Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit a837652833)
2026-11-07 02:14:51 +08:00
Lam Wei Lun 4144a06a33 FIX: Show the connected AMS type in the AMS settings dialog (#17159)
The supported AMS firmwares were stored in an unordered_map, so the AMS
type combo listed them in an unspecified order and then selected the
current firmware by treating its id as a combo row. With an AMS Lite
(id 0) the dialog showed "AMS/AMS 2 Pro/AMS HT", and choosing a type
sent the row index as the firmware id, so it could request the opposite
firmware.

Store the firmwares in a std::map, so iteration is ordered by firmware
id and the id stays a valid combo row index.

Fixes #17125

(cherry picked from commit a5210459ee)
2026-11-07 02:14:51 +08:00
HanifKoh f3e0e244e6 Read a Retyped Option From the Preset Cache as a JSON Profile Would (#17047)
A vendor's installed preset cache survives an app upgrade, and the
dictionary records the type every option was written as. When a build
reads a cache written by a build that typed an option differently, the
reader dropped the option and the preset fell back to the collection
default, which is not what the vendor's JSON says. enable_arc_fitting
became an enum in 2.5.0-beta, so every vendor whose bundle was not bumped
between the alpha and the beta now loads with arc fitting off from the
alpha's cache, and the alpha reads the beta's cache the same way.

Read such a value by the writer's type and hand its text to
set_deserialize through a scratch config, so handle_legacy and the
bool/enum substitution run on it exactly as for a JSON profile and a
failed parse leaves nothing behind. A text this build cannot place is
still dropped, reported once per key per file.

(cherry picked from commit 5fb129f1f3)
2026-11-07 02:14:51 +08:00
HanifKoh f2ad1c8536 Keep the Scarf Ramp at Its Exact Length Past a Vertex on a Straight Line (#17030)
A scarf ramp that would end less than half a step before the next loop
vertex was extended to that vertex, so that no flat stub follows the ramp.
Arachne places the wall's vertices a little differently on every layer, and
arc fitting moves them further, so the ramp grew by a different amount on
neighbouring layers: the scarf end, which the preview draws as the seam,
stepped sideways by up to half a step from one layer to the next.

Where the vertex lies within an eighth of a common line width of the
straight line from the exact ramp end to the vertex after it, measured in
3D so a Z contour is kept, the flat path now skips that vertex instead. The
ramp keeps its exact length and ends at the same place on every layer, and
the first flat segment is still at least as long as the one that followed
the vertex. At a corner, or when the vertex ends the path, the ramp is
extended as before.

(cherry picked from commit 6c96e41162)
2026-11-07 02:14:51 +08:00
HanifKoh 238b2b4ee9 Close the Settings and Object Searches on Esc (#17118)
On Linux, Esc in the settings search reached the printer or filament
settings dialog, which closed while the search popup kept its input grab.
On Wayland this froze the whole UI; on X11 the popup stayed on screen and
swallowed the next click. Esc in the object list search did nothing.

Both search popups now handle Esc themselves: it closes the search and
goes no further. In the settings search, focus returns to the search
button, so the dialog stays open and a second Esc closes it.

(cherry picked from commit 06bccd5570)
2026-11-07 02:14:51 +08:00
Ian Chua dacdb5a72d fix: revert native device tab flag (#17162)
(cherry picked from commit fcab66ca9e)
2026-11-07 02:14:51 +08:00
Rodrigo Faselli 44f792dbc3 Print bridges at bridge speed when slowing down for curled perimeters (#17144)
With slowdown_for_curled_perimeters on, the fully unsupported entry of the overhang speed table was overhang_4_4_speed for every role. Since #14735 samples the inside of a line, the unsupported middle of an anchored bridge strand got that speed. Bridge infill now uses bridge_speed there, like the branch without curled slowdown. Other roles keep their old speeds.

(cherry picked from commit 533d4c3e9e)
2026-11-07 02:14:51 +08:00
Noisyfox bf21673469 Fix Mesh Boolean crash on meshes with unreferenced vertices (#17080)
Mesh boolean crashed in the CGAL volume check when a mesh had vertices that no triangle used. The conversion to CGAL now removes those vertices and renumbers the rest. The conversion used by UV unwrapping still keeps the original vertex numbering.

(cherry picked from commit b3f8d0af15)
2026-11-07 02:14:51 +08:00
SoftFever af2ffb8cdd Keep the time-format tests passing when daylight saving ends (#17116)
(cherry picked from commit d1d8204dc1)
2026-11-01 17:55:38 +08:00
SoftFever ac5aa9c6c2 Show 3D-Fuel Pro PCTG ESD with its brand in the filament list (#17115)
(cherry picked from commit bb4c092ae4)
2026-11-01 16:02:37 +08:00
SoftFever a4c282c4a1 Bump version to 2.5.0-rc 2026-11-01 10:36:21 +08:00
SoftFever 645610f015 Let Slice and Print retry after a post-processing script or plugin fails (#17095)
(cherry picked from commit 1093ff0714)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy 8386727e1d Keep Short Objects on the Plate When Arranging By Object (#17011)
* Keep Short Objects on the Plate When Arranging By Object

Arranging objects shorter than the nozzle height for printing by object
placed them off the plate, and the plate then reported them too close to
each other (#16991).

- The arrange bed grew by half the extruder clearance radius, while short
  objects are only inflated by half the gap between them, so the extra bed
  was free to use. The bed now grows by the objects' actual inflation,
  after the bed margin is given back to the largest object.
- Arrange kept short objects 2 mm apart, but the sequential clearance
  check needs a nozzle diameter between them.
- Giving back the bed margin measures objects without that inflation,
  which only keeps objects apart, plus EPSILON so rounding still lets an
  object that fills the bed be placed.
- Exclusion regions are moved only when the bed grows, so short objects
  keep their gap to calibration regions on every side.

* Avoid objects at the bed edge and fit turned objects when arranging by object

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 041df4031e)
2026-11-01 09:53:53 +08:00
Felix14_v2 87c5122405 Review Russian localization AI updates (#16849)
* Update OrcaSlicer_ru.po

* Restore `G-code` translation removal

* Restore `G-code` translation removal 2

* Update OrcaSlicer_ru.po

* IMEX, color mixing, etc.

* More IMEX improvements

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Restore `G-code` translation removal

* Restore `G-code` translation removal 2

* Update OrcaSlicer_ru.po

* IMEX, color mixing, etc.

* More IMEX improvements

* Fix validation

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Remove old detailed pattern descriptions

(hopefully localized descriptions will be moved to wiki)

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Restore `G-code` translation removal

* Restore `G-code` translation removal 2

* Update OrcaSlicer_ru.po

* IMEX, color mixing, etc.

* More IMEX improvements

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Restore `G-code` translation removal 2

* Update OrcaSlicer_ru.po

* IMEX, color mixing, etc.

* More IMEX improvements

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

* Remove old detailed pattern descriptions

(hopefully localized descriptions will be moved to wiki)

* Update OrcaSlicer_ru.po

* Update OrcaSlicer_ru.po

(cherry picked from commit 4045a87b70)
2026-11-01 09:53:53 +08:00
Alexandre Folle de Menezes b8b685eddc Verify and improve AI pt_BR translations (#16871)
* Verify and improve AI pt_BR translations

* Fix typos and agreement left by the pt_BR term changes

Cabeçote is masculine and ponte feminine, so the switch from cabeça da ferramenta and pórtico left mismatched articles and pronouns. Also restore capitals on sentence-initial "Clique" and fix "rteservada".

---------

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
(cherry picked from commit 4ab172fd33)
2026-11-01 09:53:53 +08:00
Thalis Antunes 5c1fcb24c4 Remove settings OrcaSlicer ignores from the Sovol process profiles (#17085)
wall_loop_direction and initial_solid_infill_acceleration in the three
SV08 MAX processes, and minimum_sparse_infill_threshold in eight SV06 ACE
and SV06 Plus ACE processes, are not options OrcaSlicer defines. The
loader drops them, so removing them does not change the sliced output.
The SV06 ACE files already set minimum_sparse_infill_area.

Bump the Sovol bundle version to 02.04.00.09.

(cherry picked from commit 4274ea6bb3)
2026-11-01 09:53:53 +08:00
Alec Johnson 110f2d16ff 3D-Fuel Filament Profiles (#17032)
* Added 3D-Fuel filament profiles to
OrcaFilamentLibrary

* added esd filament to files

---------

Co-authored-by: Alec Johnson <ajohnson@3dfuel.com>
(cherry picked from commit 3ca96a0891)
2026-11-01 09:53:53 +08:00
Sezgin AÇIKGÖZ 7ba22d92dd Update OpenEYE Peacock V2 printer and process profiles (#17028)
Signed-off-by: Sezgin AÇIKGÖZ <sezginacikgoz@mail.com>
(cherry picked from commit efd65b7334)
2026-11-01 09:53:53 +08:00
Aditya-Sharma-12n 50d36709a4 Add BenFab 450 printer profiles (#16976)
Adds system profiles for the BenFab 450, a Klipper (Moonraker) FFF printer with a 426 x 426 x 480 mm build volume: 0.4/0.6/0.8/1.0 mm nozzle variants, Fine/Optimal/Standard/Draft processes per nozzle, OrcaFilamentLibrary generic filaments, cover image, bed model and texture.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit ffdb5da100)
2026-11-01 09:53:53 +08:00
Hugo Costa a3497164b9 Inline Machine start gcode for RF50 0.6 nozzle (#16932)
* Inline Machine start gcode for RF50 0.6 nozzle

The previous fix seperated the `machine_start_gcode` into
multiline strings sperated by commas which were then translated
to real commas on the RF50 0.6 nozzle profile. Now it's inline
and the gcode commands are only seperated by a newline. This way
there are no errors when printing with this profile and the correct
pressure advance is set when the print start.

* Bump up Blocks profile version

(cherry picked from commit eac3ba4416)
2026-11-01 09:53:53 +08:00
SoftFever 7df6907a78 Fix a crash when closing OrcaSlicer with a Bambu LAN printer connected (#17087)
(cherry picked from commit 5cc5fb7f9c)
2026-11-01 09:53:53 +08:00
SoftFever 3263e6a84b Remember the last printer and keep AMS-synced filaments across restarts (#17086)
(cherry picked from commit 913c622574)
2026-11-01 09:53:53 +08:00
SoftFever bc662830cf Link the bundled libjpeg instead of the system one on Arch Linux (#17082)
(cherry picked from commit 7af3995544)
2026-11-01 09:53:53 +08:00
SoftFever b51a538032 Read nozzle diameters correctly when the UI language uses a decimal comma (#17079)
(cherry picked from commit 27cafaa06c)
2026-11-01 09:53:53 +08:00
SoftFever a2acec57c4 Match the printer's loaded filaments when grouping filaments on dual-nozzle printers (#17074)
* Group a filament onto the nozzle that has it loaded in Filament-Saving mode

* Match closer colours and the same filament sub-type in Convenience mode

(cherry picked from commit 7b6c12cf74)
2026-11-01 09:53:53 +08:00
Kris Austin 4b3e4194ff Fix lightning infill hang when an overhang sample lands past the infill (#17066)
The lightning distance field samples each layer's overhang on a grid
anchored at the bounding box of the infill outlines. The opening it
applies to the overhang first can push a sample a little past that box.
Such a sample falls into its neighbor's grid cell or one update() never
visits, so it is never erased, and generateNewTrees() adds the same
point to the tree forever until memory runs out.

Grow the box to cover every sample. It only changes when a sample lies
outside it, and models that slice today give the same result.

Fixes #17051

(cherry picked from commit 7ac46c9a61)
2026-11-01 09:53:53 +08:00
SwineFlew931 df5f9d078d Keep Each Extruder's Values on User Printers With More Extruders Than Their Parent (#16536)
A user printer preset with more extruders than its system parent lost the extra extruders' values on load. The parent copy is now grown to the child's extruder count before the child's values are merged, in all three load paths.

Fixes #16535

(cherry picked from commit 9b4f84a923)
2026-11-01 09:53:53 +08:00
Arthur Porto ee6c30d5c1 Give each object the layer height limits of its own extruder, and compare layers rather than limits for the prime tower (#17000)
* Test the layer height limits taken for an object, and that they don't keep objects from sharing a prime tower

* Take the layer height limits from an object's own extruder, and don't let them refuse a prime tower

* Test the prime tower check through Print::validate(), and shorten the equal_layering comment

The test runs Print::validate() on two cubes, on filaments 1 and 3 of a printer whose first extruder allows thicker layers than the others. Without this PR, and with only the index fix, it fails with the refusal from #16938. It uses filament 3 because filament 2 read extruder 1's limits before the index fix.

---------

Co-authored-by: raistlin7447 <kris.austin@gmail.com>
(cherry picked from commit fcd96ad91c)
2026-11-01 09:53:53 +08:00
Ian Bassi f4bfb4660f Fix infill and surface filaments overriding each other in Filament for features (#17058)
(cherry picked from commit 304924a69a)
2026-11-01 09:53:53 +08:00
Kiss Lorand 414857c9d4 Fix build-plate-only tree supports inside XY clearance (#17060)
(cherry picked from commit a4a5100879)
2026-11-01 09:53:53 +08:00
Gazi Faysal Jubayer 61ad14148f Use the printing filament's retraction lift settings (#16965)
On a single-extruder printer with several filaments, every filament used filament 1's "Only lift Z above", "Only lift Z below", "On surfaces" and "Travel distance threshold" values, so a filament's own overrides of these settings were ignored. All four are now read for the filament that is printing.

Fixes #16185

(cherry picked from commit 98b539c3e6)
2026-11-01 09:53:53 +08:00
Ian Chua d23610b1c6 fix: flatpak bundle uv (#17045)
* fix: flatpak builds weren't bundling UV

* fix: prominently fail if no UV

(cherry picked from commit 52c50e626e)
2026-11-01 09:53:53 +08:00
Kris Austin 4e8c7bca6c Fix crash opening a project with missing or empty settings (#17040)
fix: crash opening a project with missing or empty settings

load_files reads filament_colour from the project config before the
defaults are merged in, and uses it without a null check. A 3MF whose
project_settings.config has no filament_colour crashes on open. The
2.3.1-alpha migration reads sparse_infill_rotate_template and
sparse_infill_pattern the same way.

Check those reads for null. A missing filament_colour keeps the count
at 1, and a missing infill pattern falls back to the default the merge
would apply. The two identical 2.3.1-alpha migrations become one lambda.

The 2.3.1-alpha and newer-version branches also skipped the empty-config
check, so an empty project config reached the same reads. Send every
project config the load skips through one fallback that loads the
geometry only and logs it. It keeps each branch's notice, and a
config-only import now says the 3MF has no project settings OrcaSlicer
can import instead of claiming to load geometry. A same-version file no
longer calls itself old.

Geometry-only imports decided by these checks never added filaments for
objects assigned past the first, because that step ran before them. Run
it after the checks. Count project filaments per file, and drop the two
branches at the end of the chain that no file type reaches.

Fixes #17008

(cherry picked from commit eda4062d68)
2026-11-01 09:53:53 +08:00
Ian Bassi a1bd5510ab Fix tooltip line breaks and ambiguous msgids in all languages (#17055)
(cherry picked from commit 3bc827066d)
2026-11-01 09:53:53 +08:00
Kiss Lorand 27117a1507 Fix transform gizmos not updating after pressing Tab (#16921)
Fix transform gizmo refresh after tabbing

(cherry picked from commit b1953ab423)
2026-11-01 09:53:53 +08:00
mgoiogana 26fc2968a8 Enable Basque language in preferences (#17052)
* Enable Basque language in preferences

Add Basque to the supported languages list and display it as Euskara in the language menu.

* only formating

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
(cherry picked from commit f894d08881)
2026-11-01 09:53:53 +08:00
SoftFever 2dc6f7b18f fix: Preserve inherited filament presets during AMS sync (#16986)
# Description

<!--
> Please provide a summary of the changes made in this PR. Include
details such as:
  > * What issue does this PR address or fix?
  > * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be
considered?
-->

When an AMS reports a system filament preset, syncing will replace a
custom preset based on it, losing the user’s overrides. Keep the
existing preset when it inherits from the reported preset, while still
syncing the tray’s filament data.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)

(cherry picked from commit db35f3d098)
2026-11-01 09:53:53 +08:00
HanifKoh 1020f9ad43 Keep the Canvas Printable State When the Scene Reloads a Volume (#17003)
Deleting the last modifier of an unprintable object painted it in its
normal colour again: ModelObject::delete_volume gives the remaining
volume a new id, reload_scene then builds a fresh GLVolume for it, and
nothing copied the instance's printable flag into the new volume. The
object list and the slice were right; only the 3D view went stale.

reload_scene now copies ModelInstance::printable into every GLVolume it
creates or reuses, so the canvas follows the model on every reload
instead of relying on each call site to refresh it afterwards.

Checked on Linux with a cube plus a block modifier saved as unprintable:
deleting the modifier turned the cube from grey to its normal colour
before, and leaves it grey now; toggling Printable from the object's
context menu still switches it both ways.

(cherry picked from commit 9e5110d593)
2026-11-01 09:53:53 +08:00
HanifKoh 347240ba35 Drop a Scheduled Print Host Upload When the Slice Ends Before It Is Queued (#17016)
A print host job scheduled by Print is moved into the print host job queue at
the end of prepare_upload(). When the run ended before that point, because a
post-processing script or a slicing-pipeline plugin failed in upload mode, or
because the slice was cancelled, the job stayed in m_upload_job. Every later
plain slice, even in a new project, then ran prepare_upload() again with the
first job's output name and uploaded (and printed) the file although only Slice
was pressed, until an upload succeeded or OrcaSlicer was restarted.

reset_export() runs after every completed, failed or cancelled slice and on a
new project, and already clears the export path for the same reason. Clear the
scheduled upload there as well.

(cherry picked from commit efe735853a)
2026-11-01 09:53:53 +08:00
Roman Romantsov 39408fa1f2 fix: fix no sparse layers during a toolchange (#15441)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
(cherry picked from commit 29e1899571)
2026-11-01 09:53:53 +08:00
Clifford 98b67a0227 Widen the post-slice extruder masks to 64 bits (#17002)
The post-slice check stored the extruders that can't print each filament as bits in an int. From the 32nd extruder on, the shift overflowed, and on x86 extruder 33's bit landed on extruder 1. limit_filament_maps and the printable area mask are now 64-bit, which covers MAXIMUM_EXTRUDER_NUMBER. Printers with up to 31 extruders get the same values as before.

The tests check the area, height and filament type limits on nozzles 2, 32, 33 and 64, and slice a cube on nozzle 64 of a 64-nozzle printer.

(cherry picked from commit 5ea64864ef)
2026-11-01 09:53:53 +08:00
HanifKoh 6421e35cdd Restore Read Access to the Extracted AppImage Before Repacking It (#17036)
The Linux build unpacks the AppImage to add the preset caches and packs
it again with appimagetool. The runtime extracts every directory as
0700, and appimagetool's continuous build 333 (2026-10-29) refuses to
pack a tree that other users could not read, so every Linux build has
failed at that step since. Give the whole extracted tree, caches
included, world read and execute access right before repacking.

(cherry picked from commit 3911c9a56e)
2026-11-01 09:53:53 +08:00
HMITCHR 8cf2482fcd Do not prebuild pages while a modal dialog is open (#16994)
On macOS the app could hang at 100% CPU when a project with customized
presets was opened into a running app and the message box was closed
while the idle prebuild was building the Project page's web view. The
web view waits for WebKit in a wxYield() loop, and closing the dialog
aborts the modal session, so the reply never arrives.

The idle scheduler now runs a slice only in the main event loop, so no
pages are built while a modal dialog is open. Building resumes when the
dialog closes.

(cherry picked from commit 3610d8bb35)
2026-11-01 09:53:53 +08:00
HanifKoh 39e3a42198 Tell a Printer Without a Filament System Apart From an Unreachable One When Syncing (#17021)
Synchronize filament list showed "OrcaSlicer can't connect to <printer>"
whenever the filament list came back empty. For pull-mode agents that is
also the normal outcome on a reachable printer that has no AMS, CFS or
other multi-material unit, so every such Moonraker printer was reported as
powered off or off the network.

When the printer is online and has already reported its status, explain
that it lists no filament system instead.

(cherry picked from commit 6112429980)
2026-11-01 09:53:53 +08:00
Maarten 4b58b52bef Add K1 Max to Creality CFS-capable models and K1 family, use the CrealityPrint host for all K1 profiles (#15858)
* Add K1 Max printer model to Creality multicolor capable prints

Not sure why, but for some reason the K1 Max is not under CFS-capable models while all others are.

This corrects that mistake

It also enables using the lidar (enableSelfTest) which the k1 max came with from the factory

* fix(CrealityPrint): treat K1 Max as a K1-family model

K1 Max firmware stores gcodes under /usr/data and uses the stricter
WebSocket protocol, so it needs the same handling as the other K1
models. Add it to is_k1_family().

* profiles: switch K1 Max to the CrealityPrint host

Mirror the rest of the K1 family (#14089): set host_type and
printer_agent to crealityprint so the K1 Max uses the CrealityPrint
LAN host instead of the generic Octo/Klipper host, and bump the
Creality profile version.

* fix(CrealityPrint): cover the K1 *_CFS-C model names

The CFS bundle variants report their own literal /info model names, so
list K1 Max_CFS-C, K1 SE_CFS-C and K1C_CFS-C in both the K1-family set
and the CFS-capable table, next to the existing K1_CFS-C entry.

Also refresh the discovery comments, which still described the K2
platform only.

* profiles: switch the remaining K1 CFS-C variants to the CrealityPrint host

K1 Max_CFS-C, K1 SE_CFS-C and K1C_CFS-C were the last K1 machine
profiles still on the generic Octo/Klipper host after #14089. Set
host_type/printer_agent to crealityprint like their non-CFS siblings.

* Recognise the Creality K2 SE (F016) as a CFS-Capable Printer

The Creality Print host gates CFS filament sync, the colour mapping in the
send dialog and the multi-colour start command on a model table that had no
entry for the K2 SE. Its firmware reports the model code F016, so a K2 SE
Combo was treated as a plain printer: the CFS was never queried, the
Moonraker fallback found nothing and the sidebar reported a connection
failure.

Add F016 to the table under the name Creality Print uses for it.

* Use the CrealityPrint Host for the K2 SE Profile

The K2, K2 Plus and K2 Pro presets talk to the printer through the
CrealityPrint host, which is where CFS sync, the colour mapping and the
multi-colour start command live. The K2 SE preset was still on the generic
Octo/Klipper host with no printer agent, so a stock K2 SE never reached that
code even once its model code is recognised.

Switch it to the same host and agent as the rest of the K2 family. The
bundle version was already raised in this change.

---------

Co-authored-by: Maarten <9350591+mjkl-gh@users.noreply.github.com>
Co-authored-by: Hanif Koh <hanifkoh@outlook.com>
(cherry picked from commit 88806ac63e)
2026-11-01 09:53:53 +08:00
Gazi Faysal Jubayer 45d0c77caa Give enum list options in the print config defaults their keys map (#16966)
Enum list options in the static print config defaults had no keys map. A config copied from them, such as `DynamicPrintConfig::full_print_config()`, wrote these options as an empty string and crashed when a name was read into one. `StaticCache::finalize()` now sets `coEnums` defaults from `create_default_option()`, which adds the keys map. Option values are unchanged.

Fixes #16964

(cherry picked from commit d28c71c485)
2026-11-01 09:53:53 +08:00
Kris Austin a45cd836d9 fix: slicing crash on an object too thin for any layer with a raft (#17013)
With a raft, an object too thin for any layer gets an empty layer
list. Two functions read it as if it had an entry.

- groupingVolumesForBrim() reads the first layer, and slice() calls it
  before its own check for an empty list.
- With Precise Z height on, adjust_layer_series_to_align_object_height()
  read the last entry. This also runs in Print::validate(), so it
  crashed before slicing started.

Both functions now return early on an empty list, so slicing reaches
the existing "No layers were detected" error.

Fixes #17009

(cherry picked from commit 59f0cc3806)
2026-11-01 09:53:53 +08:00
Kris Austin 61eb4622ea fix: Print plate and Send to Moonraker printers upload a 3MF zip as G-code (#16968)
With "Use printer agents" on, Print plate and Send on Moonraker-based printer agents uploaded the plate's .gcode.3mf bundle under a .gcode name, so Klipper read a zip as G-code and cancelled the print.

Both paths now upload the plate's G-code from the bundle, named after the job. Printers whose profile sets use_3mf keep getting the bundle, named <job>.gcode.3mf, and the Qidi agent's print start names the plate with plateindex. The print start quotes the file name, so job names keep spaces, apostrophes and non-ASCII letters.

Picks up #16453 by DIEHARDave, who wrote the plate G-code extraction for Print plate.

Fixes #16954

Co-authored-by: DIEHARDave <diehard.dave@gmail.com>
(cherry picked from commit 187baae4ee)
2026-11-01 09:53:53 +08:00
Kris Austin 5ca36251a2 Fix crash when transferring a post-processing script to another preset (#16963)
Transferring an unsaved post-processing script onto a preset with no scripts crashed Orca. apply_only called set_at() on the empty target list, and set_at() reads the list's first value. apply_only now gives an empty target list a first value, and an empty source list replaces the target list.

deep_diff now reports serialized lists (post-processing scripts and the flow compensation model) as one setting, through is_edited_as_whole_list(). Tab::options_list_storage_key uses the same check. The unsaved changes and Compare Presets dialogs show these lists the way the settings tab does.

(cherry picked from commit 98619b64a2)
2026-11-01 09:53:53 +08:00
HanifKoh fb9682c828 Bump wxWidgets to the Fork Commit With the Wayland Seat Release Fix (#17015)
* Update WxWidget Git Tag

* Bump the Flatpak wxWidgets Pin to the Same Commit as the Deps Build

(cherry picked from commit 40d7f25ff9)
2026-11-01 09:53:53 +08:00
SoftFever b0d42fa07b Fix crash on New Project after opening the Design tab (#16997)
# Description

Starting a new project or opening one could crash OrcaSlicer if the
Design tab had been opened earlier in the session and OrcaSlicer wasn't
the active window at that moment. It no longer crashes, and the Design
tab is still cleared for the new project as before.

Only reachable with the CAD feature turned on. No change to slicing or
to project files.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

Reproduced on a Windows Release build of a feature branch that has the
same code, by driving New Project with OrcaSlicer visible but not the
active window and a debugger attached. Before the change it crashed with
the same stack as the original crash log. After it, the same steps
finish without a crash. This branch (main plus the change) wasn't built
on its own. There's no automated test, because the crash needs a real
change of window focus.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)

(cherry picked from commit 0db324476f)
2026-11-01 09:53:53 +08:00
Lam Wei Lun 858a32c6dd Fix Full Publish variant layout and project round trip (#17014)
* fix: keep a Full Publish copy's variant vectors and list in step

A published Full entry clones the receiver's filament preset and overlays
the author's values, but the copy's variant list was rewritten to the
author's columns even when a variant-bearing key could not be filled from
the file. That key kept the receiver's width while every reader sizes the
layout from the list, so one variant silently read another variant's
value.

Copy a variant key only when the file carries all of the author's
columns, then drop any remaining variant key whose length disagrees with
the author's column count, and set the list last. filament_extruder_variant
is itself a member of filament_options_with_variant and is skipped by that
cleanup. The layout joins the entry's dedup key, so two entries naming one
preset but carrying different variants cannot share a copy.

A Full copy is detached and parentless, which also meant it never reached
the receiver's saved project: get_preset_differed_for_save stored no diff
without a parent, and load_project_embedded_presets dropped a preset whose
inherits did not resolve. Embed a parentless preset with its whole config
and resolve it over the default preset on load, mirroring the custom-root
branch of the user-preset loader. A preset naming a missing parent is
still dropped.

Tests: a Full copy drops a variant key the file cannot fill; a parentless
project-embedded preset keeps its own variants on reload.

* fix: stop relabelling and truncating published filament variants

Review of the previous commit found three paths that still let a Full
Publish copy or a loaded preset describe variants its vectors do not
hold.

set_num_filaments resizes every key in m_filament_option_keys to the
filament count, and two of those keys (filament_retract_length_nc and
volumetric_speed_coefficients) are variant-bearing. Loading a
multi-variant preset, including a saved Full copy, truncated them to the
first variant, which readers then hid by clamping. Skip variant-bearing
keys there, as Preset::normalize's own pass already does.

A variant key the file did not carry was kept whenever its width matched
the author's column count, then relabelled with the author's variant
names. When the receiver lists the variants in another order, that puts
one variant's value under another's name. Keep the key only when the
receiver's list is the same layout, or it holds a single value; otherwise
drop it and report it in skipped_keys.

An imported material key that names a file column but is per-slot in this
build was read positionally, returning another slot's column. Skip and
report it instead.

Also narrow the parentless project-embedded preset path to a filament
preset that carries a variant layout, and keep a failed apply from
aborting the whole project load.

* test: store filament_retract_length_nc as the nullable option it is

The filament count test set the key through the non-nullable accessor.
The option's default is ConfigOptionFloatsNullable although the
definition says coFloats, so the value was written through the wrong
dynamic type and the later lookup returned null. Use the nullable
accessor and assert the lookups succeed instead of dereferencing blindly.

(cherry picked from commit 45a29d391b)
2026-11-01 09:53:53 +08:00
Lam Wei Lun 181e64fd78 Fix Publish 3MF export and import of filament variants (#16984)
* Fix Publish 3MF export and import of filament variants

Variant-bearing filament keys (filament_options_with_variant) hold one
value per (slot, variant) in the uncompacted config, but the published
path addressed them by slot: export kept the wrong column once an
earlier filament had more than one variant, import wrote every material
key to receiver variant 0, and Full Publish copied a single variant.

Add a column model in PublishSettings: file columns from
filament_self_index, exact variant matching, and the column a slot
actually prints with (filament_map / filament_volume_map / nozzle
types, hybrid mapped through the slot's own volume type). Export
rewrites partial material entries to base#col, masks those keys by
column instead of slot, and drops a key whose column is foreign, out of
range, or whose vector does not match the file layout. Import maps
base#col back to the receiver preset's variant with the same name and
skips (reports) a miss instead of writing variant 0; plain keys from
older publishes keep the positional import. Full Publish copies every
variant of the author's slot and sets the copy's
filament_extruder_variant.

No new file keys: variant-bearing material keys gain a #col suffix.
No UI change in this commit.

* Fix missing includes

* Fix unit tests

* Fix unit tests

(cherry picked from commit c0efd44e56)
2026-11-01 09:53:53 +08:00
HanifKoh a02f6ed9be Validate Only the Edited Variant's Adaptive PA Model and Accept Spaces in It (#16978)
* Validate Only the Edited Variant's Adaptive PA Model and Accept Spaces in It

Since pressure advance became a per-variant filament setting, the Filament
tab validated every variant column of the adaptive pressure advance model
whenever one was edited. The columns the user never touched still hold the
default placeholder, which the validator rejects, so every edit of a
multi-variant filament ended in a "Line 1: flow value must be greater than PA
value" dialog about a column the user could not see. The check now covers the
variant being edited only, as the nozzle temperature checks on the same tab do.

The validator also rejected whitespace between the values, which the model
parser accepts, so a model typed as "0.027, 8.1416, 2000.0" sliced correctly
but warned on every slice. Whitespace is now ignored before the values are
checked.

Enabling adaptive pressure advance before entering a model warned that the
model "may contain invalid values", which only meant that the placeholder is
all zeros. That case now gets its own warning saying that no measurements
have been entered.

* Keep the Empty Adaptive PA Model a Single Filament Column in Its Test

Deserializing an empty string into the model option leaves it with no
entries, and get_at on an empty vector aborts on a libstdc++ built with
assertions, as the Flatpak unit-test lanes are. Presets always hold one
column per filament, so set the value directly.

(cherry picked from commit 2cb2f0d2e7)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy e8924f30d7 Fix printer agent firmware check and send dialog name list (#16970)
MachineObject::upgrade_display_state lost its initializer when it became an enum, and only Bambu status messages assign it. Printer agent printers (Moonraker, Qidi) kept whatever value was in memory, so the Print and Send dialogs could block an idle printer as "updating firmware". It now starts at UpgradingUnavaliable, the value it had before.

The Send to Printer dialog now labels printers with get_shown_printer_name(), so printer agent printers show "Name (IP)" and Bambu labels are unchanged. Printers that share a name each get their own entry, where before every entry pointed to the first printer with that name.

(cherry picked from commit d81a212f53)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy 7050df0513 Fix camera orbit speed multiplier ignoring decimals in non-English languages (#16967)
The orbit multiplier preference is stored with a decimal point, but was
parsed with std::stod, which follows the C locale set by the interface
language. With a comma-decimal language, 0.99 parsed as 0 (frozen camera)
and 1.99 as 1. Parse it with string_to_double_decimal_point instead.

Fixes #11534

(cherry picked from commit 2e562e8b9e)
2026-11-01 09:53:53 +08:00
Gazi Faysal Jubayer bbffe8f4df Use the assigned filament's settings in the PA Line calibration test (#16882)
The PA Line test took its speed limit, line width and extrusion from filament 0, whatever filament the test was assigned to. On any other AMS slot or filament, the test printed with the wrong speeds and the wrong extrusion (#16530).

The test now uses the filament the G-code generator has selected for it:
- the fast lines are capped by that filament's max volumetric speed;
- the line width uses the nozzle diameter of that filament's extruder;
- the lines and the number box use Extruder::e_per_mm() times print_flow_ratio, like a regular print.

With one filament whose flow ratio is not 1, the PA lines now use that flow ratio too. PA Pattern output is unchanged.

Adds a regression test that checks the PA line feedrate and extrusion for a test assigned to the second of two different filaments.

(cherry picked from commit 4b68224ff4)
2026-11-01 09:53:53 +08:00
sirjassam 9af2f10adf Add PrintaLot PLA profiles for Bambu Lab printers (#16951)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
(cherry picked from commit f0827063bd)
2026-11-01 09:53:53 +08:00
Nathan 54984de655 Fix STL export creating duplicate file extensions (#15296)
Strip known model extensions from object names in per-object STL export, so `bracket.stl` exports as `bracket.stl` instead of `bracket.stl.stl`. Leading and trailing dots and spaces are trimmed too, so names like `.stl` no longer become hidden files.

Co-authored-by: yw4z <ywsyildiz@gmail.com>
(cherry picked from commit 7349ea795b)
2026-11-01 09:53:53 +08:00
HanifKoh b7d1361be9 Match BBLModelTask to the 02.08.04 Plug-in's Layout (#16973)
The 02.08.04 Bambu network plug-in series appended four strings to
BBLModelTask (design_title, title, instance_title, create_client).
get_subtask() hands the plug-in an OrcaSlicer-allocated BBLModelTask to
fill in place, so the plug-in wrote 128 bytes past the end of the object
and corrupted the heap as soon as the Device tab fetched the subtask of a
connected printer. Routing get_subtask through the Bambu agent (#15908)
exposed it; before that the call hit the Orca Cloud stub.

Add the members so the object is as large as the plug-in's. Older
plug-ins fill only the leading members and leave these empty.

(cherry picked from commit 8c2c16f318)
2026-11-01 09:53:53 +08:00
HanifKoh 7436883c19 Prune the Cached Preset JSONs Once for All Windows Targets (#16926)
* Prune the Cached Preset JSONs Once for All Windows Targets

build_preset_cache.bat pruned each target on its own, reading every
vendor's preset list from the checkout's <vendor>.json. CI names the
checkout as the first target, and pruning it deletes those files, so the
install tree that the portable zip and the MSIX are packed from only
lost the 71 vendor JSONs and kept all 14,600 preset JSONs next to the
caches. The prune also started one PowerShell per vendor and deleted
file by file, which took 28 minutes on the Windows arm64 runner against
under a minute on x64, and set the wall clock of every PR.

The pruning moves to prune_cached_presets.ps1, run once for all targets:
it reads every vendor profile before touching any target and deletes in
a single process, printing how long each target took. The batch script
only validates the targets, installs the caches and queues them.

A test suite exercises the script on a made-up profiles tree, including
the source-then-install-tree order CI uses, and runs in the Windows build
script tests job.

* Resolve the Prune Script Next to the Repo Root, Not %0

The prune label runs after the argument loop has shifted %0 along with
the rest, so %~dp0 named the last target's directory and PowerShell
could not find the script. REPO_ROOT was captured before any shift.

* Read the Preset List From the Target's Own Profile in the Shell Script

The shell script read each vendor's preset list from the source profiles,
which is gone once an earlier --prune-source target has been pruned. No
caller passes the source as a target today, so this is the same latent
dependency the batch file had, removed before it bites.

Ported from https://github.com/OrcaSlicer/OrcaSlicer/pull/16975.

---------

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
(cherry picked from commit 541ff1da58)
2026-11-01 09:53:53 +08:00
Rui Valim db53e2ca57 Fix Creality Hi CFS filament sync over Moonraker (#15857)
The Creality Hi runs Moonraker but reports its CFS in the `box` printer object, which the Moonraker agent didn't read, so filament sync found no slots. The agent now queries `box` when it finds no lane data or Happy Hare, and the parser lives in `Utils/CrealityCfs.cpp`. Creality material IDs map to filament types, with the K2 family's `same_material` list as a fallback for branded spools.

`update_filament_multi_color()` no longer stops at the first slot without a multi-colour list. It uses the slot's own colour instead, so the list stays aligned with the filament list and selecting a later filament no longer writes past its end.

The CrealityPrintAgent fallback no longer syncs a preset of a different material when no base preset of the reported type exists.

The K2 Plus `same_material` fallback is from mattjanus.

Co-authored-by: mattjanus <18539984+mattjanus@users.noreply.github.com>
(cherry picked from commit d67e0d8dc4)
2026-11-01 09:53:53 +08:00
SoftFever 4c9ea56314 Fix Windows startup failure on an OrcaSlicer.conf without a trailing newline (#16983)
# Description

On Windows, OrcaSlicer refused to start with "Orca Slicer GUI
initialization failed: invalid string position" when `OrcaSlicer.conf`
ended right at its closing brace, as it does after a person or a tool
edits and saves it. Such a file now loads, and the missing checksum is
only logged, as it already was for a checksum that doesn't match. A
backup `OrcaSlicer.conf.bak` without its checksum line no longer crashes
the recovery path either; as before, it is not used to restore a
corrupted configuration.

No change for configuration files the app saved itself: their checksum
is still verified.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

New `[AppConfig]` tests load a configuration without the checksum line
(ending at the brace, and at a newline), restore a corrupted
configuration from a backup whose checksum matches, and leave a backup
without its checksum line unused. The two regression tests fail without
the fix with "invalid string position" and pass with it; the full test
suite passes on Windows.

By hand on Windows: a build without the fix shows the initialization
error on a configuration ending at its brace, this branch opens the main
window on it, and restarting on the configuration the app then saved
logs no checksum warning.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)

(cherry picked from commit 4720370149)
2026-11-01 09:53:53 +08:00
Kris Austin cb770802c4 Fix AltGr typing in settings boxes switching tabs, and add go-to shortcuts for the other tabs (#16918)
Remove the old Ctrl+1 to Ctrl+4 key handler on settings fields. wxWidgets reports AltGr as Ctrl+Alt, so on AZERTY and similar layouts, typing `{`, `~` or `#` in a multi-line settings box switched the main tab. The handler was also outside the shortcut registry and clashed with the Ctrl+1 to Ctrl+4 camera shortcuts.

Add unbound "Go to the ... tab" shortcuts for Home, Design, Multi-device and Calibration, next to the Prepare, Preview, Device and Project ones from #16301.

Fixes #9649

(cherry picked from commit 42608687e5)
2026-11-01 09:53:53 +08:00
Eldenroot 0b2cb5ac48 ENH: Configurable shortcuts to switch between the main tabs including tab switching (#16301)
Adds unbound shortcuts to jump to Prepare, Preview, Device and Project, and Ctrl+Tab / Ctrl+Shift+Tab to cycle through the tabs. Cycling wraps around, skips tabs that refuse the switch, and moves focus to the tab bar on web pages so the next key press still works.

(cherry picked from commit af16875afb)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy 89fa736737 Fix center of mass details, belt preview and section view bugs (#16958)
* Fix center of mass details, belt preview and section view bugs

Fixes the center of mass bugs from #16781 (center of mass a-d and
rendering b).

- The details box follows its marker, so zooming toward the cursor
  could slide it under the mouse, where ImGui took the wheel and
  zooming stopped. The wheel now zooms over the box.
- Esc closes the details box. A click on a marker now focuses the 3D
  view first, so Esc reaches it after typing in a sidebar field.
- On belt printers the Preview markers stayed in the raw G-code frame
  while the upright view draws the toolpaths back-transformed. The
  masses now get the toolpaths' transform. It shears, so the second
  moments are kept as a full 3x3 matrix to keep the moments of
  inertia right, and the bounding box rows are left out for a map
  that mixes the axes, where the box of the mapped corners would be
  far too large.
- At the top layer of the slider the solid marker of what is printed
  so far covered the faded finished-print one, which could not be
  clicked. At the top layer only the finished print's markers show,
  drawn solid.
- The section view cuts a marker away when its center is on the cut
  side, as it does the toolpaths' option markers.

* Keep the belt bounding box and store six second moments

- Belt prints keep the bounding box rows in the details. The G-code
  back-transform moves from GCodeViewer into
  BeltTransformPipeline::build_gcode_back_transform(), and on a belt
  print the processor keeps a second box per mass, of each segment's
  ends and bead height mapped by its linear part. ObjectMass::transform()
  moves that box by the translation, instead of dropping the box that
  the shear would blow up.
- A mass stores its second moments as the diagonal and the three cross
  terms instead of a full matrix, which is built only to transform it.

(cherry picked from commit e66569a966)
2026-11-01 09:53:53 +08:00
Lam Wei Lun f13335ee0c Publish per-extruder process settings in the Publish 3MF dialog (#16971)
* Publish per-extruder process settings in the Publish 3MF dialog

Process settings that differ per extruder (speeds, accelerations, jerk,
top surface flow ratio) were published as one row showing extruder 1 and
exported as the whole vector, so the dialog could not select an extruder's
value and checking the row shipped every extruder's value.

- Dialog: one tab per extruder, as in the Printer section. On a
  multi-extruder printer the tabs sit behind a MultiSwitchButton below the
  page tabs; each row is keyed "key#N" and reads the uncompacted config.
  Pre-check follows each row's own key. Single-extruder printers get one
  "Extruder" page tab.
- Export: "key#N" process keys are masked to the checked slot, as printer
  keys already are.
- Import: the file carries the author's print extruder layout. Process keys
  map by extruder number and nozzle type on multi-extruder receivers.
  Single-extruder receivers keep the positional import. Files without the
  layout keep the positional import.
- Reopening a file without the layout: its "key#N" process entries select
  that setting on every extruder, so re-publishing keeps the values it had.
- MultiSwitchButton gains Unselect(), which clears the selection without
  an event.

* Fixes clang-tidy

* Fix per-extruder masking test to use the nullable outer_wall_speed type

outer_wall_speed is ConfigOptionFloatsNullable, so the ConfigOptionFloats
casts in the test returned null and the test segfaulted.

(cherry picked from commit aa3291b380)
2026-11-01 09:53:53 +08:00
Gazi Faysal Jubayer 9aa9c61fc3 Set the Snapmaker U1's printer structure to CoreXY (#16914)
The U1 profiles never set printer_structure, so every U1 preset showed Undefined. Set it to corexy on fdm_U1, the base all five U1 nozzle presets inherit, and bump the Snapmaker bundle version to 02.04.00.20.

Slicing output is unchanged: the code only branches on i3, so CoreXY and Undefined take the same paths.

Fixes #16413

(cherry picked from commit 3322f6101c)
2026-11-01 09:53:53 +08:00
yw4z 7d51b5e9b3 Fix crash at exit from the preset sync thread (#16948)
The preset sync thread pushed bundle notifications to the notification manager directly from the thread. At exit the Plater is destroyed before OnExit() joins the thread, so a pass still running could crash in push_notification_data().

The notifications are now pushed on the GUI thread with CallAfter() and dropped once the app is closing or the sync is stopped. The bundle loop also returns as soon as the sync is stopped, so the thread exits quickly and does not delete the subscribed bundles it did not reach.

(cherry picked from commit e410cf3656)
2026-11-01 09:53:53 +08:00
Fernando Marino` fe8c44b7bb Fix filament slot editor desync across multi-material presets (#15896)
On printers where a filament slot's edit button opens the editor directly (IDEX, toolchanger, multi-extruder), cancelling the unsaved-changes dialog wrote the preset still open in the editor into the clicked slot.

- `switch_to_tab()` now compares the slot's assigned preset with the one open in the editor to decide whether to reload.
- The edit button sets `editing_filament` only after `switch_to_tab()` succeeds, as `Sidebar::edit_filament()` does.
- `UnsavedChangesDialog::build()` checks the `find_preset()` result for null.

Fixes #15767

(cherry picked from commit 5897d95d4d)
2026-11-01 09:53:53 +08:00
Lam Wei Lun 16b9b18f26 Fix Publish 3MF showing Undefined for extra printer extruders (#16940)
* Fix Publish 3MF printer extruder values showing Undefined

The Publish dialog indexed printer per-extruder rows by variant column
but read them from full_config(), which compacts those vectors to one
slot per extruder. Read the Printer rows from full_config(false) instead.

Inherited printer per-variant vectors also kept the root's length, so a
printer with more variants than its root had no value for the extra
variants. Pad them to the printer's variant count after inheritance.

* Map published printer keys to the receiver's extruder with the same number

A published printer key used to land on the receiver's slot with the
same index, so the author's layout decided the target. Files now carry
the author's printer_extruder_id and printer_extruder_variant. On import,
each key goes to the receiver's extruder with the author's number, when
that extruder currently runs the author's nozzle type. Anything else is
left unapplied and reported. Files without the layout keep the positional
import.

* Fix clang-tidy

(cherry picked from commit 97e6c71793)
2026-11-01 09:53:53 +08:00
Eminy 648d4b9448 Update Turkish translations (#16943)
* Update Turkish translations

* Match option names to the existing Turkish labels

* Drop the AI Translated comments from the reviewed Turkish entries

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
(cherry picked from commit 3936995b6e)
2026-11-01 09:53:53 +08:00
Downtime d5746f44c1 fix(gui): improve code -1 connection failure guidance (#16273)
When the Bambu network plugin reports a failed LAN connection with code -1, the dialog now lists three things to check under the existing error line. They cover the network and IP address, the network plug-in version in Preferences, and a missing or damaged certificate in printer.cer.

The error line keeps its existing msgid, and each hint is its own translatable sentence.

(cherry picked from commit 731a08d1c6)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy fc409ef862 Apply the print dialog's Box mapping on Qidi printers (#16723)
With printer agents on, the Qidi agent now uses the Box slot picked for each filament in the print dialog. After the upload it writes `SAVE_VARIABLE VARIABLE=value_t<n> VALUE="'slot<m>'"` for each mapped filament, which the firmware's T<n> macros read. Then it starts the print through `/printer/print/start`, because the Max 4, Q2, Q2C and Plus 5 only open prints from the copy that Moonraker's print start makes.

- `MoonrakerPrinterAgent::start_local_print` now ends with a virtual `print_uploaded_file()`. The default still sends `SDCARD_PRINT_FILE`, so other Moonraker agents are unchanged.
- Box units show as "Qidi Box 1", "Qidi Box 2". Agents can set an optional `display_name` on an AMS unit.
- New agent flag `native_device_tab`. Qidi sets it to false, so its native Device and Calibration tabs are hidden and the web page becomes the Device tab.
- The Moonraker agent retries its first connection with the status stream's backoff. A disconnect, a newer connection or closing the app stops the retries.
- The print dialog fetches filament data itself for agents that only send it when asked, so the slot picker shows the Box units without a sidebar sync.
- Agent printers show their address in the print dialog's printer list instead of "(LAN)". Bambu printers keep "(LAN)".
- A single nozzle whose size the printer hasn't reported shows no size instead of "Unknown".

(cherry picked from commit b6ca378b23)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy dec2b2526d Fix realistic view shadows for by-object prints and the section view (#16942)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
(cherry picked from commit 9c3b0a86e1)
2026-11-01 09:53:53 +08:00
Ian Bassi 43aead7a00 Fix support painting overhang highlight missing faces at the threshold angle (#16957)
(cherry picked from commit e105d3c587)
2026-11-01 09:53:53 +08:00
Clifford cb63d7933f Check mixed filaments against their component filaments' extruders (#16947)
A mixed filament prints with its component filaments, each on its own extruder, but the placement checks resolved it as a filament of its own. On non-Bambu multi-tool printers this could block an object because an extruder that prints none of the components can't reach it, or allow it when a component's extruder can't.

Mixed filaments are now expanded to their components before extruder resolution in the printable area check (GUI and CLI), arrange and the exclusion volume preview, Print::validate(), and brim and support exclusion clipping.

Fixes #16945

(cherry picked from commit 59aa101ea6)
2026-11-01 09:53:53 +08:00
Grzegorz Libiszewski 9c57223a6f Allow network upload of manual multi-material prints to Flashforge printers without IFS (#15547)
Uploading a multi-filament plate to a Flashforge printer failed with "Enable IFS" even when the printer has no IFS and the profile uses Manual Filament Change. The upload dialog now skips the IFS requirement when Manual Filament Change is on, and starts with IFS unchecked in that case on printers that have one.

Fixes #15307

(cherry picked from commit 6d2869c430)
2026-11-01 09:53:53 +08:00
foXaCe 0004d9cfeb Fix Qidi exported filename showing slot-1 material instead of the printed one (#16922)
fdm_process_qidi_x3_common used {filament_type[0]} in filename_format, so files were named after the material in filament slot 1. Use {filament_type[initial_tool]} like the other Qidi process presets, and bump the Qidi profile version to 02.04.00.20.

(cherry picked from commit 9f39b8347f)
2026-11-01 09:53:53 +08:00
Clifford 46ede196f2 Fix false "G-code path exceeds the printable range" when an extruder area is inset on several sides (#16931)
The post-slice check compared each path with the bounding box of the region its nozzle can't reach. When the nozzle's printable area is inset on two or more sides, that region is L-, U- or frame-shaped and its box covers the whole bed, so every slice failed. The check now tests the path's box against the region itself, and the same result sets limit_filament_maps.

Fixes #15746

(cherry picked from commit b7ecf1b295)
2026-11-01 09:53:53 +08:00
SoftFever b02ce52cc8 Fix macOS notarization stapling failing on GitHub-hosted runners (#16939)
Since mid-October, `xcrun stapler staple` on GitHub-hosted macOS runners loses its connection to Apple's ticket service (-1005, Error 68) after notarization is accepted, and all three retries fail. The stapler fetches the ticket over HTTP/3 on UDP 443, which the hosted runners drop (actions/runner-images#14924). A new step blocks outbound UDP 443 before signing, so the stapler uses TCP. It is skipped on self-hosted runners, where the firewall rule would outlive the job.

(cherry picked from commit e4e00e9746)
2026-11-01 09:53:53 +08:00
Eric Lin db77fae73c Fix Slice sometimes needing a second click (#15180)
The GUI re-applies the unchanged config after every slice. filament_map, filament_volume_map and filament_nozzle_map are adopted from the new config but were left in full_config_diff, because the erase was commented out. That invalidated psGCodeExport on every reapply, so the slice that had just finished was thrown away. Erase them from full_config_diff too, including filament_nozzle_map in manual map mode.

(cherry picked from commit 7125a546b8)
2026-11-01 09:53:53 +08:00
SoftFever 345efec64c Merge branch 'main' into release/v2.5.0 2026-10-27 22:30:27 +08:00
SoftFever 97861cc2c9 Merge branch 'main' into release/v2.5.0 2026-10-27 13:53:39 +08:00
SoftFever 147fce7cc7 bump version to 2.5.0-beta 2026-10-27 00:34:06 +08:00
SoftFever 7872ee18c4 Merge branch 'main' into release/v2.5.0 2026-10-27 00:33:01 +08:00
SoftFever 3880f2c58e Bump version to 2.5.0-alpha 2026-10-16 18:52:11 +08:00
821 changed files with 57273 additions and 45434 deletions
@@ -373,7 +373,7 @@ current `boost::any m_value`. Virtuals: `BUILD()`, `set_value(any, change_event)
`toggle(en)` enables only when not `readonly`. Subclasses: `TextCtrl`, `CheckBox`, `SpinCtrl`, `Choice`,
`ColourPicker`, `PointCtrl`, `StaticText`, `SliderCtrl`, `PrinterAgentChoice`, `PluginField`,
`PluginConfigField`. `Field::Create<T>(parent, def, id)` constructs, runs `PostInitialize()` (em unit,
`parent_is_custom_ctrl`, `BUILD()`, readonly → `disable()`, Ctrl+1..4 tab shortcuts on the window) and returns a
`parent_is_custom_ctrl`, `BUILD()`, readonly → `disable()`) and returns a
`std::unique_ptr<Field>` owned by `OptionsGroup::m_fields`. The subclass `CheckBox` shadows the global `::CheckBox`
widget inside `Slic3r::GUI` wherever `Field.hpp` is visible, which is why widget code there writes `::CheckBox`
(and qualifies `::TextInput` / `::ComboBox` the same way) (`references/orca-widgets.md`).
@@ -81,6 +81,11 @@ Contents: [Rules](#rules) · [1. Choosing the window kind](#1-choosing-the-windo
tooltip of a widget in that popup, or in a popup opened from it, is on screen: the tooltip has taken the
keyboard while the user is still on the popup. `PopupWindow::topWindowActiavate` does it for every Orca popup;
a popup outside `PopupWindow` with such a hook must do it itself. (§9)
31. When a dialog that hides on deactivation closes by itself, find the code that activated another window
instead of hardening the hook: on wxGTK, `SetFocus()` on a child of a visible, inactive toplevel presents
that toplevel. A handler bound on a book control acts only on events whose object is that book, because a
page-changed event from a book inside a page propagates up to it. A deferred, re-checked hide tolerates only
a focus bounce shorter than its delay. (§10)
## 1. Choosing the window kind
@@ -827,8 +832,9 @@ created with `wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxF
- `wxFRAME_NO_TASKBAR` gives no taskbar entry on MSW/GTK, on GTK only when the WM supports
`_NET_WM_STATE_SKIP_TASKBAR` (`interface/wx/frame.h:97-103`).
- `wxFRAME_FLOAT_ON_PARENT` requires a non-null parent (`interface/wx/frame.h:104-106`).
- Its `wxEVT_ACTIVATE` handler hides on deactivation and `Skip()`s. On activation it focuses the web view, because
modeless focus is granted asynchronously and a focus request made right after `Show()` is dropped.
- Its `wxEVT_ACTIVATE` handler focuses the web view on activation, because modeless focus is granted
asynchronously and a focus request made right after `Show()` is dropped. It hides on deactivation after a
short settle delay and a re-check of `gtk_window_is_active()` (Pitfalls below), and it `Skip()`s.
- On Linux `focus_webview` grabs focus on the WebKit native widget (`gtk_widget_grab_focus` on
`GetNativeBackend()`). `browser()->SetFocus()` focuses only the container.
- Display-only web content can stay in a transient popup (`MarkdownTip`).
@@ -847,13 +853,39 @@ created with `wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxF
wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxFRAME_SHAPED)
{
Bind(wxEVT_ACTIVATE, [this](wxActivateEvent& e) {
if (e.GetActive() && IsShown()) focus_webview(browser(), m_page_ready);
else if (!e.GetActive() && IsShown()) Hide();
if (!IsShown()) { e.Skip(); return; }
if (e.GetActive()) { m_hide_timer.Stop(); focus_webview(browser(), m_page_ready); }
else schedule_hide(); // validated, see the next rule
e.Skip();
});
}
```
Cite: f142716e51, a86202b45b (`SpeedDialPopup.cpp` replaced by `SpeedDialDialog.{hpp,cpp}`; `GUI_App.cpp`).
- **Rule:** When a dialog that hides on deactivation closes by itself, find the code that activated another
window; do not harden the dismissal hook. A handler bound on a book control checks that `e.GetEventObject()`
is that book before acting.
**Why:** On wxGTK, `wxWindow::SetFocus()` on a child of a visible but inactive toplevel calls
`gtk_window_present` on that toplevel (`src/gtk/window.cpp:5157-5162`), so an unexpected `SetFocus()` anywhere
in the main frame takes the keyboard from a modeless dialog that hides on deactivation. The Speed Dial closed
by itself a moment after the first Space on Linux (GNOME and KDE, X11 and Wayland): the idle builder
constructed the Calibration page, whose `Tabbook::InsertPage` emitted `wxEVT_BOOKCTRL_PAGE_CHANGED`; the event
propagated, as every `wxNotifyEvent` does, to the main frame's `m_tabpanel` handler
(`wxEVT_NOTEBOOK_PAGE_CHANGED` is the same type, `include/wx/bookctrl.h:434`), which treated it as a main tab
change and ended with `panel->SetFocus()`. Found with a 10 ms focus poller and a backtrace on
`gtk_window_present`. MSW and macOS `SetFocus()` do not activate the toplevel, so the bug was Linux-only. The
dial's deferred, re-checked hide (`kHideSettleMs`, `gtk_window_is_active()`, since `wxTopLevelWindowGTK::IsActive()`
answers from `g_activeFrame`, which the deactivation has already cleared) absorbs only a focus bounce shorter
than the delay; it did not stop this.
```cpp
// Wrong: the main book's handler acts on every page-changed event that reaches it
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) { /* ... */ panel->SetFocus(); });
// Right: only the book's own events
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
if (e.GetEventObject() != m_tabpanel) { e.Skip(); return; }
/* ... */
});
```
Cite: #17245 (`MainFrame::init_tabpanel`; `SpeedDialWebDialog::on_hide_timer`).
- **Rule:** When restoring the main frame after hiding a popup or overlay frame, call `Show()` only if
`!IsShown()`, and `Raise()` unconditionally (top-level `Show`/`Raise` are owned by
`references/windows-dialogs.md`).
+16
View File
@@ -23,8 +23,11 @@ on:
- 'scripts/test_check_exception_throw_info.ps1'
- 'build_release_macos.sh'
- 'scripts/build_preset_cache.*'
- 'scripts/prune_cached_presets.ps1'
- 'scripts/test_prune_cached_presets.ps1'
- 'scripts/flatpak/**'
- 'scripts/msix/**'
- 'scripts/sign_windows.ps1'
- 'tests/**'
pull_request:
@@ -47,8 +50,11 @@ on:
- 'scripts/test_check_exception_throw_info.ps1'
- 'build_release_macos.sh'
- 'scripts/build_preset_cache.*'
- 'scripts/prune_cached_presets.ps1'
- 'scripts/test_prune_cached_presets.ps1'
- 'scripts/flatpak/**'
- 'scripts/msix/**'
- 'scripts/sign_windows.ps1'
- 'tests/**'
@@ -92,6 +98,10 @@ jobs:
shell: powershell
run: .\scripts\test_check_exception_throw_info.ps1
- name: Run the preset prune tests
shell: powershell
run: .\scripts\test_prune_cached_presets.ps1
build_linux:
strategy:
fail-fast: false
@@ -120,6 +130,12 @@ jobs:
&& '[{"arch":"x64","os":"orca-win-server","compiler":"clang"}]'
|| '[{"arch":"x64","os":"windows-latest","compiler":"clang"},{"arch":"arm64","os":"windows-11-vs2026-arm","compiler":"clang"}]') }}
needs: check_build_script
# id-token lets release builds sign through Google Cloud Workload Identity Federation (see
# "Configure code signing" in build_orca.yml); the rest is what the build already used.
permissions:
actions: write
contents: write
id-token: write
# Don't run scheduled builds on forks:
if: ${{ !cancelled() && needs.check_build_script.result == 'success' && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
uses: ./.github/workflows/build_check_cache.yml
+104
View File
@@ -35,6 +35,8 @@ jobs:
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
NSIS_VERSION: '3.13'
NSIS_SHA256: BA63DFFC4410EE89193E1CB5A41989991BD77C61068DA17E3156D136B7B0B3D8
JSIGN_VERSION: '7.6'
JSIGN_SHA256: 6CF58AA080E7FF82656F320CFF8D4A3BFF30408DF8766806DCBA3740DD839FA5
steps:
- name: Checkout
@@ -253,6 +255,17 @@ jobs:
run: |
./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a universal -t 10.15
# xcrun stapler fetches the notarization ticket over HTTP/3 (UDP 443),
# which GitHub-hosted macOS runners drop, failing with Error 68
# (actions/runner-images#14924). Blocking UDP 443 makes it fall back to
# TCP. Skipped on self-hosted runners, where the pf rules would outlive
# the job.
- name: Force stapler onto TCP
if: github.repository == 'OrcaSlicer/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && runner.os == 'macOS' && inputs.macos-combine-only && !vars.SELF_HOSTED
run: |
echo "block return out quick proto udp from any to any port 443" | sudo pfctl -f -
sudo pfctl -E
# Thanks to RaySajuuk, it's working now
- name: Sign app and notary
if: github.repository == 'OrcaSlicer/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && runner.os == 'macOS' && inputs.macos-combine-only
@@ -462,6 +475,38 @@ jobs:
path: ${{ runner.temp }}/nsis
key: nsis-${{ env.NSIS_VERSION }}
# Windows release builds are Authenticode-signed with the company's key in Google Cloud KMS
# (README, Code Signing Policy): pushes, schedules and manual runs of main and release/* in
# this repository, once the WINDOWS_SIGN_* variables are set. The Workload Identity provider
# accepts tokens from nothing else. This runs before the build so that CMake wires signing
# into the NSIS installer.
- name: Configure code signing
id: codesign
if: runner.os == 'Windows' && github.repository == 'OrcaSlicer/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && github.event_name != 'pull_request' && vars.WINDOWS_SIGN_KMS_KEY != ''
shell: pwsh
env:
CERT_CHAIN: ${{ vars.WINDOWS_SIGN_CERT_CHAIN }}
KMS_KEY: ${{ vars.WINDOWS_SIGN_KMS_KEY }}
run: |
$jar = Join-Path $env:RUNNER_TEMP "jsign-$env:JSIGN_VERSION.jar"
curl.exe -fsSL --retry 5 --retry-all-errors --retry-delay 15 -o $jar "https://github.com/ebourg/jsign/releases/download/$env:JSIGN_VERSION/jsign-$env:JSIGN_VERSION.jar"
if ($LASTEXITCODE -ne 0) { throw "Jsign $env:JSIGN_VERSION download failed." }
if ((Get-FileHash $jar -Algorithm SHA256).Hash -ne $env:JSIGN_SHA256) {
throw "Jsign $env:JSIGN_VERSION does not match its pinned SHA256."
}
$cert = Join-Path $env:RUNNER_TEMP 'codesign-chain.pem'
Set-Content -LiteralPath $cert -Value $env:CERT_CHAIN
"ORCA_SIGN_JSIGN=$jar" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"ORCA_SIGN_CERTFILE=$cert" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"ORCA_SIGN_KMS_KEY=$env:KMS_KEY" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Set up Java for code signing
if: steps.codesign.outcome == 'success'
uses: actions/setup-java@v6
with:
distribution: microsoft
java-version: '21'
- name: Build slicer Win
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}
@@ -481,6 +526,33 @@ jobs:
# the checkout cpack re-installs from when it builds the NSIS installer.
run: scripts\build_preset_cache.bat --prune-source "%BUILD_DIR%" "resources\profiles" "%BUILD_DIR%\OrcaSlicer\resources\profiles"
# Taken after the build because the token lasts an hour, which covers signing, the installer
# build and the checks.
- name: Authenticate to Google Cloud for code signing
id: codesign_auth
if: steps.codesign.outcome == 'success'
uses: google-github-actions/auth@v3
with:
workload_identity_provider: ${{ vars.WINDOWS_SIGN_WIF_PROVIDER }}
service_account: ${{ vars.WINDOWS_SIGN_SERVICE_ACCOUNT }}
token_format: access_token
create_credentials_file: false
# Signs what the portable zip, the artifact and the MSIX package ship, the profile validator,
# and the NSIS plugins the installer carries. The installer build signs its own copy of the
# app, since cpack installs the files again.
- name: Sign Windows binaries
if: steps.codesign.outcome == 'success'
shell: pwsh
env:
ORCA_SIGN_TOKEN: ${{ steps.codesign_auth.outputs.access_token }}
run: |
$paths = @("$env:BUILD_DIR/OrcaSlicer")
foreach ($extra in 'build/src/Release/OrcaSlicer_profile_validator.exe', "$env:RUNNER_TEMP/nsis/Plugins") {
if (Test-Path $extra) { $paths += $extra }
}
./scripts/sign_windows.ps1 -Path $paths
- name: Pack unit tests Win
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}
@@ -502,8 +574,37 @@ jobs:
- name: Create installer Win
if: runner.os == 'Windows' && !vars.SELF_HOSTED
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Read by scripts/sign_windows.ps1 when CMake wired signing into the installer.
env:
ORCA_SIGN_TOKEN: ${{ steps.codesign_auth.outputs.access_token }}
run: |
cpack -G NSIS
if ($LASTEXITCODE -ne 0) {
# makensis writes its errors, and the signing hook's output, only to this log.
Get-Content _CPack_Packages/*/NSIS/NSISOutput.log -Tail 80
exit 1
}
# Checks the shipped files, the installer, the payload inside it (7-Zip unpacks NSIS
# installers) and the uninstaller a silent install writes.
- name: Verify Windows signatures
if: steps.codesign.outcome == 'success'
timeout-minutes: 20
shell: pwsh
run: |
$paths = @("$env:BUILD_DIR/OrcaSlicer")
$validator = 'build/src/Release/OrcaSlicer_profile_validator.exe'
if (Test-Path $validator) { $paths += $validator }
$installer = Get-ChildItem "$env:BUILD_DIR/OrcaSlicer_Windows_Installer_*.exe" | Select-Object -First 1
if ($installer) {
$payload = Join-Path $env:RUNNER_TEMP 'installer-payload'
& 'C:/Program Files/7-Zip/7z.exe' x -y "-o$payload" $installer.FullName | Out-Null
if ($LASTEXITCODE -ne 0) { throw "7-Zip could not unpack $($installer.Name)." }
$installed = Join-Path $env:RUNNER_TEMP 'installer-test'
Start-Process -Wait -FilePath $installer.FullName -ArgumentList '/S', "/D=$installed"
$paths += $installer.FullName, $payload, (Join-Path $installed 'Uninstall.exe')
}
./scripts/sign_windows.ps1 -Verify -Path $paths
- name: Pack app
if: runner.os == 'Windows'
@@ -639,6 +740,9 @@ jobs:
chmod +x "$appimage"
"$appimage" --appimage-extract
./scripts/build_preset_cache.sh -b build build/package/resources/profiles squashfs-root/resources/profiles
# The runtime extracts every directory as 0700, and appimagetool (continuous
# build 333 onwards) refuses to pack a tree other users cannot read.
chmod -R a+rX squashfs-root
appimagetool=$(find build -name "appimagetool.AppImage" | head -1)
ARCH=$(uname -m) "$appimagetool" --appimage-extract-and-run squashfs-root "$appimage"
rm -rf squashfs-root
+18 -13
View File
@@ -124,19 +124,24 @@ jobs:
return;
}
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label.');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
// The label marks translation-only PRs: every changed file is a .po or .pot catalog
if (!files.every((file) => /\.pot?$/.test(file.filename))) {
core.info('Files other than .po/.pot catalogs changed; skipping Localization label.');
} else {
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label.');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
}
}
}
+58 -26
View File
@@ -130,13 +130,15 @@ set(ORCA_BUNDLED_UV_EXECUTABLE "" CACHE FILEPATH "Path to a uv executable to bun
# be reproducible and the download verified. To upgrade, bump ORCA_UV_VERSION
# and refresh every hash below from the release's .sha256 assets, e.g.:
# curl -sL https://github.com/astral-sh/uv/releases/download/<ver>/uv-<triple>.tar.gz.sha256
set(ORCA_UV_VERSION "0.11.21")
set(ORCA_UV_SHA256_aarch64-apple-darwin "1f921d491ba5ffeea774eb04d6681ecee379101341cbb1500394993b541bf3f4")
set(ORCA_UV_SHA256_x86_64-apple-darwin "f3c8e5708a84b920c18b691214d54d2b0da6b984789caae95d47c95120cb7765")
set(ORCA_UV_SHA256_aarch64-unknown-linux-gnu "88e800834007cc5efd4675f166eb2a51e7e3ad19876d85fa8805a6fb5c922397")
set(ORCA_UV_SHA256_x86_64-unknown-linux-gnu "8c88519b0ef0af9801fcdee419bbb12116bd9e6b18e162ae093c932d8b264050")
set(ORCA_UV_SHA256_aarch64-pc-windows-msvc "74e443f8004022dde57a1bd0d10c097830f9ea8feb4ec927db52cd5d805c2f48")
set(ORCA_UV_SHA256_x86_64-pc-windows-msvc "ace861f360c6de2babedc1607d0f454b6b09a820dbc8182dc15af927e4df9589")
# The Flatpak copy in scripts/flatpak/com.orcaslicer.OrcaSlicer.yml pins the
# same version and hashes and must be bumped with them.
set(ORCA_UV_VERSION "0.13.7")
set(ORCA_UV_SHA256_aarch64-apple-darwin "81b811b57e4624df7ed3aac148e0359100d9962f3d9dce00aec533dc2e086731")
set(ORCA_UV_SHA256_x86_64-apple-darwin "20c47e4c1f630b8abaff8c291fa9b9aa300fef92c4fbff95adf198b55287cda7")
set(ORCA_UV_SHA256_aarch64-unknown-linux-gnu "71279f8d3c67241e807b9d8db872d1bf541579fb9f08b7d1eb1682196d1e57dc")
set(ORCA_UV_SHA256_x86_64-unknown-linux-gnu "c5221ff41b7892bfc223543883600125f6a47fe845093e0f5bdff4f359196d83")
set(ORCA_UV_SHA256_aarch64-pc-windows-msvc "505d9e65e7692bac3ddf98c66754aa26c5050c409c184af30a881a0a72cc85e3")
set(ORCA_UV_SHA256_x86_64-pc-windows-msvc "0cdc5b38fe5a8168ed6a25814f5ba43c21d313dd3187314fccb37b7cec46e021")
# Version-scoped cache dir so a version bump invalidates the cached binary.
set(ORCA_UV_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/.uv/${ORCA_UV_VERSION}")
@@ -152,6 +154,15 @@ if(ORCA_BUNDLED_UV_EXECUTABLE MATCHES "/\\.uv/")
set(ORCA_BUNDLED_UV_EXECUTABLE "" CACHE FILEPATH "Path to the auto-downloaded uv executable" FORCE)
endif()
# A Flatpak build has no network and cannot download below: the orca_deps module
# in scripts/flatpak/com.orcaslicer.OrcaSlicer.yml fetches the same pinned uv and
# installs it into the app resources, where the runtime looks for it.
set(ORCA_UV_FLATPAK_BINARY "${CMAKE_INSTALL_FULL_DATAROOTDIR}/OrcaSlicer/tools/uv/uv")
if(FLATPAK AND NOT ORCA_BUNDLED_UV_EXECUTABLE AND EXISTS "${ORCA_UV_FLATPAK_BINARY}")
message(STATUS "Using Flatpak-provided uv: ${ORCA_UV_FLATPAK_BINARY}")
set(ORCA_BUNDLED_UV_EXECUTABLE "${ORCA_UV_FLATPAK_BINARY}")
endif()
if(NOT ORCA_BUNDLED_UV_EXECUTABLE)
if(NOT EXISTS "${ORCA_UV_BINARY}")
# Select uv by TARGET arch. On macOS universal builds each leg sets a single
@@ -195,10 +206,8 @@ if(NOT ORCA_BUNDLED_UV_EXECUTABLE)
list(GET ORCA_UV_DL_STATUS 0 ORCA_UV_DL_CODE)
list(GET ORCA_UV_DL_STATUS 1 ORCA_UV_DL_MSG)
if(NOT ORCA_UV_DL_CODE EQUAL 0)
# Network failure keeps the historical graceful degradation (uv is
# optional at build time) -- but a hash mismatch below is fatal.
message(WARNING "Failed to download uv: ${ORCA_UV_DL_MSG}")
file(REMOVE "${ORCA_UV_ARCHIVE}")
message(FATAL_ERROR "Failed to download uv: ${ORCA_UV_DL_MSG}")
else()
file(SHA256 "${ORCA_UV_ARCHIVE}" _orca_uv_actual_sha256)
if(NOT _orca_uv_actual_sha256 STREQUAL "${ORCA_UV_SHA256_${ORCA_UV_ARCH}}")
@@ -887,21 +896,11 @@ endif()
## OPTIONAL packages
# Find expat or use bundled version
# Always use the system libexpat on Linux.
find_package(EXPAT)
if (NOT EXPAT_FOUND)
add_library(expat STATIC
${LIBDIR}/expat/xmlparse.c
${LIBDIR}/expat/xmlrole.c
${LIBDIR}/expat/xmltok.c
)
set(EXPAT_FOUND 1)
set(EXPAT_INCLUDE_DIRS ${LIBDIR}/expat/)
set(EXPAT_LIBRARIES expat)
endif ()
# Linux links the system libexpat when it is the pinned version; every other case
# builds that version in the deps project, so all platforms link the same parser.
# Requiring 2.10.0 rather than the 2.4.0 security floor keeps distro packages that
# are missing later fixes from slipping in.
find_package(EXPAT 2.10.0 REQUIRED)
find_package(PNG REQUIRED)
@@ -1301,7 +1300,13 @@ elseif (SLIC3R_FHS)
PATTERN "*/udev" EXCLUDE
)
if(ORCA_BUNDLED_UV_EXECUTABLE)
install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "${SLIC3R_FHS_RESOURCES}/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}")
# A Flatpak build finds uv at this exact path, installed by the orca_deps
# module before this one configures (see ORCA_UV_FLATPAK_BINARY above).
# Installing it there again would copy the file onto itself.
set(_orca_uv_fhs_binary "${SLIC3R_FHS_RESOURCES}/tools/uv/${ORCA_BUNDLED_UV_FILENAME}")
if(NOT ORCA_BUNDLED_UV_EXECUTABLE_CONFIG STREQUAL _orca_uv_fhs_binary)
install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "${SLIC3R_FHS_RESOURCES}/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}")
endif()
endif()
install(FILES src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
foreach(SIZE 32 128 192)
@@ -1374,6 +1379,33 @@ set(CPACK_PACKAGE_EXECUTABLES "orca-slicer;OrcaSlicer")
set(CPACK_CREATE_DESKTOP_LINKS "orca-slicer")
set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt) # must also include in install command
# CI release builds Authenticode-sign the installer as makensis builds it: the payload before it is
# compressed, the uninstaller the installer writes, and the installer itself. Only a configure run
# with ORCA_SIGN_KMS_KEY in its environment (build_orca.yml) wires this in; scripts/sign_windows.ps1
# lists what signing needs. The commands go into an included file because CPack writes
# CPACK_NSIS_* values into CPackConfig.cmake unescaped. !include needs a native path, with its
# backslashes doubled for CPackConfig.cmake. PowerShell 7 is preferred: Windows PowerShell started
# under a PowerShell 7 session (CI runs cpack from one) inherits its module path and cannot load
# Get-AuthenticodeSignature.
if (WIN32 AND DEFINED ENV{ORCA_SIGN_KMS_KEY})
find_program(ORCA_SIGN_PWSH pwsh)
if (ORCA_SIGN_PWSH)
set(_orca_sign_shell pwsh)
else ()
set(_orca_sign_shell powershell)
endif ()
set(ORCA_SIGN_COMMAND "${_orca_sign_shell} -NoProfile -ExecutionPolicy Bypass -File \"${CMAKE_SOURCE_DIR}/scripts/sign_windows.ps1\" -Path")
string(CONFIGURE [=[
!system '@ORCA_SIGN_COMMAND@ "${INST_DIR}"' = 0
!uninstfinalize '@ORCA_SIGN_COMMAND@ "%1"' = 0
!finalize '@ORCA_SIGN_COMMAND@ "%1"' = 0
]=] _orca_sign_nsh @ONLY)
file(WRITE "${CMAKE_BINARY_DIR}/sign_windows.nsh" "${_orca_sign_nsh}")
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/sign_windows.nsh" _orca_sign_nsh_path)
string(REPLACE "\\" "\\\\" _orca_sign_nsh_path "${_orca_sign_nsh_path}")
set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "!include \\\"${_orca_sign_nsh_path}\\\"")
endif ()
set(CPACK_WIX_UPGRADE_GUID "058245e8-20e0-4a95-9ab7-1acfe17ad511")
set(CPACK_GENERATOR NSIS)
include(CPack)
+1 -11
View File
@@ -87,7 +87,7 @@ The [wiki](https://www.orcaslicer.com/wiki) aims to provide a detailed explanati
📥 **[Download the Latest Stable Release](https://github.com/OrcaSlicer/OrcaSlicer/releases/latest)**
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.
Windows release binaries are code signed; see our [Code signing policy](#code-signing-policy).
Windows and macOS release and nightly builds are code signed.
## Nightly Builds
@@ -245,16 +245,6 @@ OrcaSlicer began in that same spirit, drawing from BambuStudio, PrusaSlicer, and
The OrcaSlicer logo was designed by community member [Justin Levine](https://github.com/jal-co).
# Code Signing Policy
Free code signing provided by [SignPath.io](https://about.signpath.io), certificate by [SignPath Foundation](https://signpath.org).
Windows release binaries are built by GitHub Actions from this repository and signed through the SignPath Foundation program. Every signing request is manually approved.
**Team roles:** [SoftFever](https://github.com/SoftFever) is the committer, reviewer and approver for all signed releases.
**Privacy policy:** See the [OrcaSlicer privacy policy](https://www.orcaslicer.com/privacy-policy/).
# License
- **OrcaSlicer** is licensed under the GNU Affero General Public License, version 3.
+11 -3
View File
@@ -348,7 +348,6 @@ if(FLATPAK)
# also, yes, this reduces CI by not needing to vendor certain deps
find_package(ZLIB)
find_package(PNG)
find_package(EXPAT)
find_package(CURL)
find_package(JPEG)
find_package(OpenSSL 1.1...<3.2)
@@ -366,10 +365,19 @@ if (NOT PNG_FOUND)
set(PNG_PKG dep_PNG)
endif ()
set(EXPAT_PKG "")
find_package(EXPAT)
if (NOT EXPAT_FOUND)
if (WIN32 OR APPLE)
# A system lookup here can resolve an old SDK libexpat without the
# entity-amplification guard, so always build the pinned copy.
include(EXPAT/EXPAT.cmake)
set(EXPAT_PKG dep_EXPAT)
else ()
# Anything older than the pinned version is built by the EXPAT dep, so every
# platform links the same parser.
find_package(EXPAT 2.10.0)
if (NOT EXPAT_FOUND)
include(EXPAT/EXPAT.cmake)
set(EXPAT_PKG dep_EXPAT)
endif ()
endif ()
# The order of includes respects the dependencies between libraries
+35 -1
View File
@@ -1,7 +1,41 @@
# Pinned release: expat's entity-amplification guard is a security boundary, so
# the parser must not come from a distro or SDK copy that may predate it.
# XML_DTD and XML_GE are passed explicitly: 2.4.0 gated the guard behind XML_DTD
# and 2.6.0 behind XML_GE, so neither may be left to the default.
orcaslicer_add_cmake_project(EXPAT
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/expat
URL https://github.com/libexpat/libexpat/releases/download/R_2_10_0/expat-2.10.0.tar.gz
URL_HASH SHA256=5466a341f9c692ef7a958a6881311be597f8e1ce345984cf78414f54793dea4c
CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF
-DEXPAT_SHARED_LIBS=OFF
-DEXPAT_DTD=ON
-DEXPAT_GE=ON
-DEXPAT_BUILD_TOOLS=OFF
-DEXPAT_BUILD_EXAMPLES=OFF
-DEXPAT_BUILD_TESTS=OFF
-DEXPAT_BUILD_DOCS=OFF
-DEXPAT_BUILD_FUZZERS=OFF
-DEXPAT_BUILD_PKGCONFIG=OFF
-DEXPAT_ENABLE_INSTALL=ON
)
if (MSVC)
add_debug_dep(dep_EXPAT)
# A deps prefix built before this pin still has lib/expat.lib from the
# bundled 2.5.0, and FindEXPAT matches that name before libexpatMD.lib, so
# overwrite it with the pinned build. This also covers a cached EXPAT_LIBRARY.
set(_expat_legacy_libs
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${DESTDIR}/lib/libexpatMD.lib ${DESTDIR}/lib/expat.lib
)
if (DEP_DEBUG)
list(APPEND _expat_legacy_libs
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${DESTDIR}/lib/libexpatdMD.lib ${DESTDIR}/lib/expatd.lib
)
endif ()
ExternalProject_Add_Step(dep_EXPAT copy_legacy_lib
DEPENDEES install
${_expat_legacy_libs}
)
endif ()
-130
View File
@@ -1,130 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(EXPAT)
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
macro(expat_shy_set var default cache type desc)
# Macro expat_shy_set came into life because:
# - Expat was previously using an inconsistent mix of CMake's native set()
# and option() to define public build time options.
# - option() is more friendly than set() with regard to configuring an
# external project that is pulled in by means of add_subdirectory() --
# see comments in issue #597 -- so we wanted to get away from set().
# - option() auto-converts non-bool values to bool when writing to the CMake
# cache, so we needed something that supports non-bool better and hence
# wanted to get away from plain option(), too.
#
# As a result, this function serves as a hybrid between CMake's regular set()
# and option(): from set() it takes support for non-bool types and the function
# name and signature whereas from option() (with policy CMP0077 mode NEW) it
# takes being shy when a value has previously been defined for that variable.
#
# So that resolves all need for set(.. FORCE) when pulling in Expat by means of
# add_subdirectory().
#
if(NOT ${cache} STREQUAL "CACHE")
message(SEND_ERROR "Macro usage is: expat_shy_set(var default CACHE type desc)")
endif()
if(DEFINED ${var})
# NOTE: The idea is to (ideally) only add to the cache if
# there is no cache entry, yet. "if(DEFINED CACHE{var})"
# requires CMake >=3.14.
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14" AND NOT DEFINED "CACHE{${var}}")
set("${var}" "${${var}}" CACHE "${type}" "${desc}")
endif()
else()
set("${var}" "${default}" CACHE "${type}" "${desc}")
endif()
endmacro()
if(NOT WIN32)
expat_shy_set(EXPAT_WITH_GETRANDOM "AUTO" CACHE STRING "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")
expat_shy_set(EXPAT_WITH_SYS_GETRANDOM "AUTO" CACHE STRING "Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]")
endif()
macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
if(${use_ref} AND NOT (${use_ref} STREQUAL "AUTO") AND NOT ${have_ref})
message(SEND_ERROR
"Use of ${thing_lower} was enforced by ${use_ref}=ON but it could not be found.")
elseif(NOT ${use_ref} AND ${have_ref})
message("${thing_title} was found but it will not be used due to ${use_ref}=OFF.")
set(${have_ref} 0)
endif()
endmacro()
if(NOT WIN32)
evaluate_detection_results(EXPAT_WITH_GETRANDOM HAVE_GETRANDOM "function getrandom" "Function getrandom")
evaluate_detection_results(EXPAT_WITH_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")
endif()
configure_file(expat_configure.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_configure.h")
if (BUILD_SHARED_LIBS AND MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_library(expat
xmlparse.c
xmlrole.c
xmltok.c
)
target_include_directories(expat PRIVATE ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
include(GNUInstallDirs)
install(
FILES
${PROJECT_SOURCE_DIR}/expat.h
${PROJECT_SOURCE_DIR}/expat_config.h
${PROJECT_SOURCE_DIR}/expat_external.h
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}
)
add_library(EXPAT INTERFACE)
target_link_libraries(EXPAT INTERFACE expat)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
VERSION 1.95
COMPATIBILITY AnyNewerVersion
)
install(TARGETS expat EXPAT
EXPORT ${PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
export(EXPORT ${PROJECT_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
NAMESPACE ${PROJECT_NAME}:: )
set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
install(EXPORT ${PROJECT_NAME}Targets
FILE
"${PROJECT_NAME}Targets.cmake"
NAMESPACE
${PROJECT_NAME}::
DESTINATION
${ConfigPackageLocation}
)
configure_file(config.cmake.in ${PROJECT_NAME}Config.cmake @ONLY)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION
${ConfigPackageLocation}
)
-21
View File
@@ -1,21 +0,0 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2022 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-69
View File
@@ -1,69 +0,0 @@
include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckLibraryExists)
include(CheckSymbolExists)
include(TestBigEndian)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("memory.h" HAVE_MEMORY_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
if(EXPAT_WITH_LIBBSD)
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
set(_bsd "bsd/")
else()
set(_bsd "")
endif()
check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)
if(NOT HAVE_ARC4RANDOM_BUF)
check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)
endif()
set(CMAKE_REQUIRED_LIBRARIES)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
test_big_endian(WORDS_BIGENDIAN)
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
if(WORDS_BIGENDIAN)
set(BYTEORDER 4321)
else(WORDS_BIGENDIAN)
set(BYTEORDER 1234)
endif(WORDS_BIGENDIAN)
if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
check_c_source_compiles("
#include <stdlib.h> /* for NULL */
#include <unistd.h> /* for syscall */
#include <sys/syscall.h> /* for SYS_getrandom */
int main() {
syscall(SYS_getrandom, NULL, 0, 0);
return 0;
}"
HAVE_SYSCALL_GETRANDOM)
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
check_library_exists(m cos "" _EXPAT_LIBM_FOUND)
-274
View File
@@ -1,274 +0,0 @@
Expat, Release 2.5.0, only picked the lib related files into Bambu Studio, built as static library
The original README:
---------------------------------------------------------------------
[![Run Linux Travis CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat)
[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions)
[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/)
[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases)
# Expat, Release 2.5.0
This is Expat, a C library for parsing XML, started by
[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of
structures for which you may register handlers.
Expat supports the following compilers:
- GNU GCC >=4.5
- LLVM Clang >=3.5
- Microsoft Visual Studio >=15.0/2017 (rolling `${today} minus 5 years`)
Windows users can use the
[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases),
which includes both pre-compiled libraries and executables, and source code for
developers.
Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html).
You may copy, distribute, and modify it under the terms of the License
contained in the file
[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING)
distributed with this package.
This license is the same as the MIT/X Consortium license.
## Using libexpat in your CMake-Based Project
There are two ways of using libexpat with CMake:
### a) Module Mode
This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html).
Notice the *uppercase* `EXPAT` in the following example:
```cmake
cmake_minimum_required(VERSION 3.0) # or 3.10, see below
project(hello VERSION 1.0.0)
find_package(EXPAT 2.2.8 MODULE REQUIRED)
add_executable(hello
hello.c
)
# a) for CMake >=3.10 (see CMake's FindEXPAT docs)
target_link_libraries(hello PUBLIC EXPAT::EXPAT)
# b) for CMake >=3.0
target_include_directories(hello PRIVATE ${EXPAT_INCLUDE_DIRS})
target_link_libraries(hello PUBLIC ${EXPAT_LIBRARIES})
```
### b) Config Mode
This approach requires files from…
- libexpat >=2.2.8 where packaging uses the CMake build system
or
- libexpat >=2.3.0 where packaging uses the GNU Autotools build system
on Linux
or
- libexpat >=2.4.0 where packaging uses the GNU Autotools build system
on macOS or MinGW.
Notice the *lowercase* `expat` in the following example:
```cmake
cmake_minimum_required(VERSION 3.0)
project(hello VERSION 1.0.0)
find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns)
add_executable(hello
hello.c
)
target_link_libraries(hello PUBLIC expat::expat)
```
## Building from a Git Clone
If you are building Expat from a check-out from the
[Git repository](https://github.com/libexpat/libexpat/),
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.58 or newer. Run the script like this:
```console
./buildconf.sh
```
Once this has been done, follow the same instructions as for building
from a source distribution.
## Building from a Source Distribution
### a) Building with the configure script (i.e. GNU Autotools)
To build Expat from a source distribution, you first run the
configuration shell script in the top level distribution directory:
```console
./configure
```
There are many options which you may provide to configure (which you
can discover by running configure with the `--help` option). But the
one of most interest is the one that sets the installation directory.
By default, the configure script will set things up to install
libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and
`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install
into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and
`/home/me/mystuff/bin`, you can tell `configure` about that with:
```console
./configure --prefix=/home/me/mystuff
```
Another interesting option is to enable 64-bit integer support for
line and column numbers and the over-all byte index:
```console
./configure CPPFLAGS=-DXML_LARGE_SIZE
```
However, such a modification would be a breaking change to the ABI
and is therefore not recommended for general use &mdash; e.g. as part of
a Linux distribution &mdash; but rather for builds with special requirements.
After running the configure script, the `make` command will build
things and `make install` will install things into their proper
location. Have a look at the `Makefile` to learn about additional
`make` options. Note that you need to have write permission into
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run `make distclean`).
Please note that we configure with `--without-xmlwf` as xmlwf does not
support this mode of compilation (yet):
1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name:
<br/>
`find -name Makefile.am -exec sed
-e 's,libexpat\.la,libexpatw.la,'
-e 's,libexpat_la,libexpatw_la,'
-i {} +`
1. Run `automake` to re-write `Makefile.in` files:<br/>
`automake`
1. For UTF-16 output as unsigned short (and version/error strings as char),
run:<br/>
`./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`<br/>
For UTF-16 output as `wchar_t` (incl. version/error strings), run:<br/>
`./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T
--without-xmlwf`
<br/>Note: The latter requires libc compiled with `-fshort-wchar`, as well.
1. Run `make` (which excludes xmlwf).
1. Run `make install` (again, excludes xmlwf).
Using `DESTDIR` is supported. It works as follows:
```console
make install DESTDIR=/path/to/image
```
overrides the in-makefile set `DESTDIR`, because variable-setting priority is
1. commandline
1. in-makefile
1. environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
When using Expat with a project using autoconf for configuration, you
can use the probing macro in `conftools/expat.m4` to determine how to
include Expat. See the comments at the top of that file for more
information.
A reference manual is available in the file `doc/reference.html` in this
distribution.
### b) Building with CMake
The CMake build system is still *experimental* and may replace the primary
build system based on GNU Autotools at some point when it is ready.
#### Available Options
For an idea of the available (non-advanced) options for building with CMake:
```console
# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,'
// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=
// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
// Path to a program.
DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man
// Build man page for xmlwf
EXPAT_BUILD_DOCS:BOOL=ON
// Build the examples for expat library
EXPAT_BUILD_EXAMPLES:BOOL=ON
// Build fuzzers for the expat library
EXPAT_BUILD_FUZZERS:BOOL=OFF
// Build pkg-config file
EXPAT_BUILD_PKGCONFIG:BOOL=ON
// Build the tests for expat library
EXPAT_BUILD_TESTS:BOOL=ON
// Build the xmlwf tool for expat library
EXPAT_BUILD_TOOLS:BOOL=ON
// Character type to use (char|ushort|wchar_t) [default=char]
EXPAT_CHAR_TYPE:STRING=char
// Install expat files in cmake install target
EXPAT_ENABLE_INSTALL:BOOL=ON
// Use /MT flag (static CRT) when compiling in MSVC
EXPAT_MSVC_STATIC_CRT:BOOL=OFF
// Build fuzzers via ossfuzz for the expat library
EXPAT_OSSFUZZ_BUILD:BOOL=OFF
// Build a shared expat library
EXPAT_SHARED_LIBS:BOOL=ON
// Treat all compiler warnings as errors
EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF
// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]
EXPAT_WITH_GETRANDOM:STRING=AUTO
// Utilize libbsd (for arc4random_buf)
EXPAT_WITH_LIBBSD:BOOL=OFF
// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]
EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO
```
-123
View File
@@ -1,123 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1999-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2007 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#define ASCII_O 0x4F
#define ASCII_P 0x50
#define ASCII_Q 0x51
#define ASCII_R 0x52
#define ASCII_S 0x53
#define ASCII_T 0x54
#define ASCII_U 0x55
#define ASCII_V 0x56
#define ASCII_W 0x57
#define ASCII_X 0x58
#define ASCII_Y 0x59
#define ASCII_Z 0x5A
#define ASCII_a 0x61
#define ASCII_b 0x62
#define ASCII_c 0x63
#define ASCII_d 0x64
#define ASCII_e 0x65
#define ASCII_f 0x66
#define ASCII_g 0x67
#define ASCII_h 0x68
#define ASCII_i 0x69
#define ASCII_j 0x6A
#define ASCII_k 0x6B
#define ASCII_l 0x6C
#define ASCII_m 0x6D
#define ASCII_n 0x6E
#define ASCII_o 0x6F
#define ASCII_p 0x70
#define ASCII_q 0x71
#define ASCII_r 0x72
#define ASCII_s 0x73
#define ASCII_t 0x74
#define ASCII_u 0x75
#define ASCII_v 0x76
#define ASCII_w 0x77
#define ASCII_x 0x78
#define ASCII_y 0x79
#define ASCII_z 0x7A
#define ASCII_0 0x30
#define ASCII_1 0x31
#define ASCII_2 0x32
#define ASCII_3 0x33
#define ASCII_4 0x34
#define ASCII_5 0x35
#define ASCII_6 0x36
#define ASCII_7 0x37
#define ASCII_8 0x38
#define ASCII_9 0x39
#define ASCII_TAB 0x09
#define ASCII_SPACE 0x20
#define ASCII_EXCL 0x21
#define ASCII_QUOT 0x22
#define ASCII_AMP 0x26
#define ASCII_APOS 0x27
#define ASCII_MINUS 0x2D
#define ASCII_PERIOD 0x2E
#define ASCII_COLON 0x3A
#define ASCII_SEMI 0x3B
#define ASCII_LT 0x3C
#define ASCII_EQUALS 0x3D
#define ASCII_GT 0x3E
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C
-66
View File
@@ -1,66 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
-4
View File
@@ -1,4 +0,0 @@
include(${CMAKE_CURRENT_LIST_DIR}/EXPATTargets.cmake)
set(EXPAT_LIBRARIES EXPAT::expat)
set(EXPAT_INCLUDE_DIRS ${_IMPORT_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
-1064
View File
File diff suppressed because it is too large Load Diff
-49
View File
@@ -1,49 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2005 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef EXPATCONFIG_H
#define EXPATCONFIG_H
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#else
#endif
#include "expat_configure.h"
#include <memory.h>
#include <string.h>
#endif /* ndef EXPATCONFIG_H */
-120
View File
@@ -1,120 +0,0 @@
/* expat_config.h.cmake. Based upon generated expat_config.h.in. */
#ifndef EXPAT_CONFIG_H
#define EXPAT_CONFIG_H 1
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `arc4random' function. */
#cmakedefine HAVE_ARC4RANDOM
/* Define to 1 if you have the `arc4random_buf' function. */
#cmakedefine HAVE_ARC4RANDOM_BUF
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#cmakedefine HAVE_GETPAGESIZE
/* Define to 1 if you have the `getrandom' function. */
#cmakedefine HAVE_GETRANDOM
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `bsd' library (-lbsd). */
#cmakedefine HAVE_LIBBSD
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have `syscall' and `SYS_getrandom'. */
#cmakedefine HAVE_SYSCALL_GETRANDOM
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Name of package */
#define PACKAGE "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN
/* Define to allow retrieving the byte offsets for attribute names and values.
*/
#cmakedefine XML_ATTR_INFO
/* Define to specify how much context to retain around the current parse
point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
#if ! defined(_WIN32)
/* Define to include code reading entropy from `/dev/urandom'. */
#cmakedefine XML_DEV_URANDOM
#endif
/* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__
#endif
/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine off_t @OFF_T@
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t @SIZE_T@
#endif // ndef EXPAT_CONFIG_H
-165
View File
@@ -1,165 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2000-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
Copyright (c) 2016-2019 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
# if defined(_MSC_VER)
# define XMLCALL __cdecl
# elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER)
# define XMLCALL __attribute__((cdecl))
# else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
# define XMLCALL
# endif
#endif /* not defined XMLCALL */
#if ! defined(XML_STATIC) && ! defined(XMLIMPORT)
# ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
# if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
//# define XMLIMPORT __declspec(dllimport)
# endif
# endif
#endif /* not defined XML_STATIC */
#ifndef XML_ENABLE_VISIBILITY
# define XML_ENABLE_VISIBILITY 0
#endif
#if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
# define XMLIMPORT __attribute__((visibility("default")))
#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
# define XMLIMPORT
#endif
#if defined(__GNUC__) \
&& (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
# define XML_ATTR_MALLOC
#endif
#if defined(__GNUC__) \
&& ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
# define XML_ATTR_ALLOC_SIZE(x)
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
# ifndef XML_UNICODE
# define XML_UNICODE
# endif
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
# endif
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
# ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
# else
typedef unsigned short XML_Char;
typedef char XML_LChar;
# endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */
-67
View File
@@ -1,67 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
-165
View File
@@ -1,165 +0,0 @@
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2003 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__GNUC__) && defined(__i386__) && ! defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
# define FASTCALL __attribute__((regparm(3)))
# define PTRFASTCALL __attribute__((regparm(3)))
#endif
/* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
/* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL
# define FASTCALL
#endif
#ifndef PTRCALL
# define PTRCALL
#endif
#ifndef PTRFASTCALL
# define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
# if ! defined(__cplusplus) && ! defined(inline)
# ifdef __GNUC__
# define inline __inline
# endif /* __GNUC__ */
# endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
# define inline inline
#else
# ifndef inline
# define inline
# endif
#endif
#include <limits.h> // ULONG_MAX
#if defined(_WIN32) \
&& (! defined(__USE_MINGW_ANSI_STDIO) \
|| (1 - __USE_MINGW_ANSI_STDIO - 1 == 0))
# define EXPAT_FMT_ULL(midpart) "%" midpart "I64u"
# if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "I64u"
# else
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
# endif
#else
# define EXPAT_FMT_ULL(midpart) "%" midpart "llu"
# if ! defined(ULONG_MAX)
# error Compiler did not define ULONG_MAX for us
# elif ULONG_MAX == 18446744073709551615u // 2^64-1
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "lu"
# else
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
# endif
#endif
#ifndef UNUSED_P
# define UNUSED_P(p) (void)p
#endif
/* NOTE BEGIN If you ever patch these defaults to greater values
for non-attack XML payload in your environment,
please file a bug report with libexpat. Thank you!
*/
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT \
100.0f
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT \
8388608 // 8 MiB, 2^23
/* NOTE END */
#include "expat.h" // so we can use type XML_Parser below
#ifdef __cplusplus
extern "C" {
#endif
void _INTERNAL_trim_to_complete_utf8_characters(const char *from,
const char **fromLimRef);
#if defined(XML_DTD)
unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser);
unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser);
const char *unsignedCharToPrintable(unsigned char c);
#endif
#ifdef __cplusplus
}
#endif
-66
View File
@@ -1,66 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-136
View File
@@ -1,136 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x04000000,
0x87FFFFFE, 0x07FFFFFE, 0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFE00F, 0xFC31FFFF, 0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, 0xFFFF0003, 0xFFFFFFFF,
0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF, 0x00000000, 0x07FFFFFE,
0x000007FE, 0xFFFE0000, 0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003, 0xFFF99FE0, 0x03C5FDFF,
0xB0000000, 0x00030003, 0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001, 0xFFF99FE0, 0x23CDFDFF,
0xB0000000, 0x00000003, 0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003, 0xFFFDDFE0, 0x03EFFDFF,
0x40000000, 0x00000003, 0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFE, 0x000D7FFF,
0x0000003F, 0x00000000, 0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF, 0x0007DAED, 0x50000000,
0x82315001, 0x002C62AB, 0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0FFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x03FFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF, 0x00000000, 0x00004C40,
0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF, 0x001FFFFF, 0xFFFFFFFE,
0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000F,
0x00000000, 0x00000000, 0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF, 0x00FFFFFF, 0x00000000,
0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003, 0xFFFFD7C0, 0xFFFFFFFB,
0x547F7FFF, 0x000FFFFD, 0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000,
0x027FFFFF, 0xFFFFFFFE, 0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF, 0xFFFFFFFF, 0x7CFFFFFF,
0xFFEF7FFF, 0x03FF3DFF, 0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF, 0xFFF987E4, 0xD36DFDFF,
0x5E003987, 0x001FFFC0, 0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3, 0xD63DC7EC, 0xC3BFC718,
0x00803DC7, 0x0000FF80, 0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3, 0xFFFDDFEC, 0xC3FFFDFF,
0x00803DCF, 0x0000FFC3, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000, 0xFEF02596, 0x3BFF6CAE,
0x03FF3F5F, 0x00000000, 0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF, 0x661FFFFF, 0xFFFFFFFE,
0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x09, 0x0A, 0x0B,
0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x00, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00, 0x00, 0x1F, 0x20, 0x21,
0x22, 0x23, 0x24, 0x25, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x26, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
-393
View File
@@ -1,393 +0,0 @@
/* ==========================================================================
* siphash.h - SipHash-2-4 in a single header file
* --------------------------------------------------------------------------
* Derived by William Ahern from the reference implementation[1] published[2]
* by Jean-Philippe Aumasson and Daniel J. Berstein.
* Minimal changes by Sebastian Pipping and Victor Stinner on top, see below.
* Licensed under the CC0 Public Domain Dedication license.
*
* 1. https://www.131002.net/siphash/siphash24.c
* 2. https://www.131002.net/siphash/
* --------------------------------------------------------------------------
* HISTORY:
*
* 2020-10-03 (Sebastian Pipping)
* - Drop support for Visual Studio 9.0/2008 and earlier
*
* 2019-08-03 (Sebastian Pipping)
* - Mark part of sip24_valid as to be excluded from clang-format
* - Re-format code using clang-format 9
*
* 2018-07-08 (Anton Maklakov)
* - Add "fall through" markers for GCC's -Wimplicit-fallthrough
*
* 2017-11-03 (Sebastian Pipping)
* - Hide sip_tobin and sip_binof unless SIPHASH_TOBIN macro is defined
*
* 2017-07-25 (Vadim Zeitlin)
* - Fix use of SIPHASH_MAIN macro
*
* 2017-07-05 (Sebastian Pipping)
* - Use _SIP_ULL macro to not require a C++11 compiler if compiled as C++
* - Add const qualifiers at two places
* - Ensure <=80 characters line length (assuming tab width 4)
*
* 2017-06-23 (Victor Stinner)
* - Address Win64 compile warnings
*
* 2017-06-18 (Sebastian Pipping)
* - Clarify license note in the header
* - Address C89 issues:
* - Stop using inline keyword (and let compiler decide)
* - Replace _Bool by int
* - Turn macro siphash24 into a function
* - Address invalid conversion (void pointer) by explicit cast
* - Address lack of stdint.h for Visual Studio 2003 to 2008
* - Always expose sip24_valid (for self-tests)
*
* 2012-11-04 - Born. (William Ahern)
* --------------------------------------------------------------------------
* USAGE:
*
* SipHash-2-4 takes as input two 64-bit words as the key, some number of
* message bytes, and outputs a 64-bit word as the message digest. This
* implementation employs two data structures: a struct sipkey for
* representing the key, and a struct siphash for representing the hash
* state.
*
* For converting a 16-byte unsigned char array to a key, use either the
* macro sip_keyof or the routine sip_tokey. The former instantiates a
* compound literal key, while the latter requires a key object as a
* parameter.
*
* unsigned char secret[16];
* arc4random_buf(secret, sizeof secret);
* struct sipkey *key = sip_keyof(secret);
*
* For hashing a message, use either the convenience macro siphash24 or the
* routines sip24_init, sip24_update, and sip24_final.
*
* struct siphash state;
* void *msg;
* size_t len;
* uint64_t hash;
*
* sip24_init(&state, key);
* sip24_update(&state, msg, len);
* hash = sip24_final(&state);
*
* or
*
* hash = siphash24(msg, len, key);
*
* To convert the 64-bit hash value to a canonical 8-byte little-endian
* binary representation, use either the macro sip_binof or the routine
* sip_tobin. The former instantiates and returns a compound literal array,
* while the latter requires an array object as a parameter.
* --------------------------------------------------------------------------
* NOTES:
*
* o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers
* lacking compound literal support. Instead, you must use the lower-level
* interfaces which take as parameters the temporary state objects.
*
* o Uppercase macros may evaluate parameters more than once. Lowercase
* macros should not exhibit any such side effects.
* ==========================================================================
*/
#ifndef SIPHASH_H
#define SIPHASH_H
#include <stddef.h> /* size_t */
#include <stdint.h> /* uint64_t uint32_t uint8_t */
/*
* Workaround to not require a C++11 compiler for using ULL suffix
* if this code is included and compiled as C++; related GCC warning is:
* warning: use of C++11 long long integer constant [-Wlong-long]
*/
#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
#define SIP_U32TO8_LE(p, v) \
(p)[0] = (uint8_t)((v) >> 0); \
(p)[1] = (uint8_t)((v) >> 8); \
(p)[2] = (uint8_t)((v) >> 16); \
(p)[3] = (uint8_t)((v) >> 24);
#define SIP_U64TO8_LE(p, v) \
SIP_U32TO8_LE((p) + 0, (uint32_t)((v) >> 0)); \
SIP_U32TO8_LE((p) + 4, (uint32_t)((v) >> 32));
#define SIP_U8TO64_LE(p) \
(((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8) \
| ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24) \
| ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40) \
| ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
#define SIPHASH_INITIALIZER \
{ 0, 0, 0, 0, {0}, 0, 0 }
struct siphash {
uint64_t v0, v1, v2, v3;
unsigned char buf[8], *p;
uint64_t c;
}; /* struct siphash */
#define SIP_KEYLEN 16
struct sipkey {
uint64_t k[2];
}; /* struct sipkey */
#define sip_keyof(k) sip_tokey(&(struct sipkey){{0}}, (k))
static struct sipkey *
sip_tokey(struct sipkey *key, const void *src) {
key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
return key;
} /* sip_tokey() */
#ifdef SIPHASH_TOBIN
# define sip_binof(v) sip_tobin((unsigned char[8]){0}, (v))
static void *
sip_tobin(void *dst, uint64_t u64) {
SIP_U64TO8_LE((unsigned char *)dst, u64);
return dst;
} /* sip_tobin() */
#endif /* SIPHASH_TOBIN */
static void
sip_round(struct siphash *H, const int rounds) {
int i;
for (i = 0; i < rounds; i++) {
H->v0 += H->v1;
H->v1 = SIP_ROTL(H->v1, 13);
H->v1 ^= H->v0;
H->v0 = SIP_ROTL(H->v0, 32);
H->v2 += H->v3;
H->v3 = SIP_ROTL(H->v3, 16);
H->v3 ^= H->v2;
H->v0 += H->v3;
H->v3 = SIP_ROTL(H->v3, 21);
H->v3 ^= H->v0;
H->v2 += H->v1;
H->v1 = SIP_ROTL(H->v1, 17);
H->v1 ^= H->v2;
H->v2 = SIP_ROTL(H->v2, 32);
}
} /* sip_round() */
static struct siphash *
sip24_init(struct siphash *H, const struct sipkey *key) {
H->v0 = _SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
H->v1 = _SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
H->v2 = _SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
H->v3 = _SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
H->p = H->buf;
H->c = 0;
return H;
} /* sip24_init() */
#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
static struct siphash *
sip24_update(struct siphash *H, const void *src, size_t len) {
const unsigned char *p = (const unsigned char *)src, *pe = p + len;
uint64_t m;
do {
while (p < pe && H->p < sip_endof(H->buf))
*H->p++ = *p++;
if (H->p < sip_endof(H->buf))
break;
m = SIP_U8TO64_LE(H->buf);
H->v3 ^= m;
sip_round(H, 2);
H->v0 ^= m;
H->p = H->buf;
H->c += 8;
} while (p < pe);
return H;
} /* sip24_update() */
static uint64_t
sip24_final(struct siphash *H) {
const char left = (char)(H->p - H->buf);
uint64_t b = (H->c + left) << 56;
switch (left) {
case 7:
b |= (uint64_t)H->buf[6] << 48;
/* fall through */
case 6:
b |= (uint64_t)H->buf[5] << 40;
/* fall through */
case 5:
b |= (uint64_t)H->buf[4] << 32;
/* fall through */
case 4:
b |= (uint64_t)H->buf[3] << 24;
/* fall through */
case 3:
b |= (uint64_t)H->buf[2] << 16;
/* fall through */
case 2:
b |= (uint64_t)H->buf[1] << 8;
/* fall through */
case 1:
b |= (uint64_t)H->buf[0] << 0;
/* fall through */
case 0:
break;
}
H->v3 ^= b;
sip_round(H, 2);
H->v0 ^= b;
H->v2 ^= 0xff;
sip_round(H, 4);
return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
} /* sip24_final() */
static uint64_t
siphash24(const void *src, size_t len, const struct sipkey *key) {
struct siphash state = SIPHASH_INITIALIZER;
return sip24_final(sip24_update(sip24_init(&state, key), src, len));
} /* siphash24() */
/*
* SipHash-2-4 output with
* k = 00 01 02 ...
* and
* in = (empty string)
* in = 00 (1 byte)
* in = 00 01 (2 bytes)
* in = 00 01 02 (3 bytes)
* ...
* in = 00 01 02 ... 3e (63 bytes)
*/
static int
sip24_valid(void) {
/* clang-format off */
static const unsigned char vectors[64][8] = {
{ 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
{ 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
{ 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, },
{ 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, },
{ 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, },
{ 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, },
{ 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, },
{ 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, },
{ 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, },
{ 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, },
{ 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, },
{ 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, },
{ 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, },
{ 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, },
{ 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, },
{ 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, },
{ 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, },
{ 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, },
{ 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, },
{ 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, },
{ 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, },
{ 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, },
{ 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, },
{ 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, },
{ 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, },
{ 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, },
{ 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, },
{ 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, },
{ 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, },
{ 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, },
{ 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, },
{ 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, },
{ 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, },
{ 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, },
{ 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, },
{ 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, },
{ 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, },
{ 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, },
{ 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, },
{ 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, },
{ 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, },
{ 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, },
{ 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, },
{ 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, },
{ 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, },
{ 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, },
{ 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, },
{ 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, },
{ 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, },
{ 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, },
{ 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, },
{ 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, },
{ 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, },
{ 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, },
{ 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, },
{ 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, },
{ 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, },
{ 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, },
{ 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, },
{ 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, },
{ 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, },
{ 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, },
{ 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
{ 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
};
/* clang-format on */
unsigned char in[64];
struct sipkey k;
size_t i;
sip_tokey(&k, "\000\001\002\003\004\005\006\007\010\011"
"\012\013\014\015\016\017");
for (i = 0; i < sizeof in; ++i) {
in[i] = (unsigned char)i;
if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i]))
return 0;
}
return 1;
} /* sip24_valid() */
#ifdef SIPHASH_MAIN
# include <stdio.h>
int
main(void) {
const int ok = sip24_valid();
if (ok)
puts("OK");
else
puts("FAIL");
return ! ok;
} /* main() */
#endif /* SIPHASH_MAIN */
#endif /* SIPHASH_H */
-66
View File
@@ -1,66 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
-8400
View File
File diff suppressed because it is too large Load Diff
-1251
View File
File diff suppressed because it is too large Load Diff
-142
View File
@@ -1,142 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
#ifdef __VMS
/* 0 1 2 3 0 1 2 3
1234567890123456789012345678901 1234567890123456789012345678901 */
# define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
#endif
#include "xmltok.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
XML_ROLE_ERROR = -1,
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID,
XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME,
XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME,
XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID,
XML_ROLE_NOTATION_PUBLIC_ID,
XML_ROLE_ATTRIBUTE_NAME,
XML_ROLE_ATTRIBUTE_TYPE_CDATA,
XML_ROLE_ATTRIBUTE_TYPE_ID,
XML_ROLE_ATTRIBUTE_TYPE_IDREF,
XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY,
XML_ROLE_CONTENT_PCDATA,
XML_ROLE_GROUP_OPEN,
XML_ROLE_GROUP_CLOSE,
XML_ROLE_GROUP_CLOSE_REP,
XML_ROLE_GROUP_CLOSE_OPT,
XML_ROLE_GROUP_CLOSE_PLUS,
XML_ROLE_GROUP_CHOICE,
XML_ROLE_GROUP_SEQUENCE,
XML_ROLE_CONTENT_ELEMENT,
XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS,
XML_ROLE_PI,
XML_ROLE_COMMENT,
#ifdef XML_DTD
XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT,
XML_ROLE_INNER_PARAM_ENTITY_REF,
#endif /* XML_DTD */
XML_ROLE_PARAM_ENTITY_REF
};
typedef struct prolog_state {
int(PTRCALL *handler)(struct prolog_state *state, int tok, const char *ptr,
const char *end, const ENCODING *enc);
unsigned level;
int role_none;
#ifdef XML_DTD
unsigned includeLevel;
int documentEntity;
int inEntityValue;
#endif /* XML_DTD */
} PROLOG_STATE;
void XmlPrologStateInit(PROLOG_STATE *);
#ifdef XML_DTD
void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
#endif /* XML_DTD */
#define XmlTokenRole(state, tok, ptr, end, enc) \
(((state)->handler)(state, tok, ptr, end, enc))
#ifdef __cplusplus
}
#endif
#endif /* not XmlRole_INCLUDED */
-1673
View File
File diff suppressed because it is too large Load Diff
-319
View File
@@ -1,319 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2002-2005 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2016-2017 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef XmlTok_INCLUDED
#define XmlTok_INCLUDED 1
#ifdef __cplusplus
extern "C" {
#endif
/* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB \
-5 /* ] or ]] at the end of the scan; might be \
start of illegal ]]> sequence */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_NONE -4 /* The string to be scanned is empty */
#define XML_TOK_TRAILING_CR \
-3 /* A CR at the end of the scan; \
might be part of CRLF sequence */
#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
#define XML_TOK_PARTIAL -1 /* only part of a token */
#define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
*/
#define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
#define XML_TOK_END_TAG 5
#define XML_TOK_DATA_CHARS 6
#define XML_TOK_DATA_NEWLINE 7
#define XML_TOK_CDATA_SECT_OPEN 8
#define XML_TOK_ENTITY_REF 9
#define XML_TOK_CHAR_REF 10 /* numeric character reference */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_PI 11 /* processing instruction */
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13
#define XML_TOK_BOM 14 /* Byte order mark */
/* The following tokens are returned only by XmlPrologTok */
#define XML_TOK_PROLOG_S 15
#define XML_TOK_DECL_OPEN 16 /* <!foo */
#define XML_TOK_DECL_CLOSE 17 /* > */
#define XML_TOK_NAME 18
#define XML_TOK_NMTOKEN 19
#define XML_TOK_POUND_NAME 20 /* #name */
#define XML_TOK_OR 21 /* | */
#define XML_TOK_PERCENT 22
#define XML_TOK_OPEN_PAREN 23
#define XML_TOK_CLOSE_PAREN 24
#define XML_TOK_OPEN_BRACKET 25
#define XML_TOK_CLOSE_BRACKET 26
#define XML_TOK_LITERAL 27
#define XML_TOK_PARAM_ENTITY_REF 28
#define XML_TOK_INSTANCE_START 29
/* The following occur only in element type declarations */
#define XML_TOK_NAME_QUESTION 30 /* name? */
#define XML_TOK_NAME_ASTERISK 31 /* name* */
#define XML_TOK_NAME_PLUS 32 /* name+ */
#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
#define XML_TOK_COMMA 38
/* The following token is returned only by XmlAttributeValueTok */
#define XML_TOK_ATTRIBUTE_VALUE_S 39
/* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40
/* With namespace processing this is returned by XmlPrologTok for a
name with a colon.
*/
#define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD
# define XML_TOK_IGNORE_SECT 42
#endif /* XML_DTD */
#ifdef XML_DTD
# define XML_N_STATES 4
#else /* not XML_DTD */
# define XML_N_STATES 3
#endif /* not XML_DTD */
#define XML_PROLOG_STATE 0
#define XML_CONTENT_STATE 1
#define XML_CDATA_SECTION_STATE 2
#ifdef XML_DTD
# define XML_IGNORE_SECTION_STATE 3
#endif /* XML_DTD */
#define XML_N_LITERAL_TYPES 2
#define XML_ATTRIBUTE_VALUE_LITERAL 0
#define XML_ENTITY_VALUE_LITERAL 1
/* The size of the buffer passed to XmlUtf8Encode must be at least this. */
#define XML_UTF8_ENCODE_MAX 4
/* The size of the buffer passed to XmlUtf16Encode must be at least this. */
#define XML_UTF16_ENCODE_MAX 2
typedef struct position {
/* first line and first column are 0 not 1 */
XML_Size lineNumber;
XML_Size columnNumber;
} POSITION;
typedef struct {
const char *name;
const char *valuePtr;
const char *valueEnd;
char normalized;
} ATTRIBUTE;
struct encoding;
typedef struct encoding ENCODING;
typedef int(PTRCALL *SCANNER)(const ENCODING *, const char *, const char *,
const char **);
enum XML_Convert_Result {
XML_CONVERT_COMPLETED = 0,
XML_CONVERT_INPUT_INCOMPLETE = 1,
XML_CONVERT_OUTPUT_EXHAUSTED
= 2 /* and therefore potentially input remaining as well */
};
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
int(PTRCALL *nameMatchesAscii)(const ENCODING *, const char *, const char *,
const char *);
int(PTRFASTCALL *nameLength)(const ENCODING *, const char *);
const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
int(PTRCALL *getAtts)(const ENCODING *enc, const char *ptr, int attsMax,
ATTRIBUTE *atts);
int(PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
int(PTRCALL *predefinedEntityName)(const ENCODING *, const char *,
const char *);
void(PTRCALL *updatePosition)(const ENCODING *, const char *ptr,
const char *end, POSITION *);
int(PTRCALL *isPublicId)(const ENCODING *enc, const char *ptr,
const char *end, const char **badPtr);
enum XML_Convert_Result(PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim, char **toP,
const char *toLim);
enum XML_Convert_Result(PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,
const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
};
/* Scan the string starting at ptr until the end of the next complete
token, but do not scan past eptr. Return an integer giving the
type of token.
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
Return XML_TOK_PARTIAL when the string does not contain a complete
token; nextTokPtr will not be set.
Return XML_TOK_INVALID when the string does not start a valid
token; nextTokPtr will be set to point to the character which made
the token invalid.
Otherwise the string starts with a valid token; nextTokPtr will be
set to point to the character following the end of that token.
Each data character counts as a single token, but adjacent data
characters may be returned together. Similarly for characters in
the prolog outside literals, comments and processing instructions.
*/
#define XmlTok(enc, state, ptr, end, nextTokPtr) \
(((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
#define XmlPrologTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
#define XmlContentTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
#ifdef XML_DTD
# define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr)
#endif /* XML_DTD */
/* This is used for performing a 2nd-level tokenization on the content
of a literal that has already been returned by XmlTok.
*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \
(((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
#define XmlGetAttributes(enc, ptr, attsMax, atts) \
(((enc)->getAtts)(enc, ptr, attsMax, atts))
#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
#define XmlPredefinedEntityName(enc, ptr, end) \
(((enc)->predefinedEntityName)(enc, ptr, end))
#define XmlUpdatePosition(enc, ptr, end, pos) \
(((enc)->updatePosition)(enc, ptr, end, pos))
#define XmlIsPublicId(enc, ptr, end, badPtr) \
(((enc)->isPublicId)(enc, ptr, end, badPtr))
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
typedef struct {
ENCODING initEnc;
const ENCODING **encPtr;
} INIT_ENCODING;
int XmlParseXmlDecl(int isGeneralTextEntity, const ENCODING *enc,
const char *ptr, const char *end, const char **badPtr,
const char **versionPtr, const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr, int *standalonePtr);
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void);
const ENCODING *XmlGetUtf16InternalEncoding(void);
int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void);
typedef int(XMLCALL *CONVERTER)(void *userData, const char *p);
ENCODING *XmlInitUnknownEncoding(void *mem, int *table, CONVERTER convert,
void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity, const ENCODING *enc,
const char *ptr, const char *end, const char **badPtr,
const char **versionPtr, const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr, int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING *XmlInitUnknownEncodingNS(void *mem, int *table, CONVERTER convert,
void *userData);
#ifdef __cplusplus
}
#endif
#endif /* not XmlTok_INCLUDED */
-74
View File
@@ -1,74 +0,0 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2017-2019 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
enum {
BT_NONXML, /* e.g. noncharacter-FFFF */
BT_MALFORM, /* illegal, with regard to encoding */
BT_LT, /* less than = "<" */
BT_AMP, /* ampersand = "&" */
BT_RSQB, /* right square bracket = "[" */
BT_LEAD2, /* lead byte of a 2-byte UTF-8 character */
BT_LEAD3, /* lead byte of a 3-byte UTF-8 character */
BT_LEAD4, /* lead byte of a 4-byte UTF-8 character */
BT_TRAIL, /* trailing unit, e.g. second 16-bit unit of a 4-byte char. */
BT_CR, /* carriage return = "\r" */
BT_LF, /* line feed = "\n" */
BT_GT, /* greater than = ">" */
BT_QUOT, /* quotation character = "\"" */
BT_APOS, /* apostrophe = "'" */
BT_EQUALS, /* equal sign = "=" */
BT_QUEST, /* question mark = "?" */
BT_EXCL, /* exclamation mark = "!" */
BT_SOL, /* solidus, slash = "/" */
BT_SEMI, /* semicolon = ";" */
BT_NUM, /* number sign = "#" */
BT_LSQB, /* left square bracket = "[" */
BT_S, /* white space, e.g. "\t", " "[, "\r"] */
BT_NMSTRT, /* non-hex name start letter = "G".."Z" + "g".."z" + "_" */
BT_COLON, /* colon = ":" */
BT_HEX, /* hex letter = "A".."F" + "a".."f" */
BT_DIGIT, /* digit = "0".."9" */
BT_NAME, /* dot and middle dot = "." + chr(0xb7) */
BT_MINUS, /* minus = "-" */
BT_OTHER, /* known not to be a name or name start character */
BT_NONASCII, /* might be a name or name start character */
BT_PERCNT, /* percent sign = "%" */
BT_LPAR, /* left parenthesis = "(" */
BT_RPAR, /* right parenthesis = "(" */
BT_AST, /* asterisk = "*" */
BT_PLUS, /* plus sign = "+" */
BT_COMMA, /* comma = "," */
BT_VERBAR /* vertical bar = "|" */
};
#include <stddef.h>
-1819
View File
File diff suppressed because it is too large Load Diff
-122
View File
@@ -1,122 +0,0 @@
/* This file is included!
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef XML_TOK_NS_C
const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void) {
return &ns(internal_utf8_encoding).enc;
}
const ENCODING *
NS(XmlGetUtf16InternalEncoding)(void) {
# if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc;
# elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc;
# else
const short n = 1;
return (*(const char *)&n ? &ns(internal_little2_encoding).enc
: &ns(internal_big2_encoding).enc);
# endif
}
static const ENCODING *const NS(encodings)[] = {
&ns(latin1_encoding).enc, &ns(ascii_encoding).enc,
&ns(utf8_encoding).enc, &ns(big2_encoding).enc,
&ns(big2_encoding).enc, &ns(little2_encoding).enc,
&ns(utf8_encoding).enc /* NO_ENC */
};
static int PTRCALL
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) {
return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE,
ptr, end, nextTokPtr);
}
static int PTRCALL
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) {
return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE,
ptr, end, nextTokPtr);
}
int
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
const char *name) {
int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC)
return 0;
SET_INIT_ENC_INDEX(p, i);
p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
p->initEnc.updatePosition = initUpdatePosition;
p->encPtr = encPtr;
*encPtr = &(p->initEnc);
return 1;
}
static const ENCODING *
NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) {
# define ENCODING_MAX 128
char buf[ENCODING_MAX] = "";
char *p = buf;
int i;
XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
if (ptr != end)
return 0;
*p = 0;
if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
return enc;
i = getEncodingIndex(buf);
if (i == UNKNOWN_ENC)
return 0;
return NS(encodings)[i];
}
int
NS(XmlParseXmlDecl)(int isGeneralTextEntity, const ENCODING *enc,
const char *ptr, const char *end, const char **badPtr,
const char **versionPtr, const char **versionEndPtr,
const char **encodingName, const ENCODING **encoding,
int *standalone) {
return doParseXmlDecl(NS(findEncoding), isGeneralTextEntity, enc, ptr, end,
badPtr, versionPtr, versionEndPtr, encodingName,
encoding, standalone);
}
#endif /* XML_TOK_NS_C */
+16
View File
@@ -1,7 +1,23 @@
# libjpeg-turbo carries its own old copy of GNUInstallDirs, which installs into lib64 on
# any 64-bit Linux that is not Debian-based. CMake does not search lib64 on Arch, where
# find_package(JPEG) would then skip this copy and take the system libjpeg, whose ABI
# version differs from these headers. Install into lib like every other dep.
set(_jpeg_platform_args "")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# WebKitGTK loads the system libjpeg into the same process. Linked with GNU ld, the
# executable exports the functions of this static copy that a linked shared library
# references, so code built against the system libjpeg (WebKitGTK, GStreamer's jpeg
# plugin) would call them and fail their ABI version check. Hidden visibility keeps
# this copy private to the executable that embeds it.
set(_jpeg_platform_args -DCMAKE_C_VISIBILITY_PRESET=hidden)
endif ()
orcaslicer_add_cmake_project(JPEG
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.2.0.zip
URL_HASH SHA256=1b4c2cb6cba1ca5e53b9e85eeeab02154cab4b70894c96e97a9c747a26d19d63
CMAKE_ARGS
-DENABLE_SHARED=OFF
-DENABLE_STATIC=ON
-DCMAKE_INSTALL_LIBDIR=lib
${_jpeg_platform_args}
)
+14 -1
View File
@@ -21,6 +21,18 @@ else ()
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=OFF")
endif ()
# wxUSE_EXPAT=sys makes wxxml compile against the expat installed in the deps
# prefix. That library is static, and upstream expat headers declare its API
# __declspec(dllimport) unless XML_STATIC is defined, which wx never does.
if (WIN32)
set(_wx_expat_static
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -DXML_STATIC"
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -DXML_STATIC"
)
else ()
set(_wx_expat_static "")
endif ()
# With a precompiled header, clang-cl can omit an exception type's copy constructor from its throw info,
# so copies of the exception share and double-free their data: https://github.com/llvm/llvm-project/issues/53486
if (MSVC AND CMAKE_C_COMPILER_ID STREQUAL "Clang")
@@ -32,7 +44,7 @@ endif ()
orcaslicer_add_cmake_project(
wxWidgets
GIT_REPOSITORY "https://github.com/OrcaSlicer/Orca-deps-wxWidgets"
GIT_TAG 5b7e8c0cde6b975d63613188d2ac6c1ab8769fbc
GIT_TAG b44c39c100975a0ac0e46f937aa3f3eae5e18631
GIT_SHALLOW ON
GIT_SUBMODULES 3rdparty/catch 3rdparty/pcre 3rdparty/libwebp
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${JPEG_PKG}
@@ -63,6 +75,7 @@ orcaslicer_add_cmake_project(
-DwxUSE_LIBTIFF=OFF
-DwxUSE_LIBWEBP=builtin
-DwxUSE_EXPAT=sys
${_wx_expat_static}
-DwxUSE_NANOSVG=OFF
)
-1
View File
@@ -16,7 +16,6 @@ add_subdirectory(stb_dxt) # Header-only STB DXT compression library
add_subdirectory(Shiny)
add_subdirectory(admesh)
add_subdirectory(clipper2)
add_subdirectory(expat)
add_subdirectory(glu-libtess)
add_subdirectory(hidapi)
add_subdirectory(hints) # Hints library with utility executable
-37
View File
@@ -1,37 +0,0 @@
cmake_minimum_required(VERSION 3.13)
project(expat)
add_library(expat STATIC
xmlparse.c
xmlrole.c
xmltok.c
)
target_include_directories(expat SYSTEM
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(expat PRIVATE
ascii.h
asciitab.h
expat.h
expat_config.h
expat_external.h
iasciitab.h
internal.h
latin1tab.h
nametab.h
utf8tab.h
xmlrole.h
xmltok.h
xmltok_impl.h
)
if(WIN32)
target_compile_definitions(expat PRIVATE COMPILED_FROM_DSP XML_STATIC)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(expat PRIVATE -Wno-unused-parameter)
endif()
-21
View File
@@ -1,21 +0,0 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2016 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-146
View File
@@ -1,146 +0,0 @@
Expat, Release 2.2.0, stripped and modified for inclusion into Slic3r.
Only the library sources needed for static linking were left.
The original README follows:
---------------------------------------------------------------------
Expat, Release 2.2.0
This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of
structures for which you may register handlers.
Windows users should use the expat_win32bin package, which includes
both precompiled libraries and executables, and source code for
developers.
Expat is free software. You may copy, distribute, and modify it under
the terms of the License contained in the file COPYING distributed
with this package. This license is the same as the MIT/X Consortium
license.
Versions of Expat that have an odd minor version (the middle number in
the release above), are development releases and should be considered
as beta software. Releases with even minor version numbers are
intended to be production grade software.
If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.58 or newer. Run the script like this:
./buildconf.sh
Once this has been done, follow the same instructions as for building
from a source distribution.
To build Expat from a source distribution, you first run the
configuration shell script in the top level distribution directory:
./configure
There are many options which you may provide to configure (which you
can discover by running configure with the --help option). But the
one of most interest is the one that sets the installation directory.
By default, the configure script will set things up to install
libexpat into /usr/local/lib, expat.h into /usr/local/include, and
xmlwf into /usr/local/bin. If, for example, you'd prefer to install
into /home/me/mystuff/lib, /home/me/mystuff/include, and
/home/me/mystuff/bin, you can tell configure about that with:
./configure --prefix=/home/me/mystuff
Another interesting option is to enable 64-bit integer support for
line and column numbers and the over-all byte index:
./configure CPPFLAGS=-DXML_LARGE_SIZE
However, such a modification would be a breaking change to the ABI
and is therefore not recommended for general use - e.g. as part of
a Linux distribution - but rather for builds with special requirements.
After running the configure script, the "make" command will build
things and "make install" will install things into their proper
location. Have a look at the "Makefile" to learn about additional
"make" options. Note that you need to have write permission into
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error
strings as char), run:
./configure CPPFLAGS=-DXML_UNICODE
For UTF-16 output as wchar_t (incl. version/error strings),
run:
./configure CFLAGS="-g -O2 -fshort-wchar" \
CPPFLAGS=-DXML_UNICODE_WCHAR_T
2. Edit the MakeFile, changing:
LIBRARY = libexpat.la
to:
LIBRARY = libexpatw.la
(Note the additional "w" in the library name.)
3. Run "make buildlib" (which builds the library only).
Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
4. Run "make installlib" (which installs the library only).
Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
value for DESTDIR, and the rest of the make file using only DESTDIR.
It works as follows:
$ make install DESTDIR=/path/to/image
overrides the in-makefile set DESTDIR, while both
$ INSTALL_ROOT=/path/to/image make install
$ make install INSTALL_ROOT=/path/to/image
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to
add this to your path for the "make" command, and probably also switch
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
properly -- apparently it does not understand .PHONY directives). If
you're using ksh or bash, use this command to build:
PATH=/usr/ccs/bin:$PATH make
When using Expat with a project using autoconf for configuration, you
can use the probing macro in conftools/expat.m4 to determine how to
include Expat. See the comments at the top of that file for more
information.
A reference manual is available in the file doc/reference.html in this
distribution.
The homepage for this project is http://www.libexpat.org/. There
are links there to connect you to the bug reports page. If you need
to report a bug when you don't have access to a browser, you may also
send a bug report by email to expat-bugs@mail.libexpat.org.
Discussion related to the direction of future expat development takes
place on expat-discuss@mail.libexpat.org. Archives of this list and
other Expat-related lists may be found at:
http://mail.libexpat.org/mailman/listinfo/
-92
View File
@@ -1,92 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#define ASCII_O 0x4F
#define ASCII_P 0x50
#define ASCII_Q 0x51
#define ASCII_R 0x52
#define ASCII_S 0x53
#define ASCII_T 0x54
#define ASCII_U 0x55
#define ASCII_V 0x56
#define ASCII_W 0x57
#define ASCII_X 0x58
#define ASCII_Y 0x59
#define ASCII_Z 0x5A
#define ASCII_a 0x61
#define ASCII_b 0x62
#define ASCII_c 0x63
#define ASCII_d 0x64
#define ASCII_e 0x65
#define ASCII_f 0x66
#define ASCII_g 0x67
#define ASCII_h 0x68
#define ASCII_i 0x69
#define ASCII_j 0x6A
#define ASCII_k 0x6B
#define ASCII_l 0x6C
#define ASCII_m 0x6D
#define ASCII_n 0x6E
#define ASCII_o 0x6F
#define ASCII_p 0x70
#define ASCII_q 0x71
#define ASCII_r 0x72
#define ASCII_s 0x73
#define ASCII_t 0x74
#define ASCII_u 0x75
#define ASCII_v 0x76
#define ASCII_w 0x77
#define ASCII_x 0x78
#define ASCII_y 0x79
#define ASCII_z 0x7A
#define ASCII_0 0x30
#define ASCII_1 0x31
#define ASCII_2 0x32
#define ASCII_3 0x33
#define ASCII_4 0x34
#define ASCII_5 0x35
#define ASCII_6 0x36
#define ASCII_7 0x37
#define ASCII_8 0x38
#define ASCII_9 0x39
#define ASCII_TAB 0x09
#define ASCII_SPACE 0x20
#define ASCII_EXCL 0x21
#define ASCII_QUOT 0x22
#define ASCII_AMP 0x26
#define ASCII_APOS 0x27
#define ASCII_MINUS 0x2D
#define ASCII_PERIOD 0x2E
#define ASCII_COLON 0x3A
#define ASCII_SEMI 0x3B
#define ASCII_LT 0x3C
#define ASCII_EQUALS 0x3D
#define ASCII_GT 0x3E
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C
-36
View File
@@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
File diff suppressed because it is too large Load Diff
-33
View File
@@ -1,33 +0,0 @@
/*================================================================
** Copyright 2000, Clark Cooper
** All rights reserved.
**
** This is free software. You are permitted to copy, distribute, or modify
** it under the terms of the MIT/X license (contained in the COPYING file
** with this distribution.)
*/
#ifndef EXPATCONFIG_H
#define EXPATCONFIG_H
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#else
#endif
#endif /* ifndef EXPATCONFIG_H */
-129
View File
@@ -1,129 +0,0 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(_MSC_VER)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
#ifdef XML_USE_MSC_EXTENSIONS
// #define XMLIMPORT __declspec(dllimport)
#endif
#endif
#endif /* not defined XML_STATIC */
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
#define XMLIMPORT __attribute__ ((visibility ("default")))
#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
#define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
#define XML_ATTR_MALLOC
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
#define XML_ATTR_ALLOC_SIZE(x)
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */
-37
View File
@@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
-95
View File
@@ -1,95 +0,0 @@
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
*/
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
#define FASTCALL __attribute__((regparm(3)))
#define PTRFASTCALL __attribute__((regparm(3)))
#endif
/* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
/* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef PTRCALL
#define PTRCALL
#endif
#ifndef PTRFASTCALL
#define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
#ifndef UNUSED_P
# ifdef __GNUC__
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
# else
# define UNUSED_P(p) UNUSED_ ## p
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
void
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
#ifdef __cplusplus
}
#endif
-36
View File
@@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-150
View File
@@ -1,150 +0,0 @@
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000,
0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003,
0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003,
0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001,
0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003,
0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003,
0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003,
0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000,
0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF,
0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB,
0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF,
0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
0x00000000, 0x00004C40, 0x00000000, 0x00000000,
0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF,
0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF,
0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000,
0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003,
0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF,
0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF,
0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF,
0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0,
0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3,
0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80,
0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000,
0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000,
0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF,
0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00,
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00,
0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-37
View File
@@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-114
View File
@@ -1,114 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
#ifdef __VMS
/* 0 1 2 3 0 1 2 3
1234567890123456789012345678901 1234567890123456789012345678901 */
#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
#endif
#include "xmltok.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
XML_ROLE_ERROR = -1,
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID,
XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME,
XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME,
XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID,
XML_ROLE_NOTATION_PUBLIC_ID,
XML_ROLE_ATTRIBUTE_NAME,
XML_ROLE_ATTRIBUTE_TYPE_CDATA,
XML_ROLE_ATTRIBUTE_TYPE_ID,
XML_ROLE_ATTRIBUTE_TYPE_IDREF,
XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY,
XML_ROLE_CONTENT_PCDATA,
XML_ROLE_GROUP_OPEN,
XML_ROLE_GROUP_CLOSE,
XML_ROLE_GROUP_CLOSE_REP,
XML_ROLE_GROUP_CLOSE_OPT,
XML_ROLE_GROUP_CLOSE_PLUS,
XML_ROLE_GROUP_CHOICE,
XML_ROLE_GROUP_SEQUENCE,
XML_ROLE_CONTENT_ELEMENT,
XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS,
XML_ROLE_PI,
XML_ROLE_COMMENT,
#ifdef XML_DTD
XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT,
XML_ROLE_INNER_PARAM_ENTITY_REF,
#endif /* XML_DTD */
XML_ROLE_PARAM_ENTITY_REF
};
typedef struct prolog_state {
int (PTRCALL *handler) (struct prolog_state *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc);
unsigned level;
int role_none;
#ifdef XML_DTD
unsigned includeLevel;
int documentEntity;
int inEntityValue;
#endif /* XML_DTD */
} PROLOG_STATE;
void XmlPrologStateInit(PROLOG_STATE *);
#ifdef XML_DTD
void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
#endif /* XML_DTD */
#define XmlTokenRole(state, tok, ptr, end, enc) \
(((state)->handler)(state, tok, ptr, end, enc))
#ifdef __cplusplus
}
#endif
#endif /* not XmlRole_INCLUDED */
File diff suppressed because it is too large Load Diff
-322
View File
@@ -1,322 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlTok_INCLUDED
#define XmlTok_INCLUDED 1
#ifdef __cplusplus
extern "C" {
#endif
/* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
start of illegal ]]> sequence */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_NONE -4 /* The string to be scanned is empty */
#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
might be part of CRLF sequence */
#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
#define XML_TOK_PARTIAL -1 /* only part of a token */
#define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
*/
#define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
#define XML_TOK_END_TAG 5
#define XML_TOK_DATA_CHARS 6
#define XML_TOK_DATA_NEWLINE 7
#define XML_TOK_CDATA_SECT_OPEN 8
#define XML_TOK_ENTITY_REF 9
#define XML_TOK_CHAR_REF 10 /* numeric character reference */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_PI 11 /* processing instruction */
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13
#define XML_TOK_BOM 14 /* Byte order mark */
/* The following tokens are returned only by XmlPrologTok */
#define XML_TOK_PROLOG_S 15
#define XML_TOK_DECL_OPEN 16 /* <!foo */
#define XML_TOK_DECL_CLOSE 17 /* > */
#define XML_TOK_NAME 18
#define XML_TOK_NMTOKEN 19
#define XML_TOK_POUND_NAME 20 /* #name */
#define XML_TOK_OR 21 /* | */
#define XML_TOK_PERCENT 22
#define XML_TOK_OPEN_PAREN 23
#define XML_TOK_CLOSE_PAREN 24
#define XML_TOK_OPEN_BRACKET 25
#define XML_TOK_CLOSE_BRACKET 26
#define XML_TOK_LITERAL 27
#define XML_TOK_PARAM_ENTITY_REF 28
#define XML_TOK_INSTANCE_START 29
/* The following occur only in element type declarations */
#define XML_TOK_NAME_QUESTION 30 /* name? */
#define XML_TOK_NAME_ASTERISK 31 /* name* */
#define XML_TOK_NAME_PLUS 32 /* name+ */
#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
#define XML_TOK_COMMA 38
/* The following token is returned only by XmlAttributeValueTok */
#define XML_TOK_ATTRIBUTE_VALUE_S 39
/* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40
/* With namespace processing this is returned by XmlPrologTok for a
name with a colon.
*/
#define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD
#define XML_TOK_IGNORE_SECT 42
#endif /* XML_DTD */
#ifdef XML_DTD
#define XML_N_STATES 4
#else /* not XML_DTD */
#define XML_N_STATES 3
#endif /* not XML_DTD */
#define XML_PROLOG_STATE 0
#define XML_CONTENT_STATE 1
#define XML_CDATA_SECTION_STATE 2
#ifdef XML_DTD
#define XML_IGNORE_SECTION_STATE 3
#endif /* XML_DTD */
#define XML_N_LITERAL_TYPES 2
#define XML_ATTRIBUTE_VALUE_LITERAL 0
#define XML_ENTITY_VALUE_LITERAL 1
/* The size of the buffer passed to XmlUtf8Encode must be at least this. */
#define XML_UTF8_ENCODE_MAX 4
/* The size of the buffer passed to XmlUtf16Encode must be at least this. */
#define XML_UTF16_ENCODE_MAX 2
typedef struct position {
/* first line and first column are 0 not 1 */
XML_Size lineNumber;
XML_Size columnNumber;
} POSITION;
typedef struct {
const char *name;
const char *valuePtr;
const char *valueEnd;
char normalized;
} ATTRIBUTE;
struct encoding;
typedef struct encoding ENCODING;
typedef int (PTRCALL *SCANNER)(const ENCODING *,
const char *,
const char *,
const char **);
enum XML_Convert_Result {
XML_CONVERT_COMPLETED = 0,
XML_CONVERT_INPUT_INCOMPLETE = 1,
XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
};
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
int (PTRCALL *sameName)(const ENCODING *,
const char *,
const char *);
int (PTRCALL *nameMatchesAscii)(const ENCODING *,
const char *,
const char *,
const char *);
int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
int (PTRCALL *getAtts)(const ENCODING *enc,
const char *ptr,
int attsMax,
ATTRIBUTE *atts);
int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
int (PTRCALL *predefinedEntityName)(const ENCODING *,
const char *,
const char *);
void (PTRCALL *updatePosition)(const ENCODING *,
const char *ptr,
const char *end,
POSITION *);
int (PTRCALL *isPublicId)(const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr);
enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
char **toP,
const char *toLim);
enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,
const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
};
/* Scan the string starting at ptr until the end of the next complete
token, but do not scan past eptr. Return an integer giving the
type of token.
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
Return XML_TOK_PARTIAL when the string does not contain a complete
token; nextTokPtr will not be set.
Return XML_TOK_INVALID when the string does not start a valid
token; nextTokPtr will be set to point to the character which made
the token invalid.
Otherwise the string starts with a valid token; nextTokPtr will be
set to point to the character following the end of that token.
Each data character counts as a single token, but adjacent data
characters may be returned together. Similarly for characters in
the prolog outside literals, comments and processing instructions.
*/
#define XmlTok(enc, state, ptr, end, nextTokPtr) \
(((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
#define XmlPrologTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
#define XmlContentTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
#ifdef XML_DTD
#define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr)
#endif /* XML_DTD */
/* This is used for performing a 2nd-level tokenization on the content
of a literal that has already been returned by XmlTok.
*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2))
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \
(((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
#define XmlNameLength(enc, ptr) \
(((enc)->nameLength)(enc, ptr))
#define XmlSkipS(enc, ptr) \
(((enc)->skipS)(enc, ptr))
#define XmlGetAttributes(enc, ptr, attsMax, atts) \
(((enc)->getAtts)(enc, ptr, attsMax, atts))
#define XmlCharRefNumber(enc, ptr) \
(((enc)->charRefNumber)(enc, ptr))
#define XmlPredefinedEntityName(enc, ptr, end) \
(((enc)->predefinedEntityName)(enc, ptr, end))
#define XmlUpdatePosition(enc, ptr, end, pos) \
(((enc)->updatePosition)(enc, ptr, end, pos))
#define XmlIsPublicId(enc, ptr, end, badPtr) \
(((enc)->isPublicId)(enc, ptr, end, badPtr))
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
typedef struct {
ENCODING initEnc;
const ENCODING **encPtr;
} INIT_ENCODING;
int XmlParseXmlDecl(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void);
const ENCODING *XmlGetUtf16InternalEncoding(void);
int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void);
typedef int (XMLCALL *CONVERTER) (void *userData, const char *p);
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
void *userData);
#ifdef __cplusplus
}
#endif
#endif /* not XmlTok_INCLUDED */
-46
View File
@@ -1,46 +0,0 @@
/*
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
enum {
BT_NONXML,
BT_MALFORM,
BT_LT,
BT_AMP,
BT_RSQB,
BT_LEAD2,
BT_LEAD3,
BT_LEAD4,
BT_TRAIL,
BT_CR,
BT_LF,
BT_GT,
BT_QUOT,
BT_APOS,
BT_EQUALS,
BT_QUEST,
BT_EXCL,
BT_SOL,
BT_SEMI,
BT_NUM,
BT_LSQB,
BT_S,
BT_NMSTRT,
BT_COLON,
BT_HEX,
BT_DIGIT,
BT_NAME,
BT_MINUS,
BT_OTHER, /* known not to be a name or name start character */
BT_NONASCII, /* might be a name or name start character */
BT_PERCNT,
BT_LPAR,
BT_RPAR,
BT_AST,
BT_PLUS,
BT_COMMA,
BT_VERBAR
};
#include <stddef.h>
File diff suppressed because it is too large Load Diff
-115
View File
@@ -1,115 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_NS_C
const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void)
{
return &ns(internal_utf8_encoding).enc;
}
const ENCODING *
NS(XmlGetUtf16InternalEncoding)(void)
{
#if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc;
#elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc;
#else
const short n = 1;
return (*(const char *)&n
? &ns(internal_little2_encoding).enc
: &ns(internal_big2_encoding).enc);
#endif
}
static const ENCODING * const NS(encodings)[] = {
&ns(latin1_encoding).enc,
&ns(ascii_encoding).enc,
&ns(utf8_encoding).enc,
&ns(big2_encoding).enc,
&ns(big2_encoding).enc,
&ns(little2_encoding).enc,
&ns(utf8_encoding).enc /* NO_ENC */
};
static int PTRCALL
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_PROLOG_STATE, ptr, end, nextTokPtr);
}
static int PTRCALL
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_CONTENT_STATE, ptr, end, nextTokPtr);
}
int
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
const char *name)
{
int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC)
return 0;
SET_INIT_ENC_INDEX(p, i);
p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
p->initEnc.updatePosition = initUpdatePosition;
p->encPtr = encPtr;
*encPtr = &(p->initEnc);
return 1;
}
static const ENCODING *
NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
{
#define ENCODING_MAX 128
char buf[ENCODING_MAX];
char *p = buf;
int i;
XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
if (ptr != end)
return 0;
*p = 0;
if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
return enc;
i = getEncodingIndex(buf);
if (i == UNKNOWN_ENC)
return 0;
return NS(encodings)[i];
}
int
NS(XmlParseXmlDecl)(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingName,
const ENCODING **encoding,
int *standalone)
{
return doParseXmlDecl(NS(findEncoding),
isGeneralTextEntity,
enc,
ptr,
end,
badPtr,
versionPtr,
versionEndPtr,
encodingName,
encoding,
standalone);
}
#endif /* XML_TOK_NS_C */
+13
View File
@@ -3073,6 +3073,19 @@ namespace IMGUIZMO_NAMESPACE
}
isInside = gContext.mbMouseOver && ImRect(position, position + size).Contains(io.MousePos);
// The navigator is drawn into the NoInputs "gizmo" window, so ImGui never owns the press
// (mouse_avail_to_imgui is false) and WantCaptureMouse only reflects what the previous frame asked
// for. Hold the capture for the whole gesture, otherwise a still frame drops it and the next motion
// event reaches the canvas, which adopts it as a camera drag.
if ((isClicking || isDraging) && io.MouseDown[0])
{
#if IMGUI_VERSION_NUM >= 18723
ImGui::SetNextFrameWantCaptureMouse(true);
#else
ImGui::CaptureMouseFromApp();
#endif
}
if (io.MouseDown[0] && (fabsf(io.MouseDelta[0]) || fabsf(io.MouseDelta[1])) && isClicking)
{
isClicking = false;
+4 -1
View File
@@ -144,7 +144,10 @@ The zero level is extracted with marching squares like the regular TPMS-FK, on
a sampling grid fixed in the fill frame like the optimized Gyroid, so that every
region of a layer connects its lines the same way at the saddles of the pattern.
Loops narrower than two lines (shorter than `2 * PI * spacing`) are dropped, as
they would print as blobs. The fill works in a frame rotated by the infill
they would print as blobs. A line of the pattern is part of a ring closed along
the border of the sampling grid, starting wherever the scan first met it, so the
two pieces that clipping leaves at that point are joined back into one line. The
fill works in a frame rotated by the infill
angle, so the radial field is looked up at the point rotated back into the
object frame, and the center rotated into the fill frame. Both use the middle of
the layer.
+27 -11
View File
@@ -35,9 +35,9 @@ what will be printed, so its markers come from the toolpaths, whose mass depends
and flow as well. There the solid markers are for what is printed up to the top layer the layer
slider shows: for the plate with brim, raft and supports, where the weight rests at that point of
the print; for an object or a body, its own extrusions. Each has a faded twin for the same at the
end of the print, so the slider shows the weight moving toward where it ends, and at the top layer
the two meet. In Prepare the plate has the model alone, as brim, raft and supports exist only once
sliced.
end of the print, so the slider shows the weight moving toward where it ends. At the top layer what
is printed is the finished print, whose markers then show alone and solid. In Prepare the plate has
the model alone, as brim, raft and supports exist only once sliced.
## Prepare: from the meshes
@@ -94,8 +94,8 @@ extrudes it, so a print of several materials weighs each as it is. Flow ratio, l
and purging into infill all count
as printed. Its mass spreads evenly along the segment the bead's center runs, half the layer height
below the nozzle, in the frame of the stored moves: plate offset added, Z offset removed. Such a
segment from `a` to `b` adds `m (a + b) / 2` to the moments and `m (a² + a b + b²) / 3` to the second
moments along each axis, and its box widened by half the bead's height to the bounding box; not by
segment from `a` to `b` adds `m (a + b) / 2` to the moments and `m (2 a aᵀ + a bᵀ + b aᵀ + 2 b bᵀ) / 6`
to the second moments, and its box widened by half the bead's height to the bounding box; not by
half its width, which the processor only estimates, so that a box runs along the walls' center lines. Arcs are already split into segments by the processor. Walls, infill, top and bottom surfaces, ironing
and gap fill make the parts. The brim and the support roles, the raft among them, count only in what
the plate prints. The skirt, the prime tower and custom G-code count nowhere.
@@ -127,6 +127,15 @@ of which is the faded marker's, so the solid marker for any slider position is a
the moves carry, which are also the layers of libvgcode and of the slider; in a print by object they
follow the order of printing, so the solid markers show the objects printed so far as they are.
The belt printers' upright view draws the toolpaths through the affine map that takes the moves back
to the model's frame: `BeltTransformPipeline::build_gcode_back_transform()`, then a translation that
lays them on the model. `GCodeViewer` maps the masses with it as well: their mass and volume stay as
printed, and their moments and second moments follow the map. The map shears, so mapping the corners
of a mass's box would give a box far larger than the moves. On a belt print the processor therefore
keeps a second box for each mass, of the ends of each segment, half the bead's height below and
above, mapped by the linear part of the map, which depends on the config alone; the translation then
moves it into place. The raw view draws the moves as they are, and the masses with them.
## Drawing
`smooth_sphere()` with a resolution divisible by four leaves every triangle within one octant, so it
@@ -145,7 +154,9 @@ The markers are part of the cached scene, so toggling them, or changing a filame
they are shown, marks the scene dirty, and moving the layer slider redraws the scene with the solid
markers where they belong. In Prepare they are hidden while any gizmo other than Move, Rotate, Scale
and Lay on face is open, since the others work on the surface a marker would cover, and a hidden
object has no markers.
object has no markers. The section view (see section-view.md) cuts a marker away whole when its
center lies on the cut side, as it does the toolpaths' option markers, and it cannot be clicked
then.
## Details
@@ -153,19 +164,24 @@ The markers drawn last are kept, and a left click is tested against them before
center and a point a radius to its right are projected to the screen, and the click hits a marker
within that distance. The solid markers are tested before the faded ones and the smaller kinds
before the larger, the order in which they cover each other. A hit opens the details of that marker
and keeps the click from changing the selection; a click anywhere else closes them. The box is an
and keeps the click from changing the selection; a left or right click anywhere else, or Esc, closes them. The box is an
ImGui window beside the marker, redrawn with the overlay from the markers of the last scene, so it
follows a dragged object, and in Preview the layer slider. It closes when its marker is gone, or when
the number of markers of its kind changes, as then it may stand for something else.
the number of markers of its kind changes, as then it may stand for something else. As it moves with
the view, zooming toward the cursor can bring it under the mouse, so the wheel zooms over it rather
than going to ImGui. It also covers the model, so a drag that starts on it, off its close button,
turns or pans the view as one over empty space would.
Its title says what the marker stands for: the plate, an object, an assembly or a part, the body of
an assembly. The G-code export lists the object instances for the processor, marking assemblies, as
it hands it the locator.
Each marker carries its sums: mass, volume, first moments and the second moments about the origin
along each axis, `Σ m x²`, `Σ m y²` and `Σ m z²`, which add up from parts to objects to plates. The
moment of inertia about the axis through the center parallel to x is then
`m (σy² + σz²)`, with `σ² = Σ m x² / m - c²` along each axis, and likewise for y and z. Masses are
along each axis, `Σ m x²`, `Σ m y²` and `Σ m z²`, and across them, `Σ m x y`, `Σ m x z` and `Σ m y z`,
which add up from parts to objects to plates. Together they make the symmetric `Σ m x xᵀ`, which a
shear such as the belt's maps only whole. The moment of inertia about the axis through the center
parallel to x is then `m (σy² + σz²)`, with `σ² = Σ m x² / m - c²` along each axis, and likewise for
y and z. Masses are
kept in mg, volume times density in g/cm³, and shown in g, volumes in cm³ and moments of inertia in
g·mm². In Preview the box tells the finished print from what is printed up to the layer shown, the
two weighing differently, and both are placed in the bounding box of everything the marker holds
+19 -6
View File
@@ -266,6 +266,16 @@ Feature tree and Bodies list do between themselves. `Esc`, a click on empty spac
empty rubber band all let go of it, whichever list or pick made it — except while a body Move is
open, which holds the selection until it ends (see the interaction contract).
In a sketch, a constraint is selected the same way, from its badge on the canvas or its row in
the Constraints card: either selects both, draws the badge in the selection colour and bolder, and
lights the entities the constraint binds. Delete removes the selected constraint, as do its row's
Delete button and menu. A click on a badge only selects it. A badge is small and sits where a
person aims at the geometry and its value labels, so a click that deleted would cost a constraint
for a slip of the pointer, with nothing on screen to say so. For the same reason a value label
drawn over a badge takes the click and opens its field. The selected constraint and the picked
geometry are one selection, so picking either drops the other, and `Esc` lets go of both.
Zoom to selection on a constraint's row frames the entities it binds.
Zoom to selection, on a Feature tree or Bodies row and in its right-click menu, frames one thing
along the current view direction, as the canvas's Fit button frames the selection. On a body it
frames the body whole, hidden or not, from its display mesh: the viewport never selects a hidden
@@ -287,14 +297,17 @@ The tab is a page of Orca's main window and answers to the same settings as Prep
- **Scale.** Sizes are in DIP, and a DPI change reaches `DesignPanel::msw_rescale`, which
re-rasterises every icon (button faces, flyout rows, card headers, the feature and body lists'
row icons).
- **Sidebar icons.** Every clickable icon in the sidebar shows a hover chip. The card-header and
constraint-row buttons are Orca's self-painted `Button`, because a native button cannot take a
hover background on macOS. The Feature tree and Bodies lists are a custom-drawn
- **Sidebar icons.** Every clickable icon in the sidebar shows a hover chip. The card-header
buttons are Orca's self-painted `Button`, because a native button cannot take a hover
background on macOS. The Feature tree, Bodies and Constraints lists are a custom-drawn
`DesignRowList` rather than a `wxTreeCtrl`, so each row carries its own actions — Zoom to
selection, Edit, Show/hide and Delete on a feature, Zoom to selection, Move, Show/hide and
Delete on a body, and only Show/hide on the Origin and Bed rows, a separate non-selectable list
above the features — and the eye shows whether that row is hidden. A feature with nothing to
frame keeps a blank cell where Zoom to selection would be, so every icon stays in its column.
Delete on a body, Zoom to selection and Delete on a constraint, whose row starts with its
type's icon from the Constrain toolbar, and only Show/hide on the Origin and Bed rows, a
separate non-selectable list above the features — and the eye shows whether that row is
hidden. A feature with nothing to frame keeps a blank cell where Zoom to selection would be, so
every icon stays in its column. The Constraints list draws its rows rather than holding a
window each, so a sketch of thousands of constraints lists them all.
- **Plates.** This is the one thing the tab does not follow. The canvas has a bed of its own at
the printer bed's home position, whichever plate Prepare has current, and a new document's
modeling origin is that bed's centre. A bed that followed the current plate would slide out
+7 -2
View File
@@ -19,7 +19,9 @@ world axes, which Prepare draws at the corner of the first plate, move to the co
plate, where Preview draws them.
An object instance is shown when its footprint, the XY bounding box of the convex hulls of its
volumes, overlaps the current plate, or when it is selected. The test is made per instance, so the
parts, overlaps the current plate, or when it is selected. Modifiers, negative volumes and support
enforcers and blockers are left out of the footprint, as plate membership leaves them out: a large
modifier reaching over another plate does not put the object on that plate. The test is made per instance, so the
parts of an object are shown or hidden together, and a wipe tower follows its plate the same way.
It is geometric rather than the plate membership `PartPlateList` keeps, because an instance stays on
the plate it was first placed on: an object of another plate that reaches over this one, or one too
@@ -50,7 +52,10 @@ plate toolbar takes their place: a column of plate thumbnails in the top left co
toolbar, shown when the project has more than one plate and no gizmo is open. The thumbnails are the
ones the Preview toolbar shows (`PartPlate::thumbnail_data`); the canvas rebuilds its textures when
`Plater::plate_toolbar_image_version()` changes, a counter each consumer tracks on its own so that the
Preview toolbar's dirty flag is left alone. That counter moves after almost every edit, so the
Preview toolbar's dirty flag is left alone. Geometry changes, including adding primitives and pasting
objects, advance the counter after reloading the scene and updating the volumes' printable state, so
an earlier render during object-list selection cannot leave the thumbnails cached from the old scene.
That counter moves after edits, so the
thumbnail of the current plate, the only one edited while the others are hidden, is drawn again each
time, and the other plates' only once an edit to them has invalidated theirs. The current plate has an
accent border, a hovered one the gray border of the Preview toolbar, empty plates are dimmed and the
+5 -2
View File
@@ -124,7 +124,9 @@ canvas loses focus, so a held key is one undo step.
Menu labels, toolbar tooltips, gizmo names, the context menu and the shortcuts dialog
read the registry, so a rebinding shows up in all of them. Each tracked menu item keeps
its base label; `MainFrame::update_shortcut_labels()` appends the current binding
again after an edit, which also installs the new wx accelerator.
again after an edit, which also installs the new wx accelerator. The context menu's Clone
and Reload from disk items sit in menus that are built once, so they refresh their binding
on `wxEVT_UPDATE_UI` each time the menu opens instead.
A chord that is unsafe as a menu accelerator, meaning a bare printable key, is appended
to the label as plain text so the menu cannot take it away from text fields. The macOS
@@ -156,7 +158,8 @@ Control on the Global page, and from the `?` key on the page of the view that re
the dialog should list it; the row's section heading is the `section_table` entry
above it, so a new section needs an entry there too. Pick a default that does not
collide inside its contexts; the `[Shortcuts]` tests check every default against the
others.
others. An empty chord `{}` leaves a shortcut unbound until the user picks a key,
as the jump-to-tab shortcuts are.
2. Handle it in the dispatcher of its context: `MainFrame::handle_global_shortcut`,
`GLCanvas3D::handle_shortcut`, `ObjectList::dispatch_shortcut`, or a gizmo's
`on_tool_shortcut`. A gizmo that opens on a key sets `m_shortcut` in its constructor.
+2 -1
View File
@@ -9,7 +9,8 @@ spacing (so the density holds), and `multiline_fill()` then replaces each
centerline by the lines of that wall: the centerline itself when N is odd, and
closed outlines around it at every `spacing` out to `d1 / 2`. The outlines are
clipped to the fill region contracted by half a line width, then connected like
any other infill.
any other infill. Clipping also cuts an outline at its first point, which may be
anywhere along a line, so `join_cut_outlines()` joins the pieces back first.
Outlines of centerlines that cross each other overlap at every crossing, which
over-extrudes the wall intersections. The line-crossing patterns Grid,
+122
View File
@@ -0,0 +1,122 @@
# Per-nozzle settings — High Level Design
## Purpose and scope
On printers with several extruders, or with extruders that take different
nozzles, some settings must differ per nozzle: speeds and accelerations depend
on the nozzle's flow, retraction on the drive, and a filament's flow ratio or
temperature on both. These settings are stored once per *nozzle variant* instead
of once per preset. This document covers how the variants are stored, how a
value is found for an extruder, how the settings tabs edit them, and how the copy
button moves values between extruders or variants.
## Variants and columns
A variant is the pair of an extruder type and a nozzle volume type, written as
one string such as "Direct Drive Standard" or "Direct Drive High Flow". The
printer's `extruder_variant_list` holds, per extruder, the comma-separated
variants that extruder can take. Which one is in use comes from the project's
`nozzle_volume_type`, one entry per extruder, set in the sidebar. A Hybrid
extruder carries both Standard and High Flow nozzles, and each filament's own
volume type picks between them.
Each per-variant setting is a vector with one value per *column*. Two parallel
vectors describe the columns of a preset:
| Scope | Settings | Column keys | Values per column |
|----------|---------------------------------------------------|---------------------------------------------------|-------------------|
| Process | `print_options_with_variant` | `print_extruder_id`, `print_extruder_variant` | 1 |
| Printer | `printer_options_with_variant_1` | `printer_extruder_id`, `printer_extruder_variant` | 1 |
| Printer | `printer_options_with_variant_2` (machine limits) | `printer_extruder_id`, `printer_extruder_variant` | 2: normal, silent |
| Filament | `filament_options_with_variant` | `filament_extruder_variant` | 1 |
A process or printer column belongs to one extruder (the id, 1-based) and one
variant. A filament column belongs only to a variant, and every extruder of that
variant shares it. Printer settings outside these sets that are still vectors,
such as `nozzle_diameter`, `extruder_type` or `extruder_offset`, have one value
per extruder instead.
`DynamicPrintConfig::get_index_for_extruder` finds the column of an extruder:
the first whose id matches and whose variant string equals the extruder's type
and nozzle volume type, Hybrid counting as Standard. Given a stride, it returns
the position of the column's first value, and -1 when there is no such column.
## Loading, sizing and slicing
Profiles may store fewer values than columns, often a single value meant for
every column. `extend_default_config_length` pads every per-variant setting to
its column count with its first value whenever a preset is loaded: system, user,
cloud and project presets alike. User presets start from their parent's padded
vectors and apply their own values per variant. After loading, every column has
a value of its own, so editing one column never changes another.
The printer's columns follow its extruder count. `set_num_extruders` rebuilds
`printer_extruder_id` and `printer_extruder_variant` from `extruder_variant_list`
and resizes the per-variant and per-extruder printer settings, padding new
entries with the first value.
A process ships with columns for the tools of its profile. Raising the printer's
extruder count does not give it columns for the new tools, so
`add_process_columns_for_new_tools` adds one per variant of each such tool,
copied from tool 1's column of the same variant (the first column when tool 1
has no such variant). The settings tabs run it in memory on every copy the
edited process is compared with: the selected preset, its parent, the edited
preset and, when it was clean, the saved baseline. The added columns therefore
never show as changes. A process with a single column is left alone: its one
value applies to every tool, and splitting it would make an edit reach the first
tool only.
For slicing, `update_values_to_printer_extruders` reduces each per-variant
setting to one value per slot, a slot being an extruder and a nozzle volume type
it prints with. A slot without a column of its own reads the first column. A
process that still has one column is given a column per extruder variant first
(`ensure_process_variant_columns`), all holding that value.
## Editing in the settings tabs
The process and printer tabs have an extruder switch, the filament tab a variant
switch. Its tags name the selection as the user sees it: "T2 HF" on the process
tab, "Extruder 2: HF" on the printer tab, "Direct Drive HF" on the filament tab,
and the left and right nozzle names on Bambu dual-nozzle printers.
`switch_excluder` points every per-variant field of the pages at the selected
column. On the printer's Extruder page, the fields of per-extruder settings point
at the selected extruder instead. Groups holding such fields draw the per-nozzle
icon next to them.
## Copying between extruders and variants
The copy button next to the switch copies the values modified on the current
page, for the selected extruder or variant, to the others. What a value may be
copied to depends on the page:
- On the process tab and the printer's Motion ability page, to every extruder
with the same extruder type whose nozzle has the selected nozzle volume type,
or is Hybrid. Values go into that extruder's column of the same variant.
- On the printer's Extruder page, per-extruder settings go to every other
extruder. Per-variant settings follow the rule above, so an extruder with
another nozzle volume type gets only the per-extruder ones.
- On the filament tab, to the filament's other variants.
Values are never copied across nozzle volume types on the process and printer
tabs: Standard and High Flow values are tuned separately, and a copy would
overwrite one with the other.
The copy is confirmed in the unsaved changes dialog in a copy mode. It shows one
column per extruder or variant, titled with the switch tags, and one row per
setting. Each setting carries its own position in every column, because one page
can mix per-variant and per-extruder settings. A cell whose value would change
has a checkbox, ticked by default. A cell without a value of that setting stays
empty. Tick-all boxes cover each row, group, category and column, and one covers
everything. Only the ticked values are written.
## Implementation and verification
The column handling lives in `PrintConfig.cpp` (`get_index_for_extruder`,
`update_values_to_printer_extruders`, `set_num_extruders`) and `Preset.cpp`
(`extend_default_config_length`). `add_process_columns_for_new_tools` is in
`ParameterUtils.cpp`. The switches, the copy button and the in-memory
completion are in `Tab.cpp`, the dialog in `UnsavedChangesDialog.cpp`.
`tests/libslic3r/test_parameter_utils.cpp` covers the columns added for new
tools, and `tests/libslic3r/test_config_variant_expansion.cpp` the slicing
expansion.
+329
View File
@@ -0,0 +1,329 @@
# Plugin permissions and audit - High Level Design
## Purpose and scope
Python plugins run inside the OrcaSlicer process. OrcaSlicer restricts what a plugin
can do by installing a CPython audit hook and judging the events it recognizes against
per-plugin grants. This document describes that policy: how an event is attributed to a
plugin, when it is allowed without a prompt, how the user is asked, where the answer is
stored, and what full access changes.
The policy is a Python audit-hook policy, not an operating-system sandbox. A plugin still
runs in the host process with the user's filesystem and network rights. The limits that
follow from that are listed under "Security limitations".
The Plugins dialog exposes the stored grants and the full-access switch, but the
enforcement lives in `src/slic3r/plugin` (built into `libslic3r_gui`) and applies whenever
a capability call runs, whether or not the dialog is open. The Script execution path that opens the audit scope is described
in [python-plugin-async-bridge.md](python-plugin-async-bridge.md).
## Permission model
Permissions are stored per plugin key. A plugin can hold:
| Field | Kind | Governs |
| --- | --- | --- |
| `fs_read` | target list | Read-shaped filesystem events. Targets are exact paths or `<dir>/*` trees. |
| `fs_readwrite` | target list | Write-shaped and read/write filesystem events mapped to `FsReadWrite`: a write-mode `open`, rename, chmod, utime, copy, move, archive extraction, and similar. Same target matching as `fs_read`. A write-mode `open` can create a file, but this grant does not cover events mapped to `FsCreate` or `FsDelete`, which have no persistent grant list. |
| `network_http` | target list | Network targets, consulted together with `network_socket` for both HTTP and socket events. A canonical `scheme://host` entry is host-wide and covers both layers; a URL with a path, port, query or trailing slash is exact; a bare host or legacy address tuple covers raw sockets. |
| `network_socket` | target list | The same network matching, kept as a separate list so a plugin can declare socket access without an HTTP URL. |
| `process` | target list | Process creation and process replacement: `os.system`, `subprocess.Popen`, `os.spawn*`, `os.exec*`, `pty.spawn`, `_winapi.CreateProcess`, and similar. Targets match the audited value verbatim. |
| `threading` | boolean | Permission to start a Python thread with `_thread.start_new_thread`. |
| `events` | target list | Audited events that expose no target, keyed as `<Category>:<event>`, for example `Socket:socket.__new__`. Matched verbatim. |
| `full_access` | boolean | Turns off the permission decision for the plugin. See "Full access". |
Filesystem create and delete events (`os.mkdir`, `os.symlink`, `tempfile.mkstemp`,
`os.remove`, `shutil.rmtree`, and similar) are audited, but they have no persistent grant
list. A `fs_read` or `fs_readwrite` grant does not cover these events, although a write grant
can create a file through `open()`. Without full access, each such
event outside an allowed root is prompted only when it can be answered inline. On the wx
main thread a Yes applies only to the operation that raised it and is not saved. Off the
main thread the event is denied immediately and an informational denial is shown instead;
there is no Yes/No prompt, no saved grant, and no promise that a later attempt will be
approved.
### Target matching
- Exact filesystem entries match the audited path verbatim. An absolute exact entry also
matches an equivalent canonical path, including a symlink alias or a relative target resolved
against the current working directory. Relative exact entries match only verbatim, so their
equivalence scope cannot move with the working directory. Canonical equivalence fails closed
for dangling final symlinks; verbatim matches retain their existing behavior.
A tree grant `<dir>/*` covers the named folder and every path below it. `*` is the only
wildcard and is recognized only as the final path component. A read grant never
authorizes a write, and the reverse. Tree matching canonicalizes both sides, so a
symlink below the granted folder cannot extend the grant outside it. A tree grant's
root must be absolute on the current platform: a relative root never matches, even when a
target is spelled exactly like the entry, so the scope cannot float with the process
working directory.
- Network entries can be an HTTP URL, a canonical `scheme://host`, a bare host, a
`host:port` pair, or a legacy persisted address tuple such as `('host', 443)`.
`normalize_network_url` reduces a URL to lowercase `scheme://host`; path, query,
fragment, userinfo and port are dropped. A bare host, a `host:port` pair, or a legacy
tuple is a raw-socket grant; it does not match an HTTP URL. A raw-socket entry has its
port removed when it is matched, so a host-based network grant does not restrict ports.
A canonical entry is host-wide and applies to HTTP and raw socket events for that host.
A URL with a path, port, query, fragment or trailing slash that was stored without
normalization remains an exact match.
- Process entries are compared verbatim with the string the audit event reports,
including Python representations of a command.
- An event with no target is granted by the `events` entry for its category and name. A
targetless network event, such as `http.client.send`, is covered by any recorded
network grant instead.
## Runtime enforcement
### Audit hook and attribution
`PluginAuditManager::install_hook` installs a global CPython audit hook with
`PySys_AddAuditHook` while the embedded interpreter initializes, before any plugin code
runs. The hook recognizes a fixed set of audit events and groups them into filesystem
read, filesystem read/write, filesystem create, filesystem delete, HTTP, socket, process
create, process replace, and threading categories. Events outside that map are ignored.
`open` is categorized from its mode: write, append, update, or exclusive modes are
write-shaped, and a read-only mode is read-shaped.
Attribution is thread-local. `ScopedPluginAuditContext` stores the previous plugin key,
capability name, scoped filesystem roots and operation-root frames, then installs the
current call's values. The trampoline machinery opens this scope for every C++ to Python
capability call; the Script worker opens it for the whole invocation, including an async
suspension, and the `_thread.start_new_thread` shim re-establishes it inside a thread the
plugin creates. Events raised while no plugin scope is active are allowed and not
attributed. Module import and `register_capabilities` run without such a scope.
### Decision order
For a recognized event raised inside a plugin scope, `audit_plugin_event` decides in this
order:
1. **Unconditional denied path.** For a filesystem event, a target whose base name is a
denied filename, or whose path contains a denied keyword, is denied. This check runs
before allowed roots, before a granted operation and before full access, so no grant
can make a denied path reachable.
2. **Covered by a granted operation.** When a granted root operation is still running,
nested events raised through its standard-library frames are allowed without another
prompt. The coverage is bounded to the operation frame and does not extend to plugin
or third-party frames it calls back into. A nested `urllib.Request` is judged on its
own URL, including when it follows a redirect.
3. **Implicit allowed root or standard-library read.** A filesystem target inside an
allowed root is allowed; a read of the interpreter's standard library is also allowed.
See "Implicit access".
4. **Full access.** If the plugin's readable sidecar has `full_access` set, the event is
allowed.
5. **Saved grant.** A matching entry in the appropriate list allows the event.
6. **Prompt.** Otherwise the user is asked. A granted prompt allows the event and, for a
category with a persistent list, saves the target. A denied or unanswered prompt raises
`PermissionError` in the plugin and records the violation.
After a granted root event with a target, the hook records the operation frame so the
nested events of the same operation are not asked again.
## Permission prompts
### Declared permissions during load
A plugin declares its needs from Python with `orca.request_permissions(...)` while
`register_capabilities` runs. The bridge collects the declarations per plugin. After
registration returns and before any capability instance is created, OrcaSlicer presents
one combined prompt for the targets not already stored. Denying the request aborts the
load. A readable sidecar with `full_access` accepts the declaration without a prompt and
without adding a grant.
Network URLs passed to `request_permissions(network=...)` are normalized to
`scheme://host` before prompting or storing, so one approval covers every path and port
on that host and also authorizes raw sockets to it. A relative filesystem tree grant is
resolved against the working directory when the request is made, so the prompt and the
sidecar show the absolute scope it covers.
### Runtime prompts
An event that is not covered by a saved grant or an implicit rule is either put to the
user or denied. If the caller is on the wx main thread, the modal runs inline. If it is
not, as on the Script workflow, the plugin-load worker, or the slicing worker, the current
event is denied and the outcome is reported asynchronously. For a category with a persistent
grant list, a Yes/No prompt is posted to the main thread with `CallAfter`; if the user
accepts, the grant is saved and a later matching attempt can succeed without another prompt.
Create and delete do not support persistent grants: on the main thread they use the inline
prompt described above, while off the main thread they are denied and only an informational
denial is posted. That path offers no Yes/No choice and does not claim that the operation can
be approved on a retry. Blocking a worker on a marshalled modal is avoided because the UI
thread can itself be parked on the slicing worker.
Runtime approvals store the target observed by the audit hook. A URL with a path, port or
query is therefore an exact grant; a bare host remains usable for raw sockets. The
declared form and the runtime form are not normalized by the same code path.
## Implicit access
Some access needs no grant because it is part of the plugin system's normal operation:
- `data_dir()` is a read-write root. It contains the plugin directories, each plugin's
storage, the installed/system profile cache, and the plugin package files themselves.
- `resources_dir()` is a read-only root. Plugins can inspect bundled assets but cannot
write to the shared installation.
- Standard-library files are readable. Site-packages are excluded from this exemption.
- A per-call scoped root can be added. The G-code post-process hook grants the folder
containing the exported G-code file so the plugin can edit it; the root is scoped to
that call.
### Denied paths
The following are denied before any allowed root or full-access check:
- Base names starting with the application configuration names, the cloud user-secret
file, or `.install_state.json`. The comparison is case-insensitive and covers `.bak`
and `.tmp` companions through the prefix match.
- Any path component matching `secret`, `secrets`, `cert`, `certs`, `certificate`,
`certificates`, `conf`, or `config`. The `conf` keyword also blocks `.conf` and `.ini`
file names. Matching is on whole components, not substrings, so imports such as
`numpy/__config__.py` remain usable. Inside `data_dir()`, only components below
`data_dir()` are checked, because the application data directory can itself sit under
a path component such as `config`.
## Persistence and editing
Grants and install state live in `.install_state.json` in the plugin root. The
`permissions` object stores `fs_read`, `fs_readwrite`, `network_http`,
`network_socket`, `process`, `threading`, `events`, and `full_access`. The file is
written by `write_install_state`, the single writer for the sidecar schema. In-process
reads and read-modify-write operations are synchronized. Writes prepare a complete
replacement in the plugin directory and replace the sidecar only after the write succeeds.
The lock does not coordinate separate OrcaSlicer processes sharing a data directory.
Reading is deliberately fail-closed:
- A missing, unreadable, or malformed sidecar means no grants and no full access.
- `threading` is a boolean. Older sidecars stored a string or array; a nonempty value
reads as granted, an empty one as denied, and the next normal write stores the boolean
form. Reading never rewrites the file.
- `full_access` is enabled only by an explicit JSON boolean. A missing key, a string, a
number, or any other type reads as false.
A sidecar that exists but cannot be read is never overwritten, because it may still hold
grants and capability choices. The one exception is a plugin load: if the sidecar is a
regular file that reads in full but does not parse, as a crash or a hand edit can leave
it, the load moves it to `.install_state.json.corrupt` before any plugin code runs. The
plugin then counts as having no sidecar, so its declared permissions are asked for again
and a fresh sidecar is written, while the old bytes stay beside it for manual recovery.
Anything else at the sidecar path is left in place: a link or a directory, or a file
that cannot be opened or read in full, since a read error can look like truncated
contents.
Each audit decision reads the current sidecar through
`PluginManager::get_install_state`, so a grant persisted by a prompt applies to
subsequent top-level operations. A root frame that was already recorded is not
re-evaluated.
Installing or reinstalling a package resets its permissions, then
`revoke_plugin_permissions` clears the permission object so the new code must request
access again. Loading an already installed package preserves the existing sidecar
grants while updating install metadata, the enabled flag, and capability flags.
The Plugins dialog edits the same sidecar, including while the plugin is loaded or loading.
Each committed edit is applied immediately to the latest stored state, preserving unrelated
permissions, install metadata, the enabled flag, and capability flags. Concurrent changes to
the same permission take effect in write order. The dialog validates added or changed
targets; unchanged entries, including grants written by an older release, are carried across
byte-for-byte. New filesystem targets must be absolute on the current
platform: a POSIX path starts at `/`, and a Windows path names a drive plus root or a UNC
share. A `*` is accepted only as the final `/*` of a folder tree, and `..` components are
refused. The matcher also refuses to widen a relative tree root, so a relative tree entry
saved by hand or carried over from an older release never authorizes. New network targets
must be a full `http://` or `https://` URL; the writer stores `normalize_network_url`'s canonical
lowercase `scheme://host`, dropping port, path, query and fragment. Bare hosts, other
schemes, wildcards and URLs carrying userinfo are refused rather than guessed. Network
entries cover every port, path and query on the host.
The dialog warns before enabling full access. Grants stored
while full access is on are inert and apply again when full access is off. Turning full access
on does not delete the stored lists. A permission change affects subsequent audit decisions,
not operations already authorized.
## Full access
Full access is a per-plugin boolean that turns off the permission decision. It does not
remove the audit hook. For recognized events it is reached after the unconditional
denied-path check, so the application configuration, the cloud user-secret file,
certificates, configuration paths, and `.install_state.json` stay blocked from direct
Python access. Everything else that the audit hook recognizes is allowed without a grant
or a prompt, and declared permissions are accepted without prompting. The read-only
`resources_dir()` root is a normal-mode restriction only: full access permits writes there
when the operating system allows them. The denied `cert` keyword still blocks the bundled
certificate.
Enabling full access requires a known installed package with valid metadata. Disabling it
accepts any known installed package, including one whose metadata has become invalid, so
the switch can always be turned off. The Plugins dialog asks for a native confirmation
before enabling it and gives the No button the initial focus. The confirmation is a
warning about the actual limit: full access is not a sandbox. The plugin can read and
write most files the user can access, and modifying startup or application files can run
code outside these checks. A subprocess started by the plugin is not restricted by the
audit hook at all.
A change applies to subsequent top-level audited operations. An operation that already
recorded its root frame keeps that coverage for its lifetime; changing the flag does not
retract it. Because the flag is read from the sidecar, a sidecar that cannot be read is
never treated as an opt-out.
## Security limitations
- **Python audit policy, not an OS sandbox.** Plugins run in the OrcaSlicer process with
the user's operating-system rights. The hook constrains only the mapped, audited
operations it observes.
- **Only recognized events are judged.** An audit event outside the map is ignored.
Native code that performs filesystem, network, or process work without raising a
mapped CPython audit event is not checked.
- **Module import and registration are not attributed.** The audit scope opens for
capability calls, not for importing a plugin module or running
`register_capabilities`. Code executed during those phases has no plugin audit
context, so its events are not attributed or restricted.
- **Subprocesses leave the policy.** A process created by a granted or full-access
plugin runs with the user's rights and is not covered by the parent's audit scope.
- **Host APIs are not audit events.** Calls into OrcaSlicer's Python host APIs, such as
preset updates or UI actions, execute C++ host code and follow that API's contract. The
audit hook judges the Python-level filesystem, network, process and thread events it is
given, not the host API's internal work.
- **Denied paths are a direct-access block.** Path laundering through a symlink,
hardlink, subprocess, or Windows 8.3 short name is outside the model. A tree grant is
canonicalized for matching, but the deny check itself is base-name and component based.
- **`data_dir()` is shared and writable.** Every plugin can write anywhere in the
application data directory, including other plugin package files. Only the
install-state sidecar and the denied names and keywords are blocked there.
- **Legacy entries keep their old meaning, except relative tree roots.** Plugin
declarations normalize network URLs and resolve relative tree grants at request time,
and the Plugins dialog normalizes newly entered or edited values the same way. A grant
already stored by an older release is preserved verbatim when it is left unchanged, so
a persisted URL with a path, port, query, fragment or trailing slash remains an exact
grant, and an exact relative entry still matches verbatim. A persisted relative tree
entry no longer authorizes: the matcher requires an absolute tree root, so the entry must
be re-entered as an absolute path to take effect.
- **An off-main-thread prompt denies the current event.** A persistable grant is saved
only if the user later accepts, so the first attempt from a worker fails with
`PermissionError`. Create and delete have no persistable grant and no retryable approval:
off the main thread they are denied and only an informational denial is shown, while the
inline main-thread prompt covers only the operation that raised it.
- **A running root operation is not re-evaluated.** Revoking full access or changing a
grant affects later top-level operations, not an operation whose root frame already
recorded coverage.
## File and symbol map
- `src/slic3r/plugin/PluginAuditManager.hpp` / `.cpp` - `PluginAuditManager`,
`install_hook`, `audit_plugin_event`, `decide_audited_event`, `request_permissions`,
`request_permission`, `check_path_access`, `network_permission_matches`,
`default_denied_filenames`, `default_denied_path_keywords`, `ScopedPluginAuditContext`.
- `src/slic3r/plugin/PluginFsUtils.hpp` / `.cpp` - `PluginPermissions`,
`PluginInstallState`, `read_install_state`, `write_install_state`.
- `src/slic3r/plugin/PythonPluginBridge.cpp` - `request_permissions` binding,
`finalize_plugin_capture`, `install_python_thread_audit_shim`.
- `src/slic3r/plugin/PyPluginTrampoline.hpp` - `ORCA_PY_OVERRIDE_AUDITED`,
`ORCA_PY_AUDIT_SCOPE`, `invoke_script_execute`.
- `src/slic3r/plugin/pluginTypes/slicingPipeline/SlicingPipelinePluginCapabilityTrampoline.hpp`
provides the scoped G-code folder root.
- `src/slic3r/plugin/PluginManager.hpp` / `.cpp` - `mutate_plugin_permissions`,
`revoke_plugin_permissions`, `get_install_state`.
- `src/slic3r/GUI/PluginsDialog.cpp` - permission editor payloads, native confirmations,
and the full-access request path.
- `tests/slic3rutils/test_plugin_audit.cpp`, `tests/slic3rutils/test_plugin_install.cpp`,
`tests/slic3rutils/test_plugin_lifecycle.cpp` - audit decision, sidecar, and permission
mutation coverage.
+19 -6
View File
@@ -95,9 +95,16 @@ declaration order at static init — cannot: inserting one option into the middl
*succeeds on the wrong option*, silently, wherever the two share a type. Because a
name-keyed payload instead drops the individual options this build cannot place, the
file as a whole stays readable, and there is no schema fingerprint — no checksum over
the option schema that would reject every cache on every release. An option this build
no longer defines, or now defines with a different type, gets exactly what it gets from
a JSON profile: read, dropped, and the rest of the preset loads.
the option schema that would reject every cache on every release. An option this build no
longer defines gets exactly what it gets from a JSON profile: read, dropped, and the rest
of the preset loads. An option this build now defines with a different type is read by the
type the writer recorded and handed to `set_deserialize` as its text, again as a JSON
profile's value would be: `handle_legacy` maps an old spelling (a bool's `1` onto an
enum's `enabled`) and an enum name a bool cannot parse is substituted. Only a text this
build cannot parse into the new type is dropped, that option alone. Dropping a retyped
option outright would leave the key at the collection default in every preset that sets
it, which is not what the JSON says, and an installed cache outlives the app upgrade that
retyped the key.
The ordinal-keyed cereal hooks in `PrintConfig.hpp` are untouched — they are also the
undo/redo wire format, where the process cannot change underneath them. The cache has
@@ -365,8 +372,11 @@ The system is designed so that no cache problem is fatal:
- **Corrupt, truncated or foreign file** — rejected at the header, vendor parsed. A
cache is written to a temp file beside its target and moved into place, so a write
that dies partway leaves the previous cache intact rather than a truncated one.
- **An option this build no longer has, or now types differently** — that option alone
is dropped, exactly as a JSON profile's would be. The preset and the file load.
- **An option this build no longer has** — that option alone is dropped, exactly as a
JSON profile's would be. The preset and the file load.
- **An option this build now types differently** — its value is read as the writer
typed it and parsed from its text as a JSON profile's would be, legacy conversions
included; only a text this build cannot parse into the new type is dropped.
- **Cache from a build with a different cache layout** — rejected on `CACHE_VERSION`.
A vendor with JSONs beside it is parsed and re-cached; a cache-only vendor reads as
not installed and the updater reinstalls it.
@@ -393,7 +403,10 @@ enumerates only `*.json` will find no vendors at all in a packaged build.
- **Adding, removing, retyping or reordering a config option** needs nothing. The
payload names its keys and its enum values, so an option a cache carries and this
build does not is dropped; one this build has and the cache does not is simply
absent, as it would be from a JSON that predates it.
absent, as it would be from a JSON that predates it. A retyped option is read
through `handle_legacy`, so give it the same conversion a JSON profile needs and the
cache follows; an installed cache survives the upgrade that retyped the key, so that
conversion is what every user who upgrades reads.
- **Changing a hand-written `serialize()`** — `VendorProfile` or its nested types — or
the `CachedPreset` field list — written and read by `visit_entry` in
`PresetCacheFormat.cpp`, one list for the save, the load and the name peek alike — or
+42 -10
View File
@@ -29,7 +29,32 @@ the tower is continuous from the bed to its last purge. `wipe_tower_layer_height
is the distance from the previous tower layer, which is the object's layer height
whenever the tower prints on every layer.
`Print::_make_wipe_tower` plans one tower layer per such object layer. A layer
A tower layer thinner than the printer's minimum layer height (by more than
`EPSILON`, so layers sliced at exactly the minimum stay apart; never less than the
towers' own 1e-3 mm merge) is not printed on its own: it joins the tower layer
below. Precise Z height leaves such layers when it ends each object at its exact
top, moving one object's last layers off another's by anything up to a layer
height; a purge sized for a layer a few microns thick would run hundreds of mm.
A joined layer takes `wipe_tower_print_z` and `wipe_tower_layer_height` from the
tower layer below, and its purges print down at that tower layer's z: the emitter
travels over the tower first, descends, and climbs back to the object layer, the
same sequence it uses for a tower compacted below the objects. After a custom
`change_filament_gcode` the descent happens wherever the macro leaves the head, so
a macro has to end over the tower, as it already must for the compacted tower.
Layers from the minimum layer height up stay tower layers of their own, sized for
their height.
The emitter takes one tower result per toolchange, and a layer without one takes
a result only to finish the tower layer. So `wipe_tower_layer_ends` marks the last
of the tower layer and its joined layers that changes tools, or the last of them
when none does: a joined layer that changes nothing after the results are all
taken has nothing left to finish with. A joined layer also does not reset the
Type 1 tower's first print, so smooth timelapse prints each tower layer's wall
once.
`Print::_make_wipe_tower` plans every such object layer at its
`wipe_tower_print_z`: one tower layer per object layer, except that a joined
layer's toolchanges land in the tower layer below. A layer
whose only call keeps the current filament leaves no toolchange in the plan, and
the layer it generates is a single result whose initial and new tool are equal.
That is what `wipe_tower_layer_is_sparse` recognises, and it is the unit both
@@ -37,8 +62,8 @@ settings work on.
The plan stays one entry per tower layer in every case. The G-code emitter walks
`WipeTowerData::tool_changes` by layer index, advancing once per object layer
that carries a tower, so a planner that removed entries would silently shift
every later layer onto the wrong tower geometry. Layers that print nothing are
that carries a tower and does not join the one below, so a planner that removed
entries would silently shift every later layer onto the wrong tower geometry. Layers that print nothing are
therefore still planned and still generated; they are marked, and the emitter
drops them.
@@ -86,11 +111,14 @@ compacted z for the same reason.
Reaching down is only safe if nothing tall stands near the tower. `Print.hpp`
carries the clearance rule: a keep-out zone grown from the tower's footprint by
the spiral z-hop envelope, and a per-object limit on how high an object may rise
near it, tiered by the nozzle cone, the head body, the rod and the lid. The same
rule serves the precise check on real extrusions, the pre-slice estimate that
feeds the plater, and the outlines the plater draws while an object is dragged,
so that the ring the user sees touches the object's outline exactly when the
check trips.
near it, tiered by the nozzle cone, the head body, the rod and the lid. The
precise check applies all four to the real extrusions, measuring an object's
rise from the tower as printed by then. Before slicing that height is unknown,
so the pre-slice estimate that feeds the plater, and the outlines the plater
draws while an object is dragged, measure the rise from the plate and apply only
the nozzle cone and the head body. An object away from the toolhead, which only
the rod or the lid can reach, is left to the precise check. The ring the user
sees touches the object's outline exactly when the pre-slice check trips.
## Merging sparse layers
@@ -193,5 +221,9 @@ read as off rather than compacting or merging in one place and not another.
and the clearance geometry the plater draws.
- [Slicing tests](../../tests/fff_print/test_wipe_tower.cpp) slice a real print
and check that a run folds, that the tower still covers the object exactly
once, that a run too thin for the cap is left alone, and that a merged layer
declares its height in the tag the printer's processor reads.
once, that a run too thin for the cap is left alone, that a merged layer
declares its height in the tag the printer's processor reads, and that layers
precise Z height moves less than a minimum layer height off another object's
join the tower layer below and print at its z, with and without their own
toolchange and with smooth timelapse, while layers sliced at exactly the
minimum height do not join.
+6 -2
View File
@@ -46,6 +46,8 @@ finalization cannot run underneath it. `ScopedPluginAuditContext`
(`src/slic3r/plugin/PluginAuditManager.hpp`) stores the previous thread-local plugin/capability pair
and scoped filesystem roots, sets this call's, and restores them on destruction; the audit hook then
attributes every filesystem/socket/process event to the plugin currently executing on that thread.
The policy those events are judged against is described in
[plugin-permissions.md](plugin-permissions.md).
### The Script capability
@@ -140,8 +142,10 @@ closed and `tl_script_loop` cleared before the worker exits.
A consequence of running Script on a non-main thread: the audit permission prompt is fail-closed off
the main thread. `request_permission` in `src/slic3r/plugin/PluginAuditManager.cpp` posts the dialog
with `CallAfter` and denies the current event, persisting the grant when the user accepts, so a
Script sees a denial on the first attempt and can succeed on a later one. This matches the existing
with `CallAfter` and denies the current event. For a category with a persistent grant list, the grant
is saved when the user accepts, so a Script sees a denial on the first attempt and can succeed on a
later one. Create and delete have no persistent grant list, so their off-main-thread path posts only
an informational denial with no Yes/No choice and does not promise a retry. This matches the existing
behavior for the plugin-load worker and the slicing worker.
### Blocking UI continuation
+2
View File
@@ -71,6 +71,8 @@ closes the open gizmo, so neither tab ever shows a stale cut.
Preview shells are drawn by another shader and are not clipped.
- **Picking.** `get_raycaster_clipping_plane()` returns the same plane, so hover, selection and
the perspective pan anchor ignore what the user cannot see.
- **Center of mass markers.** Drawn without the depth test, they would show through the cut, so
each is cut away whole by its centre, as the option markers are.
## Gizmos
+10 -6
View File
@@ -108,12 +108,16 @@ order, such as monotonic, would print all of its lines and then come back for
every piece of gap fill, most of which lies at the walls where the lines end.
So each piece, in turn, goes between the two extrusions of the fill where it
adds the least travel, flipped when that is shorter. A closed piece counts from
its point nearest the nozzle, where `GCode::extrude_loop()` starts it. The two
ends of the fill cost nothing, since the travel to and from them depends on what
is printed before and after. The fill's own extrusions keep their order and
direction, so a monotonic fill stays monotonic. When the result travels no less
than the gap fill printed after the lines in its own order, that order is kept.
adds the least travel, flipped when that is shorter. A piece fills what the
extrusions around it left, so it only goes after the last extrusion of the fill
that passes within half its widest width and a line spacing of it: a spiral
that starts at a gap in its middle prints that gap when it is done. A closed
piece counts from its point nearest the nozzle, where `GCode::extrude_loop()`
starts it. The two ends of the fill cost nothing, since the travel to and from
them depends on what is printed before and after. The fill's own extrusions keep
their order and direction, so a monotonic fill stays monotonic. When the result
travels no less than the gap fill printed after the lines in its own order, that
order is kept.
## The search
+62 -32
View File
@@ -24,11 +24,22 @@ millimeters. Using the path width makes Auto width and Arachne's variable widths
meaningful. The effective offset is limited by that width and the spacing to the
adjacent wall. A zero distance disables the offset.
Only external perimeters with a suitable, previously printed inner perimeter
are eligible. A configured wall count alone cannot establish eligibility:
the local geometry may contain fewer walls, and walls scheduled later do not
provide support. Outer/Inner wall order therefore normally retains the regular
wipe path.
Only external perimeters with an adjacent inner perimeter are eligible. A
configured wall count alone cannot establish eligibility: the local geometry
may contain fewer walls. With Inner/Outer order the adjacent wall must already
be printed. Walls scheduled later never support the path.
Outer/Inner and Inner/Outer/Inner wall orders print the adjacent inner wall
after the external wall. Its geometry still identifies the inward side and the
presence of an adjacent wall, but an inward wipe can then use the external
bead's own material only up to half its actual width. Larger requested offsets
are limited to this half-width, even if a more distant inner perimeter was
printed earlier: the third wall in Inner/Outer/Inner order, or the inner wall
of another loop across a thin section in Outer/Inner order. The limit follows
the configured order, so it also applies on the first layer, where sandwich
order is not used.
It applies to percentages and equivalent absolute distances, using the actual
extrusion width rather than the configured Auto width.
Retraction and pressure advance calibrations disable inward wiping so it cannot
mask the behavior being measured. The calibration settings turn it off, and
@@ -39,7 +50,10 @@ G-code generation enforces this even if a profile or object override enables it.
The planner identifies an adjacent inner perimeter on the material side of the
outgoing wall. Contour winding and the distinction between outer contours and
holes establish a preferred direction; local printed geometry resolves ambiguous
or self-touching contours.
or self-touching contours. Sampling farther along the wall identifies its adjacent
branch, while the available offset is measured from a nearby support point at the
extrusion endpoint. This local search has the same bounded corner reach as support
validation; a displacement measured at the sample cannot substitute for local support.
Candidate paths offset or translate the portion needed for the configured wipe
distance. A wide seam gap can prevent a supported forward path; following the
@@ -51,19 +65,25 @@ complete executable path, including its connector from the nozzle position,
against the current and earlier printed perimeters. Nearby endpoints alone do
not establish support across a gap.
Each region accumulates its printed perimeter prefix once, in extrusion order.
Every entity contributes its geometry only after it is printed, and the prefix
is discarded when the region ends. This collection is skipped when inward wiping
is disabled or its configured distance is zero. A mixed inner-wall loop remains
an eligible target even when its first path is an overhang: ordinary inner-wall
Each region of an island accumulates its printed perimeter prefix once, in
extrusion order. Every entity contributes its geometry only after it is printed,
and the prefix is discarded when that region of the island ends. This collection
is skipped when inward wiping is disabled or its configured distance is zero.
With Outer/Inner and Inner/Outer/Inner order, all inner walls of the region are
collected as targets before printing; they do not support the path until printed.
A mixed inner-wall loop remains an eligible target even when its first path is
an overhang: ordinary inner-wall
paths elsewhere in the loop identify it. Likewise, an external loop with an
overhanging start remains eligible when other segments identify the external
wall. It is available for support checks but is not an inner-wall target.
Candidate-specific support filtering and AABB trees are built only for eligible
external loops, then reused across their candidate paths.
external loops, then reused across their candidate paths. They contain only the
printed walls within the wipe length plus twice the corner reach of the support
checks around the seam, so an island with many holes does not rebuild trees of
its whole printed prefix for every loop.
Material-side validation applies with or without a seam gap. Along each
candidate, local wall normals point toward the adjacent printed inner wall;
candidate, local wall normals point toward the adjacent inner wall;
samples on the opposite side are rejected even when they remain close enough
to the external wall to pass the support check. This uses the open wall geometry
without treating it as a closed polygon. Full paths at a zero-gap seam also
@@ -73,9 +93,10 @@ material-side and support checks apply without that additional clearance rule.
An accepted candidate replaces the stored wipe path as a whole. A short direct
inward move is also eligible when longer candidates fail validation. It may
waive full wall clearance, but must pass the material-side check. Its initial
direction is checked from the actual nozzle position after any loop pre-move;
the original wall endpoint is retained separately for intersection checks. It takes
waive full wall clearance, but must pass the material-side check. Every candidate's
initial direction is checked from the actual nozzle position, including the seam
gap and any loop pre-move; its construction origin is retained separately for
intersection checks. The short direct move takes
priority over the alternate offset when the preferred and translated paths
are unusable. A longer reversed path may replace the selected candidate only
when its distance to the target inner wall is no worse within tolerance.
@@ -84,9 +105,10 @@ when its distance to the target inner wall is no worse within tolerance.
The original wipe path is retained when:
- No suitable adjacent inner wall has already been printed near the seam. This
includes single-wall areas, locally missing inner walls and normally Outer/Inner
wall order. A distant wall or a wall on the air side does not qualify.
- The external wall has no suitable adjacent inner wall near the seam, as in
single-wall areas or where inner walls are locally missing. With Inner/Outer
order it must already be printed. A distant wall or a wall on the air side
does not qualify.
- The requested or available offset, or the configured wipe distance, is zero
or too small at the geometry's coordinate precision.
- Degenerate geometry prevents construction of a usable candidate, or all
@@ -128,18 +150,19 @@ Joins that already backtrack across the seam gap are not adjusted this way.
## Execution and retraction
The stored wipe path uses a sentinel first point. Execution starts from the
actual nozzle position and proceeds to the second stored point. Path selection,
support validation and wipe-length calculation must all use this same executable
geometry, especially after a Wipe on loop move.
Regular and inward wipe paths use a sentinel first point, replaced by the
actual nozzle position during execution. Selecting an inward path changes only
the stored wipe geometry. Seam selection and travel planning retain the actual
post-extrusion position, including any Wipe on loop move.
An accepted inward path executes at the end of the external loop, after any
Wipe on loop move, without retracting filament. It consumes the stored path and
updates the nozzle position before travel planning. A short travel to the next
wall cannot discard this wipe or force a retraction or Z-hop. Subsequent travel
uses the normal minimum-travel threshold and retraction/lift settings from the
new position. The regular wipe, including fallback, remains deferred until a
normal retraction uses it.
The next travel applies the normal minimum-travel threshold and retraction/lift
rules from that position. If retraction is needed, the ordinary retract operation
executes the selected wipe with the configured before/during/after split, then
replans travel from the wipe's endpoint when necessary. If a regular wipe would
be skipped, the inward wipe is skipped too. In particular, a short travel or an
extrusion starting at the current position does not execute an inward move,
retract or Z-hop. A consumed or replaced path is cleared so it cannot execute
twice. Layer and tool-change retractions can also consume the stored path.
Retraction is divided into portions before, during and after wiping. The amount
that can be retracted during the wipe depends on its executable length, wipe
@@ -147,8 +170,10 @@ speed and the active filament's retraction speed. Fractional retraction speeds
are retained in this calculation. For a 2 mm wipe at 100 mm/s and a retraction
speed of 25.5 mm/s, the wipe can retract 0.51 mm. With a total retraction of 0.8 mm
and both before/after percentages set to zero, the remaining 0.29 mm is retracted
before wiping. This split applies to regular deferred wipes, including fallback;
an accepted inward wipe executes separately without retraction.
before wiping. This split applies to regular and inward wipes whenever normal
travel planning or an explicit layer/tool-change retraction calls for a retract.
A travel that needs no retraction does not execute either wipe geometry,
irrespective of the configured retraction percentages.
## Implementation and verification
@@ -163,6 +188,11 @@ an accepted inward wipe executes separately without retraction.
across path subdivisions.
- [FFF tests](../../tests/fff_print/test_wipe.cpp) cover emitted trajectories,
fallback, minimum-travel retraction and Z-hop rules, and export invalidation.
Inward-wipe checks cover before/during/after retraction splits, including 100%
before or after wiping, with both E modes and Wipe on loop. Short travels
skip the wipe, retraction and Z-hop for every split. A threshold between the
original travel length and the distance from an inward wipe's endpoint also
verifies that selecting the inward path cannot create a retraction.
With Wipe inward disabled, they check the loop move's direction and magnitude
for Classic and Arachne, the subsequent wipe's start and length, and fractional
retraction splitting in absolute and relative E modes.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1
View File
@@ -348,6 +348,7 @@ src/slic3r/GUI/MixedFilamentDialog.cpp
src/slic3r/GUI/ModelMall.cpp
src/slic3r/GUI/OAuthDialog.cpp
src/slic3r/GUI/PluginPickerDialog.cpp
src/slic3r/GUI/PluginPermissionValidation.cpp
src/slic3r/GUI/PluginsConfigDialog.cpp
src/slic3r/GUI/PluginsDialog.cpp
src/slic3r/GUI/PrinterWebView.cpp
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12.00,12.00 L12.00,11.96 L12.01,11.92 L12.03,11.89 L12.05,11.85 L12.08,11.82 L12.12,11.80 L12.16,11.78 L12.20,11.76 L12.25,11.75 L12.30,11.75 L12.35,11.75 L12.40,11.77 L12.46,11.79 L12.51,11.81 L12.56,11.85 L12.61,11.89 L12.66,11.94 L12.70,12.00 L12.74,12.06 L12.77,12.14 L12.79,12.21 L12.80,12.29 L12.81,12.38 L12.81,12.47 L12.80,12.56 L12.77,12.65 L12.74,12.74 L12.70,12.83 L12.65,12.92 L12.58,13.01 L12.51,13.09 L12.43,13.17 L12.33,13.24 L12.23,13.30 L12.12,13.36 L12.00,13.40 L11.87,13.43 L11.74,13.46 L11.61,13.46 L11.47,13.46 L11.33,13.45 L11.18,13.41 L11.04,13.37 L10.90,13.31 L10.76,13.24 L10.63,13.15 L10.50,13.05 L10.38,12.93 L10.27,12.81 L10.17,12.67 L10.08,12.51 L10.01,12.35 L9.95,12.18 L9.90,12.00 L9.87,11.81 L9.86,11.62 L9.86,11.43 L9.88,11.23 L9.92,11.03 L9.98,10.83 L10.06,10.64 L10.15,10.45 L10.27,10.27 L10.40,10.09 L10.55,9.93 L10.72,9.78 L10.90,9.64 L11.10,9.52 L11.31,9.41 L11.53,9.32 L11.76,9.25 L12.00,9.20 L12.25,9.17 L12.50,9.17 L12.75,9.18 L13.01,9.22 L13.27,9.29 L13.52,9.37 L13.76,9.48 L14.00,9.62 L14.23,9.77 L14.44,9.95 L14.64,10.15 L14.83,10.37 L15.00,10.60 L15.14,10.86 L15.27,11.12 L15.37,11.41 L15.45,11.70 L15.50,12.00 L15.53,12.31 L15.52,12.62 L15.49,12.94 L15.44,13.25 L15.35,13.56 L15.23,13.87 L15.09,14.16 L14.92,14.45 L14.72,14.72 L14.50,14.98 L14.25,15.22 L13.98,15.44 L13.69,15.63 L13.38,15.80 L13.06,15.94 L12.72,16.06 L12.36,16.15 L12.00,16.20 L11.63,16.22 L11.26,16.21 L10.88,16.17 L10.51,16.09 L10.14,15.98 L9.78,15.84 L9.43,15.66 L9.10,15.46 L8.78,15.22 L8.48,14.95 L8.21,14.65 L7.96,14.33 L7.74,13.99 L7.54,13.62 L7.38,13.24 L7.25,12.84 L7.16,12.42 L7.10,12.00 L7.08,11.57 L7.10,11.14 L7.15,10.70 L7.25,10.27 L7.38,9.85 L7.55,9.43 L7.76,9.03 L8.01,8.65 L8.29,8.29 L8.60,7.95 L8.94,7.64 L9.32,7.35 L9.72,7.10 L10.14,6.88 L10.58,6.70 L11.04,6.56 L11.52,6.46 L12.00,6.40 L12.49,6.38 L12.99,6.41 L13.48,6.48 L13.97,6.59 L14.45,6.75 L14.92,6.95 L15.37,7.19 L15.80,7.47 L16.21,7.79 L16.59,8.15 L16.94,8.54 L17.25,8.97 L17.53,9.42 L17.77,9.90 L17.97,10.40 L18.13,10.92 L18.24,11.45 L18.30,12.00 L18.31,12.55 L18.28,13.11 L18.20,13.66 L18.07,14.21 L17.89,14.74 L17.66,15.27 L17.38,15.77 L17.06,16.25 L16.70,16.70 L16.30,17.12 L15.86,17.51 L15.38,17.86 L14.88,18.17 L14.34,18.43 L13.78,18.65 L13.20,18.82 L12.61,18.93 L12.00,19.00 L11.39,19.01 L10.77,18.97 L10.16,18.87 L9.55,18.72 L8.96,18.52 L8.38,18.26 L7.83,17.96 L7.30,17.60 L6.80,17.20 L6.34,16.75 L5.92,16.26 L5.53,15.73 L5.20,15.17 L4.91,14.58 L4.68,13.96 L4.49,13.32 L4.37,12.67 L4.30,12.00 L4.29,11.33 L4.34,10.65 L4.45,9.98 L4.62,9.31 L4.85,8.66 L5.13,8.03 L5.47,7.43 L5.86,6.85 L6.31,6.31 L6.80,5.80 L7.34,5.34 L7.92,4.93 L8.53,4.56 L9.18,4.25 L9.86,4.00 L10.55,3.80 L11.27,3.67 L12.00,3.60" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/><rect x="1.5" y="1.5" width="21" height="21" rx="2" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.125,4.125H19.875V19.875H4.125V6.75H17.25V17.25H6.75V9.375H14.625V14.625H9.375V12H12" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/><rect x="1.5" y="1.5" width="21" height="21" rx="2" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/></svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 392 B

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "BIQU",
"version": "02.04.00.03",
"version": "02.04.00.04",
"force_update": "0",
"description": "BIQU configurations",
"machine_model_list": [

Some files were not shown because too many files have changed in this diff Show More