diff --git a/.gitignore b/.gitignore
index 8f9b16a..a41ca42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ ic3/ic3_asan
ic3/ic3_cov
ic3/ic3_debug
*.la
+libc3/window/cairo/quartz/build
libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo
libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo_asan
libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo_cov
diff --git a/Makefile b/Makefile
index 3083c66..5550ab5 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ build: gen
${MAKE} -C libtommath build
${MAKE} -C ucd2c build
${MAKE} -C libc3 build
- ${MAKE} -C libc3/window build
${MAKE} -C ic3 build
${MAKE} -C c3s build
${MAKE} -C test build
@@ -25,7 +24,6 @@ all: gen
${MAKE} -C libtommath all
${MAKE} -C ucd2c all
${MAKE} -C libc3 all
- ${MAKE} -C libc3/window all
${MAKE} -C ic3 all
${MAKE} -C c3s all
${MAKE} -C test all
@@ -34,26 +32,15 @@ asan:
${GMAKE} -C libffi all
${MAKE} -C libtommath asan
${MAKE} -C libc3 asan
- ${MAKE} -C libc3/window asan
${MAKE} -C ic3 asan
${MAKE} -C c3s asan
${MAKE} -C test asan
-cov: gen
- ${GMAKE} -C libffi all
- ${MAKE} -C libtommath cov
- ${MAKE} -C libc3 cov
- ${MAKE} -C libc3/window cov
- ${MAKE} -C ic3 cov
- ${MAKE} -C c3s cov
- ${MAKE} -C test cov
-
clean:
${GMAKE} -C libffi clean
${MAKE} -C libtommath clean
${MAKE} -C ucd2c clean
${MAKE} -C libc3 clean
- ${MAKE} -C libc3/window clean
${MAKE} -C ic3 clean
${MAKE} -C c3s clean
${MAKE} -C test clean
@@ -61,22 +48,28 @@ clean:
clean_cov:
${MAKE} -C libtommath clean_cov
${MAKE} -C libc3 clean_cov
- ${MAKE} -C libc3/window clean_cov
${MAKE} -C ic3 clean_cov
${MAKE} -C c3s clean_cov
${MAKE} -C test clean_cov
+cov: gen
+ ${GMAKE} -C libffi all
+ ${MAKE} -C libtommath cov
+ ${MAKE} -C libc3 cov
+ ${MAKE} -C ic3 cov
+ ${MAKE} -C c3s cov
+ ${MAKE} -C test cov
+
debug:
${GMAKE} -C libffi all
${MAKE} -C libtommath debug
${MAKE} -C libc3 debug
- ${MAKE} -C libc3/window debug
${MAKE} -C ic3 debug
${MAKE} -C c3s debug
${MAKE} -C test debug
demo: build
- ${MAKE} -C libc3/window demo
+ ${MAKE} -C libc3 demo
dist: c3-${C3_VERSION}.tar.gz
@@ -91,21 +84,19 @@ distclean:
${MAKE} -C libtommath distclean
${MAKE} -C ucd2c distclean
${MAKE} -C libc3 distclean
- ${MAKE} -C libc3/window distclean
${MAKE} -C ic3 distclean
${MAKE} -C c3s distclean
${MAKE} -C test distclean
gcovr:
${MAKE} -C libc3 gcovr
- ${MAKE} -C libc3/window gcovr
${MAKE} -C ic3 gcovr
${MAKE} -C c3s gcovr
${MAKE} -C test gcovr
if [ -d "$$HOME/Downloads/c3_gcovr" ]; then bin/gcovr-to-downloads; fi
gdb_demo: debug
- ${MAKE} -C libc3/window gdb_demo
+ ${MAKE} -C libc3 gdb_demo
gdb_ic3: debug
${MAKE} -C ic3 gdb_ic3
@@ -124,7 +115,6 @@ ic3_gcovr:
install:
${GMAKE} -C libffi install
${MAKE} -C libc3 install
- ${MAKE} -C libc3/window install
${MAKE} -C ic3 install
${MAKE} -C c3s install
diff --git a/c3s/configure b/c3s/configure
index aa6bd04..21bee48 100755
--- a/c3s/configure
+++ b/c3s/configure
@@ -124,25 +124,25 @@ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_DEBUG} \${LDFLAGS_DEBUG}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
- SRC_LO="$(c2lo "$SRC")"
- lo_rule "$SRC" >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
if $HAVE_GCOV; then
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
fi
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
diff --git a/config.subr b/config.subr
index 62c064d..b5e4a6c 100644
--- a/config.subr
+++ b/config.subr
@@ -16,25 +16,21 @@ set -e
cd "$(dirname "$0")"
echo "$PWD/$(basename "$0")"
-o_rule() {
+c_o_rule() {
"$CC" $CPPFLAGS $CFLAGS -M "$1" || { echo "$1" | sed -e 's/^\(.*\)\.c$/\1.o: \1.c/'; }
echo "$1" | sed -e 's/^\(.*\)\.c$/\1.o: Makefile config.mk/'
}
-ext_rule() {
- o_rule "$2" | sed -e "s/[.]o:/$1:/"
+c_ext_rule() {
+ c_o_rule "$2" | sed -e "s/[.]o:/$1:/"
}
-lo_rule() {
- ext_rule .lo "$1"
+c_lo_rule() {
+ c_ext_rule .lo "$1"
}
-prog_rule() {
- { o_rule "$1" || exit 1; } | sed -e 's/[.]o:/:/'
-}
-
-c2prog() {
- echo "$@" | sed -e 's/[.]c$//' -e 's/[.]c / /g'
+c_prog_rule() {
+ { c_o_rule "$1" || exit 1; } | sed -e 's/[.]o:/:/'
}
c2ext() {
@@ -42,16 +38,20 @@ c2ext() {
echo "$@" | sed -e "s/[.]c$/${EXT}/" -e "s/[.]c /${EXT} /g"
}
-c2o() {
- c2ext .o "$@"
+c2la() {
+ c2ext .la "$@"
}
c2lo() {
c2ext .lo "$@"
}
-c2la() {
- c2ext .la "$@"
+c2o() {
+ c2ext .o "$@"
+}
+
+c2prog() {
+ echo "$@" | sed -e 's/[.]c$//' -e 's/[.]c / /g'
}
config_asan() {
@@ -62,6 +62,7 @@ config_asan() {
HAVE_ASAN=false
fi
rm .config_asan.c
+ echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
}
config_define () {
@@ -110,6 +111,20 @@ config_lib() {
rm "$OUT"
}
+objc_o_rule() {
+ echo "$1" | sed -e 's/^\(.*\)\.m$/\1.o: \1.c/'
+ echo "$1" | sed -e 's/^\(.*\)\.m$/\1.o: Makefile config.mk/'
+}
+
+objc_ext_rule() {
+ objc_o_rule "$2" | sed -e "s/[.]o:/$1:/"
+}
+
+objc2ext() {
+ EXT="$1"; shift
+ echo "$@" | sed -e "s/[.]m$/${EXT}/" -e "s/[.]m /${EXT} /g"
+}
+
pkg_config() {
if pkg-config "$1"; then
CFLAGS="$CFLAGS $(pkg-config --cflags "$1")"
@@ -131,6 +146,20 @@ $(echo "$2" | sed -e 's/^\(.*\)$/ \1 \\\\/')
echo "$1='$(echo "$2" | tr '\n' ' ')'" >> ${SOURCES_SH}
}
+swift_o_rule() {
+ echo "$1" | sed -e 's/^\(.*\)\.swift$/\1.o: \1.c/'
+ echo "$1" | sed -e 's/^\(.*\)\.swift$/\1.o: Makefile config.mk/'
+}
+
+swift_ext_rule() {
+ swift_o_rule "$2" | sed -e "s/[.]o:/$1:/"
+}
+
+swift2ext() {
+ EXT="$1"; shift
+ echo "$@" | sed -e "s/[.]swift$/${EXT}/" -e "s/[.]swift /${EXT} /g"
+}
+
update_config_h() {
echo "#endif" >> "${CONFIG_H}"
if ! cmp "${CONFIG_H}" config.h >/dev/null 2>&1; then
@@ -245,6 +274,28 @@ if [ "x$LIBTOOL" = "x" ]; then
fi
echo "LIBTOOL = $LIBTOOL" >> ${CONFIG_MK}
+if [ "x$SWIFTC" = "x" ]; then
+ if test -x "$(which swiftc 2>/dev/null)"; then
+ SWIFTC="$(which swiftc)"
+ HAVE_SWIFT=true
+ else
+ HAVE_SWIFT=false
+ fi
+else
+ HAVE_SWIFT=true
+fi
+echo "SWIFTC = $SWIFTC" >> ${CONFIG_MK}
+echo "HAVE_SWIFT = $HAVE_SWIFT" >> ${CONFIG_MK}
+
+if [ "x$OBJCC" = "x" ]; then
+ if test -x "$(which clang 2>/dev/null)"; then
+ OBJCC="$(which clang)"
+ else
+ OBJCC=clang
+ fi
+fi
+echo "OBJCC = $OBJCC" >> ${CONFIG_MK}
+
PREFIX="${PREFIX:-/usr/local}"
echo "PREFIX = $PREFIX" >> ${CONFIG_MK}
echo "DESTDIR ?=" >> ${CONFIG_MK}
diff --git a/configure b/configure
index 4b24c57..3e3c2ec 100755
--- a/configure
+++ b/configure
@@ -39,7 +39,6 @@ update_config_mk
( cd libtommath && ./configure; )
( cd ucd2c && ./configure; )
( cd libc3 && ./configure; )
-( cd libc3/window && ./configure; )
( cd ic3 && ./configure; )
( cd c3s && ./configure; )
( cd test && ./configure; )
diff --git a/ic3/configure b/ic3/configure
index 6413332..515b223 100755
--- a/ic3/configure
+++ b/ic3/configure
@@ -124,25 +124,25 @@ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_DEBUG} \${LDFLAGS_DEBUG}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
- SRC_LO="$(c2lo "$SRC")"
- lo_rule "$SRC" >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
if $HAVE_GCOV; then
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
fi
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
diff --git a/libc3/Makefile b/libc3/Makefile
index 95e2bd2..6d98409 100644
--- a/libc3/Makefile
+++ b/libc3/Makefile
@@ -19,30 +19,45 @@ CLEANFILES += ${CLEANFILES_COV}
DISTCLEANFILES = ${CLEANFILES} config.h config.mk
build: libc3.la
+ ${MAKE} -C window build
all:
${MAKE} build
if ${HAVE_GCOV}; then ${MAKE} cov; fi
${MAKE} debug
if ${HAVE_ASAN}; then ${MAKE} asan; fi
+ ${MAKE} -C window all
asan: libc3_asan.la
+ ${MAKE} -C window asan
clean:
rm -rf ${CLEANFILES}
+ ${MAKE} -C window clean
clean_cov:
rm -rf ${CLEANFILES_COV}
+ ${MAKE} -C window clean_cov
cov: libc3_cov.la
+ ${MAKE} -C window cov
debug: libc3_debug.la
+ ${MAKE} -C window debug
+
+demo: build
+ ${MAKE} -C window demo
distclean:
rm -rf ${DISTCLEANFILES}
+ ${MAKE} -C window distclean
gcovr:
gcovr --gcov-executable ${GCOV} --html-details libc3.html
+ ${MAKE} -C window gcovr
+
+gdb_demo: debug
+ ${MAKE} -C window gdb_demo
include gen.mk
CLEANFILES += ${GENERATED_FILES}
@@ -53,18 +68,7 @@ install:
${INSTALL} -o ${OWNER} -g ${GROUP} -m 0755 -d ${prefix}/lib
${LIBTOOL} --tag=CC --mode=install ${INSTALL} -o ${OWNER} -g ${GROUP} -m 0644 ${LIB} ${prefix}/lib
${LIBTOOL} --finish ${prefix}/lib
-
-libc3.a: libc3.la
- cp .libs/libc3.a ./
-
-libc3_asan.a: libc3_asan.la
- cp .libs/libc3_asan.a ./
-
-libc3_cov.a: libc3_cov.la
- cp .libs/libc3_cov.a ./
-
-libc3_debug.a: libc3_debug.la
- cp .libs/libc3_debug.a ./
+ ${MAKE} -C window install
libffi:
ln -sf "../libffi/${CC_TARGET}" libffi
diff --git a/libc3/configure b/libc3/configure
index decc055..fabafdd 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -121,23 +121,25 @@ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_DEBUG} ${OBJECT
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
SRC_LO="$(c2ext .main.lo "$SRC")"
- ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
update_config_mk
+
+( cd window && ./configure; )
diff --git a/libc3/update_sources b/libc3/update_sources
index 613eade..68e6efe 100755
--- a/libc3/update_sources
+++ b/libc3/update_sources
@@ -124,3 +124,5 @@ sources LO_SOURCES "$LO_SOURCES"
update_sources_mk
update_sources_sh
+
+( cd window && ./update_sources; )
diff --git a/libc3/window/Makefile b/libc3/window/Makefile
index 66bdec4..4d5ddb9 100644
--- a/libc3/window/Makefile
+++ b/libc3/window/Makefile
@@ -13,8 +13,7 @@
include config.mk
build:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb build; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo build; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo build; fi
all:
${MAKE} build
@@ -23,50 +22,40 @@ all:
if ${HAVE_ASAN}; then ${MAKE} asan; fi
asan:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb asan; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo asan; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo asan; fi
clean:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb clean; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo clean; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo clean; fi
clean_cov:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb clean_cov; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo clean_cov; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo clean_cov; fi
cov:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb cov; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo cov; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo cov; fi
debug:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb debug; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo debug; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo debug; fi
-demo:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo demo; fi
+demo: build
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo demo; fi
distclean:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb distclean; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo distclean; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo distclean; fi
gcovr:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb gcovr; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo gcovr; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo gcovr; fi
gdb_demo: debug
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo gdb_demo; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo gdb_demo; fi
install:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb install; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo install; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo install; fi
test:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb test; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo test; fi
+ if ${HAVE_CAIRO}; then ${MAKE} -C cairo test; fi
update_sources:
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb update_sources; fi
- if ${HAVE_CAIRO} && ${HAVE_XCB}; then ${MAKE} -C cairo/xcb/demo update_sources; fi
+ ./update_sources
.PHONY: \
all \
diff --git a/libc3/window/cairo/Makefile b/libc3/window/cairo/Makefile
new file mode 100644
index 0000000..68a4613
--- /dev/null
+++ b/libc3/window/cairo/Makefile
@@ -0,0 +1,83 @@
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+include config.mk
+
+build:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz build; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb build; fi
+
+all:
+ ${MAKE} build
+ if ${HAVE_GCOV}; then ${MAKE} cov; fi
+ ${MAKE} debug
+ if ${HAVE_ASAN}; then ${MAKE} asan; fi
+
+asan:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz asan; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb asan; fi
+
+clean:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz clean; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb clean; fi
+
+clean_cov:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz clean_cov; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb clean_cov; fi
+
+cov:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz cov; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb cov; fi
+
+debug:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz debug; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb debug; fi
+
+demo: build
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz demo; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb demo; fi
+
+distclean:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz distclean; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb distclean; fi
+
+gcovr:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz gcovr; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb gcovr; fi
+
+gdb_demo: debug
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz gdb_demo; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb gdb_demo; fi
+
+install:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz install; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb install; fi
+
+test:
+ if ${HAVE_SWIFT}; then ${MAKE} -C quartz test; fi
+ if ${HAVE_XCB}; then ${MAKE} -C xcb test; fi
+
+update_sources:
+ ./update_sources
+
+.PHONY: \
+ all \
+ asan \
+ build \
+ clean \
+ cov \
+ debug \
+ demo \
+ distclean \
+ install \
+ test \
+ update_sources
diff --git a/libc3/window/cairo/configure b/libc3/window/cairo/configure
new file mode 100755
index 0000000..13cde27
--- /dev/null
+++ b/libc3/window/cairo/configure
@@ -0,0 +1,160 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+set -e
+
+export SRC_TOP="$(dirname "$PWD")"
+
+. ../../../config.subr
+
+LIB=libc3_window_cairo.la
+LIB_ASAN=libc3_window_cairo_asan.la
+LIB_COV=libc3_window_cairo_cov.la
+LIB_DEBUG=libc3_window_cairo_debug.la
+
+echo "LIB = $LIB" >> ${CONFIG_MK}
+echo "LIB_ASAN = $LIB_ASAN" >> ${CONFIG_MK}
+echo "LIB_COV = $LIB_COV" >> ${CONFIG_MK}
+echo "LIB_DEBUG = $LIB_DEBUG" >> ${CONFIG_MK}
+
+LIBC3=../../libc3.la
+LIBC3_ASAN=../../libc3_asan.la
+LIBC3_COV=../../libc3_cov.la
+LIBC3_DEBUG=../../libc3_debug.la
+
+. ./sources.sh
+
+OBJECTS="$(c2ext .main.lo "$SOURCES")"
+echo "OBJECTS = $OBJECTS" >> ${CONFIG_MK}
+OBJECTS_ASAN="$(c2ext .asan.lo "$SOURCES")"
+OBJECTS_COV="$(c2ext .cov.lo "$SOURCES")"
+OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
+
+# Default config
+CPPFLAGS="${CPPFLAGS:=}"
+ENV_CFLAGS="${CFLAGS:=}"
+DEFAULT_CFLAGS="-O2 -pipe"
+LDFLAGS="--shared --no-undefined ${LDFLAGS}"
+LIBS="${LIBS} -rpath ${PREFIX}/lib"
+
+# Common config for all targets
+CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic -fPIC"
+CPPFLAGS="$CPPFLAGS -I../../../libffi/include -I../../.."
+config_asan
+config_gnu
+pkg_config cairo
+config_define PREFIX "\"${PREFIX}\""
+LIBS="$LIBS"
+
+# Address Sanitizer config
+CFLAGS_ASAN="$CFLAGS -O1 -fsanitize=address -fno-omit-frame-pointer -g"
+LDFLAGS_ASAN="$LDFLAGS"
+LIBS_LOCAL_ASAN="$LIBC3_ASAN"
+LIBS_ASAN="$LIBS_LOCAL_ASAN $LIBS"
+
+# Coverage config
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
+LDFLAGS_COV="$LDFLAGS --coverage"
+LIBS_LOCAL_COV="$LIBC3_COV"
+LIBS_COV="$LIBS_LOCAL_COV $LIBS"
+
+# Debug config
+CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
+LDFLAGS_DEBUG="$LDFLAGS"
+LIBS_LOCAL_DEBUG="$LIBC3_DEBUG"
+LIBS_DEBUG="$LIBS_LOCAL_DEBUG $LIBS"
+
+# Main config
+if [ "x$ENV_CFLAGS" = "x" ]; then
+ CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
+fi
+CFLAGS="$CFLAGS -DNDEBUG"
+LIBS_LOCAL="$LIBC3"
+LIBS="$LIBS_LOCAL $LIBS"
+
+echo "LIB = $LIB" >> ${CONFIG_MK}
+echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
+echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
+echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
+echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
+echo "LIBS = $LIBS" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "LIB_ASAN = $LIB_ASAN" >> ${CONFIG_MK}
+echo "CFLAGS_ASAN = $CFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LDFLAGS_ASAN = $LDFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LIBS_ASAN = $LIBS_ASAN" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "LIB_COV = $LIB_COV" >> ${CONFIG_MK}
+echo "CFLAGS_COV = $CFLAGS_COV" >> ${CONFIG_MK}
+echo "LDFLAGS_COV = $LDFLAGS_COV" >> ${CONFIG_MK}
+echo "LIBS_COV = $LIBS_COV" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "LIB_DEBUG = $LIB_DEBUG" >> ${CONFIG_MK}
+echo "CFLAGS_DEBUG = $CFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LDFLAGS_DEBUG = $LDFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LIBS_DEBUG = $LIBS_DEBUG" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB: $LIBS_LOCAL $OBJECTS" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS} ${OBJECTS} \${LIBS} -rpath ${LIBDIR} -o ${LIB}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_ASAN: $LIBS_LOCAL_ASAN $OBJECTS_ASAN" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_ASAN} ${OBJECTS_ASAN} \${LIBS_ASAN} -rpath ${LIBDIR} -o ${LIB_ASAN}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_COV: $LIBS_LOCAL_COV $OBJECTS_COV" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_COV} ${OBJECTS_COV} \${LIBS_COV} -rpath ${LIBDIR} -o ${LIB_COV}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_DEBUG: $LIBS_LOCAL_DEBUG $OBJECTS_DEBUG" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_DEBUG} ${OBJECTS_DEBUG} \${LIBS_DEBUG} -rpath ${LIBDIR} -o ${LIB_DEBUG}" >> ${CONFIG_MK}
+
+for SRC in $SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
+done
+
+if pkg-config xcb; then
+ HAVE_XCB=true
+else
+ HAVE_XCB=false
+fi
+echo "HAVE_XCB = $HAVE_XCB" >> ${CONFIG_MK}
+
+update_config_mk
+
+if ${HAVE_SWIFT}; then
+ ( cd quartz && ./configure; )
+fi
+
+if ${HAVE_XCB}; then
+ ( cd xcb && ./configure; )
+fi
diff --git a/libc3/window/cairo/quartz/Makefile b/libc3/window/cairo/quartz/Makefile
new file mode 100644
index 0000000..392d5d1
--- /dev/null
+++ b/libc3/window/cairo/quartz/Makefile
@@ -0,0 +1,63 @@
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+CLEANFILES = *.a *.gcno *.la .libs *.lo *.o
+
+CLEANFILES_COV = *.css *.gcda *.html .libs/*.gcda
+
+CLEANFILES += ${CLEANFILES_COV}
+
+DISTCLEANFILES = ${CLEANFILES} config.h config.mk
+
+build: libc3_window_cairo_quartz.la
+
+all:
+ ${MAKE} build
+ if ${HAVE_GCOV}; then ${MAKE} cov; fi
+ ${MAKE} debug
+ if ${HAVE_ASAN}; then ${MAKE} asan; fi
+
+asan: libc3_window_cairo_quartz_asan.la
+
+clean:
+ rm -rf ${CLEANFILES}
+
+clean_cov:
+ rm -rf ${CLEANFILES_COV}
+
+cov: libc3_window_cairo_quartz_cov.la
+
+debug: libc3_window_cairo_quartz_debug.la
+
+distclean:
+ rm -rf ${DISTCLEANFILES}
+
+test:
+
+update_sources:
+ ./update_sources
+
+.PHONY: \
+ all \
+ asan \
+ build \
+ clean \
+ cov \
+ debug \
+ distclean \
+ gen \
+ install \
+ test \
+ update_sources
+
+include config.mk
+include sources.mk
diff --git a/libc3/window/cairo/quartz/configure b/libc3/window/cairo/quartz/configure
new file mode 100755
index 0000000..4113266
--- /dev/null
+++ b/libc3/window/cairo/quartz/configure
@@ -0,0 +1,164 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+set -e
+
+export SRC_TOP="$(dirname "$PWD")"
+
+. ../../../../config.subr
+
+LIB=libc3_window_cairo_quartz.la
+LIB_ASAN=libc3_window_cairo_quartz_asan.la
+LIB_COV=libc3_window_cairo_quartz_cov.la
+LIB_DEBUG=libc3_window_cairo_quartz_debug.la
+
+echo "LIB = $LIB" >> ${CONFIG_MK}
+echo "LIB_ASAN = $LIB_ASAN" >> ${CONFIG_MK}
+echo "LIB_COV = $LIB_COV" >> ${CONFIG_MK}
+echo "LIB_DEBUG = $LIB_DEBUG" >> ${CONFIG_MK}
+
+LIBC3=../../../libc3.la
+LIBC3_ASAN=../../../libc3_asan.la
+LIBC3_COV=../../../libc3_cov.la
+LIBC3_DEBUG=../../../libc3_debug.la
+
+. ./sources.sh
+
+OBJECTS="$(c2ext .main.lo "$SOURCES")"
+echo "OBJECTS = $OBJECTS" >> ${CONFIG_MK}
+
+OBJECTS_ASAN="$(c2ext .asan.lo "$SOURCES")"
+echo "OBJECTS_ASAN = $OBJECTS_ASAN" >> ${CONFIG_MK}
+
+if $HAVE_GCOV; then
+ OBJECTS_COV="$(c2ext .cov.lo "$SOURCES")"
+ echo "OBJECTS_COV = $OBJECTS_COV" >> ${CONFIG_MK}
+fi
+
+OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
+echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
+
+# Default config
+CPPFLAGS="${CPPFLAGS:-}"
+ENV_CFLAGS="${CFLAGS:-}"
+DEFAULT_CFLAGS="-O2 -pipe -fPIC"
+LDFLAGS="${LDFLAGS:-}"
+LIBS="${LIBS:-}"
+
+# Common config for all targets
+CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
+CPPFLAGS="$CPPFLAGS -I../../../../libffi/include -I../../../.."
+config_asan
+config_gnu
+pkg_config cairo
+LIBS="$LIBS"
+
+# Asan config
+CFLAGS_ASAN="$CFLAGS -fsanitize=address -O1 -fno-omit-frame-pointer -g"
+LDFLAGS_ASAN="$LDFLAGS"
+LOCAL_LIBS_ASAN="$LIBC3_ASAN"
+LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
+
+# Coverage config
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
+LDFLAGS_COV="$LDFLAGS --coverage"
+LOCAL_LIBS_COV="$LIBC3_COV"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+
+# Debug config
+CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
+LDFLAGS_DEBUG="$LDFLAGS"
+LOCAL_LIBS_DEBUG="$LIBC3_DEBUG"
+LIBS_DEBUG="$LOCAL_LIBS_DEBUG $LIBS"
+
+# Main config
+if [ "x$ENV_CFLAGS" = "x" ]; then
+ CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
+fi
+CFLAGS="$CFLAGS -DNDEBUG"
+LOCAL_LIBS="$LIBC3"
+LIBS="$LOCAL_LIBS $LIBS"
+
+echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
+echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
+echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
+echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
+echo "LIBS = $LIBS" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_ASAN = $CFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LDFLAGS_ASAN = $LDFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LIBS_ASAN = $LIBS_ASAN" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_COV = $CFLAGS_COV" >> ${CONFIG_MK}
+echo "LDFLAGS_COV = $LDFLAGS_COV" >> ${CONFIG_MK}
+echo "LIBS_COV = $LIBS_COV" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_DEBUG = $CFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LDFLAGS_DEBUG = $LDFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LIBS_DEBUG = $LIBS_DEBUG" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB: $LIBS_LOCAL $OBJECTS" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS} ${OBJECTS} \${LIBS} -rpath ${LIBDIR} -o ${LIB}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_ASAN: $LIBS_LOCAL_ASAN $OBJECTS_ASAN" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_ASAN} ${OBJECTS_ASAN} \${LIBS_ASAN} -rpath ${LIBDIR} -o ${LIB_ASAN}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_COV: $LIBS_LOCAL_COV $OBJECTS_COV" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_COV} ${OBJECTS_COV} \${LIBS_COV} -rpath ${LIBDIR} -o ${LIB_COV}" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$LIB_DEBUG: $LIBS_LOCAL_DEBUG $OBJECTS_DEBUG" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_DEBUG} ${OBJECTS_DEBUG} \${LIBS_DEBUG} -rpath ${LIBDIR} -o ${LIB_DEBUG}" >> ${CONFIG_MK}
+
+for SRC in $SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
+done
+
+for SRC in $SWIFT_SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(swift2ext .main.lo "$SRC")"
+ swift_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " \${SWIFTC} \${SWIFT_CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+done
+
+for SRC in $OBJC_SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(objc2ext .main.lo "$SRC")"
+ objc_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=OBJCC --mode=compile \${OBJCC} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+done
+
+update_config_mk
+
+( cd demo && ./configure; )
diff --git a/libc3/window/cairo/quartz/content_view.swift b/libc3/window/cairo/quartz/content_view.swift
new file mode 100644
index 0000000..0b85d7f
--- /dev/null
+++ b/libc3/window/cairo/quartz/content_view.swift
@@ -0,0 +1,19 @@
+//
+// ContentView.swift
+// libc3_window_cairo_quartz
+//
+// Created by Thomas de Grivel on 14/11/2023.
+//
+
+import SwiftUI
+
+struct ContentView: View {
+ var body: some View {
+ CustomCairoSwiftUIView()
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
+ }
+}
+
+#Preview {
+ ContentView()
+}
diff --git a/libc3/window/cairo/quartz/custom_cairo_swiftui_view.swift b/libc3/window/cairo/quartz/custom_cairo_swiftui_view.swift
new file mode 100644
index 0000000..223ffc3
--- /dev/null
+++ b/libc3/window/cairo/quartz/custom_cairo_swiftui_view.swift
@@ -0,0 +1,19 @@
+//
+// custom_cairo_swiftui_view.swift
+// libc3_window_cairo_quartz
+//
+// Created by Thomas de Grivel on 14/11/2023.
+//
+
+import SwiftUI
+
+struct CustomCairoSwiftUIView : NSViewRepresentable {
+
+ func makeNSView(context: Context) -> CustomCairoView {
+ return CustomCairoView();
+ }
+
+ func updateNSView(_ nsView: CustomCairoView, context: Context) {
+ puts("updateNSView");
+ }
+}
diff --git a/libc3/window/cairo/quartz/custom_cairo_view.h b/libc3/window/cairo/quartz/custom_cairo_view.h
new file mode 100644
index 0000000..cb22840
--- /dev/null
+++ b/libc3/window/cairo/quartz/custom_cairo_view.h
@@ -0,0 +1,17 @@
+//
+// custom_cairo_view.h
+// libc3_window_cairo_quartz
+//
+// Created by Thomas de Grivel on 14/11/2023.
+//
+
+#ifndef custom_cairo_view_h
+#define custom_cairo_view_h
+
+#import <Cocoa/Cocoa.h>
+
+@interface CustomCairoView : NSView
+
+@end
+
+#endif /* custom_cairo_view_h */
diff --git a/libc3/window/cairo/quartz/custom_cairo_view.m b/libc3/window/cairo/quartz/custom_cairo_view.m
new file mode 100644
index 0000000..a12f957
--- /dev/null
+++ b/libc3/window/cairo/quartz/custom_cairo_view.m
@@ -0,0 +1,25 @@
+//
+// custom_cairo_view.m
+// libc3_window_cairo_quartz
+//
+// Created by Thomas de Grivel on 14/11/2023.
+//
+
+#import <Foundation/Foundation.h>
+#import "custom_cairo_view.h"
+#import <cairo/cairo-quartz.h>
+
+@implementation CustomCairoView
+
+- (void) drawRect:(NSRect)dirtyRect {
+ [super drawRect:dirtyRect];
+ cairo_surface_t *surface =
+ cairo_quartz_surface_create_for_cg_context([[NSGraphicsContext currentContext] CGContext], self.bounds.size.width, self.bounds.size.height);
+ cairo_t *cr = cairo_create(surface);
+
+ cairo_destroy(cr);
+ cairo_surface_destroy(surface);
+}
+
+@end
+
diff --git a/libc3/window/cairo/quartz/demo.xcodeproj/project.pbxproj b/libc3/window/cairo/quartz/demo.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..ac58d89
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo.xcodeproj/project.pbxproj
@@ -0,0 +1,410 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 56;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 2A5416E32B03D3E100E42968 /* c3_window_cairo_quartz_demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E02B03D3E100E42968 /* c3_window_cairo_quartz_demo.swift */; };
+ 2A5416F02B03E86C00E42968 /* c3_window_cairo_quartz_demo_bridging_header.h in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E12B03D3E100E42968 /* c3_window_cairo_quartz_demo_bridging_header.h */; };
+ 2A5416F12B03E86C00E42968 /* content_view.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E52B03D43200E42968 /* content_view.swift */; };
+ 2A5416F22B03E86C00E42968 /* custom_cairo_swiftui_view.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E62B03D43200E42968 /* custom_cairo_swiftui_view.swift */; };
+ 2A5416F32B03E86C00E42968 /* custom_cairo_view.h in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E72B03D43200E42968 /* custom_cairo_view.h */; };
+ 2A5416F42B03E86C00E42968 /* custom_cairo_view.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416E42B03D43200E42968 /* custom_cairo_view.m */; };
+ 2A5416F92B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A5416F82B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib */; };
+ 2A5416FB2B03E95B00E42968 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A5416FA2B03E95B00E42968 /* Assets.xcassets */; };
+ 2A5416FC2B03F73D00E42968 /* libc3_window_cairo_quartz.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 2A5416F82B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
+ 2A5417002B0403FB00E42968 /* Preview Content in Resources */ = {isa = PBXBuildFile; fileRef = 2A5416FE2B0403FB00E42968 /* Preview Content */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 2A5416FD2B03F73D00E42968 /* Embed Libraries */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 2A5416FC2B03F73D00E42968 /* libc3_window_cairo_quartz.0.dylib in Embed Libraries */,
+ );
+ name = "Embed Libraries";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 2A5416C32B038F6100E42968 /* c3_window_cairo_quartz_demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = c3_window_cairo_quartz_demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 2A5416E02B03D3E100E42968 /* c3_window_cairo_quartz_demo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = c3_window_cairo_quartz_demo.swift; path = demo/c3_window_cairo_quartz_demo.swift; sourceTree = "<group>"; };
+ 2A5416E12B03D3E100E42968 /* c3_window_cairo_quartz_demo_bridging_header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = c3_window_cairo_quartz_demo_bridging_header.h; path = demo/c3_window_cairo_quartz_demo_bridging_header.h; sourceTree = "<group>"; };
+ 2A5416E22B03D3E100E42968 /* c3_window_cairo_quartz_demo.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = c3_window_cairo_quartz_demo.entitlements; path = demo/c3_window_cairo_quartz_demo.entitlements; sourceTree = "<group>"; };
+ 2A5416E42B03D43200E42968 /* custom_cairo_view.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = custom_cairo_view.m; sourceTree = "<group>"; };
+ 2A5416E52B03D43200E42968 /* content_view.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = content_view.swift; sourceTree = "<group>"; };
+ 2A5416E62B03D43200E42968 /* custom_cairo_swiftui_view.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = custom_cairo_swiftui_view.swift; sourceTree = "<group>"; };
+ 2A5416E72B03D43200E42968 /* custom_cairo_view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = custom_cairo_view.h; sourceTree = "<group>"; };
+ 2A5416F82B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libc3_window_cairo_quartz.0.dylib; path = .libs/libc3_window_cairo_quartz.0.dylib; sourceTree = "<group>"; };
+ 2A5416FA2B03E95B00E42968 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = demo/Assets.xcassets; sourceTree = "<group>"; };
+ 2A5416FE2B0403FB00E42968 /* Preview Content */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "Preview Content"; path = "demo/Preview Content"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 2A5416C02B038F6100E42968 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2A5416F92B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 2A5416BA2B038F6100E42968 = {
+ isa = PBXGroup;
+ children = (
+ 2A5416FA2B03E95B00E42968 /* Assets.xcassets */,
+ 2A5416FE2B0403FB00E42968 /* Preview Content */,
+ 2A5416E12B03D3E100E42968 /* c3_window_cairo_quartz_demo_bridging_header.h */,
+ 2A5416E52B03D43200E42968 /* content_view.swift */,
+ 2A5416E62B03D43200E42968 /* custom_cairo_swiftui_view.swift */,
+ 2A5416E72B03D43200E42968 /* custom_cairo_view.h */,
+ 2A5416E42B03D43200E42968 /* custom_cairo_view.m */,
+ 2A5416E22B03D3E100E42968 /* c3_window_cairo_quartz_demo.entitlements */,
+ 2A5416E02B03D3E100E42968 /* c3_window_cairo_quartz_demo.swift */,
+ 2A5416C42B038F6100E42968 /* Products */,
+ 2A5416DD2B03B3C900E42968 /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 2A5416C42B038F6100E42968 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 2A5416C32B038F6100E42968 /* c3_window_cairo_quartz_demo.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2A5416DD2B03B3C900E42968 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2A5416F82B03E88E00E42968 /* libc3_window_cairo_quartz.0.dylib */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 2A5416C22B038F6100E42968 /* c3_window_cairo_quartz_demo */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 2A5416D22B038F6200E42968 /* Build configuration list for PBXNativeTarget "c3_window_cairo_quartz_demo" */;
+ buildPhases = (
+ 2A5416BF2B038F6100E42968 /* Sources */,
+ 2A5416C02B038F6100E42968 /* Frameworks */,
+ 2A5416C12B038F6100E42968 /* Resources */,
+ 2A5416FD2B03F73D00E42968 /* Embed Libraries */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = c3_window_cairo_quartz_demo;
+ productName = libc3_window_cairo_quartz;
+ productReference = 2A5416C32B038F6100E42968 /* c3_window_cairo_quartz_demo.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 2A5416BB2B038F6100E42968 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = 1;
+ LastSwiftUpdateCheck = 1500;
+ LastUpgradeCheck = 1500;
+ TargetAttributes = {
+ 2A5416C22B038F6100E42968 = {
+ CreatedOnToolsVersion = 15.0.1;
+ LastSwiftMigration = 1500;
+ };
+ };
+ };
+ buildConfigurationList = 2A5416BE2B038F6100E42968 /* Build configuration list for PBXProject "demo" */;
+ compatibilityVersion = "Xcode 14.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 2A5416BA2B038F6100E42968;
+ productRefGroup = 2A5416C42B038F6100E42968 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 2A5416C22B038F6100E42968 /* c3_window_cairo_quartz_demo */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 2A5416C12B038F6100E42968 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2A5417002B0403FB00E42968 /* Preview Content in Resources */,
+ 2A5416FB2B03E95B00E42968 /* Assets.xcassets in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 2A5416BF2B038F6100E42968 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2A5416F02B03E86C00E42968 /* c3_window_cairo_quartz_demo_bridging_header.h in Sources */,
+ 2A5416F12B03E86C00E42968 /* content_view.swift in Sources */,
+ 2A5416F22B03E86C00E42968 /* custom_cairo_swiftui_view.swift in Sources */,
+ 2A5416F32B03E86C00E42968 /* custom_cairo_view.h in Sources */,
+ 2A5416F42B03E86C00E42968 /* custom_cairo_view.m in Sources */,
+ 2A5416E32B03D3E100E42968 /* c3_window_cairo_quartz_demo.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 2A5416D02B038F6200E42968 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ };
+ name = Debug;
+ };
+ 2A5416D12B038F6200E42968 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ };
+ name = Release;
+ };
+ 2A5416D32B038F6200E42968 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = demo/c3_window_cairo_quartz_demo.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_ASSET_PATHS = demo;
+ DEVELOPMENT_TEAM = W4AD54MQ5Q;
+ ENABLE_PREVIEWS = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = /opt/homebrew/include;
+ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
+ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
+ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ /opt/homebrew/lib,
+ /opt/homebrew/Cellar/cairo/1.18.0/lib,
+ "$(PROJECT_DIR)/.libs",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 14.0;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = "kmx.io.c3-window-cairo-quartz-demo";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = auto;
+ STRIP_INSTALLED_PRODUCT = NO;
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_OBJC_BRIDGING_HEADER = demo/c3_window_cairo_quartz_demo_bridging_header.h;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 2A5416D42B038F6200E42968 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = demo/c3_window_cairo_quartz_demo.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_ASSET_PATHS = demo;
+ DEVELOPMENT_TEAM = W4AD54MQ5Q;
+ ENABLE_PREVIEWS = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = /opt/homebrew/include;
+ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
+ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
+ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
+ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
+ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+ IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ /opt/homebrew/lib,
+ /opt/homebrew/Cellar/cairo/1.18.0/lib,
+ "$(PROJECT_DIR)/.libs",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 14.0;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = "kmx.io.c3-window-cairo-quartz-demo";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = auto;
+ STRIP_INSTALLED_PRODUCT = NO;
+ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_OBJC_BRIDGING_HEADER = demo/c3_window_cairo_quartz_demo_bridging_header.h;
+ SWIFT_VERSION = 5.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 2A5416BE2B038F6100E42968 /* Build configuration list for PBXProject "demo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 2A5416D02B038F6200E42968 /* Debug */,
+ 2A5416D12B038F6200E42968 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 2A5416D22B038F6200E42968 /* Build configuration list for PBXNativeTarget "c3_window_cairo_quartz_demo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 2A5416D32B038F6200E42968 /* Debug */,
+ 2A5416D42B038F6200E42968 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 2A5416BB2B038F6100E42968 /* Project object */;
+}
diff --git a/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:">
+ </FileRef>
+</Workspace>
diff --git a/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
diff --git a/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..d832dc3
Binary files /dev/null and b/libc3/window/cairo/quartz/demo.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/libc3/window/cairo/quartz/demo.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist b/libc3/window/cairo/quartz/demo.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..df532c7
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>libc3_window_cairo_quartz.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/libc3/window/cairo/quartz/demo/Assets.xcassets/AccentColor.colorset/Contents.json b/libc3/window/cairo/quartz/demo/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 0000000..eb87897
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,11 @@
+{
+ "colors" : [
+ {
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/libc3/window/cairo/quartz/demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/libc3/window/cairo/quartz/demo/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..532cd72
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,63 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "platform" : "ios",
+ "size" : "1024x1024"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/libc3/window/cairo/quartz/demo/Assets.xcassets/Contents.json b/libc3/window/cairo/quartz/demo/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/libc3/window/cairo/quartz/demo/Makefile b/libc3/window/cairo/quartz/demo/Makefile
new file mode 100644
index 0000000..a139248
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/Makefile
@@ -0,0 +1,69 @@
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+include config.mk
+include sources.mk
+
+CLEANFILES = *.a ${PROG} ${PROG_ASAN} ${PROG_COV} ${PROG_DEBUG} *.css \
+ *.gcno *.html *.o .libs *.lo
+
+CLEANFILES_COV = *.css *.gcda *.html .libs/*.gcda
+CLEANFILES += ${CLEANFILES_COV}
+
+DISTCLEANFILES = ${CLEANFILES} config.mk
+
+build: ${PROG}
+
+all:
+ ${MAKE} build
+ if ${HAVE_GCOV}; then ${MAKE} cov; fi
+ ${MAKE} debug
+ if ${HAVE_ASAN}; then ${MAKE} asan; fi
+
+asan: ${PROG_ASAN}
+
+clean:
+ rm -rf ${CLEANFILES}
+
+clean_cov:
+ rm -rf ${CLEANFILES_COV}
+
+cov: ${PROG_COV}
+
+debug: ${PROG_DEBUG}
+
+demo: ${PROG}
+ time ./${PROG}
+
+distclean:
+ rm -rf ${DISTCLEANFILES}
+
+gcovr:
+ gcovr --gcov-executable ${GCOV} --html-details ${PROG}.html
+
+gdb_demo: debug
+ if [ -f ${PROG_DEBUG}.core ]; then gdb .libs/${PROG_DEBUG} ${PROG_DEBUG}.core; else gdb .libs/${PROG_DEBUG}; fi
+
+install:
+ install -m 755 -d ${prefix}/bin
+ install -m 755 ${PROG} ${prefix}/bin/${PROG}
+
+.PHONY: \
+ all \
+ asan \
+ clean \
+ clean_cov \
+ cov \
+ debug \
+ demo \
+ distclean \
+ gdb_demo
diff --git a/libc3/window/cairo/quartz/demo/Preview Content/Preview Assets.xcassets/Contents.json b/libc3/window/cairo/quartz/demo/Preview Content/Preview Assets.xcassets/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/Preview Content/Preview Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.entitlements b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.entitlements
new file mode 100644
index 0000000..f2ef3ae
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.entitlements
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-only</key>
+ <true/>
+</dict>
+</plist>
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.swift b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.swift
new file mode 100644
index 0000000..64bb76c
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.swift
@@ -0,0 +1,17 @@
+//
+// libc3_window_cairo_quartzApp.swift
+// libc3_window_cairo_quartz
+//
+// Created by Thomas de Grivel on 14/11/2023.
+//
+
+import SwiftUI
+
+@main
+struct appApp: App {
+ var body: some Scene {
+ WindowGroup {
+ ContentView()
+ }
+ }
+}
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h
new file mode 100644
index 0000000..d268bbc
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h
@@ -0,0 +1,5 @@
+//
+// Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
+#import "../custom_cairo_view.h"
diff --git a/libc3/window/cairo/quartz/demo/configure b/libc3/window/cairo/quartz/demo/configure
new file mode 100755
index 0000000..d006069
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/configure
@@ -0,0 +1,161 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+set -e
+
+export SRC_TOP="$(dirname "$PWD")"
+
+. ../../../../../config.subr
+
+PROG=c3_window_cairo_quartz_demo
+PROG_ASAN=c3_window_cairo_quartz_demo_asan
+PROG_COV=c3_window_cairo_quartz_demo_cov
+PROG_DEBUG=c3_window_cairo_quartz_demo_debug
+
+echo "PROG = $PROG" >> ${CONFIG_MK}
+echo "PROG_ASAN = $PROG_ASAN" >> ${CONFIG_MK}
+echo "PROG_COV = $PROG_COV" >> ${CONFIG_MK}
+echo "PROG_DEBUG = $PROG_DEBUG" >> ${CONFIG_MK}
+
+. ./sources.sh
+
+OBJECTS="$(c2ext .main.lo "$SOURCES")"
+echo "OBJECTS = $OBJECTS" >> ${CONFIG_MK}
+
+OBJECTS_ASAN="$(c2ext .asan.lo "$SOURCES")"
+echo "OBJECTS_ASAN = $OBJECTS_ASAN" >> ${CONFIG_MK}
+
+if $HAVE_GCOV; then
+ OBJECTS_COV="$(c2ext .cov.lo "$SOURCES")"
+ echo "OBJECTS_COV = $OBJECTS_COV" >> ${CONFIG_MK}
+fi
+
+OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
+echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
+
+# Default config
+CPPFLAGS="${CPPFLAGS:-}"
+ENV_CFLAGS="${CFLAGS:-}"
+DEFAULT_CFLAGS="-O2 -pipe -fPIC"
+LDFLAGS="${LDFLAGS:-}"
+LIBS="${LIBS:-}"
+
+# Common config for all targets
+CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
+CPPFLAGS="$CPPFLAGS -I../../../../../libffi/include -I../../../../.."
+config_asan
+config_gnu
+LIBS="$LIBS"
+
+# Asan config
+CFLAGS_ASAN="$CFLAGS -fsanitize=address -O1 -fno-omit-frame-pointer -g"
+LDFLAGS_ASAN="$LDFLAGS"
+LOCAL_LIBS_ASAN="../libc3_window_cairo_quartz_asan.la"
+LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
+
+# Coverage config
+CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
+LDFLAGS_COV="$LDFLAGS --coverage"
+LOCAL_LIBS_COV="../libc3_window_cairo_quartz_cov.la"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS"
+
+# Debug config
+CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
+LDFLAGS_DEBUG="$LDFLAGS"
+LOCAL_LIBS_DEBUG="../libc3_window_cairo_quartz_debug.la"
+LIBS_DEBUG="$LOCAL_LIBS_DEBUG $LIBS"
+
+# Main config
+if [ "x$ENV_CFLAGS" = "x" ]; then
+ CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
+fi
+CFLAGS="$CFLAGS -DNDEBUG"
+LIBC3=../libc3/libc3.la
+LOCAL_LIBS="../libc3_window_cairo_quartz.la"
+LIBS="$LOCAL_LIBS $LIBS"
+
+echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
+echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
+echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
+echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
+echo "LIBS = $LIBS" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_ASAN = $CFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LDFLAGS_ASAN = $LDFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LIBS_ASAN = $LIBS_ASAN" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_COV = $CFLAGS_COV" >> ${CONFIG_MK}
+echo "LDFLAGS_COV = $LDFLAGS_COV" >> ${CONFIG_MK}
+echo "LIBS_COV = $LIBS_COV" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_DEBUG = $CFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LDFLAGS_DEBUG = $LDFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LIBS_DEBUG = $LIBS_DEBUG" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$PROG: $LOCAL_LIBS $OBJECTS" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS} \${LDFLAGS} ${OBJECTS} ${LIBS} -o $PROG" >> ${CONFIG_MK}
+
+echo >> ${CONFIG_MK}
+echo "$PROG_ASAN: $LOCAL_LIBS_ASAN $OBJECTS_ASAN" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_ASAN} \${LDFLAGS_ASAN} ${OBJECTS_ASAN} ${LIBS_ASAN} -o $PROG_ASAN" >> ${CONFIG_MK}
+
+if $HAVE_GCOV; then
+ echo >> ${CONFIG_MK}
+ echo "$PROG_COV: $LOCAL_LIBS_COV $OBJECTS_COV" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_COV} \${LDFLAGS_COV} ${OBJECTS_COV} ${LIBS_COV} -o $PROG_COV" >> ${CONFIG_MK}
+fi
+
+echo >> ${CONFIG_MK}
+echo "$PROG_DEBUG: $LOCAL_LIBS_DEBUG $OBJECTS_DEBUG" >> ${CONFIG_MK}
+echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_DEBUG} \${LDFLAGS_DEBUG} ${OBJECTS_DEBUG} ${LIBS_DEBUG} -o $PROG_DEBUG" >> ${CONFIG_MK}
+
+for SRC in $SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+
+ echo >> ${CONFIG_MK}
+ SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
+
+ if $HAVE_GCOV; then
+ echo >> ${CONFIG_MK}
+ SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
+ fi
+
+ echo >> ${CONFIG_MK}
+ SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
+done
+
+for SRC in $SWIFT_SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(swift2ext .main.lo "$SRC")"
+ swift_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " \${SWIFTC} \${SWIFT_CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+done
+
+for SRC in $OBJC_SOURCES; do
+ echo >> ${CONFIG_MK}
+ SRC_LO="$(objc2ext .main.lo "$SRC")"
+ objc_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ echo " ${LIBTOOL} --tag=OBJCC --mode=compile \${OBJCC} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
+done
+
+update_config_mk
diff --git a/libc3/window/cairo/quartz/demo/sources.mk b/libc3/window/cairo/quartz/demo/sources.mk
new file mode 100644
index 0000000..cd17a02
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/sources.mk
@@ -0,0 +1,13 @@
+# sources.mk generated by update_sources
+HEADERS = \
+ c3_window_cairo_quartz_demo_bridging_header.h \
+
+SOURCES = \
+ \
+
+OBJC_SOURCES = \
+ \
+
+SWIFT_SOURCES = \
+ c3_window_cairo_quartz_demo.swift \
+
diff --git a/libc3/window/cairo/quartz/demo/sources.sh b/libc3/window/cairo/quartz/demo/sources.sh
new file mode 100644
index 0000000..55fa708
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/sources.sh
@@ -0,0 +1,5 @@
+# sources.sh generated by update_sources
+HEADERS='c3_window_cairo_quartz_demo_bridging_header.h '
+SOURCES=' '
+OBJC_SOURCES=' '
+SWIFT_SOURCES='c3_window_cairo_quartz_demo.swift '
diff --git a/libc3/window/cairo/quartz/demo/update_sources b/libc3/window/cairo/quartz/demo/update_sources
new file mode 100755
index 0000000..891cf87
--- /dev/null
+++ b/libc3/window/cairo/quartz/demo/update_sources
@@ -0,0 +1,32 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+. ../../../../../config.subr
+
+echo "# sources.mk generated by update_sources" > ${SOURCES_MK}
+echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
+
+HEADERS="$(ls *.h | sort)"
+sources HEADERS "$HEADERS"
+
+SOURCES="$(ls *.c | sort)"
+sources SOURCES "$SOURCES"
+
+OBJC_SOURCES="$(ls *.m | sort)"
+sources OBJC_SOURCES "$OBJC_SOURCES"
+
+SWIFT_SOURCES="$(ls *.swift | sort)"
+sources SWIFT_SOURCES "$SWIFT_SOURCES"
+
+update_sources_mk
+update_sources_sh
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz.0.dylib b/libc3/window/cairo/quartz/libc3_window_cairo_quartz.0.dylib
new file mode 120000
index 0000000..edbee5b
--- /dev/null
+++ b/libc3/window/cairo/quartz/libc3_window_cairo_quartz.0.dylib
@@ -0,0 +1 @@
+.libs/libc3_window_cairo_quartz.0.dylib
\ No newline at end of file
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.pbxproj b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.pbxproj
deleted file mode 100644
index 529e95e..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,400 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 56;
- objects = {
-
-/* Begin PBXBuildFile section */
- 2A5416C72B038F6100E42968 /* libc3_window_cairo_quartzApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416C62B038F6100E42968 /* libc3_window_cairo_quartzApp.swift */; };
- 2A5416CB2B038F6200E42968 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A5416CA2B038F6200E42968 /* Assets.xcassets */; };
- 2A5416CF2B038F6200E42968 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A5416CE2B038F6200E42968 /* Preview Assets.xcassets */; };
- 2A5416D72B03900E00E42968 /* custom_cairo_view.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416D62B03900E00E42968 /* custom_cairo_view.m */; };
- 2A5416DA2B039BAE00E42968 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416D92B039BAE00E42968 /* ContentView.swift */; };
- 2A5416DC2B039C0000E42968 /* custom_cairo_swiftui_view.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5416DB2B039C0000E42968 /* custom_cairo_swiftui_view.swift */; };
- 2A5416DF2B03B3C900E42968 /* libcairo.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A5416DE2B03B3C900E42968 /* libcairo.2.dylib */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 2A5416C32B038F6100E42968 /* libc3_window_cairo_quartz.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = libc3_window_cairo_quartz.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 2A5416C62B038F6100E42968 /* libc3_window_cairo_quartzApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = libc3_window_cairo_quartzApp.swift; sourceTree = "<group>"; };
- 2A5416CA2B038F6200E42968 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
- 2A5416CC2B038F6200E42968 /* libc3_window_cairo_quartz.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = libc3_window_cairo_quartz.entitlements; sourceTree = "<group>"; };
- 2A5416CE2B038F6200E42968 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
- 2A5416D52B03900E00E42968 /* libc3_window_cairo_quartz-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "libc3_window_cairo_quartz-Bridging-Header.h"; sourceTree = "<group>"; };
- 2A5416D62B03900E00E42968 /* custom_cairo_view.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = custom_cairo_view.m; sourceTree = "<group>"; };
- 2A5416D82B03907E00E42968 /* custom_cairo_view.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = custom_cairo_view.h; sourceTree = "<group>"; };
- 2A5416D92B039BAE00E42968 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
- 2A5416DB2B039C0000E42968 /* custom_cairo_swiftui_view.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = custom_cairo_swiftui_view.swift; sourceTree = "<group>"; };
- 2A5416DE2B03B3C900E42968 /* libcairo.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcairo.2.dylib; path = ../../../../../../../../../../../opt/homebrew/Cellar/cairo/1.18.0/lib/libcairo.2.dylib; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 2A5416C02B038F6100E42968 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 2A5416DF2B03B3C900E42968 /* libcairo.2.dylib in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 2A5416BA2B038F6100E42968 = {
- isa = PBXGroup;
- children = (
- 2A5416C52B038F6100E42968 /* libc3_window_cairo_quartz */,
- 2A5416C42B038F6100E42968 /* Products */,
- 2A5416DD2B03B3C900E42968 /* Frameworks */,
- );
- sourceTree = "<group>";
- };
- 2A5416C42B038F6100E42968 /* Products */ = {
- isa = PBXGroup;
- children = (
- 2A5416C32B038F6100E42968 /* libc3_window_cairo_quartz.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 2A5416C52B038F6100E42968 /* libc3_window_cairo_quartz */ = {
- isa = PBXGroup;
- children = (
- 2A5416C62B038F6100E42968 /* libc3_window_cairo_quartzApp.swift */,
- 2A5416D92B039BAE00E42968 /* ContentView.swift */,
- 2A5416DB2B039C0000E42968 /* custom_cairo_swiftui_view.swift */,
- 2A5416CA2B038F6200E42968 /* Assets.xcassets */,
- 2A5416CC2B038F6200E42968 /* libc3_window_cairo_quartz.entitlements */,
- 2A5416CD2B038F6200E42968 /* Preview Content */,
- 2A5416D62B03900E00E42968 /* custom_cairo_view.m */,
- 2A5416D82B03907E00E42968 /* custom_cairo_view.h */,
- 2A5416D52B03900E00E42968 /* libc3_window_cairo_quartz-Bridging-Header.h */,
- );
- path = libc3_window_cairo_quartz;
- sourceTree = "<group>";
- };
- 2A5416CD2B038F6200E42968 /* Preview Content */ = {
- isa = PBXGroup;
- children = (
- 2A5416CE2B038F6200E42968 /* Preview Assets.xcassets */,
- );
- path = "Preview Content";
- sourceTree = "<group>";
- };
- 2A5416DD2B03B3C900E42968 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 2A5416DE2B03B3C900E42968 /* libcairo.2.dylib */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 2A5416C22B038F6100E42968 /* libc3_window_cairo_quartz */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 2A5416D22B038F6200E42968 /* Build configuration list for PBXNativeTarget "libc3_window_cairo_quartz" */;
- buildPhases = (
- 2A5416BF2B038F6100E42968 /* Sources */,
- 2A5416C02B038F6100E42968 /* Frameworks */,
- 2A5416C12B038F6100E42968 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = libc3_window_cairo_quartz;
- productName = libc3_window_cairo_quartz;
- productReference = 2A5416C32B038F6100E42968 /* libc3_window_cairo_quartz.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 2A5416BB2B038F6100E42968 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = 1;
- LastSwiftUpdateCheck = 1500;
- LastUpgradeCheck = 1500;
- TargetAttributes = {
- 2A5416C22B038F6100E42968 = {
- CreatedOnToolsVersion = 15.0.1;
- LastSwiftMigration = 1500;
- };
- };
- };
- buildConfigurationList = 2A5416BE2B038F6100E42968 /* Build configuration list for PBXProject "libc3_window_cairo_quartz" */;
- compatibilityVersion = "Xcode 14.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 2A5416BA2B038F6100E42968;
- productRefGroup = 2A5416C42B038F6100E42968 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 2A5416C22B038F6100E42968 /* libc3_window_cairo_quartz */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 2A5416C12B038F6100E42968 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 2A5416CF2B038F6200E42968 /* Preview Assets.xcassets in Resources */,
- 2A5416CB2B038F6200E42968 /* Assets.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 2A5416BF2B038F6100E42968 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 2A5416D72B03900E00E42968 /* custom_cairo_view.m in Sources */,
- 2A5416C72B038F6100E42968 /* libc3_window_cairo_quartzApp.swift in Sources */,
- 2A5416DC2B039C0000E42968 /* custom_cairo_swiftui_view.swift in Sources */,
- 2A5416DA2B039BAE00E42968 /* ContentView.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 2A5416D02B038F6200E42968 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu17;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- ONLY_ACTIVE_ARCH = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 2A5416D12B038F6200E42968 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu17;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
- MTL_ENABLE_DEBUG_INFO = NO;
- MTL_FAST_MATH = YES;
- SWIFT_COMPILATION_MODE = wholemodule;
- };
- name = Release;
- };
- 2A5416D32B038F6200E42968 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = libc3_window_cairo_quartz/libc3_window_cairo_quartz.entitlements;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_ASSET_PATHS = "\"libc3_window_cairo_quartz/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- GENERATE_INFOPLIST_FILE = YES;
- HEADER_SEARCH_PATHS = /opt/homebrew/include;
- "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
- "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 17.0;
- LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
- "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
- LIBRARY_SEARCH_PATHS = (
- /opt/homebrew/lib,
- /opt/homebrew/Cellar/cairo/1.18.0/lib,
- );
- MACOSX_DEPLOYMENT_TARGET = 14.0;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = "kmx.io.libc3-window-cairo-quartz";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = auto;
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
- SWIFT_EMIT_LOC_STRINGS = YES;
- SWIFT_OBJC_BRIDGING_HEADER = "libc3_window_cairo_quartz/libc3_window_cairo_quartz-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 2A5416D42B038F6200E42968 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = libc3_window_cairo_quartz/libc3_window_cairo_quartz.entitlements;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_ASSET_PATHS = "\"libc3_window_cairo_quartz/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- GENERATE_INFOPLIST_FILE = YES;
- HEADER_SEARCH_PATHS = /opt/homebrew/include;
- "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
- "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
- "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
- "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 17.0;
- LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
- "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
- LIBRARY_SEARCH_PATHS = (
- /opt/homebrew/lib,
- /opt/homebrew/Cellar/cairo/1.18.0/lib,
- );
- MACOSX_DEPLOYMENT_TARGET = 14.0;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = "kmx.io.libc3-window-cairo-quartz";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = auto;
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
- SWIFT_EMIT_LOC_STRINGS = YES;
- SWIFT_OBJC_BRIDGING_HEADER = "libc3_window_cairo_quartz/libc3_window_cairo_quartz-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 2A5416BE2B038F6100E42968 /* Build configuration list for PBXProject "libc3_window_cairo_quartz" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 2A5416D02B038F6200E42968 /* Debug */,
- 2A5416D12B038F6200E42968 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 2A5416D22B038F6200E42968 /* Build configuration list for PBXNativeTarget "libc3_window_cairo_quartz" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 2A5416D32B038F6200E42968 /* Debug */,
- 2A5416D42B038F6200E42968 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 2A5416BB2B038F6100E42968 /* Project object */;
-}
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 919434a..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "self:">
- </FileRef>
-</Workspace>
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IDEDidComputeMac32BitWarning</key>
- <true/>
-</dict>
-</plist>
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 8f05f69..0000000
Binary files a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/project.xcworkspace/xcuserdata/thodg.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index df532c7..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.xcodeproj/xcuserdata/thodg.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>SchemeUserState</key>
- <dict>
- <key>libc3_window_cairo_quartz.xcscheme_^#shared#^_</key>
- <dict>
- <key>orderHint</key>
- <integer>0</integer>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/ContentView.swift b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/ContentView.swift
deleted file mode 100644
index 0b85d7f..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/ContentView.swift
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// ContentView.swift
-// libc3_window_cairo_quartz
-//
-// Created by Thomas de Grivel on 14/11/2023.
-//
-
-import SwiftUI
-
-struct ContentView: View {
- var body: some View {
- CustomCairoSwiftUIView()
- .frame(maxWidth: .infinity, maxHeight: .infinity)
- }
-}
-
-#Preview {
- ContentView()
-}
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/Makefile b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/Makefile
deleted file mode 100644
index d38f80e..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-# Compiler settings
-CC = clang
-SWIFT = swiftc
-CFLAGS = -I/opt/homebrew/include
-LDFLAGS = -L/opt/homebrew/lib -lcairo
-SWIFTCFLAGS = -import-objc-header "libc3_window_cairo_quartz-Bridging-Header.h"
-
-# Source files
-OBJC_SOURCES = custom_cairo_view.m
-SWIFT_SOURCES = main.swift ContentView.swift
-
-# Object files
-OBJC_OBJECTS = $(OBJC_SOURCES:.m=.o)
-SWIFT_OBJECTS = $(SWIFT_SOURCES:.swift=.o)
-
-# App binary
-APP_BINARY = c3_window_cairo_quartz_demo
-
-all: $(APP_BINARY)
-
-$(APP_BINARY): $(OBJC_OBJECTS) $(SWIFT_OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $^
-
-%.o: %.m
- $(CC) $(CFLAGS) -c $< -o $@
-
-%.o: %.swift
- $(SWIFT) $(SWIFTCFLAGS) -c $< -o $@
-
-clean:
- rm -f $(APP_BINARY) $(OBJC_OBJECTS) $(SWIFT_OBJECTS)
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_swiftui_view.swift b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_swiftui_view.swift
deleted file mode 100644
index 223ffc3..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_swiftui_view.swift
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// custom_cairo_swiftui_view.swift
-// libc3_window_cairo_quartz
-//
-// Created by Thomas de Grivel on 14/11/2023.
-//
-
-import SwiftUI
-
-struct CustomCairoSwiftUIView : NSViewRepresentable {
-
- func makeNSView(context: Context) -> CustomCairoView {
- return CustomCairoView();
- }
-
- func updateNSView(_ nsView: CustomCairoView, context: Context) {
- puts("updateNSView");
- }
-}
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.h b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.h
deleted file mode 100644
index cb22840..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// custom_cairo_view.h
-// libc3_window_cairo_quartz
-//
-// Created by Thomas de Grivel on 14/11/2023.
-//
-
-#ifndef custom_cairo_view_h
-#define custom_cairo_view_h
-
-#import <Cocoa/Cocoa.h>
-
-@interface CustomCairoView : NSView
-
-@end
-
-#endif /* custom_cairo_view_h */
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.m b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.m
deleted file mode 100644
index a12f957..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/custom_cairo_view.m
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// custom_cairo_view.m
-// libc3_window_cairo_quartz
-//
-// Created by Thomas de Grivel on 14/11/2023.
-//
-
-#import <Foundation/Foundation.h>
-#import "custom_cairo_view.h"
-#import <cairo/cairo-quartz.h>
-
-@implementation CustomCairoView
-
-- (void) drawRect:(NSRect)dirtyRect {
- [super drawRect:dirtyRect];
- cairo_surface_t *surface =
- cairo_quartz_surface_create_for_cg_context([[NSGraphicsContext currentContext] CGContext], self.bounds.size.width, self.bounds.size.height);
- cairo_t *cr = cairo_create(surface);
-
- cairo_destroy(cr);
- cairo_surface_destroy(surface);
-}
-
-@end
-
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz-Bridging-Header.h b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz-Bridging-Header.h
deleted file mode 100644
index 60ee9bd..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz-Bridging-Header.h
+++ /dev/null
@@ -1,5 +0,0 @@
-//
-// Use this file to import your target's public headers that you would like to expose to Swift.
-//
-
-#import "custom_cairo_view.h"
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.entitlements b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.entitlements
deleted file mode 100644
index f2ef3ae..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz.entitlements
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>com.apple.security.app-sandbox</key>
- <true/>
- <key>com.apple.security.files.user-selected.read-only</key>
- <true/>
-</dict>
-</plist>
diff --git a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartzApp.swift b/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartzApp.swift
deleted file mode 100644
index 08491c8..0000000
--- a/libc3/window/cairo/quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartz/libc3_window_cairo_quartzApp.swift
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// libc3_window_cairo_quartzApp.swift
-// libc3_window_cairo_quartz
-//
-// Created by Thomas de Grivel on 14/11/2023.
-//
-
-import SwiftUI
-
-@main
-struct libc3_window_cairo_quartzApp: App {
- var body: some Scene {
- WindowGroup {
- ContentView()
- }
- }
-}
diff --git a/libc3/window/cairo/quartz/sources.mk b/libc3/window/cairo/quartz/sources.mk
new file mode 100644
index 0000000..5b8a674
--- /dev/null
+++ b/libc3/window/cairo/quartz/sources.mk
@@ -0,0 +1,14 @@
+# sources.mk generated by update_sources
+HEADERS = \
+ custom_cairo_view.h \
+
+SOURCES = \
+ \
+
+OBJC_SOURCES = \
+ custom_cairo_view.m \
+
+SWIFT_SOURCES = \
+ content_view.swift \
+ custom_cairo_swiftui_view.swift \
+
diff --git a/libc3/window/cairo/quartz/sources.sh b/libc3/window/cairo/quartz/sources.sh
new file mode 100644
index 0000000..99fedd2
--- /dev/null
+++ b/libc3/window/cairo/quartz/sources.sh
@@ -0,0 +1,5 @@
+# sources.sh generated by update_sources
+HEADERS='custom_cairo_view.h '
+SOURCES=' '
+OBJC_SOURCES='custom_cairo_view.m '
+SWIFT_SOURCES='content_view.swift custom_cairo_swiftui_view.swift '
diff --git a/libc3/window/cairo/quartz/update_sources b/libc3/window/cairo/quartz/update_sources
new file mode 100755
index 0000000..311e512
--- /dev/null
+++ b/libc3/window/cairo/quartz/update_sources
@@ -0,0 +1,34 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+. ../../../../config.subr
+
+echo "# sources.mk generated by update_sources" > ${SOURCES_MK}
+echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
+
+HEADERS="$(ls *.h | sort)"
+sources HEADERS "$HEADERS"
+
+SOURCES="$(ls *.c | sort)"
+sources SOURCES "$SOURCES"
+
+OBJC_SOURCES="$(ls *.m | sort)"
+sources OBJC_SOURCES "$OBJC_SOURCES"
+
+SWIFT_SOURCES="$(ls *.swift | sort)"
+sources SWIFT_SOURCES "$SWIFT_SOURCES"
+
+update_sources_mk
+update_sources_sh
+
+( cd demo && ./update_sources; )
diff --git a/libc3/window/cairo/sources.mk b/libc3/window/cairo/sources.mk
new file mode 100644
index 0000000..de2d094
--- /dev/null
+++ b/libc3/window/cairo/sources.mk
@@ -0,0 +1,10 @@
+# sources.mk generated by update_sources
+HEADERS = \
+ c3_window_cairo_demo.h \
+ types.h \
+ window_cairo.h \
+
+SOURCES = \
+ c3_window_cairo_demo.c \
+ window_cairo.c \
+
diff --git a/libc3/window/cairo/sources.sh b/libc3/window/cairo/sources.sh
new file mode 100644
index 0000000..1f2c35a
--- /dev/null
+++ b/libc3/window/cairo/sources.sh
@@ -0,0 +1,3 @@
+# sources.sh generated by update_sources
+HEADERS='c3_window_cairo_demo.h types.h window_cairo.h '
+SOURCES='c3_window_cairo_demo.c window_cairo.c '
diff --git a/libc3/window/cairo/update_sources b/libc3/window/cairo/update_sources
new file mode 100755
index 0000000..66265f9
--- /dev/null
+++ b/libc3/window/cairo/update_sources
@@ -0,0 +1,29 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+. ../../../config.subr
+
+echo "# sources.mk generated by update_sources" > ${SOURCES_MK}
+echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
+
+HEADERS="$(ls *.h | sort)"
+sources HEADERS "$HEADERS"
+
+SOURCES="$(ls *.c | sort)"
+sources SOURCES "$SOURCES"
+
+update_sources_mk
+update_sources_sh
+
+( cd quartz && ./update_sources; )
+( cd xcb && ./update_sources; )
diff --git a/libc3/window/cairo/xcb/configure b/libc3/window/cairo/xcb/configure
index 7145d99..5acdbeb 100755
--- a/libc3/window/cairo/xcb/configure
+++ b/libc3/window/cairo/xcb/configure
@@ -22,6 +22,16 @@ LIB_ASAN=libc3_window_cairo_xcb_asan.la
LIB_COV=libc3_window_cairo_xcb_cov.la
LIB_DEBUG=libc3_window_cairo_xcb_debug.la
+echo "LIB = $LIB" >> ${CONFIG_MK}
+echo "LIB_ASAN = $LIB_ASAN" >> ${CONFIG_MK}
+echo "LIB_COV = $LIB_COV" >> ${CONFIG_MK}
+echo "LIB_DEBUG = $LIB_DEBUG" >> ${CONFIG_MK}
+
+LIBC3=../../../libc3.la
+LIBC3_ASAN=../../../libc3_asan.la
+LIBC3_COV=../../../libc3_cov.la
+LIBC3_DEBUG=../../../libc3_debug.la
+
. ./sources.sh
OBJECTS="$(c2ext .main.lo "$SOURCES")"
@@ -51,24 +61,28 @@ LIBS="$LIBS"
# Address Sanitizer config
CFLAGS_ASAN="$CFLAGS -O1 -fsanitize=address -fno-omit-frame-pointer -g"
LDFLAGS_ASAN="$LDFLAGS"
-LIBS_ASAN="../../../libc3_asan.la $LIBS"
+LIBS_LOCAL_ASAN="$LIBC3_ASAN"
+LIBS_ASAN="$LIBS_LOCAL_ASAN $LIBS"
# Coverage config
CFLAGS_COV="$CFLAGS -ftest-coverage -fprofile-arcs -fprofile-generate"
LDFLAGS_COV="$LDFLAGS --coverage"
-LIBS_COV="../../../libc3_cov.la $LIBS"
+LIBS_LOCAL_COV="$LIBC3_COV"
+LIBS_COV="$LIBS_LOCAL_COV $LIBS"
# Debug config
CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
LDFLAGS_DEBUG="$LDFLAGS"
-LIBS_DEBUG="../../../libc3_debug.la $LIBS"
+LIBS_LOCAL_DEBUG="$LIBC3_DEBUG"
+LIBS_DEBUG="$LIBS_LOCAL_DEBUG $LIBS"
# Main config
if [ "x$ENV_CFLAGS" = "x" ]; then
CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
fi
CFLAGS="$CFLAGS -DNDEBUG"
-LIBS="../../../libc3.la $LIBS"
+LIBS_LOCAL="$LIBC3"
+LIBS="$LIBS_LOCAL $LIBS"
echo "LIB = $LIB" >> ${CONFIG_MK}
echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
@@ -93,41 +107,43 @@ echo "LDFLAGS_DEBUG = $LDFLAGS_DEBUG" >> ${CONFIG_MK}
echo "LIBS_DEBUG = $LIBS_DEBUG" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
-echo "$LIB: $LIBTOMMATH $OBJECTS" >> ${CONFIG_MK}
+echo "$LIB: $LIBS_LOCAL $OBJECTS" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS} ${OBJECTS} \${LIBS} -rpath ${LIBDIR} -o ${LIB}" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
-echo "$LIB_ASAN: $LIBTOMMATH_ASAN $OBJECTS_ASAN" >> ${CONFIG_MK}
+echo "$LIB_ASAN: $LIBS_LOCAL_ASAN $OBJECTS_ASAN" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_ASAN} ${OBJECTS_ASAN} \${LIBS_ASAN} -rpath ${LIBDIR} -o ${LIB_ASAN}" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
-echo "$LIB_COV: $LIBTOMMATH_COV $OBJECTS_COV" >> ${CONFIG_MK}
+echo "$LIB_COV: $LIBS_LOCAL_COV $OBJECTS_COV" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_COV} ${OBJECTS_COV} \${LIBS_COV} -rpath ${LIBDIR} -o ${LIB_COV}" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
-echo "$LIB_DEBUG: $LIBTOMMATH_DEBUG $OBJECTS_DEBUG" >> ${CONFIG_MK}
+echo "$LIB_DEBUG: $LIBS_LOCAL_DEBUG $OBJECTS_DEBUG" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=link \${CC} -shared \${LDFLAGS_DEBUG} ${OBJECTS_DEBUG} \${LIBS_DEBUG} -rpath ${LIBDIR} -o ${LIB_DEBUG}" >> ${CONFIG_MK}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
SRC_LO="$(c2ext .main.lo "$SRC")"
- ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
update_config_mk
+
+( cd demo && ./configure; )
diff --git a/libc3/window/cairo/xcb/demo/configure b/libc3/window/cairo/xcb/demo/configure
index 6cf6623..e2f6a66 100755
--- a/libc3/window/cairo/xcb/demo/configure
+++ b/libc3/window/cairo/xcb/demo/configure
@@ -125,24 +125,24 @@ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_DEBUG} \${LDFLAGS_DEBUG}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
SRC_LO="$(c2ext .main.lo "$SRC")"
- ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
if $HAVE_GCOV; then
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
fi
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
diff --git a/libc3/window/cairo/xcb/update_sources b/libc3/window/cairo/xcb/update_sources
index af50eab..d2aa523 100755
--- a/libc3/window/cairo/xcb/update_sources
+++ b/libc3/window/cairo/xcb/update_sources
@@ -24,3 +24,5 @@ sources SOURCES "$SOURCES"
update_sources_mk
update_sources_sh
+
+( cd demo && ./update_sources; )
diff --git a/libc3/window/configure b/libc3/window/configure
index e8c7b2d..9d6f258 100755
--- a/libc3/window/configure
+++ b/libc3/window/configure
@@ -27,16 +27,8 @@ else
fi
echo "HAVE_CAIRO = $HAVE_CAIRO" >> ${CONFIG_MK}
-if pkg-config xcb; then
- HAVE_XCB=true
-else
- HAVE_XCB=false
-fi
-echo "HAVE_XCB = $HAVE_XCB" >> ${CONFIG_MK}
-
update_config_mk
-if ${HAVE_CAIRO} && ${HAVE_XCB}; then
- ( cd cairo/xcb && ./configure; )
- ( cd cairo/xcb/demo && ./configure; )
+if ${HAVE_CAIRO}; then
+ ( cd cairo && ./configure; )
fi
diff --git a/libc3/window/sources.mk b/libc3/window/sources.mk
new file mode 100644
index 0000000..9aefa78
--- /dev/null
+++ b/libc3/window/sources.mk
@@ -0,0 +1,8 @@
+# sources.mk generated by update_sources
+HEADERS = \
+ types.h \
+ window.h \
+
+SOURCES = \
+ window.c \
+
diff --git a/libc3/window/sources.sh b/libc3/window/sources.sh
new file mode 100644
index 0000000..8a6bfbb
--- /dev/null
+++ b/libc3/window/sources.sh
@@ -0,0 +1,3 @@
+# sources.sh generated by update_sources
+HEADERS='types.h window.h '
+SOURCES='window.c '
diff --git a/libc3/window/update_sources b/libc3/window/update_sources
new file mode 100755
index 0000000..fbe3a60
--- /dev/null
+++ b/libc3/window/update_sources
@@ -0,0 +1,28 @@
+#!/bin/sh
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
+
+. ../../config.subr
+
+echo "# sources.mk generated by update_sources" > ${SOURCES_MK}
+echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
+
+HEADERS="$(ls *.h | sort)"
+sources HEADERS "$HEADERS"
+
+SOURCES="$(ls *.c | sort)"
+sources SOURCES "$SOURCES"
+
+update_sources_mk
+update_sources_sh
+
+( cd cairo && ./update_sources; )
diff --git a/libtommath b/libtommath
index e8eb578..19e84a4 160000
--- a/libtommath
+++ b/libtommath
@@ -1 +1 @@
-Subproject commit e8eb5785055fd7094be78ee9cc62156089d0dd0f
+Subproject commit 19e84a4f15b66fcc2bd887b36f87d4f32f2a862d
diff --git a/sources.mk b/sources.mk
index ae803a9..4a83188 100644
--- a/sources.mk
+++ b/sources.mk
@@ -7,11 +7,18 @@ C3_CONFIGURES = \
ic3/update_sources \
libc3/configure \
libc3/update_sources \
+ libc3/window/configure \
+ libc3/window/update_sources \
+ libc3/window/cairo/xcb/demo/configure \
+ libc3/window/cairo/xcb/demo/update_sources \
libc3/window/cairo/xcb/configure \
libc3/window/cairo/xcb/update_sources \
- libc3/window/cairo/xcb/demo/update_sources \
- libc3/window/cairo/xcb/demo/configure \
- libc3/window/configure \
+ libc3/window/cairo/configure \
+ libc3/window/cairo/update_sources \
+ libc3/window/cairo/quartz/demo/configure \
+ libc3/window/cairo/quartz/demo/update_sources \
+ libc3/window/cairo/quartz/configure \
+ libc3/window/cairo/quartz/update_sources \
libtommath/configure \
libtommath/update_sources \
test/configure \
@@ -24,9 +31,12 @@ C3_MAKEFILES = \
ic3/Makefile \
libc3/Makefile \
libc3/gen.mk \
- libc3/window/cairo/xcb/Makefile \
- libc3/window/cairo/xcb/demo/Makefile \
libc3/window/Makefile \
+ libc3/window/cairo/xcb/demo/Makefile \
+ libc3/window/cairo/xcb/Makefile \
+ libc3/window/cairo/Makefile \
+ libc3/window/cairo/quartz/demo/Makefile \
+ libc3/window/cairo/quartz/Makefile \
libtommath/Makefile \
test/Makefile \
ucd2c/Makefile \
@@ -36,367 +46,372 @@ C3_C_SOURCES = \
c3s/buf_readline.c \
c3s/c3s.c \
c3s/buf_readline.h \
- ic3/ic3.c \
- ic3/buf_linenoise.c \
ic3/buf_linenoise.h \
+ ic3/ic3.c \
ic3/linenoise.c \
- libc3/abs.c \
- libc3/abs.h \
- libc3/buf.c \
- libc3/buf.h \
- libc3/set__tag.c \
- libc3/set_item__tag.c \
- libc3/set__tag.h \
- libc3/set_item__tag.h \
- libc3/set_cursor__tag.c \
- libc3/set_cursor__tag.h \
- libc3/skiplist_node__fact.c \
+ ic3/buf_linenoise.c \
+ libc3/buf_inspect_s_base.c.in \
+ libc3/type.h \
+ libc3/fact.c \
+ libc3/time.h \
+ libc3/fn.h \
+ libc3/s16.h \
+ libc3/buf_inspect_s8_octal.h \
+ libc3/log.c \
+ libc3/error.h \
+ libc3/buf_inspect_u64_octal.h \
+ libc3/set_item.h.in \
+ libc3/compare.c \
+ libc3/buf_inspect_s8_binary.h \
+ libc3/buf_inspect_uw_hexadecimal.h \
+ libc3/uw.c \
+ libc3/eval.c \
+ libc3/set__fact.c \
+ libc3/sym.h \
+ libc3/env.h \
+ libc3/cfn.c \
+ libc3/buf_inspect_u16_octal.h \
+ libc3/u.h.in \
+ libc3/buf_parse_s16.c \
+ libc3/s8.h \
+ libc3/quote.h \
+ libc3/buf_inspect_s32.h \
+ libc3/buf_inspect.c \
+ libc3/buf_parse_u.h.in \
libc3/skiplist_node__fact.h \
libc3/skiplist__fact.c \
- libc3/skiplist__fact.h \
- libc3/set_item__fact.c \
- libc3/call.c \
- libc3/arg.c \
- libc3/arg.h \
+ libc3/buf_inspect_s32_hexadecimal.h \
+ libc3/ceiling.h \
+ libc3/list.c \
+ libc3/buf_inspect_u64.c \
+ libc3/facts.h \
+ libc3/buf_inspect_u16_decimal.c \
+ libc3/facts_with_cursor.c \
+ libc3/buf_inspect_sw_decimal.c \
+ libc3/facts_cursor.c \
+ libc3/buf_inspect_u64_binary.h \
+ libc3/buf_inspect_sw_hexadecimal.h \
+ libc3/buf_inspect_s32_decimal.h \
+ libc3/u16.h \
+ libc3/buf_inspect_s64_octal.h \
+ libc3/buf_inspect_u8_binary.h \
+ libc3/buf_inspect_s8.h \
+ libc3/buf_inspect_s16_octal.h \
+ libc3/ucd.c \
+ libc3/buf_inspect_s16_binary.h \
+ libc3/tuple.c \
+ libc3/buf_inspect_uw_octal.h \
+ libc3/buf_parse_u8.c \
+ libc3/tag.h \
+ libc3/buf_parse_c.c \
+ libc3/float.h \
+ libc3/buf_inspect_u_base.c.in \
+ libc3/buf_parse_u16.c \
+ libc3/buf_inspect_u16_hexadecimal.h \
+ libc3/buf_inspect_s8_decimal.c \
+ libc3/buf_inspect_u32.h \
libc3/array.c \
- libc3/array.h \
- libc3/binding.c \
- libc3/c3.c \
- libc3/set_item__fact.h \
- libc3/set__fact.c \
- libc3/set__fact.h \
- libc3/set_cursor__fact.c \
- libc3/binding.h \
- libc3/set_cursor__fact.h \
- libc3/uw.h \
- libc3/uw.c \
- libc3/sw.h \
- libc3/sw.c \
- libc3/buf_parse_uw.h \
- libc3/buf_parse_uw.c \
libc3/buf_parse_sw.h \
- libc3/buf_parse_sw.c \
- libc3/buf_inspect_uw_hexadecimal.h \
- libc3/buf_inspect_uw_hexadecimal.c \
- libc3/buf_inspect_uw.h \
- libc3/bool.c \
- libc3/bool.h \
- libc3/buf_file.c \
- libc3/buf_file.h \
- libc3/buf_inspect_uw_decimal.h \
- libc3/buf_inspect_uw_decimal.c \
- libc3/buf_inspect_uw_octal.h \
- libc3/buf_inspect_uw_octal.c \
- libc3/buf_inspect_uw_binary.h \
- libc3/buf_inspect_uw_binary.c \
- libc3/buf_inspect_sw_hexadecimal.h \
+ libc3/set.h.in \
+ libc3/s.c.in \
+ libc3/buf_parse_s.c.in \
+ libc3/map.h \
+ libc3/timespec.c \
+ libc3/skiplist.h.in \
+ libc3/set__tag.h \
+ libc3/buf_inspect_s64.c \
+ libc3/io.c \
+ libc3/set_item__tag.c \
+ libc3/sequence.c \
+ libc3/types.h \
libc3/buf_inspect_uw.c \
- libc3/buf_inspect_sw_hexadecimal.c \
- libc3/buf_inspect_sw_decimal.h \
- libc3/buf_inspect_sw_decimal.c \
+ libc3/buf_inspect_u32_binary.c \
+ libc3/buf_inspect_s64_decimal.h \
+ libc3/set_cursor.c.in \
+ libc3/ident.c \
+ libc3/buf_inspect_s64_hexadecimal.c \
+ libc3/bool.h \
+ libc3/s.h.in \
+ libc3/set.c.in \
+ libc3/skiplist.c.in \
+ libc3/operator.h \
+ libc3/fn_clause.h \
+ libc3/buf_parse_s.h.in \
+ libc3/buf_inspect_s16.c \
+ libc3/binding.c \
+ libc3/ptag.h \
+ libc3/buf_parse_s32.h \
+ libc3/var.h \
+ libc3/set_item__fact.h \
+ libc3/u8.c \
+ libc3/set_cursor.h.in \
+ libc3/f32.c \
libc3/buf_inspect_sw_octal.h \
+ libc3/c3.h \
+ libc3/arg.h \
+ libc3/buf_inspect_u8_hexadecimal.c \
+ libc3/buf_inspect_u32_hexadecimal.h \
+ libc3/buf_parse_u64.c \
+ libc3/module.c \
+ libc3/frame.h \
+ libc3/buf_inspect_s16_decimal.c \
+ libc3/file.h \
+ libc3/sw.h \
+ libc3/s32.c \
+ libc3/c_types.h \
+ libc3/error_handler.c \
+ libc3/str.c \
libc3/buf_parse.h \
- libc3/buf_parse_c.c \
- libc3/buf_save.c \
+ libc3/buf_inspect_uw_binary.c \
+ libc3/buf_inspect_uw_decimal.h \
libc3/facts_spec_cursor.c \
- libc3/buf_inspect_sw_octal.c \
- libc3/buf_inspect_sw_binary.h \
- libc3/buf_inspect_sw_binary.c \
- libc3/buf_inspect_sw.h \
- libc3/buf_inspect_sw.c \
libc3/u64.h \
- libc3/u64.c \
- libc3/s64.h \
- libc3/s64.c \
- libc3/buf_parse_u64.c \
- libc3/buf_parse_u64.h \
- libc3/buf_parse_s64.h \
- libc3/buf_parse_s64.c \
- libc3/buf_inspect_u64_hexadecimal.h \
+ libc3/buf_inspect_u_base.h.in \
+ libc3/buf_inspect_s32_octal.h \
+ libc3/f64.h \
+ libc3/buf_inspect_u8_octal.h \
+ libc3/buf_inspect_s64_binary.c \
libc3/buf_inspect_u64_hexadecimal.c \
- libc3/buf_inspect_u64.h \
- libc3/buf_parse_c.h \
+ libc3/buf_inspect_u16_binary.c \
libc3/buf_save.h \
- libc3/c3.h \
- libc3/c_types.h \
- libc3/call.h \
- libc3/buf_inspect_u64_decimal.c \
- libc3/buf_inspect_u64_decimal.h \
- libc3/buf_inspect_u64_octal.h \
- libc3/buf_inspect_u64_octal.c \
- libc3/buf_inspect_u64_binary.h \
- libc3/buf_inspect_u64_binary.c \
- libc3/buf_inspect_u64.c \
- libc3/buf_inspect_s64_hexadecimal.h \
- libc3/buf_inspect_s64_hexadecimal.c \
- libc3/buf_inspect_s64_decimal.h \
- libc3/buf_inspect_s64_decimal.c \
- libc3/io.c \
- libc3/ceiling.c \
- libc3/ceiling.h \
- libc3/cfn.c \
- libc3/cfn.h \
- libc3/character.c \
- libc3/character.h \
- libc3/buf_inspect_s64_octal.h \
- libc3/buf_inspect_s64_octal.c \
- libc3/buf_inspect_s64_binary.h \
- libc3/buf_inspect_s64_binary.c \
- libc3/buf_inspect_s64.h \
- libc3/buf_inspect_s64.c \
- libc3/u32.c \
- libc3/u32.h \
- libc3/s32.h \
- libc3/s32.c \
+ libc3/buf_inspect_u16.c \
+ libc3/buf_inspect_s8_hexadecimal.c \
+ libc3/u.c.in \
+ libc3/buf_inspect_sw.h \
+ libc3/facts_with.c \
+ libc3/buf_parse_u.c.in \
libc3/buf_parse_u32.h \
- libc3/buf_parse_u32.c \
- libc3/buf_parse_s32.h \
- libc3/buf_parse_s32.c \
- libc3/buf_inspect_u32_hexadecimal.h \
- libc3/compare.c \
- libc3/buf_inspect.c \
- libc3/compare.h \
- libc3/timespec.h \
- libc3/buf_inspect_u32_hexadecimal.c \
+ libc3/set_cursor__fact.c \
+ libc3/buf.h \
+ libc3/set_cursor__tag.h \
+ libc3/buf_inspect_s16_hexadecimal.h \
libc3/buf_inspect_u32_decimal.h \
- libc3/buf_inspect_u32_decimal.c \
+ libc3/buf_parse_uw.c \
+ libc3/buf_parse_s64.c \
+ libc3/abs.h \
+ libc3/buf_inspect_sw_binary.c \
+ libc3/buf_parse_s8.h \
+ libc3/call.h \
+ libc3/sign.c \
+ libc3/buf_inspect_u8_decimal.h \
+ libc3/character.h \
+ libc3/buf_inspect_u64_decimal.h \
+ libc3/buf_inspect_s_base.h.in \
libc3/buf_inspect_u32_octal.h \
- libc3/buf_inspect_u32_octal.c \
- libc3/buf_inspect_u32_binary.h \
- libc3/buf_inspect_u32.h \
- libc3/buf_inspect_u32_binary.c \
- libc3/buf_inspect_u32.c \
- libc3/buf_inspect_s32_hexadecimal.h \
- libc3/buf_inspect_s32.h \
- libc3/error.c \
- libc3/error.h \
- libc3/error_handler.c \
- libc3/error_handler.h \
- libc3/eval.c \
- libc3/eval.h \
- libc3/buf_inspect_s32_hexadecimal.c \
- libc3/buf_inspect_s32_decimal.h \
- libc3/buf_inspect_s32_decimal.c \
- libc3/buf_inspect_s32_octal.h \
- libc3/buf_inspect_s32_octal.c \
+ libc3/u32.c \
+ libc3/hash.c \
+ libc3/buf_file.h \
+ libc3/integer.c \
+ libc3/buf_inspect_u8.c \
+ libc3/facts_spec.c \
libc3/buf_inspect_s32_binary.h \
- libc3/buf_inspect_s32_binary.c \
- libc3/buf_inspect_s32.c \
- libc3/u16.h \
- libc3/u16.c \
- libc3/s16.h \
- libc3/s16.c \
- libc3/buf_parse_u16.h \
- libc3/buf_parse_u16.c \
- libc3/fact.c \
- libc3/fact.h \
- libc3/facts_cursor.c \
- libc3/buf_parse_s16.h \
- libc3/buf_parse_s16.c \
- libc3/buf_inspect_u16_hexadecimal.h \
- libc3/buf_inspect_u16_hexadecimal.c \
+ libc3/set_item.c.in \
+ libc3/s64.h \
libc3/buf_inspect_u16_decimal.h \
- libc3/buf_inspect_u16_decimal.c \
- libc3/buf_inspect_u16_octal.h \
- libc3/buf_inspect_u16_octal.c \
- libc3/buf_inspect_u16_binary.h \
- libc3/buf_inspect_u16_binary.c \
- libc3/buf_inspect_u16.h \
- libc3/buf_inspect_u16.c \
- libc3/buf_inspect_s16_hexadecimal.h \
- libc3/list.c \
- libc3/facts_cursor.h \
- libc3/facts_spec.c \
- libc3/facts_spec.h \
- libc3/facts_spec_cursor.h \
- libc3/buf_inspect_s16_hexadecimal.c \
- libc3/buf_inspect_s16_decimal.h \
- libc3/buf_inspect_s16_decimal.c \
- libc3/buf_inspect_s16_octal.h \
- libc3/buf_inspect_s16_octal.c \
- libc3/buf_inspect_s16_binary.h \
- libc3/buf_inspect_s16_binary.c \
- libc3/buf_inspect_s16.c \
- libc3/buf_inspect_s16.h \
- libc3/u8.h \
- libc3/s8.h \
- libc3/u8.c \
- libc3/s8.c \
- libc3/buf_parse_u8.h \
- libc3/facts_with.c \
- libc3/facts_with.h \
- libc3/facts_with_cursor.c \
- libc3/buf_parse_u8.c \
- libc3/buf_parse_s8.h \
- libc3/buf_inspect_u8_hexadecimal.h \
- libc3/buf_parse_s8.c \
- libc3/buf_inspect_u8_hexadecimal.c \
- libc3/buf_inspect_u8_decimal.h \
- libc3/buf_inspect_u8_decimal.c \
- libc3/buf_inspect_u8_octal.h \
- libc3/buf_inspect_u8_octal.c \
- libc3/buf_inspect_u8_binary.h \
- libc3/buf_inspect_u8_binary.c \
- libc3/buf_inspect_u8.h \
- libc3/buf_inspect_u8.c \
- libc3/buf_inspect_s8.h \
+ libc3/facts.c \
+ libc3/buf_inspect_u64.h \
+ libc3/buf_inspect_sw_decimal.h \
libc3/facts_with_cursor.h \
- libc3/float.h \
- libc3/frame.c \
- libc3/frame.h \
- libc3/buf_inspect_s8_hexadecimal.h \
- libc3/types.h \
- libc3/buf_inspect_s8_hexadecimal.c \
- libc3/buf_inspect_s8_decimal.h \
- libc3/f64.h \
- libc3/buf_inspect_s8_decimal.c \
- libc3/f32.c \
- libc3/f64.c \
- libc3/buf_inspect_s8_octal.h \
- libc3/buf_inspect_s8_octal.c \
- libc3/buf_inspect_s8_binary.h \
- libc3/buf_inspect_s8_binary.c \
- libc3/buf_inspect_s8.c \
- libc3/hash.h \
- libc3/ident.h \
- libc3/integer.c \
- libc3/integer.h \
- libc3/io.h \
- libc3/list.h \
- libc3/log.c \
- libc3/log.h \
- libc3/buf_inspect_s.h.in \
- libc3/module.c \
+ libc3/skiplist_node__fact.c \
libc3/buf_inspect.h \
- libc3/c3_main.h \
- libc3/sequence.c \
- libc3/sequence.h \
- libc3/str.c \
- libc3/module.h \
- libc3/buf_parse_u.c.in \
libc3/quote.c \
- libc3/quote.h \
- libc3/set.c.in \
- libc3/set.h.in \
- libc3/buf_inspect_s_base.h.in \
- libc3/map.h \
- libc3/set_cursor.c.in \
- libc3/set_cursor.h.in \
- libc3/set_item.c.in \
- libc3/set_item.h.in \
- libc3/s.h.in \
- libc3/sign.c \
- libc3/sign.h \
- libc3/skiplist.c.in \
- libc3/skiplist.h.in \
- libc3/type.h \
- libc3/skiplist_node.c.in \
+ libc3/buf_inspect_s32.c \
libc3/skiplist_node.h.in \
- libc3/str.h \
- libc3/tag.c \
- libc3/ucd.c \
- libc3/sym.h \
- libc3/tuple.c \
- libc3/tuple.h \
- libc3/type.c \
- libc3/ucd.h \
- libc3/buf_parse_s.c.in \
- libc3/buf_parse_s.h.in \
- libc3/buf_inspect_s.c.in \
- libc3/buf_parse_u.h.in \
- libc3/ident.c \
+ libc3/s8.c \
+ libc3/buf_parse_s16.h \
+ libc3/list.h \
+ libc3/ceiling.c \
+ libc3/buf_inspect_s.h.in \
+ libc3/buf_inspect_s32_hexadecimal.c \
+ libc3/skiplist__fact.h \
+ libc3/uw.h \
+ libc3/buf_inspect_uw_hexadecimal.c \
+ libc3/buf_inspect_s8_binary.c \
+ libc3/compare.h \
+ libc3/buf_inspect_u64_octal.c \
+ libc3/buf_inspect_u16_octal.c \
+ libc3/cfn.h \
libc3/env.c \
- libc3/buf_inspect_s_base.c.in \
- libc3/buf_inspect_u.c.in \
- libc3/buf_inspect_u.h.in \
- libc3/env.h \
- libc3/buf_inspect_u_base.c.in \
- libc3/buf_inspect_u_base.h.in \
- libc3/timespec.c \
- libc3/map.c \
- libc3/window/cairo/xcb/config.h \
- libc3/window/cairo/xcb/window_cairo_xcb.c \
+ libc3/set__fact.h \
+ libc3/sym.c \
+ libc3/eval.h \
+ libc3/c3_main.h \
+ libc3/buf_inspect_s8_octal.c \
+ libc3/s16.c \
+ libc3/fn.c \
+ libc3/time.c \
+ libc3/fact.h \
+ libc3/type.c \
+ libc3/error.c \
+ libc3/log.h \
+ libc3/sequence.h \
+ libc3/set_item__tag.h \
+ libc3/io.h \
+ libc3/buf_inspect_s64.h \
+ libc3/buf_inspect_s64_hexadecimal.h \
+ libc3/window/types.h \
+ libc3/window/window.h \
libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c \
libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c \
libc3/window/cairo/xcb/demo/window.c \
libc3/window/cairo/xcb/window_cairo_xcb.h \
+ libc3/window/cairo/xcb/config.h \
+ libc3/window/cairo/xcb/window_cairo_xcb.c \
libc3/window/cairo/types.h \
+ libc3/window/cairo/window_cairo.c \
libc3/window/cairo/c3_window_cairo_demo.h \
+ libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h \
+ libc3/window/cairo/quartz/custom_cairo_view.h \
+ libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/Objects-normal/arm64/c3_window_cairo_quartz_demo-Swift.h \
+ libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/Objects-normal/x86_64/c3_window_cairo_quartz_demo-Swift.h \
+ libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/DerivedSources/c3_window_cairo_quartz_demo-Swift.h \
libc3/window/cairo/window_cairo.h \
libc3/window/cairo/c3_window_cairo_demo.c \
- libc3/window/cairo/window_cairo.c \
- libc3/window/types.h \
libc3/window/window.c \
- libc3/window/window.h \
- libc3/u.c.in \
- libc3/fn.c \
- libc3/u.h.in \
+ libc3/ident.h \
+ libc3/buf_inspect_s64_decimal.c \
+ libc3/buf_inspect_u32_binary.h \
+ libc3/buf_inspect_uw.h \
+ libc3/buf_inspect_u.c.in \
+ libc3/buf_parse_sw.c \
+ libc3/array.h \
+ libc3/buf_inspect_u32.c \
+ libc3/buf_inspect_s8_decimal.h \
+ libc3/buf_inspect_u16_hexadecimal.c \
+ libc3/buf_parse_u16.h \
+ libc3/set__tag.c \
+ libc3/timespec.h \
+ libc3/map.c \
+ libc3/tag.c \
+ libc3/buf_parse_c.h \
+ libc3/buf_parse_u8.h \
+ libc3/buf_inspect_uw_octal.c \
+ libc3/buf_inspect_u8_binary.c \
+ libc3/buf_inspect_s64_octal.c \
+ libc3/u16.c \
+ libc3/buf_inspect_sw_hexadecimal.c \
+ libc3/buf_inspect_s32_decimal.c \
+ libc3/buf_inspect_u64_binary.c \
+ libc3/facts_cursor.h \
+ libc3/tuple.h \
+ libc3/buf_inspect_s16_binary.c \
+ libc3/ucd.h \
+ libc3/buf_inspect_s16_octal.c \
+ libc3/buf_inspect_s8.c \
libc3/sha1.h \
- libc3/fn.h \
- libc3/tag.h \
+ libc3/buf_inspect_uw_binary.h \
libc3/buf_parse.c \
- libc3/facts.c \
- libc3/license.c \
- libc3/operator.c \
- libc3/ptag.h \
+ libc3/str.h \
+ libc3/error_handler.h \
+ libc3/u64.c \
+ libc3/buf_inspect_s32_octal.c \
+ libc3/facts_spec_cursor.h \
+ libc3/buf_inspect_uw_decimal.c \
+ libc3/sw.c \
+ libc3/file.c \
+ libc3/buf_inspect_s16_decimal.h \
+ libc3/frame.c \
+ libc3/s32.h \
+ libc3/c3.c \
libc3/f32.h \
- libc3/fn_clause.h \
- libc3/s.c.in \
- libc3/operator.h \
- libc3/sym.c \
+ libc3/buf_inspect_sw_octal.c \
+ libc3/u8.h \
+ libc3/set_item__fact.c \
+ libc3/var.c \
+ libc3/module.h \
+ libc3/license.c \
+ libc3/buf_inspect_u32_hexadecimal.c \
+ libc3/buf_parse_u64.h \
+ libc3/buf_inspect_u8_hexadecimal.h \
+ libc3/arg.c \
libc3/fn_clause.c \
+ libc3/operator.c \
+ libc3/bool.c \
+ libc3/buf_parse_s32.c \
libc3/ptag.c \
- libc3/var.h \
- libc3/var.c \
- libc3/time.c \
- libc3/time.h \
- libc3/facts.h \
- libc3/file.c \
- libc3/file.h \
- libc3/hash.c \
- test/buf_inspect_test.c \
- test/bool_test.c \
- test/buf_parse_test.c \
- test/facts_test.c \
- test/buf_file_test.c \
- test/list_test.c \
- test/test.c \
- test/test.h \
- test/buf_parse_test_u8.c \
- test/buf_parse_test.h \
+ libc3/binding.h \
+ libc3/buf_inspect_u.h.in \
+ libc3/buf_inspect_s16.h \
+ libc3/integer.h \
+ libc3/buf_file.c \
+ libc3/s64.c \
+ libc3/buf_inspect_s32_binary.c \
+ libc3/buf_inspect_u8.h \
+ libc3/facts_spec.h \
+ libc3/buf_inspect_u8_decimal.c \
+ libc3/sign.h \
+ libc3/call.c \
+ libc3/buf_parse_s8.c \
+ libc3/buf_inspect_sw_binary.h \
+ libc3/hash.h \
+ libc3/u32.h \
+ libc3/buf_inspect_u32_octal.c \
+ libc3/character.c \
+ libc3/buf_inspect_u64_decimal.c \
+ libc3/buf_parse_uw.h \
+ libc3/buf_inspect_u32_decimal.c \
+ libc3/buf_inspect_s16_hexadecimal.c \
+ libc3/set_cursor__tag.c \
+ libc3/set_cursor__fact.h \
+ libc3/buf.c \
+ libc3/abs.c \
+ libc3/buf_parse_s64.h \
+ libc3/buf_inspect_s.c.in \
+ libc3/buf_inspect_s64_binary.h \
+ libc3/buf_inspect_u8_octal.c \
+ libc3/f64.c \
+ libc3/skiplist_node.c.in \
+ libc3/buf_parse_u32.c \
+ libc3/facts_with.h \
+ libc3/buf_inspect_sw.c \
+ libc3/buf_inspect_u16.h \
+ libc3/buf_inspect_s8_hexadecimal.h \
+ libc3/buf_inspect_u16_binary.h \
+ libc3/buf_inspect_u64_hexadecimal.h \
+ libc3/buf_save.c \
+ test/ident_test.c \
test/buf_parse_test_s16.c \
- test/buf_parse_test_s32.c \
- test/buf_parse_test_s64.c \
- test/buf_parse_test_s8.c \
- test/buf_parse_test_su.h \
+ test/buf_inspect_test.c \
+ test/libc3_test.c \
+ test/fn_test.c \
test/buf_parse_test_u16.c \
- test/buf_parse_test_u32.c \
- test/buf_test.c \
- test/buf_parse_test_u64.c \
- test/call_test.c \
- test/facts_cursor_test.c \
+ test/str_test.c \
test/cfn_test.c \
test/character_test.c \
- test/compare_test.c \
- test/compare_test.h \
- test/env_test.c \
- test/fact_test.c \
+ test/buf_parse_test_s8.c \
+ test/skiplist__fact_test.c \
+ test/sym_test.c \
+ test/tag_test.h \
+ test/buf_file_test.c \
+ test/bool_test.c \
test/fact_test.h \
+ test/buf_parse_test_u64.c \
+ test/compare_test.c \
test/facts_with_test.c \
+ test/array_test.c \
+ test/buf_parse_test.h \
+ test/test.h \
+ test/buf_parse_test_su.h \
+ test/env_test.c \
+ test/buf_parse_test_s64.c \
+ test/types_test.c \
test/hash_test.c \
- test/ident_test.c \
- test/set__fact_test.c \
+ test/call_test.c \
test/set__tag_test.c \
- test/skiplist__fact_test.c \
- test/str_test.c \
- test/sym_test.c \
+ test/facts_test.c \
+ test/facts_cursor_test.c \
+ test/compare_test.h \
+ test/buf_parse_test_s32.c \
+ test/test.c \
+ test/buf_parse_test.c \
+ test/fact_test.c \
test/tag_test.c \
- test/tag_test.h \
- test/array_test.c \
- test/fn_test.c \
+ test/set__fact_test.c \
+ test/buf_parse_test_u32.c \
+ test/buf_test.c \
+ test/list_test.c \
+ test/buf_parse_test_u8.c \
test/tuple_test.c \
- test/types_test.c \
- test/libc3_test.c \
ucd2c/ucd.h \
ucd2c/ucd2c.c \
diff --git a/sources.sh b/sources.sh
index 72b960e..9bfde75 100644
--- a/sources.sh
+++ b/sources.sh
@@ -1,4 +1,4 @@
# sources.sh generated by update_sources
-C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/configure libc3/update_sources libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/update_sources libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/demo/configure libc3/window/configure libtommath/configure libtommath/update_sources test/configure test/update_sources ucd2c/configure '
-C3_MAKEFILES='c3c/Makefile c3s/Makefile ic3/Makefile libc3/Makefile libc3/gen.mk libc3/window/cairo/xcb/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/Makefile libtommath/Makefile test/Makefile ucd2c/Makefile '
-C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/ic3.c ic3/buf_linenoise.c ic3/buf_linenoise.h ic3/linenoise.c libc3/abs.c libc3/abs.h libc3/buf.c libc3/buf.h libc3/set__tag.c libc3/set_item__tag.c libc3/set__tag.h libc3/set_item__tag.h libc3/set_cursor__tag.c libc3/set_cursor__tag.h libc3/skiplist_node__fact.c libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/skiplist__fact.h libc3/set_item__fact.c libc3/call.c libc3/arg.c libc3/arg.h libc3/array.c libc3/array.h libc3/binding.c libc3/c3.c libc3/set_item__fact.h libc3/set__fact.c libc3/set__fact.h libc3/set_cursor__fact.c libc3/binding.h libc3/set_cursor__fact.h libc3/uw.h libc3/uw.c libc3/sw.h libc3/sw.c libc3/buf_parse_uw.h libc3/buf_parse_uw.c libc3/buf_parse_sw.h libc3/buf_parse_sw.c libc3/buf_inspect_uw_hexadecimal.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_uw.h libc3/bool.c libc3/bool.h libc3/buf_file.c libc3/buf_file.h libc3/buf_inspect_uw_decimal.h libc3/buf_inspect_uw_decimal.c libc3/buf_inspect_uw_octal.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_uw_binary.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_uw.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_sw_decimal.h libc3/buf_inspect_sw_decimal.c libc3/buf_inspect_sw_octal.h libc3/buf_parse.h libc3/buf_parse_c.c libc3/buf_save.c libc3/facts_spec_cursor.c libc3/buf_inspect_sw_octal.c libc3/buf_inspect_sw_binary.h libc3/buf_inspect_sw_binary.c libc3/buf_inspect_sw.h libc3/buf_inspect_sw.c libc3/u64.h libc3/u64.c libc3/s64.h libc3/s64.c libc3/buf_parse_u64.c libc3/buf_parse_u64.h libc3/buf_parse_s64.h libc3/buf_parse_s64.c libc3/buf_inspect_u64_hexadecimal.h libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u64.h libc3/buf_parse_c.h libc3/buf_save.h libc3/c3.h libc3/c_types.h libc3/call.h libc3/buf_inspect_u64_decimal.c libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_u64_octal.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_u64_binary.c libc3/buf_inspect_u64.c libc3/buf_inspect_s64_hexadecimal.h libc3/buf_inspect_s64_hexadecimal.c libc3/buf_inspect_s64_decimal.h libc3/buf_inspect_s64_decimal.c libc3/io.c libc3/ceiling.c libc3/ceiling.h libc3/cfn.c libc3/cfn.h libc3/character.c libc3/character.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_s64_octal.c libc3/buf_inspect_s64_binary.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_s64.h libc3/buf_inspect_s64.c libc3/u32.c libc3/u32.h libc3/s32.h libc3/s32.c libc3/buf_parse_u32.h libc3/buf_parse_u32.c libc3/buf_parse_s32.h libc3/buf_parse_s32.c libc3/buf_inspect_u32_hexadecimal.h libc3/compare.c libc3/buf_inspect.c libc3/compare.h libc3/timespec.h libc3/buf_inspect_u32_hexadecimal.c libc3/buf_inspect_u32_decimal.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_u32_octal.h libc3/buf_inspect_u32_octal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_u32.h libc3/buf_inspect_u32_binary.c libc3/buf_inspect_u32.c libc3/buf_inspect_s32_hexadecimal.h libc3/buf_inspect_s32.h libc3/error.c libc3/error.h libc3/error_handler.c libc3/error_handler.h libc3/eval.c libc3/eval.h libc3/buf_inspect_s32_hexadecimal.c libc3/buf_inspect_s32_decimal.h libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_s32_octal.h libc3/buf_inspect_s32_octal.c libc3/buf_inspect_s32_binary.h libc3/buf_inspect_s32_binary.c libc3/buf_inspect_s32.c libc3/u16.h libc3/u16.c libc3/s16.h libc3/s16.c libc3/buf_parse_u16.h libc3/buf_parse_u16.c libc3/fact.c libc3/fact.h libc3/facts_cursor.c libc3/buf_parse_s16.h libc3/buf_parse_s16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_inspect_u16_decimal.h libc3/buf_inspect_u16_decimal.c libc3/buf_inspect_u16_octal.h libc3/buf_inspect_u16_octal.c libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u16_binary.c libc3/buf_inspect_u16.h libc3/buf_inspect_u16.c libc3/buf_inspect_s16_hexadecimal.h libc3/list.c libc3/facts_cursor.h libc3/facts_spec.c libc3/facts_spec.h libc3/facts_spec_cursor.h libc3/buf_inspect_s16_hexadecimal.c libc3/buf_inspect_s16_decimal.h libc3/buf_inspect_s16_decimal.c libc3/buf_inspect_s16_octal.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s16_binary.h libc3/buf_inspect_s16_binary.c libc3/buf_inspect_s16.c libc3/buf_inspect_s16.h libc3/u8.h libc3/s8.h libc3/u8.c libc3/s8.c libc3/buf_parse_u8.h libc3/facts_with.c libc3/facts_with.h libc3/facts_with_cursor.c libc3/buf_parse_u8.c libc3/buf_parse_s8.h libc3/buf_inspect_u8_hexadecimal.h libc3/buf_parse_s8.c libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u8_decimal.h libc3/buf_inspect_u8_decimal.c libc3/buf_inspect_u8_octal.h libc3/buf_inspect_u8_octal.c libc3/buf_inspect_u8_binary.h libc3/buf_inspect_u8_binary.c libc3/buf_inspect_u8.h libc3/buf_inspect_u8.c libc3/buf_inspect_s8.h libc3/facts_with_cursor.h libc3/float.h libc3/frame.c libc3/frame.h libc3/buf_inspect_s8_hexadecimal.h libc3/types.h libc3/buf_inspect_s8_hexadecimal.c libc3/buf_inspect_s8_decimal.h libc3/f64.h libc3/buf_inspect_s8_decimal.c libc3/f32.c libc3/f64.c libc3/buf_inspect_s8_octal.h libc3/buf_inspect_s8_octal.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_s8_binary.c libc3/buf_inspect_s8.c libc3/hash.h libc3/ident.h libc3/integer.c libc3/integer.h libc3/io.h libc3/list.h libc3/log.c libc3/log.h libc3/buf_inspect_s.h.in libc3/module.c libc3/buf_inspect.h libc3/c3_main.h libc3/sequence.c libc3/sequence.h libc3/str.c libc3/module.h libc3/buf_parse_u.c.in libc3/quote.c libc3/quote.h libc3/set.c.in libc3/set.h.in libc3/buf_inspect_s_base.h.in libc3/map.h libc3/set_cursor.c.in libc3/set_cursor.h.in libc3/set_item.c.in libc3/set_item.h.in libc3/s.h.in libc3/sign.c libc3/sign.h libc3/skiplist.c.in libc3/skiplist.h.in libc3/type.h libc3/skiplist_node.c.in libc3/skiplist_node.h.in libc3/str.h libc3/tag.c libc3/ucd.c libc3/sym.h libc3/tuple.c libc3/tuple.h libc3/type.c libc3/ucd.h libc3/buf_parse_s.c.in libc3/buf_parse_s.h.in libc3/buf_inspect_s.c.in libc3/buf_parse_u.h.in libc3/ident.c libc3/env.c libc3/buf_inspect_s_base.c.in libc3/buf_inspect_u.c.in libc3/buf_inspect_u.h.in libc3/env.h libc3/buf_inspect_u_base.c.in libc3/buf_inspect_u_base.h.in libc3/timespec.c libc3/map.c libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/types.h libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/window_cairo.h libc3/window/cairo/c3_window_cairo_demo.c libc3/window/cairo/window_cairo.c libc3/window/types.h libc3/window/window.c libc3/window/window.h libc3/u.c.in libc3/fn.c libc3/u.h.in libc3/sha1.h libc3/fn.h libc3/tag.h libc3/buf_parse.c libc3/facts.c libc3/license.c libc3/operator.c libc3/ptag.h libc3/f32.h libc3/fn_clause.h libc3/s.c.in libc3/operator.h libc3/sym.c libc3/fn_clause.c libc3/ptag.c libc3/var.h libc3/var.c libc3/time.c libc3/time.h libc3/facts.h libc3/file.c libc3/file.h libc3/hash.c test/buf_inspect_test.c test/bool_test.c test/buf_parse_test.c test/facts_test.c test/buf_file_test.c test/list_test.c test/test.c test/test.h test/buf_parse_test_u8.c test/buf_parse_test.h test/buf_parse_test_s16.c test/buf_parse_test_s32.c test/buf_parse_test_s64.c test/buf_parse_test_s8.c test/buf_parse_test_su.h test/buf_parse_test_u16.c test/buf_parse_test_u32.c test/buf_test.c test/buf_parse_test_u64.c test/call_test.c test/facts_cursor_test.c test/cfn_test.c test/character_test.c test/compare_test.c test/compare_test.h test/env_test.c test/fact_test.c test/fact_test.h test/facts_with_test.c test/hash_test.c test/ident_test.c test/set__fact_test.c test/set__tag_test.c test/skiplist__fact_test.c test/str_test.c test/sym_test.c test/tag_test.c test/tag_test.h test/array_test.c test/fn_test.c test/tuple_test.c test/types_test.c test/libc3_test.c ucd2c/ucd.h ucd2c/ucd2c.c '
+C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/configure libc3/update_sources libc3/window/configure libc3/window/update_sources libc3/window/cairo/xcb/demo/configure libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/update_sources libc3/window/cairo/configure libc3/window/cairo/update_sources libc3/window/cairo/quartz/demo/configure libc3/window/cairo/quartz/demo/update_sources libc3/window/cairo/quartz/configure libc3/window/cairo/quartz/update_sources libtommath/configure libtommath/update_sources test/configure test/update_sources ucd2c/configure '
+C3_MAKEFILES='c3c/Makefile c3s/Makefile ic3/Makefile libc3/Makefile libc3/gen.mk libc3/window/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/cairo/xcb/Makefile libc3/window/cairo/Makefile libc3/window/cairo/quartz/demo/Makefile libc3/window/cairo/quartz/Makefile libtommath/Makefile test/Makefile ucd2c/Makefile '
+C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/buf_linenoise.h ic3/ic3.c ic3/linenoise.c ic3/buf_linenoise.c libc3/buf_inspect_s_base.c.in libc3/type.h libc3/fact.c libc3/time.h libc3/fn.h libc3/s16.h libc3/buf_inspect_s8_octal.h libc3/log.c libc3/error.h libc3/buf_inspect_u64_octal.h libc3/set_item.h.in libc3/compare.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_uw_hexadecimal.h libc3/uw.c libc3/eval.c libc3/set__fact.c libc3/sym.h libc3/env.h libc3/cfn.c libc3/buf_inspect_u16_octal.h libc3/u.h.in libc3/buf_parse_s16.c libc3/s8.h libc3/quote.h libc3/buf_inspect_s32.h libc3/buf_inspect.c libc3/buf_parse_u.h.in libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/buf_inspect_s32_hexadecimal.h libc3/ceiling.h libc3/list.c libc3/buf_inspect_u64.c libc3/facts.h libc3/buf_inspect_u16_decimal.c libc3/facts_with_cursor.c libc3/buf_inspect_sw_decimal.c libc3/facts_cursor.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_s32_decimal.h libc3/u16.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_u8_binary.h libc3/buf_inspect_s8.h libc3/buf_inspect_s16_octal.h libc3/ucd.c libc3/buf_inspect_s16_binary.h libc3/tuple.c libc3/buf_inspect_uw_octal.h libc3/buf_parse_u8.c libc3/tag.h libc3/buf_parse_c.c libc3/float.h libc3/buf_inspect_u_base.c.in libc3/buf_parse_u16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_s8_decimal.c libc3/buf_inspect_u32.h libc3/array.c libc3/buf_parse_sw.h libc3/set.h.in libc3/s.c.in libc3/buf_parse_s.c.in libc3/map.h libc3/timespec.c libc3/skiplist.h.in libc3/set__tag.h libc3/buf_inspect_s64.c libc3/io.c libc3/set_item__tag.c libc3/sequence.c libc3/types.h libc3/buf_inspect_uw.c libc3/buf_inspect_u32_binary.c libc3/buf_inspect_s64_decimal.h libc3/set_cursor.c.in libc3/ident.c libc3/buf_inspect_s64_hexadecimal.c libc3/bool.h libc3/s.h.in libc3/set.c.in libc3/skiplist.c.in libc3/operator.h libc3/fn_clause.h libc3/buf_parse_s.h.in libc3/buf_inspect_s16.c libc3/binding.c libc3/ptag.h libc3/buf_parse_s32.h libc3/var.h libc3/set_item__fact.h libc3/u8.c libc3/set_cursor.h.in libc3/f32.c libc3/buf_inspect_sw_octal.h libc3/c3.h libc3/arg.h libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u32_hexadecimal.h libc3/buf_parse_u64.c libc3/module.c libc3/frame.h libc3/buf_inspect_s16_decimal.c libc3/file.h libc3/sw.h libc3/s32.c libc3/c_types.h libc3/error_handler.c libc3/str.c libc3/buf_parse.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw_decimal.h libc3/facts_spec_cursor.c libc3/u64.h libc3/buf_inspect_u_base.h.in libc3/buf_inspect_s32_octal.h libc3/f64.h libc3/buf_inspect_u8_octal.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u16_binary.c libc3/buf_save.h libc3/buf_inspect_u16.c libc3/buf_inspect_s8_hexadecimal.c libc3/u.c.in libc3/buf_inspect_sw.h libc3/facts_with.c libc3/buf_parse_u.c.in libc3/buf_parse_u32.h libc3/set_cursor__fact.c libc3/buf.h libc3/set_cursor__tag.h libc3/buf_inspect_s16_hexadecimal.h libc3/buf_inspect_u32_decimal.h libc3/buf_parse_uw.c libc3/buf_parse_s64.c libc3/abs.h libc3/buf_inspect_sw_binary.c libc3/buf_parse_s8.h libc3/call.h libc3/sign.c libc3/buf_inspect_u8_decimal.h libc3/character.h libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_s_base.h.in libc3/buf_inspect_u32_octal.h libc3/u32.c libc3/hash.c libc3/buf_file.h libc3/integer.c libc3/buf_inspect_u8.c libc3/facts_spec.c libc3/buf_inspect_s32_binary.h libc3/set_item.c.in libc3/s64.h libc3/buf_inspect_u16_decimal.h libc3/facts.c libc3/buf_inspect_u64.h libc3/buf_inspect_sw_decimal.h libc3/facts_with_cursor.h libc3/skiplist_node__fact.c libc3/buf_inspect.h libc3/quote.c libc3/buf_inspect_s32.c libc3/skiplist_node.h.in libc3/s8.c libc3/buf_parse_s16.h libc3/list.h libc3/ceiling.c libc3/buf_inspect_s.h.in libc3/buf_inspect_s32_hexadecimal.c libc3/skiplist__fact.h libc3/uw.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_s8_binary.c libc3/compare.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u16_octal.c libc3/cfn.h libc3/env.c libc3/set__fact.h libc3/sym.c libc3/eval.h libc3/c3_main.h libc3/buf_inspect_s8_octal.c libc3/s16.c libc3/fn.c libc3/time.c libc3/fact.h libc3/type.c libc3/error.c libc3/log.h libc3/sequence.h libc3/set_item__tag.h libc3/io.h libc3/buf_inspect_s64.h libc3/buf_inspect_s64_hexadecimal.h libc3/window/types.h libc3/window/window.h libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/types.h libc3/window/cairo/window_cairo.c libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h libc3/window/cairo/quartz/custom_cairo_view.h libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/Objects-normal/arm64/c3_window_cairo_quartz_demo-Swift.h libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/Objects-normal/x86_64/c3_window_cairo_quartz_demo-Swift.h libc3/window/cairo/quartz/build/demo.build/Release/c3_window_cairo_quartz_demo.build/DerivedSources/c3_window_cairo_quartz_demo-Swift.h libc3/window/cairo/window_cairo.h libc3/window/cairo/c3_window_cairo_demo.c libc3/window/window.c libc3/ident.h libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_uw.h libc3/buf_inspect_u.c.in libc3/buf_parse_sw.c libc3/array.h libc3/buf_inspect_u32.c libc3/buf_inspect_s8_decimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_parse_u16.h libc3/set__tag.c libc3/timespec.h libc3/map.c libc3/tag.c libc3/buf_parse_c.h libc3/buf_parse_u8.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_u8_binary.c libc3/buf_inspect_s64_octal.c libc3/u16.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_u64_binary.c libc3/facts_cursor.h libc3/tuple.h libc3/buf_inspect_s16_binary.c libc3/ucd.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s8.c libc3/sha1.h libc3/buf_inspect_uw_binary.h libc3/buf_parse.c libc3/str.h libc3/error_handler.h libc3/u64.c libc3/buf_inspect_s32_octal.c libc3/facts_spec_cursor.h libc3/buf_inspect_uw_decimal.c libc3/sw.c libc3/file.c libc3/buf_inspect_s16_decimal.h libc3/frame.c libc3/s32.h libc3/c3.c libc3/f32.h libc3/buf_inspect_sw_octal.c libc3/u8.h libc3/set_item__fact.c libc3/var.c libc3/module.h libc3/license.c libc3/buf_inspect_u32_hexadecimal.c libc3/buf_parse_u64.h libc3/buf_inspect_u8_hexadecimal.h libc3/arg.c libc3/fn_clause.c libc3/operator.c libc3/bool.c libc3/buf_parse_s32.c libc3/ptag.c libc3/binding.h libc3/buf_inspect_u.h.in libc3/buf_inspect_s16.h libc3/integer.h libc3/buf_file.c libc3/s64.c libc3/buf_inspect_s32_binary.c libc3/buf_inspect_u8.h libc3/facts_spec.h libc3/buf_inspect_u8_decimal.c libc3/sign.h libc3/call.c libc3/buf_parse_s8.c libc3/buf_inspect_sw_binary.h libc3/hash.h libc3/u32.h libc3/buf_inspect_u32_octal.c libc3/character.c libc3/buf_inspect_u64_decimal.c libc3/buf_parse_uw.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_s16_hexadecimal.c libc3/set_cursor__tag.c libc3/set_cursor__fact.h libc3/buf.c libc3/abs.c libc3/buf_parse_s64.h libc3/buf_inspect_s.c.in libc3/buf_inspect_s64_binary.h libc3/buf_inspect_u8_octal.c libc3/f64.c libc3/skiplist_node.c.in libc3/buf_parse_u32.c libc3/facts_with.h libc3/buf_inspect_sw.c libc3/buf_inspect_u16.h libc3/buf_inspect_s8_hexadecimal.h libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u64_hexadecimal.h libc3/buf_save.c test/ident_test.c test/buf_parse_test_s16.c test/buf_inspect_test.c test/libc3_test.c test/fn_test.c test/buf_parse_test_u16.c test/str_test.c test/cfn_test.c test/character_test.c test/buf_parse_test_s8.c test/skiplist__fact_test.c test/sym_test.c test/tag_test.h test/buf_file_test.c test/bool_test.c test/fact_test.h test/buf_parse_test_u64.c test/compare_test.c test/facts_with_test.c test/array_test.c test/buf_parse_test.h test/test.h test/buf_parse_test_su.h test/env_test.c test/buf_parse_test_s64.c test/types_test.c test/hash_test.c test/call_test.c test/set__tag_test.c test/facts_test.c test/facts_cursor_test.c test/compare_test.h test/buf_parse_test_s32.c test/test.c test/buf_parse_test.c test/fact_test.c test/tag_test.c test/set__fact_test.c test/buf_parse_test_u32.c test/buf_test.c test/list_test.c test/buf_parse_test_u8.c test/tuple_test.c ucd2c/ucd.h ucd2c/ucd2c.c '
diff --git a/test/configure b/test/configure
index c6a7245..0c76b57 100755
--- a/test/configure
+++ b/test/configure
@@ -122,25 +122,25 @@ echo " ${LIBTOOL} --tag=CC --mode=link \${CC} \${CFLAGS_DEBUG} \${LDFLAGS_DEBUG}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
- SRC_LO="$(c2lo "$SRC")"
- lo_rule "$SRC" >> ${CONFIG_MK}
+ SRC_LO="$(c2ext .main.lo "$SRC")"
+ c_ext_rule .main.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
echo >> ${CONFIG_MK}
SRC_ASAN_LO="$(c2ext .asan.lo "$SRC")"
- ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .asan.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_ASAN} -c $SRC -o $SRC_ASAN_LO" >> ${CONFIG_MK}
if $HAVE_GCOV; then
echo >> ${CONFIG_MK}
SRC_COV_LO="$(c2ext .cov.lo "$SRC")"
- ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .cov.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_COV} -c $SRC -o $SRC_COV_LO" >> ${CONFIG_MK}
fi
echo >> ${CONFIG_MK}
SRC_DEBUG_LO="$(c2ext .debug.lo "$SRC")"
- ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
+ c_ext_rule .debug.lo "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS_DEBUG} -c $SRC -o $SRC_DEBUG_LO" >> ${CONFIG_MK}
done
diff --git a/ucd2c/configure b/ucd2c/configure
index 0728c48..a50b603 100755
--- a/ucd2c/configure
+++ b/ucd2c/configure
@@ -49,7 +49,7 @@ echo >> ${CONFIG_MK}
for SRC in $SOURCES; do
echo >> ${CONFIG_MK}
SRC_LO="$(c2lo "$SRC")"
- lo_rule "$SRC" >> ${CONFIG_MK}
+ c_lo_rule "$SRC" >> ${CONFIG_MK}
echo " ${LIBTOOL} --tag=CC --mode=compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
done
diff --git a/update_sources b/update_sources
index 472d7d0..3e99e34 100755
--- a/update_sources
+++ b/update_sources
@@ -25,8 +25,6 @@ update_sources_sh
( cd libtommath && ./update_sources; )
( cd libc3 && ./update_sources; )
-( cd libc3/window/cairo/xcb && ./update_sources; )
-( cd libc3/window/cairo/xcb/demo && ./update_sources; )
( cd ic3 && ./update_sources; )
( cd c3s && ./update_sources; )
( cd test && ./update_sources; )