forked from upstream-mirrors/OrcaSlicer
Compare commits
97 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f947c8a99 | |||
| 95a2732145 | |||
| b5517b693e | |||
| d1d8204dc1 | |||
| bb4c092ae4 | |||
| 3aedd50bcb | |||
| 4a41281761 | |||
| 1093ff0714 | |||
| c77020e654 | |||
| 041df4031e | |||
| 4045a87b70 | |||
| 4ab172fd33 | |||
| 4274ea6bb3 | |||
| 3ca96a0891 | |||
| efd65b7334 | |||
| ffdb5da100 | |||
| eac3ba4416 | |||
| 5cc5fb7f9c | |||
| 913c622574 | |||
| 7af3995544 | |||
| 27cafaa06c | |||
| 7b6c12cf74 | |||
| 8e37d7d4b2 | |||
| aa66e41e64 | |||
| 7ac46c9a61 | |||
| 9b4f84a923 | |||
| fcd96ad91c | |||
| 19a78830d7 | |||
| 304924a69a | |||
| a4a5100879 | |||
| 98b539c3e6 | |||
| 52c50e626e | |||
| eda4062d68 | |||
| 3bc827066d | |||
| b1953ab423 | |||
| f894d08881 | |||
| db35f3d098 | |||
| abe28edbe7 | |||
| 23fe913936 | |||
| 6372a37d71 | |||
| 9992b585b0 | |||
| 9e5110d593 | |||
| efe735853a | |||
| 29e1899571 | |||
| 2117d28713 | |||
| f273fe8ac1 | |||
| 5ea64864ef | |||
| 7dcceeb9ee | |||
| 3911c9a56e | |||
| 3610d8bb35 | |||
| 6112429980 | |||
| 88806ac63e | |||
| d28c71c485 | |||
| 59f0cc3806 | |||
| 187baae4ee | |||
| 98619b64a2 | |||
| 0e33e3239a | |||
| 40d7f25ff9 | |||
| 6f20243514 | |||
| 0db324476f | |||
| 45a29d391b | |||
| 2cb2f0d2e7 | |||
| c0efd44e56 | |||
| d81a212f53 | |||
| 2e562e8b9e | |||
| ba756706be | |||
| d709eb251c | |||
| 4b68224ff4 | |||
| f0827063bd | |||
| 7349ea795b | |||
| 8c2c16f318 | |||
| 541ff1da58 | |||
| d67e0d8dc4 | |||
| 4720370149 | |||
| 42608687e5 | |||
| 2ca7bdf23c | |||
| e66569a966 | |||
| c7fc22288e | |||
| aa3291b380 | |||
| 3a0517831f | |||
| 3322f6101c | |||
| e410cf3656 | |||
| 5897d95d4d | |||
| 97e6c71793 | |||
| 9c3b0a86e1 | |||
| e105d3c587 | |||
| 59aa101ea6 | |||
| 3936995b6e | |||
| 6d2869c430 | |||
| 9f39b8347f | |||
| b7ecf1b295 | |||
| 731a08d1c6 | |||
| a30ca5e54a | |||
| e4e00e9746 | |||
| 7125a546b8 | |||
| b6ca378b23 | |||
| af16875afb |
@@ -579,15 +579,13 @@ paths, when `/proc/driver/nvidia/version` exists and the linked WebKitGTK honour
|
||||
`WebView::SupportsForceSharedMemory()`), it sets `WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` and
|
||||
`WEBKIT_FORCE_DMABUF_RENDERER=1` (non-replacing): the proprietary driver cannot back WebKit's hardware
|
||||
DMABUF renderer. On a hypervisor guest (`/proc/cpuinfo` `hypervisor` flag) and WebKitGTK >= 2.44 it sets
|
||||
`WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` alone, since virtual GPUs cannot back the hardware path either. In a
|
||||
Wayland session outside the Flatpak it also keeps the system WebKitGTK off its hardware DMABUF path. On
|
||||
the default path it forces `GDK_BACKEND=x11` when wx lacks EGL and a Wayland socket is available
|
||||
(`wayland_socket_available()`), and sets `WEBKIT_DISABLE_COMPOSITING_MODE=1` (non-replacing) inside that
|
||||
branch when the linked WebKitGTK is older than 2.42: a forced X11 backend in a Wayland session is the
|
||||
only default-path case that runs through XWayland, which `DISPLAY` and `WAYLAND_DISPLAY` alone do not
|
||||
tell you (a native Wayland app inherits both). It calls `XInitThreads()` only when `DISPLAY` is set.
|
||||
With no `DISPLAY` and no Wayland socket (`wayland_socket_available()`), the GUI refuses to start
|
||||
("Neither DISPLAY nor a Wayland socket found"). The details and the WebKit rules (c12912e0df) are in
|
||||
`WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` alone, since virtual GPUs cannot back the hardware path either. On the default path it forces `GDK_BACKEND=x11` when wx lacks EGL and `WAYLAND_DISPLAY`
|
||||
is set, and sets `WEBKIT_DISABLE_COMPOSITING_MODE=1` (non-replacing) inside that branch when the linked
|
||||
WebKitGTK is older than 2.42: a forced X11 backend in a Wayland session is the only default-path case
|
||||
that runs through XWayland, which `DISPLAY` and `WAYLAND_DISPLAY` alone do not tell you (a native
|
||||
Wayland app inherits both). It calls `XInitThreads()`
|
||||
only when `DISPLAY` is set. With neither variable set, the GUI refuses to start ("Neither DISPLAY nor
|
||||
WAYLAND_DISPLAY set"). The details and the WebKit rules (c12912e0df) are in
|
||||
`references/webview-gl-aui-media.md` §WebKitGTK on Linux sessions.
|
||||
|
||||
**wx's own detectors**, for reference:
|
||||
|
||||
@@ -81,11 +81,6 @@ 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
|
||||
|
||||
@@ -832,9 +827,8 @@ 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 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.
|
||||
- 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.
|
||||
- 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`).
|
||||
@@ -853,39 +847,13 @@ 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 (!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
|
||||
if (e.GetActive() && IsShown()) focus_webview(browser(), m_page_ready);
|
||||
else if (!e.GetActive() && IsShown()) Hide();
|
||||
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`).
|
||||
|
||||
@@ -61,9 +61,8 @@ available; GTK2/WebKit1 is an opt-out configuration the GUI does not support.
|
||||
11. A web host that re-themes in place handles `EVT_WEBVIEW_RECREATED` without `Skip()`; one that
|
||||
needs a reload lets it through. §[Orca wrapper](#orca-webview-wrapper-widgetswebview)
|
||||
12. Keep `WebViewWebKit`'s destructor removing the `"wx"` handler. §[Orca wrapper](#orca-webview-wrapper-widgetswebview)
|
||||
13. Do not widen `WEBKIT_DISABLE_COMPOSITING_MODE` beyond its default-path cases (the no-EGL forced
|
||||
`GDK_BACKEND=x11` on WebKitGTK older than 2.42, and Wayland outside the Flatpak on WebKitGTK 2.42
|
||||
and 2.43, which ignore FORCE_SHM), and never
|
||||
13. Do not widen `WEBKIT_DISABLE_COMPOSITING_MODE` beyond the no-EGL default path where Orca forces
|
||||
`GDK_BACKEND=x11`, for WebKitGTK older than 2.42, and never
|
||||
make a page's progress depend only on a C++→JS callback. §[WebKitGTK on Linux](#webkitgtk-on-linux-sessions)
|
||||
14. GL attribute lists: legacy `int[]` lists end with `0` and spell out `WX_GL_RGBA` and
|
||||
`WX_GL_DOUBLEBUFFER`; `wxGLAttributes`/`wxGLContextAttrs` end with `EndList()`; MSAA is requested
|
||||
@@ -581,21 +580,8 @@ sets the DMABUF workarounds and then branches on `GDK_BACKEND`:
|
||||
Virtual GPUs (VirtualBox VMSVGA, VMware, QEMU) cannot back the hardware DMABUF path either, and
|
||||
FORCE_SHM alone was confirmed to fix web views in VirtualBox; the `WEBKIT_FORCE_DMABUF_RENDERER` pair
|
||||
is not needed without the Debian `isNVIDIA()` patch. The flag is x86-only, so ARM guests are not covered.
|
||||
- **System WebKitGTK on Wayland**, same position, in a build with EGL and not on the `GDK_BACKEND=x11`
|
||||
opt-in: when GTK will connect to Wayland and the app is not in the Flatpak, it sets
|
||||
`WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` non-replacing on WebKitGTK >= 2.44, and
|
||||
`WEBKIT_DISABLE_COMPOSITING_MODE=1` on 2.42 and 2.43, which have the DMABUF renderer but ignore
|
||||
FORCE_SHM. Ubuntu's WebKitGTK 2.52 on Intel GPUs and Debian's 2.54 on AMD froze the window on the
|
||||
hardware path and left the 3D view drawn over other pages; affected builds can't be told apart, so
|
||||
every system WebKitGTK avoids that path and only the Flatpak's runtime WebKitGTK keeps it. Both
|
||||
helpers named here are in `libslic3r/Utils.hpp`. `wayland_socket_available()` follows
|
||||
`wl_display_connect(NULL)`, the connection GTK tries before X11: `WAYLAND_SOCKET` when set (it must
|
||||
name an open fd), otherwise the `WAYLAND_DISPLAY` socket (`wayland-0` when unset) under
|
||||
`XDG_RUNTIME_DIR` unless the name is absolute. `XDG_SESSION_TYPE` is not used because an X11 client
|
||||
can inherit it, and `is_running_in_flatpak()` checks only `/.flatpak-info` because a host process
|
||||
started from a Flatpak can inherit `FLATPAK_ID`.
|
||||
- **Default path** (`GDK_BACKEND` unset or not starting with `x11`): if wx lacks EGL (`!wxHAS_EGL`) and
|
||||
`wayland_socket_available()`, it forces `GDK_BACKEND=x11`, and in that same branch it sets
|
||||
`WAYLAND_DISPLAY` is set, it forces `GDK_BACKEND=x11`, and in that same branch it sets
|
||||
`WEBKIT_DISABLE_COMPOSITING_MODE=1` non-replacing when the linked WebKitGTK predates 2.42
|
||||
(`WebView::NeedsCompositingWorkaround()`). That forced X11 backend in a Wayland session is the only
|
||||
default-path case that really runs through XWayland; `DISPLAY` and `WAYLAND_DISPLAY` alone do not
|
||||
@@ -615,10 +601,9 @@ Runtime backend detection elsewhere uses Orca's `is_running_on_wayland()` / `is_
|
||||
(see `references/platforms.md`), not these environment variables.
|
||||
|
||||
**Pitfall.**
|
||||
- **Rule:** On NVIDIA, hypervisor guests and the system WebKitGTK on Wayland reach for
|
||||
`WEBKIT_DMABUF_RENDERER_FORCE_SHM` before `WEBKIT_DISABLE_COMPOSITING_MODE`. **Why:** the proprietary
|
||||
driver and virtual GPUs cannot back WebKit's hardware DMABUF renderer, leaving web views blank or slow,
|
||||
and the system WebKitGTK on Wayland can freeze on it; FORCE_SHM keeps accelerated compositing and only
|
||||
- **Rule:** On NVIDIA and hypervisor guests reach for `WEBKIT_DMABUF_RENDERER_FORCE_SHM` before
|
||||
`WEBKIT_DISABLE_COMPOSITING_MODE`. **Why:** the proprietary driver and virtual GPUs cannot back WebKit's
|
||||
hardware DMABUF renderer, leaving web views blank or slow; FORCE_SHM keeps accelerated compositing and only
|
||||
skips the hardware path, while disabling compositing drops it. Threaded scrolling is a separate,
|
||||
release-dependent default (off in 2.44/2.45, on from 2.46). `WEBKIT_DISABLE_DMABUF_RENDERER` is not a
|
||||
substitute — it is read first, leaves the transport set empty (no compositing from 2.44 on, where the
|
||||
@@ -633,21 +618,19 @@ Runtime backend detection elsewhere uses Orca's `is_running_on_wayland()` / `is_
|
||||
// Wrong: kills compositing and threaded scrolling (and can crash on modern WebKit)
|
||||
::setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1", false);
|
||||
// Right: keep compositing, skip only the hardware DMABUF path
|
||||
if (WebView::SupportsForceSharedMemory()) {
|
||||
if (nvidia || is_hypervisor_guest() || system_webkit_on_wayland)
|
||||
::setenv("WEBKIT_DMABUF_RENDERER_FORCE_SHM", "1", /*replace*/ false);
|
||||
if (nvidia)
|
||||
::setenv("WEBKIT_FORCE_DMABUF_RENDERER", "1", /*replace*/ false);
|
||||
if (::access("/proc/driver/nvidia/version", F_OK) == 0 && WebView::SupportsForceSharedMemory()) {
|
||||
::setenv("WEBKIT_DMABUF_RENDERER_FORCE_SHM", "1", /*replace*/ false);
|
||||
::setenv("WEBKIT_FORCE_DMABUF_RENDERER", "1", /*replace*/ false);
|
||||
}
|
||||
```
|
||||
Cite: WebKit 2.52.6 `Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.cpp`
|
||||
(`rendererBufferTransportMode()`), Debian `disable-nvidia-dmabuf.patch`, WebKit bug 262607.
|
||||
- **Rule:** Set `WEBKIT_DISABLE_COMPOSITING_MODE` only on the default path, non-replacing
|
||||
(`setenv(..., false)`, so a value the user already exported wins), before GTK initialises: in the
|
||||
branch where wx lacks EGL and Orca forces `GDK_BACKEND=x11`, for WebKitGTK older than 2.42
|
||||
(`WebView::NeedsCompositingWorkaround()`), and as the fallback for the system WebKitGTK on Wayland
|
||||
on 2.42 and 2.43, which have the DMABUF renderer but ignore FORCE_SHM. Never set it unconditionally.
|
||||
Keep JS-side fallbacks so a page never waits forever for a C++→JS call.
|
||||
- **Rule:** Set `WEBKIT_DISABLE_COMPOSITING_MODE` only on the default path, in the branch where wx
|
||||
lacks EGL and Orca forces `GDK_BACKEND=x11`, non-replacing (`setenv(..., false)`, so a value the user
|
||||
already exported wins), before GTK
|
||||
initialises; never unconditionally, and only for the WebKitGTK releases that need it (older than
|
||||
2.42, `WebView::NeedsCompositingWorkaround()`). Keep JS-side fallbacks so a page never
|
||||
waits forever for a C++→JS call.
|
||||
**Why:** WebKit2GTK accelerated compositing could fail silently under XWayland before 2.42, leaving
|
||||
web views blank (Setup Wizard stuck on "Loading..."); the variable also turns off threaded scrolling,
|
||||
so applying it on a newer WebKit needlessly drops both GPU compositing and async scrolling (the
|
||||
|
||||
@@ -27,7 +27,6 @@ on:
|
||||
- 'scripts/test_prune_cached_presets.ps1'
|
||||
- 'scripts/flatpak/**'
|
||||
- 'scripts/msix/**'
|
||||
- 'scripts/sign_windows.ps1'
|
||||
- 'tests/**'
|
||||
|
||||
pull_request:
|
||||
@@ -54,7 +53,6 @@ on:
|
||||
- 'scripts/test_prune_cached_presets.ps1'
|
||||
- 'scripts/flatpak/**'
|
||||
- 'scripts/msix/**'
|
||||
- 'scripts/sign_windows.ps1'
|
||||
- 'tests/**'
|
||||
|
||||
|
||||
@@ -130,12 +128,6 @@ 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
|
||||
@@ -276,10 +268,6 @@ jobs:
|
||||
- /opt/ghc:/opt/ghc1
|
||||
- /usr/local/share/boost:/usr/local/share/boost1
|
||||
- /opt/hostedtoolcache:/opt/hostedtoolcache1
|
||||
# Updating a runtime renames its old deployment, which fails with
|
||||
# "Invalid cross-device link" on hosts whose Docker overlay cannot
|
||||
# rename directories from an image layer. A volume is not overlay.
|
||||
- /var/lib/flatpak
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -35,8 +35,6 @@ 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
|
||||
@@ -475,38 +473,6 @@ 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 }}
|
||||
@@ -526,33 +492,6 @@ 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 }}
|
||||
@@ -574,37 +513,8 @@ 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'
|
||||
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libopengl0 libgl1 libegl1 libwebkit2gtk-4.1-0
|
||||
|
||||
- uses: actions/setup-python@v6
|
||||
- uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ name: Publish to draft release
|
||||
# Manually pulls the platform binaries produced by a "Build all" run and uploads
|
||||
# them to an existing DRAFT release. Decoupled from the build so you can test a
|
||||
# build first, then publish exactly that run's artifacts once you're happy.
|
||||
# It also writes an ordered download table into the draft's release notes.
|
||||
#
|
||||
# Trigger: Actions tab -> "Publish to draft release" -> Run workflow.
|
||||
# Locked to a single person: the first step aborts unless the actor matches the
|
||||
@@ -129,3 +130,68 @@ jobs:
|
||||
gh release upload "$TAG" upload/* --repo "$GITHUB_REPOSITORY" --clobber
|
||||
echo "Uploaded to draft release: $TAG"
|
||||
gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name'
|
||||
|
||||
# GitHub lists release assets alphabetically by filename whatever order they
|
||||
# are uploaded in, so the platform order users see comes from this table in
|
||||
# the release notes. The table sits between the two markers: a rerun
|
||||
# replaces it in place, and notes without markers get it appended. Text
|
||||
# outside the markers is kept. Links use the tag's download URL, which only
|
||||
# resolves once the draft is published.
|
||||
- name: Write download table into release notes
|
||||
run: |
|
||||
set -euo pipefail
|
||||
start='<!-- downloads:start -->'
|
||||
end='<!-- downloads:end -->'
|
||||
|
||||
# Sort key and label of an asset, in the order the table lists them.
|
||||
describe() {
|
||||
case "$1" in
|
||||
*Windows_Installer_*_x64.exe) echo "01|Windows installer (x64)" ;;
|
||||
*Windows_Installer_*_arm64.exe) echo "02|Windows installer (ARM64)" ;;
|
||||
*_x64_portable.zip) echo "03|Windows portable (x64)" ;;
|
||||
*_arm64_portable.zip) echo "04|Windows portable (ARM64)" ;;
|
||||
*.dmg) echo "05|macOS (Apple Silicon and Intel)" ;;
|
||||
*_aarch64_*.AppImage) echo "07|Linux AppImage (aarch64)" ;;
|
||||
*.AppImage) echo "06|Linux AppImage (x86_64)" ;;
|
||||
*_x86_64.flatpak) echo "08|Linux Flatpak (x86_64)" ;;
|
||||
*_aarch64.flatpak) echo "09|Linux Flatpak (aarch64)" ;;
|
||||
Debug_PDB_*) echo "10|Windows debug symbols (for developers)" ;;
|
||||
*) echo "99|$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
{
|
||||
echo "$start"
|
||||
echo
|
||||
echo "## Downloads"
|
||||
echo
|
||||
echo "| Platform | File |"
|
||||
echo "| --- | --- |"
|
||||
gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name' | while read -r name; do
|
||||
echo "$(describe "$name")|$name"
|
||||
done | sort | while IFS='|' read -r _ label name; do
|
||||
echo "| $label | [$name](https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG/$name) |"
|
||||
done
|
||||
echo
|
||||
echo "$end"
|
||||
} > table.md
|
||||
|
||||
gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json body --jq '.body' > notes.md
|
||||
starts=$(grep -cF "$start" notes.md || true)
|
||||
ends=$(grep -cF "$end" notes.md || true)
|
||||
if [ "$starts" -ne "$ends" ] || [ "$starts" -gt 1 ]; then
|
||||
echo "::error::The release notes must contain each download-table marker exactly once, or neither. Fix them by hand and rerun."
|
||||
exit 1
|
||||
fi
|
||||
if [ "$starts" -eq 1 ]; then
|
||||
awk -v start="$start" -v end="$end" '
|
||||
index($0, start) { while ((getline line < "table.md") > 0) print line; skip = 1; next }
|
||||
index($0, end) { skip = 0; next }
|
||||
!skip
|
||||
END { exit skip }
|
||||
' notes.md > notes.new || { echo "::error::The download-table end marker must be on its own line, after the start marker."; exit 1; }
|
||||
else
|
||||
{ cat notes.md; echo; cat table.md; } > notes.new
|
||||
fi
|
||||
gh release edit "$TAG" --repo "$GITHUB_REPOSITORY" --notes-file notes.new
|
||||
cat table.md
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
name: Stale issues and PRs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: write # save the run state in the actions cache
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v11
|
||||
with:
|
||||
# Each new stale label costs about 2 operations. Runs that stop early
|
||||
# continue from the same place the next day.
|
||||
operations-per-run: 300
|
||||
ascending: true
|
||||
stale-issue-label: stale
|
||||
stale-pr-label: stale
|
||||
remove-stale-when-updated: true
|
||||
|
||||
# Issues
|
||||
days-before-issue-stale: 90
|
||||
days-before-issue-close: 14
|
||||
close-issue-reason: not_planned
|
||||
exempt-issue-labels: enhancement
|
||||
exempt-all-issue-assignees: true
|
||||
exempt-all-issue-milestones: true
|
||||
stale-issue-message: |
|
||||
This issue has had no activity for 90 days, so it will be closed in 14 days.
|
||||
|
||||
If it still happens on the latest OrcaSlicer release, please leave a comment with the version you tested and it will stay open.
|
||||
close-issue-message: |
|
||||
This issue was closed because there was no activity after the reminder.
|
||||
|
||||
If it still happens on the latest release, leave a comment here and a team member can reopen it, or open a new issue with the details.
|
||||
|
||||
# PRs: only PRs where we asked the author for something
|
||||
only-pr-labels: "wait for response"
|
||||
days-before-pr-stale: 90
|
||||
days-before-pr-close: 14
|
||||
exempt-draft-pr: true
|
||||
exempt-all-pr-assignees: true
|
||||
exempt-all-pr-milestones: true
|
||||
delete-branch: false
|
||||
stale-pr-message: |
|
||||
We asked for changes or more information on this PR, and there has been no activity for 90 days. It will be closed in 14 days.
|
||||
|
||||
To keep it open, leave a comment. If you push new commits, please also leave a short comment, because a push alone does not reset this. If you no longer have time for it, that is fine, just let us know.
|
||||
close-pr-message: |
|
||||
This PR was closed because we did not hear back after the reminder. Thank you for the work you put into it.
|
||||
|
||||
If you want to continue, push your changes and reopen it, or open a new PR.
|
||||
@@ -49,6 +49,16 @@ jobs:
|
||||
cmakeVersion: "~4.3.0" # use most recent 4.3.x version
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
# Skips self-hosted runners, where this machine-wide setting would stay after the job ends.
|
||||
- name: Enable Crash Dumps
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
shell: pwsh
|
||||
run: |
|
||||
$key = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps'
|
||||
New-Item -Path $key -Force | Out-Null
|
||||
New-ItemProperty -Path $key -Name DumpFolder -PropertyType ExpandString -Value "$env:RUNNER_TEMP\crash-dumps" -Force | Out-Null
|
||||
New-ItemProperty -Path $key -Name DumpType -PropertyType DWord -Value 2 -Force | Out-Null
|
||||
New-ItemProperty -Path $key -Name DumpCount -PropertyType DWord -Value 5 -Force | Out-Null
|
||||
- name: Unpackage and Run Unit Tests
|
||||
timeout-minutes: 20
|
||||
shell: bash
|
||||
@@ -64,6 +74,14 @@ jobs:
|
||||
with:
|
||||
name: unit-test-logs-${{ inputs.artifact }}
|
||||
path: ${{ inputs.test-dir }}/**/*.log
|
||||
- name: Upload Crash Dumps
|
||||
if: ${{ failure() && runner.os == 'Windows' && !vars.SELF_HOSTED }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: crash-dumps-${{ inputs.artifact }}
|
||||
path: ${{ runner.temp }}/crash-dumps
|
||||
retention-days: 5
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
+22
-39
@@ -132,13 +132,13 @@ set(ORCA_BUNDLED_UV_EXECUTABLE "" CACHE FILEPATH "Path to a uv executable to bun
|
||||
# curl -sL https://github.com/astral-sh/uv/releases/download/<ver>/uv-<triple>.tar.gz.sha256
|
||||
# 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")
|
||||
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")
|
||||
|
||||
# Version-scoped cache dir so a version bump invalidates the cached binary.
|
||||
set(ORCA_UV_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/.uv/${ORCA_UV_VERSION}")
|
||||
@@ -896,11 +896,21 @@ endif()
|
||||
|
||||
## OPTIONAL packages
|
||||
|
||||
# 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 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 ()
|
||||
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
@@ -1379,33 +1389,6 @@ 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)
|
||||
|
||||
@@ -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 and macOS release and nightly builds are code signed.
|
||||
Windows release binaries are code signed; see our [Code signing policy](#code-signing-policy).
|
||||
|
||||
## Nightly Builds
|
||||
|
||||
@@ -245,6 +245,16 @@ 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.
|
||||
|
||||
Vendored
-2
@@ -43,8 +43,6 @@ orcaslicer_add_cmake_project(Boost
|
||||
URL "https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz"
|
||||
URL_HASH SHA256=4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95
|
||||
LIST_SEPARATOR |
|
||||
# Lets Boost.Locale configure with CMake 4.5; see the script.
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=<SOURCE_DIR> -P ${CMAKE_CURRENT_LIST_DIR}/fix_locale_source_group.cmake
|
||||
CMAKE_ARGS
|
||||
-DBOOST_EXCLUDE_LIBRARIES:STRING=contract|fiber|numpy|stacktrace|wave|test
|
||||
-DBOOST_LOCALE_ENABLE_ICU:BOOL=OFF # do not link to libicu, breaks compatibility between distros
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
# Boost.Locale lists include/boost/locale.hpp in a source_group(TREE) rooted at include/boost/locale.
|
||||
# Before 4.5, CMake compared the two as strings and accepted it. CMake 4.5 reworked source_group() and
|
||||
# compares path components, so it stops the configure with "is not a prefix of file". locale.hpp gets its own group on the
|
||||
# following line of that file, so only the headers under include/boost/locale/ go into the tree.
|
||||
#
|
||||
# Run as the PATCH_COMMAND with -DSOURCE_DIR=<Boost source>. A second run leaves the file as it is.
|
||||
set(_file "${SOURCE_DIR}/libs/locale/CMakeLists.txt")
|
||||
set(_old [[list(FILTER sources_inc EXCLUDE REGEX "^src/")]])
|
||||
set(_new [[list(FILTER sources_inc INCLUDE REGEX "^include/boost/locale/")]])
|
||||
|
||||
file(READ "${_file}" _content)
|
||||
string(FIND "${_content}" "${_new}" _patched)
|
||||
if (_patched EQUAL -1)
|
||||
string(FIND "${_content}" "${_old}" _found)
|
||||
if (_found EQUAL -1)
|
||||
message(FATAL_ERROR "${_file} no longer has the line this script replaces. Check whether this Boost "
|
||||
"version still needs deps/Boost/fix_locale_source_group.cmake.")
|
||||
endif ()
|
||||
string(REPLACE "${_old}" "${_new}" _content "${_content}")
|
||||
file(WRITE "${_file}" "${_content}")
|
||||
endif ()
|
||||
Vendored
+3
-11
@@ -348,6 +348,7 @@ 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)
|
||||
@@ -365,19 +366,10 @@ if (NOT PNG_FOUND)
|
||||
set(PNG_PKG dep_PNG)
|
||||
endif ()
|
||||
set(EXPAT_PKG "")
|
||||
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.
|
||||
find_package(EXPAT)
|
||||
if (NOT EXPAT_FOUND)
|
||||
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
|
||||
|
||||
Vendored
+1
-43
@@ -1,49 +1,7 @@
|
||||
# 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.
|
||||
set(_expat_c_flags_line "")
|
||||
if (MSVC)
|
||||
# UTF-8 quotes in random_rand_s.c comments can swallow a preprocessor line
|
||||
# when MSVC reads the source using the system's legacy code page.
|
||||
set(_expat_c_flags_line "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} /utf-8")
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(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
|
||||
"${_expat_c_flags_line}"
|
||||
-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
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/expat
|
||||
)
|
||||
|
||||
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 ()
|
||||
|
||||
Vendored
+130
@@ -0,0 +1,130 @@
|
||||
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}
|
||||
)
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
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
@@ -0,0 +1,69 @@
|
||||
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)
|
||||
Vendored
+274
@@ -0,0 +1,274 @@
|
||||
Expat, Release 2.5.0, only picked the lib related files into Bambu Studio, built as static library
|
||||
|
||||
The original README:
|
||||
---------------------------------------------------------------------
|
||||
|
||||
[](https://github.com/libexpat/libexpat/actions/workflows/linux.yml)
|
||||
[](https://ci.appveyor.com/project/libexpat/libexpat)
|
||||
[](https://repology.org/metapackage/expat/versions)
|
||||
[](https://sourceforge.net/projects/expat/files/)
|
||||
[](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 — 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`).
|
||||
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
|
||||
```
|
||||
Vendored
+123
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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,
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/EXPATTargets.cmake)
|
||||
set(EXPAT_LIBRARIES EXPAT::expat)
|
||||
set(EXPAT_INCLUDE_DIRS ${_IMPORT_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
Vendored
+1064
File diff suppressed because it is too large
Load Diff
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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
@@ -0,0 +1,120 @@
|
||||
/* 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
|
||||
Vendored
+165
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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 */
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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,
|
||||
Vendored
+165
@@ -0,0 +1,165 @@
|
||||
/* 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
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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,
|
||||
Vendored
+136
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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,
|
||||
};
|
||||
Vendored
+393
@@ -0,0 +1,393 @@
|
||||
/* ==========================================================================
|
||||
* 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 */
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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,
|
||||
Vendored
+8400
File diff suppressed because it is too large
Load Diff
Vendored
+1251
File diff suppressed because it is too large
Load Diff
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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 */
|
||||
Vendored
+1673
File diff suppressed because it is too large
Load Diff
Vendored
+319
@@ -0,0 +1,319 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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 */
|
||||
Vendored
+74
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| 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>
|
||||
Vendored
+1819
File diff suppressed because it is too large
Load Diff
Vendored
+122
@@ -0,0 +1,122 @@
|
||||
/* 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 */
|
||||
@@ -0,0 +1,28 @@
|
||||
diff --git a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
index 6f63781..9b1c08e 100644
|
||||
--- a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
+++ b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
@@ -210,10 +210,10 @@ private:
|
||||
|
||||
// Define two pcurves of the seam-edge.
|
||||
occ::handle<Geom2d_Curve> aPC1, aPC2;
|
||||
- double af, al;
|
||||
+ double af, al, af1, al1;
|
||||
|
||||
aE.Orientation(TopAbs_FORWARD);
|
||||
- aPC1 = BRep_Tool::CurveOnSurface(aE, aF, af, al);
|
||||
+ aPC1 = BRep_Tool::CurveOnSurface(aE, aF, af1, al1);
|
||||
|
||||
aE.Orientation(TopAbs_REVERSED);
|
||||
aPC2 = BRep_Tool::CurveOnSurface(aE, aF, af, al);
|
||||
@@ -224,7 +224,9 @@ private:
|
||||
}
|
||||
|
||||
// Select the correct pcurve of the seam-edge.
|
||||
- const gp_Pnt2d& aFPntOfPC1 = aPC1->Value(aPC1->FirstParameter());
|
||||
+ // Use the edge's first parameter. A Geom2d_Line's FirstParameter() is -Precision::Infinite(),
|
||||
+ // where a direction of (2e-16, -1) from rounding error gives an X far outside the U range.
|
||||
+ const gp_Pnt2d aFPntOfPC1 = aPC1->Value(af1);
|
||||
|
||||
if (std::abs(aLPntOfIPC1.X() - aFPntOfPC1.X()) > Precision::Confusion())
|
||||
{
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
index 6f63781..97a20d3 100644
|
||||
--- a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
+++ b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_ModelPreProcessor.cxx
|
||||
@@ -223,10 +223,16 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
- // Select the correct pcurve of the seam-edge.
|
||||
- const gp_Pnt2d& aFPntOfPC1 = aPC1->Value(aPC1->FirstParameter());
|
||||
-
|
||||
- if (std::abs(aLPntOfIPC1.X() - aFPntOfPC1.X()) > Precision::Confusion())
|
||||
+ // Select the correct pcurve of the seam-edge: the one closer to the discrete pcurve.
|
||||
+ // Both pcurves of a seam share the edge's range, so evaluate them at its start. A
|
||||
+ // Geom2d_Line's FirstParameter() is -Precision::Infinite(), where a direction of (2e-16, -1)
|
||||
+ // from rounding error gives an X far outside the U range. A Precision::Confusion() threshold
|
||||
+ // fails too, because BRepMesh_ModelHealer has already moved the ends of the discrete pcurve
|
||||
+ // onto those of the neighbouring edges, whose pcurves can end slightly past the seam.
|
||||
+ const gp_Pnt2d aFPntOfPC1 = aPC1->Value(af);
|
||||
+ const gp_Pnt2d aFPntOfPC2 = aPC2->Value(af);
|
||||
+
|
||||
+ if (std::abs(aLPntOfIPC1.X() - aFPntOfPC1.X()) > std::abs(aLPntOfIPC1.X() - aFPntOfPC2.X()))
|
||||
{
|
||||
std::swap(aPC1, aPC2);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerTopoSupplement.cxx b/src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerTopoSupplement.cxx
|
||||
index 44e59b0..8833fed 100644
|
||||
--- a/src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerTopoSupplement.cxx
|
||||
+++ b/src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerTopoSupplement.cxx
|
||||
@@ -21,6 +21,12 @@
|
||||
#include <Standard_ProgramError.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
+// MSVC 14.52 for ARM64 crashes with an internal compiler error (C1001) while
|
||||
+// optimizing this file, so it is compiled without optimization there.
|
||||
+#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||
+ #pragma optimize("", off)
|
||||
+#endif
|
||||
+
|
||||
IMPLEMENT_STANDARD_RTTIEXT(BRepGraph_LayerTopoSupplement, BRepGraph_Layer)
|
||||
|
||||
namespace
|
||||
@@ -384,3 +390,7 @@ void BRepGraph_LayerTopoSupplement::removeOwner(const BRepGraph_NodeId theOwner)
|
||||
myOwnerToUids.UnBind(theOwner);
|
||||
touch();
|
||||
}
|
||||
+
|
||||
+#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||
+ #pragma optimize("", on)
|
||||
+#endif
|
||||
Vendored
+3
-9
@@ -32,15 +32,9 @@ endif ()
|
||||
orcaslicer_add_cmake_project(OCCT
|
||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V8_0_1.zip
|
||||
URL_HASH SHA256=7c033d917ee8f040c0512d289dcc5f02c148889d5bac17c3e25639accb44f0da
|
||||
# 0001 makes BRepMesh pair each seam pcurve of a cone with the right side of the seam, which
|
||||
# failed when the seam pcurve is slightly tilted (Open-Cascade-SAS/OCCT#572) or the adjacent
|
||||
# pcurves end slightly past the seam. Either way the face meshed to a sliver or not at all.
|
||||
# Remove the patch once an OCCT release includes the fix.
|
||||
# 0002 compiles one file without optimization under cl for ARM64, where MSVC 14.52 crashes
|
||||
# on it with an internal compiler error; remove it once the runner image ships a fixed MSVC.
|
||||
PATCH_COMMAND git apply ${OCCT_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-BRepMesh-seam-pcurve-selection.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-BRepGraph-MSVC-ARM64-ICE-workaround.patch
|
||||
# Makes BRepMesh triangulate cone faces whose seam pcurve is slightly tilted
|
||||
# (Open-Cascade-SAS/OCCT#572); remove the patch once an OCCT release includes the fix.
|
||||
PATCH_COMMAND git apply ${OCCT_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-BRepMesh-seam-pcurve-at-edge-parameter.patch
|
||||
#DEPENDS dep_Boost
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_STANDARD=17
|
||||
|
||||
Vendored
+1
-16
@@ -21,18 +21,6 @@ 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")
|
||||
@@ -45,9 +33,7 @@ orcaslicer_add_cmake_project(
|
||||
wxWidgets
|
||||
GIT_REPOSITORY "https://github.com/OrcaSlicer/Orca-deps-wxWidgets"
|
||||
GIT_TAG b44c39c100975a0ac0e46f937aa3f3eae5e18631
|
||||
# A shallow clone fetches only the branch head, so checking out a pinned commit fails once the
|
||||
# branch moves past it.
|
||||
GIT_SHALLOW OFF
|
||||
GIT_SHALLOW ON
|
||||
GIT_SUBMODULES 3rdparty/catch 3rdparty/pcre 3rdparty/libwebp
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${JPEG_PKG}
|
||||
CMAKE_ARGS
|
||||
@@ -77,7 +63,6 @@ orcaslicer_add_cmake_project(
|
||||
-DwxUSE_LIBTIFF=OFF
|
||||
-DwxUSE_LIBWEBP=builtin
|
||||
-DwxUSE_EXPAT=sys
|
||||
${_wx_expat_static}
|
||||
-DwxUSE_NANOSVG=OFF
|
||||
)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ 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
|
||||
|
||||
@@ -488,12 +488,6 @@ void stl_check_facets_nearby(stl_file *stl, float tolerance)
|
||||
// No need to check any further. All facets are connected.
|
||||
return;
|
||||
|
||||
// A mesh built in memory has no shortest edge, so the tolerance arrives as 0, and load_nearby() would divide by it.
|
||||
// Converting the infinities and NaNs to int is undefined: x86-64 makes them all INT_MIN, so no edge was ever
|
||||
// matched, while ARM64 saturates them by sign and merged unrelated edges. Keep the x86-64 result everywhere.
|
||||
if (!(tolerance > 0.f))
|
||||
return;
|
||||
|
||||
HashTableEdges hash_table(stl->stats.number_of_facets);
|
||||
for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
|
||||
//FIXME is the copy necessary?
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
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()
|
||||
@@ -0,0 +1,21 @@
|
||||
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.
|
||||
@@ -0,0 +1,146 @@
|
||||
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/
|
||||
@@ -0,0 +1,92 @@
|
||||
/* 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
|
||||
@@ -0,0 +1,36 @@
|
||||
/* 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
@@ -0,0 +1,33 @@
|
||||
/*================================================================
|
||||
** 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 */
|
||||
@@ -0,0 +1,129 @@
|
||||
/* 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 */
|
||||
@@ -0,0 +1,37 @@
|
||||
/* 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,
|
||||
@@ -0,0 +1,95 @@
|
||||
/* 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
|
||||
@@ -0,0 +1,36 @@
|
||||
/* 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,
|
||||
@@ -0,0 +1,150 @@
|
||||
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,
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
/* 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
@@ -0,0 +1,114 @@
|
||||
/* 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
@@ -0,0 +1,322 @@
|
||||
/* 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 */
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
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
@@ -0,0 +1,115 @@
|
||||
/* 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 */
|
||||
@@ -3073,19 +3073,6 @@ 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;
|
||||
|
||||
@@ -144,10 +144,7 @@ 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. 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
|
||||
they would print as blobs. 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.
|
||||
|
||||
@@ -164,13 +164,12 @@ 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 left or right click anywhere else, or Esc, closes them. The box is an
|
||||
and keeps the click from changing the selection; a 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. 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.
|
||||
than going to ImGui.
|
||||
|
||||
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
|
||||
|
||||
+6
-19
@@ -266,16 +266,6 @@ 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
|
||||
@@ -297,17 +287,14 @@ 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
|
||||
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
|
||||
- **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
|
||||
`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, 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.
|
||||
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.
|
||||
- **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
|
||||
|
||||
@@ -19,9 +19,7 @@ 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
|
||||
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
|
||||
volumes, overlaps the current plate, or when it is selected. 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
|
||||
@@ -52,10 +50,7 @@ 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. 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
|
||||
Preview toolbar's dirty flag is left alone. That counter moves after almost every edit, 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
|
||||
|
||||
@@ -44,20 +44,9 @@ vertex stands out of the chord of its neighbours by less than the resolution, as
|
||||
`LayerRegion::simplify_*` simplifies the infill to it afterwards and would drop
|
||||
that vertex again.
|
||||
|
||||
The resolution is followed down to 5 microns (`corner_smoothing_tolerance()`), no
|
||||
finer. G-code coordinates come in steps of 1 micron, and rounding the vertices of
|
||||
a corner split for a finer tolerance makes their turns uneven, by about a quarter
|
||||
between neighbours at 1 micron, so the planner slows at the sharpest of them and
|
||||
the corner prints no faster. Finer corners also pack their moves closer: a curve
|
||||
held to its centripetal limit runs through about `sqrt(acceleration / (8 ×
|
||||
tolerance))` moves per second, 1,100 at 10,000 mm/s² and 1 micron. A printer host
|
||||
that cannot plan moves that fast runs out of buffered moves, and Klipper then
|
||||
flushes its lookahead queue and stops the toolhead in the middle of the path, a
|
||||
pause the preview does not show.
|
||||
|
||||
The vertices depend on the geometry and the resolution only, not on the printer.
|
||||
A finer resolution, down to that limit, splits a corner into more and gentler
|
||||
turns, which a planner takes faster, for a larger G-code file.
|
||||
A finer resolution splits a corner into more and gentler turns, which a planner
|
||||
takes faster, for a larger G-code file.
|
||||
|
||||
A corner of a given turn and vertex count is the same shape at any reach and
|
||||
resolution, scaled. Each thread builds a shape once at unit reach and all its
|
||||
|
||||
@@ -124,9 +124,7 @@ 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. 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.
|
||||
again after an edit, which also installs the new wx accelerator.
|
||||
|
||||
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
|
||||
|
||||
@@ -9,8 +9,7 @@ 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. 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.
|
||||
any other infill.
|
||||
|
||||
Outlines of centerlines that cross each other overlap at every crossing, which
|
||||
over-extrudes the wall intersections. The line-crossing patterns Grid,
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
# Only one wall on top surfaces — High Level Design
|
||||
|
||||
## Purpose and scope
|
||||
|
||||
`only_one_wall_top` leaves a single wall, the outer one, where a layer has a top surface, so the top fill runs up
|
||||
to the outer wall instead of stopping at a band of inner walls. The topmost layer of an object, which is all top
|
||||
surface, is printed with one wall. Below it, the perimeter generators find the top surface of each island and deal
|
||||
with the inner walls that run over it.
|
||||
|
||||
The option needs a top shell to act on. With `top_shell_layers` at 0 the top surfaces are retyped as internal (see
|
||||
`LayerRegion::prepare_fill_surfaces()`), so `has_top_shell_layers()` switches the option off and the GUI hides it.
|
||||
`only_one_wall_first_layer` is its bottom counterpart: it thins the first layer to one wall, and needs bottom shell
|
||||
layers in the same way.
|
||||
|
||||
A top surface is the part of an island that the next layer leaves uncovered. Bridges keep their walls, and a top
|
||||
surface narrower than `min_width_top_surface` next to the geometry above is not treated as top, so thin features
|
||||
such as lettering on the next layer do not strip the walls under them.
|
||||
|
||||
## Two strategies
|
||||
|
||||
What happens to the inner walls depends on whether the top fill can take their place
|
||||
(`top_fill_replaces_inner_walls()`).
|
||||
|
||||
- **Rerouting.** With `top_surface_expansion` at 0 or `top_surface_density` at 0%, the inner walls are generated
|
||||
on the part of the island that is not top surface only. They stop at the top surface and run along its edge, so
|
||||
every feature rising from a top surface is ringed by inner walls. Projects that do not use the expansion get
|
||||
this result.
|
||||
- **Removal.** With both set, the walls are generated on the real geometry, as with the option off, and the inner
|
||||
walls that run over the top surface are then removed. `detect_surfaces_type()` grows the top surface by
|
||||
`top_surface_expansion` under the features rising from it, inside the island less one wall, so the top fill runs
|
||||
on under those features instead of being cut up by the walls that rerouting would put around them.
|
||||
|
||||
Crossing zero with either setting switches between the strategies, so it regenerates the walls; other changes to
|
||||
them only redo the fill steps.
|
||||
|
||||
## Which walls run over the top
|
||||
|
||||
The walls are generated before the surfaces are typed, so the perimeter generator works from the real top surface,
|
||||
never from the expanded one.
|
||||
|
||||
A wall runs over the top by the length of its centerline that lies inside the top region (`over_top_length()`).
|
||||
Testing its vertices is not enough: a straight wall along a ledge crosses the top between two vertices that both
|
||||
sit under the geometry rising at either end of the ledge. A wall whose bounding box misses the region is skipped
|
||||
without any clipping.
|
||||
|
||||
The classic generator's region is the area the top fill takes (`top_fill_area()`): the top fills grown by half the
|
||||
outer wall spacing, to meet the outer wall, which is exactly what becomes the top fill later. The not-top
|
||||
complement that `split_top_surfaces()` returns does not do: when gap fill is on it counts as not top the band
|
||||
within one outer wall spacing of the outer wall, which the rerouting strategy leaves to gap fill. With the precise
|
||||
outer wall off, or a wall order other than inner/outer, and equal wall spacings, the first inner wall lies exactly
|
||||
on the inner edge of that band. Measured against the complement it never runs over the top, while the top fill
|
||||
covers it along a whole exposed edge.
|
||||
|
||||
## Classic walls
|
||||
|
||||
A classic wall is a closed loop, printed as an `ExtrusionLoop` with its seam, place in the wall order, overhang
|
||||
detection and fuzzy skin, so it is kept or dropped whole:
|
||||
|
||||
- a wall with nothing over the top is kept;
|
||||
- a wall that only grazes the top, by less than two wall widths, is kept whole, and the band it covers is withheld
|
||||
from the top fill so the fill is routed around it;
|
||||
- any other wall is dropped.
|
||||
|
||||
The band a dropped wall covered outside the top region goes to the fill surfaces, so nothing is left void, and the
|
||||
gaps inside the region are removed from the gap fill. Those fill surfaces are typed later like any other: top fill
|
||||
where the expansion reaches, internal solid infill with Ensure vertical shell thickness at All, sparse infill with
|
||||
the other settings.
|
||||
|
||||
A dropped loop loses its parts outside the top surface as well. When a loop runs both over a ledge and under the
|
||||
geometry rising from it, the walls under that geometry go for that layer, and a small top patch crossed by long
|
||||
loops drops them all.
|
||||
|
||||
## Arachne walls
|
||||
|
||||
Arachne walls can be open lines, so `clip_inner_walls_over_top()` cuts them instead of dropping them, and the walls
|
||||
under geometry that keeps rising stay. Each line is measured the same way against Arachne's top region. A line with
|
||||
nothing over the top is kept and one wholly over it is dropped. Any other line is clipped against the region grown
|
||||
by half a wall width, because the rounded end of a bead reaches half a width past its endpoint. Clipper treats the
|
||||
line as open, so it also cuts a closed loop at its start vertex and may reverse pieces; pieces sharing an endpoint
|
||||
are stitched back together, and pieces shorter than a wall width are dropped. A clip that would remove less than
|
||||
two wall widths, about the pull-back of one crossing, keeps the line whole and withholds its footprint from the top
|
||||
fill instead.
|
||||
|
||||
The inner walls are numbered after the single outer wall. Arachne's single-wall pass may widen two beads to fill a
|
||||
wall narrower than three outer walls, which leaves no room for the inner walls outside the top surface. When its
|
||||
outer walls run more than a tenth of an outer wall width away from the full pass's, for more than a wall width
|
||||
outside the top surface, the full pass's outer walls and the area inside them are used instead.
|
||||
|
||||
## Constraints
|
||||
|
||||
- A kept inner wall is never under the top fill; a wall that grazes the top has the fill routed around it.
|
||||
- With the option off nothing changes, and without a top fill to take their place the inner walls are rerouted.
|
||||
- Classic walls are dropped whole, Arachne walls are cut. Cutting classic walls would need open inner walls through
|
||||
the loop pipeline, with a start and an end at every cut.
|
||||
- The cost is one clip per inner wall whose bounding box meets the top region, on islands with a top surface below
|
||||
the topmost layer.
|
||||
@@ -1,122 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,329 +0,0 @@
|
||||
# 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.
|
||||
@@ -95,16 +95,9 @@ 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 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 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 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
|
||||
@@ -372,11 +365,8 @@ 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** — 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.
|
||||
- **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.
|
||||
- **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.
|
||||
@@ -403,10 +393,7 @@ 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. 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.
|
||||
absent, as it would be from a JSON that predates it.
|
||||
- **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
|
||||
|
||||
@@ -29,32 +29,7 @@ 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.
|
||||
|
||||
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
|
||||
`Print::_make_wipe_tower` plans one tower layer per such object layer. 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
|
||||
@@ -62,8 +37,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 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
|
||||
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
|
||||
therefore still planned and still generated; they are marked, and the emitter
|
||||
drops them.
|
||||
|
||||
@@ -111,14 +86,11 @@ 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
|
||||
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.
|
||||
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.
|
||||
|
||||
## Merging sparse layers
|
||||
|
||||
@@ -221,9 +193,5 @@ 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, 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.
|
||||
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.
|
||||
|
||||
@@ -100,8 +100,14 @@ the active printer agent because a normal LAN agent represents one physical prin
|
||||
## Agent registration and selection
|
||||
|
||||
`NetworkAgentFactory` maintains the printer-agent registry. Each registry entry contains an agent ID,
|
||||
a display name, and a factory function. Built-in agents register during application initialization.
|
||||
Python printer-agent capabilities register dynamically and contribute an agent ID and factory entry.
|
||||
a display name, a factory function, and whether the native Device and Calibration tabs apply to the
|
||||
agent's printers. Built-in agents register during application initialization. Python printer-agent
|
||||
capabilities register dynamically and contribute an agent ID and factory entry.
|
||||
|
||||
The tab flag is read from the registry rather than the live agent because the main window lays out its
|
||||
tabs before the newly selected preset's agent is installed. It defaults to true. An agent that clears
|
||||
it is one whose printers have their own web interface and nothing the Bambu-shaped Device and
|
||||
Calibration tabs can show; for those printers the web Device page takes the Device tab's place.
|
||||
|
||||
The selected printer preset contains the printer-agent choice. If no explicit choice is stored, the
|
||||
application preserves the existing default behavior: Bambu presets select the Bambu agent and other
|
||||
|
||||
@@ -46,8 +46,6 @@ 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
|
||||
|
||||
@@ -142,10 +140,8 @@ 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. 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
|
||||
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
|
||||
behavior for the plugin-load worker and the slicing worker.
|
||||
|
||||
### Blocking UI continuation
|
||||
|
||||
@@ -56,7 +56,10 @@ closes the open gizmo, so neither tab ever shows a stale cut.
|
||||
- **Cut faces.** Clipping only discards fragments, which would leave the cut volumes hollow.
|
||||
`_render_section_view_caps()` draws their cut faces with one `MeshClipper` per model part the
|
||||
plane passes through. A clipper recomputes its face only when the plane or the volume moves.
|
||||
Modifiers, the wipe tower and SLA auxiliaries get no face.
|
||||
Each face is drawn unlit in its part's render colour, so it follows the part's selection and
|
||||
disabled states. The lit faces of a part show between about a third of that colour and most of
|
||||
it, so the cut face is darkened below that range, or lifted above it on a dark part, to read as
|
||||
the inside. Modifiers, the wipe tower and SLA auxiliaries get no face.
|
||||
- **Toolpaths.** libvgcode takes the plane through `Viewer::set_clipping_plane()`. It draws each
|
||||
extrusion as only the faces of a diamond-section prism that turn towards the camera, so
|
||||
discarding the fragments on the clipped side would leave open shells. Instead, the segment
|
||||
|
||||
@@ -108,16 +108,12 @@ 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 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.
|
||||
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.
|
||||
|
||||
## The search
|
||||
|
||||
|
||||
+32
-62
@@ -24,22 +24,11 @@ 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 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.
|
||||
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.
|
||||
|
||||
Retraction and pressure advance calibrations disable inward wiping so it cannot
|
||||
mask the behavior being measured. The calibration settings turn it off, and
|
||||
@@ -50,10 +39,7 @@ 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. 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.
|
||||
or self-touching contours.
|
||||
|
||||
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
|
||||
@@ -65,25 +51,19 @@ 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 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
|
||||
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
|
||||
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. 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.
|
||||
external loops, then reused across their candidate paths.
|
||||
|
||||
Material-side validation applies with or without a seam gap. Along each
|
||||
candidate, local wall normals point toward the adjacent inner wall;
|
||||
candidate, local wall normals point toward the adjacent printed 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
|
||||
@@ -93,10 +73,9 @@ 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. 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
|
||||
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
|
||||
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.
|
||||
@@ -105,10 +84,9 @@ when its distance to the target inner wall is no worse within tolerance.
|
||||
|
||||
The original wipe path is retained when:
|
||||
|
||||
- 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.
|
||||
- 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 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
|
||||
@@ -150,19 +128,18 @@ Joins that already backtrack across the seam gap are not adjusted this way.
|
||||
|
||||
## Execution and retraction
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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
|
||||
@@ -170,10 +147,8 @@ 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 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.
|
||||
before wiping. This split applies to regular deferred wipes, including fallback;
|
||||
an accepted inward wipe executes separately without retraction.
|
||||
|
||||
## Implementation and verification
|
||||
|
||||
@@ -188,11 +163,6 @@ irrespective of the configured retraction percentages.
|
||||
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.
|
||||
|
||||
+112
-411
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-11-21 12:24+0800\n"
|
||||
"POT-Creation-Date: 2026-10-30 11:58-0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -1000,8 +1000,7 @@ msgstr ""
|
||||
msgid "Cut to parts"
|
||||
msgstr ""
|
||||
|
||||
#. TRN: Part assignments are the upper/lower cut groups changed by right-clicking parts.
|
||||
msgid "Reset the cutting plane, remove connectors, and clear part assignments."
|
||||
msgid "Reset cutting plane and remove connectors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reset Cut"
|
||||
@@ -3043,7 +3042,7 @@ msgstr ""
|
||||
msgid "Simplify Model"
|
||||
msgstr ""
|
||||
|
||||
msgid "Subdivision mesh (Lost color)"
|
||||
msgid "Subdivision mesh"
|
||||
msgstr ""
|
||||
|
||||
msgid "Center"
|
||||
@@ -5185,9 +5184,6 @@ msgstr ""
|
||||
msgid "Enable the prime tower and either disable purging in the prime tower or disable single extruder multimaterial mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "The Type 1 prime tower takes the prime volume from each filament, on its Multimaterial page."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable the prime tower to use this setting."
|
||||
msgstr ""
|
||||
|
||||
@@ -6627,24 +6623,9 @@ msgstr ""
|
||||
msgid "Resolution"
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom camera source"
|
||||
msgstr ""
|
||||
|
||||
msgid "Camera stream URL"
|
||||
msgstr ""
|
||||
|
||||
msgid "URL of an MJPEG stream or of a web page that shows the camera, for example http://192.168.1.10:8080/?action=stream"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show \"Live Video\" guide page."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Connect Printer (LAN)"
|
||||
msgstr ""
|
||||
|
||||
@@ -7617,9 +7598,6 @@ msgstr ""
|
||||
msgid "Camera Setting"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switch Camera View"
|
||||
msgstr ""
|
||||
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
@@ -8334,24 +8312,6 @@ msgstr ""
|
||||
msgid "Error loading shaders"
|
||||
msgstr ""
|
||||
|
||||
#. TRN The OpenGL context could not be made current, so nothing can be drawn in the 3D view.
|
||||
msgid "OpenGL could not be activated for the 3D view, so it cannot be shown."
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the name of a graphics card or display adapter as Windows reports it, such as "Microsoft Basic Display Adapter".
|
||||
#, possible-boost-format
|
||||
msgid "The window is on a display driven by \"%1%\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "Make sure the display adapter driving this window's display is enabled and its driver is installed and up to date."
|
||||
msgstr ""
|
||||
|
||||
msgid "If the computer has more than one graphics card, connecting the monitor to another one may help."
|
||||
msgstr ""
|
||||
|
||||
msgid "If the problem remains, close any overlay or screen capture software and try again."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Layers"
|
||||
msgid "Top"
|
||||
msgstr ""
|
||||
@@ -8960,9 +8920,6 @@ msgstr ""
|
||||
msgid "The 3MF file was generated by BambuStudio, loading geometry data only."
|
||||
msgstr ""
|
||||
|
||||
msgid "The 3MF file has no project settings that OrcaSlicer can import."
|
||||
msgstr ""
|
||||
|
||||
msgid "This project was created with an OrcaSlicer 2.3.1-alpha and uses infill rotation template settings that may not work properly with your current infill pattern. This could result in weak support or print quality issues."
|
||||
msgstr ""
|
||||
|
||||
@@ -10709,6 +10666,12 @@ msgstr ""
|
||||
msgid "Same as Global"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spiral vase"
|
||||
msgstr ""
|
||||
|
||||
@@ -10984,6 +10947,9 @@ msgstr ""
|
||||
msgid "Unpin from favorites (%s)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove from favorites"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move left"
|
||||
msgstr ""
|
||||
|
||||
@@ -12016,9 +11982,6 @@ msgstr ""
|
||||
msgid "Wipe tower parameters"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime volume"
|
||||
msgstr ""
|
||||
|
||||
msgid "Multi Filament"
|
||||
msgstr ""
|
||||
|
||||
@@ -12085,12 +12048,6 @@ msgstr ""
|
||||
msgid "Set nonzero volumetric speed coefficients before enabling adaptive volumetric speed."
|
||||
msgstr ""
|
||||
|
||||
msgid "Select wipe tower Type 1 in the printer settings to use this setting."
|
||||
msgstr ""
|
||||
|
||||
msgid "Select wipe tower Type 1 on a printer whose extruder holds more than one nozzle to use this setting."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable multitool ramming to edit this setting."
|
||||
msgstr ""
|
||||
|
||||
@@ -12517,11 +12474,6 @@ msgctxt "Nozzle flow type"
|
||||
msgid "XHF"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Printer settings extruder tab: the extruder's name, e.g. "Extruder 2", and its nozzle flow tag, e.g. "HF".
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "%s: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "No modifications need to be copied."
|
||||
msgstr ""
|
||||
|
||||
@@ -12536,11 +12488,6 @@ msgstr ""
|
||||
msgid "Do you want to modify the following parameters of the %s to that of the %s?"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the extruder (or nozzle variant) the values are copied from, %2% the list of those they are copied to, as the switch names them, e.g. "T2 HF, T3 HF".
|
||||
#, possible-boost-format
|
||||
msgid "Do you want to copy the following parameters of %1% to %2%?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click to reset current value and attach to the global value."
|
||||
msgstr ""
|
||||
|
||||
@@ -12664,15 +12611,6 @@ msgid ""
|
||||
"You can discard the preset values you have modified, or choose to transfer the modified values to the new project"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click the compare button to see the full value."
|
||||
msgstr ""
|
||||
|
||||
msgid "Process settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Compare the full values"
|
||||
msgstr ""
|
||||
|
||||
msgid "Extruder count"
|
||||
msgstr ""
|
||||
|
||||
@@ -13338,6 +13276,9 @@ msgstr ""
|
||||
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
|
||||
msgstr ""
|
||||
|
||||
msgid "This system uses HTTPS certificates from the system Certificate Store or Keychain. To use a custom CA file, import it there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Printer model"
|
||||
msgstr ""
|
||||
|
||||
@@ -13356,9 +13297,6 @@ msgstr ""
|
||||
msgid "Manual Setup"
|
||||
msgstr ""
|
||||
|
||||
msgid "This system uses HTTPS certificates from the system Certificate Store or Keychain. To use a custom CA file, import it there."
|
||||
msgstr ""
|
||||
|
||||
msgid "IP and Access Code Verified! You may close the window"
|
||||
msgstr ""
|
||||
|
||||
@@ -13820,6 +13758,10 @@ msgstr ""
|
||||
msgid "%1% is too close to others, and collisions may be caused."
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid "%1% is printed later than its place in the object list, to avoid a collision."
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid "%1% is too tall, and collisions will be caused."
|
||||
msgstr ""
|
||||
@@ -13846,9 +13788,6 @@ msgstr ""
|
||||
msgid "Prime tower is too close to the clumping detection area. There may be collisions when printing."
|
||||
msgstr ""
|
||||
|
||||
msgid "The extruder printable areas share no common area, so the prime tower cannot be printed.\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime tower is partially outside the printable area, and it cannot be printed.\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -13861,21 +13800,6 @@ msgstr ""
|
||||
msgid "If you still want to print, you can enable the option in Preferences / Control / Slicing / Remove mixed temperature restriction."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects have the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are printed over the same number of raft layers."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are sliced with the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported if all objects have the same variable layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "No extrusions under current settings."
|
||||
msgstr ""
|
||||
|
||||
@@ -13996,6 +13920,21 @@ msgstr ""
|
||||
msgid "A prime tower requires any “support gap” to be a multiple of layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects have the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are printed over the same number of raft layers."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are sliced with the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported if all objects have the same variable layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "One or more object were assigned an extruder that the printer does not have."
|
||||
msgstr ""
|
||||
|
||||
@@ -14090,7 +14029,12 @@ msgstr ""
|
||||
msgid "Adaptive pressure advance is enabled for one or more extruders, but no measurements have been entered in their Adaptive Pressure Advance model."
|
||||
msgstr ""
|
||||
|
||||
msgid "The Adaptive Pressure Advance model for one or more extruders may contain invalid values."
|
||||
#. TRN %1% is the filament number as shown in the filament list, starting from 1; %2% names the invalid line.
|
||||
#. one warning per filament, the notifications stack
|
||||
#, possible-boost-format
|
||||
msgid ""
|
||||
"The Adaptive Pressure Advance model of filament %1% contains invalid values.\n"
|
||||
"%2%"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament shrinkage will not be used because filament shrinkage for the used filaments does not match."
|
||||
@@ -17803,11 +17747,11 @@ msgid "Wipe inward"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe inward distance"
|
||||
@@ -17817,9 +17761,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
@@ -18814,6 +18756,9 @@ msgstr ""
|
||||
msgid "The flush multiplier used in fast purge mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime volume"
|
||||
msgstr ""
|
||||
|
||||
msgid "This is the volume of material to prime the extruder with on the tower."
|
||||
msgstr ""
|
||||
|
||||
@@ -19694,6 +19639,12 @@ msgstr ""
|
||||
msgid "Estimated print time when printed in normal mode (i.e. not in silent mode). Same as normal_print_time."
|
||||
msgstr ""
|
||||
|
||||
msgid "Used filament types"
|
||||
msgstr ""
|
||||
|
||||
msgid "Underscore-separated list of all filament types used during the print."
|
||||
msgstr ""
|
||||
|
||||
msgid "Print time (silent mode)"
|
||||
msgstr ""
|
||||
|
||||
@@ -21427,7 +21378,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
|
||||
@@ -21443,7 +21394,7 @@ msgstr ""
|
||||
msgid "Frequency settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -21477,7 +21428,7 @@ msgstr ""
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
@@ -21668,15 +21619,6 @@ msgstr ""
|
||||
msgid "Smooth Build Plate (Side B)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reading the printer's filament slots..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not read the printer. Close this dialog and try again."
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not connect to the printer. Check that it is on, then reopen this dialog."
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Printer: %s"
|
||||
msgstr ""
|
||||
@@ -21692,14 +21634,6 @@ msgstr ""
|
||||
msgid "Ext - %s"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Creality send dialog. CFS is Creality's multi-filament unit.
|
||||
msgid "The printer reports no CFS connected, so the print will use the external spool."
|
||||
msgstr ""
|
||||
|
||||
#. TRN Creality send dialog, when the printer lists no CFS slots or does not answer
|
||||
msgid "The printer did not report any filament slots, so the print will use the external spool."
|
||||
msgstr ""
|
||||
|
||||
msgid "Unable to perform boolean operation on selected parts"
|
||||
msgstr ""
|
||||
|
||||
@@ -24863,15 +24797,6 @@ msgstr ""
|
||||
msgid "Constraints"
|
||||
msgstr ""
|
||||
|
||||
msgid "No constraints yet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Zoom to selection"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete constraint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Feature tree"
|
||||
msgstr ""
|
||||
|
||||
@@ -24898,6 +24823,9 @@ msgstr ""
|
||||
msgid "Show / hide"
|
||||
msgstr ""
|
||||
|
||||
msgid "Zoom to selection"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check interference — find overlapping bodies"
|
||||
msgstr ""
|
||||
|
||||
@@ -25039,11 +24967,6 @@ msgstr[1] ""
|
||||
msgid "Sketch %d"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the name of the sketch being edited, as its Feature tree row shows it.
|
||||
#, possible-boost-format
|
||||
msgid "Editing: %1% · N = look normal to the plane · Confirm or Cancel in the toolbar"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Editing: Sketch %d · N = look normal to the plane · Confirm or Cancel in the toolbar"
|
||||
msgstr ""
|
||||
@@ -25577,7 +25500,7 @@ msgstr ""
|
||||
msgid " · Esc goes back to Select"
|
||||
msgstr ""
|
||||
|
||||
msgid " · click a constraint badge to select it"
|
||||
msgid " · click a constraint badge to remove it"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
@@ -25936,9 +25859,10 @@ msgstr ""
|
||||
msgid "Constraints (%d)"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Design tab status line. %1% names the selected sketch constraint, e.g. "Horizontal E0·P0 — E0·P1".
|
||||
#, possible-boost-format
|
||||
msgid "%1% selected — Delete removes it"
|
||||
msgid "No constraints yet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete constraint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Constraint deleted"
|
||||
@@ -29286,6 +29210,49 @@ msgstr ""
|
||||
msgid "Note:"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is a setting's label and %2% the plugin capability name stored in that setting.
|
||||
#, possible-boost-format
|
||||
msgid "• %1%: %2%"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is a preset name, %2% a setting's label and %3% the plugin capability name.
|
||||
#, possible-boost-format
|
||||
msgid "• %1% — %2%: %3%"
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid ""
|
||||
"The following settings refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the preset won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid ""
|
||||
"The following settings refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the project won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Plugin Not Identified"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save anyway"
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid ""
|
||||
"The presets being saved refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the presets won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Texture Displacement"
|
||||
msgid "Bake"
|
||||
msgstr ""
|
||||
@@ -30328,51 +30295,6 @@ msgstr ""
|
||||
msgid "Plugin file: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot be empty."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot contain a null character."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission may use \"*\" only as the final \"/*\" of a folder tree."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot contain a \"..\" path component."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission must be an absolute path on this computer."
|
||||
msgstr ""
|
||||
|
||||
msgid "A network permission cannot be empty."
|
||||
msgstr ""
|
||||
|
||||
msgid "A network permission cannot contain control characters."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions do not support wildcards. Enter one full http:// or https:// URL."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL with a host name or IP address. Bare domain names are not accepted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Only http:// and https:// URLs are supported for network permissions."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL with a host name or IP address."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions cannot include a username or password. Enter a URL with only a scheme and host."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a valid bracketed IPv6 address."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions do not support wildcards."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a host name or IP address, optionally with a port, or a full http:// or https:// URL."
|
||||
msgstr ""
|
||||
|
||||
msgid "Process plugins"
|
||||
msgstr ""
|
||||
|
||||
@@ -30625,148 +30547,6 @@ msgctxt "Plugin"
|
||||
msgid "Capabilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Permissions"
|
||||
msgstr ""
|
||||
|
||||
msgid "Permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "File system read"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP network"
|
||||
msgstr ""
|
||||
|
||||
msgid "Network sockets"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Operating system processes a plugin may start, not print process presets.
|
||||
msgctxt "Permission category"
|
||||
msgid "Processes"
|
||||
msgstr ""
|
||||
|
||||
msgid "Threading"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission category"
|
||||
msgid "Events"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter an absolute path on this computer. Add /* at the end to include the folder and everything below it; no other wildcard is accepted. A read/write grant can create files through open(), but it does not cover create or delete events such as os.mkdir and os.remove. Without Full access, each such event outside allowed folders needs its own approval, which is never saved. When a plugin runs in the background, these events are denied without asking."
|
||||
msgstr ""
|
||||
|
||||
msgid "C:\\path\\to\\directory\\*"
|
||||
msgstr ""
|
||||
|
||||
msgid "/path/to/directory/*"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL; only its scheme and host are saved, so the grant covers every port, path, and query on that host. A network socket grant also accepts a bare host name or IP address, with or without a port, and covers every port on that host. Other schemes are not accepted. Grants in either list are checked for HTTP and socket access."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter the exact value recorded by the audit. It may be a Python representation of the command."
|
||||
msgstr ""
|
||||
|
||||
msgid "Exact audited value"
|
||||
msgstr ""
|
||||
|
||||
msgid "Allow this plugin to create threads."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a category and event separated by a colon, such as Socket:socket.__new__."
|
||||
msgstr ""
|
||||
|
||||
msgid "Socket:socket.__new__"
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Network access"
|
||||
msgstr ""
|
||||
|
||||
msgid "Execution"
|
||||
msgstr ""
|
||||
|
||||
msgid "Audit events"
|
||||
msgstr ""
|
||||
|
||||
msgid "Files and folders"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission access"
|
||||
msgid "Read"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission access"
|
||||
msgid "Read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "Read permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read and write permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "File system: Read"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system: Read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access bypasses permission checks. The plugin can read and write most files you can access; modifying startup or application files can let code run outside these checks. Direct Python access to OrcaSlicer's configuration, secret, certificate and install-state paths stays blocked, but subprocesses are not restricted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Permission list editing is disabled while full access is on."
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access status is unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "No values added."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Apply value for %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Install this plugin to edit its permissions."
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "New value for %s"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Edit value for %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Add value to %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Remove %s"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Run \"%s\""
|
||||
msgstr ""
|
||||
@@ -30848,29 +30628,6 @@ msgstr ""
|
||||
msgid "Refreshing plugins data"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Enable full access for \"%s\"?\n"
|
||||
"\n"
|
||||
"Full access turns off permission auditing for this plugin: its file system, network, process, thread and event permissions are no longer checked. The plugin can read and write most files your user account can access, including startup scripts, SSH keys and a writable OrcaSlicer installation. Modifying startup or application files can let code run outside these checks. Direct Python access to OrcaSlicer's configuration, secret, certificate and install-state paths stays blocked, but subprocesses are not restricted. Full access is not a sandbox.\n"
|
||||
"\n"
|
||||
"Only enable this for a plugin you trust."
|
||||
msgstr ""
|
||||
|
||||
msgid "Invalid permission save request."
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid "Cannot save \"%1%\": %2%"
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed to save permissions."
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid "Permissions saved for \"%s\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed to unload plugin."
|
||||
msgstr ""
|
||||
|
||||
@@ -31522,12 +31279,6 @@ msgstr ""
|
||||
msgid "unknown name"
|
||||
msgstr ""
|
||||
|
||||
msgid "Don't show this tip again"
|
||||
msgstr ""
|
||||
|
||||
msgid "Tip: You can review and change this plugin's saved permissions in the Plugins dialog, on the Permissions tab."
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting permission for the Python audit event \"%s\".\n"
|
||||
@@ -31558,28 +31309,20 @@ msgstr[1] ""
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting to create the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" is requesting to create the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting to delete the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" is requesting to delete the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
@@ -31629,44 +31372,6 @@ msgstr ""
|
||||
msgid "Plugin permissions"
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to perform a file operation that requires permission.\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to create the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" tried to create the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, possible-c-format, possible-boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to delete the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" tried to delete the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Plugin operation denied"
|
||||
msgstr ""
|
||||
|
||||
msgid "The preset stores invalid plugin capability configuration JSON."
|
||||
msgstr ""
|
||||
|
||||
@@ -31986,10 +31691,6 @@ msgstr ""
|
||||
msgid "Cannot keep plugin local: local plugin key already exists: %1%"
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid "Failed to read plugin install state: %1%"
|
||||
msgstr ""
|
||||
|
||||
#, possible-boost-format
|
||||
msgid "Failed to update plugin install state: %1%"
|
||||
msgstr ""
|
||||
@@ -32216,10 +31917,10 @@ msgid ""
|
||||
"Cannot open file for reading.\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "import SVG failed: could not open SVG."
|
||||
msgid "import SVG failed: could not open svg."
|
||||
msgstr ""
|
||||
|
||||
msgid "import SVG failed: could not parse imported SVG data."
|
||||
msgid "import SVG failed: could not parse imported svg data."
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom G-code reports negative z_retracted."
|
||||
|
||||
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
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Orca Slicer\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-11-21 12:24+0800\n"
|
||||
"POT-Creation-Date: 2026-10-30 11:58-0300\n"
|
||||
"PO-Revision-Date: 2026-06-17 15:44-0300\n"
|
||||
"Last-Translator: Alexandre Folle de Menezes\n"
|
||||
"Language-Team: \n"
|
||||
@@ -996,8 +996,7 @@ msgstr ""
|
||||
msgid "Cut to parts"
|
||||
msgstr ""
|
||||
|
||||
#. TRN: Part assignments are the upper/lower cut groups changed by right-clicking parts.
|
||||
msgid "Reset the cutting plane, remove connectors, and clear part assignments."
|
||||
msgid "Reset cutting plane and remove connectors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reset Cut"
|
||||
@@ -3039,7 +3038,7 @@ msgstr ""
|
||||
msgid "Simplify Model"
|
||||
msgstr ""
|
||||
|
||||
msgid "Subdivision mesh (Lost color)"
|
||||
msgid "Subdivision mesh"
|
||||
msgstr ""
|
||||
|
||||
msgid "Center"
|
||||
@@ -5181,9 +5180,6 @@ msgstr ""
|
||||
msgid "Enable the prime tower and either disable purging in the prime tower or disable single extruder multimaterial mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "The Type 1 prime tower takes the prime volume from each filament, on its Multimaterial page."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable the prime tower to use this setting."
|
||||
msgstr ""
|
||||
|
||||
@@ -6623,24 +6619,9 @@ msgstr ""
|
||||
msgid "Resolution"
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom camera source"
|
||||
msgstr ""
|
||||
|
||||
msgid "Camera stream URL"
|
||||
msgstr ""
|
||||
|
||||
msgid "URL of an MJPEG stream or of a web page that shows the camera, for example http://192.168.1.10:8080/?action=stream"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show \"Live Video\" guide page."
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Connect Printer (LAN)"
|
||||
msgstr ""
|
||||
|
||||
@@ -7613,9 +7594,6 @@ msgstr ""
|
||||
msgid "Camera Setting"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switch Camera View"
|
||||
msgstr ""
|
||||
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
@@ -8330,24 +8308,6 @@ msgstr ""
|
||||
msgid "Error loading shaders"
|
||||
msgstr ""
|
||||
|
||||
#. TRN The OpenGL context could not be made current, so nothing can be drawn in the 3D view.
|
||||
msgid "OpenGL could not be activated for the 3D view, so it cannot be shown."
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the name of a graphics card or display adapter as Windows reports it, such as "Microsoft Basic Display Adapter".
|
||||
#, boost-format
|
||||
msgid "The window is on a display driven by \"%1%\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "Make sure the display adapter driving this window's display is enabled and its driver is installed and up to date."
|
||||
msgstr ""
|
||||
|
||||
msgid "If the computer has more than one graphics card, connecting the monitor to another one may help."
|
||||
msgstr ""
|
||||
|
||||
msgid "If the problem remains, close any overlay or screen capture software and try again."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Layers"
|
||||
msgid "Top"
|
||||
msgstr ""
|
||||
@@ -8956,9 +8916,6 @@ msgstr ""
|
||||
msgid "The 3MF file was generated by BambuStudio, loading geometry data only."
|
||||
msgstr ""
|
||||
|
||||
msgid "The 3MF file has no project settings that OrcaSlicer can import."
|
||||
msgstr ""
|
||||
|
||||
msgid "This project was created with an OrcaSlicer 2.3.1-alpha and uses infill rotation template settings that may not work properly with your current infill pattern. This could result in weak support or print quality issues."
|
||||
msgstr ""
|
||||
|
||||
@@ -10705,6 +10662,12 @@ msgstr ""
|
||||
msgid "Same as Global"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spiral vase"
|
||||
msgstr ""
|
||||
|
||||
@@ -10980,6 +10943,9 @@ msgstr ""
|
||||
msgid "Unpin from favorites (%s)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove from favorites"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move left"
|
||||
msgstr ""
|
||||
|
||||
@@ -12012,9 +11978,6 @@ msgstr ""
|
||||
msgid "Wipe tower parameters"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime volume"
|
||||
msgstr ""
|
||||
|
||||
msgid "Multi Filament"
|
||||
msgstr ""
|
||||
|
||||
@@ -12081,12 +12044,6 @@ msgstr ""
|
||||
msgid "Set nonzero volumetric speed coefficients before enabling adaptive volumetric speed."
|
||||
msgstr ""
|
||||
|
||||
msgid "Select wipe tower Type 1 in the printer settings to use this setting."
|
||||
msgstr ""
|
||||
|
||||
msgid "Select wipe tower Type 1 on a printer whose extruder holds more than one nozzle to use this setting."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enable multitool ramming to edit this setting."
|
||||
msgstr ""
|
||||
|
||||
@@ -12513,11 +12470,6 @@ msgctxt "Nozzle flow type"
|
||||
msgid "XHF"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Printer settings extruder tab: the extruder's name, e.g. "Extruder 2", and its nozzle flow tag, e.g. "HF".
|
||||
#, c-format, boost-format
|
||||
msgid "%s: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "No modifications need to be copied."
|
||||
msgstr ""
|
||||
|
||||
@@ -12532,11 +12484,6 @@ msgstr ""
|
||||
msgid "Do you want to modify the following parameters of the %s to that of the %s?"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the extruder (or nozzle variant) the values are copied from, %2% the list of those they are copied to, as the switch names them, e.g. "T2 HF, T3 HF".
|
||||
#, boost-format
|
||||
msgid "Do you want to copy the following parameters of %1% to %2%?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click to reset current value and attach to the global value."
|
||||
msgstr ""
|
||||
|
||||
@@ -12660,15 +12607,6 @@ msgid ""
|
||||
"You can discard the preset values you have modified, or choose to transfer the modified values to the new project"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click the compare button to see the full value."
|
||||
msgstr ""
|
||||
|
||||
msgid "Process settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Compare the full values"
|
||||
msgstr ""
|
||||
|
||||
msgid "Extruder count"
|
||||
msgstr ""
|
||||
|
||||
@@ -13334,6 +13272,9 @@ msgstr ""
|
||||
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
|
||||
msgstr ""
|
||||
|
||||
msgid "This system uses HTTPS certificates from the system Certificate Store or Keychain. To use a custom CA file, import it there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Printer model"
|
||||
msgstr ""
|
||||
|
||||
@@ -13352,9 +13293,6 @@ msgstr ""
|
||||
msgid "Manual Setup"
|
||||
msgstr ""
|
||||
|
||||
msgid "This system uses HTTPS certificates from the system Certificate Store or Keychain. To use a custom CA file, import it there."
|
||||
msgstr ""
|
||||
|
||||
msgid "IP and Access Code Verified! You may close the window"
|
||||
msgstr ""
|
||||
|
||||
@@ -13816,6 +13754,10 @@ msgstr ""
|
||||
msgid "%1% is too close to others, and collisions may be caused."
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid "%1% is printed later than its place in the object list, to avoid a collision."
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid "%1% is too tall, and collisions will be caused."
|
||||
msgstr ""
|
||||
@@ -13842,9 +13784,6 @@ msgstr ""
|
||||
msgid "Prime tower is too close to the clumping detection area. There may be collisions when printing."
|
||||
msgstr ""
|
||||
|
||||
msgid "The extruder printable areas share no common area, so the prime tower cannot be printed.\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime tower is partially outside the printable area, and it cannot be printed.\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -13857,21 +13796,6 @@ msgstr ""
|
||||
msgid "If you still want to print, you can enable the option in Preferences / Control / Slicing / Remove mixed temperature restriction."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects have the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are printed over the same number of raft layers."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are sliced with the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported if all objects have the same variable layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "No extrusions under current settings."
|
||||
msgstr ""
|
||||
|
||||
@@ -13992,6 +13916,21 @@ msgstr ""
|
||||
msgid "A prime tower requires any “support gap” to be a multiple of layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects have the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are printed over the same number of raft layers."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."
|
||||
msgstr ""
|
||||
|
||||
msgid "A prime tower requires that all objects are sliced with the same layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "The prime tower is only supported if all objects have the same variable layer height."
|
||||
msgstr ""
|
||||
|
||||
msgid "One or more object were assigned an extruder that the printer does not have."
|
||||
msgstr ""
|
||||
|
||||
@@ -14086,7 +14025,12 @@ msgstr ""
|
||||
msgid "Adaptive pressure advance is enabled for one or more extruders, but no measurements have been entered in their Adaptive Pressure Advance model."
|
||||
msgstr ""
|
||||
|
||||
msgid "The Adaptive Pressure Advance model for one or more extruders may contain invalid values."
|
||||
#. TRN %1% is the filament number as shown in the filament list, starting from 1; %2% names the invalid line.
|
||||
#. one warning per filament, the notifications stack
|
||||
#, boost-format
|
||||
msgid ""
|
||||
"The Adaptive Pressure Advance model of filament %1% contains invalid values.\n"
|
||||
"%2%"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament shrinkage will not be used because filament shrinkage for the used filaments does not match."
|
||||
@@ -17799,11 +17743,11 @@ msgid "Wipe inward"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe inward distance"
|
||||
@@ -17813,9 +17757,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
@@ -18810,6 +18752,9 @@ msgstr ""
|
||||
msgid "The flush multiplier used in fast purge mode."
|
||||
msgstr ""
|
||||
|
||||
msgid "Prime volume"
|
||||
msgstr ""
|
||||
|
||||
msgid "This is the volume of material to prime the extruder with on the tower."
|
||||
msgstr ""
|
||||
|
||||
@@ -19690,6 +19635,12 @@ msgstr ""
|
||||
msgid "Estimated print time when printed in normal mode (i.e. not in silent mode). Same as normal_print_time."
|
||||
msgstr ""
|
||||
|
||||
msgid "Used filament types"
|
||||
msgstr ""
|
||||
|
||||
msgid "Underscore-separated list of all filament types used during the print."
|
||||
msgstr ""
|
||||
|
||||
msgid "Print time (silent mode)"
|
||||
msgstr ""
|
||||
|
||||
@@ -21423,7 +21374,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
|
||||
@@ -21439,7 +21390,7 @@ msgstr ""
|
||||
msgid "Frequency settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -21473,7 +21424,7 @@ msgstr ""
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
@@ -21664,15 +21615,6 @@ msgstr ""
|
||||
msgid "Smooth Build Plate (Side B)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reading the printer's filament slots..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not read the printer. Close this dialog and try again."
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not connect to the printer. Check that it is on, then reopen this dialog."
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Printer: %s"
|
||||
msgstr ""
|
||||
@@ -21688,14 +21630,6 @@ msgstr ""
|
||||
msgid "Ext - %s"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Creality send dialog. CFS is Creality's multi-filament unit.
|
||||
msgid "The printer reports no CFS connected, so the print will use the external spool."
|
||||
msgstr ""
|
||||
|
||||
#. TRN Creality send dialog, when the printer lists no CFS slots or does not answer
|
||||
msgid "The printer did not report any filament slots, so the print will use the external spool."
|
||||
msgstr ""
|
||||
|
||||
msgid "Unable to perform boolean operation on selected parts"
|
||||
msgstr ""
|
||||
|
||||
@@ -24859,15 +24793,6 @@ msgstr ""
|
||||
msgid "Constraints"
|
||||
msgstr ""
|
||||
|
||||
msgid "No constraints yet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Zoom to selection"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete constraint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Feature tree"
|
||||
msgstr ""
|
||||
|
||||
@@ -24894,6 +24819,9 @@ msgstr ""
|
||||
msgid "Show / hide"
|
||||
msgstr ""
|
||||
|
||||
msgid "Zoom to selection"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check interference — find overlapping bodies"
|
||||
msgstr ""
|
||||
|
||||
@@ -25035,11 +24963,6 @@ msgstr[1] ""
|
||||
msgid "Sketch %d"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is the name of the sketch being edited, as its Feature tree row shows it.
|
||||
#, boost-format
|
||||
msgid "Editing: %1% · N = look normal to the plane · Confirm or Cancel in the toolbar"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Editing: Sketch %d · N = look normal to the plane · Confirm or Cancel in the toolbar"
|
||||
msgstr ""
|
||||
@@ -25573,7 +25496,7 @@ msgstr ""
|
||||
msgid " · Esc goes back to Select"
|
||||
msgstr ""
|
||||
|
||||
msgid " · click a constraint badge to select it"
|
||||
msgid " · click a constraint badge to remove it"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
@@ -25932,9 +25855,10 @@ msgstr ""
|
||||
msgid "Constraints (%d)"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Design tab status line. %1% names the selected sketch constraint, e.g. "Horizontal E0·P0 — E0·P1".
|
||||
#, boost-format
|
||||
msgid "%1% selected — Delete removes it"
|
||||
msgid "No constraints yet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete constraint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Constraint deleted"
|
||||
@@ -29282,6 +29206,49 @@ msgstr ""
|
||||
msgid "Note:"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is a setting's label and %2% the plugin capability name stored in that setting.
|
||||
#, boost-format
|
||||
msgid "• %1%: %2%"
|
||||
msgstr ""
|
||||
|
||||
#. TRN %1% is a preset name, %2% a setting's label and %3% the plugin capability name.
|
||||
#, boost-format
|
||||
msgid "• %1% — %2%: %3%"
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid ""
|
||||
"The following settings refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the preset won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid ""
|
||||
"The following settings refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the project won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Plugin Not Identified"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save anyway"
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid ""
|
||||
"The presets being saved refer to plugins Orca Slicer can't identify on this computer:\n"
|
||||
"\n"
|
||||
"%1%\n"
|
||||
"\n"
|
||||
"If you save anyway, the presets won't keep the plugin references for these settings. On another computer, Orca Slicer won't know which plugins to offer, and the settings may not work there."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Texture Displacement"
|
||||
msgid "Bake"
|
||||
msgstr ""
|
||||
@@ -30324,51 +30291,6 @@ msgstr ""
|
||||
msgid "Plugin file: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot be empty."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot contain a null character."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission may use \"*\" only as the final \"/*\" of a folder tree."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission cannot contain a \"..\" path component."
|
||||
msgstr ""
|
||||
|
||||
msgid "A file system permission must be an absolute path on this computer."
|
||||
msgstr ""
|
||||
|
||||
msgid "A network permission cannot be empty."
|
||||
msgstr ""
|
||||
|
||||
msgid "A network permission cannot contain control characters."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions do not support wildcards. Enter one full http:// or https:// URL."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL with a host name or IP address. Bare domain names are not accepted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Only http:// and https:// URLs are supported for network permissions."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL with a host name or IP address."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions cannot include a username or password. Enter a URL with only a scheme and host."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a valid bracketed IPv6 address."
|
||||
msgstr ""
|
||||
|
||||
msgid "Network permissions do not support wildcards."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a host name or IP address, optionally with a port, or a full http:// or https:// URL."
|
||||
msgstr ""
|
||||
|
||||
msgid "Process plugins"
|
||||
msgstr ""
|
||||
|
||||
@@ -30621,148 +30543,6 @@ msgctxt "Plugin"
|
||||
msgid "Capabilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Permissions"
|
||||
msgstr ""
|
||||
|
||||
msgid "Permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "File system read"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP network"
|
||||
msgstr ""
|
||||
|
||||
msgid "Network sockets"
|
||||
msgstr ""
|
||||
|
||||
#. TRN Operating system processes a plugin may start, not print process presets.
|
||||
msgctxt "Permission category"
|
||||
msgid "Processes"
|
||||
msgstr ""
|
||||
|
||||
msgid "Threading"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission category"
|
||||
msgid "Events"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter an absolute path on this computer. Add /* at the end to include the folder and everything below it; no other wildcard is accepted. A read/write grant can create files through open(), but it does not cover create or delete events such as os.mkdir and os.remove. Without Full access, each such event outside allowed folders needs its own approval, which is never saved. When a plugin runs in the background, these events are denied without asking."
|
||||
msgstr ""
|
||||
|
||||
msgid "C:\\path\\to\\directory\\*"
|
||||
msgstr ""
|
||||
|
||||
msgid "/path/to/directory/*"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a full http:// or https:// URL; only its scheme and host are saved, so the grant covers every port, path, and query on that host. A network socket grant also accepts a bare host name or IP address, with or without a port, and covers every port on that host. Other schemes are not accepted. Grants in either list are checked for HTTP and socket access."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter the exact value recorded by the audit. It may be a Python representation of the command."
|
||||
msgstr ""
|
||||
|
||||
msgid "Exact audited value"
|
||||
msgstr ""
|
||||
|
||||
msgid "Allow this plugin to create threads."
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter a category and event separated by a colon, such as Socket:socket.__new__."
|
||||
msgstr ""
|
||||
|
||||
msgid "Socket:socket.__new__"
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Network access"
|
||||
msgstr ""
|
||||
|
||||
msgid "Execution"
|
||||
msgstr ""
|
||||
|
||||
msgid "Audit events"
|
||||
msgstr ""
|
||||
|
||||
msgid "Files and folders"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission access"
|
||||
msgid "Read"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission access"
|
||||
msgid "Read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "Read permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read and write permissions are unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "File system: Read"
|
||||
msgstr ""
|
||||
|
||||
msgid "File system: Read and write"
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access bypasses permission checks. The plugin can read and write most files you can access; modifying startup or application files can let code run outside these checks. Direct Python access to OrcaSlicer's configuration, secret, certificate and install-state paths stays blocked, but subprocesses are not restricted."
|
||||
msgstr ""
|
||||
|
||||
msgid "Permission list editing is disabled while full access is on."
|
||||
msgstr ""
|
||||
|
||||
msgid "Full access status is unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "No values added."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Apply value for %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Install this plugin to edit its permissions."
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "New value for %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Edit value for %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Add value to %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Permission value"
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Remove %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Run \"%s\""
|
||||
msgstr ""
|
||||
@@ -30844,29 +30624,6 @@ msgstr ""
|
||||
msgid "Refreshing plugins data"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Enable full access for \"%s\"?\n"
|
||||
"\n"
|
||||
"Full access turns off permission auditing for this plugin: its file system, network, process, thread and event permissions are no longer checked. The plugin can read and write most files your user account can access, including startup scripts, SSH keys and a writable OrcaSlicer installation. Modifying startup or application files can let code run outside these checks. Direct Python access to OrcaSlicer's configuration, secret, certificate and install-state paths stays blocked, but subprocesses are not restricted. Full access is not a sandbox.\n"
|
||||
"\n"
|
||||
"Only enable this for a plugin you trust."
|
||||
msgstr ""
|
||||
|
||||
msgid "Invalid permission save request."
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid "Cannot save \"%1%\": %2%"
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed to save permissions."
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid "Permissions saved for \"%s\"."
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed to unload plugin."
|
||||
msgstr ""
|
||||
|
||||
@@ -31518,12 +31275,6 @@ msgstr ""
|
||||
msgid "unknown name"
|
||||
msgstr ""
|
||||
|
||||
msgid "Don't show this tip again"
|
||||
msgstr ""
|
||||
|
||||
msgid "Tip: You can review and change this plugin's saved permissions in the Plugins dialog, on the Permissions tab."
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting permission for the Python audit event \"%s\".\n"
|
||||
@@ -31554,28 +31305,20 @@ msgstr[1] ""
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting to create the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" is requesting to create the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" is requesting to delete the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" is requesting to delete the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"This approval applies only to this operation and is not remembered."
|
||||
"%s"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
@@ -31625,44 +31368,6 @@ msgstr ""
|
||||
msgid "Plugin permissions"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to perform a file operation that requires permission.\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to create the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" tried to create the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format, boost-format
|
||||
msgid ""
|
||||
"Plugin \"%s\" tried to delete the following file:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgid_plural ""
|
||||
"Plugin \"%s\" tried to delete the following files:\n"
|
||||
"%s\n"
|
||||
"\n"
|
||||
"The operation was denied. Use an allowed location or enable Full access for this plugin if you trust it."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Plugin operation denied"
|
||||
msgstr ""
|
||||
|
||||
msgid "The preset stores invalid plugin capability configuration JSON."
|
||||
msgstr ""
|
||||
|
||||
@@ -31982,10 +31687,6 @@ msgstr ""
|
||||
msgid "Cannot keep plugin local: local plugin key already exists: %1%"
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid "Failed to read plugin install state: %1%"
|
||||
msgstr ""
|
||||
|
||||
#, boost-format
|
||||
msgid "Failed to update plugin install state: %1%"
|
||||
msgstr ""
|
||||
@@ -32212,10 +31913,10 @@ msgid ""
|
||||
"Cannot open file for reading.\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "import SVG failed: could not open SVG."
|
||||
msgid "import SVG failed: could not open svg."
|
||||
msgstr ""
|
||||
|
||||
msgid "import SVG failed: could not parse imported SVG data."
|
||||
msgid "import SVG failed: could not parse imported svg data."
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom G-code reports negative z_retracted."
|
||||
|
||||
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
@@ -348,7 +348,6 @@ 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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user