From ce7a163b77456acbb6a003cccaab43661fdca010 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 2 May 2026 18:27:45 +0200 Subject: [PATCH] fix: graceful fallback for missing external MCCs BetterString.mcc and HotkeyString.mcc were hard runtime dependencies of the preferences editor (MCP). If either was absent, MUI_NewObject returned NULL and the NULL was passed as a MUI Child tag, crashing the system. - ostring(): try BetterStringObject first, fall back to StringObject - CreatePrefsGroup(): pre-create HotkeyString+snoop HGroup; fall back to built-in Keyadjust when HotkeyString.mcc is absent - InputClass: guard SimpleButton(Value) against NULL Value on without a VALUE attribute - Refresh README with runtime requirements table and changelog --- README | 86 +------------------------- README.md | 122 +++++++++++++++++++++++++++++++++++++ mcc/classes/InputClass.cpp | 2 +- mcp/CreatePrefsGroup.c | 117 +++++++++++++++++++++++++---------- 4 files changed, 210 insertions(+), 117 deletions(-) create mode 100644 README.md diff --git a/README b/README index 4dbf1f1..9b65a19 100644 --- a/README +++ b/README @@ -1,85 +1 @@ -/*************************************************************************** - - HTMLview.mcc - HTMLview MUI Custom Class - Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2023-2026 Dimitris Panokostas - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - Project home: https://github.com/midwan/htmlview - -***************************************************************************/ - -With full permission of the previous author (Allan Odgaard) HTMLview.mcc -12.6+ is released as free software under the GNU Lesser General Public -License. Please read COPYING for the full terms. - - -BUILDING --------- - -The class and its reference test programs cross-compile from macOS/Linux -using the Docker toolchain images published by sacredbanana: - - # AmigaOS 3 (m68k) - docker run --rm -v "$(pwd):/work" -w /work/mcc \ - sacredbanana/amiga-compiler:m68k-amigaos sh -c "make -f makefile OS=os3" - - # AmigaOS 4 (ppc) - docker run --rm -v "$(pwd):/work" -w /work/mcc \ - sacredbanana/amiga-compiler:ppc-amigaos sh -c "make -f makefile OS=os4" - - # MorphOS (ppc) - docker run --rm -v "$(pwd):/work" -w /work/mcc \ - sacredbanana/amiga-compiler:ppc-morphos sh -c "make -f makefile OS=mos" - -Build products land under mcc/bin_/: - - HTMLview.mcc -- the MUI custom class binary - libhtmlview_nethook.a -- reusable image/content load hook library - SimpleTest, LibLoad_Test -- reference programs exercising the class - - -LINKING THE NET HOOK --------------------- - -Host applications that want the built-in HTTP / HTTPS load hook link -libhtmlview_nethook.a and call HTMLviewNet_InitHook(&hook) at startup -- -see mcc/net_hook/htmlview_nethook.h for the full API. The hook opens -bsdsocket / AmiSSL lazily from the decoder task, so the host does not -need to OpenLibrary any networking library itself. - -Optional runtime knobs (all hook-local, no MUI tags required): - - HTMLviewNet_SetCABundle(path) -- override AmiSSL CA trust store - HTMLviewNet_SetVerifyMode(mode) -- AUTO / NONE / PEER - HTMLviewNet_SetCacheDir(path) -- enable on-disk response cache - HTMLviewNet_SetCacheTTL(seconds) -- fallback TTL for unhinted responses - - -BEHAVIOUR NOTES ---------------- - - * MUIA_HTMLview_Scrollbars is now a no-op: OM_NEW always returns the - bare HTMLview gadget. Callers that want scrollbars wrap the gadget - externally with MUIC_Scrollgroup -- SimpleTest.c shows the pattern. - The legacy auto-wrap path was incompatible with class-introspecting - hosts (e.g. RapaGUI) and the change makes the gadget cooperate with - them. Apps that built directly against ScrollGroupClass are - unaffected; the class is still registered. - - -CONTRIBUTING ------------- - -Issues and pull requests are welcome on GitHub. The roadmap for ongoing -work lives in IMPROVEMENTS.md at the repo root; each phase there is -scoped to be independently mergeable. +This file has been superseded by README.md. diff --git a/README.md b/README.md new file mode 100644 index 0000000..29cf17f --- /dev/null +++ b/README.md @@ -0,0 +1,122 @@ +# HTMLview.mcc + +An HTML rendering MUI custom class for AmigaOS, MorphOS, and AROS. + +Originally written by Allan Odgaard in the late 1990s, now actively maintained +and modernised. HTMLview renders HTML 4 inside any MUI application — email +clients, documentation viewers, help browsers, and more. + +**Current version:** 13.7 · **License:** LGPL 2.1+ · **Repo:** + + + +## Runtime requirements + +| Dependency | Required | Notes | +|---|---|---| +| MUI 3.8+ (`muimaster.library` ≥ 19) | **Yes** | Core UI framework | +| BetterString.mcc | No | Used by the preferences editor for enhanced text input. Falls back to standard MUI `String` gadgets when absent. | +| HotkeyString.mcc | No | Used by the preferences editor for the page-scroll key binding. Falls back to a standard MUI `String` gadget when absent. | +| TextEditor.mcc | No | Required for HTML `