dfcgen-gtk-0.5/0000755000175100001440000000000013733651721010375 500000000000000dfcgen-gtk-0.5/config.h.in0000644000175100001440000001063313714047015012335 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Defined if '--enable-debug' was passed to configure. */ #undef DEBUG /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* GETTEXT package name */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the `exp10' function. */ #undef HAVE_EXP10 /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have GNU Scientific Library (GSL) header files */ #undef HAVE_GSL_H /* Define to 1 if you have the `hypot' function. */ #undef HAVE_HYPOT /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `pow10' function. */ #undef HAVE_POW10 /* Define to 1 if you have the `round' function. */ #undef HAVE_ROUND /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `trunc' function. */ #undef HAVE_TRUNC /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* package author */ #undef PACKAGE_AUTHOR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* copyright holder */ #undef PACKAGE_COPYRIGHT /* package icon */ #undef PACKAGE_ICON /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif dfcgen-gtk-0.5/include/0000755000175100001440000000000013733651721012020 500000000000000dfcgen-gtk-0.5/include/mathMisc.h0000644000175100001440000000434313622204713013652 00000000000000/******************************************************************************/ /** * \file * Miscellaneous mathematical functions and macros. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MATHMISC_H #define MATHMISC_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* includes config.h (include before math.h) */ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Tries division \f$y=num/den\f$ wrt. overflow. * * \param num Numerator. * \param den Denominator. * * \return \f$y=num/den\f$ or GSL_POSINF/GSL_NEGINF. Use the * functions gsl_isinf() or gsl_finite() for result * checking. ******************************************************************************/ double mathTryDiv(double num, double den); /* FUNCTION *******************************************************************/ /** Swaps two double values. * * \param p1 Pointer to first value. * \param p2 Pointer to second value. * * \return Nothing. ******************************************************************************/ void mathDoubleSwap(double *p1, double *p2); #ifdef __cplusplus } #endif #endif /* MATHMISC_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/miscDesignDlg.h0000644000175100001440000001137613622204713014625 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Miscellaneous FIR/IIR design dialogs. * * \note Includes raw filters (filters without a design, except \f$f_{Sample}\f$). * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MISCFLT_DESIGNDLG_H #define MISCFLT_DESIGNDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "cfgSettings.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Misc filter design dialog creation function. * * \note There is no design for raw filters (except the cutoff frequency). * * \param topWidget Toplevel widget. * \param boxDesignDlg The box widget to be used for the filter dialog. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void miscDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Misc filter design dialog preset function. Restores all states of dialog * elements from design data of a Misc filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to misc filter design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void miscDesignDlgPreset (GtkWidget *topWidget, const MISCFLT_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Raw filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void miscDesignDlgDestroy (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** Checks whether the misc filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * misc dialog found), else FALSE. ******************************************************************************/ BOOL miscDesignDlgActive (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** Miscellaneous FIR/IIR filter design dialog \e Apply function. * * \param topWidget Toplevel widget. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter can't be created. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. If the value is INT_MAX then an * error message box was displayed by function * miscDesignDlgApply(), means the caller should not * popup a (second) message box. ******************************************************************************/ int miscDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs); #ifdef __cplusplus } #endif #endif /* MISCFLT_DESIGNDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/filterPrint.h0000644000175100001440000000505213622204713014405 00000000000000/******************************************************************************/ /** * \file * \brief Filter print functions. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef FILTER_PRINT_H #define FILTER_PRINT_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #include "cairoPlot.h" /* PLOT_DIAG */ #include "responsePlot.h" /* RESPONSE_TYPE */ #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** \brief Response plot print function. * * \param[in] topWidget Top widget associated with the \c GtkToolButton widget * which has caused the \e clicked event. * \param[in] pDiag Pointer to plot diag of associated response \p type. * \param[in] type ::RESPONSE_TYPE which identifies what response to print. * ******************************************************************************/ void filterPrintResponse (GtkWidget* topWidget, const PLOT_DIAG* pDiag, RESPONSE_TYPE type); /* FUNCTION *******************************************************************/ /** \brief Coefficients print function. * * \note The signature of this function was chosen in a way that it is usual * as \e clicked event callback (when a print menuitem/button is pressed). * * \param[in] srcWidget \c GtkMenuItem on event \e activate or \c GtkToolButton * on event \e clicked, which causes this call. * \param[in] user_data Pointer to user data (unused). * ******************************************************************************/ void filterPrintCoeffs (GtkWidget* srcWidget, gpointer user_data); #ifdef __cplusplus } #endif #endif /* FILTER_PRINT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/dialogSupport.h0000644000175100001440000001241613622204713014741 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Dialog helper functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef DLGSUPPORT_H #define DLGSUPPORT_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Error message dialog. * * \param topWidget Toplevel widget. * \param format Printf like format string. * \param ... Arguments associated with format string. * ******************************************************************************/ void dlgError (GtkWidget* topWidget, char* format, ...); /* FUNCTION *******************************************************************/ /** File error message dialog. * * \param topWidget Toplevel widget. * \param format Printf like format string. * \param filename Filename in filesystem coding (must not be UTF-8), which * is used as first argument into the format string (needs * %s format coding). * \param err GLib error pointer. * ******************************************************************************/ void dlgErrorFile (GtkWidget* topWidget, char* format, char *filename, GError *err); /* FUNCTION *******************************************************************/ /** Fetches a double value from a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param ename Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param vmin Minimum allowed value (after applying \p multiplier). * \param vmax Maximum allowed value (after applying \p multiplier). * \param multiplier Multiplier for scaling the result (wrt. units). * \param pResult Pointer to result buffer. * * \return TRUE on success, else FALSE. If FALSe is returned then * a message was given to the user indicating the wrong * input. ******************************************************************************/ BOOL dlgGetDouble (GtkWidget* topWidget, const char *ename, double vmin, double vmax, double multiplier, double *pResult); /* FUNCTION *******************************************************************/ /** Fetches an integer value from a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param ename Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param vmin Minimum allowed value. * \param vmax Maximum allowed value. * \param pResult Pointer to result buffer. * * \return TRUE on success, else FALSE. If FALSe is returned then * a message was given to the user indicating the wrong * input. ******************************************************************************/ BOOL dlgGetInt (GtkWidget* topWidget, const char *ename, int vmin, int vmax, int *pResult); /* FUNCTION *******************************************************************/ /** Sets a double value into a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param name Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param multiplier Multiplier for scaling the result (wrt. units). * \param value The double value to set. * ******************************************************************************/ void dlgSetDouble (GtkWidget* topWidget, const char *name, double multiplier, double value); /* FUNCTION *******************************************************************/ /** A little popup dialog, where the user shall enter a double value. * * \param title Title of window. * \param label Label to put before the GtkEntry text field. * \param comment An introduction displayed at top of the dialog (may be * NULL, then nothing is displayed at top position). * \param pResult Pointer to result buffer, which must be initialized with * a default value. * * \return TRUE on success, FALSE if the user has canceled. ******************************************************************************/ BOOL dlgPopupDouble (char *title, char *label, char *comment, double *pResult); #ifdef __cplusplus } #endif #endif /* DLGSUPPORT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/projectFile.h0000644000175100001440000001166013714314600014352 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Project file handling. * * \note All double values written to a DFCGen project file are formated * in the "C" locale for LC_NUMERIC. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef PRJFILE_H #define PRJFILE_H /* INCLUDE FILES **************************************************************/ #include "dfcProject.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Export types, to be used with function prjFileExport(). */ typedef enum { PRJFILE_EXPORT_PLAIN, /**< plain text (*.txt) */ PRJFILE_EXPORT_MATLAB, /**< MATLAB file (*.m) */ PRJFILE_EXPORT_CLANG, /* "C" file (*.c) */ } PRJFILE_EXPORT_TYPE; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define PRJFILE_NAME_SUFFIX ".dfc" /**< Default project filename suffix */ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Exports a filter project to a file. * * \param type Export type. * \param filename Filename of file (inclusive path). * \param pProject Pointer to project data. * * \return Zero on succes, else an error number from errno.h. ******************************************************************************/ int prjFileExport (PRJFILE_EXPORT_TYPE type, const char *filename, DFCPRJ_FILTER *pProject); /* FUNCTION *******************************************************************/ /** Writes a filter project to a file. * * \param filename Filename of file (inclusive path). * \param pProject Pointer to project data. * * \return Zero on succes, else an error number. ******************************************************************************/ int prjFileWrite (const char *filename, DFCPRJ_FILTER *pProject); /* FUNCTION *******************************************************************/ /** Reads a filter project from a file. In case of an error it sets the pointer * to the error structure, which itself can be used to display the original * error message. Modification of the error structure pointer indicates an * critical error. In that case it has to be free'ed with g_error_free(). * * \param filename Filename of file (with path). * \param pProject Pointer to project buffer. This project will be * overwritten (only) on success. * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function prjFileRead(). * ******************************************************************************/ void prjFileRead (const char *filename, DFCPRJ_FILTER *pProject, GError **err); /* FUNCTION *******************************************************************/ /** Scans for project info (header) data in a DFCGen project file. In case * of an error it sets the pointer to the error structure, which itself can be * used to display the original error message. Modification of the error * structure pointer indicates an critical error. In that case it has to be * free'ed with g_error_free(). * * \param filename Filename of file (with path). * \param pInfo Pointer to project info data buffer. * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function prjFileScan(). * ******************************************************************************/ void prjFileScan (const char *filename, DFCPRJ_INFO *pInfo, GError **err); /* FUNCTION *******************************************************************/ /** Frees malloc'ed memory space from project info (author, title, desc). * This function is designed as a counterpart to function prjFileScan(). * * \param pInfo Pointer to project info data. * ******************************************************************************/ void prjFileFree (DFCPRJ_INFO *pInfo); #ifdef __cplusplus } #endif #endif /* PRJFILE_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/Makefile.in0000644000175100001440000003525213714047016014007 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) 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 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ noinst_HEADERS = \ base.h\ cairoPlot.h\ cfgSettings.h\ designDlg.h\ dfcProject.h\ dfcgen.h\ dialogSupport.h\ editDlg.h\ fileDlg.h\ filterResponse.h\ filterSupport.h\ gui.h\ helpDlg.h\ linFirDesignDlg.h\ linFirFilter.h\ mainDlg.h\ mathFuncs.h\ mathMisc.h\ mathPoly.h\ miscDesignDlg.h\ miscFilter.h\ projectFile.h\ responseDlg.h\ responsePlot.h\ responseWin.h\ rootsPlot.h\ stdIirDesignDlg.h\ stdIirFilter.h\ filterPrint.h\ support.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign include/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): 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: $(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 $(HEADERS) installdirs: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am 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-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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ cscopelist-am ctags ctags-am distclean distclean-generic \ 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-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/include/stdIirDesignDlg.h0000644000175100001440000001106413622204713015122 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter dialog functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef STDIIRDESIGNDLG_H #define STDIIRDESIGNDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "cfgSettings.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog creation function. * * This function has to be called if a standard IIR filter shall be designed. * * * \param topWidget Toplevel widget. * \param boxDesignDlg GtkVBox widget, which is the container for the dialog. * The dialog must be mapped to row 1 of it. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void stdIirDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog preset function. Restores all states * of dialog elements from design data of a standard IIR filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to standard IIR design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void stdIirDesignDlgPreset (GtkWidget *topWidget, const STDIIR_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void stdIirDesignDlgDestroy (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** Checks whether the standard IIR filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * standard IIR dialog found), else FALSE. ******************************************************************************/ BOOL stdIirDesignDlgActive (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog ready/apply function. * * \param topWidget Toplevel widget. * \param pPrefs Pointer to desktop preferences. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int stdIirDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs); #ifdef __cplusplus } #endif #endif /* STDIIRDESIGNDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/cairoPlot.h0000644000175100001440000003077013622204713014044 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * 2-dimensional plot functions (GDK), normally for filter responses. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef CAIROPLOT_H #define CAIROPLOT_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* includes config.h (include before GNU system headers) */ #include #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define PLOT_TOLERANCE (DBL_EPSILON * 4) /**< Plot tolerance */ #define PLOT_AXIS_MAX (32768 / PLOT_TOLERANCE) /**< Maximum world value */ #define PLOT_AXIS_MIN (-PLOT_AXIS_MAX) /**< Minimum world value */ #define PLOT_AXIS_FLAG_LOG 1 /**< logarithmic axis */ #define PLOT_AXIS_FLAG_GRID 2 /**< display grid */ #define PLOT_AXIS_FLAG_AUTO 4 /**< auto-scaling of y-axis */ /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Style of plot. * * \attention Do not change the values assigned to enumarations, because used * as index into array implementations. */ typedef enum { PLOT_STYLE_LINE_ONLY = 0, PLOT_STYLE_CIRCLE_ONLY = 1, PLOT_STYLE_CIRCLE_SAMPLE = 2, PLOT_STYLE_CROSS_ONLY = 3, PLOT_STYLE_BOX_ONLY = 4 } PLOT_STYLE; /** Plot color identifiers. */ typedef enum { PLOT_COLOR_LABELS = 0, /**< Axis label numbers color identifier */ PLOT_COLOR_GRID = 1, /**< Grid lines color identifier */ PLOT_COLOR_GRAPH = 2, /**< Graph/curve color identifier */ PLOT_COLOR_BOX = 3, /**< Rectangle color identifier */ PLOT_COLOR_AXIS_NAME = 4, /**< Axis name/unit color identifier */ PLOT_COLOR_NOTE_TEXT = 5, /**< Notes text color identifier (future use) */ PLOT_COLOR_NOTE_BOX = 6, /**< Notes frame color identifier (future use) */ PLOT_COLOR_SIZE /**< Size of plot color identifier enum */ } PLOT_COLOR; /** Unit descriptor for an axis. */ typedef struct { /** Unit name string (possibly with \e Pango markup), but never translated into a specific language. It is assumed that units are always based on the international system of units (SI). It is allowed to set \a name NULL. \see http://physics.nist.gov/cuu/Units. */ char *name; double multiplier; /**< Multiplier for this unit */ } PLOT_UNIT; /** Description of a plot axis. */ typedef struct { const char *name; /**< axis name, possibly with \e Pango markup (may be NULL) */ const PLOT_UNIT *pUnit; /**< Pointer to unit description (may be NULL) */ double start; /**< real-world coordinate of start-point */ double stop; /**< real-world coordinate of end-point */ /** If the exponent of a floating point number would be less than -4 or * greater than or equal to the precision \a prec, then the number will * be converted in the style of '%E' (exponential notation); otherwise * to the '%f' style (fixed-point notation). The `%f' conversion prints * its argument in fixed-point notation, producing output of the form * [-]ddd.ddd, where the number of digits following the decimal point * is controlled by \a prec. The '%E' conversion prints its argument * in exponential notation, producing output of the form * [-]d.dddE[+|-]dd. Again, the number of digits following the decimal * point is controlled by \a prec. The exponent always contains at * least two digits. */ int prec; unsigned flags; /**< Flags (e.g. PLOT_AXIS_FLAG_LOG, PLOT_AXIS_FLAG_GRID) */ } PLOT_AXIS; /* FUNCTION *******************************************************************/ /** Plot initialization function pointer. This function is called at start of * (re-) paint. * * \param start The real-world start x-coordinate. * \param stop The real-world stop x-coordinate. * \param pData User application data pointer as passed to cairoPlot2d(). * * \return The function shall return: * - the value zero, if the number of samples is determined by member * \a num in PLOT_DIAG; * - a value greater than zero (to overwrite \a num), which determines * the number of samples in interval \a start - \a stop; * - a negative number, if if there was an singularity or * calculation error. ******************************************************************************/ typedef int (*PLOT_FUNC_INIT)(double start, double stop, void *pData); /* FUNCTION *******************************************************************/ /** Pointer to function which computes an y-value from a x-value in real-world * units. * * \param px Pointer to real-world x-coordinate (input value). Notice * that the pointed value may become an output on discrete * plots. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. * * \return Calculated real-world y-coordinate on success. If there * is no value at \p px (may be a singularity), then it shall * return GSL_POSINF or GSL_NEGINF. ******************************************************************************/ typedef double (*PLOT_FUNC_GET)(double *px, void *pData); /* FUNCTION *******************************************************************/ /** Pointer to function which is called at the end of plot (counterpart to * PLOT_FUNC_INIT type of function). * * \param pData User application data pointer as stored in member * \a pData of structure PLOT_DIAG (as passed to function * cairoPlot2d(). ******************************************************************************/ typedef void (*PLOT_FUNC_END)(void *pData); /* FUNCTION *******************************************************************/ /** Pointer to plot break/progress function. For each plotted coordinate value * this function is called back (if not NULL) for user break checking and * progress indication. * * \param pData User application data pointer as stored in member * \a pData of structure PLOT_DIAG (as passed to function * cairoPlot2d(). * \param percent A value between 0.0 and 1.0 which indicates the * percentage of completion. * * \return The function shall return an value unequal to 0, if the * plot has to be cancelled. In that case the associated * function of type PLOT_FUNC_END is called and the plot * in progress will be canceled. */ typedef int (*PLOT_FUNC_PROGRESS)(void *pData, double percent); /** Plot diagram descriptor. */ typedef struct { PLOT_AXIS x; /**< x-axis descriptor */ PLOT_AXIS y; /**< y-axis descriptor (modified if PLOT_AXIS_AUTOSCALE) */ void *pData; /**< user (application) data ptr (passed to \a initFunc) */ double thickness; /**< Thickness of graph */ PLOT_STYLE style; /**< Style of graph */ int num; /**< Number of samples to take (0 = number of pixels) */ PLOT_FUNC_PROGRESS progressFunc; /**< plot progress/break function (may be NULL) */ PLOT_FUNC_INIT initFunc; /**< plot initialization function (may be NULL) */ PLOT_FUNC_GET sampleFunc; /**< real-world function y=f(x) */ PLOT_FUNC_END endFunc; /**< plot de-initialization function (may be NULL) */ GdkColor *colors; /**< Pointer to allocated colors (may be NULL) */ GdkRectangle area; /**< In: drawing area, out: graph rectangle */ } PLOT_DIAG; /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /** Format string for axis name and unit (if exist). */ #define PLOT_AXISNAME_FORMAT(name, unit) name " [" unit "]" /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Plots a diagram. The function plots a 2-dimensional curve diagram \p pDiag * into a \e Cairo context given in \p cr. At a precondition the clip region * must be set correctly, * DeltaRatio = (ScreenMax-ScreenMin)/(WorldMax-WorldMin) (I) Screen = DeltaRatio*(World-WorldMin) + ScreenMin (II) World = (Screen - ScreenMin) / DeltaRatio + WorldMin (III) if LOGAXIS (logarithmic axis) then World := log(World) before using of equation I,II,III what means : DeltaRatio = (ScreenMax-ScreenMin)/(log(WorldMax)-log(WorldMin)) = (ScreenMax-ScreenMin)/(log(WorldMax/WorldMin)) Screen = DeltaRatio*(log(World) - log(WorldMin)) + ScreenMin = DeltaRatio*log(World/WorldMin) + ScreenMin World = 10^(log(WorldMin) + (Screen - ScreenMin)/DeltaRatio)) = WorldMin*10^((Screen - ScreenMin)/DeltaRatio) * * \param cr \e Cairo context for drawing, which may be retrieved * by the help of following functions: * - gdk_cairo_create () * - gtk_print_context_get_cairo_context() * \param pDiag Pointer to plot descriptor. * * \return The number of samples taken to draw this plot * (independent of a possible break) or a negative * number on error. ******************************************************************************/ int cairoPlot2d (cairo_t* cr, PLOT_DIAG *pDiag); /* FUNCTION *******************************************************************/ /** Checks the plot range of an axis against some predefined limits. If the * range [start, stop] doesn't match these limits, it returns ERANGE and * changes the range automatically. * * * \param pAxis Pointer to axis workspace. * * \return If range is in boundaries then it returns the value 0, * else ERANGE from errno.h. ******************************************************************************/ int cairoPlotChkRange (PLOT_AXIS *pAxis); /* FUNCTION *******************************************************************/ /** Returns a world-coordinate associated with a GDK coordinate. * * \note Because cairoPlotChkRange() has checked the ranges \p pAxis->start * and \p pAxis->stop with respect to the operation \p pAxis->stop - * \p pAxis->start (lin. case) and \p pAxis->stop / \p pAxis->start * (log. case) there is no need to use math. function mathTryDiv(). * * \param pAxis Pointer to axis description (filled from a previous * call to cairoPlot2d). * \param start Start point of plot graph (box) in GDK coordinates. * \param stop Stop point of plot graph (box) in GDK coordinates. * * \attention Due to internal processing optimization (associated * with the north-west orientation of y-axis) the * calculation of y-coordinates gives correct results * only when \p start and \p stop are exchanged. * * \return World-coordinate within this axis. ******************************************************************************/ double cairoPlotCoordinate (PLOT_AXIS *pAxis, int start, int stop, int coordinate); #ifdef __cplusplus } #endif #endif /* CAIROPLOT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/editDlg.h0000644000175100001440000000464713622204713013470 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to dialog functions of \e Edit menu. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef EDITDLG_H #define EDITDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Settings menuitem is selected * from \e Edit menu. * * \param widget \e Edit \e Settings widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void editDlgSettingsActivate (GtkWidget* widget, gpointer user_data); /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Info menuitem is selected * from \e Edit menu. * * \param widget \e Edit \e Info widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void editDlgInfoActivate (GtkWidget* widget, gpointer user_data); #ifdef __cplusplus } #endif #endif /* EDITDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/base.h0000644000175100001440000000561413622204713013021 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Basic types, constants and macros. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * * ******************************************************************************/ #ifndef BASE_H #define BASE_H /* INCLUDE FILES **************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ typedef int BOOL; /**< Boolean data type (TRUE, FALSE are from gLib) */ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ #ifdef __GNUC__ #define ATTRIBUTE(attr) __attribute__ ((attr)) #else #define ATTRIBUTE(attr) #endif #define N_ELEMENTS(array) G_N_ELEMENTS (array) /**< Number of elements in array */ #define ASSERT(cond) g_assert (cond) /**< assert() macro (currently from gLib) */ #if defined (DEBUG) && defined (__GNUC__) #define DEBUG_LOG(format, ...) g_printerr ("\n%s, %d: " format, __FILE__ , __LINE__, ## __VA_ARGS__) #else /* !__GNUC__ */ #define DEBUG_LOG(format, ...) #endif /* __GNUC__ */ /* MACRO **********************************************************************/ /** Error code check and conditional return. The macro checks for an error code * unequal to GSL_SUCCESS in \p cond. On that condition it executes the code * in \p post, then returns. * * \param cond Condition to be checked (e.g. may be a function call). * \param string Text (string), which describes the error/cause. * ******************************************************************************/ #define ERROR_RET_IF(cond, string, ...) \ { \ int __err = (cond); \ if (__err != 0) \ { \ __VA_ARGS__; \ DEBUG_LOG (string); \ return __err; \ } \ } /* EXPORTED FUNCTIONS *********************************************************/ #ifdef __cplusplus } #endif #endif /* BASE_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/designDlg.h0000644000175100001440000000754513622204713014014 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Design dialogs handler. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef DESIGNDLG_H #define DESIGNDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "miscFilter.h" #include "linFirFilter.h" #include "stdIirFilter.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** First four common elements in a designs. */ typedef struct { int type; /**< Filter type. \attention Must be the 1st element */ int order; /**< Order of filter. \attention Must be the 2nd element */ double cutoff; /**< Cutoff frequency. \attention Must be the 3rd element */ FTRDESIGN ftr; /**< Frequency transformation data. \attention Must be the 4th element */ } DESIGNDLG_COMMON; /** Dialog data of a filter. */ typedef union dlg { MISCFLT_DESIGN miscFlt; /**< Miscellaneous filter design data */ LINFIR_DESIGN linFir; /**< Lin. FIR design data */ STDIIR_DESIGN stdIir; /**< Standard IIR filter design data */ DESIGNDLG_COMMON all; /**< For generic access (not a specific design) */ } DESIGNDLG; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define DESIGNDLG_COMBO_CLASS "comboFilterClass" /**< Filter class combobox widget name */ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** This function should be called, if the design dialog (box) is realized. * * * \param widget Widget pointer. * \param user_data Pointer to user data (unused). * * \return Nothing. ******************************************************************************/ void designDlgBoxRealize(GtkWidget *widget, gpointer user_data); /* FUNCTION *******************************************************************/ /** This function is called if the filter class changes. * * * \param combobox Filter class combobox widget. * * \return Nothing. ******************************************************************************/ void designDlgOnFilterComboChanged (GtkComboBox* combobox, gpointer user_data); /* FUNCTION *******************************************************************/ /** This function shall be called if the filter design dialog must be updated. * * \param topWidget Top level widget. * ******************************************************************************/ void designDlgUpdate (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** This function should be called if the \e Apply button emits the \e clicked * signal. * * \param button \e Apply button widget handle. * \param data User data as passed to function g_signal_connect. In * that case (here) it is the filter class combobox widget * handle. * ******************************************************************************/ void designDlgApply (GtkButton *button, gpointer data); #ifdef __cplusplus } #endif #endif /* DESIGNDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/cfgSettings.h0000644000175100001440000001073613714314600014367 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * DFCGen configuration settings. * * \note All double values written to the configuration file are formated * in the "C" locale for LC_NUMERIC. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef CFGSETTINGS_H #define CFGSETTINGS_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "cairoPlot.h" #include "responsePlot.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Desktop preferences. */ typedef struct { PLOT_UNIT timeUnit; /**< Time unit to be used for in-/output */ PLOT_UNIT frequUnit; /**< Frequency unit to be used for in-/output */ int outprec; /**< Output precision in printf */ } CFG_DESKTOP; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Reads the DFCGen configuration from XDG_CONFIG_DIR, the XDG user * configuration directory (see XDG specification at * http://www.freedesktop.org/Standards/basedir-spec). * * \param widget Top level widget used for default colors assignment. * ******************************************************************************/ void cfgCacheSettings (GtkWidget *widget); /* FUNCTION *******************************************************************/ /** Writes the DFCGen configuration to XDG_CONFIG_DIR, the XDG user * configuration directory (see XDG specification at * http://www.freedesktop.org/Standards/basedir-spec). * * \return Zero on success, else an error number. ******************************************************************************/ int cfgFlushSettings (void); /* FUNCTION *******************************************************************/ /** Gets the current desktop configuration settings (preferences). * * \return Pointer to current preferences. ******************************************************************************/ const CFG_DESKTOP* cfgGetDesktopPrefs (void); /* FUNCTION *******************************************************************/ /** Sets new desktop configuration settings (preferences). * * \param newPrefs Pointer to new preferences. * ******************************************************************************/ void cfgSetDesktopPrefs (CFG_DESKTOP* newPrefs); /* FUNCTION *******************************************************************/ /** Saves the response window configuration settings. It is assumed that the * response window is closed when calling this function. * * \param type Type of response plot/window. * \param pDiag Pointer to plot which holds the current settings. * ******************************************************************************/ void cfgSaveResponseSettings(RESPONSE_TYPE type, PLOT_DIAG* pDiag); /* FUNCTION *******************************************************************/ /** Restores the response window configuration settings. It is assumed that the * response window is visible when calling this function with a valid \a pDiag * pointer. * * \param type Type of response plot/window. * \param pDiag Pointer to plot which gets the settings from last * session. If \a pDiag is NULL, then the last * \e Visibility state is returned. * * \return TRUE if the response window should be visible (on), * FALSE if not (off). * ******************************************************************************/ BOOL cfgRestoreResponseSettings(RESPONSE_TYPE type, PLOT_DIAG* pDiag); #ifdef __cplusplus } #endif #endif /* CFGSETTINGS_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/responseWin.h0000644000175100001440000000432213622204713014416 00000000000000/******************************************************************************/ /** * \file * Digital filter response window creation and callbacks. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef RESPONSE_WIN_H #define RESPONSE_WIN_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "responsePlot.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Toggles visibility of a filter response widget/window. This function * should be called if a \e GtkCheckMenuItem from the \e View menu receives * an \e activate event. * * \param menuitem Menu item which has received the \e activate event. * \param user_data Pointer to response type (RESPONSE_TYPE). * ******************************************************************************/ void responseWinMenuActivate (GtkMenuItem* menuitem, gpointer user_data); /* FUNCTION *******************************************************************/ /** Invalidates one or all response windows for redrawing. * * \param type The response window which shall be redrawn. Set this * parameter to RESPONSE_TYPE_SIZE to redraw all. * ******************************************************************************/ void responseWinRedraw (RESPONSE_TYPE type); #ifdef __cplusplus } #endif #endif /* RESPONSE_WIN_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/mainDlg.h0000644000175100001440000000544613622204713013465 00000000000000/******************************************************************************/ /** * \file * Main dialog management. * * \author Copyright (C) 2006, 2011-2013, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MAINDLG_H #define MAINDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** dfcgen top widget creation. * * This function is completely taken over from interface.c, where it has been * generated by glade. * * * \return Top widget reference. ******************************************************************************/ GtkWidget* mainDlgCreate (void); /* FUNCTION *******************************************************************/ /** Updates the project information in statusbar. * ******************************************************************************/ void mainDlgUpdatePrjInfo (void); /* FUNCTION *******************************************************************/ /** Adjustment of main filter dialog from a new project (may be read from file * before). * * \param filename Associated filename in filesystem coding, or NULL to * reset. * ******************************************************************************/ void mainDlgUpdateAll (const char* filename); /* FUNCTION *******************************************************************/ /** Updates the filter dialog in main widget from current project. * ******************************************************************************/ BOOL mainDlgUpdateFilter (int err); /* FUNCTION *******************************************************************/ /** Redraw of main filter dialog and all associated response plot (an case a * project is defined, else does nothing). * ******************************************************************************/ void mainDlgRedrawAll (void); #ifdef __cplusplus } #endif #endif /* MAINDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/rootsPlot.h0000644000175100001440000000461213622204713014111 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Roots plot functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef ROOTSPLOT_H #define ROOTSPLOT_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "mathPoly.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Creates a \e GtkDrawingArea used for roots display. * * \return Pointer to widget (\e GtkDrawingArea, GDK drawable), which * is used in function rootsPlotUpdate() to draw polynomial * roots. ******************************************************************************/ GtkWidget *rootsPlotCreate (void); /* FUNCTION *******************************************************************/ /** Re-calculates the roots of transfer \f$H(z)\f$ of a filter. * * \param pFilter Pointer to filter coefficients, for which the roots * shall be calculated. Set this to NULL, if the filter * (and therefore the roots too) is invalid. * ******************************************************************************/ void rootsPlotUpdate (FLTCOEFF *pFilter); /* FUNCTION *******************************************************************/ /** Forces a asynchronous redraw of all transfer function roots. * ******************************************************************************/ void rootsPlotRedraw (void); #ifdef __cplusplus } #endif #endif /* ROOTSPLOT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/miscFilter.h0000644000175100001440000001054113710446360014207 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Miscellaneous FIR/IIR filter design functions. * * \note Includes raw filters (filters without a design, except \f$f_{Sample}\f$). * * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MISC_FILTER_H #define MISC_FILTER_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" /* includes config.h (include before GNU system headers) */ #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Miscellaneous filters. * * \attention Don't change the enums, because order must match list element * index in dialog. */ typedef enum { MISCFLT_UNKNOWN = -1, /**< Unknown filter (no design data, raw filter) */ MISCFLT_HILBERT = 0, /**< Hilbert transformer (\e Fourier series expansion) */ MISCFLT_INT = 1, /**< Integrator (\e Fourier series expansion) */ MISCFLT_DIFF = 2, /**< Differentiator (\e Fourier series expansion)*/ MISCFLT_COMB = 3, /**< Comb filter */ MISCFLT_AVGFIR = 4, /**< Moving average filter (non-recursive type) */ MISCFLT_AVGIIR = 5, /**< Moving average filter (recursive type) */ MISCFLT_AVGEXP = 6, /**< Exponential average filter (1st order lowpass) */ MISCFLT_SIZE /**< Size of MISCFLT enum */ } MISCFLT; /** Misc filter design constraints. * \see DESIGNDLG_COMMON */ typedef struct { MISCFLT type; /**< Type of filter. \attention Must be the 1st element */ int order; /**< Order of filter. \attention Must be the 2nd element */ } MISCFLT_DESIGN; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Generates a miscellaneous FIR/IIR filter. The following digital filters are * supported: * - \e Hilbert transformer (linear FIR): \f$\displaystyle{c_{n/2\pm k}=-\frac{2}{k\pi}}\f$ for odd k, else 0 * - Perfect integrator (FIR): \f$\displaystyle{c_{n/2\pm k}=\frac{1}{2}-\frac{1}{\pi}\Si(k\pi)}\f$ * - Perfect differentiator (linear FIR): \f$\displaystyle{c_{n/2\pm k}=\frac{(-1)^{k+1}}{k\pi}}\f$ * - Moving average (FIR): \f$H(z)=1+z^{-1}+z^{-2}+\cdots+z^{-n}\f$ * - Moving average (IIR): \f$\displaystyle{H(z)=\frac{1-z^{-n}}{1-z^{-1}}}\f$ * - Comb filter (FIR): \f$H(z)=1-z^{-n}\f$ * - Exponential average (IIR): \f$\displaystyle{H(z)=\frac{1}{n-(n-1)z^{-1}}}\f$ * * \param pDesign Pointer to misc filter design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials will be * allocated. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int miscFilterGen (const MISCFLT_DESIGN *pDesign, FLTCOEFF *pFilter); #ifdef __cplusplus } #endif #endif /* MISC_FILTER_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/support.h0000644000175100001440000000735213622204713013624 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file support.h * \brief Support functions, defines and macros, mostly for \e gettext, * widget and file handling. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef SUPPORT_H #define SUPPORT_H /* INCLUDE FILES **************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include /* If gettext.m4 has detected GNU gettext (libintl.h), then ENABLE_NLS is * defined. In that case a translation to the user's natural language may * be possible (if there are catalog files for that language installed). */ #ifdef ENABLE_NLS #include #undef _ #define _(String) dgettext (PACKAGE, String) #define Q_(String) g_strip_context ((String), gettext (String)) #ifdef gettext_noop #define N_(String) gettext_noop (String) #else #define N_(String) (String) #endif #else /* !ENABLE_NLS (no translation) */ #define textdomain(String) (String) #define gettext(String) (String) #define dgettext(Domain,Message) (Message) #define dcgettext(Domain,Message,Type) (Message) #define bindtextdomain(Domain,Directory) (Domain) #define _(String) (String) #define Q_(String) g_strip_context ((String), (String)) #define N_(String) (String) #endif /* ENABLE_NLS */ /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Directory Path Identifiers. * * \attention Don't change the enums, because order must match array indices * in support.c. */ typedef enum { DIR_ID_INVALID = -1, /**< Invalid ID (unused so far) */ DIR_ID_TEMPLATES = 0, /**< Templates directory */ DIR_ID_PIXMAPS = 1, /**< Pixmaps directory */ DIR_ID_FILTERS = 2, /**< Predefined filters directory */ DIR_ID_LOCALE = 3, /**< Locale directory */ DIR_ID_SIZE /**< Size of DIRECTORY_ID enum */ } DIRECTORY_ID; /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** \brief This function returns a widget in a component created by \e Glade. * * Call it with the toplevel widget in the component, or alternatively * any widget in the component, and the name of the widget you want * returned. * * \param[in] widget Top level widget pointer. * \param[in] name Name of widget to be searched for. * * \return Pointer to widget, if found, else NULL. ******************************************************************************/ GtkWidget* lookup_widget (GtkWidget* widget, const gchar* widget_name); /* FUNCTION *******************************************************************/ /** \brief This function returns a path to a directory, using UTF-8 encoding. * * \param[in] dir_id Directory identifier. * * \return A newly allocated string that must be freed with g_free(). ******************************************************************************/ gchar* getPackageDirectory (DIRECTORY_ID dir_id); /* FUNCTION *******************************************************************/ /** \brief Create a \c GdkPixbuf from a pixmaps file. * * \param[in] filename Pixmpas filename. * * \return A newly allocated \c GdkPixbuf, representing the pixmap file. ******************************************************************************/ GdkPixbuf* createPixbufFromFile (const gchar* filename); #endif /* SUPPORT_H */ dfcgen-gtk-0.5/include/stdIirFilter.h0000644000175100001440000001060113710446360014507 00000000000000/******************************************************************************/ /** * \file * Interface to Standard IIR Filter approximation functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef STDIIR_FILTER_H #define STDIIR_FILTER_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" /* includes config.h (include before GNU system headers) */ #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Standard lowpass filter approximations (results in IIR filter). * * \attention Don't change the enums, because order must match list element * index in dialog. */ typedef enum { STDIIR_TYPE_BUTTERWORTH = 0, /**< Power filters (max. flat magnitude response) */ STDIIR_TYPE_CHEBY = 1, /**< Chebyshev with passband ripple */ STDIIR_TYPE_CHEBYINV = 2, /**< Chebyshev inverse (stopband ripple) */ STDIIR_TYPE_CAUER1 = 3, /**< Cauer filter (design by passband ripple) */ STDIIR_TYPE_CAUER2 = 4, /**< Cauer filter (design by stopband attenuation) */ STDIIR_TYPE_BESSEL = 5, /**< Bessel filter (max. flat group delay) */ STDIIR_TYPE_SIZE /**< Size of STDIIR_TYPE enumeration */ } STDIIR_TYPE; /** Laplace to Z-domain transformation algorithms. */ typedef enum { ZTR_BILINEAR, ZTR_EULER_FORWARD, ZTR_EULER_BACKWARD, ZTR_SIZE } STDIIR_ZTR; /** Standard IIR filter design constraints. * \see DESIGNDLG_COMMON */ typedef struct { STDIIR_TYPE type; /**< Filter type. \attention Must be the 1st element. */ int order; /**< Order of filter. \attention Must be the 2nd element */ double cutoff; /**< Cutoff frequency. \attention Must be the 3rd element */ FTRDESIGN ftr; /**< Frequency transformation data. \attention Must be the 4th element */ STDIIR_ZTR zAlgo; /**< Laplace to Z transform algorithm (not implemented yet) */ double ripple; /**< Maximum passband (ripple) attenuation in dB (elliptic filter) */ double minatt; /**< Minimum stopband attenuation in dB (elliptic filter) */ double angle; /**< Module angle (\e Cauer filter) */ } STDIIR_DESIGN; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define STDIIR_ATT_MAX (20.0 * FLT_MAX_10_EXP) /**< Maximum attenuation input */ #define STDIIR_RIPPLE_MIN (1.0 / STDIIR_ATT_MAX) /**< Minimum ripple attenuation (0dB) */ #define STDIIR_RIPPLE_MAX (10*log10(2.0)) /**< Maximum ripple attenuation (3dB) */ #define STDIIR_STOPATT_MIN (10*log10(2.0)) /**< Minimum stopband attenuation (3dB) */ #define STDIIR_STOPATT_MAX STDIIR_ATT_MAX /**< Maximum stopband attenuation (\f$\infty\f$) */ #define STDIIR_ANGLE_MIN (0.001) /**< Minimum modular angle of elliptic filters */ #define STDIIR_ANGLE_MAX (89.999) /**< Maximum modular angle of elliptic filters */ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Generates an IIR filter from standard approximations. The cutoff frequency * always is assumed to be the 3dB point of magnitude response. * * \param pDesign Pointer to standard IIR design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials will be * allocated. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int stdIirFilterGen (STDIIR_DESIGN *pDesign, FLTCOEFF *pFilter); #ifdef __cplusplus } #endif #endif /* STDIIR_FILTER_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/filterResponse.h0000644000175100001440000002143013622204713015105 00000000000000/******************************************************************************/ /** * \file * Filter response functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef FILTER_RESPONSE_H #define FILTER_RESPONSE_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ typedef struct { /* public */ int samples; /**< Number of samples in interval */ /* private */ double curTime; /**< Current time (in seconds) */ double *pLastOut; /**< Pointer to last output value */ double *pCurIn; /**< Pointer where to store the next input value */ double *pInBuf; /**< Input buffer pointer (per malloc) */ double *pOutBuf; /**< Output buffer pointer (per malloc) */ FLTSIGNAL sig; /**< Signal type (\e Dirac, \e Heaviside, etc.) */ const FLTCOEFF *pFilter; /**< Pointer to filter */ } FLTRESP_TIME_WORKSPACE; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Evaluates absolute magnitude associated with a polynomial in \e Z domain. * The function returns the absolute value of the following polynomial: \f[ H(z)=a_0+a_1 z^{-1}+a_2 z^{-2}+\cdots a_n z^{-n} \f] * with \f$z^{-1}=\exp(-j\omega)\f$ at circular frequency * \f$\omega=2\pi f/f_0\f$, given in rad/s. * * \param omega Frequency ratio \f$2\pi f/f_0\f$. * \param poly Pointer to polynomial coefficients in \e Z domain. * * \return Magnitude value associated with the polynomial when * evaluated successful, else GSL_POSINF or GSL_NEGINF. * Use the functions gsl_isinf() or gsl_finite() for * result checking. ******************************************************************************/ double filterResponsePoly (double omega, const MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Computes the magnitude of a time-discrete system at a given frequency in * \e Z domain. * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Magnitude value when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseMagnitude (double f, const FLTCOEFF *pFilter); /* FUNCTION *******************************************************************/ /** Computes the attenuation of a time-discrete system at a given frequency in * \e Z domain. \f[ A(f) = -20\log[H(f)] \f] * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Magnitude value when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseAttenuation (double f, FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** Computes the phase of a time-discrete system at a given frequency in * \e Z domain. * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Phase in rad when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponsePhase (double f, FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** Computes the phase delay \f$B(\omega)/\omega\f$ of a time-discrete system * at a given frequency in \e Z domain. * * \param f Frequency point in Hz (with \f$\omega=2\pi f\f$). * \param pFilter Representation of time-discrete system. * * \return Phase delay in rad s. ******************************************************************************/ double filterResponsePhaseDelay (double f, FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** Computes the group delay \f$\textup{d}B(\omega)/\textup{d}\omega\f$ of a * time-discrete system at a given frequency in \e Z domain. * * \param f Frequency point in Hz (with \f$\omega=2\pi f\f$). * \param pFilter Representation of time-discrete system. * * \return Group delay in sec. ******************************************************************************/ double filterResponseGroupDelay (double f, FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** Computes the characteristic function \f$D(f)\f$ of a time-discrete system * in \e Z domain. \f{eqnarray*} H^2(f) &=& \frac{1}{1+D^2(f)} \\ D(f) &=& \sqrt{\frac{1}{H^2(f)}-1} \f} * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Characteristic function value on success, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseChar (double f, FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** This function creates an workspace for time response calculation. * * \param start Time to start (must be positive). * \param stop Time to stop (must be positive). * \param type Signal type. * \param pFilter Pointer to filter coefficients. * * \return Pointer to an workspace for time response calculation * via function filterResponseTimeNext(). All public * members are up to data after return (never use privates). * On error (includes the case of too much samples in * range) NULL is returned. ******************************************************************************/ FLTRESP_TIME_WORKSPACE* filterResponseTimeNew (double start, double stop, FLTSIGNAL type, const FLTCOEFF* pFilter); /* FUNCTION *******************************************************************/ /** Returns the next output sample for a time response. * * \param pWorkspace Pointer to time response workspace, formerly created * by filterResponseTimeNew(). * \param pTime Pointer to a variable which gets the next time value. * * \return Next output sample value on success, else GSL_POSINF * or GSL_NEGINF. Use the functions gsl_isinf() or * gsl_finite() for result checking. Avoid calling * this function again under the mentioned error condition. ******************************************************************************/ double filterResponseTimeNext (FLTRESP_TIME_WORKSPACE *pWorkspace, double *pTime); /* FUNCTION *******************************************************************/ /** Free's a time response workspace. * * \param pWorkspace Pointer to time response workspace, formerly created * by filterResponseTimeNew(). * ******************************************************************************/ void filterResponseTimeFree (FLTRESP_TIME_WORKSPACE *pWorkspace); #ifdef __cplusplus } #endif #endif /* FILTER_RESPONSE_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/linFirDesignDlg.h0000644000175100001440000001127613622204713015114 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter dialog functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef LINFIRDESIGNDLG_H #define LINFIRDESIGNDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "cfgSettings.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog creation function. This function is * called if a linear FIR filter shall be designed. * * \note Originally generated by \e Glade, but heavy modified (see interface.c, * which isn't part of the project). * * \param topWidget Toplevel widget. * \param boxDesignDlg GtkVBox widget, which is the container for the dialog. * The dialog must be mapped to row 1 of it. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void linFirDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog preset function. Restores all states * of dialog elements from design data of a linear FIR filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to linear FIR design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used * as input). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void linFirDesignDlgPreset (GtkWidget *topWidget, const LINFIR_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void linFirDesignDlgDestroy (GtkWidget *topWidget); /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog ready/apply function. * * \param topWidget Toplevel widget. * \param pPrefs Pointer to desktop preferences. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int linFirDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs); /* FUNCTION *******************************************************************/ /** Checks whether the linear FIR filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * linear FIR dialog found), else FALSE. ******************************************************************************/ BOOL linFirDesignDlgActive (GtkWidget *topWidget); #ifdef __cplusplus } #endif #endif /* LINFIRDESIGNDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/linFirFilter.h0000644000175100001440000000642013711603155014476 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to Linear IIR Filter interpolation functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef LINFIR_FILTER_H #define LINFIR_FILTER_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Typical smoothing windows used in digital signal processing. */ typedef enum { LINFIR_DSPWIN_RECT = 0, LINFIR_DSPWIN_HAMMING, LINFIR_DSPWIN_VANHANN, LINFIR_DSPWIN_BLACKMAN, LINFIR_DSPWIN_KAISER, LINFIR_DSPWIN_SIZE } LINFIR_DSPWIN; /** Linear FIR filter types. */ typedef enum { LINFIR_TYPE_RECT = 0, /**< Rectangular lowpass */ LINFIR_TYPE_COS, /**< Cosinus lowpass */ LINFIR_TYPE_COS2, /**< Square cosinus lowpass */ LINFIR_TYPE_GAUSS, /**< Gaussian lowpass */ LINFIR_TYPE_SQR, /**< Squared 1st order lowpass */ LINFIR_TYPE_SIZE } LINFIR_TYPE; /** Linear FIR filter design constraints. * \see DESIGNDLG_COMMON */ typedef struct { LINFIR_TYPE type; /**< Filter type. \attention Must be the 1st element */ int order; /**< Order of filter. \attention Must be the 2nd element */ double cutoff; /**< Cutoff frequency. \attention Must be the 3rd element */ FTRDESIGN ftr; /**< Frequency transformation data. \attention Must be the 4th element */ LINFIR_DSPWIN dspwin; /**< Type of smoothing window */ double winparm; /**< Parameter of window, e.g. Kaiser alpha */ } LINFIR_DESIGN; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Generates a linear FIR filter. The cutoff frequency always is assumed to be * the 3dB point of magnitude response. * * \param pDesign Pointer to linear FIR filter design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials will be * allocated. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int linFirFilterGen (LINFIR_DESIGN *pDesign, FLTCOEFF *pFilter); #ifdef __cplusplus } #endif #endif /* LINFIR_FILTER_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/responsePlot.h0000644000175100001440000000714013711067213014601 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response plotter. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef RESPONSE_PLOT_H #define RESPONSE_PLOT_H /* INCLUDE FILES **************************************************************/ #include "cairoPlot.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Predefined (supported) digital filter/system responses. */ typedef enum { RESPONSE_TYPE_MAGNITUDE = 0, /**< magnitude response */ RESPONSE_TYPE_ATTENUATION, /**< attenuation */ RESPONSE_TYPE_CHAR, /**< characteristic function */ RESPONSE_TYPE_PHASE, /**< phase response */ RESPONSE_TYPE_DELAY, /**< phase delay */ RESPONSE_TYPE_GROUP, /**< group delay */ RESPONSE_TYPE_IMPULSE, /**< time-domain impulse response */ RESPONSE_TYPE_STEP, /**< time-domain step response */ RESPONSE_TYPE_SIZE /**< administrative value (array size) */ } RESPONSE_TYPE; /* FUNCTION *******************************************************************/ /** Pointer to response plot progress function. For each plotted coordinate * value this function is called back (if not NULL) for user break checking * and progress indication. * * \param type Type of response. * \param percent A value between 0.0 and 1.0 which indicates the * percentage of completion. * * \return The function shall return an value unequal to 0, if the * plot has to be cancelled. */ typedef int (*RESPONSE_PLOT_CALLBACK)(RESPONSE_TYPE type, double percent); /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Response plot drawing function. * * \param cr \e Cairo context for drawing, which may be retrieved * e.g. by the help of following functions: * - gdk_cairo_create () * - gtk_print_context_get_cairo_context() * \param type Type of response plot. * \param pDiag Pointer to plot data. Notice that the callbacks * \a initFunc, \a endFunc and \a sampleFunc will be * overwritten (from callbacks associated with \p type). * * \return The number of samples taken to draw this response * (independent of a possible break) or a negative * number on error. ******************************************************************************/ int responsePlotDraw (cairo_t* cr, RESPONSE_TYPE type, PLOT_DIAG *pDiag); #ifdef __cplusplus } #endif #endif /* RESPONSE_PLOT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/filterSupport.h0000644000175100001440000001477313622204713014777 00000000000000/******************************************************************************/ /** * \file * Filter support functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef FILTERSUPPORT_H #define FILTERSUPPORT_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ #define FLTERR_CRITICAL(err) ((err) > 0) #define FLTERR_WARNING(err) ((err) < 0) #define FLTERR_SUCCESS(err) ((err) == 0) /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Allocates memory space for a filter. * * This function mallocs memory space for filter coefficients and roots based * on the degree of numerator and denominator polynomial. * * \param flt Filter structure. * * \return 0 on success, else an error code (typically ENOMEM). ******************************************************************************/ int filterMalloc (FLTCOEFF *flt); /* FUNCTION *******************************************************************/ /** Free's all memory space allocated for a filter. * * \param flt Filter structure. * ******************************************************************************/ void filterFree(FLTCOEFF *flt); /* FUNCTION *******************************************************************/ /** Duplicates a filter. This function mallocs memory space for filter * coefficients and roots based on the degree of the source filter pointed by * \p src. Then it copies the numerator and denominator polynomial to \p dest. * Use function filterFree() to free all the new associated memory. * * \param src Source filter (input). * \param dest Destination filter (output). * * \return Zero on success, else an error code (typically ENOMEM). ******************************************************************************/ int filterDuplicate (FLTCOEFF *dest, FLTCOEFF *src); /* FUNCTION *******************************************************************/ /** Checks ability to implement a digital system/filter. * * \param pFilter Pointer to filter coefficients/roots. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int filterCheck (FLTCOEFF *pFilter); /* FUNCTION *******************************************************************/ /** Normalizes the coefficients of a filter. To perform that, it * first modifies the denominator coefficients such that \f$den_0=1\f$ is * ensured. At the second step it re-calculates the numerator coefficients. * * \param pFilter Pointer to filter. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int normFilterCoeffs (FLTCOEFF *pFilter); /* FUNCTION *******************************************************************/ /** Normalizes the magnitude of a filter. The function trys to normalize the * transfer ratio (filter magnitude) at a given frequency. To perform that, it * first modifies the denominator coefficients such that \f$den_0=1\f$ is * ensured. At the second step it re-calculates the numerator coefficients in * a way, that the magnitude response at the reference frequency is unity (1). * * \param pFilter Pointer to filter. * \param f Frequency (normalization point). * \param refgain Reference transfer ratio \f$H(2\pi f)\f$. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int normFilterMagnitude (FLTCOEFF *pFilter, double f, double refgain); #ifdef __cplusplus } #endif #endif /* FILTERSUPPORT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/helpDlg.h0000644000175100001440000000321413622204713013460 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to dialog functions of \e Help menu. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef HELPDLG_H #define HELPDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** About dialog creation callback from menu. * * \param menuitem \e Help \e About menu item. * \param user_data User data as passed to function g_signal_connect (unused). * * \return Widget pointer. ******************************************************************************/ void helpDlgMenuActivate (GtkMenuItem* menuitem, gpointer user_data); #ifdef __cplusplus } #endif #endif /* HELPDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/mathPoly.h0000644000175100001440000002654513622204713013712 00000000000000/******************************************************************************/ /** * \file * Polynomial functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MATHPOLY_H #define MATHPOLY_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* includes config.h (include before math.h) */ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Polynomial representation. */ typedef struct { int degree; /**< Degree of polynomial */ double *coeff; /**< Pointer to real polynomial coefficients */ gsl_complex *root; /**< Pointer to roots of polynomial (NULL if not evaluated) */ } MATHPOLY; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Allocates memory space for the coefficients of a polynomial. * * \param poly Pointer to polynomial. * * \return Zero on success, else an error number. ******************************************************************************/ int mathPolyMallocCoeffs (MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Allocates memory space for the roots of a polynomial. * * \param poly Pointer to polynomial. * * \return Zero on success, else an error number. ******************************************************************************/ int mathPolyMallocRoots (MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Allocates memory space for a polynomial. * * \param poly Pointer to polynomial. * * \return 0 on success, else an error number. ******************************************************************************/ int mathPolyMalloc (MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Frees memory space allocated for a polynomial. * * \param poly Pointer to polynomial. * ******************************************************************************/ void mathPolyFree (MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Calculates real polynomial coefficients from roots. The calculation of * polynomial coefficients \f$c_i\f$ of \f[ p(z)=c_n z^n + c_{n-1} z^{n-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \f] is performed using the following algorithm: \f[ p_{i+1}(z)=p_{i}(z) (z-z_i)=z p_{i}(z)-z_i p_{i}(z) \f] * with \f$p_{0}(z)=1\f$. * * \param poly Pointer to polynomial that holds the roots in \p * poly->root and gets the coefficients in \p poly->coeff. * \param factor Factor to be applied to all coefficients. To match a * roots representation to a polynomial polynomial the * coefficient \f$p_n\f$ must be multiplied as \p factor. * * \return GSL_SUCCESS on success, else an error number (see * gsl_errno.h for predefined codes). ******************************************************************************/ int mathPolyRoots2Coeffs (MATHPOLY *poly, double factor); /* FUNCTION *******************************************************************/ /** Computes the complex roots \f$z_i\f$ associated with the polynomial \f[ p(z)=c_n z^n + c_{n-1} z^{n-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \f] * * \param poly Pointer to polynomial that holds the coefficients in * \p poly->coeff and gets the roots in \p poly->roots. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). * \todo Try to avoid mixing error codes from gsl_errno.h * and errno.h ******************************************************************************/ int mathPolyCoeffs2Roots (MATHPOLY *poly); /* FUNCTION *******************************************************************/ /** Adds two polynomials with scaling. * * \param poly1 Pointer to first polynomial and result. The coefficients * vector memory space must be large enough to get all * coefficients. The degree is increased (without malloc * of new memory), if \p poly2->degree is greater than * poly1->degree; * \param poly2 Pointer to second polynomial. * \param scale Factor which is applied to each coefficient of \p poly2. * ******************************************************************************/ void mathPolyAdd (MATHPOLY *poly1, const MATHPOLY *poly2, double scale); /* FUNCTION *******************************************************************/ /** Multiplies a polynomial with the binomial \f$a z^n+b\f$. * The function multiplies the polynomial \f{eqnarray*} p(z) &=& c_r z^r + c_{r-1} z^{r-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \\ &=& (\cdots(((c_r z + c_{r-1})z + c_{r-2})z + c_{r-3})z+\cdots+c_1)z+c_0 \f} * with \f$az^n+b\f$. The degree of new polynomial is \f$rn\f$, which must * be available in \p poly. \f{eqnarray*} p(z) &=& (az^n + b)p(z) \\ &=& a z^n p(z) + b p(z) \f} * * \param poly Pointer to polynomial which shalle be multiplied (in place). * \param degn Degree of polynomial \f$az^n+b\f$. * \param a Parameter \p a in polynomial \f$az^n+b\f$. * \param b Parameter \p b in polynomial \f$az^n+b\f$. * ******************************************************************************/ void mathPolyMulBinomial (MATHPOLY *poly, int degn, double a, double b); /* FUNCTION *******************************************************************/ /** Transforms polynomial coefficients for fractional variable substitution. * The function transforms the polynomial \f{eqnarray*} p(z) &=& c_r z^r + c_{r-1} z^{r-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \\ &=& (\cdots(((c_r z + c_{r-1})z + c_{r-2})z + c_{r-3})z+\cdots+c_1)z+c_0 \f} * by replacing \f[ z := \frac{\alpha z^m+\beta}{\gamma z^n+\delta}\qquad\alpha,\beta,\gamma,\delta\in R;\quad m,n\in N \f] * into polynomial \f[ p(z) := (\gamma z^n+\delta)^r p\left(\frac{\alpha z^m+\beta}{\gamma z^n+\delta}\right) \f] * The new degree is \f$r\max(n,m)\f$. * Set \f$p_i(z)=u_i(z)/v_i(z)\f$ the transformation algorithm is based * on \e Horners scheme: \f{eqnarray*} p_{i}(z) &=& z\, p_{i-1}(z) + c_{r-i} \\ &=& \frac{\alpha z^m+\beta}{\gamma z^n+\delta}\, p_{i-1}(z) + c_{r-i} \\ &=& \frac{(\alpha z^m+\beta)\,p_{i-1}(z)+(\gamma z^n+\delta)\,c_{r-i}}{\gamma z^n+\delta} \\ \frac{u_{i}(z)}{v_{i}(z)} &=& \frac{(\alpha z^m+\beta)\,\frac{u_{i-1}(z)}{v_{i-1}(z)}+(\gamma z^n+\delta)\,c_{r-i}}{\gamma z^n+\delta} \\ v_{i}(z) &=& (\gamma z^n+\delta) v_{i-1}(z),\quad v_0=1 \\ u_{i}(z) &=& (\alpha z^m+\beta)u_{i-1}(z)+c_{r-i}v_{i}(z),\quad u_0=c_r \f} * with \f$i=1\ldots n\f$ and \f$p_{0}(z)=c_r\f$. * So the following special transformation cases can be simply calculated: * - linear (\f$n=0,\gamma=1,\delta=0,m=1\f$): \f$p(\alpha z+\beta)\f$ * - square (\f$n=0,\gamma=1,\delta=0,m=2\f$): \f$p(\alpha z^2+\beta)\f$ * - inverse (\f$n=1,\gamma=1,\delta=0,\alpha=0\f$): \f$z^r p(\beta/z)\f$ * - bilinear (\f$n=1,m=1,\alpha=1,\gamma=1,\beta=-1,\delta=1\f$): \f$(z+1)^r p\left(\frac{z-1}{z+1}\right)\f$ * * \param poly Pointer to polynomial that coefficients \p poly->coeff * shall be transformed. The allocated memory space must * be enough to hold a polynomial of degree \f$r\max(n,m)\f$. * \param degm Numerator degree of transformation, means \f$m\f$. * \param a Transform parameter \f$\alpha\f$. * \param b Transform parameter \f$\beta\f$. * \param degn Denominator degree of transformation, means \f$n\f$. * \param c Transform parameter \f$\gamma\f$. * \param d Transform parameter \f$\delta\f$. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int mathPolyTransform (MATHPOLY *poly, int degm, double a, double b, int degn, double c, double d); /* FUNCTION *******************************************************************/ /** Calculates \e Bessel polynomial of n'th order in \p coeff. \f{eqnarray*} B_n &=& (2 n - 1) * B_{n-1} + s^2 B_{n-2} \\ B_0 &=& 1 \\ B_1 &=& 1+s \f} * * * \param degree Degree of polynomial. * \param coeff Array to be used to fill-in the calculated coefficients. * * \return 0 on success, else an error number. ******************************************************************************/ int mathPolyBessel (int degree, double coeff[]); /* FUNCTION *******************************************************************/ /** \e Chebyshev function (polynomial) of first kind. \f{eqnarray*} y &=& \cos(n\arccos x)\quad(x\leq 1) \\ y &=& \cosh(n\arcosh x)\quad(x>1) \f} * * \param degree Polynomial degree. * \param x Argument. * * \return \f$y \cos(n\arccos x)\f$. ******************************************************************************/ double mathPolyCheby (int degree, double x); /* FUNCTION *******************************************************************/ /** Inverse \e Chebyshev function (polynomial) of first kind. \f{eqnarray*} y &=& \cos(1/n \arccos x)\quad(x\leq 1) \\ y &=& \cosh(1/n \arcosh x)\quad(x>1) \f} * * \param degree Polynomial degree. * \param x Argument. * * \return \f$y \cos(1/n \arccos x)\f$. ******************************************************************************/ double mathPolyChebyInv (int degree, double x); #ifdef DEBUG /* FUNCTION *******************************************************************/ /** Logs polynomial coefficients for debug purposes. * * \param poly Pointer to polynomial that holds the coefficients. * ******************************************************************************/ void mathPolyDebugLog (MATHPOLY *poly); #endif /* DEBUG */ #ifdef __cplusplus } #endif #endif /* MATHPOLY_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/dfcProject.h0000644000175100001440000001665213714315076014205 00000000000000/******************************************************************************/ /** * \file * DFCGen filter project management. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef DCFPROJECT_H #define DCFPROJECT_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #include "designDlg.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** DFCGen project info data. */ typedef struct { char *author; /**< Pointer to author name (may be NULL) */ char *title; /**< Pointer to project name (may be NULL) */ char *desc; /**< Pointer to project description (may be NULL) */ } DFCPRJ_INFO; /** DFCGen project. */ typedef struct { DFCPRJ_INFO info; /**< Project info (header) */ FLTCLASS fltcls; /**< Filter class */ DESIGNDLG design; /**< Filter design data (union) */ FLTCOEFF filter; /**< Coefficients in Z domain */ unsigned flags; /**< Flags, e.g. DFCPRJ_FLAG_SUPERSEDED */ } DFCPRJ_FILTER; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /** This flag indicates that the design was supersed. Maybe anyone has modified coefficients or roots directly, then the design is superseded. */ #define DFCPRJ_FLAG_SUPERSEDED 1 /** This flag indicates that the project was saved after changes made to coefficients. */ #define DFCPRJ_FLAG_SAVED 2 /** Internally and only temporary used flag (reserved). */ #define DFCPRJ_FLAG_INTERNAL 0x8000 /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* MACRO **********************************************************************/ /** Gets the current project flags. * * \return Returns project flags. ******************************************************************************/ #define dfcPrjGetFlags() dfcPrjSetFlags (~0, 0) /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Sets the (new) passed design and filter into the current project. All old * project data, except the header information, are free'ed. The project flag * DFCPRJ_FLAG_SUPERSEDED is set if \p type is equal to FLTCLASS_NOTDEF, else * it is cleared. * * \param type Class of filter. If FLTCLASS_NOTDEF is passed in here, * then the current filter class is unchanged. * \param pFilter Pointer to new filter (coefficients) data. * \param pDesign Pointer to new design data. Set this to NULL if design * data shall not be changed (or are not available). * ******************************************************************************/ void dfcPrjSetFilter (FLTCLASS type, FLTCOEFF* pFilter, DESIGNDLG *pDesign); /* FUNCTION *******************************************************************/ /** Sets new project information data. * * \param pInfo Pointer to new project info. * ******************************************************************************/ void dfcPrjSetInfo (DFCPRJ_INFO *pInfo); /* FUNCTION *******************************************************************/ /** Gets the filter design dialog parameters (if return value is unequal to * FLTCLASS_NOTDEF). * * \param pBuf Buffer which gets the filter design (may be NULL). * * \return Class of filter. ******************************************************************************/ FLTCLASS dfcPrjGetDesign (DESIGNDLG *pBuf); /* FUNCTION *******************************************************************/ /** Returns a pointer to the current filter definition. * * \return Pointer to filter coefficients/roots (or NULL if not * defined). ******************************************************************************/ FLTCOEFF* dfcPrjGetFilter (void); /* FUNCTION *******************************************************************/ /** Returns a pointer to the current project information. * * \return Pointer to project info. ******************************************************************************/ DFCPRJ_INFO* dfcPrjGetInfo (void); /* FUNCTION *******************************************************************/ /** Exports the current filter project to a file. * * \param filename Filename of file (inclusive path). * * \return Zero on succes, else an error number from errno.h. ******************************************************************************/ int dfcPrjExport (char *filename); /* FUNCTION *******************************************************************/ /** Saves the current filter project to a file. * * \param filename Filename of file (inclusive path). * * \return Zero on succes, else an error number. ******************************************************************************/ int dfcPrjSave (char *filename); /* FUNCTION *******************************************************************/ /** Loads a new filter project from a file. In case of an error it sets the * pointer to the error structure, which itself can be used to display the * original error message. Modification of the error structure pointer * indicates an critical error. In that case it has to be free'ed with * g_error_free(). * * \param filename Filename of file (inclusive path). * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function dfcPrjLoad(). * ******************************************************************************/ void dfcPrjLoad (char *filename, GError **err); /* FUNCTION *******************************************************************/ /** Frees all malloc'ed memory space from a project. Free'ing the project * memory includes the header info (do not call prjFileFree() in addition). * * \param pProject Pointer to project data. Set to NULL to free the * current project. * ******************************************************************************/ void dfcPrjFree (DFCPRJ_FILTER *pProject); /* FUNCTION *******************************************************************/ /** Sets, clears and gets project flags. * * \param andMask Mask to be applied to project flags by an \e AND operation. * \param orMask Mask to be applied to project flags by an \e OR operation. * * \return Returns old project flags. ******************************************************************************/ unsigned dfcPrjSetFlags (unsigned andMask, unsigned orMask); #ifdef __cplusplus } #endif #endif /* DCFPROJECT_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/mathFuncs.h0000644000175100001440000001445013711603224014034 00000000000000/******************************************************************************/ /** * \file * Mathematical functions. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef MATHFUNCS_H #define MATHFUNCS_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* includes config.h (include before math.h) */ #include #include #include /* all special functions */ #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Decimal normalized double value. The original value is determined by * \f$m 10^e\f$. */ typedef struct { double mantissa; /**< mantissa m */ double exponent; /**< exponent e */ } MATH_NORMDBL; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /** This macro swaps two integers (inline). */ #define MATH_SWAP_INT(int1, int2) \ { \ (int1) ^= (int2); \ (int2) ^= (int1); \ (int1) ^= (int2); \ } #ifdef HAVE_HYPOT #define HYPOT(x, y) hypot ((x), (y)) #else #define HYPOT(x, y) gsl_hypot ((x), (y)) #endif #ifdef HAVE_POW10 /* pow10() exists? */ #define POW10(x) pow10(x) #else #ifdef HAVE_EXP10 #define POW10(x) exp10(x) /**< 10 raised to \p x, means \f$y=10^{x}\f$ */ #else #define POW10(x) pow(10, (x)) /* fallback to (slow) generic function */ #endif /* HAVE_EXP10 */ #endif /* HAVE_POW10 */ #ifndef HAVE_TRUNC #define trunc(x) ((GSL_SIGN(x) > 0) ? floor(x) : ceil(x)) #endif #ifndef HAVE_ROUND #define round(x) floor((x) + 0.5) /* fallback to (slow) generic */ #endif /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Calculates a normalized value consisting of (decimal) mantissa and exponent. * * \param val Value to be converted. * * \return Normalized value. ******************************************************************************/ MATH_NORMDBL mathNorm10(double val); /* FUNCTION *******************************************************************/ /** Denormalizes a decimal value from its mantissa and exponent. * * \param val Normalized value to be converted. * * \return Denormalized value. ******************************************************************************/ double mathDenorm10(MATH_NORMDBL val); /* FUNCTION *******************************************************************/ /** Rectangle function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 1, & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncRectangle (double x); /* FUNCTION *******************************************************************/ /** \e Hamming window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 0.54-0.46 \cos(2\pi x), & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncHamming (double x); /* FUNCTION *******************************************************************/ /** \e van \e Hann window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ \frac{1}{2}\,[1-\cos(2\pi x)], & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncVanHann (double x); /* FUNCTION *******************************************************************/ /** \e Blackman window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 0.42-0.5\cos(2\pi x)+0.08\cos(4\pi x), & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncBlackman (double x); /* FUNCTION *******************************************************************/ /** \e Kaiser window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ \frac{I_0\left(\alpha\sqrt{1-(2 x-1)^2}\right)} {I_0(\alpha)}, & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * \param alpha Parameter \f$\alpha\f$. * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double mathFuncKaiser (double x, double alpha); #ifdef __cplusplus } #endif #endif /* MATHFUNCS_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/gui.h0000644000175100001440000000360013622204713012664 00000000000000/******************************************************************************/ /** * \file * GUI header files. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef GUI_H #define GUI_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* includes config.h (include before GNU system headers) */ #include "support.h" /* gettext macros and file handling functions */ #include #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define GUI_ENTRY_WIDTH_CHARS 8 /**< Width of all entry fields for numerics */ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* Some macros moved here from interface.c, which is generated by glade (but not * used directly in this application). */ #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ g_object_ref (widget), (GDestroyNotify) g_object_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) /* EXPORTED FUNCTIONS *********************************************************/ #ifdef __cplusplus } #endif #endif /* GUI_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/responseDlg.h0000644000175100001440000000420313622204713014365 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Response settings/properties dialog. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef RESPONSE_DLG_H #define RESPONSE_DLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "cairoPlot.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** Creates the properties dialog for a response plot. * * \param pDiag Pointer to current plot configuration (for preset). * * \return Dialog widget. ******************************************************************************/ GtkWidget* responseDlgCreate (PLOT_DIAG *pDiag); /* FUNCTION *******************************************************************/ /** Sets a double value into a GtkEntry dialog widget. * * \param dialog Dialog (top-level) widget. * \param pDiag Pointer to plot settings to be updated. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int responseDlgApply (GtkWidget *dialog, PLOT_DIAG *pDiag); #ifdef __cplusplus } #endif #endif /* RESPONSE_DLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/dfcgen.h0000644000175100001440000000765313711064527013350 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital Filter Coefficients Generator common types. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef DFCGEN_H #define DFCGEN_H /* INCLUDE FILES **************************************************************/ #include "base.h" /* basic types and constants */ #include "mathPoly.h" /* for polynomial types */ #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** Frequency transformations applied to lowpass filters. * * \attention Don't change the enums, because order must match list element * index in dialog. */ typedef enum { FTR_NON = 0, FTR_HIGHPASS, FTR_BANDPASS, FTR_BANDSTOP, FTR_SIZE } FTR; /** Special signals. */ typedef enum { FLTSIGNAL_DIRAC, FLTSIGNAL_HEAVISIDE, FLTSIGNAL_USER } FLTSIGNAL; /** Basic filter classes (from design viewpoint). * * \attention Don't change the enums, because order must match list element * index in dialog. */ typedef enum { FLTCLASS_NOTDEF = -1, /**< No filter defined/loaded */ FLTCLASS_MISC = 0, /**< Miscellaneous FIR/IIR filters */ FLTCLASS_LINFIR = 1, /**< Linear FIR filter */ FLTCLASS_STDIIR = 2, /**< IIR filter */ FLTCLASS_SIZE /**< Size of enum */ } FLTCLASS; /** Frequency transformation data. */ typedef struct { FTR type; /**< Frequency transformation type */ unsigned flags; /**< Special flags for bandpass/bandstop transform */ double fc; /**< Center (BP, BS) or cutoff (HP) frequency */ double bw; /**< Bandwidth (only BP or BS) */ } FTRDESIGN; /* Digital filter. */ typedef struct { double f0; /**< Sample frequency */ MATHPOLY num; /**< Numerator polynomial coefficients \& roots */ MATHPOLY den; /**< Denominator polynomial coefficients & roots */ double factor; /**< Transfer function factor applied to roots product. If this member has value 0.0 then no valid roots representation is available. */ } FLTCOEFF; /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ #define FLT_DEGREE_MAX 1024 /**< Maximum degree of a filter */ #define FLT_DEGREE_MIN 1 /**< Minimum degree of a filter */ #define FLT_SAMPLE_MAX (4.0 / DBL_EPSILON) /**< Maximum sampling frequency */ #define FLT_SAMPLE_MIN (1E-6) /**< Minimum sampling frequency */ #define FLTCLASS_DEFAULT FLTCLASS_MISC /**< default filter class (raw) */ /** Define to be used in element \em flags of structure FTRDESIGN to indicate that center frequency (BP, BS) is geometric mean of cutoff frequencies \f$f_c = \sqrt{f_1 f_2}\f$. Normally (arithmetic mean) it is calculated by \f$f_c = (f_1 + f_2) / 2\f$. */ #define FTRDESIGN_FLAG_CENTER_GEOMETRIC 1 /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ #ifdef __cplusplus } #endif #endif /* DFCGEN_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/include/Makefile.am0000664000175100001440000000110713714030304013760 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006, 2011-2013, 2019, 2020 Ralf Hoppe ## noinst_HEADERS = \ base.h\ cairoPlot.h\ cfgSettings.h\ designDlg.h\ dfcProject.h\ dfcgen.h\ dialogSupport.h\ editDlg.h\ fileDlg.h\ filterResponse.h\ filterSupport.h\ gui.h\ helpDlg.h\ linFirDesignDlg.h\ linFirFilter.h\ mainDlg.h\ mathFuncs.h\ mathMisc.h\ mathPoly.h\ miscDesignDlg.h\ miscFilter.h\ projectFile.h\ responseDlg.h\ responsePlot.h\ responseWin.h\ rootsPlot.h\ stdIirDesignDlg.h\ stdIirFilter.h\ filterPrint.h\ support.h dfcgen-gtk-0.5/include/fileDlg.h0000644000175100001440000001023013622204713013443 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file fileDlg.h * Interface to dialog functions of \e File menu. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #ifndef FILEDLG_H #define FILEDLG_H /* INCLUDE FILES **************************************************************/ #include "gui.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /* GLOBAL CONSTANT DECLARATIONS ***********************************************/ /* GLOBAL VARIABLE DECLARATIONS ***********************************************/ /* GLOBAL MACRO DEFINITIONS ***************************************************/ /* EXPORTED FUNCTIONS *********************************************************/ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e New menuitem is selected * from \e File menu. * * \param menuitem The menu item object which received the signal (New). * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgNewActivate (GtkMenuItem* menuitem, gpointer user_data); /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Open menuitem is selected * from \e File menu. * * \param srcWidget \e File \e Open widget (GtkMenuItem on event \e activate * or GtkToolButton on event \e clicked), which causes this * call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgOpenActivate (GtkWidget* srcWidget, gpointer user_data); /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Save menuitem is selected * from \e File menu. * * \param srcWidget \e File \e Save widget (GtkMenuItem on event \e activate * or GtkToolButton on event \e clicked), which causes this * call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgSaveActivate (GtkWidget* srcWidget, gpointer user_data); /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Save \e As menuitem is * selected from \e File menu. * * \param srcWidget \e File \e Save \e As widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgSaveAsActivate (GtkWidget* srcWidget, gpointer user_data); /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Export menuitem is * selected from \e File menu. * * \param srcWidget \e File \e Export widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgExportActivate (GtkWidget* srcWidget, gpointer user_data); #ifdef __cplusplus } #endif #endif /* FILEDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/0000755000175100001440000000000013733651721011164 500000000000000dfcgen-gtk-0.5/src/responseDlg.c0000644000175100001440000007366013622205141013535 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file responseDlg.c * \brief Response settings/properties dialog. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dialogSupport.h" #include "responseDlg.h" #include "responseWin.h" #include #include /* memcpy() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define RESPONSE_DLG_WIDTH_CHARS 12 /**< Width of entry fields */ #define RESPONSE_DLG_SPIN_MAX 16384 /**< Maximum number of samples */ #define RESPONSE_DLG_ENTRY_STARTX "entryStartX" /**< Widget name x-start */ #define RESPONSE_DLG_ENTRY_STOPX "entryStopX" /**< Widget name x-stop */ #define RESPONSE_DLG_CHKBTN_LOGX "checkLogX" /**< Widget name of check button for logarithmic scaling */ #define RESPONSE_DLG_CHKBTN_GRIDX "checkGridX" /**< Widget name of check button for grid */ #define RESPONSE_DLG_SPIN_SAMPLES "spinSamples" /**< Widget name samples */ #define RESPONSE_DLG_ENTRY_STARTY "entryStartY" /**< Widget name y-start */ #define RESPONSE_DLG_ENTRY_STOPY "entryStopY" /**< Widget name y-stop */ #define RESPONSE_DLG_CHKBTN_LOGY "checkLogY" /**< Widget name of check button for logarithmic scaling */ #define RESPONSE_DLG_CHKBTN_GRIDY "checkGridY" /**< Widget name of check button for grid */ #define RESPONSE_DLG_CHKBTN_AUTOSCALE "checkAutoscale" /**< Widget name of check button for autoscaling */ #define RESPONSE_DLG_COMBO_GRAPH "comboGraphStyle" #define RESPONSE_DLG_COMBO_COLOR "comboColorStyle" #define RESPONSE_DLG_COLOR_SELECT "colorSelect" /* LOCAL VARIABLE DEFINITIONS *************************************************/ static GdkColor responseDlgColorVals[PLOT_COLOR_SIZE]; /**< Colors (modified in dialog) */ static PLOT_COLOR responseDlgColorItem; /**< Curently selected color item (labels, graph, etc.) */ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void responseDlgSetEntry (GtkWidget* topWidget, const char *name, const PLOT_UNIT *pUnit, double value); static void createLogGridButton (GtkWidget *topWidget, GtkTable *table, char *logBtnName, char *gridBtnName, PLOT_AXIS *pAxis); static void autoScalingChanged (GtkCheckButton* button, gpointer user_data); static void colorItemChanged (GtkComboBox *combobox, gpointer user_data); static int responseDlgGetAxis (GtkWidget* topWidget, const char *widgets[], double vmin, double vmax, PLOT_AXIS *pAxis); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Sets a double value into a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param name Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param pUnit Pointer to unit descriptor (may be NULL). * \param value The double value to set. * ******************************************************************************/ static void responseDlgSetEntry (GtkWidget* topWidget, const char *name, const PLOT_UNIT *pUnit, double value) { double multiplier = 1.0; if (pUnit != NULL) { multiplier = pUnit->multiplier; } /* if */ dlgSetDouble (topWidget, name, multiplier, value); } /* responseDlgSetEntry() */ /* FUNCTION *******************************************************************/ /** Fetches axis data from response dialog. * * \param topWidget Toplevel widget. * \param widgets Array of size 4 with widget names associated with: * - index 0: \e Start value entry field. * - index 1: \e Stop value entry field. * - index 2: \e Logarithmic check button. * - index 3: \e Grid check button. * \param vmin Minimum allowed value (after applying \p pAxis->pUnit->multiplier). * \param vmax Maximum allowed value (after applying \p pAxis->pUnit->multiplier). * \param pAxis Pointer to associated, updated axis data (overwritten * on error). * * \return 0 on success, else an error code from errno.h or * gsl_error.h. ******************************************************************************/ static int responseDlgGetAxis (GtkWidget* topWidget, const char *widgets[], double vmin, double vmax, PLOT_AXIS *pAxis) { double multiplier = 1.0; int err = 0; pAxis->flags &= ~(PLOT_AXIS_FLAG_LOG | PLOT_AXIS_FLAG_GRID); if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (lookup_widget (topWidget, widgets[2])))) { pAxis->flags |= PLOT_AXIS_FLAG_LOG; if (vmin < PLOT_TOLERANCE) { vmin = PLOT_TOLERANCE; } /* if */ } /* if */ if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (lookup_widget (topWidget, widgets[3])))) { pAxis->flags |= PLOT_AXIS_FLAG_GRID; } /* if */ if (!(pAxis->flags & PLOT_AXIS_FLAG_AUTO)) { if (pAxis->pUnit != NULL) { multiplier = pAxis->pUnit->multiplier; } /* if */ if (dlgGetDouble (topWidget, widgets[0], vmin, vmax, multiplier, &pAxis->start) && dlgGetDouble (topWidget, widgets[1], vmin, vmax, multiplier, &pAxis->stop)) { err = cairoPlotChkRange (pAxis); if (err != 0) /* range not okay? */ { dlgError (topWidget, _("Range (start, stop) for axis '%s' is invalid."), pAxis->name); } /* if */ } /* if */ else { err = ERANGE; } /* if */ } /* if */ return err; } /* responseDlgGetAxis() */ /* FUNCTION *******************************************************************/ /** Creates the dialog check buttons for logarithmic scaling and grid on/off. * * \param topWidget Top level widget. * \param table Table, where the buttons are located. * \param logBtnName Name of button for logarithmic scaling (used in macro * GLADE_HOOKUP_OBJECT). * \param gridBtnName Name of button for grid on/off (used in macro * GLADE_HOOKUP_OBJECT). * \param pAxis Pointer to current plot configuration of axis. * ******************************************************************************/ static void createLogGridButton (GtkWidget *topWidget, GtkTable *table, char *logBtnName, char *gridBtnName, PLOT_AXIS *pAxis) { GtkWidget *checkbutton = gtk_check_button_new_with_mnemonic (_("Logarithmic")); gtk_table_attach (GTK_TABLE (table), checkbutton, 1, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (checkbutton), 1); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), pAxis->flags & PLOT_AXIS_FLAG_LOG); GLADE_HOOKUP_OBJECT (topWidget, checkbutton, logBtnName); checkbutton = gtk_check_button_new_with_mnemonic (_("Show Grid")); gtk_table_attach (GTK_TABLE (table), checkbutton, 1, 3, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (checkbutton), 1); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), pAxis->flags & PLOT_AXIS_FLAG_GRID); GLADE_HOOKUP_OBJECT (topWidget, checkbutton, gridBtnName); } /* createLogGridButton() */ /* FUNCTION *******************************************************************/ /** This function is called if the \e Autoscaling check button changes its * state. * * \param button Autoscaling check button which changes the state. * \param user_data Unused. * ******************************************************************************/ static void autoScalingChanged (GtkCheckButton* button, gpointer user_data) { gboolean sensitive = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (button), RESPONSE_DLG_ENTRY_STARTY), sensitive); gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (button), RESPONSE_DLG_ENTRY_STOPY), sensitive); } /* autoScalingChanged() */ /* FUNCTION *******************************************************************/ /** This function is called if the color selection changes. * * \param combobox Combobox widget which determines the color selection. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ static void colorItemChanged (GtkComboBox *combobox, gpointer user_data) { int idx = gtk_combo_box_get_active(combobox); GtkColorSelection *colorsel = GTK_COLOR_SELECTION ( lookup_widget (GTK_WIDGET (combobox), RESPONSE_DLG_COLOR_SELECT)); if (idx < 0) { idx = 0; /* set any, in case nothing selected */ } /* if */ gtk_color_selection_get_current_color ( colorsel, &responseDlgColorVals[responseDlgColorItem]); responseDlgColorItem = idx; /* remind last selected color item */ gtk_color_selection_set_current_color (colorsel, &responseDlgColorVals[idx]); } /* colorItemChanged() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Creates the properties dialog for a response plot. * * \attention If anyone changes the enums PLOT_STYLE or PLOT_COLOR * from cairoPlot.h then the calls into * gtk_combo_box_append_text() must be adopted to reflect * this. * * \param pDiag Pointer to current plot configuration (for preset). * * \return Dialog widget. ******************************************************************************/ GtkWidget* responseDlgCreate (PLOT_DIAG *pDiag) { GtkWidget *widget, *label, *box, *frame, *alignment, *table, *colorSel; GtkObject *adjustment; char *axisName; GtkWidget *responseDlg = gtk_dialog_new (); /* Some generic and global layout settings first */ gtk_window_set_title (GTK_WINDOW (responseDlg), _("Response Settings")); gtk_window_set_resizable (GTK_WINDOW (responseDlg), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (responseDlg), TRUE); gtk_window_set_icon_name (GTK_WINDOW (responseDlg), GTK_STOCK_PREFERENCES); gtk_window_set_type_hint (GTK_WINDOW (responseDlg), GDK_WINDOW_TYPE_HINT_DIALOG); box = gtk_hbox_new (FALSE, 12); /* x- and y-side of dialog */ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (responseDlg)->vbox), box, FALSE, FALSE, 6); /* x-axis */ frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); alignment = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), alignment); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0); /* x-axis values */ axisName = g_strdup_printf ("%s '%s'", _("Axis"), gettext (pDiag->x.name)); label = gtk_label_new (axisName); g_free (axisName); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); table = gtk_table_new (5, 3, FALSE); gtk_container_add (GTK_CONTAINER (alignment), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); label = gtk_label_new (_("Start")); /* x-start */ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Start of x-axis interval")); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_entry_set_width_chars (GTK_ENTRY (widget), RESPONSE_DLG_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_ENTRY_STARTX); responseDlgSetEntry (responseDlg, RESPONSE_DLG_ENTRY_STARTX, pDiag->x.pUnit, pDiag->x.start); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); gtk_widget_grab_focus (widget); label = gtk_label_new (_("Stop")); /* x-stop */ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("End of x-axis interval")); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_entry_set_width_chars (GTK_ENTRY (widget), RESPONSE_DLG_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_ENTRY_STOPX); responseDlgSetEntry (responseDlg, RESPONSE_DLG_ENTRY_STOPX, pDiag->x.pUnit, pDiag->x.stop); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (_("Samples")); /* samples */ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); adjustment = gtk_adjustment_new (0, 0, RESPONSE_DLG_SPIN_MAX, 1, 10, 0); widget = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("The number of samples to be used (0 = all)")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_SPIN_SAMPLES); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); if (pDiag->initFunc == NULL) { gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pDiag->num); } /* if */ else { gtk_widget_set_sensitive (widget, FALSE); } /* else */ label = gtk_label_new (NULL); /* x-start unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_label_new (NULL); /* x-stop unit */ gtk_table_attach (GTK_TABLE (table), widget, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5); if (pDiag->x.pUnit != NULL) { gtk_label_set_text (GTK_LABEL (label), pDiag->x.pUnit->name); gtk_label_set_text (GTK_LABEL (widget), pDiag->x.pUnit->name); } /* if */ else { gtk_widget_hide (label); gtk_widget_hide (widget); } /* else */ createLogGridButton (responseDlg, GTK_TABLE (table), RESPONSE_DLG_CHKBTN_LOGX, RESPONSE_DLG_CHKBTN_GRIDX, &pDiag->x); /* y-axis */ frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); alignment = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), alignment); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0); /* y-axis values */ axisName = g_strdup_printf ("%s '%s'", _("Axis"), gettext (pDiag->y.name)); label = gtk_label_new (axisName); g_free (axisName); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); table = gtk_table_new (5, 3, FALSE); gtk_container_add (GTK_CONTAINER (alignment), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); label = gtk_label_new (_("Start")); /* y-start */ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Start of y-axis interval")); gtk_widget_set_sensitive (widget, FALSE); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_entry_set_width_chars (GTK_ENTRY (widget), RESPONSE_DLG_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_ENTRY_STARTY); responseDlgSetEntry (responseDlg, RESPONSE_DLG_ENTRY_STARTY, pDiag->y.pUnit, pDiag->y.start); gtk_widget_set_sensitive (widget, !(pDiag->y.flags & PLOT_AXIS_FLAG_AUTO)); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (_("Stop")); /* y-stop */ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("End of y-axis interval")); gtk_widget_set_sensitive (widget, FALSE); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_entry_set_width_chars (GTK_ENTRY (widget), RESPONSE_DLG_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_ENTRY_STOPY); responseDlgSetEntry (responseDlg, RESPONSE_DLG_ENTRY_STOPY, pDiag->y.pUnit, pDiag->y.stop); gtk_widget_set_sensitive (widget, !(pDiag->y.flags & PLOT_AXIS_FLAG_AUTO)); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (NULL); /* y-start unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_label_new (NULL); /* y-stop unit */ gtk_table_attach (GTK_TABLE (table), widget, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5); if (pDiag->y.pUnit != NULL) { gtk_label_set_text (GTK_LABEL (label), pDiag->y.pUnit->name); gtk_label_set_text (GTK_LABEL (widget), pDiag->y.pUnit->name); } /* if */ else { gtk_widget_hide (label); gtk_widget_hide (widget); } /* else */ createLogGridButton (responseDlg, GTK_TABLE (table), RESPONSE_DLG_CHKBTN_LOGY, RESPONSE_DLG_CHKBTN_GRIDY, &pDiag->y); widget = gtk_check_button_new_with_mnemonic (_("Autoscaling")); gtk_widget_set_tooltip_text (widget, _("Autoscaling of y-axis with respect" " to minimum and maximum values in interval")); gtk_table_attach (GTK_TABLE (table), widget, 1, 3, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (widget), 1); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), pDiag->y.flags & PLOT_AXIS_FLAG_AUTO); GLADE_HOOKUP_OBJECT (responseDlg, widget, RESPONSE_DLG_CHKBTN_AUTOSCALE); g_signal_connect (widget, "toggled", G_CALLBACK (autoScalingChanged), NULL); /* Style settings */ widget = gtk_expander_new (NULL); /* style xpander */ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (responseDlg)->vbox), widget, FALSE, FALSE, 6); gtk_container_set_border_width (GTK_CONTAINER (widget), 12); gtk_expander_set_spacing (GTK_EXPANDER (widget), 6); label = gtk_label_new (_("Style")); gtk_expander_set_label_widget (GTK_EXPANDER (widget), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); box = gtk_vbox_new (FALSE, 24); gtk_container_add (GTK_CONTAINER (widget), box); table = gtk_table_new (2, 3, FALSE); gtk_box_pack_start (GTK_BOX (box), table, FALSE, FALSE, 6); gtk_table_set_row_spacings (GTK_TABLE (table), 24); gtk_table_set_col_spacings (GTK_TABLE (table), 12); widget = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); gtk_table_attach (GTK_TABLE (table), widget, 2, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0); gtk_misc_set_alignment (GTK_MISC (widget), 0.2, 0.5); label = gtk_label_new (_("Graph")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); label = gtk_label_new (_("Color")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); responseDlgColorItem = 0; /* color item selection */ memcpy (responseDlgColorVals, pDiag->colors, sizeof (responseDlgColorVals)); colorSel = gtk_color_selection_new (); gtk_box_pack_start (GTK_BOX (box), colorSel, FALSE, FALSE, 0); gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (colorSel), FALSE); gtk_color_selection_set_has_palette (GTK_COLOR_SELECTION (colorSel), TRUE); GLADE_HOOKUP_OBJECT (responseDlg, colorSel, RESPONSE_DLG_COLOR_SELECT); gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorSel), responseDlgColorVals); widget = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_tooltip_text (widget, _("Style of graph")); box = gtk_combo_box_new_text (); gtk_container_add (GTK_CONTAINER (widget), box); gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Line (continuous)")); /* PLOT_STYLE_LINE_ONLY */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Circle (discrete)")); /* PLOT_STYLE_CIRCLE_ONLY */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Samples (discrete)")); /* PLOT_STYLE_CIRCLE_SAMPLE */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Cross (discrete)")); /* PLOT_STYLE_CROSS_ONLY */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Box (discrete)")); /* PLOT_STYLE_BOX_ONLY */ GLADE_HOOKUP_OBJECT (responseDlg, box, RESPONSE_DLG_COMBO_GRAPH); gtk_combo_box_set_active(GTK_COMBO_BOX (box), pDiag->style); widget = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_tooltip_text (widget, _("Choose the color item to be changed, then modify the color")); box = gtk_combo_box_new_text (); gtk_container_add (GTK_CONTAINER (widget), box); gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Labels")); /* PLOT_COLOR_LABELS */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Grid")); /* PLOT_COLOR_GRID */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Graph")); /* PLOT_COLOR_GRAPH */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Box")); /* PLOT_COLOR_BOX */ gtk_combo_box_append_text (GTK_COMBO_BOX (box), _("Units")); /* PLOT_COLOR_AXIS_NAME */ GLADE_HOOKUP_OBJECT (responseDlg, box, RESPONSE_DLG_COMBO_COLOR); g_signal_connect (box, "changed", G_CALLBACK (colorItemChanged), NULL); gtk_combo_box_set_active(GTK_COMBO_BOX (box), 0); /* Action area (buttons) */ widget = GTK_DIALOG (responseDlg)->action_area; gtk_button_box_set_layout (GTK_BUTTON_BOX (widget), GTK_BUTTONBOX_END); widget = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_dialog_add_action_widget (GTK_DIALOG (responseDlg), widget, GTK_RESPONSE_HELP); #ifndef TODO gtk_widget_set_sensitive (widget, FALSE); #endif widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (responseDlg), widget, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_APPLY); gtk_dialog_add_action_widget (GTK_DIALOG (responseDlg), widget, GTK_RESPONSE_APPLY); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (GTK_DIALOG (responseDlg), widget, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); gtk_widget_grab_default (widget); gtk_widget_show_all (responseDlg); return responseDlg; } /* responseDlgCreate() */ /* FUNCTION *******************************************************************/ /** Sets a double value into a GtkEntry dialog widget. * * \param dialog Dialog (top-level) widget. * \param pDiag Pointer to plot settings to be updated. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int responseDlgApply (GtkWidget *dialog, PLOT_DIAG *pDiag) { static const char *xWidgets[] = { RESPONSE_DLG_ENTRY_STARTX, RESPONSE_DLG_ENTRY_STOPX, RESPONSE_DLG_CHKBTN_LOGX, RESPONSE_DLG_CHKBTN_GRIDX }; static const char *yWidgets[] = { RESPONSE_DLG_ENTRY_STARTY, RESPONSE_DLG_ENTRY_STOPY, RESPONSE_DLG_CHKBTN_LOGY, RESPONSE_DLG_CHKBTN_GRIDY }; PLOT_DIAG tmpDiag = *pDiag; int err = responseDlgGetAxis (dialog, xWidgets, 0, PLOT_AXIS_MAX, &tmpDiag.x); if (err == 0) { tmpDiag.y.flags &= ~PLOT_AXIS_FLAG_AUTO; if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( lookup_widget (dialog, RESPONSE_DLG_CHKBTN_AUTOSCALE)))) { tmpDiag.y.flags |= PLOT_AXIS_FLAG_AUTO; } /* if */ err = responseDlgGetAxis (dialog, yWidgets, PLOT_AXIS_MIN, PLOT_AXIS_MAX, &tmpDiag.y); if (err == 0) { if (dlgGetInt (dialog, RESPONSE_DLG_SPIN_SAMPLES, 0, RESPONSE_DLG_SPIN_MAX, &tmpDiag.num)) { colorItemChanged ( /* save last changed color */ GTK_COMBO_BOX ( lookup_widget (dialog, RESPONSE_DLG_COMBO_COLOR)), NULL); tmpDiag.style = gtk_combo_box_get_active( GTK_COMBO_BOX (lookup_widget (dialog, RESPONSE_DLG_COMBO_GRAPH))); *pDiag = tmpDiag; /* set return values */ memcpy (pDiag->colors, responseDlgColorVals, sizeof (responseDlgColorVals)); } /* if */ else { err = ERANGE; } /* else */ } /* if */ } /* if */ return err; } /* responseDlgApply() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/responseWin.c0000644000175100001440000010276213711067032013564 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response window creation and callbacks. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "responsePlot.h" #include "responseWin.h" #include "responseDlg.h" #include "dfcProject.h" /* dfcPrjGetFilter() */ #include "filterPrint.h" /* filterPrintResponse() */ #include "cfgSettings.h" /* cfgSaveResponseSettings(), cfgRestoreResponseSettings */ #include "mathFuncs.h" /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Response window description */ typedef struct { RESPONSE_TYPE type; /**< Type of response plot/window */ char *iconFile; /**< Name of icon (png) file */ PLOT_DIAG diag; /**< Plot data */ GdkColor colors[PLOT_COLOR_SIZE]; /**< Allocated colors to be used */ int points; /**< Points drawed on last responsePlotDraw() */ GdkRectangle zoom; /**< Zoom coordinates (last rectangle) */ GdkGCValues original; /**< Saved GdkGC values when zooming */ GtkCheckMenuItem *menuref; /**< (Backward) menu item reference */ GtkWidget* btnPrint; /**< Print button widget reference */ GtkWidget* topWidget; /**< response plot top-level widget (NULL if not exists) */ GtkWidget* draw; /**< \e GtkDrawingArea widget */ GtkWidget* label; /**< Label which shows the number of points */ } RESPONSE_WIN; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define RESPONSE_WIN_GRAPH_THICKNESS (2.0) /**< Graph line width */ /** Used GDK graphics context for zoom rectangle */ #define RESPONSE_WIN_ZOOM_GC(widget) (widget)->style->dark_gc[GTK_STATE_NORMAL] /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void drawZoomRect (RESPONSE_WIN *pDesc); static void cancelZoomMode (RESPONSE_WIN *pDesc); static void responseWinCreate (RESPONSE_WIN *pDesc); static gboolean exposeHandler (GtkWidget *widget, GdkEventExpose *event, gpointer user_data); static BOOL responseWinExpose (RESPONSE_WIN* pDesc); static void responseWinMapped (GtkWidget* widget, gpointer user_data); static void responseWinDestroyed (GtkObject* object, gpointer user_data); static void responseWinBtnPropActivate (GtkButton *button, gpointer user_data); static void responseWinBtnPrintActivate (GtkWidget* srcWidget, gpointer user_data); static gboolean responseWinKeyPress (GtkWidget *widget, GdkEventKey *event, gpointer user_data); static gboolean responseWinButtonPress (GtkWidget* widget, GdkEventButton* event, gpointer user_data); static gboolean responseWinButtonRelease (GtkWidget* widget, GdkEventButton* event, gpointer user_data); static gboolean responseWinMotionNotify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data); /* LOCAL VARIABLE DEFINITIONS *************************************************/ static PLOT_UNIT plotUnitDB = {"dB", 1.0}; /**< Constant attenuation unit */ static PLOT_UNIT plotUnitDeg = {"°", 1.0}; /**< Constant degree unit */ /** All predefined response plots (partially intialized). */ static RESPONSE_WIN responseWidget[RESPONSE_TYPE_SIZE] = { [RESPONSE_TYPE_MAGNITUDE] = { RESPONSE_TYPE_MAGNITUDE, /* type */ "amplitude.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("H(f)")}, .pData = &responseWidget[RESPONSE_TYPE_MAGNITUDE], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ }, }, [RESPONSE_TYPE_ATTENUATION] = { RESPONSE_TYPE_ATTENUATION, "attenuation.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("A(f)"), .pUnit = &plotUnitDB}, .pData = &responseWidget[RESPONSE_TYPE_ATTENUATION], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ }, }, [RESPONSE_TYPE_CHAR] = { RESPONSE_TYPE_CHAR, "charfunc.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("D(f)")}, .pData = &responseWidget[RESPONSE_TYPE_CHAR], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ }, }, [RESPONSE_TYPE_PHASE] = { RESPONSE_TYPE_PHASE, "phase.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("B(f)"), .pUnit = &plotUnitDeg}, .pData = &responseWidget[RESPONSE_TYPE_PHASE], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ }, }, [RESPONSE_TYPE_DELAY] = { RESPONSE_TYPE_DELAY, "phasedelay.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("Tp(f)")}, .pData = &responseWidget[RESPONSE_TYPE_DELAY], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ } }, [RESPONSE_TYPE_GROUP] = { RESPONSE_TYPE_GROUP, "grpdelay.png", /* iconFile */ { /* diag */ .x = {.name = N_("f")}, .y = {.name = N_("Tg(f)")}, .pData = &responseWidget[RESPONSE_TYPE_GROUP], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ } }, [RESPONSE_TYPE_IMPULSE] = { RESPONSE_TYPE_IMPULSE, "impulse.png", /* iconFile */ { /* diag */ .x = {.name = N_("t")}, .y = {.name = N_("h(t)")}, .pData = &responseWidget[RESPONSE_TYPE_IMPULSE], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ }, }, [RESPONSE_TYPE_STEP] = { RESPONSE_TYPE_STEP, "step.png", /* iconFile */ { /* diag */ .x = {.name = N_("t")}, .y = {.name = N_("g(t)")}, .pData = &responseWidget[RESPONSE_TYPE_STEP], /* pData (backward ptr) */ .thickness = RESPONSE_WIN_GRAPH_THICKNESS, /* graph thickness */ } } }; /* responseWidget[] */ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Cancels the zoom mode by restoring the original graphics context and * erasing the last zoom rubberband. Call this function only if really in * zoom mode, means the pointer is grabbed. * * \param pDesc Pointer to response window/widget description. * ******************************************************************************/ static void drawZoomRect (RESPONSE_WIN *pDesc) { GdkRectangle rect = pDesc->zoom; if (rect.width < 0) { rect.x += rect.width; rect.width = -rect.width; } /* if */ if (rect.height < 0) { rect.y += rect.height; rect.height = -rect.height; } /* if */ gdk_draw_rectangle (GDK_DRAWABLE(pDesc->draw->window), /* erase old rect */ RESPONSE_WIN_ZOOM_GC(pDesc->draw), FALSE, rect.x, rect.y, rect.width, rect.height); } /* drawZoomRect() */ /* FUNCTION *******************************************************************/ /** Cancels the zoom mode by restoring the original graphics context and * erasing the last zoom rubberband. Call this function only if really in * zoom mode, means the pointer is grabbed. * * \param pDesc Pointer to response window/widget description. * ******************************************************************************/ static void cancelZoomMode (RESPONSE_WIN *pDesc) { drawZoomRect (pDesc); gdk_pointer_ungrab (GDK_CURRENT_TIME); /* clear zoom mode indicator */ gdk_keyboard_ungrab (GDK_CURRENT_TIME); gdk_gc_set_values (RESPONSE_WIN_ZOOM_GC(pDesc->draw), &pDesc->original, GDK_GC_FUNCTION); } /* cancelZoomMode() */ /* FUNCTION *******************************************************************/ /** \e Clicked event callback emitted when a print menuitem/button is pressed. * * \param[in] srcWidget \c GtkToolButton on event \e clicked, which causes * this call. * \param user_data Pointer to response description (::RESPONSE_WIN) as * supplied to function g_signal_connect(). * ******************************************************************************/ static void responseWinBtnPrintActivate (GtkWidget* srcWidget, gpointer user_data) { RESPONSE_WIN* pDesc = (RESPONSE_WIN*)user_data; filterPrintResponse (gtk_widget_get_toplevel (srcWidget), &pDesc->diag, pDesc->type); } /* responseWinBtnPrintActivate() */ /* FUNCTION *******************************************************************/ /** Creates a filter response widget/window. Such a window is used to display * - magnitude reponse * - phase response * - step response etc. * * \note This function has changed after \e glade code generation. * * \param pDesc Pointer to response window/widget description. * * \todo Restore size of drawing area from last session ******************************************************************************/ static void responseWinCreate (RESPONSE_WIN *pDesc) { GtkWidget *vbox; GtkWidget *hseparator; GtkWidget *hbox; GtkWidget *btnSettings; GdkPixbuf *iconPixbuf; pDesc->topWidget = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (pDesc->topWidget), gtk_label_get_text ( GTK_LABEL ( gtk_bin_get_child ( GTK_BIN (pDesc->menuref))))); gtk_window_set_destroy_with_parent (GTK_WINDOW (pDesc->topWidget), TRUE); gtk_window_set_focus_on_map (GTK_WINDOW (pDesc->topWidget), FALSE); iconPixbuf = createPixbufFromFile (pDesc->iconFile); if (iconPixbuf != NULL) { gtk_window_set_icon (GTK_WINDOW (pDesc->topWidget), iconPixbuf); g_object_unref (iconPixbuf); } /* if */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (pDesc->topWidget), vbox); pDesc->draw = gtk_drawing_area_new (); gtk_widget_set_size_request (pDesc->draw, 350, 240); gtk_widget_add_events (pDesc->draw, GDK_EXPOSURE_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); gtk_box_pack_start (GTK_BOX (vbox), pDesc->draw, TRUE, TRUE, 6); hseparator = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (vbox), hseparator, FALSE, TRUE, 0); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6); pDesc->label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (hbox), pDesc->label, FALSE, FALSE, 6); gtk_label_set_single_line_mode (GTK_LABEL (pDesc->label), TRUE); pDesc->btnPrint = gtk_button_new_from_stock (GTK_STOCK_PRINT); gtk_box_pack_end (GTK_BOX (hbox), pDesc->btnPrint, FALSE, FALSE, 6); g_signal_connect ((gpointer) pDesc->btnPrint, "clicked", G_CALLBACK (responseWinBtnPrintActivate), pDesc); GTK_WIDGET_SET_FLAGS (pDesc->btnPrint, GTK_CAN_DEFAULT); gtk_widget_set_tooltip_text (pDesc->btnPrint, _("Print this response plot")); btnSettings = gtk_button_new_from_stock (GTK_STOCK_PREFERENCES); gtk_box_pack_end (GTK_BOX (hbox), btnSettings, FALSE, FALSE, 6); GTK_WIDGET_SET_FLAGS (btnSettings, GTK_CAN_DEFAULT); gtk_widget_set_tooltip_text (btnSettings, _("Set response plot preferences")); gtk_widget_add_events (pDesc->topWidget, GDK_KEY_PRESS_MASK); g_signal_connect ((gpointer) pDesc->draw, "button_press_event", G_CALLBACK (responseWinButtonPress), pDesc); g_signal_connect ((gpointer) pDesc->draw, "button_release_event", G_CALLBACK (responseWinButtonRelease), pDesc); g_signal_connect ((gpointer) pDesc->draw, "motion_notify_event", G_CALLBACK (responseWinMotionNotify), pDesc); g_signal_connect ((gpointer) pDesc->topWidget, "key_press_event", G_CALLBACK (responseWinKeyPress), pDesc); g_signal_connect ((gpointer) pDesc->draw, "expose_event", G_CALLBACK (exposeHandler), pDesc); g_signal_connect ((gpointer) pDesc->draw, "destroy", G_CALLBACK (responseWinDestroyed), pDesc); g_signal_connect ((gpointer) pDesc->draw, "map", G_CALLBACK (responseWinMapped), pDesc); g_signal_connect ((gpointer) btnSettings, "clicked", G_CALLBACK (responseWinBtnPropActivate), pDesc); gtk_widget_show_all (pDesc->topWidget); gtk_widget_grab_focus (btnSettings); gtk_widget_grab_default (btnSettings); } /* responseWinCreate() */ /* FUNCTION *******************************************************************/ /** Invalidates the drawing area of a response window. * * \param pDesc Pointer to response window description. * * \return TRUE if the associated response does really exist, else * FALSE. ******************************************************************************/ static BOOL responseWinExpose (RESPONSE_WIN* pDesc) { if (pDesc->topWidget != NULL) { gdk_window_invalidate_region (pDesc->draw->window, gdk_drawable_get_visible_region ( GDK_DRAWABLE(pDesc->draw->window)), FALSE); return TRUE; } /* if */ return FALSE; } /* responseWinExpose() */ /* FUNCTION *******************************************************************/ /** Redraws a response widget in case an \e expose event is received. * * \param widget Pointer to widget (GtkDrawingArea, GDK drawable), which * have to be redrawn with a particular filter response. * \param event \e expose event data. * \param user_data Pointer to response description (of type RESPONSE_WIN) * as supplied to function g_signal_connect() for \e expose * event. * \return TRUE if the callback handled the signal, and no further * handling is needed. ******************************************************************************/ static gboolean exposeHandler (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { cairo_t* cr; char labelString[128]; RESPONSE_WIN* pDesc = user_data; GdkDrawable* drawable = GDK_DRAWABLE(widget->window); GdkCursor* cursor = gdk_cursor_new (GDK_WATCH); ASSERT(pDesc != NULL); gdk_window_set_cursor (pDesc->topWidget->window, cursor); gdk_cursor_unref (cursor); /* free client side resource immediately */ pDesc->diag.area.x = pDesc->diag.area.y = 0; /* set size of plot area */ gdk_drawable_get_size (drawable, &pDesc->diag.area.width, &pDesc->diag.area.height); cr = gdk_cairo_create (drawable); /* create cairo context */ pDesc->points = responsePlotDraw (cr, pDesc->type, &pDesc->diag); if (pDesc->points >= 0) { g_snprintf (labelString, sizeof(labelString), _("%d Points"), pDesc->points); gtk_label_set_text (GTK_LABEL(pDesc->label), labelString); } /* if */ else { gtk_label_set_text (GTK_LABEL(pDesc->label), ""); } /* else */ cairo_destroy(cr); /* free cairo context */ gdk_window_set_cursor(pDesc->topWidget->window, NULL); /* restore parent cursor */ return TRUE; /* stop emission */ } /* exposeHandler() */ /* FUNCTION *******************************************************************/ /** This function is called when a response widget (GtkDrawingArea) is * destroyed. * * \note The function isn't called if the window is destroyed because of * main application exit (e.g. by pressing Ctrl-Q). * * \param object Response widget which was destroyed. * \param user_data Pointer to response description (of type RESPONSE_WIN) * as supplied to function g_signal_connect() for \e destroy * event. * ******************************************************************************/ static void responseWinDestroyed(GtkObject* object, gpointer user_data) { RESPONSE_WIN* pDesc = user_data; ASSERT(pDesc != NULL); pDesc->topWidget = NULL; gdk_colormap_free_colors (gdk_colormap_get_system (), pDesc->colors, PLOT_COLOR_SIZE); gtk_check_menu_item_set_active (pDesc->menuref, FALSE); /* update menu */ } /* responseWinDestroyed() */ /* FUNCTION *******************************************************************/ /** This function is called when a response widget (GtkDrawingArea) is realized. * * \param widget Response widget which was realized. * \param user_data Pointer to response description (of type RESPONSE_WIN) * as supplied to function g_signal_connect() for \e realize * event. * ******************************************************************************/ static void responseWinMapped (GtkWidget* widget, gpointer user_data) { gboolean success[PLOT_COLOR_SIZE]; RESPONSE_WIN* pDesc = user_data; ASSERT(pDesc != NULL); pDesc->diag.colors = pDesc->colors; /* set pointer for color restore */ cfgRestoreResponseSettings (pDesc->type, &pDesc->diag); if (gdk_colormap_alloc_colors (gdk_colormap_get_system (), pDesc->colors, PLOT_COLOR_SIZE, TRUE, TRUE, success) != 0) { DEBUG_LOG ("Could not allocate colors in system colormap"); } /* if */ } /* responseWinMapped() */ /* FUNCTION *******************************************************************/ /** This function should be called when then properties button is clicked. * * \param button Button widget. * \param user_data Pointer to response description (of type RESPONSE_WIN) * as supplied to function g_signal_connect(). * ******************************************************************************/ static void responseWinBtnPropActivate (GtkButton *button, gpointer user_data) { gint result; RESPONSE_WIN *pDesc = user_data; GtkWidget *dialog = responseDlgCreate (&pDesc->diag); do { result = gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_APPLY: case GTK_RESPONSE_OK: if (responseDlgApply (dialog, &pDesc->diag) == 0) { cfgSaveResponseSettings (pDesc->type, &pDesc->diag); responseWinRedraw (pDesc->type); } /* if */ else { result = GTK_RESPONSE_APPLY; /* dialog in progress */ } /* else */ break; default: break; } /* switch */ } while ((result == GTK_RESPONSE_APPLY) || (result == GTK_RESPONSE_HELP)); gtk_widget_destroy (dialog); } /* responseWinBtnPropActivate */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Toggles visibility of a filter response widget/window. This function * should be called if a \e GtkCheckMenuItem from the \e View menu receives * an \e activate event. * * \param menuitem Menu item which has received the \e activate event. * \param user_data Pointer to response window type (RESPONSE_WIN_TYPE). * ******************************************************************************/ void responseWinMenuActivate (GtkMenuItem* menuitem, gpointer user_data) { RESPONSE_WIN *pDesc; RESPONSE_TYPE type; type = GPOINTER_TO_INT (user_data); /* type of response window */ pDesc = &responseWidget[type]; pDesc->menuref = GTK_CHECK_MENU_ITEM(menuitem); /* store reference */ if (gtk_check_menu_item_get_active (pDesc->menuref)) { if (pDesc->topWidget == NULL) { responseWinCreate (pDesc); /* and create window */ /* Because sometimes the expose event is missing after creation, * force redraw now. */ responseWinRedraw (type); } /* if */ } /* if */ else { if (pDesc->topWidget != NULL) { gtk_widget_destroy (pDesc->topWidget); } /* if */ } /* else */ } /* responseWinMenuActivate() */ /* FUNCTION *******************************************************************/ /** Invalidates one or all response windows for redrawing. * * \param type The response window which shall be redrawn. Set this * parameter to RESPONSE_TYPE_SIZE to redraw all. * ******************************************************************************/ void responseWinRedraw (RESPONSE_TYPE type) { RESPONSE_TYPE start, stop; BOOL filterValid = (dfcPrjGetFilter () != NULL); if (type < RESPONSE_TYPE_SIZE) { start = stop = type; } /* if */ else /* redraw all */ { start = 0; stop = RESPONSE_TYPE_SIZE - 1; } /* else */ for (type = start; type <= stop; type++) { if (responseWidget[type].topWidget != NULL) { gtk_widget_set_sensitive (responseWidget[type].btnPrint, filterValid); } /* if */ (void)responseWinExpose (&responseWidget[type]); } /* for */ } /* responseWinRedraw() */ /* FUNCTION *******************************************************************/ /** Top widget callback function on \e key_press_event. This function is used * to detect zoom mode cancel. * * \param widget Response plot widget handle (top-level). * \param event GDK event structure associated with \e key_press_event. * \param user_data Pointer to response window type (RESPONSE_WIN_TYPE). * * \return TRUE if the signal shall be propagated to the GDK * default handler, else FALSE. ******************************************************************************/ static gboolean responseWinKeyPress (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if (gdk_pointer_is_grabbed ()) /* in zoom mode? */ { cancelZoomMode (user_data); } /* if */ return FALSE; /* propagate signal to default handler */ } /* responseWinKeyPress() */ /* FUNCTION *******************************************************************/ /** Drawing area widget callback function on \e button_press_event. This * function is used to detect start of zoom mode. * * \param widget Drawing area widget handle. * \param event GDK event structure associated with \e button_press_event. * \param user_data Pointer to response window type (RESPONSE_WIN_TYPE). * * \return TRUE if the event shall be propagated to the GDK * default handler, else FALSE. ******************************************************************************/ static gboolean responseWinButtonPress (GtkWidget* widget, GdkEventButton* event, gpointer user_data) { GdkCursor* cursor; GdkGC* gc; RESPONSE_WIN *pDesc = user_data; if (gdk_pointer_is_grabbed ()) /* in zoom mode? */ { cancelZoomMode (user_data); } /* if */ if ((event->button == 1) && /* left mouse button? */ (pDesc->points > 0) && /* else drawing area isn't valid */ (event->x >= pDesc->diag.area.x) && /* inside plot/graph box? */ (event->x < pDesc->diag.area.x + pDesc->diag.area.width) && (event->y >= pDesc->diag.area.y) && (event->y < pDesc->diag.area.y + pDesc->diag.area.height)) { DEBUG_LOG ("Mouse button 1 pressed in plot box (x = %G, y = %G)", cairoPlotCoordinate (&pDesc->diag.x, pDesc->diag.area.x, pDesc->diag.area.x + pDesc->diag.area.width, event->x), cairoPlotCoordinate (&pDesc->diag.y, pDesc->diag.area.y + pDesc->diag.area.height, pDesc->diag.area.y, event->y)); cursor = gdk_cursor_new (GDK_CROSS); if (gdk_pointer_grab (pDesc->draw->window, FALSE, GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK, pDesc->draw->window, cursor, event->time) == GDK_GRAB_SUCCESS) { if (gdk_keyboard_grab (pDesc->topWidget->window, GDK_KEY_PRESS_MASK, event->time) == GDK_GRAB_SUCCESS) { pDesc->zoom.x = event->x; if (pDesc->diag.y.flags & PLOT_AXIS_FLAG_AUTO) { pDesc->zoom.y = pDesc->diag.area.y; } /* if */ else { pDesc->zoom.y = event->y; } /* else */ pDesc->zoom.width = pDesc->zoom.height = 0; gc = RESPONSE_WIN_ZOOM_GC(pDesc->draw); gdk_gc_get_values (gc, &pDesc->original); gdk_gc_set_function (gc, GDK_XOR); gdk_gc_set_line_attributes (gc, 1, GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER); gdk_gc_set_clip_rectangle (gc, &pDesc->diag.area); drawZoomRect (pDesc); } /* if */ else /* error */ { gdk_pointer_ungrab (GDK_CURRENT_TIME); } /* else */ } /* if */ gdk_cursor_unref (cursor); /* free client side resource immediately */ } /* if */ return FALSE; /* propagate signal to default handler */ } /* responseWinButtonPress() */ /* FUNCTION *******************************************************************/ /** Drawing area widget callback function on \e button_release_event. This * function is used to detect (regular) end of zoom mode. * * \param widget Drawing area widget handle. * \param event GDK event structure associated with \e button_release_event. * \param user_data Pointer to response window type (RESPONSE_WIN_TYPE). * * \return TRUE if the event shall be propagated to the GDK * default handler, else FALSE. ******************************************************************************/ static gboolean responseWinButtonRelease (GtkWidget* widget, GdkEventButton* event, gpointer user_data) { int x, y; double tmpx, tmpy; RESPONSE_WIN *pDesc = user_data; if (gdk_pointer_is_grabbed ()) /* in zoom mode? */ { cancelZoomMode (pDesc); if (event->button == 1) /* left mouse button? */ { x = event->x; y = event->y; if (x < pDesc->zoom.x) { MATH_SWAP_INT (x, pDesc->zoom.x); } /* if */ if (y < pDesc->zoom.y) { MATH_SWAP_INT (y, pDesc->zoom.y); } /* if */ DEBUG_LOG ("Mouse button 1 released while zooming (x = %G, y = %G)", cairoPlotCoordinate (&pDesc->diag.x, pDesc->diag.area.x, pDesc->diag.area.x + pDesc->diag.area.width, x), cairoPlotCoordinate (&pDesc->diag.y, pDesc->diag.area.y + pDesc->diag.area.height, pDesc->diag.area.y, y)); if ((x > pDesc->zoom.x) && (y > pDesc->zoom.y) && /* not too small? */ (pDesc->zoom.x >= pDesc->diag.area.x) && /* in graph area (box)? */ (x < pDesc->diag.area.x + pDesc->diag.area.width) && (pDesc->zoom.y >= pDesc->diag.area.y) && (y < pDesc->diag.area.y + pDesc->diag.area.height)) { tmpx = cairoPlotCoordinate ( &pDesc->diag.x, pDesc->diag.area.x, pDesc->diag.area.x + pDesc->diag.area.width, pDesc->zoom.x); pDesc->diag.x.stop = cairoPlotCoordinate ( &pDesc->diag.x, pDesc->diag.area.x, pDesc->diag.area.x + pDesc->diag.area.width, x); pDesc->diag.x.start = tmpx; if (!(pDesc->diag.y.flags & PLOT_AXIS_FLAG_AUTO)) { tmpy = cairoPlotCoordinate ( &pDesc->diag.y, pDesc->diag.area.y + pDesc->diag.area.height, pDesc->diag.area.y, pDesc->zoom.y); pDesc->diag.y.start = cairoPlotCoordinate ( &pDesc->diag.y, pDesc->diag.area.y + pDesc->diag.area.height, pDesc->diag.area.y, y); pDesc->diag.y.stop = tmpy; } /* if */ (void)responseWinExpose (pDesc); /* redraw with new ranges */ } /* if */ } /* if */ } /* if */ return FALSE; /* propagate signal to default handler */ } /* responseWinButtonRelease() */ /* FUNCTION *******************************************************************/ /** Drawing area widget callback function on \e motion_notify_event. This * function is used to track pointer movements while in zoom mode. * * \param widget Drawing area widget handle. * \param event GDK event structure associated with \e motion_notify_event. * \param user_data Pointer to response window type (RESPONSE_WIN_TYPE). * * \return TRUE if the event shall be propagated to the GDK * default handler, else FALSE. ******************************************************************************/ static gboolean responseWinMotionNotify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { if (gdk_pointer_is_grabbed ()) /* in zoom mode? */ { RESPONSE_WIN *pDesc = user_data; drawZoomRect (pDesc); /* erase old rectangle */ pDesc->zoom.width = event->x - pDesc->zoom.x; if (pDesc->diag.y.flags & PLOT_AXIS_FLAG_AUTO) { pDesc->zoom.height = pDesc->diag.area.height; } /* if */ else { /* height may become negative */ pDesc->zoom.height = event->y - pDesc->zoom.y; } /* else */ drawZoomRect (pDesc); /* draw new rectangle */ } /* if */ return FALSE; /* propagate signal to default handler */ } /* responseWinMotionNotify() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/filterSupport.c0000664000175100001440000002774713617621375014160 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Filter support functions. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathMisc.h" #include "filterSupport.h" #include "filterResponse.h" #include /* memcpy() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define FILTER_APPROX_ZERO (DBL_EPSILON / 32.0) /**< Assume zero if less than value */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static int checkPolyZ(MATHPOLY *poly); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Checks a polynomial wrt. size of coefficients. If any coefficient is less * than FILTER_APPROX_ZERO, the it will be set to zero (and on leading * coefficients the degree of polynomial adopted). * * \param poly Pointer to polynomial. * * \return - 0 if okay and nothing has changed * - a negative number if a coefficient or the degree has * changed, but the polynomial is valid * - a positive error number (from errno.h) that something * is wrong and the polynomial must be seen as invalid. ******************************************************************************/ static int checkPolyZ (MATHPOLY *poly) { int i, k, ret = 0; int degree = poly->degree; for (i = degree; i >= 0; i--) { if (fabs(poly->coeff[i]) < FILTER_APPROX_ZERO) { --degree; } /* if */ else { break; /* break for loop if first valid coeff found */ } /* else */ } /* for */ if (degree < 0) { DEBUG_LOG ("All coefficients of polynomial to small"); return ERANGE; } /* if */ i = 0; while ((i <= degree) && (fabs(poly->coeff[i]) < FILTER_APPROX_ZERO)) { /* search first valid coeff starting at index 0 */ ++i; } /* while */ if (i > 0) /* first coefficient(s) are invalid? */ { if (i > degree) /* that's too much */ { DEBUG_LOG ("Coefficients check"); return ERANGE; } /* if */ degree -= i; /* shift down */ for (k = 0; k <= degree; k++) { poly->coeff[k] = poly->coeff[k + i]; } /* for */ } /* if */ if (degree != poly->degree) /* realloc memory if degree changed */ { poly->coeff = realloc(poly->coeff, (1 + degree) * sizeof(poly->coeff[0])); poly->root = realloc(poly->root, GSL_MAX (1, degree) * sizeof(poly->root[0])); ret = GSL_CONTINUE; } /* if */ if ((poly->root == NULL) || (poly->coeff == NULL)) { DEBUG_LOG ("Polynomial memory re-allocation has failed"); return ENOMEM; } /* if */ poly->degree = degree; return ret; } /* checkPolyZ() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Allocates memory space for a filter. * * This function mallocs memory space for filter coefficients and roots based * on the degree of numerator and denominator polynomial. * * \param flt Filter structure. * * \return Zero on success, else an error code (typically ENOMEM). ******************************************************************************/ int filterMalloc (FLTCOEFF *flt) { int err = mathPolyMalloc (&flt->num); if (err != 0) { DEBUG_LOG ("Filter memory allocation (numerator)"); return err; } /* if */ err = mathPolyMalloc (&flt->den); if (err != 0) { mathPolyFree(&flt->num); DEBUG_LOG ("Filter memory allocation (denominator)"); return err; } /* if */ return 0; } /* filterMalloc() */ /* FUNCTION *******************************************************************/ /** Duplicates a filter. This function mallocs memory space for filter * coefficients and roots based on the degree of the source filter pointed by * \p src. Then it copies the numerator and denominator polynomial to \p dest. * Use function filterFree() to free all the new associated memory. * * \param src Source filter (input). * \param dest Destination filter (output). * * \return Zero on success, else an error code (typically ENOMEM). ******************************************************************************/ int filterDuplicate (FLTCOEFF *dest, FLTCOEFF *src) { int err; dest->f0 = src->f0; dest->num.degree = src->num.degree; dest->den.degree = src->den.degree; err = filterMalloc (dest); if (err != 0) { return err; } /* if */ memcpy (dest->num.coeff, src->num.coeff, (1 + src->num.degree) * sizeof(src->num.coeff[0])); memcpy (dest->den.coeff, src->den.coeff, (1 + src->den.degree) * sizeof(src->den.coeff[0])); memcpy (dest->num.root, src->num.root, src->num.degree * sizeof(src->num.root[0])); memcpy (dest->den.root, src->den.root, src->den.degree * sizeof(src->den.root[0])); return 0; } /* filterDuplicate() */ /* FUNCTION *******************************************************************/ /** Free's all memory space allocated for a filter. * * \param flt Filter structure. * * \return Nothing. ******************************************************************************/ void filterFree(FLTCOEFF *flt) { mathPolyFree(&flt->num); mathPolyFree(&flt->den); } /* filterFree */ /* FUNCTION *******************************************************************/ /** Checks ability to implement a digital system/filter. * * \param pFilter Pointer to filter coefficients/roots. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int filterCheck (FLTCOEFF *pFilter) { int err1 = checkPolyZ (&pFilter->num); int err2 = checkPolyZ (&pFilter->den); if (FLTERR_CRITICAL (err1)) /* anything wrong with numerator polynomial? */ { return err1; } /* if */ if (!FLTERR_SUCCESS (err2)) /* wrong denominator polynomial (or changed)? */ { return err2; } /* if */ return err1; } /* filterCheck() */ /* FUNCTION *******************************************************************/ /** Normalizes the coefficients of a filter. To perform that, it * first modifies the denominator coefficients such that \f$den_0=1\f$ is * ensured. At the second step it re-calculates the numerator coefficients. * * \param pFilter Pointer to filter. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int normFilterCoeffs (FLTCOEFF *pFilter) { int i; double *pCoeff, normCoeff = pFilter->den.coeff[0]; for(i = 0, pCoeff = pFilter->den.coeff; i <= pFilter->den.degree; i++, pCoeff++) { *pCoeff = mathTryDiv (*pCoeff, normCoeff); if (gsl_isinf(*pCoeff)) { return ERANGE; } /* if */ } /* for */ for (i = 0, pCoeff = pFilter->num.coeff; i <= pFilter->num.degree; i++, pCoeff++) { *pCoeff = mathTryDiv (*pCoeff, normCoeff); if (gsl_isinf(*pCoeff)) { return ERANGE; } /* if */ } /* for */ return filterCheck (pFilter); } /* normFilterCoeffs() */ /* FUNCTION *******************************************************************/ /** Normalizes the magnitude of a filter. The function trys to normalize the * transfer ratio (filter magnitude) at a given frequency. To perform that, it * first modifies the denominator coefficients such that \f$den_0=1\f$ is * ensured. At the second step it re-calculates the numerator coefficients in * a way, that the magnitude response at the reference frequency is unity (1). * * \param pFilter Pointer to filter. * \param f Frequency (normalization point). * \param refgain Reference transfer ratio \f$H(2\pi f)\f$. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int normFilterMagnitude (FLTCOEFF *pFilter, double f, double refgain) { double magnitude; int i, err = normFilterCoeffs (pFilter); if (FLTERR_CRITICAL (err)) { return err; } /* if */ magnitude = filterResponseMagnitude (f, pFilter); if (gsl_isinf(magnitude)) /* magnitude singularity? */ { return ERANGE; } /* if */ magnitude = mathTryDiv(refgain, magnitude); if (gsl_isinf(magnitude)) { return (ERANGE); } /* if */ for (i = 0; i <= pFilter->num.degree; i++) /* scale all numerator coeffs */ { pFilter->num.coeff[i] *= magnitude; } /* for */ return filterCheck(pFilter); } /* normFilterMagnitude() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/stdIirFilter.c0000644000175100001440000012320113707632267013660 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter coefficients generator. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathFuncs.h" /* HYPOT(), POW10() */ #include "mathMisc.h" /* mathTryDiv(), mathDoubleSwap() */ #include "stdIirFilter.h" #include "filterSupport.h" #include /* roots solver functions */ #include /* all special functions */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /** Maximum number of iterations for finding \e Bessel lowpass cut-off frequency. */ #define STDIIR_BESSEL_MAXITER 1000 /** Maximum relative error \f$\varepsilon\f$ while finding \e Bessel lowpass cutoff frequency. The value is used to check the current range [a,b] wrt. to \f$|a-b|<\varepsilon \min(|a|,|b|)\f$. */ #define STDIIR_BESSEL_EPSREL 1.0E-9 /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* MACRO **********************************************************************/ /** Error code check and conditional return. The macro checks for an error code * unequal to zero in \p cond. On that condition it calls filterFree(), then * returns. * * \param pFilter Pointer to filter. * \param cond Condition to be checked (e.g. may be a function call). * \param string Text (string), which describes the error/cause. * ******************************************************************************/ #define STDIIR_ERROR_RET(pFilter, cond, string) \ ERROR_RET_IF(cond, string, filterFree (pFilter); gsl_set_error_handler (oldHandler)) /* LOCAL FUNCTION DECLARATIONS ************************************************/ static double bilinearInv (double fz, double f0); static double drosselung(double att); static int ftrHighpass(FLTCOEFF *pFilter, double omega); static int ftrBandpass(FLTCOEFF *pFilter, double omega, double quality); static double evalPolyAbsLaplace(double omega, MATHPOLY *poly); static double magnitudeLaplace(double omega, FLTCOEFF *pFilter); static double cutoffMagnitude(double omega, void *pFilter); static double approxButterworth (FLTCOEFF *pFilter); static double approxChebyPassband (double maxAtt, FLTCOEFF *pFilter); static double approxChebyStopband (double minAtt, FLTCOEFF *pFilter); static double approxCauer (STDIIR_TYPE type, double angle, double dr, FLTCOEFF *pFilter); static double approxBessel (FLTCOEFF *pFilter); /* LOCAL FUNCTION DEFINITIONS *************************************************/ #ifdef DEBUG /* FUNCTION *******************************************************************/ /** Logs filter coefficients. * * \param pFilter Representation of system in \e Laplace domain. * ******************************************************************************/ static void debugLogCoeffs (FLTCOEFF *pFilter) { DEBUG_LOG ("L-domain numerator coefficients"); mathPolyDebugLog (&pFilter->num); DEBUG_LOG ("L-domain denominator coefficients"); mathPolyDebugLog (&pFilter->den); } /* debugLogCoeffs() */ #endif /* FUNCTION *******************************************************************/ /** Backward bilinear (frequency) transformation. * The function transforms a frequency \f$f_z\f$ from Z domain into \e Laplace * domain (\f$f_l\f$) using bilinear transformation: * \f[ f_l(s)=\frac{f_0}{\pi}\cdot\frac{\sin(2\pi f_z/f_0)}{1+\cos(2\pi f_z/f_0)} \f] * That calculation is based on: \f[ s=2 f_0\frac{z-1}{z+1}=2 f_0\frac{\exp(s/f_0) - 1}{\exp(s/f_0) + 1} \f] * * \param fz Frequency in Z domain. * \param f0 Sampling frequency. * * \return Frequency in \e Laplace domain. ******************************************************************************/ static double bilinearInv(double fz, double f0) { fz = 2.0 * M_PI * fz / f0; return f0 * M_1_PI * sin(fz) / (1.0 + cos(fz)); } /* bilinearInv() */ /* FUNCTION *******************************************************************/ /** Calculates discrimination (in German \e Drosselung) from attenuation. The * calculation is based on \f$10^{A / 10} - 1\f$, which is the reverse of: \f[ A(\omega)=-20\log H(\omega)=10\log[1+D^2(\omega)] \f] * * \param att Attenuation \f$A\f$. * * \return Discrimination. ******************************************************************************/ static double drosselung(double att) { return sqrt (POW10 (0.1 * att) - 1.0); } /* drosselung() */ /* FUNCTION *******************************************************************/ /** \e Laplace domain highpass transformation. The function transforms * lowpass coefficients into a highpass by substitution: \f[ s:=\frac{\omega_c^2}{s} \f] * and corrects the numerator filter degree. * * \param pFilter Representation of system in \e Laplace domain. * \param omega Angular frequency of mirror point \f$\omega_c\f$, * the denormalized lowpass cut-off frequency. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ static int ftrHighpass (FLTCOEFF *pFilter, double omega) { int deg = pFilter->den.degree - pFilter->num.degree; /* degree difference */ ASSERT(deg >= 0); omega *= omega; ERROR_RET_IF (mathPolyTransform (&pFilter->den, 0, 0.0, omega, 1, 1.0, 0.0), "Highpass transformation (denominator)"); ERROR_RET_IF (mathPolyTransform (&pFilter->num, 0, 0.0, omega, 1, 1.0, 0.0), "Highpass transformation (numerator)"); mathPolyMulBinomial (&pFilter->num, deg, 1.0, 0); /* correction */ return 0; } /* ftrHighpass() */ /* FUNCTION *******************************************************************/ /** \e Laplace domain bandpass transformation. The function transforms * denormalized lowpass coefficients into a bandpass: \f{eqnarray*} s &:=& Q\left(s+\frac{\omega_m^2}{s}\right) \\ s &:=& Q\frac{s^2+\omega_m^2}{s} \f} * with \f{eqnarray*} \omega_m^2 &=& \omega_{c_1}\omega_{c_2} \\ Q &=& \frac{\omega_m}{\omega_{c_2} - \omega_{c_1}} \f} * and corrects the numerator filter degree. * * \param pFilter Representation of system in \e Laplace domain. * \param omega Denormalized angular center (mid) frequency \f$\omega_m\f$. * \param quality Bandpass quality \f$Q\f$. * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ static int ftrBandpass (FLTCOEFF *pFilter, double omega, double quality) { int deg = pFilter->den.degree - pFilter->num.degree; /* degree difference */ ASSERT (deg >= 0); ERROR_RET_IF (mathPolyTransform (&pFilter->den, 2, quality, omega * omega * quality, 1, 1.0, 0.0), "Bandpass transformation (denominator)"); ERROR_RET_IF (mathPolyTransform (&pFilter->num, 2, quality, omega * omega * quality, 1, 1.0, 0.0), "Bandpass transformation (numerator)"); /* Compensate the pre-factor z^{n-m} generated by function mathPolyTransform(), means correct the number of zeros. */ mathPolyMulBinomial (&pFilter->num, deg, 1.0, 0); return 0; } /* ftrBandpass() */ /* FUNCTION *******************************************************************/ /** Evaluates absolute magnitude associated with a polynomial in \e Laplace * domain. The function returns the absolute value of polynomial \f$P(s)\f$ * for \f$s\Rightarrow j\omega\f$: \f{eqnarray*} P(s) &=& a_0+a_1 j\omega+a_2 (j\omega)^2+\cdots a_n (j\omega)^n \\ &=& (\cdots(a_n j\omega + a_{n-1}) j\omega + a_{n-2}) j\omega +\cdots+a_0 \f} * * \param omega Angular frequency in rad/s. * \param poly Pointer to polynomial coefficients in \e Laplace domain. * * \return Absolut value in \e Laplace domain. ******************************************************************************/ static double evalPolyAbsLaplace(double omega, MATHPOLY *poly) { gsl_complex result; int i = poly->degree; double *pCoeff = &poly->coeff[i]; GSL_SET_COMPLEX(&result, 0.0, 0.0); while (i >= 0) { result = gsl_complex_add_real (gsl_complex_mul_imag (result, omega), *pCoeff); --i; --pCoeff; } /* for */ return gsl_complex_abs(result); } /* evalPolyAbsLaplace() */ /* FUNCTION *******************************************************************/ /** \e Laplace domain magnitude evaluation of a LTI-system by their * coefficients. * * \param omega Angular frequency in rad/s. * \param pFilter Representation of system in \e Laplace domain. * * \return Magnitude value when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double magnitudeLaplace (double omega, FLTCOEFF *pFilter) { return mathTryDiv(evalPolyAbsLaplace(omega, &pFilter->num), evalPolyAbsLaplace(omega, &pFilter->den)); } /* magnitudeLaplace() */ /* FUNCTION *******************************************************************/ /** GSL wrapper/callback function for 3dB angular cut-off frequency finding in * \e Laplace domain. * * \param omega Current angular frequency in rad/s. * \param pFilter Representation of LTI system in \e Laplace domain (FLTCOEFF *). * * \return Magnitude - \f$1/\sqrt{2}\f$value when successful * evaluated, else GSL_POSINF or GSL_NEGINF. Normally GSL * stops root finding under the condition INF is returned * by this function. ******************************************************************************/ static double cutoffMagnitude (double omega, void *pFilter) { double magnitude = magnitudeLaplace (omega, (FLTCOEFF *)pFilter); if (gsl_isinf (magnitude)) { return magnitude; /* stop iteration immediately */ } /* if */ return magnitude - M_SQRT1_2; } /* cutoffMagnitude() */ /* FUNCTION *******************************************************************/ /** Normalized \e Butterworth lowpass approximation. The function calculates * poles and zeros of a \e Butterworth lowpass in \e Laplace domain with * angular cut-off frequency \f$\omega=1\f$. \f[ H(\omega)=\frac{1}{\sqrt{1+\omega^{2 n}}} \f] * * \param pFilter Pointer to L-domain filter coefficients/roots. Notice * that \p pFilter->den.degree defines the filter degree. * * \return Normalized angular cut-off frequency \f$\omega_c\f$. * In case of an error the value 0.0 will be returned (and * \a errno set). ******************************************************************************/ static double approxButterworth (FLTCOEFF *pFilter) { int i; gsl_complex *pRoots; /* roots pointer */ double deltaPi = M_PI_2 / pFilter->den.degree; pFilter->num.degree = 0; /* set numerator degree */ pFilter->factor = 1.0; for (i = 0, pRoots = pFilter->den.root; i < pFilter->den.degree; i++, pRoots++) { /* circle of roots */ GSL_SET_COMPLEX (pRoots, -sin((2 * i + 1) * deltaPi), -cos((2 * i + 1) * deltaPi)); } /* for */ return 1.0; } /* approxButterworth() */ /* FUNCTION *******************************************************************/ /** \e Chebyshev passband approximation. Best approximation of characteristic * function by \e Chebyshev polynomials of first kind. \f{eqnarray*} H(\omega) &=& \frac{1}{\sqrt{1+\sigma^2 \chebyT_n^2(\omega)}} \\ \chebyT(\omega) &=& \cos(n\arccos\omega)\quad(\omega\leq 1) \\ \chebyT(\omega) &=& \cosh(n\arcosh\omega)\quad(\omega>1) \f} * * \param maxAtt Maximum passband (ripple) attenuation in dB. * \param pFilter Pointer to L-domain filter coefficients. Notice that * pFilter->den.degree defines the filter degree. * * \return Normalized 3dB angular cut-off frequency * \f$\omega_c=\cos(n^{-1}\arccos \sigma^{-1})\f$. * In case of an error the value 0.0 will be returned. ******************************************************************************/ static double approxChebyPassband (double maxAtt, FLTCOEFF *pFilter) { int i; gsl_complex *pRoots; /* roots pointer */ int degree = pFilter->den.degree; double deltaPi = M_PI_2 / degree; double sigmaInv = 1.0 / drosselung (maxAtt); /* 1/sigma > 1 */ double reFactor = - sinh (asinh (sigmaInv) / degree); double imFactor = cosh (asinh (sigmaInv) / degree); pFilter->num.degree = 0; /* set numerator degree */ pFilter->factor = sigmaInv * 2; for (i = 0, pRoots = pFilter->den.root; i < degree; i++, pRoots++) { GSL_SET_COMPLEX(pRoots, reFactor * sin ((2 * i + 1) * deltaPi), imFactor * cos ((2 * i + 1) * deltaPi)); /* Coefficient of highest degree power of Chebyshev polynomial is 2^{n - 1}. Because T(s)T(-s)=1/(1+sigma^2 T^2(s/j)) the inverse of 2^{n-1}*sigma must be multiplied with the linear factor representation of polynomial. */ pFilter->factor *= 0.5; } /* for */ return mathPolyChebyInv (degree, sigmaInv); /* 3dB cut-off frequency */ } /* approxChebyPassband() */ /* FUNCTION *******************************************************************/ /** \e Chebyshev stopband approximation (\e Chebyshev inverse lowpass). Best * approximation of inverse characteristic function by \e Chebyshev polynomials * of first kind. \f{eqnarray*} D(\omega) &=& \sigma\frac{\chebyT_n(\omega_s)}{\chebyT_n(\omega_s/\omega)} \\ H(\omega) &=& \frac{\chebyT_n(\omega_s/\omega)} {\sqrt{\chebyT_n^2(\omega_s/\omega)+\sigma^2\chebyT_n^2(\omega_s)}} \f} * Because the cut-off frequency is defined in this implementation to be always * the 3dB-point: \f$A_{max}=10\log(1+\sigma^2)=3dB\f$, the scaling factor * \f$\sigma\f$ must be 1. The stopband frequency \f$\omega_s\f$ then can be * evaluated by: \f[ \chebyT_n(\omega_s)=\sqrt{10^{A_{min}/10}-1} \f] * * \param minAtt Minimum stopband attenuation in dB. * \param pFilter Pointer to L-domain filter coefficients. Notice that * pFilter->den.degree defines the filter degree. * * \return Normalized 3dB angular cut-off frequency \f$\omega_c\f$, * which is 1 for this lowpass type. In case of an error * the value 0.0 will be returned. ******************************************************************************/ static double approxChebyStopband (double minAtt, FLTCOEFF *pFilter) { gsl_complex *pRoot, omega_s; double arg; int i; int degree = pFilter->den.degree; double deltaPi = M_PI_2 / degree; double maxAmpl = drosselung(minAtt); /* max. stopband magnitude T_n(omega_s) */ double reFactor = sinh(asinh(maxAmpl) / degree); double imFactor = cosh(asinh(maxAmpl) / degree); GSL_SET_COMPLEX (&omega_s, mathPolyChebyInv (degree, maxAmpl), 0.0); /* First calculate all denominator roots. */ for (i = 0, pRoot = pFilter->den.root; i < degree; i++, pRoot++) { arg = (2 * i + 1) * deltaPi; GSL_SET_COMPLEX (pRoot, -reFactor * sin(arg), imFactor * cos(arg)); *pRoot = gsl_complex_div (omega_s, *pRoot); } /* for */ /* Now determine the numerator roots (all located at imag. axis). But notice * that for odd degree one zero is located at infinity, means the numerator * degree is less than the denominator degree. Determination of the * pre-factor is a little bit tricky and requires analysis of numerator and * denominator polynomial for both cases: the odd and the even degree (also * of Chebyshev polynomials). */ if (GSL_IS_ODD (degree)) { pFilter->factor = degree-- * GSL_REAL (omega_s) / maxAmpl; } /* if */ else /* even degree */ { pFilter->factor = 1.0 / HYPOT (1.0, maxAmpl); } /* else */ for (i = 0; i < degree / 2; i++) { arg = GSL_REAL (omega_s) / cos ((2 * i + 1) * deltaPi); GSL_SET_COMPLEX (&pFilter->num.root[i], 0.0, arg); GSL_SET_COMPLEX (&pFilter->num.root[degree - 1 - i], 0.0, -arg); } /* for */ pFilter->num.degree = degree; return 1.0; } /* approxChebyStopband() */ /* FUNCTION *******************************************************************/ /** \e Cauer lowpass approximation based on first principal elliptic * transformation. The function calculates numerator and denominator * polynomial roots of \f$H(s)\f$ for \e Cauer type lowpass approximation. * This type of approximation deals with the characteristic functions: \f{eqnarray*} D(s) &=& \frac{k}{\lambda} M\,s \prod_{\eta=2,4,\ldots}^{n-1} \frac{\jsn^2(\eta K/n)+s^2}{\frac{1}{k^2 \jsn^2(\eta K/n)}+s^2} \quad (n=\textup{ungerade}) \\ D(s) &=& \frac{1}{\lambda} \prod_{\eta=1,3,\ldots}^{n-1} \frac{\jsn^2(\eta K/n)+s^2}{\frac{1}{k^2 \jsn^2(\eta K/n)}+s^2} \quad (n=\textup{gerade}) \f} * which are best approximations in \f$0<\omega<1\f$ and * \f$1/k<\omega<\infty\f$ respectively. Each characteristic function may be * written in fractional terms \f$D(s)=P(s)/Q(s)\f$ too: \f{eqnarray*} |H(s)|^2 &=& \frac{1}{1+\sigma^2 D(s)D(-s)} \\ H(s)H(-s) &=& \frac{Q(s)Q(-s)}{Q(s)Q(-s)+\sigma^2 P(s)P(-s)} \f} * If we take the special property of first principal elliptic transformation * into account, namely the \e Laplace variable always is used squared (except * one root at the origin in the odd case), which means \f$P(s)=\pm P(-s)\f$ * (neg. sign only for odd case) and \f$Q(s)=Q(-s)\f$, then: \f{eqnarray*} P(s)P(-s) &=& \pm P^2(s)\\ Q(s)Q(-s) &=& \hphantom{\pm} Q^2(s) \f} * With this in mind the substitution \f$s^2=x\f$ is possible and roots * finding can be performed in variable x domain. * * \param type Type of \e Cauer lowpass (STDIIR_TYPE_CAUER1, * STDIIR_TYPE_CAUER2). * \param angle Elliptic module angle \f$\phi,\;k=\sin\phi\f$. * \param dr Characteristic function value in dB (min. stopband * attenuation or ripple). * \param pFilter Pointer to \e Laplace domain filter coefficients/roots. * The member \p pFilter->den.degree defines the filter * degree. The \e Laplace domain roots representation will * be returned in \p pFilter->num.root, \p pFilter->den.root * and \p pFilter->factor. * * \return Normalized angular cut-off frequency, for which the * equation \f$H(\omega)=1/\sqrt{2}\f$ holds. * This type of approximation is described by: \f{eqnarray*} H(\omega) &=& \frac{1}{\sqrt{1+\sigma^2 \jsn^2(u/M;\lambda)}}\\ \omega &=& \jsn(u;k) \f} which in range \f$u=K+j \Im(u)=nM\Lambda+j \Im(u)\f$ can be evaluated as: \f{eqnarray*} H(\omega) &=& \frac{1}{\sqrt{1+\sigma^2 \jnd^2(\Im u/M;\lambda')}}\\ \omega &=& \jnd(\Im u;k') \f} Then \f$1\leq |D(\omega)|\leq 1/\lambda\f$ and \f$1\leq\omega_c\leq 1/k\f$ is true and the 3dB point condition is \f[ \jsn(u/M;\lambda') = \frac{1-\sigma^2}{1-\lambda^2} \f] * In case of an error the value 0.0 will be returned. * ******************************************************************************/ static double approxCauer (STDIIR_TYPE type, double angle, double dr, FLTCOEFF *pFilter) { int i; gsl_sf_result result; /* special GSL result structure (etmporary used) */ gsl_complex *pRootNumD; /* pointer to P(x) resp. P(s), with x=s^2 */ gsl_complex *pRootDenD; /* pointer to Q(x) resp. Q(s), with x=s^2 */ gsl_complex *pRootNumH; /* Pointer to numerator roots of H(s) */ MATHPOLY denPoly2; /* Q(x)^2, means squared denominator poly in x=s^2 */ double snOdd, snEven, cn, dn; /* Jacobian elliptic function results */ double deltaK; /* partial complete elliptic integral K(k) / n */ double sigma; /* scaling factor of characteristc function D(\omega) */ double *pZero; /* pointer to numerator root (zero) of polynomial*/ double factor; /* multiplier of characteristic function (\f$k/\lambda M\f$ */ /* in odd case, \f$1/\lambda\f$ for even degree) */ double multiplier = 1.0; /* multiplier M of transformation */ double lambda = 1.0; /* elliptic module of transformation */ /* The module k^2 corresponds to kappa from Cauers original book or m in Abramowitz/Stegun. */ double module = sin (angle / 180.0 * M_PI); double kappa = module * module; int degree = pFilter->den.degree; /* Allocate denominator polynomial of squared characteristic function D(s). */ denPoly2.degree = degree; if (mathPolyMalloc(&denPoly2) != 0) { return 0.0; /* out of memory space */ } /* if */ pFilter->num.degree = denPoly2.degree = (degree / 2) * 2; deltaK = gsl_sf_ellint_Kcomp (module, GSL_PREC_DOUBLE) / degree; /* Set start index for running variable during for-loop. For odd degree the running index must take 1,3,5,... and for even degree 2,4,6,.. The variable \a pZero ensures this, while \c i is counting from zero. */ pZero = GSL_IS_ODD (degree) ? &snEven : &snOdd; /* Now prepare for-loop */ pRootNumH = pFilter->num.root; /* zeros of H(s) */ pRootNumD = pFilter->den.root; /* P(x), means zeros of D^2(x) with x=s^2 */ pRootDenD = denPoly2.root; /* Q(x), means poles of D^2(x) */ for (i = 0; i < denPoly2.degree; i += 2) { if ((gsl_sf_elljac_e ((i + 1) * deltaK, kappa, &snOdd, &cn, &dn) != 0) || (gsl_sf_elljac_e ((i + 2) * deltaK, kappa, &snEven, &cn, &dn) != 0)) { /* EDOM */ DEBUG_LOG ("Jacobian elliptic function calculation has failed"); mathPolyFree(&denPoly2); return 0.0; } /* if */ /* Roots of numerator polynomial of transfer function are determined by denominator roots of characteristic function D(s). */ GSL_SET_COMPLEX(pRootNumH, 0.0, 1.0 / (module * *pZero)); GSL_SET_COMPLEX(pRootNumH + 1, 0.0, - GSL_IMAG(*pRootNumH)); snOdd *= snOdd; /* square to sn^2 */ snEven *= snEven; multiplier *= snOdd / snEven; /* update M's product */ lambda *= snOdd * snOdd; /* update \lambda product by sn^4 */ /* With x=s^2 the associated roots of D(s)D(-s) are located at * x = -sn^2(i K/n) respectively x = -1/(k sn(i K/n))^2 in x-domain. */ GSL_SET_COMPLEX(pRootNumD, - *pZero, 0.0); /* real root in x */ *(pRootNumD + 1) = *pRootNumD; /* double root of P(s)P(-s) in x */ GSL_SET_COMPLEX(pRootDenD, -1.0 / (*pZero * kappa), 0.0); *(pRootDenD + 1) = *pRootDenD; /* double root of Q(s)Q(-s) in x */ pRootNumH += 2; pRootNumD += 2; pRootDenD += 2; } /* for */ lambda *= gsl_pow_int (module, degree); /* multiply with k^n */ factor = 1.0 / lambda; /* final result for factor at even degree poly */ if (GSL_IS_ODD (degree)) /* odd case */ { GSL_SET_COMPLEX (pRootNumD, 0.0, 0.0); /* root of P(s)P(-s) at origin */ factor *= -module * multiplier; /* odd case factor = - k / \lambda M */ } /* if */ /* For the following checks notice: - the ripple of first principal elliptic transformation is +/-1; - \sigma provides the scaling wrt. the desired ripple or minimum stopband attenuation - the minimum stopband value is 1 / \lambda. */ switch (type) { case STDIIR_TYPE_CAUER1: /* design by ripple attenuation */ /* Check that the (resulting) min. stopband attenuation is greater than 3dB. Because the minimum value of D(omega) in stopband is 1/lambda, the minimum attenuation is 10log(1+sigma^2/lambda^2). */ sigma = dr; /* sigma = dr / 1.0 */ if (sigma < lambda * drosselung (STDIIR_STOPATT_MIN)) { DEBUG_LOG ("Resulting stopband attenuation is less than 3dB"); mathPolyFree (&denPoly2); return 0.0; /* min. stopband attenuation less than 3dB */ } /* if */ break; case STDIIR_TYPE_CAUER2: /* design by min. stopband attenuation */ /* Check that the (resulting) passband ripple 10log(1+sigma^2) is less than 3dB. Because the minimum value of D(omega) in stopband is 1/lambda, sigma is determined by 10log(1+sigma^2/lambda^2)=A_min. */ sigma = lambda * dr; /* scaling of approximation function */ if (sigma > drosselung (STDIIR_RIPPLE_MAX)) { DEBUG_LOG ("Resulting passband ripple is greater than 3dB"); mathPolyFree(&denPoly2); return 0.0; /* ripple greater than 3dB */ } /* if */ break; default: ASSERT(0); break; } /* switch */ /* Calculate denominator polynomial Q(x)^2 of squared transfer function * H(s)H(-s). */ factor *= sigma; /* factor now holds the product factor * sigma */ pFilter->factor = 1.0 / fabs (factor); /* set scaling factor of H(s) roots */ factor *= fabs (factor); /* square \sigma wrt. calculations of H(s)H(-s), */ /* but preserves the negative sign in the odd case */ if ((mathPolyRoots2Coeffs (&pFilter->den, factor) != 0) /* coeffs of \sigma^2 P(x)^2 */ || (mathPolyRoots2Coeffs (&denPoly2, 1.0) != 0)) /* coeffs of Q(x)^2 */ { DEBUG_LOG ("Denominator polynomial coefficients calculation of squared" " transfer function failed for Cauer filter"); mathPolyFree (&denPoly2); return 0.0; } /* if */ /* Calculate Q(s)Q(-s) + \sigma^2 P(s)P(-s) for x=s^2. */ mathPolyAdd (&pFilter->den, &denPoly2, 1.0); mathPolyFree(&denPoly2); /* no longer needed */ /* Now calculate the denominator roots (poles) of transfer function in x * domain. */ if (mathPolyCoeffs2Roots (&pFilter->den) != GSL_SUCCESS) { DEBUG_LOG ("Roots finding for Cauer filter has failed"); return 0.0; } /* if */ /* Because roots finding is performed on H(s)H(-s) in x=s^2, the roots in * \e Laplace domain are located at s = +/- \sqrt{x}. To define stabil LTI * systems make the real part of all roots negative. */ for (i = 0, pRootNumH = pFilter->den.root; i < degree; i++, pRootNumH++) { *pRootNumH = gsl_complex_negative (gsl_complex_sqrt (*pRootNumH)); } /* for */ /* Last calculate 3dB cut-off frequency (associated with nd(u/M; lambda')= 1/sigma, omega=nd(u;k')). So the condition is: sn^2(u/M;lambda') = (1 - sigma^2) / (1 - lambda^2) */ lambda = sqrt (1.0 - lambda * lambda); /* \lambda' */ sigma = asin (sqrt (1.0 - sigma * sigma) / lambda); /* argument to funcs */ if (lambda == 1) /* gsl_sf_ellint_F_e() cannot handle this */ { result.val = log (fabs (tan (sigma / 2 + M_PI_4))); } /* if */ else { if (gsl_sf_ellint_F_e (sigma, lambda, GSL_PREC_DOUBLE, &result) != GSL_SUCCESS) { /* may give EDOM if \lambda is near 1 */ return 0.0; } /* if */ } /* else */ if ((gsl_sf_elljac_e (multiplier * result.val, 1.0 - kappa, &snOdd, &cn, &dn) != GSL_SUCCESS)) { return 0.0; } /* if */ dn = mathTryDiv (1.0, dn); /* nd = 1/dn */ if (gsl_isinf (dn)) { return 0.0; } /* if */ return dn; } /* approxCauer() */ /* FUNCTION *******************************************************************/ /** \e Bessel group delay approximation. The \e Bessel type lowpass is * associated with the following transfer function: \f{eqnarray*} H(s) &=& \frac{b_0}{B_n(s)} \\ B_n(s) &=& (2 n - 1)B_{n-1}(s)+s^2 B_{n-2}(s) \\ B_0(s) &=& 1 \\ B_{-1}(s) &=& \frac{1}{s} \f} * * \param pFilter Pointer to \e Laplace domain filter coefficients. Notice * that \p pFilter->den.degree defines the filter degree. * The function returns only the polynomial (not roots) * representation of the \e Bessel lowpass. * * \return Normalized 3dB angular cut-off frequency \f$\omega_c\f$. * This value is calculated using \e Brent's algorithm. * In case of an error the value 0.0 will be returned. ******************************************************************************/ static double approxBessel (FLTCOEFF *pFilter) { int status; gsl_function cutoffFunc; gsl_root_fsolver *pSolverSpace; const gsl_root_fsolver_type *solverAlgo = gsl_root_fsolver_brent; int iter = 0; /* iteration counter */ double omega = 0.0; /* cut-off frequency */ double omega1 = 0.0; /* initial and current range value (lower) */ double omega2 = 10.0 * pFilter->den.degree; /* upper range value */ cutoffFunc.function = cutoffMagnitude; /* set function for which a root to be find */ cutoffFunc.params = pFilter; pFilter->num.degree = 0; if (mathPolyBessel (pFilter->den.degree, pFilter->den.coeff) == 0) { pFilter->num.coeff[0] = pFilter->den.coeff[0]; /* ensures H(0)=1 */ pSolverSpace = gsl_root_fsolver_alloc (solverAlgo); if (pSolverSpace != NULL) { gsl_root_fsolver_set (pSolverSpace, &cutoffFunc, omega1, omega2); do { iter++; status = gsl_root_fsolver_iterate (pSolverSpace); if (status == GSL_SUCCESS) /* next iteration succesful? */ { omega = gsl_root_fsolver_root (pSolverSpace); omega1 = gsl_root_fsolver_x_lower (pSolverSpace); omega2 = gsl_root_fsolver_x_upper (pSolverSpace); status = gsl_root_test_interval (omega1, omega2, 0, STDIIR_BESSEL_EPSREL); } /* if */ } /* do */ while ((status == GSL_CONTINUE) && (iter < STDIIR_BESSEL_MAXITER)); gsl_root_fsolver_free (pSolverSpace); if ((status == GSL_SUCCESS) && (iter < STDIIR_BESSEL_MAXITER)) { DEBUG_LOG ("Bessel cut-off finding finished (%d iterations), omega = %G", iter, omega); return omega; /* cut-off frequency found */ } /* if */ } /* if */ } /* if */ return 0.0; } /* approxBessel() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** * \brief Generates an IIR filter from standard approximations. * * \attention For bandpass/bandstop frequency transformation the * system order (degree) must be even. * \note The cutoff frequency is assumed to be the 3dB point * of magnitude response. * * \param pDesign Pointer to standard IIR design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials will be * allocated. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int stdIirFilterGen (STDIIR_DESIGN *pDesign, FLTCOEFF *pFilter) { int i, degree; gsl_error_handler_t *oldHandler; double fc; /* Real-world (design) 3dB cut-off frequency */ double normOmega; /* Effective (normalized) 3dB cut-off angular frequency */ double bpQuality; /* Q of BP or BS */ /* Memory allocation for coefficients and roots space in numerator and * denominator polynomial. */ pFilter->num.degree = pFilter->den.degree = pDesign->order; ERROR_RET_IF (filterMalloc(pFilter), "Standard IIR filter memory allocation"); /* All GSL errors are handled by the caller (starting from here), therefore * disable the abort behaviour of the GSL library. */ oldHandler = gsl_set_error_handler_off (); pFilter->factor = 0.0; /* no valid roots representation so far */ switch (pDesign->ftr.type) /* frequency transformation */ { case FTR_BANDPASS: case FTR_BANDSTOP: { double f1, f2; ASSERT(GSL_IS_EVEN(pDesign->order)); pFilter->den.degree /= 2; /* design lowpass with half degree */ /* If center frequency \f$f_c\f$ is geometric, the bandwidth \f$B\f$ may exceed half of center frequency, because \f$f_c^2 = f_1^2 * f_2^2\f$ and \f$f_1 = sqrt{(B/2)^2 + f_c^2} - B/2\f$ and \f$f_2 = sqrt{(B/2)^2 + f_c^2} + B/2, means the virtual linear center frequency is sqrt{(B/2)^2 + f_c^2}. * But when linear, the expression \f$f_c = 1/2 (f_1 + f_2)\f$ is valid, and this means \f$B = f_2 - f_1\f$. */ if (pDesign->ftr.flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC) { fc = HYPOT (pDesign->ftr.fc, 0.5 * pDesign->ftr.bw); } /* if */ else { fc = pDesign->ftr.fc; } /* else */ pDesign->cutoff = fc; /* lowpass cutoff (return value) */ f1 = bilinearInv (fc - 0.5 * pDesign->ftr.bw, pFilter->f0); STDIIR_ERROR_RET (pFilter, (f1 <= FLT_SAMPLE_MIN / 2) ? GSL_EFAILED : 0, "Bandwidth vs. cutoff frequency mismatch"); f2 = bilinearInv (fc + 0.5 * pDesign->ftr.bw, pFilter->f0); fc = sqrt (f1 * f2); /* geometric center frequency */ bpQuality = fc / (f1 - f2); /* quality = fc/B */ break; } /* FTR_BANDPASS, FTR_BANDSTOP */ case FTR_HIGHPASS : pDesign->cutoff = pDesign->ftr.fc; /* return value */ fc = bilinearInv (pDesign->ftr.fc, pFilter->f0); break; /* FTR_HIGHPASS */ case FTR_NON: /* LOWPASS */ fc = bilinearInv(pDesign->cutoff, pFilter->f0); break; /* FTR_NON */ default: ASSERT(0); } /* switch */ /* Now perform the desired approximation. */ switch (pDesign->type) /* which type of lowpass? */ { case STDIIR_TYPE_BUTTERWORTH: /* flat magnitude response filters */ normOmega = approxButterworth (pFilter); break; case STDIIR_TYPE_CHEBY: /* best approximation (in passband) ripple filter */ normOmega = approxChebyPassband (pDesign->ripple, pFilter); break; case STDIIR_TYPE_CHEBYINV: normOmega = approxChebyStopband (pDesign->minatt, pFilter); break; case STDIIR_TYPE_CAUER1: /* input is max. ripple att. and module angle */ normOmega = approxCauer (STDIIR_TYPE_CAUER1, pDesign->angle, drosselung(pDesign->ripple), pFilter); break; case STDIIR_TYPE_CAUER2: /* input is min. stopband att. and module angle */ normOmega = approxCauer (STDIIR_TYPE_CAUER2, pDesign->angle, drosselung(pDesign->minatt), pFilter); break; case STDIIR_TYPE_BESSEL : normOmega = approxBessel (pFilter); break; default: ASSERT(0); } /* switch */ STDIIR_ERROR_RET (pFilter, (normOmega == 0.0) ? GSL_EFAILED : 0, "Standard IIR filter approximation has failed"); if (pFilter->factor != 0.0) /* lowpass specification by roots? */ { /* transform into coefficients */ STDIIR_ERROR_RET (pFilter, mathPolyRoots2Coeffs (&pFilter->den, 1.0), "Conversion of poles into coefficients has failed"); STDIIR_ERROR_RET (pFilter, mathPolyRoots2Coeffs (&pFilter->num, pFilter->factor), "Conversion of zeros into coefficients has failed"); } /* if */ pFilter->factor = 0.0; /* roots are valid only in L-domain */ switch (pDesign->ftr.type) { case FTR_HIGHPASS: /* lowpass->highpass transformation */ STDIIR_ERROR_RET (pFilter, ftrHighpass (pFilter, normOmega), "Lowpass->Highpass transformation"); break; case FTR_BANDSTOP: STDIIR_ERROR_RET (pFilter, ftrHighpass (pFilter, normOmega), "Lowpass->Bandstop transformation"); /* fall trough */ case FTR_BANDPASS: /* LP->BP transformation */ STDIIR_ERROR_RET (pFilter, ftrBandpass (pFilter, normOmega, bpQuality), "Lowpass->Bandpass transformation"); break; /* FTR_BANDPASS, FTR_BANDSTOP */ case FTR_NON: break; default: ASSERT(0); break; } /* switch */ /* Scale standard approximation interval to normOmega / fc and multiply with f0, which is the pre-factor of bilinear transformation. */ normOmega = normOmega * pFilter->f0 / fc / M_PI; /* Denominator polynomial degree is greater/equal numerator polynomial * degree for standard approximations. Compensate later the pre-factor * (1+z)^{n-m} inserted by function mathPolyTransform(). */ degree = pFilter->den.degree - pFilter->num.degree; ASSERT (degree >= 0); STDIIR_ERROR_RET (pFilter, mathPolyTransform (&pFilter->den, 1, normOmega, -normOmega, 1, 1.0, 1.0), "Bilinear transformation and denormalization (denominator)"); STDIIR_ERROR_RET (pFilter, mathPolyTransform (&pFilter->num, 1, normOmega, -normOmega, 1, 1.0, 1.0), "Bilinear transformation and denormalization (numerator)"); for (i = 0; i < degree; i++) { mathPolyMulBinomial (&pFilter->num, 1, 1.0, 1.0); } /* for */ for (i = 0; i <= pFilter->num.degree / 2; i++) /* re-sort wrt. z^-1 */ { mathDoubleSwap (&pFilter->num.coeff[i], &pFilter->num.coeff[pFilter->num.degree - i]); mathDoubleSwap (&pFilter->den.coeff[i], &pFilter->den.coeff[pFilter->den.degree - i]); } /* for */ i = normFilterCoeffs (pFilter); if (FLTERR_CRITICAL (i)) { filterFree (pFilter); } /* if */ gsl_set_error_handler (oldHandler); return i; } /* stdIirFilterGen() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/filterResponse.c0000664000175100001440000005165513710317646014272 00000000000000/******************************************************************************/ /** * \file filterResponse.c * \brief Filter response functions. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathMisc.h" #include "filterResponse.h" #include /* memset() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define FLTRESP_TIME_SAMPLES_LIMIT 2048 /**< Maximum number of samples */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* MACRO **********************************************************************/ /** Increments a pointer on a circular buffer (for time responses). * * \param ptr Pointer to current value. * \param buf Buffer from type of *ptr. * \param degree Size of buffer expressed by polynomial degree. * ******************************************************************************/ #define FLTRESP_INC(ptr, buf, degree) \ if ((ptr) >= (buf) + (degree)) (ptr) = (buf); \ else ++(ptr); /* MACRO **********************************************************************/ /** Decrements a pointer on a circular buffer (for time responses). * * \param ptr Pointer to current value. * \param buf Buffer from type of *ptr. * \param degree Size of buffer expressed by polynomial degree. * ******************************************************************************/ #define FLTRESP_DEC(ptr, buf, degree) \ if ((ptr) <= (buf)) (ptr) = (buf) + (degree); \ else --(ptr); /* LOCAL FUNCTION DECLARATIONS ************************************************/ static gsl_complex evalPolyZ(double omega, const MATHPOLY *poly); static double evalPolyAngleZ(double omega, const MATHPOLY *poly); static double evalPolyGroupZ(double omega, const MATHPOLY *poly); static double timeResponseGetNext (double time, FLTSIGNAL sig); static double timeResponseProcNext (FLTRESP_TIME_WORKSPACE *pWorkspace); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Evaluates complex magnitude associated with a polynomial in \e Z domain. * The function returns the complex magnitude of the numerator or denominator * polynomial of a time-discrete system at the circular frequency * \f$\omega=2\pi f/f_0\f$. The calculation is performed by the following * algorithm: \f{eqnarray*} H(z) &=& a_0+a_1 z^{-1}+a_2 z^{-2}+\cdots a_n z^{-n} \\ &=& (\cdots((a_n z^{-1}+a_{n-1}) z^{-1}+a_{n-2})z^{-1}+\cdots+a_0 \f} * with \f$z^{-1}=\exp(-j\omega)\f$. * * \param omega Angular frequency in rad/s. * \param poly Pointer to polynomial coefficients in \e Z domain. * * \return ******************************************************************************/ static gsl_complex evalPolyZ(double omega, const MATHPOLY *poly) { gsl_complex result; double *pCoeff; int i = poly->degree; double reOld = 0.0; /* real part of last value in iteration */ double sinOmega = sin(omega); double cosOmega = cos(omega); GSL_SET_COMPLEX(&result, 0.0, 0.0); for (pCoeff = &poly->coeff[poly->degree]; i >= 0; i--, pCoeff--) { GSL_SET_COMPLEX(&result, reOld * cosOmega + GSL_IMAG(result) * sinOmega + *pCoeff, GSL_IMAG(result) * cosOmega - reOld * sinOmega); reOld = GSL_REAL(result); } /* for */ return result; } /* evalPolyZ() */ /* FUNCTION *******************************************************************/ /** Evaluates the angle (in rad) associated with a polynomial in \e Z domain. * The function returns the angle of the following complex polynomial: \f[ H(z)=a_0+a_1 z^{-1}+a_2 z^{-2}+\cdots a_n z^{-n} \f] * with \f$z^{-1}=\exp(-j\omega)\f$ at circular frequency * \f$\omega=2\pi f/f_0\f$, given in rad/s. * * \param omega Frequency ratio \f$2\pi f/f_0\f$. * \param poly Pointer to polynomial coefficients in \e Z domain. * * \return Angle \f$\phi\in[-\pi,+\pi]\f$ on success, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double evalPolyAngleZ(double omega, const MATHPOLY *poly) { return gsl_complex_arg (evalPolyZ(omega, poly)); } /* evalPolyAngleZ() */ /* FUNCTION *******************************************************************/ /** Evaluates the group delay (in sec) associated with a polynomial in \e Z * domain. The function returns the group delay of the following complex * polynomial: \f[ H(z)=a_0+a_1 z^{-1}+a_2 z^{-2}+\cdots a_n z^{-n} \f] * with \f$z^{-1}=\exp(-j\omega)\f$ at circular frequency * \f$\omega=2\pi f/f_0\f$, given in rad/s. * * The group delay \f$T_g\f$ is calculated from phase \f$B(\omega)\f$ and * magnitude \f$H(\omega)\f$ by: \f[ T_g(\omega)=\frac{\imop'[B(\omega)]\reop[B(\omega)]-\reop'[B(\omega)]\imop[B(\omega)]}{H^2(\omega)} \f] * * \param omega Frequency ratio \f$2\pi f/f_0\f$. * \param poly Pointer to polynomial coefficients in \e Z domain. * * \return Angle \f$\phi\in[-\pi,+\pi]\f$ on success, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double evalPolyGroupZ(double omega, const MATHPOLY *poly) { int i; double cosOmega, sinOmega; double *pCoeff; double rpart = 0.0, ipart = 0.0; double rdiff = 0.0, idiff = 0.0; for (i = 0, pCoeff = poly->coeff; i <= poly->degree; i++, pCoeff++) { cosOmega = cos(i * omega); sinOmega = sin(i * omega); rpart += *pCoeff * cosOmega; ipart += *pCoeff * sinOmega; rdiff += *pCoeff * i * sinOmega; idiff += *pCoeff * i * cosOmega; } /* for */ return mathTryDiv (rpart * idiff + ipart * rdiff, rpart * rpart + ipart * ipart); } /* evalPolyGroupZ() */ /* FUNCTION *******************************************************************/ /** Returns the next input sample for a time response. * * \param xtime Time in seconds. * \param sig The signal for which the next sample shall be returned. * * \return Sample value associated with passed signal and time. ******************************************************************************/ static double timeResponseGetNext (double xtime, FLTSIGNAL sig) { switch (sig) { case FLTSIGNAL_HEAVISIDE: return 1.0; case FLTSIGNAL_DIRAC: return (xtime == 0.0) ? 1.0 : 0.0; case FLTSIGNAL_USER: default: ASSERT (0); } /* switch */ return 0.0; } /* timeResponseGetNext() */ /* FUNCTION *******************************************************************/ /** Processes the next input value on a time response. * * \param pWorkspace Pointer to time response workspace, formerly created * by filterResponseTimeNew(). * * \return The currently calculated output sample value. If that * value is GSL_POSINF or GSL_NEGINF further calls to * function timeResponseProcNext() shall not occur. * Check this situation for example by the help of * function gsl_isinf() or gsl_finite(). ******************************************************************************/ static double timeResponseProcNext (FLTRESP_TIME_WORKSPACE *pWorkspace) { int i; double *p; /* pointer to in/out samples */ const MATHPOLY *poly; double osample = 0.0; /* output sample */ double isample = timeResponseGetNext (pWorkspace->curTime, pWorkspace->sig); *pWorkspace->pCurIn = isample; /* put new value into input buffer */ p = pWorkspace->pCurIn; /* hold pointer to it */ poly = &pWorkspace->pFilter->num; /* for faster access */ FLTRESP_DEC(pWorkspace->pCurIn, pWorkspace->pInBuf, poly->degree); for (i = 0; i <= poly->degree; i++) { osample += *p * poly->coeff[i]; FLTRESP_INC(p, pWorkspace->pInBuf, poly->degree); } /* for */ p = pWorkspace->pLastOut; poly = &pWorkspace->pFilter->den; /* for faster access */ for (i = 1; i <= poly->degree; i++) { osample -= *p * poly->coeff[i]; FLTRESP_INC(p, pWorkspace->pOutBuf, poly->degree); } /* for */ osample = mathTryDiv (osample, poly->coeff[0]); FLTRESP_DEC(pWorkspace->pLastOut, pWorkspace->pOutBuf, poly->degree); *pWorkspace->pLastOut = osample; return osample; } /* timeResponseProcNext() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Evaluates absolute magnitude associated with a polynomial in \e Z domain. * The function returns the absolute value of the following polynomial: \f[ H(z)=a_0+a_1 z^{-1}+a_2 z^{-2}+\cdots a_n z^{-n} \f] * with \f$z^{-1}=\exp(-j\omega)\f$ at circular frequency * \f$\omega=2\pi f/f_0\f$, given in rad/s. * * \param omega Frequency ratio \f$2\pi f/f_0\f$. * \param poly Pointer to polynomial coefficients in \e Z domain. * * \return Magnitude value associated with the polynomial when * evaluated successful, else GSL_POSINF or GSL_NEGINF. * Use the functions gsl_isinf() or gsl_finite() for * result checking. ******************************************************************************/ double filterResponsePoly (double omega, const MATHPOLY *poly) { return gsl_complex_abs (evalPolyZ(omega, poly)); } /* filterResponsePoly() */ /* FUNCTION *******************************************************************/ /** Computes the magnitude of a time-discrete system at a given frequency in * \e Z domain. * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Magnitude value when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseMagnitude (double f, const FLTCOEFF* pFilter) { double omega = 2.0 * M_PI * f / pFilter->f0; return mathTryDiv (filterResponsePoly (omega, &pFilter->num), filterResponsePoly (omega, &pFilter->den)); } /* filterResponseMagnitude() */ /* FUNCTION *******************************************************************/ /** Computes the attenuation of a time-discrete system at a given frequency in * \e Z domain. \f[ A(f)=-20\log[H(f)] \f] * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Magnitude value when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseAttenuation (double f, FLTCOEFF* pFilter) { double magnitude = filterResponseMagnitude (f, pFilter); if (gsl_finite (magnitude)) { return -20.0 * log10 (magnitude); } /* if */ return magnitude; } /* filterResponseAttenuation() */ /* FUNCTION *******************************************************************/ /** Computes the phase of a time-discrete system at a given frequency in * \e Z domain. * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Phase in rad when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponsePhase (double f, FLTCOEFF* pFilter) { double omega = 2.0 * M_PI * f / pFilter->f0; double angle_num = evalPolyAngleZ(omega, &pFilter->num); double angle_den = evalPolyAngleZ(omega, &pFilter->den); if (gsl_finite (angle_num) && gsl_finite (angle_den)) { return (angle_den - angle_num); } /* if */ return GSL_POSINF; } /* filterResponsePhase() */ /* FUNCTION *******************************************************************/ /** Computes the phase delay \f$B(\omega)/\omega\f$ of a time-discrete system * at a given frequency in \e Z domain. * * \param f Frequency point in Hz (with \f$\omega=2\pi f\f$). * \param pFilter Representation of time-discrete system. * * \return Phase delay in rad s. ******************************************************************************/ double filterResponsePhaseDelay (double f, FLTCOEFF* pFilter) { double result = filterResponsePhase (f, pFilter); if (gsl_finite (result)) { result = mathTryDiv (result, 2.0 * M_PI * f); } /* if */ return result; } /* filterResponsePhaseDelay() */ /* FUNCTION *******************************************************************/ /** Computes the group delay \f$\textup{d}B(\omega)/\textup{d}\omega\f$ of a * time-discrete system at a given frequency in \e Z domain. * * \param f Frequency point in Hz (with \f$\omega=2\pi f\f$). * \param pFilter Representation of time-discrete system. * * \return Group delay in sec. ******************************************************************************/ double filterResponseGroupDelay (double f, FLTCOEFF* pFilter) { double omega = 2.0 * M_PI * f / pFilter->f0; double tg1 = evalPolyGroupZ(omega, &pFilter->num); /* numerator */ double tg2 = evalPolyGroupZ(omega, &pFilter->den); /* denominator */ if (gsl_finite (tg1) && gsl_finite (tg2)) { return (tg1 - tg2) / pFilter->f0; } /* if */ return GSL_POSINF; } /* filterResponseGroupDelay() */ /* FUNCTION *******************************************************************/ /** Computes the characteristic function \f$D(f)\f$ of a time-discrete system * in \e Z domain. \f{eqnarray*} H^2(f) &=& \frac{1}{1+D^2(f)} \\ D(f) &=& \sqrt{\frac{1}{H^2(f)}-1} \f} * * \param f Frequency point in Hz. * \param pFilter Representation of time-discrete system. * * \return Characteristic function value on success, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double filterResponseChar (double f, FLTCOEFF* pFilter) { double result; double magnitude = filterResponseMagnitude (f, pFilter); if (gsl_finite (magnitude)) { result = mathTryDiv(1.0, magnitude * magnitude); if (gsl_finite (result)) { result = result - 1.0; if (result >= 0.0) { return sqrt (result); } /* if */ } /* if */ } /* if */ return GSL_POSINF; } /* filterResponseChar() */ /* FUNCTION *******************************************************************/ /** This function creates an workspace for time response calculation. * * \param start Time to start (must be positive). * \param stop Time to stop (must be positive). * \param type Signal type. * \param pFilter Pointer to filter coefficients. * * \return Pointer to an workspace for time response calculation * via function filterResponseTimeNext(). All public * members are up to data after return (never use privates). * On error (includes the case of too much samples in * range) NULL is returned. * \todo Allow user break ******************************************************************************/ FLTRESP_TIME_WORKSPACE* filterResponseTimeNew (double start, double stop, FLTSIGNAL type, const FLTCOEFF* pFilter) { FLTRESP_TIME_WORKSPACE *pWorkspace; double xtime, t0; if ((start * pFilter->f0 > FLTRESP_TIME_SAMPLES_LIMIT) || ((stop - start) * pFilter->f0 > FLTRESP_TIME_SAMPLES_LIMIT)) { DEBUG_LOG ("Too many samples for time response calculation (%G, %G)", start * pFilter->f0, (stop - start) * pFilter->f0); return NULL; } /* if */ pWorkspace = g_malloc (sizeof (FLTRESP_TIME_WORKSPACE)); if (pWorkspace == NULL) { return NULL; } /* if */ pWorkspace->pInBuf = g_malloc ((1 + pFilter->num.degree) * sizeof(pFilter->num.coeff[0])); if (pWorkspace->pInBuf == NULL) { g_free (pWorkspace); return NULL; } /* if */ pWorkspace->pOutBuf = g_malloc ((1 + pFilter->den.degree) * sizeof(pFilter->den.coeff[0])); if (pWorkspace->pOutBuf == NULL) { g_free (pWorkspace->pInBuf); g_free (pWorkspace); return NULL; } /* if */ pWorkspace->pLastOut = pWorkspace->pOutBuf; pWorkspace->pCurIn = pWorkspace->pInBuf; pWorkspace->sig = type; /* set passed signal type */ pWorkspace->pFilter = pFilter; memset (pWorkspace->pInBuf, 0, (1 + pFilter->num.degree) * sizeof(pFilter->num.coeff[0])); memset (pWorkspace->pOutBuf, 0, (1 + pFilter->den.degree) * sizeof(pFilter->den.coeff[0])); pWorkspace->curTime = 0.0; t0 = 1.0 / pFilter->f0; while (pWorkspace->curTime < start) /* process all samples up to start */ { timeResponseProcNext (pWorkspace); pWorkspace->curTime += t0; } /* while */ xtime = pWorkspace->curTime; /* hold current time as start value */ pWorkspace->samples = 0; while (xtime <= stop) /* count number of samples up to the end */ { ++pWorkspace->samples; xtime += t0; } /* while */ return pWorkspace; } /* filterResponseTimeNew() */ /* FUNCTION *******************************************************************/ /** Returns the next output sample for a time response. * * \param pWorkspace Pointer to time response workspace, formerly created * by filterResponseTimeNew(). * \param pTime Pointer to a variable which gets the next time value. * * \return Next output sample value on success, else GSL_POSINF * or GSL_NEGINF. Use the functions gsl_isinf() or * gsl_finite() for result checking. Avoid calling * this function again under the mentioned error condition. ******************************************************************************/ double filterResponseTimeNext (FLTRESP_TIME_WORKSPACE *pWorkspace, double *pTime) { double sample; *pTime = pWorkspace->curTime; /* give current sample time to caller */ sample = timeResponseProcNext (pWorkspace); pWorkspace->curTime += 1.0 / pWorkspace->pFilter->f0; return sample; } /* filterResponseTimeNext() */ /* FUNCTION *******************************************************************/ /** Free's a time response workspace. * * \param pWorkspace Pointer to time response workspace, formerly created * by filterResponseTimeNew(). * ******************************************************************************/ void filterResponseTimeFree (FLTRESP_TIME_WORKSPACE *pWorkspace) { g_free(pWorkspace->pInBuf); g_free(pWorkspace->pOutBuf); g_free(pWorkspace); } /* filterResponseTimeFree() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/fileDlg.c0000664000175100001440000003765213617621467012642 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file fileDlg.c * \brief File menu dialogs. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "fileDlg.h" #include "dialogSupport.h" #include "projectFile.h" #include "dfcProject.h" #include "mainDlg.h" #include "filterPrint.h" #include /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ static char* dfcPrjFileName = NULL; /**< Current project filename */ static char* dfcExportFileName = NULL; /**< Last export filename */ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void previewUpdate (GtkFileChooser *chooser, gpointer labelWidget); static GtkWidget* createFileDialog (const gchar *title, GtkWindow *parent, GtkFileChooserAction action, const gchar *btn1, GtkResponseType resp1, const gchar *btn2, GtkResponseType resp2); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Callback function from GtkFileChooser dialog on event \e update-preview. * * \param chooser GtkFileChooser widget. * \param labelWidget Preview label widget. * ******************************************************************************/ static void previewUpdate (GtkFileChooser *chooser, gpointer labelWidget) { GError *err; gchar* buf; char *author, *title; DFCPRJ_INFO info; char* fname = gtk_file_chooser_get_preview_filename (chooser); if (fname != NULL) { if (g_str_has_suffix (fname, PRJFILE_NAME_SUFFIX)) { err = NULL; prjFileScan (fname, &info, &err); if (err == NULL) { title = info.title; author = info.author; if (author == NULL) { author = _("Unknown"); } /* if */ if (title == NULL) { title = _("Unknown"); } /* if */ buf = g_strdup_printf (_("Title: %s\nAuthor: %s"), title, author); gtk_file_chooser_set_preview_widget_active(chooser, TRUE); gtk_label_set_markup (GTK_LABEL (labelWidget), buf); prjFileFree (&info); /* free project info */ g_free (buf); return; } /* if */ } /* if */ g_free (fname); } /* if */ gtk_file_chooser_set_preview_widget_active(chooser, FALSE); } /* previewUpdate() */ /* FUNCTION *******************************************************************/ /** Creates the file dialog. * * \param title Title of the dialog, or NULL. * \param parent Transient parent of the dialog, or NULL. * \param action Open or save mode for the dialog. * \param btn1 Stock ID or text to go in the first button. * \param resp1 Response ID to \a btn1 press. * \param btn2 Stock ID or text to go in the first button. * \param resp2 Response ID to \a btn2 press. * * \return A new \e GtkFileChooserDialog widget. ******************************************************************************/ static GtkWidget* createFileDialog (const gchar *title, GtkWindow *parent, GtkFileChooserAction action, const gchar *btn1, GtkResponseType resp1, const gchar *btn2, GtkResponseType resp2) { GtkFileFilter* filter; gchar* str; GtkWidget* preview = gtk_label_new (NULL); GtkWidget* dialog = gtk_file_chooser_dialog_new (title, parent, action, btn1, resp1, btn2, resp2, NULL); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE); filter = gtk_file_filter_new (); str = g_strdup_printf (_("Project files (*%s)"), PRJFILE_NAME_SUFFIX); gtk_file_filter_set_name (filter, str); g_free (str); gtk_file_filter_add_pattern (filter, "*" PRJFILE_NAME_SUFFIX); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("All files (*)")); gtk_file_filter_add_pattern (filter, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); gtk_label_set_use_markup (GTK_LABEL (preview), TRUE); gtk_label_set_angle (GTK_LABEL (preview), 90); gtk_file_chooser_set_use_preview_label (GTK_FILE_CHOOSER (dialog), FALSE); gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (dialog), preview); g_signal_connect ((gpointer) dialog, "update-preview", G_CALLBACK (previewUpdate), preview); return dialog; } /* createFileDialog() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e New menuitem is selected * from \e File menu. * * \param menuitem The menu item object which received the signal (New). * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgNewActivate (GtkMenuItem* menuitem, gpointer user_data) { if (dfcPrjFileName != NULL) { g_free (dfcPrjFileName); dfcPrjFileName = NULL; } /* if */ dfcPrjFree (NULL); mainDlgUpdateAll (NULL); } /* fileDlgNewActivate() */ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Open menuitem is selected * from \e File menu. * * \param srcWidget \e File \e Open widget (GtkMenuItem on event \e activate * or GtkToolButton on event \e clicked), which causes this * call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgOpenActivate (GtkWidget* srcWidget, gpointer user_data) { GError *err = NULL; GtkWidget *topWidget = gtk_widget_get_toplevel (srcWidget); GtkWidget* dialog = createFileDialog (_("Load project file"), GTK_WINDOW (topWidget), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_show_hidden (GTK_FILE_CHOOSER (dialog), FALSE); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); dfcPrjLoad (fname, &err); if (err == NULL) { if (dfcPrjFileName != NULL) { g_free (dfcPrjFileName); } /* if */ dfcPrjFileName = fname; /* store as current name (for next save) */ mainDlgUpdateAll (fname); } /* if */ else { dlgErrorFile (topWidget, _("Error loading project file '%s'."), fname, err), g_error_free (err); g_free (fname); } /* if */ } /* if */ gtk_widget_destroy (dialog); } /* fileDlgOpenActivate() */ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Save menuitem is selected * from \e File menu. * * \param srcWidget \e File \e Save widget (GtkMenuItem on event \e activate * or GtkToolButton on event \e clicked), which causes this * call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgSaveActivate (GtkWidget* srcWidget, gpointer user_data) { if (dfcPrjFileName != NULL) /* associated filename known? */ { if (dfcPrjSave (dfcPrjFileName) == 0) /* success? */ { return; } /* if */ dlgErrorFile (gtk_widget_get_toplevel (srcWidget), _("Error saving project file '%s'."), dfcPrjFileName, NULL); } /* if */ fileDlgSaveAsActivate (srcWidget, user_data); } /* fileDlgSaveActivate() */ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Save \e As menuitem is * selected from \e File menu. * * \param srcWidget \e File \e Save \e As widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgSaveAsActivate (GtkWidget* srcWidget, gpointer user_data) { gchar* fname; GtkWidget *topWidget = gtk_widget_get_toplevel (srcWidget); GtkWidget* dialog = createFileDialog (_("Save project file"), GTK_WINDOW (topWidget), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT); if (dfcPrjFileName == NULL) { gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), gettext ("untitled" PRJFILE_NAME_SUFFIX)); } /* if */ else { fname = g_filename_to_utf8 (dfcPrjFileName, -1, NULL, NULL, NULL); if (fname != NULL) { gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), fname); g_free (fname); } /* if */ } /* else */ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); gtk_file_chooser_set_show_hidden (GTK_FILE_CHOOSER (dialog), FALSE); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); /* Use fname directly because it is coded in filesysteme coding (must * not be UTF-8). */ if (dfcPrjSave (fname) == 0) /* success? */ { if (dfcPrjFileName != NULL) { g_free (dfcPrjFileName); } /* if */ dfcPrjFileName = fname; /* store as current name (for next save) */ } /* if */ else { dlgErrorFile (topWidget, _("Error saving project file '%s'."), fname, NULL); g_free (fname); } /* else */ } /* if */ gtk_widget_destroy (dialog); } /* fileDlgSaveAsActivate() */ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Save \e As menuitem is * selected from \e File menu. * * \param srcWidget \e File \e Save \e As widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void fileDlgExportActivate (GtkWidget* srcWidget, gpointer user_data) { gchar* fname; GtkWidget *widget; GtkFileFilter* filter; GtkWidget* dialog = gtk_file_chooser_dialog_new (_("Export coefficients"), GTK_WINDOW (gtk_widget_get_toplevel (srcWidget)), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE); widget = gtk_label_new (_("Choose the file extension according to your preferred format:\n\n" "\t*.txt\t->\tplain text\n" "\t*.c\t\t->\t\"C\" language\n" "\t*.m\t\t->\tMATLAB script")); gtk_label_set_use_markup (GTK_LABEL (widget), TRUE); gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), widget); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("All files (*)")); gtk_file_filter_add_pattern (filter, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Plain (*.txt)")); gtk_file_filter_add_pattern (filter, "*.txt"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("MATLAB (*.m)")); gtk_file_filter_add_pattern (filter, "*.m"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("C (*.c)")); gtk_file_filter_add_pattern (filter, "*.c"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); if (dfcExportFileName == NULL) { gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), _("untitled.txt")); } /* if */ else { fname = g_filename_to_utf8 (dfcExportFileName, -1, NULL, NULL, NULL); if (fname != NULL) { gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), fname); g_free (fname); } /* if */ } /* if */ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); gtk_file_chooser_set_show_hidden (GTK_FILE_CHOOSER (dialog), FALSE); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); /* Use fname directly because it is coded in filesystem coding (must * not be UTF-8). */ if (dfcPrjExport (fname) == 0) /* success? */ { if (dfcExportFileName != NULL) { g_free (dfcExportFileName); } /* if */ dfcExportFileName = fname; /* store as current (for next save) */ } /* if */ else { dlgErrorFile (gtk_widget_get_toplevel (srcWidget), _("Error exporting to file '%s'."), fname, NULL); g_free (fname); } /* else */ } /* if */ gtk_widget_destroy (dialog); } /* fileDlgExportActivate() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/mainDlg.c0000664000175100001440000014112613733642044012630 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file mainDlg.c * \brief Main dialog elements (right, bottom of window) handling. * \author Copyright (C) 2006, 2011-2013, 2020 Ralf Hoppe * * \note Parts of code taken over from \e glade in interface.c, which itself * isn't a project file. * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dfcgen.h" #include "dfcProject.h" #include "cfgSettings.h" #include "mainDlg.h" #include "designDlg.h" #include "fileDlg.h" #include "editDlg.h" #include "helpDlg.h" #include "rootsPlot.h" #include "responseWin.h" #include "filterSupport.h" #include "filterPrint.h" /* filterPrintCoeffs() */ #include "dialogSupport.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Function that operates on selected coefficients. */ typedef BOOL (* MAINDLG_COEFF_OPERATION) (FLTCOEFF *pFilter, MATHPOLY *poly, int index); /** Coefficients modification action descriptor */ typedef struct { GtkWidget *btn; /**< \c GtkButton associated with this action */ GtkWidget *menu; /**< \c GtkMenuItem associated with this action */ MAINDLG_COEFF_OPERATION op; char *text; /**< Menuitem text (describing the action) */ char *stockimg; char *tooltip; } MAINDLG_COEFF_ACTION; /** Column identifiers for coefficients list GtkTreeview model. */ typedef enum { MAINDLG_LIST_COLUMN_INDEX = 0, MAINDLG_LIST_COLUMN_COEFF = 1, MAINDLG_LIST_COLUMN_SIZE } MAINDLG_LIST_COLUMN; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void mainDlgDestroy (GtkObject* object, gpointer user_data); static void mainDlgQuit (GtkWidget* widget, gpointer user_data); static BOOL mainDlgCoeffEdit (FLTCOEFF *pFilter, MATHPOLY *poly, int index); static BOOL mainDlgCoeffsRound (FLTCOEFF *pFilter, MATHPOLY *poly, int index); static BOOL mainDlgCoeffsFactor (FLTCOEFF *pFilter, MATHPOLY *poly, int index); static void allowCoeffActions (BOOL active); static int getSelectedCoeff (GtkTreeSelection *selection); static void treeSelectionCallback (GtkTreeSelection *treeselection, gpointer user_data); static GtkTreeView* coeffCreateListTreeView (GtkTreeView **pOther); static void indexCellDataFunc (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data); static void coeffCellDataFunc (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data); static void coeffFillListTreeView (GtkTreeView *tree, GtkListStore *store, MATHPOLY *poly); static MATHPOLY *getSelectedPoly (FLTCOEFF* pFilter, int *pIndex); /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define MAINDLG_BTN_APPLY "btnApply" /**< Name of \e Apply button widget */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ static GtkWidget *topWidget; /**< Top level widget */ static GtkTreeView *treeDenominator; /**< Denominator coefficients tree widget */ static GtkTreeView *treeNumerator; /**< Numerator coefficients tree widget */ static GtkWidget *statusbar; /**< Statusbar in bottom line of top widget */ static MAINDLG_COEFF_ACTION mainDlgCoeffBtn[] = { { NULL, NULL, mainDlgCoeffEdit, N_("Change"), GTK_STOCK_EDIT, N_("Edit a single coefficient") }, { NULL, NULL, mainDlgCoeffsFactor, N_("Multiply"), GTK_STOCK_FULLSCREEN, N_("Multiply all coefficients with a constant") }, { NULL, NULL, mainDlgCoeffsRound, N_("Round"), GTK_STOCK_CONVERT, N_("Round all coefficients") } }; /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** This function is called if the main (top-level) widget is destroyed. * * \param object GtkWidget of top-level window which is destroyed. * \param user_data User data as passed to function g_signal_connect (unused). * ******************************************************************************/ static void mainDlgDestroy (GtkObject* object, gpointer user_data) { gtk_main_quit (); } /* mainDlgDestroy() */ /* FUNCTION *******************************************************************/ /** This function is called if either \e Quit is choosen from the main menu * or the \e Exit button in toolbar clicked. * * \param widget \e GtkMenuItem or \e GtkToolItem for application quit. * \param user_data User data as passed to function g_signal_connect (unused). * ******************************************************************************/ static void mainDlgQuit (GtkWidget* widget, gpointer user_data) { gint ack = GTK_RESPONSE_YES; ASSERT (topWidget != NULL); if ((dfcPrjGetFilter() != NULL) && !(dfcPrjGetFlags() & DFCPRJ_FLAG_SAVED)) { GtkWidget *warn = gtk_message_dialog_new_with_markup ( GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("The current filter/system has not been saved. Are you sure to" " quit now?")); ack = gtk_dialog_run (GTK_DIALOG (warn)); gtk_widget_destroy (warn); } /* if */ if (ack == GTK_RESPONSE_YES) { gtk_widget_destroy (topWidget); } /* if */ } /* mainDlgQuit() */ /* FUNCTION *******************************************************************/ /** This function determines the index of the associated coefficient from a * numerator or denominator GtkTreeview list. * * \param selection The current selection from numerator or denominator list. * * \return Returns the index of selected coefficient (if there is * one selected) or -1 if no coefficient is selected. ******************************************************************************/ static int getSelectedCoeff (GtkTreeSelection *selection) { int index, *pIndex; GtkTreeModel *model; GtkTreeIter iter; GtkTreePath* path; if (!gtk_tree_selection_get_selected (selection, &model, &iter)) { return -1; /* nothing selected */ } /* if */ path = gtk_tree_model_get_path (model, &iter); pIndex = gtk_tree_path_get_indices (path); if (pIndex == NULL) { return -1; } /* if */ index = *pIndex; gtk_tree_path_free (path); return index; } /* getSelectedCoeff() */ /* FUNCTION *******************************************************************/ /** Determines selected polynomial and coefficient from the numerator and * denominator (GtkTreeView) list. * * \param pFilter Pointer to filter which is currently displayed in the * GtkTreeView coefficients list. * \param pIndex Pointer to buffer which gets the index of selected * coefficient (if there is one). * * \return Selected polynomial (\p pFilter->den or \p Filter->num) * or NULL if nothing is selected. ******************************************************************************/ static MATHPOLY *getSelectedPoly (FLTCOEFF* pFilter, int *pIndex) { int idx; if (pIndex == NULL) { pIndex = &idx; } /* if */ *pIndex = getSelectedCoeff (gtk_tree_view_get_selection (treeNumerator)); if (*pIndex >= 0) { return &pFilter->num; } /* if */ *pIndex = getSelectedCoeff (gtk_tree_view_get_selection (treeDenominator)); if (*pIndex >= 0) { return &pFilter->den; } /* if */ return NULL; } /* getSelectedPoly() */ /* FUNCTION *******************************************************************/ /** Operation which is performed when the \e Edit button is clicked (called from * function mainDlgCoeffAction(), type is MAINDLG_COEFF_OPERATION). * * \param pFilter Pointer to filter which is currently displayed in the * GtkTreeView coefficients list. * \param poly Pointer to selected coefficients (\p pFilter->num or * \p pFilter->den) * \param index Index of selected coefficient in vector \p poly->coeff. * * \return TRUE if the operation was really performed, else * FALSE (means no coefficient has changed). ******************************************************************************/ static BOOL mainDlgCoeffEdit (FLTCOEFF *pFilter, MATHPOLY *poly, int index) { char *intro = g_strdup_printf (_("Changes coefficient of tap z-%d in" " the selected list to a new value."), index); BOOL ret = dlgPopupDouble (_("Change coefficient"), _("_New"), intro, poly->coeff + index); g_free (intro); return ret; } /* mainDlgCoeffEdit() */ /* FUNCTION *******************************************************************/ /** Operation which is performed when the \e Factor button is clicked (called * from function mainDlgCoeffAction(), type is MAINDLG_COEFF_OPERATION). * * \param pFilter Pointer to filter which is currently displayed in the * GtkTreeView coefficients list. * \param poly Pointer to selected coefficients (\p pFilter->num or * \p pFilter->den) * \param index Index of selected coefficient in vector \p poly->coeff. * * \return TRUE if the operation was really performed, else * FALSE (means no coefficient has changed). ******************************************************************************/ static BOOL mainDlgCoeffsFactor (FLTCOEFF *pFilter, MATHPOLY *poly, int index) { int i; double factor = 1.0; BOOL ret = dlgPopupDouble (_("Multiply coefficients"), _("_Factor"), _("Multiplies all coefficients in the" " selected list with the given factor."), &factor); if (ret) { for (i = 0; i <= poly->degree; i++) { poly->coeff[i] *= factor; } /* for */ } /* if */ return ret; } /* mainDlgCoeffsFactor() */ /* FUNCTION *******************************************************************/ /** Operation which is performed when the \e Round button is clicked (called * from function mainDlgCoeffAction(), type is MAINDLG_COEFF_OPERATION). * * \param pFilter Pointer to filter which is currently displayed in the * GtkTreeView coefficients list. * \param poly Pointer to selected coefficients (\p pFilter->num or * \p pFilter->den) * \param index Index of selected coefficient in vector \p poly->coeff. * * \return TRUE if the operation was really performed, else * FALSE (means no coefficient has changed). ******************************************************************************/ static BOOL mainDlgCoeffsRound (FLTCOEFF *pFilter, MATHPOLY *poly, int index) { int i; GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Do you really want to round all" " coefficients in the selected list?")); i = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (i != GTK_RESPONSE_YES) /* user wants it (really) */ { return FALSE; } /* if */ for (i = 0; i <= poly->degree; i++) { poly->coeff[i] = round (poly->coeff[i]); } /* for */ return TRUE; } /* mainDlgCoeffsRound() */ /* FUNCTION *******************************************************************/ /** This function is called if a coefficients button (\e Edit, \e Factor, * \e Round) or the associated menu item was clicked * * \param widget Associated \c GtkButton or \c GtkTreeView widget. * \param user_data User data as passed to function g_signal_connect. Here * it is a pointer to the button descriptor in array * mainDlgCoeffBtn. * ******************************************************************************/ static void mainDlgCoeffAction (GtkWidget *widget, gpointer user_data) { int index, result; FLTCOEFF tmp; MAINDLG_COEFF_ACTION *pAction = user_data; FLTCOEFF *pFilter = dfcPrjGetFilter (); MATHPOLY *poly = getSelectedPoly (&tmp, &index); if ((pFilter != NULL) && (poly != NULL)) /* sanity checks */ { if (filterDuplicate (&tmp, pFilter) == 0) /* make temp. filter */ { if (pAction->op (&tmp, poly, index)) /* performed? */ { result = filterCheck (&tmp); /* check realization */ if (FLTERR_CRITICAL (result)) { filterFree(&tmp); dlgError (widget, _("Cannot implement such a filter." " Maybe the result of such an operation" " leads to vanishing coefficients at all.")); } /* if */ else /* seems okay (do not free any memory) */ { dfcPrjSetFilter (FLTCLASS_NOTDEF, &tmp, NULL); mainDlgUpdateFilter (result); } /* else */ } /* if */ } /* if */ else { dlgError (widget, _("Cannot perform the desired operation." " It seems that all the memory is exhausted.")); } /* else */ } /* if */ } /* mainDlgCoeffAction() */ /* FUNCTION *******************************************************************/ /** Activates (or deactivates) the coefficients buttons. * * \param active TRUE if the buttons shall be activated, FALSE to * deactivate. * ******************************************************************************/ static void allowCoeffActions (BOOL active) { int i; for (i = 0; i < N_ELEMENTS (mainDlgCoeffBtn); i++) { gtk_widget_set_sensitive (mainDlgCoeffBtn[i].btn, active); gtk_widget_set_sensitive (mainDlgCoeffBtn[i].menu, active); } /* for */ } /* allowCoeffActions() */ /* FUNCTION *******************************************************************/ /** Callback function for \e changed signal on a GtkTreeSelection associated * with a coefficients list GtkTreeView. * * \param selection Selection of the GtkTreeView list. * \param user_data Selection of the other GtkTreeView list (user data as * passed to function g_signal_connect). * ******************************************************************************/ static void treeSelectionCallback (GtkTreeSelection *selection, gpointer user_data) { int idx; GtkTreeSelection *other; ASSERT (user_data != NULL); idx = getSelectedCoeff (selection); other = gtk_tree_view_get_selection (*(GtkTreeView**)user_data); ASSERT (other != NULL); if (idx >= 0) /* unselected -> selected transition ? */ { gtk_tree_selection_unselect_all (other); /* deselect other list */ } /* if */ allowCoeffActions ((getSelectedCoeff (other) >= 0) || (idx >= 0)); } /* treeSelectionCallback() */ /* FUNCTION *******************************************************************/ /** Callback function for \e row-activated signal on a GtkTreeSelection associated * with a coefficients list GtkTreeView. * * \param treeview Selection of the GtkTreeView list. * \param path Selection path. * \param column A GtkTreeColumn. * \param user_data Selection of the other GtkTreeView list (user data as * passed to function g_signal_connect). * ******************************************************************************/ static void treeDblClickedCallback (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer userdata) { (void) column; /* unused */ (void) path; mainDlgCoeffAction (GTK_WIDGET(treeview), userdata); } /* FUNCTION *******************************************************************/ /** This function sets the \e markup property of an index cell instead of just * using the straight mapping between the cell and the model. This is useful * for customizing the cell renderer - in that case to handle markup. * * \param column A GtkTreeColumn * \param renderer The GtkCellRenderer that is being rendered by \p column * \param model The GtkTreeModel being rendered * \param iter A GtkTreeIter of the current row rendered * \param data User data * ******************************************************************************/ static void indexCellDataFunc (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { int index; char buf[128]; gtk_tree_model_get (model, iter, MAINDLG_LIST_COLUMN_INDEX, &index, -1); g_snprintf (buf, sizeof (buf), "z-%d", index); g_object_set (renderer, "markup", buf, NULL); } /* indexCellDataFunc() */ /* FUNCTION *******************************************************************/ /** This function sets the "text" property of a coefficient cell instead of just * using the straight mapping between the cell and the model. This is useful * for customizing the cell renderer - in that case to customize the double * output precision (which normally is 6 in \e libstdc). * * \param column A GtkTreeColumn * \param renderer The GtkCellRenderer that is being rendered by \p column * \param model The GtkTreeModel being rendered * \param iter A GtkTreeIter of the current row rendered * \param data User data * ******************************************************************************/ void coeffCellDataFunc (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { double coeff; char buf[128]; gtk_tree_model_get (model, iter, MAINDLG_LIST_COLUMN_COEFF, &coeff, -1); g_snprintf (buf, sizeof (buf), "%.*G", cfgGetDesktopPrefs()->outprec, coeff); g_object_set (renderer, "text", buf, NULL); } /* coeffCellDataFunc() */ /* FUNCTION *******************************************************************/ /** \e Realize event callback for denominator coefficients list. * * \note If the GtkTreeView has \e fixed_height mode enabled, then all columns * must have its \e sizing property set to be GTK_TREE_VIEW_COLUMN_FIXED. * * \param pOther Pointer to a variable which holds the GtkTreeView reference. * * \return GtkTreeView widget associated with the coefficients list. * ******************************************************************************/ static GtkTreeView* coeffCreateListTreeView (GtkTreeView **pOther) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeView* tree; /* 1st step: create the model (GtkListStore) */ GtkListStore *store = gtk_list_store_new (MAINDLG_LIST_COLUMN_SIZE, G_TYPE_INT, G_TYPE_DOUBLE); /* 2nd step: create the tree view */ tree = GTK_TREE_VIEW (gtk_tree_view_new ()); gtk_tree_view_set_rules_hint (tree, TRUE); gtk_tree_view_set_hover_expand (tree, TRUE); gtk_tree_selection_set_mode (gtk_tree_view_get_selection (tree), GTK_SELECTION_SINGLE); gtk_tree_view_set_search_column (tree, MAINDLG_LIST_COLUMN_INDEX); /* 3rd step: create all columns */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Tap"), renderer, "markup", MAINDLG_LIST_COLUMN_INDEX, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, indexCellDataFunc, NULL, NULL); gtk_tree_view_column_set_resizable (column, TRUE); gtk_tree_view_column_set_sort_column_id (column, MAINDLG_LIST_COLUMN_INDEX); gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (tree, column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Coefficient"), renderer, "text", MAINDLG_LIST_COLUMN_COEFF, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, coeffCellDataFunc, NULL, NULL); gtk_tree_view_column_set_resizable (column, TRUE); gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (tree, column); /* 4th step: set model into tree view (and show widget) */ gtk_tree_view_set_model (tree, GTK_TREE_MODEL (store)); g_object_unref (G_OBJECT (store)); /* view now holds the reference */ /* 5th step: Connect to "changed" and "row-activated" signal */ g_signal_connect_after ((gpointer) gtk_tree_view_get_selection (tree), "changed", G_CALLBACK (treeSelectionCallback), pOther); g_signal_connect(tree, "row-activated", G_CALLBACK (treeDblClickedCallback), &mainDlgCoeffBtn[0]); return tree; } /* coeffCreateListTreeView() */ /* FUNCTION *******************************************************************/ /** Fills a GtkTreeView coefficients list with data (but does not clear it). * * \param tree The GtkTreeView widget to be filled with coefficients. * \param store The associated list store. * \param poly Pointer to polynomial coefficients to be filled in. * ******************************************************************************/ static void coeffFillListTreeView (GtkTreeView *tree, GtkListStore *store, MATHPOLY *poly) { int i; GtkTreeIter iter; /* store iterator */ for (i = 0; i <= poly->degree; i++) { gtk_list_store_append (store, &iter); /* add new row & get iterator */ gtk_list_store_set (store, &iter, MAINDLG_LIST_COLUMN_INDEX, i, MAINDLG_LIST_COLUMN_COEFF, poly->coeff[i], -1); } /* for */ } /* coeffFillListTreeView() */ static void coeffRedrawListTreeViews () { GtkListStore *storeNum = GTK_LIST_STORE (gtk_tree_view_get_model (treeNumerator)); GtkListStore *storeDen = GTK_LIST_STORE (gtk_tree_view_get_model (treeDenominator)); FLTCOEFF* pFilter = dfcPrjGetFilter(); gtk_list_store_clear (storeNum); gtk_list_store_clear (storeDen); if (pFilter != NULL) { coeffFillListTreeView (treeNumerator, storeNum, &pFilter->num); coeffFillListTreeView (treeDenominator, storeDen, &pFilter->den); } /* if */ } /* coeffRedrawListTreeViews() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** DFCGen top widget creation. * * This function is completely taken over from interface.c, where it has been * generated by \e glade. * * * \return Top widget reference. ******************************************************************************/ GtkWidget* mainDlgCreate (void) { int i; MAINDLG_COEFF_ACTION *pAction; GtkRequisition size; GtkWidget *menuMain, *menuMainItem, *menuContainer, *submenuContainer; GtkWidget *toolbarMain, *menuItem; GtkWidget *widget, *label, *table, *button; GtkWidget *hbox1, *hbox2, *hbox3, *vbox1, *vpaneFilter; GtkWidget *boxDesignDlg, *boxFilterDlg, *comboFilterClass; GtkAccelGroup *accel_group = gtk_accel_group_new (); topWidget = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (topWidget), 6); #ifndef G_OS_WIN32 { /* On Win32 the compiled-in resource should be used as icon */ GdkPixbuf *iconPixbuf = createPixbufFromFile (PACKAGE_ICON); if (iconPixbuf != NULL) { gtk_window_set_icon (GTK_WINDOW (topWidget), iconPixbuf); g_object_unref (iconPixbuf); } /* if */ } #endif /* G_OS_WIN32 */ gtk_window_set_role (GTK_WINDOW (topWidget), PACKAGE); g_signal_connect ((gpointer) topWidget, "destroy", G_CALLBACK (mainDlgDestroy), NULL); vbox1 = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (topWidget), vbox1); menuMain = gtk_menu_bar_new (); gtk_box_pack_start (GTK_BOX (vbox1), menuMain, FALSE, FALSE, 0); menuMainItem = gtk_menu_item_new_with_mnemonic (_("_File")); gtk_container_add (GTK_CONTAINER (menuMain), menuMainItem); menuContainer = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuMainItem), menuContainer); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (fileDlgNewActivate), NULL); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (fileDlgOpenActivate), NULL); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (fileDlgSaveActivate), NULL); GLADE_HOOKUP_OBJECT (topWidget, menuItem, "menuItemFileSave"); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (fileDlgSaveAsActivate), NULL); GLADE_HOOKUP_OBJECT (topWidget, menuItem, "menuItemFileSaveAs"); menuItem = gtk_separator_menu_item_new (); /* separator line */ gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); menuItem = gtk_menu_item_new_with_mnemonic (_("_Export")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (fileDlgExportActivate), NULL); GLADE_HOOKUP_OBJECT (topWidget, menuItem, "menuItemFileExport"); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_PRINT, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (filterPrintCoeffs), NULL); GLADE_HOOKUP_OBJECT (topWidget, menuItem, "menuItemFilePrint"); widget = gtk_separator_menu_item_new (); gtk_container_add (GTK_CONTAINER (menuContainer), widget); gtk_widget_set_sensitive (widget, FALSE); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (mainDlgQuit), NULL); menuMainItem = gtk_menu_item_new_with_mnemonic (_("_Edit")); gtk_container_add (GTK_CONTAINER (menuMain), menuMainItem); menuContainer = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuMainItem), menuContainer); menuItem = gtk_image_menu_item_new_with_mnemonic (_("Project Info")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); widget = gtk_image_new_from_stock (GTK_STOCK_INFO, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuItem), widget); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (editDlgInfoActivate), NULL); widget = gtk_menu_item_new_with_mnemonic (_("Coefficient(s)")); gtk_container_add (GTK_CONTAINER (menuContainer), widget); submenuContainer = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), submenuContainer); for (i = 0, pAction = mainDlgCoeffBtn; i < N_ELEMENTS (mainDlgCoeffBtn); i++, pAction++) { pAction->menu = gtk_image_menu_item_new_with_mnemonic (gettext (pAction->text)); gtk_container_add (GTK_CONTAINER (submenuContainer), pAction->menu); widget = gtk_image_new_from_stock (pAction->stockimg, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pAction->menu), widget); gtk_widget_set_sensitive (GTK_WIDGET(pAction->menu), FALSE); g_signal_connect ((gpointer) pAction->menu, "activate", G_CALLBACK (mainDlgCoeffAction), pAction); } /* for */ widget = gtk_separator_menu_item_new (); gtk_container_add (GTK_CONTAINER (menuContainer), widget); gtk_widget_set_sensitive (widget, FALSE); menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_PREFERENCES, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (editDlgSettingsActivate), NULL); menuMainItem = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_container_add (GTK_CONTAINER (menuMain), menuMainItem); menuContainer = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuMainItem), menuContainer); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Magnitude Response")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_MAGNITUDE)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Attenuation")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_ATTENUATION)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Characteristic Function")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_CHAR)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Phase Response")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_PHASE)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("Phase _Delay")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_DELAY)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Group Delay")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_GROUP)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Impulse Response")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_IMPULSE)); menuItem = gtk_check_menu_item_new_with_mnemonic (_("_Step Response")); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (responseWinMenuActivate), GINT_TO_POINTER (RESPONSE_TYPE_STEP)); menuMainItem = gtk_menu_item_new_with_mnemonic (_("_Help")); gtk_container_add (GTK_CONTAINER (menuMain), menuMainItem); menuContainer = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuMainItem), menuContainer); #ifdef TODO menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_HELP, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); #endif menuItem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, accel_group); gtk_container_add (GTK_CONTAINER (menuContainer), menuItem); g_signal_connect ((gpointer) menuItem, "activate", G_CALLBACK (helpDlgMenuActivate), NULL); toolbarMain = gtk_toolbar_new (); gtk_box_pack_start (GTK_BOX (vbox1), toolbarMain, FALSE, FALSE, 0); gtk_toolbar_set_style (GTK_TOOLBAR (toolbarMain), GTK_TOOLBAR_BOTH); widget = (GtkWidget*) gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbarMain), widget); button = (GtkWidget*) gtk_tool_button_new_from_stock (GTK_STOCK_OPEN); gtk_container_add (GTK_CONTAINER (toolbarMain), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (fileDlgOpenActivate), NULL); button = (GtkWidget*) gtk_tool_button_new_from_stock (GTK_STOCK_SAVE); gtk_container_add (GTK_CONTAINER (toolbarMain), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (fileDlgSaveActivate), NULL); GLADE_HOOKUP_OBJECT (topWidget, button, "toolBtnSave"); button = (GtkWidget*) gtk_tool_button_new_from_stock (GTK_STOCK_NEW); gtk_container_add (GTK_CONTAINER (toolbarMain), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (fileDlgNewActivate), NULL); widget = (GtkWidget*) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbarMain), widget); button = (GtkWidget*) gtk_tool_button_new_from_stock (GTK_STOCK_PREFERENCES); gtk_container_add (GTK_CONTAINER (toolbarMain), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editDlgSettingsActivate), NULL); widget = (GtkWidget*) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbarMain), widget); button = (GtkWidget*) gtk_tool_button_new_from_stock (GTK_STOCK_QUIT); gtk_container_add (GTK_CONTAINER (toolbarMain), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (mainDlgQuit), NULL); hbox1 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 6); boxDesignDlg = gtk_vbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (hbox1), boxDesignDlg, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (boxDesignDlg), 6); hbox3 = gtk_hbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (boxDesignDlg), hbox3, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox3), 6); label = gtk_label_new_with_mnemonic (_("_Class")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (hbox3), label, FALSE, FALSE, 0); widget = gtk_event_box_new (); gtk_box_pack_start (GTK_BOX (hbox3), widget, FALSE, TRUE, 0); gtk_widget_set_tooltip_text (widget, _("Class of filter (or system)")); comboFilterClass = gtk_combo_box_new_text (); gtk_container_add (GTK_CONTAINER (widget), comboFilterClass); gtk_label_set_mnemonic_widget (GTK_LABEL (label), comboFilterClass); widget = gtk_hbutton_box_new (); gtk_box_pack_start (GTK_BOX (boxDesignDlg), widget, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); gtk_button_box_set_layout (GTK_BUTTON_BOX (widget), GTK_BUTTONBOX_SPREAD); gtk_box_set_spacing (GTK_BOX (widget), 12); button = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_container_add (GTK_CONTAINER (widget), button); gtk_widget_set_tooltip_text (button, _("Help")); #ifndef TODO gtk_widget_set_sensitive (button, FALSE); #endif button = gtk_button_new_from_stock (GTK_STOCK_APPLY); gtk_container_add (GTK_CONTAINER (widget), button); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (designDlgApply), comboFilterClass); gtk_widget_set_tooltip_text (button, _("Apply input data")); GLADE_HOOKUP_OBJECT (topWidget, button, MAINDLG_BTN_APPLY); boxFilterDlg = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox1), boxFilterDlg, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (boxFilterDlg), 6); vpaneFilter = gtk_vpaned_new (); gtk_box_pack_start (GTK_BOX (boxFilterDlg), vpaneFilter, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (vpaneFilter), 6); widget = gtk_frame_new (NULL); gtk_paned_pack1 (GTK_PANED (vpaneFilter), widget, FALSE, TRUE); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); gtk_container_add (GTK_CONTAINER (widget), rootsPlotCreate ()); label = gtk_label_new (_("Roots")); gtk_frame_set_label_widget (GTK_FRAME (widget), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); table = gtk_table_new (2, 2, FALSE); gtk_paned_pack2 (GTK_PANED (vpaneFilter), table, TRUE, TRUE); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); widget = gtk_scrolled_window_new (NULL, NULL); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); treeDenominator = coeffCreateListTreeView (&treeNumerator); gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (treeDenominator)); gtk_widget_set_tooltip_text (GTK_WIDGET (treeDenominator), _("Denominator coefficients")); widget = gtk_scrolled_window_new (NULL, NULL); gtk_table_attach (GTK_TABLE (table), widget, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); treeNumerator = coeffCreateListTreeView (&treeDenominator); gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (treeNumerator)); gtk_widget_set_tooltip_text (GTK_WIDGET (treeNumerator), _("Numerator coefficients")); label = gtk_label_new (_("Numerator")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 6); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); label = gtk_label_new (_("Denominator")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 6); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); hbox2 = gtk_hbutton_box_new (); gtk_box_pack_start (GTK_BOX (boxFilterDlg), hbox2, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox2), 6); gtk_box_set_spacing (GTK_BOX (hbox2), 6); for (i = 0, pAction = mainDlgCoeffBtn; i < N_ELEMENTS (mainDlgCoeffBtn); i++, pAction++) { pAction->btn = gtk_button_new (); gtk_container_add (GTK_CONTAINER (hbox2), pAction->btn); gtk_widget_set_sensitive (pAction->btn, FALSE); gtk_widget_set_tooltip_text (pAction->btn, gettext (pAction->tooltip)); widget = gtk_image_new_from_stock (pAction->stockimg, GTK_ICON_SIZE_BUTTON); gtk_container_add (GTK_CONTAINER (pAction->btn), widget); g_signal_connect ((gpointer) pAction->btn, "clicked", G_CALLBACK (mainDlgCoeffAction), pAction); } /* for */ statusbar = gtk_statusbar_new (); gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0); g_signal_connect ((gpointer) boxDesignDlg, "realize", G_CALLBACK (designDlgBoxRealize), NULL); g_signal_connect ((gpointer) comboFilterClass, "changed", G_CALLBACK (designDlgOnFilterComboChanged), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (topWidget, topWidget, "topWidget"); GLADE_HOOKUP_OBJECT (topWidget, boxDesignDlg, "boxDesignDlg"); GLADE_HOOKUP_OBJECT (topWidget, comboFilterClass, DESIGNDLG_COMBO_CLASS); gtk_window_add_accel_group (GTK_WINDOW (topWidget), accel_group); gtk_widget_show_all (topWidget); gtk_widget_grab_focus (comboFilterClass); mainDlgUpdateAll (NULL); /* set initial state */ gtk_widget_size_request (boxDesignDlg, &size); gtk_paned_set_position (GTK_PANED (vpaneFilter), size.height / 3); return topWidget; } /* mainDlgCreate() */ /* FUNCTION *******************************************************************/ /** Updates the project information in statusbar. * ******************************************************************************/ void mainDlgUpdatePrjInfo () { static guint prjInfoMsgId, prjInfoContextId; static BOOL firstCall = TRUE; char *msg; const DFCPRJ_INFO *pInfo = dfcPrjGetInfo (); if (firstCall) { prjInfoContextId = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), PACKAGE "Project Info"); firstCall = FALSE; } /* if */ else { gtk_statusbar_remove (GTK_STATUSBAR (statusbar), prjInfoContextId, prjInfoMsgId); } /* else */ if (pInfo->title == NULL) /* no title given? */ { if (pInfo->author == NULL) { msg = g_strdup (""); /* prepare unconditional g_free() later */ } /* if */ else { msg = g_strdup (pInfo->author); /* only show author */ } /* else */ } /* if */ else /* there is a title */ { if (pInfo->author == NULL) /* but no author */ { msg = g_strdup (pInfo->title); } /* if */ else /* both specified */ { msg = g_strdup_printf ("%s (%s)", pInfo->title, pInfo->author); } /* else */ } /* else */ prjInfoMsgId = gtk_statusbar_push (GTK_STATUSBAR (statusbar), prjInfoContextId, msg); g_free (msg); } /* mainDlgUpdatePrjInfo() */ /* FUNCTION *******************************************************************/ /** Updates the main filter dialog from current project (if there is no error * passed in via \p err). If there is an critical error (coded as from function * filterCheck(), then it displays an error box. If \c FLTERR_WARNING(err) * indicates loss of coefficients then a warning will be shown. * * \param err Error indicator with coding as from filterCheck(). * * \return Returns TRUE if the error is not FLTERR_CRITICAL(err), * else FALSE. ******************************************************************************/ BOOL mainDlgUpdateFilter (int err) { FLTCOEFF* pFilter = dfcPrjGetFilter(); BOOL valid = pFilter != NULL; if (!FLTERR_CRITICAL (err)) { if (FLTERR_WARNING (err)) { GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, _("Filter generation has dropped some" " (near zero) coefficients, but the" " filter is still valid.")); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } /* if */ gtk_widget_set_sensitive (lookup_widget (topWidget, "toolBtnSave"), valid); gtk_widget_set_sensitive (lookup_widget (topWidget, "menuItemFileSave"), valid); gtk_widget_set_sensitive (lookup_widget (topWidget, "menuItemFileSaveAs"), valid); gtk_widget_set_sensitive (lookup_widget (topWidget, "menuItemFileExport"), valid); gtk_widget_set_sensitive (lookup_widget (topWidget, "menuItemFilePrint"), valid); coeffRedrawListTreeViews (); responseWinRedraw (RESPONSE_TYPE_SIZE); rootsPlotUpdate (pFilter); return TRUE; } /* if */ return FALSE; } /* mainDlgUpdateFilter() */ /* FUNCTION *******************************************************************/ /** Redraw of main filter dialog and all associated response plot (an case a * project is defined, else does nothing). * ******************************************************************************/ void mainDlgRedrawAll () { responseWinRedraw (RESPONSE_TYPE_SIZE); /* redraw all response plots */ rootsPlotRedraw (); /* redraw roots window in main dialog */ coeffRedrawListTreeViews (); /* redraw coefficients lists in main dialog */ } /* FUNCTION *******************************************************************/ /** Adjustment of main filter dialog from a new project (may be read from file * before). * * \param filename Associated filename in filesystem coding, or NULL to * reset. * ******************************************************************************/ void mainDlgUpdateAll (const char* filename) { designDlgUpdate (topWidget); /* update design from current project */ mainDlgUpdateFilter (0); /* update coefficients and roots display */ mainDlgUpdatePrjInfo (); gtk_widget_grab_default (lookup_widget (topWidget, MAINDLG_BTN_APPLY)); if (filename != NULL) { gchar *tmp, *utf8name = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); if (utf8name == NULL) /* may be an UTF-8 conversion error */ { utf8name = g_strdup (_("Unknown")); } /* if */ tmp = g_strdup_printf ("%s: %s", PACKAGE, utf8name); gtk_window_set_title (GTK_WINDOW (topWidget), tmp); g_free (utf8name); g_free (tmp); return; } /* if */ gtk_window_set_title (GTK_WINDOW (topWidget), PACKAGE); } /* mainDlgUpdateAll() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/filterPrint.c0000664000175100001440000005411513617621524013561 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file filterPrint.c * \brief Filter print functions. * * \author Copyright (C) 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "filterResponse.h" #include "dfcProject.h" #include "cfgSettings.h" /* cfgGetDesktopPrefs() */ #include "filterPrint.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** \brief Internal context for a coefficients print job */ typedef struct { int pages; /**< number of pages to print */ int lines; /**< number of lines needed to print all coefficients */ int lines1; /**< max. number of coefficient lines on 1st page */ int lines2; /**< max. number of coefficient lines on 2nd and other pages */ int icoeff; /**< index of current coefficient */ int pgwidth; /**< width of page */ int lmargin; /**< left margin */ int maxwidth; /**< max. width */ } FILTERPRINT_COEFF_CONTEXT; /** \brief Internal context for a response print job * \note This structure is not used in the sense of a context. Instead * it's purpose is to map two parameters to one variable, * which then can be used as a single pointer to an event * callback function. */ typedef struct { RESPONSE_TYPE type; /**< response type */ PLOT_DIAG diag; /**< response plot */ } FILTERPRINT_RESPONSE_CONTEXT; /* LOCAL CONSTANT DEFINITIONS ************************************************/ /* LOCAL VARIABLE DEFINITIONS ************************************************/ static FILTERPRINT_COEFF_CONTEXT filterPrintCoeffCtx; /* LOCAL MACRO DEFINITIONS ****************************************************/ #define FILTER_PRINT_LMARGIN(pgwidth) ((pgwidth) / 10) /* LOCAL FUNCTION DECLARATIONS ************************************************/ static int filterPrintf (GtkPrintContext *ctx, BOOL doprint, int maxwidth, const gchar* format, ...); static int filterPrintPageHeader (GtkPrintContext *ctx, BOOL doprint, int pgno); static void filterPrintCoeffsInit (GtkPrintOperation *op, GtkPrintContext *ctx, gpointer ref); static void filterPrintCoeffsDo (GtkPrintOperation *op, GtkPrintContext *ctx, int pgno, gpointer ref); static void filterPrintResponseInit (GtkPrintOperation *op, GtkPrintContext *ctx, gpointer ref); static void filterPrintResponseDo (GtkPrintOperation *op, GtkPrintContext *ctx, int pgno, gpointer ref); static void filterPrintDo (GtkWidget* topWidget, GtkPrintOperation* print); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** \brief Printf-like function for a variable list of parameters. * \note Affects the \e Cairo path in the sense that it modifies the cursor * position. * * \param[in] ctx the \c GtkPrintContext for the current operation * \param[in] doprint really print the passed parameters, else only do * a size calculation (and return the vertical space used) * \param[in] maxwidth maximum width available for printing the parameters * \param[in] format printf-like format string * \param[in] ... variable parameter list associated with \p format * * \return vertical space used for output (height of printed parameters) ******************************************************************************/ static int filterPrintf (GtkPrintContext *ctx, BOOL doprint, int maxwidth, const gchar* format, ...) { gchar* text; va_list args; PangoRectangle rect = {.height = 0}; PangoLayout *layout = gtk_print_context_create_pango_layout (ctx); va_start (args, format); text = g_strdup_vprintf (format, args); pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT); pango_layout_set_indent (layout, -maxwidth / 10 * PANGO_SCALE); /* hanging indent */ pango_layout_set_width (layout, maxwidth * PANGO_SCALE); pango_layout_set_markup (layout, text, -1); pango_layout_get_extents (layout, NULL, &rect); if (doprint) { pango_cairo_show_layout ( gtk_print_context_get_cairo_context (ctx), layout); } /* if */ g_free (text); g_object_unref (layout); return (PANGO_PIXELS (rect.height) + 1); /* some more space */ } /* filterPrintf() */ /* FUNCTION *******************************************************************/ /** \brief Prints the top of a page (page number, filter info, etc) * \note Top of page means all above the coefficients list. * * \param[in] ctx the \c GtkPrintContext for the current operation * \param[in] doprint really print the page, else only do a size * calculation (and return the vertical space used) * \param[in] pgno the number of the currently printed page * * \return vertical space used for output (height of printed area) * ******************************************************************************/ static int filterPrintPageHeader (GtkPrintContext *ctx, BOOL doprint, int pgno) { PangoRectangle rect; gchar *text; int yoffset, lheight; cairo_t* cr = gtk_print_context_get_cairo_context(ctx); PangoLayout *layout = gtk_print_context_create_pango_layout (ctx); /* start with the page number (use default font) */ pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); text = g_strdup_printf (_("Page %d / %d"), pgno + 1, filterPrintCoeffCtx.pages); pango_layout_set_text (layout, text, -1); cairo_move_to (cr, filterPrintCoeffCtx.pgwidth / 2, 0); if (doprint) { pango_cairo_show_layout (cr, layout); } /* if */ pango_layout_get_extents (layout, NULL, &rect); lheight = PANGO_PIXELS (rect.height) + 1; /* some more space per line */ yoffset = 2 * lheight; g_free (text); g_object_unref (layout); pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT); if (pgno == 0) /* on first page put the project info */ { int maxwidth2; /* half of the printable width */ DFCPRJ_INFO* info = dfcPrjGetInfo (); FLTCOEFF* pFilter = dfcPrjGetFilter (); if (info->title != NULL) { if (g_utf8_strlen (info->title, -1) > 0) /* project title defined? */ { cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); yoffset += filterPrintf (ctx, doprint, filterPrintCoeffCtx.maxwidth, _("Title: %s"), info->title); } /* if */ } /* if */ if (info->author != NULL) { if (g_utf8_strlen (info->author, -1) > 0) /* author defined? */ { cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); yoffset += filterPrintf (ctx, doprint, filterPrintCoeffCtx.maxwidth, _("Author: %s"), info->author); } /* if */ } /* if */ if (info->desc != NULL) { if (g_utf8_strlen (info->desc, -1) > 0) /* description available? */ { cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); yoffset += filterPrintf (ctx, doprint, filterPrintCoeffCtx.maxwidth, _("Description: %s"), info->desc); } /* if */ } /* if */ if (yoffset > 2 * lheight) /* any project info printed? */ { yoffset += lheight; /* then add some additional space */ } /* if */ cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); /* finally the coefficients list header */ if (pFilter != NULL) /* sanity (should never happen) */ { yoffset += filterPrintf (ctx, doprint, filterPrintCoeffCtx.maxwidth, _("Coefficients:")) + lheight / 2; maxwidth2 = filterPrintCoeffCtx.maxwidth / 2; cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); (void)filterPrintf (ctx, doprint, maxwidth2, _("Numerator (%d)"), pFilter->num.degree + 1); cairo_move_to (cr, (filterPrintCoeffCtx.lmargin + filterPrintCoeffCtx.pgwidth) / 2, yoffset); yoffset += filterPrintf (ctx, doprint, maxwidth2, _("Denominator (%d)"), pFilter->den.degree + 1) + lheight / 4; } /* if */ } /* if */ return yoffset; } /* filterPrintPageHeader() */ /* FUNCTION *******************************************************************/ /** \brief Common part of print functions and wrapper of * gtk_print_operation_run(). * * \param[in] topWidget Top widget associated with the \c GtkToolButton widget * which has caused the \e clicked event. * \param[in] print GTK print context. * ******************************************************************************/ static void filterPrintDo (GtkWidget* topWidget, GtkPrintOperation* print) { static GtkPrintSettings *settings = NULL; GtkWidget* widget; GError *error; GtkPrintOperationResult result; gtk_print_operation_set_print_settings (print, settings); gtk_print_operation_set_default_page_setup (print, NULL); result = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, NULL); switch (result) { case GTK_PRINT_OPERATION_RESULT_ERROR: gtk_print_operation_get_error (print, &error); widget = gtk_message_dialog_new (GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error printing: %s"), error->message); g_signal_connect (widget, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show (widget); g_error_free (error); break; /* GTK_PRINT_OPERATION_RESULT_ERROR */ case GTK_PRINT_OPERATION_RESULT_APPLY: /* store the print settings */ if (settings != NULL) { g_object_unref (settings); } /* if */ settings = g_object_ref (gtk_print_operation_get_print_settings (print)); break; default: /* GTK_PRINT_OPERATION_RESULT_CANCEL */ break; } /* switch */ } /* filterPrintDo() */ /* FUNCTION *******************************************************************/ /** \brief Callback function for the \e begin-print event. * * The \e begin-print event is emitted after the user has finished changing * print settings in the dialog, before the actual rendering starts. A typical * use for \e begin-print is to use the parameters from the \c GtkPrintContext * and paginate the document accordingly, and then set the number of pages * with \c gtk_print_operation_set_n_pages(). * * * \param[in] op the GtkPrintOperation on which the signal was emitted * \param[in] ctx the GtkPrintContext for the current operation * \param[in] ref user data set when the signal handler was connected * ******************************************************************************/ static void filterPrintCoeffsInit (GtkPrintOperation *op, GtkPrintContext *ctx, gpointer ref) { int yofs1, yofs2; FLTCOEFF* pFilter = dfcPrjGetFilter (); gtk_print_operation_set_use_full_page (op, FALSE); /* set cairo transform */ gtk_print_operation_set_unit (op, GTK_UNIT_PIXEL); filterPrintCoeffCtx.icoeff = 0; /* reset index of first coefficient */ filterPrintCoeffCtx.pages = 1; /* defaults to one page */ filterPrintCoeffCtx.pgwidth = (int) gtk_print_context_get_width (ctx); filterPrintCoeffCtx.lmargin = FILTER_PRINT_LMARGIN (filterPrintCoeffCtx.pgwidth); filterPrintCoeffCtx.maxwidth = filterPrintCoeffCtx.pgwidth - filterPrintCoeffCtx.lmargin; filterPrintCoeffCtx.lines = filterPrintCoeffCtx.lines1 = filterPrintCoeffCtx.lines2 = 0; yofs1 = filterPrintPageHeader (ctx, FALSE, 0); /* 1st page y-start */ yofs2 = filterPrintPageHeader (ctx, FALSE, 1); /* 2nd page y-start */ if (pFilter != NULL) /* sanity (should never happen) */ { int pgheight, lheight; /* page height & line height */ PangoRectangle rect; PangoLayout *layout = gtk_print_context_create_pango_layout (ctx); pango_layout_set_markup (layout, "z-1 -> 1.0", -1); pango_layout_get_extents (layout, NULL, &rect); lheight = PANGO_PIXELS (rect.height) + 1; /* some more space */ g_object_unref (layout); pgheight = (int) gtk_print_context_get_height (ctx) - lheight; if (yofs1 >= pgheight) /* sanity */ { yofs1 = pgheight; } /* if */ if (yofs2 >= pgheight) /* sanity */ { yofs2 = pgheight; } /* if */ filterPrintCoeffCtx.lines = MAX (pFilter->num.degree, pFilter->den.degree) + 1; filterPrintCoeffCtx.lines1 = (pgheight - yofs1) / lheight; filterPrintCoeffCtx.lines2 = (pgheight - yofs2) / lheight; filterPrintCoeffCtx.pages = (filterPrintCoeffCtx.lines - filterPrintCoeffCtx.lines1 + filterPrintCoeffCtx.lines2 - 1) / filterPrintCoeffCtx.lines2 + 1; } /* if */ gtk_print_operation_set_n_pages (op, filterPrintCoeffCtx.pages); } /* filterPrintCoeffsInit() */ /* FUNCTION *******************************************************************/ /** \brief Callback function for the \e draw-page event. * * This function (signal handler for \e draw-page) is called for every page * that is printed. It renders the page onto the cairo context of page. * * \param[in] op the GtkPrintOperation on which the signal was emitted * \param[in] ctx the GtkPrintContext for the current operation * \param[in] pgno the number of the currently printed page * \param[in] ref user data set when the signal handler was connected * ******************************************************************************/ static void filterPrintCoeffsDo (GtkPrintOperation *op, GtkPrintContext *ctx, int pgno, gpointer ref) { FLTCOEFF* pFilter = dfcPrjGetFilter (); cairo_t* cr = gtk_print_context_get_cairo_context (ctx); int yoffset = filterPrintPageHeader (ctx, TRUE, pgno); cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); if (pFilter != NULL) { int i; int maxwidth2 = filterPrintCoeffCtx.maxwidth / 2; int pglines = (pgno == 0) ? filterPrintCoeffCtx.lines1 : filterPrintCoeffCtx.lines2; for (i = 0; (i < pglines) && (filterPrintCoeffCtx.icoeff < filterPrintCoeffCtx.lines); ++i, ++filterPrintCoeffCtx.icoeff) { int dy = 0; if (filterPrintCoeffCtx.icoeff <= pFilter->num.degree) { cairo_move_to (cr, filterPrintCoeffCtx.lmargin, yoffset); dy = filterPrintf (ctx, TRUE, maxwidth2, "z-%d -> %.*G", filterPrintCoeffCtx.icoeff, cfgGetDesktopPrefs ()->outprec, pFilter->num.coeff[filterPrintCoeffCtx.icoeff]); } /* if */ if (filterPrintCoeffCtx.icoeff <= pFilter->den.degree) { cairo_move_to (cr, (filterPrintCoeffCtx.lmargin + filterPrintCoeffCtx.pgwidth) / 2, yoffset); dy = MAX(dy, filterPrintf (ctx, TRUE, maxwidth2, "z-%d -> %.*G", filterPrintCoeffCtx.icoeff, cfgGetDesktopPrefs ()->outprec, pFilter->den.coeff[filterPrintCoeffCtx.icoeff])); } /* if */ yoffset += dy; } /* while */ } /* if */ cairo_stroke (cr); } /* filterPrintCoeffsDo() */ /* FUNCTION *******************************************************************/ /** \brief Callback function for the \e begin-print event. * * The \e begin-print event is emitted after the user has finished changing * print settings in the dialog, before the actual rendering starts. A typical * use for \e begin-print is to use the parameters from the \c GtkPrintContext * and paginate the document accordingly, and then set the number of pages * with \c gtk_print_operation_set_n_pages(). * * * \param[in] op the GtkPrintOperation on which the signal was emitted * \param[in] ctx the GtkPrintContext for the current operation * \param[in] ref user data set when the signal handler was connected * ******************************************************************************/ static void filterPrintResponseInit (GtkPrintOperation *op, GtkPrintContext *ctx, gpointer ref) { gtk_print_operation_set_use_full_page (op, FALSE); gtk_print_operation_set_unit (op, GTK_UNIT_PIXEL); /* set cairo transform */ gtk_print_operation_set_n_pages (op, 1); } /* filterPrintResponseInit() */ /* FUNCTION *******************************************************************/ /** \brief Callback function for the \e draw-page event. * * This function (signal handler for \e draw-page) is called for every page * that is printed. It renders the page onto the cairo context of page. * * \param[in] op the GtkPrintOperation on which the signal was emitted * \param[in] ctx the GtkPrintContext for the current operation * \param[in] pgno the number of the currently printed page * \param[in] ref reference pointer to response plot context * ::FILTERPRINT_RESPONSE_CONTEXT * ******************************************************************************/ static void filterPrintResponseDo (GtkPrintOperation *op, GtkPrintContext *ctx, int pgno, gpointer ref) { FLTCOEFF* pFilter = dfcPrjGetFilter (); if (pFilter != NULL) { FILTERPRINT_RESPONSE_CONTEXT* response = (FILTERPRINT_RESPONSE_CONTEXT*)ref; PLOT_DIAG* pDiag = &response->diag; /* shortcut */ cairo_t* cr = gtk_print_context_get_cairo_context (ctx); pDiag->area.y = 0; /* set size of plot area */ pDiag->area.height = gtk_print_context_get_height (ctx) / 2; pDiag->area.width = gtk_print_context_get_width (ctx); pDiag->area.x = FILTER_PRINT_LMARGIN (pDiag->area.width); pDiag->area.width -= pDiag->area.x; (void)responsePlotDraw (cr, response->type, pDiag); } /* if */ } /* filterPrintResponseDo() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** \brief Response plot print function. * * \param[in] topWidget Top widget associated with the \c GtkToolButton widget * which has caused the \e clicked event. * \param[in] pDiag Pointer to plot diag of associated response \p type. * \param[in] type ::RESPONSE_TYPE which identifies what response to print. * ******************************************************************************/ void filterPrintResponse (GtkWidget* topWidget, const PLOT_DIAG* pDiag, RESPONSE_TYPE type) { FILTERPRINT_RESPONSE_CONTEXT response = {.diag = *pDiag, .type = type}; GtkPrintOperation* print = gtk_print_operation_new (); g_signal_connect (print, "begin-print", G_CALLBACK (filterPrintResponseInit), NULL); g_signal_connect (print, "draw-page", G_CALLBACK (filterPrintResponseDo), &response); filterPrintDo (topWidget, print); g_object_unref (print); } /* filterPrintResponse() */ /* FUNCTION *******************************************************************/ /** \brief Coefficients print function. * * \note The signature of this function was chosen in a way that it is usual * as \e clicked event callback (when a print menuitem/button is pressed). * * \param[in] srcWidget \c GtkMenuItem on event \e activate or \c GtkToolButton * on event \e clicked, which causes this call. * \param[in] user_data Pointer to user data (unused). * ******************************************************************************/ void filterPrintCoeffs (GtkWidget* srcWidget, gpointer user_data) { GtkPrintOperation* print = gtk_print_operation_new (); g_signal_connect (print, "begin-print", G_CALLBACK (filterPrintCoeffsInit), NULL); g_signal_connect (print, "draw-page", G_CALLBACK (filterPrintCoeffsDo), NULL); filterPrintDo (gtk_widget_get_toplevel (srcWidget), print); g_object_unref (print); } /* filterPrintCoeffs() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/linFirDesignDlg.c0000664000175100001440000010214213711603224014245 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter dialog functions. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dfcgen.h" #include "cfgSettings.h" #include "projectFile.h" #include "linFirFilter.h" #include "filterSupport.h" #include "dialogSupport.h" #include "linFirDesignDlg.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Linear FIR filter characteristic (Blackman, Kaiser, etc.) */ typedef struct { LINFIR_TYPE type; /**< Associated characteristic (type of FIR) */ GtkWidget* btn; /**< Associated radio button widget */ char* name; /**< Radio button text (type name) */ } LINFIRDLG_CHAR; /** Linear FIR filter DSP windows. */ typedef struct { LINFIR_DSPWIN type; /**< Associated DSP window type */ GtkWidget* btn; /**< Associated radio button widget */ char* name; /**< Radio button text (type name) */ } LINFIRDLG_DSPWIN; /* LOCAL CONSTANT DEFINITIONS *************************************************/ /** Label for center frequency */ #define LINFIRDLG_LABEL_CENTER_TEXT _("fCenter") /** Label for cutoff frequency */ #define LINFIRDLG_LABEL_CUTOFF_TEXT _("fCutoff") #define LINFIRDLG_WIDGET_MAIN "linFirDesignDlgMain" #define LINFIRDLG_COMBO_FTR "comboFtrType" #define LINFIRDLG_ENTRY_BANDW "entryBandwidth" #define LINFIRDLG_LABEL_CENTER "labelCenterF" #define LINFIRDLG_CHKBTN_GEOMETRIC "checkGeometric" #define LINFIRDLG_ENTRY_CENTER "entryCenterF" #define LINFIRDLG_ENTRY_CUTOFF "entryCutF" #define LINFIRDLG_ENTRY_SAMPLE "entrySampleF" #define LINFIRDLG_SPIN_DEGREE "spinDegree" #define LINFIRDLG_ENTRY_KAISER "entryKaiser" #define LINFIRDLG_UNIT_CUTOFF "unitCutF" #define LINFIRDLG_UNIT_SAMPLE "unitSampleF" #define LINFIRDLG_UNIT_CENTER "unitCenterF" #define LINFIRDLG_UNIT_BANDW "unitBandwidth" /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** Array of all standard FIR filter types (in same order as the enums). */ static LINFIRDLG_CHAR linFirDlgChar[LINFIR_TYPE_SIZE] = { /* type, btn, name */ [LINFIR_TYPE_RECT] = {LINFIR_TYPE_RECT, NULL, N_("Rectangular (perfect)")}, [LINFIR_TYPE_COS] = {LINFIR_TYPE_COS, NULL, N_("Cosine")}, [LINFIR_TYPE_COS2] = {LINFIR_TYPE_COS2, NULL, N_("Squared cosine")}, [LINFIR_TYPE_GAUSS] = {LINFIR_TYPE_GAUSS, NULL, N_("Gaussian")}, [LINFIR_TYPE_SQR] = {LINFIR_TYPE_SQR, NULL, N_("Squared 1st order")} }; /* linFirDlgChar[] */ /* DSP window GtkRadioButton widgets */ static LINFIRDLG_DSPWIN linFirDlgWin[LINFIR_DSPWIN_SIZE] = { /* type, btn, name */ [LINFIR_DSPWIN_RECT] = {LINFIR_DSPWIN_RECT, NULL, N_("None")}, [LINFIR_DSPWIN_HAMMING] = {LINFIR_DSPWIN_HAMMING, NULL, N_("Hamming")}, [LINFIR_DSPWIN_VANHANN] = {LINFIR_DSPWIN_VANHANN, NULL, N_("van Hann")}, [LINFIR_DSPWIN_BLACKMAN] = {LINFIR_DSPWIN_BLACKMAN, NULL, N_("Blackman")}, [LINFIR_DSPWIN_KAISER] = {LINFIR_DSPWIN_KAISER, NULL, N_("Kaiser")} }; static const gboolean ftrEntry[FTR_SIZE][5] = { /* entryCutF, entryCenterF, entryBandwidth, checkGeometric, evenDegree */ [FTR_NON] = {TRUE, FALSE, FALSE, FALSE, FALSE}, [FTR_HIGHPASS] = {FALSE, TRUE, FALSE, FALSE, TRUE}, [FTR_BANDPASS] = {FALSE, TRUE, TRUE, TRUE, TRUE}, [FTR_BANDSTOP] = {FALSE, TRUE, TRUE, TRUE, TRUE}, }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void filterWindowChanged (GtkRadioButton* radiobutton, gpointer user_data); static void transformTypeChanged (GtkComboBox *combobox, gpointer user_data); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** This function is called if the DSP window type changes (\e toggle event * from radio button). * * \param radiobutton Radio button which changes the state. * \param user_data User data set when the signal handler was connected. In * that case it is of type LINFIR_DSPWIN. * ******************************************************************************/ static void filterWindowChanged (GtkRadioButton* radiobutton, gpointer user_data) { LINFIRDLG_DSPWIN *pDspWin = (LINFIRDLG_DSPWIN *)user_data; if (pDspWin->type == LINFIR_DSPWIN_KAISER) { gtk_widget_set_sensitive ( lookup_widget (GTK_WIDGET (radiobutton), LINFIRDLG_ENTRY_KAISER), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(radiobutton))); } /* if */ } /* filterWindowChanged() */ /* FUNCTION *******************************************************************/ /** This function is called if the frequency transform selection changes. * * \param combobox Combobox widget which determines the frequency * transformation. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ static void transformTypeChanged (GtkComboBox *combobox, gpointer user_data) { int i, index; GtkWidget *widget[4]; GtkWidget *label = lookup_widget (GTK_WIDGET (combobox), LINFIRDLG_LABEL_CENTER); widget[0] = lookup_widget (GTK_WIDGET (combobox), LINFIRDLG_ENTRY_CUTOFF); widget[1] = lookup_widget (GTK_WIDGET (combobox), LINFIRDLG_ENTRY_CENTER); widget[2] = lookup_widget (GTK_WIDGET (combobox), LINFIRDLG_ENTRY_BANDW); widget[3] = lookup_widget (GTK_WIDGET (combobox), LINFIRDLG_CHKBTN_GEOMETRIC); index = gtk_combo_box_get_active(combobox); if (index < 0) { index = 0; /* set any, in case nothing selected */ } /* if */ switch (index) { case FTR_HIGHPASS: gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), LINFIRDLG_LABEL_CUTOFF_TEXT); break; case FTR_BANDPASS: case FTR_BANDSTOP: gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), LINFIRDLG_LABEL_CENTER_TEXT); break; case FTR_NON: default: break; } /* switch */ for (i = 0; i < 4; i++) { gtk_widget_set_sensitive (widget[i], ftrEntry[index][i]); } /* for */ } /* transformTypeChanged() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog creation function. This function is * called if a linear FIR filter shall be designed. * * \note Originally generated by \e Glade, but heavy modified (see interface.c, * which isn't part of the project). * * \param topWidget Toplevel widget. * \param boxDesignDlg GtkVBox widget, which is the container for the dialog. * The dialog must be mapped to row 1 of it. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void linFirDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs) { LINFIR_TYPE type; LINFIR_DSPWIN win; GtkWidget *linFirDesignDlgMain, *comboFtr; GtkWidget *widget, *label, *frame, *box, *table; GtkObject *spinAdjust; GSList *firTypeRadioGroup = NULL; GSList *dspWinRadioGroup = NULL; linFirDesignDlgMain = gtk_table_new (2, 2, FALSE); gtk_box_pack_start (GTK_BOX (boxDesignDlg), linFirDesignDlgMain, TRUE, TRUE, 0); gtk_box_reorder_child (GTK_BOX (boxDesignDlg), linFirDesignDlgMain, 1); GLADE_HOOKUP_OBJECT (topWidget, linFirDesignDlgMain, LINFIRDLG_WIDGET_MAIN); /* Characteristic */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (linFirDesignDlgMain), frame, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Characteristic")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (widget), box); gtk_container_set_border_width (GTK_CONTAINER (box), 6); for (type = 0; type < LINFIR_TYPE_SIZE; type++) { linFirDlgChar[type].btn = gtk_radio_button_new_with_mnemonic ( NULL, gettext (linFirDlgChar[type].name)); gtk_box_pack_start (GTK_BOX (box), linFirDlgChar[type].btn, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (linFirDlgChar[type].btn), 1); gtk_radio_button_set_group (GTK_RADIO_BUTTON (linFirDlgChar[type].btn), firTypeRadioGroup); firTypeRadioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON (linFirDlgChar[type].btn)); } /* for */ /* Frequency transformation */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (linFirDesignDlgMain), frame, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Transform")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (4, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); widget = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Type of frequency transformation")); label = gtk_label_new_with_mnemonic (_("_Type")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); comboFtr = gtk_combo_box_new_text (); /* frequency transform combobox */ gtk_container_add (GTK_CONTAINER (widget), comboFtr); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("None")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Highpass")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Bandpass")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Bandstop")); GLADE_HOOKUP_OBJECT (topWidget, comboFtr, LINFIRDLG_COMBO_FTR); gtk_label_set_mnemonic_widget (GTK_LABEL (label), comboFtr); widget = gtk_entry_new (); /* bandwidth */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Bandwidth")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_ENTRY_BANDW); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), _("fBandw.")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* bandwidth unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, LINFIRDLG_UNIT_BANDW); widget = gtk_entry_new (); /* center frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Cutoff frequency (highpass) or center" " frequency (bandpass, bandstop)")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_ENTRY_CENTER); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), LINFIRDLG_LABEL_CENTER_TEXT); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); GLADE_HOOKUP_OBJECT (topWidget, label, LINFIRDLG_LABEL_CENTER); label = gtk_label_new (pPrefs->frequUnit.name); /* center frequency unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, LINFIRDLG_UNIT_CENTER); widget = gtk_check_button_new_with_mnemonic (_("_Geometric")); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Check this if the center frequency shall be the" " geometric mean between both cutoff frequencies" " (otherwise it is the arithmetic mean).")); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_CHKBTN_GEOMETRIC); /* Reference Lowpass */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (linFirDesignDlgMain), frame, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Lowpass")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (3, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); widget = gtk_entry_new (); /* cutoff frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); gtk_widget_set_tooltip_text (widget, _("Cutoff frequency")); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_ENTRY_CUTOFF); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), LINFIRDLG_LABEL_CUTOFF_TEXT); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* cutoff frequency unit label */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, LINFIRDLG_UNIT_CUTOFF); widget = gtk_entry_new (); /* sample frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Sample frequency")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_ENTRY_SAMPLE); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), _("f_Sample")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* sample frequency unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, LINFIRDLG_UNIT_SAMPLE); /* degree spin-button */ spinAdjust = gtk_adjustment_new (1, FLT_DEGREE_MIN, FLT_DEGREE_MAX, 1, 10, 0); widget = gtk_spin_button_new (GTK_ADJUSTMENT (spinAdjust), 1, 0); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Degree of filter")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_SPIN_DEGREE); label = gtk_label_new_with_mnemonic (_("_Degree")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* DSP window */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (linFirDesignDlgMain), frame, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Window")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (5, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); for (win = 0; win < LINFIR_DSPWIN_SIZE; win++) { linFirDlgWin[win].btn = gtk_radio_button_new_with_mnemonic ( NULL, gettext (linFirDlgWin[win].name)); gtk_table_attach (GTK_TABLE (table), linFirDlgWin[win].btn, 0, (win == LINFIR_DSPWIN_KAISER)? 1 : 2, win, win + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (linFirDlgWin[win].btn), 1); gtk_radio_button_set_group (GTK_RADIO_BUTTON (linFirDlgWin[win].btn), dspWinRadioGroup); dspWinRadioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON (linFirDlgWin[win].btn)); g_signal_connect ((gpointer) linFirDlgWin[win].btn, "toggled", G_CALLBACK (filterWindowChanged), &linFirDlgWin[win]); } /* for */ widget = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), widget, 2, 3, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_sensitive (widget, FALSE); gtk_widget_set_tooltip_text (widget, _("Parameter of Kaiser window")); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, LINFIRDLG_ENTRY_KAISER); label = gtk_label_new (_("α=")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* Final */ g_signal_connect ((gpointer) comboFtr, "changed", G_CALLBACK (transformTypeChanged), NULL); gtk_widget_show_all (linFirDesignDlgMain); gtk_combo_box_set_active(GTK_COMBO_BOX (comboFtr), FTR_NON); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (linFirDlgChar[LINFIR_TYPE_RECT].btn), TRUE); gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (linFirDlgWin[LINFIR_DSPWIN_RECT].btn), TRUE); } /* linFirDesignDlgCreate() */ /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog preset function. Restores all states * of dialog elements from design data of a linear FIR filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to linear FIR design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used * as input). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void linFirDesignDlgPreset (GtkWidget *topWidget, const LINFIR_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs) { gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, LINFIRDLG_UNIT_SAMPLE)), pPrefs->frequUnit.name); /* set units */ gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, LINFIRDLG_UNIT_CUTOFF)), pPrefs->frequUnit.name); gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, LINFIRDLG_UNIT_CENTER)), pPrefs->frequUnit.name); gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, LINFIRDLG_UNIT_BANDW)), pPrefs->frequUnit.name); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON ( linFirDlgChar[pDesign->type].btn), TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON ( linFirDlgWin[pDesign->dspwin].btn), TRUE); if (pDesign->dspwin == LINFIR_DSPWIN_KAISER) { /* Kaiser alpha */ dlgSetDouble (topWidget, LINFIRDLG_ENTRY_KAISER, 1.0, pDesign->winparm); } /* if */ gtk_spin_button_set_value (GTK_SPIN_BUTTON (lookup_widget (topWidget, LINFIRDLG_SPIN_DEGREE)), pDesign->order); /* degree */ dlgSetDouble (topWidget, LINFIRDLG_ENTRY_SAMPLE, /* sample frequency */ pPrefs->frequUnit.multiplier, pFilter->f0); gtk_combo_box_set_active (GTK_COMBO_BOX (lookup_widget (topWidget, LINFIRDLG_COMBO_FTR)), pDesign->ftr.type); /* transform */ if (ftrEntry[pDesign->ftr.type][0]) { dlgSetDouble (topWidget, LINFIRDLG_ENTRY_CUTOFF, /* cutoff frequency */ pPrefs->frequUnit.multiplier, pDesign->cutoff); } /* if */ if (ftrEntry[pDesign->ftr.type][1]) { dlgSetDouble (topWidget, LINFIRDLG_ENTRY_CENTER, /* center frequency */ pPrefs->frequUnit.multiplier, pDesign->ftr.fc); } /* if */ if (ftrEntry[pDesign->ftr.type][2]) { dlgSetDouble (topWidget, LINFIRDLG_ENTRY_BANDW, /* bandwidth */ pPrefs->frequUnit.multiplier, pDesign->ftr.bw); } /* if */ if (ftrEntry[pDesign->ftr.type][3]) /* geometric check button */ { gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( lookup_widget (topWidget, LINFIRDLG_CHKBTN_GEOMETRIC)), pDesign->ftr.flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC); } /* if */ } /* linFirDesignDlgPreset() */ /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void linFirDesignDlgDestroy (GtkWidget *topWidget) { GtkWidget* widget = lookup_widget (topWidget, LINFIRDLG_WIDGET_MAIN); if (widget != NULL) { /* remove all references */ GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_COMBO_FTR); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_CHKBTN_GEOMETRIC); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_ENTRY_BANDW); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_LABEL_CENTER); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_ENTRY_CENTER); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_ENTRY_CUTOFF); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_ENTRY_SAMPLE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_SPIN_DEGREE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, LINFIRDLG_ENTRY_KAISER); GLADE_HOOKUP_OBJECT_NO_REF(topWidget, NULL, LINFIRDLG_WIDGET_MAIN); gtk_widget_destroy(widget); } /* if */ } /* linFirDesignDlgDestroy() */ /* FUNCTION *******************************************************************/ /** Checks whether the linear FIR filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * linear FIR dialog found), else FALSE. ******************************************************************************/ BOOL linFirDesignDlgActive (GtkWidget *topWidget) { GtkWidget* widget = lookup_widget (topWidget, LINFIRDLG_WIDGET_MAIN); return (widget != NULL); } /* linFirDesignDlgActive() */ /* FUNCTION *******************************************************************/ /** Linear FIR filter design dialog ready/apply function. * * \param topWidget Toplevel widget. * \param pPrefs Pointer to desktop preferences. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int linFirDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs) { GtkWidget *combo; FLTCOEFF filter; int err = INT_MAX; LINFIR_DESIGN design = {LINFIR_TYPE_SIZE - 1, 0}; /* preset design */ while ((design.type > 0) && /* search active characteristic radio button */ !gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON(linFirDlgChar[design.type].btn))) { --design.type; } /* while */ design.dspwin = LINFIR_DSPWIN_SIZE - 1; while ((design.dspwin > 0) && /* search active DSP window radio button */ !gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON(linFirDlgWin[design.dspwin].btn))) { --design.dspwin; } /* while */ combo = lookup_widget (topWidget, LINFIRDLG_COMBO_FTR); if (dlgGetInt (topWidget, LINFIRDLG_SPIN_DEGREE, FLT_DEGREE_MIN, FLT_DEGREE_MAX, &design.order) && dlgGetDouble (topWidget, LINFIRDLG_ENTRY_SAMPLE, FLT_SAMPLE_MIN, FLT_SAMPLE_MAX, pPrefs->frequUnit.multiplier, &filter.f0)) { gint idx = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); if (idx < 0) { design.ftr.type = FTR_NON; /* set none, in case nothing selected */ } /* if */ else { design.ftr.type = idx; } /* else */ if (ftrEntry[design.ftr.type][4] && GSL_IS_ODD(design.order)) { dlgError(topWidget, _("Degree must be even for frequency transformation.")); return INT_MAX; } if (ftrEntry[design.ftr.type][0]) /* lowpass cutoff frequency required? */ { if (!dlgGetDouble (topWidget, LINFIRDLG_ENTRY_CUTOFF, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.cutoff)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][1]) /* center frequency required? */ { if (!dlgGetDouble (topWidget, LINFIRDLG_ENTRY_CENTER, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.ftr.fc)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][2]) /* bandwidth required? */ { if (!dlgGetDouble (topWidget, LINFIRDLG_ENTRY_BANDW, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.ftr.bw)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][3]) /* geometric bandwidth check button? */ { if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( lookup_widget (topWidget, LINFIRDLG_CHKBTN_GEOMETRIC)))) { design.ftr.flags |= FTRDESIGN_FLAG_CENTER_GEOMETRIC; } /* if */ } /* if */ if (design.dspwin == LINFIR_DSPWIN_KAISER) { if (!dlgGetDouble (topWidget, LINFIRDLG_ENTRY_KAISER, 2.0, 10.0, 1.0, &design.winparm)) { return INT_MAX; } /* if */ } /* if */ err = linFirFilterGen (&design, &filter); /* generate the FIR filter */ if (!FLTERR_CRITICAL (err)) { if (!ftrEntry[design.ftr.type][0]) { /* show (derived) lowpass cutoff frequency on HP, BP, BS */ dlgSetDouble (topWidget, LINFIRDLG_ENTRY_CUTOFF, pPrefs->frequUnit.multiplier, design.cutoff); } /* if */ dfcPrjSetFilter (FLTCLASS_LINFIR, &filter, (DESIGNDLG *)&design); } /* if */ } /* if */ return err; } /* linFirDesignDlgApply() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/responsePlot.c0000644000175100001440000004244613711066530013751 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response plotter. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "dfcProject.h" #include "cairoPlot.h" #include "responsePlot.h" #include "filterResponse.h" #include "cfgSettings.h" #include /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Response plot description */ typedef struct { RESPONSE_TYPE type; /**< Type of response plot/window */ PLOT_FUNC_GET sampleFunc; /**< real-world function y=f(x) */ PLOT_FUNC_INIT initFunc; /**< plot initialization function (may be NULL) */ PLOT_FUNC_END endFunc; /**< plot de-initialization function (may be NULL) */ void *pData; /**< Original data pointer (may be NULL) */ FLTCOEFF *pFilter; /**< Pointer to filter coefficients */ FLTRESP_TIME_WORKSPACE *pWorkspace; /**< Time response workspace pointer */ } RESPONSE_PLOT; /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static double plotMagnitude (double *px, void *pData); static double plotAttenuation (double *f, void *pData); static double plotChar (double *f, void *pData); static double plotPhase (double *f, void *pData); static double plotPhaseDelay (double *f, void *pData); static double plotGroupDelay (double *f, void *pData); static int plotImpulseInit (double start, double stop, void *pData); static int plotStepInit (double start, double stop, void *pData); static double timeResponse (double *t, void *pData); static void timeResponseEnd (void *pData); /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** All predefined response plots (partially intialized). */ static RESPONSE_PLOT responsePlot[RESPONSE_TYPE_SIZE] = { [RESPONSE_TYPE_MAGNITUDE] = { .type = RESPONSE_TYPE_MAGNITUDE, .sampleFunc = plotMagnitude, }, [RESPONSE_TYPE_ATTENUATION] = { .type = RESPONSE_TYPE_ATTENUATION, .sampleFunc = plotAttenuation, }, [RESPONSE_TYPE_CHAR] = { .type = RESPONSE_TYPE_CHAR, .sampleFunc = plotChar, }, [RESPONSE_TYPE_PHASE] = { .type = RESPONSE_TYPE_PHASE, .sampleFunc = plotPhase, }, [RESPONSE_TYPE_DELAY] = { .type = RESPONSE_TYPE_DELAY, .sampleFunc = plotPhaseDelay, }, [RESPONSE_TYPE_GROUP] = { .type = RESPONSE_TYPE_GROUP, .sampleFunc = plotGroupDelay, }, [RESPONSE_TYPE_IMPULSE] = { .type = RESPONSE_TYPE_IMPULSE, .sampleFunc = timeResponse, .initFunc = plotImpulseInit, .endFunc = timeResponseEnd, }, [RESPONSE_TYPE_STEP] = { .type = RESPONSE_TYPE_STEP, .sampleFunc = timeResponse, .initFunc = plotStepInit, .endFunc = timeResponseEnd } }; /* responsePlot[] */ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Computes the magnitude response of a filter (for usage on a \e Cairo plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_MAGNITUDE]. * * \return Calculated real-world y-coordinate on success. If there * is no value at \p x resp. frequency (may be a singularity), * then it returns GSL_POSINF or GSL_NEGINF. ******************************************************************************/ static double plotMagnitude (double *f, void *pData) { return filterResponseMagnitude (*f, ((RESPONSE_PLOT *)pData)->pFilter); } /* plotMagnitude() */ /* FUNCTION *******************************************************************/ /** Computes the attenuation response of a filter (for usage on a \e Cairo plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_ATTENUATION]. * * \return Calculated real-world y-coordinate on success. If there * is no value at \p x resp. frequency (may be a singularity), * then it returns GSL_POSINF or GSL_NEGINF. ******************************************************************************/ static double plotAttenuation (double *f, void *pData) { return filterResponseAttenuation (*f, ((RESPONSE_PLOT *)pData)->pFilter); } /* plotAttenuation() */ /* FUNCTION *******************************************************************/ /** Computes the phase response of a filter (for usage on a \e Cairo plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_PHASE]. * * \return Calculated phase (real-world y-coordinate) on success. If * there is no value at \p x resp. frequency (may be a * singularity), then it returns GSL_POSINF or GSL_NEGINF. * \todo Check phase response of linear FIR filters and improve the graph layout. ******************************************************************************/ static double plotPhase (double *f, void *pData) { double phase = filterResponsePhase (*f, ((RESPONSE_PLOT *)pData)->pFilter); if (gsl_finite (phase)) { phase = phase / M_PI * 180; } /* if */ return phase; } /* plotPhase() */ /* FUNCTION *******************************************************************/ /** Computes the phase delay response of a filter (for usage on a \e Cairo plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_DELAY]. * * \return Calculated phase delay (real-world y-coordinate) on * success. If there is no value at \p x resp. frequency * (may be a singularity), then it returns GSL_POSINF or * GSL_NEGINF. ******************************************************************************/ static double plotPhaseDelay (double *f, void *pData) { double delay = filterResponsePhaseDelay (*f, ((RESPONSE_PLOT *)pData)->pFilter); if (gsl_finite (delay)) { if (delay < -DBL_EPSILON) /* time delay should not be negative */ { /* transform into positive values */ delay -= (2.0 * M_PI) * floor(delay / (2.0 * M_PI)); } /* if */ } /* if */ return delay; } /* plotPhaseDelay() */ /* FUNCTION *******************************************************************/ /** Computes the group delay response of a filter (for usage on a \e Cairo plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_GROUP]. * * \return Calculated group delay (real-world y-coordinate) on * success. If there is no value at \p x resp. frequency * (may be a singularity), then it returns GSL_POSINF or * GSL_NEGINF. ******************************************************************************/ static double plotGroupDelay (double *f, void *pData) { return filterResponseGroupDelay (*f, ((RESPONSE_PLOT *)pData)->pFilter); } /* plotGroupDelay() */ /* FUNCTION *******************************************************************/ /** Computes the characteristic function of a filter (for usage on a \e Cairo * plot). * * \param f Pointer to real-world x-coordinate (input value), means * the frequency here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_CHAR]. * * \return Calculated phase (real-world y-coordinate) on success. If * there is no value at \p x resp. frequency (may be a * singularity), then it returns GSL_POSINF or GSL_NEGINF. ******************************************************************************/ static double plotChar (double *f, void *pData) { return filterResponseChar (*f, ((RESPONSE_PLOT *)pData)->pFilter); } /* plotChar() */ /* FUNCTION *******************************************************************/ /** Initializes the impulse response of a filter (for usage on a \e Cairo plot). * * \param start Time to start (must be positive). * \param stop Time to stop (must be positive). * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_IMPULSE]. * * \return The function returns: * - the value zero, if the number of samples is determined by member * \a num in PLOT_DIAG; * - a value greater than zero (to overwrite \a num), which determines * the number of samples in interval \a start - \a stop; * - a negative number, if if there was a singularity or any error. ******************************************************************************/ static int plotImpulseInit (double start, double stop, void *pData) { RESPONSE_PLOT *pResponse = pData; pResponse->pWorkspace = filterResponseTimeNew (start, stop, FLTSIGNAL_DIRAC, pResponse->pFilter); if (pResponse->pWorkspace == NULL) { return -1; } /* if */ return pResponse->pWorkspace->samples; } /* plotImpulseInit() */ /* FUNCTION *******************************************************************/ /** Initializes the step response of a filter (for usage on a \e Cairo plot). * * \param start Time to start (must be positive). * \param stop Time to stop (must be positive). * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_STEP]. * * \return The function returns: * - the value zero, if the number of samples is determined by member * \a num in PLOT_DIAG; * - a value greater than zero (to overwrite \a num), which determines * the number of samples in interval \a start - \a stop; * - a negative number, if if there was a singularity or any error. ******************************************************************************/ static int plotStepInit (double start, double stop, void *pData) { RESPONSE_PLOT *pResponse = pData; pResponse->pWorkspace = filterResponseTimeNew (start, stop, FLTSIGNAL_HEAVISIDE, pResponse->pFilter); if (pResponse->pWorkspace == NULL) { return -1; } /* if */ return pResponse->pWorkspace->samples; } /* plotStepInit() */ /* FUNCTION *******************************************************************/ /** Computes the time domain response of a filter (for usage on a \e Cairo plot). * * \param t Pointer to real-world x-coordinate (output value), * means the time here. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. In that * special case here it is a pointer to * responsePlot[RESPONSE_TYPE_IMPULSE] or * responsePlot[RESPONSE_TYPE_STEP]. * * \return Calculated phase (real-world y-coordinate) on success. If * there is no value at \p x resp. frequency (may be a * singularity), then it returns GSL_POSINF or GSL_NEGINF. ******************************************************************************/ static double timeResponse (double *t, void *pData) { return filterResponseTimeNext (((RESPONSE_PLOT *)pData)->pWorkspace, t); } /* timeResponse() */ /* FUNCTION *******************************************************************/ /** End of time response plot function. * * \param pData User application data pointer as stored in member * \a pData of structure PLOT_DIAG (as passed to function * cairoPlot2d(). ******************************************************************************/ static void timeResponseEnd (void *pData) { ASSERT (pData != NULL); filterResponseTimeFree (((RESPONSE_PLOT *)pData)->pWorkspace); } /* timeResponseEnd() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Response plot drawing function. * * \param cr \e Cairo context for drawing, which may be retrieved * e.g. by the help of following functions: * - gdk_cairo_create () * - gtk_print_context_get_cairo_context() * \param type Type of response plot. * \param pDiag Pointer to plot data. Notice that the callbacks * \a initFunc, \a endFunc and \a sampleFunc will be * overwritten (from callbacks associated with \p type). * * \return The number of samples taken to draw this response * (independent of a possible break) or a negative * number on error. ******************************************************************************/ int responsePlotDraw (cairo_t* cr, RESPONSE_TYPE type, PLOT_DIAG *pDiag) { int points = 0; RESPONSE_PLOT *pResponse = &responsePlot[type]; const CFG_DESKTOP* pPrefs = cfgGetDesktopPrefs (); ASSERT (type < RESPONSE_TYPE_SIZE); pResponse->pFilter = dfcPrjGetFilter (); switch (type) { case RESPONSE_TYPE_IMPULSE: case RESPONSE_TYPE_STEP: pDiag->x.pUnit = &pPrefs->timeUnit; break; case RESPONSE_TYPE_DELAY: case RESPONSE_TYPE_GROUP: pDiag->y.pUnit = &pPrefs->timeUnit; /* fall through here */ case RESPONSE_TYPE_MAGNITUDE: case RESPONSE_TYPE_ATTENUATION: case RESPONSE_TYPE_CHAR: case RESPONSE_TYPE_PHASE: pDiag->x.pUnit = &pPrefs->frequUnit; break; default: ASSERT (0); } /* switch */ if (pResponse->pFilter != NULL) { pResponse->pData = pDiag->pData; /* save original data pointer */ pDiag->pData = pResponse; /* set private data pointer */ pDiag->initFunc = pResponse->initFunc; pDiag->sampleFunc = pResponse->sampleFunc; pDiag->endFunc = pResponse->endFunc; pDiag->x.prec = pDiag->y.prec = pPrefs->outprec; points = cairoPlot2d (cr, pDiag); pDiag->pData = pResponse->pData; /* restore original data pointer */ } /* if */ return points; } /* responsePlotDraw() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/stdIirDesignDlg.c0000644000175100001440000011023013711064043014253 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter dialog functions. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dfcgen.h" #include "cfgSettings.h" #include "projectFile.h" #include "stdIirFilter.h" #include "filterSupport.h" #include "dialogSupport.h" #include "stdIirDesignDlg.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Standard IIR filter characteristic */ typedef struct { STDIIR_TYPE type; /**< Associated characteristic (type of IIR) */ GtkWidget* btn; /**< Associated radio button widget */ char* name; /**< Radio button text (name of characteristic) */ BOOL hasRipple; /**< TRUE if ripple attenuation is an input parameter */ BOOL hasStopband; /**< TRUE if stopband attenuation is an input parameter */ BOOL hasAngle; /**< TRUE if angle is an input parameter */ } STDIIR_DLG_CHAR; /* LOCAL CONSTANT DEFINITIONS *************************************************/ /** Label for center frequency */ #define STDIIRDLG_LABEL_CENTER_TEXT _("fCenter") /** Label for cutoff frequency */ #define STDIIRDLG_LABEL_CUTOFF_TEXT _("fCutoff") #define STDIIRDLG_WIDGET_MAIN "stdIirDesignDlgMain" #define STDIIRDLG_COMBO_FTR "comboFtrType" #define STDIIRDLG_ENTRY_BANDW "entryBandwidth" #define STDIIRDLG_LABEL_CENTER "labelCenterF" #define STDIIRDLG_CHKBTN_GEOMETRIC "checkGeometric" #define STDIIRDLG_ENTRY_CENTER "entryCenterF" #define STDIIRDLG_ENTRY_CUTOFF "entryCutF" #define STDIIRDLG_ENTRY_SAMPLE "entrySampleF" #define STDIIRDLG_SPIN_DEGREE "spinDegree" #define STDIIRDLG_ENTRY_RIPPLE "entryRipple" #define STDIIRDLG_ENTRY_MINATT "entryMinAtt" #define STDIIRDLG_SPIN_ANGLE "spinAngle" #define STDIIRDLG_UNIT_CUTOFF "unitCutF" #define STDIIRDLG_UNIT_SAMPLE "unitSampleF" #define STDIIRDLG_UNIT_CENTER "unitCenterF" #define STDIIRDLG_UNIT_BANDW "unitBandwidth" /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** Array of all standard IIR filter types (in same order as the enums). */ static STDIIR_DLG_CHAR stdIirDlgChar[STDIIR_TYPE_SIZE] = { /* type, btn, name, hasRipple, hasStopband, hasAngle */ {STDIIR_TYPE_BUTTERWORTH, NULL, N_("Butterworth"), FALSE, FALSE, FALSE}, {STDIIR_TYPE_CHEBY, NULL, N_("Chebyshev"), TRUE, FALSE, FALSE}, {STDIIR_TYPE_CHEBYINV, NULL, N_("Chebyshev Inv."), FALSE, TRUE, FALSE}, {STDIIR_TYPE_CAUER1, NULL, N_("Cauer (Case I)"), TRUE, FALSE, TRUE}, {STDIIR_TYPE_CAUER2, NULL, N_("Cauer (Case II)"), FALSE, TRUE, TRUE}, {STDIIR_TYPE_BESSEL, NULL, N_("Bessel"), FALSE, FALSE, FALSE} }; /* stdIirDlgChar[] */ static const gboolean ftrEntry[FTR_SIZE][5] = { /* entryCutF, entryCenterF, entryBandwidth, checkGeometric, evenDegree */ [FTR_NON] = {TRUE, FALSE, FALSE, FALSE, FALSE}, [FTR_HIGHPASS] = {FALSE, TRUE, FALSE, FALSE, FALSE}, [FTR_BANDPASS] = {FALSE, TRUE, TRUE, TRUE, TRUE}, [FTR_BANDSTOP] = {FALSE, TRUE, TRUE, TRUE, TRUE}, }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void filterTypeChanged (GtkRadioButton* radiobutton, gpointer user_data); static void transformTypeChanged (GtkComboBox *combobox, gpointer user_data); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** This function is called if the IIR filter type changes (\e toggle event * from radio button). * * \param radiobutton Radio button which changes the state. * \param user_data User data set when the signal handler was connected. In * that case it points to the associated STDIIR_DLG_CHAR. * ******************************************************************************/ static void filterTypeChanged (GtkRadioButton* radiobutton, gpointer user_data) { STDIIR_DLG_CHAR *pDesc = (STDIIR_DLG_CHAR*) user_data; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(radiobutton))) { /* really not de-activated */ gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (radiobutton), STDIIRDLG_ENTRY_RIPPLE), pDesc->hasRipple); gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (radiobutton), STDIIRDLG_ENTRY_MINATT), pDesc->hasStopband); gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (radiobutton), STDIIRDLG_SPIN_ANGLE), pDesc->hasAngle); } /* if */ } /* filterTypeChanged() */ /* FUNCTION *******************************************************************/ /** This function is called if the frequency transform selection changes. * * \param combobox Combobox widget which determines the frequency * transformation. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ static void transformTypeChanged (GtkComboBox *combobox, gpointer user_data) { int i, index; GtkWidget *widget[4]; GtkWidget *label = lookup_widget (GTK_WIDGET (combobox), STDIIRDLG_LABEL_CENTER); widget[0] = lookup_widget (GTK_WIDGET (combobox), STDIIRDLG_ENTRY_CUTOFF); widget[1] = lookup_widget (GTK_WIDGET (combobox), STDIIRDLG_ENTRY_CENTER); widget[2] = lookup_widget (GTK_WIDGET (combobox), STDIIRDLG_ENTRY_BANDW); widget[3] = lookup_widget (GTK_WIDGET (combobox), STDIIRDLG_CHKBTN_GEOMETRIC); index = gtk_combo_box_get_active(combobox); if (index < 0) { index = 0; /* set any, in case nothing selected */ } /* if */ switch (index) { case FTR_HIGHPASS: gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), STDIIRDLG_LABEL_CUTOFF_TEXT); break; case FTR_BANDPASS: case FTR_BANDSTOP: gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), STDIIRDLG_LABEL_CENTER_TEXT); break; case FTR_NON: default: break; } /* switch */ for (i = 0; i < 4; i++) { gtk_widget_set_sensitive (widget[i], ftrEntry[index][i]); } /* for */ } /* transformTypeChanged() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog creation function. This function is * called if a standard IIR filter shall be designed. * * \note Originally generated by \e Glade, but heavy modified (see interface.c, * which isn't part of the project). * * \param topWidget Toplevel widget. * \param boxDesignDlg GtkVBox widget, which is the container for the dialog. * The dialog must be mapped to row 1 of it. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void stdIirDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs) { STDIIR_TYPE type; GtkWidget *stdIirDesignDlgMain, *comboFtr; GtkWidget *widget, *label, *frame, *box, *table; GtkObject *spinAdjust; GSList *iirTypeRadioGroup = NULL; stdIirDesignDlgMain = gtk_table_new (2, 2, FALSE); gtk_box_pack_start (GTK_BOX (boxDesignDlg), stdIirDesignDlgMain, TRUE, TRUE, 0); gtk_box_reorder_child (GTK_BOX (boxDesignDlg), stdIirDesignDlgMain, 1); GLADE_HOOKUP_OBJECT (topWidget, stdIirDesignDlgMain, STDIIRDLG_WIDGET_MAIN); /* Characteristic */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (stdIirDesignDlgMain), frame, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Characteristic")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (widget), box); gtk_container_set_border_width (GTK_CONTAINER (box), 6); for (type = 0; type < STDIIR_TYPE_SIZE; type++) { stdIirDlgChar[type].btn = gtk_radio_button_new_with_mnemonic ( NULL, gettext (stdIirDlgChar[type].name)); gtk_box_pack_start (GTK_BOX (box), stdIirDlgChar[type].btn, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (stdIirDlgChar[type].btn), 1); gtk_radio_button_set_group (GTK_RADIO_BUTTON (stdIirDlgChar[type].btn), iirTypeRadioGroup); iirTypeRadioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON (stdIirDlgChar[type].btn)); g_signal_connect ((gpointer) stdIirDlgChar[type].btn, "toggled", G_CALLBACK (filterTypeChanged), &stdIirDlgChar[type]); } /* for */ /* Frequency transformation */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (stdIirDesignDlgMain), frame, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Transform")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (4, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); widget = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), widget, 1, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Type of frequency transformation")); label = gtk_label_new_with_mnemonic (_("_Type")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); comboFtr = gtk_combo_box_new_text (); /* frequency transform combobox */ gtk_container_add (GTK_CONTAINER (widget), comboFtr); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("None")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Highpass")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Bandpass")); gtk_combo_box_append_text (GTK_COMBO_BOX (comboFtr), _("Bandstop")); GLADE_HOOKUP_OBJECT (topWidget, comboFtr, STDIIRDLG_COMBO_FTR); gtk_label_set_mnemonic_widget (GTK_LABEL (label), comboFtr); widget = gtk_entry_new (); /* bandwidth */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Bandwidth")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_BANDW); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), _("fBandw.")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* bandwidth unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, STDIIRDLG_UNIT_BANDW); widget = gtk_entry_new (); /* center frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Cutoff frequency (highpass) or center" " frequency (bandpass, bandstop)")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_CENTER); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), STDIIRDLG_LABEL_CENTER_TEXT); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); GLADE_HOOKUP_OBJECT (topWidget, label, STDIIRDLG_LABEL_CENTER); label = gtk_label_new (pPrefs->frequUnit.name); /* center frequency unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, STDIIRDLG_UNIT_CENTER); widget = gtk_check_button_new_with_mnemonic (_("_Geometric")); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Check this if the center frequency shall be the" " geometric mean between both cutoff frequencies" " (otherwise it is the arithmetic mean).")); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_CHKBTN_GEOMETRIC); /* Reference Lowpass */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (stdIirDesignDlgMain), frame, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Lowpass")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (3, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); widget = gtk_entry_new (); /* cutoff frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); gtk_widget_set_tooltip_text (widget, _("Cutoff frequency")); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_CUTOFF); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL(label), STDIIRDLG_LABEL_CUTOFF_TEXT); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* cutoff frequency unit label */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, STDIIRDLG_UNIT_CUTOFF); widget = gtk_entry_new (); /* sample frequency */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Sample frequency")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_SAMPLE); label = gtk_label_new (NULL); gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), _("f_Sample")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new (pPrefs->frequUnit.name); /* sample frequency unit */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, STDIIRDLG_UNIT_SAMPLE); /* degree spin-button */ spinAdjust = gtk_adjustment_new (1, FLT_DEGREE_MIN, FLT_DEGREE_MAX, 1, 10, 0); widget = gtk_spin_button_new (GTK_ADJUSTMENT (spinAdjust), 1, 0); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Degree of filter")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_SPIN_DEGREE); label = gtk_label_new_with_mnemonic (_("_Degree")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* Parameters */ frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (stdIirDesignDlgMain), frame, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); label = gtk_label_new (_("Parameters")); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (frame), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); table = gtk_table_new (3, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), table); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); label = gtk_label_new ("dB"); gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); label = gtk_label_new ("dB"); gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); label = gtk_label_new ("°"); /* angle unit (degree, coded as UTF-8) */ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); /* passband ripple attenuation */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Passband ripple in dB")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); gtk_widget_set_sensitive (widget, FALSE); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_RIPPLE); label = gtk_label_new_with_mnemonic (_("Ripple")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); widget = gtk_entry_new (); /* minimum stopband attenuation */ gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Stopband attenuation in dB")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); gtk_widget_set_sensitive (widget, FALSE); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_ENTRY_MINATT); label = gtk_label_new_with_mnemonic (_("Stop")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); spinAdjust = gtk_adjustment_new (45, 1, 89, 1, 10, 0); /* elliptic angle */ widget = gtk_spin_button_new (GTK_ADJUSTMENT (spinAdjust), 1, 0); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Modular angle in degree")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); gtk_widget_set_sensitive (widget, FALSE); GLADE_HOOKUP_OBJECT (topWidget, widget, STDIIRDLG_SPIN_ANGLE); label = gtk_label_new_with_mnemonic (_("Angle")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); g_signal_connect ((gpointer) comboFtr, "changed", G_CALLBACK (transformTypeChanged), NULL); gtk_widget_show_all (stdIirDesignDlgMain); gtk_combo_box_set_active(GTK_COMBO_BOX (comboFtr), FTR_NON); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(stdIirDlgChar[STDIIR_TYPE_BUTTERWORTH].btn), TRUE); } /* stdIirDesignDlgCreate() */ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog preset function. Restores all states * of dialog elements from design data of a standard IIR filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to standard IIR design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void stdIirDesignDlgPreset (GtkWidget *topWidget, const STDIIR_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs) { gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, STDIIRDLG_UNIT_SAMPLE)), pPrefs->frequUnit.name); /* set units */ gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, STDIIRDLG_UNIT_CUTOFF)), pPrefs->frequUnit.name); gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, STDIIRDLG_UNIT_CENTER)), pPrefs->frequUnit.name); gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, STDIIRDLG_UNIT_BANDW)), pPrefs->frequUnit.name); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON ( stdIirDlgChar[pDesign->type].btn), TRUE); if (stdIirDlgChar[pDesign->type].hasRipple) /* passband ripple */ { dlgSetDouble (topWidget, STDIIRDLG_ENTRY_RIPPLE, 1.0, pDesign->ripple); } /* if */ if (stdIirDlgChar[pDesign->type].hasStopband) /* stopband attenuation */ { dlgSetDouble (topWidget, STDIIRDLG_ENTRY_MINATT, 1.0, pDesign->minatt); } /* if */ if (stdIirDlgChar[pDesign->type].hasAngle) /* modular angle (elliptic) */ { dlgSetDouble (topWidget, STDIIRDLG_SPIN_ANGLE, 1.0, pDesign->angle); } /* if */ gtk_spin_button_set_value (GTK_SPIN_BUTTON (lookup_widget (topWidget, STDIIRDLG_SPIN_DEGREE)), pDesign->order); /* degree */ dlgSetDouble (topWidget, STDIIRDLG_ENTRY_SAMPLE, /* sample frequency */ pPrefs->frequUnit.multiplier, pFilter->f0); gtk_combo_box_set_active(GTK_COMBO_BOX (lookup_widget (topWidget, STDIIRDLG_COMBO_FTR)), pDesign->ftr.type); /* transform */ if (ftrEntry[pDesign->ftr.type][0]) { dlgSetDouble (topWidget, STDIIRDLG_ENTRY_CUTOFF, /* cutoff frequency */ pPrefs->frequUnit.multiplier, pDesign->cutoff); } /* if */ if (ftrEntry[pDesign->ftr.type][1]) { dlgSetDouble (topWidget, STDIIRDLG_ENTRY_CENTER, /* center frequency */ pPrefs->frequUnit.multiplier, pDesign->ftr.fc); } /* if */ if (ftrEntry[pDesign->ftr.type][2]) { dlgSetDouble (topWidget, STDIIRDLG_ENTRY_BANDW, /* bandwidth */ pPrefs->frequUnit.multiplier, pDesign->ftr.bw); } /* if */ if (ftrEntry[pDesign->ftr.type][3]) /* geometric check button */ { gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( lookup_widget (topWidget, STDIIRDLG_CHKBTN_GEOMETRIC)), pDesign->ftr.flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC); } /* if */ } /* stdIirDesignDlgPreset() */ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void stdIirDesignDlgDestroy (GtkWidget *topWidget) { GtkWidget* widget = lookup_widget (topWidget, STDIIRDLG_WIDGET_MAIN); if (widget != NULL) { /* remove all references */ GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_COMBO_FTR); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_CHKBTN_GEOMETRIC); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_BANDW); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_LABEL_CENTER); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_CENTER); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_CUTOFF); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_SAMPLE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_SPIN_DEGREE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_RIPPLE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_ENTRY_MINATT); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, STDIIRDLG_SPIN_ANGLE); GLADE_HOOKUP_OBJECT_NO_REF(topWidget, NULL, STDIIRDLG_WIDGET_MAIN); gtk_widget_destroy(widget); } /* if */ } /* stdIirDesignDlgDestroy() */ /* FUNCTION *******************************************************************/ /** Checks whether the standard IIR filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * standard IIR dialog found), else FALSE. ******************************************************************************/ BOOL stdIirDesignDlgActive (GtkWidget *topWidget) { GtkWidget* widget = lookup_widget (topWidget, STDIIRDLG_WIDGET_MAIN); return (widget != NULL); } /* stdIirDesignDlgActive() */ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog ready/apply function. * * \param topWidget Toplevel widget. * \param pPrefs Pointer to desktop preferences. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int stdIirDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs) { GtkWidget *combo; FLTCOEFF filter; int err = INT_MAX; STDIIR_DESIGN design = {STDIIR_TYPE_SIZE - 1, 0}; /* preset design */ while ((design.type > 0) && /* look for active radio button */ !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(stdIirDlgChar[design.type].btn))) { --design.type; } /* while */ combo = lookup_widget (topWidget, STDIIRDLG_COMBO_FTR); if (dlgGetInt (topWidget, STDIIRDLG_SPIN_DEGREE, FLT_DEGREE_MIN, FLT_DEGREE_MAX, &design.order) && dlgGetDouble (topWidget, STDIIRDLG_ENTRY_SAMPLE, FLT_SAMPLE_MIN, FLT_SAMPLE_MAX, pPrefs->frequUnit.multiplier, &filter.f0)) { gint idx; if (stdIirDlgChar[design.type].hasRipple) { /* get passband ripple in dB */ if (!dlgGetDouble (topWidget, STDIIRDLG_ENTRY_RIPPLE, STDIIR_RIPPLE_MIN, STDIIR_RIPPLE_MAX, 1.0, &design.ripple)) { return INT_MAX; } /* if */ } /* if */ if (stdIirDlgChar[design.type].hasStopband) { /* get stopband attenuation in dB */ if (!dlgGetDouble (topWidget, STDIIRDLG_ENTRY_MINATT, STDIIR_STOPATT_MIN, STDIIR_STOPATT_MAX, 1.0, &design.minatt)) { return INT_MAX; } /* if */ } /* if */ if (stdIirDlgChar[design.type].hasAngle) { /* get modular angle */ if (!dlgGetDouble (topWidget, STDIIRDLG_SPIN_ANGLE, STDIIR_ANGLE_MIN, STDIIR_ANGLE_MAX, 1.0, &design.angle)) { return INT_MAX; } /* if */ } /* if */ idx = gtk_combo_box_get_active(GTK_COMBO_BOX (combo)); if (idx < 0) { design.ftr.type = FTR_NON; /* set none, in case nothing selected */ } /* if */ else { design.ftr.type = idx; } /* else */ if (ftrEntry[design.ftr.type][4] && GSL_IS_ODD(design.order)) { dlgError(topWidget, _("Degree must be even for bandpass/bandstop.")); return INT_MAX; } if (ftrEntry[design.ftr.type][0]) /* lowpass cutoff frequency required? */ { if (!dlgGetDouble (topWidget, STDIIRDLG_ENTRY_CUTOFF, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.cutoff)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][1]) /* center frequency required? */ { if (!dlgGetDouble (topWidget, STDIIRDLG_ENTRY_CENTER, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.ftr.fc)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][2]) /* bandwidth required? */ { if (!dlgGetDouble (topWidget, STDIIRDLG_ENTRY_BANDW, FLT_SAMPLE_MIN / 2, FLT_SAMPLE_MAX / 2, pPrefs->frequUnit.multiplier, &design.ftr.bw)) { return INT_MAX; } /* if */ } /* if */ if (ftrEntry[design.ftr.type][3]) /* geometric bandwidth check button? */ { if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( lookup_widget (topWidget, STDIIRDLG_CHKBTN_GEOMETRIC)))) { design.ftr.flags |= FTRDESIGN_FLAG_CENTER_GEOMETRIC; } /* if */ } /* if */ design.zAlgo = ZTR_BILINEAR; /* fix */ err = stdIirFilterGen (&design, &filter); /* generate the IIR filter */ if (!FLTERR_CRITICAL (err)) { if (!ftrEntry[design.ftr.type][0]) { /* show (derived) lowpass cutoff frequency on HP, BP, BS */ dlgSetDouble (topWidget, STDIIRDLG_ENTRY_CUTOFF, pPrefs->frequUnit.multiplier, design.cutoff); } /* if */ dfcPrjSetFilter (FLTCLASS_STDIIR, &filter, (DESIGNDLG *)&design); } /* if */ } /* if */ return err; } /* stdIirDesignDlgApply() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/Makefile.in0000644000175100001440000005447113714047016013157 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ bin_PROGRAMS = dfcgen-gtk$(EXEEXT) @BUILD_OS_MINGW32_TRUE@am__append_1 = $(PACKAGE_RC_FILE).o subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dfcgen_gtk_OBJECTS = support.$(OBJEXT) main.$(OBJEXT) \ designDlg.$(OBJEXT) mainDlg.$(OBJEXT) dfcProject.$(OBJEXT) \ filterResponse.$(OBJEXT) filterSupport.$(OBJEXT) \ mathPoly.$(OBJEXT) stdIirFilter.$(OBJEXT) helpDlg.$(OBJEXT) \ responseWin.$(OBJEXT) mathMisc.$(OBJEXT) mathFuncs.$(OBJEXT) \ cairoPlot.$(OBJEXT) fileDlg.$(OBJEXT) cfgSettings.$(OBJEXT) \ responseDlg.$(OBJEXT) editDlg.$(OBJEXT) \ stdIirDesignDlg.$(OBJEXT) miscDesignDlg.$(OBJEXT) \ projectFile.$(OBJEXT) miscFilter.$(OBJEXT) \ dialogSupport.$(OBJEXT) responsePlot.$(OBJEXT) \ linFirDesignDlg.$(OBJEXT) linFirFilter.$(OBJEXT) \ rootsPlot.$(OBJEXT) filterPrint.$(OBJEXT) dfcgen_gtk_OBJECTS = $(am_dfcgen_gtk_OBJECTS) dfcgen_gtk_DEPENDENCIES = $(am__append_1) dfcgen_gtk_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(dfcgen_gtk_LDFLAGS) \ $(LDFLAGS) -o $@ 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)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f 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 = $(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 = $(dfcgen_gtk_SOURCES) DIST_SOURCES = $(dfcgen_gtk_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/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ AM_CPPFLAGS = \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DPACKAGE_PIXMAPS_DIR=\"$(pkgpixmapsdir)\" \ -DPACKAGE_FILTERS_DIR=\"$(pkgfiltersdir)\" \ -DPACKAGE_TEMPLATES_DIR=\"$(pkgtemplatesdir)\" \ -I"$(top_srcdir)/include" # Additional CFLAGS AM_CFLAGS = @PKGCONF_CFLAGS@ # need for LIBINTL from AM_GNU_GETTEXT() - gettext.m4 dfcgen_gtk_LDADD = @LIBINTL@ $(am__append_1) # when building on MinGW: add resource file and Win32 compiler flags @BUILD_OS_MINGW32_TRUE@PACKAGE_RC_FILE = dfcgen-gtk.rc @BUILD_OS_MINGW32_TRUE@dfcgen_gtk_LDFLAGS = -mwindows dfcgen_gtk_SOURCES = \ support.c \ main.c \ designDlg.c \ mainDlg.c \ dfcProject.c \ filterResponse.c \ filterSupport.c \ mathPoly.c \ stdIirFilter.c \ helpDlg.c \ responseWin.c \ mathMisc.c \ mathFuncs.c \ cairoPlot.c \ fileDlg.c \ cfgSettings.c \ responseDlg.c \ editDlg.c \ stdIirDesignDlg.c \ miscDesignDlg.c \ projectFile.c \ miscFilter.c \ dialogSupport.c \ responsePlot.c \ linFirDesignDlg.c \ linFirFilter.c \ rootsPlot.c \ filterPrint.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dfcgen-gtk$(EXEEXT): $(dfcgen_gtk_OBJECTS) $(dfcgen_gtk_DEPENDENCIES) $(EXTRA_dfcgen_gtk_DEPENDENCIES) @rm -f dfcgen-gtk$(EXEEXT) $(AM_V_CCLD)$(dfcgen_gtk_LINK) $(dfcgen_gtk_OBJECTS) $(dfcgen_gtk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairoPlot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfgSettings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/designDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfcProject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialogSupport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/editDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterPrint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterResponse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterSupport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helpDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linFirDesignDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linFirFilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathFuncs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathMisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathPoly.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscDesignDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscFilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projectFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/responseDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/responsePlot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/responseWin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootsPlot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdIirDesignDlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdIirFilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ .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) '$<'` 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: $(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 @BUILD_OS_MINGW32_FALSE@all-local: all-am: Makefile $(PROGRAMS) all-local installdirs: for dir in "$(DESTDIR)$(bindir)"; 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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-binPROGRAMS 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS 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-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 pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # when building on MinGW: regard an additional rule on "make [all]", which # executes the resource compiler @BUILD_OS_MINGW32_TRUE@all-local: $(PACKAGE_RC_FILE).o @BUILD_OS_MINGW32_TRUE@$(PACKAGE_RC_FILE).o: ../dist/win32/$(PACKAGE_RC_FILE) @BUILD_OS_MINGW32_TRUE@ $(WINDRES) -i ../dist/win32/$(PACKAGE_RC_FILE) --input-format=rc -o $(PACKAGE_RC_FILE).o -O coff # 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: dfcgen-gtk-0.5/src/cfgSettings.c0000664000175100001440000006171713714315075013544 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file cfgSettings.c * \brief DFCGen configuration settings. * * \note All double values written to the configuration file are formated * in the "C" locale for LC_NUMERIC. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "cfgSettings.h" #include #include #include #include #include /* memcpy() */ #include /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Settings to be saved/restored for a (response window) plot axis. The * \a flags member is used as an attribute. */ typedef struct { double start; /**< real-world coordinate of start-point */ double stop; /**< real-world coordinate of end-point */ unsigned flags; /**< flags (e.g. PLOT_AXIS_FLAG_LOG, PLOT_AXIS_FLAG_GRID) */ } CFG_AXIS_SETTINGS; /** Settings to be saved/restored for the response plot. */ typedef struct { char *key; /**< Configuration file key name */ CFG_AXIS_SETTINGS x; CFG_AXIS_SETTINGS y; PLOT_STYLE style; /**< Style of graph */ int num; /**< Number of samples to take */ unsigned flags; /**< Flags, see CFG_FLAG_VISIBLE */ GdkColor color[PLOT_COLOR_SIZE]; /**< Color array */ } CFG_RESPONSE_SETTINGS; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define CFG_DEFAULT_F_STOP 10E3 /**< Default stop frequency */ #define CFG_DEFAULT_T_STOP (10 / CFG_DEFAULT_F_STOP) /**< Default stop time */ #define CFG_FLAG_VISIBLE 1 /**< Response window is visible */ /** Color format string (old X11 spec). Because GDK 2.8 does not accept the * newer one, we use the old format when writing the config file. This may * change in the future if GDK understands both syntax. */ #define COLOR_FORMAT_STRING "#%04X%04X%04X" /* #define COLOR_FORMAT_STRING "rgb:%04x/%04x/%04x"*/ /* New X11 color spec. format */ #ifdef G_OS_WIN32 #define CFG_FILE_NAME PACKAGE ".ini" /**< Configuration file */ #else #define CFG_FILE_NAME PACKAGE ".conf" /**< Configuration file */ #endif #define CFG_GROUP_APPLICATION "Application" /**< Group key for \e Application */ #define CFG_KEY_APPNAME "AppName" /**< Application name key */ #define CFG_KEY_APPVERSION "Version" /**< Application version key */ #define CFG_GROUP_DESKTOP "Desktop" /**< Group key for \e Desktop */ #define CFG_KEY_UNIT_F "Frequency" /**< frequency unit */ #define CFG_KEY_UNIT_T "Time" /**< Time unit */ #define CFG_KEY_PRECISION "Precision" /**< Output precision (digits) */ #define CFG_GROUP_WINDOW "Window-" /**< (Partial) group key for plots */ #define CFG_KEY_POINTS "Points" /**< Number of points used in plot */ #define CFG_KEY_STYLE "Style" /**< Plot style */ #define CFG_KEY_COLORS "Colors" /**< Colors of plot */ #define CFG_KEY_VISIBLE "Visibility" /**< Flag for visibility */ #define CFG_KEY_X_START "xStart" /**< Start value x-axis */ #define CFG_KEY_X_STOP "xStop" /**< Stop value x-axis */ #define CFG_KEY_X_LOG "xLogarithmic" /**< Log. option for x-axis */ #define CFG_KEY_X_GRID "xGrid" /**< Grid option for x-axis */ #define CFG_KEY_Y_START "yStart" /**< Start value y-axis */ #define CFG_KEY_Y_STOP "yStop" /**< Stop value y-axis */ #define CFG_KEY_Y_LOG "yLogarithmic" /**< Log. option for y-axis */ #define CFG_KEY_Y_GRID "yGrid" /**< Grid option for y-axis */ #define CFG_KEY_Y_AUTO "yAuto" /**< Auto option for y-axis */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** Desktop configuration settings (initialized with defaults). */ static CFG_DESKTOP deskPrefs = { {"µs", GSL_CONST_NUM_MICRO}, /* timeUnit */ {"kHz", GSL_CONST_NUM_KILO}, /* frequUnit */ 6 /* default output precision */ }; /** Response windows settings. */ static CFG_RESPONSE_SETTINGS respSet[RESPONSE_TYPE_SIZE] = { [RESPONSE_TYPE_MAGNITUDE] = { CFG_GROUP_WINDOW "Magnitude", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, 1, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_ATTENUATION] = { CFG_GROUP_WINDOW "Attenuation", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, 60, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_CHAR] = { CFG_GROUP_WINDOW "Char", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, 360, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_PHASE] = { CFG_GROUP_WINDOW "Phase", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, 360, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_DELAY] = { CFG_GROUP_WINDOW "Delay", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, CFG_DEFAULT_T_STOP, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_GROUP] = { CFG_GROUP_WINDOW "Group", {0.0, CFG_DEFAULT_F_STOP, PLOT_AXIS_FLAG_GRID}, {0, CFG_DEFAULT_T_STOP, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_LINE_ONLY, 0, 0 }, [RESPONSE_TYPE_IMPULSE] = { CFG_GROUP_WINDOW "Impulse", {0.0, CFG_DEFAULT_T_STOP, PLOT_AXIS_FLAG_GRID}, {0, 1, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_CIRCLE_SAMPLE, 0, 0 }, [RESPONSE_TYPE_STEP] = { CFG_GROUP_WINDOW "Step", {0.0, CFG_DEFAULT_T_STOP, PLOT_AXIS_FLAG_GRID}, {0, 1, PLOT_AXIS_FLAG_GRID | PLOT_AXIS_FLAG_AUTO}, PLOT_STYLE_CIRCLE_SAMPLE, 0, 0 } }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* MACRO **********************************************************************/ /** Gets a widgets color. * * \note The widget attribute \p var accessed by this macro may * deprecated in later revision of GTK. In that case they * will be replaced e.g. by functions as gtk_style_get_fg(). * * \param widget Widget. * \param var Name of (may be private) color variable: fg, bg, light, * dark, mid, text, base, text_aa * \param state State of widget: GTK_STATE_NORMAL, ... * * \return GdkColor associated with style and state. */ #define CFG_WIDGET_COLOR(widget, var, state) (widget)->style->var[state] /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void cfgReadFlag (GKeyFile *keyFile, const gchar *group, const gchar *key, unsigned mask, unsigned *pFlags); static void cfgReadInteger (GKeyFile *keyFile, const gchar *group, const gchar *key, int *pResult); static void cfgReadDouble (GKeyFile *keyFile, const gchar *group, const gchar *key, double *pResult); static void cfgReadUnit (GKeyFile *keyFile, const gchar *group, const gchar *key, PLOT_UNIT *pUnit); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Reads an integer value from key file associated with \a key under \a group. * If the key is not found then target of \a pResult is unchanged. * * \param keyFile The key file (GKeyFile) to be used for search operation. * \param group The group name. * \param key Key inside \a group which is searched. * \param pUnit Pointer to unit buffer. * ******************************************************************************/ static void cfgReadUnit (GKeyFile *keyFile, const gchar *group, const gchar *key, PLOT_UNIT *pUnit) { static PLOT_UNIT units[] = /* all known units */ { {"Hz", 1.0}, {"kHz", GSL_CONST_NUM_KILO}, {"MHz", GSL_CONST_NUM_MEGA}, {"GHz", GSL_CONST_NUM_GIGA}, {"s", 1.0}, {"ms", GSL_CONST_NUM_MILLI}, {"µs", GSL_CONST_NUM_MICRO}, {"ns", GSL_CONST_NUM_NANO}, {"ps", GSL_CONST_NUM_PICO} }; int i; char *unitName = g_key_file_get_string (keyFile, group, key, NULL); if (unitName != NULL) { for (i = 0; i < N_ELEMENTS (units); i++) { if (g_strcmp0 (unitName, units[i].name) == 0) /* found? */ { pUnit->name = units[i].name; pUnit->multiplier = units[i].multiplier; g_free (unitName); return; } /* if */ } /* for */ g_free (unitName); } /* if */ } /* cfgReadUnit() */ /* FUNCTION *******************************************************************/ /** Reads an integer value from key file associated with \a key under \a group. * If the key is not found then target of \a pResult is unchanged. * * \param keyFile The key file (GKeyFile) to be used for search operation. * \param group The group name. * \param key Key inside \a group which is searched. * \param pResult Pointer to result buffer. * ******************************************************************************/ static void cfgReadInteger (GKeyFile *keyFile, const gchar *group, const gchar *key, int *pResult) { GError *error = NULL; /* preset required */ int result = g_key_file_get_integer (keyFile, group, key, &error); if (error == NULL) { *pResult = result; } /* if */ else { g_error_free (error); } /* else */ } /* cfgReadInteger() */ /* FUNCTION *******************************************************************/ /** Reads a double from key file associated with \a key under \a group. * If the key is not found then target of \a pResult is unchanged. * * \param keyFile The key file (GKeyFile) to be used for search operation. * \param group The group name. * \param key Key inside \a group which is searched. * \param pResult Pointer to result buffer. * ******************************************************************************/ static void cfgReadDouble (GKeyFile *keyFile, const gchar *group, const gchar *key, double *pResult) { GError *error = NULL; /* preset required */ double result = g_key_file_get_double(keyFile, group, key, &error); if (error == NULL) { *pResult = result; } /* if */ else { g_error_free(error); } /* else */ } /* cfgReadDouble() */ /* FUNCTION *******************************************************************/ /** Updates a flag associated with a boolean value, which itself is associated * with \a key under \a group. If the key is not found then target of \a pFlags * is unchanged. * * \param keyFile The key file (GKeyFile) to be used for search operation. * \param group The group name. * \param key Key inside \a group which is searched. * \param mask Mask associated with the boolean in key file. * \param pFlags Pointer to flags to be modified (on success). * ******************************************************************************/ static void cfgReadFlag (GKeyFile *keyFile, const gchar *group, const gchar *key, unsigned mask, unsigned *pFlags) { GError *error = NULL; gboolean flag = g_key_file_get_boolean (keyFile, group, key, &error); if (error == NULL) /* all seems okay (key found) */ { if (flag) { *pFlags |= mask; } /* if */ else { *pFlags &= ~mask; } /* else */ } /* if */ else { g_error_free(error); } /* else */ } /* cfgReadFlag() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Reads the DFCGen configuration from XDG_CONFIG_DIR, the XDG user * configuration directory (see XDG specification at * http://www.freedesktop.org/Standards/basedir-spec). * * \param widget Top level widget used for default colors assignment. * ******************************************************************************/ void cfgCacheSettings (GtkWidget *widget) { CFG_RESPONSE_SETTINGS* pSet; RESPONSE_TYPE i; GdkColor color; char **colorList; /* pointer to array of char pointers (NULL-terminated) */ int colorIdx; GKeyFile* keyFile = g_key_file_new (); char *name = g_build_filename (g_get_user_config_dir (), CFG_FILE_NAME, NULL); /* First set default colors */ for (i = 0, pSet = respSet; i < RESPONSE_TYPE_SIZE; i++, pSet++) { pSet->color[PLOT_COLOR_LABELS] = pSet->color[PLOT_COLOR_AXIS_NAME] = pSet->color[PLOT_COLOR_BOX] = pSet->color[PLOT_COLOR_GRID] = pSet->color[PLOT_COLOR_GRAPH] = CFG_WIDGET_COLOR (widget, text, GTK_STATE_NORMAL); pSet->color[PLOT_COLOR_NOTE_TEXT] = pSet->color[PLOT_COLOR_NOTE_BOX] = CFG_WIDGET_COLOR (widget, text_aa, GTK_STATE_NORMAL); } /* for */ if (g_key_file_load_from_file (keyFile, name, G_KEY_FILE_NONE, NULL)) { /* Read desktop group */ cfgReadUnit (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_UNIT_T, &deskPrefs.timeUnit); cfgReadUnit (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_UNIT_F, &deskPrefs.frequUnit); cfgReadInteger (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_PRECISION, &deskPrefs.outprec); /* Read window group */ for (i = 0, pSet = respSet; i < RESPONSE_TYPE_SIZE; i++, pSet++) { cfgReadFlag (keyFile, pSet->key, CFG_KEY_VISIBLE, CFG_FLAG_VISIBLE, &pSet->flags); cfgReadInteger (keyFile, pSet->key, CFG_KEY_POINTS, &pSet->num); cfgReadInteger (keyFile, pSet->key, CFG_KEY_STYLE, (int *) &pSet->style); colorList = g_key_file_get_string_list (keyFile, pSet->key, CFG_KEY_COLORS, NULL, NULL); if (colorList != NULL) /* key found? */ { colorIdx = 0; while ((colorList[colorIdx] != NULL) && (colorIdx < PLOT_COLOR_SIZE)) { /* get all colors from list */ if (gdk_color_parse (colorList[colorIdx], &color)) { pSet->color[colorIdx] = color; } /* if */ else { DEBUG_LOG("Color syntax \"%s\" in group %s bad)", colorList[colorIdx], pSet->key); } /* else */ ++colorIdx; } /* while */ g_strfreev(colorList); /* frees a NULL-terminated array of */ } /* strings (incl. the array itself) */ cfgReadDouble (keyFile, pSet->key, CFG_KEY_X_START, &pSet->x.start); cfgReadDouble (keyFile, pSet->key, CFG_KEY_X_STOP, &pSet->x.stop); cfgReadFlag (keyFile, pSet->key, CFG_KEY_X_LOG, PLOT_AXIS_FLAG_LOG, &pSet->x.flags); cfgReadFlag (keyFile, pSet->key, CFG_KEY_X_GRID, PLOT_AXIS_FLAG_GRID, &pSet->x.flags); cfgReadDouble (keyFile, pSet->key, CFG_KEY_Y_START, &pSet->y.start); cfgReadDouble (keyFile, pSet->key, CFG_KEY_Y_STOP, &pSet->y.stop); cfgReadFlag (keyFile, pSet->key, CFG_KEY_Y_LOG, PLOT_AXIS_FLAG_LOG, &pSet->y.flags); cfgReadFlag (keyFile, pSet->key, CFG_KEY_Y_GRID, PLOT_AXIS_FLAG_GRID, &pSet->y.flags); cfgReadFlag (keyFile, pSet->key, CFG_KEY_Y_AUTO, PLOT_AXIS_FLAG_AUTO, &pSet->y.flags); } /* for */ } /* if */ g_key_file_free (keyFile); g_free (name); } /* cfgCacheSettings() */ /* FUNCTION *******************************************************************/ /** Writes the DFCGen configuration to the XDG user configuration directory * (see XDG specification at http://www.freedesktop.org/Standards/basedir-spec). * The syntax of key files is described in the \e Desktop \e Entry \e Specification * at http://freedesktop.org/Standards/desktop-entry-spec. * * \return Zero on success, else an error number. ******************************************************************************/ int cfgFlushSettings () { CFG_RESPONSE_SETTINGS* pSet; RESPONSE_TYPE i; int colorIdx; gsize size; const char* colorStr[PLOT_COLOR_SIZE]; /* array of string pointers */ GKeyFile* keyFile = g_key_file_new (); char *data = g_build_filename (g_get_user_config_dir (), CFG_FILE_NAME, NULL); FILE *f = fopen(data, "w"); if (f == NULL) { DEBUG_LOG("Cannot open configuration file"); return errno; } /* if */ /* First write application group */ g_key_file_set_comment (keyFile, NULL, NULL, " -*- mode: conf; coding: utf-8 -*-\n" " " PACKAGE " " VERSION " session settings (UTF-8 coded)", NULL); g_key_file_set_string (keyFile, CFG_GROUP_APPLICATION, CFG_KEY_APPNAME, PACKAGE); g_key_file_set_string (keyFile, CFG_GROUP_APPLICATION, CFG_KEY_APPVERSION, VERSION); /* Write desktop group */ g_key_file_set_string (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_UNIT_T, deskPrefs.timeUnit.name); g_key_file_set_string (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_UNIT_F, deskPrefs.frequUnit.name); g_key_file_set_integer (keyFile, CFG_GROUP_DESKTOP, CFG_KEY_PRECISION, deskPrefs.outprec); g_key_file_set_comment (keyFile, CFG_GROUP_DESKTOP, NULL, "", NULL); /* Write all window groups */ for (i = 0, pSet = respSet; i < RESPONSE_TYPE_SIZE; i++, pSet++) { g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_VISIBLE, pSet->flags & CFG_FLAG_VISIBLE); g_key_file_set_integer (keyFile, pSet->key, CFG_KEY_POINTS, pSet->num); g_key_file_set_integer (keyFile, pSet->key, CFG_KEY_STYLE, pSet->style); for (colorIdx = 0; colorIdx < PLOT_COLOR_SIZE; colorIdx++) { colorStr[colorIdx] = g_strdup_printf (COLOR_FORMAT_STRING, pSet->color[colorIdx].red, pSet->color[colorIdx].green, pSet->color[colorIdx].blue); } /* for */ g_key_file_set_string_list (keyFile, pSet->key, CFG_KEY_COLORS, colorStr, PLOT_COLOR_SIZE); for (colorIdx = 0; colorIdx < PLOT_COLOR_SIZE; colorIdx++) { g_free ((gpointer) colorStr[colorIdx]); } /* for */ g_key_file_set_double (keyFile, pSet->key, CFG_KEY_X_START, pSet->x.start); g_key_file_set_double (keyFile, pSet->key, CFG_KEY_X_STOP, pSet->x.stop); g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_X_LOG, pSet->x.flags & PLOT_AXIS_FLAG_LOG); g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_X_GRID, pSet->x.flags & PLOT_AXIS_FLAG_GRID); g_key_file_set_double (keyFile, pSet->key, CFG_KEY_Y_START, pSet->y.start); g_key_file_set_double (keyFile, pSet->key, CFG_KEY_Y_STOP, pSet->y.stop); g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_Y_LOG, pSet->y.flags & PLOT_AXIS_FLAG_LOG); g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_Y_GRID, pSet->y.flags & PLOT_AXIS_FLAG_GRID); g_key_file_set_boolean (keyFile, pSet->key, CFG_KEY_Y_AUTO, pSet->y.flags & PLOT_AXIS_FLAG_AUTO); g_key_file_set_comment (keyFile, respSet[i].key, NULL, "", NULL); } /* for */ data = g_key_file_to_data (keyFile, &size, NULL); fwrite (data, size, 1, f); g_key_file_free (keyFile); if (fclose (f) != 0) { return ENOENT; } /* if */ return 0; } /* cfgFlushSettings() */ /* FUNCTION *******************************************************************/ /** Saves the response window configuration settings. It is assumed that the * response window is closed when calling this function. * * \param type Type of response plot/window. * \param pDiag Pointer to plot which holds the current settings. * ******************************************************************************/ void cfgSaveResponseSettings(RESPONSE_TYPE type, PLOT_DIAG* pDiag) { CFG_RESPONSE_SETTINGS* pSet = &respSet[type]; pSet->x.start = pDiag->x.start; pSet->x.stop = pDiag->x.stop; pSet->x.flags = pDiag->x.flags; pSet->y.start = pDiag->y.start; pSet->y.stop = pDiag->y.stop; pSet->y.flags = pDiag->y.flags; pSet->style = pDiag->style; pSet->num = pDiag->num; memcpy (pSet->color, pDiag->colors, PLOT_COLOR_SIZE * sizeof (pSet->color[0])); pSet->flags &= ~CFG_FLAG_VISIBLE; /* assume window is closed */ } /* cfgSaveResponseSettings() */ /* FUNCTION *******************************************************************/ /** Restores the response window configuration settings. It is assumed that the * response window is visible when calling this function with a valid \a pDiag * pointer. * * \param type Type of response plot/window. * \param pDiag Pointer to plot which gets the settings from last * session. If \a pDiag is NULL, then the last * \e Visibility state is returned. But notice that * colors are always unallocated. * * \return TRUE if the response window should be visible (on), * FALSE if not (off). * ******************************************************************************/ BOOL cfgRestoreResponseSettings(RESPONSE_TYPE type, PLOT_DIAG* pDiag) { BOOL state; CFG_RESPONSE_SETTINGS* pSet = &respSet[type]; state = pSet->flags & CFG_FLAG_VISIBLE; /* save old visibility */ if (pDiag != NULL) { pDiag->x.start = pSet->x.start; pDiag->x.stop = pSet->x.stop; pDiag->x.flags = pSet->x.flags; pDiag->y.start = pSet->y.start; pDiag->y.stop = pSet->y.stop; pDiag->y.flags = pSet->y.flags; pDiag->style = pSet->style; pDiag->num = pSet->num; memcpy (pDiag->colors, pSet->color, PLOT_COLOR_SIZE * sizeof (pSet->color[0])); pSet->flags |= CFG_FLAG_VISIBLE; /* prepare for save */ } /* if */ return state; } /* cfgRestoreResponseSettings() */ /* FUNCTION *******************************************************************/ /** Sets new desktop configuration settings (preferences). * * \param newPrefs Pointer to new preferences. * ******************************************************************************/ void cfgSetDesktopPrefs (CFG_DESKTOP* newPrefs) { memcpy (&deskPrefs, newPrefs, sizeof (deskPrefs)); } /* cfgSetDesktopPrefs() */ /* FUNCTION *******************************************************************/ /** Gets the current desktop configuration settings (preferences). * * \return Pointer to current preferences. ******************************************************************************/ const CFG_DESKTOP* cfgGetDesktopPrefs () { return &deskPrefs; } /* cfgGetDesktopPrefs() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/cairoPlot.c0000664000175100001440000015200613666233040013205 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file cairoPlot.c * \brief 2-dimensional plot on a \e Cairo graphic context. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" /* includes config.h (include before GNU headers) */ #include "mathFuncs.h" /* POW10() */ #include "mathMisc.h" #include "mathFuncs.h" #include "cairoPlot.h" #include /* declares abs() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define PLOT_FLAG_INVALID 1 /**< Invalid plot value (singularity?) */ #define PLOT_FLAG_OUTSIDE 2 /**< Coordinate outside the plot range */ #define PLOT_LABELS_MAX 21 /**< Maximum number of labels at any axis */ #define PLOT_LABEL_MARKER_LEN (5.0) /**< Length of label marker (stub) line */ #define PLOT_LABEL_MARKER_WIDTH (2.0) /**< Width of label marker (stub) line */ #define PLOT_GRID_LINE_WIDTH (1.0) /**< Grid line width */ #define PLOT_GRID_DASH_LEN (1.0) /**< Grid dash length */ #define PLOT_BOX_LINE_WIDTH (1.0) /**< Plot box line width */ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Description of a single plot scale label. */ typedef struct { PangoLayout* layout; /**< pango layout representation of string */ double world; /**< grid coordinate in world-coordinates */ double grid; /**< logical grid coordinate/position in drawing area */ int pos; /**< start position of label string in drawing area */ } PLOT_LABEL; /** Internal axis (working) structure. */ typedef struct { PLOT_AXIS *pAxis; /**< Pointer to plot axis description */ int start, stop; /**< start and end-point of graph */ double ratio; /**< GDK to world-coordinates ratio */ double delta; /**< world-coordinate step (depends on number of samples) */ PangoLayout *layout; /**< Layout of axis name (NULL if axis without name) */ int width; /**< Width of axis name (0 if axis without name) */ int pos; /**< Position of labels at axis */ int maxw; /**< Maximum width of all label strings at this axis */ PLOT_LABEL labels[PLOT_LABELS_MAX]; /**< List of plot labels */ } PLOT_AXIS_WORKSPACE; /** Plot style draw function. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate. * \param size x/y extent of the point pixmap (e.g. radius). * */ typedef void (*PLOT_FUNC_DRAW)(cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* MACRO **********************************************************************/ /** Sets a color from \p colors array into \e Cairo context. * * \note Do not use the function gdk_cairo_set_source_color(), * because it does'nt work. * * \param cr \e Cairo drawing context. * \param colors Pointer to array of GDK colors indexed by PLOT_COLOR. * If NULL, the color is unchanged. * \param index Identifies the color (PLOT_COLOR) to be changed. * ******************************************************************************/ #define PLOT_COLOR_SET(cr, colors, index) \ if ((colors) != NULL) \ { \ cairo_set_source_rgb ((cr), (colors)[(index)].red / 65535.0, \ (colors)[(index)].green / 65535.0, \ (colors)[(index)].blue / 65535.0); \ } /* LOCAL FUNCTION DECLARATIONS ************************************************/ static int drawErrorMsg (cairo_t* cr, PLOT_DIAG *pDiag, int errcode); static int callInitFunc (PLOT_DIAG *pDiag, PLOT_AXIS_WORKSPACE *pX); static void callEndFunc (PLOT_DIAG *pDiag); static int callProgressFunc (PLOT_DIAG *pDiag, int cnt, int num); static double getUnitFactor (PLOT_AXIS *pAxis); static double w2cRatio(PLOT_AXIS *pAxis, int start, int stop); static int searchMinMaxY (PLOT_DIAG* pDiag, PLOT_AXIS_WORKSPACE *pX); static double w2c (PLOT_AXIS_WORKSPACE *p, double coordinate); static double searchNearestLin (double mantissa); static PangoRectangle createAxisLabel (cairo_t *cr, int precision, double divider, PLOT_LABEL *label); static int scaleLin (cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical); static int scaleLog(cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical); static void drawLayout(cairo_t *cr, PangoLayout* layout, int x, int y); static void createAxisNameLayout(cairo_t *cr, PLOT_AXIS_WORKSPACE *p); static BOOL insertLabel(cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical, double coordinate, int idx); static void drawGridLabels (cairo_t *cr, GdkColor *colors, int numx, PLOT_AXIS_WORKSPACE* pX, int numy, PLOT_AXIS_WORKSPACE* pY); static int drawGraph (cairo_t *cr, int refsize, PLOT_DIAG *pDiag, PLOT_AXIS_WORKSPACE *pX, PLOT_AXIS_WORKSPACE *pY); static void drawStyleCircleOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); static void drawStyleCircleSample (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); static void drawStyleLineOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); static void drawStyleCrossOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); static void drawStyleBoxOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** If \p errcode indicates an error then the function draws a message into the * plot area. * * \param cr \e Cairo context for drawing. * \param pDiag Pointer to plot parameters. * \param errcode Error code if less than zero. * * \return The error code passed in by \p errcode. ******************************************************************************/ static int drawErrorMsg (cairo_t* cr, PLOT_DIAG *pDiag, int errcode) { if ((errcode < 0) && (pDiag->area.width >= 20)) { PangoRectangle rect; PangoLayout* layout = pango_cairo_create_layout (cr); gchar *message = g_strdup_printf (_("Cannot draw the plot.\n\n" "Maybe memory space is exhausted, there are too many" " sample points or a mathematical operation has failed." " Change the start and/or endpoint of ordinate" " to circumvant this situation.")); pango_layout_set_width (layout, (pDiag->area.width - 20) * PANGO_SCALE); pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); pango_layout_set_markup (layout, message, -1); pango_layout_get_extents (layout, NULL, &rect); drawLayout (cr, layout, pDiag->area.x - 10 + (pDiag->area.width - PANGO_PIXELS (rect.width)) / 2, pDiag->area.y - 10 + (pDiag->area.height - PANGO_PIXELS (rect.height)) / 2); g_free (message); } /* if */ return errcode; } /* drawErrorMsg() */ /* FUNCTION *******************************************************************/ /** Returns the axis unit multiplier. * * \param pAxis Pointer to axis description. * * \return Unit multiplier of axis. ******************************************************************************/ static double getUnitFactor(PLOT_AXIS *pAxis) { double factor = 1.0; if (pAxis->pUnit != NULL) { factor = pAxis->pUnit->multiplier; } /* if */ return factor; } /* getUnitFactor() */ /* FUNCTION *******************************************************************/ /** Calculates the ratio of GDK and world-coordinates. The function calculates * the ratio between logical and world-coordinates and returns them. * The ratio is the difference of world coordinates \p stop-start in the * linear case or \p log10(stop/start) in the logarithmic case. * * \param pAxis Pointer to axis description. * \param start Start point of plot graph (box) in GDK coordinates. * \param stop Stop point of plot graph (box) in GDK coordinates. * * \return The calculated ratio (e.g. for PLOT_AXIS_WORKSPACE). * ******************************************************************************/ static double w2cRatio(PLOT_AXIS *pAxis, int start, int stop) { double ratio; int delta = stop - start; if (pAxis->flags & PLOT_AXIS_FLAG_LOG) { ratio = delta / log10(pAxis->stop / pAxis->start); } /* if */ else { ratio = delta / (pAxis->stop - pAxis->start); } /* else */ return ratio; } /* w2cRatio() */ /* FUNCTION *******************************************************************/ /** Returns a logical coordinate associated with a world-coordinate. * * \param p Pointer to axis workspace. * \param coordinate Real-world coordinate. * * \return Logical coordinate within this axis. This is a double * because \e Cairo uses coordinates of this type. ******************************************************************************/ static double w2c(PLOT_AXIS_WORKSPACE *p, double coordinate) { PLOT_AXIS *pAxis = p->pAxis; if (pAxis->flags & PLOT_AXIS_FLAG_LOG) { return p->start + p->ratio * log10(coordinate / pAxis->start); } /* if */ return (coordinate - pAxis->start) * p->ratio + p->start; } /* w2c() */ /* FUNCTION *******************************************************************/ /** Calls init-function. * * \param pDiag Pointer to plot descriptor. * \param pX Pointer to axis workspace. * * \return The function returns: * - the number of samples in interval \a start - \a stop * - a negative number, if there was a critical error. ******************************************************************************/ static int callInitFunc (PLOT_DIAG *pDiag, PLOT_AXIS_WORKSPACE *pX) { int tmp, num = pDiag->num; if (num <= 0) { num = pX->stop - pX->start + 1; if (num < 0) /* too small drawing area? */ { num = 0; } /* if */ } /* if */ if (pDiag->initFunc != NULL) { tmp = pDiag->initFunc (pDiag->x.start, pDiag->x.stop, pDiag->pData); if (tmp != 0) { num = tmp; } /* if */ } /* if */ return num; } /* callInitFunc() */ /* FUNCTION *******************************************************************/ /** Calls end-function. * * \param pDiag Pointer to plot descriptor. * ******************************************************************************/ static void callEndFunc (PLOT_DIAG *pDiag) { if (pDiag->endFunc != NULL) { pDiag->endFunc (pDiag->pData); } /* if */ } /* callEndFunc() */ /* FUNCTION *******************************************************************/ /** Calls the plot progress-function. * * \param pDiag Pointer to plot descriptor. * \param cnt Current counter value (while plotting): 0 <= cnt < num * \param num Number of samples (see \p cnt). * * \return See type PLOT_FUNC_PROGRESS in cairoPlot.h. ******************************************************************************/ static int callProgressFunc(PLOT_DIAG *pDiag, int cnt, int num) { int ret = 0; if (pDiag->progressFunc != NULL) { ret = pDiag->progressFunc (pDiag->pData, (double)(++cnt) / num); if (ret != 0) { callEndFunc (pDiag); } /* if */ } /* if */ return ret; } /* callProgressFunc() */ /* FUNCTION *******************************************************************/ /** Creates an axis name \e Pango layout. * * \param cr \e Cairo context for drawing. * \param p Axis workspace. * ******************************************************************************/ static void createAxisNameLayout(cairo_t *cr, PLOT_AXIS_WORKSPACE *p) { char string[256]; PangoRectangle rect; PLOT_AXIS *pAxis = p->pAxis; p->width = 0; /* set default */ p->layout = NULL; if (pAxis->name != NULL) { p->layout = pango_cairo_create_layout (cr); if (pAxis->pUnit != NULL) { g_snprintf (string, sizeof(string), PLOT_AXISNAME_FORMAT("%s", "%s"), gettext (pAxis->name), pAxis->pUnit->name); pango_layout_set_markup (p->layout, string, -1); } /* if */ else { pango_layout_set_markup (p->layout, gettext (pAxis->name), -1); } /* else */ pango_layout_get_extents (p->layout, NULL, &rect); p->width = PANGO_PIXELS(rect.width); } /* if */ } /* createAxisNameLayout() */ /* FUNCTION *******************************************************************/ /** Draws a layout on the current \e Cairo path and frees it. * * \param cr \e Cairo context for drawing. * \param layout The \e Pango layout to draw. * \param x x-position of layout. * \param y y-position of layout. * ******************************************************************************/ static void drawLayout(cairo_t *cr, PangoLayout* layout, int x, int y) { cairo_move_to (cr, x, y); pango_cairo_show_layout (cr, layout); g_object_unref (layout); } /* drawLayout() */ /* FUNCTION *******************************************************************/ /** Creates an axis label object. * * \param cr \e Cairo context for drawing. * \param precision Output precision (number of digits). * \param divider Prescaling divider (normally from axis units). * \param label Pointer to label description. * * \return The enclosing rectangle of the axis-label (it's extent). * \todo Parametrize margin by precision. ******************************************************************************/ static PangoRectangle createAxisLabel(cairo_t *cr, int precision, double divider, PLOT_LABEL *label) { PangoRectangle labelRect; char labelText[128]; double value = label->world / divider; if (fabs(value) < PLOT_TOLERANCE) { value = 0.0; } /* if */ /* At cairo level the function gtk_widget_create_pango_layout () isn't * available. Therefore create a layout from the cairo context. */ label->layout = pango_cairo_create_layout (cr); g_snprintf (labelText, sizeof(labelText), "%.*G", precision, value); pango_layout_set_text (label->layout, labelText, -1); pango_layout_get_extents (label->layout, NULL, &labelRect); labelRect.width = PANGO_PIXELS(labelRect.width); labelRect.height = PANGO_PIXELS(labelRect.height); return labelRect; } /* createAxisLabel() */ /* FUNCTION *******************************************************************/ /** Searches the nearest human (decimal) value. * * \param mantissa Mantissa of real-world coordinate (may be negative). * * \return The nearest mantissa found. Notice that the sign is * always positive, independent of that of \p mantissa. ******************************************************************************/ static double searchNearestLin(double mantissa) { static double human[] = /* typical (human) scale delta's */ { 0.1, 0.2, 0.25, 0.5, 1.0, 2.0, 2.5, 5.0, 10.0 }; int i, idx = N_ELEMENTS(human) - 1; mantissa = fabs(mantissa); for (i = 0; i < N_ELEMENTS(human); i++) { if (human[i] >= mantissa) { idx = i; break; /* end of for loop */ } /* if */ } /* for */ return human[idx]; } /* searchNearestLin() */ /* FUNCTION *******************************************************************/ /** Inserts a label into associated array. * * \param cr \e Cairo context for drawing. * \param p Pointer to axis workspace. * \param margin Minimum margin between two labels. * \param vertical Set TRUE if the axis labels are stacked vertical (and * this distance shall be monitored). Else the horizontal * distance between labels is checked wrt. overlapping. * \param coordinate World-coordinate at which the label is placed. * \param idx Index into label array \p p->labels to be used. * * \return TRUE if there is not enough space between labels (bad * case), else FALSE (good case). ******************************************************************************/ static BOOL insertLabel(cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical, double coordinate, int idx) { int size; PangoRectangle labelRect; /* enclosing rectangle of label */ BOOL bad = FALSE; PLOT_LABEL* pLabel = &p->labels[idx]; /* pointer to label */ double divider = getUnitFactor (p->pAxis); pLabel->world = coordinate; labelRect = createAxisLabel (cr, p->pAxis->prec, divider, pLabel); pLabel->grid = w2c(p, coordinate); size = labelRect.width; if (size > p->maxw) /* search maximum width */ { p->maxw = size; } /* if */ if (vertical) { MATH_SWAP_INT (labelRect.height, labelRect.width); } /* if */ size = labelRect.width / 2; /* half of size */ pLabel->pos = pLabel->grid - size; /* label strings are left aligned */ if (idx > 0) /* not for the first label */ { PLOT_LABEL* pLast = &p->labels[idx - 1]; /* previous label */ bad = abs(pLabel->grid - pLast->grid) < /* check space between */ (margin + size + abs(pLast->grid - pLast->pos)); } /* if */ return bad; } /* insertLabel() */ /* FUNCTION *******************************************************************/ /** Calculates the label/grid points for a linear axis. * * \param cr \e Cairo context for drawing. * \param p Pointer to axis workspace. * \param margin Minimum margin between two labels. * \param vertical Set TRUE if the axis labels are stacked vertical (and * this distance shall be monitored). Else the horizontal * distance between labels is checked wrt. overlapping. * * \return The number of labels to be used for axis. A number less * than 1 (maybe negative) indicates that there no labels * to place or an error has occured. ******************************************************************************/ static int scaleLin(cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical) { BOOL bad; int num; /* number of labels to draw */ double coordinate, delta; MATH_NORMDBL norm; int try = PLOT_LABELS_MAX - 1; /* number of labels to try (start with max.) */ PLOT_AXIS *pAxis = p->pAxis; double diff = pAxis->stop - pAxis->start; do /* try to put a (decreasing) number of labels at the axis */ { norm = mathNorm10(diff / try); norm.mantissa = searchNearestLin(norm.mantissa); delta = mathDenorm10(norm); coordinate = floor(pAxis->start / delta) * delta; /* first coordinate */ if (coordinate < pAxis->start) { /* increment while less than start */ coordinate += delta; } /* if */ bad = FALSE; num = 0; p->maxw = 0; while ((coordinate <= pAxis->stop) && (num <= try) && !bad) { bad = insertLabel (cr, p, margin, vertical, coordinate, num++); coordinate += delta; /* next grid point */ } /* while */ if (bad) /* some labels overlap? */ { while (num-- > 0) /* free all pango layouts (label strings) */ { g_object_unref (p->labels[num].layout); } /* while */ } /* if */ } /* do */ while ((--try > 0) && bad); return num; } /* scaleLin() */ /* FUNCTION *******************************************************************/ /** Calculates the label/grid points for a logarithmic axis. * * \param cr \e Cairo context for drawing. * \param p Pointer to axis workspace. * \param margin Minimum margin between two labels. * \param vertical Set TRUE if the axis labels are stacked vertical (and * this distance shall be monitored). Else the horizontal * distance between labels is checked wrt. overlapping. * * \return The number of labels to be used for axis. A number less * than 1 indicates that there no labels to place or an * error has occured. ******************************************************************************/ static int scaleLog(cairo_t *cr, PLOT_AXIS_WORKSPACE *p, int margin, BOOL vertical) { static const int plotGridNum[] = {9, 8, 7, 6, 5, 4, 3, 2, 1}; static const double plotGridPoint[N_ELEMENTS(plotGridNum)][PLOT_LABELS_MAX] = { {1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0}, {1.0, 1.25, 1.75, 2.5, 3.0, 4.0, 5.5, 7.5}, {1.0, 1.5, 2.0, 2.75, 3.75, 5.0, 7.0}, {1.0, 1.5, 2.25, 3.5, 5.0, 7.5}, {1.0, 1.5, 2.5, 4.0, 6.0}, {1.0, 1.75, 3.0, 6.0}, {1.0, 2.0, 5.0}, {1.0, 3.0}, {1.0} }; BOOL bad; int num; /* number of labels to draw */ int idx; /* current index in scale */ double coordinate; /* current coordinate */ MATH_NORMDBL norm; PLOT_AXIS *pAxis = p->pAxis; int scale = 0; do /* try to put a (decreasing) number of labels at the axis */ { bad = FALSE; idx = num = 0; p->maxw = 0; norm = mathNorm10(pAxis->start); norm.mantissa = plotGridPoint[scale][0]; coordinate = mathDenorm10(norm); while (coordinate < pAxis->start) { /* increment while less than start */ if (++idx >= plotGridNum[scale]) { idx = 0; /* next decade */ ++norm.exponent; } /* if */ norm.mantissa = plotGridPoint[scale][idx]; coordinate = mathDenorm10(norm); } /* if */ while ((coordinate <= pAxis->stop) && (num < PLOT_LABELS_MAX) && !bad) { bad = insertLabel (cr, p, margin, vertical, coordinate, num++); if (++idx >= plotGridNum[scale]) /* next grid point */ { idx = 0; ++norm.exponent; } /* if */ norm.mantissa = plotGridPoint[scale][idx]; coordinate = mathDenorm10 (norm); } /* while */ if (bad) /* some labels overlap? */ { while (num-- > 0) /* free all pango layouts (label strings) */ { g_object_unref (p->labels[num].layout); } /* while */ } /* if */ } /* do */ while ((++scale < N_ELEMENTS(plotGridNum)) && bad); return num; } /* scaleLog() */ /* FUNCTION *******************************************************************/ /** Draws all the grid and axis labels wrt. associated colors. Notice that * drawGridLabels() performs its own cairo_stroke() and modifies the color * in \e Cairo drawing context if \p colors is unequal to NULL. * * \param cr \e Cairo context for drawing. * \param colors Pointer to array of GDK colors indexed by PLOT_COLOR. * If NULL, the current (default) colors are used. * \param numx Number of labels at x-axis. * \param pX Pointer to x-axis workspace. * \param numy Number of labels at y-axis. * \param pY Pointer to y-axis workspace. * * \return 0 on success, else an error number from errno.h. ******************************************************************************/ static void drawGridLabels (cairo_t *cr, GdkColor *colors, int numx, PLOT_AXIS_WORKSPACE* pX, int numy, PLOT_AXIS_WORKSPACE* pY) { static double dashes[] = {PLOT_GRID_DASH_LEN, PLOT_GRID_DASH_LEN}; int i; PLOT_LABEL *pLabel; /* Set the color into Cairo context (using cairo_set_source_rgb) before * calling pango_cairo_show_layout(). It seems that a call to cairo_stroke * isn't needed, may be its implemented in pango_cairo_show_layout(). */ PLOT_COLOR_SET (cr, colors, PLOT_COLOR_LABELS); for (i = 0, pLabel = pX->labels; i < numx; i++, pLabel++) { /* x-axis labels */ drawLayout (cr, pLabel->layout, pLabel->pos, pX->pos); } /* for */ for (i = 0, pLabel = pY->labels; i < numy; i++, pLabel++) { /* y-axis labels */ drawLayout (cr, pLabel->layout, pY->pos, pLabel->pos); } /* for */ i = 0; /* indicates any grid drawing */ if (pX->pAxis->flags & PLOT_AXIS_FLAG_GRID) { for (i = 0, pLabel = pX->labels; i < numx; i++, pLabel++) { /* x-axis grid */ cairo_move_to (cr, pLabel->grid, pY->start); cairo_line_to (cr, pLabel->grid, pY->stop); } /* for */ } /* if */ if (pY->pAxis->flags & PLOT_AXIS_FLAG_GRID) { for (i = 0, pLabel = pY->labels; i < numy; i++, pLabel++) { /* y-axis grid */ cairo_move_to (cr, pX->start, pLabel->grid); cairo_line_to (cr, pX->stop, pLabel->grid); } /* for */ } /* if */ if (i > 0) /* any grid drawn? */ { PLOT_COLOR_SET (cr, colors, PLOT_COLOR_GRID); cairo_set_dash (cr, dashes, N_ELEMENTS(dashes), 0.0); cairo_set_line_width (cr, PLOT_GRID_LINE_WIDTH); cairo_stroke (cr); } /* if */ for (i = 0, pLabel = pX->labels; i < numx; i++, pLabel++) { /* label markers */ cairo_move_to (cr, pLabel->grid, pY->start); cairo_line_to (cr, pLabel->grid, pY->start - PLOT_LABEL_MARKER_LEN); if (pX->pAxis->flags & PLOT_AXIS_FLAG_GRID) { cairo_move_to (cr, pLabel->grid, pY->stop); cairo_line_to (cr, pLabel->grid, pY->stop + PLOT_LABEL_MARKER_LEN); } /* if */ } /* for */ for (i = 0, pLabel = pY->labels; i < numy; i++, pLabel++) { cairo_move_to (cr, pX->start, pLabel->grid); cairo_line_to (cr, pX->start + PLOT_LABEL_MARKER_LEN, pLabel->grid); if (pY->pAxis->flags & PLOT_AXIS_FLAG_GRID) { cairo_move_to (cr, pX->stop, pLabel->grid); cairo_line_to (cr, pX->stop - PLOT_LABEL_MARKER_LEN, pLabel->grid); } /* if */ } /* for */ PLOT_COLOR_SET (cr, colors, PLOT_COLOR_BOX); cairo_set_dash (cr, dashes, 0, 0); /* no dashes */ cairo_set_operator (cr, CAIRO_OPERATOR_OVER); cairo_set_line_width (cr, PLOT_LABEL_MARKER_WIDTH); cairo_stroke (cr); } /* drawGridLabels() */ /* FUNCTION *******************************************************************/ /** The function tries to find the minimum and maximum y-coordinates used for * auto-scaling. * * \param pDiag Pointer to plot descriptor. The members \a pDiag->y.start * and \a pDiag->y.stop are modified on success. * \param pX Pointer to x-axis workspace. * * \return 0 on success, else an error number from errno.h. ******************************************************************************/ static int searchMinMaxY (PLOT_DIAG* pDiag, PLOT_AXIS_WORKSPACE *pX) { int i; double y, x = pDiag->x.start; double minY = DBL_MAX; double maxY = DBL_MIN; double delta = PLOT_AXIS_MAX - PLOT_AXIS_MIN; int num = callInitFunc (pDiag, pX); if (num < 0) { return ENOMEM; } /* if */ if (num > 1) { delta = (pDiag->x.stop - pDiag->x.start) / (num - 1); } /* if */ for (i = 0; i < num; i++) /* try to process all samples */ { y = pDiag->sampleFunc(&x, pDiag->pData); if (gsl_finite (y)) { /* only if y value exist */ minY = GSL_MIN_DBL(minY, y); maxY = GSL_MAX_DBL(maxY, y); } /* if */ if (callProgressFunc(pDiag, i, num)) { return 0; } /* if */ x += delta; } /* for */ callEndFunc (pDiag); if (minY < maxY) /* any valid values ? */ { pDiag->y.start = minY; pDiag->y.stop = maxY; } /* if */ return 0; } /* searchMinMaxY() */ /* FUNCTION *******************************************************************/ /** Plot style draw function for PLOT_STYLE_CIRCLE_ONLY. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate (may be clamped to boundaries). * \param size x/y extent of the point pixmap (e.g. radius). * ******************************************************************************/ static void drawStyleCircleOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size) { cairo_move_to (cr, x, y + size); /* avoid line to arc */ if (!curFlags) /* check preconditions for drawing */ { cairo_arc(cr, x, y, size, -3 * M_PI_2, M_PI_2); } /* if */ } /* drawStyleCircleOnly() */ /* FUNCTION *******************************************************************/ /** Plot style draw function for PLOT_STYLE_CIRCLE_SAMPLE. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate. * \param size x/y extent of the point pixmap (e.g. radius). * ******************************************************************************/ static void drawStyleCircleSample (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size) { PLOT_AXIS *pAxisY = pY->pAxis; int ybase = pY->start; /* base point of sample line (bottom) */ if (!(curFlags & PLOT_FLAG_INVALID)) /* check preconditions for drawing */ { /* Because a logarithmic axis always has start and stop greater than * zero, the following steps can be skipped (and this avoids a call to * w2c with argument 0) */ if (!(pAxisY->flags & PLOT_AXIS_FLAG_LOG)) { if (pAxisY->stop < 0.0) { ybase = pY->stop; } /* if */ else { if (pAxisY->start < 0.0) { ybase = w2c (pY, 0); } /* if */ } /* else */ } /* if */ if (curFlags & PLOT_FLAG_OUTSIDE) { size = 0; /* no circle to be drawn -> don't regard it's size */ } /* if */ drawStyleCircleOnly (cr, pY, lastFlags, curFlags, x, y, size); if (abs (y - ybase) >= size) /* should we really draw a line? */ { if (ybase < y) { cairo_move_to (cr, x, y - size); /* avoid line through circle */ } /* if */ cairo_line_to (cr, x, ybase); } /* if */ } /* if */ } /* drawStyleCircleSample() */ /* FUNCTION *******************************************************************/ /** Plot style draw function for PLOT_STYLE_LINE_ONLY. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate. * \param size x/y extent of the point pixmap (e.g. radius). * ******************************************************************************/ static void drawStyleLineOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size) { if ((lastFlags & PLOT_FLAG_INVALID) || /* last point was invalid? */ (lastFlags & curFlags & PLOT_FLAG_OUTSIDE)) { cairo_move_to (cr, x, y); } /* if */ else { cairo_line_to (cr, x, y); } /* else */ } /* drawStyleLineOnly() */ /* FUNCTION *******************************************************************/ /** Plot style draw function for PLOT_STYLE_CROSS_ONLY. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate. * \param size x/y extent of the point pixmap (e.g. radius). * ******************************************************************************/ static void drawStyleCrossOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size) { if (!curFlags) /* check preconditions for drawing */ { cairo_move_to (cr, x - size, y - size); cairo_line_to (cr, x + size, y + size); cairo_move_to (cr, x + size, y - size); cairo_line_to (cr, x - size, y + size); } /* if */ } /* drawStyleCrossOnly() */ /* FUNCTION *******************************************************************/ /** Plot style draw function for PLOT_STYLE_BOX_ONLY. * * \param cr \e Cairo context for drawing. * \param pY Pointer to y-axis workspace. * \param lastFlags Properties of last sample point. * \param curFlags Properties of current sample point. * \param x x coordinate. * \param y y coordinate. * \param size x/y extent of the point pixmap (e.g. radius). * ******************************************************************************/ static void drawStyleBoxOnly (cairo_t* cr, PLOT_AXIS_WORKSPACE* pY, unsigned lastFlags, unsigned curFlags, int x, int y, int size) { if (!curFlags) /* check preconditions for drawing */ { cairo_rectangle(cr, x - size, y - size, 2 *size, 2 * size); } /* if */ } /* drawStyleBoxOnly() */ /* FUNCTION *******************************************************************/ /** Draws a continuous graph on a \e Cairo context. * * * \param cr \e Cairo context for drawing. * \param size x/y extent of the point pixmap (e.g. radius). * \param pDiag Pointer to plot diagram descriptor. * \param pX Pointer to x-axis workspace. * \param pY Pointer to y-axis workspace. * * \return The number of samples taken to draw this plot * (independent of a possible break) or a negative * number on error. ******************************************************************************/ static int drawGraph (cairo_t *cr, int size, PLOT_DIAG *pDiag, PLOT_AXIS_WORKSPACE *pX, PLOT_AXIS_WORKSPACE *pY) { static const PLOT_FUNC_DRAW drawFunc[] = { drawStyleLineOnly, /* PLOT_STYLE_LINE_ONLY */ drawStyleCircleOnly, /* PLOT_STYLE_CIRCLE_ONLY */ drawStyleCircleSample, /* PLOT_STYLE_CIRCLE_SAMPLE */ drawStyleCrossOnly, /* PLOT_STYLE_CROSS_ONLY */ drawStyleBoxOnly /* PLOT_STYLE_BOX_ONLY */ }; int cx, cy; /* logical (user space) coordinates */ double y, x = pDiag->x.start; /* world coordinates */ unsigned lastFlags, curFlags = PLOT_FLAG_INVALID; /* properties of current/last point */ double delta = PLOT_AXIS_MAX - PLOT_AXIS_MIN; int i, num = callInitFunc (pDiag, pX); if (num < 0) { return num; } /* if */ if (num > 1) { delta = (pDiag->x.stop - pDiag->x.start) / (num - 1); } /* if */ for (i = 0; i < num; i++) /* for all samples */ { y = pDiag->sampleFunc(&x, pDiag->pData); lastFlags = curFlags; /* make current to last */ if (gsl_finite (y)) /* if no singularity draw it */ { curFlags = 0; if (y < pDiag->y.start - PLOT_TOLERANCE) /* check y */ { cy = pY->start; /* regard swapped start/stop values */ curFlags |= PLOT_FLAG_OUTSIDE; } /* if */ else { if (y > pDiag->y.stop + PLOT_TOLERANCE) { curFlags |= PLOT_FLAG_OUTSIDE; cy = pY->stop; /* regard swapped start/stop values */ } /* if */ else { cy = w2c(pY, y); /* logical y-coordinate */ } /* else */ } /* /else */ if (x < pDiag->x.start - PLOT_TOLERANCE) /* check x */ { cx = pX->start; curFlags |= PLOT_FLAG_OUTSIDE; } /* if */ else { if (x > pDiag->x.stop + PLOT_TOLERANCE) { curFlags |= PLOT_FLAG_OUTSIDE; cx = pX->stop; } /* if */ else { cx = w2c(pX, x); /* logical x-coordinate */ } /* else */ } /* /else */ ASSERT(pDiag->style < N_ELEMENTS(drawFunc)); drawFunc[pDiag->style](cr, pY, lastFlags, curFlags, cx, cy, size); } /* if */ else { curFlags = PLOT_FLAG_INVALID; } /* else */ if (callProgressFunc(pDiag, i, num)) { return num; } /* if */ x += delta; } /* for */ callEndFunc (pDiag); return num; } /* drawGraph() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Plots a diagram. The function plots a 2-dimensional curve diagram \p pDiag * into a \e Cairo context given in \p cr. At a precondition the clip region * must be set correctly, * DeltaRatio = (ScreenMax-ScreenMin)/(WorldMax-WorldMin) (I) Screen = DeltaRatio*(World-WorldMin) + ScreenMin (II) World = (Screen - ScreenMin) / DeltaRatio + WorldMin (III) if LOGAXIS (logarithmic axis) then World := log(World) before using of equation I,II,III what means : DeltaRatio = (ScreenMax-ScreenMin)/(log(WorldMax)-log(WorldMin)) = (ScreenMax-ScreenMin)/(log(WorldMax/WorldMin)) Screen = DeltaRatio*(log(World) - log(WorldMin)) + ScreenMin = DeltaRatio*log(World/WorldMin) + ScreenMin World = 10^(log(WorldMin) + (Screen - ScreenMin)/DeltaRatio)) = WorldMin*10^((Screen - ScreenMin)/DeltaRatio) * * \param cr \e Cairo context for drawing, which may be retrieved * by the help of following functions: * - gdk_cairo_create () * - gtk_print_context_get_cairo_context(). * Notice, that the \e Cairo context is preserved (nothing * chenged). * \param pDiag Pointer to plot descriptor. * * \return 0 on success, else an error number from errno.h. * \todo Make axisX.start and axisX.stop positions dependent of * number of digits. Especially think about the corrections * of axisX.stop (which is an estimation at the moment). ******************************************************************************/ int cairoPlot2d(cairo_t* cr, PLOT_DIAG *pDiag) { int any, numx, numy; /* number of label strings per axis */ PLOT_AXIS_WORKSPACE axisX, axisY; cairo_font_extents_t refsize; int width, height; /* font extents */ int ret = 0; axisX.pAxis = &pDiag->x; axisY.pAxis = &pDiag->y; (void)cairoPlotChkRange (&pDiag->x); (void)cairoPlotChkRange (&pDiag->y); cairo_font_extents (cr, &refsize); height = (int)refsize.height + 2; width = (int)refsize.max_x_advance + 2; axisX.start = pDiag->area.x + width; axisX.stop = pDiag->area.x + pDiag->area.width - width; axisY.start = pDiag->area.y + height; axisY.stop = pDiag->area.y + pDiag->area.height - 2 * height; if (pDiag->y.name != NULL) { axisY.start += 5 * height / 2; /* reserve space for name of y-axis */ } /* if */ if (pDiag->x.name != NULL) { /* reserve space for name of x-axis */ axisY.stop -= 3 * height / 2; /* expand by height + 1/2 extra space */ } /* if */ if ((axisX.stop > axisX.start) && (axisY.stop > axisY.start)) { cairo_save(cr); axisX.ratio = w2cRatio (&pDiag->x, axisX.start, axisX.stop); /* preliminary */ any = pDiag->y.flags & PLOT_AXIS_FLAG_AUTO; /* auto scaling? */ /* Try to find the minimum and maximum y-coordinates for auto-scaling. */ while (any) /* do it twice if log. y-axis changed to linear */ { if (searchMinMaxY (pDiag, &axisX)) { return drawErrorMsg (cr, pDiag, -1); } /* if */ any = cairoPlotChkRange (&pDiag->y); if (any && (pDiag->y.flags & PLOT_AXIS_FLAG_LOG)) { pDiag->y.flags &= ~PLOT_AXIS_FLAG_LOG; /* change to linear axis */ } /* if */ else { any = FALSE; } /* else */ } /* while */ axisX.pos = axisY.stop + height / 2; /* position of labels */ /* Change y-coordinate for equal handling (notice the cairo context has * south-east orientation). */ MATH_SWAP_INT (axisY.start, axisY.stop); axisY.ratio = w2cRatio (&pDiag->y, axisY.start, axisY.stop); if (pDiag->y.flags & PLOT_AXIS_FLAG_LOG) /* logarithmic y-axis? */ { numy = scaleLog (cr, &axisY, height, TRUE); } /* if */ else /* linear y-axis */ { numy = scaleLin (cr, &axisY, height, TRUE); } /* else */ axisY.pos = axisX.start; createAxisNameLayout (cr, &axisX); /* create axis names (or NULL) */ createAxisNameLayout (cr, &axisY); /* Note: For the following corrections axisX.maxw cannot be used, * because it is valid only after scaleLin() for the x-axis. */ axisX.start += MAX (axisY.maxw + width / 2, axisY.width / 2); axisX.stop -= MAX (2 * width, axisX.width / 2); if ((axisX.stop > axisX.start) && (axisY.start > axisY.stop)) { /* calculate x-ratio (again) */ axisX.ratio = w2cRatio (&pDiag->x, axisX.start, axisX.stop); cairo_set_tolerance (cr, 1.0); /* speed path calculation up */ PLOT_COLOR_SET (cr, pDiag->colors, PLOT_COLOR_AXIS_NAME); if (axisX.layout != NULL) { drawLayout (cr, axisX.layout, axisX.stop - axisX.width / 2, axisX.pos + 3 * height / 2); } /* if */ if (axisY.layout != NULL) { /* put the name of y-axis 2.5 times the line height up the axis * starting point (so regarding subscripts in the axis name) */ drawLayout (cr, axisY.layout, axisX.start - axisY.width / 2, axisY.stop - 5 * height / 2); } /* if */ if (pDiag->x.flags & PLOT_AXIS_FLAG_LOG) /* logarithmic x-axis? */ { numx = scaleLog (cr, &axisX, 2 * width, FALSE); } /* if */ else /* linear x-axis */ { numx = scaleLin (cr, &axisX, 2 * width, FALSE); } /* else */ pDiag->area.x = axisX.start; /* prepare return values */ pDiag->area.y = axisY.stop; pDiag->area.width = axisX.stop - axisX.start; pDiag->area.height = axisY.start - axisY.stop; /* Now draw grid and labels with associated colors. Notice that * drawGridLabels() performs its own cairo_stroke() and modifies * some colors in \e Cairo drawing context. */ drawGridLabels (cr, pDiag->colors, numx, &axisX, numy, &axisY); cairo_rectangle(cr, axisX.start, axisY.stop, pDiag->area.width, pDiag->area.height); PLOT_COLOR_SET (cr, pDiag->colors, PLOT_COLOR_BOX); cairo_set_line_width (cr, PLOT_BOX_LINE_WIDTH); cairo_stroke_preserve (cr); /* retain the path for clipping */ cairo_clip (cr); /* clip the box */ ret = drawGraph (cr, height / 3, pDiag, &axisX, &axisY); PLOT_COLOR_SET (cr, pDiag->colors, PLOT_COLOR_GRAPH); cairo_set_line_width (cr, pDiag->thickness); cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND); cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); /* cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); */ cairo_stroke (cr); } /* if */ else /* drawing area for graph too small */ { g_object_unref (axisX.layout); /* free axis name layouts */ g_object_unref (axisY.layout); while (--numy >= 0) /* free y-axis label layouts */ { g_object_unref (axisY.labels[numy].layout); } /* for */ } /* else */ cairo_restore (cr); } /* if */ return drawErrorMsg (cr, pDiag, ret); } /* cairoPlot2d() */ /* FUNCTION *******************************************************************/ /** Checks the plot range of an axis against some predefined limits. If the * range [start, stop] doesn't match these limits, it returns ERANGE and * changes the range automatically. * * * \param pAxis Pointer to axis workspace. * * \return If range is in boundaries then it returns the value 0, * else ERANGE from errno.h. ******************************************************************************/ int cairoPlotChkRange (PLOT_AXIS *pAxis) { double result; int ret = 0; if (pAxis->flags & PLOT_AXIS_FLAG_LOG) /* logarithmic axis */ { pAxis->start = CLAMP (pAxis->start, PLOT_TOLERANCE, PLOT_AXIS_MAX); pAxis->stop = CLAMP (pAxis->stop, PLOT_TOLERANCE, PLOT_AXIS_MAX); result = mathTryDiv(pAxis->start, pAxis->stop); if (gsl_isinf(result) || (result < PLOT_TOLERANCE)) { pAxis->start = pAxis->stop * PLOT_TOLERANCE; ret = ERANGE; } /* if */ result = mathTryDiv(pAxis->stop, pAxis->start); if (gsl_isinf(result) || (result < (1.0 + PLOT_TOLERANCE))) { pAxis->stop = pAxis->start * (1.0 + PLOT_TOLERANCE); ret = ERANGE; } /* if */ } /* if */ else /* linear axis */ { pAxis->start = CLAMP (pAxis->start, PLOT_AXIS_MIN, PLOT_AXIS_MAX); pAxis->stop = CLAMP (pAxis->stop, PLOT_AXIS_MIN, PLOT_AXIS_MAX); if ((pAxis->stop - pAxis->start) < PLOT_TOLERANCE) { pAxis->stop = pAxis->start + PLOT_TOLERANCE; ret = ERANGE; } /* if */ } /* else */ return ret; } /* cairoPlotChkRange() */ /* FUNCTION *******************************************************************/ /** Returns a world-coordinate associated with a GDK coordinate. * * \note Because cairoPlotChkRange() has checked the ranges \p pAxis->start * and \p pAxis->stop with respect to the operation \p pAxis->stop - * \p pAxis->start (lin. case) and \p pAxis->stop / \p pAxis->start * (log. case) there is no need to use math. function mathTryDiv(). * * \param pAxis Pointer to axis description (filled from a previuous * call to cairoPlot2d). * \param start Start point of plot graph (box) in GDK coordinates. * \param stop Stop point of plot graph (box) in GDK coordinates. * \param coordinate The GDK coordinate to be transformed into world. * * \attention Due to internal processing optimization (associated * with the south-east orientation of y-axis) the * calculation of y-coordinates gives correct results * only when \p start and \p stop are exchanged. * * \return World-coordinate within this axis. ******************************************************************************/ double cairoPlotCoordinate (PLOT_AXIS *pAxis, int start, int stop, int coordinate) { double offset = (coordinate - start) / w2cRatio (pAxis, start, stop); if (pAxis->flags & PLOT_AXIS_FLAG_LOG) /* log. axis? */ { return pAxis->start * POW10(CLAMP (offset, 0.0, log10 (pAxis->stop / pAxis->start))); } /* if */ return pAxis->start + offset; /* linear case */ } /* cairoPlotCoordinate() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/mathMisc.c0000644000175100001440000000562313622204656013021 00000000000000/******************************************************************************/ /** * \file * Miscellaneous mathematical functions and macros. * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * * \todo Implement a generic error handler * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathMisc.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Tries division \f$y=num/den\f$ wrt. overflow. * * \param num Numerator. * \param den Denominator. * * \return \f$y=num/den\f$ or GSL_POSINF/GSL_NEGINF. Use the * functions gsl_isinf() or gsl_finite() for result * checking. ******************************************************************************/ double mathTryDiv(double num, double den) { if (fabs(den) <= 1.0) /* no overflow on fabs(den) * DBL_MAX ? */ { if (fabs(num) >= fabs(den) * GSL_DBL_MAX) /* overflow expected ? */ { /* path handles also 0/0 */ if (((num < 0.0) && (den > 0.0)) || ((num > 0.0) && (den < 0.0))) { return GSL_NEGINF; } /* if */ return GSL_POSINF; } /* if */ } /* if */ return num / den; } /* mathTryDiv() */ /* FUNCTION *******************************************************************/ /** Swaps two double values. * * \param p1 Pointer to first value. * \param p2 Pointer to second value. * * \return Nothing. ******************************************************************************/ void mathDoubleSwap(double *p1, double *p2) { double tmp = *p1; *p1 = *p2; *p2 = tmp; } /* mathDoubleSwap() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/miscDesignDlg.c0000644000175100001440000006737213622205141013767 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file miscDesignDlg.c * \brief Miscellaneous FIR/IIR design dialogs. * * \note Includes raw filters (filters without a design). * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dfcgen.h" #include "projectFile.h" #include "filterSupport.h" #include "dialogSupport.h" #include "miscFilter.h" #include "miscDesignDlg.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ typedef struct { int degree; /**< (Default) degree */ char *fname; /**< raw filter filename in GLib encoding */ char *title; /**< Title (name) of filter */ char *desc; /**< Filter description (may be NULL) */ } MISCDLG_FILTER_DESC; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define MISCDLG_WIDGET_MAIN "miscDesignDlgMain" #define MISCDLG_ENTRY_SAMPLE "entrySampleF" /**< Sample frequency entry */ #define MISCDLG_SPIN_DEGREE "spinDegree" /**< Degree of filter entry/spin */ #define MISCDLG_COMBO_TYPE "comboType" /**< Type of filter combobox */ #define MISCDLG_LABEL_DESC "labelDesc" /**< Description of filter */ #define MISCDLG_EXPANDER_DESC "expanderDesc" /**< Expander widget */ #define MISCDLG_UNIT_SAMPLE "unitSampleF" /**< Sample frequency unit label */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ static MISCDLG_FILTER_DESC miscFilterList[MISCFLT_SIZE] = { { /* MISCFLT_HILBERT (0): Hilbert transformer */ 1, NULL, N_("Hilbert transformer (FIR)"), N_("A Hilbert transformer is a 90° phase shifter with the impulse response g(t)=1/Ï–t. The approximation is based on Fourier series expansion of the repetitive frequency response:\nH(f)=-j sgn(f).") }, { /* MISCFLT_INT (1): Integrator */ 1, NULL, N_("Perfect Integrator (FIR)"), N_("A perfect integrator has the Heaviside unit step function as it's impulse response. The approximation is based on Fourier series expansion of the repetitive frequency response:\nH(f)=½δ(f)+1/j2Ï–f.") }, { /* MISCFLT_DIFF (2): Differentiator */ 1, NULL, N_("Perfect Differentiator (FIR)"), N_("A perfect differentiator has the Dirac impulse as it's impulse response. The approximation is based on Fourier series expansion of the repetitive frequency response:\nH(f)=j2Ï–f.") }, { /* MISCFLT_COMB (3): Comb filter */ 1, NULL, N_("Comb filter (FIR)"), N_("The comb filter is a computational physical model of a single discrete echo. It has the transfer function:\nH(z)=1-z-n\nand thus a linear phase.") }, { /* MISCFLT_AVGFIR (4): Moving average filter (non-recursive) */ 1, NULL, N_("Moving average (FIR)"), N_("The moving average filter (also called digital window integrator or sinc filter) is an approximation of the impulse response of the ideal lowpass. As a FIR implementation it's transfer function is:\nH(z)=1+z-1+z-2+...+z-n.") }, { /* MISCFLT_AVGIIR (5): Moving average filter (recursive) */ 1, NULL, N_("Moving average (IIR)"), N_("The moving average filter (also called digital window integrator or sinc filter) is an approximation of the impulse response of the ideal lowpass. As an IIR implementation it's transfer function is:\nH(z)=(1-z-n)/(1-z-1).") }, { /* MISCFLT_AVGEXP (6): Exponential average filter */ 1, NULL, N_("Exponential average (IIR)"), N_("The exponential average lowpass approximates a first order (analog RC-) lowpass. The transfer function is:\nH(z)=1/[n-(n-1)z-1].") }, }; static GArray* rawFilterList = NULL; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static gboolean miscDlgComboSeparator(GtkTreeModel *model, GtkTreeIter *iter, gpointer data); static void miscDlgOnTypeComboChanged (GtkComboBox *combo, gpointer user_data); static GtkWidget* createDialog (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs); static void updateLayout (GtkWidget *topWidget, GtkWidget *combo, int index); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Realizes misc filter dialog layout. * * \param topWidget Toplevel widget. * \param boxDesignDlg The box widget to be used for the filter dialog. * \param pPrefs Pointer to desktop preferences. * * \return The filter type combobox widget. ******************************************************************************/ static GtkWidget* createDialog (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs) { GtkWidget *miscDesignDlgMain, *miscDesignDlgTable; GtkWidget *label, *expander, *combo, *widget; GtkObject *spinAdjustment; miscDesignDlgMain = gtk_frame_new (NULL); /* create the frame */ gtk_box_pack_start (GTK_BOX (boxDesignDlg), miscDesignDlgMain, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (miscDesignDlgMain), 6); gtk_frame_set_shadow_type (GTK_FRAME (miscDesignDlgMain), GTK_SHADOW_NONE); gtk_box_reorder_child (GTK_BOX (boxDesignDlg), miscDesignDlgMain, 1); GLADE_HOOKUP_OBJECT (topWidget, miscDesignDlgMain, MISCDLG_WIDGET_MAIN); widget = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_container_add (GTK_CONTAINER (miscDesignDlgMain), widget); gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 12, 0); /* indent childs */ miscDesignDlgTable = gtk_table_new (4, 3, FALSE); gtk_container_add (GTK_CONTAINER (widget), miscDesignDlgTable); gtk_container_set_border_width (GTK_CONTAINER (miscDesignDlgTable), 6); gtk_table_set_row_spacings (GTK_TABLE (miscDesignDlgTable), 6); gtk_table_set_col_spacings (GTK_TABLE (miscDesignDlgTable), 6); combo = gtk_combo_box_new_text (); /* type of filter combobox */ gtk_table_attach (GTK_TABLE (miscDesignDlgTable), combo, 0, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 6); g_signal_connect_after ((gpointer) combo, "changed", G_CALLBACK (miscDlgOnTypeComboChanged), NULL); GLADE_HOOKUP_OBJECT (topWidget, combo, MISCDLG_COMBO_TYPE); label = gtk_label_new_with_mnemonic (_("_Type")); gtk_frame_set_label_widget (GTK_FRAME (miscDesignDlgMain), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); label = gtk_label_new_with_mnemonic (_("f_Sample")); gtk_table_attach (GTK_TABLE (miscDesignDlgTable), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 0); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); widget = gtk_entry_new (); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (miscDesignDlgTable), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Sample frequency")); gtk_entry_set_width_chars (GTK_ENTRY (widget), GUI_ENTRY_WIDTH_CHARS); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); GLADE_HOOKUP_OBJECT (topWidget, widget, MISCDLG_ENTRY_SAMPLE); label = gtk_label_new (pPrefs->frequUnit.name); /* sample frequency unit */ gtk_table_attach (GTK_TABLE (miscDesignDlgTable), label, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); GLADE_HOOKUP_OBJECT (topWidget, label, MISCDLG_UNIT_SAMPLE); label = gtk_label_new_with_mnemonic (_("_Degree")); gtk_table_attach (GTK_TABLE (miscDesignDlgTable), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); spinAdjustment = gtk_adjustment_new (1, FLT_DEGREE_MIN, FLT_DEGREE_MAX, 1, 10, 0); widget = gtk_spin_button_new (GTK_ADJUSTMENT (spinAdjustment), 1, 0); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); gtk_table_attach (GTK_TABLE (miscDesignDlgTable), widget, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("Degree of system")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); GLADE_HOOKUP_OBJECT (topWidget, widget, MISCDLG_SPIN_DEGREE); expander = gtk_expander_new (NULL); gtk_table_attach (GTK_TABLE (miscDesignDlgTable), expander, 0, 3, 3, 4, (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), 0, 12); gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE); gtk_expander_set_spacing (GTK_EXPANDER (expander), 12); GLADE_HOOKUP_OBJECT (topWidget, expander, MISCDLG_EXPANDER_DESC); label = gtk_label_new (""); /* filter description text */ gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_selectable (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_container_add (GTK_CONTAINER (expander), label); GLADE_HOOKUP_OBJECT (topWidget, label, MISCDLG_LABEL_DESC); label = gtk_label_new (_("Description")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_expander_set_label_widget (GTK_EXPANDER (expander), label); gtk_widget_show_all (miscDesignDlgMain); return combo; } /* createDialog() */ /* FUNCTION *******************************************************************/ /** Updates the design layout. * * \param topWidget Top level widget. * \param combo Combobox widget (filter type). * \param index Filter associated combobox index. Notice that index * MISCFLT_SIZE is reserved for the separator. * ******************************************************************************/ static void updateLayout (GtkWidget *topWidget, GtkWidget *combo, int index) { const char *desc; GtkWidget *widget; MISCDLG_FILTER_DESC raw; ASSERT (topWidget != NULL); ASSERT (combo != NULL); if (index < 0) /* nothing selected? */ { index = 0; /* set default startup value */ } /* if */ widget = lookup_widget (topWidget, MISCDLG_SPIN_DEGREE); if (index < MISCFLT_SIZE) /* misc filters (hard coded) */ { desc = miscFilterList[index].desc; gtk_widget_set_sensitive (widget, TRUE); } /* if */ else /* raw/predefined filters? */ { raw = g_array_index (rawFilterList, MISCDLG_FILTER_DESC, index - MISCFLT_SIZE - 1); desc = raw.desc; /* may be NULL */ gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), raw.degree); gtk_widget_set_sensitive (widget, FALSE); } /* else */ widget = lookup_widget (topWidget, MISCDLG_EXPANDER_DESC); if ((desc != NULL) && (g_utf8_strlen (desc, -1) > 0)) /* show description if available */ { gtk_label_set_markup (GTK_LABEL (lookup_widget (topWidget, MISCDLG_LABEL_DESC)), gettext (desc)); gtk_widget_show_all (widget); } /* if */ else { gtk_widget_hide_all (widget); } /* else */ } /* updateLayout() */ /* FUNCTION *******************************************************************/ /** This function is called if the filter type changes. * * \param combo Combobox widget (filter type). * \param user_data User data of \e changed event (unused). * ******************************************************************************/ static void miscDlgOnTypeComboChanged (GtkComboBox *combo, gpointer user_data) { updateLayout (gtk_widget_get_toplevel (GTK_WIDGET (combo)), GTK_WIDGET (combo), gtk_combo_box_get_active(combo)); } /* miscDlgOnTypeComboChanged */ /* FUNCTION *******************************************************************/ /** This function is called from the GtkComboBox for each path (list element * inside). * * \param model Model of combobox widget (filter type). * \param iter The iterator associated with the current element/row. * \param data (Unused) data pointer passed to function * gtk_combo_box_set_row_separator_func(). * * \return TRUE if an separator should be drawn after the current * element. * ******************************************************************************/ static gboolean miscDlgComboSeparator(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { GtkTreePath* path = gtk_tree_model_get_path (model, iter); gint* pIndex = gtk_tree_path_get_indices (path); /* get path of iter */ if (pIndex == NULL) { return FALSE; } /* if */ return (*pIndex == MISCFLT_SIZE); /* depth is 1, take first integer */ } /* miscDlgComboSeparator() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Misc filter design dialog creation function. * * \note There is no design for raw filters (except the cutoff frequency). * * \param topWidget Toplevel widget. * \param boxDesignDlg The box widget to be used for the filter dialog. * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void miscDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg, const CFG_DESKTOP* pPrefs) { const gchar* filename; gchar* path; /* path to filters sub-directory */ DFCPRJ_FILTER prj; GDir* dir; GtkRequisition size; /* requisition size of combobox */ MISCDLG_FILTER_DESC raw; int count; GError *err = NULL; /* 1st step: create dialog layout */ GtkComboBox* combo = GTK_COMBO_BOX (createDialog (topWidget, boxDesignDlg, pPrefs)); /* 2nd step: insert misc filters */ for (count = 0; count < MISCFLT_SIZE; count++) { gtk_combo_box_append_text (combo, gettext (miscFilterList[count].title)); } /* for */ /* 3rd step: insert all predefined (raw) filters found in a sub-directory, * identified by DIR_ID_FILTERS */ rawFilterList = g_array_new (FALSE, TRUE, sizeof (MISCDLG_FILTER_DESC)); path = getPackageDirectory (DIR_ID_FILTERS); dir = g_dir_open (path, 0, &err); if (err == NULL) /* no error? */ { gtk_combo_box_append_text (combo, ""); /* insert space for separator */ do /* read all predefined filters from datadir (PREFIX/share) */ { filename = g_dir_read_name (dir); /* get next file in directory */ if (filename != NULL) /* end? */ { if (g_str_has_suffix (filename, PRJFILE_NAME_SUFFIX)) { raw.fname = g_build_filename (path, filename, NULL); prjFileRead (raw.fname, &prj, &err); if ((err == NULL) && /* valid project file? */ (prj.fltcls == FLTCLASS_MISC) && /* raw filter? */ (prj.design.miscFlt.type == MISCFLT_UNKNOWN)) { DEBUG_LOG("Predefined filter read from '%s'", filename); if (prj.info.title != NULL) { raw.degree = GSL_MAX (prj.filter.den.degree, prj.filter.num.degree); raw.title = g_strdup (prj.info.title); raw.desc = g_strdup (prj.info.desc); /* may be NULL */ g_array_append_val(rawFilterList, raw); gtk_combo_box_append_text (combo, prj.info.title); ++count; } /* if */ else { DEBUG_LOG("Predefined filter has no title (ignored)"); } /* else */ dfcPrjFree (&prj); } /* if */ else /* seems to be any other file */ { DEBUG_LOG("'%s' seems not to be a predefined filter.", filename); if (err != NULL) { g_error_free (err); err = NULL; } /* if */ } /* else */ } /* if */ else { DEBUG_LOG("'%s' is not a " PACKAGE " project file", filename); } /* else */ } /* if */ } while (filename != NULL); g_dir_close (dir); } /* if */ else /* directory not found */ { g_error_free (err); dlgError (topWidget, _("Could not load predefined filter(s) from '%s'"), path); } /* else */ g_free (path); /* free the sub-directory path string */ gtk_combo_box_set_row_separator_func (combo, miscDlgComboSeparator, NULL, NULL); /* To use the wrap feature of the description label the width of lable * widget must must be limited. A good reference width (used here) ist the * combobox. */ gtk_widget_size_request (GTK_WIDGET (combo), &size); gtk_widget_set_size_request (lookup_widget (topWidget, MISCDLG_LABEL_DESC), size.width, -1); gtk_combo_box_set_active (combo, 0); } /* miscDesignDlgCreate() */ /* FUNCTION *******************************************************************/ /** Standard IIR filter design dialog preset function. Restores all states * of dialog elements from design data of a standard IIR filter. * * \param topWidget Toplevel widget. * \param pDesign Pointer to standard IIR design data. * \param pFilter Pointer to filter coefficients (only member \a f0 used). * \param pPrefs Pointer to desktop preferences. * ******************************************************************************/ void miscDesignDlgPreset (GtkWidget *topWidget, const MISCFLT_DESIGN *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs) { GtkWidget *widget = lookup_widget (topWidget, MISCDLG_SPIN_DEGREE); gtk_label_set_text (GTK_LABEL (lookup_widget (topWidget, MISCDLG_UNIT_SAMPLE)), pPrefs->frequUnit.name); /* set unit */ dlgSetDouble (topWidget, MISCDLG_ENTRY_SAMPLE, /* sample frequency */ pPrefs->frequUnit.multiplier, pFilter->f0); if ((pDesign->type >= 0) && (pDesign->type < MISCFLT_SIZE)) /* known design? */ { /* show degree */ gtk_combo_box_set_active( GTK_COMBO_BOX (lookup_widget (topWidget, MISCDLG_COMBO_TYPE)), pDesign->type); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pDesign->order); gtk_widget_set_sensitive (widget, TRUE); } /* if */ else { gtk_spin_button_set_value ( GTK_SPIN_BUTTON (widget), GSL_MAX (pFilter->den.degree, pFilter->num.degree)); widget = gtk_message_dialog_new_with_markup ( GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, _("For this digital system only a limited set of design data is" " available. Thus the Type box and Description" " field will not reflect the original design (but still the" " coefficients).")); gtk_dialog_run (GTK_DIALOG (widget)); gtk_widget_destroy (widget); } /* else */ } /* miscDesignDlgPreset() */ /* FUNCTION *******************************************************************/ /** Misc filter design dialog destroy function. * * \note If the dialog is not active the function does nothing. * * \param topWidget Toplevel widget. * ******************************************************************************/ void miscDesignDlgDestroy (GtkWidget *topWidget) { int i; MISCDLG_FILTER_DESC raw; GtkWidget* widget = lookup_widget (topWidget, MISCDLG_WIDGET_MAIN); if (widget != NULL) { for (i = 0; i < rawFilterList->len; i++) { raw = g_array_index (rawFilterList, MISCDLG_FILTER_DESC, i); g_free (raw.fname); g_free (raw.title); /* never can be NULL */ if (raw.desc != NULL) { g_free (raw.desc); } /* if */ } /* for */ g_array_free (rawFilterList, TRUE); /* remove all references */ GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_WIDGET_MAIN); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_ENTRY_SAMPLE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_COMBO_TYPE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_SPIN_DEGREE); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_EXPANDER_DESC); GLADE_HOOKUP_OBJECT_NO_REF (topWidget, NULL, MISCDLG_LABEL_DESC); gtk_widget_destroy(widget); } /* if */ } /* miscDesignDlgDestroy() */ /* FUNCTION *******************************************************************/ /** Checks whether the misc filter design dialog is active or not. * * \param topWidget Toplevel widget. * * \return TRUE if the dialog is active (the main-widget of * raw dialog found), else FALSE. ******************************************************************************/ BOOL miscDesignDlgActive (GtkWidget *topWidget) { GtkWidget* widget = lookup_widget (topWidget, MISCDLG_WIDGET_MAIN); return (widget != NULL); } /* miscDesignDlgActive() */ /* FUNCTION *******************************************************************/ /** Miscellaneous FIR/IIR filter design dialog \e Apply function. * * \param topWidget Toplevel widget. * \param pPrefs Pointer to desktop preferences. * * \return - 0 (or GSL_SUCCESS) if okay and no coefficients are * dropped. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter can't be created. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. If the value is INT_MAX then an * error message box was displayed by function * miscDesignDlgApply(), means the caller should not * popup a (second) message box. ******************************************************************************/ int miscDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs) { int index; DFCPRJ_FILTER prj; /* filter project */ int err = INT_MAX; GtkComboBox *combo = GTK_COMBO_BOX (lookup_widget (topWidget, MISCDLG_COMBO_TYPE)); if (combo != NULL) /* normally combox should exist */ { index = gtk_combo_box_get_active(combo); if (index >= 0) /* anything selected (sanity check)? */ { if (dlgGetDouble (topWidget, MISCDLG_ENTRY_SAMPLE, FLT_SAMPLE_MIN, FLT_SAMPLE_MAX, pPrefs->frequUnit.multiplier, &prj.filter.f0)) { if (index < MISCFLT_SIZE) /* misc filter (with design)? */ { if (dlgGetInt (topWidget, MISCDLG_SPIN_DEGREE, FLT_DEGREE_MIN, FLT_DEGREE_MAX, &prj.design.miscFlt.order)) { prj.design.miscFlt.type = index; err = miscFilterGen (&prj.design.miscFlt, &prj.filter); if (!FLTERR_CRITICAL (err)) { dfcPrjSetFilter (FLTCLASS_MISC, &prj.filter, &prj.design); } /* if */ } /* if */ } /* if */ else /* predefined filters (raw) */ { GError *gerr = NULL; double sample = prj.filter.f0; MISCDLG_FILTER_DESC raw = g_array_index (rawFilterList, MISCDLG_FILTER_DESC, index - MISCFLT_SIZE - 1); prjFileRead (raw.fname, &prj, &gerr); if (gerr == NULL) { prj.filter.f0 = sample; /* restore user input */ dfcPrjSetFilter (FLTCLASS_MISC, &prj.filter, &prj.design); prjFileFree (&prj.info); /* only free author,... */ err = 0; } /* if */ else { dlgErrorFile (topWidget, _("Could not load predefined filter from '%s'"), raw.fname, gerr); g_error_free (gerr); } /* else */ } /* else */ } /* if */ } /* if */ } /* if */ return err; } /* miscDesignDlgApply() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/linFirFilter.c0000644000175100001440000006400313733643231013641 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter coefficients generator. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathMisc.h" /* includes config.h (include before GNU headers) */ #include "mathFuncs.h" /* HYPOT() */ #include "linFirFilter.h" #include "filterSupport.h" #include "filterResponse.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* FUNCTION *******************************************************************/ /** Coefficients generator function. * * \param x Argument \f$x\f$, typically the ratio \f$f_c/f_0\f$. * \param poly The polynomial for which the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ typedef int (*LINFIR_SYSGEN_FUNC)(double x, MATHPOLY *poly); /** * \brief Additive inversion (LP/HP frequency transformation) * cutoff frequency correction for linear FIR systems. * * \param fc Cutoff frequency. * * \return Corrected cutoff frequency. ******************************************************************************/ typedef double (*LINFIR_FCORR_FUNC)(double x); /* FUNCTION *****************************************************************/ /** * \brief Mathematical function \f$y=f(x;a)\f$ with parameter \f$a\f$. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param additional window parameter \f$a\f$ * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ****************************************************************************/ typedef double (*LINFIR_WINDOW_FUNC)(int step, int degree, double param); /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* MACRO **********************************************************************/ /** Error code check and conditional return. The macro checks for an error code * unequal to zero in \p cond. On that condition it calls filterFree(), then * returns. * * \param pFilter Pointer to filter. * \param cond Condition to be checked (e.g. may be a function call). * \param string Text (string), which describes the error/cause. * ******************************************************************************/ #define LINFIR_ERROR_RET(pFilter, cond, string) \ ERROR_RET_IF(cond, string, filterFree (pFilter); gsl_set_error_handler (oldHandler)) /* LOCAL FUNCTION DECLARATIONS ************************************************/ static int genRectangularSystem (double x, MATHPOLY *poly); static int genGaussianSystem (double x, MATHPOLY *poly); static int genCosineSystem (double x, MATHPOLY *poly); static int genCosine2System (double x, MATHPOLY *poly); static int genSquaredSystem (double x, MATHPOLY *poly); static double corrRectangularCutoff (double fc); static double corrGaussianCutoff (double fc); static double corrCosineCutoff (double fc); static double corrCosine2Cutoff (double fc); static double corrSquaredCutoff (double fc); static double firWinKaiser (int step, int degree, double param); static double firWinRectangle (int step, int degree, double param); static double firWinHamming (int step, int degree, double param); static double firWinVanHann (int step, int degree, double param); static double firWinBlackman (int step, int degree, double param); static double ftrHighpass (FLTCOEFF *pFilter); static double ftrBandpass (FLTCOEFF *pFilter, double fc, double bw, BOOL geometric); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Rectangular magnitude response system generator. Calculation of coefficient * \f$c_i\f$ is based on the argument \f$x\f$ and polynomial degree \f$n\f$ * following the formula: \f{eqnarray*} c_i &=& \frac{\sin\left[2\pi x\,(i-n/2)\right]}{2\pi x\,(i-n/2)} \\ &=& \si\left[2\pi x\,(i-n/2)\right] \f} * * \param x Argument \f$x\f$. * \param poly The numerator polynomial of the linear FIR system (in * \e Z domain), where the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ static int genRectangularSystem (double x, MATHPOLY *poly) { int i, err; gsl_sf_result result; double deg2 = poly->degree / 2.0; for (i = 0; i <= poly->degree; i++) { err = gsl_sf_sinc_e (2.0 * x * (i - deg2), &result); if (err != GSL_SUCCESS) { return err; } /* if */ poly->coeff[i] = result.val; } /* for */ return GSL_SUCCESS; } /* genRectangularSystem() */ /* FUNCTION *******************************************************************/ /** Cosine magnitude response system generator. Calculation of coefficient * \f$c_i\f$ is based on the argument \f$x\f$ and polynomial degree \f$n\f$ * following the formula: \f[ c_i=\frac{\cos\left[4\pi x\,(i-n/2)\right]}{1-64\left[x\,(i-n/2)\right]^2} \f] * * \param x Argument \f$x\f$. * \param poly The numerator polynomial of the linear FIR system (in * \e Z domain), where the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ static int genCosineSystem (double x, MATHPOLY *poly) { int i; double tmp; double deg2 = poly->degree / 2.0; for (i = 0; i <= poly->degree; i++) { tmp = x * (i - deg2); poly->coeff[i] = mathTryDiv (cos (4.0 * M_PI * tmp), 1.0 - 64 * tmp * tmp); if (gsl_isinf (poly->coeff[i])) { return GSL_EDOM; } /* if */ } /* for */ return GSL_SUCCESS; } /* genCosineSystem() */ /* FUNCTION *******************************************************************/ /** Squared cosine magnitude response system generator. Calculation of * coefficient \f$c_i\f$ is based on the argument \f$x\f$ and polynomial degree * \f$n\f$ following the formula: \f{eqnarray*} \Lambda &=& \frac{\pi}{\arccos\frac{1}{\sqrt[4]{2}}} \\ c_i &=& \frac{\si\left[\Lambda \pi x\,(i-n/2)\right]}{1-\left[\Lambda x\,(i-n/2)\right]^2} \\ \si(x) &=& \frac{\sin x}{x} \f} * * \param x Argument \f$x\f$. * \param poly The numerator polynomial of the linear FIR system (in * \e Z domain), where the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ static int genCosine2System (double x, MATHPOLY *poly) { int i, err; double tmp; gsl_sf_result result; double deg2 = poly->degree / 2.0; double constant = M_PI / acos (1.0 / sqrt (M_SQRT2)); for (i = 0; i <= poly->degree; i++) { tmp = constant * x * (i - deg2); err = gsl_sf_sinc_e (tmp, &result); if (err != GSL_SUCCESS) { return err; } /* if */ poly->coeff[i] = mathTryDiv (result.val, 1.0 - tmp * tmp); if (gsl_isinf (poly->coeff[i])) { return GSL_EDOM; } /* if */ } /* for */ return GSL_SUCCESS; } /* genCosine2System() */ /* FUNCTION *******************************************************************/ /** Squared first order lowpass magnitude response system generator. Calculation * of coefficient \f$c_i\f$ is based on the argument \f$x\f$ and polynomial * degree \f$n\f$ following the formula: \f[ c_i=\exp\left(-\,\frac{2\pi\,x\,|i-n/2|}{\sqrt{\sqrt{2}-1}}\right) \f] * * \param x Argument \f$x\f$. * \param poly The numerator polynomial of the linear FIR system (in * \e Z domain), where the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ static int genSquaredSystem (double x, MATHPOLY *poly) { int i, err; gsl_sf_result result; double deg2 = poly->degree / 2.0; double constant = -2.0 * M_PI / sqrt (M_SQRT2 - 1.0); for (i = 0; i <= poly->degree; i++) { err = gsl_sf_exp_e (constant * x * fabs (deg2 - i), &result); if (err != GSL_SUCCESS) { return err; } /* if */ poly->coeff[i] = result.val; } /* for */ return GSL_SUCCESS; } /* genSquaredSystem() */ /* FUNCTION *******************************************************************/ /** \e Gaussian magnitude response system generator. Calculation of coefficient * \f$c_i\f$ is based on the argument \f$x\f$ and polynomial degree \f$n\f$ * following the formula: \f[ c_i=\exp\left\{-\frac{2[\pi x\,(i-n/2)]^2}{\log 2}\right\} \f] * * \param x Argument \f$x\f$. * \param poly The numerator polynomial of the linear FIR system (in * \e Z domain), where the coefficients shall be set. * * \return Zero on success, else an error code (from errno.h or * gsl_errno.h). ******************************************************************************/ static int genGaussianSystem (double x, MATHPOLY *poly) { int i, err; double tmp; gsl_sf_result result; double deg2 = poly->degree / 2.0; for (i = 0; i <= poly->degree; i++) /* set all coefficients */ { tmp = x * (i - deg2) * M_PI; err = gsl_sf_exp_e (-2.0 * tmp * tmp / M_LN2, &result); if (err != GSL_SUCCESS) { return err; } /* if */ poly->coeff[i] = result.val; } /* for */ return GSL_SUCCESS; } /* genGaussianSystem() */ /** * \brief Cutoff frequency correction for LP/HP transformation of a * rectangular system. * * \param[in] fc target cutoff frequency of highpass * * \return corrected cutoff frequency, to be used for lowpass design */ static double corrRectangularCutoff (double fc) { return fc; /* no correction on rectangular system */ } /** * \brief Cutoff frequency correction for LP/HP transformation of a * cosine system. * * \param[in] fc target cutoff frequency of highpass * * \return corrected cutoff frequency, to be used for lowpass design */ static double corrCosineCutoff (double fc) { return M_PI_4 * fc / acos (1.0 - M_SQRT1_2); } /** * \brief Cutoff frequency correction for LP/HP transformation of a * squared cosine system. * * \param[in] fc target cutoff frequency of highpass * * \return corrected cutoff frequency, to be used for lowpass design */ static double corrCosine2Cutoff (double fc) { return fc * acos (sqrt (M_SQRT1_2)) / acos (sqrt (1.0 - M_SQRT1_2)); } /** * \brief Cutoff frequency correction for LP/HP transformation of a * 1st order squared system. * * \param[in] fc target cutoff frequency of highpass * * \return corrected cutoff frequency, to be used for lowpass design */ static double corrSquaredCutoff (double fc) { return (M_SQRT2 - 1.0) * fc; } /** * \brief Cutoff frequency correction for LP/HP transformation of a * gaussian system. * * \param[in] fc target cutoff frequency of highpass * * \return corrected cutoff frequency, to be used for lowpass design */ static double corrGaussianCutoff (double fc) { return M_SQRT1_2 * fc * sqrt (- M_LN2 / log (1.0 - M_SQRT1_2)); } /* FUNCTION *******************************************************************/ /** Rectangular window function. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param parameter (unused) * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double firWinRectangle (int step, int degree, double param) { (void) param; return mathFuncRectangle ((double) step / degree); } /* firWinRectangle() */ /* FUNCTION *******************************************************************/ /** \e Hamming window function. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param parameter (unused) * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double firWinHamming (int step, int degree, double param) { (void) param; return mathFuncHamming ((double) step / degree); } /* firWinHamming() */ /* FUNCTION *******************************************************************/ /** \e van \e Hann window function. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param parameter (unused) * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double firWinVanHann (int step, int degree, double param) { (void) param; return mathFuncVanHann ((double) (step + 1) / (degree + 2)); } /* firWinVanHann() */ /* FUNCTION *******************************************************************/ /** \e Blackman window function. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param parameter (unused) * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double firWinBlackman (int step, int degree, double param) { return mathFuncBlackman ((double) (step + 1) / (degree + 2)); } /* firWinBlackman() */ /* FUNCTION *******************************************************************/ /** \e Kaiser window function. * * \param step windowing step, running from 0 to \p degree * \param degree degree of filter * \param param parameter \f$\alpha\f$ of \e Kaiser window * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ static double firWinKaiser (int step, int degree, double param) { return mathFuncKaiser ((double) step / degree, param); } /* firWinKaiser() */ /* FUNCTION *******************************************************************/ /** \e Z domain highpass transformation of a linear FIR lowpass. The function * transforms lowpass coefficients into a highpass using the following formula: \f[ c_{n/2} := c_{n/2} - H(0) \f] * The resulting magnitude response is: \f[ |H_{HP}(f)| = H(0) - |H_{LP}(f)| \f] * * \attention \p pFilter->num.degree must be even (LP/HP transform * for systems with odd order is not possible/supported). * * \param pFilter Pointer to linear FIR lowpass that coefficients shall * transformed. * * \return The frequency where the magnitude response has it's * maximum. ******************************************************************************/ static double ftrHighpass (FLTCOEFF *pFilter) { MATHPOLY *poly = &pFilter->num; double magnitude = gsl_poly_eval (poly->coeff, poly->degree + 1, 1.0); ASSERT(GSL_IS_EVEN(poly->degree)); poly->coeff[poly->degree / 2] -= magnitude; return pFilter->f0 / 2.0 - DBL_EPSILON; } /* ftrHighpass() */ /* FUNCTION *******************************************************************/ /** \e Z domain bandpass transformation of a linear FIR lowpass. The function * transforms lowpass coefficients into a bandpass using the following formula: \f[ c_i := c_i \cos\left[2\pi\,(i-\frac{n}{2})\,\frac{f_c}{f_0}\right] \f] * If \f$f_c\f$ shall be interpreted as a geometric center frequency, then its * arithmetic counterpart is derived by: \f[ f_c := \sqrt{\left(\frac{\Delta f}{2}\right)^2+f_c^2} \f] * The resulting magnitude response is: \f[ \frac{|H_{BP}(f)|}{2} = |H_{LP}(f-f_c)| + |H_{LP}(f+f_c)| \f] * which may produce an aliasing effect at \f$f=0\f$. * * \attention \p pFilter->num.degree must be even (LP/BP transform * for systems with odd order is not possible/supported). * * \param pFilter Pointer to linear FIR lowpass that coefficients shall * transformed. * \param fc Arithmetic or geometric center frequency. * \param bw Bandwidth \f$\Delta f\f$. * \param geometric If TRUE then the center frequency is geometric, else * arithmetic. * * \return The frequency where the magnitude response has it's * maximum. ******************************************************************************/ static double ftrBandpass (FLTCOEFF *pFilter, double fc, double bw, BOOL geometric) { int i; double factor, tmp; MATHPOLY *poly = &pFilter->num; double deg2 = poly->degree / 2.0; /* half of degree */ ASSERT(GSL_IS_EVEN(poly->degree)); if (geometric) { fc = HYPOT (fc, 0.5 * bw); } /* if */ factor = 2.0 * M_PI * fc / pFilter->f0; for (i = 0; i <= poly->degree / 2; i++) /* modify coefficients */ { tmp = cos (factor * (i - deg2)); poly->coeff[i] *= tmp; poly->coeff[poly->degree - i] *= tmp; } /* for */ return fc; } /* ftrBandpass() */ /* FUNCTION *******************************************************************/ /** \e Z domain bandstop transformation. * * \attention \p pFilter->num.degree must be even (LP/BS transform * for systems with odd order is not possible/supported). * * \param pFilter Pointer to linear FIR lowpass that coefficients shall * transformed. * \param fc Arithmetic or geometric center frequency. * \param bw Bandwidth \f$\Delta f\f$. * \param geometric If TRUE then the center frequency is geometric, else * arithmetic. * * \return The frequency where the magnitude response has it's * maximum. * \todo Handle GSL_POSINF for call to filterResponsePoly() ******************************************************************************/ static double ftrBandstop (FLTCOEFF *pFilter, double fc, double bw, BOOL geometric) { double magnitude; MATHPOLY *poly = &pFilter->num; ASSERT(GSL_IS_EVEN(poly->degree)); fc = ftrBandpass (pFilter, fc, bw, geometric); magnitude = filterResponsePoly (2.0 * M_PI * fc / pFilter->f0, poly); poly->coeff[poly->degree / 2] -= magnitude; return pFilter->f0 / 2.0 - DBL_EPSILON; } /* ftrBandstop() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** * \brief Generates a linear FIR filter. * * \attention For frequency transformations (HP/BP/BS) the system * order (degree) must be even. * \note The cutoff frequency is assumed to be the 3dB point * of magnitude response. * * \param pDesign Pointer to linear FIR filter design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials is allocated * in the function linFirFilterGen(). * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int linFirFilterGen (LINFIR_DESIGN *pDesign, FLTCOEFF *pFilter) { static const LINFIR_SYSGEN_FUNC genFuncs[LINFIR_TYPE_SIZE] = { [LINFIR_TYPE_RECT] = genRectangularSystem, [LINFIR_TYPE_COS] = genCosineSystem, [LINFIR_TYPE_COS2] = genCosine2System, [LINFIR_TYPE_GAUSS] = genGaussianSystem, [LINFIR_TYPE_SQR] = genSquaredSystem }; static const LINFIR_FCORR_FUNC corrFuncs[LINFIR_TYPE_SIZE] = { [LINFIR_TYPE_RECT] = corrRectangularCutoff, [LINFIR_TYPE_COS] = corrCosineCutoff, [LINFIR_TYPE_COS2] = corrCosine2Cutoff, [LINFIR_TYPE_GAUSS] = corrGaussianCutoff, [LINFIR_TYPE_SQR] = corrSquaredCutoff }; static const LINFIR_WINDOW_FUNC winFuncs[LINFIR_DSPWIN_SIZE] = { [LINFIR_DSPWIN_RECT] = firWinRectangle, [LINFIR_DSPWIN_HAMMING] = firWinHamming, [LINFIR_DSPWIN_VANHANN] = firWinVanHann, [LINFIR_DSPWIN_BLACKMAN] = firWinBlackman, [LINFIR_DSPWIN_KAISER] = firWinKaiser }; int i, err; gsl_error_handler_t *oldHandler; double fnorm; /* unity norm frequency */ ASSERT(GSL_IS_EVEN(pDesign->order) || (pDesign->ftr.type == FTR_NON)); pFilter->factor = 0.0; /* roots are invalid (unused here) */ /* Memory allocation for coefficients and roots space in numerator and * denominator polynomial. */ pFilter->den.degree = 0; /* this is a FIR filter*/ pFilter->num.degree = pDesign->order; ERROR_RET_IF (filterMalloc(pFilter), "Linear FIR filter memory allocation"); pFilter->den.coeff[0] = 1.0; /* All GSL errors are handled by the caller (starting from here), therefore * disable the abort behavior of the GSL library. */ oldHandler = gsl_set_error_handler_off (); pFilter->factor = 0.0; /* no valid roots representation so far */ ASSERT (pDesign->type < LINFIR_TYPE_SIZE); switch (pDesign->ftr.type) /* frequency transformation */ { case FTR_BANDSTOP: pDesign->cutoff = corrFuncs[pDesign->type] (0.5 * pDesign->ftr.bw); break; case FTR_BANDPASS: pDesign->cutoff = 0.5 * pDesign->ftr.bw; break; /* FTR_BANDPASS, FTR_BANDSTOP */ case FTR_HIGHPASS: pDesign->cutoff = corrFuncs[pDesign->type] (pDesign->ftr.fc); break; /* FTR_HIGHPASS */ case FTR_NON: /* LOWPASS */ break; /* FTR_NON */ default: ASSERT(0); } /* switch */ err = genFuncs[pDesign->type] (pDesign->cutoff / pFilter->f0, &pFilter->num); LINFIR_ERROR_RET (pFilter, err, "Linear FIR filter generation has failed"); for (i = 0; i <= pFilter->num.degree; i++) /* apply window function */ { fnorm = winFuncs[pDesign->dspwin] (i, pFilter->num.degree, pDesign->winparm); if (gsl_finite (fnorm)) { pFilter->num.coeff[i] *= fnorm; } /* if */ } /* for */ /* Frequency transformation */ switch (pDesign->ftr.type) { case FTR_BANDSTOP: /* lowpass->bandstop transformation */ fnorm = ftrBandstop (pFilter, pDesign->ftr.fc, pDesign->ftr.bw, pDesign->ftr.flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC); break; case FTR_BANDPASS: fnorm = ftrBandpass (pFilter, pDesign->ftr.fc, pDesign->ftr.bw, pDesign->ftr.flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC); break; case FTR_HIGHPASS: /* lowpass->highpass transformation */ fnorm = ftrHighpass (pFilter); break; case FTR_NON: /* lowpass */ fnorm = 0.0; break; default: ASSERT(0); break; } /* switch */ i = normFilterMagnitude (pFilter, fnorm, 1.0); if (FLTERR_CRITICAL (i)) { filterFree (pFilter); } /* if */ gsl_set_error_handler (oldHandler); return i; } /* linFirFilterGen() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/rootsPlot.c0000644000175100001440000004525213622205141013251 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Roots plot functions. * * \author Copyright (C) 2006, 2011, 2018, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include #include "dfcProject.h" #include "rootsPlot.h" #include "cairoPlot.h" #include "cfgSettings.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ static int plotRootIndex; /**< Index of next root to plot */ static GtkWidget *plotDrawable; /**< Roots plot drawable widget handle */ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static int rootsPlotInit (double start, double stop, void *pData); static double plotRoot (double *px, void *pData); static double returnZeroRoot (double *px, void *pData); static void updateRootsMinMax (MATHPOLY *poly, gsl_complex *rmin, gsl_complex *rmax); static int calcRoots (MATHPOLY *poly); static gboolean rootsPlotExposeHandler (GtkWidget *widget, GdkEventExpose *event, gpointer user_data); static double plotUnitCircleBottom (double *px, void *pData); static double plotUnitCircleTop (double *px, void *pData); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Initialization function for a roots plot. This function must be of type * PLOT_FUNC_INIT from cairoPlot.h (see there). * * \param start The real-world start x-coordinate. * \param stop The real-world stop x-coordinate. * \param pData Pointer to polynomial (MATHPOLY) for which the roots * shall be plotted. If \p pData is NULL the function * returns -1. * * \return The function returns: * - normally the degree of polynomial referenced by \p pData * - a negative number, if \p pData is NULL. ******************************************************************************/ static int rootsPlotInit (double start, double stop, void *pData) { MATHPOLY *poly = pData; if (poly == NULL) { return -1; } /* if */ plotRootIndex = 0; return poly->degree; } /* rootsPlotInit() */ /* FUNCTION *******************************************************************/ /** Plot function for a polynomial root. This function must be of type * PLOT_FUNC_GET from cairoPlot.h (see there). * * \param px Pointer to buffer, which gets the x-coordinate (real * part) of the next root. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. Here it * must point to the polynomial (MATHPOLY) for which the * next root shall be plotted. * * \return The y-coordinate (imag. part) of the next root. If there * is no value at \p px, then it returns GSL_POSINF. ******************************************************************************/ static double plotRoot (double *px, void *pData) { double y; MATHPOLY *poly = pData; if (plotRootIndex >= poly->degree) /* sanity check */ { return GSL_POSINF; } /* if */ *px = GSL_REAL (poly->root[plotRootIndex]); y = GSL_IMAG (poly->root[plotRootIndex]); ++plotRootIndex; return y; } /* plotRoot() */ /* FUNCTION *******************************************************************/ /** Plot function for a polynomial root at 0,0. This function must be of type * PLOT_FUNC_GET from cairoPlot.h (see there). * * \param px Pointer to buffer, which gets the x-coordinate (real * part) of the root. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. Here it * is unused, because return ZeroRoot() always returns 0,0. * * \return The y-coordinate (imag. part) of the next root (always 0). ******************************************************************************/ static double returnZeroRoot (double *px, void *pData) { *px = 0.0; return 0.0; } /* returnZeroRoot() */ /* FUNCTION *******************************************************************/ /** Plot function for a north-oriented semicircle with unity radius. This * function must be of type PLOT_FUNC_GET from cairoPlot.h (see there). * * \param px Pointer to real-world x-coordinate. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. Here it is * unused. * * \return The y-coordinate \f$y=\sqrt{1-x^2}\f$ of the semicircle * associated with \p *px. ******************************************************************************/ static double plotUnitCircleTop (double *px, void *pData) { double y; if (fabs (*px) <= 1.0) { y = sqrt (1 - *px * *px); } /* if */ else { y = GSL_POSINF; } /* else */ return y; } /* plotUnitCircleTop() */ /* FUNCTION *******************************************************************/ /** Plot function for a south-oriented semicircle with unity radius. This * function must be of type PLOT_FUNC_GET from cairoPlot.h (see there). * * \param px Pointer to real-world x-coordinate. * \param pData User application data pointer as passed to cairoPlot2d() * in element \a pData of structure PLOT_DIAG. Here it is * unused. * * \return The y-coordinate \f$y=-\sqrt{1-x^2}\f$ of the semicircle * associated with \p *px. ******************************************************************************/ static double plotUnitCircleBottom (double *px, void *pData) { double y; if (fabs (*px) <= 1.0) { y = -sqrt (1 - *px * *px); } /* if */ else { y = GSL_NEGINF; } /* else */ return y; } /* plotUnitCircleBottom() */ /* FUNCTION *******************************************************************/ /** Updates real/imag maximum and minimum values from roots positions. * * \param poly Polynomial which roots shall be compared with the * current maximum and minimum values. * \param rmin Current minimum value to be updated from \p poly->root. * \param rmax Current maximum value to be updated from \p poly->root. * ******************************************************************************/ static void updateRootsMinMax (MATHPOLY *poly, gsl_complex *rmin, gsl_complex *rmax) { int i; for (i = 0; i < poly->degree; i++) { if (GSL_REAL (poly->root[i]) > GSL_REAL (*rmax)) /* max. real part */ { GSL_SET_REAL (rmax, GSL_REAL (poly->root[i])); } /* if */ if (GSL_IMAG (poly->root[i]) > GSL_IMAG (*rmax)) /* max. imag. part */ { GSL_SET_IMAG (rmax, GSL_IMAG (poly->root[i])); } /* if */ if (GSL_REAL (poly->root[i]) < GSL_REAL (*rmin)) /* min. real part */ { GSL_SET_REAL (rmin, GSL_REAL (poly->root[i])); } /* if */ if (GSL_IMAG (poly->root[i]) < GSL_IMAG (*rmin)) /* min. imag. part */ { GSL_SET_IMAG (rmin, GSL_IMAG (poly->root[i])); } /* if */ } /* for */ } /* updateRootsMinMax() */ /* FUNCTION *******************************************************************/ /** The function calculates the roots of a polynomial. The function assumes * that all coefficients \f$c_i\f$ in \p poly are based on the following * representation in \e Z domain: \f[ p(z)=c_n z^{-n} + c_{n-1} z^{-(n-1)}+ \cdots + c_2 z^{-2} + c_1 z^{-1} + c_0 \f] * If we substitute \f$w=z^{-1}\f$ it gives \f[ p(w)=c_n w^n + c_{n-1} w^{n-1}+ \cdots + c_2 w^2 + c_1 w + c_0 \f] * In that sense the function first calculates the roots \f$w_i\f$, then it * transforms all back into \f$z_i\f$. So the linear factor presentation of * \f$p(z)\f$ by the help of \f$z_i\f$ is equivalent to the polynomial * presentation in \e Z domain. * * \param poly Pointer to polynomial that holds the coefficients in * \p poly->coeff and gets the roots in \p poly->roots. * * \return 0 on success, else an error number. ******************************************************************************/ static int calcRoots (MATHPOLY *poly) { int ret, i; ret = mathPolyCoeffs2Roots (poly); if (ret == 0) { for (i = 0; i < poly->degree; i++) { poly->root[i] = gsl_complex_inverse (poly->root[i]); } /* for */ } /* if */ return ret; } /* calcRoots */ /* FUNCTION *******************************************************************/ /** Redraws a response widget in case an \e expose event is received. * * \param widget Pointer to widget (GtkDrawingArea, GDK drawable), which * have to be redrawn with a particular filter response. * \param event \e expose event data. * \param user_data Pointer to response description (of type RESPONSE_WIN) * as supplied to function g_signal_connect() for \e expose * event. * \return TRUE if the callback handled the signal, and no further * handling is needed. ******************************************************************************/ static gboolean rootsPlotExposeHandler (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { static const char realText[] = N_("Re(z)"); static const char imagText[] = N_("Im(z)"); static GdkColor circleColor[PLOT_COLOR_SIZE]; static GdkColor rootsColor[PLOT_COLOR_SIZE]; static PLOT_DIAG rplots[] = { { /* stability boundary circle (top) */ {realText}, {imagText}, NULL, /* x, y, pData */ 1.0, PLOT_STYLE_LINE_ONLY, 0, /* thickness, style, num */ NULL, NULL, /* progressFunc, initFunc */ plotUnitCircleTop, NULL, /* sampleFunc, endFunc */ circleColor, /* colors */ }, { /* stability boundary circle (bottom) */ {realText}, {imagText}, NULL, /* x, y, pData */ 1.0, PLOT_STYLE_LINE_ONLY, 0, /* thickness, style, num */ NULL, NULL, /* progressFunc, initFunc */ plotUnitCircleBottom, NULL, /* sampleFunc, endFunc */ circleColor, /* colors */ }, { /* zeros */ {realText}, {imagText}, NULL, /* x, y, pData */ 2.0, PLOT_STYLE_CIRCLE_ONLY, 0, /* thickness, style, num */ NULL, rootsPlotInit, plotRoot, NULL, /* progress-, init-, sample-, endFunc */ rootsColor, /* colors */ }, { /* poles */ {N_(realText)}, {imagText}, NULL, /* x, y, pData */ 2.0, PLOT_STYLE_CROSS_ONLY, 0, /* thickness, style, num */ NULL, rootsPlotInit, plotRoot, NULL, /* progress-, init-, sample-, endFunc */ rootsColor, /* colors */ }, { /* poles */ {N_(realText)}, {imagText}, NULL, /* x, y, pData */ 2.0, PLOT_STYLE_CROSS_ONLY, 1, /* thickness, style, num */ NULL, NULL, returnZeroRoot, NULL, /* progress-, init-, sample-, endFunc */ rootsColor, /* colors */ } }; FLTCOEFF *pFilter = dfcPrjGetFilter (); if (pFilter != NULL) { int i, width, height; gsl_complex rmax, rmin, delta; cairo_t* cr; int points = 0; int numPlots = N_ELEMENTS (rplots); GtkWidget *topWidget = gtk_widget_get_toplevel (widget); const CFG_DESKTOP* pPrefs = cfgGetDesktopPrefs (); GdkDrawable* drawable = GDK_DRAWABLE(widget->window); GdkCursor* cursor = gdk_cursor_new (GDK_WATCH); gdk_window_set_cursor (topWidget->window, cursor); gdk_cursor_unref (cursor); /* free client side resource immediately */ GSL_SET_COMPLEX (&rmax, 1, 1); /* at least in interval [-1,+1] */ GSL_SET_COMPLEX (&rmin, -1, -1); updateRootsMinMax (&pFilter->den, &rmin, &rmax); updateRootsMinMax (&pFilter->num, &rmin, &rmax); delta = gsl_complex_mul_real (gsl_complex_sub (rmax, rmin), 0.05); rmin = gsl_complex_sub (rmin, delta); /* 5% stretch */ rmax = gsl_complex_add (rmax, delta); if (pFilter->factor != 0.0) /* roots are valid? */ { rplots[2].pData = &pFilter->num; /* set the expected data pointer */ rplots[3].pData = &pFilter->den; } /* if */ else { rplots[2].pData = rplots[3].pData = NULL; } /* else */ if (pFilter->num.degree == pFilter->den.degree) { /* polynomials with same degree */ --numPlots; /* do not plot the last diagram (roots at 0,0) */ } /* if */ else { /* note: polynomials are in z^{-1} */ if (pFilter->den.degree > pFilter->num.degree) { rplots[4].style = PLOT_STYLE_CIRCLE_ONLY; } /* if */ else { rplots[4].style = PLOT_STYLE_CROSS_ONLY; } /* else */ } /* else */ circleColor[PLOT_COLOR_LABELS] = /* set all invisible */ circleColor[PLOT_COLOR_GRID] = circleColor[PLOT_COLOR_BOX] = circleColor[PLOT_COLOR_AXIS_NAME] = widget->style->bg[GTK_STATE_NORMAL]; circleColor[PLOT_COLOR_GRAPH] = widget->style->fg[GTK_STATE_INSENSITIVE]; rootsColor[PLOT_COLOR_GRID] = rootsColor[PLOT_COLOR_AXIS_NAME] = rootsColor[PLOT_COLOR_BOX] = widget->style->fg[GTK_STATE_INSENSITIVE]; rootsColor[PLOT_COLOR_LABELS] = rootsColor[PLOT_COLOR_GRAPH] = widget->style->fg[GTK_STATE_NORMAL]; gdk_drawable_get_size (drawable, &width, &height); cr = gdk_cairo_create (drawable); /* create cairo context */ for (i = 0; i < numPlots; i++) { rplots[i].area.x = rplots[i].area.y = 0; rplots[i].area.width = width; /* set size of plot area */ rplots[i].area.height = height; rplots[i].x.prec = rplots[i].y.prec = pPrefs->outprec; rplots[i].x.start = GSL_REAL (rmin); rplots[i].x.stop = GSL_REAL (rmax); rplots[i].y.start = GSL_IMAG (rmin); rplots[i].y.stop = GSL_IMAG (rmax); points = cairoPlot2d (cr, &rplots[i]); } /* for */ if (points < 0) { } /* if */ cairo_destroy(cr); /* free cairo context */ gdk_window_set_cursor(topWidget->window, NULL); /* restore cursor */ } /* if */ return TRUE; /* stop emission */ } /* rootsPlotExposeHandler() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Creates a \e GtkDrawingArea used for roots display. * * \return Pointer to widget (\e GtkDrawingArea, GDK drawable), which * is used in function rootsPlotUpdate() to draw polynomial * roots. ******************************************************************************/ GtkWidget *rootsPlotCreate () { plotDrawable = gtk_drawing_area_new (); g_signal_connect ((gpointer) plotDrawable, "expose_event", G_CALLBACK (rootsPlotExposeHandler), NULL); return plotDrawable; } /* rootsPlotCreate() */ /* FUNCTION *******************************************************************/ /** Re-calculates the roots of transfer \f$H(z)\f$ of a filter. * * \param pFilter Pointer to filter coefficients, for which the roots * shall be calculated. Set this to NULL, if the filter * (and therefore the roots too) is invalid. * ******************************************************************************/ void rootsPlotUpdate (FLTCOEFF *pFilter) { if (pFilter != NULL) { if ((calcRoots (&pFilter->num) != 0) || (calcRoots (&pFilter->den) != 0)) { pFilter->factor = 0.0; /* roots are invalid */ } /* if */ else { pFilter->factor = pFilter->num.coeff[0] / pFilter->den.coeff[0]; } /* else */ } /* if */ rootsPlotRedraw (); } /* rootsPlotUpdate() */ /* FUNCTION *******************************************************************/ /** Forces a asynchronous redraw of all transfer function roots. * ******************************************************************************/ void rootsPlotRedraw () { GdkWindow *win = plotDrawable->window; gdk_window_invalidate_region ( win, gdk_drawable_get_visible_region (GDK_DRAWABLE (win)), FALSE); } /* rootsPlotRedraw() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/designDlg.c0000664000175100001440000002445013617621750013157 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Design dialogs management. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "filterSupport.h" #include "dialogSupport.h" #include "mainDlg.h" #include "designDlg.h" #include "linFirDesignDlg.h" #include "stdIirDesignDlg.h" #include "miscDesignDlg.h" #include "dfcProject.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ typedef void (*DESIGNDLG_CREATE_FUNC)(GtkWidget *topWidget, GtkWidget *boxWidget, const CFG_DESKTOP* pPrefs); typedef void (*DESIGNDLG_PRESET_FUNC)(GtkWidget *topWidget, const DESIGNDLG *pDesign, const FLTCOEFF *pFilter, const CFG_DESKTOP* pPrefs); typedef void (*DESIGNDLG_DESTROY_FUNC)(GtkWidget *topWidget); typedef int (*DESIGNDLG_APPLY_FUNC)(GtkWidget *topWidget, const CFG_DESKTOP* pPrefs); typedef BOOL (*DESIGNDLG_ACTIVE_FUNC)(GtkWidget *topWidget); /** Design dialog descriptor. */ typedef struct { char *name; /**< Name of filter class */ DESIGNDLG_CREATE_FUNC create; /**< Design dialog creation function */ DESIGNDLG_PRESET_FUNC preset; /**< Design dialog preset function */ DESIGNDLG_DESTROY_FUNC destroy; /**< Design dialog destroy function */ DESIGNDLG_APPLY_FUNC apply; /**< Design dialog apply function */ DESIGNDLG_ACTIVE_FUNC active; /**< Design dialog active check function */ } DESIGNDLG_DESC; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define DESIGNDLG_DEFAULT FLTCLASS_DEFAULT /**< Default design */ /* LOCAL VARIABLE DEFINITIONS *************************************************/ static DESIGNDLG_DESC dlgDesc[FLTCLASS_SIZE] = { { /* FLTCLASS_MISC */ N_("Miscellaneous"), miscDesignDlgCreate, (DESIGNDLG_PRESET_FUNC)miscDesignDlgPreset, miscDesignDlgDestroy, miscDesignDlgApply, miscDesignDlgActive }, { /* FLTCLASS_LINFIR */ N_("Linear FIR"), linFirDesignDlgCreate, (DESIGNDLG_PRESET_FUNC)linFirDesignDlgPreset, linFirDesignDlgDestroy, linFirDesignDlgApply, linFirDesignDlgActive }, { /* FLTCLASS_STDIIR */ N_("Standard IIR"), stdIirDesignDlgCreate, (DESIGNDLG_PRESET_FUNC)stdIirDesignDlgPreset, stdIirDesignDlgDestroy, stdIirDesignDlgApply, stdIirDesignDlgActive } }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void updateLayout (GtkWidget *topWidget, FLTCLASS type); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Updates the design layout. * * \param topWidget Top level widget. * \param type Filter class (may be FLTCLASS_NOTDEF). * ******************************************************************************/ static void updateLayout (GtkWidget *topWidget, FLTCLASS type) { static FLTCLASS currentDlgType = FLTCLASS_NOTDEF; FLTCLASS i; GtkWidget* boxWidget = lookup_widget (topWidget, "boxDesignDlg"); ASSERT (boxWidget != NULL); if ((type < 0) || (type >= FLTCLASS_SIZE)) { if (currentDlgType == FLTCLASS_NOTDEF) /* the first call? */ { type = DESIGNDLG_DEFAULT; /* set default startup value */ } /* if */ else { type = currentDlgType; /* change nothing */ } /* if */ } /* if */ if (type != currentDlgType) { if (currentDlgType != FLTCLASS_NOTDEF) /* not the first call? */ { for (i = 0; i < FLTCLASS_SIZE; i++) { dlgDesc[i].destroy (topWidget); /* does nothing if not active */ } /* for */ } /* if */ dlgDesc[type].create (topWidget, boxWidget, cfgGetDesktopPrefs ()); gtk_window_resize (GTK_WINDOW (topWidget), 1, 1); /* resize to minimum */ currentDlgType = type; } /* if */ } /* updateLayout() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** This function should be called, if the design dialog (box) is realized. * * * \param widget Widget pointer to \a boxDesignDlg, a GtkVBox. * \param user_data Pointer to user data as passed to g_signal_connect() * for the \e realize event (unused). * ******************************************************************************/ void designDlgBoxRealize(GtkWidget *widget, gpointer user_data) { FLTCLASS index; /* selection in filter class combobox */ GtkWidget *topWidget = gtk_widget_get_toplevel (widget); GtkWidget* classWidget = lookup_widget (topWidget, DESIGNDLG_COMBO_CLASS); ASSERT (topWidget != NULL); ASSERT (classWidget != NULL); for (index = 0; index < FLTCLASS_SIZE; index++) { gtk_combo_box_append_text (GTK_COMBO_BOX (classWidget), gettext (dlgDesc[index].name)); } /* for */ #if GTK_CHECK_VERSION (2, 18, 0) if (gtk_widget_is_toplevel (topWidget)) /* new since 2.18 */ #else if (GTK_WIDGET_TOPLEVEL (topWidget)) /* deprecated since 2.20 */ #endif { index = dfcPrjGetDesign(NULL); if ((index < 0) || (index >= FLTCLASS_SIZE)) { index = DESIGNDLG_DEFAULT; /* set default startup value */ } /* if */ /* The following call emits a "changed" event, which then forces * execution of updateLayout(). */ gtk_combo_box_set_active (GTK_COMBO_BOX (classWidget), index); } /* if */ } /* designDlgBoxRealize() */ /* FUNCTION *******************************************************************/ /** This function is called if the filter class changes. * * * \param combobox Filter class combobox widget. * \param user_data User data of \e changed event (unused). * ******************************************************************************/ void designDlgOnFilterComboChanged (GtkComboBox* combobox, gpointer user_data) { FLTCLASS index = gtk_combo_box_get_active(combobox); GtkWidget* topWidget = gtk_widget_get_toplevel (GTK_WIDGET(combobox)); ASSERT (topWidget != NULL); ASSERT (index < FLTCLASS_SIZE); updateLayout (topWidget, index); } /* designDlgOnFilterComboChanged() */ /* FUNCTION *******************************************************************/ /** Initializes or updates the design dialog from (may be new) project data. * * \param topWidget Top level widget. * ******************************************************************************/ void designDlgUpdate (GtkWidget *topWidget) { DESIGNDLG design; FLTCLASS type = dfcPrjGetDesign (&design); updateLayout (topWidget, type); if (type != FLTCLASS_NOTDEF) { gtk_combo_box_set_active ( GTK_COMBO_BOX ( lookup_widget (topWidget, DESIGNDLG_COMBO_CLASS)), type); dlgDesc[type].preset (topWidget, &design, dfcPrjGetFilter (), cfgGetDesktopPrefs ()); } /* if */ } /* designDlgUpdate() */ /* FUNCTION *******************************************************************/ /** This function is called if the \e Apply button emits the \e clicked signal. * * \param button \e Apply button widget handle. * \param data User data as passed to function g_signal_connect. In * that case (here) it is the filter class combobox widget * handle. * ******************************************************************************/ void designDlgApply (GtkButton *button, gpointer data) { int err; GtkWidget *widget, *topWidget = gtk_widget_get_toplevel (GTK_WIDGET (button)); GtkComboBox* combobox = GTK_COMBO_BOX (data); FLTCLASS type = gtk_combo_box_get_active(combobox); if (type >= 0) { gint ack = GTK_RESPONSE_YES; if (dfcPrjGetFlags() & DFCPRJ_FLAG_SUPERSEDED) { widget = gtk_message_dialog_new_with_markup ( GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Somewhere along the way you made some direct changes at" " the coefficients of current filter. Would you really" " forget these changes and generate new filter coefficients?")); ack = gtk_dialog_run (GTK_DIALOG (widget)); gtk_widget_destroy (widget); } /* if */ if (ack == GTK_RESPONSE_YES) /* apply really? */ { err = dlgDesc[type].apply (topWidget, cfgGetDesktopPrefs ()); if (!mainDlgUpdateFilter (err)) { if (err != INT_MAX) { dlgError (topWidget, _("Cannot generate such a filter." " Please check sample frequency, degree" " and other design parameters.")); } /* if */ } /* if */ } /* if */ } /* if */ } /* designDlgApply() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/editDlg.c0000664000175100001440000005075213620572502012631 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file editDlg.c * \brief \e Edit dialog(s). * * \author Copyright (C) 2006, 2011, 2012, 2013, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "cfgSettings.h" #include "dfcProject.h" #include "responseWin.h" #include "rootsPlot.h" #include "dialogSupport.h" #include "mainDlg.h" #include "editDlg.h" #include /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define EDITSETDLG_COMBO_UNIT_FREQU "comboUnitFrequ" #define EDITSETDLG_COMBO_UNIT_TIME "comboUnitTime" #define EDITSETDLG_SPIN_PREC "spinOutputPrec" #define EDITINFODLG_ENTRY_AUTHOR "entryAuthor" #define EDITINFODLG_ENTRY_TITLE "entryTitle" #define EDITINFODLG_TEXTVIEW_DESC "textviewDesc" /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** Frequency units */ static PLOT_UNIT unitF[] = { {"Hz", 1.0}, {"kHz", GSL_CONST_NUM_KILO}, {"MHz", GSL_CONST_NUM_MEGA}, {"GHz", GSL_CONST_NUM_GIGA} }; /** Time units */ static PLOT_UNIT unitT[] = { {"s", 1.0}, {"ms", GSL_CONST_NUM_MILLI}, {"µs", GSL_CONST_NUM_MICRO}, {"ns", GSL_CONST_NUM_NANO}, {"ps", GSL_CONST_NUM_PICO} }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static char *dupInfoStr (const char* info); static GtkWidget* createInfoDlg (const DFCPRJ_INFO *pInfo); static GtkWidget* createSettingsDlg (const CFG_DESKTOP* pPrefs); static int searchUnit (PLOT_UNIT units[], int size, const char* unitName); static GtkResponseType editDlgSettingsAccept (GtkWidget* dialog); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Application settings dialog creation function. * * \param pPrefs Pointer to desktop preferences. * * \return Settings dialog widget pointer. ******************************************************************************/ static GtkWidget* createSettingsDlg (const CFG_DESKTOP* pPrefs) { int i; GtkWidget *settingsDlg, *widget, *label, *box, *table, *notebook; GtkObject *spinAdjust; settingsDlg = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (settingsDlg), 6); gtk_window_set_title (GTK_WINDOW (settingsDlg), _(PACKAGE " Settings")); gtk_window_set_resizable (GTK_WINDOW (settingsDlg), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (settingsDlg), TRUE); gtk_window_set_icon_name (GTK_WINDOW (settingsDlg), GTK_STOCK_PREFERENCES); gtk_window_set_type_hint (GTK_WINDOW (settingsDlg), GDK_WINDOW_TYPE_HINT_DIALOG); box = GTK_DIALOG (settingsDlg)->vbox; notebook = gtk_notebook_new (); gtk_box_pack_start (GTK_BOX (box), notebook, TRUE, TRUE, 0); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), box); table = gtk_table_new (3, 2, FALSE); gtk_box_pack_start (GTK_BOX (box), table, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (table), 12); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); spinAdjust = gtk_adjustment_new (pPrefs->outprec, 1, DBL_DIG, 1, 1, 0); widget = gtk_spin_button_new (GTK_ADJUSTMENT (spinAdjust), 1, 0); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (widget, _("The number of digits following the decimal point of a floating point number")); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE); GLADE_HOOKUP_OBJECT (settingsDlg, widget, EDITSETDLG_SPIN_PREC); label = gtk_label_new_with_mnemonic (_("Output _Precision")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); box = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), box, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_tooltip_text (box, _("Frequency unit to be used for in-/output")); widget = gtk_combo_box_new_text (); gtk_container_add (GTK_CONTAINER (box), widget); GLADE_HOOKUP_OBJECT (settingsDlg, widget, EDITSETDLG_COMBO_UNIT_FREQU); for (i = 0; i < N_ELEMENTS (unitF); i++) { gtk_combo_box_append_text (GTK_COMBO_BOX (widget), unitF[i].name); } /* for */ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), searchUnit (unitF, N_ELEMENTS (unitF), pPrefs->frequUnit.name)); label = gtk_label_new_with_mnemonic (_("_Frequency Unit")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); box = gtk_event_box_new (); gtk_table_attach (GTK_TABLE (table), box, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_tooltip_text (box, _("Time unit to be used for in-/output")); widget = gtk_combo_box_new_text (); gtk_container_add (GTK_CONTAINER (box), widget); GLADE_HOOKUP_OBJECT (settingsDlg, widget, EDITSETDLG_COMBO_UNIT_TIME); for (i = 0; i < N_ELEMENTS (unitT); i++) { gtk_combo_box_append_text (GTK_COMBO_BOX (widget), unitT[i].name); } /* for */ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), searchUnit (unitT, N_ELEMENTS (unitT), pPrefs->timeUnit.name)); label = gtk_label_new_with_mnemonic (_("_Time Unit")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("_In-/Output")); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page ( GTK_NOTEBOOK (notebook), 0), label); box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), box); label = gtk_label_new (_("RFU")); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page ( GTK_NOTEBOOK (notebook), 1), label); /* Action area */ box = GTK_DIALOG (settingsDlg)->action_area; gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_END); widget = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_widget_show (widget); gtk_dialog_add_action_widget (GTK_DIALOG (settingsDlg), widget, GTK_RESPONSE_HELP); #ifndef TODO gtk_widget_set_sensitive (widget, FALSE); #endif GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (settingsDlg), widget, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (GTK_DIALOG (settingsDlg), widget, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); gtk_widget_show_all (settingsDlg); return settingsDlg; } /* createSettingsDlg() */ /* FUNCTION *******************************************************************/ /** Reads an integer value from key file associated with \a key under \a group. * If the key is not found then target of \a pResult is unchanged. * * \param units Array of allowed units. * \param size Size of \p units array (in elements). * \param unitName The unit to search for in \p units. * * \return Index of unit in array \p units. If not found then it * returns 0. ******************************************************************************/ static int searchUnit (PLOT_UNIT units[], int size, const char* unitName) { int i; for (i = 0; i < size; i++) { if (g_strcmp0 (unitName, units[i].name) == 0) /* found? */ { return i; } /* for */ } /* if */ return 0; } /* searchUnit() */ /* FUNCTION *******************************************************************/ /** Reads and possibly accepts all values from a \e Settings dialog. * * \param dialog Dialog widget handle. * * \return GTK_RESPONSE_OK on success, else GTK_RESPONSE_REJECT. ******************************************************************************/ static GtkResponseType editDlgSettingsAccept (GtkWidget* dialog) { CFG_DESKTOP settings; int idxTime = gtk_combo_box_get_active( GTK_COMBO_BOX (lookup_widget (dialog, EDITSETDLG_COMBO_UNIT_TIME))); int idxFrequ = gtk_combo_box_get_active( GTK_COMBO_BOX (lookup_widget (dialog, EDITSETDLG_COMBO_UNIT_FREQU))); if (dlgGetInt (dialog, EDITSETDLG_SPIN_PREC, 1, DBL_DIG, &settings.outprec)) { settings.timeUnit = unitT[idxTime]; settings.frequUnit = unitF[idxFrequ]; cfgSetDesktopPrefs (&settings); /* save new preferences */ mainDlgRedrawAll (); /* redraw all plots and coefficients */ return GTK_RESPONSE_OK; } /* if */ return GTK_RESPONSE_REJECT; } /* editDlgSettingsAccept() */ /* FUNCTION *******************************************************************/ /** Project info dialog creation function. * * \param pInfo Pointer to current project info (for preset of GtkEntry). * * \return Dialog widget pointer. ******************************************************************************/ static GtkWidget* createInfoDlg (const DFCPRJ_INFO *pInfo) { GtkWidget *dialog, *widget, *entry, *label, *table; GdkPixbuf *pixbuf; dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (dialog), _("Project Info")); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); pixbuf = createPixbufFromFile (PACKAGE_ICON); if (pixbuf != NULL) { gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf); g_object_unref (pixbuf); } /* if */ table = gtk_table_new (3, 2, FALSE); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (table), 12); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); entry = gtk_entry_new (); /* author */ gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (entry, _("Author of filter/system")); gtk_entry_set_max_length (GTK_ENTRY (entry), 40); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); gtk_entry_set_text (GTK_ENTRY (entry), (pInfo->author == NULL) ? g_get_user_name () : pInfo->author); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); gtk_widget_grab_focus (entry); GLADE_HOOKUP_OBJECT (dialog, entry, EDITINFODLG_ENTRY_AUTHOR); label = gtk_label_new_with_mnemonic (_("_Author")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); entry = gtk_entry_new (); /* title */ gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_max_length (GTK_ENTRY (entry), 80); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); if (pInfo->title != NULL) { gtk_entry_set_text (GTK_ENTRY (entry), pInfo->title); } /* if */ gtk_widget_set_tooltip_text (entry, _("Project title")); GLADE_HOOKUP_OBJECT (dialog, entry, EDITINFODLG_ENTRY_TITLE); label = gtk_label_new_with_mnemonic (_("_Title")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); widget = gtk_scrolled_window_new (NULL, NULL); /* description */ gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); entry = gtk_text_view_new (); gtk_container_add (GTK_CONTAINER (widget), entry); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD); gtk_widget_set_tooltip_text (entry, _("Project description")); if (pInfo->desc != NULL) { gtk_text_buffer_set_text ( gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry)), pInfo->desc, -1); } /* if */ GLADE_HOOKUP_OBJECT (dialog, entry, EDITINFODLG_TEXTVIEW_DESC); label = gtk_label_new_with_mnemonic (_("_Description")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* Action area */ gtk_button_box_set_layout ( GTK_BUTTON_BOX (GTK_DIALOG (dialog)->action_area), GTK_BUTTONBOX_END); widget = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), widget, GTK_RESPONSE_HELP); #ifndef TODO gtk_widget_set_sensitive (widget, FALSE); #endif GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), widget, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), widget, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); gtk_widget_show_all (dialog); return dialog; } /* createInfoDlg() */ /* FUNCTION *******************************************************************/ /** Duplicates a project info string with some postprocessing: * -# removes leading whitespaces * -# removes trailing whitespaces * -# if length of string then is zero, it sets the pointer to NULL. * * \param info The original string as retrieved e.g. from a GtkEntry * widget. * * \return The newly allocated string or NULL (if it's length was * zero). ******************************************************************************/ static char *dupInfoStr (const char* info) { char *newinfo = g_strdup (info); /* duplicate string (needed on GtkEntry) */ g_strstrip (newinfo); /* remove leading and trailing whitespaces */ if (g_utf8_strlen (newinfo, -1) == 0) { g_free (newinfo); newinfo = NULL; } /* if */ return newinfo; } /* dupInfoStr() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Settings menuitem is selected * from \e Edit menu. * * \param widget \e Edit \e Settings widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void editDlgSettingsActivate (GtkWidget* widget, gpointer user_data) { gint result; GtkWidget *dialog = createSettingsDlg(cfgGetDesktopPrefs ()); do { result = gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: result = editDlgSettingsAccept (dialog); break; case GTK_RESPONSE_HELP: result = GTK_RESPONSE_REJECT; break; default: break; } /* switch */ } while (result == GTK_RESPONSE_REJECT); gtk_widget_destroy (dialog); } /* editDlgSettingsActivate() */ /* FUNCTION *******************************************************************/ /** \e Activate event callback emitted when the \e Info menuitem is selected * from \e Edit menu. * * \param widget \e Edit \e Info widget (GtkMenuItem on event * \e activate or GtkToolButton on event \e clicked), * which causes this call. * \param user_data User data set when the signal handler was connected (unused). * ******************************************************************************/ void editDlgInfoActivate (GtkWidget* widget, gpointer user_data) { gint result; char *tmp; GtkTextBuffer *buffer; GtkTextIter start, stop; DFCPRJ_INFO info = {NULL, NULL, NULL}; GtkWidget *dialog = createInfoDlg(dfcPrjGetInfo ()); do { result = gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: info.author = dupInfoStr ( gtk_entry_get_text ( /* get author */ GTK_ENTRY ( lookup_widget (dialog, EDITINFODLG_ENTRY_AUTHOR)))); info.title = dupInfoStr ( gtk_entry_get_text ( /* get title */ GTK_ENTRY ( lookup_widget (dialog, EDITINFODLG_ENTRY_TITLE)))); buffer = gtk_text_view_get_buffer ( GTK_TEXT_VIEW ( lookup_widget (dialog, EDITINFODLG_TEXTVIEW_DESC))); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &stop); tmp = gtk_text_buffer_get_text (buffer, &start, &stop, FALSE); info.desc = dupInfoStr (tmp); /* set description */ g_free (tmp); dfcPrjSetInfo (&info); /* save all */ mainDlgUpdatePrjInfo (); break; case GTK_RESPONSE_HELP: result = GTK_RESPONSE_REJECT; break; default: break; } /* switch */ } while (result == GTK_RESPONSE_REJECT); gtk_widget_destroy (dialog); } /* editDlgInfoActivate() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/mathPoly.c0000644000175100001440000004514613710317646013057 00000000000000/******************************************************************************/ /** * \file mathPoly.c * \brief Polynomial functions. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathPoly.h" #include "mathMisc.h" #include /* memcpy() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static double chebyT(double degree, double x); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Evaluates \e Chebyshev function (polynomial) of first kind. * - If |x| < 1 use : \f$ \chebyT(x) = \cos(n \arccos x) \f$ * - If x >= 1 use : \f$ \chebyT(x) = \cosh(n \arcosh x) \f$ because \f$ \cosh(j x) = \cos x \f$ . * - If x < -1 you get a problem, because \f$ \cosh(x + j \pi) = - \cosh x \f$ * and therefore \f$ \arcosh(-x) = \arcosh(|x|) + j \pi\f$ , then use * \f$ \chebyT(x) = (-1)^n \cosh(n \arcosh |x|) \f$ . * * \param degree Degree \f$n\f$ of \e Chebyshev polynomial. * \param x Argument. * * \return Value of \e Chebyshev polynomial \f$\chebyT_n(x)\f$. ******************************************************************************/ static double chebyT(double degree, double x) { double result; if (fabs(x) < 1.0) { return cos (degree * acos(x)); } /* if */ result = cosh (degree * gsl_acosh (fabs (x))); if ((x >= 1.0) || GSL_IS_EVEN ((int)degree)) { return result; } /* if */ return -result; } /* chebyT() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Allocates memory space for the coefficients of a polynomial. * * \param poly Pointer to polynomial. * * \return Zero on success, else an error number. ******************************************************************************/ int mathPolyMallocCoeffs (MATHPOLY *poly) { poly->coeff = g_malloc ((1 + poly->degree) * sizeof(poly->coeff[0])); if (poly->coeff == NULL) { return ENOMEM; } /* if */ return 0; } /* mathPolyMallocCoeffs() */ /* FUNCTION *******************************************************************/ /** Allocates memory space for the roots of a polynomial. * * \param poly Pointer to polynomial. * * \return Zero on success, else an error number. ******************************************************************************/ int mathPolyMallocRoots (MATHPOLY *poly) { poly->root = g_malloc (GSL_MAX_INT (1, poly->degree) * sizeof(poly->root[0])); if (poly->root == NULL) { return ENOMEM; } /* if */ return 0; } /* mathPolyMallocRoots() */ /* FUNCTION *******************************************************************/ /** Allocates memory space for a polynomial. * * \param poly Pointer to polynomial. * * \return Zero on success, else an error number. ******************************************************************************/ int mathPolyMalloc (MATHPOLY *poly) { int ret = mathPolyMallocCoeffs (poly); if (ret != 0) { poly->root = NULL; return ret; } /* if */ ret = mathPolyMallocRoots (poly); if (ret != 0) { g_free (poly->coeff); poly->coeff = NULL; } /* if */ return ret; } /* mathPolyMalloc() */ /* FUNCTION *******************************************************************/ /** Frees memory space allocated for a polynomial. * * \param poly Pointer to polynomial. * ******************************************************************************/ void mathPolyFree(MATHPOLY *poly) { if (poly->coeff != NULL) { g_free (poly->coeff); poly->coeff = NULL; } /* if */ if (poly->root != NULL) { g_free (poly->root); poly->root = NULL; } /* if */ } /* mathPolyFree() */ /* FUNCTION *******************************************************************/ /** \e Chebyshev function (polynomial) of first kind. \f{eqnarray*} y &=& \cos(n\arccos x)\quad(x\leq 1) \\ y &=& \cosh(n\arcosh x)\quad(x>1) \f} * * \param degree Polynomial degree. * \param x Argument. * * \return \f$y \cos(n\arccos x)\f$. ******************************************************************************/ double mathPolyCheby (int degree, double x) { return chebyT (degree, x); } /* mathPolyCheby() */ /* FUNCTION *******************************************************************/ /** Inverse \e Chebyshev function (polynomial) of first kind. \f{eqnarray*} y &=& \cos(1/n \arccos x)\quad(x\leq 1) \\ y &=& \cosh(1/n \arcosh x)\quad(x>1) \f} * * \param degree Polynomial degree. * \param x Argument. * * \return \f$y \cos(1/n \arccos x)\f$. ******************************************************************************/ double mathPolyChebyInv (int degree, double x) { return chebyT (1.0 / degree, x); } /* mathPolyChebyInv */ /* FUNCTION *******************************************************************/ /** Calculates \e Bessel polynomial of n'th order in \p coeff. \f{eqnarray*} B_n &=& (2 n - 1) * B_{n-1} + s^2 B_{n-2} \\ B_0 &=& 1 \\ B_1 &=& 1+s \f} * * * \param degree Degree of polynomial. * \param coeff Array to be used to fill-in the calculated coefficients. * * \return 0 on success, else an error number. ******************************************************************************/ int mathPolyBessel (int degree, double coeff[]) { int ord, i; double coeffOld; double *polyOld_2 = g_malloc ((1 + degree) * sizeof(coeff[0])); coeff[0] = 1.0; /* B[0] = 1 */ if (degree > 0) { coeff[1] = 1.0; /* B[1] = 1+s */ } /* if */ if (polyOld_2 == NULL) { return ENOMEM; } /* if */ polyOld_2[0] = coeff[0]; /* B[n-2] (n=2) */ for (ord = 2; ord <= degree; ord++) { coeff[ord] = 0.0; for (i = ord; i >= 0; i--) /* from top to bottom for all coeffs */ { coeffOld = coeff[i]; /* save */ coeff[i] *= 2 * ord - 1; if (i > 1) { coeff[i] += polyOld_2[i-2]; /* new coeff complete */ } /* if */ polyOld_2[i] = coeffOld; /* save B[n-2] coeff */ } /* for */ } /* for */ g_free (polyOld_2); return 0; } /* mathPolyBessel() */ /* FUNCTION *******************************************************************/ /** Adds two polynomials with scaling. * * \param poly1 Pointer to first polynomial and result. The coefficients * vector memory space must be large enough to get all * coefficients. The degree is increased (without malloc * of new memory), if \p poly2->degree is greater than * poly1->degree; * \param poly2 Pointer to second polynomial. * \param scale Factor which is applied to each coefficient of \p poly2. * ******************************************************************************/ void mathPolyAdd (MATHPOLY *poly1, const MATHPOLY *poly2, double scale) { int i; int mindeg = MIN (poly1->degree, poly2->degree); poly1->degree = MAX (poly1->degree, poly2->degree); for (i = 0; i <= mindeg; i++) { poly1->coeff[i] += scale * poly2->coeff[i]; } /* for */ for (i = mindeg + 1; i <= poly2->degree; i++) { poly1->coeff[i] = scale * poly2->coeff[i]; } /* for */ } /* mathPolyAdd() */ /* FUNCTION *******************************************************************/ /** Multiplies a polynomial with the binomial \f$a z^n+b\f$. * The function multiplies the polynomial \f{eqnarray*} p(z) &=& c_r z^r + c_{r-1} z^{r-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \\ &=& (\cdots(((c_r z + c_{r-1})z + c_{r-2})z + c_{r-3})z+\cdots+c_1)z+c_0 \f} * with \f$az^n+b\f$. The degree of new polynomial is \f$rn\f$, which must * be available in \p poly. \f{eqnarray*} p(z) &=& (az^n + b)p(z) \\ &=& a z^n p(z) + b p(z) \f} * * \param poly Pointer to polynomial which shalle be multiplied (in place). * \param degn Degree of polynomial \f$az^n+b\f$. * \param a Parameter \p a in polynomial \f$az^n+b\f$. * \param b Parameter \p b in polynomial \f$az^n+b\f$. * ******************************************************************************/ void mathPolyMulBinomial (MATHPOLY *poly, int degn, double a, double b) { int i; ASSERT (degn >= 0); for (i = poly->degree; i >= 0; i--) /* z^n p(z) */ { poly->coeff[i + degn] = poly->coeff[i]; } /* for */ for (i = 0; i < degn; i++) /* clear lower coefficients */ { poly->coeff[i] = 0.0; } /* for */ for (i = 0; i <= poly->degree; i++) /* a * z^n * p(z) + b * p(z) */ { poly->coeff[i] = a * poly->coeff[i] + b * poly->coeff[i + degn]; } /* for */ for (i = poly->degree + 1; i <= poly->degree + degn; i++) { /* upper coefficients */ poly->coeff[i] *= a; } /* if */ poly->degree += degn; } /* mathPolyMulBinomial() */ /* FUNCTION *******************************************************************/ /** Transforms polynomial coefficients for fractional variable substitution. * The function transforms the polynomial \f{eqnarray*} p(z) &=& c_r z^r + c_{r-1} z^{r-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \\ &=& (\cdots(((c_r z + c_{r-1})z + c_{r-2})z + c_{r-3})z+\cdots+c_1)z+c_0 \f} * by replacing \f[ z := \frac{\alpha z^m+\beta}{\gamma z^n+\delta}\qquad\alpha,\beta,\gamma,\delta\in R;\quad m,n\in N \f] * into polynomial \f[ p(z) := (\gamma z^n+\delta)^r p\left(\frac{\alpha z^m+\beta}{\gamma z^n+\delta}\right) \f] * The new degree is \f$r\max(n,m)\f$. * Set \f$p_i(z)=u_i(z)/v_i(z)\f$ the transformation algorithm is based * on \e Horners scheme: \f{eqnarray*} p_{i}(z) &=& z\, p_{i-1}(z) + c_{r-i} \\ &=& \frac{\alpha z^m+\beta}{\gamma z^n+\delta}\, p_{i-1}(z) + c_{r-i} \\ &=& \frac{(\alpha z^m+\beta)\,p_{i-1}(z)+(\gamma z^n+\delta)\,c_{r-i}}{\gamma z^n+\delta} \\ \frac{u_{i}(z)}{v_{i}(z)} &=& \frac{(\alpha z^m+\beta)\,\frac{u_{i-1}(z)}{v_{i-1}(z)}+(\gamma z^n+\delta)\,c_{r-i}}{\gamma z^n+\delta} \\ v_{i}(z) &=& (\gamma z^n+\delta) v_{i-1}(z),\quad v_0=1 \\ u_{i}(z) &=& (\alpha z^m+\beta)u_{i-1}(z)+c_{r-i}v_{i}(z),\quad u_0=c_r \f} * with \f$i=1\ldots n\f$ and \f$p_{0}(z)=c_r\f$. * So the following special transformation cases can be simply calculated: * - linear (\f$n=0,\gamma=1,\delta=0,m=1\f$): \f$p(\alpha z+\beta)\f$ * - square (\f$n=0,\gamma=1,\delta=0,m=2\f$): \f$p(\alpha z^2+\beta)\f$ * - inverse (\f$n=1,\gamma=1,\delta=0,\alpha=0\f$): \f$z^r p(\beta/z)\f$ * - bilinear (\f$n=1,m=1,\alpha=1,\gamma=1,\beta=-1,\delta=1\f$): \f$(z+1)^r p\left(\frac{z-1}{z+1}\right)\f$ * * \param poly Pointer to polynomial that coefficients \p poly->coeff * shall be transformed. The allocated memory space must * be enough to hold a polynomial of degree \f$r\max(n,m)\f$. * \param degm Numerator degree of transformation, means \f$m\f$. * \param a Transform parameter \f$\alpha\f$. * \param b Transform parameter \f$\beta\f$. * \param degn Denominator degree of transformation, means \f$n\f$. * \param c Transform parameter \f$\gamma\f$. * \param d Transform parameter \f$\delta\f$. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int mathPolyTransform (MATHPOLY *poly, int degm, double a, double b, int degn, double c, double d) { int i; MATHPOLY vecu, vecv; /* polynomial coefficients */ vecv.degree = degn * poly->degree; vecu.degree = MAX (degn, degm) * poly->degree; if (mathPolyMalloc (&vecu) != 0) { DEBUG_LOG ("Polynomial memory allocation"); return ENOMEM; } /* if */ if (mathPolyMalloc (&vecv) != 0) { mathPolyFree (&vecu); DEBUG_LOG ("Polynomial memory allocation"); return ENOMEM; } /* if */ vecu.degree = vecv.degree = 0; /* start with a constant (degree = 0) */ vecu.coeff[0] = poly->coeff[poly->degree]; vecv.coeff[0] = 1.0; for (i = 1; i <= poly->degree; i++) /* perform Horner's scheme */ { mathPolyMulBinomial (&vecv, degn, c, d); /* v_i(z) */ mathPolyMulBinomial (&vecu, degm, a, b); mathPolyAdd (&vecu, &vecv, poly->coeff[poly->degree - i]); /* u_i(z) */ } /* for */ poly->degree = vecu.degree; memcpy (poly->coeff, vecu.coeff, (1 + vecu.degree) * sizeof(vecu.coeff[0])); mathPolyFree (&vecu); mathPolyFree (&vecv); return 0; } /* mathPolyTransform() */ /* FUNCTION *******************************************************************/ /** Calculates real polynomial coefficients from roots. The calculation of * polynomial coefficients \f$c_i\f$ of \f[ p(z)=c_n z^n + c_{n-1} z^{n-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \f] is performed using the following algorithm: \f[ p_{i+1}(z)=p_{i}(z) (z-z_i)=z p_{i}(z)-z_i p_{i}(z) \f] * with \f$p_{0}(z)=1\f$. * * \param poly Pointer to polynomial that holds the roots in \p * poly->root and gets the coefficients in \p poly->coeff. * \param factor Factor to be applied to all coefficients. To match a * roots representation to a polynomial polynomial the * coefficient \f$p_n\f$ must be multiplied as \p factor. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). ******************************************************************************/ int mathPolyRoots2Coeffs(MATHPOLY *poly, double factor) { int i, k; gsl_complex result; gsl_complex *cplxPoly = g_malloc ((1 + poly->degree) * sizeof(poly->root[0])); if (cplxPoly == NULL) { DEBUG_LOG ("Roots to coefficients conversion"); return ENOMEM; } /* if */ GSL_SET_COMPLEX(cplxPoly, 1.0, 0.0); /* special case if degree is zero */ for (i = 0; i < poly->degree; i++) /* process all roots */ { for (k = i + 1; k > 0; k--) /* with all coefficients */ { cplxPoly[k] = cplxPoly[k - 1]; /* P(i) * z */ } /* for */ GSL_SET_COMPLEX(cplxPoly, 0.0, 0.0); for (k = 0; k <= i; k++) /* with all coefficients */ { result = gsl_complex_mul (cplxPoly[k + 1], poly->root[i]); cplxPoly[k] = gsl_complex_sub (cplxPoly[k], result); /* -P(i)*z[i] */ } /* for */ } /* for */ for (i = 0; i <= poly->degree; i++) /* copy into real result vector */ { poly->coeff[i] = factor * GSL_REAL (cplxPoly[i]); } /* for */ free(cplxPoly); return 0; } /* mathPolyRoots2Coeffs() */ /* FUNCTION *******************************************************************/ /** Computes the complex roots \f$z_i\f$ associated with the polynomial \f[ p(z)=c_n z^n + c_{n-1} z^{n-1}+ \cdots + c_2 z^2 + c_1 z + c_0 \f] * * \param poly Pointer to polynomial that holds the coefficients in * \p poly->coeff and gets the roots in \p poly->roots. * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). * \todo Try to avoid mixing error codes from gsl_errno.h * and errno.h ******************************************************************************/ int mathPolyCoeffs2Roots (MATHPOLY *poly) { int err = 0; if (poly->degree > 0) { gsl_poly_complex_workspace *polyWsp = /* polynomial roots finder workspace */ gsl_poly_complex_workspace_alloc (poly->degree + 1); if (polyWsp == NULL) { return GSL_ENOMEM; /* not enough memory */ } /* if */ err = gsl_poly_complex_solve (poly->coeff, poly->degree + 1, polyWsp, (gsl_complex_packed_ptr) poly->root); gsl_poly_complex_workspace_free (polyWsp); } /* if */ return err; } /* mathPolyRoots2Coeffs() */ #ifdef DEBUG /* FUNCTION *******************************************************************/ /** Logs polynomial coefficients for debug purposes. * * \param poly Pointer to polynomial that holds the coefficients. * ******************************************************************************/ void mathPolyDebugLog (MATHPOLY *poly) { int i; for (i = 0; i <= poly->degree; i++) { DEBUG_LOG ("coeff[%d] = %G", i, poly->coeff[i]); } /* for */ for (i = 0; i < poly->degree; i++) { DEBUG_LOG (" root[%d] = %G +j %G", i, GSL_REAL (poly->root[i]), GSL_IMAG (poly->root[i])); } /* for */ DEBUG_LOG (""); } /* mathPolyDebugLog() */ #endif /* DEBUG */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/main.c0000664000175100001440000000275013617627565012214 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file main.c * * \brief Initial main.c file generated by Glade. * \note Glade will not overwrite this file. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #include "gui.h" /* includes config.h (include before all others) */ #include "cfgSettings.h" #include "dfcProject.h" #include "mainDlg.h" #include int main (int argc, char *argv[]) { GtkWidget *topWidget; #ifdef ENABLE_NLS gchar* localedir = getPackageDirectory (DIR_ID_LOCALE); #ifdef G_OS_WIN32 /* bindtextdomain() is not UTF-8 aware */ gchar* tmp = g_win32_locale_filename_from_utf8 (localedir); g_free (localedir); localedir = tmp; #endif /* G_OS_WIN32 */ bindtextdomain (GETTEXT_PACKAGE, localedir); g_free (localedir); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #endif gtk_init (&argc, &argv); /* * The following code was added by Glade to create one of each component * (except popup menus), just so that you see something after building * the project. Delete any components that you don't want shown initially. */ topWidget = mainDlgCreate (); cfgCacheSettings (topWidget); /* get all settings from configuration file */ gtk_widget_show (topWidget); gtk_main (); cfgFlushSettings (); return 0; } dfcgen-gtk-0.5/src/dfcProject.c0000664000175100001440000002443613714315075013344 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * DFCGen filter project management. * * \note The filter project management functions implemented here are very * to the \e GLib XML support functions. Adoption to other platforms * or to libxml is possible, but need a lot of work. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "dfcProject.h" #include "projectFile.h" #include "filterSupport.h" #include #include /* memcpy(), memset() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /** The active project (no memory space allocated). */ static DFCPRJ_FILTER project = { { /**< Project info (header) */ NULL, NULL, NULL /* author, title, desc */ }, FLTCLASS_NOTDEF, /* fltcls (class of filter) */ { /* design */ { /* union */ MISCFLT_UNKNOWN, /* type (no design data available) */ } }, { /* filter */ 44.1E3, /* f0 */ {0, NULL, NULL}, /* numerator degree, coefficients, roots */ {0, NULL, NULL}, /* denominator degree, coefficients, roots */ 0.0 /* factor (roots invalid) */ }, 0 /* flags */ }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Gets the filter design dialog parameters (if return value is unequal to * FLTCLASS_NOTDEF). * * \param pBuf Buffer which gets the filter design (may be NULL). * * \return Class of filter. ******************************************************************************/ FLTCLASS dfcPrjGetDesign (DESIGNDLG *pBuf) { if ((pBuf != NULL) && (project.fltcls != FLTCLASS_NOTDEF)) { memcpy (pBuf, &project.design, sizeof (*pBuf)); } /* if */ return project.fltcls; } /* dfcPrjGetDesign() */ /* FUNCTION *******************************************************************/ /** Returns a pointer to the current filter definition. * * \return Pointer to filter coefficients/roots (or NULL if not * defined). ******************************************************************************/ FLTCOEFF* dfcPrjGetFilter() { if (project.fltcls == FLTCLASS_NOTDEF) { return NULL; } /* if */ return &project.filter; } /* dfcPrjGetFilter() */ /* FUNCTION *******************************************************************/ /** Returns a pointer to the current project information. * * \return Pointer to project info. ******************************************************************************/ DFCPRJ_INFO* dfcPrjGetInfo () { return &project.info; } /* dfcPrjGetInfo() */ /* FUNCTION *******************************************************************/ /** Exports the current filter project to a file. * * \param filename Filename of file (inclusive path). * * \return Zero on succes, else an error number from errno.h. ******************************************************************************/ int dfcPrjExport (char *filename) { PRJFILE_EXPORT_TYPE type; if (g_str_has_suffix (filename, ".txt")) { type = PRJFILE_EXPORT_PLAIN; } /* if */ else { if (g_str_has_suffix (filename, ".m")) { type = PRJFILE_EXPORT_MATLAB; } /* if */ else { if (!g_str_has_suffix (filename, ".c")) { return EINVAL; /* unsupported export format (ENOTSUP not available on WIN32) */ } /* if */ type = PRJFILE_EXPORT_CLANG; } /* else */ } /* else */ return (prjFileExport (type, filename, &project)); } /* dfcPrjExport() */ /* FUNCTION *******************************************************************/ /** Saves the current filter project to a file. * * \param filename Filename of file (inclusive path). * * \return Zero on succes, else an error number from errno.h. ******************************************************************************/ int dfcPrjSave (char *filename) { int err = prjFileWrite (filename, &project); if (err == 0) /* successful saved? */ { project.flags |= DFCPRJ_FLAG_SAVED; } /* if */ return err; } /* dfcPrjSave() */ /* FUNCTION *******************************************************************/ /** Loads a new filter project from a file. In case of an error it sets the * pointer to the error structure, which itself can be used to display the * original error message. Modification of the error structure pointer * indicates an critical error. In that case it has to be free'ed with * g_error_free(). * * \param filename Filename of file (inclusive path). * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function dfcPrjLoad(). * ******************************************************************************/ void dfcPrjLoad (char *filename, GError **err) { DFCPRJ_FILTER newprj; prjFileRead (filename, &newprj, err); if (*err == NULL) { dfcPrjFree (&project); project = newprj; project.flags |= DFCPRJ_FLAG_SAVED; } /* if */ } /* dfcPrjLoad() */ /* FUNCTION *******************************************************************/ /** Frees all malloc'ed memory space from a project. Free'ing the project * memory includes the header info (do not call prjFileFree() in addition). * * \param pProject Pointer to project data. Set to NULL to free the * current project. * ******************************************************************************/ void dfcPrjFree (DFCPRJ_FILTER *pProject) { if (pProject == NULL) { pProject = &project; } /* if */ prjFileFree (&pProject->info); /* free project info */ filterFree (&pProject->filter); memset (pProject, 0, sizeof (DFCPRJ_FILTER)); /* reset current project */ pProject->fltcls = FLTCLASS_NOTDEF; /* indicate invalid */ } /* dfcPrjFree() */ /* FUNCTION *******************************************************************/ /** Sets the (new) passed design and filter into the current project. All old * project data, except the header information, are free'ed. The project flag * DFCPRJ_FLAG_SAVED is cleared in this function. The project flag * DFCPRJ_FLAG_SUPERSEDED is set if \p type is equal to FLTCLASS_NOTDEF, else * it is cleared. * * \param type Class of filter. If FLTCLASS_NOTDEF is passed in here, * then the current filter class is unchanged. * \param pFilter Pointer to new filter (coefficients) data. * \param pDesign Pointer to new design data. Set this to NULL if design * data shall not be changed (or are not available). * ******************************************************************************/ void dfcPrjSetFilter (FLTCLASS type, FLTCOEFF* pFilter, DESIGNDLG *pDesign) { filterFree (&project.filter); if (pDesign != NULL) { project.design = *pDesign; } /* if */ if (type == FLTCLASS_NOTDEF) { project.flags |= DFCPRJ_FLAG_SUPERSEDED; } /* if */ else { project.fltcls = type; project.flags &= ~DFCPRJ_FLAG_SUPERSEDED; } /* if */ project.flags &= ~DFCPRJ_FLAG_SAVED; project.filter = *pFilter; } /* dfcPrjSetFilter() */ /* FUNCTION *******************************************************************/ /** Sets new project information data. * * \param pInfo Pointer to new project info. * ******************************************************************************/ void dfcPrjSetInfo (DFCPRJ_INFO *pInfo) { prjFileFree (&project.info); /* free project info */ project.info.author = pInfo->author; project.info.title = pInfo->title; project.info.desc = pInfo->desc; } /* dfcPrjSetInfo() */ /* FUNCTION *******************************************************************/ /** Sets, clears and gets project flags. * * \param andMask Mask to be applied to project flags by an \e AND operation. * \param orMask Mask to be applied to project flags by an \e OR operation. * * \return Returns old project flags. ******************************************************************************/ unsigned dfcPrjSetFlags (unsigned andMask, unsigned orMask) { unsigned oldFlags = 0; if (project.fltcls != FLTCLASS_NOTDEF) /* sanity */ { oldFlags = project.flags; project.flags &= andMask; project.flags |= orMask; } /* if */ return oldFlags; } /* dfcPrjSetFlags() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/miscFilter.c0000644000175100001440000002133213622205141013336 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Misc filter design. * * \note Includes raw filters (filters without a design, except \f$f_{Sample}\f$). * * * \author Copyright (C) 2006, 2011, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "miscFilter.h" #include "filterSupport.h" #include /* includes math.h too */ #include /* all special functions */ #include /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Generates a miscellaneous FIR/IIR filter. The following digital filters are * supported: * - \e Hilbert transformer (linear FIR): \f$\displaystyle{c_{n/2\pm k}=-\frac{2}{k\pi}}\f$ for odd k, else 0 * - Perfect integrator (FIR): \f$\displaystyle{c_{n/2\pm k}=\frac{1}{2}-\frac{1}{\pi}\Si(k\pi)}\f$ * - Perfect differentiator (linear FIR): \f$\displaystyle{c_{n/2\pm k}=\frac{(-1)^{k+1}}{k\pi}}\f$ * - Moving average (FIR): \f$H(z)=1+z^{-1}+z^{-2}+\cdots+z^{-n}\f$ * - Moving average (IIR): \f$\displaystyle{H(z)=\frac{1-z^{-n}}{1-z^{-1}}}\f$ * - Comb filter (FIR): \f$H(z)=1-z^{-n}\f$ * - Exponential average (IIR): \f$\displaystyle{H(z)=\frac{1}{n-(n-1)z^{-1}}}\f$ * * \param pDesign Pointer to misc filter design data. * \param pFilter Pointer to buffer which gets the generated filter. * Notice, that memory space for polynomials will be * allocated. * * \return - 0 (or GSL_SUCCESS) if okay and nothing has changed. * - a negative number (typically GSL_CONTINUE) if a * coefficient or the degree has changed, but the filter * is valid. You can use the FLTERR_WARNING macro from * filterSupport.h to check this condition. * - a positive error number (typically from from errno.h * or gsl_errno.h) that something is wrong and the * filter must be seen as invalid. You can use the * FLTERR_CRITICAL macro from filterSupport.h to check * this condition. ******************************************************************************/ int miscFilterGen (const MISCFLT_DESIGN *pDesign, FLTCOEFF *pFilter) { int err; int i, ic; /* index, centered index */ double *vec; /* ptr to coefficients vector */ pFilter->factor = 0.0; /* roots are invalid (unused here) */ /* First set default numerator an denominator polynomial degree for memory * allocation. */ pFilter->num.degree = pFilter->den.degree = pDesign->order; switch (pDesign->type) /* check which filter type is it */ { case MISCFLT_AVGEXP: pFilter->num.degree = 0; /* and fall through */ case MISCFLT_AVGIIR: /* moving average filter (recursive type) */ pFilter->den.degree = 1; break; /* MISCFLT_AVGIIR, MISCFLT_AVGEXP */ case MISCFLT_HILBERT: /* hilbert transformer */ case MISCFLT_INT: /* integrator (Fourier series expansion) */ case MISCFLT_DIFF: /* differantiator (Fourier series expansion) */ case MISCFLT_COMB: /* comb filter */ case MISCFLT_AVGFIR: /* moving average filter (non-recursive type) */ pFilter->den.degree = 0; /* default denominator polynomial degree */ break; default: ASSERT (0); } /* switch */ err = filterMalloc(pFilter); if (err != 0) { return err; } /* if */ pFilter->factor = 0; /* roots unknown */ pFilter->den.coeff[0] = pFilter->num.coeff[0] = 1.0; /* default a[0]=b[0]=1 */ ic = pDesign->order / 2; /* center index */ vec = pFilter->num.coeff; /* shortcut */ switch (pDesign->type) { case MISCFLT_HILBERT: /* hilbert transformer */ vec[ic] = 0.0; /* num[n/2] = 0 */ for (i = 1; i <= ic; i++) /* i means index of Fourier coeffs */ { if (GSL_IS_ODD(i)) { vec[ic - i] = -M_2_PI / i; vec[ic + i] = -vec[ic - i]; /* antimetric lin. FIR */ } /* if */ else { vec[ic - i] = vec[ic + i] = 0.0; } /* else */ } /* for */ break; /* MISCFLT_HILBERT */ case MISCFLT_INT: /* integrator (Fourier series expansion) */ vec[ic] = 0.5; /* center coefficient */ for (i = 1; i <= ic; i++) { vec[ic - i] = 0.5 - M_1_PI * gsl_sf_Si (M_PI * i); vec[ic + i] = 1.0 - vec[ic - i]; } /* for */ /* not antimetric -> non lin. FIR */ err = normFilterMagnitude (pFilter, 0.0, 1.0); if (FLTERR_CRITICAL(err)) { filterFree (pFilter); DEBUG_LOG ("Generation of perfect integrator has failed"); return err; } /* if */ break; /* MISCFLT_INT */ case MISCFLT_DIFF: /* differantiator (Fourier series expansion) */ vec[ic] = 0.0; /* c[0] = num[n/2] = 0 */ for (i = 1; i <= ic; i++) { vec[ic - i] = -M_1_PI / i; if (GSL_IS_EVEN (i)) { vec[ic - i] *= -1; /* change sign */ } /* if */ vec[ic + i] = -vec[ic - i]; /* antimetric lin. FIR */ } /* for */ break; /* MISCFLT_DIFF */ case MISCFLT_AVGFIR: /* moving average filter (non-recursive type) */ for (i = 0; i <= pFilter->num.degree; i++) { vec[i] = 1.0 / (pFilter->num.degree + 1); } /* for */ break; /* MISCFLT_AVGFIR */ case MISCFLT_AVGIIR: /* moving average filter (recursive type) */ pFilter->den.coeff[1] = -1.0; for (i = 1; i < pFilter->num.degree; i++) { vec[i] = 0.0; } /* for */ vec[0] = 1.0 / pFilter->num.degree; vec[pFilter->num.degree] = -vec[0]; break; /* MISCFLT_AVGIIR */ case MISCFLT_COMB: /* comb filter */ for (i = 1; i < pFilter->num.degree; i++) { vec[i] = 0.0; } /* for */ vec[0] = 0.5; vec[pFilter->num.degree] = -0.5; break; /* MISCFLT_COMB */ case MISCFLT_AVGEXP: /* exponential average filter */ pFilter->den.coeff[0] = pDesign->order; pFilter->den.coeff[1] = 1 - pDesign->order; break; /* MISCFLT_AVGEXP */ default: ASSERT (0); } /* switch */ err = filterCheck(pFilter); if (FLTERR_CRITICAL(err)) { filterFree (pFilter); DEBUG_LOG ("Implementation of filter impossible"); return GSL_EFAILED; } /* if */ return err; } /* miscFilterGen() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/helpDlg.c0000664000175100001440000000605413620572502012630 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Dialogs from the Help menu. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "helpDlg.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** About dialog creation callback from menu. * * \param menuitem \e Help \e About menu item. * \param user_data User data as passed to function g_signal_connect (unused). * * \return Widget pointer. ******************************************************************************/ void helpDlgMenuActivate (GtkMenuItem* menuitem, gpointer user_data) { static const gchar *authors[] = {PACKAGE_AUTHOR, NULL}; #ifdef TODO static const gchar *documenters[] = {PACKAGE_AUTHOR, NULL}; #endif GdkPixbuf* pixbuf = createPixbufFromFile (PACKAGE_ICON); GtkWidget* dialogAbout = gtk_about_dialog_new (); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialogAbout), TRUE); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialogAbout), VERSION); gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dialogAbout), PACKAGE); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialogAbout), PACKAGE_COPYRIGHT); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialogAbout), PACKAGE_URL); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialogAbout), authors); #ifdef TODO gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (dialogAbout), documenters); #endif gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialogAbout), _("translator-credits")); if (pixbuf != NULL) { gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (dialogAbout), pixbuf); g_object_unref (pixbuf); } /* if */ (void) gtk_dialog_run (GTK_DIALOG (dialogAbout)); gtk_widget_destroy (dialogAbout); } /* helpDlgMenuActivate() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/mathFuncs.c0000644000175100001440000001415513711603657013207 00000000000000/******************************************************************************/ /** * \file * Mathematical functions. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "mathFuncs.h" #include "mathMisc.h" /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Calculates a normalized value consisting of (decimal) mantissa and exponent. * * \param val Value to be converted. * * \return Normalized value. ******************************************************************************/ MATH_NORMDBL mathNorm10(double val) { MATH_NORMDBL norm; norm.exponent = trunc(log10(fabs(val))); norm.mantissa = val / POW10(norm.exponent); return norm; } /* mathNorm10() */ /* FUNCTION *******************************************************************/ /** Denormalizes a decimal value from its mantissa and exponent. * * \param val Normalized value to be converted. * * \return Denormalized value. ******************************************************************************/ double mathDenorm10(MATH_NORMDBL val) { return val.mantissa * POW10(val.exponent); } /* mathDenorm10() */ /* FUNCTION *******************************************************************/ /** Rectangle function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 1, & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncRectangle (double x) { if ((x < 0.0) || (x > 1.0)) { return 0.0; } /* if */ return 1.0; } /* mathFuncRectangle() */ /* FUNCTION *******************************************************************/ /** \e Hamming window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 0.54-0.46 \cos(2\pi x), & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncHamming (double x) { if ((x < 0.0) || (x > 1.0)) { return 0.0; } /* if */ return 0.53836 - 0.46164 * cos (2.0 * M_PI * x); } /* mathFuncHamming() */ /* FUNCTION *******************************************************************/ /** \e van \e Hann window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ \frac{1}{2}\,[1-\cos(2\pi x)], & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncVanHann (double x) { if ((x < 0.0) || (x > 1.0)) { return 0.0; } /* if */ return 0.5 * (1.0 - cos (2.0 * M_PI * x)); } /* mathFuncVanHann() */ /* FUNCTION *******************************************************************/ /** \e Blackman window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ 0.42-0.5\cos(2\pi x)+0.08\cos(4\pi x), & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * * \return Result \f$y\f$. ******************************************************************************/ double mathFuncBlackman (double x) { if ((x < 0.0) || (x > 1.0)) { return 0.0; } /* if */ return 0.42 - 0.5 * cos (2.0 * M_PI * x) + 0.08 * cos(4.0 * M_PI * x); } /* mathFuncBlackman() */ /* FUNCTION *******************************************************************/ /** \e Kaiser window function \f[ y = \begin{cases} 0, & \mbox{if} \;\; x<0 \\ 0, & \mbox{if} \;\; x>1 \\ \frac{I_0\left(\alpha\sqrt{1-(2 x-1)^2}\right)} {I_0(\alpha)}, & \mbox{else} \end{cases} \f] * * \param x Argument \f$x\f$. * \param alpha Parameter \f$\alpha\f$. * * \return Result \f$y\f$ when successful evaluated, else * GSL_POSINF or GSL_NEGINF. Use the functions gsl_isinf() * or gsl_finite() for result checking. ******************************************************************************/ double mathFuncKaiser (double x, double alpha) { gsl_sf_result result; double tmp; if ((x < 0) || (x > 1)) { return 0; } /* if */ tmp = 1.0 - 2.0 * x; if (gsl_sf_bessel_I0_e (alpha * sqrt(1.0 - tmp * tmp), &result) != GSL_SUCCESS) { return GSL_POSINF; } /* if */ return mathTryDiv (result.val, gsl_sf_bessel_I0 (alpha)); } /* mathFuncKaiser() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/support.c0000644000175100001440000001156413622205141012757 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file support.c * \brief Support functions, defines and macros, mostly for \e gettext, * widget and file handling. * * \author Copyright (C) 2006, 2011-2012, 2020 Ralf Hoppe * ******************************************************************************/ #include "gui.h" /* includes base.h and config.h */ #include "support.h" #include /* strlen() */ /* FUNCTION *******************************************************************/ /** \brief This function returns a widget in a component created by \e Glade. * * Call it with the toplevel widget in the component, or alternatively * any widget in the component, and the name of the widget you want * returned. * * \param[in] widget Top level widget pointer. * \param[in] name Name of widget to be searched for. * * \return Pointer to widget, if found, else NULL. ******************************************************************************/ GtkWidget* lookup_widget (GtkWidget* widget, const gchar* name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) { parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); } /* if */ else { parent = widget->parent; } /* else */ if (parent == NULL) { parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); } /* if */ if (parent == NULL) { break; } /* if */ widget = parent; } /* for */ found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), name); #ifdef DEBUG if (found_widget == NULL) { g_warning ("Widget '%s' not found", name); } /* if */ #endif return found_widget; } /* lookup_widget() */ /* FUNCTION *******************************************************************/ /** \brief This function returns a path to a directory, using UTF-8 encoding. * * \param[in] dir_id Directory identifier. * * \return A newly allocated string that must be freed with g_free(). ******************************************************************************/ gchar* getPackageDirectory (DIRECTORY_ID dir_id) { static const gchar* pkgdir[DIR_ID_SIZE] = { PACKAGE_TEMPLATES_DIR, /* (0) DIR_ID_TEMPLATES */ PACKAGE_PIXMAPS_DIR, /* (1) DIR_ID_PIXMAPS */ PACKAGE_FILTERS_DIR, /* (2) DIR_ID_FILTERS */ PACKAGE_LOCALE_DIR /* (3) DIR_ID_LOCALE */ }; gchar* path; #ifdef G_OS_WIN32 #if GTK_CHECK_VERSION (2, 18, 0) gchar* root = g_win32_get_package_installation_directory_of_module (NULL); #else gchar* root = g_win32_get_package_installation_directory (NULL, NULL); #endif if (root != NULL) /* installation directory found? */ { const gchar* pStart = pkgdir[dir_id]; const gchar* pEnd = pStart + strlen (pStart); DEBUG_LOG ("Trying to determine sub-directory from '%s'", pStart); while ((pEnd != pStart) && (*pEnd != '/')) { --pEnd; } /* while */ if (*pEnd == '/') { ++pEnd; } /* if */ path = g_build_filename (root, "share", pEnd, NULL); g_free (root); DEBUG_LOG ("Sub-directory '%s' mapped to '%s'", pEnd, path); } /* if */ else /* use the MinGW path */ #endif path = g_strdup (pkgdir[dir_id]); if (path == NULL) { g_critical (_("Couldn't locate package sub-directory no. %d"), dir_id); } /* if */ return path; } /* getPackageDirectory() */ /* FUNCTION *******************************************************************/ /** \brief Create a \c GdkPixbuf from a pixmaps file. * * \param[in] filename Pixmpas filename. * * \return A newly allocated \c GdkPixbuf, representing the pixmap file. ******************************************************************************/ GdkPixbuf* createPixbufFromFile (const gchar* filename) { gchar *path; gchar *subdir; GdkPixbuf *pixbuf; GError *error = NULL; ASSERT (filename != NULL); subdir = getPackageDirectory (DIR_ID_PIXMAPS); path = g_build_filename (subdir, filename, NULL); if (path == NULL) { g_free (subdir); g_warning (_("Couldn't find pixmap file '%s'"), filename); return NULL; } /* if */ pixbuf = gdk_pixbuf_new_from_file (path, &error); if (pixbuf == NULL) { g_warning (_("Failed to create pixbuf from file '%s': %s"), path, error->message); g_error_free (error); } /* if */ g_free (path); g_free (subdir); return pixbuf; } /* createPixbufFromFile() */ dfcgen-gtk-0.5/src/Makefile.am0000664000175100001440000000327513575504571013155 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006, 2011-2013, 2019 Ralf Hoppe ## AM_CPPFLAGS = \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DPACKAGE_PIXMAPS_DIR=\"$(pkgpixmapsdir)\" \ -DPACKAGE_FILTERS_DIR=\"$(pkgfiltersdir)\" \ -DPACKAGE_TEMPLATES_DIR=\"$(pkgtemplatesdir)\" \ -I"$(top_srcdir)/include" # Additional CFLAGS AM_CFLAGS = @PKGCONF_CFLAGS@ # Additional LDFLAGS # # Note: There is no need to put in here PKGCONF_LIBS (from PKG_CHECK_MODULES(), # pkg-config), because configure.ac has put this variable into LIBS. # # AM_LDFLAGS = bin_PROGRAMS = dfcgen-gtk # need for LIBINTL from AM_GNU_GETTEXT() - gettext.m4 dfcgen_gtk_LDADD = @LIBINTL@ # when building on MinGW: add resource file and Win32 compiler flags if BUILD_OS_MINGW32 PACKAGE_RC_FILE = dfcgen-gtk.rc dfcgen_gtk_LDADD += $(PACKAGE_RC_FILE).o dfcgen_gtk_LDFLAGS = -mwindows endif dfcgen_gtk_SOURCES = \ support.c \ main.c \ designDlg.c \ mainDlg.c \ dfcProject.c \ filterResponse.c \ filterSupport.c \ mathPoly.c \ stdIirFilter.c \ helpDlg.c \ responseWin.c \ mathMisc.c \ mathFuncs.c \ cairoPlot.c \ fileDlg.c \ cfgSettings.c \ responseDlg.c \ editDlg.c \ stdIirDesignDlg.c \ miscDesignDlg.c \ projectFile.c \ miscFilter.c \ dialogSupport.c \ responsePlot.c \ linFirDesignDlg.c \ linFirFilter.c \ rootsPlot.c \ filterPrint.c # when building on MinGW: regard an additional rule on "make [all]", which # executes the resource compiler if BUILD_OS_MINGW32 all-local: $(PACKAGE_RC_FILE).o $(PACKAGE_RC_FILE).o: ../dist/win32/$(PACKAGE_RC_FILE) $(WINDRES) -i ../dist/win32/$(PACKAGE_RC_FILE) --input-format=rc -o $(PACKAGE_RC_FILE).o -O coff endif dfcgen-gtk-0.5/src/dialogSupport.c0000664000175100001440000003012213620605742014101 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file dialogSupport.c * \brief Dialog helper functions. * * \author Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "gui.h" #include "dialogSupport.h" #include "cfgSettings.h" #include #include #include #include /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /* LOCAL CONSTANT DEFINITIONS *************************************************/ /* LOCAL VARIABLE DEFINITIONS *************************************************/ /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static void dlgEntryNumericError (GtkWidget* entry, double vmin, double vmax); /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Error dialog for GTkEntry dialog elements. * * \param entry GtkEntry widget which has generated the error. * \param vmin Minimum allowed value (after applying \p multiplier). * \param vmax Maximum allowed value (after applying \p multiplier). * ******************************************************************************/ static void dlgEntryNumericError (GtkWidget* entry, double vmin, double vmax) { GList* list; GtkWidget* topWidget = gtk_widget_get_toplevel (entry); gtk_widget_grab_focus (entry); /* Get list of mnemonic labels for GtkEntry */ list = gtk_widget_list_mnemonic_labels (entry); ASSERT (g_list_first (list)->data != NULL); /* required by GUI design */ dlgError (topWidget, _("Input \"%s\" is invalid for %s (min. %G, max. %G)."), gtk_entry_get_text (GTK_ENTRY (entry)), gtk_label_get_label (GTK_LABEL (g_list_first (list)->data)), vmin, vmax); g_list_free(list); } /* dlgEntryNumericError() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Generic error message dialog. * * \param topWidget Toplevel widget. * \param format Printf like format string. * \param ... Arguments associated with format string. * ******************************************************************************/ void dlgError (GtkWidget* topWidget, char* format, ...) { va_list args; gchar *msg; GtkWidget *dialog; va_start(args, format); msg = g_strdup_vprintf (format, args); dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, NULL); gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), msg); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); va_end(args); g_free (msg); } /* dlgError() */ /* FUNCTION *******************************************************************/ /** File error message dialog. * * \param topWidget Toplevel widget. * \param format Printf like format string. * \param filename Filename in filesystem coding (must not be UTF-8), which * is used as first argument into the format string (needs * %s format coding). * \param err GLib error pointer. * ******************************************************************************/ void dlgErrorFile (GtkWidget* topWidget, char* format, char *filename, GError *err) { GtkWidget *dialog; char *utf8name = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); if (utf8name == NULL) /* may be an UTF-8 conversion error */ { utf8name = g_strdup (_("Unknown")); } /* if */ dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (topWidget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, format, filename); if (err != NULL) { gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", err->message); } /* if */ gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); g_free (utf8name); } /* dlgErrorFile() */ /* FUNCTION *******************************************************************/ /** Fetches a double value from a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param ename Name of text entry widget (as set with GLADE_HOOKUP_OBJECT). * \param vmin Minimum allowed value (after applying \p multiplier). * \param vmax Maximum allowed value (after applying \p multiplier). * \param multiplier Multiplier for scaling the result (wrt. units). * \param pResult Pointer to result buffer. * * \return TRUE on success, else FALSE. If FALSE is returned then * a message was given to the user indicating the wrong * input. ******************************************************************************/ BOOL dlgGetDouble (GtkWidget* topWidget, const char *ename, double vmin, double vmax, double multiplier, double *pResult) { const char *str; char *tail; double result; GtkWidget *entry = lookup_widget (topWidget, ename); ASSERT (entry != NULL); str = gtk_entry_get_text (GTK_ENTRY (entry)); errno = 0; result = g_strtod (str, &tail); if ((errno == 0) && (tail != str) && (*tail == '\0')) { result *= multiplier; if ((result >= vmin) && (result <= vmax)) { *pResult = result; return TRUE; } /* if */ } /* if */ dlgEntryNumericError (entry, vmin / multiplier, vmax / multiplier); return FALSE; } /* dlgGetDouble() */ /* FUNCTION *******************************************************************/ /** Fetches an integer value from a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param ename Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param vmin Minimum allowed value. * \param vmax Maximum allowed value. * \param pResult Pointer to result buffer. * * \return TRUE on success, else FALSE. If FALSe is returned then * a message was given to the user indicating the wrong * input. ******************************************************************************/ BOOL dlgGetInt (GtkWidget* topWidget, const char *ename, int vmin, int vmax, int *pResult) { const char *str; char *tail; long int result; GtkWidget *entry = lookup_widget (topWidget, ename); ASSERT (entry != NULL); str = gtk_entry_get_text (GTK_ENTRY (entry)); errno = 0; result = strtol (str, &tail, 10); if ((errno == 0) && (tail != str) && (*tail == '\0')) { if ((result >= vmin) && (result <= vmax)) { *pResult = result; return TRUE; } /* if */ } /* if */ dlgEntryNumericError (entry, vmin, vmax); return FALSE; } /* dlgGetInt() */ /* FUNCTION *******************************************************************/ /** Sets a double value into a GtkEntry dialog widget. * * \param topWidget Toplevel widget. * \param name Name of text entry widget (as set by GLADE_HOOKUP_OBJECT). * \param multiplier Multiplier for scaling the result (wrt. units). * \param value The double value to set. * ******************************************************************************/ void dlgSetDouble (GtkWidget* topWidget, const char *name, double multiplier, double value) { char text[128]; g_snprintf (text, sizeof(text), "%.*G", cfgGetDesktopPrefs()->outprec, value / multiplier); gtk_entry_set_text (GTK_ENTRY (lookup_widget (topWidget, name)), text); } /* dlgSetDouble() */ /* FUNCTION *******************************************************************/ /** A little popup dialog, where the user shall enter a double value. * * \param title Title of window. * \param label Label to put before the GtkEntry text field. * \param comment An introduction displayed at top of the dialog (may be * NULL, then nothing is displayed at top position). * \param pResult Pointer to result buffer, which must be initialized with * a default value. * * \return TRUE on success, FALSE if the user has canceled. ******************************************************************************/ BOOL dlgPopupDouble (char *title, char *label, char *comment, double *pResult) { BOOL ret; char text[128]; GtkWidget *widget, *entry, *vbox, *hbox; GtkWidget *dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (dialog), title); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); vbox = GTK_DIALOG (dialog)->vbox; if (comment != NULL) { widget = gtk_label_new (comment); gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE); gtk_label_set_use_markup (GTK_LABEL (widget), TRUE); gtk_misc_set_padding (GTK_MISC (widget), 12, 0); gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 12); } /* if */ hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 6); widget = gtk_label_new_with_mnemonic (label); gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0); gtk_misc_set_padding (GTK_MISC (widget), 12, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, TRUE, 0); gtk_entry_set_width_chars (GTK_ENTRY (entry), DBL_DIG); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); g_snprintf (text, sizeof(text), "%.*G", cfgGetDesktopPrefs()->outprec, *pResult); gtk_entry_set_text (GTK_ENTRY (entry), text); GLADE_HOOKUP_OBJECT (dialog, entry, "entry"); gtk_label_set_mnemonic_widget (GTK_LABEL (widget), entry); vbox = GTK_DIALOG (dialog)->action_area; gtk_button_box_set_layout (GTK_BUTTON_BOX (vbox), GTK_BUTTONBOX_END); widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), widget, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), widget, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); gtk_widget_grab_default (widget); gtk_widget_show_all (dialog); do { if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_CANCEL) { GLADE_HOOKUP_OBJECT_NO_REF (dialog, NULL, "entry"); gtk_widget_destroy (dialog); return FALSE; } /* if */ ret = dlgGetDouble (dialog, "entry", -DBL_MAX, DBL_MAX, 1.0, pResult); } while (!ret); GLADE_HOOKUP_OBJECT_NO_REF (dialog, NULL, "entry"); gtk_widget_destroy (dialog); return ret; } /* dlgPopupDouble() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/src/projectFile.c0000644000175100001440000017146013714315075013525 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file projectFile.c * \brief Project file handling. * * \note The DFCGen filter project file functions implemented here are * very closely related to the \e GLib XML support functions. * Adoption to other platforms or to libxml is possible, but need * some rework. * * \note All double values written to a DFCGen project file are formated * in the \e C locale for LC_CTYPE. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * ******************************************************************************/ /* INCLUDE FILES **************************************************************/ #include "dfcProject.h" #include "filterSupport.h" #include "projectFile.h" #include "cfgSettings.h" /* cfgGetDesktopPrefs() */ #include #include #include /* memset() */ #include /* setlocale() */ /* GLOBAL CONSTANT DEFINITIONS ************************************************/ /* GLOBAL VARIABLE DEFINITIONS ************************************************/ /* LOCAL TYPE DECLARATIONS ****************************************************/ /** Bitset (flags) for a tag. */ typedef enum { PRJF_TAGFLAG_MISC = 1 << FLTCLASS_MISC, /**< Tag is mandatory for misc filters */ PRJF_TAGFLAG_LINFIR = 1 << FLTCLASS_LINFIR, /**< Tag is mandatory for linear FIR filters */ PRJF_TAGFLAG_STDIIR = 1 << FLTCLASS_STDIIR, /**< Tag is mandatory for standard IIR filters */ PRJF_TAGFLAG_FOUND = 1 << FLTCLASS_SIZE /**< Tag found (in DFCGen project file) */ } PRJF_TAGFLAG; /** Forward declaration of a project file tag descriptor. */ typedef struct _PRJF_TAG_DESC PRJF_TAG_DESC; /** Handler of tag contents. * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to filter project. * \param text Pointer to content of tag (zero-terminated). */ typedef int (*PRJF_TAG_CONTENT_HANDLER) (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); /** Handler of \e Open tags. * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to filter project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. */ typedef int (*PRJF_TAG_OPEN_HANDLER) (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); /** Project file tag identifiers. */ typedef enum { PRJF_IDTAG_AUTHOR = 0, PRJF_IDTAG_TITLE = 1, PRJF_IDTAG_DESCRIPTION = 2, PRJF_IDTAG_PROJECT = 3, PRJF_IDTAG_FILTER = 4, PRJF_IDTAG_SAMPLE = 5, PRJF_IDTAG_NUMERATOR = 6, PRJF_IDTAG_DENOMINATOR = 7, PRJF_IDTAG_DEGREE = 8, PRJF_IDTAG_COEFF = 9, PRJF_IDTAG_DESIGN = 10, PRJF_IDTAG_CLASS = 11, PRJF_IDTAG_TYPE = 12, PRJF_IDTAG_ORDER = 13, PRJF_IDTAG_CUTOFF = 14, PRJF_IDTAG_CENTER = 15, PRJF_IDTAG_BANDWIDTH = 16, PRJF_IDTAG_ALGOZ = 17, PRJF_IDTAG_PASSBAND = 18, PRJF_IDTAG_STOPBAND = 19, PRJF_IDTAG_MODULE = 20, /**< Elliptic filters module angle */ PRJF_IDTAG_FTR = 21, /**< Frequency transformation type */ PRJF_IDTAG_DSPWIN = 22, /**< Window function */ PRJF_IDTAG_SIZE } PRJF_IDTAG; /** Project file XML tag descriptor. */ struct _PRJF_TAG_DESC { PRJF_IDTAG id; /**< Associated tag identifier */ int depth; /**< Depth where it is allowed */ char *name; /**< Name of XML tag */ /** Meaning of \a constraint depends on type of data/tag/attribute: * - Integer: Maximum allowed value. * - Double: TRUE if value is allowed to be negative, else FALSE. */ int constraint; unsigned flags; /**< Bitset from values in PRJF_TAGFLAG */ void *data; /**< Pointer to (\e Open) tag associated variable */ PRJF_TAG_OPEN_HANDLER openHandler; /**< \e Open tag handler */ PRJF_TAG_CONTENT_HANDLER contentsHandler; /**< Tag contents handler */ }; /** Keyword identifier in an export template file. */ typedef enum { PRJF_IDKEY_INVALID = -1, /**< invalid keyword */ PRJF_IDKEY_NUM_DEGREE = 0, /**< numerator degree */ PRJF_IDKEY_NUM_EXPONENT = 1, /**< numerator exponent */ PRJF_IDKEY_NUM_COEFF = 2, /**< numerator coefficient */ PRJF_IDKEY_DEN_DEGREE = 3, /**< denominator degree */ PRJF_IDKEY_DEN_EXPONENT = 4, /**< denominator exponent */ PRJF_IDKEY_DEN_COEFF = 5, /**< denominator coefficient */ PRJF_IDKEY_SIZE } PRJF_IDKEY; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define PRJF_TEMPLATES_BASENAME "export" /**< Basename of export files */ #define PRJF_IDTAG_INFO_END PRJF_IDTAG_DESCRIPTION /**< End of header */ #define PRJF_TAGFLAG_ALL (PRJF_TAGFLAG_MISC | PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR) #define PRJF_TAG_AUTHOR "author" #define PRJF_TAG_TITLE "title" #define PRJF_TAG_DESCRIPTION "description" #define PRJF_TAG_PROJECT "project" #define PRJF_TAG_FILTER "filter" #define PRJF_TAG_SAMPLE "sample" #define PRJF_TAG_NUMERATOR "numerator" #define PRJF_TAG_DENOMINATOR "denominator" #define PRJF_TAG_DEGREE "degree" #define PRJF_TAG_COEFF "coefficient" #define PRJF_TAG_DESIGN "design" #define PRJF_TAG_CLASS "class" #define PRJF_TAG_TYPE "type" #define PRJF_TAG_ORDER "order" #define PRJF_TAG_ALGOZ "algorithm" #define PRJF_TAG_CUTOFF "cutoff" #define PRJF_TAG_CENTER "center" #define PRJF_TAG_BANDWIDTH "bandwidth" #define PRJF_TAG_PASSBAND "passband" #define PRJF_TAG_STOPBAND "stopband" #define PRJF_TAG_MODULE "module" #define PRJF_TAG_FTR "transform" /**< Frequency transform tag */ #define PRJF_TAG_DSPWIN "window" /**< Window function */ #define PRJF_ATTRN_LANG "lang" /**< Language attribute (of strings) */ #define PRJF_ATTRN_SUPERSEDED "superseded" /**< Design attribute name */ #define PRJF_ATTRN_GEOMETRIC "geometric" /**< Frequency transform attribute */ #define PRJF_ATTRN_KAISER "alpha" /**< Parameter \f$\alpha\f$ of \e Kaiser window */ #define PRJF_ATTRV_TRUE "true" /**< Boolean attribute value TRUE */ #define PRJF_ATTRV_FALSE "false" /**< Boolean attribute value FALSE */ /* LOCAL FUNCTION DECLARATIONS ************************************************/ static PRJF_IDKEY exportLookupTemplateKeyword (gchar* keyword); static gint exportConvertCoeff (char* buffer, gint bufsize, gdouble val); static void writeMarkupText (FILE *f, char *lang, char *tag, char *text); static void writeFrequTransf (FILE *f, double cutoff, FTRDESIGN *ftr); static void writePolyCoeffs (FILE *f, MATHPOLY *poly); static void writeMiscFltDesign (FILE *f, MISCFLT_DESIGN *pDesign); static void writeStdIirDesign (FILE *f, STDIIR_DESIGN *pDesign); static void writeLinFirDesign (FILE *f, LINFIR_DESIGN *pDesign); static void readProject (const char *filename, unsigned flags, GError **err); static int writeProject (FILE *f, DFCPRJ_FILTER *prj); static int tagStringHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); static int tagIntHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); static int tagDoubleHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); static int tagDegreeHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); static int tagCoeffHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text); static int tagPolyHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); static int attrStringHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); static int attrSupersedHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); static int attrGeometricHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); static int attrKaiserHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv); /* LOCAL VARIABLE DEFINITIONS *************************************************/ static GData *prjTagsList; /**< Hash table for all tags */ static int prjTagsDepth; /**< Current depth in XML file */ static PRJF_TAG_DESC *prjTagPtr; /**< Current tag descriptor (pointer) */ static DFCPRJ_FILTER tmpPrj; /**< The project currently parsed */ /** All XML tag descriptors (optionally) used in a project file. Most of them * are constant, but for differentiating between numerator and denominator * polynomials some elemenents are changed while reading the project file: * - prjTagsDesc[PRJF_IDTAG_FILTER].data points to the polynomial currently * processed (after detection of numerator or denominator \e Open tag). * - prjTagsDesc[PRJF_IDTAG_DEGREE].data points to the element \a degree of * the currently processed polynomial. * - prjTagsDesc[PRJF_IDTAG_COEFF].data points to the next coefficient (same * circumstances as above). */ static PRJF_TAG_DESC prjTagsDesc[PRJF_IDTAG_SIZE] = { /* id, depth, name, constraint, mandatory, data, openHandler, contentsHandler */ {PRJF_IDTAG_AUTHOR, 1, PRJF_TAG_AUTHOR, INT_MAX, 0, &tmpPrj.info.author, attrStringHandler, tagStringHandler}, {PRJF_IDTAG_TITLE, 1, PRJF_TAG_TITLE, INT_MAX, 0, &tmpPrj.info.title, attrStringHandler, tagStringHandler}, {PRJF_IDTAG_DESCRIPTION, 1, PRJF_TAG_DESCRIPTION, INT_MAX, 0, &tmpPrj.info.desc, attrStringHandler, tagStringHandler}, {PRJF_IDTAG_PROJECT, 0, PRJF_TAG_PROJECT, 0, PRJF_TAGFLAG_ALL, NULL, NULL, NULL}, {PRJF_IDTAG_FILTER, 1, PRJF_TAG_FILTER, 0, PRJF_TAGFLAG_ALL, NULL, NULL, NULL}, {PRJF_IDTAG_SAMPLE, 2, PRJF_TAG_SAMPLE, FALSE, PRJF_TAGFLAG_ALL, &tmpPrj.filter.f0, NULL, tagDoubleHandler}, {PRJF_IDTAG_NUMERATOR, 2, PRJF_TAG_NUMERATOR, 0, PRJF_TAGFLAG_ALL, &tmpPrj.filter.num, tagPolyHandler, NULL}, {PRJF_IDTAG_DENOMINATOR, 2, PRJF_TAG_DENOMINATOR, 0, PRJF_TAGFLAG_ALL, &tmpPrj.filter.den, tagPolyHandler, NULL}, {PRJF_IDTAG_DEGREE, 3, PRJF_TAG_DEGREE, FLT_DEGREE_MAX, PRJF_TAGFLAG_ALL, NULL, NULL, tagDegreeHandler}, {PRJF_IDTAG_COEFF, 3, PRJF_TAG_COEFF, TRUE, PRJF_TAGFLAG_ALL, NULL, NULL, tagCoeffHandler}, {PRJF_IDTAG_DESIGN, 1, PRJF_TAG_DESIGN, 0, PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR, NULL, attrSupersedHandler, NULL}, {PRJF_IDTAG_CLASS, 2, PRJF_TAG_CLASS, FLTCLASS_SIZE - 1, PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR, &tmpPrj.fltcls, NULL, tagIntHandler}, {PRJF_IDTAG_TYPE, 2, PRJF_TAG_TYPE, INT_MAX, PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR, &tmpPrj.design.all.type, NULL, tagIntHandler}, {PRJF_IDTAG_ORDER, 2, PRJF_TAG_ORDER, FLT_DEGREE_MAX, PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR, &tmpPrj.design.all.order, NULL, tagIntHandler}, {PRJF_IDTAG_CUTOFF, 2, PRJF_TAG_CUTOFF, FALSE, 0, &tmpPrj.design.all.cutoff, NULL, tagDoubleHandler}, {PRJF_IDTAG_CENTER, 2, PRJF_TAG_CENTER, FALSE, 0, &tmpPrj.design.all.ftr.fc, attrGeometricHandler, tagDoubleHandler}, {PRJF_IDTAG_BANDWIDTH, 2, PRJF_TAG_BANDWIDTH, FALSE, 0, &tmpPrj.design.all.ftr.bw, NULL, tagDoubleHandler}, {PRJF_IDTAG_ALGOZ, 2, PRJF_TAG_ALGOZ, ZTR_SIZE - 1, PRJF_TAGFLAG_STDIIR, &tmpPrj.design.stdIir.zAlgo, NULL, tagIntHandler}, {PRJF_IDTAG_PASSBAND, 2, PRJF_TAG_PASSBAND, FALSE, 0, &tmpPrj.design.stdIir.ripple, NULL, tagDoubleHandler}, {PRJF_IDTAG_STOPBAND, 2, PRJF_TAG_STOPBAND, FALSE, 0, &tmpPrj.design.stdIir.minatt, NULL, tagDoubleHandler}, {PRJF_IDTAG_MODULE, 2, PRJF_TAG_MODULE, FALSE, 0, &tmpPrj.design.stdIir.angle, NULL, tagDoubleHandler}, {PRJF_IDTAG_FTR, 2, PRJF_TAG_FTR, FTR_SIZE, PRJF_TAGFLAG_STDIIR | PRJF_TAGFLAG_LINFIR, &tmpPrj.design.all.ftr.type, NULL, tagIntHandler}, {PRJF_IDTAG_DSPWIN, 2, PRJF_TAG_DSPWIN, LINFIR_DSPWIN_SIZE, PRJF_TAGFLAG_LINFIR, &tmpPrj.design.linFir.dspwin, attrKaiserHandler, tagIntHandler} }; /* LOCAL MACRO DEFINITIONS ****************************************************/ /* LOCAL FUNCTION DEFINITIONS *************************************************/ /* FUNCTION *******************************************************************/ /** Handler for tag contents which is stored as a string. * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param text Pointer to content of tag (zero-terminated). * * \return Zero on success, else an error number. ******************************************************************************/ static int tagStringHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text) { char **str; /* pointer to string pointer */ ASSERT (pTag != NULL); str = (char **)(pTag->data); if (*str == NULL) /* take the string only once */ { *str = g_strdup (text); } /* if */ return 0; } /* tagStringHandler() */ /* FUNCTION *******************************************************************/ /** Handler for tag contents which is an integer number. * * \param ctx Pointer to parser context. * \param p Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param text Pointer to content of tag (zero-terminated). * * \return Zero on success, else an error number. ******************************************************************************/ static int tagIntHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *p, DFCPRJ_FILTER *prj, char *text) { long int result; errno = 0; result = strtol (text, NULL, 10); if ((result <= p->constraint) && (errno == 0)) { *(int *)(p->data) = result; return 0; } /* if */ return G_MARKUP_ERROR_INVALID_CONTENT; } /* tagIntHandler() */ /* FUNCTION *******************************************************************/ /** Handler for tag contents which is an double number. * * \param ctx Pointer to parser context. * \param p Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param text Pointer to content of tag (zero-terminated). * * \return Zero on success, else an error number. ******************************************************************************/ static int tagDoubleHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *p, DFCPRJ_FILTER *prj, char *text) { double result; ASSERT (p != NULL); errno = 0; result = g_ascii_strtod (text, NULL); if ((errno == 0) && (p->constraint || (result > 0))) { *(double *)(p->data) = result; return 0; } /* if */ return G_MARKUP_ERROR_INVALID_CONTENT; } /* tagDoubleHandler() */ /* FUNCTION *******************************************************************/ /** Handler for tag contents which is a polynomial coefficient. * * \note A precondition for success of this function is a preceding call of * function tagDegreeHandler(). * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param text Pointer to content of tag (zero-terminated). * * \return Zero on success, else an error number in domain G_MARKUP_ERROR. ******************************************************************************/ static int tagCoeffHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text) { int ret; double *pCoeff; ASSERT (pTag != NULL); pCoeff = pTag->data; if (pCoeff == NULL) { return G_MARKUP_ERROR_INVALID_CONTENT; } /* if */ ret = tagDoubleHandler (ctx, pTag, prj, text); pTag->data = ++pCoeff; /* switch to next coefficient */ return ret; } /* tagCoeffHandler() */ /* FUNCTION *******************************************************************/ /** Handler for tag contents which is an polynomial degree number. * * \note A precondition for success of this function is a preceding call of * function tagPolyHandler(). * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param text Pointer to content of tag (zero-terminated). * * \return Zero on success, else an error number. ******************************************************************************/ static int tagDegreeHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, char *text) { int ret; MATHPOLY *poly = prjTagsDesc[PRJF_IDTAG_FILTER].data; ASSERT (pTag != NULL); if (poly != NULL) /* polynomial selected? */ { pTag->data = &poly->degree; /* set pointer to degree (for conversion) */ ret = tagIntHandler (ctx, pTag, prj, text); /* *p->data := degree */ if (ret == 0) { poly->coeff = g_malloc (((1 + poly->degree) * sizeof(*poly->coeff))); prjTagsDesc[PRJF_IDTAG_COEFF].data = poly->coeff; /* first coefficient */ if (poly->coeff != NULL) { return 0; } /* if */ } /* if */ } /* if */ return G_MARKUP_ERROR_INVALID_CONTENT; } /* tagDegreeHandler() */ /* FUNCTION *******************************************************************/ /** Handler for \e Open tag of numerator or denominator polynomial. Stores a * pointer to the current polynomial in prjTagsDesc[PRJF_IDTAG_FILTER].data. * * \param ctx Pointer to parser context. * \param p Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * * \return Zero on success, else an error number. ******************************************************************************/ static int tagPolyHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *p, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv) { ASSERT (p != NULL); prjTagsDesc[PRJF_IDTAG_FILTER].data = p->data; /* pointer to polynomial */ return 0; } /* tagPolyHandler() */ /* FUNCTION *******************************************************************/ /** Handler for \e Open tag of design (PRJF_IDTAG_DESIGN). * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * * \return Zero on success, else an error number. ******************************************************************************/ static int attrSupersedHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar *attrn[], const gchar *attrv[]) { ASSERT (pTag != NULL); while (*attrn != NULL) /* go through the array of char pointers */ { if (!strncmp (*attrn, PRJF_ATTRN_SUPERSEDED, /* found? */ sizeof (PRJF_ATTRN_SUPERSEDED))) { if (!strncmp (*attrv, PRJF_ATTRV_TRUE, sizeof (PRJF_ATTRV_TRUE))) { prj->flags |= DFCPRJ_FLAG_SUPERSEDED; } /* if */ } /* if */ ++attrn; /* try next attribute */ ++attrv; } /* while */ return 0; } /* attrSupersedHandler() */ /* FUNCTION *******************************************************************/ /** Handler for \e Open tag of strings (author, title, description). * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * * \return Zero on success, else an error number. ******************************************************************************/ static int attrStringHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv) { char **str; /* Pointer to a string pointer */ /* Split structure of locale into pieces, regarding the scheme: * language[_territory[.codeset]][@modifier] */ char **locvec = g_strsplit_set (setlocale (LC_CTYPE, NULL), "_.@", -1); ASSERT (pTag != NULL); while (*attrn != NULL) /* go through the array of char pointers */ { if (!strncmp (*attrn, PRJF_ATTRN_LANG, /* found? */ sizeof (PRJF_ATTRN_LANG))) { if ((locvec[0] != NULL) && /* language match? */ (!g_strcmp0 (locvec[0], *attrv))) { str = (char **)(pTag->data); if (*str != NULL) /* (string) tag found again? */ { g_free (*str); *str = NULL; /* allow strdup on tag contents */ } /* if */ } /* if */ } /* if */ ++attrn; /* try next attribute */ ++attrv; } /* while */ g_strfreev(locvec); return 0; } /* attrStringHandler() */ /* FUNCTION *******************************************************************/ /** Handler for \e Open tag of center frequency (PRJF_IDTAG_CENTER). * * \note At the moment we use only \e two attributes: \e superseded and * \e geometric. But if the number of attributes increases then we * should think about a redesign of the PRJF_TAG_DESC structure. * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * * \return Zero on success, else an error number. ******************************************************************************/ static int attrGeometricHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv) { ASSERT (pTag != NULL); while (*attrn != NULL) /* go through the array of char pointers */ { if (!strncmp (*attrn, PRJF_ATTRN_GEOMETRIC, /* found? */ sizeof (PRJF_ATTRN_GEOMETRIC))) { if (!strncmp (*attrv, PRJF_ATTRV_TRUE, sizeof (PRJF_ATTRV_TRUE))) { prj->design.all.ftr.flags |= FTRDESIGN_FLAG_CENTER_GEOMETRIC; } /* if */ } /* if */ ++attrn; /* try next attribute */ ++attrv; } /* while */ return 0; } /* attrGeometricHandler() */ /* FUNCTION *******************************************************************/ /** Handler for \e Open tag of window function (PRJF_IDTAG_DSPWIN). * * \param ctx Pointer to parser context. * \param pTag Pointer to tag descriptor. * \param prj Pointer to DFCGen project. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * * \return Zero on success, else an error number. ******************************************************************************/ static int attrKaiserHandler (GMarkupParseContext *ctx, PRJF_TAG_DESC *pTag, DFCPRJ_FILTER *prj, const gchar **attrn, const gchar **attrv) { ASSERT (pTag != NULL); while (*attrn != NULL) /* go through the array of char pointers */ { if (!strncmp (*attrn, PRJF_ATTRN_KAISER, /* found? */ sizeof (PRJF_ATTRN_KAISER))) { prj->design.linFir.winparm = g_ascii_strtod (*attrv, NULL); } /* if */ ++attrn; /* try next attribute */ ++attrv; } /* while */ return 0; } /* attrKaiserHandler() */ /* FUNCTION *******************************************************************/ /** Handler which is called for every \e Open tag found in the XML file. * * \param ctx Pointer to parser context. * \param element Pointer to name of element. * \param attrn List of attribute names. * \param attrv List of associated attribute values. * \param data User data as passed to g_markup_parse_context_new(). * Here it is a pointer to the project (DFCPRJ_FILTER). * \param err Pointer to error (structure). * ******************************************************************************/ static void prjFileOpenTagHandler (GMarkupParseContext *ctx, const gchar *element, const gchar **attrn, const gchar **attrv, gpointer data, GError **err) { prjTagPtr = g_datalist_get_data (&prjTagsList, element); if (prjTagPtr == NULL) /* unknown tag? */ { return; /* skip unknow tags (forward compatibility) */ } /* if */ if (prjTagPtr->depth == prjTagsDepth) { ++prjTagsDepth; prjTagPtr->flags |= PRJF_TAGFLAG_FOUND; /* mark as 'found' */ if ((prjTagPtr->openHandler == NULL) || /* no handler? */ ((((DFCPRJ_FILTER*)data)->flags & DFCPRJ_FLAG_INTERNAL) && (prjTagPtr->id > PRJF_IDTAG_INFO_END))) /* only scan? */ { return; /* that's it */ } /* if */ if ((prjTagPtr->openHandler)(ctx, prjTagPtr, data, attrn, attrv) == 0) { return; /* okay handled */ } /* if */ } /* if */ g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT, _("Unexpected tag '%s'"), element); } /* prjFileOpenTagHandler() */ /* FUNCTION *******************************************************************/ /** Handler which is called for an \e Close tag found in the XML file. * * \param ctx Pointer to parser context. * \param element Pointer to name of element. * \param data User data as passed to g_markup_parse_context_new(). * Here it is a pointer to the project (DFCPRJ_FILTER). * \param err Pointer to error (structure). * ******************************************************************************/ static void prjFileCloseTagHandler (GMarkupParseContext *ctx, const gchar *element, gpointer data, GError **err) { prjTagPtr = NULL; --prjTagsDepth; } /* prjFileCloseTagHandler() */ /* FUNCTION *******************************************************************/ /** Handler which is called for the text embedded between an \e Open and a * \e Close tag (in XML project file). * * \param ctx Pointer to parser context. * \param text Pointer to the text between \e Open and \e Close tag. * Notice that the text is not zero-terminated. * \param len Length of \p text. * \param data User data as passed to g_markup_parse_context_new(). * Here it is a pointer to the project (DFCPRJ_FILTER). * \param err Pointer to error (structure). * ******************************************************************************/ static void prjFileTextHandler (GMarkupParseContext *ctx, const gchar *text, gsize len, gpointer data, GError **err) { int lineno, ret; char *str; if (prjTagPtr == NULL) /* ignore tag contents if not on a leaf */ { return; } /* if */ if ((prjTagPtr->contentsHandler == NULL) || /* no handler (unimportant tag)? */ ((((DFCPRJ_FILTER*)data)->flags & DFCPRJ_FLAG_INTERNAL) && (prjTagPtr->id > PRJF_IDTAG_INFO_END))) /* only scan? */ { return; } /* if */ str = g_strndup (text, len); /* convert to zero-terminated string */ ret = prjTagPtr->contentsHandler (ctx, prjTagPtr, data, str); g_free (str); if (ret == 0) { return; } /* if */ g_markup_parse_context_get_position (ctx, &lineno, &ret); g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Syntax error at line %d"), lineno); } /* prjFileTextHandler() */ /* FUNCTION *******************************************************************/ /** Writes coefficients of a polynomial to the (open) project file. * * \param f File. * \param poly Pointer to polynomial. * ******************************************************************************/ static void writePolyCoeffs(FILE *f, MATHPOLY *poly) { int i; char buf[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ fprintf (f, "\t\t\t<" PRJF_TAG_DEGREE ">%d\n", poly->degree); for (i = 0; i <= poly->degree; i++) { fprintf (f, "\t\t\t<" PRJF_TAG_COEFF " tap=\"%d\">%s\n", i, g_ascii_dtostr (buf, sizeof(buf), poly->coeff[i])); } /* for */ } /* writePolyCoeffs() */ /* FUNCTION *******************************************************************/ /** Writes frequency transformation design data to a project file. * * \param f File. * \param cutoff Lowpass cutoff frequency to be written if FTR_NON is * indicated. * \param ftr Pointer to frequency transformation data. * ******************************************************************************/ static void writeFrequTransf(FILE *f, double cutoff, FTRDESIGN *ftr) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ fprintf (f, "\t\t<" PRJF_TAG_FTR ">%d\n", ftr->type); switch (ftr->type) { case FTR_NON: fprintf (f, "\t\t<" PRJF_TAG_CUTOFF ">%s\n", g_ascii_dtostr (buf, sizeof(buf), cutoff)); break; case FTR_HIGHPASS: fprintf (f, "\t\t<" PRJF_TAG_CUTOFF ">%s\n", g_ascii_dtostr (buf, sizeof(buf), ftr->fc)); break; case FTR_BANDPASS: case FTR_BANDSTOP: fprintf (f, "\t\t<" PRJF_TAG_CENTER " " PRJF_ATTRN_GEOMETRIC "=\"%s\">%s\n", (ftr->flags & FTRDESIGN_FLAG_CENTER_GEOMETRIC) ? PRJF_ATTRV_TRUE : PRJF_ATTRV_FALSE, g_ascii_dtostr (buf, sizeof(buf), ftr->fc)); fprintf (f, "\t\t<" PRJF_TAG_BANDWIDTH ">%s\n", g_ascii_dtostr (buf, sizeof(buf), ftr->bw)); break; default: ASSERT (0); } /* switch */ } /* writeFrequTransf() */ /* FUNCTION *******************************************************************/ /** Writes design data of a Misc filter (FLTCLASS_MISC) to project file. * * \param f File. * \param pDesign Pointer to Misc filter design data. * ******************************************************************************/ static void writeMiscFltDesign (FILE *f, MISCFLT_DESIGN *pDesign) { fprintf (f, "\t\t<" PRJF_TAG_TYPE ">%d\n", pDesign->type); if (pDesign->type != MISCFLT_UNKNOWN) /* not a raw filter? */ { fprintf (f, "\t\t<" PRJF_TAG_ORDER ">%d\n", pDesign->order); } /* if */ } /* writeMiscFltDesign() */ /* FUNCTION *******************************************************************/ /** Writes design data of standard IIR filter (FLTCLASS_STDIIR) to project file. * * \param f File. * \param pDesign Pointer to standard IIR filter design data. * ******************************************************************************/ static void writeStdIirDesign(FILE *f, STDIIR_DESIGN *pDesign) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ fprintf (f, "\t\t<" PRJF_TAG_TYPE ">%d\n" "\t\t<" PRJF_TAG_ORDER ">%d\n" "\t\t<" PRJF_TAG_ALGOZ ">%d\n", pDesign->type, pDesign->order, pDesign->zAlgo); switch (pDesign->type) { case STDIIR_TYPE_CHEBY: fprintf (f, "\t\t<" PRJF_TAG_PASSBAND ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->ripple)); break; case STDIIR_TYPE_CHEBYINV: fprintf (f, "\t\t<" PRJF_TAG_STOPBAND ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->minatt)); break; case STDIIR_TYPE_CAUER1: /* design by max. passband ripple */ fprintf (f, "\t\t<" PRJF_TAG_PASSBAND ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->ripple)); fprintf (f, "\t\t<" PRJF_TAG_MODULE ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->angle)); break; case STDIIR_TYPE_CAUER2: /* design by min. stopband atten. */ fprintf (f, "\t\t<" PRJF_TAG_STOPBAND ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->minatt)); fprintf (f, "\t\t<" PRJF_TAG_MODULE ">%s\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->angle)); break; case STDIIR_TYPE_BUTTERWORTH: case STDIIR_TYPE_BESSEL: break; default: ASSERT (0); } /* switch */ writeFrequTransf (f, pDesign->cutoff, &pDesign->ftr); } /* writeStdIirDesign() */ /* FUNCTION *******************************************************************/ /** Writes design data of linear FIR filter (FLTCLASS_LINFIR) to project file. * * \param f File. * \param pDesign Pointer to linear FIR filter design data. * ******************************************************************************/ static void writeLinFirDesign (FILE *f, LINFIR_DESIGN *pDesign) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ fprintf (f, "\t\t<" PRJF_TAG_TYPE ">%d\n" "\t\t<" PRJF_TAG_ORDER ">%d\n", pDesign->type, pDesign->order); if (pDesign->dspwin == LINFIR_DSPWIN_KAISER) { fprintf (f, "\t\t<" PRJF_TAG_DSPWIN " " PRJF_ATTRN_KAISER "=\"%s\">%d\n", g_ascii_dtostr (buf, sizeof(buf), pDesign->winparm), LINFIR_DSPWIN_KAISER); } /* if */ else { fprintf (f, "\t\t<" PRJF_TAG_DSPWIN ">%d\n", pDesign->dspwin); } /* else */ writeFrequTransf (f, pDesign->cutoff, &pDesign->ftr); } /* writeLinFirDesign() */ /* FUNCTION *******************************************************************/ /** Writes a filter project to a project file. * * \param f File. * \param lang Language from locale LC_CTYPE (may be NULL). * \param tag Tag. * \param text Markup text to write (may be NULL, then nothing is written). * ******************************************************************************/ static void writeMarkupText (FILE *f, char *lang, char *tag, char *text) { char *xmltext; if (text != NULL) { xmltext = g_markup_escape_text (text, -1); if (lang == NULL) { fprintf (f, "\t<%s lang=\"%s\">%s\n", tag, lang, xmltext, tag); } /* if */ else { fprintf (f, "\t<%s>%s\n", tag, xmltext, tag); } /* else */ g_free (xmltext); /* free escaped strings */ } /* if */ } /* writeMarkupText() */ /* FUNCTION *******************************************************************/ /** Writes a filter project to a project file. * * \param f File. * \param prj Pointer to project. * * \return Zero on succes, else an error number. ******************************************************************************/ static int writeProject (FILE *f, DFCPRJ_FILTER *prj) { char buf[G_ASCII_DTOSTR_BUF_SIZE] = {'\0'}; /* buffer for double conversion */ /* Split structure of locale into pieces, regarding the scheme: * language[_territory[.codeset]][@modifier] */ char **locvec = g_strsplit_set (setlocale (LC_CTYPE, NULL), "_.@", -1); fprintf (f, "\n" "<" PRJF_TAG_PROJECT " generator=\"%s\" version=\"%s\">\n", PACKAGE, VERSION); writeMarkupText (f, locvec[0], PRJF_TAG_AUTHOR, prj->info.author); writeMarkupText (f, locvec[0], PRJF_TAG_TITLE, prj->info.title); writeMarkupText (f, locvec[0], PRJF_TAG_DESCRIPTION, prj->info.desc); g_strfreev(locvec); fprintf (f, "\t<" PRJF_TAG_FILTER ">\n" "\t\t<" PRJF_TAG_SAMPLE ">%s\n" "\t\t<" PRJF_TAG_NUMERATOR ">\n", g_ascii_dtostr (buf, sizeof(buf), prj->filter.f0)); writePolyCoeffs (f, &prj->filter.num); fprintf (f, "\t\t\n" "\t\t<" PRJF_TAG_DENOMINATOR ">\n"); writePolyCoeffs (f, &prj->filter.den); fprintf (f, "\t\t\n" "\t\n" "\t<" PRJF_TAG_DESIGN " " PRJF_ATTRN_SUPERSEDED "=\"%s\">\n" "\t\t<" PRJF_TAG_CLASS ">%d\n", (prj->flags & DFCPRJ_FLAG_SUPERSEDED) ? PRJF_ATTRV_TRUE : PRJF_ATTRV_FALSE, prj->fltcls); switch (prj->fltcls) { case FLTCLASS_STDIIR: writeStdIirDesign (f, &prj->design.stdIir); break; case FLTCLASS_MISC: writeMiscFltDesign (f, &prj->design.miscFlt); break; case FLTCLASS_LINFIR: writeLinFirDesign (f, &prj->design.linFir); break; default: ASSERT (0); } /* switch */ fprintf (f, "\t\n" "\n"); return 0; } /* writeProject() */ /* FUNCTION *******************************************************************/ /** * \brief Reads a filter project from a file into variable tmpPrj. * * In case of an error it sets the pointer to the error * structure, which itself can be used to display the * original error message. Modification of the error * structure pointer indicates an critical error. In that * case it has to be free'ed with g_error_free(). * * \param filename Filename of file (with path). * \param flags Project flags to be preset. Set this to * DFCPRJ_FLAG_INTERNAL if you want to scan only for * project header information. * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function readProject(). * ******************************************************************************/ static void readProject (const char *filename, unsigned flags, GError **err) { static GMarkupParser parser = /* XML parser (functions) */ { prjFileOpenTagHandler, /* open tag handler */ prjFileCloseTagHandler, /* close tag handler */ prjFileTextHandler, /* contents handler */ NULL, /* verbatim text handler */ NULL /* error handler */ }; int i; gsize len; gchar *content; GMarkupParseContext *ctx; if (prjTagsList == NULL) /* on first call build the hash list */ { g_datalist_init (&prjTagsList); for (len = 0; len < N_ELEMENTS (prjTagsDesc); len++) { g_datalist_set_data (&prjTagsList, prjTagsDesc[len].name, &prjTagsDesc[len]); } /* for */ } /* if */ ctx = g_markup_parse_context_new (&parser, 0, &tmpPrj, NULL); ASSERT (ctx != NULL); if (g_file_get_contents (filename, &content, &len, err)) /* read file */ { prjTagsDepth = 0; /* reset current depth in XML file */ prjTagPtr = NULL; /* reset current tag descriptor pointer */ prjTagsDesc[PRJF_IDTAG_DEGREE].data = /* clear dynamic tag data */ prjTagsDesc[PRJF_IDTAG_COEFF].data = prjTagsDesc[PRJF_IDTAG_FILTER].data = NULL; for (i = 0; i < N_ELEMENTS (prjTagsDesc); i++) { /* clear all 'tag found' flags */ prjTagsDesc[i].flags &= ~PRJF_TAGFLAG_FOUND; } /* for */ memset (&tmpPrj, 0, sizeof (tmpPrj)); /* reset temp. filter */ tmpPrj.fltcls = FLTCLASS_DEFAULT; /* all design data are optional */ tmpPrj.design.all.type = MISCFLT_UNKNOWN; /* default -> raw filter */ tmpPrj.flags = flags; if (g_markup_parse_context_parse (ctx, content, len, err)) /* parse */ { ASSERT (*err == NULL); if (g_markup_parse_context_end_parse (ctx, err)) { /* check for mandatory tags */ unsigned mask = 1 << tmpPrj.fltcls; ASSERT (*err == NULL); for (i = 0; i < N_ELEMENTS (prjTagsDesc); i++) { if (prjTagsDesc[i].flags & mask) /* mandatory tag? */ { if (!(prjTagsDesc[i].flags & PRJF_TAGFLAG_FOUND)) { g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Mandatory tag '%s' missing"), prjTagsDesc[i].name); i = INT_MAX; /* break for loop */ } /* if */ } /* if */ } /* for */ /* * The next step is a counterpart to writeFrequTransf(). It * restores the cutoff/center frequency the right way, when * frequency transformations are active. */ switch (tmpPrj.design.all.ftr.type) { case FTR_NON: /* ftr.fc has no meaning */ case FTR_BANDPASS: /* wrote ftr.fc with PRJF_TAG_CENTER */ case FTR_BANDSTOP: break; case FTR_HIGHPASS: /* wrote ftr.fc with PRJF_TAG_CUTOFF */ tmpPrj.design.all.ftr.fc = tmpPrj.design.all.cutoff; break; default: g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Unknown frequency transform type %d"), tmpPrj.design.all.ftr.type); break; } /* switch */ } /* if */ } /* if */ if (*err != NULL) /* parse error? */ { dfcPrjFree (&tmpPrj); } /* if */ g_free (content); } /* if */ g_markup_parse_context_free (ctx); } /* readProject() */ /* FUNCTION *******************************************************************/ /** \brief Performs a template file keyword lookup and returns the associated * identifier. * * \param[in] keyword Template file keyword to search for. * * \return Keyword identifier from ::PRJF_IDKEY (if unkown keyword the * value PRJF_IDKEY::PRJF_IDKEY_INVALID. * ******************************************************************************/ static PRJF_IDKEY exportLookupTemplateKeyword (gchar* keyword) { static gchar* s_templKeywordList[] = { "PRJ:FILTER:NUM:DEGREE", /* PRJF_IDKEY_NUM_DEGREE: numerator degree */ "PRJ:FILTER:NUM:EXPONENT", /* PRJF_IDKEY_NUM_EXPONENT: numerator exponent */ "PRJ:FILTER:NUM:COEFF", /* PRJF_IDKEY_NUM_COEFF: numerator coefficient */ "PRJ:FILTER:DEN:DEGREE", /* PRJF_IDKEY_DEN_DEGREE: denominator degree */ "PRJ:FILTER:DEN:EXPONENT", /* PRJF_IDKEY_DEN_EXPONENT: denominator exponent */ "PRJ:FILTER:DEN:COEFF" /* PRJF_IDKEY_DEN_COEFF: denominator coefficient */ }; PRJF_IDKEY i = 0; while (i < N_ELEMENTS (s_templKeywordList)) { if (g_strcmp0 (keyword, s_templKeywordList[i]) == 0) { return i; } /* if */ ++i; } /* while */ return PRJF_IDKEY_INVALID; } /* exportLookupTemplateKeyword() */ /* FUNCTION *******************************************************************/ /** \brief Writes a \c double value as string to a buffer, always using '.' as * decimal point (does not regard the current locale). * * \param[out] buffer Pointer to buffer to use (should be at least of size \c G_ASCII_DTOSTR_BUF_SIZE). * \param[in] bufsize Size of this buffer. * \param[in] val \c double value to be converted. * * \return Number of (printable) characters written. This value should be * less then \p bufsize at success (see return value of C99 function * snprintf() for details). * ******************************************************************************/ static gint exportConvertCoeff (char* buffer, gint bufsize, gdouble val) { if (bufsize < G_ASCII_DTOSTR_BUF_SIZE) { return G_ASCII_DTOSTR_BUF_SIZE; /* indicate error (as snprintf() does) */ } /* if */ g_ascii_dtostr (buffer, bufsize, val); return (strlen (buffer)); } /* exportConvertCoeff() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** Exports a filter project to a file. * * \param type Export type. * \param filename Filename of file (inclusive path). * \param pProject Pointer to project data. * * \return Zero on succes, else an error number from errno.h. * \todo Create and use an export precision (for coefficients) * instead of using the output precision. * ******************************************************************************/ int prjFileExport (PRJFILE_EXPORT_TYPE type, const char *filename, DFCPRJ_FILTER *pProject) { gchar inbuf[128]; gchar outbuf[128]; gchar* templname; /* template filename */ FILE *templfile; /* template file */ FILE *exportfile; MATHPOLY* poly = NULL; /* numerator or denominator polynomial */ int repcnt = 0; /* repeat counter for a line (index of coefficient) */ int err = 0; BOOL doReadTemplateLines = TRUE; /* no END OF FILE so far ? */ gchar* path = getPackageDirectory (DIR_ID_TEMPLATES); switch (type) { case PRJFILE_EXPORT_CLANG: templname = g_build_filename (path, PRJF_TEMPLATES_BASENAME ".c", NULL); break; case PRJFILE_EXPORT_MATLAB: templname = g_build_filename (path, PRJF_TEMPLATES_BASENAME ".m", NULL); break; case PRJFILE_EXPORT_PLAIN: default: templname = g_build_filename (path, PRJF_TEMPLATES_BASENAME ".txt", NULL); break; } /* switch */ templfile = fopen (templname, "r"); /* open template file */ if (templfile == NULL) { DEBUG_LOG ("Cannot read template file '%s'", templname); g_free (templname); g_free (path); return errno; } /* if */ exportfile = fopen (filename, "w"); if (exportfile == NULL) { (void) fclose (templfile); g_free (templname); g_free (path); DEBUG_LOG ("Cannot create export file '%s'", filename); return errno; } /* if */ /* read line-by-line from template file */ while ((err == 0) && doReadTemplateLines) { char* inptr = inbuf; char* outptr = outbuf; if ((poly == NULL) || /* non-repeating line? */ ((poly != NULL) && (repcnt > poly->degree))) /* enough repeat? */ { repcnt = 0; /* clear repeat count of line */ poly = NULL; /* reset polynomial pointer */ if (fgets (inbuf, sizeof (inbuf), templfile) == NULL) { doReadTemplateLines = FALSE; /* end of file */ inbuf[0] = '\0'; /* nothing read */ } /* if */ } /* if */ while ((err == 0) && (*inptr != '\0')) /* scan the read buffer */ { if (*inptr == '$') /* replacement token delimiter ? */ { char* eptr = ++inptr; /* pointer to closing dollar */ while ((*eptr != '$') && (*eptr != '\0')) { ++eptr; } /* while */ if (*eptr == '\0') { DEBUG_LOG ("No matching dollar found in template file"); err = EILSEQ; /* no matching dollar found (or buffer truncated) */ } /* if */ else /* so far so good */ { gint written = 0; /* number of bytes written */ gint bufsize = outbuf + sizeof (outbuf) - outptr; *eptr = '\0'; switch (exportLookupTemplateKeyword (inptr)) { case PRJF_IDKEY_NUM_DEGREE: written = g_snprintf (outptr, bufsize, "%d", pProject->filter.num.degree); break; /* PRJF_IDKEY_NUM_DEGREE */ case PRJF_IDKEY_NUM_EXPONENT: poly = &pProject->filter.num; written = g_snprintf (outptr, bufsize, "%d", -repcnt); break; /* PRJF_IDKEY_NUM_EXPONENT */ case PRJF_IDKEY_NUM_COEFF: poly = &pProject->filter.num; written = exportConvertCoeff (outptr, bufsize, poly->coeff[repcnt]); break; /* PRJF_IDKEY_NUM_COEFF */ case PRJF_IDKEY_DEN_DEGREE: written = g_snprintf (outptr, bufsize, "%d", pProject->filter.den.degree); break; /* PRJF_IDKEY_DEN_DEGREE */ case PRJF_IDKEY_DEN_EXPONENT: poly = &pProject->filter.den; written = g_snprintf (outptr, bufsize, "%d", -repcnt); break; /* PRJF_IDKEY_DEN_EXPONENT */ case PRJF_IDKEY_DEN_COEFF: poly = &pProject->filter.den; written = exportConvertCoeff (outptr, bufsize, poly->coeff[repcnt]); break; /* PRJF_IDKEY_DEN_COEFF */ case PRJF_IDKEY_INVALID: /* error */ default: /* unknown ID */ DEBUG_LOG ("Unknown keyword in template file"); break; } /* switch */ if ((written >= 0) && (written < bufsize)) /* success? */ { DEBUG_LOG ("Replacing keyword '%s' by '%s'", inptr, outptr); outptr += written; } /* if */ else { if (err == 0) { DEBUG_LOG ("Conversion error during keyword replacement"); err = EFBIG; } /* if */ } /* else */ *eptr = '$'; /* restore old character at eptr position */ inptr = eptr; /* skip the keyword in template file */ } /* else */ } /* if */ else { *outptr = *inptr; ++outptr; } /* else */ ++inptr; } /* while */ if (err == 0) { *outptr = '\0'; if (fputs (outbuf, exportfile) < 0) { err = errno; DEBUG_LOG ("File write error at export"); } /* if */ else { if (poly != NULL) { ++repcnt; } /* if */ } /* else */ } /* if */ } /* while */ (void) fclose (templfile); if (fclose (exportfile) != 0) { err = errno; } /* if */ g_free (templname); g_free (path); return err; } /* prjFileExport() */ /* FUNCTION *******************************************************************/ /** Writes a filter project to a file. * * \param filename Filename of file (inclusive path). * \param pProject Pointer to project data. * * \return Zero on succes, else an error number from errno.h. ******************************************************************************/ int prjFileWrite (const char *filename, DFCPRJ_FILTER *pProject) { int err; FILE *f = fopen (filename, "w"); if (f == NULL) { DEBUG_LOG ("Cannot create project file '%s'", filename); return errno; } /* if */ err = writeProject (f, pProject); if (fclose (f) != 0) { return errno; } /* if */ return err; } /* prjFileWrite() */ /* FUNCTION *******************************************************************/ /** Reads a filter project from a file. In case of an error it sets the pointer * to the error structure, which itself can be used to display the original * error message. Modification of the error structure pointer indicates an * critical error. In that case it has to be free'ed with g_error_free(). * * \param filename Filename of file (with path). * \param pProject Pointer to project buffer. This project will be * overwritten (only) on success. * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function prjFileRead(). * ******************************************************************************/ void prjFileRead (const char *filename, DFCPRJ_FILTER *pProject, GError **err) { readProject (filename, DFCPRJ_FLAG_SAVED, err); if (*err == NULL) { DEBUG_LOG ("Project file '%s' successfully read", filename); if ((mathPolyMallocRoots (&tmpPrj.filter.num) == 0) && (mathPolyMallocRoots (&tmpPrj.filter.den) == 0) && FLTERR_SUCCESS (filterCheck(&tmpPrj.filter))) { *pProject = tmpPrj; } /* if */ else { g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Something seems wrong with the project in '%s'"), filename); } /* else */ } /* if */ } /* prjFileRead() */ /* FUNCTION *******************************************************************/ /** Scans for project info (header) in a DFCGen project file. In case * of an error it sets the pointer to the error structure, which itself can be * used to display the original error message. Modification of the error * structure pointer indicates an critical error. In that case it has to be * free'ed with g_error_free(). * * \param filename Filename of file (with path). * \param pInfo Pointer to info data buffer. * \param err Pointer to an error (structure) pointer. The pointer * to the error structure must be set NULL before calling * function prjFileScan(). * ******************************************************************************/ void prjFileScan (const char *filename, DFCPRJ_INFO *pInfo, GError **err) { readProject (filename, DFCPRJ_FLAG_INTERNAL, err); if (*err == NULL) { DEBUG_LOG ("Project file '%s' successfully scaned", filename); *pInfo = tmpPrj.info; } /* if */ } /* prjFileScan() */ /* FUNCTION *******************************************************************/ /** Frees malloc'ed memory space from a project info (author, title, desc). * This function is designed as a counterpart to function prjFileScan(). * * \param pInfo Pointer to project info data. * ******************************************************************************/ void prjFileFree (DFCPRJ_INFO *pInfo) { if (pInfo->author != NULL) { g_free (pInfo->author); pInfo->author = NULL; } /* if */ if (pInfo->title != NULL) { g_free (pInfo->title); pInfo->title = NULL; } /* if */ if (pInfo->desc != NULL) { g_free (pInfo->desc); pInfo->desc = NULL; } /* if */ } /* prjFileFree() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.5/data/0000755000175100001440000000000013733651721011306 500000000000000dfcgen-gtk-0.5/data/pixmaps/0000755000175100001440000000000013733651721012767 500000000000000dfcgen-gtk-0.5/data/pixmaps/attenuation.png0000664000175100001440000000065012713655446015760 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ -šÊà5IDATXÃíW[„ œïE^NÆ~ðˆ`‘Çêšllb,èЩÚeyÄ93¼ˆä+Fä §±~÷Þ«Ï[ë€0ŸâÃŒ¨§OaLªÈLcŠcÕF‚$"’ÃRë=q`²Å@\ªÙ8å@ BÓGÄçã"ì^Ø ÚÌÉåDà"ø3}€e>užì#úm1àìÔÚ<·ËŸ–>`þŠyKIxˆi \çÕ÷RðRð¿´>8?£`Vn¡`À~Óžî.®ÍÊ/ôPÄ8· άþÇ‹zð !Äòtz¡÷Åú|[ [Ût®²©ªÖlfÖqÏy¯ÝÉ[;NæÂÎUâÖ MÞxà Ž©Ø˜O¾ ZDêÑU½^Í«Ñaæk¬¦§Ûó–‹D}æW—OIEND®B`‚dfcgen-gtk-0.5/data/pixmaps/impulse.png0000664000175100001440000000064512713655446015107 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ &ý)2IDATXÃíVA’„ ìXþ+ùÙÂÏâ˲ÀqPgp·J.”IÓéÃ…cU-… ËòUç"‚©^d€Æ10UÎÓ C΂8¸`@5‹¹í'Ÿc pž­õ1w¾—…é¼’Îùp:)Â+Æ à£,Š`_èUž=Þ¹ÝBœ[©wkàß°€÷ q:Z\D8ˆ®¥!Ú¶™Û·dö±Æ„EÖ*'Æ5€…›x i%Ƈ@?Ή0/£ªpôS÷FàœG0f3CUÁÌao,×i_>;ç×0¤sàü“Ý`öÜ6Ë­•Ê»÷¢çL³'l¾ŠQX‰¡žÇJuY÷oéb`XWl"ù]ˆ0ý5W(†aÔ|£¿™—1p%€_§ê¸ 'wÅIEND®B`‚dfcgen-gtk-0.5/data/pixmaps/Makefile.in0000644000175100001440000003515713714047016014762 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = data/pixmaps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_pixmaps_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pixmapsdir)" DATA = $(dist_pixmaps_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ pixmapsdir = $(pkgpixmapsdir) dist_pixmaps_DATA = \ dfcgen-gtk.png\ attenuation.png\ charfunc.png\ grpdelay.png\ impulse.png\ phase.png\ phasedelay.png\ step.png\ amplitude.png all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign data/pixmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/pixmaps/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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-dist_pixmapsDATA: $(dist_pixmaps_DATA) @$(NORMAL_INSTALL) @list='$(dist_pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pixmapsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapsdir)" || exit $$?; \ done uninstall-dist_pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pixmapsdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(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 $(DATA) installdirs: for dir in "$(DESTDIR)$(pixmapsdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_pixmapsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_pixmapsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_pixmapsDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am 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-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_pixmapsDATA .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/data/pixmaps/dfcgen-gtk.png0000644000175100001440000000124513607424531015425 00000000000000‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs.#.#x¥?vtIMEã5È3+2IDATxÚí[íƒ ¤Æ÷ÂG—'cÔ¡R,R$&ËtÆ»^?q`­U=¯Iu¾æýƒ1¦+)h­a(`0øÇl-Z“n´Óž¨àc¯AÀ²h¥@=ÂI˜PðÔ‰éhÑupo-xVHÆ€Pâ9I$ÌT€öö½µp|ÏE‚Y qÔûTWäVÝ (ëºóniÌÂ×óR‰]£¸uƒ»Ïx²ÎRzWú$š‹±Að³,`oßw g?ðüáÓ›bïT@(ÅÕþ“Bh½<€õ¡ßH* dðÁpöÖÇDÏzXƒ€Q \¡†)¶²©€˜@üt­X @¹Ft Û qã"Md0k34êOj)=ÇÏN€pK$Lœ‡ÄuL…¯oˆPæêŸö÷u›Ânð)ÕºÒ•0S­úÅ<Àµ*6R£nÔÂínúâÍPMÛèsà€[5\âf,6à‹ïA>àO{Ž©–¥îd}J@xÓ (<õþsog% ð§÷ò*@ Å“ Ћ>§ñDàÿŸëW>ŸªÑŽTJV€Û¬NNÍ·x;îÒ ¸àST˜¤€u5Ç&ªoÛ<‡åS]ÅrÁ ž=ä$‚+ë|R ï$pĈØ ¨j‰ÕÍ|Š8ÎE¾\Å­¤¬u€«ˆ®€)"wÑsRÜÖÇŒ7DjÀ¯]¦{Àø÷xçëMý4HýµCIEND®B`‚dfcgen-gtk-0.5/data/pixmaps/phasedelay.png0000664000175100001440000000102512713655446015541 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ í#+¢IDATXÃÅW[®… œöE]™º2ëÊz?°÷ jE<&$-í€@ñC "»#@–åcÁ™9ئl®ñ£ v@€È+ S¼â.sáȹ‰ÎFæ:/ûT @àV_U>;?°n—m£µ2×U/NÏjÄ,k|} ¦iÚ€ jB ‰’fÞ•ÍÒoš&À0 ¢WŠÈ¡"š#0ÒR`\©³aËâ m‘Ý\öm å Àâ°sUÀ¥šæ ì(3ÊPüÆ",ÙÛu‰€Œ¦unÙ¿³ßÒ†ùV1ÇS`9póaŽç5Pke]Ô>¤úŒÓl´ÎφIw¸“¡—MMö" "ófÝSÈ ~–M˶5¡ÈÝ>AK W}êÉs‹8¹ 03æPMcž}Ùͳ‰ßuepæõCzö@X6±âl°oŽXSQªšFþls1bùÜsÉãjϽì®ÞwÂWP^]®Ù®Í(¯Ô÷~'<=»²åú>ÑOt<6\L\¾mÌ úõïùPü.+lYdIEND®B`‚dfcgen-gtk-0.5/data/pixmaps/step.png0000664000175100001440000000061212713655446014376 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ 6_îJËIDATXÃí—QŽƒ0 DŸ«½—}³š›9'ó~PÕe¥!´ÒZBƒ‚Ážd‚É…ñ—¼ÜÌ*ÍUO#qÛf©¤Í*äZ Ì÷3#"š¢™mW ‹Ïìñ. ¬öj I>¢ßï‹ãÁM ¬…š!™D)‡§áíøVw×Zø"|%" &Š¥¥`¦Ôó•9DàùÁ‰ $:Îq•ª”:>]Æã-úåSLZÜäåW·ˆgzF·kË Õ8QšP·½8²Áù:¿÷Hu 2\ÿ‰)˜rWÎÇ’ÿå…¸©›p¦ò*âó‹+ ZË Uðjrã%#ö¨W8@Ðn8{Áâ6ÕOýQO»N…ö"b]{ÚÃÑìßCD"/ç?Dá 8¨pIEND®B`‚dfcgen-gtk-0.5/data/pixmaps/amplitude.png0000664000175100001440000000071312713655446015411 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ (އXIDATXÃÝWY²Ã “3½—}t8ýHL]BÌòÈËLùÉ –%› áÁñÚ/ H@ˆ1áÓ;!ˆˆ»0ßcùYï?1”£Ãpq¼Õ«Ì"°\çoû¢&K²™F€a>m1PRÛד7Y— ”à,zÅ‚ ³p¡û - r*ºTH€LH ‰‘`p%Xœ’àå¡ýTr„Ý@³…¸yÁí„ZA®`A;¢« ®‚sg«ý¹ ,•, I0BÛˆ±è) Fiëeá6 F@ü®=,Ü.Aˆß—Àc¡gw]"¢µÍÿ«µ{jöJj±Ár.¼ÝËR YC2+5(j×’«¯®x…žYæ=ø‘¶­‘e]PšÕ¯‚4n»±´ ÜqP OykسƕÕ_¸k@³-³Vy–J0zdCq }l¼èh]p©‘IEND®B`‚dfcgen-gtk-0.5/data/pixmaps/charfunc.png0000664000175100001440000000061112713655446015213 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ .(î™IDATXÃÅWíà <—¾ìÉÕ'c?êZ×U­âIcR4x€‚…²€sn‰qfÞŒ6r'_§_3<µ9¿X¦x¿cîuUˆ ÄÔ5MRÒ 6 ÖvÐúîh¤æ€Æû!hÉ‚œˆsN$³ $»æÎ‡^#$Dº©•ðNL@£ºï|±ÄŒÙ{3ç9p5ž34¼h@4ÕïK×Ô½ÔFáQ @b™ƒ§ÞùýÉßs½ê)zˆtåÀ°^àC*ú#%åöj_j5´u¿k/(‘íªOÌÞ—8°õnÃÄôkÄë ## pixmapsdir = $(pkgpixmapsdir) dist_pixmaps_DATA = \ dfcgen-gtk.png\ attenuation.png\ charfunc.png\ grpdelay.png\ impulse.png\ phase.png\ phasedelay.png\ step.png\ amplitude.png dfcgen-gtk-0.5/data/pixmaps/grpdelay.png0000664000175100001440000000072312713655446015235 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ Û¹h°`IDATXÃÅWíƒ ¼Þ‹Û“¯>û¡¨ƒ²Blb4Äp½rý@&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@ subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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_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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ SUBDIRS = filters templates pixmaps all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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: $(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic 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-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/data/templates/0000755000175100001440000000000013733651721013304 500000000000000dfcgen-gtk-0.5/data/templates/Makefile.in0000644000175100001440000003507713714047016015300 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = data/templates ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_templates_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(templatesdir)" DATA = $(dist_templates_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ templatesdir = $(pkgtemplatesdir) dist_templates_DATA = \ export.txt\ export.c\ export.m all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign data/templates/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/templates/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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-dist_templatesDATA: $(dist_templates_DATA) @$(NORMAL_INSTALL) @list='$(dist_templates_DATA)'; test -n "$(templatesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(templatesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(templatesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(templatesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(templatesdir)" || exit $$?; \ done uninstall-dist_templatesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_templates_DATA)'; test -n "$(templatesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(templatesdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(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 $(DATA) installdirs: for dir in "$(DESTDIR)$(templatesdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_templatesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_templatesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_templatesDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am 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-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_templatesDATA .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/data/templates/export.c0000664000175100001440000000106313617623223014710 00000000000000/********************************* -*- C -*- ********************************* * Copyright (C) 2006-2020 Ralf Hoppe * * DFCGen (GTK+) exported coefficients * *****************************************************************************/ #ifndef DFCGEN #define DFCGEN dfcoeff_t numerator[$PRJ:FILTER:NUM:DEGREE$ + 1] = { $PRJ:FILTER:NUM:COEFF$, /* z^{$PRJ:FILTER:NUM:EXPONENT$} */ }; dfcoeff_t denominator[$PRJ:FILTER:DEN:DEGREE$ + 1] = { $PRJ:FILTER:DEN:COEFF$, /* z^{$PRJ:FILTER:DEN:EXPONENT$} */ }; #endif /* DFCGEN */ dfcgen-gtk-0.5/data/templates/export.txt0000664000175100001440000000030312713655446015311 00000000000000Numerator (z^-0 - z^-$PRJ:FILTER:NUM:DEGREE$) -------------------------- $PRJ:FILTER:NUM:COEFF$ Denominator (z^-0 - z^-$PRJ:FILTER:DEN:DEGREE$) -------------------------- $PRJ:FILTER:DEN:COEFF$ dfcgen-gtk-0.5/data/templates/Makefile.am0000664000175100001440000000031413575504571015264 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2012, 2013, 2019 Ralf Hoppe ## templatesdir = $(pkgtemplatesdir) dist_templates_DATA = \ export.txt\ export.c\ export.m dfcgen-gtk-0.5/data/templates/export.m0000664000175100001440000000045313617623223014724 00000000000000function [num,den] = export % EXPORT Exports generated digital filter coefficients from DFCGen (GTK+) % % Copyright (C) 2006-2020 Ralf Hoppe % num = [ $PRJ:FILTER:NUM:COEFF$ ]; den = [ $PRJ:FILTER:DEN:COEFF$ ]; dfcgen-gtk-0.5/data/Makefile.am0000664000175100001440000000023013575504571013263 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006, 2011-2013, 2019 Ralf Hoppe ## SUBDIRS = filters templates pixmaps dfcgen-gtk-0.5/data/filters/0000755000175100001440000000000013733651721012756 500000000000000dfcgen-gtk-0.5/data/filters/fitting5_poly2.dfc0000664000175100001440000000214212713655446016240 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 5, 2 (FIR) Glättungsfilter 5, 2 (FIR) Fitting of 5 samples by a polynomial of 2<sup>nd</sup> (or 3<sup>rd</sup>) order using the <i>Gauss</i>ian least square criteria. Glättung von 5 Abtastwerten durch ein Ausgleichspolynom 2. (oder 3.) Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 4 -0.08571428571 0.3428571429 0.4857142857 0.3428571429 -0.08571428571 0 1.0 dfcgen-gtk-0.5/data/filters/integrator_38rule.dfc0000664000175100001440000000160512713655446016745 00000000000000 Ralf Hoppe Ralf Hoppe â…œ rule integrator (IIR) â…œ-Regel Integrator (IIR) â…œ rule integrator. â…œ-Regel Integrator. 44100 3 0.375 1.125 1.125 0.375 3 1.0 0 0 -1.0 dfcgen-gtk-0.5/data/filters/fitting9_poly4.dfc0000664000175100001440000000241012713655446016244 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 9, 4 (FIR) Glättungsfilter 9, 4 (FIR) Fitting of 9 samples by a polynomial of 4<sup>th</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 9 Abtastwerten durch ein Ausgleichspolynom 4. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 8 0.03496503497 -0.12820511282 0.06993006993 0.3146853147 0.4172494172 0.3146853147 0.06993006993 -0.12820511282 0.03496503497 0 1.0 dfcgen-gtk-0.5/data/filters/fitting7_poly4.dfc0000664000175100001440000000223612713655446016250 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 7, 4 (FIR) Glättungsfilter 7, 4 (FIR) Fitting of 7 samples by a polynomial of 4<sup>th</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 7 Abtastwerten durch ein Ausgleichspolynom 4. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 6 0.02164502165 -0.1298701299 0.3246753247 0.5670995671 0.3246753247 -0.1298701299 0.02164502165 0 1.0 dfcgen-gtk-0.5/data/filters/fitting7_poly2.dfc0000664000175100001440000000223712713655446016247 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 7, 2 (FIR) Glättungsfilter 7, 2 (FIR) Fitting of 7 samples by a polynomial of 2<sup>nd</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 7 Abtastwerten durch ein Ausgleichspolynom 2. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 6 -0.09523809524 0.1428571429 0.2857142857 0.33333333333 0.2857142857 0.1428571429 -0.09523809524 0 1.0 dfcgen-gtk-0.5/data/filters/Makefile.in0000644000175100001440000003541013714047016014741 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = data/filters ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_filters_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(filtersdir)" DATA = $(dist_filters_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ filtersdir = $(pkgfiltersdir) dist_filters_DATA = \ differentiator1.dfc\ differentiator2.dfc\ integrator_38rule.dfc\ integrator_rect.dfc\ integrator_simpson.dfc\ integrator_trapez.dfc\ fitting15_poly2.dfc\ fitting21_poly2.dfc\ fitting5_poly2.dfc\ fitting7_poly2.dfc\ fitting7_poly4.dfc\ fitting9_poly2.dfc\ fitting9_poly4.dfc all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign data/filters/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/filters/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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-dist_filtersDATA: $(dist_filters_DATA) @$(NORMAL_INSTALL) @list='$(dist_filters_DATA)'; test -n "$(filtersdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filtersdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filtersdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filtersdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filtersdir)" || exit $$?; \ done uninstall-dist_filtersDATA: @$(NORMAL_UNINSTALL) @list='$(dist_filters_DATA)'; test -n "$(filtersdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filtersdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(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 $(DATA) installdirs: for dir in "$(DESTDIR)$(filtersdir)"; 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_filtersDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_filtersDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_filtersDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am 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-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_filtersDATA .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/data/filters/integrator_simpson.dfc0000664000175100001440000000221512713655446017311 00000000000000 Ralf Hoppe Ralf Hoppe Simpson rule integrator (IIR) Simpson-Regel Integrator (IIR) <i>Simpson</i> rule integrator. The transfer function is: H(z)=â…“(1+4z<sup>-1</sup>+z<sup>-2</sup>)/(1-z<sup>-2</sup>). <i>Simpson</i>-Regel Integrator. Die Übertragungsfunktion lautet: H(z)=â…“(1+4z<sup>-1</sup>+z<sup>-2</sup>)/(1-z<sup>-2</sup>). 44100 2 0.333333333333333 1.333333333333333 0.333333333333333 2 1.0 0 -1.0 dfcgen-gtk-0.5/data/filters/integrator_rect.dfc0000664000175100001440000000151712713655446016562 00000000000000 Ralf Hoppe Ralf Hoppe Rectangle rule integrator (IIR) Rechteck-Regel Integrator (IIR) Rectangle rule integrator. The transfer function is: H(z)=1/(1-z<sup>-1</sup>). Rechteck-Regel Integrator. Die Übertragungsfunktion lautet: H(z)=1/(1-z<sup>-1</sup>). 44100 0 1.0 1 1.0 -1.0 dfcgen-gtk-0.5/data/filters/differentiator1.dfc0000664000175100001440000000163612713655446016457 00000000000000 Ralf Hoppe Ralf Hoppe 1st order differentiator (FIR) Differenzierer 1. Ordnung (FIR) Differentiator of first order designed by backward differences. The transfer function is: H(z)=½(1-z<sup>-1</sup>). Differenzierer erster Ordnung gebildet durch Rückwärts-Differenzen. Die Übertragungsfunktion lautet: H(z)=½(1-z<sup>-1</sup>). 44100 1 0.5 -0.5 0 1.0 dfcgen-gtk-0.5/data/filters/fitting15_poly2.dfc0000664000175100001440000000300112713655446016314 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 15, 2 (FIR) Glättungsfilter 15, 2 (FIR) Fitting of 15 samples by a polynomial of 2<sup>nd</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 15 Abtastwerten durch ein Ausgleichspolynom 2. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 14 -0.009375 -0.01875 -0.015625 0.009375 0.065625 0.14375 0.209375 0.23125 0.209375 0.14375 0.065625 0.009375 -0.015625 -0.01875 -0.009375 0 1.0 dfcgen-gtk-0.5/data/filters/differentiator2.dfc0000664000175100001440000000200712713655446016451 00000000000000 Ralf Hoppe Ralf Hoppe 2nd order differentiator (FIR) Differenzierer 2. Ordnung (FIR) Differentiator of second order based on three point interpolation. The transfer function is: H(z)=â…›(3-4z<sup>-1</sup>+8z<sup>-2</sup>). Differenzierer zweiter Ordnung (Interpolation durch drei Punkte). Die Übertragungsfunktion lautet: H(z)=â…›(3-4z<sup>-1</sup>+8z<sup>-2</sup>). 44100 2 0.375 -0.5 0.125 0 1.0 dfcgen-gtk-0.5/data/filters/integrator_trapez.dfc0000664000175100001440000000172012713655446017126 00000000000000 Ralf Hoppe Ralf Hoppe Trapezoid rule integrator (IIR) Trapez-Regel Integrator (IIR) <small>Trapezoidal rule integrator. The transfer function is: H(z)=½(1+z<sup>-1</sup>)/(1-z<sup>-1</sup>).</small> Trapez-Regel Integrator. Die Übertragungsfunktion lautet: H(z)=½(1+z<sup>-1</sup>)/(1-z<sup>-1</sup>). 44100 1 0.5 0.5 1 1.0 -1.0 dfcgen-gtk-0.5/data/filters/fitting21_poly2.dfc0000664000175100001440000000362612713655446016326 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 21, 2 (FIR) Glättungsfilter 21, 2 (FIR) Fitting of 21 samples by a polynomial of 2<sup>nd</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 21 Abtastwerten durch ein Ausgleichspolynom 2. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 20 -2.857142857E-3 -8.571428571E-3 -0.01428571429 -0.01428571429 -5.714285714E-3 0.01714285714 0.05142857143 0.09428571429 0.13428571143 0.1628571429 0.1714285714 0.1628571429 0.13428571143 0.09428571429 0.05142857143 0.01714285714 -5.714285714E-3 -0.01428571429 -0.01428571429 -8.571428571E-3 -2.857142857E-3 0 1.0 dfcgen-gtk-0.5/data/filters/Makefile.am0000664000175100001440000000070713575504666014751 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006, 2011-2013, 2019 Ralf Hoppe ## filtersdir = $(pkgfiltersdir) dist_filters_DATA = \ differentiator1.dfc\ differentiator2.dfc\ integrator_38rule.dfc\ integrator_rect.dfc\ integrator_simpson.dfc\ integrator_trapez.dfc\ fitting15_poly2.dfc\ fitting21_poly2.dfc\ fitting5_poly2.dfc\ fitting7_poly2.dfc\ fitting7_poly4.dfc\ fitting9_poly2.dfc\ fitting9_poly4.dfc dfcgen-gtk-0.5/data/filters/fitting9_poly2.dfc0000664000175100001440000000240612713655446016247 00000000000000 Ralf Hoppe Ralf Hoppe Fitting filter 9, 2 (FIR) Glättungsfilter 9, 2 (FIR) Fitting of 9 samples by a polynomial of 2<sup>nd</sup> order using the <i>Gauss</i>ian least square criteria. Glättung von 9 Abtastwerten durch ein Ausgleichspolynom 2. Ordnung bei Minimierung des <i>Gauß</i>schen Fehlers. 44100 8 -0.09090909091 0.06060606061 0.1688311688 0.2337662338 0.2554112554 0.2337662338 0.1688311688 0.06060606061 -0.09090909091 0 1.0 dfcgen-gtk-0.5/COPYING0000664000175100001440000005065713607672773011401 00000000000000 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This package 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 package (see below); if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA DFCGen (GTK+) is: Copyright (C) 2006-2020 Ralf Hoppe GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (c) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software---to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The ``Program'', below, refers to any such program or work, and a ``work based on the Program'' means either the Pro- gram or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Here- inafter, translation is included without limitation in the term ``modification''.) Each licensee is addressed as ``you''. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copy- right notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a. You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b. You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c. If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose per- missions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of deriva- tive or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the fol- lowing: a. Accompany it with the complete corresponding machine-readable source code, which must be dis- tributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b. Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine- readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c. Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installa- tion of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major compo- nents (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distri- bution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automati- cally receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exer- cise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribu- tion is permitted only in or among countries not thus excluded. In such case, this License incorpo- rates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may dif- fer in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and ``any later version'', you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution condi- tions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORREC- TION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the ``copyright'' line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands show w and show c should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than show w and show c; they could even be mouse-clicks or menu items---whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a ``copy- right disclaimer'' for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. dfcgen-gtk-0.5/m4/0000755000175100001440000000000013733651721010715 500000000000000dfcgen-gtk-0.5/m4/lib-ld.m40000644000175100001440000000714313622324236012242 00000000000000# lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) dfcgen-gtk-0.5/m4/pkg.m40000644000175100001440000002401113622324236011651 00000000000000dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29.1) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dfcgen-gtk-0.5/m4/iconv.m40000644000175100001440000002206413622324236012214 00000000000000# iconv.m4 serial 19 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) dfcgen-gtk-0.5/m4/gettext.m40000644000175100001440000003575713622324236012577 00000000000000# gettext.m4 serial 67 (gettext-0.19.6) dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) dfcgen-gtk-0.5/m4/nls.m40000644000175100001440000000230113622324236011662 00000000000000# nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) dfcgen-gtk-0.5/m4/progtest.m40000644000175100001440000000602413622324236012743 00000000000000# progtest.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) dfcgen-gtk-0.5/m4/po.m40000644000175100001440000004502313622324236011514 00000000000000# po.m4 serial 24 (gettext-0.19) dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) dfcgen-gtk-0.5/m4/lib-prefix.m40000644000175100001440000002042213622324236013133 00000000000000# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) dfcgen-gtk-0.5/Makefile.in0000644000175100001440000007725613733647722012411 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # 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 CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/build/compile $(top_srcdir)/build/config.guess \ $(top_srcdir)/build/config.rpath \ $(top_srcdir)/build/config.sub $(top_srcdir)/build/install-sh \ $(top_srcdir)/build/missing ABOUT-NLS COPYING ChangeLog \ INSTALL README TODO build/compile build/config.guess \ build/config.rpath build/config.sub build/depcomp \ build/install-sh build/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = po include src data doc dist doc_DATA = \ README\ COPYING\ ChangeLog\ INSTALL EXTRA_DIST = $(doc_DATA) # Maintainer rule for building the Debian package. # NOTE: Generates the changelog starting with release 0.4-1. dist_debian_dir = "dist/$(distdir)" # maintainer rule for "package" build on MinGW @BUILD_OS_MINGW32_TRUE@GTK_VERSION = $(shell $(PKG_CONFIG) --modversion "gtk+-2.0" | \ @BUILD_OS_MINGW32_TRUE@ sed -n 's/^\([0-9]\+\)\.\([0-9]\+\)\(\.[0-9]*\)\?/\1\2/p') @BUILD_OS_MINGW32_TRUE@dist_win32_dir = ./dist/$(PACKAGE)$(GTK_VERSION)-$(VERSION) # all GTK/GDK DLLs needed by dfcgen-gtk (heuristically determined) @BUILD_OS_MINGW32_TRUE@GTK_DLL_COMMON = libgio-2.0-0.dll libatk-1.0-0.dll libcairo-2.dll libgdk_pixbuf-2.0-0.dll \ @BUILD_OS_MINGW32_TRUE@ libgdk-win32-2.0-0.dll libglib-2.0-0.dll libgmodule-2.0-0.dll \ @BUILD_OS_MINGW32_TRUE@ libgobject-2.0-0.dll libgsl-0.dll libgslcblas-0.dll \ @BUILD_OS_MINGW32_TRUE@ libgtk-win32-2.0-0.dll libiconv-2.dll libintl-8.dll \ @BUILD_OS_MINGW32_TRUE@ libpango-1.0-0.dll libpangocairo-1.0-0.dll libpangowin32-1.0-0.dll \ @BUILD_OS_MINGW32_TRUE@ libpng*.dll libgthread-2.0-0.dll libpangoft2-1.0-0.dll zlib1.dll @BUILD_OS_MINGW32_TRUE@GTK212_DLL_ADDONS = intl.dll libssp-0.dll @BUILD_OS_MINGW32_TRUE@GTK220_DLL_ADDONS = freetype6.dll libexpat-1.dll libfontconfig-1.dll @BUILD_OS_MINGW32_TRUE@GTK_DLL_LIST = $(GTK_DLL_COMMON) $(GTK212_DLL_ADDONS) $(GTK220_DLL_ADDONS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive 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 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA uninstall-local .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-docDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-docDATA uninstall-local .PRECIOUS: Makefile # Remove doc directory on uninstall uninstall-local: -rm -r $(docdir) # make dox dox: cd doc && $(MAKE) $(AM_MAKEFLAGS) dox .PHONY: dox dist-debian: dist git log --pretty --numstat --summary --no-merges --since=29/10/2016 | git2cl > ChangeLog.$(shell date '+%g%m%d') cp -f -t dist $(distdir).tar.gz cd dist && gunzip -c $(distdir).tar.gz | tar xf - cp -Rf dist/debian $(dist_debian_dir) cd $(dist_debian_dir) && dpkg-buildpackage -rfakeroot @echo '--------------------------------------------------------------------' @dpkg-parsechangelog -l./dist/debian/changelog @echo '--------------------------------------------------------------------' -rm -Rf $(dist_debian_dir) @BUILD_OS_MINGW32_TRUE@dist-win32: all @BUILD_OS_MINGW32_TRUE@ @echo "Building Win32 distribution in $(dist_win32_dir) ..." @BUILD_OS_MINGW32_TRUE@ rm -fR $(dist_win32_dir) @BUILD_OS_MINGW32_TRUE@ mkdir $(dist_win32_dir) @BUILD_OS_MINGW32_TRUE@ cp ./src/$(PACKAGE)$(EXEEXT) $(dist_win32_dir) @BUILD_OS_MINGW32_TRUE@ mkdir $(dist_win32_dir)/share @BUILD_OS_MINGW32_TRUE@ cp -R ./data/pixmaps $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/pixmaps/Makefile* $(dist_win32_dir)/share/pixmaps/.svn @BUILD_OS_MINGW32_TRUE@ cp -R ./data/filters $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/filters/Makefile* $(dist_win32_dir)/share/filters/.svn @BUILD_OS_MINGW32_TRUE@ cp -R ./data/templates $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/templates/Makefile* $(dist_win32_dir)/share/templates/.svn @BUILD_OS_MINGW32_TRUE@ mkdir $(dist_win32_dir)/share/locale @BUILD_OS_MINGW32_TRUE@ cp -R /mingw/share/locale/de $(dist_win32_dir)/share/locale @BUILD_OS_MINGW32_TRUE@ cp -R ./$(POSUB)/de.gmo $(dist_win32_dir)/share/locale/de/LC_MESSAGES/dfcgen-gtk.mo @BUILD_OS_MINGW32_TRUE@ cp -R /mingw/etc $(dist_win32_dir) @BUILD_OS_MINGW32_TRUE@ mkdir $(dist_win32_dir)/lib @BUILD_OS_MINGW32_TRUE@ cp -R /mingw/lib/gtk-2.0 $(dist_win32_dir)/lib && rm -fR $(dist_win32_dir)/lib/gtk-2.0/include @BUILD_OS_MINGW32_TRUE@ for f in $(GTK_DLL_LIST); do \ @BUILD_OS_MINGW32_TRUE@ echo -e "\tPackaging $(dist_win32_dir)/$$f"; \ @BUILD_OS_MINGW32_TRUE@ cp -t $(dist_win32_dir) /mingw/bin/$$f 2>/dev/null; \ @BUILD_OS_MINGW32_TRUE@ true; \ @BUILD_OS_MINGW32_TRUE@ done @BUILD_OS_MINGW32_TRUE@ @echo @BUILD_OS_MINGW32_TRUE@ @echo '--------------------------------------------------------------------' @BUILD_OS_MINGW32_TRUE@ @echo "Win32 package in $(dist_win32_dir) ready for upload" @BUILD_OS_MINGW32_TRUE@ @echo '--------------------------------------------------------------------' maintainer-clean-local: -rm -Rf $(dist_debiandir) .PHONY: dist-debian dist-win32 # 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: dfcgen-gtk-0.5/configure0000754000175100001440000102511313733651660012230 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Digital Filter Coefficients Generator (GTK+) 0.5. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: ralf.hoppe@dfcgen.de about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Digital Filter Coefficients Generator (GTK+)' PACKAGE_TARNAME='dfcgen-gtk' PACKAGE_VERSION='0.5' PACKAGE_STRING='Digital Filter Coefficients Generator (GTK+) 0.5' PACKAGE_BUGREPORT='ralf.hoppe@dfcgen.de' PACKAGE_URL='http://www.dfcgen.de' ac_unique_file="src/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS PKGCONF_LIBS PKGCONF_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG BUILD_OS_MINGW32_FALSE BUILD_OS_MINGW32_TRUE WINDRES POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS host_os host_vendor host_cpu host build_os build_vendor build_cpu build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED GETTEXT_PACKAGE EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC pkgtemplatesdir pkgfiltersdir pkgpixmapsdir COPYRIGHT_HOLDER PACKAGE_AUTHOR MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_debug enable_dependency_tracking enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKGCONF_CFLAGS PKGCONF_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Digital Filter Coefficients Generator (GTK+) 0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dfcgen-gtk] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Digital Filter Coefficients Generator (GTK+) 0.5:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-debug enable debugging (default=no) --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path PKGCONF_CFLAGS C compiler flags for PKGCONF, overriding pkg-config PKGCONF_LIBS linker flags for PKGCONF, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . Digital Filter Coefficients Generator (GTK+) home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Digital Filter Coefficients Generator (GTK+) configure 0.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------- ## ## Report this to ralf.hoppe@dfcgen.de ## ## ----------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Digital Filter Coefficients Generator (GTK+) $as_me 0.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in build "$srcdir"/build; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_files="$ac_config_files Makefile po/Makefile.in include/Makefile src/Makefile data/Makefile data/pixmaps/Makefile data/filters/Makefile data/templates/Makefile doc/Makefile dist/Makefile dist/debian/Makefile dist/debian/source/Makefile dist/win32/Makefile" am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dfcgen-gtk' VERSION='0.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE CFLAGS_LANG="-std=c99" CFLAGS_WARN="-Wall -Wundef -Wshadow \ -Wdeclaration-after-statement \ -Wpointer-arith -Wcast-align \ -Wmissing-prototypes -Wmissing-declarations \ -Wredundant-decls" # -g => include debug info # -pg => include code for gprof (GNU profiler) # -O0 => no optimization CFLAGS_DEBUG="-g -pg -O0 -fstack-protector-all -UNDEBUG" CFLAGS_NDEBUG="-DNDEBUG -DG_DISABLE_ASSERT" CFLAGS="$CFLAGS $CFLAGS_LANG $CFLAGS_WARN" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5 $as_echo_n "checking whether to enable debugging... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if test "x$enable_debug" = "xyes"; then $as_echo "#define DEBUG 1" >>confdefs.h CFLAGS="$CFLAGS $CFLAGS_DEBUG" else CFLAGS="$CFLAGS $CFLAGS_NDEBUG" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } else CFLAGS="$CFLAGS $CFLAGS_NDEBUG" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi PACKAGE_AUTHOR="Ralf Hoppe" COPYRIGHT_HOLDER="Copyright (C) 2006, 2011-2012 $PACKAGE_AUTHOR" cat >>confdefs.h <<_ACEOF #define PACKAGE_AUTHOR "$PACKAGE_AUTHOR" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_COPYRIGHT "$COPYRIGHT_HOLDER" _ACEOF $as_echo "#define PACKAGE_ICON \"dfcgen-gtk.png\"" >>confdefs.h pkgpixmapsdir='$(pkgdatadir)/pixmaps' pkgfiltersdir='$(pkgdatadir)/filters' pkgtemplatesdir='$(pkgdatadir)/templates' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h GETTEXT_PACKAGE=dfcgen-gtk cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.19 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" case "$host" in *-mingw32*) build_mingw=yes if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 $as_echo "$WINDRES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_WINDRES"; then ac_ct_WINDRES=$WINDRES # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_WINDRES"; then ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES if test -n "$ac_ct_WINDRES"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 $as_echo "$ac_ct_WINDRES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_WINDRES" = x; then WINDRES="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac WINDRES=$ac_ct_WINDRES fi else WINDRES="$ac_cv_prog_WINDRES" fi ;; *) build_mingw=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MinGW" >&5 $as_echo_n "checking for MinGW... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_mingw" >&5 $as_echo "$build_mingw" >&6; } if test x$build_mingw = xyes; then BUILD_OS_MINGW32_TRUE= BUILD_OS_MINGW32_FALSE='#' else BUILD_OS_MINGW32_TRUE='#' BUILD_OS_MINGW32_FALSE= fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKGCONF" >&5 $as_echo_n "checking for PKGCONF... " >&6; } if test -n "$PKGCONF_CFLAGS"; then pkg_cv_PKGCONF_CFLAGS="$PKGCONF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PKGCONF_CFLAGS=`$PKG_CONFIG --cflags "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PKGCONF_LIBS"; then pkg_cv_PKGCONF_LIBS="$PKGCONF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PKGCONF_LIBS=`$PKG_CONFIG --libs "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PKGCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10" 2>&1` else PKGCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PKGCONF_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10) were not met: $PKGCONF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PKGCONF_CFLAGS and PKGCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PKGCONF_CFLAGS and PKGCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else PKGCONF_CFLAGS=$pkg_cv_PKGCONF_CFLAGS PKGCONF_LIBS=$pkg_cv_PKGCONF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_math.h" "ac_cv_header_gsl_gsl_math_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_math_h" = xyes; then : $as_echo "#define HAVE_GSL_H 1" >>confdefs.h else as_fn_error $? "You must have installed GNU Scientific Library (GSL) header files" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac LIBS="$PKGCONF_LIBS $LIBS" for ac_func in hypot do : ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot" if test "x$ac_cv_func_hypot" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_HYPOT 1 _ACEOF fi done for ac_func in trunc do : ac_fn_c_check_func "$LINENO" "trunc" "ac_cv_func_trunc" if test "x$ac_cv_func_trunc" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TRUNC 1 _ACEOF fi done for ac_func in round do : ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round" if test "x$ac_cv_func_round" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ROUND 1 _ACEOF fi done for ac_func in exp10 do : ac_fn_c_check_func "$LINENO" "exp10" "ac_cv_func_exp10" if test "x$ac_cv_func_exp10" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EXP10 1 _ACEOF fi done for ac_func in pow10 do : ac_fn_c_check_func "$LINENO" "pow10" "ac_cv_func_pow10" if test "x$ac_cv_func_pow10" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POW10 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: all functions checked with LIBS = '$LIBS'" >&5 $as_echo "$as_me: all functions checked with LIBS = '$LIBS'" >&6;} cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_OS_MINGW32_TRUE}" && test -z "${BUILD_OS_MINGW32_FALSE}"; then as_fn_error $? "conditional \"BUILD_OS_MINGW32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Digital Filter Coefficients Generator (GTK+) $as_me 0.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . Digital Filter Coefficients Generator (GTK+) home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Digital Filter Coefficients Generator (GTK+) config.status 0.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES data/pixmaps/Makefile" ;; "data/filters/Makefile") CONFIG_FILES="$CONFIG_FILES data/filters/Makefile" ;; "data/templates/Makefile") CONFIG_FILES="$CONFIG_FILES data/templates/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "dist/Makefile") CONFIG_FILES="$CONFIG_FILES dist/Makefile" ;; "dist/debian/Makefile") CONFIG_FILES="$CONFIG_FILES dist/debian/Makefile" ;; "dist/debian/source/Makefile") CONFIG_FILES="$CONFIG_FILES dist/debian/source/Makefile" ;; "dist/win32/Makefile") CONFIG_FILES="$CONFIG_FILES dist/win32/Makefile" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi dfcgen-gtk-0.5/dist/0000755000175100001440000000000013733651721011340 500000000000000dfcgen-gtk-0.5/dist/debian/0000755000175100001440000000000013733651721012562 500000000000000dfcgen-gtk-0.5/dist/debian/control0000664000175100001440000000165313617577706014127 00000000000000# Debian Control File # Note: Build a Debian package with 'dpkg-buildpackage -rfakeroot' # # Copyright (C) 2006, 2011, 2012, 2020 Ralf Hoppe # Source: dfcgen-gtk Section: electronics Priority: optional Maintainer: Ralf Hoppe Build-Depends: debhelper (>= 9), libgsl-dev, libgtk2.0-dev (>= 2.12) Standards-Version: 3.9.4 Homepage: http://www.dfcgen.de Package: dfcgen-gtk Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Digital Filter Coefficients Generator (DFCGen) GTK+ DFCGen, the Digital Filter Coefficients Generator, assists the engineer in the design of digital filters. It supports the engineer in analysis and synthesis of linear time-invariant time-discrete (LTI) systems from the theoretical point of view. It performs generation of system transfer function coefficients in the Z-domain, based on the type and specific parameters of a chosen system. dfcgen-gtk-0.5/dist/debian/install0000644000175100001440000000015213570251664014072 00000000000000debian/dfcgen-gtk.desktop usr/share/applications debian/dfcgen-gtk.png usr/share/icons/hicolor/64x64/apps dfcgen-gtk-0.5/dist/debian/rules0000774000175100001440000000030113606637520013555 00000000000000#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ dfcgen-gtk-0.5/dist/debian/Makefile.in0000644000175100001440000004505513714047016014553 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = dist/debian ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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_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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ SUBDIRS = source EXTRA_DIST = \ dfcgen-gtk.desktop \ dfcgen-gtk.png \ changelog \ compat \ control \ copyright \ docs \ rules \ watch \ install all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign dist/debian/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dist/debian/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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: $(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic 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-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/dist/debian/watch0000644000175100001440000000012113570251664013526 00000000000000version=3 http://www.dfcgen.de/main.html dfcgen-gtk/dfcgen-gtk-(.+)@ARCHIVE_EXT@ dfcgen-gtk-0.5/dist/debian/dfcgen-gtk.desktop0000664000175100001440000000104413572716672016117 00000000000000[Desktop Entry] Version=1.0 Type=Application Name=DFCGen (GTK+) Name[en]=DFCGen (GTK+) Name[de]=DFCGen (GTK+) GenericName=Digital Filter Coefficients Generator GenericName[en]=Digital Filter Coefficients Generator GenericName[de]=Digital Filter Coefficients Generator Comment=Digital Filter Coefficients Generator Comment[en]=Digital Filter Coefficients Generator Comment[de]=Digital Filter Coefficients Generator Icon=dfcgen-gtk.png Exec=dfcgen-gtk Categories=Education;Electronics;GTK; Keywords=dsp;signal;processing;fir;iir; StartupNotify=false dfcgen-gtk-0.5/dist/debian/dfcgen-gtk.png0000644000175100001440000000124513570251664015224 00000000000000‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs.#.#x¥?vtIMEã5È3+2IDATxÚí[íƒ ¤Æ÷ÂG—'cÔ¡R,R$&ËtÆ»^?q`­U=¯Iu¾æýƒ1¦+)h­a(`0øÇl-Z“n´Óž¨àc¯AÀ²h¥@=ÂI˜PðÔ‰éhÑupo-xVHÆ€Pâ9I$ÌT€öö½µp|ÏE‚Y qÔûTWäVÝ (ëºóniÌÂ×óR‰]£¸uƒ»Ïx²ÎRzWú$š‹±Að³,`oßw g?ðüáÓ›bïT@(ÅÕþ“Bh½<€õ¡ßH* dðÁpöÖÇDÏzXƒ€Q \¡†)¶²©€˜@üt­X @¹Ft Û qã"Md0k34êOj)=ÇÏN€pK$Lœ‡ÄuL…¯oˆPæêŸö÷u›Ânð)ÕºÒ•0S­úÅ<Àµ*6R£nÔÂínúâÍPMÛèsà€[5\âf,6à‹ïA>àO{Ž©–¥îd}J@xÓ (<õþsog% ð§÷ò*@ Å“ Ћ>§ñDàÿŸëW>ŸªÑŽTJV€Û¬NNÍ·x;îÒ ¸àST˜¤€u5Ç&ªoÛ<‡åS]ÅrÁ ž=ä$‚+ë|R ï$pĈØ ¨j‰ÕÍ|Š8ÎE¾\Å­¤¬u€«ˆ®€)"wÑsRÜÖÇŒ7DjÀ¯]¦{Àø÷xçëMý4HýµCIEND®B`‚dfcgen-gtk-0.5/dist/debian/compat0000664000175100001440000000000213572724556013712 000000000000009 dfcgen-gtk-0.5/dist/debian/copyright0000664000175100001440000000227413606637305014445 00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: DFCGen (GTK+) Upstream-Contact: Ralf Hoppe Source: http://www.dfcgen.de Files: * License: GPL-2.0 Copyright: 2006-2020 Ralf Hoppe Files: debian/* License: GPL-2.0 Copyright: 2006-2020 Ralf Hoppe 2016-2019 Graham Inggs License: GPL-2.0 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This package 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 package (see below); if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. dfcgen-gtk-0.5/dist/debian/docs0000664000175100001440000000000713572717241013355 00000000000000README dfcgen-gtk-0.5/dist/debian/source/0000755000175100001440000000000013733651721014062 500000000000000dfcgen-gtk-0.5/dist/debian/source/Makefile.in0000644000175100001440000003034613714047016016050 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = dist/debian/source ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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_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 = SOURCES = DIST_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) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ EXTRA_DIST = \ format \ include-binaries all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign dist/debian/source/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dist/debian/source/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(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 installdirs: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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-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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic 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-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/dist/debian/source/include-binaries0000644000175100001440000000002613570251664017141 00000000000000debian/dfcgen-gtk.png dfcgen-gtk-0.5/dist/debian/source/format0000644000175100001440000000000413572725020015202 000000000000001.0 dfcgen-gtk-0.5/dist/debian/source/Makefile.am0000644000175100001440000000021513620056557016035 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2020 Ralf Hoppe ## EXTRA_DIST = \ format \ include-binaries dfcgen-gtk-0.5/dist/debian/changelog0000664000175100001440000000317713714052351014357 00000000000000dfcgen-gtk (0.5-1) unstable; urgency=medium * Support double click on coefficients list * Give tribute to Julius van Hann, not Hanning * Improve precision of lin. FIR frequency transformations * Fix Hann/Blackman window calculation * Fix cutoff frequency handling on read from project file * Add some semantic checks to frequency transformations * Fix (not visible) grid in response windows * Show response windows in taskbar and pager * Use of C99 array/struct initialization * Fix GDK/GTK+ warnings * Migration of associated Eclipse project to 3.8.1 (Juno) * Migration of Glade project to 3.8.6 (last release supporting GTK+2.0) * Migration from Subversion to Git * Remove Subversion keywords from source files * Get rid of autoreconf warnings * Upgrade to Automake 1.15 * Change contact and copyright statement * Sync with Debian release 0.4-3 -- Ralf Hoppe Mon, 13 Jan 2020 11:02:04 +0100 dfcgen-gtk (0.4-3) unstable; urgency=medium * Install a 64x64 icon to make AppStream happy * Update debian/copyright * Bump Standards-Version to 4.3.0, no changes -- Graham Inggs Tue, 05 Feb 2019 08:57:00 +0000 dfcgen-gtk (0.4-2) unstable; urgency=medium * Update Vcs-* URIs for move to salsa.debian.org * Increase thickness of unit circle * Switch to debhelper 11 * Update debian/copyright * Bump Standards-Version to 4.1.3, no changes -- Graham Inggs Sat, 20 Jan 2018 17:30:54 +0000 dfcgen-gtk (0.4-1) unstable; urgency=medium * Initial release. (Closes: #842491) -- Graham Inggs Sat, 29 Oct 2016 22:24:47 +0200 dfcgen-gtk-0.5/dist/debian/Makefile.am0000664000175100001440000000040213607427361014535 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006-2020 Ralf Hoppe ## SUBDIRS = source EXTRA_DIST = \ dfcgen-gtk.desktop \ dfcgen-gtk.png \ changelog \ compat \ control \ copyright \ docs \ rules \ watch \ install dfcgen-gtk-0.5/dist/Makefile.in0000644000175100001440000004462413714047016013332 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = dist ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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_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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ SUBDIRS = debian win32 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign dist/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dist/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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: $(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic 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-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/dist/win32/0000755000175100001440000000000013733651721012302 500000000000000dfcgen-gtk-0.5/dist/win32/dfcgen-gtk.rc0000644000175100001440000000250513620066731014557 00000000000000/***************************************************************************** * dfcgen-gtk windows resource file, to be compiled with RC (Microsoft) or * WINDRES (MinGW) * * Author: Copyright (C) 2011-2020 Ralf Hoppe * ******************************************************************************/ #include #include "../../config.h" VS_VERSION_INFO VERSIONINFO FILEVERSION 0, 4, 0, 0 /* 0x00040000 */ PRODUCTVERSION 0, 4, 0, 0 /* 0x00040000 */ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS VS_FF_PRERELEASE |VS_FF_DEBUG FILEOS VOS__WINDOWS32 FILETYPE VFT_APP BEGIN BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0407, 0x04E4 /* German, Windows charset */ END BLOCK "StringFileInfo" BEGIN BLOCK "040704E4" /* German, Windows charset */ BEGIN VALUE "CompanyName", "Dipl.-Ing. R. Hoppe\000" VALUE "LegalCopyright", "Copyright (C) 2006, 2011-2012 Ralf Hoppe\000" VALUE "FileDescription", "Digital Filter Coefficients Generator (DFCGen) GTK+\000" VALUE "FileVersion", "0.5\000" VALUE "InternalName", PACKAGE "\000" VALUE "OriginalFilename", PACKAGE ".exe\000" VALUE "ProductName", PACKAGE " für Windows\000" VALUE "E-Mail", "ralf.hoppe@dfcgen.de" END END END DFCGen ICON "dfcgen.ico" dfcgen-gtk-0.5/dist/win32/Makefile.in0000644000175100001440000003031013714047016014257 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ 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@ subdir = dist/win32 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.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_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 = SOURCES = DIST_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) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COPYRIGHT_HOLDER = @COPYRIGHT_HOLDER@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_AUTHOR = @PACKAGE_AUTHOR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONF_CFLAGS = @PKGCONF_CFLAGS@ PKGCONF_LIBS = @PKGCONF_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ 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@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgfiltersdir = @pkgfiltersdir@ pkgpixmapsdir = @pkgpixmapsdir@ pkgtemplatesdir = @pkgtemplatesdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ EXTRA_DIST = dfcgen-gtk.rc dfcgen.ico all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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) --foreign dist/win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dist/win32/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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(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): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(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 installdirs: 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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-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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic 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-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: dfcgen-gtk-0.5/dist/win32/dfcgen.ico0000664000175100001440000000207612713655446014160 00000000000000 è& 0( @€¿¿¿¿¿¿¿¿¿ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷wwwwwwwwwwwwww÷wwwwwwwwwÌÌÌÌÌ÷wwwwwwÌwwË»»»¼ï÷wwwww̼çwËÌË»¼ï÷wwwwÌ»¼çwËË»»¼ï÷wwwÌ»»¼çw˼»»¼ï÷w}Ü»»»¼ÝÝ˻˻¼ï÷w}wÌ»»¼çwËÌ˼¼ï÷w}wwÌ»¼çwË»»¼¼ï÷w}www̼çw˻̼¼ï÷w}www~ÌçwË»»»¼ï÷w}wwww~çwÌÌÌÌÌï÷}ÝÝwwwwww~îíîîï÷wÝ×wwwwwwww}ww÷w}wwwwwwwww}ww÷w}wwwwwwwww}ww÷w}wwwwwwwwwÝ×w÷w}wwwwwwww}ÝÝw÷w}wwwwwwwww}ww÷w}wwwwwwwww}ww÷|ÌÌwwwwwwww}ww÷Ì»¼Çwww×www}ww÷˼»ÎwwwÝwwwÝ×wýËÌËÍÝÝÝÝÝÝÝÝÝÝ÷˼»ÎwwwÝwwwÝ×w÷Ì»¼Îwww×wwwwww÷|ÌÌîwwwwwwwwww÷wîîçwwwwwwwwww÷wwwwwwwwwwwwww÷wwwwwwwwwwwwwwÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ÿÿÿÿ( @ÿÿÿÿÿÿÿ€€ý€€ …€1 €Á ‡ø…„Á •„1„ Õ„„ýŸAŽA„A„A„á„ñ„A„AŸA±€€A¤€Àáîÿÿý¤€Àá±€€Ÿ€€€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdfcgen-gtk-0.5/dist/win32/Makefile.am0000664000175100001440000000021513575504666014267 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006-2019 Ralf Hoppe ## EXTRA_DIST = dfcgen-gtk.rc dfcgen.ico dfcgen-gtk-0.5/dist/Makefile.am0000664000175100001440000000017613607114005013307 00000000000000## -*- mode: makefile-automake -*- ## ## Copyright (C) 2006-2020 Ralf Hoppe ## SUBDIRS = debian win32 dfcgen-gtk-0.5/build/0000755000175100001440000000000013733651721011474 500000000000000dfcgen-gtk-0.5/build/config.sub0000754000175100001440000010646013714047016013400 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dfcgen-gtk-0.5/build/config.rpath0000754000175100001440000004421613622324237013726 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2015 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dfcgen-gtk-0.5/build/install-sh0000754000175100001440000003546313714047016013425 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dfcgen-gtk-0.5/build/missing0000754000175100001440000001533013714047016013007 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dfcgen-gtk-0.5/build/compile0000754000175100001440000001624513714047016012774 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dfcgen-gtk-0.5/build/depcomp0000754000175100001440000005601613714047016012773 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dfcgen-gtk-0.5/ABOUT-NLS0000644000175100001440000026774113622250377011564 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this 'ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU 'gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU 'gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU 'gettext'. Other packages have their own ways to internationalization, predating GNU 'gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU 'gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU 'gettext' installed on your system and run configure without an option for your new package, 'configure' will probably detect the previously built and installed 'libintl' library and will decide to use it. If not, you may have to to use the '--with-libintl-prefix' option to tell 'configure' where to look for it. Internationalized packages usually have many 'po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at 'configure' time by using the '--disable-nls' switch, all available translations are installed together with the package. However, the environment variable 'LINGUAS' may be set, prior to configuration, to limit the installed set. 'LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the 'LANG' environment variable to the appropriate 'LL_CC' combination. If you happen to have the 'LC_ALL' or some other 'LC_xxx' environment variables set, you should unset them before setting 'LANG', otherwise the setting of 'LANG' will not have the desired effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in 'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your '.login' or '.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of 'LL_CC', with 'LL' denoting the language and 'CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command 'locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called 'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG' for the purpose of message handling, but you still need to have 'LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from 'no' to 'nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under 'nb' and some older ones under 'no', it's recommended for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and older translations are used. In the 'LANGUAGE' environment variable, but not in the 'LANG' environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to denote the language's main dialect. For example, 'de' is equivalent to 'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, 'http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has '-request' appended. For example, speakers of Swedish can send a message to 'sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to 'coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of Jun 2014. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs +---------------------------------------------------+ a2ps | [] [] [] | aegis | | anubis | | aspell | [] [] [] | bash | [] [] [] | bfd | | binutils | [] | bison | | bison-runtime | [] | buzztrax | [] | ccd2cue | | ccide | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | [] | datamash | | denemo | [] [] | dfarc | [] | dialog | [] [] [] | dico | | diffutils | [] | dink | [] | direvent | | doodle | [] | dos2unix | | dos2unix-man | | e2fsprogs | [] [] | enscript | [] | exif | [] | fetchmail | [] [] | findutils | [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | [] | gcc | | gdbm | | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gjay | | glunarclock | [] [] [] | gnubiff | [] | gnubik | [] | gnucash | () () [] | gnuchess | | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] | gramadoir | | grep | [] [] [] | grub | [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] | help2man | | help2man-texi | | hylafax | | idutils | | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | | kbd | [] | klavaro | [] [] [] [] [] | latrine | | ld | [] | leafpad | [] [] [] [] | libc | [] [] [] | libexif | () | libextractor | | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | | libiconv | [] [] | libidn | [] | liferea | [] [] [] [] | lilypond | [] [] | lordsawar | [] | lprng | | lynx | [] [] | m4 | [] | mailfromd | | mailutils | | make | [] | man-db | [] [] | man-db-manpages | | midi-instruments | [] [] [] | minicom | [] | mkisofs | [] | myserver | [] | nano | [] [] [] | opcodes | | parted | [] | pies | | popt | [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] | pushover | [] | pwdutils | | pyspread | | radius | [] | recode | [] [] [] | recutils | | rpm | | rush | | sarg | | sed | [] [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] | solfege-manual | | spotmachine | | sudo | [] [] | sudoers | [] [] | sysstat | [] | tar | [] [] [] | texinfo | [] [] | texinfo_document | [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | | trader | | util-linux | [] | ve | | vice | | vmm | | vorbis-tools | [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] | wget | [] | wyslij-po | | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ af am an ar as ast az be bg bn bn_IN bs ca crh cs 4 0 2 5 3 11 0 8 23 3 3 1 54 4 73 da de el en en_GB en_ZA eo es et eu fa fi fr +--------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] [] | aegis | [] [] [] [] | anubis | [] [] [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] | bfd | [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | [] [] [] [] | ccd2cue | [] [] [] | ccide | [] [] [] [] [] [] | cflow | [] [] [] [] [] | clisp | [] [] [] [] [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] [] [] [] [] | cryptsetup | [] [] [] [] [] | datamash | [] [] [] [] | denemo | [] | dfarc | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] [] [] | dico | [] [] [] [] | diffutils | [] [] [] [] [] [] | dink | [] [] [] [] [] [] | direvent | [] [] [] [] | doodle | [] [] [] [] | dos2unix | [] [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] () [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] [] [] [] [] [] | freedink | [] [] [] [] [] [] [] [] | fusionforge | [] [] [] | gas | [] [] [] | gawk | [] [] [] [] [] | gcal | [] [] [] [] | gcc | [] [] | gdbm | [] [] [] [] [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | () [] [] () | gnubik | [] [] [] [] [] | gnucash | [] () () () () () () | gnuchess | [] [] [] [] | gnulib | [] [] [] [] [] [] [] | gnunet | [] | gnunet-gtk | [] | gold | [] [] [] | gphoto2 | [] () [] [] | gprof | [] [] [] [] [] [] | gramadoir | [] [] [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] () [] [] [] | gtkam | [] () [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | guix | [] [] | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] [] [] | help2man | [] [] [] [] [] [] [] | help2man-texi | [] [] [] | hylafax | [] [] | idutils | [] [] [] [] [] | iso_15924 | [] () [] [] () [] () | iso_3166 | [] () [] [] [] [] () [] () | iso_3166_2 | [] () () () | iso_4217 | [] () [] [] [] () [] () | iso_639 | [] () [] [] () [] () | iso_639_3 | () () () | iso_639_5 | () () () | jwhois | [] [] [] [] [] | kbd | [] [] [] [] [] [] | klavaro | [] [] [] [] [] [] [] | latrine | [] () [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () [] [] | libextractor | [] | libgnutls | [] [] [] [] | libgphoto2 | [] () [] | libgphoto2_port | [] () [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] [] | liferea | [] () [] [] [] [] [] | lilypond | [] [] [] [] [] [] | lordsawar | [] [] | lprng | | lynx | [] [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] [] | make | [] [] [] [] [] | man-db | [] [] [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] [] | parted | [] [] [] | pies | [] | popt | [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] [] | psmisc | [] [] [] [] [] [] [] | pspp | [] [] [] | pushover | () [] [] [] | pwdutils | [] [] [] | pyspread | [] [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | recutils | [] [] [] [] | rpm | [] [] [] [] [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] [] [] | skribilo | [] [] | solfege | [] [] [] [] [] [] [] [] | solfege-manual | [] [] [] [] [] | spotmachine | [] [] [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] [] [] | sysstat | [] [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] [] | texinfo_document | [] [] [] [] | tigervnc | [] [] [] [] [] [] | tin | [] [] [] [] | tin-man | [] | tracgoogleappsa... | [] [] [] [] [] | trader | [] [] [] [] [] [] | util-linux | [] [] [] [] | ve | [] [] [] [] [] | vice | () () () | vmm | [] [] | vorbis-tools | [] [] [] [] | wastesedge | [] () | wcd | [] [] [] [] | wcd-man | [] | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] [] | +--------------------------------------------------+ da de el en en_GB en_ZA eo es et eu fa fi fr 120 130 32 1 6 0 94 95 22 13 4 103 136 ga gd gl gu he hi hr hu hy ia id is it ja ka kk +-------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] [] | binutils | [] [] [] | bison | [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | | ccd2cue | [] | ccide | [] [] | cflow | [] [] [] | clisp | | coreutils | [] [] [] | cpio | [] [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] | cryptsetup | [] | datamash | | denemo | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] | dink | [] | direvent | [] | doodle | [] [] | dos2unix | [] [] | dos2unix-man | | e2fsprogs | [] | enscript | [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] | freedink | [] [] [] [] | fusionforge | | gas | [] | gawk | [] () [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] | gettext-tools | [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] [] () | gnubik | [] [] [] | gnucash | () () () () () [] | gnuchess | | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] [] | hello | [] [] [] [] [] | help2man | [] [] [] | help2man-texi | | hylafax | [] | idutils | [] [] | iso_15924 | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | [] [] [] [] | kbd | [] [] [] | klavaro | [] [] [] [] [] | latrine | [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | | make | [] [] [] [] | man-db | [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] | mkisofs | [] [] | myserver | [] | nano | [] [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] [] [] [] | pspp | [] [] | pushover | [] | pwdutils | [] | pyspread | | radius | [] | recode | [] [] [] [] [] [] [] | recutils | | rpm | [] | rush | [] | sarg | | sed | [] [] [] [] [] [] [] | sharutils | | shishi | | skribilo | [] | solfege | [] [] | solfege-manual | | spotmachine | | sudo | [] [] [] [] | sudoers | [] [] [] | sysstat | [] [] [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] | tigervnc | | tin | | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] [] | util-linux | [] | ve | [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | () | wcd | | wcd-man | | wdiff | [] [] [] | wget | [] [] [] | wyslij-po | [] [] [] | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +-------------------------------------------------+ ga gd gl gu he hi hr hu hy ia id is it ja ka kk 35 2 47 4 8 2 53 69 2 6 80 11 86 58 0 3 kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl +--------------------------------------------------+ a2ps | [] [] | aegis | [] | anubis | [] [] [] | aspell | [] [] | bash | [] [] | bfd | | binutils | | bison | [] | bison-runtime | [] [] [] [] [] [] | buzztrax | | ccd2cue | | ccide | [] [] | cflow | [] | clisp | [] | coreutils | [] [] | cpio | [] | cppi | | cpplib | [] | cryptsetup | [] | datamash | [] [] | denemo | | dfarc | [] [] | dialog | [] [] [] [] [] [] | dico | | diffutils | [] [] [] | dink | [] | direvent | [] | doodle | [] | dos2unix | [] [] | dos2unix-man | [] | e2fsprogs | [] | enscript | [] | exif | [] [] | fetchmail | [] | findutils | [] [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] | gjay | | glunarclock | [] [] | gnubiff | [] | gnubik | [] [] | gnucash | () () () () () () () [] | gnuchess | [] [] | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] [] | gramadoir | [] | grep | [] [] | grub | [] [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] [] [] | help2man | [] | help2man-texi | | hylafax | [] | idutils | [] | iso_15924 | () [] [] | iso_3166 | [] [] [] () [] [] [] [] [] [] | iso_3166_2 | () [] | iso_4217 | () [] [] [] | iso_639 | [] [] () [] [] [] [] | iso_639_3 | [] () [] | iso_639_5 | () | jwhois | [] [] | kbd | [] | klavaro | [] [] | latrine | | ld | | leafpad | [] [] [] [] [] | libc | [] [] | libexif | [] | libextractor | [] | libgnutls | [] [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] [] | libidn | [] | liferea | [] [] [] | lilypond | [] | lordsawar | | lprng | | lynx | [] | m4 | [] | mailfromd | | mailutils | | make | [] [] | man-db | [] | man-db-manpages | [] | midi-instruments | [] [] [] [] [] [] [] | minicom | [] | mkisofs | [] | myserver | | nano | [] [] [] | opcodes | [] | parted | [] | pies | | popt | [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | | radius | [] | recode | [] [] | recutils | [] | rpm | [] | rush | [] | sarg | | sed | [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] [] | solfege-manual | [] | spotmachine | [] | sudo | [] [] | sudoers | [] [] | sysstat | [] [] | tar | [] [] [] | texinfo | [] | texinfo_document | [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | [] [] [] | trader | [] | util-linux | [] | ve | [] | vice | [] | vmm | [] | vorbis-tools | [] | wastesedge | [] | wcd | [] | wcd-man | [] | wdiff | [] | wget | [] [] | wyslij-po | [] | xboard | [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +--------------------------------------------------+ kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl 5 11 4 6 0 13 22 3 3 3 4 11 2 40 1 124 nn or os pa pl ps pt pt_BR ro ru rw sk sl sq sr +--------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] [] [] | bfd | [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | | ccd2cue | [] | ccide | [] [] [] | cflow | [] [] | clisp | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cppi | [] [] [] | cpplib | [] [] [] | cryptsetup | [] [] | datamash | [] [] | denemo | | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | [] | diffutils | [] [] | dink | | direvent | [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] | e2fsprogs | [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] [] [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | [] [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] | gnubik | [] [] [] [] | gnucash | () () () () [] | gnuchess | [] [] | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] | grep | [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] [] | help2man-texi | [] | hylafax | | idutils | [] [] [] | iso_15924 | [] () [] [] [] [] | iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] () [] | iso_4217 | [] [] () [] [] [] [] [] | iso_639 | [] [] [] () [] [] [] [] [] [] | iso_639_3 | [] () | iso_639_5 | () [] | jwhois | [] [] [] [] | kbd | [] [] | klavaro | [] [] [] [] [] | latrine | [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] | libexif | [] () [] | libextractor | [] | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] [] | liferea | [] [] [] [] () [] [] | lilypond | | lordsawar | | lprng | [] | lynx | [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | midi-instruments | [] [] [] [] [] [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] | nano | [] [] [] [] [] [] | opcodes | | parted | [] [] [] [] [] [] | pies | [] | popt | [] [] [] [] [] [] | procps-ng | [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | recutils | [] | rpm | [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] | shishi | [] [] | skribilo | | solfege | [] [] [] | solfege-manual | [] [] | spotmachine | [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] | tigervnc | [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] | util-linux | [] [] | ve | [] [] [] | vice | | vmm | | vorbis-tools | [] [] [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] [] [] [] | wget | [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +--------------------------------------------------+ nn or os pa pl ps pt pt_BR ro ru rw sk sl sq sr 7 3 1 6 114 1 12 83 32 80 3 38 45 7 94 sv sw ta te tg th tr uk ur vi wa wo zh_CN zh_HK +---------------------------------------------------+ a2ps | [] [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | buzztrax | [] [] [] | ccd2cue | [] [] [] | ccide | [] [] [] [] | cflow | [] [] [] [] | clisp | | coreutils | [] [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] | cpplib | [] [] [] [] [] | cryptsetup | [] [] [] | datamash | [] [] [] | denemo | | dfarc | [] | dialog | [] [] [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] | dink | | direvent | [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | freedink | [] [] | fusionforge | | gas | [] | gawk | [] [] | gcal | [] [] | gcc | [] [] | gdbm | [] [] | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] | glunarclock | [] [] [] [] | gnubiff | [] [] | gnubik | [] [] [] [] | gnucash | () () () () [] | gnuchess | [] [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | guix | [] | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] | help2man-texi | [] | hylafax | [] | idutils | [] [] [] | iso_15924 | [] () [] [] () [] | iso_3166 | [] [] () [] [] () [] [] [] | iso_3166_2 | () [] [] () [] | iso_4217 | [] () [] [] () [] [] | iso_639 | [] [] [] () [] [] () [] [] [] | iso_639_3 | [] () [] [] () | iso_639_5 | () [] () | jwhois | [] [] [] [] | kbd | [] [] [] | klavaro | [] [] [] [] [] [] | latrine | [] [] | ld | [] [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] () | libextractor | [] [] | libgnutls | [] [] [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | () [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] | mailfromd | [] [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] | man-db-manpages | [] | midi-instruments | [] [] [] [] [] [] | minicom | [] [] | mkisofs | [] [] [] | myserver | [] | nano | [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | pies | [] [] | popt | [] [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] [] | pushover | [] | pwdutils | [] [] | pyspread | [] | radius | [] [] | recode | [] [] [] [] | recutils | [] [] [] | rpm | [] [] [] [] | rush | [] [] | sarg | | sed | [] [] [] [] [] | sharutils | [] [] [] | shishi | [] [] | skribilo | [] | solfege | [] [] [] | solfege-manual | [] | spotmachine | [] [] [] | sudo | [] [] [] [] | sudoers | [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] | tigervnc | [] [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] [] | trader | [] | util-linux | [] [] [] | ve | [] [] [] [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | | wcd | [] [] [] | wcd-man | [] | wdiff | [] [] [] [] | wget | [] [] [] | wyslij-po | [] [] | xboard | [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +---------------------------------------------------+ sv sw ta te tg th tr uk ur vi wa wo zh_CN zh_HK 91 1 4 3 0 13 50 113 1 126 7 1 95 7 zh_TW +-------+ a2ps | | 30 aegis | | 9 anubis | | 19 aspell | | 28 bash | [] | 21 bfd | | 9 binutils | | 12 bison | [] | 18 bison-runtime | [] | 38 buzztrax | | 8 ccd2cue | | 8 ccide | | 17 cflow | | 15 clisp | | 10 coreutils | | 20 cpio | | 20 cppi | | 17 cpplib | [] | 19 cryptsetup | | 13 datamash | | 11 denemo | | 4 dfarc | | 16 dialog | [] | 42 dico | | 6 diffutils | | 21 dink | | 9 direvent | | 10 doodle | | 12 dos2unix | [] | 18 dos2unix-man | | 9 e2fsprogs | | 14 enscript | | 21 exif | | 26 fetchmail | | 19 findutils | | 28 flex | [] | 19 freedink | | 23 fusionforge | | 3 gas | | 5 gawk | | 12 gcal | | 7 gcc | | 4 gdbm | | 10 gettext-examples | [] | 40 gettext-runtime | [] | 34 gettext-tools | [] | 24 gjay | | 8 glunarclock | [] | 27 gnubiff | | 9 gnubik | | 19 gnucash | () | 7 gnuchess | | 10 gnulib | | 23 gnunet | | 1 gnunet-gtk | | 1 gold | | 7 gphoto2 | [] | 19 gprof | | 21 gramadoir | | 14 grep | [] | 31 grub | | 21 gsasl | [] | 19 gss | | 17 gst-plugins-bad | | 14 gst-plugins-base | | 27 gst-plugins-good | | 32 gst-plugins-ugly | | 34 gstreamer | [] | 31 gtick | | 19 gtkam | | 24 gtkspell | [] | 48 guix | | 3 guix-packages | | 0 gutenprint | | 15 hello | [] | 30 help2man | | 18 help2man-texi | | 5 hylafax | | 5 idutils | | 14 iso_15924 | [] | 23 iso_3166 | [] | 58 iso_3166_2 | | 9 iso_4217 | [] | 28 iso_639 | [] | 46 iso_639_3 | | 10 iso_639_5 | | 2 jwhois | [] | 20 kbd | | 16 klavaro | | 30 latrine | | 7 ld | [] | 15 leafpad | [] | 40 libc | [] | 24 libexif | | 9 libextractor | | 5 libgnutls | | 13 libgphoto2 | | 9 libgphoto2_port | [] | 19 libgsasl | | 18 libiconv | [] | 29 libidn | | 17 liferea | | 29 lilypond | | 11 lordsawar | | 3 lprng | | 3 lynx | | 19 m4 | [] | 22 mailfromd | | 4 mailutils | | 6 make | | 19 man-db | | 14 man-db-manpages | | 9 midi-instruments | [] | 43 minicom | [] | 17 mkisofs | | 13 myserver | | 9 nano | [] | 29 opcodes | | 12 parted | [] | 21 pies | | 4 popt | [] | 36 procps-ng | | 5 procps-ng-man | | 4 psmisc | [] | 22 pspp | | 13 pushover | | 6 pwdutils | | 8 pyspread | | 6 radius | | 9 recode | | 31 recutils | | 9 rpm | [] | 13 rush | | 10 sarg | | 4 sed | [] | 34 sharutils | | 12 shishi | | 7 skribilo | | 4 solfege | | 19 solfege-manual | | 9 spotmachine | | 10 sudo | | 24 sudoers | | 20 sysstat | | 22 tar | [] | 30 texinfo | | 17 texinfo_document | | 11 tigervnc | | 11 tin | [] | 7 tin-man | | 1 tracgoogleappsa... | [] | 22 trader | | 11 util-linux | | 12 ve | | 14 vice | | 1 vmm | | 3 vorbis-tools | | 13 wastesedge | | 2 wcd | | 8 wcd-man | | 3 wdiff | [] | 23 wget | | 19 wyslij-po | | 14 xboard | | 9 xdg-user-dirs | [] | 68 xkeyboard-config | [] | 27 +-------+ 90 teams zh_TW 166 domains 42 2748 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If Jun 2014 seems to be old, you may fetch a more recent copy of this 'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at 'http://translationproject.org/extra/matrix.html'. 1.5 Using 'gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU 'gettext' in your package. Of course you have to respect the GNU Lesser General Public License which covers the use of the GNU 'gettext' library. This means in particular that even non-free programs can use 'libintl' as a shared library, whereas only free software can use 'libintl' as a static library or use modified versions of 'libintl'. Once the sources are changed appropriately and the setup can handle the use of 'gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact 'coordinator@translationproject.org' to make the '.pot' files available to the translation teams. dfcgen-gtk-0.5/doc/0000755000175100001440000000000013733651721011142 500000000000000dfcgen-gtk-0.5/doc/dfcgen.sty0000664000175100001440000000202013707736412013047 00000000000000\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dfcgen} \RequirePackage{amsmath} %% Jacobian elliptic functions \DeclareMathOperator{\jam}{am} \DeclareMathOperator{\jdelta}{\varDelta} % delta-amplitude \DeclareMathOperator{\jsn}{sn} \DeclareMathOperator{\jcn}{cn} \DeclareMathOperator{\jdn}{dn} \DeclareMathOperator{\jcd}{cd} \DeclareMathOperator{\jdc}{dc} \DeclareMathOperator{\jsc}{sc} \DeclareMathOperator{\jnc}{nc} \DeclareMathOperator{\jds}{ds} \DeclareMathOperator{\jcs}{cs} \DeclareMathOperator{\jsd}{sd} \DeclareMathOperator{\jns}{ns} \DeclareMathOperator{\jnd}{nd} \DeclareMathOperator{\arsinh}{arsinh} \DeclareMathOperator{\arcosh}{arcosh} \DeclareMathOperator{\artanh}{artanh} \DeclareMathOperator{\chebyT}{T} % Chebyshev function of first kind \DeclareMathOperator{\si}{si} % Sinus Cardinalis \DeclareMathOperator{\Si}{Si} % Sine Integral \DeclareMathOperator{\imop}{Im} % Imaginary part of complex number (Im{} operator) \DeclareMathOperator{\reop}{Re} % real part of complex number (Re{} operator) dfcgen-gtk-0.5/doc/Doxyfile0000644000175100001440000031764013645011561012575 00000000000000# Doxyfile 1.8.11 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = dfcgen-gtk # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = "Version 0.5" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = YES # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = ../src \ ../include # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, # *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. FILE_PATTERNS = *.c \ *.h \ *.C \ *.H # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = NO # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse-libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /