diff -pruN 1.1.0-3/Changelog 1.1.2-1/Changelog
--- 1.1.0-3/Changelog	2022-11-16 08:26:57.000000000 +0000
+++ 1.1.2-1/Changelog	2023-05-18 03:51:00.000000000 +0000
@@ -1,3 +1,115 @@
+camv-rnd 1.1.2 (r746)
+~~~~~~~~~~~~~~~~~~~~~
+	[build]
+		-Add: link librnd's font lib
+		-Del: remove ./configure --fontdir (we have runtime font file path configuration instead)
+		-Fix: do not detect librnd from ./configure as ./configure depends on librnd
+
+	[core]
+		-Fix: do not include 0;0 in layer bounding box, calculate the bbox only from objects
+		-Fix: make up an 1*1mm bbox for empty layers so they are easier to handle on the GUI
+		-Fix: initialize layer selection to -1 on start (no layer selected)
+		-Move: index of selected layer from the gui plugin to camv_design_t because some non-gui actions will need it
+		-Add: pass on and apply transformation matrix to object draw calls
+		-Add: initialize layer xform matrix to ident when the layer is created
+		-Add: draw code passes on layer xform matrix when enabled
+		-Add: RotateLayer() action (sets xform mx and enables it)
+		-Add: TranslateLayer()
+		-Add: ScaleLayer()
+		-Add: ResetLayer() action to reset the transformation matrix of a layer
+		-Add: layer append API option for layer groups: reverse order within the group but make sure the group is appended on top
+		-Add: group-load all layers specified on the command line so that order is preserved (from top to bottom)
+		-Add: sublayer loading API so that multi-layer files can bypass the layer grouping logic and keep their sublayers ordered
+		-Add: runtime configurable debug option for drawing object bounding boxes
+		-Add: accurate bbox calculation for arc objects
+		-Add: implement SaveTo() action (can save the whole design using the io plugin infra)
+
+	[doc]
+		-Add: datasheet
+		-Add: mentions gmail is not supported
+		-Add: link in route-rnd and sch-rnd as part of Ringdove
+		-Add: install resources/ when installing doc
+		-Update: action reference for the new layer transformation actions
+
+	[export_ps]
+		-Change: fill-page is default off for the ps export to get 1:1 prints
+
+	[font]
+		-Change: replace ttf with embedded vector font (pcb-rnd's)
+		-Del: get rid of the freetype dependency and the ttf2bbox extern
+		-Del: font size is not set per text object, remove the associated field
+		-Add: center-align text: x;y coord should refer to bottom center point of the text object's bbox
+
+	[gui]
+		-Add: Save() and SaveAs() actions
+		-Add: layersel debug option (compile time)
+
+	[import_gerb]
+		-Fix: create sublayers using the sublayer API to preserve layer ordering
+
+	[io_tedax]
+		-Fix: argument parsing: used the wrong number-of-arguments limit, leads to segfault if there are too many args
+		-Fix: increase number of args accepted to the theoretical limit the format permits
+		-Fix: preserve order of sublayers while loading a multi-polarity layer (using the sublayer append API)
+		-Add: implement save prio call for standard io hooks
+
+	[menu]
+		-Add: save desgin that calls Save()
+
+	[std_tools]
+		-Add: measurement tool: rotate text to line angle for better alignment
+
+
+camv-rnd 1.1.1 (r662)
+~~~~~~~~~~~~~~~~~~~~~
+	[build]
+		-Fix: Makefile.depgen is generated and shouldn't be part of the repo
+		-Fix: .builtin.pups shouldn't be part of the repo, it's generated
+		-Change: switch over to librnd4 installation
+		-Cleanup: missing #include (exposed by hid.h not always included)
+		-Add: generate the usual set of installation path #defines in config.h
+
+	[core]
+		-Fix: uninit librnd on exit so that cli history is saved and plugins are properly unloaded
+		-Cleanup: unregister plug_io_act.[ch] actions on exit
+		-Add: cli history config in the default conf file
+		-Add: emit RND_EVENT_LOAD_* events
+
+	[dialogs]
+		-Fix: plugin should be in the gui package
+		-Fix: dialgos should be in camv-rnd-lib-gui package
+		-Fix: use the right config node path for setting CLI history size in preferences general tab
+		-Cleanup: rename pcb_dlg_pref_ to camv_dlg_pref_ to keep namespace clean
+
+	[export_png]
+		-Cleanup: png export invocation example in help: replace .pcb to .gbr, that's the typical use case
+		-Fix: set expose context ->design before calling main expose
+		-Fix: don't use global desig when it is available from argument
+		-Del: don't define set_crosshair, use hid_nogui fallback
+
+	[export_ps]
+		-Fix: set expose context ->design before calling main expose
+
+	[export_svg]
+		-Fix: set expose context ->design before calling main expose
+		-Fix: don't use global desig when it is available from argument
+
+	[gui]
+		-Fix: unregister actions on uninit
+		-Fix: unregister layersel events on uninit
+
+	[import_gcode]
+		-Move: gcode-specific plugin settings into a local plugin conf
+
+	[librnd4]
+		-Update: follow librd4 API changes
+
+	[util]
+		-Del: deblist.sh from doc Makefile - not used by anything anymore
+		-Del: local implementation of awk_on_formats - use librnd's
+		-Add: import sign/ from librnd, for release verification
+
+
 camv-rnd 1.1.0 (r558)
 ~~~~~~~~~~~~~~~~~~~~~
 	[build]
diff -pruN 1.1.0-3/INSTALL 1.1.2-1/INSTALL
--- 1.1.0-3/INSTALL	2022-10-03 11:08:55.000000000 +0000
+++ 1.1.2-1/INSTALL	2022-11-16 11:49:41.000000000 +0000
@@ -1,6 +1,6 @@
 Standard installation procedure for camv-rnd.
 
-1. install librnd >=3.2.0 and freetype
+1. install librnd >=4.0.0 and freetype
 
    Either from a source release at http://www.repo.hu/projects/librnd
    or from VCS: svn checkout svn://svn.repo.hu/librnd/trunk
diff -pruN 1.1.0-3/Makefile.conf.in 1.1.2-1/Makefile.conf.in
--- 1.1.0-3/Makefile.conf.in	2022-10-24 17:45:42.000000000 +0000
+++ 1.1.2-1/Makefile.conf.in	2022-11-16 11:49:41.000000000 +0000
@@ -39,7 +39,7 @@ LIBDIR_INSTALLED=@/local/prefix@/lib/cam
 
 # Where librnd is installed, full path to the .mak file to auto-setup
 LIBRND_PREFIX=@/local/camv/librnd_prefix@
-LIBRND_MAK=$(LIBRND_PREFIX)/share/librnd3/librnd.mak
+LIBRND_MAK=$(LIBRND_PREFIX)/share/librnd4/librnd.mak
 include $(LIBRND_MAK)
 
 @]
diff -pruN 1.1.0-3/Release_notes 1.1.2-1/Release_notes
--- 1.1.0-3/Release_notes	2022-11-16 08:26:57.000000000 +0000
+++ 1.1.2-1/Release_notes	2023-05-18 03:51:00.000000000 +0000
@@ -1,11 +1,5 @@
-camv-rnd 1.1.0
+camv-rnd 1.1.2
 ~~~~~~~~~~~~~~
 
-Major feature release with export plugins.
-
-Feature highlight:
-  - ./configure switched over to scconfig
-  - svg, ps, eps export
-  - png export
-  - lpr print using the ps export
-
+This release replaces ttf rendering with librnd font for better zooming
+experience and portability. This is also a bugfix release.
diff -pruN 1.1.0-3/config.h.in 1.1.2-1/config.h.in
--- 1.1.0-3/config.h.in	2022-10-24 06:00:55.000000000 +0000
+++ 1.1.2-1/config.h.in	2022-11-25 06:10:08.000000000 +0000
@@ -9,12 +9,38 @@ print [@
 
 #define RND_APP_PREFIX(x) camv_ ## x
 
-#include <librnd/config.h>
+/****************************************************************************/
+/* Paths */
+@]
 
+switch sys/class
+	case {win32}
+		print [@
+#define CAMV_PREFIX rnd_w32_root
+#define CAMVSHAREDIR rnd_w32_sharedir
+#define CAMVLIBDIR rnd_w32_libdir
+#define BINDIR rnd_w32_bindir
+#define CAMVCONFDIR @/local/confdir@
+@]
+		end;
+	default
+		print [@
+#define CAMV_PREFIX "@/local/prefix@"
+#define CAMVSHAREDIR CAMV_PREFIX "/share/camv-rnd"
+#define CAMVLIBDIR CAMV_PREFIX "/lib/camv-rnd"
+#define BINDIR CAMV_PREFIX "/bin"
+#define CAMVCONFDIR "@/local/confdir@"
 @]
+		end;
+end;
 
 print [@
 
+/* Relative path from bindir to exec_prefix */
+#define BINDIR_TO_EXECPREFIX ".."
+
+#include <librnd/config.h>
+
 /* the dot-dir: where to save user config under ther user's home; it's used
    as ~/DOT_CAMV_RND/ */
 #define DOT_CAMV_RND "@/local/camv/dot_camv_rnd@"
diff -pruN 1.1.0-3/config.sh.in 1.1.2-1/config.sh.in
--- 1.1.0-3/config.sh.in	2022-08-04 12:48:31.000000000 +0000
+++ 1.1.2-1/config.sh.in	2023-03-10 04:09:18.000000000 +0000
@@ -1,6 +1,6 @@
 print [@
 # *** Autogenerated by scconfig *** DO NOT EDIT ***
 # camv-rnd config for shell scripts
-librnd_root=@libs/sul/librnd-3rd/root@
-librnd_libdir=$librnd_root/lib/librnd3
+librnd_root=@/local/camv/librnd_prefix@
+librnd_libdir=$librnd_root/lib/librnd4
 @]
diff -pruN 1.1.0-3/configure 1.1.2-1/configure
--- 1.1.0-3/configure	2022-08-28 04:57:12.000000000 +0000
+++ 1.1.2-1/configure	2022-11-16 11:49:41.000000000 +0000
@@ -4,7 +4,7 @@ if test -z "$LIBRND_PREFIX"
 then
 	for P in /usr/local /opt/librnd /usr $HOME/usr
 	do
-		if test -e "$P/include/librnd/core/config.h"
+		if test -e "$P/include/librnd4/librnd/core/config.h"
 		then
 			LIBRND_PREFIX="$P"
 			break
@@ -30,7 +30,7 @@ doc/INSTALL.librnd.txt and set LIBRND_PR
 		;;
 	/usr/include) ;;
 	/usr/local/include) ;;
-	*) LIBRND_EXTRA_INCLUDE="$LIBRND_PREFIX/include"
+	*) LIBRND_EXTRA_INCLUDE="$LIBRND_PREFIX/include/librnd4"
 esac
 
 
diff -pruN 1.1.0-3/debian/changelog 1.1.2-1/debian/changelog
--- 1.1.0-3/debian/changelog	2023-01-29 19:26:48.000000000 +0000
+++ 1.1.2-1/debian/changelog	2023-05-24 18:17:14.000000000 +0000
@@ -1,3 +1,15 @@
+camv-rnd (1.1.2-1) unstable; urgency=medium
+
+  * new upstream version
+ 
+ -- Bdale Garbee <bdale@gag.com>  Wed, 24 May 2023 12:17:14 -0600
+
+camv-rnd (1.1.1-1) unstable; urgency=medium
+
+  * new upstream version
+ 
+ -- Bdale Garbee <bdale@gag.com>  Wed, 08 Feb 2023 00:48:09 -0700
+
 camv-rnd (1.1.0-3) unstable; urgency=medium
 
   * declare breaks/replaces for file moves from old versions, closes: #1024559
diff -pruN 1.1.0-3/debian/control 1.1.2-1/debian/control
--- 1.1.0-3/debian/control	2023-01-29 19:26:48.000000000 +0000
+++ 1.1.2-1/debian/control	2023-05-24 18:17:14.000000000 +0000
@@ -3,7 +3,7 @@ Section: electronics
 Priority: optional
 Maintainer: Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>
 Uploaders: Bdale Garbee <bdale@gag.com>
-Build-Depends: debhelper (>= 11), librnd3-dev (>= 3.2.0), libgd-dev, libgtkglext1-dev
+Build-Depends: debhelper (>= 11), librnd4-dev (>= 3.2.0), libgd-dev, libgtkglext1-dev
 Standards-Version: 4.6.0
 Homepage: http://repo.hu/projects/camv-rnd
 Vcs-Git: https://salsa.debian.org/electronics-team/camv-rnd.git
@@ -11,7 +11,7 @@ Vcs-Browser: https://salsa.debian.org/el
 
 Package: camv-rnd
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), camv-rnd-import (= ${binary:Version}), camv-rnd-lib-gui (= ${binary:Version}), librnd3-hid-gtk2-gl (>= 3.2.0), librnd3-hid-gtk2-gdk (>= 3.2.0), camv-rnd-export-gd (= ${binary:Version}), camv-rnd-export-vector (= ${binary:Version}), camv-rnd-doc (= ${source:Version})
+Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), camv-rnd-import (= ${binary:Version}), camv-rnd-lib-gui (= ${binary:Version}), librnd4-hid-gtk2-gl (>= 3.2.0), librnd4-hid-gtk2-gdk (>= 3.2.0), camv-rnd-export-gd (= ${binary:Version}), camv-rnd-export-vector (= ${binary:Version}), camv-rnd-doc (= ${source:Version})
 Suggests: pcb-rnd
 Description: Standard installation of camv-rnd
  camv-rnd is a modular EDA (mainly PCB) CAM file format viewer that supports
@@ -20,7 +20,7 @@ Description: Standard installation of ca
 
 Package: camv-rnd-lib-gui
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd3-lib-gui (>= 3.2.0)
+Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd4-lib-gui (>= 3.2.0)
 Description: Support library for building the GUI.
  Provides camv-rnd specific dialog boxes and top window GUI elements.
 
@@ -32,7 +32,7 @@ Description: Export formats: special/ext
 
 Package: camv-rnd-export-gd
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd3-pixmap (>= 3.2.0)
+Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd4-pixmap (>= 3.2.0)
 Description: Export formats that require libgd.
  Bitmap export plugin (png, jpeg, etc.)
 
@@ -47,7 +47,7 @@ Package: camv-rnd-core
 Architecture: any
 Replaces: camv-rnd (<< 1.1.0-1)
 Breaks: camv-rnd (<< 1.1.0-1)
-Depends: ${misc:Depends}, ${shlibs:Depends}, librnd3 (>= 3.2.0), librnd3-lib-gui (>= 3.2.0)
+Depends: ${misc:Depends}, ${shlibs:Depends}, librnd4, librnd4-lib-gui
 Description: camv-rnd executable with the core functionality and boxsym-rnd
  Includes the data model, the most common action commands, the native
  file format. Can be used in headless mode or batch/scripted mode for
@@ -56,7 +56,7 @@ Description: camv-rnd executable with th
 
 Package: camv-rnd-export-vector
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd3 (>= 3.2.0)
+Depends: ${misc:Depends}, ${shlibs:Depends}, camv-rnd-core (= ${binary:Version}), librnd4
 Description: Export formats: vector graphics
  Common vector graphic export formats: ps, eps, svg.
 
diff -pruN 1.1.0-3/doc/Makefile 1.1.2-1/doc/Makefile
--- 1.1.0-3/doc/Makefile	2022-11-16 07:31:41.000000000 +0000
+++ 1.1.2-1/doc/Makefile	2023-05-12 11:09:55.000000000 +0000
@@ -1,6 +1,6 @@
 MENU_RES=../src/menu.lht
-KEYLIST=../util/keylist.sh
-DEBLIST=../util/devhelpers/deblist.sh
+# append this when plugins start to have menu files:  ../src_plugins/*/*-menu.lht
+
 ROOT=..
 LIBARCHDIR=$(LIBRND_LIBARCHDIR)
 
@@ -8,8 +8,9 @@ all: user/keys.html user/keytree.svg use
 	ROOT="" ./Autostyle.sh *.html
 
 include ../Makefile.conf
+include $(LIBRND_MAK)
 
-SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd3/scconfig/sccbox
+SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd4/scconfig/sccbox
 
 user/keytree.svg: $(MENU_RES) $(KEYLIST)
 	$(KEYLIST) --dot user/node_names.txt $(MENU_RES) > user/keytree.dot
@@ -30,18 +31,21 @@ install:
 	cd user && $(MAKE) install
 	cd man && $(MAKE) install
 	cd developer && $(MAKE) install
+	cd resources && $(MAKE) install
 	$(MAKE) install_main HOW="install -f -d"
 
 linstall:
 	cd user && $(MAKE) linstall
 	cd man && $(MAKE) linstall
 	cd developer && $(MAKE) linstall
+	cd resources && $(MAKE) linstall
 	$(MAKE) install_main HOW="install -f -l -d"
 
 uninstall:
 	cd user && $(MAKE) uninstall
 	cd man && $(MAKE) uninstall
 	cd developer && $(MAKE) uninstall
+	cd resources && $(MAKE) uninstall
 	$(MAKE) install_main HOW="install -f -u -d"
 
 clean:
diff -pruN 1.1.0-3/doc/TODO 1.1.2-1/doc/TODO
--- 1.1.0-3/doc/TODO	2022-11-10 16:01:51.000000000 +0000
+++ 1.1.2-1/doc/TODO	2023-05-18 15:00:54.000000000 +0000
@@ -1,21 +1,23 @@
-1.1.0:
-	- multi-package because of exporters: new debian package
-	- librnd 3.2.0:
-		+ merge sch-rnd r4212 [report: Alain]
+0. old reports waiting for ACK =============================================
 
-librnd 4.0.0:
-	- search for "pcb-rnd" and rename to "camv-rnd":
-		- config files
+1. For the upcoming release =========================================================================
+	+ BUG: doc/datasheet.html missing [report: Barjac]
+	+ FEATURE: loading order [report: hzeller]
+		-> files loaded from the CLI or GUI are prepended in the layer stack; this is good, because on GUI load we want most recently loaded file on top
+		-> but loading multiple files at once (CLI lists or GUI multi-selection) end up in reverse order because of this
+		-> there could be loading groups (a CLI list is one group, a GUI multi-selection is one group); the whole group would be loaded with order preserved (from up-down) but the whole group would be prepended
 
-later:
-	- FEATURE: draw.c: [report: cuvoodoo]
-		- camv_draw_layer() should pass on xform to object draw
-		- add matrix transformations so layers can be manipulated
-		- add actions to change transformations per layer
-		- add popup menu+dialog for the transformations per layer
+2. For later releases ===============================================================================
+	- CLEANUP: remove inline, use RND_INLINE - check src_3rd as well (librnd5 critical)
+	- BUG: wrongorder of layers when design saved to tEDAx and reloaded [report: aron]
+	- BUG: apply bug_files/TODO/gui_layersel_move.patch  in src_plugins/gui/ [report: aron]
 	- BUG: {i c p}, tree tab, layer colors, [4], edit at user role: saves a conf array with empty nodes up to [4] [report: Alain]
 	- DOC: pool node on how to create and load a "project file" action script that loads specific file names and assigns colors to the resulting layers [report: Alain]
 	- FEATURE: librnd API extension: load multiple files using the GUI [report: Ade]
+	- FEATURE: librnd API extension: drag&drop reodering of layers [report: hzeller]
+	- FEATURE: flip like in pcb-rnd (same hotkeys: tab et al); when reversing layer order, watch out for sublayers! [report: aron]
+	- FEATURE: draw.c: [report: cuvoodoo]
+		- add popup menu+dialog for the transformations per layer
 	- replace byacc with byaccic:
 		- gcode
 		- gerber
diff -pruN 1.1.0-3/doc/contact.html 1.1.2-1/doc/contact.html
--- 1.1.0-3/doc/contact.html	2021-06-20 15:52:47.000000000 +0000
+++ 1.1.2-1/doc/contact.html	2023-02-18 03:44:58.000000000 +0000
@@ -25,7 +25,8 @@
 <H2> Contact the project </h2>
 <p>
 Please subscribe to the mailing list by sending "subscribe" to
-pcb-rnd <img src="resources/at.png"> list.repo.hu or join IRC for
+pcb-rnd <img src="resources/at.png"> list.repo.hu (<b>does not work with gmail</b>)
+or join IRC for
 <a href="irc.html"> live chat (CET daytime)</a> with other users
 and developers.
 
@@ -34,7 +35,7 @@ and developers.
 Join IRC for <a href="irc.html"> live chat (CET daytime)</a> and
 look for Igor2.
 <p>
-Via email: pcbrnd <img src="resources/at.png"> igor2.repo.hu.
+Via email: pcbrnd <img src="resources/at.png"> igor2.repo.hu (<b>does not work with gmail</b>).
 
 <table border=1 width=600>
 <tr><td>
diff -pruN 1.1.0-3/doc/datasheet.html 1.1.2-1/doc/datasheet.html
--- 1.1.0-3/doc/datasheet.html	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/doc/datasheet.html	2023-02-08 06:21:05.000000000 +0000
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title> camv-rnd - datasheet </title>
+	<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
+<!--AUTO head begin-->
+	<link rel="icon" type="image/png" href="resources/logo16.png">
+<!--AUTO head end-->
+</head>
+<body>
+
+<!--AUTO navbar begin-->
+<table border=0 cellspacing=2 cellpadding=10  bgcolor="#eeeeee" width="100%">
+<tr>
+<th align=center bgcolor="#ccc0cc"> <a href="index.html"> Main </a>
+<th align=center bgcolor="#ccc0cc"> <a href="news.html"> News </a>
+<th align=center bgcolor="#ccc0cc"> <a href="doc.html">Doc</a>&nbsp;&amp;&nbsp;<a href="faq.html">FAQ</a>&nbsp;&amp;&nbsp;<a href="http://repo.hu/projects/pcb-rnd-aux/pool">pool</a>
+<th align=center bgcolor="#ccc0cc"> <a href="support.html"> Support </a>
+<td align=right width="60%"> <font size="+2"><i>camv-rnd</i></font> <img src="resources/logo32.png" alt="[camv-rnd logo]">
+</table>
+<!--AUTO navbar end-->
+
+<h1> camv-rnd - datasheet </h1>
+
+<table border=1 cellspacing=0 cellpadding=5>
+<tr>
+	<td bgcolor="#ccccff"> rendering characteristics
+	<td bgcolor="#ddddff"> multiple layers
+                         <br> different file format per layer possible
+                         <br> per layer color
+                         <br> flexible layer ordering
+                         <br> translucent layers (when OpenGL rendering is used)
+<tr>
+	<td bgcolor="#ccccff"> GUI features
+	<td bgcolor="#ddddff"> measure tool
+
+<tr>
+	<td bgcolor="#ccccff"> File formats:<br>Import images
+	<td bgcolor="#ddddff">
+		<!-- begin fmt import misc -->
+ excellon drill files <br>  g-code CNC program <br>  gerber layer image <br>  tEDAx camv-rnd layer
+		<!-- end fmt import misc -->
+
+<tr>
+	<td bgcolor="#ccccff"> File formats:<br>Export misc
+	<td bgcolor="#ddddff">
+		<!-- begin fmt export misc -->
+ printer (using ps) <br>  png <br>  ps <br>  eps <br>  svg <br>  tEDAx camv-rnd layer
+		<!-- end fmt export misc -->
+
+		<!-- begin fmt export image -->
+
+		<!-- end fmt export image -->
+
+<tr>
+	<td bgcolor="#ccccff"> UI options
+	<td bgcolor="#ddddff"> gtk2, gtk4, lesstif (motif), batch (automated processing)
+                         <br> configurable menus, keyboard and mouse actions
+<tr>
+	<td bgcolor="#ccccff"> scripting
+	<td bgcolor="#ddddff"> embedded scripting using fungw (awk, python, lua, tcl, ruby, perl, javascript, lisp, shell, pascal, BASIC)
+
+<tr>
+	<td bgcolor="#ccccff"> misc
+	<td bgcolor="#ddddff"> flexible configuration system
+	                       <br>support for small screen (800x600)
+	                       <br>strong support for automated processing
+                         <br>modularity (most code implemented in plugins)
+                         <br>slim code, reduced external dependency, portability
+</table>
+
+</body>
+</html>
diff -pruN 1.1.0-3/doc/datasheet.sh 1.1.2-1/doc/datasheet.sh
--- 1.1.0-3/doc/datasheet.sh	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/doc/datasheet.sh	2023-02-08 06:21:05.000000000 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+ROOT=..
+
+if test -z "$LIBRND_LIBDIR"
+then
+	# when not run from the Makefile
+	LIBRND_LIBDIR=`cd developer/packaging && make -f librnd_root.mk libdir`
+fi
+
+proot=$ROOT/src_plugins
+. $LIBRND_LIBDIR/devhelpers/awk_on_formats.sh
+
+awk_on_formats  '
+($1 == "<!--") && ($2 == "begin") && ($3 == "fmt") { ignore = 1; print $0; next }
+($1 == "<!--") && ($2 == "end") && ($3 == "fmt") {
+	print FMTS[$4, $5]
+	ignore = 0;
+	print $0
+	next
+}
+
+(!ignore) { print $0 }
+' < datasheet.html > datasheet2.html && mv datasheet2.html datasheet.html
diff -pruN 1.1.0-3/doc/developer/Makefile 1.1.2-1/doc/developer/Makefile
--- 1.1.0-3/doc/developer/Makefile	2021-11-10 10:21:43.000000000 +0000
+++ 1.1.2-1/doc/developer/Makefile	2022-11-16 11:49:41.000000000 +0000
@@ -1,6 +1,6 @@
 include ../../Makefile.conf
 LIBARCHDIR=$(LIBRND_LIBARCHDIR)
-SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd3/scconfig/sccbox
+SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd4/scconfig/sccbox
 
 all:
 
diff -pruN 1.1.0-3/doc/developer/packaging/Changelog 1.1.2-1/doc/developer/packaging/Changelog
--- 1.1.0-3/doc/developer/packaging/Changelog	2022-11-04 03:36:00.000000000 +0000
+++ 1.1.2-1/doc/developer/packaging/Changelog	2023-05-18 03:01:30.000000000 +0000
@@ -1,10 +1,41 @@
 How to get a release candidate tarball in /tmp:
 
-  ver=0.9.3
+  ver=1.1.2
   cd /tmp
   svn export svn://repo.hu/camv-rnd/trunk camv-rnd-$ver
   tar -cf vamv-rnd-$ver.tar camv-rnd-$ver
 
+Packaging changes between 1.1.2 and 1.1.1
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A. changes that probably don't need action
+
+1. a lot more files are installed in the docdir: the whole resources/
+   dir, making installed doc more self-contained (mostly due to logo graphics)
+
+B. changes that probably DO need action
+
+1. we no longer depend on freetype, please remove libfreetype dependency and
+   anything you did about ttf or fontdir.
+
+
+Packaging changes between 1.1.1 and 1.1.0
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A. changes that probably don't need action
+
+(none)
+
+B. changes that probably DO need action
+
+1. Dependency: minimum required librnd version is 4.0.0 now. This affects
+   both the main librnd4 dependency and when pcb-rnd plugin packages depend
+   on librnd4 plugin packages, e.g. camv-rnd-export-gd used to depend on
+   librnd3-pixmap but now depends on librnd4-pixmap. Doing a
+   "s/librnd3/librnd4/g" in the packaging script should be safe.
+
+
+
 Packaging changes between 0.9.3 and 0.9.2
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 No change in packaging.
diff -pruN 1.1.0-3/doc/developer/packaging/extra.digest 1.1.2-1/doc/developer/packaging/extra.digest
--- 1.1.0-3/doc/developer/packaging/extra.digest	2022-11-16 07:26:57.000000000 +0000
+++ 1.1.2-1/doc/developer/packaging/extra.digest	2022-11-16 11:49:41.000000000 +0000
@@ -1,4 +1,4 @@
 @appendfiles camv-rnd-core $PREFIX/bin/camv-rnd $PREFIX/share/man/man1/camv-rnd.1
 @appendfiles camv-rnd-core $C/conf_core.lht $C/menu.lht
-@appenddeps camv-rnd-core librnd3
+@appenddeps camv-rnd-core librnd4
 @appendfiles camv-rnd-doc $PREFIX/share/doc/camv-rnd
diff -pruN 1.1.0-3/doc/developer/packaging/librnd_root.mk 1.1.2-1/doc/developer/packaging/librnd_root.mk
--- 1.1.0-3/doc/developer/packaging/librnd_root.mk	2022-11-04 03:36:00.000000000 +0000
+++ 1.1.2-1/doc/developer/packaging/librnd_root.mk	2022-11-21 15:08:57.000000000 +0000
@@ -1,4 +1,8 @@
 include ../../../Makefile.conf
+include $(LIBRND_MAK)
 
 all:
 	@echo $(LIBRND_PREFIX)
+
+libdir:
+	@echo $(LIBRND_LIBDIR)
diff -pruN 1.1.0-3/doc/developer/packaging/packages.html 1.1.2-1/doc/developer/packaging/packages.html
--- 1.1.0-3/doc/developer/packaging/packages.html	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/doc/developer/packaging/packages.html	2023-01-11 03:43:37.000000000 +0000
@@ -0,0 +1,67 @@
+
+<html>
+<body>
+
+<h3> Librnd minimum version: 4.0.0</h3>
+<h3> Package summary and dependencies </h3>
+<p>
+<table border=1>
+<tr><th> package <th> depends on (packages) <th> consists of (plugins)
+<tr><th>camv-rnd-import<td> camv-rnd-core<td> import_excellon import_gcode import_gerb
+<tr><th>camv-rnd-doc<td><td>&nbsp;
+<tr><th>camv-rnd-core<td> librnd4<td>(builtin:  io_tedax std_tools)
+<tr><th>camv-rnd-export-vector<td> camv-rnd-core librnd4<td> export_ps export_svg
+<tr><th>camv-rnd-export-gd<td> camv-rnd-core librnd4-pixmap<td> export_png
+<tr><th>camv-rnd-export-extra<td> camv-rnd-core camv-rnd-export-vector<td> export_lpr
+<tr><th>camv-rnd-lib-gui<td> camv-rnd-core librnd4-lib-gui<td> dialogs gui
+<tr><th>camv-rnd<td>camv-rnd-core camv-rnd-import camv-rnd-lib-gui librnd4-hid-gtk2-gdk camv-rnd-export-gd camv-rnd-export-vector camv-rnd-doc<td>&lt;metapackage&gt;
+</table>
+<h3> Package description and files </h3>
+<table border=1>
+<tr><th> package <th> files <th> short <th> long
+<tr><th>camv-rnd-import<td> $P/import_excellon.pup $P/import_excellon.so $P/import_gcode.pup $P/import_gcode.so $P/import_gerb.pup $P/import_gerb.so <i>$C/import_gcode.conf</i><td>	Standard import file format support (PCB).<td>	 	Plugins for loading gerber layers, excellon drill files and g-code files.  
+<tr><th>camv-rnd-doc<td>/usr/share/doc/* <i></i><td>	Documentation for camv-rnd<td>	 	User manual and developer doc (html).  
+<tr><th>camv-rnd-core<td> $PREFIX/bin/camv-rnd $PREFIX/share/man/man1/camv-rnd.1 $C/conf_core.lht $C/menu.lht <i></i><td>	camv-rnd executable with the core functionality and boxsym-rnd<td> 	Includes the data model, the most common action commands, the native file 	format. Can be used in headless mode or batch/scripted mode for automated 	processing or with GUI (if camv-rnd-lib-gui and librnd GUI HIDs are installed).  
+<tr><th>camv-rnd-export-vector<td> $P/export_ps.pup $P/export_ps.so $P/export_svg.pup $P/export_svg.so <i></i><td>	Export formats: vector graphics<td> 	Common vector graphic export formats: ps, eps, svg.  
+<tr><th>camv-rnd-export-gd<td> $P/export_png.pup $P/export_png.so <i></i><td>	Export formats that require libgd.<td> 	Bitmap export plugin (png, jpeg, etc.)  
+<tr><th>camv-rnd-export-extra<td> $P/export_lpr.pup $P/export_lpr.so <i></i><td>	Export formats: special/extra<td> 	Less commonly used export formats: direct printing with lpr.  
+<tr><th>camv-rnd-lib-gui<td> $P/dialogs.pup $P/dialogs.so $P/gui.pup $P/gui.so <i></i><td>	Support library for building the GUI.<td> 	Provides camv-rnd specific dialog boxes and top window GUI elements. 
+<tr><th>camv-rnd<td> <i></i><td>	Standard installation of camv-rnd<td> 	Install camv-rnd core and the most commonly used plugins.  
+</table>
+<h3> External dependencies of Ppackages </h3>
+<p>Note: package names differ from distro to distro, this table only approximates the packahge names external dependencies have on your target.
+<p>Note: every package that has .so files in it depends on librnd.
+<p>
+<table border=1>
+<tr><th> package <th> extneral dependencies
+<tr><th>camv-rnd-import<td>
+<tr><th>camv-rnd-doc<td>
+<tr><th>camv-rnd-core<td>
+<tr><th>camv-rnd-export-vector<td>
+<tr><th>camv-rnd-export-gd<td>librnd-pixmap
+<tr><th>camv-rnd-export-extra<td>
+<tr><th>camv-rnd-lib-gui<td>
+<tr><th>camv-rnd<td>
+</table>
+<p>File prefixes:<ul>
+	<li> $P: plugin install dir (e.g. /usr/lib/camv-rnd/)
+	<li> $C: conf dir (e.g. /etc/camv-rnd/)
+	<li> $PREFIX: installation prefix (e.g. /usr)
+</ul>
+<h3> ./configure arguments </h3>
+--all=disable
+--buildin-io_tedax
+--buildin-std_tools
+--plugin-export_ps
+--plugin-import_gcode
+--plugin-import_excellon
+--plugin-export_lpr
+--plugin-import_gerb
+--plugin-export_svg
+--plugin-gui
+--plugin-dialogs
+--plugin-export_png
+
+</body>
+</html>
+
diff -pruN 1.1.0-3/doc/developer/packaging/packages.sh 1.1.2-1/doc/developer/packaging/packages.sh
--- 1.1.0-3/doc/developer/packaging/packages.sh	2022-11-16 07:44:59.000000000 +0000
+++ 1.1.2-1/doc/developer/packaging/packages.sh	2022-12-12 14:03:32.000000000 +0000
@@ -32,6 +32,7 @@ RNDVER=`librnd_min_ver`
 if test -f $ROOT/Makefile.conf
 then
 	LIBRND_ROOT=`make -f librnd_root.mk`
+	LIBRND_LIBDIR=`make -f librnd_root.mk libdir`
 fi
 
 if test -z "$LIBRND_ROOT"
@@ -42,6 +43,7 @@ then
 	else
 		LIBRND_ROOT=/usr
 	fi
+	LIBRND_LIBDIR=$LIBRND_ROOT/lib/librnd${RNDV}
 fi
 
 if test -f $LIBRND_ROOT/share/librnd${RNDV}/librnd_packages.sh
@@ -56,7 +58,7 @@ fi
 
 echo "$RNDV" > auto/ver_librnd_major
 
-. $ROOT/util/devhelpers/awk_on_formats.sh
+. $LIBRND_LIBDIR/devhelpers/awk_on_formats.sh
 
 awk_on_formats  '
 { print $0 }
@@ -246,7 +248,7 @@ print in_librnd, $1 > "L1"
 		PUPEXTDEPS[pkg] = PUPEXTDEPS[pkg] " " tmp
 	}
 
-	($1 ~ "[.]tmpasm$") && ($3 == "/local/pcb/mod/CONFFILE") {
+	($1 ~ "[.]tmpasm$") && ($3 == "/local/rnd/mod/CONFFILE") {
 		fn=$4
 		sub("[{][ \t]*", "", fn)
 		sub("[ \t]*[}]", "", fn)
diff -pruN 1.1.0-3/doc/index.html 1.1.2-1/doc/index.html
--- 1.1.0-3/doc/index.html	2021-07-09 09:57:03.000000000 +0000
+++ 1.1.2-1/doc/index.html	2023-05-03 03:06:47.000000000 +0000
@@ -31,6 +31,7 @@
 		<td bgcolor="#ddddff">
 		    <b>is a <a href="license.html"> free/open source</a>, small, flexible viewer for PCB-related CAM file formats </b>
 		<p>supports gerber, excellon, g-code
+		<p>imports/exports <a href="datasheet.html"> multiple file formats </a>
 		<p>is part of the <a href="http://repo.hu/projects/ringdove">Ringdove</a> EDA suite
 		<p>is part of the <a href="http://repo.hu/projects/coraleda">coralEDA</a> ecosystem.
 
@@ -77,7 +78,9 @@
 		<!--schematics editor, -->
 		<p> <img src="resources/ringdove2.svg" width="150px">
 		<p> <b>RiNgDove is an EDA suite that includes:</b>
+		<p> a schematics editor: <a href="http://www.repo.hu/projects/sch-rnd"> sch-rnd </a>
 		<p> a PCB editor: <a href="http://www.repo.hu/projects/pcb-rnd"> pcb-rnd </a>
+		<p> a PCB autorouter: <a href="http://www.repo.hu/projects/route-rnd"> route-rnd </a>
 		<p> a CAM viewer: <a href="http://www.repo.hu/projects/camv-rnd"> camv-rnd </a>
 		<p> a software lib: <a href="http://www.repo.hu/projects/librnd"> librnd </a>
 		<p> or all in one: <a href="http://www.repo.hu/projects/ringdove"> suite </a>
diff -pruN 1.1.0-3/doc/man/Makefile 1.1.2-1/doc/man/Makefile
--- 1.1.0-3/doc/man/Makefile	2022-11-16 07:40:08.000000000 +0000
+++ 1.1.2-1/doc/man/Makefile	2022-11-16 11:49:41.000000000 +0000
@@ -5,7 +5,7 @@ ROOT=../..
 include $(ROOT)/Makefile.conf
 MAN1DIR=$(install_root)$(DESTDIR)$(PREFIX)/share/man/man1
 LIBARCHDIR=$(LIBRND_LIBARCHDIR)
-SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd3/scconfig/sccbox
+SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd4/scconfig/sccbox
 
 IN=camv-rnd.1.mml
 OUT_HTML = camv-rnd.1.html
diff -pruN 1.1.0-3/doc/news.html 1.1.2-1/doc/news.html
--- 1.1.0-3/doc/news.html	2022-06-24 05:12:27.000000000 +0000
+++ 1.1.2-1/doc/news.html	2023-02-08 03:26:30.000000000 +0000
@@ -29,6 +29,22 @@
 
 	<tr>
 		<th align=right valign=top bgcolor="#ccccff" width="20%">
+			2023-02-08
+			<br>
+			release: 1.1.0
+		<td bgcolor="#ddddff">
+			Release 1.1.1 <a href="releases"> available:</a> librnd API upgrades; requires librnd 4.0.0
+
+	<tr>
+		<th align=right valign=top bgcolor="#ccccff" width="20%">
+			2022-11-16
+			<br>
+			release: 1.1.0
+		<td bgcolor="#ddddff">
+			Release 1.1.0 <a href="releases"> available:</a> major feature release (scconfig, export plugins)
+
+	<tr>
+		<th align=right valign=top bgcolor="#ccccff" width="20%">
 			2022-06-24
 			<br>
 			release: 1.0.3
diff -pruN 1.1.0-3/doc/resources/Makefile 1.1.2-1/doc/resources/Makefile
--- 1.1.0-3/doc/resources/Makefile	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/doc/resources/Makefile	2023-05-12 16:23:04.000000000 +0000
@@ -0,0 +1,24 @@
+ROOT=../..
+RESDIR=$(DOCDIR)/resources
+
+all:
+
+install_all:
+	$(SCCBOX) mkdir -p $(RESDIR)
+	$(SCCBOX) $(HOW) -d *.png *.svg $(RESDIR)
+
+install:
+	$(MAKE) install_all HOW="install -f -d"
+
+linstall:
+	$(MAKE) install_all HOW="install -f -l -d"
+
+uninstall:
+	$(MAKE) install_all HOW="install -u"
+
+clean:
+
+distclean:
+
+
+include $(ROOT)/Makefile.conf
diff -pruN 1.1.0-3/doc/user/09_appendix/action_reference.html 1.1.2-1/doc/user/09_appendix/action_reference.html
--- 1.1.0-3/doc/user/09_appendix/action_reference.html	2022-11-10 15:54:36.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/action_reference.html	2023-03-09 15:37:04.000000000 +0000
@@ -13,7 +13,7 @@
 <table border=1>
 <caption>
  <b>
-This is camv-rnd 1.1.0-dev () an electronics related CAM file viewer from the Ringdove EDA suite compiled using librnd version 3.2.2-dev running with librnd version 3.2.2-dev ,  Revision: 542
+, 
 </b>
 <th> Action <th> Description <th> Syntax <th> Plugin
 <tr><td>About</td><td>Present the about box</td><td>About()</td><td>camv_dialogs</td>
@@ -68,6 +68,7 @@ This is camv-rnd 1.1.0-dev () an electro
 <tr><td><a href="action_details.html#loadscript">LoadScript</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Load a fungw script</td><td>LoadScript(id, filename, [language])</td><td>script plugin</td>
 <tr><td>Log</td><td>Manages the central, in-memory log.</td><td>Log(clear, [fromID, [toID])<br>Log(export, [filename, [text|lihata])</td><td></td>
 <tr><td>LogDialog</td><td>Open the log dialog.</td><td>LogDialog()</td><td>lib_hid_common plugin</td>
+<tr><td>LogGui</td><td>Log() action GUI section</td><td>LogGui(export, [filename, [text|lihata])</td><td></td>
 <tr><td>lua</td><td>Execute a script one-liner using a specific language</td><td>Oneliner(lang, script)</td><td>script plugin</td>
 <tr><td>ManagePlugins</td><td>Manage plugins dialog.</td><td>ManagePlugins()</td><td>lib_hid_common plugin</td>
 <tr><td>mawk</td><td>Execute a script one-liner using a specific language</td><td>Oneliner(lang, script)</td><td>script plugin</td>
@@ -108,6 +109,7 @@ This is camv-rnd 1.1.0-dev () an electro
 <tr><td>Redraw</td><td>Redraw the entire screen</td><td>Redraw()</td><td></td>
 <tr><td><a href="action_details.html#reloadscript">ReloadScript</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Reload a fungw script</td><td>ReloadScript(id)</td><td>script plugin</td>
 <tr><td>RemoveMenu</td><td>Recursively removes a new menu, popup (only path specified) or submenu. </td><td>RemoveMenu(path, cookie)</td><td></td>
+<tr><td>ResetLayer</td><td>Reset the transformation matrix of the layer.</td><td>ResetLayer(@|idx, sx[, sy])</td><td></td>
 <tr><td>rnd_acos</td><td></td><td></td><td>script plugin</td>
 <tr><td>rnd_asin</td><td></td><td></td><td>script plugin</td>
 <tr><td>rnd_atan2</td><td></td><td></td><td>script plugin</td>
@@ -122,7 +124,9 @@ This is camv-rnd 1.1.0-dev () an electro
 <tr><td>rnd_toolbar_init</td><td>For ringdove apps: initialize the toolbar.</td><td></td><td>lib_hid_common plugin</td>
 <tr><td>rnd_toolbar_uninit</td><td>For ringdove apps: uninitialize the toolbar.</td><td></td><td>lib_hid_common plugin</td>
 <tr><td>rnd_zoom</td><td>Change zoom level (relative, absolute, window, ...)</td><td>Zoom()<br>Zoom([+|-|=]factor)<br>Zoom(x1, y1, x2, y2)<br>Zoom(?)<br>Zoom(get)</td><td>lib_hid_common plugin</td>
+<tr><td>RotateLayer</td><td>Rotates the layer addressed (@ for current) by deg degrees CCW. (The transformation is added to the current transformation matrix of the layer.)</td><td>RotateLayer(@|idx, [deg])</td><td></td>
 <tr><td>ruby</td><td>Execute a script one-liner using a specific language</td><td>Oneliner(lang, script)</td><td>script plugin</td>
+<tr><td>ScaleLayer</td><td>Scales the layer addressed (@ for current) by the factor of sx and sy. If only sx is specified, it is used as sy as well. (The transformation is added to the current transformation matrix of the layer.)</td><td>ScaleLayer(@|idx, [sx, [sy]])</td><td></td>
 <tr><td><a href="action_details.html#scriptcookie">ScriptCookie</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Return a cookie specific to the current script instance during script initialization</td><td>ScriptCookie()</td><td>script plugin</td>
 <tr><td><a href="action_details.html#scriptpersistency">ScriptPersistency</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Read or remove script persistency data savd on preunload</td><td>ScriptPersistency(read|remove)</td><td>script plugin</td>
 <tr><td><a href="action_details.html#scroll">Scroll</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Scroll the viewport.</td><td>Scroll(up|down|left|right, [pixels])</td><td>lib_hid_common plugin</td>
@@ -134,6 +138,7 @@ This is camv-rnd 1.1.0-dev () an electro
 <tr><td>System</td><td>Run shell command</td><td>System(shell_cmd)</td><td></td>
 <tr><td>tcl</td><td>Execute a script one-liner using a specific language</td><td>Oneliner(lang, script)</td><td>script plugin</td>
 <tr><td><a href="action_details.html#tool">Tool</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Change or use the tool mode.</td><td>Tool(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)<br>Tool(Poly|Rectangle|Remove|Rotate|Text|Thermal|Via)<br>Tool(Press|Release|Cancel|Stroke)<br>Tool(Save|Restore)</td><td></td>
+<tr><td>TranslateLayer</td><td>Translates (moves) the layer addressed (@ for current) by dx and dy. (The transformation is added to the current transformation matrix of the layer.)</td><td>TranslateLayer(@|idx, dx, dy)</td><td></td>
 <tr><td><a href="action_details.html#unloadscript">UnloadScript</a> <sup><a href="#ringdove">(RND)</a></sup></td><td>Unload a fungw script</td><td>UnloadScript(id)</td><td>script plugin</td>
 <tr><td>Zoom</td><td>GUI zoom</td><td>Zoom()<br>Zoom([+|-|=]factor)<br>Zoom(x1, y1, x2, y2)<br>Zoom(?)<br>Zoom(get)<br>Zoom(auto_first)</td><td></td>
 </table>
diff -pruN 1.1.0-3/doc/user/09_appendix/src/Makefile 1.1.2-1/doc/user/09_appendix/src/Makefile
--- 1.1.0-3/doc/user/09_appendix/src/Makefile	2022-11-10 15:53:42.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/src/Makefile	2022-11-22 08:10:47.000000000 +0000
@@ -1,23 +1,26 @@
 CAMVRND = ../../../../src/camv-rnd
 CLEANFILES=../action_details.html ../action_reference.html ../formats.html ../dialogs.html
 
+include ../../../../Makefile.conf
+include $(LIBRND_MAK)
+
 all: $(CLEANFILES)
 
 ../action_details.html: ./action_compiler.sh ../action_src/*.html librnd_acts
-	./action_compiler.sh ../action_src/*.html LIBRND librnd_acts/*.html > ../action_details.html
+	LIBRND_LIBDIR=$(LIBRND_LIBDIR) ./action_compiler.sh ../action_src/*.html LIBRND librnd_acts/*.html > ../action_details.html
 
 ../action_reference.html : ./dump_actions_to_html.sh $(CAMVRND) ../action_details.html librnd_acts
-	./dump_actions_to_html.sh > ../action_reference.html
+	LIBRND_LIBDIR=$(LIBRND_LIBDIR) ./dump_actions_to_html.sh > ../action_reference.html
 
 librnd_acts: FORCE
 	svn checkout svn://svn.repo.hu/librnd/trunk/doc/action librnd_acts
 
+../formats.html: ../../../../src_plugins/io_*/*.pup ../../../../src_plugins/import_*/*.pup ../../../../src_plugins/export_*/*.pup
+	APP="camv-rnd" PLUGINS="../../../../src_plugins" $(LIBRND_LIBDIR)/gen_formats.sh > ../formats.html
 
-../formats.html: gen_formats.sh ../../../../src_plugins/io_*/*.pup ../../../../src_plugins/import_*/*.pup ../../../../src_plugins/export_*/*.pup
-	./gen_formats.sh > ../formats.html
 
 ../dialogs.html: $(CAMVRND) ./gen_dialogs.sh ./dialog_extra.awk
-	./gen_dialogs.sh > ../dialogs.html
+	LIBRND_LIBDIR="$(LIBRND_LIBDIR)" ./gen_dialogs.sh > ../dialogs.html
 
 FORCE:
 
diff -pruN 1.1.0-3/doc/user/09_appendix/src/action_compiler.sh 1.1.2-1/doc/user/09_appendix/src/action_compiler.sh
--- 1.1.0-3/doc/user/09_appendix/src/action_compiler.sh	2022-11-10 15:53:42.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/src/action_compiler.sh	2022-11-22 07:43:39.000000000 +0000
@@ -1,180 +1,10 @@
 #!/bin/sh
 
-SEP="<@@@@>"
-SEPH="<@@H@@>"
+APP=camv-rnd
 
-compile()
-{
-	awk -v "SEP=$SEP" -v "SEPH=$SEPH" '
-	BEGIN {
-		q="\""
-		SEP="^" SEP
-		SEPH="^" SEPH
-	}
-
-	function strip(s) {
-		sub("^[ \t]*", "", s)
-		sub("[ \t]*$", "", s)
-		return s
-	}
-
-	function read_tag(tag,    tmp1,tmp2) {
-		getline tmp1
-		getline tmp2
-		if (tmp2 ~ "</" tag)
-			return tmp1
-		print "Error: expected closing tag " tag " in line " NR " of " current > "/dev/stderr"
-		exit(1)
-	}
-
-	function notav(s) {
-		if (s == "") return "n/a"
-		return s
-	}
-
-	function end_act()
-	{
-		if (current != "")
-			print "</dd></dl>"
-		currrent = ""
-	}
-
-	($0 ~ SEP) {
-		end_act()
-		action = ""
-		$1=""
-		current=tolower(strip($0))
-		sub("^.*/", "", current)
-		sub(".html$", "", current)
-
-		if (current in ANAME)
-			aname = ANAME[current]
-		else
-			aname = current
-
-		print ""
-		print "<h2 id=" q current q ">" aname "</h2>"
-		print "<dl><dd>"
-		print "<p>"
-		print "<table border=0 cellspacing=10 class=actsum>"
-		print "<tr><th align=right class=actsum>Syntax summary:<td align=left class=actsum>" notav(SYNTAX[current])
-		print "<tr><th align=right class=actsum>Help text:<td align=left class=actsum>"      notav(HELP[current])
-		print "<tr><th align=right class=actsum>Registered&nbsp;by:<td align=left class=actsum>"  notav(COOKIE[current])
-		print "</table>"
-		print "<p>"
-		next
-	}
-
-
-	($0 ~ SEPH) {
-		end_act()
-		action = ""
-		$1=""
-		print "<h1>" $0 "</h1>"
-		aname=""
-		next
-	}
-
-	(current == "") && (/^A/) {
-		# reading the action list: new action
-		action=strip($0)
-		sub("^A", "", action)
-		aname= action
-		action = tolower(action)
-# avoid saving duplicates at the main action node
-		if (action in SEEN)
-			action = action "_dup"
-		else
-			ANAME[action] = aname
-		SEEN[action] = 1
-		next
-	}
-
-
-	(current == "") && (/^D/) {
-		# reading the action list: help line
-		tmp = $0
-		sub("^D", "", tmp)
-		HELP[action]=HELP[action] "\n" tmp
-		next
-	}
-
-	(current == "") && (/^S/) {
-		# reading the action list: syntax line
-		tmp = $0
-		sub("^S", "", tmp)
-		SYNTAX[action]=SYNTAX[action] "\n" tmp
-		next
-	}
-
-	(current == "") && (/^C/) {
-		# reading the action list: cookie line
-		tmp = $0
-		sub("^C", "", tmp)
-		COOKIE[action]=COOKIE[action] "\n" tmp
-		next
-	}
-
-	/^<arg>/ {
-		arg = read_tag("arg")
-		print "<i>" arg "</i>"
-		next
-	}
-
-	/^<example>/ {
-		ex = read_tag("example")
-		print "Example:", ex, "<br>"
-		next
-	}
-
-	/^<act>/ {
-		act = tolower(read_tag("act"))
-		print "<a href=" q "#" act q ">" act "</a>"
-		next
-	}
-
-	{
-		print
-	}
-
-	END {
-		end_act()
-	}
-	'
+dump_actions() {
+	cd ../../../../src
+	./camv-rnd --dump-actions 2>/dev/null
 }
 
-echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!-- AUTOGENERATED FILE, DO NOT EDIT ; generator is action_compiler.sh (run make) -->
-<html>
-<head>
-	<title> camv-rnd user manual - action details </title>
-	<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
-	<link rel="stylesheet" type="text/css" href=" ../default.css">
-</head>
-<body>
-<h1> camv-rnd actions (details) </h1>
-'
-
-(
-	(
-		cd ../../../../src
-		./camv-rnd --dump-actions 2>/dev/null
-	)
-	for fn in "$@"
-	do
-		if test "$fn" = "LIBRND"
-		then
-			echo ""
-			echo "$SEPH librnd actions (common to Ringdove)"
-		else
-			echo ""
-			echo "$SEP $fn"
-			tr "\n\r\t" "   " < $fn | sed "s@<@\n<@g;s@>@>\n@g;"
-		fi
-	done
-) |  compile
-
-echo '
-</body>
-</html>
-'
+. $LIBRND_LIBDIR/action_compiler.sh
diff -pruN 1.1.0-3/doc/user/09_appendix/src/dump_actions_to_html.sh 1.1.2-1/doc/user/09_appendix/src/dump_actions_to_html.sh
--- 1.1.0-3/doc/user/09_appendix/src/dump_actions_to_html.sh	2022-11-10 15:53:42.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/src/dump_actions_to_html.sh	2022-11-22 07:57:37.000000000 +0000
@@ -5,6 +5,8 @@
 asrc="../action_src"
 lsrc="librnd_acts"
 
+. $LIBRND_LIBDIR/dump_actions_to_html.sh
+
 cd ../../../../src
 camv_rnd_ver=`./camv-rnd --version`
 camv_rnd_rev=`svn info ^/ | awk '/Revision:/ {
@@ -19,103 +21,9 @@ camv_rnd_rev=`svn info ^/ | awk '/Revisi
 	'`
 cd ../doc/user/09_appendix/src
 
-echo 	"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
-<html>
-<head>
-<title> camv-rnd user manual </title>
-<meta http-equiv=\"Content-Type\" content=\"text/html;charset=us-ascii\">
-<link rel=\"stylesheet\" type=\"text/css\" href=\" ../default.css\">
-</head>
-<body>
-<p>
-<h1> camv-rnd User Manual: Appendix </h1>
-<p>
-<h2> Action Reference</h2>
-<table border=1>"
-echo "<caption>\n" "<b>"
-echo $camv_rnd_ver ", " $camv_rnd_rev
-echo "</b>"
-echo  "<th> Action <th> Description <th> Syntax <th> Plugin"
+print_hdr "camv-rnd"
+
 (
 	cd ../../../../src
 	./camv-rnd --dump-actions 2>/dev/null
-) | awk '
-
-function flush_sd()
-{
-		if ( a != "" ||  s != "" || d != "" ) {
-			sub("^<br>", "", a)
-			sub("^<br>", "", d)
-			sub("^<br>", "", s)
-			sub("^<br>", "", c)
-			print  "<tr><act>" a "</act>" "<td>" d "</td>" "<td>" s "</td>" "<td>" c "</td>"
-			}
-		
-	a=""
-	s=""
-	d=""
-	c=""
-}
-
-
-/^A/ {
-	flush_sd()
-	sub("^A", "", $0)
-	a = a "<br>" $0
-	next
-}
-
-/^D/ {
-	sub("^D", "", $0)
-	d = d "<br>" $0
-	next
-}
-
-/^S/ {
-	sub("^S", "", $0)
-	s = s "<br>" $0
-	next
-}
-
-/^C/ {
-	sub("^C", "", $0)
-	c = c "<br>" $0
-	next
-}
-
-' | sort -fu | awk -v "asrc=$asrc" -v "lsrc=$lsrc" '
-# insert links around actions where applicable
-	BEGIN {
-		q = "\""
-	}
-	/<act>/ {
-		pre = $0
-		sub("<act>.*", "", pre)
-		post = $0
-		sub(".*</act>", "", post)
-		act = $0
-		sub(".*<act>", "", act)
-		sub("</act>.*", "", act)
-		loact = tolower(act)
-		fn = asrc "/" loact ".html"
-		lfn = lsrc "/" loact ".html"
-		if ((getline < fn) == 1)
-			print pre "<td><a href=" q "action_details.html#" loact q ">" act "</a></td>" post
-		else if ((getline < lfn) == 1)
-			print pre "<td><a href=" q "action_details.html#" loact q ">" act "</a> <sup><a href=\"#ringdove\">(RND)</a></sup></td>" post
-		else
-			print pre "<td>" act "</td>" post
-		close(fn)
-		close(lfn)
-		next
-	}
-
-	{ print $0 }
-	
-	END {
-		print "</table>"
-		print "<p id=\"ringdove\">RND: this action comes from librnd and is common to all ringdove applications."
-		print "</body>"
-		print "</html>"
-	}
-'
+) | gen
diff -pruN 1.1.0-3/doc/user/09_appendix/src/gen_dialogs.sh 1.1.2-1/doc/user/09_appendix/src/gen_dialogs.sh
--- 1.1.0-3/doc/user/09_appendix/src/gen_dialogs.sh	2022-11-10 15:53:42.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/src/gen_dialogs.sh	2022-11-21 17:46:30.000000000 +0000
@@ -2,6 +2,13 @@
 
 trunk=../../../..
 
+if test -z "$LIBRND_LIBDIR"
+then
+# when not run from the Makefile
+	LIBRND_LIBDIR=`cd $trunk/doc/developer/packaging && make -f librnd_root.mk libdir`
+fi
+
+
 # exceptions
 dlgtbl='
 BEGIN {
@@ -25,64 +32,13 @@ echo '
 <h1> camv-rnd User Manual: Appendix </h1>
 <p>
 <h2> List of GUI dialog boxes </h2>
-<table border=1 cellspacing=0>
-<tr>
-	<th> ID
-	<th> dialog box name
-	<th> action
-	<th> source
-	<th> comments
 '
+dlgextra="`cat dialog_extra.awk`"
 
-$trunk/util/devhelpers/list_dialogs.sh | awk -F "[\t]" '
-function orna(s)
-{
-	if ((s == "") || (s == "<dyn>")) return "n/a"
-	return s
-}
-
-'"$dlgtbl"'
-'"`cat dialog_extra.awk`"'
-
-function out(id, name, src, action, comment     ,acturl1,acturl2,fn,tmp) {
-	if (action == "") {
-		if (id in ACTION) action = ACTION[id]
-		else if (src in ACTION) action = ACTION[src]
-	}
-
-	if (action != "") {
-		acturl1 = action
-		sub("[(].*", "", acturl1)
-		fn = "../action_src/" acturl1 ".html"
-		if ((getline tmp < fn) == 1) {
-			acturl1 = "<a href=\"action_details.html#" tolower(acturl1) "\">"
-			acturl2 = "</a>"
-		}
-		else {
-			acturl1 = ""
-			acturl2 = ""
-		}
-		close(fn)
-	}
-
-	if (comment == "") {
-		if (id in COMMENT) comment = COMMENT[id]
-		else if (src in COMMENT) comment = COMMENT[src]
-		else comment = "&nbsp;"
-	}
+. $LIBRND_LIBDIR/devhelpers/list_dialogs.sh
 
-	print "<tr><td>" orna(id) "<td>" orna(name) "<td>" acturl1 orna(action) acturl2 "<td>" src "<td>" comment
-}
-
-{
-	id=$1
-	name=$2
-	src=$3
-	if ((src in IGNORE) && ((name ~ IGNORE[src]) || (id ~ IGNORE[src])))
-		next
-	out(id, name, src)
-}
-'
+print_hdr
+list_dlgs $trunk/src/*.c $trunk/src_plugins/*/*.c | gen_html
 
 echo '
 </table>
diff -pruN 1.1.0-3/doc/user/09_appendix/src/gen_formats.sh 1.1.2-1/doc/user/09_appendix/src/gen_formats.sh
--- 1.1.0-3/doc/user/09_appendix/src/gen_formats.sh	2022-11-10 15:53:42.000000000 +0000
+++ 1.1.2-1/doc/user/09_appendix/src/gen_formats.sh	1970-01-01 00:00:00.000000000 +0000
@@ -1,104 +0,0 @@
-#!/bin/sh
-
-PLUGINS=../../../../src_plugins
-
-echo '
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-	<title> camv-rnd - list of file formats </title>
-	<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
-	<link rel="stylesheet" type="text/css" href="../default.css">
-</head>
-<body>
-
-<h1> camv-rnd User Manual: Appendix </h1>
-<p>
-<h2> File format support </h2>
-
-<table border=1>
-	<tr>
-	<th> plugin <th> native <th> state <th> reads formats <th> writes formats
-'
-
-files_io=`ls $PLUGINS/io_*/*.pup | sort`
-files_e=`ls $PLUGINS/export_*/*.pup | sort`
-files_i=`ls $PLUGINS/import_*/*.pup | sort`
-
-for n in $files_io $files_i $files_e
-do
-	bn=`basename $n`
-	bn=${bn%%.pup}
-	sed '
-		/^[$]fmt[-]/ { s@^@'$bn' @; p }
-		/^[$]state/ { s@^@'$bn' @; p }
-		{ d }
-	' $n
-done | awk '
-	BEGIN {
-		plgs = 0
-	}
-	{
-		if ($1 != last) {
-			PLG[plgs] = $1
-			last = $1
-			plgs++
-		}
-		p=$1
-		f=$2
-		text=$0
-		sub("^[^ \t]+[ \t]+[^ \t]+[ \t]+", "", text)
-		DATA[p, f] = DATA[p, f] SUBSEP text
-	}
-
-	function col(mask    ,n,v,i,A) {
-		print " <td>"
-		v = split(DATA[mask], A, "[" SUBSEP "]")
-		if (v == 0) {
-			print "n/a"
-			return
-		}
-		i = 0;
-		for(n = 1; n <= v; n++) {
-			if (A[n] == "")
-				continue;
-			if (i)
-				print "  <br>"
-			print "  " A[n]
-			i++
-		}
-	}
-
-	function strip(s)
-	{
-		gsub("[" SUBSEP "]", " ", s)
-		sub("^[ \t]*", "", s)
-		sub("[ \t]*$", "", s)
-		return s
-	}
-
-	function row(plg) {
-		print "<tr><th>" plg
-		print "<td>" strip(DATA[plg, "$fmt-native"])
-		print "<td>" strip(DATA[plg, "$state"])
-		col(plg SUBSEP "$fmt-feature-r")
-		col(plg SUBSEP "$fmt-feature-w")
-	}
-
-	END {
-		for(p=0; p < plgs; p++)
-			if (DATA[PLG[p], "$fmt-native"] ~ "yes")
-				row(PLG[p])
-
-		for(p=0; p < plgs; p++)
-			if (!(DATA[PLG[p], "$fmt-native"] ~ "yes"))
-				row(PLG[p])
-	}
-'
-
-
-echo '
-</table>
-</body>
-</html>
-'
diff -pruN 1.1.0-3/doc/user/Makefile 1.1.2-1/doc/user/Makefile
--- 1.1.0-3/doc/user/Makefile	2021-11-10 10:21:43.000000000 +0000
+++ 1.1.2-1/doc/user/Makefile	2022-11-16 11:49:41.000000000 +0000
@@ -1,6 +1,6 @@
 include ../../Makefile.conf
 LIBARCHDIR=$(LIBRND_LIBARCHDIR)
-SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd3/scconfig/sccbox
+SCCBOX = $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd4/scconfig/sccbox
 
 all:
 
diff -pruN 1.1.0-3/scconfig/Makefile 1.1.2-1/scconfig/Makefile
--- 1.1.0-3/scconfig/Makefile	2022-08-01 14:39:08.000000000 +0000
+++ 1.1.2-1/scconfig/Makefile	2023-03-06 06:37:53.000000000 +0000
@@ -87,12 +87,12 @@ src/util/sccbox.o: src/util/sccbox.c
 sccbox: src/util/sccbox.o
 	$(CC) $(LDFLAGS) -o sccbox src/util/sccbox.o
 
-LIBRNDSCC=$(LIBRND_PREFIX)/include/librnd/scconfig
+LIBRNDSCC=$(LIBRND_PREFIX)/include/librnd4/librnd/scconfig
 RNDHOOKS=$(LIBRNDSCC)/plugin_3state.h $(LIBRNDSCC)/hooks_common.h
 
-hooks.o: $(RNDHOOKS) plugins.h $(LIBRND_PREFIX)/include/librnd/scconfig Rev.h find_fontdir.c
+hooks.o: $(RNDHOOKS) plugins.h $(LIBRND_PREFIX)/include/librnd4/librnd/scconfig Rev.h
 
-librnd_ver.o: librnd_ver.c $(LIBRND_PREFIX)/include/librnd/config.h
+librnd_ver.o: librnd_ver.c $(LIBRND_PREFIX)/include/librnd4/librnd/config.h
 	$(CC) -c $(CFLAGS) -o librnd_ver.o librnd_ver.c
 
 $(BIN)/util/arg_auto_set.o: $(SRC)/util/arg_auto_set.c $(SRC)/util/arg_auto_set.h
@@ -102,4 +102,4 @@ clean:
 	-rm $(OBJS) $(DEFAULT_MAIN_OBJS) configure sccbox
 
 distclean: clean
-	-rm Makefile.depgen config.cache config.log
\ No newline at end of file
+	-rm Makefile.depgen config.cache config.log
diff -pruN 1.1.0-3/scconfig/Rev.h 1.1.2-1/scconfig/Rev.h
--- 1.1.0-3/scconfig/Rev.h	2022-10-24 12:53:08.000000000 +0000
+++ 1.1.2-1/scconfig/Rev.h	2023-04-13 12:16:07.000000000 +0000
@@ -1 +1 @@
-static const int myrev = 522;
+static const int myrev = 703;
diff -pruN 1.1.0-3/scconfig/Rev.tab 1.1.2-1/scconfig/Rev.tab
--- 1.1.0-3/scconfig/Rev.tab	2022-10-24 12:53:08.000000000 +0000
+++ 1.1.2-1/scconfig/Rev.tab	2023-04-13 12:16:07.000000000 +0000
@@ -1,2 +1,7 @@
+703	configure	get rid of ttf support in favor of librnd vector font
+697	configure	./configure shouldn't detect librnd as it depends on librnd
+678	configure	link against librnd-font
+611	configure	BINDIR in config.h
+589	configure	move import_gcode config into the plugin
 522	configure	new plugins: export
 470	configure	introducing revtab
diff -pruN 1.1.0-3/scconfig/find_fontdir.c 1.1.2-1/scconfig/find_fontdir.c
--- 1.1.0-3/scconfig/find_fontdir.c	2022-08-01 14:39:08.000000000 +0000
+++ 1.1.2-1/scconfig/find_fontdir.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-static const char *font_dirs[] = {
-	"/usr/share/fonts/truetype",
-	"/usr/share/fonts",
-	"/usr/local/share/fonts/truetype",
-	"/usr/local/share/fonts",
-	NULL
-};
-
-int find_fontdir(void)
-{
-	const char **d, *ud;
-
-	ud = get("/local/csch/fontdir");
-	if ((ud != NULL) && (*ud != '\0')) {
-		report("Accepting system font dir (user specified): '%s'\n", ud);
-		return 0;
-	}
-
-	report("Detecting system font dir...");
-	for(d = font_dirs; *d != NULL; d++) {
-		if (is_dir(*d)) {
-			put("/local/csch/fontdir", *d);
-			report("'%s'\n", *d);
-			return 0;
-		}
-	}
-	report("NOT FOUND!\nPlease specify one with --fontdir\n");
-	return 1;
-}
diff -pruN 1.1.0-3/scconfig/hooks.c 1.1.2-1/scconfig/hooks.c
--- 1.1.0-3/scconfig/hooks.c	2022-11-16 08:33:27.000000000 +0000
+++ 1.1.2-1/scconfig/hooks.c	2023-05-24 03:01:22.000000000 +0000
@@ -19,10 +19,10 @@
 #include <librnd/scconfig/hooks_common.h>
 #include <librnd/scconfig/rnd_hook_detect.h>
 
-#define version "1.1.0"
+#define version "1.1.2"
 
-#define REQ_LIBRND_MAJOR 3
-#define REQ_LIBRND_MINOR 2
+#define REQ_LIBRND_MAJOR 4
+#define REQ_LIBRND_MINOR 0
 
 
 const arg_auto_set_t disable_libs[] = { /* list of --disable-LIBs and the subtree they affect */
@@ -48,7 +48,6 @@ static void help1(void)
 {
 	rnd_help1("camv-rnd");
 	printf(" --dot_camv_rnd=path        .camv-rnd config path under $HOME/\n");
-	printf(" --fontdir=path             system font dir that hosts ttf files\n");
 }
 
 /* Runs when a custom command line argument is found
@@ -63,8 +62,7 @@ int hook_custom_arg(const char *key, con
 		return 1;
 	}
 	if (strcmp(key, "fontdir") == 0) {
-		need_value("use --fontdir=path");
-		put("/local/camv/fontdir", value);
+		fprintf(stderr, "WARNING: --fontdir is ignored -camv-rnd doesn't need it; it uses an embedded vector font\n");
 		return 1;
 	}
 
@@ -110,7 +108,7 @@ int hook_postarg()
 	char *tmp;
 	const char *libad;
 
-	put("/local/camv/librnd_template", tmp = str_concat("", TO_STR(LIBRND_PREFIX), "/", get("/local/libarchdir"), "/librnd3/scconfig/template", NULL));
+	put("/local/camv/librnd_template", tmp = str_concat("", TO_STR(LIBRND_PREFIX), "/", get("/local/libarchdir"), "/librnd4/scconfig/template", NULL));
 	free(tmp);
 
 	/* if librnd is installed at some custom path, we'll need to have a -I on CFLAGS and -L on LDFLAGS */
@@ -131,8 +129,6 @@ int hook_detect_host()
 	return rnd_hook_detect_host();
 }
 
-#include "find_fontdir.c"
-
 /* Runs when things should be detected for the target system */
 int hook_detect_target()
 {
@@ -150,9 +146,6 @@ int hook_detect_target()
 
 	require("sys/types/size/4_u_int", 0, 1);
 
-	require("libs/sul/librnd-hid/*", 0, 1);
-	require("libs/sul/freetype2/*", 0, 1);
-
 	/* byaccic - are we able to regenerate languages? */
 	if (istrue(get("/local/camv/want_byaccic"))) {
 		require("parsgen/byaccic/*", 0, 0);
@@ -167,9 +160,6 @@ int hook_detect_target()
 		put("/local/camv/want_parsgen_byaccic", sfalse);
 	}
 
-	if (find_fontdir() != 0)
-		return 1;
-
 	return 0;
 }
 
@@ -215,7 +205,6 @@ int hook_generate()
 		print_sum_cfg_val("/local/prefix",              "installation prefix (--prefix)");
 		print_sum_cfg_val("/local/confdir",             "configuration directory (--confdir)");
 		print_sum_cfg_val("/local/camv/dot_camv_rnd",   ".camv_rnd config dir under $HOME");
-		print_sum_cfg_val("/local/camv/fontdir",        "system font dir");
 
 #undef plugin_def
 #undef plugin_header
diff -pruN 1.1.0-3/scconfig/src/c99/find_c99.c 1.1.2-1/scconfig/src/c99/find_c99.c
--- 1.1.0-3/scconfig/src/c99/find_c99.c	2018-07-17 10:23:51.000000000 +0000
+++ 1.1.2-1/scconfig/src/c99/find_c99.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/arg.c 1.1.2-1/scconfig/src/default/arg.c
--- 1.1.0-3/scconfig/src/default/arg.c	2020-04-17 13:25:52.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/arg.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/db.c 1.1.2-1/scconfig/src/default/db.c
--- 1.1.0-3/scconfig/src/default/db.c	2019-02-02 06:09:49.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/db.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/dep.c 1.1.2-1/scconfig/src/default/dep.c
--- 1.1.0-3/scconfig/src/default/dep.c	2019-07-17 06:12:32.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/dep.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/deps_default.c 1.1.2-1/scconfig/src/default/deps_default.c
--- 1.1.0-3/scconfig/src/default/deps_default.c	2022-08-27 11:35:50.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/deps_default.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "dep.h"
diff -pruN 1.1.0-3/scconfig/src/default/find_cc.c 1.1.2-1/scconfig/src/default/find_cc.c
--- 1.1.0-3/scconfig/src/default/find_cc.c	2021-09-29 11:15:23.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_cc.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
@@ -933,11 +933,13 @@ static int try_dll_or_so(int logdepth, i
 		lib_filename = file_name(libname);
 		lib_dirname = dir_name(libname);
 
+		len = strlen(lib_filename) - strlen(libname_ext);
 		if (!is_dll) {
-			len = strlen(lib_filename) - strlen(libname_ext);
 			for (ii=3; ii<len; ++ii)
 				lib_filename[ii-3] = lib_filename[ii];
 			lib_filename[len-3] = 0;
+		} else {
+			lib_filename[len] = 0;
 		}
 
 		app_ldflags_new = str_concat("", "-L", lib_dirname, " -l", lib_filename,
@@ -1095,29 +1097,45 @@ int find_alloca(const char *name, int lo
 }
 
 
-int find__exit(const char *name, int logdepth, int fatal)
+static int find__exit_(const char *inc, int logdepth, int fatal)
 {
-	const char *test_c =
+	const char *test_c_ =
 		NL "#include <stdio.h>"
+		NL "%s"
 		NL "int main() {"
 		NL "	_exit(0);"
 		NL "	puts(\"BAD\");"
 		NL "	return 0;"
 		NL "}"
 		NL ;
+	char test_c[256];
 
-	require("cc/cc", logdepth, fatal);
-
-	report("Checking for _exit()... ");
-	logprintf(logdepth, "find__exit: trying to find _exit()...\n");
-	logdepth++;
+	sprintf(test_c, test_c_, inc); /* safe because called only with a few hardwired inc values */
 
 	if (try_flags_inv(logdepth, NULL, test_c, NULL, NULL, "BAD")) {
 		put("cc/_exit/presents", strue);
+		put("cc/_exit/includes", inc);
 		report("found\n");
 		return 0;
 	}
 
+	return 1;
+}
+
+int find__exit(const char *name, int logdepth, int fatal)
+{
+	const char **i, *incs[] = {"#include <unistd.h>", NULL};
+
+	require("cc/cc", logdepth, fatal);
+
+	report("Checking for _exit()... ");
+	logprintf(logdepth, "find__exit: trying to find _exit()...\n");
+	logdepth++;
+
+	for(i = incs; *i != NULL; i++)
+		if (find__exit_(*i, logdepth, fatal) == 0)
+			return 0;
+
 	put("cc/_exit/presents", sfalse);
 	report("Not found.\n");
 	return 1;
diff -pruN 1.1.0-3/scconfig/src/default/find_environ.c 1.1.2-1/scconfig/src/default/find_environ.c
--- 1.1.0-3/scconfig/src/default/find_environ.c	2018-02-13 19:14:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_environ.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_fscalls.c 1.1.2-1/scconfig/src/default/find_fscalls.c
--- 1.1.0-3/scconfig/src/default/find_fscalls.c	2021-01-25 15:43:27.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_fscalls.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
@@ -133,7 +133,6 @@ int find_fs_findnextfile(const char *nam
 	char *test_c =
 		NL "#include <stdlib.h>"
 		NL "#include <stdio.h>"
-		NL "#include <windows.h>"
 		NL "int main(int argc, char *argv[]) {"
 		NL "	WIN32_FIND_DATA fd;"
 		NL "	HANDLE h;"
@@ -156,7 +155,7 @@ int find_fs_findnextfile(const char *nam
 	logprintf(logdepth, "find_fs_findnextfile: trying to find FindNextFile...\n");
 	logdepth++;
 
-	if (try_icl(logdepth, "libs/fs/findnextfile", test_c, NULL, NULL, NULL)) return 0;
+	if (try_icl(logdepth, "libs/fs/findnextfile", test_c, "#include <windows.h>", NULL, NULL)) return 0;
 	return try_fail(logdepth, "libs/fs/findnextfile");
 }
 
diff -pruN 1.1.0-3/scconfig/src/default/find_fstools.c 1.1.2-1/scconfig/src/default/find_fstools.c
--- 1.1.0-3/scconfig/src/default/find_fstools.c	2022-07-13 15:50:17.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_fstools.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_io.c 1.1.2-1/scconfig/src/default/find_io.c
--- 1.1.0-3/scconfig/src/default/find_io.c	2021-01-25 15:21:12.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_io.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
@@ -125,7 +125,6 @@ int find_io_fileno(const char *name, int
 {
 	char test_c[256];
 	char *test_c_ =
-		NL "#include <stdio.h>"
 		NL "int main() {"
 		    /* NOTE: can not check for implicit declaration as fileno() may be a macro (e.g. on MINIX3) */
 		NL "	if (%s(stdout) >= 0)"
@@ -142,19 +141,19 @@ int find_io_fileno(const char *name, int
 
 	/* UNIX */
 	sprintf(test_c, test_c_, "fileno");
-	if (try_icl(logdepth, "libs/io/fileno", test_c, NULL, NULL, NULL)) {
+	if (try_icl(logdepth, "libs/io/fileno", test_c, "#include <stdio.h>\n", NULL, NULL)) {
 		put("libs/io/fileno/call", "fileno");
 		return 0;
 	}
 
 	sprintf(test_c, test_c_, "fileno");
-	if (try_icl(logdepth, "libs/io/fileno", test_c, "#include <unistd.h>\n", NULL, NULL)) {
+	if (try_icl(logdepth, "libs/io/fileno", test_c, "#include <stdio.h>\n#include <unistd.h>\n", NULL, NULL)) {
 		put("libs/io/fileno/call", "fileno");
 		return 0;
 	}
 
 	sprintf(test_c, test_c_, "fileno");
-	if (try_icl(logdepth, "libs/io/fileno", test_c, "#define _XOPEN_SOURCE\n#include <unistd.h>\n", NULL, NULL)) {
+	if (try_icl(logdepth, "libs/io/fileno", test_c, "#define _XOPEN_SOURCE\n#include <stdio.h>\n#include <unistd.h>\n", NULL, NULL)) {
 		put("libs/io/fileno/call", "fileno");
 		return 0;
 	}
diff -pruN 1.1.0-3/scconfig/src/default/find_libs.c 1.1.2-1/scconfig/src/default/find_libs.c
--- 1.1.0-3/scconfig/src/default/find_libs.c	2021-01-25 15:21:12.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_libs.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_printf.c 1.1.2-1/scconfig/src/default/find_printf.c
--- 1.1.0-3/scconfig/src/default/find_printf.c	2018-02-13 19:14:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_printf.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_proc.c 1.1.2-1/scconfig/src/default/find_proc.c
--- 1.1.0-3/scconfig/src/default/find_proc.c	2019-01-30 11:14:29.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_proc.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_signal.c 1.1.2-1/scconfig/src/default/find_signal.c
--- 1.1.0-3/scconfig/src/default/find_signal.c	2018-11-09 10:11:15.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_signal.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_str.c 1.1.2-1/scconfig/src/default/find_str.c
--- 1.1.0-3/scconfig/src/default/find_str.c	2019-01-24 09:02:14.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_str.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_sys.c 1.1.2-1/scconfig/src/default/find_sys.c
--- 1.1.0-3/scconfig/src/default/find_sys.c	2020-03-31 03:20:29.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_sys.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_target.c 1.1.2-1/scconfig/src/default/find_target.c
--- 1.1.0-3/scconfig/src/default/find_target.c	2018-08-13 12:05:04.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_target.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_thread.c 1.1.2-1/scconfig/src/default/find_thread.c
--- 1.1.0-3/scconfig/src/default/find_thread.c	2021-01-25 15:21:12.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_thread.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_time.c 1.1.2-1/scconfig/src/default/find_time.c
--- 1.1.0-3/scconfig/src/default/find_time.c	2022-08-27 11:40:43.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_time.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/find_types.c 1.1.2-1/scconfig/src/default/find_types.c
--- 1.1.0-3/scconfig/src/default/find_types.c	2021-01-25 15:21:12.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_types.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
@@ -71,7 +71,8 @@ static int try_size(int logdepth, char *
 			if ((size > 0) && (size < max_width)) {
 				sprintf(test_c, "%d", size);
 				put(path, test_c);
-				sizearr[size] = type;
+				if (sizearr[size] == NULL)
+					sizearr[size] = type;
 				if (inc_stdint != NULL)
 					inc_stdint[size] = use_stdint;
 				report(" OK, size %d byte%s\n", size, (size > 1) ? "s" : "");
@@ -139,17 +140,17 @@ int find_types_sizes(const char *name, i
 	for(n = 0; n < MAX_FLT_WIDTH; n++)
 		sizearr_f[n] = NULL;
 
-	try_size(logdepth+1, NULL, NULL, "unsigned long long int", 0, "sys/types/size/unsigned_long_long_int", sizearr_u, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "unsigned char", 0, "sys/types/size/unsigned_char", sizearr_u, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "unsigned short int", 0, "sys/types/size/unsigned_short_int", sizearr_u, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "unsigned int", 0, "sys/types/size/unsigned_int", sizearr_u, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "unsigned long int", 0, "sys/types/size/unsigned_long_int", sizearr_u, NULL, MAX_INT_WIDTH);
+	try_size(logdepth+1, NULL, NULL, "unsigned long long int", 0, "sys/types/size/unsigned_long_long_int", sizearr_u, NULL, MAX_INT_WIDTH);
 
-	try_size(logdepth+1, NULL, NULL, "signed long long int", 0, "sys/types/size/signed_long_long_int", sizearr_s, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "signed char", 0, "sys/types/size/signed_char", sizearr_s, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "signed short int", 0, "sys/types/size/signed_short_int", sizearr_s, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "signed int", 0, "sys/types/size/signed_int", sizearr_s, NULL, MAX_INT_WIDTH);
 	try_size(logdepth+1, NULL, NULL, "signed long int", 0, "sys/types/size/signed_long_int", sizearr_s, NULL, MAX_INT_WIDTH);
+	try_size(logdepth+1, NULL, NULL, "signed long long int", 0, "sys/types/size/signed_long_long_int", sizearr_s, NULL, MAX_INT_WIDTH);
 
 	if ((stdint != NULL) && (istrue(stdint))) {
 		try_size(logdepth+1, NULL, NULL, "uint8_t", 1, "sys/types/size/uint8_t", sizearr_u, inc_stdint_u, MAX_INT_WIDTH);
diff -pruN 1.1.0-3/scconfig/src/default/find_uname.c 1.1.2-1/scconfig/src/default/find_uname.c
--- 1.1.0-3/scconfig/src/default/find_uname.c	2020-12-10 06:07:14.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/find_uname.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/ht.c 1.1.2-1/scconfig/src/default/ht.c
--- 1.1.0-3/scconfig/src/default/ht.c	2016-08-04 03:50:30.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/ht.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/lib_compile.c 1.1.2-1/scconfig/src/default/lib_compile.c
--- 1.1.0-3/scconfig/src/default/lib_compile.c	2022-07-17 03:09:42.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/lib_compile.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/lib_file.c 1.1.2-1/scconfig/src/default/lib_file.c
--- 1.1.0-3/scconfig/src/default/lib_file.c	2018-02-01 10:43:22.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/lib_file.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/lib_filelist.c 1.1.2-1/scconfig/src/default/lib_filelist.c
--- 1.1.0-3/scconfig/src/default/lib_filelist.c	2018-02-13 19:14:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/lib_filelist.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/lib_srctree.c 1.1.2-1/scconfig/src/default/lib_srctree.c
--- 1.1.0-3/scconfig/src/default/lib_srctree.c	2016-03-19 05:28:41.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/lib_srctree.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/lib_uniqinc.c 1.1.2-1/scconfig/src/default/lib_uniqinc.c
--- 1.1.0-3/scconfig/src/default/lib_uniqinc.c	2022-08-20 12:17:22.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/lib_uniqinc.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/log.c 1.1.2-1/scconfig/src/default/log.c
--- 1.1.0-3/scconfig/src/default/log.c	2016-08-25 03:28:19.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/log.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "log.h"
diff -pruN 1.1.0-3/scconfig/src/default/main.c 1.1.2-1/scconfig/src/default/main.c
--- 1.1.0-3/scconfig/src/default/main.c	2018-08-13 12:05:04.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/main.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/main_custom_args.c 1.1.2-1/scconfig/src/default/main_custom_args.c
--- 1.1.0-3/scconfig/src/default/main_custom_args.c	2016-02-14 16:42:45.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/main_custom_args.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/main_lib.c 1.1.2-1/scconfig/src/default/main_lib.c
--- 1.1.0-3/scconfig/src/default/main_lib.c	2017-10-26 06:27:47.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/main_lib.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/default/str.c 1.1.2-1/scconfig/src/default/str.c
--- 1.1.0-3/scconfig/src/default/str.c	2022-08-30 03:27:24.000000000 +0000
+++ 1.1.2-1/scconfig/src/default/str.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/generator/generator.c 1.1.2-1/scconfig/src/generator/generator.c
--- 1.1.0-3/scconfig/src/generator/generator.c	2018-11-01 03:32:58.000000000 +0000
+++ 1.1.2-1/scconfig/src/generator/generator.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_cairo.c 1.1.2-1/scconfig/src/gui/find_cairo.c
--- 1.1.0-3/scconfig/src/gui/find_cairo.c	2019-05-20 03:00:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_cairo.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_gd.c 1.1.2-1/scconfig/src/gui/find_gd.c
--- 1.1.0-3/scconfig/src/gui/find_gd.c	2021-01-25 15:23:00.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_gd.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_gl.c 1.1.2-1/scconfig/src/gui/find_gl.c
--- 1.1.0-3/scconfig/src/gui/find_gl.c	2022-08-20 08:53:02.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_gl.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_gtk2.c 1.1.2-1/scconfig/src/gui/find_gtk2.c
--- 1.1.0-3/scconfig/src/gui/find_gtk2.c	2021-01-25 15:23:00.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_gtk2.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_gtk3.c 1.1.2-1/scconfig/src/gui/find_gtk3.c
--- 1.1.0-3/scconfig/src/gui/find_gtk3.c	2021-11-04 08:59:46.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_gtk3.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_gtk4.c 1.1.2-1/scconfig/src/gui/find_gtk4.c
--- 1.1.0-3/scconfig/src/gui/find_gtk4.c	2021-11-11 09:24:56.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_gtk4.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_lesstif2.c 1.1.2-1/scconfig/src/gui/find_lesstif2.c
--- 1.1.0-3/scconfig/src/gui/find_lesstif2.c	2021-11-07 06:04:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_lesstif2.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_misc.c 1.1.2-1/scconfig/src/gui/find_misc.c
--- 1.1.0-3/scconfig/src/gui/find_misc.c	2018-12-09 09:02:02.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_misc.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_sdl2.c 1.1.2-1/scconfig/src/gui/find_sdl2.c
--- 1.1.0-3/scconfig/src/gui/find_sdl2.c	2022-08-27 08:16:33.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_sdl2.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/gui/find_x.c 1.1.2-1/scconfig/src/gui/find_x.c
--- 1.1.0-3/scconfig/src/gui/find_x.c	2022-08-21 06:47:34.000000000 +0000
+++ 1.1.2-1/scconfig/src/gui/find_x.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
@@ -82,6 +82,7 @@ int find_xinerama(const char *name, int
 	const char *node = "libs/gui/xinerama";
 	char **cflags,  *cflags_arr[]  = {"", NULL};
 	char **ldflags, *ldflags_arr[] = {"-lXinerama", NULL};
+	char **incs, *incs_arr[] = {"#include <X11/extensions/Xinerama.h>", "", NULL};
 	const char *xincludes, *xcflags, *xldflags;
 
 	if (require("cc/cc", logdepth, fatal))
@@ -100,8 +101,10 @@ int find_xinerama(const char *name, int
 
 	for(cflags = cflags_arr; *cflags != NULL; cflags++) {
 		for(ldflags = ldflags_arr; *ldflags != NULL; ldflags++) {
-			if (try_icl_with_deps(logdepth, node, test_c, NULL, *cflags, *ldflags, xincludes, xcflags, xldflags, 0) != 0) {
-				return 0;
+			for(incs = incs_arr; *incs != NULL; incs++) {
+				if (try_icl_with_deps(logdepth, node, test_c, *incs, *cflags, *ldflags, xincludes, xcflags, xldflags, 0) != 0) {
+					return 0;
+				}
 			}
 		}
 	}
diff -pruN 1.1.0-3/scconfig/src/math/find_fpenan.c 1.1.2-1/scconfig/src/math/find_fpenan.c
--- 1.1.0-3/scconfig/src/math/find_fpenan.c	2021-01-25 15:47:01.000000000 +0000
+++ 1.1.2-1/scconfig/src/math/find_fpenan.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/math/find_func.c 1.1.2-1/scconfig/src/math/find_func.c
--- 1.1.0-3/scconfig/src/math/find_func.c	2021-01-25 15:24:44.000000000 +0000
+++ 1.1.2-1/scconfig/src/math/find_func.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/math/find_math.c 1.1.2-1/scconfig/src/math/find_math.c
--- 1.1.0-3/scconfig/src/math/find_math.c	2021-01-25 15:24:44.000000000 +0000
+++ 1.1.2-1/scconfig/src/math/find_math.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/math/find_mfunc_cc.c 1.1.2-1/scconfig/src/math/find_mfunc_cc.c
--- 1.1.0-3/scconfig/src/math/find_mfunc_cc.c	2018-03-03 15:01:16.000000000 +0000
+++ 1.1.2-1/scconfig/src/math/find_mfunc_cc.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/menulib/hookreadline.c 1.1.2-1/scconfig/src/menulib/hookreadline.c
--- 1.1.0-3/scconfig/src/menulib/hookreadline.c	2016-02-07 06:00:37.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/hookreadline.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/menulib/hookreadline.h 1.1.2-1/scconfig/src/menulib/hookreadline.h
--- 1.1.0-3/scconfig/src/menulib/hookreadline.h	2016-02-07 06:00:37.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/hookreadline.h	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 
diff -pruN 1.1.0-3/scconfig/src/menulib/scmenu.c 1.1.2-1/scconfig/src/menulib/scmenu.c
--- 1.1.0-3/scconfig/src/menulib/scmenu.c	2016-02-15 04:01:29.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/scmenu.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/menulib/scmenu.h 1.1.2-1/scconfig/src/menulib/scmenu.h
--- 1.1.0-3/scconfig/src/menulib/scmenu.h	2016-02-15 06:20:41.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/scmenu.h	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "hookreadline.h"
diff -pruN 1.1.0-3/scconfig/src/menulib/scmenu_menu.c 1.1.2-1/scconfig/src/menulib/scmenu_menu.c
--- 1.1.0-3/scconfig/src/menulib/scmenu_menu.c	2016-02-15 04:10:32.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/scmenu_menu.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 static void menu_scroll_valid(scm_menu_t *menu, scm_win_t *win)
diff -pruN 1.1.0-3/scconfig/src/menulib/scmenu_rl.c 1.1.2-1/scconfig/src/menulib/scmenu_rl.c
--- 1.1.0-3/scconfig/src/menulib/scmenu_rl.c	2016-02-07 14:26:41.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/scmenu_rl.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 char *scm_readline(scm_ctx_t *ctx, const char *title, const char *prompt, const char *orig)
diff -pruN 1.1.0-3/scconfig/src/menulib/scmenu_text.c 1.1.2-1/scconfig/src/menulib/scmenu_text.c
--- 1.1.0-3/scconfig/src/menulib/scmenu_text.c	2016-08-04 03:50:30.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/scmenu_text.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 static char *button_text[]   = {"yes", "no", "ok", "cancel", "quit"};
diff -pruN 1.1.0-3/scconfig/src/menulib/vt100.c 1.1.2-1/scconfig/src/menulib/vt100.c
--- 1.1.0-3/scconfig/src/menulib/vt100.c	2016-08-04 04:00:32.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/vt100.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 
diff -pruN 1.1.0-3/scconfig/src/menulib/vt100.h 1.1.2-1/scconfig/src/menulib/vt100.h
--- 1.1.0-3/scconfig/src/menulib/vt100.h	2016-02-06 15:38:43.000000000 +0000
+++ 1.1.2-1/scconfig/src/menulib/vt100.h	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 
diff -pruN 1.1.0-3/scconfig/src/parser/find_expat.c 1.1.2-1/scconfig/src/parser/find_expat.c
--- 1.1.0-3/scconfig/src/parser/find_expat.c	2021-01-25 15:25:33.000000000 +0000
+++ 1.1.2-1/scconfig/src/parser/find_expat.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "parser.h"
diff -pruN 1.1.0-3/scconfig/src/parser/parser.c 1.1.2-1/scconfig/src/parser/parser.c
--- 1.1.0-3/scconfig/src/parser/parser.c	2013-06-16 15:01:47.000000000 +0000
+++ 1.1.2-1/scconfig/src/parser/parser.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "parser.h"
diff -pruN 1.1.0-3/scconfig/src/parsgen/find_parsgen.c 1.1.2-1/scconfig/src/parsgen/find_parsgen.c
--- 1.1.0-3/scconfig/src/parsgen/find_parsgen.c	2020-04-24 13:53:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/parsgen/find_parsgen.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/posix/find_dev.c 1.1.2-1/scconfig/src/posix/find_dev.c
--- 1.1.0-3/scconfig/src/posix/find_dev.c	2018-03-13 12:59:59.000000000 +0000
+++ 1.1.2-1/scconfig/src/posix/find_dev.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/posix/find_fs.c 1.1.2-1/scconfig/src/posix/find_fs.c
--- 1.1.0-3/scconfig/src/posix/find_fs.c	2019-02-27 10:25:39.000000000 +0000
+++ 1.1.2-1/scconfig/src/posix/find_fs.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/posix/find_log.c 1.1.2-1/scconfig/src/posix/find_log.c
--- 1.1.0-3/scconfig/src/posix/find_log.c	2020-05-27 10:16:21.000000000 +0000
+++ 1.1.2-1/scconfig/src/posix/find_log.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/posix/find_proc.c 1.1.2-1/scconfig/src/posix/find_proc.c
--- 1.1.0-3/scconfig/src/posix/find_proc.c	2020-04-09 09:48:31.000000000 +0000
+++ 1.1.2-1/scconfig/src/posix/find_proc.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/posix/find_res.c 1.1.2-1/scconfig/src/posix/find_res.c
--- 1.1.0-3/scconfig/src/posix/find_res.c	2021-09-06 12:44:12.000000000 +0000
+++ 1.1.2-1/scconfig/src/posix/find_res.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/scripts/find_duktape.c 1.1.2-1/scconfig/src/scripts/find_duktape.c
--- 1.1.0-3/scconfig/src/scripts/find_duktape.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_duktape.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_fungw.c 1.1.2-1/scconfig/src/scripts/find_fungw.c
--- 1.1.0-3/scconfig/src/scripts/find_fungw.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_fungw.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_funlisp.c 1.1.2-1/scconfig/src/scripts/find_funlisp.c
--- 1.1.0-3/scconfig/src/scripts/find_funlisp.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_funlisp.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_gpmi.c 1.1.2-1/scconfig/src/scripts/find_gpmi.c
--- 1.1.0-3/scconfig/src/scripts/find_gpmi.c	2018-02-13 19:14:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_gpmi.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_guile.c 1.1.2-1/scconfig/src/scripts/find_guile.c
--- 1.1.0-3/scconfig/src/scripts/find_guile.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_guile.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_lua.c 1.1.2-1/scconfig/src/scripts/find_lua.c
--- 1.1.0-3/scconfig/src/scripts/find_lua.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_lua.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_m4.c 1.1.2-1/scconfig/src/scripts/find_m4.c
--- 1.1.0-3/scconfig/src/scripts/find_m4.c	2018-02-13 19:14:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_m4.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_mawk.c 1.1.2-1/scconfig/src/scripts/find_mawk.c
--- 1.1.0-3/scconfig/src/scripts/find_mawk.c	2018-03-03 15:01:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_mawk.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_mruby.c 1.1.2-1/scconfig/src/scripts/find_mruby.c
--- 1.1.0-3/scconfig/src/scripts/find_mruby.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_mruby.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_mujs.c 1.1.2-1/scconfig/src/scripts/find_mujs.c
--- 1.1.0-3/scconfig/src/scripts/find_mujs.c	2022-01-06 18:22:07.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_mujs.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_perl.c 1.1.2-1/scconfig/src/scripts/find_perl.c
--- 1.1.0-3/scconfig/src/scripts/find_perl.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_perl.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_picol.c 1.1.2-1/scconfig/src/scripts/find_picol.c
--- 1.1.0-3/scconfig/src/scripts/find_picol.c	2021-04-17 04:09:26.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_picol.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_python.c 1.1.2-1/scconfig/src/scripts/find_python.c
--- 1.1.0-3/scconfig/src/scripts/find_python.c	2019-01-09 06:46:09.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_python.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_ruby.c 1.1.2-1/scconfig/src/scripts/find_ruby.c
--- 1.1.0-3/scconfig/src/scripts/find_ruby.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_ruby.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_stutter.c 1.1.2-1/scconfig/src/scripts/find_stutter.c
--- 1.1.0-3/scconfig/src/scripts/find_stutter.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_stutter.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_tcl.c 1.1.2-1/scconfig/src/scripts/find_tcl.c
--- 1.1.0-3/scconfig/src/scripts/find_tcl.c	2021-01-25 15:29:11.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_tcl.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/find_welltype.c 1.1.2-1/scconfig/src/scripts/find_welltype.c
--- 1.1.0-3/scconfig/src/scripts/find_welltype.c	2021-07-01 16:05:53.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/find_welltype.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/scripts/scripts.c 1.1.2-1/scconfig/src/scripts/scripts.c
--- 1.1.0-3/scconfig/src/scripts/scripts.c	2022-01-06 18:22:07.000000000 +0000
+++ 1.1.2-1/scconfig/src/scripts/scripts.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "scripts.h"
diff -pruN 1.1.0-3/scconfig/src/socket/find_dns.c 1.1.2-1/scconfig/src/socket/find_dns.c
--- 1.1.0-3/scconfig/src/socket/find_dns.c	2022-02-11 16:24:38.000000000 +0000
+++ 1.1.2-1/scconfig/src/socket/find_dns.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "socket.h"
diff -pruN 1.1.0-3/scconfig/src/socket/find_select.c 1.1.2-1/scconfig/src/socket/find_select.c
--- 1.1.0-3/scconfig/src/socket/find_select.c	2021-01-25 14:40:36.000000000 +0000
+++ 1.1.2-1/scconfig/src/socket/find_select.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "socket.h"
@@ -79,7 +79,7 @@ int find_socket_poll(const char *name, i
 		NL "	fds[0].fd = 0;"
 		NL "	fds[0].events = POLLIN;"
 		NL "	SOCK_INIT;"
-		NL "	if (poll(fds, 1, 1) == 0)"
+		NL "	if (poll(fds, 1, 1) >= 0)"
 		NL "	puts(\"OK\");"
 		NL "	SOCK_UNINIT;"
 		NL "	return 0;"
diff -pruN 1.1.0-3/scconfig/src/socket/find_socket.c 1.1.2-1/scconfig/src/socket/find_socket.c
--- 1.1.0-3/scconfig/src/socket/find_socket.c	2021-05-06 11:32:37.000000000 +0000
+++ 1.1.2-1/scconfig/src/socket/find_socket.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "socket.h"
@@ -741,6 +741,9 @@ int find_socket_readwrite(const char *na
 		NL ;
 
 	char *inc_linux =
+		"#include <unistd.h>"
+		NL;
+	char *inc_fallback =
 		NL;
 
 	char *inc_dns;
@@ -767,6 +770,7 @@ int find_socket_readwrite(const char *na
 
 	/* Look at some standard places */
 	if (try_socket(logdepth, "libs/socket/readwrite", inc_linux, test_c, NULL, NULL, 1)) return 0;
+	if (try_socket(logdepth, "libs/socket/readwrite", inc_fallback, test_c, NULL, NULL, 1)) return 0;
 
 	put("libs/socket/readwrite/presents", sfalse);
 	report("not found\n");
diff -pruN 1.1.0-3/scconfig/src/socket/socket.c 1.1.2-1/scconfig/src/socket/socket.c
--- 1.1.0-3/scconfig/src/socket/socket.c	2020-05-16 12:19:42.000000000 +0000
+++ 1.1.2-1/scconfig/src/socket/socket.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include "socket.h"
diff -pruN 1.1.0-3/scconfig/src/sul/find_aspell.c 1.1.2-1/scconfig/src/sul/find_aspell.c
--- 1.1.0-3/scconfig/src/sul/find_aspell.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_aspell.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_dbus.c 1.1.2-1/scconfig/src/sul/find_dbus.c
--- 1.1.0-3/scconfig/src/sul/find_dbus.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_dbus.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_dmalloc.c 1.1.2-1/scconfig/src/sul/find_dmalloc.c
--- 1.1.0-3/scconfig/src/sul/find_dmalloc.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_dmalloc.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_freetype2.c 1.1.2-1/scconfig/src/sul/find_freetype2.c
--- 1.1.0-3/scconfig/src/sul/find_freetype2.c	2021-01-25 19:01:02.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_freetype2.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_fs.c 1.1.2-1/scconfig/src/sul/find_fs.c
--- 1.1.0-3/scconfig/src/sul/find_fs.c	2019-03-20 03:42:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_fs.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_gen.c 1.1.2-1/scconfig/src/sul/find_gen.c
--- 1.1.0-3/scconfig/src/sul/find_gen.c	2021-01-25 15:34:53.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_gen.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_gettext.c 1.1.2-1/scconfig/src/sul/find_gettext.c
--- 1.1.0-3/scconfig/src/sul/find_gettext.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_gettext.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_glib.c 1.1.2-1/scconfig/src/sul/find_glib.c
--- 1.1.0-3/scconfig/src/sul/find_glib.c	2021-01-25 15:34:53.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_glib.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_iconv.c 1.1.2-1/scconfig/src/sul/find_iconv.c
--- 1.1.0-3/scconfig/src/sul/find_iconv.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_iconv.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_librnd.c 1.1.2-1/scconfig/src/sul/find_librnd.c
--- 1.1.0-3/scconfig/src/sul/find_librnd.c	2021-06-11 06:55:32.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_librnd.c	2023-04-09 03:21:26.000000000 +0000
@@ -1,6 +1,6 @@
 /*
     scconfig - sul - software utility libraries
-    Copyright (C) 2020  Tibor Palinkas
+    Copyright (C) 2020,2022  Tibor Palinkas
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
@@ -29,6 +29,7 @@
 #include "dep.h"
 
 #define NODE3RD "libs/sul/librnd-3rd"
+#define NODE3RD_MAJOR "libs/sul/librnd-3rd/ver/major"
 
 static int find_sul_librnd_3rd_(const char *name, int logdepth, int fatal)
 {
@@ -53,7 +54,7 @@ static int find_sul_librnd_3rd_(const ch
 
 	uprefix = get("/arg/icl/libs/sul/librnd-3rd/prefix");
 	if (uprefix != NULL) {
-		char *i  = str_concat("", " -I", uprefix, "/include/librnd/src_3rd", NULL);
+		char *i  = str_concat("", " -I", uprefix, "/include/librnd/src_3rd", " -I", uprefix, "/include/librnd4/librnd/src_3rd", NULL);
 		report("Checking for librnd-3rd (prefix=%s)... ", uprefix);
 		append("/arg/icl/libs/sul/librnd-3rd/cflags", i);
 		free(i);
@@ -61,17 +62,45 @@ static int find_sul_librnd_3rd_(const ch
 	else
 		report("Checking for librnd-3rd... ");
 
-	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd/core -I/usr/include/librnd/src_3rd", "-lrnd-3rd"))
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd4/librnd/core -I/usr/include/librnd4/librnd/src_3rd", "-lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "4");
 		return 0;
+	}
 
-	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd/core -I/usr/include/librnd/src_3rd", "-lrnd-3rd"))
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd/core -I/usr/include/librnd/src_3rd", "-lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "3");
 		return 0;
+	}
 
-	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd/core -I/usr/local/include/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd"))
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd4/librnd/core -I/usr/include/librnd4/librnd/src_3rd", "-lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "4");
 		return 0;
+	}
 
-	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd/core -I/usr/local/include/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd"))
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/include/librnd/core -I/usr/include/librnd/src_3rd", "-lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "3");
 		return 0;
+	}
+
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd4/librnd/core -I/usr/local/include/librnd4/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "4");
+		return 0;
+	}
+
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd/core -I/usr/local/include/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "3");
+		return 0;
+	}
+
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd4/librnd/core -I/usr/local/include/librnd4/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "4");
+		return 0;
+	}
+
+	if (try_icl(logdepth, node, test_c, NULL, "-I/usr/local/include -I/usr/local/include/librnd/core -I/usr/local/include/librnd/src_3rd", "-L/usr/local/lib -lrnd-3rd")) {
+		put(NODE3RD_MAJOR, "3");
+		return 0;
+	}
 
 	return try_fail(logdepth, node);
 }
@@ -79,6 +108,8 @@ static int find_sul_librnd_3rd_(const ch
 int find_sul_librnd_3rd(const char *name, int logdepth, int fatal)
 {
 	int res = find_sul_librnd_3rd_(name, logdepth, fatal);
+	const char *major = get(NODE3RD_MAJOR);
+
 	if (res == 0) {
 		char *mak, *tmp, *end;
 
@@ -88,7 +119,7 @@ int find_sul_librnd_3rd(const char *name
 		if (end != NULL)
 			*end = '\0';
 		put(NODE3RD"/root", tmp+2);
-		mak = str_concat("", tmp+2, "/share/librnd3/librnd.mak", NULL);
+		mak = str_concat("", tmp+2, "/share/librnd", major, "/librnd.mak", NULL);
 		put(NODE3RD"/mak", mak);
 		free(tmp);
 		free(mak);
diff -pruN 1.1.0-3/scconfig/src/sul/find_libxml2.c 1.1.2-1/scconfig/src/sul/find_libxml2.c
--- 1.1.0-3/scconfig/src/sul/find_libxml2.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_libxml2.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_pcre.c 1.1.2-1/scconfig/src/sul/find_pcre.c
--- 1.1.0-3/scconfig/src/sul/find_pcre.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_pcre.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/sul/find_regex.c 1.1.2-1/scconfig/src/sul/find_regex.c
--- 1.1.0-3/scconfig/src/sul/find_regex.c	2018-12-09 08:39:06.000000000 +0000
+++ 1.1.2-1/scconfig/src/sul/find_regex.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_gpm.c 1.1.2-1/scconfig/src/tty/find_gpm.c
--- 1.1.0-3/scconfig/src/tty/find_gpm.c	2018-12-09 08:51:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_gpm.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_ioctl.c 1.1.2-1/scconfig/src/tty/find_ioctl.c
--- 1.1.0-3/scconfig/src/tty/find_ioctl.c	2018-12-09 08:51:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_ioctl.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_ncurses.c 1.1.2-1/scconfig/src/tty/find_ncurses.c
--- 1.1.0-3/scconfig/src/tty/find_ncurses.c	2018-12-09 08:51:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_ncurses.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_pty.c 1.1.2-1/scconfig/src/tty/find_pty.c
--- 1.1.0-3/scconfig/src/tty/find_pty.c	2018-12-09 08:51:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_pty.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_readline.c 1.1.2-1/scconfig/src/tty/find_readline.c
--- 1.1.0-3/scconfig/src/tty/find_readline.c	2019-01-18 14:50:40.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_readline.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_slang.c 1.1.2-1/scconfig/src/tty/find_slang.c
--- 1.1.0-3/scconfig/src/tty/find_slang.c	2018-12-09 08:51:28.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_slang.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/tty/find_term.c 1.1.2-1/scconfig/src/tty/find_term.c
--- 1.1.0-3/scconfig/src/tty/find_term.c	2018-03-14 12:15:53.000000000 +0000
+++ 1.1.2-1/scconfig/src/tty/find_term.c	2023-04-09 03:21:26.000000000 +0000
@@ -18,7 +18,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/userpass/find_username.c 1.1.2-1/scconfig/src/userpass/find_username.c
--- 1.1.0-3/scconfig/src/userpass/find_username.c	2021-01-25 15:36:54.000000000 +0000
+++ 1.1.2-1/scconfig/src/userpass/find_username.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 #include <stdlib.h>
 #include <string.h>
diff -pruN 1.1.0-3/scconfig/src/util/arg_auto_set.c 1.1.2-1/scconfig/src/util/arg_auto_set.c
--- 1.1.0-3/scconfig/src/util/arg_auto_set.c	2016-12-21 06:14:38.000000000 +0000
+++ 1.1.2-1/scconfig/src/util/arg_auto_set.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdio.h>
diff -pruN 1.1.0-3/scconfig/src/util/cquote.c 1.1.2-1/scconfig/src/util/cquote.c
--- 1.1.0-3/scconfig/src/util/cquote.c	2018-06-01 06:30:35.000000000 +0000
+++ 1.1.2-1/scconfig/src/util/cquote.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdio.h>
diff -pruN 1.1.0-3/scconfig/src/util/ls.c 1.1.2-1/scconfig/src/util/ls.c
--- 1.1.0-3/scconfig/src/util/ls.c	2009-09-26 09:33:00.000000000 +0000
+++ 1.1.2-1/scconfig/src/util/ls.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdio.h>
diff -pruN 1.1.0-3/scconfig/src/util/sccbox.c 1.1.2-1/scconfig/src/util/sccbox.c
--- 1.1.0-3/scconfig/src/util/sccbox.c	2022-07-01 03:26:32.000000000 +0000
+++ 1.1.2-1/scconfig/src/util/sccbox.c	2023-04-09 03:21:26.000000000 +0000
@@ -17,7 +17,7 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 		Project page: http://repo.hu/projects/scconfig
-		Contact via email: scconfig [at] igor2.repo.hu
+		Contact (email and IRC): http://igor2.repo.hu/contact.html
 */
 
 #include <stdlib.h>
diff -pruN 1.1.0-3/scconfig/template/cdep.tmpasm 1.1.2-1/scconfig/template/cdep.tmpasm
--- 1.1.0-3/scconfig/template/cdep.tmpasm	2022-08-04 13:50:06.000000000 +0000
+++ 1.1.2-1/scconfig/template/cdep.tmpasm	1970-01-01 00:00:00.000000000 +0000
@@ -1,77 +0,0 @@
-#
-# LOCAL COPY because librnd's will redirect to ./ while we are not in
-# the right directory at the time
-#
-
-# Generate Makefile code that can generate Makefile.dep
-# Arguments:
-#  /local/dep/CFLAGS   CFLAGS used for compiling
-#  /local/dep/SRCS     list of c soures
-#  /local/pcb/DEPDEPS  targets make dep should generate first
-
-sortuniq /local/pcb/DEPDEPS_SORTED /local/pcb/DEPDEPS
-
-print [@
-
-### generate dependencies (requires gcc) ###
-FORCE:
-
-include Makefile.dep
-
-DEPDEPS=@/local/pcb/DEPDEPS_SORTED@
-
-dep: FORCE $(DEPDEPS)
-	make -f Makefile.depgen PLUGDIR=$(PLUGDIR) LIBRND=$(LIBRND) LIBRND_PLUGDIR=$(LIBRND)/plugins SRC_3RD_DIR=$(SRC_3RD_DIR)
-@]
-
-append /local/dep/CFLAGS {-D_PCB_DEP_}
-gsub /local/dep/CFLAGS {-I} {-isystem }
-gsub /local/dep/CFLAGS {-isystem [.][.]} {-I ..}
-gsub /local/dep/CFLAGS {-isystem [.]} {-I.}
-sortuniq /local/dep/SRCS_SORTED /local/dep/SRCS
-
-redir /local/dep/OUTFN
-
-print [@
-# Generated by configure - DO NOT EDIT
-
-LIBRND=../src/librnd
-
-# Calculate dependencies, assuming all generated files present and
-# SRC_3RD_DIR and PLUGDIR are set
-
-all:
-	echo "### Generated file, do not edit, run make dep ###" > Makefile.dep.tmp
-	echo "" >> Makefile.dep.tmp
-@]
-
-foreach /local/c in /local/dep/SRCS_SORTED
-	put /local/o /local/c
-	sub {/local/o} {.c$} {.o}
-	sub {/local/c} {.o$} {.c}
-	switch /local/c
-		case {/src_plugins/} end
-		case {$(PLUGDIR)}
-			print [@	gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ @/local/pcb/DEPCFLAGS@ >> Makefile.dep.tmp
-@]; end
-		case {$(LIBRND_PLUGDIR)}
-			print [@	gcc  -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp
-@]; end
-		case {$(LIBRND)}
-			print [@	gcc  -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp
-@]; end
-		case {$(SRC_3RD_DIR)}
-			print [@	gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp
-@]; end
-		case {../src_3rd/}
-			print [@	gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp
-@]; end
-
-		default print [@	gcc -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp
-@]; end
-	end
-end
-
-print [@
-	sed "s^ librnd/^ $(LIBRND)/^g" < Makefile.dep.tmp > Makefile.dep && rm Makefile.dep.tmp
-@]
diff -pruN 1.1.0-3/scconfig/template/compile.tmpasm 1.1.2-1/scconfig/template/compile.tmpasm
--- 1.1.0-3/scconfig/template/compile.tmpasm	2022-08-04 13:50:06.000000000 +0000
+++ 1.1.2-1/scconfig/template/compile.tmpasm	1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-# Generate Makefile code to compile .c -> .o
-# Arguments:
-#  /local/comp/OBJS     list of .o files (assuming each have at least a .c)
-
-print {
-### explicit rules for .c -> .o ###
-}
-
-append /local/comp/CFLAGS {}
-
-foreach /local/o in /local/comp/OBJS
-put /local/c /local/o
-sub /local/c {.o$} {.c}
-switch /local/c
-	case {.*_y[.]c}
-		put /local/extinc [@ -I@/local/c@@]
-		sub /local/extinc {/[^/]*$} {}
-		end
-	case {.*_l[.]c}
-		put /local/extinc [@ -I@/local/c@@]
-		sub /local/extinc {/[^/]*$} {}
-		end
-	default
-		put /local/extinc {}
-		end
-end
-print [@
-@/local/o@: @/local/c@
-	$(CC) -c $(CFLAGS) @/local/comp/CFLAGS@@/local/extinc@ -o @/local/o@ $<
-@]
-end
-
-put /local/comp/OBJS {}
-put /local/comp/CFLAGS {}
-
diff -pruN 1.1.0-3/src/Makefile.dep 1.1.2-1/src/Makefile.dep
--- 1.1.0-3/src/Makefile.dep	2022-10-24 03:57:02.000000000 +0000
+++ 1.1.2-1/src/Makefile.dep	2023-04-13 12:16:07.000000000 +0000
@@ -67,7 +67,10 @@
  ../src/obj_any.h ../src/obj_common.h ../src/obj_arc.h ../src/obj_line.h \
  ../src/obj_poly.h ../src/obj_grp.h ../src/obj_text.h ../src/conf_core.h \
  ../src_plugins/import_gcode/gcode_vm.h \
- ../src_plugins/import_gcode/gcode_exec.h
+ ../src_plugins/import_gcode/gcode_exec.h \
+ ../src_plugins/import_gcode/import_gcode_conf.h \
+ ../src_plugins/import_gcode/conf_internal.c \
+ ../src_plugins/import_gcode/import_gcode_conf_fields.h
 ../src_plugins/import_gerb/gedraw.o: ../src_plugins/import_gerb/gedraw.c \
  ../src_plugins/import_gerb/gedraw.h ../src_plugins/import_gerb/gexpr.h \
  ../src_plugins/import_gerb/gex.tab.h \
@@ -117,7 +120,7 @@ data.o: data.c data.h camv_typedefs.h rt
 draw.o: draw.c obj_any.h camv_typedefs.h data.h rtree.h obj_common.h \
  obj_arc.h obj_line.h obj_poly.h obj_grp.h obj_text.h
 event.o: event.c event.h
-export.o: export.c export.h
+export.o: export.c data.h camv_typedefs.h rtree.h export.h
 gui_act.o: gui_act.c config.h ../config.h build_run.h data.h \
  camv_typedefs.h rtree.h
 main_act.o: main_act.c config.h ../config.h conf_core.h data.h \
@@ -145,7 +148,7 @@ obj_text.o: obj_text.c obj_text.h obj_co
  obj_any.h data.h obj_arc.h obj_line.h obj_poly.h obj_grp.h conf_core.h \
  geo.h ../src_3rd/opc89.h ../src_3rd/gengeo2d/common.h \
  ../src_3rd/gengeo2d/box.h ../src_3rd/gengeo2d/prim.h \
- ../src_3rd/gengeo2d/vect.h ../src_3rd/ttf2bbox/ttf2bbox.h
+ ../src_3rd/gengeo2d/vect.h
 plug_io.o: plug_io.c plug_io.h data.h camv_typedefs.h rtree.h
 plug_io_act.o: plug_io_act.c config.h ../config.h event.h data.h \
  camv_typedefs.h rtree.h plug_io.h plug_io_act.h
diff -pruN 1.1.0-3/src/Makefile.depgen 1.1.2-1/src/Makefile.depgen
--- 1.1.0-3/src/Makefile.depgen	2022-10-24 03:57:02.000000000 +0000
+++ 1.1.2-1/src/Makefile.depgen	1970-01-01 00:00:00.000000000 +0000
@@ -1,59 +0,0 @@
-
-# Generated by configure - DO NOT EDIT
-
-LIBRND=../src/librnd
-
-# Calculate dependencies, assuming all generated files present and
-# SRC_3RD_DIR and PLUGDIR are set
-
-all:
-	echo "### Generated file, do not edit, run make dep ###" > Makefile.dep.tmp
-	echo "" >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/dialogs/dialogs.o -MM $(PLUGDIR)/dialogs/dialogs.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/dialogs/dlg_about.o -MM $(PLUGDIR)/dialogs/dlg_about.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/dialogs/dlg_layer.o -MM $(PLUGDIR)/dialogs/dlg_layer.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/dialogs/dlg_pref_apptab.o -MM $(PLUGDIR)/dialogs/dlg_pref_apptab.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_lpr/lpr.o -MM $(PLUGDIR)/export_lpr/lpr.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_png/export_png.o -MM $(PLUGDIR)/export_png/export_png.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_ps/eps.o -MM $(PLUGDIR)/export_ps/eps.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_ps/export_ps.o -MM $(PLUGDIR)/export_ps/export_ps.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_ps/ps.o -MM $(PLUGDIR)/export_ps/ps.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/export_svg/export_svg.o -MM $(PLUGDIR)/export_svg/export_svg.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/gui/camv_gui.o -MM $(PLUGDIR)/gui/camv_gui.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/gui/layersel.o -MM $(PLUGDIR)/gui/layersel.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/gui/status.o -MM $(PLUGDIR)/gui/status.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_excellon/excellon.o -MM $(PLUGDIR)/import_excellon/excellon.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gcode/gcode.tab.o -MM $(PLUGDIR)/import_gcode/gcode.tab.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gcode/gcode_exec.o -MM $(PLUGDIR)/import_gcode/gcode_exec.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gcode/gcode_lex.o -MM $(PLUGDIR)/import_gcode/gcode_lex.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gcode/gcode_vm.o -MM $(PLUGDIR)/import_gcode/gcode_vm.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gcode/import_gcode.o -MM $(PLUGDIR)/import_gcode/import_gcode.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gerb/gedraw.o -MM $(PLUGDIR)/import_gerb/gedraw.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gerb/geparse.o -MM $(PLUGDIR)/import_gerb/geparse.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gerb/gerb2camv.o -MM $(PLUGDIR)/import_gerb/gerb2camv.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gerb/gex.tab.o -MM $(PLUGDIR)/import_gerb/gex.tab.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/import_gerb/gexpr.o -MM $(PLUGDIR)/import_gerb/gexpr.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/io_tedax/io_tedax.o -MM $(PLUGDIR)/io_tedax/io_tedax.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/io_tedax/parse.o -MM $(PLUGDIR)/io_tedax/parse.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MT $(PLUGDIR)/std_tools/std_tools.o -MM $(PLUGDIR)/std_tools/std_tools.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ -I$(LIBRND)/include/librnd/src_3rd >> Makefile.dep.tmp
-	gcc -MM build_run.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM camv-rnd.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM conf_core.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM crosshair.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM data.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM draw.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM event.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM export.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM gui_act.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM main_act.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_any.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_arc.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_grp.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_line.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_poly.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM obj_text.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM plug_io.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM plug_io_act.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-	gcc -MM rtree.c -I .. -I ../src -Dinline= -pipe -ansi -pedantic -fPIC -I ../src_3rd              -isystem /usr/local/include/librnd/src_3rd -isystem /usr/include/freetype2 -isystem /usr/include/freetype2/freetype -D_PCB_DEP_ >> Makefile.dep.tmp
-
-	sed "s^ librnd/^ $(LIBRND)/^g" < Makefile.dep.tmp > Makefile.dep && rm Makefile.dep.tmp
diff -pruN 1.1.0-3/src/Makefile.in 1.1.2-1/src/Makefile.in
--- 1.1.0-3/src/Makefile.in	2022-10-29 03:40:48.000000000 +0000
+++ 1.1.2-1/src/Makefile.in	2023-04-13 12:16:07.000000000 +0000
@@ -1,8 +1,8 @@
 
 put /local/camv/root {..}
 put /local/camv/CFLAGS {-I.. -I../src -Dinline= }
-put /local/pcb/DEPDEPS {conf_internal.c menu_internal.c }
-put /local/pcb/DEPCFLAGS {-I$(LIBRND)/include/librnd/src_3rd}
+put /local/rnd/DEPDEPS {conf_internal.c menu_internal.c }
+put /local/rnd/DEPCFLAGS {-I$(LIBRND)/include/librnd/src_3rd}
 
 include {template/cc.tmpasm}
 include [@@/local/camv/librnd_template@/debug.tmpasm@]
@@ -29,9 +29,8 @@ put /local/camv/OBJS [@
  build_run.o
 @]
 
+# e.g.$(ROOT)/src_3rd/ttf2bbox/ttf_map.o
 put /local/camv/LIBS_3RD [@
-	$(ROOT)/src_3rd/ttf2bbox/ttf_map.o
-	$(ROOT)/src_3rd/ttf2bbox/ttf2bbox.o
 @]
 
 uniq /local/camv/LIBS_3RD
@@ -41,24 +40,24 @@ put /local/camv/DEPDEPS {}
 
 #---- modules ----#
 # extra rules for modules
-put /local/pcb/CLEANFILES {}
+put /local/rnd/CLEANFILES {}
 put /local/pcb/CLEANRULES {}
 put /local/pcb/EXEDEPS {}
 put /local/pcb/all {}
 put /local/pcb/buildin_init {}
-put /local/pcb/rules/install_ {}
-put /local/pcb/rules/install {}
-put /local/pcb/rules/linstall {}
-put /local/pcb/rules/uninstall {}
-put /local/pcb/mod/OBJS {}
-put /local/pcb/mod/OBJS_C99 {}
-put /local/pcb/mod/CONF {}
-put /local/pcb/mod/LDFLAGS {}
-put /local/pcb/mod/CFLAGS {}
-put /local/pcb/mod/YACC {}
-put /local/pcb/mod/LEX {}
-put /local/pcb/mod/BYACCIC {}
-put /local/pcb/mod/UREGLEX {}
+put /local/rnd/rules/install_ {}
+put /local/rnd/rules/install {}
+put /local/rnd/rules/linstall {}
+put /local/rnd/rules/uninstall {}
+put /local/rnd/mod/OBJS {}
+put /local/rnd/mod/OBJS_C99 {}
+put /local/rnd/mod/CONF {}
+put /local/rnd/mod/LDFLAGS {}
+put /local/rnd/mod/CFLAGS {}
+put /local/rnd/mod/YACC {}
+put /local/rnd/mod/LEX {}
+put /local/rnd/mod/BYACCIC {}
+put /local/rnd/mod/UREGLEX {}
 
 put /local/camv/tmpasm/buildin         {../src_plugins/Buildin.tmpasm}
 put /local/camv/tmpasm/plugin          {../src_plugins/Plugin.tmpasm}
@@ -84,29 +83,23 @@ append /local/camv/LDFLAGS ?/local/camv/
 ### Makefile ###
 
 print [@
-LIBRND_ROOT=@libs/sul/librnd-3rd/root@
-include @libs/sul/librnd-3rd/mak@
-
-PUPLUG=$(LIBRND_LIBDIR)/puplug
-SPHASH=$(LIBRND_LIBDIR)/sphash
-CQUOTE=$(LIBRND_LIBDIR)/librnd3/scconfig/cquote
-
-
-RNDLIB_LDLIBS = -lrnd-poly -lrnd-hid -lrnd-3rd
 ROOT=@/local/camv/root@
+include $(ROOT)/Makefile.conf
+
+RNDLIB_LDLIBS = -lrnd-hid -lrnd-poly -lrnd-font -lrnd-core -lrnd-3rd
 CC=@cc/cc@
-CFLAGS=@/local/camv/CFLAGS@ @?/local/pcb/CFLAGS@ $(CFLAGS_LIBRND) @libs/sul/freetype2/cflags@
+CFLAGS=@/local/camv/CFLAGS@ @?/local/rnd/CFLAGS@ $(CFLAGS_LIBRND)
 C89FLAGS=$(CFLAGS)
 CP=cp
 MKDIR=mkdir -p
-LDFLAGS=@/local/camv/LDFLAGS@ @?/local/pcb/LDFLAGS@ $(LDFLAGS_LIBRND)
+LDFLAGS=@/local/camv/LDFLAGS@ @?/local/rnd/LDFLAGS@ $(LDFLAGS_LIBRND)
 OBJS = @/local/camv/OBJS@
-LDLIBS=$(RNDLIB_LDLIBS) $(LDFLAGS_LIBRND_FUNGW) @libs/sul/freetype2/ldflags@ @libs/ldl@ -lm
+LDLIBS=$(RNDLIB_LDLIBS) $(LDFLAGS_LIBRND_FUNGW) @libs/ldl@ -lm
 PLUGDIR=../src_plugins
 PLUGIDIR=./plugins
 
-LIBMINUID_CFLAGS=@/local/camv/CFLAGS@ @?/local/pcb/CFLAGS@
-LIBMINUID_LDFLAGS=@/local/camv/LDFLAGS@ @?/local/pcb/LDFLAGS@
+LIBMINUID_CFLAGS=@/local/camv/CFLAGS@ @?/local/rnd/CFLAGS@
+LIBMINUID_LDFLAGS=@/local/camv/LDFLAGS@ @?/local/rnd/LDFLAGS@
 
 CLEAN_FILES = camv-rnd conf_core_fields.h buildin.c
 
@@ -128,7 +121,7 @@ buildin.c: $(PLUGDIR)/.builtin.pups $(PU
 	cd $(PLUGDIR) && $(PUPLUG) buildin.c "-" < $(PLUGDIR)/.builtin.pups > ../src/buildin.c
 
 conf_core_fields.h: conf_core.h
-	$(LIBRND_ROOT)/lib/librnd3/scconfig/gen_conf.sh  < conf_core.h > conf_core_fields.h
+	$(GENCONF) < conf_core.h > conf_core_fields.h
 
 conf_core.o: conf_core_fields.h
 
@@ -143,16 +136,12 @@ menu_internal.c: menu.lht $(CQUOTE)
 
 ### src_3rd explicit rules ###
 
-$(ROOT)/src_3rd/ttf2bbox/ttf_map.o $(ROOT)/src_3rd/ttf2bbox/ttf2bbox.o:
-	cd $(ROOT)/src_3rd/ttf2bbox && $(MAKE) ttf_map.o ttf2bbox.o "CC=$(CC)" "CFLAGS=$(CFLAGS)"
-
 ### misc ###
 map_plugins:
 	cd ../src_plugins && ./map_plugins.sh
 
 clean:
-	-rm $(OBJS) camv-rnd @/local/pcb/CLEANFILES@
-	-cd $(ROOT)/src_3rd/ttf2bbox && make clean
+	-rm $(OBJS) camv-rnd @/local/rnd/CLEANFILES@
 
 distclean: clean
 	-rm buildin.c conf_core_fields.h ../plugins/.builtin.pups Makefile conf_internal.c
@@ -163,7 +152,7 @@ install_camvrnd:
 	$(SCCBOX) $(HOW) "camv-rnd$(EXE)" "$(BINDIR)/camv-rnd$(EXE)"
 	$(SCCBOX) $(HOW) "conf_core.lht" "$(CONFDIR)/conf_core.lht"
 	$(SCCBOX) $(HOW) "menu.lht" "$(CONFDIR)/menu.lht"
-@/local/pcb/rules/install_@
+@/local/rnd/rules/install_@
 
 install:
 	$(MAKE) install_camvrnd HOW="install -f"
@@ -179,20 +168,21 @@ uninstall:
 
 #---- rules ----#
 
-put /local/comp/OBJS /local/camv/OBJS
-include {template/compile.tmpasm}
+put /local/comp/OBJS_C89 /local/camv/OBJS
+put /local/comp/C89FLAGS {$(C89FLAGS)}
+include [@@/local/camv/librnd_template@/compile.tmpasm@]
 
 put /local/dep/OUTFN {../src/Makefile.depgen}
 put /local/dep/SRCS /local/camv/OBJS
-put /local/dep/CFLAGS [@@/local/camv/CFLAGS@ -I@/local/camv/librnd_prefix@/include/librnd/src_3rd @libs/sul/freetype2/cflags@@]
+put /local/dep/CFLAGS [@@/local/camv/CFLAGS@ -I@/local/camv/librnd_prefix@/include/librnd/src_3rd@]
 gsub /local/dep/SRCS {.o } {.c }
-include {../scconfig/template/cdep.tmpasm}
+include [@@/local/camv/librnd_template@/cdep.tmpasm@]
 
 print [@
 
 # --- Extra rules from modules ---
 @?/local/camv/MOD_RULES@
-@?/local/pcb/RULES@
+@?/local/rnd/RULES@
 
 @]
 
diff -pruN 1.1.0-3/src/build_run.c 1.1.2-1/src/build_run.c
--- 1.1.0-3/src/build_run.c	2022-08-21 09:28:13.000000000 +0000
+++ 1.1.2-1/src/build_run.c	2022-12-15 09:40:16.000000000 +0000
@@ -1,7 +1,8 @@
 /*
  *                            COPYRIGHT
  *
- *  pcb-rnd, interactive printed circuit board design
+ *  camv-rnd - electronics-related CAM viewer
+ *  (this file was copied from pcb-rnd)
  *  (this file is based on PCB, interactive printed circuit board design)
  *  Copyright (C) 1994,1995,1996,2006 Thomas Nau
  *  pcb-rnd Copyright (C) 2017,2018 Alain Vigne
@@ -23,8 +24,8 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *  Contact:
- *    Project page: http://repo.hu/projects/pcb-rnd
- *    lead developer: http://repo.hu/projects/pcb-rnd/contact.html
+ *    Project page: http://repo.hu/projects/camv-rnd
+ *    lead developer: http://repo.hu/projects/camv-rnd/contact.html
  *    mailing list: pcb-rnd (at) list.repo.hu (send "subscribe")
  *
  */
@@ -34,7 +35,7 @@
 #include <genvector/gds_char.h>
 #include "conf_core.h"
 #include "build_run.h"
-#include <librnd/core/hid_init.h>
+#include <librnd/hid/hid_init.h>
 #include <librnd/core/compat_misc.h>
 
 extern void camv_main_uninit(void);
diff -pruN 1.1.0-3/src/build_run.h 1.1.2-1/src/build_run.h
--- 1.1.0-3/src/build_run.h	2022-06-14 03:21:51.000000000 +0000
+++ 1.1.2-1/src/build_run.h	2022-12-15 09:40:16.000000000 +0000
@@ -1,8 +1,8 @@
 /*
  *                            COPYRIGHT
  *
- *  pcb-rnd, interactive printed circuit board design
- *  (this file is xopied from pcb-rnd, interactive printed circuit board design)
+ *  camv-rnd - electronics-related CAM viewer
+ *  (this file is copied from pcb-rnd, interactive printed circuit board design)
  *  Copyright (C) 1994,1995,1996,2006 Thomas Nau
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,8 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *  Contact:
- *    Project page: http://repo.hu/projects/pcb-rnd
- *    lead developer: http://repo.hu/projects/pcb-rnd/contact.html
+ *    Project page: http://repo.hu/projects/camv-rnd
+ *    lead developer: http://repo.hu/projects/camv-rnd/contact.html
  *    mailing list: pcb-rnd (at) list.repo.hu (send "subscribe")
  *
  */
diff -pruN 1.1.0-3/src/camv-rnd.c 1.1.2-1/src/camv-rnd.c
--- 1.1.0-3/src/camv-rnd.c	2022-11-16 08:07:55.000000000 +0000
+++ 1.1.2-1/src/camv-rnd.c	2023-04-13 13:51:52.000000000 +0000
@@ -31,10 +31,10 @@
 
 /* hidlib headers */
 #include <librnd/core/unit.h>
-#include <librnd/core/hid_init.h>
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid_init.h>
+#include <librnd/hid/hid.h>
 #include <librnd/core/conf.h>
-#include <librnd/core/buildin.hidlib.h>
+#include <librnd/hid/buildin.hidlib.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/plugins.h>
 #include <librnd/poly/polyarea.h>
@@ -107,10 +107,16 @@ void camv_main_uninit(void)
 {
 	gui_support_plugins(0);
 	camv_design_free_fields(&camv);
+	camv_plug_io_act_uninit();
+	rnd_hidlib_uninit(); /* plugin unload */
 }
 
+void camv_font_init(void);
+
 static void camv_main_init(void)
 {
+	camv.lysel = -1;
+	camv_font_init();
 	camv_plug_io_act_init();
 }
 
@@ -119,11 +125,12 @@ int main(int argc, char *argv[])
 {
 	int n;
 	rnd_main_args_t ga;
-	char *command_line_file = NULL;
+	char *command_line_file = NULL, *exec_prefix;
 
 	rnd_app.package = "camv-rnd";
 	rnd_app.version = CAMV_VERS;
 	rnd_app.url = "http://repo.hu/projects/camv-rnd";
+	rnd_app.multi_design = 0;
 	rnd_app.menu_file_paths = menu_file_paths;
 	rnd_app.menu_name_fmt   = menu_name_fmt;
 	rnd_app.default_embedded_menu = camv_menu_internal;
@@ -148,8 +155,10 @@ int main(int argc, char *argv[])
 
 	rnd_main_args_init(&ga, argc, camv_action_args);
 
+	exec_prefix = rnd_exec_prefix(argv[0], BINDIR, BINDIR_TO_EXECPREFIX);
+	rnd_hidlib_init1(conf_core_init, exec_prefix);
+	free(exec_prefix);
 
-	rnd_hidlib_init1(conf_core_init);
 	camv_event_init_app();
 	for(n = 1; n < argc; n++)
 		n += rnd_main_args_add(&ga, argv[n], argv[n+1]);
@@ -178,6 +187,8 @@ TODO("action list");
 		exit(n);
 	}
 
+	/* load files listed on command line, as a group, to keep their order from top to bottom */
+	camv_group_load_begin(&camv);
 	for(n = 0; ga.hid_argc > 0; n++, ga.hid_argc--) {
 		if (camv_io_load(&camv, ga.hid_argv[n]) != 0) {
 			rnd_message(RND_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_file);
@@ -186,8 +197,9 @@ TODO("action list");
 				exit(1);
 		}
 	}
+	camv_group_load_end(&camv);
 
-	if (rnd_main_exported(&ga, &camv.hidlib, camv_is_empty(&camv))) {
+	if (rnd_main_exported(&ga, &camv.hidlib, camv_is_empty(&camv), NULL)) {
 		camv_main_uninit();
 		rnd_main_args_uninit(&ga);
 		exit(0);
diff -pruN 1.1.0-3/src/conf_core.h 1.1.2-1/src/conf_core.h
--- 1.1.0-3/src/conf_core.h	2021-06-20 15:42:54.000000000 +0000
+++ 1.1.2-1/src/conf_core.h	2023-04-13 14:33:27.000000000 +0000
@@ -10,16 +10,12 @@ typedef struct {
 			RND_CFT_COLOR layer[16];       /* default layer colors; when a new layer is created, a color from this list is assigned initially */
 			RND_CFT_COLOR attached;
 		} color;
-		RND_CFT_STRING default_font;     /* path to the ttf of the default font */
+		RND_CFT_STRING default_font;     /* OBSOLETE: used to be path to a ttf font; camv-rnd uses an embedded internal vector font now */
+		RND_CFT_BOOLEAN bbox_debug;      /* enable rendering bounding box of objects, for debugging */
 	} appearance;
 	const struct rc { /* rc */
 		RND_CFT_BOOLEAN error_on_bad_cli_files;
 	} rc;
-	const struct { /* TODO: this should be in the corresponding plugin */
-		const struct {
-			RND_CFT_BOOLEAN laser;         /* Import g-code assuming laser plotting: M3/M4 is laser on, M5 is laser off */
-		} import_gcode;
-	} plugins;
 } conf_core_t;
 
 
diff -pruN 1.1.0-3/src/conf_core.lht 1.1.2-1/src/conf_core.lht
--- 1.1.0-3/src/conf_core.lht	2022-01-06 08:45:07.000000000 +0000
+++ 1.1.2-1/src/conf_core.lht	2022-12-19 06:27:31.000000000 +0000
@@ -1,4 +1,4 @@
-li:pcb-rnd-conf-v1 {
+li:camv-rnd-conf-v1 {
 	ha:overwrite {
 		ha:editor {
 			draw_grid = 1
@@ -9,6 +9,14 @@ li:pcb-rnd-conf-v1 {
 				{0.01 mm}; {0.05 mm}; {0.1 mm}; {0.25 mm}; {0.5 mm}; {1 mm};
 			}
 			grids_idx = 0
+			ha:local_grid {
+				enable = 0
+				radius = 16
+			}
+			ha:global_grid {
+				sparse = 0
+				min_dist_px = 4
+			}
 		}
 		ha:rc {
 			menu_file = {menu.lht}
@@ -45,17 +53,10 @@ li:pcb-rnd-conf-v1 {
 			}
 		}
 		ha:plugins {
-			ha:import_gcode {
-				laser = 0;
-			}
-			ha:hid_gtk {
-				ha:local_grid {
-					enable = 0
-					radius = 16
-				}
-				ha:global_grid {
-					sparse = 0
-					min_dist_px = 4
+			ha:lib_hid_common {
+				ha:cli_history {
+					file = {$(rc.path.home)/.camv-rnd/cli_history}
+					slots = 64
 				}
 			}
 		}
diff -pruN 1.1.0-3/src/conf_core_fields.h 1.1.2-1/src/conf_core_fields.h
--- 1.1.0-3/src/conf_core_fields.h	2021-06-20 15:42:54.000000000 +0000
+++ 1.1.2-1/src/conf_core_fields.h	2023-04-13 14:33:27.000000000 +0000
@@ -1,5 +1,5 @@
-conf_reg(appearance.default_font,             scalar, RND_CFN_STRING,  "appearance",             "default_font",           "path to the ttf of the default font", 0)
+conf_reg(appearance.default_font,             scalar, RND_CFN_STRING,  "appearance",             "default_font",           "OBSOLETE: used to be path to a ttf font; camv-rnd uses an embedded internal vector font now", 0)
+conf_reg(appearance.bbox_debug,               scalar, RND_CFN_BOOLEAN, "appearance",             "bbox_debug",             "enable rendering bounding box of objects, for debugging", 0)
 conf_reg(appearance.color.layer,              array,  RND_CFN_COLOR,   "appearance/color",       "layer",                  "default layer colors; when a new layer is created, a color from this list is assigned initially", 0)
 conf_reg(appearance.color.attached,           scalar, RND_CFN_COLOR,   "appearance/color",       "attached",               "<attached>", 0)
 conf_reg(rc.error_on_bad_cli_files,           scalar, RND_CFN_BOOLEAN, "rc",                     "error_on_bad_cli_files", "<error_on_bad_cli_files>", 0)
-conf_reg(plugins.import_gcode.laser,          scalar, RND_CFN_BOOLEAN, "plugins/import_gcode",   "laser",                  "Import g-code assuming laser plotting: M3/M4 is laser on, M5 is laser off", 0)
diff -pruN 1.1.0-3/src/crosshair.c 1.1.2-1/src/crosshair.c
--- 1.1.0-3/src/crosshair.c	2022-10-24 03:08:53.000000000 +0000
+++ 1.1.2-1/src/crosshair.c	2022-11-19 09:18:55.000000000 +0000
@@ -27,11 +27,11 @@
 #include <stdlib.h>
 
 #include "event.h"
-#include <librnd/core/hidlib_conf.h>
-#include <librnd/core/grid.h>
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_inlines.h>
-#include <librnd/core/tool.h>
+#include <librnd/core/rnd_conf.h>
+#include <librnd/hid/grid.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_inlines.h>
+#include <librnd/hid/tool.h>
 
 #include "data.h"
 #include "crosshair.h"
@@ -39,7 +39,7 @@
 
 rnd_hid_gc_t camv_crosshair_gc;
 
-void camv_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot)
+void camv_hidlib_crosshair_move_to(rnd_design_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot)
 {
 	/* grid fit */
 	abs_x = rnd_grid_fit(abs_x, hl->grid, hl->grid_ox);
@@ -54,7 +54,7 @@ void camv_hidlib_crosshair_move_to(rnd_h
 	rnd_hid_notify_crosshair_change(hl, rnd_true);
 }
 
-void camv_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode)
+void camv_draw_attached(rnd_design_t *hidlib, rnd_bool inhibit_drawing_mode)
 {
 	rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_RESET, 1, NULL);
 	rnd_render->set_drawing_mode(rnd_render, RND_HID_COMP_POSITIVE_XOR, 1, NULL);
diff -pruN 1.1.0-3/src/crosshair.h 1.1.2-1/src/crosshair.h
--- 1.1.0-3/src/crosshair.h	2021-06-04 15:23:28.000000000 +0000
+++ 1.1.2-1/src/crosshair.h	2022-11-20 10:07:13.000000000 +0000
@@ -1,15 +1,15 @@
 #ifndef CAMV_CROSSHAIR_H
 #define CAMV_CROSSHAIR_H
 
-#include "librnd/core/hid.h"
+#include <librnd/hid/hid.h>
 
 void camv_crosshair_gui_init(void);
 void camv_crosshair_gui_uninit(void);
 
 extern rnd_hid_gc_t camv_crosshair_gc;
 
-void camv_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot);
-void camv_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode);
+void camv_hidlib_crosshair_move_to(rnd_design_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot);
+void camv_draw_attached(rnd_design_t *hidlib, rnd_bool inhibit_drawing_mode);
 
 
 #endif
diff -pruN 1.1.0-3/src/data.c 1.1.2-1/src/data.c
--- 1.1.0-3/src/data.c	2021-07-21 14:23:00.000000000 +0000
+++ 1.1.2-1/src/data.c	2023-04-21 12:15:01.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2023 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,9 +44,12 @@ char camv_measurement_layer_name[] = "me
 
 void camv_layer_init(camv_layer_t *layer)
 {
+	static rnd_xform_mx_t ident = RND_XFORM_MX_IDENT;
+
 	memset(layer, 0, sizeof(camv_layer_t));
 	camv_rtree_init(&layer->objs);
 	layer->vis = 1;
+	memcpy(layer->mx, ident, sizeof(ident));
 }
 
 camv_layer_t *camv_layer_new(void)
@@ -56,13 +59,48 @@ camv_layer_t *camv_layer_new(void)
 	return res;
 }
 
-void camv_layer_append_to_design(camv_design_t *camv, camv_layer_t *layer)
+void camv_group_load_begin(camv_design_t *camv)
+{
+	camv->grp_load = 1;
+	camv->grp_idx_last = -1;
+}
+
+void camv_group_load_end(camv_design_t *camv)
 {
+	camv->grp_load = 0;
+}
+
+
+long camv_layer_append_to_design(camv_design_t *camv, camv_layer_t *layer)
+{
+	long res = -1;
+
 	assert(layer->parent == NULL);
-	vtp0_append(&camv->layers, layer);
+	if (camv->grp_load) {
+		if (camv->grp_idx_last < 0) {
+			camv->grp_idx_last = camv->layers.used;
+			res = camv->layers.used;
+			vtp0_append(&camv->layers, layer);
+		}
+		else {
+			vtp0_insert_len(&camv->layers, camv->grp_idx_last, &layer, 1);
+			res = camv->grp_idx_last;
+		}
+	}
+	else {
+		res = camv->layers.used;
+		vtp0_append(&camv->layers, layer);
+	}
 	layer->parent = camv;
+	return res;
 }
 
+long camv_sublayer_append_after(camv_design_t *camv, camv_layer_t *layer, long idx)
+{
+	idx++;
+	vtp0_insert_len(&camv->layers, idx, &layer, 1);
+	return idx;
+}
 
 camv_layer_t *camv_layer_by_name(camv_design_t *camv, const char *name, int alloc)
 {
@@ -191,7 +229,8 @@ void camv_data_bbox(camv_design_t *camv)
 {
 	long lid;
 
-	camv->bbox.x1 = camv->bbox.x2 = camv->bbox.y1 = camv->bbox.y2 = 0;
+	camv->bbox.x1 = camv->bbox.y1 = RND_COORD_MAX;
+	camv->bbox.x2 = camv->bbox.y2 = -RND_COORD_MAX;
 	for(lid = 0; lid < camv->layers.used; lid++) {
 		camv_layer_t *ly = (camv_layer_t *)camv->layers.array[lid];
 		if (ly->objs.size != 0) {
@@ -199,4 +238,16 @@ void camv_data_bbox(camv_design_t *camv)
 			rnd_box_bump_point((rnd_box_t *)&camv->bbox, ly->objs.bbox.x2, ly->objs.bbox.y2);
 		}
 	}
+
+	if ((camv->bbox.x1 == RND_COORD_MAX) || (camv->bbox.y1 == RND_COORD_MAX) || (camv->bbox.x2 == -RND_COORD_MAX) || (camv->bbox.y2 == -RND_COORD_MAX)) {
+		/* empty layer - make it 1*1 mm so it's easier to handle */
+		camv->bbox.x1 = camv->bbox.y1 = 0;
+		camv->bbox.x2 = camv->bbox.y2 = RND_MM_TO_COORD(1);
+	}
+}
+
+void camv_layer_select(camv_design_t *camv, int idx)
+{
+	camv->lysel = idx;
+	rnd_event(&camv->hidlib, CAMV_EVENT_LAYER_SELECTED, "i", idx);
 }
diff -pruN 1.1.0-3/src/data.h 1.1.2-1/src/data.h
--- 1.1.0-3/src/data.h	2022-10-24 03:08:53.000000000 +0000
+++ 1.1.2-1/src/data.h	2023-04-21 12:15:01.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2023 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -31,18 +31,27 @@
 #include "camv_typedefs.h"
 #include <librnd/core/hidlib.h>
 #include <librnd/core/color.h>
-#include "genvector/vtp0.h"
+#include <librnd/font/xform_mx.h>
+#include <genvector/vtp0.h>
 #include "rtree.h"
 
 struct camv_design_s {
-	rnd_hidlib_t hidlib; /* shall be the first */
+	rnd_design_t hidlib; /* shall be the first */
 
 	/* UI states */
 	rnd_coord_t crosshair_x, crosshair_y;
+	unsigned grp_load:1;  /* if 1, we are loading a group */
+	long grp_idx_last;
 
 	/* data */
 	vtp0_t layers; /* to camv_layer_t */
+	int lysel;     /* layer idx (lid) of the currently selected layer */
 	camv_rtree_box_t bbox;
+
+	/* for loaders */
+	struct {
+		long ly;
+	} loader;
 };
 
 struct camv_layer_s {
@@ -51,9 +60,15 @@ struct camv_layer_s {
 	char *name, *short_name;
 	camv_design_t *parent;
 
+
 	unsigned sub:1;       /* if 1, layer is a sub-layer in compositing; a main layer is the first of a series of composite layers; sub layers are not visible in the layer sel */
 	unsigned vis:1;       /* for main layers: UI visibility */
 	unsigned clearing:1;  /* if 1, the layer is negative, clearing layer */
+	unsigned enable_mx:1; /* if 1, apply mx (as a matrix transformation) when drawing */
+
+	/* cache */
+	rnd_xform_mx_t mx;    /* drawin/rendering mx transformation; does not affect bbox */
+	double mx_sx, mx_sy, mx_rotdeg;
 };
 
 extern camv_design_t camv;
@@ -65,7 +80,12 @@ camv_layer_t *camv_layer_new(void);
    non-existing layer if alloc is non-zero; appends to design automatically */
 camv_layer_t *camv_layer_by_name(camv_design_t *camv, const char *name, int alloc);
 
-void camv_layer_append_to_design(camv_design_t *camv, camv_layer_t *layer);
+/* Returns index of the new layer (useful for camv_sublayer_append_after()) */
+long camv_layer_append_to_design(camv_design_t *camv, camv_layer_t *layer);
+
+/* Appends a (typically hidden) sublayer after the last layer of the group
+   at idx; returns new idx for appending more sublayers */
+long camv_sublayer_append_after(camv_design_t *camv, camv_layer_t *layer, long idx);
 
 /* Invent a layer color for a main layer that has non set explicitly */
 void camv_layer_invent_color(camv_design_t *camv, camv_layer_t *layer);
@@ -85,6 +105,15 @@ int camv_is_empty(camv_design_t *camv);
 
 void camv_data_bbox(camv_design_t *camv);
 
+/* Change layer selection. -1 means none selected */
+void camv_layer_select(camv_design_t *camv, int idx);
+
+/* reverse order of layers loaded within a group but place the whole group on
+   top (at the end of the vector) */
+void camv_group_load_begin(camv_design_t *camv);
+void camv_group_load_end(camv_design_t *camv);
+
+
 #define camv_hid_redraw(camv) rnd_render->invalidate_all(rnd_render)
 
 extern char camv_measurement_layer_name[];
diff -pruN 1.1.0-3/src/draw.c 1.1.2-1/src/draw.c
--- 1.1.0-3/src/draw.c	2022-10-24 04:05:35.000000000 +0000
+++ 1.1.2-1/src/draw.c	2023-04-13 14:33:27.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2023 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -24,17 +24,97 @@
  *    mailing list: camv-rnd (at) list.repo.hu (send "subscribe")
  */
 
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_inlines.h>
 #include "obj_any.h"
+#include "conf_core.h"
+
+/* based on https://math.stackexchange.com/questions/13150/extracting-rotation-scale-values-from-2d-transformation-matrix/13165#13165 */
+static double mx_extract_rot(rnd_xform_mx_t mx)
+{
+	return atan2(mx[3], mx[4]) * RND_RAD_TO_DEG;
+}
+static void mx_extract_scale(rnd_xform_mx_t mx, double *sx, double *sy)
+{
+	*sx = sqrt(mx[0] * mx[0] + mx[1] * mx[1]);
+	*sy = sqrt(mx[3] * mx[3] + mx[4] * mx[4]);
+/* This would be needed for mirroring
+	if (mx[0] < 0) *sx = -(*sx);
+	if (mx[4] < 0) *sy = -(*sy);*/
+}
+
+static rnd_coord_t MIN4(rnd_coord_t a, rnd_coord_t b, rnd_coord_t c, rnd_coord_t d)
+{
+	rnd_coord_t min = a;
+	if (b < min) min = b;
+	if (c < min) min = c;
+	if (d < min) min = d;
+	return min;
+}
+
+static rnd_coord_t MAX4(rnd_coord_t a, rnd_coord_t b, rnd_coord_t c, rnd_coord_t d)
+{
+	rnd_coord_t max = a;
+	if (b > max) max = b;
+	if (c > max) max = c;
+	if (d > max) max = d;
+	return max;
+}
 
 void camv_draw_layer(camv_layer_t *ly, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *region, rnd_xform_t *xform_caller)
 {
 	camv_rtree_it_t it;
 	void *o;
+	rnd_xform_mx_t *mx = NULL;
+	camv_rtree_box_t vtmp, *view = (camv_rtree_box_t *)&region->view;
+
+	if (ly->enable_mx) {
+		rnd_coord_t x1, y1, x2, y2, x3, y3, x4, y4, sx, sy;
+		mx = &ly->mx;
+		ly->mx_rotdeg = mx_extract_rot(*mx);
+		mx_extract_scale(*mx, &ly->mx_sx, &ly->mx_sy);
+		x1 = rnd_xform_x((*mx), view->x1, view->y1);
+		y1 = rnd_xform_y((*mx), view->x1, view->y1);
+		x2 = rnd_xform_x((*mx), view->x2, view->y2);
+		y2 = rnd_xform_y((*mx), view->x2, view->y2);
+		x3 = rnd_xform_x((*mx), view->x1, view->y2);
+		y3 = rnd_xform_y((*mx), view->x1, view->y2);
+		x4 = rnd_xform_x((*mx), view->x2, view->y1);
+		y4 = rnd_xform_y((*mx), view->x2, view->y1);
+
+/*		rnd_trace("orig: %mm;%mm %mm;%mm\n", view->x1, view->y1, view->x1, view->y2);*/
+		sx = (view->x2 - view->x1)*2; sy = (view->y2 - view->y1)*2;
+
+		vtmp.x1 = MIN4(x1, x2, x3, x4) - sx; vtmp.y1 = MIN4(y1, y2, y3, y4) - sy;
+		vtmp.x2 = MAX4(x1, x2, x3, x4) + sx; vtmp.y2 = MAX4(y1, y2, y3, y4) + sy;
+
+		view = &vtmp;
+
+/*		rnd_trace("      %mm;%mm %mm;%mm\n", vtmp.x1, vtmp.y1, vtmp.x2, vtmp.y2);*/
+	}
 
-	for(o = camv_rtree_first(&it, &ly->objs, (camv_rtree_box_t *)&region->view); o != NULL; o = camv_rtree_next(&it)) {
+	for(o = camv_rtree_first(&it, &ly->objs, view); o != NULL; o = camv_rtree_next(&it)) {
 		camv_any_obj_t *obj = o;
-		obj->proto.calls->draw(obj, gc);
+		obj->proto.calls->draw(obj, gc, mx);
+		if (conf_core.appearance.bbox_debug) {
+			rnd_coord_t x1, y1, x2, y2;
+
+			if (mx != NULL) {
+				x1 = rnd_xform_x((*mx), obj->proto.bbox.x1, obj->proto.bbox.y1); y1 = rnd_xform_y((*mx), obj->proto.bbox.x1, obj->proto.bbox.y1);
+				x2 = rnd_xform_x((*mx), obj->proto.bbox.x2, obj->proto.bbox.y2); y2 = rnd_xform_y((*mx), obj->proto.bbox.x2, obj->proto.bbox.y2);
+			}
+			else {
+				x1 = obj->proto.bbox.x1; y1 = obj->proto.bbox.y1;
+				x2 = obj->proto.bbox.x2; y2 = obj->proto.bbox.y2;
+			}
+
+			rnd_hid_set_line_cap(gc, rnd_cap_round);
+			rnd_hid_set_line_width(gc, -1);
+			rnd_render->draw_line(gc, x1, y1, x2, y1);
+			rnd_render->draw_line(gc, x2, y1, x2, y2);
+			rnd_render->draw_line(gc, x2, y2, x1, y2);
+			rnd_render->draw_line(gc, x1, y2, x1, y1);
+		}
 	}
 }
 
@@ -65,7 +145,7 @@ void camv_expose_main(rnd_hid_t *hid, co
 
 	/* the HID needs a group set, even if we don't do groups */
 	if (rnd_render->set_layer_group != NULL)
-		rnd_render->set_layer_group(rnd_render, 0, NULL, 0, 0, 0, 0, NULL);
+		rnd_render->set_layer_group(rnd_render, &camv.hidlib, 0, NULL, 0, 0, 0, 0, NULL);
 
 	for(lid = 0; lid < camv.layers.used; lid++) {
 		camv_layer_t *ly = camv.layers.array[lid];
@@ -100,7 +180,7 @@ void camv_expose_main(rnd_hid_t *hid, co
 	rnd_render = save;
 }
 
-void camv_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e)
+void camv_expose_preview(rnd_hid_t *hid, rnd_hid_expose_ctx_t *e)
 {
 
 }
diff -pruN 1.1.0-3/src/draw.h 1.1.2-1/src/draw.h
--- 1.1.0-3/src/draw.h	2022-10-24 02:45:06.000000000 +0000
+++ 1.1.2-1/src/draw.h	2022-12-01 02:54:51.000000000 +0000
@@ -1,6 +1,11 @@
+#ifndef CAMV_DRAW_H
+#define CAMV_DRAW_H
+
 typedef struct rnd_xform_s {
 	int dummy;
 } rnd_xform_t;
 
 void camv_expose_main(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *region, rnd_xform_t *xform_caller);
-void camv_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e);
+void camv_expose_preview(rnd_hid_t *hid, rnd_hid_expose_ctx_t *e);
+
+#endif
diff -pruN 1.1.0-3/src/event.h 1.1.2-1/src/event.h
--- 1.1.0-3/src/event.h	2022-06-14 05:09:52.000000000 +0000
+++ 1.1.2-1/src/event.h	2022-12-04 10:19:54.000000000 +0000
@@ -29,10 +29,14 @@
 
 #include <librnd/core/event.h>
 
+/* Prefix:
+   [d]: per-design: generated for a specific rnd_design_t
+   [a]: per-app: generated once, not targeted or specific for a rnd_design_t
+*/
 enum {
-	CAMV_EVENT_LAYERS_CHANGED = RND_EVENT_app,   /* called after layers or layer groups change (used to be the LayersChanged action) */
-	CAMV_EVENT_LAYERVIS_CHANGED,                 /* called after the visibility of layers has changed */
-	CAMV_EVENT_LAYER_SELECTED,                   /* called when a new layer is selected; args: int layer_id */
+	CAMV_EVENT_LAYERS_CHANGED = RND_EVENT_app,   /* [d] called after layers or layer groups change (used to be the LayersChanged action) */
+	CAMV_EVENT_LAYERVIS_CHANGED,                 /* [d] called after the visibility of layers has changed */
+	CAMV_EVENT_LAYER_SELECTED,                   /* [d] called when a new layer is selected; args: int layer_id */
 	CAMV_EVENT_last                              /* not a real event */
 };
 
diff -pruN 1.1.0-3/src/export.c 1.1.2-1/src/export.c
--- 1.1.0-3/src/export.c	2022-10-24 04:14:00.000000000 +0000
+++ 1.1.2-1/src/export.c	2022-11-27 04:32:12.000000000 +0000
@@ -33,7 +33,7 @@
 #include "data.h"
 #include "export.h"
 
-char *camv_export_filename(rnd_hidlib_t *hl, const char *explicit, const char *ext)
+char *camv_export_filename(rnd_design_t *hl, const char *explicit, const char *ext)
 {
 	camv_design_t *dsg = (camv_design_t *)hl;
 	gds_t tmp;
@@ -45,7 +45,7 @@ char *camv_export_filename(rnd_hidlib_t
 
 	gds_init(&tmp);
 
-	fn = hl->filename; /* try to use project name first */
+	fn = hl->loadname; /* try to use project name first */
 	if ((fn == NULL) && (dsg->layers.used > 0)) { /* if that fails, use first layer's name */
 		camv_layer_t *ly = dsg->layers.array[0];
 		fn = ly->name;
diff -pruN 1.1.0-3/src/export.h 1.1.2-1/src/export.h
--- 1.1.0-3/src/export.h	2022-10-24 02:50:29.000000000 +0000
+++ 1.1.2-1/src/export.h	2022-11-19 08:55:37.000000000 +0000
@@ -1,4 +1,4 @@
 #include <librnd/core/hidlib.h>
 
-char *camv_export_filename(rnd_hidlib_t *hl, const char *explicit, const char *ext);
+char *camv_export_filename(rnd_design_t *hl, const char *explicit, const char *ext);
 
diff -pruN 1.1.0-3/src/font_internal.c 1.1.2-1/src/font_internal.c
--- 1.1.0-3/src/font_internal.c	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/src/font_internal.c	2023-04-13 11:17:54.000000000 +0000
@@ -0,0 +1,818 @@
+/* This file is autogenerated by font2c.sh - DO NOT EDIT */
+
+/* Internal copy of the default font; used when no font file is found */
+
+static embf_line_t embf_line_32[] = {
+	{0,0,0,0}
+};
+static embf_line_t embf_line_33[] = { /* ! */
+	{0, 35,		0, 40,		8},
+	{0, 0,		0, 25,		8}
+};
+static embf_line_t embf_line_34[] = { /* " */
+	{0, 0,		0, 10,		8},
+	{10, 0,		10, 10,		8}
+};
+static embf_line_t embf_line_35[] = { /* # */
+	{0, 25,		20, 25,		8},
+	{0, 15,		20, 15,		8},
+	{15, 10,		15, 30,		8},
+	{5, 10,		5, 30,		8}
+};
+static embf_line_t embf_line_36[] = { /* $ */
+	{15, 5,		20, 10,		8},
+	{5, 5,		15, 5,		8},
+	{0, 10,		5, 5,		8},
+	{0, 10,		0, 15,		8},
+	{0, 15,		5, 20,		8},
+	{5, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		20, 30,		8},
+	{15, 35,		20, 30,		8},
+	{5, 35,		15, 35,		8},
+	{0, 30,		5, 35,		8},
+	{10, 0,		10, 40,		8}
+};
+static embf_line_t embf_line_37[] = { /* % */
+	{0, 5,		0, 10,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		10, 0,		8},
+	{10, 0,		15, 5,		8},
+	{15, 5,		15, 10,		8},
+	{10, 15,		15, 10,		8},
+	{5, 15,		10, 15,		8},
+	{0, 10,		5, 15,		8},
+	{0, 40,		40, 0,		8},
+	{35, 40,		40, 35,		8},
+	{40, 30,		40, 35,		8},
+	{35, 25,		40, 30,		8},
+	{30, 25,		35, 25,		8},
+	{25, 30,		30, 25,		8},
+	{25, 30,		25, 35,		8},
+	{25, 35,		30, 40,		8},
+	{30, 40,		35, 40,		8}
+};
+static embf_line_t embf_line_38[] = { /* & */
+	{0, 35,		5, 40,		8},
+	{0, 5,		0, 15,		8},
+	{0, 5,		5, 0,		8},
+	{0, 25,		15, 10,		8},
+	{5, 40,		10, 40,		8},
+	{10, 40,		20, 30,		8},
+	{0, 15,		25, 40,		8},
+	{5, 0,		10, 0,		8},
+	{10, 0,		15, 5,		8},
+	{15, 5,		15, 10,		8},
+	{0, 25,		0, 35,		8}
+};
+static embf_line_t embf_line_39[] = { /* ' */
+	{0, 10,		10, 0,		8}
+};
+static embf_line_t embf_line_40[] = {
+	{0, 35,		5, 40,		8},
+	{0, 5,		5, 0,		8},
+	{0, 5,		0, 35,		8}
+};
+static embf_line_t embf_line_41[] = {
+	{0, 0,		5, 5,		8},
+	{5, 5,		5, 35,		8},
+	{0, 40,		5, 35,		8}
+};
+static embf_line_t embf_line_42[] = { /* * */
+	{0, 10,		20, 30,		8},
+	{0, 30,		20, 10,		8},
+	{0, 20,		20, 20,		8},
+	{10, 10,		10, 30,		8}
+};
+static embf_line_t embf_line_43[] = { /* + */
+	{0, 20,		20, 20,		8},
+	{10, 10,		10, 30,		8}
+};
+static embf_line_t embf_line_44[] = { /* , */
+	{0, 50,		10, 40,		8}
+};
+static embf_line_t embf_line_45[] = { /* - */
+	{0, 20,		20, 20,		8}
+};
+static embf_line_t embf_line_46[] = { /* . */
+	{0, 40,		5, 40,		8}
+};
+static embf_line_t embf_line_47[] = { /* / */
+	{0, 35,		30, 5,		8}
+};
+static embf_line_t embf_line_48[] = { /* 0 */
+	{0, 35,		5, 40,		8},
+	{0, 5,		0, 35,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{20, 5,		20, 35,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 30,		20, 10,		8}
+};
+static embf_line_t embf_line_49[] = { /* 1 */
+	{0, 8,		8, 0,		8},
+	{8, 0,		8, 40,		8},
+	{0, 40,		15, 40,		8}
+};
+static embf_line_t embf_line_50[] = { /* 2 */
+	{0, 5,		5, 0,		8},
+	{5, 0,		20, 0,		8},
+	{20, 0,		25, 5,		8},
+	{25, 5,		25, 15,		8},
+	{0, 40,		25, 15,		8},
+	{0, 40,		25, 40,		8}
+};
+static embf_line_t embf_line_51[] = { /* 3 */
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 35,		5, 40,		8},
+	{5, 18,		15, 18,		8},
+	{20, 5,		20, 13,		8},
+	{20, 23,		20, 35,		8},
+	{20, 23,		15, 18,		8},
+	{20, 13,		15, 18,		8}
+};
+static embf_line_t embf_line_52[] = { /* 4 */
+	{0, 25,		20, 0,		8},
+	{0, 25,		25, 25,		8},
+	{20, 0,		20, 40,		8}
+};
+static embf_line_t embf_line_53[] = { /* 5 */
+	{0, 0,		20, 0,		8},
+	{0, 0,		0, 20,		8},
+	{0, 20,		5, 15,		8},
+	{5, 15,		15, 15,		8},
+	{15, 15,		20, 20,		8},
+	{20, 20,		20, 35,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_54[] = { /* 6 */
+	{15, 0,		20, 5,		8},
+	{5, 0,		15, 0,		8},
+	{0, 5,		5, 0,		8},
+	{0, 5,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{15, 18,		20, 23,		8},
+	{0, 18,		15, 18,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8},
+	{20, 23,		20, 35,		8}
+};
+static embf_line_t embf_line_55[] = { /* 7 */
+	{5, 40,		25, 0,		8},
+	{0, 0,		25, 0,		8}
+};
+static embf_line_t embf_line_56[] = { /* 8 */
+	{0, 35,		5, 40,		8},
+	{0, 27,		0, 35,		8},
+	{0, 27,		7, 20,		8},
+	{7, 20,		13, 20,		8},
+	{13, 20,		20, 27,		8},
+	{20, 27,		20, 35,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 13,		7, 20,		8},
+	{0, 5,		0, 13,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{20, 5,		20, 13,		8},
+	{13, 20,		20, 13,		8}
+};
+static embf_line_t embf_line_57[] = { /* 9 */
+	{5, 40,		20, 20,		8},
+	{20, 5,		20, 20,		8},
+	{15, 0,		20, 5,		8},
+	{5, 0,		15, 0,		8},
+	{0, 5,		5, 0,		8},
+	{0, 5,		0, 15,		8},
+	{0, 15,		5, 20,		8},
+	{5, 20,		20, 20,		8}
+};
+static embf_line_t embf_line_58[] = { /* : */
+	{0, 15,		5, 15,		8},
+	{0, 25,		5, 25,		8}
+};
+static embf_line_t embf_line_59[] = { /* ; */
+	{0, 40,		10, 30,		8},
+	{10, 15,		10, 20,		8}
+};
+static embf_line_t embf_line_60[] = { /* < */
+	{0, 20,		10, 10,		8},
+	{0, 20,		10, 30,		8}
+};
+static embf_line_t embf_line_61[] = { /* = */
+	{0, 15,		20, 15,		8},
+	{0, 25,		20, 25,		8}
+};
+static embf_line_t embf_line_62[] = { /* > */
+	{0, 10,		10, 20,		8},
+	{0, 30,		10, 20,		8}
+};
+static embf_line_t embf_line_63[] = { /* ? */
+	{10, 20,		10, 25,		8},
+	{10, 35,		10, 40,		8},
+	{0, 5,		0, 10,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{20, 5,		20, 10,		8},
+	{10, 20,		20, 10,		8}
+};
+static embf_line_t embf_line_64[] = { /* @ */
+	{0, 0,		0, 30,		8},
+	{0, 30,		10, 40,		8},
+	{10, 40,		40, 40,		8},
+	{50, 25,		50, 0,		8},
+	{50, 0,		40, -10,		8},
+	{40, -10,		10, -10,		8},
+	{10, -10,		0, 0,		8},
+	{15, 10,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		30, 25,		8},
+	{30, 25,		35, 20,		8},
+	{35, 20,		40, 25,		8},
+	{35, 20,		35, 5,		8},
+	{35, 10,		30, 5,		8},
+	{20, 5,		30, 5,		8},
+	{20, 5,		15, 10,		8},
+	{40, 25,		50, 25,		8}
+};
+static embf_line_t embf_line_65[] = { /* A */
+	{0, 10,		0, 40,		8},
+	{0, 10,		7, 0,		8},
+	{7, 0,		18, 0,		8},
+	{18, 0,		25, 10,		8},
+	{25, 10,		25, 40,		8},
+	{0, 20,		25, 20,		8}
+};
+static embf_line_t embf_line_66[] = { /* B */
+	{0, 40,		20, 40,		8},
+	{20, 40,		25, 35,		8},
+	{25, 23,		25, 35,		8},
+	{20, 18,		25, 23,		8},
+	{5, 18,		20, 18,		8},
+	{5, 0,		5, 40,		8},
+	{0, 0,		20, 0,		8},
+	{20, 0,		25, 5,		8},
+	{25, 5,		25, 13,		8},
+	{20, 18,		25, 13,		8}
+};
+static embf_line_t embf_line_67[] = { /* C */
+	{7, 40,		20, 40,		8},
+	{0, 33,		7, 40,		8},
+	{0, 7,		0, 33,		8},
+	{0, 7,		7, 0,		8},
+	{7, 0,		20, 0,		8}
+};
+static embf_line_t embf_line_68[] = { /* D */
+	{5, 0,		5, 40,		8},
+	{18, 0,		25, 7,		8},
+	{25, 7,		25, 33,		8},
+	{18, 40,		25, 33,		8},
+	{0, 40,		18, 40,		8},
+	{0, 0,		18, 0,		8}
+};
+static embf_line_t embf_line_69[] = { /* E */
+	{0, 18,		15, 18,		8},
+	{0, 40,		20, 40,		8},
+	{0, 0,		0, 40,		8},
+	{0, 0,		20, 0,		8}
+};
+static embf_line_t embf_line_70[] = { /* F */
+	{0, 0,		0, 40,		8},
+	{0, 0,		20, 0,		8},
+	{0, 18,		15, 18,		8}
+};
+static embf_line_t embf_line_71[] = { /* G */
+	{20, 0,		25, 5,		8},
+	{5, 0,		20, 0,		8},
+	{0, 5,		5, 0,		8},
+	{0, 5,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		20, 40,		8},
+	{20, 40,		25, 35,		8},
+	{25, 25,		25, 35,		8},
+	{20, 20,		25, 25,		8},
+	{10, 20,		20, 20,		8}
+};
+static embf_line_t embf_line_72[] = { /* H */
+	{0, 0,		0, 40,		8},
+	{25, 0,		25, 40,		8},
+	{0, 20,		25, 20,		8}
+};
+static embf_line_t embf_line_73[] = { /* I */
+	{0, 0,		10, 0,		8},
+	{5, 0,		5, 40,		8},
+	{0, 40,		10, 40,		8}
+};
+static embf_line_t embf_line_74[] = { /* J */
+	{7, 0,		15, 0,		8},
+	{15, 0,		15, 35,		8},
+	{10, 40,		15, 35,		8},
+	{5, 40,		10, 40,		8},
+	{0, 35,		5, 40,		8},
+	{0, 35,		0, 30,		8}
+};
+static embf_line_t embf_line_75[] = { /* K */
+	{0, 0,		0, 40,		8},
+	{0, 20,		20, 0,		8},
+	{0, 20,		20, 40,		8}
+};
+static embf_line_t embf_line_76[] = { /* L */
+	{0, 0,		0, 40,		8},
+	{0, 40,		20, 40,		8}
+};
+static embf_line_t embf_line_77[] = { /* M */
+	{0, 0,		0, 40,		8},
+	{0, 0,		15, 20,		8},
+	{15, 20,		30, 0,		8},
+	{30, 0,		30, 40,		8}
+};
+static embf_line_t embf_line_78[] = { /* N */
+	{0, 0,		0, 40,		8},
+	{0, 0,		25, 40,		8},
+	{25, 0,		25, 40,		8}
+};
+static embf_line_t embf_line_79[] = { /* O */
+	{0, 5,		0, 35,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{20, 5,		20, 35,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_80[] = { /* P */
+	{5, 0,		5, 40,		8},
+	{0, 0,		20, 0,		8},
+	{20, 0,		25, 5,		8},
+	{25, 5,		25, 15,		8},
+	{20, 20,		25, 15,		8},
+	{5, 20,		20, 20,		8}
+};
+static embf_line_t embf_line_81[] = { /* Q */
+	{0, 5,		0, 35,		8},
+	{0, 5,		5, 0,		8},
+	{5, 0,		15, 0,		8},
+	{15, 0,		20, 5,		8},
+	{20, 5,		20, 30,		8},
+	{10, 40,		20, 30,		8},
+	{5, 40,		10, 40,		8},
+	{0, 35,		5, 40,		8},
+	{10, 25,		20, 40,		8}
+};
+static embf_line_t embf_line_82[] = { /* R */
+	{0, 0,		20, 0,		8},
+	{20, 0,		25, 5,		8},
+	{25, 5,		25, 15,		8},
+	{20, 20,		25, 15,		8},
+	{5, 20,		20, 20,		8},
+	{5, 0,		5, 40,		8},
+	{13, 20,		25, 40,		8}
+};
+static embf_line_t embf_line_83[] = { /* S */
+	{20, 0,		25, 5,		8},
+	{5, 0,		20, 0,		8},
+	{0, 5,		5, 0,		8},
+	{0, 5,		0, 15,		8},
+	{0, 15,		5, 20,		8},
+	{5, 20,		20, 20,		8},
+	{20, 20,		25, 25,		8},
+	{25, 25,		25, 35,		8},
+	{20, 40,		25, 35,		8},
+	{5, 40,		20, 40,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_84[] = { /* T */
+	{0, 0,		20, 0,		8},
+	{10, 0,		10, 40,		8}
+};
+static embf_line_t embf_line_85[] = { /* U */
+	{0, 0,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8},
+	{20, 0,		20, 35,		8}
+};
+static embf_line_t embf_line_86[] = { /* V */
+	{0, 0,		10, 40,		8},
+	{10, 40,		20, 0,		8}
+};
+static embf_line_t embf_line_87[] = { /* W */
+	{0, 0,		0, 20,		8},
+	{0, 20,		5, 40,		8},
+	{5, 40,		15, 20,		8},
+	{15, 20,		25, 40,		8},
+	{25, 40,		30, 20,		8},
+	{30, 20,		30, 0,		8}
+};
+static embf_line_t embf_line_88[] = { /* X */
+	{0, 40,		25, 0,		8},
+	{0, 0,		25, 40,		8}
+};
+static embf_line_t embf_line_89[] = { /* Y */
+	{0, 0,		10, 20,		8},
+	{10, 20,		20, 0,		8},
+	{10, 20,		10, 40,		8}
+};
+static embf_line_t embf_line_90[] = { /* Z */
+	{0, 0,		25, 0,		8},
+	{0, 40,		25, 0,		8},
+	{0, 40,		25, 40,		8}
+};
+static embf_line_t embf_line_91[] = { /* [ */
+	{0, 0,		5, 0,		8},
+	{0, 0,		0, 40,		8},
+	{0, 40,		5, 40,		8}
+};
+static embf_line_t embf_line_92[] = { /* \ */
+	{0, 5,		30, 35,		8}
+};
+static embf_line_t embf_line_93[] = { /* ] */
+	{0, 0,		5, 0,		8},
+	{5, 0,		5, 40,		8},
+	{0, 40,		5, 40,		8}
+};
+static embf_line_t embf_line_94[] = { /* ^ */
+	{0, 5,		5, 0,		8},
+	{5, 0,		10, 5,		8}
+};
+static embf_line_t embf_line_95[] = { /* _ */
+	{0, 40,		20, 40,		8}
+};
+static embf_line_t embf_line_97[] = { /* a */
+	{15, 20,		20, 25,		8},
+	{5, 20,		15, 20,		8},
+	{0, 25,		5, 20,		8},
+	{0, 25,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{20, 20,		20, 35,		8},
+	{20, 35,		25, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8}
+};
+static embf_line_t embf_line_98[] = { /* b */
+	{0, 0,		0, 40,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8},
+	{20, 25,		20, 35,		8},
+	{15, 20,		20, 25,		8},
+	{5, 20,		15, 20,		8},
+	{0, 25,		5, 20,		8}
+};
+static embf_line_t embf_line_99[] = { /* c */
+	{5, 20,		20, 20,		8},
+	{0, 25,		5, 20,		8},
+	{0, 25,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		20, 40,		8}
+};
+static embf_line_t embf_line_100[] = { /* d */
+	{20, 0,		20, 40,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 35,		5, 40,		8},
+	{0, 25,		0, 35,		8},
+	{0, 25,		5, 20,		8},
+	{5, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8}
+};
+static embf_line_t embf_line_101[] = { /* e */
+	{5, 40,		20, 40,		8},
+	{0, 35,		5, 40,		8},
+	{0, 25,		0, 35,		8},
+	{0, 25,		5, 20,		8},
+	{5, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{0, 30,		20, 30,		8},
+	{20, 30,		20, 25,		8}
+};
+static embf_line_t embf_line_102[] = { /* f */
+	{5, 5,		5, 40,		8},
+	{5, 5,		10, 0,		8},
+	{10, 0,		15, 0,		8},
+	{0, 20,		10, 20,		8}
+};
+static embf_line_t embf_line_103[] = { /* g */
+	{15, 20,		20, 25,		8},
+	{5, 20,		15, 20,		8},
+	{0, 25,		5, 20,		8},
+	{0, 25,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8},
+	{0, 50,		5, 55,		8},
+	{5, 55,		15, 55,		8},
+	{15, 55,		20, 50,		8},
+	{20, 20,		20, 50,		8}
+};
+static embf_line_t embf_line_104[] = { /* h */
+	{0, 0,		0, 40,		8},
+	{0, 25,		5, 20,		8},
+	{5, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		20, 40,		8}
+};
+static embf_line_t embf_line_105[] = { /* i */
+	{0, 10,		0, 11,		10},
+	{0, 25,		0, 40,		8}
+};
+static embf_line_t embf_line_106[] = { /* j */
+	{5, 10,		5, 11,		10},
+	{5, 25,		5, 50,		8},
+	{0, 55,		5, 50,		8}
+};
+static embf_line_t embf_line_107[] = { /* k */
+	{0, 0,		0, 40,		8},
+	{0, 25,		15, 40,		8},
+	{0, 25,		10, 15,		8}
+};
+static embf_line_t embf_line_108[] = { /* l */
+	{0, 0,		0, 35,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_109[] = { /* m */
+	{5, 25,		5, 40,		8},
+	{5, 25,		10, 20,		8},
+	{10, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		20, 40,		8},
+	{20, 25,		25, 20,		8},
+	{25, 20,		30, 20,		8},
+	{30, 20,		35, 25,		8},
+	{35, 25,		35, 40,		8},
+	{0, 20,		5, 25,		8}
+};
+static embf_line_t embf_line_110[] = { /* n */
+	{5, 25,		5, 40,		8},
+	{5, 25,		10, 20,		8},
+	{10, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		20, 40,		8},
+	{0, 20,		5, 25,		8}
+};
+static embf_line_t embf_line_111[] = { /* o */
+	{0, 25,		0, 35,		8},
+	{0, 25,		5, 20,		8},
+	{5, 20,		15, 20,		8},
+	{15, 20,		20, 25,		8},
+	{20, 25,		20, 35,		8},
+	{15, 40,		20, 35,		8},
+	{5, 40,		15, 40,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_112[] = { /* p */
+	{5, 25,		5, 55,		8},
+	{0, 20,		5, 25,		8},
+	{5, 25,		10, 20,		8},
+	{10, 20,		20, 20,		8},
+	{20, 20,		25, 25,		8},
+	{25, 25,		25, 35,		8},
+	{20, 40,		25, 35,		8},
+	{10, 40,		20, 40,		8},
+	{5, 35,		10, 40,		8}
+};
+static embf_line_t embf_line_113[] = { /* q */
+	{20, 25,		20, 55,		8},
+	{15, 20,		20, 25,		8},
+	{5, 20,		15, 20,		8},
+	{0, 25,		5, 20,		8},
+	{0, 25,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8}
+};
+static embf_line_t embf_line_114[] = { /* r */
+	{5, 25,		5, 40,		8},
+	{5, 25,		10, 20,		8},
+	{10, 20,		20, 20,		8},
+	{0, 20,		5, 25,		8}
+};
+static embf_line_t embf_line_115[] = { /* s */
+	{5, 40,		20, 40,		8},
+	{20, 40,		25, 35,		8},
+	{20, 30,		25, 35,		8},
+	{5, 30,		20, 30,		8},
+	{0, 25,		5, 30,		8},
+	{0, 25,		5, 20,		8},
+	{5, 20,		20, 20,		8},
+	{20, 20,		25, 25,		8},
+	{0, 35,		5, 40,		8}
+};
+static embf_line_t embf_line_116[] = { /* t */
+	{5, 0,		5, 35,		8},
+	{5, 35,		10, 40,		8},
+	{0, 15,		10, 15,		8}
+};
+static embf_line_t embf_line_117[] = { /* u */
+	{0, 20,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8},
+	{20, 20,		20, 35,		8}
+};
+static embf_line_t embf_line_118[] = { /* v */
+	{0, 20,		10, 40,		8},
+	{20, 20,		10, 40,		8}
+};
+static embf_line_t embf_line_119[] = { /* w */
+	{0, 20,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{5, 40,		10, 40,		8},
+	{10, 40,		15, 35,		8},
+	{15, 20,		15, 35,		8},
+	{15, 35,		20, 40,		8},
+	{20, 40,		25, 40,		8},
+	{25, 40,		30, 35,		8},
+	{30, 20,		30, 35,		8}
+};
+static embf_line_t embf_line_120[] = { /* x */
+	{0, 20,		20, 40,		8},
+	{0, 40,		20, 20,		8}
+};
+static embf_line_t embf_line_121[] = { /* y */
+	{0, 20,		0, 35,		8},
+	{0, 35,		5, 40,		8},
+	{20, 20,		20, 50,		8},
+	{15, 55,		20, 50,		8},
+	{5, 55,		15, 55,		8},
+	{0, 50,		5, 55,		8},
+	{5, 40,		15, 40,		8},
+	{15, 40,		20, 35,		8}
+};
+static embf_line_t embf_line_122[] = { /* z */
+	{0, 20,		20, 20,		8},
+	{0, 40,		20, 20,		8},
+	{0, 40,		20, 40,		8}
+};
+static embf_line_t embf_line_123[] = {
+	{5, 5,		10, 0,		8},
+	{5, 5,		5, 15,		8},
+	{0, 20,		5, 15,		8},
+	{0, 20,		5, 25,		8},
+	{5, 25,		5, 35,		8},
+	{5, 35,		10, 40,		8}
+};
+static embf_line_t embf_line_124[] = { /* | */
+	{0, 0,		0, 40,		8}
+};
+static embf_line_t embf_line_125[] = {
+	{0, 0,		5, 5,		8},
+	{5, 5,		5, 15,		8},
+	{5, 15,		10, 20,		8},
+	{5, 25,		10, 20,		8},
+	{5, 25,		5, 35,		8},
+	{0, 40,		5, 35,		8}
+};
+static embf_line_t embf_line_126[] = { /* ~ */
+	{0, 25,		5, 20,		8},
+	{5, 20,		10, 20,		8},
+	{10, 20,		15, 25,		8},
+	{15, 25,		20, 25,		8},
+	{20, 25,		25, 20,		8}
+};
+/***************************************************************/
+static int embf_minx =  0;
+static int embf_miny =  -10;
+static int embf_maxx =  50;
+static int embf_maxy =  55;
+static embf_font_t embf_font[] = {
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{0, NULL, 0},
+	{18, embf_line_32, 0},
+	{12, embf_line_33, 2},
+	{12, embf_line_34, 2},
+	{12, embf_line_35, 4},
+	{12, embf_line_36, 12},
+	{12, embf_line_37, 17},
+	{12, embf_line_38, 11},
+	{12, embf_line_39, 1},
+	{12, embf_line_40, 3},
+	{12, embf_line_41, 3},
+	{12, embf_line_42, 4},
+	{12, embf_line_43, 2},
+	{12, embf_line_44, 1},
+	{12, embf_line_45, 1},
+	{12, embf_line_46, 1},
+	{12, embf_line_47, 1},
+	{12, embf_line_48, 9},
+	{12, embf_line_49, 3},
+	{12, embf_line_50, 6},
+	{12, embf_line_51, 11},
+	{12, embf_line_52, 3},
+	{12, embf_line_53, 9},
+	{12, embf_line_54, 10},
+	{12, embf_line_55, 2},
+	{12, embf_line_56, 15},
+	{12, embf_line_57, 8},
+	{12, embf_line_58, 2},
+	{12, embf_line_59, 2},
+	{12, embf_line_60, 2},
+	{12, embf_line_61, 2},
+	{12, embf_line_62, 2},
+	{12, embf_line_63, 8},
+	{12, embf_line_64, 17},
+	{12, embf_line_65, 6},
+	{12, embf_line_66, 10},
+	{12, embf_line_67, 5},
+	{12, embf_line_68, 6},
+	{12, embf_line_69, 4},
+	{12, embf_line_70, 3},
+	{12, embf_line_71, 10},
+	{12, embf_line_72, 3},
+	{12, embf_line_73, 3},
+	{12, embf_line_74, 6},
+	{12, embf_line_75, 3},
+	{12, embf_line_76, 2},
+	{12, embf_line_77, 4},
+	{12, embf_line_78, 3},
+	{12, embf_line_79, 8},
+	{12, embf_line_80, 6},
+	{12, embf_line_81, 9},
+	{12, embf_line_82, 7},
+	{12, embf_line_83, 11},
+	{12, embf_line_84, 2},
+	{12, embf_line_85, 5},
+	{12, embf_line_86, 2},
+	{12, embf_line_87, 6},
+	{12, embf_line_88, 2},
+	{12, embf_line_89, 3},
+	{12, embf_line_90, 3},
+	{12, embf_line_91, 3},
+	{12, embf_line_92, 1},
+	{12, embf_line_93, 3},
+	{12, embf_line_94, 2},
+	{12, embf_line_95, 1},
+	{0, NULL, 0},
+	{12, embf_line_97, 9},
+	{12, embf_line_98, 8},
+	{12, embf_line_99, 5},
+	{12, embf_line_100, 8},
+	{12, embf_line_101, 8},
+	{10, embf_line_102, 4},
+	{12, embf_line_103, 11},
+	{12, embf_line_104, 5},
+	{10, embf_line_105, 2},
+	{10, embf_line_106, 3},
+	{12, embf_line_107, 3},
+	{10, embf_line_108, 2},
+	{12, embf_line_109, 10},
+	{12, embf_line_110, 6},
+	{12, embf_line_111, 8},
+	{12, embf_line_112, 9},
+	{12, embf_line_113, 8},
+	{12, embf_line_114, 4},
+	{12, embf_line_115, 9},
+	{10, embf_line_116, 3},
+	{12, embf_line_117, 5},
+	{12, embf_line_118, 2},
+	{12, embf_line_119, 9},
+	{12, embf_line_120, 2},
+	{12, embf_line_121, 8},
+	{12, embf_line_122, 3},
+	{12, embf_line_123, 6},
+	{12, embf_line_124, 1},
+	{12, embf_line_125, 6},
+	{12, embf_line_126, 5},
+	{0, NULL, 0}
+};
diff -pruN 1.1.0-3/src/gui_act.c 1.1.2-1/src/gui_act.c
--- 1.1.0-3/src/gui_act.c	2022-10-26 11:24:59.000000000 +0000
+++ 1.1.2-1/src/gui_act.c	2023-03-09 15:33:39.000000000 +0000
@@ -28,6 +28,7 @@
 
 #include <librnd/config.h>
 #include <librnd/core/actions.h>
+#include <librnd/hid/hid.h>
 #include <librnd/core/compat_misc.h>
 
 #include "build_run.h"
@@ -57,16 +58,144 @@ fgw_error_t camv_act_Zoom(fgw_arg_t *res
 	if ((argv[1].type & FGW_STR) == FGW_STR) {
 		if (strcmp(argv[1].val.str, "auto_first") == 0) { /* zoom to extent when the first file is loaded (called from the menu file) */
 			if (camv.layers.used == 1)
-				return rnd_actionv_bin(RND_ACT_HIDLIB, "rnd_zoom", res, 0, argv);
+				return rnd_actionv_bin(RND_ACT_DESIGN, "rnd_zoom", res, 0, argv);
 			return 0;
 		}
 	}
-	return rnd_actionv_bin(RND_ACT_HIDLIB, "rnd_zoom", res, argc, argv);
+	return rnd_actionv_bin(RND_ACT_DESIGN, "rnd_zoom", res, argc, argv);
+}
+
+#define get_layer(ly, idx, actname) \
+	if ((argv[1].type & FGW_STR) == FGW_STR) { \
+		const char *targets = NULL; \
+		RND_ACT_CONVARG(1, FGW_STR, actname, targets = argv[1].val.str); \
+		if ((targets[0] == '@') && (targets[1] == '\0')) { \
+			idx = camv->lysel; \
+			if ((idx < 0) || (idx >= camv->layers.used)) { \
+				rnd_message(RND_MSG_ERROR, "No layer selected\n"); \
+				RND_ACT_IRES(-1); \
+				return FGW_SUCCESS; \
+			} \
+		} \
+		else \
+			RND_ACT_CONVARG(1, FGW_INT, actname, idx = argv[1].val.nat_int); \
+	} \
+	else \
+		RND_ACT_CONVARG(1, FGW_INT, actname, idx = argv[1].val.nat_int); \
+	\
+	if ((idx < 0) || (idx >= camv->layers.used)) { \
+		rnd_message(RND_MSG_ERROR, "No such layer\n"); \
+		RND_ACT_IRES(-1); \
+		return FGW_SUCCESS; \
+	} \
+	ly = camv->layers.array[idx];
+
+
+
+static const char camv_acts_RotateLayer[] = "RotateLayer(@|idx, [deg])";
+static const char camv_acth_RotateLayer[] = "Rotates the layer addressed (@ for current) by deg degrees CCW. (The transformation is added to the current transformation matrix of the layer.)";
+static fgw_error_t camv_act_RotateLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	camv_design_t *camv = (camv_design_t *)hl;
+	double deg;
+	camv_layer_t *ly;
+	int idx;
+
+	get_layer(ly, idx, RotateLayer);
+
+	RND_ACT_CONVARG(2, FGW_DOUBLE, RotateLayer, deg = argv[2].val.nat_double);
+
+	if (deg == 0) {
+		char *rds = rnd_hid_prompt_for(hl, "Please rotation in degrees", "15", "rotate layer");
+		deg = strtod(rds, NULL);
+		free(rds);
+		if (deg == 0)
+			return -1;
+	}
+
+	rnd_xform_mx_rotate(ly->mx, -deg);
+	ly->enable_mx = 1;
+
+	RND_ACT_IRES(0);
+	return FGW_SUCCESS;
+}
+
+static const char camv_acts_TranslateLayer[] = "TranslateLayer(@|idx, dx, dy)";
+static const char camv_acth_TranslateLayer[] = "Translates (moves) the layer addressed (@ for current) by dx and dy. (The transformation is added to the current transformation matrix of the layer.)";
+static fgw_error_t camv_act_TranslateLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	camv_design_t *camv = (camv_design_t *)hl;
+	rnd_coord_t dx, dy;
+	camv_layer_t *ly;
+	int idx;
+
+	get_layer(ly, idx, TranslateLayer);
+
+	RND_ACT_CONVARG(2, FGW_COORD_, TranslateLayer, dx = fgw_coord(&argv[2]));
+	RND_ACT_CONVARG(3, FGW_COORD_, TranslateLayer, dy = fgw_coord(&argv[3]));
+
+	rnd_xform_mx_translate(ly->mx, dx, dy);
+	ly->enable_mx = 1;
+
+	RND_ACT_IRES(0);
+	return FGW_SUCCESS;
+}
+
+static const char camv_acts_ScaleLayer[] = "ScaleLayer(@|idx, [sx, [sy]])";
+static const char camv_acth_ScaleLayer[] = "Scales the layer addressed (@ for current) by the factor of sx and sy. If only sx is specified, it is used as sy as well. (The transformation is added to the current transformation matrix of the layer.)";
+static fgw_error_t camv_act_ScaleLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	camv_design_t *camv = (camv_design_t *)hl;
+	double sx = 0, sy;
+	camv_layer_t *ly;
+	int idx;
+
+	get_layer(ly, idx, ScaleLayer);
+
+	RND_ACT_MAY_CONVARG(2, FGW_DOUBLE, ScaleLayer, sx = sy = argv[2].val.nat_double);
+	RND_ACT_MAY_CONVARG(3, FGW_DOUBLE, ScaleLayer, sy = argv[3].val.nat_double);
+
+	if (sx == 0) {
+		char *scs = rnd_hid_prompt_for(hl, "Please specify scale factor", "1.5", "scale layer");
+		sx = sy = strtod(scs, NULL);
+		free(scs);
+		if (sx == 0)
+			return -1;
+	}
+
+	rnd_xform_mx_scale(ly->mx, sx, sy);
+	ly->enable_mx = 1;
+
+	RND_ACT_IRES(0);
+	return FGW_SUCCESS;
+}
+
+static const char camv_acts_ResetLayer[] = "ResetLayer(@|idx, sx[, sy])";
+static const char camv_acth_ResetLayer[] = "Reset the transformation matrix of the layer.";
+static fgw_error_t camv_act_ResetLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	static rnd_xform_mx_t ident = RND_XFORM_MX_IDENT;
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	camv_design_t *camv = (camv_design_t *)hl;
+	camv_layer_t *ly;
+	int idx;
+
+	get_layer(ly, idx, ResetLayer);
+	memcpy(ly->mx, ident, sizeof(ident));
+	RND_ACT_IRES(0);
+	return FGW_SUCCESS;
 }
 
 static rnd_action_t gui_action_list[] = {
 	{"Quit", camv_act_Quit, camv_acth_Quit, camv_acts_Quit},
 	{"Zoom", camv_act_Zoom, camv_acth_Zoom, camv_acts_Zoom},
+	{"RotateLayer", camv_act_RotateLayer, camv_acth_RotateLayer, camv_acts_RotateLayer},
+	{"TranslateLayer", camv_act_TranslateLayer, camv_acth_TranslateLayer, camv_acts_TranslateLayer},
+	{"ScaleLayer", camv_act_ScaleLayer, camv_acth_ScaleLayer, camv_acts_ScaleLayer},
+	{"ResetLayer", camv_act_ResetLayer, camv_acth_ResetLayer, camv_acts_ResetLayer}
 };
 
 void gui_act_init(void)
diff -pruN 1.1.0-3/src/main_act.c 1.1.2-1/src/main_act.c
--- 1.1.0-3/src/main_act.c	2022-07-26 04:46:28.000000000 +0000
+++ 1.1.2-1/src/main_act.c	2022-11-27 04:32:12.000000000 +0000
@@ -30,7 +30,7 @@
 #include "config.h"
 #include <librnd/core/actions.h>
 #include "conf_core.h"
-#include <librnd/core/hid_init.h>
+#include <librnd/hid/hid_init.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/safe_fs.h>
 #include "data.h"
@@ -228,12 +228,12 @@ fgw_error_t camv_act_System(fgw_arg_t *r
 	RND_ACT_CONVARG(1, FGW_STR, System, cmd = argv[1].val.str);
 	RND_ACT_IRES(0);
 
-/*	rnd_setenv("CAMV_RND_LAYER_FILE_NAME", RND_ACT_HIDLIB->filename == NULL ? "" : RND_ACT_HIDLIB->filename, 1);*/
+/*	rnd_setenv("CAMV_RND_LAYER_FILE_NAME", RND_ACT_DESIGN->loadname == NULL ? "" : RND_ACT_DESIGN->loadname, 1);*/
 	rnd_snprintf(tmp, sizeof(tmp), "%mm", camv.crosshair_x);
 	rnd_setenv("CAMV_RND_CROSSHAIR_X_MM", tmp, 1);
 	rnd_snprintf(tmp, sizeof(tmp), "%mm", camv.crosshair_y);
 	rnd_setenv("CAMV_RND_CROSSHAIR_Y_MM", tmp, 1);
-	RND_ACT_IRES(rnd_system(RND_ACT_HIDLIB, cmd));
+	RND_ACT_IRES(rnd_system(RND_ACT_DESIGN, cmd));
 	return 0;
 }
 
@@ -246,7 +246,7 @@ fgw_error_t camv_act_ExecuteFile(fgw_arg
 	const char *fname;
 
 	RND_ACT_CONVARG(1, FGW_STR, ExecuteFile, fname = argv[1].val.str);
-	RND_ACT_IRES(rnd_act_execute_file(RND_ACT_HIDLIB, fname));
+	RND_ACT_IRES(rnd_act_execute_file(RND_ACT_DESIGN, fname));
 	return 0;
 }
 
diff -pruN 1.1.0-3/src/menu.lht 1.1.2-1/src/menu.lht
--- 1.1.0-3/src/menu.lht	2022-10-24 03:53:38.000000000 +0000
+++ 1.1.2-1/src/menu.lht	2023-04-13 16:40:05.000000000 +0000
@@ -46,6 +46,7 @@ ha:rnd-menu-v1 {
 			li:submenu {
 				ha:New                  = { li:a={{<key>f;<key>n}; {Ctrl<Key>n};}; action=Layer(DelAll) }
 				ha:Load...              = { a={<key>f;<key>o}; action={Load(); Zoom(auto_first);} }
+				ha:Save design...       = { a={<key>f;<key>s}; action=Save(); tip="Save all layers of the desig into a file that can be loaded later"}
 				-
 				ha:Loader configuration {
 					li:submenu {
@@ -67,7 +68,7 @@ ha:rnd-menu-v1 {
 			ha:Grid {
 				li:submenu {
 					ha:Enable visible grid        = { a={<key>g; <key>v}; checked=editor/draw_grid; action=conf(toggle, editor/draw_grid, design) }
-					ha:Enable local grid          = { a={<key>g; <key>l}; checked=plugins/hid_gtk/local_grid/enable; action=conf(toggle, plugins/hid_gtk/local_grid/enable, design) }
+					ha:Enable local grid          = { a={<key>g; <key>l}; checked=editor/local_grid/enable; action=conf(toggle, editor/local_grid/enable, design) }
 					ha:Grid units {
 						li:submenu {
 							ha:mil                    = { a={<key>g; <key>i}; checked=ChkGridUnits(mil); action=SetUnits(mil); update_on={editor/grid_unit} }
@@ -93,17 +94,17 @@ ha:rnd-menu-v1 {
 					}
 					ha:Grid properties = {
 						li:submenu {
-							ha:Enable local grid      = { checked=plugins/hid_gtk/local_grid/enable; action=conf(toggle, plugins/hid_gtk/local_grid/enable, design) }
+							ha:Enable local grid      = { checked=editor/local_grid/enable; action=conf(toggle, editor/local_grid/enable, design) }
 							-
-							ha:local grid radius 4    = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 4)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 4, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
-							ha:local grid radius 8    = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 8)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 8, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
-							ha:local grid radius 16   = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 16)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 16, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
-							ha:local grid radius 32   = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 32)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 32, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
+							ha:local grid radius 4    = { checked={conf(iseq, editor/local_grid/radius, 4)}; li:action={conf(set, editor/local_grid/radius, 4, design); conf(set, editor/local_grid/enable, 1, design) } update_on={} }
+							ha:local grid radius 8    = { checked={conf(iseq, editor/local_grid/radius, 8)}; li:action={conf(set, editor/local_grid/radius, 8, design); conf(set, editor/local_grid/enable, 1, design) } update_on={} }
+							ha:local grid radius 16   = { checked={conf(iseq, editor/local_grid/radius, 16)}; li:action={conf(set, editor/local_grid/radius, 16, design); conf(set, editor/local_grid/enable, 1, design) } update_on={} }
+							ha:local grid radius 32   = { checked={conf(iseq, editor/local_grid/radius, 32)}; li:action={conf(set, editor/local_grid/radius, 32, design); conf(set, editor/local_grid/enable, 1, design) } update_on={} }
 							-
-							ha:sparse global grid     = { checked=plugins/hid_gtk/global_grid/sparse; action=conf(toggle, plugins/hid_gtk/global_grid/sparse, design) }
-							ha:global grid density 4  = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 4)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 4, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
-							ha:global grid density 8  = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 8)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 8, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
-							ha:global grid density 16 = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 16)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 16, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
+							ha:sparse global grid     = { checked=editor/global_grid/sparse; action=conf(toggle, editor/global_grid/sparse, design) }
+							ha:global grid density 4  = { checked={conf(iseq, editor/global_grid/min_dist_px, 4)}; li:action={conf(set, editor/global_grid/min_dist_px, 4, design); conf(set, editor/local_grid/enable, 0, design) } update_on={} }
+							ha:global grid density 8  = { checked={conf(iseq, editor/global_grid/min_dist_px, 8)}; li:action={conf(set, editor/global_grid/min_dist_px, 8, design); conf(set, editor/local_grid/enable, 0, design) } update_on={} }
+							ha:global grid density 16 = { checked={conf(iseq, editor/global_grid/min_dist_px, 16)}; li:action={conf(set, editor/global_grid/min_dist_px, 16, design); conf(set, editor/local_grid/enable, 0, design) } update_on={} }
 						}
 					}
 					ha:Realign grid               = { a={<key>g; <key>r}; action={ GetXY(Click to set the grid origin); Display(ToggleGrid) } }
diff -pruN 1.1.0-3/src/obj_arc.c 1.1.2-1/src/obj_arc.c
--- 1.1.0-3/src/obj_arc.c	2022-10-24 02:55:16.000000000 +0000
+++ 1.1.2-1/src/obj_arc.c	2023-04-13 14:44:37.000000000 +0000
@@ -29,29 +29,48 @@
 #include "obj_arc.h"
 #include "obj_any.h"
 
-#include <librnd/core/hid_inlines.h>
+#include <librnd/hid/hid_inlines.h>
 #include "geo.h"
 #include <gengeo2d/carc.h>
+#include <gengeo2d/sarc.h>
 
 static void camv_arc_free_fields(camv_any_obj_t *obj)
 {
 	/* no dynamic allocation */
 }
 
-static void camv_arc_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc)
+static void camv_arc_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx)
 {
 	rnd_hid_set_line_cap(gc, rnd_cap_round);
 	rnd_hid_set_line_width(gc, obj->arc.thick);
-	rnd_render->draw_arc(gc, obj->arc.cx, obj->arc.cy, obj->arc.r, obj->arc.r, obj->arc.start, obj->arc.delta);
+	if (mx != NULL) {
+		camv_layer_t *ly = obj->arc.parent_layer;
+		rnd_coord_t cx = rnd_xform_x((*mx), obj->arc.cx, obj->arc.cy);
+		rnd_coord_t cy = rnd_xform_y((*mx), obj->arc.cx, obj->arc.cy);
+		double rx = obj->arc.r * ly->mx_sx, ry = obj->arc.r * ly->mx_sy;
+		double start= obj->arc.start - ly->mx_rotdeg, delta = obj->arc.delta;
+
+		rnd_render->draw_arc(gc, cx, cy, rx, ry, start, delta);
+	}
+	else
+		rnd_render->draw_arc(gc, obj->arc.cx, obj->arc.cy, obj->arc.r, obj->arc.r, obj->arc.start, obj->arc.delta);
 }
 
 static void camv_arc_bbox(camv_any_obj_t *obj)
 {
-	TODO("real arc bbox");
-	obj->arc.bbox.x1 = obj->arc.cx - obj->arc.r - obj->arc.thick;
-	obj->arc.bbox.x2 = obj->arc.cx + obj->arc.r + obj->arc.thick;
-	obj->arc.bbox.y1 = obj->arc.cy - obj->arc.r - obj->arc.thick;
-	obj->arc.bbox.y2 = obj->arc.cy + obj->arc.r + obj->arc.thick;
+	g2d_sarc_t a;
+	g2d_box_t box;
+
+	a.c.c.x = obj->arc.cx;
+	a.c.c.y = obj->arc.cy;
+	a.c.r = obj->arc.r;
+	a.c.start = (180-obj->arc.start) / RND_RAD_TO_DEG;
+	a.c.delta = -obj->arc.delta / RND_RAD_TO_DEG;
+	a.s.width = obj->arc.thick;
+	box = g2d_sarc_bbox(&a);
+
+	obj->arc.bbox.x1 = box.p1.x; obj->arc.bbox.y1 = box.p1.y;
+	obj->arc.bbox.x2 = box.p2.x; obj->arc.bbox.y2 = box.p2.y;
 	obj->arc.bbox_valid = 1;
 }
 
diff -pruN 1.1.0-3/src/obj_common.h 1.1.2-1/src/obj_common.h
--- 1.1.0-3/src/obj_common.h	2022-10-26 11:34:07.000000000 +0000
+++ 1.1.2-1/src/obj_common.h	2023-03-09 12:32:18.000000000 +0000
@@ -30,7 +30,9 @@
 #include <librnd/core/global_typedefs.h>
 #include "camv_typedefs.h"
 #include "rtree.h"
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
+#include <librnd/font/xform_mx.h>
+
 
 typedef enum camv_objtype_e {
 	CAMV_OBJ_invalid,
@@ -45,7 +47,7 @@ typedef enum camv_objtype_e {
 typedef struct camv_objcalls_s {
 	camv_any_obj_t *(*alloc)(void);
 	void (*free_fields)(camv_any_obj_t *obj);
-	void (*draw)(camv_any_obj_t *obj, rnd_hid_gc_t gc);
+	void (*draw)(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx);
 	void (*bbox)(camv_any_obj_t *obj);
 	void (*copy)(camv_any_obj_t *dst, const camv_any_obj_t *src);
 	void (*move)(camv_any_obj_t *o, rnd_coord_t dx, rnd_coord_t dy); /* does not do any rtree administration, but bbox is updated if it was originally valid */
diff -pruN 1.1.0-3/src/obj_grp.c 1.1.2-1/src/obj_grp.c
--- 1.1.0-3/src/obj_grp.c	2021-06-03 13:40:56.000000000 +0000
+++ 1.1.2-1/src/obj_grp.c	2023-03-09 12:32:18.000000000 +0000
@@ -40,12 +40,12 @@ static void camv_grp_free_fields(camv_an
 	obj->grp.len = 0;
 }
 
-static void camv_grp_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc)
+static void camv_grp_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx)
 {
 	rnd_cardinal_t n;
 	camv_any_obj_t *gobj;
 	for(n = 0, gobj = obj->grp.objs; n < obj->grp.len; n++,gobj++)
-		gobj->proto.calls->draw(gobj, gc);
+		gobj->proto.calls->draw(gobj, gc, mx);
 }
 
 static void camv_grp_bbox(camv_any_obj_t *obj)
diff -pruN 1.1.0-3/src/obj_line.c 1.1.2-1/src/obj_line.c
--- 1.1.0-3/src/obj_line.c	2022-10-24 02:55:16.000000000 +0000
+++ 1.1.2-1/src/obj_line.c	2023-03-09 12:40:15.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2023 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -31,18 +31,29 @@
 #include "geo.h"
 #include <gengeo2d/cline.h>
 
-#include <librnd/core/hid_inlines.h>
+#include <librnd/hid/hid_inlines.h>
 
 static void camv_line_free_fields(camv_any_obj_t *obj)
 {
 	/* no dynamic allocation */
 }
 
-static void camv_line_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc)
+static void camv_line_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx)
 {
+	rnd_coord_t x1, y1, x2, y2;
+
+	if (mx != NULL) {
+		x1 = rnd_xform_x((*mx), obj->line.x1, obj->line.y1); y1 = rnd_xform_y((*mx), obj->line.x1, obj->line.y1);
+		x2 = rnd_xform_x((*mx), obj->line.x2, obj->line.y2); y2 = rnd_xform_y((*mx), obj->line.x2, obj->line.y2);
+	}
+	else {
+		x1 = obj->line.x1; y1 = obj->line.y1;
+		x2 = obj->line.x2; y2 = obj->line.y2;
+	}
+
 	rnd_hid_set_line_cap(gc, rnd_cap_round);
 	rnd_hid_set_line_width(gc, obj->line.thick);
-	rnd_render->draw_line(gc, obj->line.x1, obj->line.y1, obj->line.x2, obj->line.y2);
+	rnd_render->draw_line(gc, x1, y1, x2, y2);
 }
 
 static void camv_line_bbox(camv_any_obj_t *obj)
diff -pruN 1.1.0-3/src/obj_poly.c 1.1.2-1/src/obj_poly.c
--- 1.1.0-3/src/obj_poly.c	2022-10-24 02:55:16.000000000 +0000
+++ 1.1.2-1/src/obj_poly.c	2023-03-09 13:55:27.000000000 +0000
@@ -26,6 +26,8 @@
 
 #include <librnd/config.h>
 
+#include <librnd/core/vtc0.h>
+
 #include "obj_poly.h"
 #include "obj_any.h"
 
@@ -39,9 +41,23 @@ static void camv_poly_free_fields(camv_a
 	obj->poly.len = 0;
 }
 
-static void camv_poly_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc)
+static void camv_poly_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx)
 {
-	rnd_render->fill_polygon(gc, obj->poly.len, obj->poly.x, obj->poly.y);
+	if (mx != NULL) {
+		static vtc0_t x, y;
+		long n;
+		if (obj->poly.len > x.alloced) {
+			vtc0_enlarge(&x, obj->poly.len);
+			vtc0_enlarge(&y, obj->poly.len);
+		}
+		for(n = 0; n < obj->poly.len; n++) {
+			x.array[n] = rnd_xform_x((*mx), obj->poly.x[n], obj->poly.y[n]);
+			y.array[n] = rnd_xform_y((*mx), obj->poly.x[n], obj->poly.y[n]);
+		}
+		rnd_render->fill_polygon(gc, obj->poly.len, x.array, y.array);
+	}
+	else
+		rnd_render->fill_polygon(gc, obj->poly.len, obj->poly.x, obj->poly.y);
 }
 
 static void camv_poly_bbox(camv_any_obj_t *obj)
diff -pruN 1.1.0-3/src/obj_text.c 1.1.2-1/src/obj_text.c
--- 1.1.0-3/src/obj_text.c	2022-02-07 08:54:44.000000000 +0000
+++ 1.1.2-1/src/obj_text.c	2023-04-13 13:03:36.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2020 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2020,2023 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -34,109 +34,82 @@
 #include <gengeo2d/box.h>
 #include "obj_poly.h"
 
-#include <librnd/core/hid_inlines.h>
+#include <librnd/hid/hid_inlines.h>
 #include <librnd/core/compat_misc.h>
-#include <librnd/core/hidlib_conf.h>
-#include "ttf2bbox/ttf2bbox.h"
+#include <librnd/core/rnd_conf.h>
+#include <librnd/core/rotate.h>
+#include <librnd/font/font.h>
 
-static ttf2bbox_t ttf;
-static int def_fid, ttf_inited = 0;
+static rnd_font_t embf_, *embf = &embf_, *font = &embf_;
+double font_scale = 1.0;
+
+#include "font_internal.c"
 
 static void camv_text_free_fields(camv_any_obj_t *obj)
 {
-	if (obj->text.pm != NULL) {
-		if (rnd_render->uninit_pixmap != NULL)
-			rnd_render->uninit_pixmap(rnd_render, obj->text.pm);
-		rnd_pixmap_free(obj->text.pm);
-		obj->text.pm = NULL;
-	}
 	free(obj->text.s);
 	obj->text.s = NULL;
 }
 
-static void camv_text_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc)
+static void camv_text_draw_atom_cb(void *cb_ctx, const rnd_glyph_atom_t *a)
 {
-	if ((rnd_render->draw_pixmap != NULL) && (obj->text.pm != NULL))
-		rnd_render->draw_pixmap(rnd_render, obj->text.x, obj->text.y, obj->text.sx, obj->text.sy, obj->text.pm);
+	rnd_hid_gc_t gc = cb_ctx;
+	long h;
+
+	switch(a->type) {
+		case RND_GLYPH_LINE:
+			rnd_hid_set_line_width(gc, a->line.thickness);
+			rnd_render->draw_line(gc, a->line.x1, a->line.y1, a->line.x2, a->line.y2);
+			break;
+		case RND_GLYPH_ARC:
+			rnd_hid_set_line_width(gc, a->arc.thickness);
+			rnd_render->draw_arc(gc, a->arc.cx, a->arc.cy, a->arc.r, a->arc.r, a->arc.start, a->arc.delta);
+			break;
+		case RND_GLYPH_POLY:
+			h = a->poly.pts.used / 2;
+			rnd_render->fill_polygon(gc, h, &a->poly.pts.array[0], &a->poly.pts.array[h]);
+			break;
+	}
 }
 
-static void camv_text_bbox(camv_any_obj_t *obj)
+static void camv_text_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx)
 {
-	rnd_coord_t sx2 = obj->text.sx / 2, sy2 = obj->text.sy / 2;
-
-	obj->text.bbox.x1 = obj->text.x - sx2;
-	obj->text.bbox.x2 = obj->text.x + sx2;
-	obj->text.bbox.y1 = obj->text.y - sy2;
-	obj->text.bbox.y2 = obj->text.y + sy2;
-	obj->text.bbox_valid = 1;
+	rnd_font_draw_string(font, (unsigned char *)obj->text.s, obj->text.x + obj->text.dx, obj->text.y + obj->text.dy, font_scale, font_scale, obj->text.rot, RND_FONT_MIRROR_Y, 0, 0, 0, RND_FONT_TINY_HIDE, camv_text_draw_atom_cb, gc);
 }
 
-void camv_text_update_color(camv_text_t *text, camv_layer_t *ly)
+static void camv_text_bbox(camv_any_obj_t *obj)
 {
-	long n, end = text->pm->sx * text->pm->sy;
-	unsigned char *i, *o;
-	ttf2bbox_pixmap_t *tpm = text->ttf_pm;
-
-	if (ly == NULL)
-		ly = text->parent_layer;
-
-	text->pm->tr = text->pm->tg = 127;
-	text->pm->tb = 128;
-	text->pm->has_transp = 1;
-
-
-	for(n = 0, i = tpm->p, o = text->pm->p; n < end; n++, i++, o+=3) {
-		if (i[0] == 0) {
-			o[0] = text->pm->tr;
-			o[1] = text->pm->tg;
-			o[2] = text->pm->tb;
-		}
-		else {
-			o[0] = ly->color.fr * i[0] + rnd_conf.appearance.color.background.fr * (255-i[0]);
-			o[1] = ly->color.fg * i[0] + rnd_conf.appearance.color.background.fg * (255-i[0]);
-			o[2] = ly->color.fb * i[0] + rnd_conf.appearance.color.background.fb * (255-i[0]);
-		}
-#if 0
-		if ((n % text->pm->sx) == 0) printf("\n");
-		printf("%d", i[0]/64);
-#endif
+	int n;
+	obj->text.bbox.x1 = obj->text.bbox.y1 = RND_COORD_MAX;
+	obj->text.bbox.x2 = obj->text.bbox.y2 = -RND_COORD_MAX;
+	for(n = 0; n < 4; n++) {
+		if (obj->text.cx[n] < obj->text.bbox.x1) obj->text.bbox.x1 = obj->text.cx[n];
+		if (obj->text.cx[n] > obj->text.bbox.x2) obj->text.bbox.x2 = obj->text.cx[n];
+		if (obj->text.cy[n] < obj->text.bbox.y1) obj->text.bbox.y1 = obj->text.cy[n];
+		if (obj->text.cy[n] > obj->text.bbox.y2) obj->text.bbox.y2 = obj->text.cy[n];
 	}
+	obj->text.bbox_valid = 1;
 }
 
-void camv_text_update(rnd_hidlib_t *hidlib, camv_text_t *text, camv_layer_t *ly)
+void camv_text_update(rnd_design_t *hidlib, camv_text_t *text, camv_layer_t *ly)
 {
-	long tox, toy, sx, sy;
+	rnd_coord_t cx[4], cy[4], w, h;
 
+	/* measure width and height */
+	rnd_font_string_bbox(cx, cy, font, (unsigned char *)text->s, 0, 0, font_scale, font_scale, 0, RND_FONT_MIRROR_Y, 0, 0);
+	w = cx[1] - cx[0];
+	h = cy[0] - cy[3];
 
-	if (!ttf_inited) {
-		if (ttf2bbox_init(&ttf) != 0) {
-			fprintf(stderr, "Failed to initialize ttf2bbox\n"); /* shuld never happen */
-			exit(1);
-		}
-		def_fid = ttf2bbox_font_load(&ttf, conf_core.appearance.default_font);
-		if (def_fid < 0) {
-			rnd_message(RND_MSG_ERROR, "Failed to load ttf: '%s'\nPlease configure appearance/default_font to point to a ttf!\n", conf_core.appearance.default_font);
-			return;
-		}
-		ttf_inited = 1;
-	}
+	text->dx = -w/2;
+	text->dy = h*1.5;
 
-	if (ttf2bbox_estimate_at(&ttf, def_fid, text->size, text->s, 0, 0, text->rot, TTF2BBOX_LEFT, TTF2BBOX_TOP, &tox, &toy, &sx, &sy, 1) < 0) {
-		fprintf(stderr, "Failed to estimate text size with ttf2bbox\n"); /* shuld never happen */
-		exit(1);
+	if (text->rot != 0) {
+		double rad = -text->rot / RND_RAD_TO_DEG;
+		rnd_rotate(&text->dx, &text->dy, 0, 0, cos(rad), sin(rad));
 	}
-	rnd_trace("text estimate: t=%ld;%ld s=%ld;%ld\n", tox, toy, sx, sy);
-	if (text->ttf_pm != NULL)
-		free(text->ttf_pm);
-	text->ttf_pm = ttf2bbox_pm_alloc(sx, sy);
-	ttf2bbox_render_in_box(&ttf, def_fid, text->ttf_pm, text->s, 0, 0, text->rot, sx, sy, 1);
-	text->sx = RND_MM_TO_COORD(sx)/128;
-	text->sy = RND_MM_TO_COORD(sy)/128;
-
-	if (text->pm != NULL)
-		rnd_pixmap_free(text->pm);
-	text->pm = rnd_pixmap_alloc(hidlib, sx, sy);
-	camv_text_update_color(text, ly); /* really copies ->ttf_pm to ->pm */
+
+	rnd_font_string_bbox(text->cx, text->cy, font, (unsigned char *)text->s, text->x + text->dx, text->y + text->dy, font_scale, font_scale, text->rot, RND_FONT_MIRROR_Y, 0, 0);
+	camv_text_bbox((camv_any_obj_t *)text);
 }
 
 static void camv_text_copy(camv_any_obj_t *dst, const camv_any_obj_t *src)
@@ -147,8 +120,13 @@ static void camv_text_copy(camv_any_obj_
 
 static void camv_text_move(camv_any_obj_t *o, rnd_coord_t dx, rnd_coord_t dy)
 {
+	int n;
 	o->text.x += dx;
 	o->text.y += dy;
+	for(n = 0; n < 4; n++) {
+		o->text.cx[n] += dx;
+		o->text.cy[n] += dy;
+	}
 	if (o->text.bbox_valid) {
 		o->text.bbox.x1 += dx; o->text.bbox.y1 += dy;
 		o->text.bbox.x2 += dx; o->text.bbox.y2 += dy;
@@ -169,7 +147,7 @@ static int camv_text_isc_box(const camv_
 
 	return 0;
 
-	TODO("geo: copy the code from pcb-rnd for calculating the corners; need to move mx tranform code from pcb-rnd code to librnd");
+	TODO("TODO: text may be rotated; use rotated box; see sch-rnd text_isc_with_box() triangle tests");
 	return camv_poly_isc_box(&op, box);
 }
 
@@ -197,3 +175,7 @@ camv_text_t *camv_text_new(void)
 	return res;
 }
 
+void camv_font_init(void)
+{
+	rnd_font_load_internal(embf, embf_font, sizeof(embf_font) / sizeof(embf_font[0]), embf_minx, embf_miny, embf_maxx, embf_maxy);
+}
diff -pruN 1.1.0-3/src/obj_text.h 1.1.2-1/src/obj_text.h
--- 1.1.0-3/src/obj_text.h	2021-06-03 13:40:56.000000000 +0000
+++ 1.1.2-1/src/obj_text.h	2023-04-13 13:30:42.000000000 +0000
@@ -28,23 +28,21 @@
 #define CAMV_OBJ_TEXT_H
 
 #include "obj_common.h"
-#include <librnd/core/pixmap.h>
+#include <librnd/hid/pixmap.h>
 
 typedef struct camv_text_s {
 	CAMV_ANY_PRIMITIVE_FIELDS;
-	rnd_coord_t x, y;
-	int size;
-	double rot;
+	rnd_coord_t x, y;         /* placement: specify center bottom point of text */
+	double rot;               /* in degrees */
 	char *s;
 
 	/* internal/cache */
-	void *ttf_pm; /* (ttf2bbox_pixmap_t *) */
-	rnd_pixmap_t *pm;
-	rnd_coord_t sx, sy;
+	rnd_coord_t cx[4], cy[4]; /* 4 corners of the rotated bbox */
+	rnd_coord_t dx, dy;       /* offsets from x,y to librnd font renderer */
 } camv_text_t;
 
 void camv_text_init(camv_text_t *text);
 camv_text_t *camv_text_new(void);
-void camv_text_update(rnd_hidlib_t *hidlib, camv_text_t *text, camv_layer_t *color_ly); /* called to re-render the pixmap after field changes */
+void camv_text_update(rnd_design_t *hidlib, camv_text_t *text, camv_layer_t *color_ly); /* called to re-render the pixmap after field changes */
 
 #endif
diff -pruN 1.1.0-3/src/plug_io.c 1.1.2-1/src/plug_io.c
--- 1.1.0-3/src/plug_io.c	2022-10-26 11:27:55.000000000 +0000
+++ 1.1.2-1/src/plug_io.c	2023-04-13 16:23:51.000000000 +0000
@@ -30,6 +30,7 @@
 #include <genvector/vtp0.h>
 
 #include <librnd/core/error.h>
+#include <librnd/core/event.h>
 #include <librnd/core/safe_fs.h>
 
 #include "plug_io.h"
@@ -75,8 +76,10 @@ void camv_io_unreg(camv_io_t *io)
 static void post_load(camv_design_t *camv)
 {
 	camv_data_bbox(camv);
-	camv->hidlib.size_x = camv->bbox.x2;
-	camv->hidlib.size_y = camv->bbox.y2;
+	camv->hidlib.dwg.X1 = camv->bbox.x1;
+	camv->hidlib.dwg.Y1 = camv->bbox.y1;
+	camv->hidlib.dwg.X2 = camv->bbox.x2;
+	camv->hidlib.dwg.Y2 = camv->bbox.y2;
 }
 
 int camv_io_load(camv_design_t *camv, const char *fn)
@@ -99,8 +102,14 @@ int camv_io_load(camv_design_t *camv, co
 			continue;
 		rewind(f);
 		if ((io->test_load == NULL) || (io->test_load(camv, fn, f) != 0)) {
+			int res;
 			rewind(f);
-			if (io->load(camv, fn, f) == 0) {
+
+			rnd_event(&camv->hidlib, RND_EVENT_LOAD_PRE, "s", fn);
+			res = io->load(camv, fn, f);
+			rnd_event(&camv->hidlib, RND_EVENT_LOAD_POST, "si", fn, res);
+
+			if (res == 0) {
 				fclose(f);
 				post_load(camv);
 				return 0;
@@ -110,3 +119,105 @@ int camv_io_load(camv_design_t *camv, co
 
 	return -1;
 }
+
+/*** save ***/
+
+typedef struct {
+	int prio;
+	camv_io_t *io;
+} prio_t;
+#define GVT(x) vtpr_ ## x
+#define GVT_ELEM_TYPE prio_t
+#define GVT_SIZE_TYPE int
+#define GVT_DOUBLING_THRS 32
+#define GVT_START_SIZE 8
+#define GVT_FUNC
+#define GVT_SET_NEW_BYTES_TO 0
+#include <genvector/genvector_impl.h>
+#define GVT_REALLOC(vect, ptr, size)  realloc(ptr, size)
+#define GVT_FREE(vect, ptr)           free(ptr)
+#include <genvector/genvector_impl.c>
+
+static int prio_cmp(const void *d1, const void *d2)
+{
+	const prio_t *p1 = d1, *p2 = d2;
+	if (p1->prio <= p2->prio) return 1;
+	return -1;
+}
+
+typedef enum {
+	LIST_SAVE
+#if 0
+	LIST_EXPORT
+#endif
+} io_list_dir_t;
+
+static void camv_plug_io_list(vtpr_t *res, const char *fn, const char *fmt, camv_io_type_t type, io_list_dir_t dir)
+{
+	int n, p;
+	prio_t *pr;
+
+	for(n = 0; n < vtp0_len(&camv_io); n++) {
+		camv_io_t *io = camv_io.array[n];
+		if (io == NULL) continue;
+		switch(dir) {
+			case LIST_SAVE:
+				if (io->save_prio == NULL) continue;
+				p = io->save_prio(fn, fmt, type);
+				break;
+#if 0
+			case LIST_EXPORT:
+				if (io->export_prio == NULL) continue;
+				p = io->export_prio(fn, fmt, type);
+				break;
+#endif
+		}
+
+		if (p > 0) {
+			pr = vtpr_alloc_append(res, 1);
+			pr->prio = p;
+			pr->io = io;
+		}
+	}
+	qsort(res->array, vtpr_len(res), sizeof(prio_t), prio_cmp);
+}
+
+int camv_save_design(camv_design_t *camv, const char *fn_, const char *fmt)
+{
+	vtpr_t prios;
+	int n, ret = -1, len;
+	char *fn, *ext = NULL;
+
+	if ((fmt == NULL) || (*fmt == '\0'))
+		return -1;
+
+	len = strlen(fn_);
+	fn = malloc(len+1);
+	memcpy(fn, fn_, len+1);
+	if (fn[len-1] == '*')
+		ext = fn + len - 1;
+
+	vtpr_init(&prios);
+	camv_plug_io_list(&prios, fn, fmt, CSCH_IOTYP_DESIGN, LIST_SAVE);
+	for(n = 0; n < vtpr_len(&prios); n++) {
+		prio_t *pr = &prios.array[n];
+		if (ext != NULL) {
+			if (pr->io->ext_save_design != NULL)
+				strcpy(ext, pr->io->ext_save_design);
+			else
+				*ext = '\0';
+			break;
+		}
+
+		rnd_event(&camv->hidlib, RND_EVENT_SAVE_PRE, "s", fmt);
+		ret = pr->io->save_design(camv, fn);
+		rnd_event(&camv->hidlib, RND_EVENT_SAVE_POST, "si", fmt, ret);
+
+		if (ret == 0)
+			break;
+	}
+
+	free(fn);
+	vtpr_uninit(&prios);
+	return ret;
+}
diff -pruN 1.1.0-3/src/plug_io.h 1.1.2-1/src/plug_io.h
--- 1.1.0-3/src/plug_io.h	2019-07-22 06:41:30.000000000 +0000
+++ 1.1.2-1/src/plug_io.h	2023-04-13 16:23:51.000000000 +0000
@@ -30,16 +30,28 @@
 #include <stdio.h>
 #include "data.h"
 
+typedef enum camv_io_type_s { /* bitfield so multiple detections (e.g. design-or-layer) can be handled */
+	CSCH_IOTYP_DESIGN  = 1,
+	CSCH_IOTYP_LAYER   = 2
+} camv_io_type_t;
+
+
 typedef struct camv_io_s {
 	const char *name;
 	int prio; /* the higher the better */
 	int (*test_load)(camv_design_t *camv, const char *fn, FILE *f); /* returns non-zero if the file looks good for the plugin */
 	int (*load)(camv_design_t *camv, const char *fn, FILE *f);
+
+	int (*save_prio)(const char *fn, const char *fmt, camv_io_type_t type);
 	int (*save_design)(camv_design_t *camv, const char *fn);
+	const char *ext_save_design;
+
 } camv_io_t;
 
 void camv_io_reg(camv_io_t *io);
 void camv_io_unreg(camv_io_t *io);
 int camv_io_load(camv_design_t *camv, const char *fn);
 
+int camv_save_design(camv_design_t *camv, const char *fn, const char *fmt);
+
 #endif
diff -pruN 1.1.0-3/src/plug_io_act.c 1.1.2-1/src/plug_io_act.c
--- 1.1.0-3/src/plug_io_act.c	2021-06-04 07:40:29.000000000 +0000
+++ 1.1.2-1/src/plug_io_act.c	2023-04-13 16:23:51.000000000 +0000
@@ -67,10 +67,46 @@ fgw_error_t camv_act_LoadFrom(fgw_arg_t
 	return 0;
 }
 
+static const char camv_acts_SaveTo[] = "SaveTo(design, filename[,format])";
+static const char camv_acth_SaveTo[] = "Save design to a file.";
+fgw_error_t camv_act_SaveTo(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	camv_design_t *camv = (camv_design_t *)hl;
+	const char *op, *name, *format = "tedax";
+
+	RND_ACT_CONVARG(1, FGW_STR, SaveTo, op = argv[1].val.str);
+	RND_ACT_CONVARG(2, FGW_STR, SaveTo, name = argv[2].val.str);
+	RND_ACT_MAY_CONVARG(3, FGW_STR, SaveTo, format = argv[3].val.str);
+
+	if (rnd_strcasecmp(op, "design") == 0) {
+		if (camv_save_design(camv, name, format) != 0) {
+			rnd_message(RND_MSG_ERROR, "Can not save file '%s'\n", name);
+			RND_ACT_IRES(-1);
+			return 0;
+		}
+	}
+	else {
+		rnd_message(RND_MSG_ERROR, "Invalid first argument\n");
+		RND_ACT_IRES(-1);
+		return 0;
+	}
+
+	RND_ACT_IRES(0);
+	return 0;
+}
+
+
 static rnd_action_t camv_plug_io_act_list[] = {
-	{"LoadFrom", camv_act_LoadFrom, camv_acth_LoadFrom, camv_acts_LoadFrom}
+	{"LoadFrom", camv_act_LoadFrom, camv_acth_LoadFrom, camv_acts_LoadFrom},
+	{"SaveTo", camv_act_SaveTo, camv_acth_SaveTo, camv_acts_SaveTo}
 };
 
+void camv_plug_io_act_uninit(void)
+{
+	rnd_remove_actions_by_cookie(plug_io_cookie);
+}
+
 void camv_plug_io_act_init(void)
 {
 	RND_REGISTER_ACTIONS(camv_plug_io_act_list, plug_io_cookie);
diff -pruN 1.1.0-3/src/plug_io_act.h 1.1.2-1/src/plug_io_act.h
--- 1.1.0-3/src/plug_io_act.h	2021-06-04 07:40:29.000000000 +0000
+++ 1.1.2-1/src/plug_io_act.h	2022-11-20 09:50:34.000000000 +0000
@@ -3,4 +3,5 @@
 fgw_error_t camv_act_LoadFrom(fgw_arg_t *res, int argc, fgw_arg_t *argv);
 
 void camv_plug_io_act_init(void);
+void camv_plug_io_act_uninit(void);
 
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/Makefile 1.1.2-1/src_3rd/ttf2bbox/Makefile
--- 1.1.0-3/src_3rd/ttf2bbox/Makefile	2022-02-11 05:48:38.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/Makefile	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-CFLAGS=-Wall -g `pkg-config --cflags freetype2`
-LDFLAGS=`pkg-config --libs freetype2` -lm
-
-MAP_OBJS = test_map.o ttf_map.o
-BOX_OBJS = tester.o ttf2bbox.o
-
-all: tester test_map
-
-test_map: $(MAP_OBJS)
-	$(CC) -o $@ $(MAP_OBJS) $(LDFLAGS) -lgenht
-
-tester: $(BOX_OBJS)
-
-ttf2bbox.o: ttf2bbox.c ttf2bbox.h
-
-tester.o: tester.c ttf2bbox.h
-
-ttf_map.o: ttf_map.c
-
-clean:
-	-rm $(BOX_OBJS) $(MAP_OBJS) tester test_map
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/test_map.c 1.1.2-1/src_3rd/ttf2bbox/test_map.c
--- 1.1.0-3/src_3rd/ttf2bbox/test_map.c	2022-01-31 09:20:05.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/test_map.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-#include <stdlib.h>
-#include "ttf_map.h"
-
-const char *font_dirs[] = {"/usr/share/fonts/truetype", NULL};
-
-int main(int argc, char *argv[])
-{
-	void *cookie;
-	htsp_t *map = ttf_map_load(".ttf_map.cache", font_dirs, &cookie);
-
-	ttf_map_free(map, &cookie);
-}
-
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/tester.c 1.1.2-1/src_3rd/ttf2bbox/tester.c
--- 1.1.0-3/src_3rd/ttf2bbox/tester.c	2020-02-16 03:37:28.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/tester.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,79 +0,0 @@
-#include <stdio.h>
-#include "ttf2bbox.h"
-
-static const char *fontfile = "/usr/share/fonts/truetype/open-sans/OpenSans-Italic.ttf";
-static ttf2bbox_t lib;
-static const char color[] = " .+#";
-
-static void draw_rect(ttf2bbox_pixmap_t *pm, unsigned char clr, int x1, int y1, int x2, int y2)
-{
-	int n;
-	unsigned char *s1, *s2;
-
-	s1 = pm->p + pm->sx * y1 + x1;
-	s2 = pm->p + pm->sx * y2 + x1;
-	for(n = x1; n <= x2; n++,s1++,s2++) {
-		*s1 = clr;
-		*s2 = clr;
-	}
-
-	s1 = pm->p + pm->sx * y1 + x1;
-	s2 = pm->p + pm->sx * y1 + x2;
-	for(n = y1; n <= y2; n++,s1+=pm->sx,s2+=pm->sx) {
-		*s1 = clr;
-		*s2 = clr;
-	}
-}
-
-static void draw(FILE *f, ttf2bbox_pixmap_t *pm)
-{
-	unsigned char *s = pm->p;
-	int n, end = pm->sx * pm->sy + 1;
-	for(n = 1; n < end; n++,s++) {
-		fputc(color[*s >> 6], f);
-		if ((n % pm->sx) == 0)
-			fputc('\n', f);
-	}
-}
-
-int main(int argc, char *argv[])
-{
-	int fid, ox = 10, oy = 4, w = 50, h = 13, bbox4rotated=0;
-	double rot = 0;
-	const char *text = "hello world!";
-	ttf2bbox_pixmap_t *pm;
-
-
-	if (argc > 1)
-		text = argv[1];
-
-	if (argc > 2)
-		rot = strtod(argv[2], NULL) / 180.0 * 3.141592654;
-
-	if (ttf2bbox_init(&lib) != 0) {
-		fprintf(stderr, "ttf2bbox_init() error\n");
-		return 1;
-	}
-
-	fid = ttf2bbox_font_load(&lib, fontfile);
-	if (fid < 0) {
-		fprintf(stderr, "ttf2bbox_font_load() error\n");
-		return 1;
-	}
-
-	pm = ttf2bbox_pm_alloc(80, 20);
-	draw_rect(pm, 64, ox, oy, w+ox, h+oy);
-	if (ttf2bbox_render_in_box(&lib, fid, pm, text, ox, oy, rot, w, h, bbox4rotated) != 0) {
-		fprintf(stderr, "ttf2bbox_render() error\n");
-		return 1;
-	}
-	draw(stdout, pm);
-
-	if (ttf2bbox_uninit(&lib) != 0) {
-		fprintf(stderr, "ttf2bbox_uninit() error\n");
-		return 1;
-	}
-
-
-	return 0;
-}
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/ttf2bbox.c 1.1.2-1/src_3rd/ttf2bbox/ttf2bbox.c
--- 1.1.0-3/src_3rd/ttf2bbox/ttf2bbox.c	2022-02-02 15:03:47.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/ttf2bbox.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,324 +0,0 @@
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-#include "ttf2bbox.h"
-
-#if 0
-#define deb_printf printf
-#else
-void deb_printf(const char *f, ...) {}
-#endif
-
-int ttf2bbox_y_mirror = 1;
-
-int ttf2bbox_init(ttf2bbox_t *lib)
-{
-	memset(lib, 0, sizeof(ttf2bbox_t));
-	if (FT_Init_FreeType(&lib->lib) != 0)
-		return -1;
-	return 0;
-}
-
-int ttf2bbox_uninit(ttf2bbox_t *lib)
-{
-	int res = 0, n;
-
-	for(n = 0; n < lib->faces_used; n++)
-		FT_Done_Face(lib->faces[n]);
-	free(lib->faces);
-
-	if (FT_Done_FreeType(lib->lib) != 0)
-		res = -1;
-
-	return res;
-}
-
-int ttf2bbox_font_load(ttf2bbox_t *lib, const char *path)
-{
-	int res;
-	FT_Face *nf;
-
-	if (lib->faces_used >= lib->faces_alloced) {
-		lib->faces_alloced += 32;
-		nf = realloc(lib->faces, sizeof(FT_Face) * lib->faces_alloced);
-		if (nf == NULL)
-			return -1;
-		lib->faces = nf;
-	}
-	nf = &lib->faces[lib->faces_used];
-	res = FT_New_Face(lib->lib, path, 0, nf);
-	if (res != 0)
-		return -1;
-
-	return lib->faces_used++;;
-}
-
-
-ttf2bbox_pixmap_t *ttf2bbox_pm_alloc(long sx, long sy)
-{
-	ttf2bbox_pixmap_t *pm = calloc(sizeof(ttf2bbox_pixmap_t) + sx * sy - 1, 1);
-	pm->sx = sx;
-	pm->sy = sy;
-	return pm;
-}
-
-static void draw_bitmap(ttf2bbox_pixmap_t *dst, FT_Bitmap *bitmap, FT_Int ox, FT_Int oy, int trx, int try, int ymirror)
-{
-	FT_Int x, y, p, q, w;
-	FT_Int x_max = ox + bitmap->width;
- 	FT_Int y_max = oy + bitmap->rows;
-
-	assert(bitmap->pixel_mode == FT_PIXEL_MODE_GRAY);
-
-	for(x = ox, p = 0; x < x_max; x++, p++) {
-		int xx = x + trx;
-		for(y = oy, q = 0; y < y_max; y++, q++) {
-			int yy;
-			if (ymirror) /* mirror y because of the strange coord system librnd has */
-				yy = (dst->sy - y - 1) + try;
-			else
-				yy = y + try;
-
-			if ((xx < 0)  || (yy < 0) || (xx >= dst->sx) || (yy >= dst->sy))
-				continue;
-			w = q * bitmap->width;
-			dst->p[yy*dst->sx + xx] |= bitmap->buffer[w + p];
-		}
-	}
-}
-
-static int estimate(double *width, double *height, double scale, FT_Face face, FT_Matrix matrix, const char *text)
-{
-	FT_Vector pen;
-	long int height_ = 0;
-	FT_GlyphSlot slot = face->glyph;
-	const char *s;
-
-	if (FT_Set_Char_Size(face, scale, 0, 100, 0) != 0)
-		return -1;
-
-	pen.x = pen.y = 0;
-
-	FT_Set_Transform(face, &matrix, &pen);
-	FT_Load_Char(face, 'M', 0);
-	height_ = slot->metrics.height;
-
-	FT_Set_Transform(face, &matrix, &pen);
-	FT_Load_Char(face, 'y', 0);
-	height_ += slot->metrics.height - slot->metrics.horiBearingY;
-
-	for(s = text; *s != '\0'; s++) 
-	{
-		FT_Set_Transform(face, &matrix, &pen);
-		if (FT_Load_Char(face, *s, 0) != 0)
-			continue;
-		pen.x += slot->advance.x;
-		pen.y += slot->advance.y;
-	}
-
-	*width = (double)pen.x / 64.0;
-	*height = (double)height_ / 64.0;
-	return 0;
-}
-
-static int tune(double *scale, long *cx, long *cy, long *boxw, long *boxh, double sx, double sy, FT_Face face, FT_Matrix matrix, const char *text, double angle, int bbox4rotated)
-{
-	double scx, scy, width, height, sa, ca;
-	int i;
-
-	if (angle != 0) {
-		sa = sin(angle);
-		ca = cos(angle);
-	}
-	else {
-		sa = 0.0;
-		ca = 1.0;
-		bbox4rotated = 0;
-	}
-
-	for(i = 0; i < 10; i++) {
-		if (estimate(&width, &height, *scale, face, matrix, text) < 0)
-			return -1;
-
-		deb_printf("bbox1: %f %f sc=%f;%f scale=%f sx;sy=%d;%d\n", width, height, scx, scy, *scale, (int)sx, (int)sy);
-
-		if (bbox4rotated) {
-			double bbh, bbw;
-			bbw = width * ca + height * sa;
-			bbh = width * sa + height * ca;
-			*cx = bbw/2;
-			*cy = bbh/2;
-			*boxw = bbw;
-			*boxh = bbh;
-			scx = sx * (*scale) / bbw;
-			scy = sy * (*scale) / bbh;
-		}
-		else {
-			scx = (*scale) * sx / width;
-			scy = (*scale) * sy / height;
-			*cx = sx/2;
-			*cy = sy/2;
-			*boxw = width;
-			*boxh = height;
-		}
-
-		if ((width <= sx) && (height <= sy))
-			break;
-
-		if (scx < scy)
-			*scale = scx;
-		else
-			*scale = scy;
-
-		deb_printf("bbox2: sc=%f;%f scale=%f\n", scx, scy, *scale);
-	}
-
-
-	deb_printf("bbox3: %f %f\n", width, height);
-
-
-	return 0;
-}
-
-static void load_mx_rot(FT_Matrix *matrix, double angle)
-{
-	matrix->xx = (FT_Fixed)(+cos(angle) * 0x10000L);
-	matrix->xy = (FT_Fixed)(-sin(angle) * 0x10000L);
-	matrix->yx = (FT_Fixed)(+sin(angle) * 0x10000L);
-	matrix->yy = (FT_Fixed)(+cos(angle) * 0x10000L);
-}
-
-static void load_mx_0(FT_Matrix *matrix)
-{
-	matrix->xx = (FT_Fixed)(+1 * 0x10000L);
-	matrix->xy = (FT_Fixed)(-0 * 0x10000L);
-	matrix->yx = (FT_Fixed)(+0 * 0x10000L);
-	matrix->yy = (FT_Fixed)(+1 * 0x10000L);
-}
-
-int ttf2bbox_render_in_box(ttf2bbox_t *lib, int fid, ttf2bbox_pixmap_t *dst, const char *text, long ox, long oy, double angle, long sx, long sy, int bbox4rotated)
-{
-	FT_Matrix matrix;
-	FT_Vector pen;
-	FT_GlyphSlot slot;
-	FT_Face face;
-	FT_Pos bltune;
-	const char *s;
-	long int h, height = 0, tx, ty, drx = 0, dry = 0, cx, cy, boxw, boxh;
-	double scale = 10000;
-
-	if ((fid < 0) || (fid >= lib->faces_used))
-		return -1;
-
-	face = lib->faces[fid];
-	slot = face->glyph;
-
-	load_mx_0(&matrix);
-
-	tune(&scale, &cx, &cy, &boxw, &boxh, sx, sy, face, matrix, text, angle, bbox4rotated);
-deb_printf("c: %ld %ld box: %ld %ld s: %ld %ld\n", cx, cy, boxw, boxh, sx, sy);
-
-	if (FT_Set_Char_Size(face, scale, 0, 100, 0) != 0)
-		return -1;
-	height = 0;
-
-	load_mx_rot(&matrix, angle);
-	if ((angle != 0) && bbox4rotated) {
-		pen.x = (ox + sx/2 - cx) * 64;
-		pen.y = (dst->sy - oy - sy - (cy/2)*sin(angle)) * 64+1;
-	}
-	else {
-		tx = (sx - boxw)*64/2;
-		ty = (sy - boxh)*64/2;
-		pen.x = ox * 64 + tx;
-		pen.y = (dst->sy - oy - sy) * 64 + ty+1;
-	}
-
-
-	FT_Set_Transform(face, &matrix, &pen);
-	FT_Load_Char(face, 'y', FT_LOAD_RENDER);
-	bltune = (slot->metrics.height - slot->metrics.horiBearingY)/64;
-
-	for(s = text; *s != '\0'; s++) 
-	{
-		FT_Set_Transform(face, &matrix, &pen);
-		if (FT_Load_Char(face, *s, FT_LOAD_RENDER) != 0)
-			continue;
-
-		draw_bitmap(dst, &slot->bitmap, slot->bitmap_left, dst->sy - slot->bitmap_top - bltune, drx, dry, ttf2bbox_y_mirror);
-		pen.x += slot->advance.x;
-		pen.y += slot->advance.y;
-		h = slot->metrics.height;
-		if (h > height)
-			height = h;
-	}
-
-	deb_printf("res = %ld %ld / %ld %ld scale=%f\n", (pen.x)/64-ox, height/64, sx, sy, scale);
-	return 0;
-}
-
-static void box_bump(long *x1, long *y1, long *x2, long *y2, long x, long y)
-{
-	if (x < *x1) *x1 = x;
-	if (x > *x2) *x2 = x;
-	if (y < *y1) *y1 = y;
-	if (y > *y2) *y2 = y;
-}
-
-int ttf2bbox_estimate_at(ttf2bbox_t *lib, int fid, int size, const char *text, long ox, long oy, double angle, ttf2bbox_anchor_t hor, ttf2bbox_anchor_t ver, long *tox, long *toy, long *sx, long *sy, int bbox4rotated)
-{
-	FT_Matrix matrix;
-	FT_Face face;
-	double width, height, scale = size * 64, ca, sa;
-
-
-	if ((fid < 0) || (fid >= lib->faces_used))
-		return -1;
-
-	face = lib->faces[fid];
-
-	load_mx_0(&matrix);
-
-	if (estimate(&width, &height, scale, face, matrix, text) != 0)
-		return -1;
-
-	ca = cos(angle);
-	sa = sin(angle);
-
-	*tox = ox;
-	*toy = oy;
-
-	switch(hor) {
-		case TTF2BBOX_LEFT: break;
-		case TTF2BBOX_MID:   *tox -= width/2 * ca; *toy -= width/2 * sa; break;
-		case TTF2BBOX_RIGHT: *tox -= width * ca;   *toy -= width * sa; break;
-	}
-
-	switch(ver) {
-		case TTF2BBOX_TOP: break;
-		case TTF2BBOX_MID:    *toy -= height/2 * ca; *tox -= height/2 * ca; break;
-		case TTF2BBOX_BOTTOM: *toy -= height * ca;   *tox -= height * ca; break;
-	}
-
-	if (bbox4rotated) {
-		long x1, y1, x2, y2;
-
-		/* *tox;*toy is the top left corner in neutral position rotated around ox;oy */
-		x1 = x2 = *tox;
-		y1 = y2 = *toy;
-		box_bump(&x1, &y1, &x2, &y2, (*tox) + width * ca, (*toy) + width * sa);
-		box_bump(&x1, &y1, &x2, &y2, (*tox) + height * sa, (*toy) + height * ca);
-		box_bump(&x1, &y1, &x2, &y2, (*tox) + width * ca + height * sa, (*toy) + width * sa + height * ca);
-
-		*tox = x1;
-		*toy = y1;
-		*sx = x2-x1;
-		*sy = y2-y1;
-	}
-	else {
-		*sx = width;
-		*sy = height;
-	}
-	return 0;
-}
-
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/ttf2bbox.h 1.1.2-1/src_3rd/ttf2bbox/ttf2bbox.h
--- 1.1.0-3/src_3rd/ttf2bbox/ttf2bbox.h	2022-02-02 15:03:47.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/ttf2bbox.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-typedef struct {
-	FT_Library lib;
-	FT_Face *faces;
-	int faces_used, faces_alloced;
-} ttf2bbox_t;
-
-typedef struct {
-	long sx, sy;
-	unsigned char p[1];
-} ttf2bbox_pixmap_t;
-
-typedef enum {
-	TTF2BBOX_LEFT = 1,
-	TTF2BBOX_TOP = 1,
-	TTF2BBOX_MID = 0,
-	TTF2BBOX_RIGHT = 2,
-	TTF2BBOX_BOTTOM = 2
-} ttf2bbox_anchor_t;
-
-int ttf2bbox_init(ttf2bbox_t *lib);
-int ttf2bbox_uninit(ttf2bbox_t *lib);
-
-int ttf2bbox_font_load(ttf2bbox_t *lib, const char *path);
-
-ttf2bbox_pixmap_t *ttf2bbox_pm_alloc(long sx, long sy);
-
-/* Render text in a way it fits within a bounding box; ox;oy is top left of the
-   box of size sx*sy.
-   If bbox4rotated is 0, the bounding box refers to the horizontally rendered
-   version, which is then rotated around the bottom left corner. If it is
-   non-zero, the bounding box is assumed to refer to the rotated version thus
-   the text is rendered rotated and centered in the bounding box */
-int ttf2bbox_render_in_box(ttf2bbox_t *lib, int fid, ttf2bbox_pixmap_t *dst, const char *text, long ox, long oy, double angle, long sx, long sy, int bbox4rotated);
-
-/* Estimate the bounding box of a text of a given size placed at ox;oy. What
-   part of the text ox;oy refers to is determined by hor;ver. Returns
-   top left x and y coords in tox;toy and size of the box in sx;sy */
-int ttf2bbox_estimate_at(ttf2bbox_t *lib, int fid, int size, const char *text, long ox, long oy, double angle, ttf2bbox_anchor_t hor, ttf2bbox_anchor_t ver, long *tox, long *toy, long *sx, long *sy, int bbox4rotated);
-
-
-extern int ttf2bbox_y_mirror; /* 1 if need to mirror y dir; default is 1 */
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/ttf_map.c 1.1.2-1/src_3rd/ttf2bbox/ttf_map.c
--- 1.1.0-3/src_3rd/ttf2bbox/ttf_map.c	2022-06-08 06:35:25.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/ttf_map.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,298 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <genht/hash.h>
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#include "ttf_map.h"
-
-#ifndef TTF_PATH_MAX
-#include <limits.h>
-#ifdef PATH_MAX
-#define TTF_PATH_MAX PATH_MAX
-#else
-#define TTF_PATH_MAX 8192
-#endif
-#endif
-
-char ttf_map_cache_uniq[8];
-
-char *ttf_strdup(const char *s)
-{
-	int l = strlen(s);
-	char *o = malloc(l+1);
-	memcpy(o, s, l+1);
-	return o;
-}
-
-ttf_map_font_t *ttf_map_get(htsp_t *map, const char *path, int alloc)
-{
-	ttf_map_font_t *f = htsp_get(map, path);
-
-	if ((f == NULL) && alloc) {
-		f = calloc(sizeof(ttf_map_font_t), 1);
-		f->path = ttf_strdup(path);
-		htsp_set(map, (char *)f->path, f);
-	}
-
-	return f;
-}
-
-#define REQ_FONT \
-	if (font == NULL) { \
-		fprintf(stderr, "%s:%ld: syntax error (%s needs to be in a font)\n", cache_path, lineno, cmd); \
-		goto error; \
-	}
-
-int ttf_map_cache_load(htsp_t *map, const char *cache_path)
-{
-	char *end, *cmd, *arg, *line, tmp[TTF_PATH_MAX+128];
-	FILE *f = fopen(cache_path, "r");
-	long lineno = 0;
-	int res = -1;
-	ttf_map_font_t *font = NULL;
-
-	if (f == NULL)
-		return -1;
-
-	while((line = fgets(tmp, sizeof(tmp), f)) != NULL) {
-		lineno++;
-
-		/* strip line */
-		while(isspace(*line)) line++;
-		end = line + strlen(line) - 1;
-		while((end >= line) && ((*end == '\n') || (*end == '\r'))) {
-			*end = '\0';
-			end--;
-		}
-
-		/* skip empty and comment */
-		if ((*line == '\0') || (*line == '#')) continue;
-
-		/* split into cmd and arg */
-		cmd = line;
-		arg = strchr(cmd, ' ');
-		if (arg == NULL) {
-			fprintf(stderr, "%s:%ld: syntax error (missing arg sep)\n", cache_path, lineno);
-			goto error;
-		}
-		*arg = '\0';
-		arg++;
-		while(isspace(*arg)) arg++;
-
-		/* parse command */
-		if (strcmp(cmd, "font") == 0) {
-			if (font != NULL) {
-				fprintf(stderr, "%s:%ld: syntax error (previous font not closed)\n", cache_path, lineno);
-				goto error;
-			}
-			font = ttf_map_get(map, arg, 1);
-			if (font == NULL) {
-				fprintf(stderr, "%s:%ld: failed to allocate font slot\n", cache_path, lineno);
-				goto error;
-			}
-		}
-		else if (strcmp(cmd, "end") == 0) {
-			if (strcmp(arg, "font") != 0) {
-				fprintf(stderr, "%s:%ld: syntax error (end must have arg=font, not '%s')\n", cache_path, lineno, arg);
-				goto error;
-			}
-			else
-				font = NULL;
-		}
-		else if (strcmp(cmd, "mtime") == 0) {
-			REQ_FONT;
-			font->mtime = strtoul(arg, &end, 10);
-			if (*end != '\0') {
-				fprintf(stderr, "%s:%ld: syntax error (invalid decimal integer '%s')\n", cache_path, lineno, arg);
-				goto error;
-			}
-		}
-		else if (strcmp(cmd, "is_font") == 0) {
-			font->is_font = (*arg == '1');
-		}
-		else if (strcmp(cmd, "family") == 0) {
-			REQ_FONT;
-			font->family_name = ttf_strdup(arg);
-		}
-		else if (strcmp(cmd, "style") == 0) {
-			REQ_FONT;
-			font->style_name = ttf_strdup(arg);
-		}
-		else {
-			fprintf(stderr, "%s:%ld: syntax error (invalid command '%s')\n", cache_path, lineno, cmd);
-			goto error;
-		}
-	}
-
-	if (font != NULL) {
-		fprintf(stderr, "%s:%ld: syntax error (last font not closed)\n", cache_path, lineno);
-		goto error;
-	}
-
-	res = 0;
-	error:;
-	fclose(f);
-	return res;
-}
-
-int ttf_map_cache_save(htsp_t *map, const char *cache_path)
-{
-	FILE *f;
-	htsp_entry_t *e;
-	char *end, tmp[TTF_PATH_MAX];
-	long len = strlen(cache_path);
-
-	if (len >= TTF_PATH_MAX - 16)
-		return -1;
-
-	memcpy(tmp, cache_path, len);
-	end = tmp + len;
-	strcpy(end, ".tmp");
-	end += 4;
-
-	if (*ttf_map_cache_uniq != '\0')
-		strcpy(end, ttf_map_cache_uniq);
-
-
-	f = fopen(tmp, "w");
-	for(e = htsp_first(map); e != NULL; e = htsp_next(map, e)) {
-		ttf_map_font_t *font = e->value;
-		fprintf(f, "font %s\n", font->path);
-		fprintf(f, "	mtime %lu\n", (unsigned long)font->mtime);
-		fprintf(f, "	is_font %d\n", font->is_font);
-		if (font->is_font) {
-			fprintf(f, "	family %s\n", font->family_name);
-			fprintf(f, "	style %s\n", font->style_name);
-		}
-		fprintf(f, "end font\n\n");
-	}
-	fclose(f);
-
-	return rename(tmp, cache_path);
-}
-
-int ttf_map_file(htsp_t *map, const char *path, time_t mtime, void **cookie)
-{
-	FT_Library *lib = *cookie;
-	FT_Face face;
-	ttf_map_font_t *f = ttf_map_get(map, path, 1);
-
-	if (mtime <= f->mtime)
-		return 0;
-
-
-	if ((FT_New_Face(*lib, path, 0, &face) == 0) && (face->family_name != NULL) && (face->style_name != NULL)) {
-		f->is_font = 1;
-		f->family_name = ttf_strdup(face->family_name);
-		f->style_name = ttf_strdup(face->style_name);
-		FT_Done_Face(face);
-	}
-	else
-		f->is_font = 0;
-
-	f->mtime = mtime;
-
-	return 1;
-}
-
-
-int ttf_map_dir(htsp_t *map, const char *font_dir, void **cookie)
-{
-	DIR *dir = opendir(font_dir);
-	struct dirent *de;
-	struct stat st;
-	char path[TTF_PATH_MAX+4], *fn; /* +4 to make sure we can't smash the stack on an off-by-one error */
-	long len, maxlen;
-	int res = 0;
-
-	if (dir == NULL)
-		return 0;
-
-	/* prepare path: load font_dir, append / and remember where to append file name */
-	len = strlen(font_dir);
-	memcpy(path, font_dir, len);
-	fn = path + len;
-	*fn = '/';
-	fn++;
-	maxlen = TTF_PATH_MAX - len - 2; /* one for /, one for \0 */
-
-	for(de = readdir(dir); de != NULL; de = readdir(dir)) {
-		long len;
-
-		if (*de->d_name == '.') continue; /* Ignore ., .. and hidden files */
-
-		len = strlen(de->d_name);
-		if (len > maxlen) continue; /* ignore files with full path too long; avoids buffer overrun */
-		memcpy(fn, de->d_name, len+1);
-
-		if (stat(path, &st) != 0) continue;
-		if (S_ISDIR(st.st_mode))
-			res |= ttf_map_dir(map, path, cookie);
-		else
-			res |= ttf_map_file(map, path, st.st_mtime, cookie);
-	}
-
-	closedir(dir);
-	return res;
-}
-
-int ttf_map_dirs(htsp_t *map, const char **font_dirs, void **cookie)
-{
-	int res = 0;
-
-	for(; *font_dirs != NULL; font_dirs++)
-		res |= ttf_map_dir(map, *font_dirs, cookie);
-
-	return res;
-}
-
-htsp_t *ttf_map_load(const char *cache_path, const char **font_dirs, void **cookie)
-{
-	htsp_t *map;
-	FT_Library *lib = calloc(sizeof(FT_Library), 1);
-	int res;
-
-	if (lib == NULL)
-		return NULL;
-
-	if (FT_Init_FreeType(lib) != 0) {
-		free(lib);
-		return NULL;
-	}
-
-	*cookie = lib;
-
-	map = htsp_alloc(strhash, strkeyeq);
-	ttf_map_cache_load(map, cache_path);
-	res = ttf_map_dirs(map, font_dirs, cookie);
-	if (res > 0)
-		ttf_map_cache_save(map, cache_path);
-
-	return map;
-}
-
-void ttf_map_free(htsp_t *map, void **cookie)
-{
-	FT_Library *lib = *cookie;
-	htsp_entry_t *e;
-
-	for(e = htsp_first(map); e != NULL; e = htsp_next(map, e)) {
-		ttf_map_font_t *f = e->value;
-		free((char *)f->path);
-		free((char *)f->family_name);
-		free((char *)f->style_name);
-		free(f);
-	}
-
-	htsp_free(map);
-
-	FT_Done_FreeType(*lib);
-	free(lib);
-}
diff -pruN 1.1.0-3/src_3rd/ttf2bbox/ttf_map.h 1.1.2-1/src_3rd/ttf2bbox/ttf_map.h
--- 1.1.0-3/src_3rd/ttf2bbox/ttf_map.h	2022-02-02 13:41:24.000000000 +0000
+++ 1.1.2-1/src_3rd/ttf2bbox/ttf_map.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-#include <time.h>
-#include <genht/htsp.h>
-
-typedef struct ttf_map_font_s ttf_map_font_t;
-
-struct ttf_map_font_s {
-	const char *path; /* also the hash key */
-	time_t mtime;
-	const char *family_name;
-	const char *style_name;
-	unsigned is_font:1;
-
-	/* fields that can be used by the caller */
-	long handle;
-	unsigned handle_valid:1;
-};
-
-/* Should be loaded with something unique (e.g. PID); this avoids temp file
-   race between two processes trying to update the same cache file */
-extern char ttf_map_cache_uniq[8];
-
-/* Loads and updates cache file at cache_path using all files in NULL terminated
-   font_dirs. Returns the head of a hash table of malloc'd font info structs.
-   Cookie is address to a void * used by the lib in the mapping. */
-htsp_t *ttf_map_load(const char *cache_path, const char **font_dirs, void **cookie);
-
-/* Frees a hash table of font info structs returned by ttf_map_load. Cookie
-   is the same that was passed to ttf_map_load() */
-void ttf_map_free(htsp_t *map, void **cookie);
diff -pruN 1.1.0-3/src_plugins/.builtin.pups 1.1.2-1/src_plugins/.builtin.pups
--- 1.1.0-3/src_plugins/.builtin.pups	2022-10-24 03:54:33.000000000 +0000
+++ 1.1.2-1/src_plugins/.builtin.pups	1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-# Autogenerated by ./configure - do NOT edit - contains the list of buildins
-
-dialogs=dialogs/dialogs.pup
-export_lpr=export_lpr/export_lpr.pup
-export_png=export_png/export_png.pup
-export_ps=export_ps/export_ps.pup
-export_svg=export_svg/export_svg.pup
-gui=gui/gui.pup
-import_excellon=import_excellon/import_excellon.pup
-import_gcode=import_gcode/import_gcode.pup
-import_gerb=import_gerb/import_gerb.pup
-io_tedax=io_tedax/io_tedax.pup
-std_tools=std_tools/std_tools.pup
diff -pruN 1.1.0-3/src_plugins/Buildin.tmpasm 1.1.2-1/src_plugins/Buildin.tmpasm
--- 1.1.0-3/src_plugins/Buildin.tmpasm	2022-08-04 13:47:27.000000000 +0000
+++ 1.1.2-1/src_plugins/Buildin.tmpasm	2022-12-12 14:03:32.000000000 +0000
@@ -1,19 +1,19 @@
 # tmpasm script for compiling a plugin_src/ module as a buildin
 # Requires variables before the include:
-#  /local/pcb/mod       basename of the module (e.g. autoplace)
-#  /local/pcb/mod/OBJS  full path of all object files
-#  /local/pcb/mod/OBJS_C99  full path of all object files for non-c89
-#  /local/pcb/mod/CONF  config file name
+#  /local/rnd/mod       basename of the module (e.g. autoplace)
+#  /local/rnd/mod/OBJS  full path of all object files
+#  /local/rnd/mod/OBJS_C99  full path of all object files for non-c89
+#  /local/rnd/mod/CONF  config file name
 
-append /local/camv/buildin_pups [@@/local/pcb/mod@=@/local/pcb/mod@/@/local/pcb/mod@.pup@] {\n}
+append /local/camv/buildin_pups [@@/local/rnd/mod@=@/local/rnd/mod@/@/local/rnd/mod@.pup@] {\n}
 
-append /local/camv/MOD_OBJS           ?/local/pcb/mod/OBJS
-append /local/camv/MOD_OBJS_C99       ?/local/pcb/mod/OBJS_C99
-append /local/camv/MOD_LDFLAGS        /local/pcb/mod/LDFLAGS
-append /local/camv/MOD_CFLAGS         /local/pcb/mod/CFLAGS
+append /local/camv/MOD_OBJS           ?/local/rnd/mod/OBJS
+append /local/camv/MOD_OBJS_C99       ?/local/rnd/mod/OBJS_C99
+append /local/camv/MOD_LDFLAGS        /local/rnd/mod/LDFLAGS
+append /local/camv/MOD_CFLAGS         /local/rnd/mod/CFLAGS
 append /local/camv/MOD_RULES [@
 
-mod_@/local/pcb/mod@: all
+mod_@/local/rnd/mod@: all
 
 @]
 
diff -pruN 1.1.0-3/src_plugins/Common_enabled.tmpasm 1.1.2-1/src_plugins/Common_enabled.tmpasm
--- 1.1.0-3/src_plugins/Common_enabled.tmpasm	2022-08-04 13:47:27.000000000 +0000
+++ 1.1.2-1/src_plugins/Common_enabled.tmpasm	2022-12-12 14:03:32.000000000 +0000
@@ -1,10 +1,10 @@
 # explicit rules: .y -> .c
 #  do not assume old yacc to work to different file names, do the generation
 #  in a separate directory to allow parallel compilation with -j
-switch /local/pcb/mod/YACC
+switch /local/rnd/mod/YACC
 	case {^$} end
 	default
-		foreach /local/n in /local/pcb/mod/YACC
+		foreach /local/n in /local/rnd/mod/YACC
 			put /local/bn /local/n
 			sub {/local/bn} {^.*/} {}
 			put /local/dn /local/n
@@ -12,14 +12,14 @@ switch /local/pcb/mod/YACC
 
 			if /local/camv/want_parsgen
 			then
-				append /local/pcb/RULES [@
-# yacc for @/local/pcb/mod@
+				append /local/rnd/RULES [@
+# yacc for @/local/rnd/mod@
 @/local/n@.c @/local/n@.h: @/local/n@.y
 	cd @/local/dn@ && bison --defines=@/local/bn@.h --output=@/local/bn@.c --report-file=@/local/bn@.output -d @/local/bn@.y
 @]
 			else
-				append /local/pcb/RULES [@
-# dummy yacc for @/local/pcb/mod@
+				append /local/rnd/RULES [@
+# dummy yacc for @/local/rnd/mod@
 @/local/n@.c @/local/n@.h:
 	echo "skipping yacc..."
 @]
@@ -31,10 +31,10 @@ end
 # explicit rules: .l -> .c
 #  do not assume old lex to work to different file names, do the generation
 #  in a separate directory to allow parallel compilation with -j
-switch /local/pcb/mod/LEX
+switch /local/rnd/mod/LEX
 	case {^$} end
 	default
-		foreach /local/n in /local/pcb/mod/LEX
+		foreach /local/n in /local/rnd/mod/LEX
 			if /local/camv/want_parsgen
 			then
 				put /local/bn /local/n
@@ -42,14 +42,14 @@ switch /local/pcb/mod/LEX
 				put /local/dn /local/n
 				sub {/local/dn} {/[^/]*$} {}
 
-				append /local/pcb/RULES [@
-# lex for @/local/pcb/mod@
+				append /local/rnd/RULES [@
+# lex for @/local/rnd/mod@
 @/local/n@.c @/local/n@.h: @/local/n@.l
 	cd @/local/dn@ && flex --outfile=@/local/bn@.c --header-file=@/local/bn@.h @/local/bn@.l
 @]
 			else
-				append /local/pcb/RULES [@
-# dummy lex for @/local/pcb/mod@
+				append /local/rnd/RULES [@
+# dummy lex for @/local/rnd/mod@
 @/local/n@.c:
 	echo "skipping flex..."
 @]
@@ -58,25 +58,25 @@ switch /local/pcb/mod/LEX
 	end
 end
 
-put /local/pcb/mod/enabled {1}
+put /local/rnd/mod/enabled {1}
 
 include  /local/camv/tmpasm/plugin_conf
 include  /local/camv/tmpasm/plugin_sphash
 include  /local/camv/tmpasm/plugin_intconf
 
-append /local/pcb/CLEANFILES ?/local/pcb/mod/CLEANFILES
-append /local/pcb/DISTCLEANFILES ?/local/pcb/mod/DISTCLEANFILES
+append /local/rnd/CLEANFILES ?/local/rnd/mod/CLEANFILES
+append /local/rnd/DISTCLEANFILES ?/local/rnd/mod/DISTCLEANFILES
 
-put /local/pcb/mod/enabled {}
-put /local/pcb/mod/OBJS {}
-put /local/pcb/mod/OBJS_C99 {}
-put /local/pcb/mod/LDFLAGS {}
-put /local/pcb/mod/CFLAGS {}
-put /local/pcb/mod/YACC {}
-put /local/pcb/mod/LEX {}
-put /local/pcb/mod/SPHASH {}
-put /local/pcb/mod/CLEANFILES {}
-put /local/pcb/mod/DISTCLEANFILES {}
-put /local/pcb/mod {}
-put /local/pcb/mod/CONFFILE {}
-put /local/pcb/mod/CONFVAR  {}
+put /local/rnd/mod/enabled {}
+put /local/rnd/mod/OBJS {}
+put /local/rnd/mod/OBJS_C99 {}
+put /local/rnd/mod/LDFLAGS {}
+put /local/rnd/mod/CFLAGS {}
+put /local/rnd/mod/YACC {}
+put /local/rnd/mod/LEX {}
+put /local/rnd/mod/SPHASH {}
+put /local/rnd/mod/CLEANFILES {}
+put /local/rnd/mod/DISTCLEANFILES {}
+put /local/rnd/mod {}
+put /local/rnd/mod/CONFFILE {}
+put /local/rnd/mod/CONFVAR  {}
diff -pruN 1.1.0-3/src_plugins/Disable.tmpasm 1.1.2-1/src_plugins/Disable.tmpasm
--- 1.1.0-3/src_plugins/Disable.tmpasm	2022-08-04 13:47:27.000000000 +0000
+++ 1.1.2-1/src_plugins/Disable.tmpasm	2022-12-12 14:03:32.000000000 +0000
@@ -1,24 +1,24 @@
 # tmpasm script for disable a plugin_src/ module 
 # Requires variables before the include:
-#  /local/pcb/mod/OBJS  full path of all object files
+#  /local/rnd/mod/OBJS  full path of all object files
 
 # append all objects to the source list used only for dependencies
 # NOTE: .o suffixes will be replaced with .c before generating the dep
-append /local/pcb/DEPSRCS            ?/local/pcb/mod/OBJS
-append /local/pcb/DEPSRCS            ?/local/pcb/mod/OBJS_C99
+append /local/pcb/DEPSRCS            ?/local/rnd/mod/OBJS
+append /local/pcb/DEPSRCS            ?/local/rnd/mod/OBJS_C99
 
-put /local/pcb/mod/enabled {0}
+put /local/rnd/mod/enabled {0}
 
 include  /local/camv/tmpasm/plugin_conf
 include  /local/camv/tmpasm/plugin_sphash
 include  /local/camv/tmpasm/plugin_intconf
 
-put /local/pcb/mod/enabled {}
-put /local/pcb/mod/OBJS {}
-put /local/pcb/mod/OBJS_C99 {}
-put /local/pcb/mod/CONF {}
-put /local/pcb/mod/LDFLAGS {}
-put /local/pcb/mod/CFLAGS {}
-put /local/pcb/mod {}
-put /local/pcb/mod/CONFFILE {}
-put /local/pcb/mod/CONFVAR  {}
+put /local/rnd/mod/enabled {}
+put /local/rnd/mod/OBJS {}
+put /local/rnd/mod/OBJS_C99 {}
+put /local/rnd/mod/CONF {}
+put /local/rnd/mod/LDFLAGS {}
+put /local/rnd/mod/CFLAGS {}
+put /local/rnd/mod {}
+put /local/rnd/mod/CONFFILE {}
+put /local/rnd/mod/CONFVAR  {}
diff -pruN 1.1.0-3/src_plugins/Plugin.tmpasm 1.1.2-1/src_plugins/Plugin.tmpasm
--- 1.1.0-3/src_plugins/Plugin.tmpasm	2022-08-04 13:47:27.000000000 +0000
+++ 1.1.2-1/src_plugins/Plugin.tmpasm	2022-12-12 14:03:32.000000000 +0000
@@ -1,48 +1,49 @@
 # tmpasm script for compiling a plugin_src/ module as a plugin
 # Requires variables before the include:
-#  /local/pcb/mod       basename of the module (e.g. autoplace)
-#  /local/pcb/mod/OBJS  full path of all object files
-#  /local/pcb/mod/OBJS_C99  full path of all object files for non-c89
+#  /local/rnd/mod       basename of the module (e.g. autoplace)
+#  /local/rnd/mod/OBJS  full path of all object files
+#  /local/rnd/mod/OBJS_C99  full path of all object files for non-c89
 
 # clean up input vars
-uniq /local/pcb/mod/OBJS
-uniq /local/pcb/mod/OBJS_C99
-uniq /local/pcb/mod/CFLAGS
-uniq /local/pcb/mod/LDFLAGS
-uniq /local/pcb/mod/LIBS
+uniq /local/rnd/mod/OBJS
+uniq /local/rnd/mod/OBJS_C99
+uniq /local/rnd/mod/CFLAGS
+uniq /local/rnd/mod/LDFLAGS
+uniq /local/rnd/mod/LIBS
 
 # generate .c -> .o rules in /local/comp/output
-put /local/comp/OBJS ?/local/pcb/mod/OBJS
-put /local/comp/OBJS_C99 ?/local/pcb/mod/OBJS_C99
-put /local/comp/CFLAGS /local/pcb/mod/CFLAGS
+put /local/comp/OBJS_C89 ?/local/rnd/mod/OBJS
+put /local/comp/OBJS_C99 ?/local/rnd/mod/OBJS_C99
+put /local/comp/C89FLAGS [@ $(C89FLAGS) @/local/rnd/mod/CFLAGS@ @]
+put /local/comp/C99FLAGS [@ $(CFLAGS) @/local/rnd/mod/CFLAGS@ @]
 include /local/camv/tmpasm/comp_var
 
-append /local/pcb/all   [@ $(PLUGIDIR)/@/local/pcb/mod@.so @]
+append /local/pcb/all   [@ $(PLUGIDIR)/@/local/rnd/mod@.so @]
 
-append /local/pcb/rules/install_ [@
-	$(SCCBOX) $(HOW) "$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so" "$(LIBDIR)/plugins/@/local/pcb/mod@.so"
-	$(SCCBOX) $(HOW) "$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.pup" "$(LIBDIR)/plugins/@/local/pcb/mod@.pup"@]
+append /local/rnd/rules/install_ [@
+	$(SCCBOX) $(HOW) "$(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so" "$(LIBDIR)/plugins/@/local/rnd/mod@.so"
+	$(SCCBOX) $(HOW) "$(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.pup" "$(LIBDIR)/plugins/@/local/rnd/mod@.pup"@]
 
-append /local/pcb/CLEANFILES [@ $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so $(PLUGIDIR)/@/local/pcb/mod@.so $(PLUGIDIR)/@/local/pcb/mod@.pup @/local/pcb/mod/OBJS@  @/local/pcb/mod/OBJS_C99@ @]
+append /local/rnd/CLEANFILES [@ $(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so $(PLUGIDIR)/@/local/rnd/mod@.so $(PLUGIDIR)/@/local/rnd/mod@.pup @/local/rnd/mod/OBJS@  @/local/rnd/mod/OBJS_C99@ @]
 
 append /local/camv/MOD_RULES [@
 
-### Module @/local/pcb/mod@: plugin ###
+### Module @/local/rnd/mod@: plugin ###
 
-$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so: @/local/pcb/mod/OBJS@ @/local/pcb/mod/OBJS_C99@
-	$(CC) -shared @cc/rdynamic@ -o $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so @/local/pcb/mod/OBJS@ @/local/pcb/mod/OBJS_C99@  $(LDFLAGS) @/local/pcb/mod/LDFLAGS@
+$(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so: @/local/rnd/mod/OBJS@ @/local/rnd/mod/OBJS_C99@
+	$(CC) -shared @cc/rdynamic@ -o $(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so @/local/rnd/mod/OBJS@ @/local/rnd/mod/OBJS_C99@  $(LDFLAGS) @/local/rnd/mod/LDFLAGS@
 
-mod_@/local/pcb/mod@: $(PLUGIDIR)/@/local/pcb/mod@.so
+mod_@/local/rnd/mod@: $(PLUGIDIR)/@/local/rnd/mod@.so
 
-$(PLUGIDIR)/@/local/pcb/mod@.so: $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so
+$(PLUGIDIR)/@/local/rnd/mod@.so: $(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so
 	$(MKDIR) $(PLUGIDIR)
-	$(CP) $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so $(PLUGIDIR)/@/local/pcb/mod@.so
-	$(CP) $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.pup $(PLUGIDIR)/@/local/pcb/mod@.pup
+	$(CP) $(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.so $(PLUGIDIR)/@/local/rnd/mod@.so
+	$(CP) $(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod@.pup $(PLUGIDIR)/@/local/rnd/mod@.pup
 
 # module .c -> .o rules
 @/local/comp/output@
 
-### Module @/local/pcb/mod@ end ###
+### Module @/local/rnd/mod@ end ###
 @]
 
 include /local/camv/tmpasm/common_enabled
diff -pruN 1.1.0-3/src_plugins/dialogs/Plug.tmpasm 1.1.2-1/src_plugins/dialogs/Plug.tmpasm
--- 1.1.0-3/src_plugins/dialogs/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,12 +1,12 @@
-put /local/pcb/mod {dialogs}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {dialogs}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/dialogs/dialogs.o
 	$(PLUGDIR)/dialogs/dlg_about.o
 	$(PLUGDIR)/dialogs/dlg_layer.o
 	$(PLUGDIR)/dialogs/dlg_pref_apptab.o
 @]
 
-switch /local/pcb/dialogs/controls
+switch /local/module/dialogs/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/dialogs/dialogs.c 1.1.2-1/src_plugins/dialogs/dialogs.c
--- 1.1.0-3/src_plugins/dialogs/dialogs.c	2022-06-14 05:20:12.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dialogs.c	2022-12-19 04:37:45.000000000 +0000
@@ -32,7 +32,7 @@
 #include <librnd/core/event.h>
 #include <librnd/core/actions.h>
 #include <librnd/core/hidlib.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/core/rnd_conf.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/compat_fs.h>
 #include <librnd/core/globalconst.h>
@@ -51,12 +51,12 @@
 
 static const char *camv_dialogs_cookie = "camv_dialogs";
 
-void camv_dialogs_layer_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_dialogs_layer_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	camv_layer_dlg_layer_chg_ev(hidlib, user_data, argc, argv);
 }
 
-void camv_dialogs_layer_selected_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_dialogs_layer_selected_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	camv_layer_dlg_layer_chg_ev(hidlib, user_data, argc, argv);
 }
@@ -70,8 +70,8 @@ static rnd_action_t camv_dialogs_action_
 	{"LayerDialog", camv_act_LayerDialog, camv_acth_LayerDialog, camv_acts_LayerDialog}
 };
 
-extern int pcb_dlg_pref_tab;
-extern void (*pcb_dlg_pref_first_init)(pref_ctx_t *ctx, int tab);
+extern int camv_dlg_pref_tab;
+extern void (*camv_dlg_pref_first_init)(pref_ctx_t *ctx, int tab);
 
 int pplg_check_ver_dialogs(int ver_needed) { return 0; }
 
@@ -87,7 +87,7 @@ int pplg_init_dialogs(void)
 	RND_API_CHK_VER;
 
 	RND_REGISTER_ACTIONS(camv_dialogs_action_list, camv_dialogs_cookie);
-	rnd_dlg_pref_init(pcb_dlg_pref_tab, pcb_dlg_pref_first_init);
+	rnd_dlg_pref_init(camv_dlg_pref_tab, camv_dlg_pref_first_init);
 
 	rnd_event_bind(CAMV_EVENT_LAYERS_CHANGED, camv_dialogs_layer_chg_ev, NULL, camv_dialogs_cookie);
 	rnd_event_bind(CAMV_EVENT_LAYER_SELECTED, camv_dialogs_layer_selected_ev, NULL, camv_dialogs_cookie);
diff -pruN 1.1.0-3/src_plugins/dialogs/dialogs.pup 1.1.2-1/src_plugins/dialogs/dialogs.pup
--- 1.1.0-3/src_plugins/dialogs/dialogs.pup	2022-06-14 03:21:51.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dialogs.pup	2022-11-17 03:07:59.000000000 +0000
@@ -2,7 +2,7 @@ $class gui
 $short base dialogs
 $long Standard viewer dialog boxes
 $state works
-$package (core)
+$package lib-gui
 default buildin
 dep lib_hid_common
 autoload 1
diff -pruN 1.1.0-3/src_plugins/dialogs/dlg_about.c 1.1.2-1/src_plugins/dialogs/dlg_about.c
--- 1.1.0-3/src_plugins/dialogs/dlg_about.c	2022-06-14 03:21:51.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dlg_about.c	2022-11-19 06:40:13.000000000 +0000
@@ -31,7 +31,7 @@
 #include <genvector/gds_char.h>
 #include <librnd/core/actions.h>
 #include <librnd/core/file_loaded.h>
-#include <librnd/core/hid_dad.h>
+#include <librnd/hid/hid_dad.h>
 #include <librnd/core/rnd_printf.h>
 
 #include "build_run.h"
diff -pruN 1.1.0-3/src_plugins/dialogs/dlg_layer.c 1.1.2-1/src_plugins/dialogs/dlg_layer.c
--- 1.1.0-3/src_plugins/dialogs/dlg_layer.c	2022-06-14 05:55:55.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dlg_layer.c	2022-11-19 08:55:37.000000000 +0000
@@ -28,7 +28,7 @@
 #include <librnd/config.h>
 
 #include <librnd/core/actions.h>
-#include <librnd/core/hid_dad.h>
+#include <librnd/hid/hid_dad.h>
 
 #include "data.h"
 #include "event.h"
@@ -142,7 +142,7 @@ static void camv_rnd_dlg_layer(void)
 	layer_camv2dlg(&layer_ctx);
 }
 
-void camv_layer_dlg_layer_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_layer_dlg_layer_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	if (layer_ctx.active)
 		layer_camv2dlg(&layer_ctx);
diff -pruN 1.1.0-3/src_plugins/dialogs/dlg_layer.h 1.1.2-1/src_plugins/dialogs/dlg_layer.h
--- 1.1.0-3/src_plugins/dialogs/dlg_layer.h	2022-06-14 05:20:12.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dlg_layer.h	2022-11-19 08:55:37.000000000 +0000
@@ -2,5 +2,5 @@ extern const char camv_acts_LayerDialog[
 extern const char camv_acth_LayerDialog[];
 fgw_error_t camv_act_LayerDialog(fgw_arg_t *res, int argc, fgw_arg_t *argv);
 
-void camv_layer_dlg_layer_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_layer_dlg_layer_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
 
diff -pruN 1.1.0-3/src_plugins/dialogs/dlg_pref_apptab.c 1.1.2-1/src_plugins/dialogs/dlg_pref_apptab.c
--- 1.1.0-3/src_plugins/dialogs/dlg_pref_apptab.c	2022-06-14 03:47:16.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dlg_pref_apptab.c	2022-12-19 04:37:45.000000000 +0000
@@ -34,6 +34,6 @@
 #define PREF_TAB 0
 #include "dlg_pref_general.c"
 
-int pcb_dlg_pref_tab = PREF_TAB;
-void (*pcb_dlg_pref_first_init)(pref_ctx_t *ctx, int tab) = PREF_INIT_FUNC;
+int camv_dlg_pref_tab = PREF_TAB;
+void (*camv_dlg_pref_first_init)(pref_ctx_t *ctx, int tab) = PREF_INIT_FUNC;
 
diff -pruN 1.1.0-3/src_plugins/dialogs/dlg_pref_general.c 1.1.2-1/src_plugins/dialogs/dlg_pref_general.c
--- 1.1.0-3/src_plugins/dialogs/dlg_pref_general.c	2022-06-14 03:52:40.000000000 +0000
+++ 1.1.2-1/src_plugins/dialogs/dlg_pref_general.c	2022-12-19 04:37:45.000000000 +0000
@@ -38,13 +38,13 @@ static pref_confitem_t perf_backup[] = {
 };
 
 static pref_confitem_t perf_cli[] = {
-	{"Number of commands to\nremember in the\nhistory list", "plugins/hid_gtk/history_size", 0, NULL},
+	{"Number of commands to\nremember in the\nhistory list", "plugins/lib_hid_common/cli_history/slots", 0, NULL},
 	{NULL, NULL, 0}
 };
 
 static void pref_general_dlg2conf(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr)
 {
-	rnd_hidlib_t *hl = rnd_gui->get_dad_hidlib(hid_ctx);
+	rnd_design_t *hl = rnd_gui->get_dad_design(hid_ctx);
 	pref_ctx_t *ctx = caller_data;
 
 	if (rnd_pref_dlg2conf_pre(hl, ctx) == NULL)
@@ -56,13 +56,13 @@ static void pref_general_dlg2conf(void *
 	rnd_pref_dlg2conf_post(hl, ctx);
 }
 
-void pcb_dlg_pref_general_close(pref_ctx_t *ctx)
+void camv_dlg_pref_general_close(pref_ctx_t *ctx, rnd_design_t *dsg)
 {
 	rnd_pref_conflist_remove(ctx, perf_backup);
 	rnd_pref_conflist_remove(ctx, perf_cli);
 }
 
-void pcb_dlg_pref_general_create(pref_ctx_t *ctx)
+void camv_dlg_pref_general_create(pref_ctx_t *ctx, rnd_design_t *dsg)
 {
 	RND_DAD_BEGIN_VBOX(ctx->dlg);
 		RND_DAD_COMPFLAG(ctx->dlg, RND_HATF_FRAME);
@@ -83,14 +83,14 @@ void pcb_dlg_pref_general_create(pref_ct
 
 static const rnd_pref_tab_hook_t pref_general = {
 	"General", RND_PREFTAB_AUTO_FREE_DATA | RND_PREFTAB_NEEDS_ROLE,
-	NULL, pcb_dlg_pref_general_close,
-	pcb_dlg_pref_general_create,
+	NULL, camv_dlg_pref_general_close,
+	camv_dlg_pref_general_create,
 	NULL, NULL
 };
 
-static void pcb_dlg_pref_general_init(pref_ctx_t *ctx, int tab)
+static void camv_dlg_pref_general_init(pref_ctx_t *ctx, int tab)
 {
 	PREF_INIT(ctx, &pref_general);
 }
 #undef PREF_INIT_FUNC
-#define PREF_INIT_FUNC pcb_dlg_pref_general_init
+#define PREF_INIT_FUNC camv_dlg_pref_general_init
diff -pruN 1.1.0-3/src_plugins/export_lpr/Plug.tmpasm 1.1.2-1/src_plugins/export_lpr/Plug.tmpasm
--- 1.1.0-3/src_plugins/export_lpr/Plug.tmpasm	2022-10-24 03:54:33.000000000 +0000
+++ 1.1.2-1/src_plugins/export_lpr/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,9 +1,9 @@
-put /local/pcb/mod {export_lpr}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {export_lpr}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/export_lpr/lpr.o
 @]
 
-switch /local/pcb/export_lpr/controls
+switch /local/module/export_lpr/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/export_lpr/lpr.c 1.1.2-1/src_plugins/export_lpr/lpr.c
--- 1.1.0-3/src_plugins/export_lpr/lpr.c	2022-10-24 03:54:33.000000000 +0000
+++ 1.1.2-1/src_plugins/export_lpr/lpr.c	2022-12-15 09:40:16.000000000 +0000
@@ -1,7 +1,7 @@
  /*
   *                            COPYRIGHT
   *
-  *  pcb-rnd, interactive printed circuit board design
+  *  camv-rnd - electronics-related CAM viewer
   *  Copyright (C) 2022 Tibor 'Igor2' Palinkas
   *
   *  This program is free software; you can redistribute it and/or modify
@@ -19,15 +19,15 @@
   *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   *
   *  Contact:
-  *    Project page: http://repo.hu/projects/pcb-rnd
-  *    lead developer: http://repo.hu/projects/pcb-rnd/contact.html
+  *    Project page: http://repo.hu/projects/camv-rnd
+  *    lead developer: http://repo.hu/projects/camv-rnd/contact.html
   *    mailing list: pcb-rnd (at) list.repo.hu (send "subscribe")
   */
 
 #include <librnd/config.h>
 
 #include <stdio.h>
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
 #include <librnd/plugins/lib_exp_text/lpr_hid.h>
 
 #include "../export_ps/export_ps.h"
diff -pruN 1.1.0-3/src_plugins/export_png/Plug.tmpasm 1.1.2-1/src_plugins/export_png/Plug.tmpasm
--- 1.1.0-3/src_plugins/export_png/Plug.tmpasm	2022-10-24 02:57:17.000000000 +0000
+++ 1.1.2-1/src_plugins/export_png/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,9 +1,9 @@
-put /local/pcb/mod {export_png}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {export_png}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/export_png/export_png.o
 @]
 
-switch /local/pcb/export_png/controls
+switch /local/module/export_png/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/export_png/export_png.c 1.1.2-1/src_plugins/export_png/export_png.c
--- 1.1.0-3/src_plugins/export_png/export_png.c	2022-10-24 03:15:46.000000000 +0000
+++ 1.1.2-1/src_plugins/export_png/export_png.c	2022-12-19 04:29:19.000000000 +0000
@@ -1,7 +1,8 @@
  /*
   *                            COPYRIGHT
   *
-  *  pcb-rnd, interactive printed circuit board design
+  *  camv-rnd - electronics-related CAM viewer
+  *  (based on pcb-rnd)
   *  Copyright (C) 2022 Tibor 'Igor2' Palinkas
   *
   *  This program is free software; you can redistribute it and/or modify
@@ -19,8 +20,8 @@
   *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   *
   *  Contact:
-  *    Project page: http://repo.hu/projects/pcb-rnd
-  *    lead developer: http://repo.hu/projects/pcb-rnd/contact.html
+  *    Project page: http://repo.hu/projects/camv-rnd
+  *    lead developer: http://repo.hu/projects/camv-rnd/contact.html
   *    mailing list: pcb-rnd (at) list.repo.hu (send "subscribe")
   */
 
@@ -37,11 +38,11 @@
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/plugins.h>
 #include <librnd/core/safe_fs.h>
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
 #include <librnd/core/hidlib.h>
-#include <librnd/core/hid_nogui.h>
-#include <librnd/core/hid_init.h>
-#include <librnd/core/hid_attrib.h>
+#include <librnd/hid/hid_nogui.h>
+#include <librnd/hid/hid_init.h>
+#include <librnd/hid/hid_attrib.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/plugins/lib_exp_pixmap/draw_pixmap.h>
 
@@ -107,7 +108,7 @@ static const rnd_export_opt_t png_attrib
 
 static rnd_hid_attr_val_t png_values[NUM_OPTIONS];
 
-static const rnd_export_opt_t *png_get_export_options(rnd_hid_t *hid, int *n)
+static const rnd_export_opt_t *png_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec)
 {
 	if (n)
 		*n = NUM_OPTIONS;
@@ -132,19 +133,19 @@ static void png_finish(FILE *f)
 	rnd_drwpx_finish(pctx, f, png_options[HA_filetype].lng);
 }
 
-void png_hid_export_to_file(FILE *the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform)
+void png_hid_export_to_file(rnd_design_t *hl, FILE *the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
 	rnd_box_t region;
 	rnd_hid_expose_ctx_t ctx;
 	double dtmp;
 
 	png_f = the_file;
 
-	region.X1 = 0;
-	region.Y1 = 0;
-	region.X2 = hl->size_x;
-	region.Y2 = hl->size_y;
+	ctx.design = hl;
+	region.X1 = hl->dwg.X1;
+	region.Y1 = hl->dwg.Y1;
+	region.X2 = hl->dwg.X2;
+	region.Y2 = hl->dwg.Y2;
 
 	png_options = options;
 	bounds = &region;
@@ -159,16 +160,16 @@ void png_hid_export_to_file(FILE *the_fi
 	rnd_app.expose_main(&png_hid, &ctx, xform);
 }
 
-static void png_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options)
+static void png_do_export(rnd_hid_t *hid, rnd_design_t *design, rnd_hid_attr_val_t *options, void *appspec)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = design;
 	rnd_xform_t xform = {0};
 	FILE *f;
 
 	rnd_drwpx_init(pctx, hl);
 
 	if (!options) {
-		png_get_export_options(hid, 0);
+		png_get_export_options(hid, 0, design, appspec);
 		options = png_values;
 	}
 
@@ -192,7 +193,7 @@ static void png_do_export(rnd_hid_t *hid
 		goto error;
 	}
 
-	png_hid_export_to_file(f, options, &xform);
+	png_hid_export_to_file(hl, f, options, &xform);
 
 	png_finish(f);
 	if (f != NULL)
@@ -209,7 +210,7 @@ static int png_parse_arguments(rnd_hid_t
 	return rnd_hid_parse_command_line(argc, argv);
 }
 
-static int png_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
+static int png_set_layer_group(rnd_hid_t *hid, rnd_design_t *design, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
 {
 	return 1;
 }
@@ -285,15 +286,11 @@ static void png_draw_pixmap(rnd_hid_t *h
 }
 #endif
 
-static void png_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a)
-{
-}
-
 static int png_usage(rnd_hid_t *hid, const char *topic)
 {
 	fprintf(stderr, "\npng exporter command line arguments:\n\n");
 	rnd_hid_usage(png_attribute_list, sizeof(png_attribute_list) / sizeof(png_attribute_list[0]));
-	fprintf(stderr, "\nUsage: camv-rnd [generic_options] -x png [png options] foo.pcb\n\n");
+	fprintf(stderr, "\nUsage: camv-rnd [generic_options] -x png [png options] foo.gbr\n\n");
 	return 0;
 }
 
@@ -339,7 +336,6 @@ int pplg_init_export_png(void)
 	png_hid.fill_polygon_offs = png_fill_polygon_offs;
 	png_hid.fill_rect = png_fill_rect;
 /*	png_hid.draw_pixmap = png_draw_pixmap;*/
-	png_hid.set_crosshair = png_set_crosshair;
 	png_hid.argument_array = png_values;
 
 	png_hid.usage = png_usage;
diff -pruN 1.1.0-3/src_plugins/export_ps/Plug.tmpasm 1.1.2-1/src_plugins/export_ps/Plug.tmpasm
--- 1.1.0-3/src_plugins/export_ps/Plug.tmpasm	2022-10-24 03:44:49.000000000 +0000
+++ 1.1.2-1/src_plugins/export_ps/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,11 +1,11 @@
-put /local/pcb/mod {export_ps}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {export_ps}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/export_ps/export_ps.o
 	$(PLUGDIR)/export_ps/ps.o
 	$(PLUGDIR)/export_ps/eps.o
 @]
 
-switch /local/pcb/export_ps/controls
+switch /local/module/export_ps/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/export_ps/eps.c 1.1.2-1/src_plugins/export_ps/eps.c
--- 1.1.0-3/src_plugins/export_ps/eps.c	2022-10-24 03:44:49.000000000 +0000
+++ 1.1.2-1/src_plugins/export_ps/eps.c	2022-12-01 04:49:04.000000000 +0000
@@ -14,10 +14,10 @@
 #include <librnd/core/color.h>
 #include <librnd/core/rnd_printf.h>
 #include <librnd/core/safe_fs.h>
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_nogui.h>
-#include <librnd/core/hid_init.h>
-#include <librnd/core/hid_attrib.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_nogui.h>
+#include <librnd/hid/hid_init.h>
+#include <librnd/hid/hid_attrib.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/plugins/lib_exp_text/draw_eps.h>
 
@@ -85,7 +85,7 @@ Convert output to monochrome.
 
 static rnd_hid_attr_val_t eps_values[NUM_OPTIONS];
 
-static const rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n)
+static const rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec)
 {
 	if (n)
 		*n = NUM_OPTIONS;
@@ -96,19 +96,18 @@ static const char *filename;
 static double eps_fill_gray_thrs;
 static rnd_hid_attr_val_t *options_;
 
-void eps_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform)
+void eps_hid_export_to_file(rnd_design_t *hl, FILE * the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
 	rnd_box_t region, *bnds;
 	double dtmp;
 	rnd_hid_expose_ctx_t ctx;
 
 	options_ = options;
 
-	region.X1 = 0;
-	region.Y1 = 0;
-	region.X2 = hl->size_x;
-	region.Y2 = hl->size_y;
+	region.X1 = hl->dwg.X1;
+	region.Y1 = hl->dwg.Y1;
+	region.X2 = hl->dwg.X2;
+	region.Y2 = hl->dwg.Y2;
 	bnds = &region;
 
 	rnd_eps_init(pctx, the_file, *bnds, options_[HA_scale].dbl, options[HA_mono].lng, 0);
@@ -119,6 +118,7 @@ void eps_hid_export_to_file(FILE * the_f
 	if (pctx->outf != NULL)
 		rnd_eps_print_header(pctx, rnd_hid_export_fn(filename), 0, 1);
 
+	ctx.design = hl;
 	ctx.view = *bnds;
 	rnd_app.expose_main(&eps_hid, &ctx, xform);
 
@@ -127,13 +127,13 @@ void eps_hid_export_to_file(FILE * the_f
 	options_ = NULL;
 }
 
-static void eps_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options)
+static void eps_do_export(rnd_hid_t *hid, rnd_design_t *design, rnd_hid_attr_val_t *options, void *appspec)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = design;
 	rnd_xform_t xform = {0};
 
 	if (!options) {
-		eps_get_export_options(hid, 0);
+		eps_get_export_options(hid, 0, design, appspec);
 		options = eps_values;
 	}
 
@@ -144,7 +144,7 @@ static void eps_do_export(rnd_hid_t *hid
 		goto error;
 	}
 
-	eps_hid_export_to_file(pctx->outf, options, &xform);
+	eps_hid_export_to_file(hl, pctx->outf, options, &xform);
 
 	fclose(pctx->outf);
 
@@ -157,7 +157,7 @@ static int eps_parse_arguments(rnd_hid_t
 	return rnd_hid_parse_command_line(argc, argv);
 }
 
-static int eps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
+static int eps_set_layer_group(rnd_hid_t *hid, rnd_design_t *design, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
 {
 	return 1;
 }
diff -pruN 1.1.0-3/src_plugins/export_ps/export_ps.c 1.1.2-1/src_plugins/export_ps/export_ps.c
--- 1.1.0-3/src_plugins/export_ps/export_ps.c	2022-10-24 03:48:12.000000000 +0000
+++ 1.1.2-1/src_plugins/export_ps/export_ps.c	2022-11-19 06:40:13.000000000 +0000
@@ -31,7 +31,7 @@
 #include <stdio.h>
 
 #include <librnd/core/plugins.h>
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
 
 #include "export_ps.h"
 
diff -pruN 1.1.0-3/src_plugins/export_ps/export_ps.h 1.1.2-1/src_plugins/export_ps/export_ps.h
--- 1.1.0-3/src_plugins/export_ps/export_ps.h	2022-10-24 03:44:49.000000000 +0000
+++ 1.1.2-1/src_plugins/export_ps/export_ps.h	2022-12-12 04:27:47.000000000 +0000
@@ -1,6 +1,6 @@
 /* required by lpr */
 extern rnd_hid_t ps_hid;
-extern void ps_hid_export_to_file(FILE *, rnd_hid_attr_val_t *, rnd_xform_t *);
+extern void ps_hid_export_to_file(rnd_design_t *dsg, FILE *, rnd_hid_attr_val_t *, rnd_xform_t *, void *);
 void ps_ps_init(rnd_hid_t * hid);
 
 /* required for ps<->eps cross call */
diff -pruN 1.1.0-3/src_plugins/export_ps/ps.c 1.1.2-1/src_plugins/export_ps/ps.c
--- 1.1.0-3/src_plugins/export_ps/ps.c	2022-10-24 03:44:49.000000000 +0000
+++ 1.1.2-1/src_plugins/export_ps/ps.c	2023-03-12 06:00:25.000000000 +0000
@@ -13,10 +13,10 @@
 #include <librnd/core/rnd_printf.h>
 #include <librnd/core/plugins.h>
 #include <librnd/core/safe_fs.h>
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_nogui.h>
-#include <librnd/core/hid_init.h>
-#include <librnd/core/hid_attrib.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_nogui.h>
+#include <librnd/hid/hid_init.h>
+#include <librnd/hid/hid_attrib.h>
 #include <librnd/core/actions.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/plugins/lib_exp_text/draw_ps.h>
@@ -30,7 +30,7 @@
 
 const char *ps_cookie = "ps HID";
 
-static int ps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform);
+static int ps_set_layer_group(rnd_hid_t *hid, rnd_design_t *design, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform);
 
 static const rnd_export_opt_t ps_attribute_list[] = {
 	/* other HIDs expect this to be first.  */
@@ -53,8 +53,8 @@ Scale output to make the sheet fit the p
 @end ftable
 %end-doc
 */
-	{"fill-page", "Scale drawing to fill page (default on)",
-	 RND_HATT_BOOL, 0, 0, {1, 0, 0}, 0},
+	{"fill-page", "Scale drawing to fill page (default off)",
+	 RND_HATT_BOOL, 0, 0, {0, 0, 0}, 0},
 #define HA_fillpage 1
 
 /* %start-doc options "91 Postscript Export"
@@ -163,14 +163,14 @@ static struct {
 	int had_page; /* 1 if we ever wrote a page */
 } global;
 
-static const rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n)
+static const rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec)
 {
 	if (n)
 		*n = NUM_OPTIONS;
 	return ps_attribute_list;
 }
 
-static FILE *psopen(rnd_hidlib_t *hl, const char *base, const char *which)
+static FILE *psopen(rnd_design_t *hl, const char *base, const char *which)
 {
 	FILE *ps_open_file;
 	char *buf, *suff, *buf2;
@@ -198,9 +198,8 @@ static FILE *psopen(rnd_hidlib_t *hl, co
 }
 
 /* This is used by other HIDs that use a postscript format, like lpr or eps.  */
-void ps_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform)
+void ps_hid_export_to_file(rnd_design_t *hl, FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform, void *appspec)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
 	double dtmp;
 	int toc;
 
@@ -219,10 +218,11 @@ void ps_hid_export_to_file(FILE * the_fi
 	/* reset static vars */
 	rnd_ps_use_gc(&global.ps, NULL);
 
-	global.exps.view.X1 = 0;
-	global.exps.view.Y1 = 0;
-	global.exps.view.X2 = hl->size_x;
-	global.exps.view.Y2 = hl->size_y;
+	global.exps.design = hl;
+	global.exps.view.X1 = hl->dwg.X1;
+	global.exps.view.Y1 = hl->dwg.Y1;
+	global.exps.view.X2 = hl->dwg.X2;
+	global.exps.view.Y2 = hl->dwg.Y2;
 
 	/* print ToC */
 	switch(options[HA_toc].lng) {
@@ -245,16 +245,16 @@ void ps_hid_export_to_file(FILE * the_fi
 	rnd_ps_end_pages(&global.ps);
 }
 
-static void ps_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options)
+static void ps_do_export(rnd_hid_t *hid, rnd_design_t *design, rnd_hid_attr_val_t *options, void *appspec)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = design;
 	FILE *fh;
 	rnd_xform_t xform = {0};
 
 	global.ovr_all = 0;
 
 	if (!options) {
-		ps_get_export_options(hid, 0);
+		ps_get_export_options(hid, 0, design, appspec);
 		options = global.ps_values;
 	}
 
@@ -272,7 +272,7 @@ static void ps_do_export(rnd_hid_t *hid,
 		}
 	}
 
-	ps_hid_export_to_file(fh, options, &xform);
+	ps_hid_export_to_file(hl, fh, options, &xform, appspec);
 
 	global.multi_file = 0;
 	if (fh) {
@@ -289,9 +289,9 @@ static int ps_parse_arguments(rnd_hid_t
 	return rnd_hid_parse_command_line(argc, argv);
 }
 
-static int ps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
+static int ps_set_layer_group(rnd_hid_t *hid, rnd_design_t *design, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = &camv.hidlib;
 	gds_t tmp_ln;
 	const char *name;
 	int newpage;
@@ -426,7 +426,6 @@ void ps_ps_init(rnd_hid_t * hid)
 	hid->set_line_cap = rnd_ps_set_line_cap;
 	hid->set_line_width = rnd_ps_set_line_width;
 	hid->set_draw_xor = rnd_ps_set_draw_xor;
-	hid->set_draw_faded = rnd_ps_set_draw_faded;
 	hid->draw_line = ps_draw_line;
 	hid->draw_arc = ps_draw_arc;
 	hid->draw_rect = ps_draw_rect;
diff -pruN 1.1.0-3/src_plugins/export_svg/Plug.tmpasm 1.1.2-1/src_plugins/export_svg/Plug.tmpasm
--- 1.1.0-3/src_plugins/export_svg/Plug.tmpasm	2022-10-24 03:28:01.000000000 +0000
+++ 1.1.2-1/src_plugins/export_svg/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,9 +1,9 @@
-put /local/pcb/mod {export_svg}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {export_svg}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/export_svg/export_svg.o
 @]
 
-switch /local/pcb/export_svg/controls
+switch /local/module/export_svg/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/export_svg/export_svg.c 1.1.2-1/src_plugins/export_svg/export_svg.c
--- 1.1.0-3/src_plugins/export_svg/export_svg.c	2022-10-24 03:28:01.000000000 +0000
+++ 1.1.2-1/src_plugins/export_svg/export_svg.c	2022-12-01 14:19:37.000000000 +0000
@@ -38,16 +38,16 @@
 #include <genvector/gds_char.h>
 
 #include <librnd/core/math_helper.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/core/rnd_conf.h>
 #include <librnd/core/error.h>
 #include <librnd/core/misc_util.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/plugins.h>
 #include <librnd/core/safe_fs.h>
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_nogui.h>
-#include <librnd/core/hid_init.h>
-#include <librnd/core/hid_attrib.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_nogui.h>
+#include <librnd/hid/hid_init.h>
+#include <librnd/hid/hid_attrib.h>
 #include <librnd/plugins/lib_exp_text/draw_svg.h>
 
 #include "export.h"
@@ -88,22 +88,23 @@ static rnd_hid_attr_val_t svg_values[NUM
 
 static char *out_filename;
 
-static const rnd_export_opt_t *svg_get_export_options(rnd_hid_t *hid, int *n)
+static const rnd_export_opt_t *svg_get_export_options(rnd_hid_t *hid, int *n, rnd_design_t *dsg, void *appspec)
 {
 	if (n)
 		*n = NUM_OPTIONS;
 	return svg_attribute_list;
 }
 
-void svg_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform)
+void svg_hid_export_to_file(rnd_design_t *dsg, FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = dsg;
 	rnd_hid_expose_ctx_t ctx;
 
-	ctx.view.X1 = 0;
-	ctx.view.Y1 = 0;
-	ctx.view.X2 = hl->size_x;
-	ctx.view.Y2 = hl->size_y;
+	ctx.design = hl;
+	ctx.view.X1 = hl->dwg.X1;
+	ctx.view.Y1 = hl->dwg.Y1;
+	ctx.view.X2 = hl->dwg.X2;
+	ctx.view.Y2 = hl->dwg.Y2;
 
 	pctx->outf = the_file;
 
@@ -113,17 +114,16 @@ void svg_hid_export_to_file(FILE * the_f
 	rnd_app.expose_main(&svg_hid, &ctx, xform);
 }
 
-static void svg_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options)
+static void svg_do_export(rnd_hid_t *hid, rnd_design_t *design, rnd_hid_attr_val_t *options, void *appspec)
 {
-	rnd_hidlib_t *hl = &camv.hidlib;
+	rnd_design_t *hl = design;
 	rnd_xform_t xform = {0};
 	FILE *f = NULL;
-	void *view_cookie;
 
 	pctx->comp_cnt = 0;
 
 	if (!options) {
-		svg_get_export_options(hid, 0);
+		svg_get_export_options(hid, 0, design, appspec);
 		options = svg_values;
 	}
 
@@ -142,7 +142,7 @@ static void svg_do_export(rnd_hid_t *hid
 	if (f != NULL)
 		rnd_svg_header(pctx);
 
-	svg_hid_export_to_file(pctx->outf, options, &xform);
+	svg_hid_export_to_file(hl, pctx->outf, options, &xform);
 
 	if (pctx->outf != NULL) {
 		rnd_svg_footer(pctx);
@@ -160,7 +160,7 @@ static int svg_parse_arguments(rnd_hid_t
 	return rnd_hid_parse_command_line(argc, argv);
 }
 
-static int svg_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
+static int svg_set_layer_group(rnd_hid_t *hid, rnd_design_t *design, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform)
 {
 	if (is_empty)
 		return 0;
diff -pruN 1.1.0-3/src_plugins/gui/Plug.tmpasm 1.1.2-1/src_plugins/gui/Plug.tmpasm
--- 1.1.0-3/src_plugins/gui/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,11 +1,11 @@
-put /local/pcb/mod {gui}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {gui}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/gui/camv_gui.o
 	$(PLUGDIR)/gui/layersel.o
 	$(PLUGDIR)/gui/status.o
 @]
 
-switch /local/pcb/gui/controls
+switch /local/module/gui/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/gui/camv_gui.c 1.1.2-1/src_plugins/gui/camv_gui.c
--- 1.1.0-3/src_plugins/gui/camv_gui.c	2022-10-24 04:05:51.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/camv_gui.c	2023-04-13 16:37:31.000000000 +0000
@@ -30,11 +30,13 @@
 #include <librnd/config.h>
 
 #include <string.h>
+#include <ctype.h>
 
 #include "event.h"
 #include <librnd/core/actions.h>
+#include <librnd/hid/hid.h>
 #include <librnd/core/hidlib.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/core/rnd_conf.h>
 #include <librnd/core/compat_misc.h>
 #include <librnd/core/compat_fs.h>
 #include <librnd/core/globalconst.h>
@@ -146,14 +148,14 @@ static fgw_error_t camv_act_Load(fgw_arg
 
 	/* Called with both function and file name -> no gui */
 	if (argc > 2)
-		return RND_ACT_CALL_C(RND_ACT_HIDLIB, camv_act_LoadFrom, res, argc, argv);
+		return RND_ACT_CALL_C(RND_ACT_DESIGN, camv_act_LoadFrom, res, argc, argv);
 
 	RND_ACT_MAY_CONVARG(1, FGW_STR, Load, function = argv[1].val.str);
 
 	if (rnd_strcasecmp(function, "Layer") == 0)
-		name = rnd_gui->fileselect(rnd_gui, "Load layer", "Import a layer from file", last_layer, NULL, NULL, "layer", RND_HID_FSD_READ, NULL);
+		name = rnd_hid_fileselect(rnd_gui, "Load layer", "Import a layer from file", last_layer, NULL, NULL, "layer", RND_HID_FSD_READ, NULL);
 	else if (rnd_strcasecmp(function, "Project") == 0)
-		name = rnd_gui->fileselect(rnd_gui, "Load a project file", "load project (all layers) from file", last_project, ".lht", NULL, "project", RND_HID_FSD_READ, NULL);
+		name = rnd_hid_fileselect(rnd_gui, "Load a project file", "load project (all layers) from file", last_project, ".lht", NULL, "project", RND_HID_FSD_READ, NULL);
 	else {
 		rnd_message(RND_MSG_ERROR, "Invalid subcommand for Load(): '%s'\n", function);
 		RND_ACT_IRES(1);
@@ -171,12 +173,87 @@ static fgw_error_t camv_act_Load(fgw_arg
 	return 0;
 }
 
+static int save_as(rnd_design_t *hl, int what, int as, const char *name)
+{
+	camv_design_t *camv = (camv_design_t *)hl;
+	const char *prev_fn, *whats, *prev_loadfn;
+	char *free_me = NULL;
+	int need_fsd, save_res = -1;
+
+	if (name == NULL) {
+		prev_fn = camv->hidlib.fullpath;
+		if (prev_fn == NULL)
+			prev_fn = free_me = dup_cwd();
+		prev_loadfn = camv->hidlib.loadname;
+		if (prev_loadfn == NULL)
+			prev_loadfn = prev_fn;
+		need_fsd = 1;
+	}
+	else {
+		prev_fn = name;
+		need_fsd = 0;
+	}
+
+	/* invoke FSD if needed */
+	switch(what) {
+		case 'd': /* design */
+			if (need_fsd)
+				name = rnd_hid_fileselect(rnd_gui, "Save design", "Save all layers to a design file", prev_loadfn, ".tdx", NULL, "design", 0, NULL);
+			whats = "design";
+			break;
+		default:
+			rnd_message(RND_MSG_ERROR, "Invalid first argument for Save() or SaveAs()\n");
+			goto error;
+	}
+
+	if (name != NULL) { /* NULL means cancel */
+		if (rnd_conf.rc.verbose)
+			fprintf(stderr, "Save:  Calling SaveTo(%s, %s)\n", whats, name);
+		save_res = rnd_actionva(hl, "SaveTo", whats, name, NULL);
+	}
+	else if (rnd_conf.rc.verbose)
+		fprintf(stderr, "Save: SaveTo(%s, ...) cancelled\n", whats);
+
+	free(free_me);
+	return save_res;
+
+	error:;
+	free(free_me);
+	return 1;
+}
+
+static const char camv_acts_Save[] = "Save()\n" "Save(design)";
+static const char camv_acth_Save[] = "Save all sheets of a design to file.";
+static const char camv_acts_SaveAs[] = "SaveAs(design, [filename])";
+static const char camv_acth_SaveAs[] = "Save all sheets of a design to file.";
+static fgw_error_t camv_act_Save(fgw_arg_t *res, int argc, fgw_arg_t *argv)
+{
+	rnd_design_t *hl = RND_ACT_DESIGN;
+	const char *actname = argv[0].val.func->name;
+	int as = (actname[4] == 'a') || (actname[4] == 'A');
+	int what = 'd';
+	const char *name = NULL;
+
+	if (as) {
+		RND_ACT_MAY_CONVARG(1, FGW_STR, SaveAs, what = tolower(argv[1].val.cstr[0]));
+		RND_ACT_MAY_CONVARG(2, FGW_STR, SaveAs, name = argv[2].val.cstr);
+	}
+	else
+		RND_ACT_MAY_CONVARG(1, FGW_STR, Save, what = tolower(argv[1].val.cstr[0]));
+
+	RND_ACT_IRES(save_as(hl, what, as, name));
+	return 0;
+}
+
+
 static rnd_action_t camv_gui_action_list[] = {
 	{"PrintGUI", rnd_act_PrintDialog, rnd_acth_PrintDialog, rnd_acts_PrintDialog},
 	{"Popup", camv_act_Popup, camv_acth_Popup, camv_acts_Popup},
 	{"Load", camv_act_Load, camv_acth_Load, camv_acts_Load},
 	{"Layer", camv_act_Layer, camv_acth_Layer, camv_acts_Layer},
-	{"StatusSetText", camv_act_StatusSetText, camv_acth_StatusSetText, camv_acts_StatusSetText}
+	{"StatusSetText", camv_act_StatusSetText, camv_acth_StatusSetText, camv_acts_StatusSetText},
+	{"Save", camv_act_Save, camv_acth_Save, camv_acts_Save},
+	{"SaveAs", camv_act_Save, camv_acth_SaveAs, camv_acts_SaveAs}
 };
 
 int pplg_check_ver_gui(int ver_needed) { return 0; }
@@ -185,11 +262,13 @@ void pplg_uninit_gui(void)
 {
 	rnd_actionl("rnd_toolbar_uninit", NULL);
 	rnd_event_unbind_allcookie(status_cookie);
+	rnd_event_unbind_allcookie(layersel_cookie);
 	rnd_conf_hid_unreg(status_cookie);
 	rnd_conf_hid_unreg(status_cookie2);
+	rnd_remove_actions_by_cookie(camv_gui_cookie);
 }
 
-static rnd_conf_hid_id_t install_events(const char *cookie, const char *paths[], rnd_conf_hid_callbacks_t cb[], void (*update_cb)(rnd_conf_native_t*,int))
+static rnd_conf_hid_id_t install_events(const char *cookie, const char *paths[], rnd_conf_hid_callbacks_t cb[], void (*update_cb)(rnd_conf_native_t*,int,void*))
 {
 	const char **rp;
 	rnd_conf_native_t *nat;
diff -pruN 1.1.0-3/src_plugins/gui/layersel.c 1.1.2-1/src_plugins/gui/layersel.c
--- 1.1.0-3/src_plugins/gui/layersel.c	2022-11-10 16:00:28.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/layersel.c	2023-05-17 03:31:43.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019,2020 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2020,2023 Tibor 'Igor2' Palinkas
  *  (copied from pcb-rnd by the author)
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -32,17 +32,22 @@
 #include <genvector/vti0.h>
 #include <genvector/vtp0.h>
 
-#include <librnd/core/hid.h>
+#include <librnd/hid/hid.h>
 #include <librnd/core/hid_cfg.h>
-#include <librnd/core/hid_dad.h>
+#include <librnd/hid/hid_dad.h>
 
 #include <librnd/core/actions.h>
 #include "data.h"
 #include "event.h"
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/core/rnd_conf.h>
 
 #include "layersel.h"
 
+/* Enable this to make sublayers and layer indices visible */
+#if 0
+#define LAYERSEL_DEBUG
+#endif
+
 static const char *xpm_up[] = {
 "10 10 3 1",
 " 	c None",
@@ -201,7 +206,6 @@ struct layersel_ctx_s {
 	int sub_inited;
 	int wbut_up, wbut_down, wbut_top, wbut_bottom, wbut_load, wbut_remove, wbut_vis, wbut_invis;
 	int lock_vis, lock_sel;
-	int selected; /* layer idx (lid) of the currently selected layer */
 	vtp0_t layers; /* -> ls_layer_t */
 };
 
@@ -245,14 +249,14 @@ static void layer_vis_cb(void *hid_ctx,
 static void layer_unselect(layersel_ctx_t *ls)
 {
 	ls_layer_t **lys;
-	if (ls->selected < 0)
+	if (ls->camv->lysel < 0)
 		return;
 
-	lys = (ls_layer_t **)vtp0_get(&ls->layers, ls->selected, 0);
+	lys = (ls_layer_t **)vtp0_get(&ls->layers, ls->camv->lysel, 0);
 	if (lys != NULL)
 		rnd_gui->attr_dlg_widget_state(ls->sub.dlg_hid_ctx, (*lys)->wlab, 1);
-	ls->selected = -1;
-	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYER_SELECTED, "i", ls->selected);
+
+	camv_layer_select(ls->camv, -1);
 }
 
 static void layer_select_idx(layersel_ctx_t *ls, int idx)
@@ -260,13 +264,11 @@ static void layer_select_idx(layersel_ct
 	ls_layer_t **lys;
 	layer_unselect(ls);
 	lys = (ls_layer_t **)vtp0_get(&ls->layers, idx, 0);
-	if (lys != NULL) {
+	if (lys != NULL)
 		rnd_gui->attr_dlg_widget_state(ls->sub.dlg_hid_ctx, (*lys)->wlab, 2);
-		ls->selected = idx;
-	}
 	else
-		ls->selected = -1;
-	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYER_SELECTED, "i", ls->selected);
+		idx = -1;
+	camv_layer_select(layersel.camv, idx);
 }
 
 static void layer_select(ls_layer_t *lys)
@@ -336,8 +338,11 @@ static void layer_vis_box(gen_xpm_t *dst
 		dst->xpm[n] = dst->buf[n];
 }
 
-static void layersel_create_layer(layersel_ctx_t *ls, ls_layer_t *lys, const char *short_name, const char *name, const rnd_color_t *color, int brd, int hatch)
+static void layersel_create_layer(layersel_ctx_t *ls, ls_layer_t *lys, int lidx, const char *short_name, const char *name, const rnd_color_t *color, int brd, int hatch)
 {
+	if (name == NULL)
+		name = "<sub>";
+
 	if (short_name == NULL) {
 		short_name = strrchr(name, '/');
 		if (short_name == NULL)
@@ -358,6 +363,13 @@ static void layersel_create_layer(layers
 			lys->wvis_off = RND_DAD_CURRENT(ls->sub.dlg);
 			RND_DAD_SET_ATTR_FIELD(ls->sub.dlg, user_data, lys);
 			RND_DAD_CHANGE_CB(ls->sub.dlg, layer_vis_cb);
+#ifdef LAYERSEL_DEBUG
+		{
+			char idx[32];
+			sprintf(idx, "{%d}", lidx);
+			RND_DAD_LABEL(ls->sub.dlg, idx);
+		}
+#endif
 		RND_DAD_LABEL(ls->sub.dlg, short_name);
 			lys->wlab = RND_DAD_CURRENT(ls->sub.dlg);
 			RND_DAD_SET_ATTR_FIELD(ls->sub.dlg, user_data, lys);
@@ -379,14 +391,16 @@ static void layersel_docked_create(layer
 			camv_layer_t *ly = camv->layers.array[n];
 			ls_layer_t *lys, **lysp;
 
+#ifndef LAYERSEL_DEBUG
 			if (ly->sub) continue;
+#endif
 			lysp = (ls_layer_t **)vtp0_get(&ls->layers, n, 1);
 			if (*lysp == NULL)
 				*lysp = calloc(sizeof(ls_layer_t), 1);
 			lys = *lysp;
 			lys->lid = n;
 			lys->ls = ls;
-			layersel_create_layer(ls, lys, ly->short_name, ly->name, &ly->color, 1, 0);
+			layersel_create_layer(ls, lys, n, ly->short_name, ly->name, &ly->color, 1, 0);
 			i++;
 		}
 
@@ -461,7 +475,7 @@ static void layersel_build(void)
 	}
 }
 
-void camv_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_layersel_gui_init_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	if ((RND_HAVE_GUI_ATTR_DLG) && (rnd_gui->get_menu_cfg != NULL)) {
 		layersel.camv = &camv;
@@ -469,14 +483,14 @@ void camv_layersel_gui_init_ev(rnd_hidli
 	}
 }
 
-void camv_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_layersel_vis_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	if ((!layersel.sub_inited) || (layersel.lock_vis > 0))
 		return;
 	layersel_update_vis(&layersel, &camv);
 }
 
-void camv_layersel_layer_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_layersel_layer_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	if ((RND_HAVE_GUI_ATTR_DLG) && (rnd_gui->get_menu_cfg != NULL) && (layersel.sub_inited)) {
 		rnd_hid_dock_leave(&layersel.sub);
@@ -487,7 +501,7 @@ void camv_layersel_layer_chg_ev(rnd_hidl
 
 static void layer_move(int dst)
 {
-	int step, n, src = layersel.selected;
+	int step, n, src = layersel.camv->lysel;
 	camv_design_t *camv = layersel.camv;
 	camv_layer_t *dst_ly = camv->layers.array[src];
 
@@ -503,22 +517,21 @@ static void layer_move(int dst)
 
 static void layer_del(void)
 {
-	int src = layersel.selected;
+	int src = layersel.camv->lysel;
 	camv_layer_t *ly = layersel.camv->layers.array[src];
 
 	vtp0_remove(&layersel.camv->layers, src, 1);
 	vtp0_remove(&layersel.layers, src, 1);
 	camv_layer_destroy(ly);
 
-	layersel.selected = -1;
+	camv_layer_select(layersel.camv, -1);
 	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYERS_CHANGED, NULL);
-	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYER_SELECTED, "i", layersel.selected);
 	camv_hid_redraw(layersel.camv);
 }
 
 static void layer_set_color(const rnd_color_t clr)
 {
-	int src = layersel.selected;
+	int src = layersel.camv->lysel;
 	camv_layer_t *ly = layersel.camv->layers.array[src];
 
 	ly->color = clr;
@@ -527,7 +540,7 @@ static void layer_set_color(const rnd_co
 
 static void layer_rename(const char *name)
 {
-	int src = layersel.selected;
+	int src = layersel.camv->lysel;
 	camv_layer_t *ly = layersel.camv->layers.array[src];
 
 	free(ly->short_name);
@@ -546,9 +559,9 @@ static void layer_del_all(void)
 		camv_layer_destroy(ly);
 	}
 
-	layersel.selected = -1;
+	camv_layer_select(layersel.camv, -1);
 	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYERS_CHANGED, NULL);
-	rnd_event(&layersel.camv->hidlib, CAMV_EVENT_LAYER_SELECTED, "i", layersel.selected);
+
 	camv_hid_redraw(layersel.camv);
 }
 
@@ -577,27 +590,27 @@ fgw_error_t camv_act_Layer(fgw_arg_t *re
 	RND_ACT_CONVARG(1, FGW_STR, Layer, cmd = argv[1].val.str);
 
 	if (strcmp(cmd, "down") == 0) {
-		if (layersel.selected < 0) goto nolayer;
-		if (layersel.selected == 0) goto nop;
-		layer_move(layersel.selected-1);
+		if (camv->lysel < 0) goto nolayer;
+		if (camv->lysel == 0) goto nop;
+		layer_move(camv->lysel-1);
 	}
 	else if (strcmp(cmd, "up") == 0) {
-		if (layersel.selected < 0) goto nolayer;
-		if (layersel.selected == camv->layers.used-1) goto nop;
-		layer_move(layersel.selected+1);
+		if (camv->lysel < 0) goto nolayer;
+		if (camv->lysel == camv->layers.used-1) goto nop;
+		layer_move(camv->lysel+1);
 	}
 	else if (strcmp(cmd, "bottom") == 0) {
-		if (layersel.selected < 0) goto nolayer;
-		if (layersel.selected == 0) goto nop;
+		if (camv->lysel < 0) goto nolayer;
+		if (camv->lysel == 0) goto nop;
 		layer_move(0);
 	}
 	else if (strcmp(cmd, "top") == 0) {
-		if (layersel.selected < 0) goto nolayer;
-		if (layersel.selected == camv->layers.used-1) goto nop;
+		if (camv->lysel < 0) goto nolayer;
+		if (camv->lysel == camv->layers.used-1) goto nop;
 		layer_move(camv->layers.used-1);
 	}
 	else if (strcmp(cmd, "del") == 0) {
-		if (layersel.selected < 0) goto nolayer;
+		if (camv->lysel < 0) goto nolayer;
 		layer_del();
 	}
 	else if (strcmp(cmd, "all-visible") == 0) {
@@ -607,11 +620,11 @@ fgw_error_t camv_act_Layer(fgw_arg_t *re
 		all_vis(camv, 0);
 	}
 	else if (rnd_strcasecmp(cmd, "delall") == 0) {
-		if (layersel.selected < 0) goto nolayer;
+		if (camv->lysel < 0) goto nolayer;
 		layer_del_all();
 	}
 	else if (rnd_strcasecmp(cmd, "getidx") == 0) {
-		RND_ACT_IRES(layersel.selected);
+		RND_ACT_IRES(camv->lysel);
 		return 0;
 	}
 	else if (rnd_strcasecmp(cmd, "select") == 0) {
diff -pruN 1.1.0-3/src_plugins/gui/layersel.h 1.1.2-1/src_plugins/gui/layersel.h
--- 1.1.0-3/src_plugins/gui/layersel.h	2021-06-04 07:40:29.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/layersel.h	2022-11-19 08:55:37.000000000 +0000
@@ -1,6 +1,6 @@
-void camv_layersel_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
-void camv_layersel_vis_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
-void camv_layersel_layer_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_layersel_gui_init_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_layersel_vis_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_layersel_layer_chg_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
 
 
 extern const char camv_acts_Layer[];
diff -pruN 1.1.0-3/src_plugins/gui/status.c 1.1.2-1/src_plugins/gui/status.c
--- 1.1.0-3/src_plugins/gui/status.c	2021-06-07 05:56:20.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/status.c	2022-11-20 07:14:32.000000000 +0000
@@ -31,10 +31,10 @@
 
 #include <genvector/gds_char.h>
 
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_cfg_input.h>
-#include <librnd/core/hid_dad.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_cfg_input.h>
+#include <librnd/hid/hid_dad.h>
+#include <librnd/core/rnd_conf.h>
 #include <librnd/plugins/lib_hid_common/xpm.h>
 #include "data.h"
 #include "conf_core.h"
@@ -197,7 +197,7 @@ static void btn_support_cb(void *hid_ctx
 	rnd_actionva(&camv.hidlib, "irc", NULL);
 }
 
-static void status_docked_create_rd(rnd_hidlib_t *hidlib)
+static void status_docked_create_rd(rnd_design_t *hidlib)
 {
 	const char *xpm_ = "", **support_icon = &xpm_;
 	fgw_arg_t res, args[2];
@@ -229,7 +229,7 @@ static void status_docked_create_rd(rnd_
 }
 
 
-void camv_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_status_gui_init_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	if ((RND_HAVE_GUI_ATTR_DLG) && (rnd_gui->get_menu_cfg != NULL)) {
 		status_docked_create_st();
@@ -246,22 +246,22 @@ void camv_status_gui_init_ev(rnd_hidlib_
 	}
 }
 
-void camv_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx)
+void camv_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx, void *user_data)
 {
 	status_st_view2dlg();
 }
 
-void camv_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx)
+void camv_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx, void *user_data)
 {
 	status_rd_view2dlg();
 }
 
-void camv_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_status_st_update_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	status_st_view2dlg();
 }
 
-void camv_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
+void camv_status_rd_update_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[])
 {
 	status_rd_view2dlg();
 }
diff -pruN 1.1.0-3/src_plugins/gui/status.h 1.1.2-1/src_plugins/gui/status.h
--- 1.1.0-3/src_plugins/gui/status.h	2021-06-04 08:11:24.000000000 +0000
+++ 1.1.2-1/src_plugins/gui/status.h	2022-11-20 07:14:32.000000000 +0000
@@ -2,11 +2,11 @@
 #include <librnd/core/conf.h>
 #include <librnd/core/actions.h>
 
-void camv_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
-void camv_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx);
-void camv_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx);
-void camv_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
-void camv_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_status_gui_init_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx, void *user_data);
+void camv_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx, void *user_data);
+void camv_status_st_update_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
+void camv_status_rd_update_ev(rnd_design_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]);
 
 extern const char camv_acts_StatusSetText[];
 extern const char camv_acth_StatusSetText[];
diff -pruN 1.1.0-3/src_plugins/import_excellon/Plug.tmpasm 1.1.2-1/src_plugins/import_excellon/Plug.tmpasm
--- 1.1.0-3/src_plugins/import_excellon/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/import_excellon/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,9 +1,9 @@
-put /local/pcb/mod {import_excellon}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {import_excellon}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/import_excellon/excellon.o
 @]
 
-switch /local/pcb/import_excellon/controls
+switch /local/module/import_excellon/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/import_gcode/Makefile 1.1.2-1/src_plugins/import_gcode/Makefile
--- 1.1.0-3/src_plugins/import_gcode/Makefile	2021-11-10 10:21:43.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gcode/Makefile	2022-11-21 07:19:10.000000000 +0000
@@ -1,6 +1,6 @@
 include ../../Makefile.conf
 LIBARCHDIR=$(LIBRND_LIBARCHDIR)
-CFLAGS = -DRND_PCB_COMPAT -Wall -g -I$(LIBRND_PREFIX)/include/librnd/src_3rd
+CFLAGS = -DRND_PCB_COMPAT -Wall -g -I$(LIBRND_PREFIX)/include/librnd4/librnd/src_3rd
 LDLIBS = -lm $(LIBRND_PREFIX)/$(LIBARCHDIR)/librnd-3rd.a
 
 main: main.o gcode_vm.o gcode_exec.o gcode_lex.o gcode.tab.o
diff -pruN 1.1.0-3/src_plugins/import_gcode/Plug.tmpasm 1.1.2-1/src_plugins/import_gcode/Plug.tmpasm
--- 1.1.0-3/src_plugins/import_gcode/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gcode/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,5 +1,9 @@
-put /local/pcb/mod {import_gcode}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {import_gcode}
+put /local/rnd/mod/CONF {$(PLUGDIR)/import_gcode/import_gcode_conf.h}
+put /local/rnd/mod/CONFFILE {import_gcode.conf}
+put /local/rnd/mod/CONFVAR {import_gcode_conf_internal}
+
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/import_gcode/import_gcode.o
 	$(PLUGDIR)/import_gcode/gcode_exec.o
 	$(PLUGDIR)/import_gcode/gcode_vm.o
@@ -7,7 +11,7 @@ put /local/pcb/mod/OBJS [@
 	$(PLUGDIR)/import_gcode/gcode.tab.o
 @]
 
-switch /local/pcb/import_gcode/controls
+switch /local/module/import_gcode/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/import_gcode/import_gcode.c 1.1.2-1/src_plugins/import_gcode/import_gcode.c
--- 1.1.0-3/src_plugins/import_gcode/import_gcode.c	2022-02-02 04:59:36.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gcode/import_gcode.c	2022-12-07 12:56:08.000000000 +0000
@@ -2,7 +2,7 @@
  *                            COPYRIGHT
  *
  *  camv-rnd - electronics-related CAM viewer
- *  Copyright (C) 2019 Tibor 'Igor2' Palinkas
+ *  Copyright (C) 2019,2022 Tibor 'Igor2' Palinkas
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -31,6 +31,8 @@
 #include <genht/htip.h>
 #include <genht/hash.h>
 
+#include <librnd/core/hidlib.h>
+#include <librnd/core/conf_multi.h>
 #include <librnd/core/error.h>
 #include <librnd/core/safe_fs.h>
 #include <librnd/core/compat_misc.h>
@@ -45,6 +47,13 @@
 #include "gcode_vm.h"
 #include "gcode_exec.h"
 
+#include "import_gcode_conf.h"
+
+conf_import_gcode_t conf_import_gcode;
+static const char io_gcode_cookie[] = "io_gcode";
+
+#include "conf_internal.c"
+
 typedef struct {
 	htip_t h2l; /* height-to-layer */
 	const char *fn;
@@ -145,7 +154,7 @@ static int camv_gcode_load(camv_design_t
 	if (gcodeparse(&prg) != 0)
 		return 1;
 
-	prg.cfg.laser = conf_core.plugins.import_gcode.laser;
+	prg.cfg.laser = conf_import_gcode.plugins.import_gcode.laser;
 	gcode_execute_init(&prg, &ops);
 	gcode_execute(&prg);
 	gcode_execute_uninit(&prg);
@@ -185,11 +194,19 @@ int pplg_check_ver_import_gcode(int ver_
 
 void pplg_uninit_import_gcode(void)
 {
+	rnd_conf_plug_unreg("plugins/import_gcode/", import_gcode_conf_internal, io_gcode_cookie);
 	camv_io_unreg(&io_gcode);
 }
 
 int pplg_init_import_gcode(void)
 {
 	camv_io_reg(&io_gcode);
+
+	rnd_conf_plug_reg(conf_import_gcode, import_gcode_conf_internal, io_gcode_cookie);
+
+#define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \
+	rnd_conf_reg_field(conf_import_gcode, field,isarray,type_name,cpath,cname,desc,flags);
+#include "import_gcode_conf_fields.h"
+
 	return 0;
 }
diff -pruN 1.1.0-3/src_plugins/import_gcode/import_gcode.conf 1.1.2-1/src_plugins/import_gcode/import_gcode.conf
--- 1.1.0-3/src_plugins/import_gcode/import_gcode.conf	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gcode/import_gcode.conf	2022-12-19 06:27:31.000000000 +0000
@@ -0,0 +1,9 @@
+li:camv-rnd-conf-v1 {
+	ha:overwrite {
+		ha:plugins {
+			ha:import_gcode {
+				laser = 0;
+			}
+		}
+	}
+}
diff -pruN 1.1.0-3/src_plugins/import_gcode/import_gcode_conf.h 1.1.2-1/src_plugins/import_gcode/import_gcode_conf.h
--- 1.1.0-3/src_plugins/import_gcode/import_gcode_conf.h	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gcode/import_gcode_conf.h	2022-11-21 07:17:52.000000000 +0000
@@ -0,0 +1,8 @@
+typedef struct {
+	const struct {
+		const struct {
+			RND_CFT_BOOLEAN laser;  /* Import g-code assuming laser plotting: M3/M4 is laser on, M5 is laser off */
+		} import_gcode;
+	} plugins;
+} conf_import_gcode_t;
+
diff -pruN 1.1.0-3/src_plugins/import_gerb/Plug.tmpasm 1.1.2-1/src_plugins/import_gerb/Plug.tmpasm
--- 1.1.0-3/src_plugins/import_gerb/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gerb/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,5 +1,5 @@
-put /local/pcb/mod {import_gerb}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {import_gerb}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/import_gerb/gerb2camv.o
 	$(PLUGDIR)/import_gerb/geparse.o
 	$(PLUGDIR)/import_gerb/gedraw.o
@@ -7,7 +7,7 @@ put /local/pcb/mod/OBJS [@
 	$(PLUGDIR)/import_gerb/gex.tab.o
 @]
 
-switch /local/pcb/import_gerb/controls
+switch /local/module/import_gerb/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/import_gerb/gedraw.h 1.1.2-1/src_plugins/import_gerb/gedraw.h
--- 1.1.0-3/src_plugins/import_gerb/gedraw.h	2021-07-21 12:35:43.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gerb/gedraw.h	2022-11-20 10:07:13.000000000 +0000
@@ -31,7 +31,7 @@
 #include <stdio.h>
 #include <genht/htip.h>
 #include <genht/hash.h>
-#include "genvector/vtp0.h"
+#include <genvector/vtp0.h>
 
 #include <librnd/core/global_typedefs.h>
 #include <librnd/core/vtc0.h>
diff -pruN 1.1.0-3/src_plugins/import_gerb/gerb2camv.c 1.1.2-1/src_plugins/import_gerb/gerb2camv.c
--- 1.1.0-3/src_plugins/import_gerb/gerb2camv.c	2022-10-26 11:32:19.000000000 +0000
+++ 1.1.2-1/src_plugins/import_gerb/gerb2camv.c	2023-04-21 12:15:41.000000000 +0000
@@ -757,7 +757,7 @@ static void gedraw_do_pol_(camv_design_t
 	(*ly)->sub = 1;
 	(*ly)->clearing = clearing;
 	(*ly)->color = main_layer->color;
-	camv_layer_append_to_design(camv, *ly);
+	camv->loader.ly = camv_sublayer_append_after(camv, *ly, camv->loader.ly);
 }
 
 static void gedraw_do_pol(camv_design_t *camv, const camv_layer_t *main_layer, camv_layer_t **ly, gerbst_t *curr, gerbst_t *last)
@@ -1156,7 +1156,7 @@ static int gedraw_camv(camv_design_t *ca
 
 	ly->name = rnd_strdup(name);
 	camv_layer_invent_color(camv, ly); /* gerber files do not have layer color */
-	camv_layer_append_to_design(camv, ly);
+	camv->loader.ly = camv_layer_append_to_design(camv, ly);
 
 	memset(&curr, 0, sizeof(curr));
 	curr.interp = GEI_LIN;
diff -pruN 1.1.0-3/src_plugins/io_tedax/Plug.tmpasm 1.1.2-1/src_plugins/io_tedax/Plug.tmpasm
--- 1.1.0-3/src_plugins/io_tedax/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/io_tedax/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,10 +1,10 @@
-put /local/pcb/mod {io_tedax}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {io_tedax}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/io_tedax/io_tedax.o
 	$(PLUGDIR)/io_tedax/parse.o
 @]
 
-switch /local/pcb/io_tedax/controls
+switch /local/module/io_tedax/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/io_tedax/io_tedax.c 1.1.2-1/src_plugins/io_tedax/io_tedax.c
--- 1.1.0-3/src_plugins/io_tedax/io_tedax.c	2021-11-08 16:01:37.000000000 +0000
+++ 1.1.2-1/src_plugins/io_tedax/io_tedax.c	2023-04-21 12:40:35.000000000 +0000
@@ -46,8 +46,9 @@ typedef struct {
 	camv_design_t *camv;
 	FILE *f;
 	char buf[514];
-	char *argv[16];
+	char *argv[510];
 	htsp_t grps; /* group name -> temporary layer */
+	long lypos;
 } read_ctx_t;
 
 #define coord_conv(dst, argnum, err) \
@@ -98,7 +99,7 @@ static int tdx_parse_layer(read_ctx_t *c
 	strcpy(unit, "mm");
 
 	for(;;) {
-		if ((argc = tedax_getline(ctx->f, ctx->buf, sizeof(ctx->buf), ctx->argv, sizeof(ctx->argv))) < 0)
+		if ((argc = tedax_getline(ctx->f, ctx->buf, sizeof(ctx->buf), ctx->argv, sizeof(ctx->argv) / sizeof(ctx->argv[0]))) < 0)
 			goto err;
 
 		if (strcmp(argv[0], "end") == 0) {
@@ -183,7 +184,7 @@ static int tdx_parse_layer(read_ctx_t *c
 				ly->sub = 1;
 				ly->clearing = clearing;
 				ly->color = ly_main->color;
-				camv_layer_append_to_design(ctx->camv, ly);
+				ctx->lypos = camv_sublayer_append_after(ctx->camv, ly, ctx->lypos);
 			}
 		}
 
@@ -328,7 +329,7 @@ int camv_tdx_load(camv_design_t *camv, c
 		found_one = 1;
 		ly = camv_layer_new();
 		ly->name = rnd_strdup(ctx.argv[3]);
-		camv_layer_append_to_design(camv, ly);
+		ctx.lypos = camv_layer_append_to_design(camv, ly);
 		if (tdx_parse_layer(&ctx, ly, 0) != 0) {
 			load_res = -1;
 			/* free all layers created by this load attempt */
@@ -363,7 +364,7 @@ static int tdx_open_write_header(camv_de
 {
 	rnd_printf_slot[4] = "%.06mm";
 	ctx->camv = camv;
-	ctx->f = rnd_fopen((rnd_hidlib_t *)ctx->camv, fn, "w");
+	ctx->f = rnd_fopen((rnd_design_t *)ctx->camv, fn, "w");
 	ctx->err = 0;
 	if (ctx->f == NULL) {
 		rnd_message(RND_MSG_ERROR, "Can not open '%s' for write\n", fn);
@@ -556,12 +557,24 @@ static int camv_tdx_test_load(camv_desig
 	return 0;
 }
 
+static int camv_tdx_save_prio(const char *fn, const char *fmt, camv_io_type_t type)
+{
+	if ((type & CSCH_IOTYP_DESIGN) == 0)
+		return -1;
+
+	if ((rnd_strcasecmp(fmt, "tdx") != 0) && (rnd_strcasecmp(fmt, "tedax") != 0))
+		return -1;
+
+	return 100;
+}
 
 static camv_io_t io_tdx = {
 	"tEDAx camv layer", 100,
 	camv_tdx_test_load,
 	camv_tdx_load,
+	camv_tdx_save_prio,
 	camv_tdx_save_design,
+	"tdx"
 };
 
 
diff -pruN 1.1.0-3/src_plugins/io_tedax/parse.c 1.1.2-1/src_plugins/io_tedax/parse.c
--- 1.1.0-3/src_plugins/io_tedax/parse.c	2021-06-03 13:40:56.000000000 +0000
+++ 1.1.2-1/src_plugins/io_tedax/parse.c	2022-12-15 09:40:16.000000000 +0000
@@ -1,7 +1,8 @@
 /*
  *                            COPYRIGHT
  *
- *  pcb-rnd, interactive printed circuit board design
+ *  camv-rnd - electronics-related CAM viewer
+ *  (originally copier from pcb-rnd)
  *
  *  tedax IO plugin - low level parser, similar to the reference implementation
  *  pcb-rnd Copyright (C) 2017 Tibor 'Igor2' Palinkas
@@ -21,8 +22,8 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *  Contact:
- *    Project page: http://repo.hu/projects/pcb-rnd
- *    lead developer: http://repo.hu/projects/pcb-rnd/contact.html
+ *    Project page: http://repo.hu/projects/camv-rnd
+ *    lead developer: http://repo.hu/projects/camv-rnd/contact.html
  *    mailing list: pcb-rnd (at) list.repo.hu (send "subscribe")
  */
 
diff -pruN 1.1.0-3/src_plugins/std_tools/Plug.tmpasm 1.1.2-1/src_plugins/std_tools/Plug.tmpasm
--- 1.1.0-3/src_plugins/std_tools/Plug.tmpasm	2022-08-04 13:45:15.000000000 +0000
+++ 1.1.2-1/src_plugins/std_tools/Plug.tmpasm	2022-12-12 14:53:59.000000000 +0000
@@ -1,9 +1,9 @@
-put /local/pcb/mod {std_tools}
-put /local/pcb/mod/OBJS [@
+put /local/rnd/mod {std_tools}
+put /local/rnd/mod/OBJS [@
 	$(PLUGDIR)/std_tools/std_tools.o
 @]
 
-switch /local/pcb/std_tools/controls
+switch /local/module/std_tools/controls
 	case {buildin}   include /local/camv/tmpasm/buildin; end;
 	case {plugin}    include /local/camv/tmpasm/plugin; end;
 	case {disable}   include /local/camv/tmpasm/disable; end;
diff -pruN 1.1.0-3/src_plugins/std_tools/std_tools.c 1.1.2-1/src_plugins/std_tools/std_tools.c
--- 1.1.0-3/src_plugins/std_tools/std_tools.c	2021-06-03 13:40:56.000000000 +0000
+++ 1.1.2-1/src_plugins/std_tools/std_tools.c	2022-11-19 06:40:13.000000000 +0000
@@ -5,7 +5,7 @@
 
 #include <librnd/core/global_typedefs.h>
 #include <librnd/core/hidlib.h>
-#include <librnd/core/tool.h>
+#include <librnd/hid/tool.h>
 
 static const char std_tools_cookie[] = "std_tools";
 
diff -pruN 1.1.0-3/src_plugins/std_tools/tool_arrow.c 1.1.2-1/src_plugins/std_tools/tool_arrow.c
--- 1.1.0-3/src_plugins/std_tools/tool_arrow.c	2021-11-08 16:06:18.000000000 +0000
+++ 1.1.2-1/src_plugins/std_tools/tool_arrow.c	2022-11-19 08:55:37.000000000 +0000
@@ -1,7 +1,7 @@
 #include "crosshair.h"
 #include "data.h"
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_inlines.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_inlines.h>
 
 static void tool_arrow_init(void)
 {
@@ -11,29 +11,29 @@ static void tool_arrow_uninit(void)
 {
 }
 
-static void tool_arrow_press(rnd_hidlib_t *hl)
+static void tool_arrow_press(rnd_design_t *hl)
 {
 }
 
-static void tool_arrow_release(rnd_hidlib_t *hl)
+static void tool_arrow_release(rnd_design_t *hl)
 {
 }
 
-static void tool_arrow_adjust_attached_objects(rnd_hidlib_t *hl)
+static void tool_arrow_adjust_attached_objects(rnd_design_t *hl)
 {
 }
 
 
-static void tool_arrow_draw_attached(rnd_hidlib_t *hl)
+static void tool_arrow_draw_attached(rnd_design_t *hl)
 {
 }
 
-rnd_bool tool_arrow_undo_act(rnd_hidlib_t *hl)
+rnd_bool tool_arrow_undo_act(rnd_design_t *hl)
 {
 	return 0;
 }
 
-rnd_bool tool_arrow_redo_act(rnd_hidlib_t *hl)
+rnd_bool tool_arrow_redo_act(rnd_design_t *hl)
 {
 	return 0;
 }
diff -pruN 1.1.0-3/src_plugins/std_tools/tool_mline.c 1.1.2-1/src_plugins/std_tools/tool_mline.c
--- 1.1.0-3/src_plugins/std_tools/tool_mline.c	2021-11-08 16:06:18.000000000 +0000
+++ 1.1.2-1/src_plugins/std_tools/tool_mline.c	2023-04-13 13:30:42.000000000 +0000
@@ -6,15 +6,15 @@
 #include "obj_any.h"
 #include "obj_line.h"
 #include "obj_text.h"
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_inlines.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_inlines.h>
 #include <librnd/core/rnd_printf.h>
 #include <librnd/core/misc_util.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/core/rnd_conf.h>
 
 camv_tool_mline_t camv_tool_mline;
 
-static void create_mline(rnd_hidlib_t *hl)
+static void create_mline(rnd_design_t *hl)
 {
 	camv_any_obj_t *o;
 	camv_design_t *camv = (camv_design_t *)hl;
@@ -30,9 +30,7 @@ static void create_mline(rnd_hidlib_t *h
 	o = (camv_any_obj_t *)camv_text_new();
 	o->text.x = (camv_tool_mline.x1 + camv_tool_mline.x2) / 2;
 	o->text.y = (camv_tool_mline.y1 + camv_tool_mline.y2) / 2;
-/*	o->text.rot = atan2(camv_tool_mline.y2 - camv_tool_mline.y1, camv_tool_mline.x2 - camv_tool_mline.x1);*/
-	o->text.rot = 0;
-	o->text.size = 64;
+	o->text.rot = atan2(camv_tool_mline.y2 - camv_tool_mline.y1, camv_tool_mline.x2 - camv_tool_mline.x1) * RND_RAD_TO_DEG;
 	o->text.s = rnd_strdup_printf("%m+%.03$$mS", rnd_conf.editor.grid_unit->allow, (rnd_coord_t)dist);
 
 	camv_text_update(hl, &o->text, ly);
@@ -47,11 +45,11 @@ static void tool_mline_uninit(void)
 {
 }
 
-static void tool_mline_press(rnd_hidlib_t *hl)
+static void tool_mline_press(rnd_design_t *hl)
 {
 }
 
-static void tool_mline_release(rnd_hidlib_t *hl)
+static void tool_mline_release(rnd_design_t *hl)
 {
 	switch(camv_tool_mline.clicked) {
 		case 0:
@@ -68,7 +66,7 @@ static void tool_mline_release(rnd_hidli
 	}
 }
 
-static void tool_mline_adjust_attached_objects(rnd_hidlib_t *hl)
+static void tool_mline_adjust_attached_objects(rnd_design_t *hl)
 {
 	if (camv_tool_mline.clicked == 1) {
 		camv_tool_mline.x2 = camv.crosshair_x;
@@ -77,7 +75,7 @@ static void tool_mline_adjust_attached_o
 }
 
 
-static void tool_mline_draw_attached(rnd_hidlib_t *hl)
+static void tool_mline_draw_attached(rnd_design_t *hl)
 {
 	rnd_hid_set_line_cap(camv_crosshair_gc, rnd_cap_round);
 	rnd_hid_set_line_width(camv_crosshair_gc, -1);
@@ -90,12 +88,12 @@ static void tool_mline_draw_attached(rnd
 	}
 }
 
-rnd_bool tool_mline_undo_act(rnd_hidlib_t *hl)
+rnd_bool tool_mline_undo_act(rnd_design_t *hl)
 {
 	return 0;
 }
 
-rnd_bool tool_mline_redo_act(rnd_hidlib_t *hl)
+rnd_bool tool_mline_redo_act(rnd_design_t *hl)
 {
 	return 0;
 }
diff -pruN 1.1.0-3/src_plugins/std_tools/tool_mobj.c 1.1.2-1/src_plugins/std_tools/tool_mobj.c
--- 1.1.0-3/src_plugins/std_tools/tool_mobj.c	2021-11-08 16:06:18.000000000 +0000
+++ 1.1.2-1/src_plugins/std_tools/tool_mobj.c	2022-11-19 09:18:55.000000000 +0000
@@ -1,8 +1,8 @@
 #include "crosshair.h"
 #include "data.h"
-#include <librnd/core/hid.h>
-#include <librnd/core/hid_inlines.h>
-#include <librnd/core/hidlib_conf.h>
+#include <librnd/hid/hid.h>
+#include <librnd/hid/hid_inlines.h>
+#include <librnd/core/rnd_conf.h>
 
 static void tool_mobj_init(void)
 {
@@ -12,7 +12,7 @@ static void tool_mobj_uninit(void)
 {
 }
 
-static void tool_mobj_press(rnd_hidlib_t *hl)
+static void tool_mobj_press(rnd_design_t *hl)
 {
 	long lid;
 	rnd_coord_t slop = rnd_gui->coord_per_pix * 3 / 2;
@@ -61,25 +61,25 @@ static void tool_mobj_press(rnd_hidlib_t
 	}
 }
 
-static void tool_mobj_release(rnd_hidlib_t *hl)
+static void tool_mobj_release(rnd_design_t *hl)
 {
 }
 
-static void tool_mobj_adjust_attached_objects(rnd_hidlib_t *hl)
+static void tool_mobj_adjust_attached_objects(rnd_design_t *hl)
 {
 }
 
 
-static void tool_mobj_draw_attached(rnd_hidlib_t *hl)
+static void tool_mobj_draw_attached(rnd_design_t *hl)
 {
 }
 
-rnd_bool tool_mobj_undo_act(rnd_hidlib_t *hl)
+rnd_bool tool_mobj_undo_act(rnd_design_t *hl)
 {
 	return 0;
 }
 
-rnd_bool tool_mobj_redo_act(rnd_hidlib_t *hl)
+rnd_bool tool_mobj_redo_act(rnd_design_t *hl)
 {
 	return 0;
 }
diff -pruN 1.1.0-3/util/devhelpers/awk_on_formats.sh 1.1.2-1/util/devhelpers/awk_on_formats.sh
--- 1.1.0-3/util/devhelpers/awk_on_formats.sh	2022-11-04 03:44:12.000000000 +0000
+++ 1.1.2-1/util/devhelpers/awk_on_formats.sh	1970-01-01 00:00:00.000000000 +0000
@@ -1,111 +0,0 @@
-# shell lib
-
-# Read and parse all pups, make an array of file formats of
-# FMTS[import|export, type] then read stdin and execute the awk
-# script specified in $1 on it
-awk_on_formats()
-{
-(for n in $ROOT/src_plugins/*/*.pup
-do
-	echo "@@@ $n"
-	cat $n
-done
-echo "@@@@@@"
-cat
-) | awk '
-
-BEGIN {
-	osep = " <br> "
-	types="board footprint netlist image misc"
-	pends = 0
-	disabled = 0
-}
-
-($1 == "@@@") {
-	mode = 1
-	plugin=$n
-	sub(".*/", "", plugin)
-	sub("[.]pup", "", plugin)
-	fmt = plugin
-	sub("io_", "", fmt)
-	sub("import_", "", fmt)
-	sub("export_", "", fmt)
-	flush_pends()
-	next
-}
-
-($1 == "@@@@@@") {
-	flush_pends()
-	mode = 2
-	next
-}
-
-function add(name, dir   ,type,lname)
-{
-	lname = tolower(name)
-# DO NOT FORGET TO UDPATE types IN BEGIN ^^^
-	if (name ~ "netlist")
-		type = "netlist"
-	else if (lname ~ "schematic")
-		type = "netlist"
-	else if (lname ~ "footprint")
-		type = "footprint"
-	else if (lname ~ "kicad.*module")
-		type = "footprint"
-	else if (lname ~ "board")
-		type = "board"
-	else if (lname ~ "render")
-		type = "image"
-	else if (lname ~ "pixmap")
-		type = "image"
-	else if (lname ~ "bitmap")
-		type = "image"
-	else if (lname ~ "graphic")
-		type = "image"
-	else
-		type = "misc"
-# DO NOT FORGET TO UDPATE types IN BEGIN ^^^
-
-	if (FMTS[dir, type] == "")
-		FMTS[dir, type] = name
-	else
-		FMTS[dir, type] = FMTS[dir, type] osep name
-}
-
-# at the end of reading a plugin, write all pending data collected from
-# the pup file if the plugin is not disabled
-function flush_pends(    n)
-{
-	if (!disabled) {
-		for(n = 0; n < pends; n++)
-			add(PENDING1[n], PENDING2[n])
-	}
-	pends = 0
-	disabled = 0
-}
-
-(mode == 1) && ($1 == "$fmt-feature-r") {
-	$1=""
-	PENDING1[pends] = $0
-	PENDING2[pends] = "import"
-	pends++
-	next
-}
-
-(mode == 1) && ($1 == "$fmt-feature-w") {
-	$1=""
-	PENDING1[pends] = $0
-	PENDING2[pends] = "export"
-	pends++
-	next
-}
-
-(mode == 1) && ($1 == "default") {
-	if ($2 == "disable-all")
-		disabled = 1
-}
-
-(mode != 2) { next }
-'"$1"
-
-}
diff -pruN 1.1.0-3/util/devhelpers/list_dialogs.sh 1.1.2-1/util/devhelpers/list_dialogs.sh
--- 1.1.0-3/util/devhelpers/list_dialogs.sh	2022-11-10 15:49:21.000000000 +0000
+++ 1.1.2-1/util/devhelpers/list_dialogs.sh	1970-01-01 00:00:00.000000000 +0000
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# assumes running from the source tree
-
-trunk=$(dirname $0)/../..
-
-grep RND_DAD_NEW $trunk/src/*.c $trunk/src_plugins/*/*.c | awk '
-	($1 ~ "TEMPLATE") { next }
-	{
-		file=$1
-		name=$0
-		sub(":$", "", file)
-		sub(".*src/", "src/", file)
-		sub(".*src_plugins/", "src_plugins/", file)
-		sub(".*RND_DAD_NEW[^(]*[(]", "", name)
-		title=name
-		if (name ~ "^\"") {
-			sub("\"", "", name)
-			sub("\".*", "", name)
-		}
-		else
-			name = "<dyn>"
-
-		sub("[^,]*,[^,]*, *", "", title)
-		if (title ~ "^\"") {
-			sub("\"", "", title)
-			sub("\".*", "", title)
-		}
-		else
-			title = "<dyn>"
-
-		print name "\t" title "\t" file
-	}
-'
diff -pruN 1.1.0-3/util/keylist.sh 1.1.2-1/util/keylist.sh
--- 1.1.0-3/util/keylist.sh	2021-06-14 15:32:40.000000000 +0000
+++ 1.1.2-1/util/keylist.sh	1970-01-01 00:00:00.000000000 +0000
@@ -1,375 +0,0 @@
-#!/bin/sh
-#   keylist - list hotkey->actions found in .lht files in a html table
-#   Copyright (C) 2015..2016, 2018 Tibor 'Igor2' Palinkas
-#
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#
-#   This program 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 General Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program; if not, write to the Free Software Foundation, Inc.,
-#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-#   http://repo.hu/projects/pcb-rnd
-
-AWK=awk
-
-export LANG=C
-
-need_lht()
-{
-	echo "lhtflat not found. Please install lihata to run this script. The" >&2
-	echo "svn extern in src_3rd/ is not enough, this script requires a full" >&2
-	echo "installation from svn://repo.hu/lihata/trunk" >&2
-	exit 1
-}
-
-# make sure lhtflat is installed
-echo "" | lhtflat || need_lht
-
-
-if test -z "$*"
-then
-	echo ""
-	echo "$0: Generate a html table from pcb menu lht files."
-	echo "Usage: $0 file1 [file2 [file3 ... [fileN]]]"
-	echo ""
-	exit
-else
-	cmd="html"
-	while test $# -gt 0
-	do
-		case "$1" in
-			--html) cmd="html";;
-			--boxed) cmd="boxed";;
-			--lst) cmd="lst";;
-			--dot) cmd="dot"; nodenames=$2; shift 1;;
-			*) res_files="$res_files $1" ;;
-		esac
-		shift 1
-	done
-fi
-
-extract_from_lht()
-{
-	lhtflat | $AWK -F '[\t]' -v "fn=$1" '
-
-#data	text	//main_menu/1::Edit/submenu/11::Edit name of/submenu/1::pin on layout/a	Shift Ctrl<Key>n
-#data	text	//main_menu/1::Edit/submenu/11::Edit name of/submenu/1::pin on layout/action	ChangeName(Object, Number) 
-
-	{
-		tmp = $3
-		if ($3 ~ "/a/[0-9]*::$") {
-			# li:a = {}
-			sub("/[0-9]*::$", "", tmp)
-		}
-		parent=tmp
-		sub("/[^/]*$","", parent)
-		node=tmp
-		sub("^.*/","", node)
-	}
-
-
-	(($1 == "data") && ($2 == "text")) {
-		# simple text node: accel key
-		if (node == "a") {
-			seq=$0
-			sub("[^\t]*[\t]*[^\t]*[\t]*[^\t]*[\t]*", "", seq)
-			gsub(" ", "", seq)
-			v = split(tolower(seq), S, "[;]")
-			ktmp = ""
-			for(n = 1; n <= v; n++) {
-				if (S[n] ~ "<key>")
-					split(S[n], K, "<key>")
-				else
-					split(S[n], K, "<char>")
-				if (K[1] != "") {
-					mods = ""
-					if (K[1] ~ "alt")   mods = mods "-alt"
-					if (K[1] ~ "ctrl")  mods = mods "-ctrl"
-					if (K[1] ~ "shift") mods = mods "-shift"
-				}
-				else
-					mods = ""
-				if (ktmp == "")
-					ktmp = K[2] mods
-				else
-					ktmp = ktmp ";" K[2] mods
-			}
-			if (KEY[parent] == "")
-				KEY[parent] = ktmp
-			else
-				KEY[parent] = KEY[parent] SUBSEP ktmp
-		}
-
-		# simple text node: action
-		if (node == "action")
-			ACTION[parent] = $4
-
-		# list item: action
-		if ($3 ~ "/action/[0-9]+::$") {
-			parent = $3
-			sub("/action/[^/]*$", "", parent)
-			if (ACTION[parent] != "")
-				ACTION[parent] = ACTION[parent] ";" $4
-			else
-				ACTION[parent] = $4
-		}
-	}
-
-	END {
-		for(n in KEY) {
-			menuname = n
-			sub(".*::", "", menuname)
-			v = split(KEY[n], K, "[" SUBSEP "]")
-			for(i = 1; i <= v; i++)
-				print K[i] "\t" fn "\t" ACTION[n] "\t" menuname
-		}
-	}
-	'
-}
-
-# convert a "key src action" to a html table with rowspans for base keys
-gen_html()
-{
-	$AWK -F '[\t]' '
-	BEGIN {
-		CLR[0] = "#FFFFFF"
-		CLR[1] = "#DDFFFF"
-		key_combos = 0
-	}
-	function to_base_key(combo)
-	{
-		sub("-.*", "", combo)
-		return combo
-	}
-
-	function to_mods(combo)
-	{
-		if (!(combo ~ ".-"))
-			return ""
-		sub("^[^-]*[-]", "", combo)
-		return combo
-	}
-
-	{
-		k = $1
-		if (last != k) {
-			LIST[key_combos++] = k
-#			ROWSPAN[to_base_key(k)]++
-		}
-		ACTION[$2, k] = $3
-		MENUNAME[$2, k] = $4
-		HIDS[$2]++
-		last = k
-
-		v = split(k, K, ";")
-		p = ""
-		for(n = 1; n <= v; n++) {
-			p = p K[n] ";"
-			if (($2, p) in PREFIX) {
-				err = err "<br>" $2 ": " k " vs. " p
-				ERR[$2, p]++
-				ERR[$2, k]++
-			}
-		}
-		p = k ";"
-		PREFIX[$2, p]++
-	}
-
-	function cleanup(s)
-	{
-		gsub("\260", "\\&deg;", s)
-		gsub("\\\\37777777660", "\\&deg;", s)
-		gsub("\\\\057", "/", s)
-		return s
-	}
-
-	END {
-		q="\""
-		print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
-		print "<html>"
-		print "<!-- This file is generated by util/keylist.sh. DO NOT EDIT. -->"
-		print "<head>"
-		print "\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=us-ascii\">"
-		print "\t<title> Key to action bindings </title>"
-		print "<!--AUTO head begin-->"
-		print "<link rel=\"icon\" href=\"http://repo.hu/projects/pcb-rnd/resources/logo16.png\">"
-		print "<!--AUTO head end-->"
-		print "</head>"
-		print "<body>"
-		print "<h1> Key to action bindings </h1>"
-		print "<table border=1 cellspacing=0>"
-		printf("<tr><th> key")
-		colspan = 2
-		for(h in HIDS) {
-			printf(" <th>%s", h)
-			colspan++
-		}
-		print ""
-		for(n = 0; n < key_combos; n++) {
-			clr_cnt++
-			key = LIST[n]
-			print "<tr bgcolor=" q CLR[clr_cnt % 2] q ">"
-
-			kv = split(key, K, ";")
-			keystr = ""
-			ind=""
-			for(kn = 1; kn <= kv; kn++) {
-				if (kn > 1)
-					keystr = keystr "<br>"
-				keystr = keystr ind K[kn]
-				ind = ind "&nbsp;"
-			}
-			
-
-			print "	<th align=left>" cleanup(keystr)
-			for(h in HIDS) {
-				mn = cleanup(MENUNAME[h, key])
-				act = cleanup(ACTION[h, key])
-				if ((act == "") && (mn == ""))
-					act = "&nbsp;"
-				else {
-					gsub(");", "); ", act)
-					if (mn != "")
-						act = "<I>" mn "</I>" "<br>" act
-				}
-				print "	<td>", act
-				if ((h, key) in ERR)
-					print "<br> <b>Error: key prefix collision</b>"
-			}
-			last_base = base
-		}
-		print "</table>"
-		print err
-		print "</body></html>"
-	}
-	'
-}
-
-gen_list()
-{
-	local n
-	for n in $res_files 
-	do
-		extract_from_lht "`basename $n`" < $n
-	done | sort
-}
-
-# load node names and generate a dot drawing of the multikey bindings
-gen_dot()
-{
-	$AWK -v "names=$nodenames"  '
-		BEGIN {
-			q="\""
-			print "digraph keytree {"
-			print "rankdir=LR"
-			print "ranksep=0.2"
-			while((getline < names) == 1) {
-				path=$1
-				$1=""
-				desc = $0
-				node(path, desc, "shape=box")
-			}
-			close(names)
-			FS="[\t]"
-		}
-
-		function arrow_(curr)
-		{
-			if (!(curr in ARROW_SEEN)) {
-				print curr
-				ARROW_SEEN[curr]=1
-			}
-		}
-
-		function arrow(path   ,n,v,P,last,curr)
-		{
-			sub("^[/;_]", "", path)
-			sub("[/;_]$", "", path)
-			v = split(path, P, "[/;_]")
-
-#			curr = "root -> " q P[1] q
-#			arrow_(curr)
-			last = P[1]
-			for(n = 2; n <= v; n++) {
-				curr = q last q "->"  q last "_" P[n] q
-				arrow_(curr)
-				last = last "_" P[n]
-			}
-		}
-
-		function cleanup(s)
-		{
-			gsub("\260", "\\&deg;", s)
-			gsub("\\\\37777777660", "\\&deg;", s)
-			gsub("\\\\057", "/", s)
-			return s
-		}
-
-		function node(path, desc, shape,    orig)
-		{
-			orig=path
-			desc=cleanup(desc)
-			sub("^[/_;]", "", orig)
-			sub("[/_;]$", "", orig)
-			gsub("[/_;]", " ", orig)
-			sub("^[/;]", "", path)
-			sub("[/;]$", "", path)
-			gsub("[/;]", "_", path)
-			gsub("[\"]", "", desc)
-			print q path q " [label=" q "{" orig "} \\n" desc q " " shape "]"
-			arrow(path)
-		}
-
-		(($1 ~ "^[a-z]$") || ($1 ~ "^[a-z];[a-z];") || ($1 ~ "^[a-z];[a-z]$")) {
-			node($1, $4, "")
-		}
-
-		END {
-			print "}"
-		}
-	'
-}
-
-gen_boxed_html()
-{
-	$AWK -F '[\t]' '
-		/^[a-z][;]/ {
-			key=substr($0, 1, 1)
-			TBL[key] = TBL[key] "\n<tr><td>" $1 "<td>" $4
-		}
-		END {
-			print "<html><head><style>"
-			print "div.key {"
-			print "	margin: auto;"
-			print "	background: #bbffff;"
-			print "	float: left;"
-			print "	margin: 15px;"
-			print "}"
-			print "</style></head>"
-			print "<body><h1>pcb-rnd 2.x.x keys - cheat sheet </h1>"
-			for(n = 0; n < 26; n++) {
-				key = sprintf("%c", 97+n)
-				print "<div class=\"key\"><table border=1 cellspacing=0 width=400px>"
-				print TBL[key]
-				print "</table></div>"
-				print ""
-			}
-		}
-	'
-}
-
-case "$cmd" in
-	html) gen_list | gen_html ;;
-	boxed) gen_list | gen_boxed_html ;;
-	dot) gen_list | gen_dot ;;
-	lst) gen_list ;;
-esac
-
diff -pruN 1.1.0-3/util/sign/crl_repo.hu.pem 1.1.2-1/util/sign/crl_repo.hu.pem
--- 1.1.0-3/util/sign/crl_repo.hu.pem	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/util/sign/crl_repo.hu.pem	2022-11-21 13:09:50.000000000 +0000
@@ -0,0 +1,19 @@
+-----BEGIN X509 CRL-----
+MIIDGzCCAQMwDQYJKoZIhvcNAQELBQAwgb0xCzAJBgNVBAYTAkhVMREwDwYDVQQI
+EwhCdWRhcGVzdDERMA8GA1UEBxMIQnVkYXBlc3QxEDAOBgNVBAoTB3JlcG8uaHUx
+DjAMBgNVBAsTBUlnb3IyMRMwEQYDVQQDEwpyZXBvLmh1IENBMSwwKgYDVQQpEyNy
+ZXBvLmh1IHB1YmxpYyBzc2wgYW5kIGZpbGUgc2lnbmluZzEjMCEGCSqGSIb3DQEJ
+ARYUa2V5aW5nQGlnb3IyLnJlcG8uaHUXDTIyMDgwMzAzMzc0NVoXDTIzMDkwMjAz
+Mzc0NVowFDASAgEBFw0yMDA0MjExNTM5NDNaMA0GCSqGSIb3DQEBCwUAA4ICAQAI
+As+0863vHWtEnWLkHiQNOR08zf7gVttkaKIynUZWL8MdeNwfDnWsEOA7qI9Ad3TT
+d2W4FGn0g4ofOxPE94aUQsbjwIrxMboj+7q362Xh8Ix7oA4HNpqNSqqVkhvY5y+O
+CFnR0XIXToxs910CELD/OLW/KEtGTlgRVCZVnoNt5mTVwtKSopPuowsj4NXKzAiz
+SzrKEC59Qd8yN/XNFgUgYU7naMIuNZ1e5E7tKwImjYC39ykSQrEPKFywb0UrW51r
+AdV+kmAdL/i8JaKwb31aMjk+wG9tysOtKv897pAFmYD/DrYBp7cxbqMpvowW/qvc
+KDmtGVoRtXmLOnWZcH99N5Ioai46+2f2JrshPES8kjkzwoGRMGXSiTpCX6f4L9Ij
++cd/IUbvWNW2OMb7MRAnLNhNAkJIxl2sE52jW7CVwWv2I9MOmCDTIYMFNkVC2JUh
+vGoPj+eAQ2TlUcr2dETGAAPjPoZgx/woBgolU9+RigkRusvAhloIkDvAyajagAYF
+Q+D1ixjN5c2cLY53LifpVJDGlJ2ApiV0iK1HrTnWOyyd42pa9KdPCw3vYzDixLKZ
+zjjc00PwjDOUDWu+PyAg1oXXBNg987aR/g+vUmorF3G9kDy054q4vnyF1410KPN9
+S5LeF+mda/ww1v9Cdt7SIHuVQOJiFOItZM4b0yw9+g==
+-----END X509 CRL-----
diff -pruN 1.1.0-3/util/sign/rootca_repo.hu_2020.crt 1.1.2-1/util/sign/rootca_repo.hu_2020.crt
--- 1.1.0-3/util/sign/rootca_repo.hu_2020.crt	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/util/sign/rootca_repo.hu_2020.crt	2022-11-21 13:09:50.000000000 +0000
@@ -0,0 +1,41 @@
+-----BEGIN CERTIFICATE-----
+MIIHJzCCBQ+gAwIBAgIJAOOTjzdHBDWkMA0GCSqGSIb3DQEBCwUAMIG9MQswCQYD
+VQQGEwJIVTERMA8GA1UECBMIQnVkYXBlc3QxETAPBgNVBAcTCEJ1ZGFwZXN0MRAw
+DgYDVQQKEwdyZXBvLmh1MQ4wDAYDVQQLEwVJZ29yMjETMBEGA1UEAxMKcmVwby5o
+dSBDQTEsMCoGA1UEKRMjcmVwby5odSBwdWJsaWMgc3NsIGFuZCBmaWxlIHNpZ25p
+bmcxIzAhBgkqhkiG9w0BCQEWFGtleWluZ0BpZ29yMi5yZXBvLmh1MB4XDTIwMDQy
+MTEyMjYwNVoXDTMwMDQxOTEyMjYwNVowgb0xCzAJBgNVBAYTAkhVMREwDwYDVQQI
+EwhCdWRhcGVzdDERMA8GA1UEBxMIQnVkYXBlc3QxEDAOBgNVBAoTB3JlcG8uaHUx
+DjAMBgNVBAsTBUlnb3IyMRMwEQYDVQQDEwpyZXBvLmh1IENBMSwwKgYDVQQpEyNy
+ZXBvLmh1IHB1YmxpYyBzc2wgYW5kIGZpbGUgc2lnbmluZzEjMCEGCSqGSIb3DQEJ
+ARYUa2V5aW5nQGlnb3IyLnJlcG8uaHUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
+ggIKAoICAQDXBFlluNaF/Pikec4TeEq/UsZAg1XhhmUJZnzAx7i84ramW0rvvdxN
+bdWAAjuaQG7qRSnZNQieDcHKq/xeAz3TMxmXGytclOh7HtXaTbg963dQd4sZ7wK+
+Nv1znTJSR5jx6u5ijiaKqktVRiRndUsWw/pKSZvEY8uCc+4vK0xzPM49cYMOG0VV
+Vs3IT47piONWbuCqXgi+ijHFHpPKLW2x4jDP6OXhXHWMg2J8+q/ggqURpUscNnvP
+NfIPGyr7ZRsVVrTRNHA1clYDJFbHrkqhcjSodWvEmAbmz31DfYrlxnDVEmYqOqxO
+K6y2cn0rYUbuM8yc1hO4MgncXZ1y+3SoFK/LvsPR1MlGeqMRBL4Ru/S7q8/NEak8
++gPYJiIdy5Pt9hzZv1C7cPlsxXS1xCHJOk2xNbDrUuDV98P0ZYYY/7K98fss43vZ
+UzbR/+eVhrjESFiHY/7Gcknaa9d0RMzSNWik/cBUwDty1C9OdxqeOmWE/uRqsViF
+6ypxRG9ZRJnuqWxa8+PT3EFJLARizz06uzD0nN0xqMI1k3s5hXDDSloH8eK4UF2j
+ZtHLo0m/4b6l3dZmkG5/eJAq2Kg8r6Bzx9oAnRUW8MPjJL95XrDClWAVrABTWs0E
+409AklGh8w4+hB2xD8ZbNXDMyu1S+ic1CzYPMa9a3NPsrG1/H9A2WwIDAQABo4IB
+JjCCASIwHQYDVR0OBBYEFOxDrX4j1c5ZbQdhCaRmlzxEAKx5MIHyBgNVHSMEgeow
+geeAFOxDrX4j1c5ZbQdhCaRmlzxEAKx5oYHDpIHAMIG9MQswCQYDVQQGEwJIVTER
+MA8GA1UECBMIQnVkYXBlc3QxETAPBgNVBAcTCEJ1ZGFwZXN0MRAwDgYDVQQKEwdy
+ZXBvLmh1MQ4wDAYDVQQLEwVJZ29yMjETMBEGA1UEAxMKcmVwby5odSBDQTEsMCoG
+A1UEKRMjcmVwby5odSBwdWJsaWMgc3NsIGFuZCBmaWxlIHNpZ25pbmcxIzAhBgkq
+hkiG9w0BCQEWFGtleWluZ0BpZ29yMi5yZXBvLmh1ggkA45OPN0cENaQwDAYDVR0T
+BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAJz/MUVFBYvWto1iDHYFQWz2hRitx
+AKtphsKtUF0fZ4mwZ/GN8/gItKaEndkFVQt250/ZlDqNOsR0WUwxHUuvKQnZj3yK
+QPWqJf4XAiXWD4UHm+xjIKub6K5SgrWKDF+2pM0vWHv80vinpwKCmn1qlFRY9hZY
+Cr40yGATb9Ebr5mO3Q+Xacj/EmPxogjPd0IkoC2sHnlaXIkDtD4sZtqQyJc1h1fQ
+xfxYh/w3kURTps856Y8wlvpc2R4B592sTf4p78Jv+tQxm400HNE4NNyNUwmHvQ9p
+gRW/HWBVy/vjGhYz4645VBwFQ7bt0qLFaEOQBxOHYY+J8uneH8vMGtJduS0gyHvb
+Qv/rOS71gPau2niTLH7CbKtqdG1RY1O6npjAxLIKsO5QJN1BN5svg8M6bIvY4KJZ
+n3f1ISJQTIUvyu+A2gOe2459qf1Bn3zalYVPWmDqBLkqnR1mnCEhOYuNR1ES05xx
+tJWzfQSerBJWQqTZ430E3zwapFVWCOky5H89xFPXBiodWfOzpdenAHBaoSqjG6fM
+tqJ0umljL+Xn6EzaHsAjEkJFTK4TZ71SAFugRNRrXlX9+efZmTHpNDXzZ1gs5j71
+o1IQ9wl2eSopft8NU0nbefnfQ1+QcEAqM9z9BM3u0I2kX7ddPI7KzGCqq3nxrP6c
+C7BZ2G6M6Jr7pXA=
+-----END CERTIFICATE-----
diff -pruN 1.1.0-3/util/sign/sign.sh 1.1.2-1/util/sign/sign.sh
--- 1.1.0-3/util/sign/sign.sh	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/util/sign/sign.sh	2022-11-21 13:09:50.000000000 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if test $# -lt 3
+then
+	echo "Usage: ./sign.sh privkey cert file1 [file2 .. fileN]"
+fi
+
+key="$1"
+cert="$2"
+shift 2
+
+for fn in "$@"
+do
+	openssl dgst -sha256 -sign "$key" -out "$fn.sig" "$fn"
+	cp "$cert" "$fn.crt"
+done
+
diff -pruN 1.1.0-3/util/sign/verify.sh 1.1.2-1/util/sign/verify.sh
--- 1.1.0-3/util/sign/verify.sh	1970-01-01 00:00:00.000000000 +0000
+++ 1.1.2-1/util/sign/verify.sh	2022-11-21 13:09:50.000000000 +0000
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+### defaults ###
+ca=rootca_repo.hu_2020.crt
+crl=crl_repo.hu.pem
+
+### implementation ###
+
+verify()
+{
+	local base="$1" sig="$1.sig" crt="$1.crt"
+
+	# check if all files are in place
+	if test ! -f "$base"
+	then
+		echo "Content file $base does not exist" >&2
+		return 1
+	fi
+
+	if test ! -f "$sig"
+	then
+		echo "Signature file $sig does not exist - please download that too!" >&2
+		return 1
+	fi
+
+	if test ! -f "$crt"
+	then
+		echo "Certificate file $crt does not exist - please download that too!" >&2
+		return 1
+	fi
+
+	if test ! -f "$ca"
+	then
+		echo "repo.hu CA cert $ca not found. Please download it from multiple sources" >&2
+		return 1
+	fi
+
+	if test ! -f "$crl"
+	then
+		echo "repo.hu CRL $crl not found. Please download it from multiple sources" >&2
+		return 1
+	fi
+
+	# step 4: check file's cert against repo.hu CA and CRL
+	cat $ca $crl > .ca_crl.pem
+	openssl verify -crl_check -CAfile .ca_crl.pem $crt >&2
+	if test $? != 0
+	then
+		return 1
+	fi
+
+	# step 5: check file's sig against file's cert
+	openssl x509 -pubkey -noout -in $crt > $crt.pem && \
+	openssl dgst -verify $crt.pem -signature $sig $base >&2
+}
+
+fingerprint()
+{
+	echo -n "CA  "
+	openssl x509 -fingerprint -noout -in $ca
+	echo -n "CRL "
+	openssl crl -fingerprint -noout -in $crl
+}
+
+print_file()
+{
+	case "$1" in
+		*.crt) openssl x509 -in "$1" -text ;;
+		crl*.pem) openssl crl -in "$1" -text ;;
+		*) echo "Don't know how to print that file" ;;
+	esac
+}
+
+help()
+{
+echo 'verify.sh - pcb-rnd download signature verify script
+Usage: ./verify.sh [--fp] [--ca CA_file] [--crl CRL_file] downloaded_file
+
+Download the CA and CRL files from multiple sources to make sure they match.
+Altneratively print the the fingerprint with --fp and check that from
+multiple sources.
+
+The verification process is documented at
+
+http://www.repo.hu/cgi-bin/pool.cgi?cmd=show&node=sign
+
+Remember:
+
+ - if you run this for the first time, you absolutely need to verify the CA
+   from multiple sources
+
+ - before running the script, please get the latest CRL, from multiple sources
+
+The effective security of this process largely depends on these two steps.
+'
+}
+
+### main ###
+
+bad=0
+while test $# -gt 0
+do
+	case "$1" in
+		--help) help "$@"; exit;;
+		--fp)  fingerprint ;;
+		--ca) shift 1; ca="$1";;
+		--crl) shift 1; crl="$1";;
+		--print) shift 1; print_file "$1" ;;
+		*)
+			verify "$1"
+			if test $? = 0
+			then
+				echo "*** $1: ok"
+			else
+				echo "*** $1: FAILED"
+				bad=1
+			fi
+	esac
+
+	shift 1
+done
+
+exit $bad
