diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9f7348a1b..a408863b6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,4 +32,4 @@ If there is more than one issue fixed then use: ``` Fixes #XXX, fixes #YYY, fixes #ZZZ -``` \ No newline at end of file +``` diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 2e6e10615..a5dcc1f95 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -10,13 +10,44 @@ on: jobs: build: runs-on: ubuntu-latest + container: + image: ${{ matrix.os == 'alpine' && 'fvwmorg/fvwm3-build-alpine:latest' || 'fvwmorg/fvwm3-build:latest' }} + env: + GO111MODULE: "on" + + strategy: + matrix: + os: [ubuntu-latest, alpine] + build-system: [autotools, meson] + compiler: [gcc, clang] steps: - - uses: actions/checkout@v2 - - name: Pulling docker image - run: docker pull fvwmorg/fvwm3-build:latest - - name: Build Package - run: 'docker build -t fvwm3 .' + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set git safe directory + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} + + - name: Configure and Build + run: | + if [ "${{ matrix.build-system }}" = "autotools" ]; then + if [ "${{ matrix.compiler }}" = "gcc" ]; then + export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" + else + export CC_LD=lld + fi + export CC=${{ matrix.compiler }} + ./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j + fi + if [ "${{ matrix.build-system }}" = "meson" ]; then + if [ "${{ matrix.compiler }}" = "gcc" ]; then + export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" + else + export CC_LD=lld + fi + export CC=${{ matrix.compiler }} + meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir + fi notification: runs-on: ubuntu-20.04 @@ -26,7 +57,7 @@ jobs: uses: Gottox/irc-message-action@v2.1.3 if: github.event_name == 'pull_request' with: - server: "irc.libera.chat" + server: irc.libera.chat notice: false channel: "#fvwm" nickname: fvwm3-gh-pr @@ -35,8 +66,8 @@ jobs: uses: Gottox/irc-message-action@v2.1.3 if: github.event_name == 'create' && github.event.ref_type == 'tag' with: - server: "irc.libera.chat" + server: irc.libera.chat notice: false channel: "#fvwm" nickname: fvwm-gh - message: ${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }} \ No newline at end of file + message: ${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8664b5d19..54749a9b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,4 +53,4 @@ jobs: body: | Hello, This PR was created in response to a release workflow running. - I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}. \ No newline at end of file + I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}. diff --git a/acinclude.m4 b/acinclude.m4 index 5848d2dac..0745fd1e5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -946,6 +946,8 @@ AC_DEFUN([AM_GNU_FGETTEXT], if test "$no_dgettext" != "yes"; then CFLAGS="$CFLAGS $intl_LIBS $iconv_LIBS" LIBS="$LIBS $intl_LIBS $iconv_LIBS" + echo "LIBS: $LIBS" + echo "CFLAGS: $CFLAGS" AC_MSG_CHECKING(if a simple gettext program link) AC_TRY_LINK([ #include diff --git a/bin/FvwmPrompt/find-go-sources.sh b/bin/FvwmPrompt/find-go-sources.sh new file mode 100755 index 000000000..ca9acb31d --- /dev/null +++ b/bin/FvwmPrompt/find-go-sources.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Find all Go source files in the current directory and its subdirectories. +# That is all + +find "$(pwd)" -type f -name '*.go' diff --git a/bin/FvwmPrompt/meson.build b/bin/FvwmPrompt/meson.build new file mode 100644 index 000000000..d2e846e7e --- /dev/null +++ b/bin/FvwmPrompt/meson.build @@ -0,0 +1,28 @@ +# Fvwmprompt is written in golang. Unfortunately there is still +# no automagic in meson to handle golang projects. So we have to +# do it manually. + +# Extract all of the go sources from the current directory +r = run_command('find-go-sources.sh', meson.current_source_dir(), check: true) +fvwmprompt_files = r.stdout().strip().split() +fvwmprompt_files += 'go.mod' +fvwmprompt_files += 'go.sum' + +fvwmprompt_build = meson.current_source_dir() +fvwmprompt_output = meson.current_build_dir() + '/FvwmPrompt' + +fvwmprompt = custom_target( + 'FvwmPrompt', + output: 'FvwmPrompt', + input: fvwmprompt_files, + command: [ + golang, + 'build', + '-C', fvwmprompt_build, + '-v', + '-mod=vendor', + '-o', fvwmprompt_output, + ], + install: true, + install_dir: bindir, +) diff --git a/bin/fvwm-root.c b/bin/fvwm-root.c index f74f3f9c1..73a1bf4a1 100644 --- a/bin/fvwm-root.c +++ b/bin/fvwm-root.c @@ -22,6 +22,7 @@ #include "libs/Picture.h" #include "libs/Graphics.h" #include "libs/Fsvg.h" +#include "libs/log.h" int save_colors = 0; Display *dpy; diff --git a/bin/meson.build b/bin/meson.build new file mode 100644 index 000000000..e3fe043a7 --- /dev/null +++ b/bin/meson.build @@ -0,0 +1,72 @@ +if golang.found() + subdir('FvwmPrompt') +endif + +FvwmCommand = configure_file( + input: 'FvwmCommand.in', + output: 'FvwmCommand', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +# We should tighten up the dependencies here, but for now we'll just use all_found_deps. +fvwm_root = executable( + 'fvwm-root', + 'fvwm-root.c', + include_directories: includedirs, + link_with: libfvwm3, + dependencies: all_found_deps, + install: true, +) + +fvwm_perllib = configure_file( + input: 'fvwm-perllib.in', + output: 'fvwm-perllib', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +fvwm_convert = configure_file( + input: 'fvwm-convert-2.6.in', + output: 'fvwm-convert-2.6', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +fvwm_menu_xlock = configure_file( + input: 'fvwm-menu-xlock.in', + output: 'fvwm-menu-xlock', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +fvwm_menu_directory = configure_file( + input: 'fvwm-menu-directory.in', + output: 'fvwm-menu-directory', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +fvwm_menu_desktop = configure_file( + input: 'fvwm-menu-desktop.in', + output: 'fvwm-menu-desktop', + configuration: file_config, + install: true, + install_dir: bindir, + install_mode: install_mask_755, +) + +config_data = install_data( + 'fvwm-menu-desktop-config.fpl', + install_dir: fvwm_datadir, +) diff --git a/config_defines.h b/config_defines.h new file mode 100644 index 000000000..1dfc31cad --- /dev/null +++ b/config_defines.h @@ -0,0 +1,88 @@ +#include + +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_MEMORY_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif + +#if defined (HAVE_MALLOC_H) && !defined (__FreeBSD__) && !defined (__OpenBSD__) && !defined(__NetBSD__) +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif +#ifndef HAVE_STRCHR +# define strchr(_s,_c) index((_s),(_c)) +# define strrchr(_s,_c) rindex((_s),(_c)) +#endif + +#ifndef HAVE_MEMCPY +# define memcpy(_d,_s,_l) bcopy((_s),(_d),(_l)) +#endif +#ifndef HAVE_MEMMOVE +# define memmove(_d,_s,_l) bcopy((_s),(_d),(_l)) +#endif + +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + +#ifndef min +# define min(a,b) (((a)<(b)) ? (a) : (b)) +#endif +#ifndef max +# define max(a,b) (((a)>(b)) ? (a) : (b)) +#endif +#ifndef abs +# define abs(a) (((a)>=0)?(a):-(a)) +#endif + +//#include "libs/defaults.h" + +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 +#endif + +#ifdef HAVE_LSTAT +#define DO_USE_LSTAT 1 +#define fvwm_lstat(x,y) lstat(x,y) +#else +#define DO_USE_LSTAT 0 +#define fvwm_lstat(x,y) -1 +#endif + +/* A macro that touches a variable in a compiler independent way to suppress + * warnings. */ +#define SUPPRESS_UNUSED_VAR_WARNING(x) \ +do { void *p; p = (void *)&x; (void)p; } while (0); + +#ifdef HOST_MACOS +#undef HAVE_STRLCAT +#undef HAVE_STRLCPY +#else +#ifndef HAVE_STRLCAT +# include "libs/strlcat.h" +#endif + +#ifndef HAVE_STRLCPY +# include "libs/strlcpy.h" +#endif +#endif + +#ifndef HAVE_ASPRINTF +# include +int asprintf(char **, const char *, ...); +int vasprintf(char **, const char *, va_list); +#endif diff --git a/contrib/coccinelle/remove_unneccessary_pointer_checks.cocci b/contrib/coccinelle/remove_unneccessary_pointer_checks.cocci index 34ef1174f..dfd03d289 100644 --- a/contrib/coccinelle/remove_unneccessary_pointer_checks.cocci +++ b/contrib/coccinelle/remove_unneccessary_pointer_checks.cocci @@ -34,4 +34,4 @@ expression a, b; free(a); a = \(0 \| NULL\); } -) \ No newline at end of file +) diff --git a/default-config/config b/default-config/config index 07b853a73..4e1a83333 100644 --- a/default-config/config +++ b/default-config/config @@ -702,4 +702,4 @@ DestroyModuleConfig EventNewDesk:* # exists, then read it. This allows changes to default-config settings # without needing a full copy of the default-config. This will also allow # default-config changes to get used after upgrades (if applicable). -Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config \ No newline at end of file +Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config diff --git a/default-config/meson.build b/default-config/meson.build new file mode 100644 index 000000000..486705957 --- /dev/null +++ b/default-config/meson.build @@ -0,0 +1,53 @@ +default_confdir = join_paths( + get_option('datadir'), + meson.project_name(), + 'default-config', +) + +default_conf_files = [ + 'images/background/bg1.png', + 'images/background/bg2.png', + 'images/background/bg3.png', + 'images/bgicons/bg1.png', + 'images/bgicons/bg2.png', + 'images/bgicons/bg3.png', + 'images/icons/win/bottom.png', + 'images/icons/win/close.png', + 'images/icons/win/destroy.png', + 'images/icons/win/done.png', + 'images/icons/win/iconify.png', + 'images/icons/win/lower.png', + 'images/icons/win/max.png', + 'images/icons/win/move.png', + 'images/icons/win/raise.png', + 'images/icons/win/resize.png', + 'images/icons/win/sendto.png', + 'images/icons/win/shade.png', + 'images/icons/win/stays.png', + 'images/icons/win/sticky.png', + 'images/icons/win/title.png', + 'images/icons/win/top.png', + 'images/icons/apps.png', + 'images/icons/conf.png', + 'images/icons/help.png', + 'images/icons/info.png', + 'images/icons/programs.png', + 'images/icons/quit.png', + 'images/icons/refresh.png', + 'images/icons/restart.png', + 'images/icons/run_arrow.png', + 'images/icons/terminal.png', + 'images/icons/wallpaper.png', + 'images/fvwm-logo-small.png', + 'FvwmScript-ConfirmCopyConfig', + 'FvwmScript-ConfirmQuit', + 'FvwmScript-DateTime', + 'stalonetrayrc', + 'config', +] + +install_data( + default_conf_files, + install_dir: default_confdir, + preserve_path: true, +) diff --git a/dev-docs/DEVELOPERS.md b/dev-docs/DEVELOPERS.md index f578dcfad..a82b5cbe1 100644 --- a/dev-docs/DEVELOPERS.md +++ b/dev-docs/DEVELOPERS.md @@ -230,4 +230,4 @@ Updating fvwm-web 2. Update the `RELEASE` variable in `Makefile` to the desired version which has been released. 3. Run `make`. This will update all relevant files. -4. `git commit -a` the result, and push it out. \ No newline at end of file +4. `git commit -a` the result, and push it out. diff --git a/dev-docs/INSTALL.md b/dev-docs/INSTALL.md index 4b8c1c431..7a39e6edb 100644 --- a/dev-docs/INSTALL.md +++ b/dev-docs/INSTALL.md @@ -1,7 +1,8 @@ Installation Instructions ========================= -FVWM3 uses automake and autotools as its build process. +FVWM3 prefers `meson` as its build tool chain, but provides `autotools` as a +legacy fallback on older systems. Dependencies ============ @@ -49,33 +50,53 @@ system in use. Generating documentation ======================== +`fvwm3` won't compile documentation by default, so it's opt-in. + To generate `fvwm3`'s documentation: 1. Install `asciidoctor` -2. To generate manpages: pass `--enable-mandoc` to `./configure` -3. To generate HTML docs: pass `--enable-htmldoc` to `./configure` +2. To generate manpages: pass `-Dhtmldoc=true` to `meson` +3. To generate HTML docs: pass `-Dmandoc=true` to `meson` -`fvwm3` won't compile documentation by default, so it's opt-in. Installing From Git =================== -FVWM3 has a bootstrap script to generate `configure` and associated files. -Run the following command chain to generate the `configure` script and build -the project: +## Build Systems + +`fvwm3` has traditionally been using autotools. However, this is now +deprecated in favour of `meson`. It is suggested that all systems which +support `meson` use this instead as it is now the preferred build system to +use. + +The `autotools` build system remains to provide legacy support but is not +going to see any updates to it. + +### Autotools ``` -./autogen.sh && ./configure && make +./autogen.sh && ./configure && make && sudo make install +``` + +### Meson + +``` +meson setup build && ninja -C build && ninja -C build install ``` Installing From Release Tarball =============================== +## Autotools + Release tarballs will come bundled with `./configure` already, hence: ``` -./configure && make +./configure && make && sudo make install ``` -As with most things, if the default options `./configure` chooses isn't -appropriate for your needs, see `./configure --help` for appropriate options. \ No newline at end of file +## Meson + +``` +meson setup build && ninja -C build && meson install -C build +``` \ No newline at end of file diff --git a/dev-docs/TODO.md b/dev-docs/TODO.md index d6da9b7b1..45b34fd94 100644 --- a/dev-docs/TODO.md +++ b/dev-docs/TODO.md @@ -186,4 +186,4 @@ Items - StaysOnTop - StaysPut - StaysOnBottom - - Identify \ No newline at end of file + - Identify diff --git a/doc/FvwmMFL.adoc b/doc/FvwmMFL.adoc index 591aacec5..5ce122490 100644 --- a/doc/FvwmMFL.adoc +++ b/doc/FvwmMFL.adoc @@ -112,4 +112,4 @@ Outputs: == AUTHORS -This module first appeared in 2020. \ No newline at end of file +This module first appeared in 2020. diff --git a/doc/FvwmPager.adoc b/doc/FvwmPager.adoc index 624c5e51f..afef7d8bd 100644 --- a/doc/FvwmPager.adoc +++ b/doc/FvwmPager.adoc @@ -662,4 +662,4 @@ Robert Nation + DeskColor patch contributed by Alan Wild + MiniIcons & WindowColors patch contributed by Rob Whapham + Balloons patch by Ric Lister + -fvwm-workers: Dominik, Olivier, Hippo and others. \ No newline at end of file +fvwm-workers: Dominik, Olivier, Hippo and others. diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc index 43ee3631b..67139745e 100644 --- a/doc/fvwm3_manpage_source.adoc +++ b/doc/fvwm3_manpage_source.adoc @@ -9377,4 +9377,4 @@ refer to the COPYING file that came with fvwm for details. Bug reports can be sent to the fvwm-workers mailing list at -The official fvwm homepage is http://fvwm.org/ \ No newline at end of file +The official fvwm homepage is http://fvwm.org/ diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 000000000..2427cd231 --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,220 @@ +adoc_sources = [ + 'fvwm-convert-2.6.adoc', + 'fvwm-menu-desktop.adoc', + 'fvwm-menu-directory.adoc', + 'fvwm-menu-xlock.adoc', + 'fvwm-perllib.adoc', + 'fvwm-root.adoc', + 'fvwm3.adoc', + 'fvwm3all.adoc', + 'FvwmAnimate.adoc', + 'FvwmAuto.adoc', + 'FvwmBacker.adoc', + 'FvwmButtons.adoc', + 'FvwmCommand.adoc', + 'FvwmEvent.adoc', + 'FvwmForm.adoc', + 'FvwmIconMan.adoc', + 'FvwmIdent.adoc', + 'FvwmMFL.adoc', + 'FvwmPager.adoc', + 'FvwmPerl.adoc', + 'FvwmRearrange.adoc', + 'FvwmScript.adoc', +] + +# The adoc files in the repo for fvwm3-commands, fvwm3-menus, and fvwm3-styles +# are generated from the main manpage source file. We need to extract the +# relevant sections from the main file to generate the source file includes. +fs = import('fs') +main_file = 'fvwm3_manpage_source.adoc' + +# Custom build command for each source file +ad_build_targets = [] +sections = ['commands', 'menus', 'styles'] + +generate_ad_cmd = '@0@/meson-scripts/generate_ad_file.sh'.format(meson.project_source_root()) + +foreach sec : sections + outfile = f'fvwm3_@sec@.ad' + # We could use a generator here, but since multiple targets include + # the same file we would end up generating multiple times. Instead + # Just build each section once and include it in the targets that need it. + ad_build_targets += custom_target( + output: outfile, + input: main_file, + command: [generate_ad_cmd, sec, '@INPUT@'], + capture: true, + install: false, + ) +endforeach + +# We need to copy the stub adoc files to the build directory +# so that we can generate docs from them; asciidoc includes +# the files by path, so we need to make sure they are in the +# same directory as the generated includes. +needs_generated_source = [ + 'fvwm3commands.adoc', + 'fvwm3menus.adoc', + 'fvwm3styles.adoc', +] + +late_docs_targets = [] +foreach src : needs_generated_source + late_docs_targets += fs.copyfile(src) +endforeach + +html_pages = [] +if get_option('htmldoc') + + if get_option('docdir') != '' + htmldir = get_option('docdir') / 'html' + else + htmldir = get_option('datadir') / 'doc' / meson.project_name() / 'html' + endif + + # We need to configure index.html here to strip out whichever modules are unused. + # This is done by using sed to remove the lines that contain the module names. + index_src = 'index.adoc.in' + index_dst = 'index.adoc' + if golang.found() + index = configure_file( + input: index_src, + output: index_dst, + command: [ + sed, + '-e', '/FvwmConsole.adoc/d', + '@INPUT@', + ], + capture: true, + ) + adoc_sources += ['FvwmPrompt.adoc'] + else + index = configure_file( + input: index_src, + output: index_dst, + command: [sed, '-e', '/FvwmPrompt.adoc/d', '@INPUT@'], + capture: true, + ) + adoc_sources += ['FvwmConsole.adoc'] + endif + + html_sources = adoc_sources + + foreach source : html_sources + dest = source.replace('.adoc', '.html') + doc_name_attribute = source.replace( + '.adoc', + '', + ) + html_pages += custom_target( + dest, + input: source, + output: dest, + command: [ + asciidoc, + '-b', 'html5', + '-a', 'toc', + '-a', 'webfonts!', + '-a', doc_name_attribute, + '-o', '@OUTPUT@', + '@INPUT@', + ], + install: true, + install_dir: htmldir, + ) + endforeach + + foreach source : late_docs_targets + # We can use the full_path method on a given custom_target to derive + # the filename, then replace the extension to get our output. + dest = source.full_path().split('/')[-1].replace('.adoc', '.html') + doc_name_attribute = source.full_path().split('/')[-1].replace( + '.adoc', + '', + ) + html_pages += custom_target( + dest, + input: source, + output: dest, + command: [ + asciidoc, + '-b', 'html5', + '-a', 'toc', + '-a', 'webfonts!', + '-a', doc_name_attribute, + '-o', '@OUTPUT@', + '@INPUT@', + ], + install: true, + install_dir: htmldir, + depends: ad_build_targets, + ) + endforeach + + custom_target( + 'index.html', + input: index, + output: 'index.html', + command: [ + asciidoc, + '-b', 'html5', + '-a', 'toc', + '-a', 'webfonts!', + '-a', 'index', + '-o', '@OUTPUT@', + '@INPUT@', + ], + install: true, + install_dir: htmldir, + ) +endif + +man_pages = [] +if get_option('mandoc') + # Each of the mans in the current makefile gets installed to man1 + foreach source : adoc_sources + dest = source.replace('.adoc', '.1') + doc_name_attribute = source.replace( + '.adoc', + '', + ) + man_pages += custom_target( + dest, + input: source, + output: dest, + command: [ + asciidoc, + '-b', 'manpage', + '-a', doc_name_attribute, + '-o', '@OUTPUT@', + '@INPUT@', + ], + install: true, + install_dir: join_paths(get_option('mandir'), 'man1'), + ) + endforeach + + foreach source : late_docs_targets + dest = source.full_path().split('/')[-1].replace('.adoc', '.1') + doc_name_attribute = source.full_path().split('/')[-1].replace( + '.adoc', + '', + ) + man_pages += custom_target( + dest, + input: source, + output: dest, + command: [ + asciidoc, + '-b', 'manpage', + '-a', doc_name_attribute, + '-o', '@OUTPUT@', + '@INPUT@', + ], + install: true, + install_dir: join_paths(get_option('mandir'), 'man1'), + depends: ad_build_targets, + ) + endforeach +endif \ No newline at end of file diff --git a/fvwm/Makefile.am b/fvwm/Makefile.am index bb04b6d22..7f4ea0b94 100644 --- a/fvwm/Makefile.am +++ b/fvwm/Makefile.am @@ -49,5 +49,4 @@ AM_CFLAGS = \ -DFVWM_MODULEDIR=\"$(FVWM_MODULEDIR)\" \ -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" \ -DFVWM_CONFDIR=\"$(FVWM_CONFDIR)\" \ - -DFVWM_COLORSET_PRIVATE=1 \ -DLOCALEDIR=\"$(LOCALEDIR)\" diff --git a/fvwm/add_window.c b/fvwm/add_window.c index bdae60546..1a4e669b6 100644 --- a/fvwm/add_window.c +++ b/fvwm/add_window.c @@ -50,6 +50,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/FShape.h" #include "libs/FEvent.h" #include "libs/Picture.h" diff --git a/fvwm/bindings.c b/fvwm/bindings.c index 76b74bb1e..344d587c7 100644 --- a/fvwm/bindings.c +++ b/fvwm/bindings.c @@ -20,6 +20,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/charmap.h" #include "libs/wcontext.h" #include "libs/modifiers.h" diff --git a/fvwm/borders.c b/fvwm/borders.c index 1f10814ed..4079562c7 100644 --- a/fvwm/borders.c +++ b/fvwm/borders.c @@ -31,6 +31,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Parse.h" #include "libs/Graphics.h" #include "libs/Picture.h" diff --git a/fvwm/builtins.c b/fvwm/builtins.c index 91ca2c123..3819d4480 100644 --- a/fvwm/builtins.c +++ b/fvwm/builtins.c @@ -27,6 +27,7 @@ #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" #include "libs/fvwmsignal.h" +#include "libs/log.h" #include "libs/cJSON.h" #include "libs/setpgrp.h" #include "libs/Grab.h" @@ -4018,4 +4019,4 @@ void CMD_State(F_CMD_ARGS) } return; -} \ No newline at end of file +} diff --git a/fvwm/cmdparser_old.c b/fvwm/cmdparser_old.c index 1aa016cec..ab08562c1 100644 --- a/fvwm/cmdparser_old.c +++ b/fvwm/cmdparser_old.c @@ -19,6 +19,7 @@ #include "config.h" #include "libs/defaults.h" #include "libs/Parse.h" +#include "libs/log.h" #include #include diff --git a/fvwm/colorset.c b/fvwm/colorset.c index 56aa5e480..64ee392d3 100644 --- a/fvwm/colorset.c +++ b/fvwm/colorset.c @@ -26,6 +26,7 @@ #include "config.h" +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" #include "libs/Parse.h" diff --git a/fvwm/conditional.c b/fvwm/conditional.c index b416da739..d621f50b8 100644 --- a/fvwm/conditional.c +++ b/fvwm/conditional.c @@ -26,6 +26,7 @@ #include "libs/charmap.h" #include "libs/FEvent.h" #include "libs/wcontext.h" +#include "libs/log.h" #include "fvwm.h" #include "externs.h" #include "cmdparser.h" diff --git a/fvwm/cursor.c b/fvwm/cursor.c index a51d6b15d..3fa96fad4 100644 --- a/fvwm/cursor.c +++ b/fvwm/cursor.c @@ -25,6 +25,8 @@ #include "libs/Parse.h" #include "libs/Strings.h" #include "libs/FEvent.h" +#include "libs/fvwmsignal.h" +#include "libs/log.h" #include "fvwm.h" #include "libs/PictureImageLoader.h" #include "externs.h" @@ -541,4 +543,4 @@ void CMD_BusyCursor(F_CMD_ARGS) } return; -} \ No newline at end of file +} diff --git a/fvwm/events.c b/fvwm/events.c index 065cdd460..7b52d2ff0 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -60,6 +60,7 @@ #include "libs/fvwm_x11.h" #include "libs/ftime.h" #include "libs/fvwmlib.h" +#include "libs/fvwmsignal.h" #include "libs/System.h" #include "libs/Grab.h" #include "libs/Parse.h" @@ -70,6 +71,7 @@ #include "libs/charmap.h" #include "libs/wcontext.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "fvwm.h" #include "externs.h" #include "cmdparser.h" diff --git a/fvwm/ewmh.c b/fvwm/ewmh.c index 4b7e20d57..02eda3d93 100644 --- a/fvwm/ewmh.c +++ b/fvwm/ewmh.c @@ -58,6 +58,7 @@ #include #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "fvwm.h" #include "cmdparser.h" #include "execcontext.h" @@ -2062,4 +2063,4 @@ void EWMH_fullscreen(FvwmWindow *fw) } return; -} \ No newline at end of file +} diff --git a/fvwm/ewmh_conf.c b/fvwm/ewmh_conf.c index 6e4db95e3..5e41bb64d 100644 --- a/fvwm/ewmh_conf.c +++ b/fvwm/ewmh_conf.c @@ -22,6 +22,7 @@ #include "libs/fvwmlib.h" #include "libs/Parse.h" #include "libs/Strings.h" +#include "libs/log.h" #include "fvwm.h" #include "cursor.h" #include "functions.h" @@ -379,4 +380,4 @@ Bool EWMH_CMD_Style(char *token, window_style *ptmpstyle, int on) S_SET_DO_EWMH_IGNORE_WINDOW_TYPE(SCC(*ptmpstyle), 1); } return found; -} \ No newline at end of file +} diff --git a/fvwm/ewmh_events.c b/fvwm/ewmh_events.c index 6eefd1ff0..842ddba63 100644 --- a/fvwm/ewmh_events.c +++ b/fvwm/ewmh_events.c @@ -21,6 +21,7 @@ #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" #include "libs/Strings.h" +#include "libs/log.h" #include "fvwm.h" #include "externs.h" #include "execcontext.h" @@ -1688,4 +1689,4 @@ void EWMH_ProcessPropertyNotify(const exec_context_t *exc) } } -} \ No newline at end of file +} diff --git a/fvwm/ewmh_icons.c b/fvwm/ewmh_icons.c index 13f9191e6..b6751dff6 100644 --- a/fvwm/ewmh_icons.c +++ b/fvwm/ewmh_icons.c @@ -27,6 +27,7 @@ #include "libs/FRenderInit.h" #include "libs/Graphics.h" #include "libs/Strings.h" +#include "libs/log.h" #include "fvwm.h" #include "externs.h" #include "window_flags.h" diff --git a/fvwm/execcontext.c b/fvwm/execcontext.c index e2d1eb32e..657d650e8 100644 --- a/fvwm/execcontext.c +++ b/fvwm/execcontext.c @@ -23,6 +23,7 @@ #include "externs.h" #include "execcontext.h" #include "libs/FEvent.h" +#include "libs/log.h" #undef PEVENT_PRIVILEGED_ACCESS diff --git a/fvwm/expand.c b/fvwm/expand.c index 9659cf8d2..3753fe929 100644 --- a/fvwm/expand.c +++ b/fvwm/expand.c @@ -1767,4 +1767,4 @@ char *expand_vars( out[j] = 0; return out; -} \ No newline at end of file +} diff --git a/fvwm/frame.c b/fvwm/frame.c index ab29721d1..68d204aa7 100644 --- a/fvwm/frame.c +++ b/fvwm/frame.c @@ -21,6 +21,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/FShape.h" #include "libs/Grab.h" #include "libs/charmap.h" diff --git a/fvwm/functable_complex.c b/fvwm/functable_complex.c index 28597b107..849c30f2b 100644 --- a/fvwm/functable_complex.c +++ b/fvwm/functable_complex.c @@ -19,6 +19,7 @@ #include "config.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Picture.h" #include "libs/Strings.h" diff --git a/fvwm/functions.c b/fvwm/functions.c index a17df7f92..ac54e3ec6 100644 --- a/fvwm/functions.c +++ b/fvwm/functions.c @@ -30,6 +30,7 @@ #define assert(x) do { } while (0) #endif +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" #include "libs/charmap.h" diff --git a/fvwm/fvwm3.c b/fvwm/fvwm3.c index 58e7fc460..83f45534d 100644 --- a/fvwm/fvwm3.c +++ b/fvwm/fvwm3.c @@ -31,6 +31,7 @@ #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/envvar.h" #include "libs/Strings.h" #include "libs/System.h" @@ -2396,4 +2397,4 @@ int main(int argc, char **argv) } exit(0); -} \ No newline at end of file +} diff --git a/fvwm/icccm2.c b/fvwm/icccm2.c index d81ac936c..7312c72e5 100644 --- a/fvwm/icccm2.c +++ b/fvwm/icccm2.c @@ -20,6 +20,7 @@ #include #endif +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/FEvent.h" #include "fvwm.h" diff --git a/fvwm/icons.c b/fvwm/icons.c index 4bd9bbe7b..f5b25ade6 100644 --- a/fvwm/icons.c +++ b/fvwm/icons.c @@ -26,6 +26,7 @@ #include #endif +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/FShape.h" #include "libs/Parse.h" diff --git a/fvwm/infostore.c b/fvwm/infostore.c index 3695c4323..6ba561ced 100644 --- a/fvwm/infostore.c +++ b/fvwm/infostore.c @@ -19,6 +19,7 @@ #include #include "fvwm.h" #include "externs.h" +#include "libs/log.h" #include "libs/FGettext.h" #include "libs/Parse.h" #include "libs/Strings.h" diff --git a/fvwm/menubindings.c b/fvwm/menubindings.c index 97542959c..0aea3e7c6 100644 --- a/fvwm/menubindings.c +++ b/fvwm/menubindings.c @@ -19,6 +19,7 @@ #include +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/Parse.h" #include "libs/Bindings.h" diff --git a/fvwm/menucmd.c b/fvwm/menucmd.c index 60d65c269..b5e653840 100644 --- a/fvwm/menucmd.c +++ b/fvwm/menucmd.c @@ -23,6 +23,7 @@ #include +#include "libs/log.h" #include "libs/Parse.h" #include "libs/Strings.h" #include "fvwm.h" diff --git a/fvwm/menus.c b/fvwm/menus.c index beaadb5f9..17701d97c 100644 --- a/fvwm/menus.c +++ b/fvwm/menus.c @@ -23,6 +23,7 @@ #include #include +#include "libs/log.h" #include "libs/ftime.h" #include "libs/fvwmlib.h" #include "libs/Grab.h" diff --git a/fvwm/menustyle.c b/fvwm/menustyle.c index 814736cea..62fac5d1c 100644 --- a/fvwm/menustyle.c +++ b/fvwm/menustyle.c @@ -19,6 +19,7 @@ #include #include +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" #include "libs/Parse.h" diff --git a/fvwm/meson.build b/fvwm/meson.build new file mode 100644 index 000000000..085a99340 --- /dev/null +++ b/fvwm/meson.build @@ -0,0 +1,56 @@ +fvwm_sources = [ + 'fvwm/add_window.c', + 'fvwm/bindings.c', + 'fvwm/borders.c', + 'fvwm/builtins.c', + 'fvwm/cmdparser_old.c', + 'fvwm/colormaps.c', + 'fvwm/colorset.c', + 'fvwm/conditional.c', + 'fvwm/condrc.c', + 'fvwm/cursor.c', + 'fvwm/decorations.c', + 'fvwm/events.c', + 'fvwm/ewmh.c', + 'fvwm/ewmh_conf.c', + 'fvwm/ewmh_events.c', + 'fvwm/ewmh_icons.c', + 'fvwm/ewmh_names.c', + 'fvwm/execcontext.c', + 'fvwm/expand.c', + 'fvwm/focus.c', + 'fvwm/focus_policy.c', + 'fvwm/frame.c', + 'fvwm/functable.c', + 'fvwm/functable_complex.c', + 'fvwm/functions.c', + 'fvwm/fvwm3.c', + 'fvwm/geometry.c', + 'fvwm/icccm2.c', + 'fvwm/icons.c', + 'fvwm/infostore.c', + 'fvwm/menubindings.c', + 'fvwm/menucmd.c', + 'fvwm/menudim.c', + 'fvwm/menugeometry.c', + 'fvwm/menuitem.c', + 'fvwm/menus.c', + 'fvwm/menustyle.c', + 'fvwm/misc.c', + 'fvwm/modconf.c', + 'fvwm/module_interface.c', + 'fvwm/module_list.c', + 'fvwm/move_resize.c', + 'fvwm/placement.c', + 'fvwm/read.c', + 'fvwm/schedule.c', + 'fvwm/session.c', + 'fvwm/stack.c', + 'fvwm/style.c', + 'fvwm/update.c', + 'fvwm/virtual.c', + 'fvwm/windowlist.c', + 'fvwm/windowshade.c', +] + +install_data('ConfigFvwmDefaults', install_dir: fvwm_datadir) diff --git a/fvwm/misc.c b/fvwm/misc.c index 7f559e1af..61ebf8eb5 100644 --- a/fvwm/misc.c +++ b/fvwm/misc.c @@ -20,6 +20,7 @@ #include #include +#include "libs/log.h" #include "libs/fvwm_x11.h" #include "libs/ftime.h" #include "libs/Parse.h" diff --git a/fvwm/module_interface.c b/fvwm/module_interface.c index 3eb11d13d..e7956e33d 100644 --- a/fvwm/module_interface.c +++ b/fvwm/module_interface.c @@ -24,6 +24,7 @@ #include #include +#include "libs/log.h" #include "libs/ftime.h" #include "libs/fvwmlib.h" #include "libs/ColorUtils.h" diff --git a/fvwm/module_list.c b/fvwm/module_list.c index 931f0c24d..6b0d38092 100644 --- a/fvwm/module_list.c +++ b/fvwm/module_list.c @@ -20,6 +20,9 @@ #include #endif +/* for time(); difftime() */ +#include + /* for F_CMD_ARGS */ #include "fvwm/fvwm.h" #include "execcontext.h" @@ -42,6 +45,8 @@ /* for module syncronous */ #include "libs/ftime.h" +#include "libs/fvwmsignal.h" +#include "libs/log.h" #include "libs/System.c" #include "libs/envvar.h" #include "libs/Parse.h" diff --git a/fvwm/move_resize.c b/fvwm/move_resize.c index 8fa776903..5e17e36b6 100644 --- a/fvwm/move_resize.c +++ b/fvwm/move_resize.c @@ -25,6 +25,7 @@ #include #include +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/Picture.h" #include "libs/Grab.h" @@ -5700,4 +5701,4 @@ void CMD_StickAcrossDesks(F_CMD_ARGS) handle_stick_across_desks(F_PASS_ARGS, toggle, 0, 0); return; -} \ No newline at end of file +} diff --git a/fvwm/placement.c b/fvwm/placement.c index 4e845aa94..ff82e4b9b 100644 --- a/fvwm/placement.c +++ b/fvwm/placement.c @@ -20,6 +20,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Grab.h" #include "libs/Parse.h" #include "libs/XResource.h" @@ -2525,4 +2526,4 @@ void CMD_PlaceAgain(F_CMD_ARGS) } return; -} \ No newline at end of file +} diff --git a/fvwm/read.c b/fvwm/read.c index 8e1f8d8cf..f8a84056d 100644 --- a/fvwm/read.c +++ b/fvwm/read.c @@ -24,6 +24,7 @@ #include #endif +#include "libs/log.h" #include "libs/Parse.h" #include "libs/Strings.h" #include "fvwm.h" diff --git a/fvwm/schedule.c b/fvwm/schedule.c index 33bfaf1ee..2ca18b843 100644 --- a/fvwm/schedule.c +++ b/fvwm/schedule.c @@ -17,6 +17,7 @@ #include +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/fqueue.h" #include "libs/charmap.h" diff --git a/fvwm/session.c b/fvwm/session.c index b3a099639..5ec4fdd51 100644 --- a/fvwm/session.c +++ b/fvwm/session.c @@ -31,6 +31,7 @@ #include "libs/fvwm_x11.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/FSMlib.h" #include "libs/Strings.h" #include "libs/System.h" @@ -1947,4 +1948,4 @@ void CMD_SaveQuitSession(F_CMD_ARGS) save_quit_session(); return; -} \ No newline at end of file +} diff --git a/fvwm/stack.c b/fvwm/stack.c index a032da0ea..af84de82d 100644 --- a/fvwm/stack.c +++ b/fvwm/stack.c @@ -21,6 +21,7 @@ #include #include +#include "libs/log.h" #include "libs/ftime.h" #include "libs/fvwmlib.h" #include "libs/gravity.h" diff --git a/fvwm/style.c b/fvwm/style.c index f984af0e4..0b78913e1 100644 --- a/fvwm/style.c +++ b/fvwm/style.c @@ -21,6 +21,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/charmap.h" #include "libs/modifiers.h" #include "libs/ColorUtils.h" @@ -5454,4 +5455,4 @@ void CMD_DestroyWindowStyle(F_CMD_ARGS) /* Do it */ style_destroy_style(s_id); return; -} \ No newline at end of file +} diff --git a/fvwm/update.c b/fvwm/update.c index 77800d400..23953c589 100644 --- a/fvwm/update.c +++ b/fvwm/update.c @@ -817,4 +817,4 @@ void CMD_UpdateStyles(F_CMD_ARGS) } return; -} \ No newline at end of file +} diff --git a/fvwm/virtual.c b/fvwm/virtual.c index 9865b2282..8746c3a19 100644 --- a/fvwm/virtual.c +++ b/fvwm/virtual.c @@ -21,6 +21,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/FGettext.h" #include "libs/Grab.h" #include "libs/Parse.h" diff --git a/fvwm/windowlist.c b/fvwm/windowlist.c index f9f2e3626..62c5de940 100644 --- a/fvwm/windowlist.c +++ b/fvwm/windowlist.c @@ -24,6 +24,7 @@ #include #include +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/FGettext.h" #include "libs/Parse.h" diff --git a/fvwm/windowshade.c b/fvwm/windowshade.c index bc39350df..dff561551 100644 --- a/fvwm/windowshade.c +++ b/fvwm/windowshade.c @@ -19,6 +19,7 @@ #include +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/Parse.h" #include "libs/Strings.h" diff --git a/libs/BidiJoin.c b/libs/BidiJoin.c index 166c8a43c..6bc50dc85 100644 --- a/libs/BidiJoin.c +++ b/libs/BidiJoin.c @@ -26,7 +26,7 @@ #include "config.h" -#if HAVE_BIDI +#ifdef HAVE_BIDI #include "fvwmlib.h" #include "BidiJoin.h" diff --git a/libs/BidiJoin.h b/libs/BidiJoin.h index 77510df78..5b9290d5f 100644 --- a/libs/BidiJoin.h +++ b/libs/BidiJoin.h @@ -12,7 +12,7 @@ #include "config.h" -#if HAVE_BIDI +#ifdef HAVE_BIDI #include diff --git a/libs/Bindings.c b/libs/Bindings.c index 386240df0..496ef7538 100644 --- a/libs/Bindings.c +++ b/libs/Bindings.c @@ -22,6 +22,7 @@ #include #include "libs/fvwmlib.h" +#include "libs/defaults.h" #include "libs/Strings.h" #include "libs/wild.h" #include "libs/Grab.h" diff --git a/libs/ColorUtils.c b/libs/ColorUtils.c index 3f29c39ca..8cfecc308 100644 --- a/libs/ColorUtils.c +++ b/libs/ColorUtils.c @@ -40,6 +40,7 @@ #include "PictureBase.h" #include "PictureUtils.h" #include "ColorUtils.h" +#include "log.h" #define PCT_BRIGHTNESS (6 * 0xffff / 100) diff --git a/libs/Colorset.h b/libs/Colorset.h index 577c1f5bd..c5a606c5c 100644 --- a/libs/Colorset.h +++ b/libs/Colorset.h @@ -32,8 +32,6 @@ typedef struct Colorset unsigned int tint_percent : 7; unsigned int icon_alpha_percent : 7; unsigned int icon_tint_percent : 7; -#ifdef FVWM_COLORSET_PRIVATE - /* fvwm/colorset.c use only */ Pixel fg_tint; Pixel fg_saved; Pixel bg_tint; @@ -53,7 +51,6 @@ typedef struct Colorset Bool dither; Bool allows_buffered_transparency; Bool is_maybe_root_transparent; -#endif } colorset_t; #define PIXMAP_TILED 0 @@ -68,7 +65,6 @@ typedef struct Colorset #define SHAPE_STRETCH 1 #define SHAPE_STRETCH_ASPECT 2 -#ifdef FVWM_COLORSET_PRIVATE #define FG_SUPPLIED 0x1 #define BG_SUPPLIED 0x2 #define HI_SUPPLIED 0x4 @@ -80,7 +76,6 @@ typedef struct Colorset #define FG_TINT_SUPPLIED 0x100 #define BG_TINT_SUPPLIED 0x200 #define ICON_TINT_SUPPLIED 0x400 -#endif /* colorsets are stored as an array of structs to permit fast dereferencing */ extern colorset_t *Colorset; @@ -155,11 +150,9 @@ extern colorset_t *Colorset; (cset != NULL && cset->pixmap == ParentRelative && \ cset->tint_percent > 0) -#ifndef FVWM_COLORSET_PRIVATE /* Create n new colorsets, fvwm/colorset.c does its own thing (different size) */ void AllocColorset(int n); -#endif /* dump one */ char *DumpColorset(int n, colorset_t *colorset); diff --git a/libs/FEvent.c b/libs/FEvent.c index dc9655a38..39c9c9c2c 100644 --- a/libs/FEvent.c +++ b/libs/FEvent.c @@ -35,6 +35,7 @@ #endif #endif +#include "libs/defaults.h" #include "libs/FEvent.h" #include "libs/ftime.h" diff --git a/libs/FGettext.c b/libs/FGettext.c index 0b34742dc..8acd44ef0 100644 --- a/libs/FGettext.c +++ b/libs/FGettext.c @@ -26,6 +26,7 @@ #include "FGettext.h" #include "locale.h" +#include "log.h" /* ---------------------------- local definitions -------------------------- */ diff --git a/libs/FRender.c b/libs/FRender.c index 6a9b22237..7f2835864 100644 --- a/libs/FRender.c +++ b/libs/FRender.c @@ -29,6 +29,7 @@ #include "FRenderInit.h" #include "FRender.h" #include "FRenderInterface.h" +#include "log.h" /* ---------------------------- local definitions -------------------------- */ diff --git a/libs/FScreen.c b/libs/FScreen.c index 6cc1693d6..e728d9df7 100644 --- a/libs/FScreen.c +++ b/libs/FScreen.c @@ -15,22 +15,23 @@ #include "config.h" -#include -#include -#include -#include -#include #include -#include #include +#include +#include +#include +#include +#include +#include +#include -#include "log.h" #include "defaults.h" +#include "FEvent.h" +#include "FScreen.h" #include "fvwmlib.h" +#include "log.h" #include "Parse.h" #include "PictureBase.h" -#include "FScreen.h" -#include "FEvent.h" #include "queue.h" #include "strtonum.h" diff --git a/libs/FScreen.h b/libs/FScreen.h index 2e701854a..809f5530e 100644 --- a/libs/FScreen.h +++ b/libs/FScreen.h @@ -222,4 +222,4 @@ int FScreenGetGeometry( void FScreenMangleScreenIntoUSPosHints(fscreen_scr_t screen, XSizeHints *hints); int FScreenFetchMangledScreenFromUSPosHints(XSizeHints *hints); -#endif /* FVWMLIB_FSCRREN_H */ \ No newline at end of file +#endif /* FVWMLIB_FSCRREN_H */ diff --git a/libs/Fft.c b/libs/Fft.c index a8938dcff..e768007f1 100644 --- a/libs/Fft.c +++ b/libs/Fft.c @@ -30,6 +30,7 @@ #include "FftInterface.h" #include "FRenderInit.h" #include "PictureBase.h" +#include "log.h" /* ---------------------------- local definitions -------------------------- */ diff --git a/libs/Ficonv.c b/libs/Ficonv.c index 708a39bd9..ef003fe68 100644 --- a/libs/Ficonv.c +++ b/libs/Ficonv.c @@ -29,6 +29,7 @@ #include "FlocaleCharset.h" #include "Ficonv.h" #include "Strings.h" +#include "log.h" #if FiconvSupport #include diff --git a/libs/Flocale.c b/libs/Flocale.c index 36d9a217a..49c4420c2 100644 --- a/libs/Flocale.c +++ b/libs/Flocale.c @@ -57,6 +57,7 @@ #include "Colorset.h" #include "Ficonv.h" #include "CombineChars.h" +#include "log.h" /* ---------------------------- local definitions -------------------------- */ diff --git a/libs/FlocaleCharset.c b/libs/FlocaleCharset.c index ff9c56a36..b73484839 100644 --- a/libs/FlocaleCharset.c +++ b/libs/FlocaleCharset.c @@ -28,6 +28,8 @@ #include "FlocaleCharset.h" #include "Ficonv.h" +#include "log.h" + #if FlocaleLibcharsetSupport #include #endif diff --git a/libs/Fpng.h b/libs/Fpng.h index 54c91063a..f422c8c23 100644 --- a/libs/Fpng.h +++ b/libs/Fpng.h @@ -439,6 +439,7 @@ typedef Fpng_struct **Fpng_structpp; #define Fpng_destroy_read_struct(a,b,c) png_destroy_read_struct(a,b,c) #define Fpng_init_io(a,b) png_init_io(a,b) #define Fpng_read_info(a,b) png_read_info(a,b) +#define Fpng_get_color_type(a, b) png_get_color_type(a, b) #define Fpng_get_IHDR(a,b,c,d,e,f,g,h,i) png_get_IHDR(a,b,c,d,e,f,g,h,i) #define Fpng_set_expand(a) png_set_expand(a) #define Fpng_set_swap_alpha(a) png_set_swap_alpha(a) @@ -471,9 +472,10 @@ typedef Fpng_struct **Fpng_structpp; #define FPNG_INFO_tRNS 7 #define Fpng_check_sig(a,b) 0 -#define Fpng_create_read_struct(a,b,c,d) NULL #define Fpng_create_info_struct(a) NULL +#define Fpng_create_read_struct(a,b,c,d) NULL #define Fpng_destroy_read_struct(a,b,c) +#define Fpng_get_color_type(a, b) 0 #define Fpng_init_io(a,b) #define Fpng_read_info(a,b) #define Fpng_get_IHDR(a,b,c,d,e,f,g,h,i) diff --git a/libs/Graphics.c b/libs/Graphics.c index 4b632f6f2..48208f274 100644 --- a/libs/Graphics.c +++ b/libs/Graphics.c @@ -24,6 +24,7 @@ #include #include "defaults.h" +#include "log.h" #include "libs/fvwmlib.h" #include "libs/Parse.h" #include "libs/PictureBase.h" diff --git a/libs/Makefile.am b/libs/Makefile.am index 101e4190f..f4f0e8043 100644 --- a/libs/Makefile.am +++ b/libs/Makefile.am @@ -40,4 +40,4 @@ libfvwm3_a_LIBADD = @LIBOBJS@ AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) \ - $(rsvg_CFLAGS) $(intl_CFLAGS) $(XRandR_CFLAGS) \ No newline at end of file + $(rsvg_CFLAGS) $(intl_CFLAGS) $(XRandR_CFLAGS) diff --git a/libs/Picture.c b/libs/Picture.c index ba274300b..67057571e 100644 --- a/libs/Picture.c +++ b/libs/Picture.c @@ -43,6 +43,7 @@ #include "Picture.h" #include "PictureUtils.h" #include "Fsvg.h" +#include "log.h" static FvwmPicture *FvwmPictureList=NULL; diff --git a/libs/PictureImageLoader.c b/libs/PictureImageLoader.c index 8bef4a6a0..c5a80ced4 100644 --- a/libs/PictureImageLoader.c +++ b/libs/PictureImageLoader.c @@ -34,7 +34,9 @@ #include #include -#include +#include "fvwmlib.h" +#include "defaults.h" +#include "log.h" #include "System.h" #include "Strings.h" #include "Picture.h" @@ -58,11 +60,7 @@ typedef struct PImageLoader { char *extension; -#ifdef __STDC__ int (*func)(FIMAGE_CMD_ARGS); -#else - int (*func)(); -#endif } PImageLoader; /* ---------------------------- local macros ------------------------------- */ @@ -75,7 +73,11 @@ typedef struct PImageLoader /* ---------------------------- forward declarations ----------------------- */ +#ifdef USE_SVG static Bool PImageLoadSvg(FIMAGE_CMD_ARGS); +#else +#define PImageLoadSvg(a,b,c,d,e) (0) +#endif static Bool PImageLoadPng(FIMAGE_CMD_ARGS); static Bool PImageLoadXpm(FIMAGE_CMD_ARGS); @@ -139,6 +141,7 @@ Bool PImageLoadArgbDataFromFile(FIMAGE_CMD_ARGS) * svg loader * */ +#if USE_SVG static Bool PImageLoadSvg(FIMAGE_CMD_ARGS) { @@ -411,6 +414,13 @@ Bool PImageLoadSvg(FIMAGE_CMD_ARGS) return True; } +#else +static Bool +PImageLoadSvg(FIMAGE_CMD_ARGS) +{ + return (True); +} +#endif /* * @@ -508,16 +518,16 @@ Bool PImageLoadPng(FIMAGE_CMD_ARGS) * this fail to build on much older libpng versions which we support * (pre 1.3), then I might have to. */ - if (png_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_RGB_ALPHA) + if (Fpng_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_RGB_ALPHA) { hasa = 1; } - if (png_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_GRAY_ALPHA) + if (Fpng_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_GRAY_ALPHA) { hasa = 1; hasg = 1; } - if (png_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_GRAY) + if (Fpng_get_color_type(Fpng_ptr, Finfo_ptr) == FPNG_COLOR_TYPE_GRAY) { hasg = 1; } diff --git a/libs/PictureUtils.c b/libs/PictureUtils.c index 6c4a9242f..e8d86cd50 100644 --- a/libs/PictureUtils.c +++ b/libs/PictureUtils.c @@ -23,10 +23,11 @@ #include #include #include +#include #include #include - +#include "log.h" #include "fvwmlib.h" #include "envvar.h" #include "Grab.h" diff --git a/libs/System.c b/libs/System.c index 96ae64e22..91ceaa3f6 100644 --- a/libs/System.c +++ b/libs/System.c @@ -22,6 +22,7 @@ #include "envvar.h" #include "System.h" #include "Strings.h" +#include "log.h" #if HAVE_UNAME #include diff --git a/libs/Target.c b/libs/Target.c index f76c84e1f..b04db742b 100644 --- a/libs/Target.c +++ b/libs/Target.c @@ -31,6 +31,8 @@ #include #include "fvwmlib.h" +#include "defaults.h" +#include "log.h" #include "Grab.h" #include "Target.h" #include "FEvent.h" diff --git a/libs/XError.c b/libs/XError.c index 2e79242de..47afcac53 100644 --- a/libs/XError.c +++ b/libs/XError.c @@ -25,6 +25,8 @@ #include #include "FRenderInit.h" #include "XError.h" +#include "log.h" + #undef XSetErrorHandler #define USE_GET_ERROR_TEXT 1 diff --git a/libs/fsm.c b/libs/fsm.c index dba5f0b2c..cfac128bd 100644 --- a/libs/fsm.c +++ b/libs/fsm.c @@ -40,6 +40,7 @@ extern void _IceTransNoListen(char *protocol); #endif #include "fvwmlib.h" +#include "log.h" #include "System.h" #include "flist.h" #include "fsm.h" diff --git a/libs/fsm.h b/libs/fsm.h index b4ebcec79..75248031b 100644 --- a/libs/fsm.h +++ b/libs/fsm.h @@ -5,7 +5,7 @@ /* ---------------------------- included header files ---------------------- */ #include "FSMlib.h" - +#include /* ---------------------------- global definitions ------------------------- */ /* ---------------------------- global macros ------------------------------ */ diff --git a/libs/ftime.h b/libs/ftime.h index 6cb3640d4..f53469c26 100644 --- a/libs/ftime.h +++ b/libs/ftime.h @@ -5,11 +5,11 @@ #include "config.h" -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include diff --git a/libs/fvwm_x11.h b/libs/fvwm_x11.h index a252b3c6d..7e7db4d15 100644 --- a/libs/fvwm_x11.h +++ b/libs/fvwm_x11.h @@ -20,7 +20,7 @@ #define XpmSupport 0 #endif -#if HAVE_PNG +#ifdef HAVE_PNG #define PngSupport 1 #include #else diff --git a/libs/fvwmlib.h b/libs/fvwmlib.h index 9d02ab7d4..36fee51ce 100644 --- a/libs/fvwmlib.h +++ b/libs/fvwmlib.h @@ -17,4 +17,4 @@ void flib_init_graphics(Display *dpy); #include #endif -#endif \ No newline at end of file +#endif diff --git a/libs/fvwmsignal.h b/libs/fvwmsignal.h index 186910fe3..4351b3889 100644 --- a/libs/fvwmsignal.h +++ b/libs/fvwmsignal.h @@ -39,7 +39,7 @@ #include #include "ftime.h" -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H # include #endif diff --git a/libs/log.c b/libs/log.c index bc5ff26b9..718ba70bb 100644 --- a/libs/log.c +++ b/libs/log.c @@ -29,6 +29,7 @@ #include "fvwmlib.h" #include "getpwuid.h" +#include "defaults.h" #include "log.h" static char *log_file_name; diff --git a/libs/meson.build b/libs/meson.build new file mode 100644 index 000000000..3184ec230 --- /dev/null +++ b/libs/meson.build @@ -0,0 +1,67 @@ +libfvwm3 = static_library( + 'fvwm3', + sources: [ + 'BidiJoin.c', + 'Bindings.c', + 'ClientMsg.c', + 'ColorUtils.c', + 'Colorset.c', + 'CombineChars.c', + 'Cursor.c', + 'Event.c', + 'FBidi.c', + 'FEvent.c', + 'FGettext.c', + 'FImage.c', + 'FRender.c', + 'FRenderInit.c', + 'FScreen.c', + 'FShape.c', + 'FTips.c', + 'Fft.c', + 'Ficonv.c', + 'Flocale.c', + 'FlocaleCharset.c', + 'Grab.c', + 'Graphics.c', + 'Module.c', + 'Parse.c', + 'Picture.c', + 'PictureBase.c', + 'PictureGraphics.c', + 'PictureImageLoader.c', + 'PictureUtils.c', + 'Rectangles.c', + 'Strings.c', + 'System.c', + 'Target.c', + 'WinMagic.c', + 'XError.c', + 'XResource.c', + 'cJSON.c', + 'charmap.c', + 'envvar.c', + 'fio.c', + 'flist.c', + 'fqueue.c', + 'fsm.c', + 'fvwmlib3.c', + 'fvwmrect.c', + 'fvwmsignal.c', + 'getpwuid.c', + 'gravity.c', + 'log.c', + 'modifiers.c', + 'safemalloc.c', + 'setpgrp.c', + 'strlcat.c', + 'strlcpy.c', + 'strtonum.c', + 'timeout.c', + 'wcontext.c', + 'wild.c', + ], + include_directories: includedirs, + dependencies: all_found_deps, + install: false, +) diff --git a/libs/safemalloc.c b/libs/safemalloc.c index a26767d9e..ce540f530 100644 --- a/libs/safemalloc.c +++ b/libs/safemalloc.c @@ -21,6 +21,7 @@ #include #include "safemalloc.h" +#include "log.h" void * fxmalloc(size_t length) @@ -109,4 +110,4 @@ xvasprintf(char **ret, const char *fmt, va_list ap) } return (i); -} \ No newline at end of file +} diff --git a/libs/safemalloc.h b/libs/safemalloc.h index 553826936..cc112f7f0 100644 --- a/libs/safemalloc.h +++ b/libs/safemalloc.h @@ -11,4 +11,4 @@ char *fxstrdup(const char *); int xasprintf(char **, const char *, ...); int xvasprintf(char **, const char *, va_list); -#endif \ No newline at end of file +#endif diff --git a/libs/strtonum.c b/libs/strtonum.c index 7754b4190..72517bded 100644 --- a/libs/strtonum.c +++ b/libs/strtonum.c @@ -64,4 +64,4 @@ strtonum(const char *numstr, long long minval, long long maxval, ll = 0; return (ll); -} \ No newline at end of file +} diff --git a/libs/strtonum.h b/libs/strtonum.h index 4b1eb89a5..7835d7472 100644 --- a/libs/strtonum.h +++ b/libs/strtonum.h @@ -22,4 +22,4 @@ long long strtonum(const char *, long long, long long, const char **); -#endif /* LIBS_STRTONUM_H */ \ No newline at end of file +#endif /* LIBS_STRTONUM_H */ diff --git a/meson-scripts/conf-cmd.sh b/meson-scripts/conf-cmd.sh new file mode 100755 index 000000000..0acb381df --- /dev/null +++ b/meson-scripts/conf-cmd.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -xv + +cat "$1" "$2" > "$3" diff --git a/meson-scripts/dist-tarball.sh b/meson-scripts/dist-tarball.sh new file mode 100755 index 000000000..a67bb4029 --- /dev/null +++ b/meson-scripts/dist-tarball.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Script to sanitise the tarball when calling "meson dist". By default, +# "meson dist" calls git-archive, which includes more files than the autotools +# version of "make dist". + +# TODO: ".*" as a glob might be too much in the future; expand this out... +FILES_TO_IGNORE=".* +mkrelease.sh +dev-docs" + +( + cd "$MESON_DIST_ROOT" && { + IFS=$'\n' + for f in $FILES_TO_IGNORE + do + echo "Removing $f from tarball..." + rm -r "./$f" + done + } +) \ No newline at end of file diff --git a/meson-scripts/generate_ad_file.sh b/meson-scripts/generate_ad_file.sh new file mode 100755 index 000000000..1d65210a6 --- /dev/null +++ b/meson-scripts/generate_ad_file.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cat $2 | \ + grep -A 1000000 -- "^// BEGIN '$1'" | \ + grep -B 1000000 -- "^// END '$1'" | \ + grep -v "^// .* '$1'" diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..bf376e6ca --- /dev/null +++ b/meson.build @@ -0,0 +1,573 @@ +project( + 'fvwm3', + 'c', + version: '1.1.1', + license: 'GPL-2.0-or-later', + meson_version: '>=1.5.1', # Required to configure perl files without eating \@s + default_options: [ + 'c_std=c11', + 'warning_level=2', + 'werror=false', + ], +) + +add_project_arguments( + [ + '-fno-common', + '-Wno-error=format-security', + '-Wno-sign-compare', + '-Wno-unused-parameter', + '-Wno-extra', + ], + language: 'c', +) + +# This script is used to clean up the release tarball when calling +# "meson dist". +meson.add_dist_script('meson-scripts/dist-tarball.sh') + +cc = meson.get_compiler('c') + +# Undefine _FOTIFY_SOURCE explicitly. fvwm3 needs work to support this. +cc_flags = ['-U_FORTIFY_SOURCE'] +foreach flag : cc_flags + if cc.has_argument(flag) + add_project_arguments(flag, language: 'c') + endif +endforeach + +host = host_machine.system() # This is the target system when cross compiling + +m_dep = cc.find_library('m', required: false) +if m_dep.found() + add_project_link_arguments('-lm', language: 'c') +endif + +# Convenience helpers for things we might refer to a few times. +bindir = get_option('bindir') +datadir = get_option('datadir') +sysconfdir = get_option('sysconfdir') +prefix = get_option('prefix') +fvwm_datadir = join_paths(prefix, datadir, meson.project_name()) +fvwm_moduledir = ( + prefix / get_option('libexecdir') / meson.project_name() / meson.project_version() +) +fvwm_vcs_versioninfo = run_command( + './utils/fvwm-version-str.sh', + check: false, +).stdout().strip() + +syslibs = [] + +conf = configuration_data() + +if host_machine.endian() == 'big' + conf.set('WORDS_BIGENDIAN', true) +endif + +# Set static configuration. +conf.set_quoted('VERSION', meson.project_version()) +conf.set_quoted('VERSIONINFO', fvwm_vcs_versioninfo) +conf.set_quoted('PACKAGE', meson.project_name()) +conf.set_quoted('FVWM2RC', '.fvwm2rc') +conf.set_quoted('FVWM_CONFIG', 'config') +conf.set_quoted( + 'FVWM_IMAGEPATH', + '/usr/include/X11/bitmaps:/usr/include/X11/pixmaps', +) +conf.set_quoted( + 'FVWM_MODULEDIR', + fvwm_moduledir, +) +conf.set_quoted('FVWM_DATADIR', fvwm_datadir) +conf.set_quoted('LOCALEDIR', prefix / get_option('localedir')) +conf.set_quoted('FVWM_CONFDIR', prefix / get_option('sysconfdir')) +conf.set('RETSIGTYPE', 'void') +conf.set('SIGNAL_RETURN', 'return') +conf.set('ICONV_ARG_CONST', '') +conf.set('fd_set_size_t', 'int') +conf.set('EXECUTABLE_EXTENSION', 'NULL') +conf.set10('HAVE_XOUTPUT_METHOD', true) +conf.set10('FORK_CREATES_CHILD', true) + +# Enable FTMs +if host_machine.system() == 'linux' + conf.set10('_DEFAULT_SOURCE', true) # usleep +endif + +# Header checks. +headers = [ + 'fcntl.h', + 'float.h', + 'getopt.h', + 'inttypes.h', + 'limits.h', + 'malloc.h', + 'memory.h', + 'stdarg.h', + 'stdint.h', + 'stdlib.h', + 'string.h', + 'strings.h', + 'sys/select.h', + 'sys/stat.h', + 'sys/systeminfo.h', + 'sys/time.h', + 'sys/wait.h', + 'unistd.h', +] + +foreach h : headers + if cc.has_header(h) + conf.set10('HAVE_' + h.to_upper().underscorify(), true) + endif +endforeach + +if cc.has_header_symbol('libcharset.h', 'locale_charset') + conf.set10('HAVE_LIBCHARSET', true) +endif + +if conf.has('HAVE_SYS_SELECT_H') + conf.set10('HAVE_SELECT', true) + conf.set('SELECT_FD_SET_CAST', '') +endif + +# Function checks. +functions = { + 'div': {}, + 'getpwuid': {}, + 'gettimeofday': {}, + 'lstat': {}, + 'memcpy': {}, + 'memmove': {}, + 'mkfifo': {}, + 'nl_langinfo': {'have': 'HAVE_CODESET'}, + 'putenv': {}, + 'setpgid': {}, + 'setpgrp': {}, + 'setvbuf': {}, + 'sigaction': {}, + 'siginterrupt': {}, + 'siglongjmp': {}, + 'sigsetjmp': {}, + 'socket': {}, + 'strchr': {}, + 'strdup': {}, + 'strstr': {}, + 'strtol': {}, + 'sysconf': {}, + 'intl': {}, + 'uname': {}, + 'waitpid': {}, +} + +foreach f, v : functions + if cc.has_function(f, dependencies: syslibs) + val = '' + if 'have' in v + val = v['have'] + else + val = 'HAVE_' + f.to_upper().underscorify() + endif + conf.set10(val, true) + endif +endforeach + +# Dependencies. +all_found_deps = [] + +# Required dependencies, we can easily iterate over these. +summary_depvals = {} +all_req_deps = ['fontconfig', 'ice', 'libevent', 'x11', 'xft', 'xrandr', 'xt'] +foreach rd : all_req_deps + this_dep = dependency(rd, required: true) + summary_depvals += {rd: this_dep} + conf.set10('HAVE_' + rd.to_upper().underscorify(), true) + all_found_deps += this_dep +endforeach + +# Python is a required dependency, we generate shebangs at buildtime +# This will error by default if there is no python interpreter found +py_mod = import('python') +if get_option('python') == '' + # Just look for a python3 impl using standard logic, we weren't given a value + # as an option + py = py_mod.find_installation('python3') +else + # Try and find python by provided version or path + message('Trying to find python3: ' + get_option('python')) + py = py_mod.find_installation(get_option('python')) +endif + +# Perl is a required dependency, we generate shebangs at buildtime +perl = find_program('perl', required: true) + +golang = find_program('go', required: get_option('golang')) +if golang.found() + gover = run_command('go', 'version', check: true).stdout().split(' ') + gover = gover[2].replace('go', '') + if gover.version_compare('<1.20.0') + error( + '''A version of Go >= 1.20.0 is required to use the FVWM3 meson build Go modules. + Either disable Go for this build (`-Dgolang=disabled`) or upgrade Go to a version >= 1.20.0. + The Autotools build can use Go 1.14.0, this is another option if upgrading is not feasible.''', + ) + endif +else + # the readline dependency is only required for FvwmConsole so let's only check for it if we're not building FvwmPrompt + readline = dependency('readline', required: get_option('readline')) + if readline.found() + all_found_deps += readline + conf.set10('HAVE_READLINE', true) + endif +endif + +# Sed is used for substitution in several configure_file calls +sed = find_program('sed', required: true) + +# Optional dependencies +# Tip: 'Feature' types always report 'not found' if disabled + +freetype = dependency('freetype2', required: get_option('freetype')) +if freetype.found() + all_found_deps += freetype + conf.set10('HAVE_FREETYPE', true) +endif + +fribidi = dependency( + 'fribidi', + version: '>=0.19.2', + required: get_option('bidi'), +) +if fribidi.found() + all_found_deps += fribidi + conf.set10('HAVE_FRIBIDI', true) +endif + +iconv = dependency('iconv', required: get_option('iconv')) +if iconv.found() + conf.set10('HAVE_ICONV', true) + all_found_deps += iconv +endif + +libintl = dependency('intl', required: get_option('nls')) +if libintl.found() + all_found_deps += libintl + conf.set10('HAVE_NLS', true) +endif + +libpng = dependency('libpng', version: '>=1.2', required: get_option('png')) +if libpng.found() + all_found_deps += libpng + conf.set10('HAVE_PNG', true) +else + # We only check for libpng, no automagic + libpng_check = dependency('libpng', required: false) + if libpng_check.found() + png_msg = '''libpng found, and -Dpng=disabled was given. + It is recommended that libpng be enabled so that PNG icons can + be rendered by FVWM, which is expected by the default configuration + as well as other third-party programs which generate menus, + among others. + + If it is critical that FVWM does not link against libpng + (perhaps due to size limitations of the binary), + continue down this path. + ''' + else + png_msg = ''' Disabled PNG support means that the default + configuration shipped with FVWM will be without icon + support. Be sure this is what you mean to do. + ''' + endif + warning(png_msg) +endif + +librsvg = dependency( + 'librsvg-2.0', + version: '>=2.13.92', + required: get_option('svg'), +) +if librsvg.found() + all_found_deps += librsvg + conf.set10('HAVE_RSVG', true) + # We need at least one of these dependencies + svg_backends = ['cairo', 'cairo-svg', 'libsvg-cairo'] + svg_deps = [] + foreach d : svg_backends + # By treating these as features we can let automagic find one or more backends + # or we can explicitly set one or more backends as required, or disable ones we don't want to use. + svg_dep = dependency(d, required: get_option(d)) + if svg_dep.found() + svg_deps += svg_dep + summary_depvals += {d: svg_dep} + conf.set10('HAVE_' + d.to_upper().underscorify(), true) + break + endif + endforeach + if svg_deps.length() == 0 + # If everything is set to auto (or the user turns all the backends off) we need to explicitly fail here. + error( + 'librsvg found but also require one of: ' + + ', '.join(svg_backends) + + ' to build SVG support.', + ) + else + all_found_deps += svg_deps + endif +endif + +sm = dependency('sm', required: get_option('sm')) +if sm.found() + all_found_deps += sm + conf.set10('SESSION', true) +endif + +xcursor = dependency('xcursor', required: get_option('xcursor')) +if xcursor.found() + all_found_deps += xcursor + conf.set10('HAVE_XCURSOR', true) +endif + +xext = dependency('xext', required: get_option('xext')) +if xext.found() + all_found_deps += xext + conf.set10('HAVE_SHAPE', true) +endif + +xkbcommon = dependency('xkbcommon', required: get_option('xkbcommon')) +if xkbcommon.found() + all_found_deps += xkbcommon + conf.set10('HAVE_X11_XKBLIB_H', true) +endif + +xpm = dependency('xpm', required: get_option('xpm')) +if xpm.found() + all_found_deps += xpm + conf.set10('HAVE_XPM', true) +endif + +xrender = dependency('xrender', required: get_option('xrender')) +if xrender.found() + all_found_deps += xrender + conf.set10('HAVE_XRENDER', true) +endif + +# Hard-coded +non_configurable_ops = [ + 'FMiniIconsSupported', + 'HAVE_XSM', +] + +foreach nco : non_configurable_ops + conf.set10(nco, true) +endforeach + +build_docs = false +if get_option('htmldoc') or get_option('mandoc') + build_docs = true + asciidoc = find_program('asciidoctor', required: build_docs) + grep = find_program('grep') + subdir('doc') +endif + +conf_template = '@0@/config_defines.h'.format(meson.current_source_dir()) + +conf_out = configure_file( + output: 'configtemp.h', + configuration: conf, +) + +conf_cmd = '@0@/meson-scripts/conf-cmd.sh'.format(meson.current_source_dir()) +build_dir = '@0@/config.h'.format(meson.current_build_dir()) +configure_file( + output: 'config.h', + command: [conf_cmd, conf_out, conf_template, build_dir], +) + +# Configured files inherit the permissions of the template, +# so we need to set the permissions explicitly for executable scripts. +install_mask_755 = 'rwxr-xr-x' + +includedirs = [] +# To be consistent with the autotools build, we need to add /usr/local/include +# to the include path on *BSD. +if host in ['freebsd', 'openbsd'] + usrlocal_includes = include_directories('/usr/local/include') + includedirs += usrlocal_includes +endif +lib_includes = include_directories('.') +fvwm_includes = include_directories('fvwm') + +includedirs += lib_includes +includedirs += fvwm_includes + +# These are used to configure files in 'bin', 'perllib', and other misc files. +# while we use terms like 'bindir' here, these don't (quite) map to meson; +# most things in fvwm3 want full paths. Autotools would use variables in the +# output, but we can construct full paths here instead. + +# This could be tidied up, but we just want to be consistent with +# autotools for now. + +file_config = configuration_data() +file_config.set('bindir', prefix / bindir) +file_config.set('datadir', prefix / datadir) # We could probably simplify this and the below into one config... +file_config.set('datarootdir', prefix / datadir) +file_config.set('FVWM_DATADIR', fvwm_datadir) +file_config.set( + 'FVWM_PERLLIBDIR', + fvwm_datadir / 'perllib', +) +file_config.set('PERL', perl.full_path()) +file_config.set('prefix', prefix) +file_config.set('PYTHON', py.full_path()) +file_config.set('SED', sed.full_path()) +file_config.set('VERSION', meson.project_version()) +file_config.set('VERSIONINFO', fvwm_vcs_versioninfo) + +subdir('po') +subdir('libs') +subdir('fvwm') +subdir('default-config') +subdir('perllib') + +fvwm3 = executable( + meson.project_name(), + fvwm_sources, + include_directories: includedirs, + dependencies: all_found_deps, + link_with: libfvwm3, + install: true, +) + +# Core modules +modules = { + 'FvwmAnimate': {'subdir': 'modules/FvwmAnimate'}, + 'FvwmAuto': {'subdir': 'modules/FvwmAuto'}, + 'FvwmBacker': {'subdir': 'modules/FvwmBacker'}, + 'FvwmButtons': {'subdir': 'modules/FvwmButtons'}, + 'FvwmEvent': {'subdir': 'modules/FvwmEvent'}, + 'FvwmForm': {'subdir': 'modules/FvwmForm'}, + 'FvwmIconMan': {'subdir': 'modules/FvwmIconMan'}, + 'FvwmIdent': {'subdir': 'modules/FvwmIdent'}, + 'FvwmMFL': {'subdir': 'modules/FvwmMFL'}, + 'FvwmPager': {'subdir': 'modules/FvwmPager'}, + 'FvwmPerl': {'subdir': 'modules/FvwmPerl'}, + 'FvwmRearrange': {'subdir': 'modules/FvwmRearrange'}, + 'FvwmScript': {'subdir': 'modules/FvwmScript'}, +} + +if not golang.found() + modules += {'FvwmConsole': {'subdir': 'modules/FvwmConsole'}} +endif + +foreach m, _ : modules + subdir(modules[m]['subdir']) +endforeach + +# FvwmPrompt and FvwmCommand +subdir('bin') + +# Contrib +# Provide a freedesktop-compilant, minimal xsession. +configure_file( + input: 'contrib/xsession/fvwm3.desktop.in', + output: 'fvwm3.desktop', + configuration: file_config, + install_dir: datadir / 'xsessions', + install: true, +) + +summary_docdir = get_option('datadir') / 'doc' / meson.project_name() +if get_option('docdir') != '' + summary_docdir = get_option('docdir') +endif + +summary( + { + 'prefix': get_option('prefix'), + 'bindir': get_option('bindir'), + 'datadir': get_option('datadir'), + 'docdir': summary_docdir, + 'libdir': get_option('libdir'), + 'libexecdir': get_option('libexecdir'), + 'Module dir': get_option('libexecdir') / meson.project_name() / meson.project_version(), + }, + section: 'Directories', +) + +environment_summary = { + 'Build': build_machine.system(), + 'Build CPU Family': build_machine.cpu_family(), + 'Host CPU Family': host_machine.cpu_family(), + 'Cross-compiling': meson.is_cross_build(), + 'Build Endianness': build_machine.endian(), + 'Host Endianness': host_machine.endian(), + 'Target': host, + 'VCS Version': fvwm_vcs_versioninfo, + 'C Compiler': cc.get_id(), + 'C Compiler Version': cc.version(), + 'Go Version': golang.found() ? gover : 'N/A', + 'Linker': cc.get_linker_id(), + 'Python Path': py.full_path(), + 'Python Version': py.version(), + 'Perl': perl, + 'Perl Version': run_command( + perl, + '-e', 'print "$^V\\n";', + check: true, + ).stdout().strip('v'), +} + +if build_docs + environment_summary += { + 'asciidoctor': asciidoc.version(), + } +endif + +summary( + environment_summary, + section: 'Environment', +) + +summary( + { + 'HTML pages': get_option('htmldoc'), + 'Man pages': get_option('mandoc'), + }, + bool_yn: true, + section: 'Documentation', +) + +featurevals = { + 'BiDi': fribidi.found() ? fribidi : false, + 'FreeType': freetype.found() ? freetype : false, + 'Go Modules': golang.found(), + 'iconv': iconv.found(), + 'NLS': libintl.found(), + 'PNG support': libpng.found() ? libpng : false, + 'Session Management': sm.found() ? sm : false, + 'Shaped Windows': xext.found() ? xext : false, + 'SVG support': librsvg.found() ? librsvg : false, + 'Xcursor': xcursor.found() ? xcursor : false, + 'xkbcommon': xkbcommon.found() ? xkbcommon : false, + 'XPM support': xpm.found() ? xpm : false, + 'XRender': xrender.found() ? xrender : false, +} + +if not golang.found() + featurevals += {'Readline': readline.found()} +endif + +summary( + featurevals, + bool_yn: true, + section: 'Features', +) + +summary( + summary_depvals, + bool_yn: true, + section: 'Dependencies', +) \ No newline at end of file diff --git a/meson.options b/meson.options new file mode 100644 index 000000000..3d37cef62 --- /dev/null +++ b/meson.options @@ -0,0 +1,114 @@ +option( + 'bidi', + type: 'feature', + value: 'auto', + description: 'Enable fribidi support', +) +option( + 'cairo', + type: 'feature', + value: 'auto', + description: 'Use Cairo as a librsvg backend', +) +option( + 'cairo-svg', + type: 'feature', + value: 'auto', + description: 'Use CairoSVG as a librsvg backend', +) +option( + 'freetype', + type: 'feature', + value: 'auto', + description: 'Enable freetype support', +) +option( + 'golang', + type: 'feature', + value: 'auto', + description: 'Build Golang modules', +) +option( + 'docdir', + type: 'string', + description: 'Directory to install documentation', +) +option( + 'htmldoc', + type: 'boolean', + value: false, + description: 'Enable generation of HTML man pages', +) +option( + 'iconv', + type: 'feature', + value: 'auto', + description: 'Enable iconv support', +) +option( + 'libsvg-cairo', + type: 'feature', + value: 'auto', + description: 'Use librsvg as a librsvg backend', +) +option( + 'mandoc', + type: 'boolean', + value: false, + description: 'Enable generation of man pages', +) +option('nls', type: 'feature', value: 'auto', description: 'Enable NLS') +option('png', type: 'feature', value: 'auto', description: 'Enable png support') +option( + 'python', + type: 'string', + description: 'Select python implementation', +) +option( + 'readline', + type: 'feature', + value: 'auto', + description: 'Enable readline support for FvwmConsole (disabled if using Go)', +) +option( + 'sm', + type: 'feature', + value: 'auto', + description: 'Enable session management support', +) +option( + 'svg', + type: 'feature', + value: 'auto', + description: 'Enable svg support', +) +option( + 'xcursor', + type: 'feature', + value: 'auto', + description: 'Enable Xcursor support', +) +option( + 'xext', + type: 'feature', + value: 'auto', + description: 'Enable shaped window support via Xext', +) +option( + 'xkbcommon', + type: 'feature', + value: 'auto', + description: 'Enable xkbcommon support', +) +option( + 'xrender', + type: 'feature', + value: 'auto', + description: 'Enable XRender support', +) +option( + 'xpm', + type: 'feature', + value: 'auto', + description: 'Enable X PixMap (xpm) support', +) diff --git a/modules/FvwmAnimate/meson.build b/modules/FvwmAnimate/meson.build new file mode 100644 index 000000000..acfbb636c --- /dev/null +++ b/modules/FvwmAnimate/meson.build @@ -0,0 +1,11 @@ +module_fvwmanimate = ['FvwmAnimate.c'] + +executable( + 'FvwmAnimate', + module_fvwmanimate, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmAuto/meson.build b/modules/FvwmAuto/meson.build new file mode 100644 index 000000000..f5284bb77 --- /dev/null +++ b/modules/FvwmAuto/meson.build @@ -0,0 +1,11 @@ +module_sources = ['FvwmAuto.c'] + +executable( + 'FvwmAuto', + module_sources, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmBacker/FvwmBacker.c b/modules/FvwmBacker/FvwmBacker.c index 5413ca8dd..4e003f6ba 100644 --- a/modules/FvwmBacker/FvwmBacker.c +++ b/modules/FvwmBacker/FvwmBacker.c @@ -32,6 +32,7 @@ #include /* Saul */ #endif /* Saul */ +#include "libs/log.h" #include "libs/FShape.h" #include "libs/Module.h" #include "libs/Colorset.h" diff --git a/modules/FvwmBacker/meson.build b/modules/FvwmBacker/meson.build new file mode 100644 index 000000000..c170f72d0 --- /dev/null +++ b/modules/FvwmBacker/meson.build @@ -0,0 +1,16 @@ +module_sources = [ + 'FvwmBacker.c', + 'root_bits.c', +] + +executable( + 'FvwmBacker', + module_sources, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) + +install_data('ConfigFvwmBacker', install_dir: fvwm_datadir) diff --git a/modules/FvwmBacker/root_bits.c b/modules/FvwmBacker/root_bits.c index 6dde22dbe..a67ad4d3a 100644 --- a/modules/FvwmBacker/root_bits.c +++ b/modules/FvwmBacker/root_bits.c @@ -14,6 +14,7 @@ */ #include "config.h" +#include "libs/log.h" #include "libs/fvwm_x11.h" #include diff --git a/modules/FvwmButtons/FvwmButtons.c b/modules/FvwmButtons/FvwmButtons.c index 564c7c9d0..8be16df41 100644 --- a/modules/FvwmButtons/FvwmButtons.c +++ b/modules/FvwmButtons/FvwmButtons.c @@ -35,6 +35,7 @@ #include "libs/ftime.h" #include +#include "libs/log.h" #include "libs/defaults.h" #include "libs/fvwmlib.h" #include "libs/FShape.h" diff --git a/modules/FvwmButtons/button.c b/modules/FvwmButtons/button.c index e81cc322d..051c96467 100644 --- a/modules/FvwmButtons/button.c +++ b/modules/FvwmButtons/button.c @@ -23,6 +23,7 @@ #include "config.h" +#include "libs/log.h" #include #include #include diff --git a/modules/FvwmButtons/draw.c b/modules/FvwmButtons/draw.c index 0d0974fcd..d3c940e53 100644 --- a/modules/FvwmButtons/draw.c +++ b/modules/FvwmButtons/draw.c @@ -35,6 +35,7 @@ #include "libs/Colorset.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Rectangles.h" #include "libs/FShape.h" /* FShapesSupported */ #include "libs/FEvent.h" diff --git a/modules/FvwmButtons/dynamic.c b/modules/FvwmButtons/dynamic.c index 2739e2918..931adf521 100644 --- a/modules/FvwmButtons/dynamic.c +++ b/modules/FvwmButtons/dynamic.c @@ -19,6 +19,7 @@ #include #include +#include "libs/defaults.h" #include "libs/fvwm_x11.h" #include "libs/Module.h" #include "libs/Strings.h" diff --git a/modules/FvwmButtons/meson.build b/modules/FvwmButtons/meson.build new file mode 100644 index 000000000..c7ef9dde2 --- /dev/null +++ b/modules/FvwmButtons/meson.build @@ -0,0 +1,22 @@ +module_sources = [ + 'FvwmButtons.c', + 'button.c', + 'draw.c', + 'dynamic.c', + 'icons.c', + 'misc.c', + 'output.c', + 'parse.c', +] + +executable( + 'FvwmButtons', + module_sources, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) + +install_data('ConfigFvwmButtons', install_dir: fvwm_datadir) diff --git a/modules/FvwmButtons/output.c b/modules/FvwmButtons/output.c index 539b71647..dfb645e8a 100644 --- a/modules/FvwmButtons/output.c +++ b/modules/FvwmButtons/output.c @@ -23,6 +23,7 @@ #include "config.h" +#include "libs/log.h" #include #include #include diff --git a/modules/FvwmButtons/parse.c b/modules/FvwmButtons/parse.c index 2e5f4fcb9..d1cffe0dd 100644 --- a/modules/FvwmButtons/parse.c +++ b/modules/FvwmButtons/parse.c @@ -26,6 +26,7 @@ #include #include +#include "libs/log.h" #include "libs/fvwmlib.h" #include "libs/Module.h" #include "libs/Colorset.h" diff --git a/modules/FvwmConsole/FvwmConsole.c b/modules/FvwmConsole/FvwmConsole.c index 73cfbf10d..96aa87151 100644 --- a/modules/FvwmConsole/FvwmConsole.c +++ b/modules/FvwmConsole/FvwmConsole.c @@ -27,8 +27,10 @@ #include "config.h" #include "FvwmConsole.h" +#include "libs/defaults.h" #include "libs/fio.h" #include "libs/fvwmsignal.h" +#include "libs/log.h" /* using ParseModuleArgs now */ static ModuleArgs* module; diff --git a/modules/FvwmConsole/FvwmConsoleC.c b/modules/FvwmConsole/FvwmConsoleC.c index 08499f87d..725465060 100644 --- a/modules/FvwmConsole/FvwmConsoleC.c +++ b/modules/FvwmConsole/FvwmConsoleC.c @@ -19,6 +19,7 @@ #include "FvwmConsole.h" #include "libs/fio.h" +#include "libs/log.h" int s; /* socket handle */ FILE *sp; diff --git a/modules/FvwmConsole/FvwmConsoleC.pl b/modules/FvwmConsole/FvwmConsoleC.pl new file mode 100644 index 000000000..b78d12175 --- /dev/null +++ b/modules/FvwmConsole/FvwmConsoleC.pl @@ -0,0 +1,889 @@ +#! /usr/bin/perl +# $0 - Front end of FvwmConsole +# FvwmConsole server must be running + +# Copyright 1997, Toshi Isogai +# You may use this code for any purpose, as long as the original +# copyright remains in the source code and all documentation + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see: + +# If you change this, be sure to change the test in configure.in +require 5.002; + +use Socket; + +$ESC = "\e"; +$HISTFILE = "$ENV{FVWM_USERDIR}/.FvwmConsole-History0"; +$SOCKET_NAME = "$ENV{FVWM_USERDIR}/.FvwmConsole-Socket"; +#$VERSION = '1.2'; +$VERSION = '1.0.1'; + + + +if (-c "/dev/console" && -w "/dev/console") { + close STDERR; + if (!open (STDERR, ">/dev/console")) { + print "Can't redirect STDERR to /dev/console: $!\n"; + sleep 3; + exit; + } +} + +($Filename = $0) =~ s@.*/@@; +($Sname = $Filename) =~ s/C(\.pl)?$//; + + +$tty = `tty`; +$tty =~ s/\n//; +$org_stty = &stty('-g'); + +@Hist = (); +@Histall = (); +$HIST_SIZE = 100; +$MAX_COMMAND_SIZE = 1000; + +main(); +exit; + + +sub main::default_key { +#------------ default key bindings ---------- +# these can be overidden by config lines +# +# It may need these lines in .Xdefault to make home and end key work +# FvwmConsole*VT100*Translations: #override \n \ +# Home: string(0x1b) string("[1~" ) \n \ +# Delete: string(0x1b) string("[3~" ) \n +# End: string(0x1b) string("[4~" ) \n + + package User; + + $ESC = $main::ESC; + $Key{"$ESC\[1~"} = 'bol'; #home Key + $Key{"$ESC\[3~"} = 'del_char'; + $Key{"$ESC\[4~"} = 'eol'; #end key + $Key{"$ESC\[A"}= 'prev_line'; #up + $Key{"$ESC\[B"}= 'next_line'; #down + $Key{"$ESC\[C"}= 'next_char'; #right + $Key{"$ESC\[D"}= 'prev_char'; #left + $Key{"${ESC}f"}= 'next_word'; + $Key{"${ESC}b"} = 'prev_word'; + + $Key{"$ESC"} = 'prefix'; + $Key{"\cD"} = 'del_char'; + $Key{"\c?"} = 'del_char'; + $Key{"\cH"} = 'bs'; + $Key{"\cq"} = 'quote'; + $Key{"\cU"} = 'del_line'; + $Key{"\cs"} = 'search'; + $Key{"\cR"} = 'search_rev'; + $Key{"\cK"} = 'del_forw_line'; + $Key{"\ca"} = 'bol'; + $Key{"\ce"} = 'eol'; + $Key{"\cp"} = 'prev_line'; + $Key{"\cn"} = 'next_line'; + $Key{"\cf"} = 'next_char'; + $Key{"\cb"} = 'prev_char'; + $Key{"\cx"} = 'prefix'; + $Key{"\cx\cb"} = 'bind'; + $Key{"\cx\ck"} = 'cancel'; + $Key{"\cw"} = 'del_back_word'; + $Key{"\x8d"} = 'enter_wo_subst'; # alt enter + $Key{"\n"} = 'enter'; + $Key{"\ci"} = 'ins_char (" ")'; + $Key{"\xE4"} = 'del_forw_word'; # alt_d + $Key{"\xE6"} = 'next_word'; # alt_f + $Key{"\xEB"} = 'bind'; # alt_k + $Key{"\xEC"} = 'list_func'; # alt_k + $Key{"\xF3"} = 'subst'; # alt_s + $Key{"\xF4"} = 'termsize'; # alt_t + $Key{"\xE2"} = 'prev_word'; # alt_b + $Key{"\xb1"} = 'ins_nth_word(1)'; + $Key{"\xb2"} = 'ins_nth_word(2)'; + $Key{"\xb3"} = 'ins_nth_word(3)'; + $Key{"\xb4"} = 'ins_nth_word(4)'; + $Key{"\xb5"} = 'ins_nth_word(5)'; + $Key{"\xb6"} = 'ins_nth_word(6)'; + $Key{"\xb7"} = 'ins_nth_word(7)'; + $Key{"\xb8"} = 'ins_nth_word(8)'; + $Key{"\xb9"} = 'ins_nth_word(9)'; + $Key{"${ESC}b"} = 'prev_word'; # esc_b + $Key{"${ESC}f"} = 'next_word'; # esc_f + $Key{"${ESC}>"} = 'eoh_ign_mode'; # end of history, ignore mode + $Key{"${ESC}<"} = 'boh_ign_mode'; # begining of history, ignore mode + $Key{"${ESC}."} = 'ins_last_word'; + + $Key{EOF} = "\cD"; #eof work only when line is empty + $Subst{'^#.*'} = ''; # ignore comments +#---------------- end of key binding ----------------- + +#---------------- Terminal control ------------------- + $TERM_EEOL = "$ESC\[K"; # erase to end of line + $TERM_RIGHT = "$ESC\[C"; # move cursor right + $TERM_LEFT = "$ESC\[D"; # move cursor left + $TERM_DOWN = "$ESC\[B"; # move cursor up + $TERM_UP = "$ESC\[A"; # move cursor up +} + +sub read_config { + my( $hash,@keys,$key,@vals,$val); + while() { + last if $_ eq "_C_Config_Line_End_\n"; + next if !s/^\*${Sname}//; + ($hash,@keys[0..3],@vals) = + (/ + ^(\w+)\s+ #hash name + ('([^\']*)'|"([^\"]*)"|(\S+)) #key quoted or bare word + (\s+('([^\']*)'|"([^\"]*)"|(\S+)))? #value + /x); + $key = $keys[1].$keys[2].$keys[3]; + $val = $vals[2].$vals[3].$vals[4]; + + if( defined %{$User::{$hash}} ) { + User::bind( $hash, $key, $val ); + } + } +} + +sub main { + my($sin, $cmd); + my($name, $ppid, $cpid); + + socket(SH, PF_UNIX, SOCK_STREAM, 0) || die "$!\n"; + $sun = sockaddr_un($SOCKET_NAME); + connect(SH, $sun) || die "$sun: $!\n"; + print "$Filename $VERSION\n"; + default_key(); + read_config(); #must be done before forking + + $ppid = $$; + if( $cpid = fork() ) { + &input_open($tty,$tty,$HISTFILE,1); + while( $cmd = &input('','',1) ) { + next if $cmd =~/^\s*$/; + last if $cmd eq "\0"; + if( length($cmd) > $MAX_COMMMAND_SIZE ) { + print User::OUT "\a"; + } + send( SH, $cmd."\0", 0 ); + } + dokill( $cpid ); + } else { + #child handles output + while() { + last if $_ eq ''; + if( $_ eq "_C_Socket_Close_\n" ) { + dokill( $ppid ); + } + print; + } + dokill( $ppid ); + } + +} + +sub dokill { + my($pid) = @_; + unlink SH; + kill -9,$pid if $pid; + exit; +} + +sub input_open { + # arg0 input device + # arg1 output device + # arg2 history file + # arg3 key selection - bit0 + # bit1 + # bit2 return undef esc code as it is + + ($Dev_in,$Dev_out,$File,$Ksel) = @_; + if( !$Dev_in ) {$Dev_in = $tty;} + elsif( $Dev_in eq "not a tty" ) { $Dev_in = $ENV{'TTY'};} + if( !$Dev_out ) {$Dev_out = $tty;} + if( !$File ) { $File = '/tmp/input.tmp';} + open(User::IN,"<$Dev_in") || die "open in at input_open '$Dev_in' $!\n"; + open(User::OUT,">$Dev_out") || die "can't open input at 'input_open' $!\n"; + select((select(User::OUT), $| = 1)[0]); # unbuffer pipe + if( defined $File ) { + if( open(INITF,"$File") ) { + do "$File"; + @Histall=; close(INITF); $#Histall--; + }else{ + print STDERR "Can't open history file $File\n"; + } + } +} + +sub input_close { + close(User::IN); + close(User::OUT); +} + +sub getchar { + # get char from input + # if esc , check for more char + my($c,$s,$rin,$rout); + sysread(User::IN, $c, 1); + if( $c ne $ESC ) { + $s = $c; + }else { + $rin = ''; + vec( $rin, fileno(User::IN),1) = 1; + $n= select( $rout=$rin, undef, undef, 0.1 ); + $s = $ESC; + if($n) { + while($n= select( $rout=$rin, undef, undef, 0.1 ) ) { + sysread( User::IN, $c, 1 ); + $s .= $c; + last if $c =~ /[A-Dz~]/; # end of escape seq + } + } + } + $s; +} + +sub insert_char { + local($c,*len,*ix,*hist) =@_; + local($clen); + $clen = length $c; + if( $init_in ) { + $len = $ix = $clen; # new hist - clear old one + $hist[$#hist] = $c; + }else{ + substr($hist[$#hist],$ix,0) = $c; #insert char + $len += $clen; + $ix += $clen; + } +} +sub stty { + my($arg) = @_; + `/bin/stty $arg <$tty 2>&1`; +# if( -x "/usr/5bin/stty" ) { +# `/usr/5bin/stty $arg <$tty`; +# }elsif( -x "/usr/bin/stty" ) { +# `/usr/bin/stty $arg `; +# }else { +# `/bin/stty $arg `; +# } +} + +sub add_hist { + # add input into history file + local($type,*cmd) = @_; #not my + my( $t )= sprintf("%s",$type); + my($h) = $cmd[$#cmd]; + return if !defined $File; + if( $#cmd ==0 || $h ne $cmd[$#cmd-1] ) { + $h =~ s/([\"@\$\\])/\\$1/g; + $t =~ s/^\*//; + push(@Histall, "push (\@$t, \"$h\");\n" ); + @Histall = splice( @Histall, -$HIST_SIZE, $HIST_SIZE ); # take last HIST_SIZE commands + if( open( FILE, ">$File" ) ){ + print FILE @Histall; + print FILE "1;\n"; + close(FILE); + } + }else { + $#cmd--; + } +} + +#---------------- +# print mini help +#---------------- +sub usage_error { + open( THIS, "$0"); + while() { + s/\$0/$Filename/; + if( /^\#/ ) { + print STDERR $_; + }else{ + last; + } + } + close THIS; +sleep 3; +exit 1; +} + +sub search_mode { + local(*c, *s, *prompt, *mode, *isp, *hist ) =@_; + my($p_save, $isp_cur); + if($c eq "\n"){ + $prompt = $p_save; + $mode = 'normal'; + last IN_STACK; + } + $isp_cur = $isp; + if( $User::Key{$c} =~ /^search/ ) { + #search furthur + $mode = $User::Key{$c}; + while(1) { + if( $mode eq 'search_rev' && --$isp<0 || + $mode eq 'search' && ++$isp>$#hist-1 ) { + print User::OUT "\a"; # couldn't find one + $isp = $isp_cur; + last; + } + last if( index($hist[$isp],$s) >=0); + } + }elsif( $User::Key{$c} eq 'bs' ) { + $s =~ s/.$//; + }elsif( ord($c) < 32 ) { + #non-printable char, get back to normal mode + print User::OUT "\a"; + $prompt = $p_save; + $mode = 'normal'; + return; + }else{ + $s .= $c; + while(1) { + last if (index($hist[$isp],$s) >=0); + if( $mode eq 'search_rev' && --$isp<0 || + $mode eq 'search' && ++$isp>$#hist ) { + print User::OUT "\a"; #couldn't find one + chop($s); + $isp = $isp_cur; + last; + } + } + } + $prompt = "($mode)'$s':"; +} + +sub calcxy { + my( $mode, $prompt, $len, $ix, $off, $wd ) = @_; + my($plen); + my( $y_len, $y_ix, $col); + my($adjust); # 1 when the last char is on right edge + + $plen = length($prompt); + $y_len = int (($plen+$len+$off) / $wd ); + $adjust = ( (($plen+$len+$off) % $wd == 0) && ($y_len > 0 )) ? 1:0; + if( $mode =~ /^search/ ) { + #move cursor to search string + $y_ix = int (($plen-2+$off) / $wd ); + $col = ($plen-2+$off) % $wd; + }else{ + #normal mode - move cursor back to $ix + $y_ix = int (($plen+$ix+$off) / $wd ); + $col = ($plen+$ix+$off) % $wd; + } + ($y_len, $y_ix, $col, $adjust); +} + +package User; + +sub move_cursor { + my($x,$y, $x_prev,$y_prev) = @_; + my($termcode); + + $termcode = ''; + if($y > $y_prev ) { + $termcode = $TERM_DOWN x ($y-$y_prev); + }elsif( $y < $y_prev ) { + $termcode = $TERM_UP x ($y_prev-$y); + } + if( $x > $x_prev ) { + $termcode .= $TERM_RIGHT x ($x-$x_prev); + }elsif( $x < $x_prev ) { + $termcode .= $TERM_LEFT x ($x_prev-$x); + } + print OUT $termcode; +} + +sub another_line { + $init_in = 1-$app; + ($hist[$#hist] = $hist[$isp]) =~ s/\n//; + $ix = length($hist[$#hist]); +} + +sub main::input { + # arg0 - prompt + # arg1 - input stack + # arg2 - append input to command if 1 + # arg3 - # of column offset + local($prompt,*hist,$app,$off) = @_; + local($len,$ix); + local($c,$isp,$s,$wisp); + local($mode); + local(%lastop); + + local($init_in); + local($print_line); #0-none, 1-whole, 2-from cursor + my($y_ix,$y_ix0,$y_len,$wd,$ht,$col,$col0); + my($term); + my($init_in,$op); + + $off = 0 if( !defined $off ); + *hist = *main::Hist if( ! defined @hist ); + $isp = ++$#hist ; + $wisp = $isp; + if( -f "/vmunix" ) { + &main::stty("-echo -icanon min 1 time 0 stop ''"); + }else { + &main::stty(" -echo -icanon eol \001 stop ''"); + } + ($ht,$wd) = &termsize(); + $y_ix = $y_len = 0; + $mode = 'normal'; + another_line(); + $print_line = 1; + + IN_STACK:while(1){ + + if( $print_line==0 ) { + #just move cursor + ($y_len,$y_ix,$col,$adjust) = + &main::calcxy($mode,$prompt,$len,$ix,$off,$wd); + move_cursor( $col,$y_ix, $col0,$y_ix0); + + }elsif($print_line==2 || $print_line==3 ) { + # delete - print cursor to eol + $len = length($hist[$#hist]); + ($y_len,$y_ix,$col,$adjust) = + &main::calcxy($mode,$prompt,$len,$ix,$off,$wd); + + if( $print_line==3 ) { + # delete backward + move_cursor( $col,$y_ix, $col0,$y_ix0); + } + + if( $y_len0 > $y_ix && ($adjust || $y_len0 > $y_len) ) { + print( OUT "\n$TERM_EEOL" x ($y_len0-$y_ix), + $TERM_UP x ($y_len0-$y_ix), + "\r", $TERM_RIGHT x $col, ); + } + print( OUT substr("$prompt$hist[$#hist]", $ix), + $adjust ? '':$TERM_EEOL, + "\r", $TERM_RIGHT x $col, + $TERM_UP x ($y_len-$y_ix) , + ($adjust && $ix!=$len)? $TERM_DOWN : '' ); + + + }elsif($print_line==4) { + # insert + $len = length($hist[$#hist]); + ($y_len,$y_ix,$col,$adjust) = + &main::calcxy($mode,$prompt,$len,$ix,$off,$wd); + + print( OUT substr("$prompt$hist[$#hist]", $ix), + $TERM_UP x ($y_len-$y_ix) ,"\r", $TERM_RIGHT x $col, + $TERM_DOWN x $adjust ); + + }else{ + # print whole line + $len = length($hist[$#hist]); + #move cursor to bol on screen, erase prev printout + print (OUT $TERM_DOWN x ($y_len-$y_ix), + "\r$TERM_EEOL$TERM_UP" x ($y_len), + "\r$TERM_EEOL\r", + $TERM_RIGHT x $off,"$prompt$hist[$#hist]"); + ($y_len,$y_ix,$col,$adjust) = + &main::calcxy($mode,$prompt,$len,$ix,$off,$wd); + + #mv cursor to cur pos + print( OUT $TERM_UP x ($y_len-$y_ix) ,"\r", $TERM_RIGHT x $col, + $TERM_DOWN x $adjust); + } + + + GETC:{ + ($col0, $y_ix0, $y_len0) = ($col, $y_ix, $y_len); + $print_line=1; + + $c = main::getchar(); + while($Key{$c} eq "prefix" ) { + $c .= main::getchar(); + } + + ($op = $Key{$c}) =~ s/(.*)\s*[\(;].*/$1/; + $op =~ /(\w+)$/; + $op = $1; + + if( $Key{$c} =~ /ign_mode/ ) { + # ignore mode and execute command + eval "&{$Key{$c}}"; + }elsif( $mode =~ /^search/ ) { + main::search_mode(*c,*s,*prompt,*mode,*isp, *hist); + another_line(); + }elsif( $c eq $Key{EOF} && $len==0 ) { + return ''; # eof return null + }elsif( defined $Key{$c} ) { + eval "&{$Key{$c}}"; + $lastop{op} = $op; + }elsif( ord ($c) < 32 ) { + #undefined control char + print OUT "\a"; + $print_line = 0; + }else { + $lastop{op} = 'ins_char'; + &ins_char( $c ); + print OUT $c; + } + $init_in = 0; + } + } + + if( $y_ix != $y_len ) { + print OUT "\n" x ($y_len-$y_ix); + } + &main::stty($org_stty); + + print OUT "\n"; + if( $hist[$#hist] eq '' ) { + pop(@hist); + return "\n"; + } + if( $#hist>0 && $hist[$#hist] eq $hist[$#hist-1] ) { + pop(@hist); # if it is the same, delete + }else{ + &main::add_hist( *hist, *hist ); + } + $hist[$#hist]."\n"; +} + +#----------------------------- +# editinig command functions +# +# functions must be below here to be listed by list_func +# +# the variables below are local to sub input +# $prompt,$hist,$app,$off +# $len,$ix +# $c,$isp,$wisp,$s +# $mode +#----------------------------- +sub prefix { } # it's only here to be listed by list_func +sub boh { + $isp = 0; + another_line(); +} +sub boh_ign_mode { + boh(); +} +sub bol { + $ix = 0 ; + $print_line=0; +} +sub bs { + my($l) = @_; + $l = 1 if $l eq ''; + if( $len && $ix ) { + $ix-=$l; # mv left + substr($hist[$#hist],$ix,$l) = ""; # del char + } + $print_line = 3; +} +sub del_back_line { + substr($hist[$#hist],0,$ix) = ""; + $ix = 0; + $print_line = 3; +} +sub del_forw_line { + substr($hist[$#hist],$ix) = ""; + $print_line = 2; +} +sub del_char { + my($l) = @_; + $l = 1 if $l eq ''; + if( $len > $ix ) { + substr($hist[$#hist],$ix,$l) = ""; # del char + } + $print_line = 2; +} +sub del_line { + $ix = 0; + $hist[$#hist] = ""; + $print_line = 3; +} +sub del_back_word { + my($tmp); + $tmp = substr($hist[$#hist],0,$ix); + $tmp =~ s/(^|\S+)\s*$//; + $tmp = length $tmp; + substr($hist[$#hist],$tmp,$ix-$tmp) = ""; + $ix = $tmp; + $print_line = 3; +} +sub del_forw_word { + $hist[$#hist] =~ s/^(.{$ix})\s*\S+/$1/; + $print_line = 2; +} +sub enter { + subst(); + enter_wo_subst(); +} +sub eoh { + if( $isp==$#hist ) { + print OUT "\a"; + }else{ + $hist[$#hist] = '' + } + $isp = $#hist; + another_line(); + $print_line = 1; +} +sub eoh_ign_mode { + eoh(); + $print_line = 1; +} +sub eol { + $ix = $len; + $print_line=0; +} +sub execute { + eval "$hist[$#hist]"; + if( $#hist>0 && $hist[$#hist] eq $hist[$#hist-1] ) { + pop(@hist); # if it is the same, delete + }else{ + &main::add_hist( *hist, *hist ); + } + push( @hist, ''); # deceive 'input' it is an empty line + last IN_STACK; +} +sub ins_char { + my($c) = @_; + &main::insert_char($c,*len,*ix,*hist); + $print_line = 4; +} +sub ins_last_word { + if( $lastop{op} =~ /^ins_(nth|last)_word/ ) { + return if $wisp < 1; + #delete last last_word + bs(length $lastop{word}); + }else { + $wisp = $#hist; + return if $wisp < 1; + } + $hist[--$wisp] =~ /(\S+)\s*$/; + $lastop{word} = $1; + ins_char($lastop{word}); +} +sub ins_nth_word { + my($n) = @_; + if( $lastop{op} =~ /^ins_(nth|last)_word/ ) { + return if $wisp < 1; + #delete last last_word + bs(length $lastop{word}); + }else { + $wisp = $#hist; + return if $wisp < 1; + } + $hist[--$wisp] =~ /((\S+)\s*){1,$n}/; + $lastop{word} = $2; + ins_char($lastop{word}); +} +sub list_func { + my( $s, @cmds, $cmd, $func); + $func = 0; + open( THIS, "$0" ) || return; #shouldn't occur + while( $s = ) { + if( $s =~ /^\s*sub\s+main::input\s*\{/ ) { + $func = 1; + next; + } + next if !$func; + if( $s =~ s/^\s*sub\s+// ) { + $s =~ s/\s*[\{].*//; + push @cmds,$s; + } + } + close THIS; + foreach $cmd (sort @cmds) { + print OUT $cmd; + } +} + +sub bind { + # bind Key or Subst + # if there is no arguments, then list them + my($hash,$key,$val) = @_; + my( $mod,$chr,$v2,$k,$cnt ); + if( defined %{$hash} ) { + $k = $key; + if( $hash eq "Key" ) { + ($v2 = $val) =~ s/\s*[\(;].*//; + if( !defined &{$v2} ) { + print STDERR "Unknown function $v2\n"; + return; + } + $mod = 0; $cnt =0; $k = ''; + for( $i=0; $i= 0x80 ) { + $mod .= '\M'; + $chr = pack("c", ord($chr)-0x80); + } + if( $chr eq $ESC ) { + $chr = '\E'; + }elsif( ord($chr) < 0x20 ) { + $mod .= '\C'; + $chr = pack("c", ord($chr)+0x40); + }elsif( ord($chr) == 0x7f ) { + $chr = '\C?'; + } + $mod .= $chr; + } + if( ord($val) < 0x20 ) { + $val = '\C'.pack("c", ord($val)+0x40); + } + print OUT "Key $mod $val\n"; + } + while( ($key,$val) = each(%Subst) ) { + print OUT "Subst $key $val\n"; + } + } +} +sub next_char { + $ix++ if ($ix<$len); + $print_line=0; +} + +sub next_line { + if($isp<$#hist) { + $isp++; + if( $isp==$#hist ) { + $hist[$isp] = ''; + } + }else { + $isp = $#hist; + print OUT "\a"; + } + another_line(); +} + +sub next_word { + $hist[$#hist] =~ /^(.{$ix}\S*(\s+|$))/; + $ix = length($1); + $print_line=0; +} + +sub enter_wo_subst { + last IN_STACK; +} + +sub prev_char { + $ix-- if $ix>0; + $print_line=0; +} + +sub prev_line { + if($isp>0) { + $isp--; + }else { + $isp = 0; + print OUT "\a"; + } + another_line(); +} + +sub prev_word { + my($tmp); + $tmp = substr($hist[$#hist],0,$ix); + $tmp =~ s/(^|\S+)\s*$//; + $ix = length($tmp); + $print_line=0; +} + +sub cancel { + $hist[$#hist] = ""; + $len = 0; + last IN_STACK; +} +sub quote { + my($c); + sysread(IN, $c, 1); +# $c = getc(IN); + ins_char($c); +} + +sub search_rev { + $s = ''; + $mode = 'search_rev'; + $p_save = $prompt; + $prompt = "($mode)'$s':"; + $hist[$#hist] = $hist[$isp]; + another_line(); +} + +sub search { + $s = ''; + $mode = 'search'; + $p_save = $prompt; + $prompt = "($mode)'$s':"; + $hist[$#hist] = $hist[$isp]; + another_line(); +} + +sub subst { + my($key,$val); + $done = 0; + while( ($key,$val) = each(%Subst) ) { + last if( eval "\$hist[\$#hist] =~ s\$key$val" ) ; + } + $ix = $len = length($hist[$#hist]); +} + +sub termsize { + my($row, $col,$s); + if( -f "/vmunix" ) { + $s =&main::stty ("everything"); + ($row,$col) = ($s =~ /(\d+)\s+rows[,\s]+(\d+)\s+columns/ ); + } else { + $s =&main::stty ("-a"); + ($row,$col) = ($s =~ /rows[=\s]+(\d+)[,;\s]+columns[=\s]+(\d+)/ ); + } + ($row,$col); +} + diff --git a/modules/FvwmConsole/getline.c b/modules/FvwmConsole/getline.c index 8c5e334c8..a281b460f 100644 --- a/modules/FvwmConsole/getline.c +++ b/modules/FvwmConsole/getline.c @@ -16,6 +16,7 @@ #include "config.h" #include "FvwmConsole.h" +#include "libs/log.h" #ifdef HAVE_READLINE #include diff --git a/modules/FvwmConsole/meson.build b/modules/FvwmConsole/meson.build new file mode 100644 index 000000000..5e918af60 --- /dev/null +++ b/modules/FvwmConsole/meson.build @@ -0,0 +1,21 @@ +# TODO: Tidy up the dependencies +if not golang.found() + executable( + 'FvwmConsole', + sources: ['FvwmConsole.c', 'FvwmConsole.h'], + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, + ) + executable( + 'FvwmConsoleC', + sources: ['FvwmConsoleC.c', 'FvwmConsole.h', 'getline.c'], + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, + ) +endif diff --git a/modules/FvwmEvent/FvwmEvent.c b/modules/FvwmEvent/FvwmEvent.c index 91760a597..2240aa039 100644 --- a/modules/FvwmEvent/FvwmEvent.c +++ b/modules/FvwmEvent/FvwmEvent.c @@ -27,7 +27,9 @@ #include "config.h" #include +#include +#include "libs/log.h" #include "libs/Module.h" #include "libs/fvwmlib.h" #include "libs/Parse.h" diff --git a/modules/FvwmEvent/meson.build b/modules/FvwmEvent/meson.build new file mode 100644 index 000000000..396f8f3aa --- /dev/null +++ b/modules/FvwmEvent/meson.build @@ -0,0 +1,11 @@ +module_sources = ['FvwmEvent.c'] + +executable( + 'FvwmEvent', + module_sources, + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmForm/Changes b/modules/FvwmForm/Changes index c8bb98a90..480c45b00 100644 --- a/modules/FvwmForm/Changes +++ b/modules/FvwmForm/Changes @@ -18,4 +18,4 @@ 2/11/95 Finished preliminary debugging, wrote manual page. -2/7/95 Project started. \ No newline at end of file +2/7/95 Project started. diff --git a/modules/FvwmForm/FvwmTalk-wrapper.in b/modules/FvwmForm/FvwmTalk-wrapper.in new file mode 100644 index 000000000..6235d994b --- /dev/null +++ b/modules/FvwmForm/FvwmTalk-wrapper.in @@ -0,0 +1,5 @@ +#!/bin/sh +## FvwmTalk was made obsolete in March 1999. +## This provides compatibility. + +exec @FVWM_MODULEDIR@/FvwmForm "$@" FvwmForm-Talk diff --git a/modules/FvwmForm/meson.build b/modules/FvwmForm/meson.build new file mode 100644 index 000000000..7666229cf --- /dev/null +++ b/modules/FvwmForm/meson.build @@ -0,0 +1,42 @@ +install_data = [ + 'FvwmForm-Form', + 'FvwmForm-Capture', + 'FvwmForm-Desktop', + 'FvwmForm-QuitVerify', + 'FvwmForm-Rlogin', + 'FvwmForm-RootCursor', + 'FvwmForm-Talk', + 'FvwmForm-TalkHelp', + 'FvwmForm-XDGOptionsHelp', + 'FvwmForm-XDGMenuHelp', +] + +install_data( + install_data, + install_dir: join_paths(get_option('datadir'), meson.project_name()), +) + +fvwmform_sources = [ + 'FvwmForm.c', + 'ReadXServer.c', + 'ParseCommand.c', +] + +# TODO: Tidy up the dependencies +executable( + 'FvwmForm', + fvwmform_sources, + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) + +configure_file( + input: 'FvwmTalk-wrapper.in', + output: 'FvwmTalk', + configuration: conf, + install_dir: fvwm_moduledir, + install_mode: install_mask_755, +) diff --git a/modules/FvwmIconMan/FvwmIconMan.c b/modules/FvwmIconMan/FvwmIconMan.c index b9b93b5e4..ac6677de3 100644 --- a/modules/FvwmIconMan/FvwmIconMan.c +++ b/modules/FvwmIconMan/FvwmIconMan.c @@ -24,6 +24,7 @@ #include "xmanager.h" #include "libs/fvwmsignal.h" +#include "libs/log.h" #include "libs/Module.h" #include "libs/FTips.h" #include "libs/FEvent.h" diff --git a/modules/FvwmIconMan/FvwmIconMan.h b/modules/FvwmIconMan/FvwmIconMan.h index cd5719f8f..ee46a64ae 100644 --- a/modules/FvwmIconMan/FvwmIconMan.h +++ b/modules/FvwmIconMan/FvwmIconMan.h @@ -414,4 +414,4 @@ extern WinManager *find_windows_manager (Window win); extern int win_in_viewport (WinData *win); extern WinData *id_to_win(Ulong id); -#endif /* IN_FVWMICONMAN_H */ \ No newline at end of file +#endif /* IN_FVWMICONMAN_H */ diff --git a/modules/FvwmIconMan/debug.c b/modules/FvwmIconMan/debug.c index 5edc50c35..602a97162 100644 --- a/modules/FvwmIconMan/debug.c +++ b/modules/FvwmIconMan/debug.c @@ -19,6 +19,7 @@ #include #include "FvwmIconMan.h" +#include "libs/log.h" static FILE *console = NULL; diff --git a/modules/FvwmIconMan/meson.build b/modules/FvwmIconMan/meson.build new file mode 100644 index 000000000..b16fad0f4 --- /dev/null +++ b/modules/FvwmIconMan/meson.build @@ -0,0 +1,24 @@ +iconman_sources = [ + 'FvwmIconMan.c', + 'debug.c', + 'debug.h', + 'functions.c', + 'fvwm.c', + 'globals.c', + 'readconfig.c', + 'winlist.c', + 'x.c', + 'xmanager.c', +] + +executable( + 'FvwmIconMan', + sources: iconman_sources, + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) + +install_data('ConfigFvwmIconMan', install_dir: fvwm_datadir) diff --git a/modules/FvwmIconMan/x.c b/modules/FvwmIconMan/x.c index 9e00ede87..8af4feccf 100644 --- a/modules/FvwmIconMan/x.c +++ b/modules/FvwmIconMan/x.c @@ -27,6 +27,7 @@ #include "libs/FEvent.h" #include "libs/ColorUtils.h" #include "libs/Graphics.h" +#include "libs/log.h" #include "libs/XError.h" #define GRAB_EVENTS (ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|\ diff --git a/modules/FvwmIconMan/xmanager.c b/modules/FvwmIconMan/xmanager.c index 8f9e7eecf..15a7f2b02 100644 --- a/modules/FvwmIconMan/xmanager.c +++ b/modules/FvwmIconMan/xmanager.c @@ -27,6 +27,7 @@ #include "libs/Rectangles.h" #include "libs/Grab.h" #include "libs/Graphics.h" +#include "libs/log.h" #include "libs/Strings.h" #include "libs/wild.h" diff --git a/modules/FvwmIdent/FvwmIdent.c b/modules/FvwmIdent/FvwmIdent.c index 392578c00..f60ef65da 100644 --- a/modules/FvwmIdent/FvwmIdent.c +++ b/modules/FvwmIdent/FvwmIdent.c @@ -53,6 +53,7 @@ #include "libs/System.h" #include "libs/Target.h" #include "libs/XError.h" +#include "libs/log.h" #include "FvwmIdent.h" diff --git a/modules/FvwmIdent/meson.build b/modules/FvwmIdent/meson.build new file mode 100644 index 000000000..711e9a367 --- /dev/null +++ b/modules/FvwmIdent/meson.build @@ -0,0 +1,14 @@ +install_data( + 'ConfigFvwmIdent', + install_dir: join_paths(datadir, meson.project_name()), +) + +executable( + 'FvwmIdent', + sources: 'FvwmIdent.c', + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmMFL/FvwmCommandS.in b/modules/FvwmMFL/FvwmCommandS.in new file mode 100644 index 000000000..a8ada3557 --- /dev/null +++ b/modules/FvwmMFL/FvwmCommandS.in @@ -0,0 +1,4 @@ +#!/bin/sh +modargs="$1 $2 $3 $4 $5" +shift; shift; shift; shift; shift +exec @FVWM_MODULEDIR@/FvwmMFL $modargs $@ diff --git a/modules/FvwmMFL/FvwmMFL.c b/modules/FvwmMFL/FvwmMFL.c index 6319720da..27eb3ec02 100644 --- a/modules/FvwmMFL/FvwmMFL.c +++ b/modules/FvwmMFL/FvwmMFL.c @@ -876,4 +876,4 @@ int main(int argc, char **argv) unlink(socket_name); return (0); -} \ No newline at end of file +} diff --git a/modules/FvwmMFL/Makefile.am b/modules/FvwmMFL/Makefile.am index 944fd523f..32f36c86f 100644 --- a/modules/FvwmMFL/Makefile.am +++ b/modules/FvwmMFL/Makefile.am @@ -27,4 +27,4 @@ LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) $(XRandR_LIBS) \ $(libevent_LIBS) $(Xft_LIBS) -AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xft_CFLAGS) $(libevent_CFLAGS) \ No newline at end of file +AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xft_CFLAGS) $(libevent_CFLAGS) diff --git a/modules/FvwmMFL/meson.build b/modules/FvwmMFL/meson.build new file mode 100644 index 000000000..2af7e953d --- /dev/null +++ b/modules/FvwmMFL/meson.build @@ -0,0 +1,17 @@ +configure_file( + input: 'FvwmCommandS.in', + output: 'FvwmCommandS', + configuration: conf, + install_dir: fvwm_moduledir, + install_mode: install_mask_755, +) + +executable( + 'FvwmMFL', + sources: 'FvwmMFL.c', + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmPager/FvwmPager.c b/modules/FvwmPager/FvwmPager.c index 13aaadc4b..f540d5a33 100644 --- a/modules/FvwmPager/FvwmPager.c +++ b/modules/FvwmPager/FvwmPager.c @@ -32,13 +32,19 @@ #include /* Saul */ #endif /* Saul */ -#include "libs/Module.h" +#include "libs/Colorset.h" #include "libs/FEvent.h" +#include "libs/Flocale.h" +#include "libs/FRenderInit.h" +#include "libs/FShape.h" +#include "libs/fvwmlib.h" #include "libs/fvwmsignal.h" #include "libs/Grab.h" +#include "libs/log.h" +#include "libs/Module.h" #include "libs/Parse.h" -#include "libs/Strings.h" #include "libs/Picture.h" +#include "libs/Strings.h" #include "libs/System.h" #include "fvwm/fvwm.h" @@ -485,4 +491,4 @@ void ExitPager(void) XUngrabKeyboard(dpy, CurrentTime); exit(0); -} \ No newline at end of file +} diff --git a/modules/FvwmPager/meson.build b/modules/FvwmPager/meson.build new file mode 100644 index 000000000..069f964ec --- /dev/null +++ b/modules/FvwmPager/meson.build @@ -0,0 +1,24 @@ +install_data( + 'ConfigFvwmPager', + install_dir: join_paths(datadir, meson.project_name()), +) + +fvwmpager_sources = [ + 'fpmonitor.c', + 'FvwmPager.c', + 'FvwmPager.h', + 'init_pager.c', + 'messages.c', + 'x_pager.c', + 'x_update.c', +] + +executable( + 'FvwmPager', + sources: fvwmpager_sources, + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmPager/messages.c b/modules/FvwmPager/messages.c index 6f66e4b5b..5f1a769ac 100644 --- a/modules/FvwmPager/messages.c +++ b/modules/FvwmPager/messages.c @@ -17,6 +17,7 @@ #include #include "libs/FScreen.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Module.h" #include "libs/Parse.h" #include "fvwm/fvwm.h" diff --git a/modules/FvwmPerl/meson.build b/modules/FvwmPerl/meson.build new file mode 100644 index 000000000..b14f3e9d6 --- /dev/null +++ b/modules/FvwmPerl/meson.build @@ -0,0 +1,7 @@ +configure_file( + input: 'FvwmPerl.in', + output: 'FvwmPerl', + configuration: file_config, + install_dir: fvwm_moduledir, + install_mode: install_mask_755, +) diff --git a/modules/FvwmRearrange/FvwmRearrange.c b/modules/FvwmRearrange/FvwmRearrange.c index 542fa2529..c51a7233c 100644 --- a/modules/FvwmRearrange/FvwmRearrange.c +++ b/modules/FvwmRearrange/FvwmRearrange.c @@ -41,11 +41,12 @@ #include +#include "fvwm/fvwm.h" #include "libs/fvwmlib.h" +#include "libs/log.h" #include "libs/Module.h" -#include "fvwm/fvwm.h" -#include "libs/vpacket.h" #include "libs/System.h" +#include "libs/vpacket.h" typedef struct window_item { Window frame; diff --git a/modules/FvwmRearrange/meson.build b/modules/FvwmRearrange/meson.build new file mode 100644 index 000000000..490fea2da --- /dev/null +++ b/modules/FvwmRearrange/meson.build @@ -0,0 +1,9 @@ +executable( + 'FvwmRearrange', + sources: 'FvwmRearrange.c', + dependencies: [all_found_deps], + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: libfvwm3, +) diff --git a/modules/FvwmScript/FvwmScript.c b/modules/FvwmScript/FvwmScript.c index ca60941d6..f3ca258a0 100644 --- a/modules/FvwmScript/FvwmScript.c +++ b/modules/FvwmScript/FvwmScript.c @@ -22,25 +22,26 @@ #include "config.h" #include "types.h" -#include "libs/fvwmlib.h" -#include "libs/FScreen.h" -#include "libs/FShape.h" -#include "libs/FEvent.h" -#include "libs/fvwmsignal.h" -#include "libs/Picture.h" -#include "libs/PictureGraphics.h" -#include "libs/FRender.h" -#include "libs/FRenderInit.h" -#include "libs/FGettext.h" #include "libs/Bindings.h" #include "libs/charmap.h" -#include "libs/wcontext.h" #include "libs/ColorUtils.h" +#include "libs/Cursor.h" +#include "libs/FEvent.h" +#include "libs/FGettext.h" +#include "libs/FRender.h" +#include "libs/FRenderInit.h" +#include "libs/FScreen.h" +#include "libs/FShape.h" +#include "libs/fvwmlib.h" +#include "libs/fvwmsignal.h" #include "libs/Graphics.h" +#include "libs/log.h" #include "libs/Parse.h" +#include "libs/Picture.h" +#include "libs/PictureGraphics.h" #include "libs/Strings.h" +#include "libs/wcontext.h" #include "libs/XError.h" -#include "libs/Cursor.h" #ifdef MEMDEBUG /* For debugging */ #include @@ -1476,4 +1477,4 @@ int main (int argc, char **argv) MainLoop(); return 0; -} \ No newline at end of file +} diff --git a/modules/FvwmScript/Instructions.c b/modules/FvwmScript/Instructions.c index 03000157f..80e734d38 100644 --- a/modules/FvwmScript/Instructions.c +++ b/modules/FvwmScript/Instructions.c @@ -15,6 +15,8 @@ #include "config.h" +#include + #include "types.h" #include "libs/fvwmsignal.h" #include "libs/ftime.h" @@ -27,6 +29,7 @@ #include "libs/Module.h" #include "libs/ColorUtils.h" #include "libs/Strings.h" +#include "libs/log.h" #ifdef HAVE_GETPWUID # include #endif diff --git a/modules/FvwmScript/Scripts/README b/modules/FvwmScript/Scripts/README index 2fe4a7648..9bb2d7d26 100644 --- a/modules/FvwmScript/Scripts/README +++ b/modules/FvwmScript/Scripts/README @@ -25,4 +25,4 @@ I hope that FvwmScript will interest you. In any case, please send me a short em tell me what you think about FvwmScript. Frederic Cordier -e-mail f-cord96@bat710.univ-lyon1.fr \ No newline at end of file +e-mail f-cord96@bat710.univ-lyon1.fr diff --git a/modules/FvwmScript/Widgets/CheckBox.c b/modules/FvwmScript/Widgets/CheckBox.c index f6fd17df5..7c27a3152 100644 --- a/modules/FvwmScript/Widgets/CheckBox.c +++ b/modules/FvwmScript/Widgets/CheckBox.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/HScrollBar.c b/modules/FvwmScript/Widgets/HScrollBar.c index 867c54843..3e800e9c0 100644 --- a/modules/FvwmScript/Widgets/HScrollBar.c +++ b/modules/FvwmScript/Widgets/HScrollBar.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/ItemDraw.c b/modules/FvwmScript/Widgets/ItemDraw.c index c7397f266..d5c47e574 100644 --- a/modules/FvwmScript/Widgets/ItemDraw.c +++ b/modules/FvwmScript/Widgets/ItemDraw.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* left, center and right offsets */ diff --git a/modules/FvwmScript/Widgets/List.c b/modules/FvwmScript/Widgets/List.c index 9d2cd8b2a..63843c97c 100644 --- a/modules/FvwmScript/Widgets/List.c +++ b/modules/FvwmScript/Widgets/List.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" #define BdWidth 2 /* Border width */ diff --git a/modules/FvwmScript/Widgets/Menu.c b/modules/FvwmScript/Widgets/Menu.c index e1f8c9c5d..d648d35f0 100644 --- a/modules/FvwmScript/Widgets/Menu.c +++ b/modules/FvwmScript/Widgets/Menu.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* left, center and right offsets for title 0 (not very useful here) */ diff --git a/modules/FvwmScript/Widgets/PopupMenu.c b/modules/FvwmScript/Widgets/PopupMenu.c index 7d6c5f6e5..bf18e89b7 100644 --- a/modules/FvwmScript/Widgets/PopupMenu.c +++ b/modules/FvwmScript/Widgets/PopupMenu.c @@ -20,6 +20,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/PushButton.c b/modules/FvwmScript/Widgets/PushButton.c index ed617e464..3b4b07b50 100644 --- a/modules/FvwmScript/Widgets/PushButton.c +++ b/modules/FvwmScript/Widgets/PushButton.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* left, center and right offsets */ diff --git a/modules/FvwmScript/Widgets/RadioButton.c b/modules/FvwmScript/Widgets/RadioButton.c index 2cc94ddb2..45522a6c6 100644 --- a/modules/FvwmScript/Widgets/RadioButton.c +++ b/modules/FvwmScript/Widgets/RadioButton.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/Swallow.c b/modules/FvwmScript/Widgets/Swallow.c index f8c6d5363..0b7dea93c 100644 --- a/modules/FvwmScript/Widgets/Swallow.c +++ b/modules/FvwmScript/Widgets/Swallow.c @@ -17,9 +17,11 @@ #include "libs/fvwmlib.h" #include "libs/ColorUtils.h" +#include "libs/log.h" #include "libs/Strings.h" #include "Tools.h" + extern int fd[2]; /* diff --git a/modules/FvwmScript/Widgets/TextField.c b/modules/FvwmScript/Widgets/TextField.c index 6826ba9e0..20d217020 100644 --- a/modules/FvwmScript/Widgets/TextField.c +++ b/modules/FvwmScript/Widgets/TextField.c @@ -19,6 +19,7 @@ #include "libs/ColorUtils.h" #include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/VScrollBar.c b/modules/FvwmScript/Widgets/VScrollBar.c index 634aa39ed..df9ab0254 100644 --- a/modules/FvwmScript/Widgets/VScrollBar.c +++ b/modules/FvwmScript/Widgets/VScrollBar.c @@ -15,10 +15,11 @@ #include "config.h" -#include "libs/fvwmlib.h" #include "libs/ColorUtils.h" -#include "libs/Graphics.h" #include "libs/FEvent.h" +#include "libs/fvwmlib.h" +#include "libs/Graphics.h" +#include "libs/log.h" #include "Tools.h" /* diff --git a/modules/FvwmScript/Widgets/Widget.c b/modules/FvwmScript/Widgets/Widget.c index aea877af2..4f31047b8 100644 --- a/modules/FvwmScript/Widgets/Widget.c +++ b/modules/FvwmScript/Widgets/Widget.c @@ -19,6 +19,7 @@ #include "config.h" +#include "libs/log.h" #include "Tools.h" extern void InitPushButton(struct XObj *xobj); diff --git a/modules/FvwmScript/fvwmscript-syntax.sh b/modules/FvwmScript/fvwmscript-syntax.sh new file mode 100644 index 000000000..254adece3 --- /dev/null +++ b/modules/FvwmScript/fvwmscript-syntax.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# This script is used to generate the FvwmScript syntax + +LEX='flex' +# check for bison, prefer that if found else fall back to yacc. +YACC=$(command -v bison >/dev/null 2>&1) && YACC="$(which bison) -y" || YACC=yacc + +rm -f lex.yy.c y.tab.c y.tab.h script.tab.c script.tab.h || true + +if [ "$(command -v LEX >/dev/null 2>&1)" ]; then + LEX="$LEX --nounput" +fi + +$LEX scanner.l && mv lex.yy.c scanner.c + +$YACC script.y && mv *.tab.c script.c + +# Check and update header file if needed +if [ -f y.tab.h -o -f script.tab.h ]; then + if [ "$(cmp -s *.tab.h script.h)" = 0 ]; then + rm -f y.tab.h script.tab.h + else + mv *.tab.h script.h + fi +fi diff --git a/modules/FvwmScript/meson.build b/modules/FvwmScript/meson.build new file mode 100644 index 000000000..70a74700d --- /dev/null +++ b/modules/FvwmScript/meson.build @@ -0,0 +1,109 @@ +libwidget_sources = [ + 'Widgets/CheckBox.c', + 'Widgets/HDipstick.c', + 'Widgets/HScrollBar.c', + 'Widgets/ItemDraw.c', + 'Widgets/List.c', + 'Widgets/Menu.c', + 'Widgets/MiniScroll.c', + 'Widgets/PopupMenu.c', + 'Widgets/PushButton.c', + 'Widgets/RadioButton.c', + 'Widgets/Rectangle.c', + 'Widgets/Swallow.c', + 'Widgets/TextField.c', + 'Widgets/Tools.c', + 'Widgets/Tools.h', + 'Widgets/VDipstick.c', + 'Widgets/VScrollBar.c', + 'Widgets/Widget.c', +] + +# Todo: could/should this be a shared library? +libWidgets = static_library( + 'Widgets', + sources: libwidget_sources, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: get_option('libdir'), + link_with: libfvwm3, +) + +fvwmscript_sources = [ + 'FvwmScript.c', + 'Instructions.c', + 'libyywrap.c', + 'scanner.c', + 'script.c', +] + +executable( + 'FvwmScript', + sources: fvwmscript_sources, + dependencies: all_found_deps, + include_directories: includedirs, + install_dir: fvwm_moduledir, + install: true, + link_with: [libfvwm3, libWidgets], +) + +install_scripts = [ + 'Scripts/FvwmScript-BaseConfig', + 'Scripts/FvwmScript-BellSetup', + 'Scripts/FvwmScript-Buttons', + 'Scripts/FvwmScript-Colorset', + 'Scripts/FvwmScript-Date', + 'Scripts/FvwmScript-FileBrowser', + 'Scripts/FvwmScript-Find', + 'Scripts/FvwmScript-KeyboardSetup', + 'Scripts/FvwmScript-PointerSetup', + 'Scripts/FvwmScript-Quit', + 'Scripts/FvwmScript-ScreenDump', + 'Scripts/FvwmScript-ScreenSetup', + 'Scripts/FvwmScript-WidgetDemo', +] + +install_data( + install_scripts, + install_dir: fvwm_datadir, +) + +install_data( + 'Scripts/fvwm-script-ComExample.pl', + install_dir: fvwm_datadir, +) + +# This sed is pulled straight from the makefile; we can do better +# by directly using configure_file() with a proper template rather +# than this silly sed business. +perl_path = perl.full_path() +configure_file( + input: 'Scripts/FvwmScript-ComExample.in', + output: 'FvwmScript-ComExample', + command: [ + sed, + '-e', f's,xFVWM_DATADIRx,@fvwm_datadir@,', + '-e', f's,xPERLx,@perl_path@,', + '@INPUT@', + ], + capture: true, + install_dir: join_paths(fvwm_datadir), +) + +install_symlink( + 'FvwmScript-ConfirmCopyConfig', + pointing_to: 'default-config/FvwmScript-ConfirmCopyConfig', + install_dir: fvwm_datadir, +) + +install_symlink( + 'FvwmScript-ConfirmQuit', + pointing_to: 'default-config/FvwmScript-ConfirmQuit', + install_dir: fvwm_datadir, +) + +install_symlink( + 'FvwmScript-DateTime', + pointing_to: 'default-config/FvwmScript-DateTime', + install_dir: fvwm_datadir, +) diff --git a/modules/FvwmScript/scanner.c b/modules/FvwmScript/scanner.c index c716a70be..bc3601968 100644 --- a/modules/FvwmScript/scanner.c +++ b/modules/FvwmScript/scanner.c @@ -15,6 +15,7 @@ /* First, we deal with platform-specific or compiler-specific issues. */ +#include "config.h" /* begin standard C headers. */ #include #include diff --git a/modules/FvwmScript/script.c b/modules/FvwmScript/script.c index 3d0240b51..33aada43f 100644 --- a/modules/FvwmScript/script.c +++ b/modules/FvwmScript/script.c @@ -300,6 +300,7 @@ #include "config.h" #include "types.h" #include "libs/FGettext.h" +#include "libs/log.h" #define MAX_VARS 5120 extern int numligne; @@ -3418,5 +3419,3 @@ yyparse () #line 864 "script.y" - - diff --git a/modules/FvwmScript/script.y b/modules/FvwmScript/script.y index ab2e0156d..529f96386 100644 --- a/modules/FvwmScript/script.y +++ b/modules/FvwmScript/script.y @@ -15,6 +15,7 @@ #include "config.h" #include "types.h" #include "libs/FGettext.h" +#include "libs/log.h" #define MAX_VARS 5120 extern int numligne; diff --git a/perllib/meson.build b/perllib/meson.build new file mode 100644 index 000000000..9ad295e72 --- /dev/null +++ b/perllib/meson.build @@ -0,0 +1,43 @@ +perl_FVWMmod = [ + 'FVWM/Constants.pm', + 'FVWM/Event.pm', + 'FVWM/EventNames.pm', + 'FVWM/Tracker.pm', + 'FVWM/Commands.pm', + 'FVWM/Module/Terminal.pm', + 'FVWM/Module/Toolkit.pm', + 'FVWM/Tracker/Colorsets.pm', + 'FVWM/Tracker/GlobalConfig.pm', + 'FVWM/Tracker/ModuleConfig.pm', + 'FVWM/Tracker/PageInfo.pm', + 'FVWM/Tracker/Scheduler.pm', + 'FVWM/Tracker/WindowList.pm', +] + +perl_FVWMmodfile = [ + 'FVWM/Module.pm.in', +] + +configure_file( + input: perl_FVWMmodfile, + output: 'Module.pm', + configuration: file_config, + install_dir: join_paths(file_config.get_unquoted('FVWM_PERLLIBDIR'), 'FVWM'), + install: true, +) + +install_data( + perl_FVWMmod, + install_dir: file_config.get_unquoted('FVWM_PERLLIBDIR'), + preserve_path: true, +) + +perl_general_module = [ + 'General/FileSystem.pm', + 'General/Parse.pm', +] + +install_data( + perl_general_module, + install_dir: file_config.get_unquoted('FVWM_PERLLIBDIR') + '/General', +) diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 000000000..b117edf65 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +ar da de fr ru es sv_SE zh_CN zh_TW diff --git a/po/POTFILES b/po/POTFILES new file mode 100644 index 000000000..3d1537fc5 --- /dev/null +++ b/po/POTFILES @@ -0,0 +1,16 @@ + '../fvwm/fvwm3.c' + '../fvwm/expand.c' + '../fvwm/windowlist.c' + '../fvwm/virtual.c' + '../fvwm/menus.c' + '../default-config/config' + '../bin/fvwm-menu-desktop-config.fpl' + '../modules/FvwmForm/FvwmForm-XDGMenuHelp' + '../modules/FvwmForm/FvwmForm-XDGOptionsHelp' + '../default-config/FvwmScript-ConfirmQuit' + '../default-config/FvwmScript-ConfirmCopyConfig' + '../modules/FvwmScript/Scripts/FvwmScript-BellSetup' + '../modules/FvwmScript/Scripts/FvwmScript-KeyboardSetup' + '../modules/FvwmScript/Scripts/FvwmScript-PointerSetup' + '../modules/FvwmScript/Scripts/FvwmScript-ScreenSetup' + '../modules/FvwmScript/Scripts/FvwmScript-FileBrowser' diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 000000000..8bfcb1b6a --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n = import('i18n') +i18n.gettext(meson.project_name()) diff --git a/utils/fvwm-version-str.sh b/utils/fvwm-version-str.sh index 0bc9725cf..59480bdce 100755 --- a/utils/fvwm-version-str.sh +++ b/utils/fvwm-version-str.sh @@ -18,4 +18,4 @@ if grep -q -i '^ISRELEASED="yes"' ./configure.ac; then echo "$VERSION" else git describe --always --long --dirty --tags -fi \ No newline at end of file +fi