summaryrefslogtreecommitdiffstats
path: root/plug-ins/file-faxg3
diff options
context:
space:
mode:
Diffstat (limited to 'plug-ins/file-faxg3')
-rw-r--r--plug-ins/file-faxg3/Makefile.am49
-rw-r--r--plug-ins/file-faxg3/Makefile.in1004
-rw-r--r--plug-ins/file-faxg3/faxg3.c626
-rw-r--r--plug-ins/file-faxg3/g3.c277
-rw-r--r--plug-ins/file-faxg3/g3.h55
5 files changed, 2011 insertions, 0 deletions
diff --git a/plug-ins/file-faxg3/Makefile.am b/plug-ins/file-faxg3/Makefile.am
new file mode 100644
index 0000000..b528d6a
--- /dev/null
+++ b/plug-ins/file-faxg3/Makefile.am
@@ -0,0 +1,49 @@
+## Process this file with automake to produce Makefile.in
+
+libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
+libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
+libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
+libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
+libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
+libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
+libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
+
+if OS_WIN32
+mwindows = -mwindows
+endif
+
+if HAVE_WINDRES
+include $(top_srcdir)/build/windows/gimprc-plug-ins.rule
+file_faxg3_RC = file-faxg3.rc.o
+endif
+
+AM_LDFLAGS = $(mwindows)
+
+libexecdir = $(gimpplugindir)/plug-ins/file-faxg3
+
+libexec_PROGRAMS = file-faxg3
+
+file_faxg3_SOURCES = \
+ faxg3.c \
+ g3.c \
+ g3.h
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ $(CAIRO_CFLAGS) \
+ $(GDK_PIXBUF_CFLAGS) \
+ $(GEGL_CFLAGS) \
+ -I$(includedir)
+
+LDADD = \
+ $(libgimp) \
+ $(libgimpconfig) \
+ $(libgimpcolor) \
+ $(libgimpbase) \
+ $(libgimpmath) \
+ $(CAIRO_LIBS) \
+ $(GDK_PIXBUF_LIBS) \
+ $(GEGL_LIBS) \
+ $(RT_LIBS) \
+ $(INTLLIBS) \
+ $(file_faxg3_RC)
diff --git a/plug-ins/file-faxg3/Makefile.in b/plug-ins/file-faxg3/Makefile.in
new file mode 100644
index 0000000..2f63348
--- /dev/null
+++ b/plug-ins/file-faxg3/Makefile.in
@@ -0,0 +1,1004 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Version resources for Microsoft Windows
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+libexec_PROGRAMS = file-faxg3$(EXEEXT)
+subdir = plug-ins/file-faxg3
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/m4macros/alsa.m4 \
+ $(top_srcdir)/m4macros/ax_compare_version.m4 \
+ $(top_srcdir)/m4macros/ax_cxx_compile_stdcxx.m4 \
+ $(top_srcdir)/m4macros/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4macros/ax_prog_cc_for_build.m4 \
+ $(top_srcdir)/m4macros/ax_prog_perl_version.m4 \
+ $(top_srcdir)/m4macros/detectcflags.m4 \
+ $(top_srcdir)/m4macros/pythondev.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+PROGRAMS = $(libexec_PROGRAMS)
+am_file_faxg3_OBJECTS = faxg3.$(OBJEXT) g3.$(OBJEXT)
+file_faxg3_OBJECTS = $(am_file_faxg3_OBJECTS)
+file_faxg3_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+file_faxg3_DEPENDENCIES = $(libgimp) $(libgimpconfig) $(libgimpcolor) \
+ $(libgimpbase) $(libgimpmath) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(file_faxg3_RC)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/faxg3.Po ./$(DEPDIR)/g3.Po
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(file_faxg3_SOURCES)
+DIST_SOURCES = $(file_faxg3_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/build/windows/gimprc-plug-ins.rule \
+ $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AA_LIBS = @AA_LIBS@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPSTREAM_UTIL = @APPSTREAM_UTIL@
+AR = @AR@
+AS = @AS@
+ATK_CFLAGS = @ATK_CFLAGS@
+ATK_LIBS = @ATK_LIBS@
+ATK_REQUIRED_VERSION = @ATK_REQUIRED_VERSION@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BABL_CFLAGS = @BABL_CFLAGS@
+BABL_LIBS = @BABL_LIBS@
+BABL_REQUIRED_VERSION = @BABL_REQUIRED_VERSION@
+BUG_REPORT_URL = @BUG_REPORT_URL@
+BUILD_EXEEXT = @BUILD_EXEEXT@
+BUILD_OBJEXT = @BUILD_OBJEXT@
+BZIP2_LIBS = @BZIP2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@
+CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@
+CAIRO_PDF_REQUIRED_VERSION = @CAIRO_PDF_REQUIRED_VERSION@
+CAIRO_REQUIRED_VERSION = @CAIRO_REQUIRED_VERSION@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+CPP_FOR_BUILD = @CPP_FOR_BUILD@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DESKTOP_DATADIR = @DESKTOP_DATADIR@
+DESKTOP_FILE_VALIDATE = @DESKTOP_FILE_VALIDATE@
+DLLTOOL = @DLLTOOL@
+DOC_SHOOTER = @DOC_SHOOTER@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILE_AA = @FILE_AA@
+FILE_EXR = @FILE_EXR@
+FILE_HEIF = @FILE_HEIF@
+FILE_JP2_LOAD = @FILE_JP2_LOAD@
+FILE_JPEGXL = @FILE_JPEGXL@
+FILE_MNG = @FILE_MNG@
+FILE_PDF_SAVE = @FILE_PDF_SAVE@
+FILE_PS = @FILE_PS@
+FILE_WMF = @FILE_WMF@
+FILE_XMC = @FILE_XMC@
+FILE_XPM = @FILE_XPM@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FONTCONFIG_REQUIRED_VERSION = @FONTCONFIG_REQUIRED_VERSION@
+FREETYPE2_REQUIRED_VERSION = @FREETYPE2_REQUIRED_VERSION@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDBUS_CODEGEN = @GDBUS_CODEGEN@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GDK_PIXBUF_REQUIRED_VERSION = @GDK_PIXBUF_REQUIRED_VERSION@
+GEGL = @GEGL@
+GEGL_CFLAGS = @GEGL_CFLAGS@
+GEGL_LIBS = @GEGL_LIBS@
+GEGL_MAJOR_MINOR_VERSION = @GEGL_MAJOR_MINOR_VERSION@
+GEGL_REQUIRED_VERSION = @GEGL_REQUIRED_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GEXIV2_CFLAGS = @GEXIV2_CFLAGS@
+GEXIV2_LIBS = @GEXIV2_LIBS@
+GEXIV2_REQUIRED_VERSION = @GEXIV2_REQUIRED_VERSION@
+GIMP_API_VERSION = @GIMP_API_VERSION@
+GIMP_APP_VERSION = @GIMP_APP_VERSION@
+GIMP_BINARY_AGE = @GIMP_BINARY_AGE@
+GIMP_COMMAND = @GIMP_COMMAND@
+GIMP_DATA_VERSION = @GIMP_DATA_VERSION@
+GIMP_FULL_NAME = @GIMP_FULL_NAME@
+GIMP_INTERFACE_AGE = @GIMP_INTERFACE_AGE@
+GIMP_MAJOR_VERSION = @GIMP_MAJOR_VERSION@
+GIMP_MICRO_VERSION = @GIMP_MICRO_VERSION@
+GIMP_MINOR_VERSION = @GIMP_MINOR_VERSION@
+GIMP_MKENUMS = @GIMP_MKENUMS@
+GIMP_MODULES = @GIMP_MODULES@
+GIMP_PACKAGE_REVISION = @GIMP_PACKAGE_REVISION@
+GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@
+GIMP_PLUGINS = @GIMP_PLUGINS@
+GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@
+GIMP_REAL_VERSION = @GIMP_REAL_VERSION@
+GIMP_RELEASE = @GIMP_RELEASE@
+GIMP_SYSCONF_VERSION = @GIMP_SYSCONF_VERSION@
+GIMP_TOOL_VERSION = @GIMP_TOOL_VERSION@
+GIMP_UNSTABLE = @GIMP_UNSTABLE@
+GIMP_USER_VERSION = @GIMP_USER_VERSION@
+GIMP_VERSION = @GIMP_VERSION@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIO_WINDOWS_CFLAGS = @GIO_WINDOWS_CFLAGS@
+GIO_WINDOWS_LIBS = @GIO_WINDOWS_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
+GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
+GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+GS_LIBS = @GS_LIBS@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@
+GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@
+GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
+GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
+HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
+HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@
+HAVE_CXX14 = @HAVE_CXX14@
+HAVE_FINITE = @HAVE_FINITE@
+HAVE_ISFINITE = @HAVE_ISFINITE@
+HAVE_VFORK = @HAVE_VFORK@
+HOST_GLIB_COMPILE_RESOURCES = @HOST_GLIB_COMPILE_RESOURCES@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_REQUIRED_VERSION = @INTLTOOL_REQUIRED_VERSION@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@
+ISO_CODES_LOCATION = @ISO_CODES_LOCATION@
+JPEG_LIBS = @JPEG_LIBS@
+JSON_GLIB_CFLAGS = @JSON_GLIB_CFLAGS@
+JSON_GLIB_LIBS = @JSON_GLIB_LIBS@
+JXL_CFLAGS = @JXL_CFLAGS@
+JXL_LIBS = @JXL_LIBS@
+JXL_THREADS_CFLAGS = @JXL_THREADS_CFLAGS@
+JXL_THREADS_LIBS = @JXL_THREADS_LIBS@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LCMS_REQUIRED_VERSION = @LCMS_REQUIRED_VERSION@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
+LIBBACKTRACE_LIBS = @LIBBACKTRACE_LIBS@
+LIBHEIF_CFLAGS = @LIBHEIF_CFLAGS@
+LIBHEIF_LIBS = @LIBHEIF_LIBS@
+LIBHEIF_REQUIRED_VERSION = @LIBHEIF_REQUIRED_VERSION@
+LIBJXL_REQUIRED_VERSION = @LIBJXL_REQUIRED_VERSION@
+LIBLZMA_REQUIRED_VERSION = @LIBLZMA_REQUIRED_VERSION@
+LIBMYPAINT_CFLAGS = @LIBMYPAINT_CFLAGS@
+LIBMYPAINT_LIBS = @LIBMYPAINT_LIBS@
+LIBMYPAINT_REQUIRED_VERSION = @LIBMYPAINT_REQUIRED_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBPNG_REQUIRED_VERSION = @LIBPNG_REQUIRED_VERSION@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
+LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBUNWIND_REQUIRED_VERSION = @LIBUNWIND_REQUIRED_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+LT_VERSION_INFO = @LT_VERSION_INFO@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAIL = @MAIL@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIME_INFO_CFLAGS = @MIME_INFO_CFLAGS@
+MIME_INFO_LIBS = @MIME_INFO_LIBS@
+MIME_TYPES = @MIME_TYPES@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
+MNG_CFLAGS = @MNG_CFLAGS@
+MNG_LIBS = @MNG_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+MYPAINT_BRUSHES_CFLAGS = @MYPAINT_BRUSHES_CFLAGS@
+MYPAINT_BRUSHES_LIBS = @MYPAINT_BRUSHES_LIBS@
+NATIVE_GLIB_CFLAGS = @NATIVE_GLIB_CFLAGS@
+NATIVE_GLIB_LIBS = @NATIVE_GLIB_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
+OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENEXR_REQUIRED_VERSION = @OPENEXR_REQUIRED_VERSION@
+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
+OPENJPEG_LIBS = @OPENJPEG_LIBS@
+OPENJPEG_REQUIRED_VERSION = @OPENJPEG_REQUIRED_VERSION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@
+PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@
+PANGOCAIRO_REQUIRED_VERSION = @PANGOCAIRO_REQUIRED_VERSION@
+PATHSEP = @PATHSEP@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERL_REQUIRED_VERSION = @PERL_REQUIRED_VERSION@
+PERL_VERSION = @PERL_VERSION@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PNG_CFLAGS = @PNG_CFLAGS@
+PNG_LIBS = @PNG_LIBS@
+POFILES = @POFILES@
+POPPLER_CFLAGS = @POPPLER_CFLAGS@
+POPPLER_DATA_CFLAGS = @POPPLER_DATA_CFLAGS@
+POPPLER_DATA_LIBS = @POPPLER_DATA_LIBS@
+POPPLER_DATA_REQUIRED_VERSION = @POPPLER_DATA_REQUIRED_VERSION@
+POPPLER_LIBS = @POPPLER_LIBS@
+POPPLER_REQUIRED_VERSION = @POPPLER_REQUIRED_VERSION@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYBIN_PATH = @PYBIN_PATH@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGIMP_EXTRA_CFLAGS = @PYGIMP_EXTRA_CFLAGS@
+PYGTK_CFLAGS = @PYGTK_CFLAGS@
+PYGTK_CODEGEN = @PYGTK_CODEGEN@
+PYGTK_DEFSDIR = @PYGTK_DEFSDIR@
+PYGTK_LIBS = @PYGTK_LIBS@
+PYLINK_LIBS = @PYLINK_LIBS@
+PYTHON = @PYTHON@
+PYTHON2_REQUIRED_VERSION = @PYTHON2_REQUIRED_VERSION@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RSVG_REQUIRED_VERSION = @RSVG_REQUIRED_VERSION@
+RT_LIBS = @RT_LIBS@
+SCREENSHOT_LIBS = @SCREENSHOT_LIBS@
+SED = @SED@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOCKET_LIBS = @SOCKET_LIBS@
+SSE2_EXTRA_CFLAGS = @SSE2_EXTRA_CFLAGS@
+SSE4_1_EXTRA_CFLAGS = @SSE4_1_EXTRA_CFLAGS@
+SSE_EXTRA_CFLAGS = @SSE_EXTRA_CFLAGS@
+STRIP = @STRIP@
+SVG_CFLAGS = @SVG_CFLAGS@
+SVG_LIBS = @SVG_LIBS@
+SYMPREFIX = @SYMPREFIX@
+TIFF_LIBS = @TIFF_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WEBKIT_CFLAGS = @WEBKIT_CFLAGS@
+WEBKIT_LIBS = @WEBKIT_LIBS@
+WEBKIT_REQUIRED_VERSION = @WEBKIT_REQUIRED_VERSION@
+WEBPDEMUX_CFLAGS = @WEBPDEMUX_CFLAGS@
+WEBPDEMUX_LIBS = @WEBPDEMUX_LIBS@
+WEBPMUX_CFLAGS = @WEBPMUX_CFLAGS@
+WEBPMUX_LIBS = @WEBPMUX_LIBS@
+WEBP_CFLAGS = @WEBP_CFLAGS@
+WEBP_LIBS = @WEBP_LIBS@
+WEBP_REQUIRED_VERSION = @WEBP_REQUIRED_VERSION@
+WEB_PAGE = @WEB_PAGE@
+WIN32_LARGE_ADDRESS_AWARE = @WIN32_LARGE_ADDRESS_AWARE@
+WINDRES = @WINDRES@
+WMF_CFLAGS = @WMF_CFLAGS@
+WMF_CONFIG = @WMF_CONFIG@
+WMF_LIBS = @WMF_LIBS@
+WMF_REQUIRED_VERSION = @WMF_REQUIRED_VERSION@
+XDG_EMAIL = @XDG_EMAIL@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_REQUIRED_VERSION = @XGETTEXT_REQUIRED_VERSION@
+XMC_CFLAGS = @XMC_CFLAGS@
+XMC_LIBS = @XMC_LIBS@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+XMU_LIBS = @XMU_LIBS@
+XPM_LIBS = @XPM_LIBS@
+XSLTPROC = @XSLTPROC@
+XVFB_RUN = @XVFB_RUN@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gimpdatadir = @gimpdatadir@
+gimpdir = @gimpdir@
+gimplocaledir = @gimplocaledir@
+gimpplugindir = @gimpplugindir@
+gimpsysconfdir = @gimpsysconfdir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
+libdir = @libdir@
+libexecdir = $(gimpplugindir)/plug-ins/file-faxg3
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+manpage_gimpdir = @manpage_gimpdir@
+mkdir_p = @mkdir_p@
+ms_librarian = @ms_librarian@
+mypaint_brushes_dir = @mypaint_brushes_dir@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
+libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
+libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
+libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
+libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
+libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
+libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
+@OS_WIN32_TRUE@mwindows = -mwindows
+@HAVE_WINDRES_TRUE@GIMPPLUGINRC = $(top_builddir)/build/windows/gimp-plug-ins.rc
+@HAVE_WINDRES_TRUE@file_faxg3_RC = file-faxg3.rc.o
+AM_LDFLAGS = $(mwindows)
+file_faxg3_SOURCES = \
+ faxg3.c \
+ g3.c \
+ g3.h
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ $(CAIRO_CFLAGS) \
+ $(GDK_PIXBUF_CFLAGS) \
+ $(GEGL_CFLAGS) \
+ -I$(includedir)
+
+LDADD = \
+ $(libgimp) \
+ $(libgimpconfig) \
+ $(libgimpcolor) \
+ $(libgimpbase) \
+ $(libgimpmath) \
+ $(CAIRO_LIBS) \
+ $(GDK_PIXBUF_LIBS) \
+ $(GEGL_LIBS) \
+ $(RT_LIBS) \
+ $(INTLLIBS) \
+ $(file_faxg3_RC)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build/windows/gimprc-plug-ins.rule $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plug-ins/file-faxg3/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu plug-ins/file-faxg3/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+$(top_srcdir)/build/windows/gimprc-plug-ins.rule $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+file-faxg3$(EXEEXT): $(file_faxg3_OBJECTS) $(file_faxg3_DEPENDENCIES) $(EXTRA_file_faxg3_DEPENDENCIES)
+ @rm -f file-faxg3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(file_faxg3_OBJECTS) $(file_faxg3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faxg3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g3.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/faxg3.Po
+ -rm -f ./$(DEPDIR)/g3.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/faxg3.Po
+ -rm -f ./$(DEPDIR)/g3.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libexecPROGRAMS \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-libexecPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+# `windres` seems a very stupid tool and it breaks with double shlashes
+# in parameter paths. Strengthen the rule a little.
+@HAVE_WINDRES_TRUE@%.rc.o:
+@HAVE_WINDRES_TRUE@ $(WINDRES) --define ORIGINALFILENAME_STR="$*$(EXEEXT)" \
+@HAVE_WINDRES_TRUE@ --define INTERNALNAME_STR="$*" \
+@HAVE_WINDRES_TRUE@ --define TOP_SRCDIR="`echo $(top_srcdir) | sed 's*//*/*'`" \
+@HAVE_WINDRES_TRUE@ -I"`echo $(top_srcdir)/app | sed 's%/\+%/%'`" \
+@HAVE_WINDRES_TRUE@ -I"`echo $(top_builddir)/app | sed 's%/\+%/%'`"\
+@HAVE_WINDRES_TRUE@ -I"`echo $(top_builddir) | sed 's%/\+%/%'`"\
+@HAVE_WINDRES_TRUE@ $(GIMPPLUGINRC) $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/plug-ins/file-faxg3/faxg3.c b/plug-ins/file-faxg3/faxg3.c
new file mode 100644
index 0000000..07ef436
--- /dev/null
+++ b/plug-ins/file-faxg3/faxg3.c
@@ -0,0 +1,626 @@
+/* This is a plugin for GIMP.
+ *
+ * Copyright (C) 1997 Jochen Friedrich
+ * Parts Copyright (C) 1995 Gert Doering
+ * Parts Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * 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 3 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 <https://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <errno.h>
+#include <string.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+
+#include <glib.h> /* For G_OS_WIN32 */
+#include <glib/gstdio.h>
+
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
+
+#ifndef _O_BINARY
+#define _O_BINARY 0
+#endif
+
+#include <libgimp/gimp.h>
+
+#include "g3.h"
+
+#include "libgimp/stdplugins-intl.h"
+
+
+#define LOAD_PROC "file-faxg3-load"
+#define VERSION "0.6"
+
+/* Declare local functions.
+ */
+
+static void query (void);
+static void run (const gchar *name,
+ gint nparams,
+ const GimpParam *param,
+ gint *nreturn_vals,
+ GimpParam **return_vals);
+
+static gint32 load_image (const gchar *filename,
+ GError **error);
+
+static gint32 emitgimp (gint hcol,
+ gint row,
+ const gchar *bitmap,
+ gint bperrow,
+ const gchar *filename,
+ GError **error);
+
+
+const GimpPlugInInfo PLUG_IN_INFO =
+{
+ NULL, /* init_proc */
+ NULL, /* quit_proc */
+ query, /* query_proc */
+ run, /* run_proc */
+};
+
+MAIN ()
+
+void
+query (void)
+{
+ static const GimpParamDef load_args[] =
+ {
+ { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" },
+ { GIMP_PDB_STRING, "filename", "The name of the file to load" },
+ { GIMP_PDB_STRING, "raw-filename", "The name of the file to load" },
+ };
+ static const GimpParamDef load_return_vals[] =
+ {
+ { GIMP_PDB_IMAGE, "image", "Output image" },
+ };
+
+ gimp_install_procedure (LOAD_PROC,
+ "loads g3 fax files",
+ "This plug-in loads Fax G3 Image files.",
+ "Jochen Friedrich",
+ "Jochen Friedrich, Gert Doering, Spencer Kimball & Peter Mattis",
+ VERSION,
+ N_("G3 fax image"),
+ NULL,
+ GIMP_PLUGIN,
+ G_N_ELEMENTS (load_args),
+ G_N_ELEMENTS (load_return_vals),
+ load_args, load_return_vals);
+
+ gimp_register_file_handler_mime (LOAD_PROC, "image/g3-fax");
+ gimp_register_magic_load_handler (LOAD_PROC,
+ "g3",
+ "",
+ "4,string,Research");
+}
+
+static void
+run (const gchar *name,
+ gint nparams,
+ const GimpParam *param,
+ gint *nreturn_vals,
+ GimpParam **return_vals)
+{
+ static GimpParam values[2];
+ gint32 image_ID;
+ GError *error = NULL;
+
+ INIT_I18N ();
+ gegl_init (NULL, NULL);
+
+ *nreturn_vals = 1;
+ *return_vals = values;
+
+ values[0].type = GIMP_PDB_STATUS;
+ values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
+
+ if (strcmp (name, LOAD_PROC) == 0)
+ {
+ image_ID = load_image (param[1].data.d_string, &error);
+
+ if (image_ID != -1)
+ {
+ *nreturn_vals = 2;
+
+ values[0].data.d_status = GIMP_PDB_SUCCESS;
+ values[1].type = GIMP_PDB_IMAGE;
+ values[1].data.d_image = image_ID;
+ }
+ else
+ {
+ values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
+
+ if (error)
+ {
+ *nreturn_vals = 2;
+
+ values[1].type = GIMP_PDB_STRING;
+ values[1].data.d_string = error->message;
+ }
+ }
+ }
+}
+
+#ifdef DEBUG
+void
+putbin (unsigned long d)
+{
+ unsigned long i = 0x80000000;
+
+ while (i != 0)
+ {
+ putc((d & i) ? '1' : '0', stderr);
+ i >>= 1;
+ }
+ putc('\n', stderr);
+}
+#endif
+
+static int byte_tab[256];
+/* static int o_stretch; */ /* -stretch: double each line */
+/* static int o_stretch_force=-1; */ /* -1: guess from filename */
+/* static int o_lj; */ /* -l: LJ output */
+/* static int o_turn; */ /* -t: turn 90 degrees right */
+
+struct g3_tree * black, * white;
+
+#define CHUNK 2048;
+static char rbuf[2048]; /* read buffer */
+static int rp; /* read pointer */
+static int rs; /* read buffer size */
+
+#define MAX_ROWS 4300
+#define MAX_COLS 1728 /* !! FIXME - command line parameter */
+
+
+static gint32
+load_image (const gchar *filename,
+ GError **error)
+{
+ int data;
+ int hibit;
+ struct g3_tree *p;
+ int nr_pels;
+ int fd;
+ int color;
+ int i, rr, rsize;
+ int cons_eol;
+ int last_eol_row;
+
+ gint32 image_id;
+ gint bperrow = MAX_COLS/8; /* bytes per bit row */
+ gchar *bitmap; /* MAX_ROWS by (bperrow) bytes */
+ gchar *bp; /* bitmap pointer */
+ gint row;
+ gint max_rows; /* max. rows allocated */
+ gint col, hcol; /* column, highest column ever used */
+
+ gimp_progress_init_printf (_("Opening '%s'"),
+ gimp_filename_to_utf8 (filename));
+
+ /* initialize lookup trees */
+ build_tree (&white, t_white);
+ build_tree (&white, m_white);
+ build_tree (&black, t_black);
+ build_tree (&black, m_black);
+
+ init_byte_tab (0, byte_tab);
+
+ fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
+
+ if (fd < 0)
+ {
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
+ _("Could not open '%s' for reading: %s"),
+ gimp_filename_to_utf8 (filename), g_strerror (errno));
+ return -1;
+ }
+
+ hibit = 0;
+ data = 0;
+
+ cons_eol = 0; /* consecutive EOLs read - zero yet */
+ last_eol_row = 0;
+
+ color = 0; /* start with white */
+ rr = 0;
+
+ rsize = lseek (fd, 0L, SEEK_END);
+ lseek (fd, 0L, 0);
+
+ rs = read (fd, rbuf, sizeof (rbuf));
+ if (rs < 0)
+ {
+ perror ("read");
+ close (fd);
+ gimp_quit ();
+ }
+
+ rr += rs;
+ gimp_progress_update ((float) rr / rsize / 2.0);
+
+ /* skip GhostScript header */
+ rp = (rs >= 64 && strcmp (rbuf + 1, "PC Research, Inc") == 0) ? 64 : 0;
+
+ /* initialize bitmap */
+
+ row = col = hcol = 0;
+
+ bitmap = g_new0 (gchar, (max_rows = MAX_ROWS) * MAX_COLS / 8);
+ if (! bitmap)
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not create buffer to process image data."));
+ return -1;
+ }
+
+ bp = &bitmap[row * MAX_COLS / 8];
+
+ while (rs > 0 && cons_eol < 10) /* i.e., while (!EOF) */
+ {
+#ifdef DEBUG
+ g_printerr ("hibit=%2d, data=", hibit);
+ putbin (data);
+#endif
+
+ while (hibit < 20)
+ {
+ data |= (byte_tab[(int) (unsigned char) rbuf[rp++]] << hibit);
+ hibit += 8;
+
+ if (rp >= rs)
+ {
+ rs = read (fd, rbuf, sizeof (rbuf));
+ if (rs < 0)
+ { perror ("read2");
+ break;
+ }
+ rr += rs;
+ gimp_progress_update ((float) rr / rsize / 2.0);
+ rp = 0;
+ if (rs == 0)
+ goto do_write;
+ }
+
+#ifdef DEBUG
+ g_printerr ("hibit=%2d, data=", hibit);
+ putbin (data);
+#endif
+ }
+
+ if (color == 0) /* white */
+ p = white->nextb[data & BITM];
+ else /* black */
+ p = black->nextb[data & BITM];
+
+ while (p != NULL && ! (p->nr_bits))
+ {
+ data >>= FBITS;
+ hibit -= FBITS;
+ p = p->nextb[data & BITM];
+ }
+
+ if (p == NULL) /* invalid code */
+ {
+ g_printerr ("invalid code, row=%d, col=%d, file offset=%lx, skip to eol\n",
+ row, col, (unsigned long) lseek (fd, 0, 1) - rs + rp);
+
+ while ((data & 0x03f) != 0)
+ {
+ data >>= 1; hibit--;
+
+ if ( hibit < 20 )
+ {
+ data |= (byte_tab[(int) (unsigned char) rbuf[rp++]] << hibit);
+ hibit += 8;
+
+ if (rp >= rs) /* buffer underrun */
+ {
+ rs = read (fd, rbuf, sizeof (rbuf));
+
+ if (rs < 0)
+ { perror ("read4");
+ break;
+ }
+
+ rr += rs;
+ gimp_progress_update ((float) rr / rsize / 2.0);
+ rp = 0;
+ if (rs == 0)
+ goto do_write;
+ }
+ }
+ }
+ nr_pels = -1; /* handle as if eol */
+ }
+ else /* p != NULL <-> valid code */
+ {
+ data >>= p->nr_bits;
+ hibit -= p->nr_bits;
+
+ nr_pels = ((struct g3_leaf *) p)->nr_pels;
+#ifdef DEBUG
+ g_printerr ("PELs: %d (%c)\n", nr_pels, '0' + color);
+#endif
+ }
+
+ /* handle EOL (including fill bits) */
+ if (nr_pels == -1)
+ {
+#ifdef DEBUG
+ g_printerr ("hibit=%2d, data=", hibit);
+ putbin (data);
+#endif
+ /* skip filler 0bits -> seek for "1"-bit */
+ while ((data & 0x01) != 1)
+ {
+ if ((data & 0xf) == 0) /* nibble optimization */
+ {
+ hibit-= 4;
+ data >>= 4;
+ }
+ else
+ {
+ hibit--;
+ data >>= 1;
+ }
+
+ /* fill higher bits */
+ if (hibit < 20)
+ {
+ data |= ( byte_tab[(int) (unsigned char) rbuf[ rp++]] << hibit);
+ hibit += 8;
+
+ if (rp >= rs) /* buffer underrun */
+ {
+ rs = read (fd, rbuf, sizeof (rbuf));
+ if ( rs < 0 )
+ {
+ perror ("read3");
+ break;
+ }
+ rr += rs;
+ gimp_progress_update ((float) rr / rsize / 2.0);
+ rp = 0;
+ if (rs == 0)
+ goto do_write;
+ }
+ }
+#ifdef DEBUG
+ g_printerr ("hibit=%2d, data=", hibit );
+ putbin(data);
+#endif
+ } /* end skip 0bits */
+ hibit--;
+ data >>=1;
+
+ color = 0;
+
+ if (col == 0)
+ {
+ if (last_eol_row != row)
+ {
+ cons_eol++; /* consecutive EOLs */
+ last_eol_row = row;
+ }
+ }
+ else
+ {
+ if (col > hcol && col <= MAX_COLS)
+ hcol = col;
+ row++;
+
+ /* bitmap memory full? make it larger! */
+ if (row >= max_rows)
+ {
+ gchar *p = g_try_realloc (bitmap,
+ (max_rows += 500) * MAX_COLS / 8);
+ if (p == NULL)
+ {
+ perror ("realloc() failed, page truncated");
+ rs = 0;
+ }
+ else
+ {
+ bitmap = p;
+ memset (&bitmap[ row * MAX_COLS / 8 ], 0,
+ (max_rows - row) * MAX_COLS / 8);
+ }
+ }
+
+ col=0; bp = &bitmap[row * MAX_COLS / 8];
+ cons_eol = 0;
+ }
+ }
+ else /* not eol */
+ {
+ if (col + nr_pels > MAX_COLS)
+ nr_pels = MAX_COLS - col;
+
+ if (color == 0) /* white */
+ {
+ col += nr_pels;
+ }
+ else /* black */
+ {
+ register int bit = (0x80 >> (col & 07));
+ register char *w = & bp[col >> 3];
+
+ for (i = nr_pels; i > 0; i--)
+ {
+ *w |= bit;
+ bit >>=1;
+ if (bit == 0)
+ {
+ bit = 0x80;
+ w++;
+ }
+ col++;
+ }
+ }
+
+ if (nr_pels < 64)
+ color = !color; /* terminating code */
+ }
+ } /* end main loop */
+
+ do_write: /* write pbm (or whatever) file */
+
+ if (fd != 0)
+ close (fd); /* close input file */
+
+#ifdef DEBUG
+ g_printerr ("consecutive EOLs: %d, max columns: %d\n", cons_eol, hcol);
+#endif
+
+ image_id = emitgimp (hcol, row, bitmap, bperrow, filename, error);
+
+ g_free (bitmap);
+
+ return image_id;
+}
+
+/* hcol is the number of columns, row the number of rows
+ * bperrow is the number of bytes actually used by hcol, which may
+ * be greater than (hcol+7)/8 [in case of an unscaled g3 image less
+ * than 1728 pixels wide]
+ */
+
+static gint32
+emitgimp (gint hcol,
+ gint row,
+ const gchar *bitmap,
+ gint bperrow,
+ const gchar *filename,
+ GError **error)
+{
+ GeglBuffer *buffer;
+ gint32 image_ID;
+ gint32 layer_ID;
+ guchar *buf;
+ guchar tmp;
+ gint x, y;
+ gint xx, yy;
+ gint tile_height;
+
+ /* initialize */
+
+ tmp = 0;
+
+#ifdef DEBUG
+ g_printerr ("emit gimp: %d x %d\n", hcol, row);
+#endif
+
+ if (hcol > GIMP_MAX_IMAGE_SIZE || hcol <= 0 ||
+ row > GIMP_MAX_IMAGE_SIZE || row <= 0)
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Invalid image dimensions (%d x %d). "
+ "Image may be corrupt."),
+ hcol, row);
+ return -1;
+ }
+
+ image_ID = gimp_image_new (hcol, row, GIMP_GRAY);
+ if (image_ID == -1)
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not create image."));
+ return -1;
+ }
+ gimp_image_set_filename (image_ID, filename);
+
+ layer_ID = gimp_layer_new (image_ID, _("Background"),
+ hcol,
+ row,
+ GIMP_GRAY_IMAGE,
+ 100,
+ gimp_image_get_default_new_layer_mode (image_ID));
+ gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
+
+ buffer = gimp_drawable_get_buffer (layer_ID);
+
+ tile_height = gimp_tile_height ();
+#ifdef DEBUG
+ g_printerr ("tile height: %d\n", tile_height);
+#endif
+
+ buf = g_new (guchar, hcol * tile_height);
+ if (! buf)
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not create buffer to process image data."));
+ g_object_unref (buffer);
+ gimp_image_delete(image_ID);
+ return -1;
+ }
+
+ xx = 0;
+ yy = 0;
+
+ for (y = 0; y < row; y++)
+ {
+ for (x = 0; x < hcol; x++)
+ {
+ if ((x & 7) == 0)
+ tmp = bitmap[y * bperrow + (x >> 3)];
+
+ buf[xx++] = tmp&(128 >> (x & 7)) ? 0 : 255;
+ }
+
+ if ((y - yy) == tile_height - 1)
+ {
+#ifdef DEBUG
+ g_printerr ("update tile height: %d\n", tile_height);
+#endif
+
+ gegl_buffer_set (buffer, GEGL_RECTANGLE (0, yy, hcol, tile_height), 0,
+ NULL, buf, GEGL_AUTO_ROWSTRIDE);
+
+ gimp_progress_update (0.5 + (float) y / row / 2.0);
+
+ xx = 0;
+ yy += tile_height;
+ }
+ }
+
+ if (row - yy)
+ {
+#ifdef DEBUG
+ g_printerr ("update rest: %d\n", row-yy);
+#endif
+
+ gegl_buffer_set (buffer, GEGL_RECTANGLE (0, yy, hcol, row - yy), 0,
+ NULL, buf, GEGL_AUTO_ROWSTRIDE);
+ }
+
+ gimp_progress_update (1.0);
+
+ g_free (buf);
+
+ g_object_unref (buffer);
+
+ return image_ID;
+}
diff --git a/plug-ins/file-faxg3/g3.c b/plug-ins/file-faxg3/g3.c
new file mode 100644
index 0000000..1a476e8
--- /dev/null
+++ b/plug-ins/file-faxg3/g3.c
@@ -0,0 +1,277 @@
+/* #ident "@(#)g3.c 3.1 95/08/30 Copyright (c) Gert Doering" */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <glib.h>
+
+#include "g3.h"
+
+struct g3code t_white[66] = {
+{ 0, 0, 0x0ac, 8 },
+{ 0, 1, 0x038, 6 },
+{ 0, 2, 0x00e, 4 },
+{ 0, 3, 0x001, 4 },
+{ 0, 4, 0x00d, 4 },
+{ 0, 5, 0x003, 4 },
+{ 0, 6, 0x007, 4 },
+{ 0, 7, 0x00f, 4 },
+{ 0, 8, 0x019, 5 },
+{ 0, 9, 0x005, 5 },
+{ 0, 10, 0x01c, 5 },
+{ 0, 11, 0x002, 5 },
+{ 0, 12, 0x004, 6 },
+{ 0, 13, 0x030, 6 },
+{ 0, 14, 0x00b, 6 },
+{ 0, 15, 0x02b, 6 },
+{ 0, 16, 0x015, 6 },
+{ 0, 17, 0x035, 6 },
+{ 0, 18, 0x072, 7 },
+{ 0, 19, 0x018, 7 },
+{ 0, 20, 0x008, 7 },
+{ 0, 21, 0x074, 7 },
+{ 0, 22, 0x060, 7 },
+{ 0, 23, 0x010, 7 },
+{ 0, 24, 0x00a, 7 },
+{ 0, 25, 0x06a, 7 },
+{ 0, 26, 0x064, 7 },
+{ 0, 27, 0x012, 7 },
+{ 0, 28, 0x00c, 7 },
+{ 0, 29, 0x040, 8 },
+{ 0, 30, 0x0c0, 8 },
+{ 0, 31, 0x058, 8 },
+{ 0, 32, 0x0d8, 8 },
+{ 0, 33, 0x048, 8 },
+{ 0, 34, 0x0c8, 8 },
+{ 0, 35, 0x028, 8 },
+{ 0, 36, 0x0a8, 8 },
+{ 0, 37, 0x068, 8 },
+{ 0, 38, 0x0e8, 8 },
+{ 0, 39, 0x014, 8 },
+{ 0, 40, 0x094, 8 },
+{ 0, 41, 0x054, 8 },
+{ 0, 42, 0x0d4, 8 },
+{ 0, 43, 0x034, 8 },
+{ 0, 44, 0x0b4, 8 },
+{ 0, 45, 0x020, 8 },
+{ 0, 46, 0x0a0, 8 },
+{ 0, 47, 0x050, 8 },
+{ 0, 48, 0x0d0, 8 },
+{ 0, 49, 0x04a, 8 },
+{ 0, 50, 0x0ca, 8 },
+{ 0, 51, 0x02a, 8 },
+{ 0, 52, 0x0aa, 8 },
+{ 0, 53, 0x024, 8 },
+{ 0, 54, 0x0a4, 8 },
+{ 0, 55, 0x01a, 8 },
+{ 0, 56, 0x09a, 8 },
+{ 0, 57, 0x05a, 8 },
+{ 0, 58, 0x0da, 8 },
+{ 0, 59, 0x052, 8 },
+{ 0, 60, 0x0d2, 8 },
+{ 0, 61, 0x04c, 8 },
+{ 0, 62, 0x0cc, 8 },
+{ 0, 63, 0x02c, 8 },
+{ 0, -1, 0, 11 }, /* 11 0-bits == EOL, special handling */
+{ 0, -1, 0, 0 }}; /* end of table */
+
+/* make-up codes white */
+struct g3code m_white[28] = {
+{ 0, 64, 0x01b, 5 },
+{ 0, 128, 0x009, 5 },
+{ 0, 192, 0x03a, 6 },
+{ 0, 256, 0x076, 7 },
+{ 0, 320, 0x06c, 8 },
+{ 0, 384, 0x0ec, 8 },
+{ 0, 448, 0x026, 8 },
+{ 0, 512, 0x0a6, 8 },
+{ 0, 576, 0x016, 8 },
+{ 0, 640, 0x0e6, 8 },
+{ 0, 704, 0x066, 9 },
+{ 0, 768, 0x166, 9 },
+{ 0, 832, 0x096, 9 },
+{ 0, 896, 0x196, 9 },
+{ 0, 960, 0x056, 9 },
+{ 0,1024, 0x156, 9 },
+{ 0,1088, 0x0d6, 9 },
+{ 0,1152, 0x1d6, 9 },
+{ 0,1216, 0x036, 9 },
+{ 0,1280, 0x136, 9 },
+{ 0,1344, 0x0b6, 9 },
+{ 0,1408, 0x1b6, 9 },
+{ 0,1472, 0x032, 9 },
+{ 0,1536, 0x132, 9 },
+{ 0,1600, 0x0b2, 9 },
+{ 0,1664, 0x006, 6 },
+{ 0,1728, 0x1b2, 9 },
+{ 0, -1, 0, 0} };
+
+
+struct g3code t_black[66] = {
+{ 0, 0, 0x3b0, 10 },
+{ 0, 1, 0x002, 3 },
+{ 0, 2, 0x003, 2 },
+{ 0, 3, 0x001, 2 },
+{ 0, 4, 0x006, 3 },
+{ 0, 5, 0x00c, 4 },
+{ 0, 6, 0x004, 4 },
+{ 0, 7, 0x018, 5 },
+{ 0, 8, 0x028, 6 },
+{ 0, 9, 0x008, 6 },
+{ 0, 10, 0x010, 7 },
+{ 0, 11, 0x050, 7 },
+{ 0, 12, 0x070, 7 },
+{ 0, 13, 0x020, 8 },
+{ 0, 14, 0x0e0, 8 },
+{ 0, 15, 0x030, 9 },
+{ 0, 16, 0x3a0, 10 },
+{ 0, 17, 0x060, 10 },
+{ 0, 18, 0x040, 10 },
+{ 0, 19, 0x730, 11 },
+{ 0, 20, 0x0b0, 11 },
+{ 0, 21, 0x1b0, 11 },
+{ 0, 22, 0x760, 11 },
+{ 0, 23, 0x0a0, 11 },
+{ 0, 24, 0x740, 11 },
+{ 0, 25, 0x0c0, 11 },
+{ 0, 26, 0x530, 12 },
+{ 0, 27, 0xd30, 12 },
+{ 0, 28, 0x330, 12 },
+{ 0, 29, 0xb30, 12 },
+{ 0, 30, 0x160, 12 },
+{ 0, 31, 0x960, 12 },
+{ 0, 32, 0x560, 12 },
+{ 0, 33, 0xd60, 12 },
+{ 0, 34, 0x4b0, 12 },
+{ 0, 35, 0xcb0, 12 },
+{ 0, 36, 0x2b0, 12 },
+{ 0, 37, 0xab0, 12 },
+{ 0, 38, 0x6b0, 12 },
+{ 0, 39, 0xeb0, 12 },
+{ 0, 40, 0x360, 12 },
+{ 0, 41, 0xb60, 12 },
+{ 0, 42, 0x5b0, 12 },
+{ 0, 43, 0xdb0, 12 },
+{ 0, 44, 0x2a0, 12 },
+{ 0, 45, 0xaa0, 12 },
+{ 0, 46, 0x6a0, 12 },
+{ 0, 47, 0xea0, 12 },
+{ 0, 48, 0x260, 12 },
+{ 0, 49, 0xa60, 12 },
+{ 0, 50, 0x4a0, 12 },
+{ 0, 51, 0xca0, 12 },
+{ 0, 52, 0x240, 12 },
+{ 0, 53, 0xec0, 12 },
+{ 0, 54, 0x1c0, 12 },
+{ 0, 55, 0xe40, 12 },
+{ 0, 56, 0x140, 12 },
+{ 0, 57, 0x1a0, 12 },
+{ 0, 58, 0x9a0, 12 },
+{ 0, 59, 0xd40, 12 },
+{ 0, 60, 0x340, 12 },
+{ 0, 61, 0x5a0, 12 },
+{ 0, 62, 0x660, 12 },
+{ 0, 63, 0xe60, 12 },
+{ 0, -1, 0x000, 11 },
+{ 0, -1, 0, 0 } };
+
+struct g3code m_black[28] = {
+{ 0, 64, 0x3c0, 10 },
+{ 0, 128, 0x130, 12 },
+{ 0, 192, 0x930, 12 },
+{ 0, 256, 0xda0, 12 },
+{ 0, 320, 0xcc0, 12 },
+{ 0, 384, 0x2c0, 12 },
+{ 0, 448, 0xac0, 12 },
+{ 0, 512, 0x6c0, 13 },
+{ 0, 576,0x16c0, 13 },
+{ 0, 640, 0xa40, 13 },
+{ 0, 704,0x1a40, 13 },
+{ 0, 768, 0x640, 13 },
+{ 0, 832,0x1640, 13 },
+{ 0, 896, 0x9c0, 13 },
+{ 0, 960,0x19c0, 13 },
+{ 0,1024, 0x5c0, 13 },
+{ 0,1088,0x15c0, 13 },
+{ 0,1152, 0xdc0, 13 },
+{ 0,1216,0x1dc0, 13 },
+{ 0,1280, 0x940, 13 },
+{ 0,1344,0x1940, 13 },
+{ 0,1408, 0x540, 13 },
+{ 0,1472,0x1540, 13 },
+{ 0,1536, 0xb40, 13 },
+{ 0,1600,0x1b40, 13 },
+{ 0,1664, 0x4c0, 13 },
+{ 0,1728,0x14c0, 13 },
+{ 0, -1, 0, 0 } };
+
+void tree_add_node( struct g3_tree *p, struct g3code * g3c,
+ int bit_code, int bit_length )
+{
+int i;
+
+ if ( bit_length <= FBITS ) /* leaf (multiple bits) */
+ {
+ g3c->nr_bits = bit_length; /* leaf tag */
+
+ if ( bit_length == FBITS ) /* full width */
+ {
+ p->nextb[ bit_code ] = (struct g3_tree *) g3c;
+ }
+ else /* fill bits */
+ for ( i=0; i< ( 1 << (FBITS-bit_length)); i++ )
+ {
+ p->nextb[ bit_code + ( i << bit_length ) ] = (struct g3_tree *) g3c;
+ }
+ }
+ else /* node */
+ {
+ struct g3_tree *p2;
+
+ p2 = p->nextb[ bit_code & BITM ];
+ if ( p2 == 0 ) /* no sub-node exists */
+ {
+ p2 = p->nextb[ bit_code & BITM ] =
+ ( struct g3_tree * ) calloc( 1, sizeof( struct g3_tree ));
+ if ( p2 == NULL ) { perror( "malloc 3" ); exit(11); }
+ p2->nr_bits = 0; /* node tag */
+
+ }
+ if ( p2->nr_bits != 0 )
+ {
+ g_printerr ("internal table setup error\n" ); exit(6);
+ }
+ tree_add_node( p2, g3c, bit_code >> FBITS, bit_length - FBITS );
+ }
+}
+
+void build_tree (struct g3_tree ** p, struct g3code * c )
+{
+ if ( *p == NULL )
+ {
+ (*p) = (struct g3_tree *) calloc( 1, sizeof(struct g3_tree) );
+ if ( *p == NULL ) { perror( "malloc(1)" ); exit(10); }
+
+ (*p)->nr_bits=0;
+ }
+
+ while ( c->bit_length != 0 )
+ {
+ tree_add_node( *p, c, c->bit_code, c->bit_length );
+ c++;
+ }
+}
+
+void init_byte_tab (int reverse, int byte_tab[] )
+{
+int i;
+ if ( reverse ) for ( i=0; i<256; i++ ) byte_tab[i] = i;
+ else
+ for ( i=0; i<256; i++ )
+ byte_tab[i] = ( ((i & 0x01) << 7) | ((i & 0x02) << 5) |
+ ((i & 0x04) << 3) | ((i & 0x08) << 1) |
+ ((i & 0x10) >> 1) | ((i & 0x20) >> 3) |
+ ((i & 0x40) >> 5) | ((i & 0x80) >> 7) );
+}
diff --git a/plug-ins/file-faxg3/g3.h b/plug-ins/file-faxg3/g3.h
new file mode 100644
index 0000000..50c7e16
--- /dev/null
+++ b/plug-ins/file-faxg3/g3.h
@@ -0,0 +1,55 @@
+/* #ident "@(#)g3.h 3.1 95/08/30 Copyright (c) Gert Doering" */
+
+#ifndef NULL
+#define NULL 0L
+#endif
+
+/* nr_bits is set to ( bit_length MOD FBITS ) by build_g3_tree,
+ * nr_pels is the number of pixels to write for that code,
+ * bit_code is the code itself (msb2lsb), and bit_length its length
+ */
+
+struct g3code { int nr_bits, nr_pels, bit_code, bit_length; };
+
+/* tables for makeup / terminal codes white / black, extended m_codes */
+extern struct g3code t_white[], m_white[], t_black[], m_black[], m_ext[];
+
+/* The number of bits looked up simultaneously determines the amount
+ * of memory used by the program - some values:
+ * 10 bits : 87 Kbytes, 8 bits : 20 Kbytes
+ * 5 bits : 6 Kbytes, 1 bit : 4 Kbytes
+ * - naturally, using less bits is also slower...
+ */
+
+/*
+#define FBITS 5
+#define BITM 0x1f
+*/
+
+#define FBITS 8
+#define BITM 0xff
+
+/*
+#define FBITS 12
+#define BITM 0xfff
+*/
+
+#define BITN 1<<FBITS
+
+struct g3_tree { int nr_bits;
+ struct g3_tree * nextb[ BITN ];
+ };
+
+#define g3_leaf g3code
+
+extern void tree_add_node ( struct g3_tree *p, struct g3code * g3c,
+ int bit_code, int bit_length );
+extern void build_tree ( struct g3_tree ** p, struct g3code * c );
+
+#ifdef DEBUG
+extern void print_g3_tree ( char * t, struct g3_tree * p );
+#endif
+
+extern void init_byte_tab ( int reverse, int byte_tab[] );
+
+