dfcgen-gtk-0.4/0000755000175000017500000000000011767305162010377 500000000000000dfcgen-gtk-0.4/doc/0000755000175000017500000000000011767305165011147 500000000000000dfcgen-gtk-0.4/doc/dfcgen.sty0000644000175000017500000000173011702543377013055 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} % 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.4/doc/Doxyfile0000644000175000017500000021103611762407456012601 00000000000000# Doxyfile 1.7.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a 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. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the 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.4" # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # 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 cause performance problems for the file system. CREATE_SUBDIRS = 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. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) 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. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) 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. 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" "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. 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. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then 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. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then 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. 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 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 if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. 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 # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) 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 comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) 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 behaviour. # 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 behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. 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. 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. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # 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 = # 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. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. 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. 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, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. 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 that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # 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); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip 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. 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 (the default) # will make doxygen 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. 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. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) 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. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT 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. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penality. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_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 and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. 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. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When 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 (the default) only methods in the interface are included. 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 namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) 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. 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 (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. 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 (the default) these declarations will be included in the # documentation. 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 (the default) these blocks will be appended to the # function's detailed documentation block. 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 (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. 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. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # 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. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) 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. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. 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 default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to 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 default) # the group names will appear in their defined order. 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 default), 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. SORT_BY_SCOPE_NAME = 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. 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. 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. 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. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of 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 initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. 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. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = 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 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 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 , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. 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. The 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. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED 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. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR 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. WARN_IF_DOC_ERROR = YES # The 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 (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = 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) 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 stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be 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. 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, which is # also the default input encoding. 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. 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 pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.vhd *.vhdl FILE_PATTERNS = *.c \ *.h \ *.C \ *.H # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # 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. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. 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 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. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are 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. 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 # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # 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 also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. 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. 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. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # 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. REFERENCES_LINK_SOURCE = 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. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) 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. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # 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. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) 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 one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. 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. If left blank `html' will be used as the default path. 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). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. 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 the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet 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. # The allowed range is 0 to 359. 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. 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. 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 NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = 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. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # 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, 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. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # 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. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, 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. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_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. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, 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. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, 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. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, 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). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, 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. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. 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. 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. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace 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 # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. 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. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, 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. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, 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. 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. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [0,1..20]) # 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. ENUM_VALUES_PER_LINE = 4 # 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. GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # 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. TREEVIEW_WIDTH = 250 # When 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. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # 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. 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 before the changes have effect. 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 prerendered 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 also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # 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.org site, so you can quickly see the result without installing # MathJax, but it is strongly recommended to install a local copy of MathJax # before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # 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. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = "latex --include-directory=." # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = YES # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = dfcgen # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans.ttf # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif. # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 1000 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES dfcgen-gtk-0.4/doc/Makefile.in0000644000175000017500000002725611767302613013143 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 = doc DIST_COMMON = $(dist_html_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = 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__installdirs = "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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@ dist_html_DATA = \ dfcgen.sty\ Doxyfile 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 doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: 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_htmlDATA: $(dist_html_DATA) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ 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)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done uninstall-dist_htmlDATA: @$(NORMAL_UNINSTALL) @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(htmldir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: 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)$(htmldir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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_htmlDATA 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_htmlDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_htmlDATA 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 uninstall uninstall-am uninstall-dist_htmlDATA # 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.4/doc/Makefile.am0000644000175000017500000000032211702543377013116 00000000000000## -*- Makefile -*- ## ## Copyright (c) 2006, 2011 Ralf Hoppe ## ## Version: $Id ## ## Process this file with automake to produce Makefile.in ## dist_html_DATA =\ dfcgen.sty\ Doxyfile dfcgen-gtk-0.4/configure.ac0000644000175000017500000001564011766405033012610 00000000000000dnl -*- Autoconf -*- dnl dnl Copyright (C) 2006, 2011-2012 Ralf Hoppe dnl dnl Version: $Id: configure.ac 251 2012-06-10 11:37:09Z ralf $ dnl dnl Process this file with autoconf to produce a configure script. dnl dnl Note: This file requires tool and library versions, which are provided dnl first by Ubuntu 8.04 (Hardy). dnl dnl Autoconf requirements AC_PREREQ(2.65) dnl AC_INIT() defines: PACKAGE_NAME, PACKAGE_TARNAME, PACKAGE_VERSION, dnl PACKAGE_STRING, PACKAGE_BUGREPORT, PACKAGE_URL AC_INIT([Digital Filter Coefficients Generator (GTK+)], [0.4], [ralf.hoppe@ieee.org], [dfcgen-gtk], [http://www.dfcgen.de]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/main.c]) 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/win32/Makefile]) dnl Automake options: we are not strictly GNU compatible (foreign), dnl because the following files are missing: NEWS, AUTHORS, ABOUT-NLS AM_INIT_AUTOMAKE([-Wall foreign]) AM_MAINTAINER_MODE 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 \ -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" CFLAGS_NDEBUG="-O3 -funroll-loops -DNDEBUG -DG_DISABLE_ASSERT" dnl Set CFLAGS before calling AC_PROG_CC, else default values are set. For dnl target specific flags use AM_CFLAGS in Makefile.am. Notice that CFLAGS dnl overwrites AM_CFLAGS (caused by order of evaluation in Makefile.am), so dnl use AM_CFLAGS only to specify additional flags. CFLAGS="$CFLAGS $CFLAGS_LANG $CFLAGS_WARN" AC_MSG_CHECKING(whether to enable debugging) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable debugging (default=no)])], [ if test "x$enable_debug" = "xyes"; then AC_DEFINE([DEBUG], [1], [Defined if '--enable-debug' was passed to configure.]) CFLAGS="$CFLAGS $CFLAGS_DEBUG" else CFLAGS="$CFLAGS $CFLAGS_NDEBUG" fi AC_MSG_RESULT($enable_debug) ], [ CFLAGS="$CFLAGS $CFLAGS_NDEBUG" AC_MSG_RESULT(no) ]) dnl Additional Substitutions and Defines AC_SUBST(PACKAGE_AUTHOR, ["Ralf Hoppe"]) AC_SUBST(COPYRIGHT_HOLDER, ["Copyright (C) 2006, 2011-2012 $PACKAGE_AUTHOR"]) AC_DEFINE_UNQUOTED(PACKAGE_AUTHOR, ["$PACKAGE_AUTHOR"], [package author]) AC_DEFINE_UNQUOTED(PACKAGE_COPYRIGHT, ["$COPYRIGHT_HOLDER"], [copyright holder]) AC_DEFINE(PACKAGE_ICON, ["dfcgen.png"], [package icon]) dnl some installation directories pkgpixmapsdir='$(pkgdatadir)/pixmaps' pkgfiltersdir='$(pkgdatadir)/filters' pkgtemplatesdir='$(pkgdatadir)/templates' AC_SUBST(pkgpixmapsdir) AC_SUBST(pkgfiltersdir) AC_SUBST(pkgtemplatesdir) dnl Checks for programs (gcc) AC_PROG_CC dnl Define _GNU_SOURCE to enable header file extensions on GNU systems (macro dnl AC_GNU_SOURCE is obsolete). Notice the ordering: after ‘AC_PROG_CC’ but dnl before ‘AM_GNU_GETTEXT’, most likely very close to the ‘AC_PROG_CC’ dnl invocation. dnl dnl This macro is available since Autoconf 2.60 (Ubuntu 8.04 distributes dnl Autoconf 2.61) AC_USE_SYSTEM_EXTENSIONS dnl GNU gettext dnl dnl Create a GETTEXT_PACKAGE make variable and define (config.h) with the same dnl name as the package (see AC_INIT for package name declaration). The define dnl is used in main.c for gettext domain binding. GETTEXT_PACKAGE=AC_PACKAGE_TARNAME AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) dnl Instead of AM_GNU_GETTEXT also AM_GLIB_GNU_GETTEXT might be used, because dnl (from the man page of glib-gettextize): "glib-gettextize differs from dnl gettextize in that it doesn't create an intl/ subdirectory and doesn't dnl modify po/ChangeLog". Note, that AM_GNU_GETTEXT([external]) has the same dnl effect - it disables any intl/ subdirectory handling. This seems dnl appropriate because libintl should be available on all GNU Linux systems. dnl For details see the explanations on AM_GNU_GETTEXT() in the gettext manual. AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.17) dnl (After AC_PROG_CC) check for MinGW platform in host := cpu-company-os. dnl If this is MinGW (host is typically 'i686-pc-mingw32'), then in addition dnl test for availablity of the GNU resource compiler 'windres'. case "$host" in *-mingw32*) build_mingw=yes AC_CHECK_TOOL(WINDRES, windres) ;; *) build_mingw=no ;; esac AC_MSG_CHECKING([for MinGW]) AC_MSG_RESULT([$build_mingw]) AM_CONDITIONAL(BUILD_OS_MINGW32, test x$build_mingw = xyes) dnl Check for libraries required by GSL, finally going into LIBS and LDFLAGS: dnl http://www.gnu.org/software/gsl/manual/html_node/Autoconf-Macros.html dnl dnl Note: Commented out because all work done by PKG_CHECK_MODULES() dnl dnl AC_CHECK_LIB([m],[main]) dnl AC_CHECK_LIB([gslcblas],[main]) dnl AC_CHECK_LIB([gsl],[main]) dnl pkg-config library checks (automated -I, -l/L switches generation and dnl PKGCONF_CFLAGS, PKGCONF_LIBS variable creation) dnl dnl Note: The version numbers used here should match the numbers declared in dnl Debian control file "./dist/debian/control". PKG_CHECK_MODULES(PKGCONF, [gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10]) dnl Checks for header files AC_HEADER_STDC AC_CHECK_HEADER([gsl/gsl_math.h], [AC_DEFINE(HAVE_GSL_H, 1, [Define to 1 if you have GNU Scientific Library (GSL) header files])], [AC_MSG_ERROR([You must have installed GNU Scientific Library (GSL) header files])]) dnl Checks for typedefs and structures dnl Checks for compiler characteristics. AC_C_CONST AC_C_RESTRICT AC_C_INLINE dnl Checks for library functions dnl AC_CHECK_FUNCS() uses shell variables LIBS and LDFLAGS for the link in dnl sub-function AC_LINK_IFELSE(). Both variables normally are provided by dnl AC_CHECK_LIB() and friends. Because PKG_CHECK_MODULES() from pkg-config dnl is used here, AC_CHECK_LIB() is not used and so LIBS probably is empty, dnl which finally result in an always failing test here. LIBS="$PKGCONF_LIBS $LIBS" AC_CHECK_FUNCS(hypot) AC_CHECK_FUNCS(trunc) AC_CHECK_FUNCS(round) AC_CHECK_FUNCS(exp10) AC_CHECK_FUNCS(pow10) AC_MSG_NOTICE([all functions checked with LIBS = '$LIBS']) dnl Checks for system services AC_OUTPUT dfcgen-gtk-0.4/include/0000755000175000017500000000000011767305164012024 500000000000000dfcgen-gtk-0.4/include/cfgSettings.h0000644000175000017500000001104011702543375014366 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * \e 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 Ralf Hoppe * \version $Id: cfgSettings.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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 \e 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 \e 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.4/include/projectFile.h0000644000175000017500000001175711755742236014400 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Project file handling. * * \note All double values written to a \e dfcgen project file are formated * in the "C" locale for LC_NUMERIC. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: projectFile.h 186 2012-05-19 16:04:46Z ralf $ * ******************************************************************************/ #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 \e 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.4/include/cairoPlot.h0000644000175000017500000003105711702543374014053 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * 2-dimensional plot functions (GDK), normally for filter responses. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: cairoPlot.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/dfcgen.h0000644000175000017500000000773111702543375013350 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital Filter Coefficients Generator common types. * \version $Id: dfcgen.h 132 2011-10-16 15:35:51Z ralf $ * * \author Copyright (C) 2006, 2011 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 = 1, FTR_BANDPASS = 2, FTR_BANDSTOP = 3, 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.4/include/linFirFilter.h0000644000175000017500000000674711702543374014520 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to Linear IIR Filter interpolation functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: linFirFilter.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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. * * \attention Do not change enumeration values, because used as index. */ typedef enum { LINFIR_DSPWIN_RECT = 0, LINFIR_DSPWIN_HAMMING = 1, LINFIR_DSPWIN_HANNING = 2, LINFIR_DSPWIN_BLACKMAN = 3, LINFIR_DSPWIN_KAISER = 4, LINFIR_DSPWIN_SIZE } LINFIR_DSPWIN; /** Linear FIR filter types. * * \attention Do not change enumeration values, because used as index. */ typedef enum { LINFIR_TYPE_RECT = 0, /**< Rectangular lowpass */ LINFIR_TYPE_COS = 1, /**< Cosinus lowpass */ LINFIR_TYPE_COS2 = 2, /**< Square cosinus lowpass */ LINFIR_TYPE_GAUSS = 3, /**< Gaussian lowpass */ LINFIR_TYPE_SQR = 4, /**< Squared first order lowpass */ LINFIR_TYPE_SIZE } LINFIR_TYPE; /** Linear FIR filter design data (from dialog). */ 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.4/include/base.h0000644000175000017500000000567611764211426013037 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Basic types, constants and macros. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: base.h 231 2012-06-07 20:46:14Z ralf $ * * ******************************************************************************/ #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.4/include/mathFuncs.h0000644000175000017500000001453311761226366014053 00000000000000/******************************************************************************/ /** * \file * Mathematical functions. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: mathFuncs.h 207 2012-05-29 20:09:26Z ralf $ * ******************************************************************************/ #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 Hanning 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 mathFuncHanning (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.4/include/linFirDesignDlg.h0000644000175000017500000001137311702543374015122 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter dialog functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: linFirDesignDlg.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/mainDlg.h0000644000175000017500000000503111755743143013467 00000000000000/******************************************************************************/ /** * \file * Main dialog management. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: mainDlg.h 189 2012-05-19 16:12:18Z ralf $ * ******************************************************************************/ #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); #ifdef __cplusplus } #endif #endif /* MAINDLG_H */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.4/include/doxygen.h0000644000175000017500000000251111765103664013570 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file doxygen.h * Additional doxygen sections (no code). * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: doxygen.h 252 2012-06-10 11:40:35Z ralf $ * * \page Configure * See output of \c configure \c --help * \page Make * \section Users * - \c make \c [all] in root directory builds the package * - \c make \c install in root directory installs the package * \section Developers * - \c make \c dist in root directory generates a distribution package * - \c make \c dist-debian in root directory builds a Debian package * - \c make \c dist-win32 in root directory builds (on MinGW) a Win32 package * - \c make \c distcheck in root directory checks the package for * distribution (and updates the \e gettext database and \e po files) * - \c make \c update-po in \e po directory updates the * strings list in file \e de.po * - \c make \c all in \e po directory builds the \e gmo file(s) * * ******************************************************************************/ #ifndef DOXYGEN_H #define DOXYGEN_H #endif dfcgen-gtk-0.4/include/editDlg.h0000644000175000017500000000473411755743143013501 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to dialog functions of \e Edit menu. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: editDlg.h 189 2012-05-19 16:12:18Z ralf $ * ******************************************************************************/ #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.4/include/responseWin.h0000644000175000017500000000441311702543374014427 00000000000000/******************************************************************************/ /** * \file * Digital filter response window creation and callbacks. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: responseWin.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/responsePlot.h0000644000175000017500000000745711702543374014623 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response plotter. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: responsePlot.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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. * * \attention The enums defined here are used as index (somewhere), means do * not change without think about it. */ typedef enum { RESPONSE_TYPE_MAGNITUDE = 0, /**< magnitude response */ RESPONSE_TYPE_ATTENUATION = 1, /**< attenuation */ RESPONSE_TYPE_CHAR = 2, /**< characteristic function */ RESPONSE_TYPE_PHASE = 3, /**< phase response */ RESPONSE_TYPE_DELAY = 4, /**< phase delay */ RESPONSE_TYPE_GROUP = 5, /**< group delay */ RESPONSE_TYPE_IMPULSE = 6, /**< time-domain impulse response */ RESPONSE_TYPE_STEP = 7, /**< 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.4/include/fileDlg.h0000644000175000017500000001031511755743143013463 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file fileDlg.h * Interface to dialog functions of \e File menu. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: fileDlg.h 189 2012-05-19 16:12:18Z ralf $ * ******************************************************************************/ #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.4/include/helpDlg.h0000644000175000017500000000330111702543374013465 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Interface to dialog functions of \e Help menu. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: helpDlg.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/dialogSupport.h0000644000175000017500000001251111702543374014745 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Dialog helper functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: dialogSupport.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/mathMisc.h0000644000175000017500000000443111702543374013660 00000000000000/******************************************************************************/ /** * \file * Miscellaneous mathematical functions and macros. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: mathMisc.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/dfcProject.h0000644000175000017500000001675311755741767014226 00000000000000/******************************************************************************/ /** * \file * \e dfcgen filter project management. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: dfcProject.h 184 2012-05-19 16:01:59Z ralf $ * ******************************************************************************/ #ifndef DCFPROJECT_H #define DCFPROJECT_H /* INCLUDE FILES **************************************************************/ #include "dfcgen.h" #include "designDlg.h" #ifdef __cplusplus extern "C" { #endif /* GLOBAL TYPE DECLARATIONS ***************************************************/ /** \e 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; /** \e 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.4/include/designDlg.h0000644000175000017500000000763411765424753014033 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Design dialogs handler. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: designDlg.h 256 2012-06-11 17:24:58Z ralf $ * ******************************************************************************/ #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.4/include/Makefile.in0000644000175000017500000002767511767302613014026 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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\ doxygen.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 .PRECIOUS: 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: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 all all-am check check-am clean clean-generic \ ctags 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 uninstall uninstall-am # 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.4/include/stdIirFilter.h0000644000175000017500000001112311702543374014513 00000000000000/******************************************************************************/ /** * \file * Interface to Standard IIR Filter approximation functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: stdIirFilter.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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 data (from dialog). */ 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. * * Detailed description. * * \note gsl_error_handler_t * gsl_set_error_handler (gsl_error_handler_t new_handler) * fpsetround() * * \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.4/include/filterResponse.h0000644000175000017500000002152411702543374015121 00000000000000/******************************************************************************/ /** * \file * Filter response functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: filterResponse.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/miscFilter.h0000644000175000017500000001057011702543374014215 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 Ralf Hoppe * \version $Id: miscFilter.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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 data. */ 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.4/include/stdIirDesignDlg.h0000644000175000017500000001116111702543374015130 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter dialog functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: stdIirDesignDlg.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/filterPrint.h0000644000175000017500000000514311755740776014433 00000000000000/******************************************************************************/ /** * \file * \brief Filter print functions. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: filterPrint.h 178 2012-05-19 15:53:34Z ralf $ * ******************************************************************************/ #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.4/include/rootsPlot.h0000644000175000017500000000470111702543374014120 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Roots plot functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: rootsPlot.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/filterSupport.h0000644000175000017500000001506611702543374015003 00000000000000/******************************************************************************/ /** * \file * Filter support functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: filterSupport.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/gui.h0000644000175000017500000000366111762431020012671 00000000000000/******************************************************************************/ /** * \file * GUI header files. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: gui.h 213 2012-06-02 15:32:32Z ralf $ * ******************************************************************************/ #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.4/include/Makefile.am0000644000175000017500000000126511756142446014004 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 190 2012-05-20 10:19:18Z ralf $ ## ## Process this file with automake to produce Makefile.in ## noinst_HEADERS = \ base.h\ cairoPlot.h\ cfgSettings.h\ designDlg.h\ dfcProject.h\ dfcgen.h\ dialogSupport.h\ doxygen.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.4/include/support.h0000644000175000017500000000743711764415421013637 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 Ralf Hoppe * \version $Id: support.h 234 2012-06-08 15:32:33Z ralf $ * ******************************************************************************/ #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.4/include/miscDesignDlg.h0000644000175000017500000001147111702543374014631 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 Ralf Hoppe * \version $Id: miscDesignDlg.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/responseDlg.h0000644000175000017500000000427411702543374014405 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Response settings/properties dialog. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: responseDlg.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/include/mathPoly.h0000644000175000017500000002663311702543374013720 00000000000000/******************************************************************************/ /** * \file * Polynomial functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: mathPoly.h 106 2011-08-21 15:23:31Z ralf $ * ******************************************************************************/ #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.4/data/0000755000175000017500000000000011767305164011312 500000000000000dfcgen-gtk-0.4/data/filters/0000755000175000017500000000000011767305164012762 500000000000000dfcgen-gtk-0.4/data/filters/fitting9_poly4.dfc0000644000175000017500000000241011747013362016233 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.4/data/filters/fitting21_poly2.dfc0000644000175000017500000000362611747013362016315 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.4/data/filters/fitting15_poly2.dfc0000644000175000017500000000300111747013362016303 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.4/data/filters/integrator_38rule.dfc0000644000175000017500000000160511747013362016734 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.4/data/filters/fitting7_poly4.dfc0000644000175000017500000000223611747013362016237 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.4/data/filters/differentiator2.dfc0000644000175000017500000000200711747013362016440 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.4/data/filters/differentiator1.dfc0000644000175000017500000000163611747013362016446 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.4/data/filters/integrator_simpson.dfc0000644000175000017500000000221511747013362017300 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.4/data/filters/fitting9_poly2.dfc0000644000175000017500000000240611747013362016236 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.4/data/filters/fitting5_poly2.dfc0000644000175000017500000000214211747013362016227 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.4/data/filters/Makefile.in0000644000175000017500000003006411767302612014745 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(dist_filters_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = 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__installdirs = "$(DESTDIR)$(filtersdir)" DATA = $(dist_filters_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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 .PRECIOUS: 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) test -z "$(filtersdir)" || $(MKDIR_P) "$(DESTDIR)$(filtersdir)" @list='$(dist_filters_DATA)'; test -n "$(filtersdir)" || list=; \ 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|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(filtersdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(filtersdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 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 uninstall uninstall-am \ uninstall-dist_filtersDATA # 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.4/data/filters/fitting7_poly2.dfc0000644000175000017500000000223711747013362016236 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.4/data/filters/integrator_trapez.dfc0000644000175000017500000000172011747013362017115 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.4/data/filters/Makefile.am0000644000175000017500000000105711764415243014736 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 233 2012-06-08 15:30:42Z ralf $ ## ## Process this file with automake to produce Makefile.in ## 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.4/data/filters/integrator_rect.dfc0000644000175000017500000000151711747013362016551 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.4/data/templates/0000755000175000017500000000000011767305165013311 500000000000000dfcgen-gtk-0.4/data/templates/export.m0000644000175000017500000000046511765037247014736 00000000000000function [num,den] = export % EXPORT Exports generated digital filter coefficients from DFCGen (GTK+) % % Copyright (C) 2012 Ralf Hoppe % Version: $Id$ % num = [ $PRJ:FILTER:NUM:COEFF$ ]; den = [ $PRJ:FILTER:DEN:COEFF$ ]; dfcgen-gtk-0.4/data/templates/Makefile.in0000644000175000017500000002755511767302612015306 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(dist_templates_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = 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__installdirs = "$(DESTDIR)$(templatesdir)" DATA = $(dist_templates_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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 .PRECIOUS: 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) test -z "$(templatesdir)" || $(MKDIR_P) "$(DESTDIR)$(templatesdir)" @list='$(dist_templates_DATA)'; test -n "$(templatesdir)" || list=; \ 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|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(templatesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(templatesdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 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 uninstall uninstall-am \ uninstall-dist_templatesDATA # 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.4/data/templates/export.txt0000644000175000017500000000030311751256171015302 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.4/data/templates/export.c0000644000175000017500000000114711765041645014717 00000000000000/********************************* -*- C -*- ********************************* * Copyright (C) 2012 Ralf Hoppe * Version: $Id: export.c 241 2012-06-10 06:50:13Z ralf $ * * 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.4/data/templates/Makefile.am0000644000175000017500000000045611764415243015266 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 233 2012-06-08 15:30:42Z ralf $ ## ## Process this file with automake to produce Makefile.in ## templatesdir = $(pkgtemplatesdir) dist_templates_DATA = \ export.txt\ export.c\ export.m dfcgen-gtk-0.4/data/pixmaps/0000755000175000017500000000000011767305165012774 500000000000000dfcgen-gtk-0.4/data/pixmaps/step.png0000644000175000017500000000061211747014714014367 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ÜäåWužì#ú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.4/data/pixmaps/amplitude.png0000644000175000017500000000071311747014714015402 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.4/data/pixmaps/phase.png0000644000175000017500000000070111747014714014513 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ `+&âNIDATXÃÅWÑ„ +ÆÿbŸ^¾l÷€TÀ¡p’<ÏØv«c8ŠÇ $§‰÷כΔä>·ˆ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.4/data/pixmaps/Makefile.in0000644000175000017500000002762711767302612014771 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(dist_pixmaps_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = 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__installdirs = "$(DESTDIR)$(pixmapsdir)" DATA = $(dist_pixmaps_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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.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 .PRECIOUS: 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) test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" @list='$(dist_pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ 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|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pixmapsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pixmapsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 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 uninstall uninstall-am \ uninstall-dist_pixmapsDATA # 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.4/data/pixmaps/grpdelay.png0000644000175000017500000000072311747014714015226 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ Û¹h°`IDATXÃÅWíƒ ¼Þ‹Û“¯>û¡¨ƒ²Blb4Äp½rý@;ç×0¤sàü“Ý`öÜ6Ë­•Ê»÷¢çL³'l¾ŠQX‰¡žÇJuY÷oéb`XWl"ù]ˆ0ý5W(†aÔ|£¿™—1p%€_§ê¸ 'wÅIEND®B`‚dfcgen-gtk-0.4/data/pixmaps/dfcgen.png0000644000175000017500000000071011747014714014641 00000000000000‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ 1ü‡UIDATXÃÍW[²ƒ0'û‚¥“•q?l,Æ—æZf˜i*õðÎ)ÀË‚"¢o€33nog \¼"ºIŒËØÎ)¡½(V§w€yQÅC¿]â 1=—Ѝ§sKjNÓ¡®(¨¨ª‚Âç³=ëM“¢DSD=Eê7bŠ,Jlf§ds*AžútnMnŸy6‡ò1@ÔCí÷3àÃ{ ÓíOMÁOlÂ'Å6 ×¬K3ƒ5§`¥Í)xK6¯nwwü!)ÎŒc~{*îÛôŠŽJ`½{ ÙMÉ… °t«ê1d¢ï ‘µnQ4énÂDZz¯j»Ö±P‡0<Àz³VÛhk¿ µ5ŠÀûcr#o9jÛK:èÙ…¬˜)ȉÍT ,O)EøPÎ8Òc;¼rG<ºÖ›©i>P£jˆí¿š#ð B"ÿDå“?ò¶aX‚«aIEND®B`‚dfcgen-gtk-0.4/data/pixmaps/phasedelay.png0000644000175000017500000000102511747014714015532 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.4/data/pixmaps/Makefile.am0000644000175000017500000000062311764415243014745 00000000000000## -*- Makefile -*- ## ## Copyright (c) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 233 2012-06-08 15:30:42Z ralf $ ## ## Process this file with automake to produce Makefile.in ## pixmapsdir = $(pkgpixmapsdir) dist_pixmaps_DATA = \ dfcgen.png\ attenuation.png\ charfunc.png\ grpdelay.png\ impulse.png\ phase.png\ phasedelay.png\ step.png\ amplitude.png dfcgen-gtk-0.4/data/pixmaps/charfunc.png0000644000175000017500000000061111747014714015204 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Äë/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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" 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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive 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-recursive uninstall uninstall-am # 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.4/data/Makefile.am0000644000175000017500000000040011762621431013251 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 176 2012-05-19 15:51:14Z ralf $ ## ## Process this file with automake to produce Makefile.in ## SUBDIRS = filters templates pixmaps dfcgen-gtk-0.4/po/0000755000175000017500000000000011767305163011016 500000000000000dfcgen-gtk-0.4/po/Makefile.in.in0000644000175000017500000003620411702543377013415 00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.17 GETTEXT_MACRO_VERSION = 0.17 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dfcgen-gtk-0.4/po/Rules-quot0000644000175000017500000000337611702543377012752 00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header dfcgen-gtk-0.4/po/en@boldquot.header0000644000175000017500000000247111702543377014370 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # dfcgen-gtk-0.4/po/de.po0000644000175000017500000006076211767117442011702 00000000000000# -*- mode: po; coding: utf-8 -*- # # dfcgen-gtk German Translations # Copyright (C) 2006, 2011-2012 Ralf Hoppe # This file is distributed under the same license as the dfcgen-gtk package. # msgid "" msgstr "" "Project-Id-Version: dfcgen-gtk 0.4\n" "Report-Msgid-Bugs-To: ralf.hoppe@ieee.org\n" "POT-Creation-Date: 2012-06-11 19:17+0200\n" "PO-Revision-Date: 2012-06-16 15:35+0200\n" "Last-Translator: Ralf Hoppe \n" "Language-Team: Ralf Hoppe\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de_DE.UTF-8\n" #: src/support.c:126 #, c-format msgid "Couldn't locate package sub-directory no. %d" msgstr "" "Konnte Unterverzeichnis der Installation mit der Nummer %d nicht finden." #: src/support.c:157 #, c-format msgid "Couldn't find pixmap file '%s'" msgstr "Konnte Bilddatei '%s' nicht finden" #: src/support.c:166 #, c-format msgid "Failed to create pixbuf from file '%s': %s" msgstr "Konnte Bild nicht aus Datei '%s' erzeugen: %s" #: src/designDlg.c:70 msgid "Miscellaneous" msgstr "Verschiedene" #: src/designDlg.c:75 msgid "Linear FIR" msgstr "Linear FIR" #: src/designDlg.c:80 msgid "Standard IIR" msgstr "Standard IIR" #: src/designDlg.c:268 msgid "" "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?" msgstr "" "Irgendwann haben Sie einmal Filterkoeffizienten händisch geändert. Wollen " "Sie diese Änderungen wirklich verwerfen und alle Filterkoeffizienten jetzt " "neu generieren?" #: src/designDlg.c:285 msgid "" "Cannot generate such a filter. Please check sample frequency, degree and " "other design parameters." msgstr "" "Kann die Filterkoeffizienten für ein Filter mit diesen Parametern nicht " "erzeugen. Bitte prüfen Sie die Werte für den Grad, die Abtastfrequenz sowie " "alle weiteren Parameter." #: src/mainDlg.c:124 msgid "Change" msgstr "Ändern" #: src/mainDlg.c:125 msgid "Edit a single coefficient" msgstr "Einen einzelnen Koeffizienten ändern" #: src/mainDlg.c:128 msgid "Multiply" msgstr "Multiplizieren" #: src/mainDlg.c:129 msgid "Multiply all coefficients with a constant" msgstr "Alle Koeffizienten mit einer Konstante multiplizieren" #: src/mainDlg.c:132 msgid "Round" msgstr "Runden" #: src/mainDlg.c:133 msgid "Round all coefficients" msgstr "Alle Koeffizienten runden" #: src/mainDlg.c:174 msgid "The current filter/system has not been saved. Are you sure to quit now?" msgstr "" "Das aktuelle Filter/System wurde noch nicht gespeichert. Wollen Sie trotzdem " "beenden?" #: src/mainDlg.c:285 #, c-format msgid "" "Changes coefficient of tap z-%d in the selected list to a new " "value." msgstr "" "Ändert den Koeffizient von Abzweig z-%d in der ausgewählten Liste" #: src/mainDlg.c:288 msgid "Change coefficient" msgstr "Koeffizient ändern" #: src/mainDlg.c:289 msgid "_New" msgstr "_Neu" # Tooltip #: src/mainDlg.c:317 msgid "Multiply coefficients" msgstr "Koeffizient modifizieren" #: src/mainDlg.c:318 msgid "_Factor" msgstr "_Faktor" #: src/mainDlg.c:319 msgid "Multiplies all coefficients in the selected list with the given factor." msgstr "" "Multipliziert alle Koeffizienten in der ausgewählten Liste mit dem " "eingegebenen Faktor." #: src/mainDlg.c:365 msgid "Do you really want to round all coefficients in the selected list?" msgstr "" "Wollen Sie wirklich alle Koeffizienten in der ausgewählten Liste runden?" #: src/mainDlg.c:418 msgid "" "Cannot implement such a filter. Maybe the result of such an operation leads " "to vanishing coefficients at all." msgstr "" "Kann ein solches Filter nicht erzeugen. Möglicherweise führt die Operation " "zu einem Ergebnis, in dem alle Koeffizienten annähernd Null sind." #: src/mainDlg.c:432 msgid "" "Cannot perform the desired operation. It seems that all the memory is " "exhausted." msgstr "" "Kann die gewünschte Operation nicht ausführen. Es scheint, als ob Ihr " "Hauptspeicher nicht ausreicht." #: src/mainDlg.c:578 msgid "Tap" msgstr "Abzw." #: src/mainDlg.c:589 msgid "Coefficient" msgstr "Koeffizient" #: src/mainDlg.c:697 msgid "_File" msgstr "_Datei" #: src/mainDlg.c:732 msgid "_Export" msgstr "_Export" #: src/mainDlg.c:756 msgid "_Edit" msgstr "_Bearbeiten" #: src/mainDlg.c:762 src/editDlg.c:310 msgid "Project Info" msgstr "Projektinfo" #: src/mainDlg.c:769 msgid "Coefficient(s)" msgstr "Koeffizient(en)" #: src/mainDlg.c:799 msgid "_View" msgstr "_Ansicht" #: src/mainDlg.c:805 msgid "_Magnitude Response" msgstr "_Amplitudengang" #: src/mainDlg.c:811 msgid "_Attenuation" msgstr "_Dämpfung" #: src/mainDlg.c:817 msgid "_Characteristic Function" msgstr "D_rosselung" #: src/mainDlg.c:823 msgid "_Phase Response" msgstr "_Phasengang" #: src/mainDlg.c:829 msgid "Phase _Delay" msgstr "Phasen_laufzeit" #: src/mainDlg.c:835 msgid "_Group Delay" msgstr "_Gruppenlaufzeit" #: src/mainDlg.c:841 msgid "_Impulse Response" msgstr "_Impulsantwort" #: src/mainDlg.c:847 msgid "_Step Response" msgstr "_Sprungantwort" #: src/mainDlg.c:853 msgid "_Help" msgstr "_Hilfe" # Label for filter class combobox #: src/mainDlg.c:922 msgid "_Class" msgstr "_Klasse" # Tooltip #: src/mainDlg.c:928 msgid "Class of filter (or system)" msgstr "Filterklasse" # Tooltip for help button #: src/mainDlg.c:942 msgid "Help" msgstr "Hilfe" # Tooltip #: src/mainDlg.c:952 msgid "Apply input data" msgstr "Eingabe anwenden" #: src/mainDlg.c:969 msgid "Roots" msgstr "Wurzeln" # Tooltip #: src/mainDlg.c:987 msgid "Denominator coefficients" msgstr "Nennerkoeffizienten" # Tooltip #: src/mainDlg.c:998 msgid "Numerator coefficients" msgstr "Zählerkoeffizienten" #: src/mainDlg.c:1000 msgid "Numerator" msgstr "Zähler" #: src/mainDlg.c:1008 msgid "Denominator" msgstr "Nenner" #: src/mainDlg.c:1150 msgid "" "Filter generation has dropped some (near zero) coefficients, but the filter " "is still valid." msgstr "" "Bei der Berechnung der Filterkoeffizienten hat sich herausgestellt, dass ein " "oder mehrere nahezu Null sind. Diese wurden auf Null gesetzt, wobei sich der " "Grad des Filters möglicherweise verringert hat." # Displayed if title, author or filename (may be a conversion error from filesystem # into UTF-8 coding) are unknown. #: src/mainDlg.c:1208 src/fileDlg.c:89 src/fileDlg.c:94 #: src/dialogSupport.c:133 msgid "Unknown" msgstr "Unbekannt" #: src/helpDlg.c:74 msgid "translator-credits" msgstr "Ralf Hoppe" # f means the physical unit Frequency #: src/responseWin.c:94 src/responseWin.c:104 src/responseWin.c:114 #: src/responseWin.c:124 src/responseWin.c:134 src/responseWin.c:144 msgid "f" msgstr "f" # magnitude response H(f) #: src/responseWin.c:95 msgid "H(f)" msgstr "H(f)" # attenuation #: src/responseWin.c:105 msgid "A(f)" msgstr "A(f)" # characteristic function #: src/responseWin.c:115 msgid "D(f)" msgstr "D(f)" # phase response #: src/responseWin.c:125 msgid "B(f)" msgstr "B(f)" # phase delay #: src/responseWin.c:135 msgid "Tp(f)" msgstr "Tp(f)" # group delay #: src/responseWin.c:145 msgid "Tg(f)" msgstr "Tg(f)" # t means the physical unit Time #: src/responseWin.c:154 src/responseWin.c:164 msgid "t" msgstr "t" # step response #: src/responseWin.c:155 msgid "h(t)" msgstr "h(t)" # impulse response #: src/responseWin.c:165 msgid "g(t)" msgstr "g(t)" #: src/responseWin.c:321 msgid "Print this response plot" msgstr "Diagramm drucken" # Tooltip #: src/responseWin.c:326 msgid "Set response plot preferences" msgstr "Plot Einstellungen" #: src/responseWin.c:423 #, c-format msgid "%d Points" msgstr "%d Stützwerte" #: src/cairoPlot.c:182 msgid "" "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." msgstr "" "Kann Diagramm nicht zeichnen.\n" "\n" "Möglicherweise ist der Speicherplatz ausgegangen, es sind zu viele " "Stützwerte oder eine math. Operation konnte nicht erfolgreich abgeschlossen " "werden. Ändern Sie das Anzeigeintervall der Ordinate um das Problem zu " "beheben." #: src/fileDlg.c:97 #, c-format msgid "" "Title: %s\n" "Author: %s" msgstr "" "Titel: %s\n" "Autor: %s" #: src/fileDlg.c:146 #, c-format msgid "Project files (*%s)" msgstr "Projektdateien (*%s)" #: src/fileDlg.c:153 src/fileDlg.c:377 msgid "All files (*)" msgstr "Alle Dateien (*)" #: src/fileDlg.c:208 msgid "Load project file" msgstr "Projektdatei laden" #: src/fileDlg.c:233 #, c-format msgid "Error loading project file '%s'." msgstr "Fehler beim Laden der Projektdatei '%s'." #: src/fileDlg.c:264 src/fileDlg.c:331 #, c-format msgid "Error saving project file '%s'." msgstr "Fehler beim Speichern der Projektdatei '%s'." #: src/fileDlg.c:289 msgid "Save project file" msgstr "Projektdatei speichern" #: src/fileDlg.c:297 msgid "untitled" msgstr "unbenannt" # Tooltip #: src/fileDlg.c:360 msgid "Export coefficients" msgstr "Koeffizienten exportieren" #: src/fileDlg.c:368 msgid "" "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" msgstr "" "Wählen Sie eine Dateinamenserweiterung nach dem gewünschten Format:\n" "\n" "\t*.txt\t->\teinfacher Text\n" "\t*.c\t\t->\tProgrammiersprache \"C\"\n" "\t*.m\t\t->\tMATLAB Script" #: src/fileDlg.c:382 msgid "Plain (*.txt)" msgstr "Text (*.txt)" #: src/fileDlg.c:387 msgid "MATLAB (*.m)" msgstr "MATLAB (*.m)" #: src/fileDlg.c:392 msgid "C (*.c)" msgstr "C (*.c)" #: src/fileDlg.c:399 msgid "untitled.txt" msgstr "unbenannt.txt" #: src/fileDlg.c:434 #, c-format msgid "Error exporting to file '%s'." msgstr "Fehler beim Exportieren in die Datei '%s'." #: src/responseDlg.c:161 #, c-format msgid "Range (start, stop) for axis '%s' is invalid." msgstr "Intervall (Start, Stop) für Achse '%s' ist ungültig." #: src/responseDlg.c:192 msgid "Logarithmic" msgstr "Logarithmisch" #: src/responseDlg.c:202 msgid "Show Grid" msgstr "Grid" #: src/responseDlg.c:287 msgid "Response Settings" msgstr "Diagramm-Einstellungen" #: src/responseDlg.c:310 src/responseDlg.c:418 msgid "Axis" msgstr "Achse" #: src/responseDlg.c:323 src/responseDlg.c:431 msgid "Start" msgstr "Start" #: src/responseDlg.c:333 msgid "Start of x-axis interval" msgstr "Startpunkt der x-Achse" #: src/responseDlg.c:343 src/responseDlg.c:451 src/stdIirDesignDlg.c:531 msgid "Stop" msgstr "Stop" #: src/responseDlg.c:353 msgid "End of x-axis interval" msgstr "Endepunkt der x-Achse" #: src/responseDlg.c:361 msgid "Samples" msgstr "Stützwerte" #: src/responseDlg.c:371 msgid "The number of samples to be used (0 = all)" msgstr "Die Anzahl der zu verwendenden Stützwerte (0 = Anzahl Pixel)" #: src/responseDlg.c:441 msgid "Start of y-axis interval" msgstr "Startpunkt der y-Achse" #: src/responseDlg.c:461 msgid "End of y-axis interval" msgstr "Endepunkt der y-Achse" #: src/responseDlg.c:499 msgid "Autoscaling" msgstr "Auto-Skalierung" #: src/responseDlg.c:500 msgid "" "Autoscaling of y-axis with respect to minimum and maximum values in interval" msgstr "" "Automatische Skalierung der y-Achse entsprechend Maximal- und Minimalwert" #: src/responseDlg.c:520 msgid "Style" msgstr "Stil" #: src/responseDlg.c:538 src/responseDlg.c:586 msgid "Graph" msgstr "Kurve" #: src/responseDlg.c:544 msgid "Color" msgstr "Farbe" #: src/responseDlg.c:564 msgid "Style of graph" msgstr "Stil der Kurve" #: src/responseDlg.c:568 msgid "Line (continuous)" msgstr "Linie (kontinuierlich)" #: src/responseDlg.c:569 msgid "Circle (discrete)" msgstr "Kreis (diskret)" #: src/responseDlg.c:570 msgid "Samples (discrete)" msgstr "Abtastwert (diskret)" #: src/responseDlg.c:571 msgid "Cross (discrete)" msgstr "Kreuz (diskret)" #: src/responseDlg.c:572 msgid "Box (discrete)" msgstr "Viereck (diskret)" #: src/responseDlg.c:580 msgid "Choose the color item to be changed, then modify the color" msgstr "Wählen Sie das Objekt, für welches die Farbe geändert werden soll" #: src/responseDlg.c:584 msgid "Labels" msgstr "Achsenbeschriftung" #: src/responseDlg.c:585 msgid "Grid" msgstr "Grid" #: src/responseDlg.c:587 msgid "Box" msgstr "Rahmen" #: src/responseDlg.c:588 msgid "Units" msgstr "Einheiten" #: src/editDlg.c:104 msgid " Settings" msgstr "Einstellungen" #: src/editDlg.c:129 msgid "" "The number of digits following the decimal point of a floating point number" msgstr "Die Anzahl der signifikaten Ziffern bei der Ausgabe von Zahlen" #: src/editDlg.c:134 msgid "Output _Precision" msgstr "Ausgabe_präzision" #: src/editDlg.c:145 msgid "Frequency unit to be used for in-/output" msgstr "Einheit von Frequenzwerten bei der Ein- und Ausgabe" #: src/editDlg.c:159 msgid "_Frequency Unit" msgstr "Einheit _Frequenz" #: src/editDlg.c:170 msgid "Time unit to be used for in-/output" msgstr "Einheit von Zeitwerten bei der Ein- und Ausgabe" #: src/editDlg.c:185 msgid "_Time Unit" msgstr "Einheit _Zeit" #: src/editDlg.c:192 msgid "_In-/Output" msgstr "_Ein-/Ausgabe" #: src/editDlg.c:200 msgid "RFU" msgstr "RFU" # Tooltip #: src/editDlg.c:334 msgid "Author of filter/system" msgstr "Autor des Filters/Systems" #: src/editDlg.c:343 msgid "_Author" msgstr "_Autor" #: src/editDlg.c:362 msgid "Project title" msgstr "Projekttitel" #: src/editDlg.c:365 msgid "_Title" msgstr "_Titel" #: src/editDlg.c:382 msgid "Project description" msgstr "Projektbeschreibung" #: src/editDlg.c:392 msgid "_Description" msgstr "_Beschreibung" #: src/stdIirDesignDlg.c:49 src/linFirDesignDlg.c:56 msgid "fCenter" msgstr "Mittenfr." # f means the physical unit Frequency #: src/stdIirDesignDlg.c:53 src/linFirDesignDlg.c:60 msgid "fCutoff" msgstr "Grenzfr." #: src/stdIirDesignDlg.c:82 msgid "Butterworth" msgstr "Butterworth" #: src/stdIirDesignDlg.c:83 msgid "Chebyshev" msgstr "Tschebyscheff" #: src/stdIirDesignDlg.c:84 msgid "Chebyshev Inv." msgstr "Tschebyscheff Inv." #: src/stdIirDesignDlg.c:85 msgid "Cauer (Case I)" msgstr "Cauer (Fall I)" #: src/stdIirDesignDlg.c:86 msgid "Cauer (Case II)" msgstr "Cauer (Fall II)" #: src/stdIirDesignDlg.c:87 msgid "Bessel" msgstr "Bessel" #: src/stdIirDesignDlg.c:241 src/linFirDesignDlg.c:251 msgid "Characteristic" msgstr "Charakteristik" #: src/stdIirDesignDlg.c:278 src/linFirDesignDlg.c:285 msgid "Transform" msgstr "Transformation" #: src/stdIirDesignDlg.c:296 src/linFirDesignDlg.c:303 msgid "Type of frequency transformation" msgstr "Art der Frequenztransformation" #: src/stdIirDesignDlg.c:298 src/linFirDesignDlg.c:305 msgid "_Type" msgstr "_Typ" #: src/stdIirDesignDlg.c:306 src/linFirDesignDlg.c:99 #: src/linFirDesignDlg.c:313 msgid "None" msgstr "Keine" #: src/stdIirDesignDlg.c:307 src/linFirDesignDlg.c:314 msgid "Highpass" msgstr "Hochpaß" #: src/stdIirDesignDlg.c:308 src/linFirDesignDlg.c:315 msgid "Bandpass" msgstr "Bandpaß" #: src/stdIirDesignDlg.c:309 src/linFirDesignDlg.c:316 msgid "Bandstop" msgstr "Bandsperre" #: src/stdIirDesignDlg.c:319 src/linFirDesignDlg.c:326 msgid "Bandwidth" msgstr "Bandbreite" #: src/stdIirDesignDlg.c:324 src/linFirDesignDlg.c:331 msgid "fBandw." msgstr "Bandbr." #: src/stdIirDesignDlg.c:343 src/linFirDesignDlg.c:350 msgid "Cutoff frequency (highpass) or center frequency (bandpass, bandstop)" msgstr "Grenzfrequenz (Hochpaß) oder Mittenfrequenz (Bandpaß, Bandsperre)" #: src/stdIirDesignDlg.c:364 src/linFirDesignDlg.c:371 msgid "_Geometric" msgstr "_Geometrisch" #: src/stdIirDesignDlg.c:369 src/linFirDesignDlg.c:376 msgid "" "Check this if the center frequency shall be the geometric mean between both " "cutoff frequencies (otherwise it is the arithmetic mean)." msgstr "" "Hier markieren, falls die Mittenfrequenz als geometrisches Mittel zwischen " "unterer und oberer Grenzfrequenz angesehen werden soll (sonst arithmetisches " "Mittel)." #: src/stdIirDesignDlg.c:383 src/linFirDesignDlg.c:390 msgid "Lowpass" msgstr "Tiefpaß" #: src/stdIirDesignDlg.c:402 src/linFirDesignDlg.c:409 msgid "Cutoff frequency" msgstr "Grenzfrequenz" #: src/stdIirDesignDlg.c:425 src/miscDesignDlg.c:165 src/linFirDesignDlg.c:432 msgid "Sample frequency" msgstr "Abtastfrequenz" #: src/stdIirDesignDlg.c:430 src/miscDesignDlg.c:153 src/linFirDesignDlg.c:437 msgid "f_Sample" msgstr "Abtastfr." #: src/stdIirDesignDlg.c:452 src/linFirDesignDlg.c:459 msgid "Degree of filter" msgstr "Grad des Filters" #: src/stdIirDesignDlg.c:456 src/miscDesignDlg.c:177 src/linFirDesignDlg.c:463 msgid "_Degree" msgstr "_Grad" #: src/stdIirDesignDlg.c:472 msgid "Parameters" msgstr "Parameter" #: src/stdIirDesignDlg.c:509 msgid "Passband ripple in dB" msgstr "Welligkeit im Durchlaßbereich in dB" #: src/stdIirDesignDlg.c:514 msgid "Ripple" msgstr "Welligkeit" #: src/stdIirDesignDlg.c:526 msgid "Stopband attenuation in dB" msgstr "Minimale Sperrdämpfung in dB" #: src/stdIirDesignDlg.c:544 msgid "Modular angle in degree" msgstr "Modulwinkel in Grad" #: src/stdIirDesignDlg.c:549 msgid "Angle" msgstr "Modul" #: src/miscDesignDlg.c:58 msgid "Hilbert transformer (FIR)" msgstr "Hilbert Transformator (FIR)" #: src/miscDesignDlg.c:59 msgid "" "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:\n" "H(f)=-j sgn(f)." msgstr "" "Der Hilbert-Transformator ist ein 90° Phasenschieber mit der " "Impulsantwort g(t)=1/Ï–t. Die Approximation basiert auf " "Fourier-Reihenentwicklung des (periodischen) Amplitudenganges:\n" "H(f)=-j sgn(f)." #: src/miscDesignDlg.c:62 msgid "Perfect Integrator (FIR)" msgstr "Idealer Integrator (FIR)" #: src/miscDesignDlg.c:63 msgid "" "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:\n" "H(f)=½δ(f)+1/j2Ï–f." msgstr "" "Ein idealer Integrator hat die Heaviside-Spungfunktion als " "Impulsantwort. Die Approximation basiert auf Fourier-" "Reihenentwicklung des (periodischen) Amplitudenganges:\n" "H(f)=½δ(f)+1/j2Ï–f." #: src/miscDesignDlg.c:66 msgid "Perfect Differentiator (FIR)" msgstr "Differenzierer (FIR)" #: src/miscDesignDlg.c:67 msgid "" "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:\n" "H(f)=j2Ï–f." msgstr "" "Der ideale Differenziererhat den Dirac-Stoß als Impulsantwort. Die " "Approximation basiert auf Fourier-Reihenentwicklung des " "(periodischen) Amplitudenganges:\n" "H(f)=j2Ï–f." #: src/miscDesignDlg.c:70 msgid "Comb filter (FIR)" msgstr "Kammfilter (FIR)" #: src/miscDesignDlg.c:71 msgid "" "The comb filter is a computational physical model of a single discrete echo. " "It has the transfer function:\n" "H(z)=1-z-n\n" "and thus a linear phase." msgstr "" "Das Kammfilter bildet das physikalische Modell eines einzelnen Echos nach. " "Es hat die Übertragungsfunktion:\n" "H(z)=1-z-n\n" "und deshalb eine lineare Phase." #: src/miscDesignDlg.c:74 msgid "Moving average (FIR)" msgstr "Spalttiefpaß (FIR)" #: src/miscDesignDlg.c:75 msgid "" "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:\n" "H(z)=1+z-1+z-2+...+z-n." msgstr "" "Das gleitende Mittelwertfilter (auch digitaler Fensterintegrator oder sinc-" "Filter genannt) ist eine Approximation der Impulsantwort des idealen " "Tiefpaß. Als FIR-Realisierung hat es die Übertragungsfunktion:\n" "H(z)=1+z-1+z-2+...+z-n." #: src/miscDesignDlg.c:78 msgid "Moving average (IIR)" msgstr "Spalttiefpaß (IIR)" #: src/miscDesignDlg.c:79 msgid "" "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:\n" "H(z)=(1-z-n)/(1-z-1)." msgstr "" "Das gleitende Mittelwertfilter (auch digitaler Fensterintegrator oder sinc-" "Filter genannt) ist eine Approximation der Impulsantwort des idealen " "Tiefpaß. Als IIR-Realisierung hat es die Übertragungsfunktion:\n" "H(z)=(1-z-n)/(1-z-1)." #: src/miscDesignDlg.c:82 msgid "Exponential average (IIR)" msgstr "Exponentielles Mittelwertfilter (IIR)" #: src/miscDesignDlg.c:83 msgid "" "The exponential average lowpass approximates a first order (analog RC-) " "lowpass. The transfer function is:\n" "H(z)=1/[n-(n-1)z-1]." msgstr "" "Das exponentielle Mittelwertfilter approximiert einen (analogen RC-) Tiefpaß " "erster Ordnung. Die Übertragungsfunktion lautet:\n" "H(z)=1/[n-(n-1)z-1]." #: src/miscDesignDlg.c:148 msgid "_Type" msgstr "_Typ" #: src/miscDesignDlg.c:189 msgid "Degree of system" msgstr "Grad des Systems" #: src/miscDesignDlg.c:210 msgid "Description" msgstr "Beschreibung" #: src/miscDesignDlg.c:431 #, c-format msgid "Could not load predefined filter(s) from '%s'" msgstr "Konnte das vordefinierte Filter von '%s' nicht laden" #: src/miscDesignDlg.c:491 msgid "" "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)." msgstr "" "Für dieses Filter/System ist nur ein beschränkter Satz von Design-Daten " "verfügbar. Aus diesem Grund werden die Eingabefelder Typ und " "Beschreibung nicht aktualisiert (natürlich aber die angezeigten " "Koeffizienten)." #: src/miscDesignDlg.c:637 #, c-format msgid "Could not load predefined filter from '%s'" msgstr "Konnte das vor definierte Filter nicht von '%s' laden" #: src/projectFile.c:707 #, c-format msgid "Unexpected tag '%s'" msgstr "Unerwartetes Tag '%s'." #: src/projectFile.c:774 #, c-format msgid "Syntax error at line %d" msgstr "Syntaxfehler in Zeile %d." #: src/projectFile.c:1148 #, c-format msgid "Mandatory tag '%s' missing" msgstr "Pflicht-Tag '%s' nicht gefunden." #: src/projectFile.c:1523 #, c-format msgid "Something seems wrong with the project in '%s'" msgstr "Irgendetwas scheint mit dem Projekt in '%s' nicht in Ordnung." #: src/dialogSupport.c:72 #, c-format msgid "Input \"%s\" is invalid for %s (min. %G, max. %G)." msgstr "Eingabe \"%s\" für %s ist ungültig (Min. %G, Max. %G)." #: src/linFirDesignDlg.c:87 msgid "Rectangular (perfect)" msgstr "Rechteck (ideal)" #: src/linFirDesignDlg.c:88 msgid "Cosine" msgstr "Cosinus" #: src/linFirDesignDlg.c:89 msgid "Squared cosine" msgstr "Quadratischer Cosinus" #: src/linFirDesignDlg.c:90 msgid "Gaussian" msgstr "Gaußkurve" #: src/linFirDesignDlg.c:91 msgid "Squared 1st order" msgstr "Quadratisch 1. Ordnung" #: src/linFirDesignDlg.c:100 msgid "Hamming" msgstr "Hamming" #: src/linFirDesignDlg.c:101 msgid "Hanning" msgstr "Hanning" #: src/linFirDesignDlg.c:102 msgid "Blackman" msgstr "Blackman" #: src/linFirDesignDlg.c:103 msgid "Kaiser" msgstr "Kaiser" #: src/linFirDesignDlg.c:480 msgid "Window" msgstr "Fensterfunktion" #: src/linFirDesignDlg.c:516 msgid "Parameter of Kaiser window" msgstr "Parameter des Kaiser-Fensters" #: src/linFirDesignDlg.c:521 msgid "α=" msgstr "α=" #: src/rootsPlot.c:299 msgid "Re(z)" msgstr "Re(z)" #: src/rootsPlot.c:300 msgid "Im(z)" msgstr "Im(z)" #: src/filterPrint.c:162 #, c-format msgid "Page %d / %d" msgstr "Seite %d / %d" #: src/filterPrint.c:191 #, c-format msgid "Title: %s" msgstr "Titel: %s" #: src/filterPrint.c:201 #, c-format msgid "Author: %s" msgstr "Autor: %s" #: src/filterPrint.c:211 #, c-format msgid "Description: %s" msgstr "Beschreibung: %s" #: src/filterPrint.c:227 msgid "Coefficients:" msgstr "Koeffizienten: " #: src/filterPrint.c:232 #, c-format msgid "Numerator (%d)" msgstr "Zähler (%d)" #: src/filterPrint.c:237 #, c-format msgid "Denominator (%d)" msgstr "Nenner (%d)" #: src/filterPrint.c:278 #, c-format msgid "Error printing: %s" msgstr "Fehler beim Drucken: %s" dfcgen-gtk-0.4/po/Makevars0000644000175000017500000000344011702543377012433 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Ralf Hoppe # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = ralf.hoppe@ieee.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = dfcgen-gtk-0.4/po/en@quot.header0000644000175000017500000000226311702543377013526 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # dfcgen-gtk-0.4/po/remove-potcdate.sin0000644000175000017500000000066011702543377014551 00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } dfcgen-gtk-0.4/po/dfcgen-gtk.pot0000644000175000017500000004200511765424102013465 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Ralf Hoppe # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: dfcgen-gtk 0.4\n" "Report-Msgid-Bugs-To: ralf.hoppe@ieee.org\n" "POT-Creation-Date: 2012-06-11 19:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/support.c:126 #, c-format msgid "Couldn't locate package sub-directory no. %d" msgstr "" #: src/support.c:157 #, c-format msgid "Couldn't find pixmap file '%s'" msgstr "" #: src/support.c:166 #, c-format msgid "Failed to create pixbuf from file '%s': %s" msgstr "" #: src/designDlg.c:70 msgid "Miscellaneous" msgstr "" #: src/designDlg.c:75 msgid "Linear FIR" msgstr "" #: src/designDlg.c:80 msgid "Standard IIR" msgstr "" #: src/designDlg.c:268 msgid "" "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?" msgstr "" #: src/designDlg.c:285 msgid "" "Cannot generate such a filter. Please check sample frequency, degree and " "other design parameters." msgstr "" #: src/mainDlg.c:124 msgid "Change" msgstr "" #: src/mainDlg.c:125 msgid "Edit a single coefficient" msgstr "" #: src/mainDlg.c:128 msgid "Multiply" msgstr "" #: src/mainDlg.c:129 msgid "Multiply all coefficients with a constant" msgstr "" #: src/mainDlg.c:132 msgid "Round" msgstr "" #: src/mainDlg.c:133 msgid "Round all coefficients" msgstr "" #: src/mainDlg.c:174 msgid "The current filter/system has not been saved. Are you sure to quit now?" msgstr "" #: src/mainDlg.c:285 #, c-format msgid "" "Changes coefficient of tap z-%d in the selected list to a new " "value." msgstr "" #: src/mainDlg.c:288 msgid "Change coefficient" msgstr "" #: src/mainDlg.c:289 msgid "_New" msgstr "" #: src/mainDlg.c:317 msgid "Multiply coefficients" msgstr "" #: src/mainDlg.c:318 msgid "_Factor" msgstr "" #: src/mainDlg.c:319 msgid "Multiplies all coefficients in the selected list with the given factor." msgstr "" #: src/mainDlg.c:365 msgid "Do you really want to round all coefficients in the selected list?" msgstr "" #: src/mainDlg.c:418 msgid "" "Cannot implement such a filter. Maybe the result of such an operation leads " "to vanishing coefficients at all." msgstr "" #: src/mainDlg.c:432 msgid "" "Cannot perform the desired operation. It seems that all the memory is " "exhausted." msgstr "" #: src/mainDlg.c:578 msgid "Tap" msgstr "" #: src/mainDlg.c:589 msgid "Coefficient" msgstr "" #: src/mainDlg.c:697 msgid "_File" msgstr "" #: src/mainDlg.c:732 msgid "_Export" msgstr "" #: src/mainDlg.c:756 msgid "_Edit" msgstr "" #: src/mainDlg.c:762 src/editDlg.c:310 msgid "Project Info" msgstr "" #: src/mainDlg.c:769 msgid "Coefficient(s)" msgstr "" #: src/mainDlg.c:799 msgid "_View" msgstr "" #: src/mainDlg.c:805 msgid "_Magnitude Response" msgstr "" #: src/mainDlg.c:811 msgid "_Attenuation" msgstr "" #: src/mainDlg.c:817 msgid "_Characteristic Function" msgstr "" #: src/mainDlg.c:823 msgid "_Phase Response" msgstr "" #: src/mainDlg.c:829 msgid "Phase _Delay" msgstr "" #: src/mainDlg.c:835 msgid "_Group Delay" msgstr "" #: src/mainDlg.c:841 msgid "_Impulse Response" msgstr "" #: src/mainDlg.c:847 msgid "_Step Response" msgstr "" #: src/mainDlg.c:853 msgid "_Help" msgstr "" #: src/mainDlg.c:922 msgid "_Class" msgstr "" #: src/mainDlg.c:928 msgid "Class of filter (or system)" msgstr "" #: src/mainDlg.c:942 msgid "Help" msgstr "" #: src/mainDlg.c:952 msgid "Apply input data" msgstr "" #: src/mainDlg.c:969 msgid "Roots" msgstr "" #: src/mainDlg.c:987 msgid "Denominator coefficients" msgstr "" #: src/mainDlg.c:998 msgid "Numerator coefficients" msgstr "" #: src/mainDlg.c:1000 msgid "Numerator" msgstr "" #: src/mainDlg.c:1008 msgid "Denominator" msgstr "" #: src/mainDlg.c:1150 msgid "" "Filter generation has dropped some (near zero) coefficients, but the filter " "is still valid." msgstr "" #: src/mainDlg.c:1208 src/fileDlg.c:89 src/fileDlg.c:94 #: src/dialogSupport.c:133 msgid "Unknown" msgstr "" #: src/helpDlg.c:74 msgid "translator-credits" msgstr "" #: src/responseWin.c:94 src/responseWin.c:104 src/responseWin.c:114 #: src/responseWin.c:124 src/responseWin.c:134 src/responseWin.c:144 msgid "f" msgstr "" #: src/responseWin.c:95 msgid "H(f)" msgstr "" #: src/responseWin.c:105 msgid "A(f)" msgstr "" #: src/responseWin.c:115 msgid "D(f)" msgstr "" #: src/responseWin.c:125 msgid "B(f)" msgstr "" #: src/responseWin.c:135 msgid "Tp(f)" msgstr "" #: src/responseWin.c:145 msgid "Tg(f)" msgstr "" #: src/responseWin.c:154 src/responseWin.c:164 msgid "t" msgstr "" #: src/responseWin.c:155 msgid "h(t)" msgstr "" #: src/responseWin.c:165 msgid "g(t)" msgstr "" #: src/responseWin.c:321 msgid "Print this response plot" msgstr "" #: src/responseWin.c:326 msgid "Set response plot preferences" msgstr "" #: src/responseWin.c:423 #, c-format msgid "%d Points" msgstr "" #: src/cairoPlot.c:182 msgid "" "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." msgstr "" #: src/fileDlg.c:97 #, c-format msgid "" "Title: %s\n" "Author: %s" msgstr "" #: src/fileDlg.c:146 #, c-format msgid "Project files (*%s)" msgstr "" #: src/fileDlg.c:153 src/fileDlg.c:377 msgid "All files (*)" msgstr "" #: src/fileDlg.c:208 msgid "Load project file" msgstr "" #: src/fileDlg.c:233 #, c-format msgid "Error loading project file '%s'." msgstr "" #: src/fileDlg.c:264 src/fileDlg.c:331 #, c-format msgid "Error saving project file '%s'." msgstr "" #: src/fileDlg.c:289 msgid "Save project file" msgstr "" #: src/fileDlg.c:297 msgid "untitled" msgstr "" #: src/fileDlg.c:360 msgid "Export coefficients" msgstr "" #: src/fileDlg.c:368 msgid "" "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" msgstr "" #: src/fileDlg.c:382 msgid "Plain (*.txt)" msgstr "" #: src/fileDlg.c:387 msgid "MATLAB (*.m)" msgstr "" #: src/fileDlg.c:392 msgid "C (*.c)" msgstr "" #: src/fileDlg.c:399 msgid "untitled.txt" msgstr "" #: src/fileDlg.c:434 #, c-format msgid "Error exporting to file '%s'." msgstr "" #: src/responseDlg.c:161 #, c-format msgid "Range (start, stop) for axis '%s' is invalid." msgstr "" #: src/responseDlg.c:192 msgid "Logarithmic" msgstr "" #: src/responseDlg.c:202 msgid "Show Grid" msgstr "" #: src/responseDlg.c:287 msgid "Response Settings" msgstr "" #: src/responseDlg.c:310 src/responseDlg.c:418 msgid "Axis" msgstr "" #: src/responseDlg.c:323 src/responseDlg.c:431 msgid "Start" msgstr "" #: src/responseDlg.c:333 msgid "Start of x-axis interval" msgstr "" #: src/responseDlg.c:343 src/responseDlg.c:451 src/stdIirDesignDlg.c:531 msgid "Stop" msgstr "" #: src/responseDlg.c:353 msgid "End of x-axis interval" msgstr "" #: src/responseDlg.c:361 msgid "Samples" msgstr "" #: src/responseDlg.c:371 msgid "The number of samples to be used (0 = all)" msgstr "" #: src/responseDlg.c:441 msgid "Start of y-axis interval" msgstr "" #: src/responseDlg.c:461 msgid "End of y-axis interval" msgstr "" #: src/responseDlg.c:499 msgid "Autoscaling" msgstr "" #: src/responseDlg.c:500 msgid "" "Autoscaling of y-axis with respect to minimum and maximum values in interval" msgstr "" #: src/responseDlg.c:520 msgid "Style" msgstr "" #: src/responseDlg.c:538 src/responseDlg.c:586 msgid "Graph" msgstr "" #: src/responseDlg.c:544 msgid "Color" msgstr "" #: src/responseDlg.c:564 msgid "Style of graph" msgstr "" #: src/responseDlg.c:568 msgid "Line (continuous)" msgstr "" #: src/responseDlg.c:569 msgid "Circle (discrete)" msgstr "" #: src/responseDlg.c:570 msgid "Samples (discrete)" msgstr "" #: src/responseDlg.c:571 msgid "Cross (discrete)" msgstr "" #: src/responseDlg.c:572 msgid "Box (discrete)" msgstr "" #: src/responseDlg.c:580 msgid "Choose the color item to be changed, then modify the color" msgstr "" #: src/responseDlg.c:584 msgid "Labels" msgstr "" #: src/responseDlg.c:585 msgid "Grid" msgstr "" #: src/responseDlg.c:587 msgid "Box" msgstr "" #: src/responseDlg.c:588 msgid "Units" msgstr "" #: src/editDlg.c:104 msgid " Settings" msgstr "" #: src/editDlg.c:129 msgid "" "The number of digits following the decimal point of a floating point number" msgstr "" #: src/editDlg.c:134 msgid "Output _Precision" msgstr "" #: src/editDlg.c:145 msgid "Frequency unit to be used for in-/output" msgstr "" #: src/editDlg.c:159 msgid "_Frequency Unit" msgstr "" #: src/editDlg.c:170 msgid "Time unit to be used for in-/output" msgstr "" #: src/editDlg.c:185 msgid "_Time Unit" msgstr "" #: src/editDlg.c:192 msgid "_In-/Output" msgstr "" #: src/editDlg.c:200 msgid "RFU" msgstr "" #: src/editDlg.c:334 msgid "Author of filter/system" msgstr "" #: src/editDlg.c:343 msgid "_Author" msgstr "" #: src/editDlg.c:362 msgid "Project title" msgstr "" #: src/editDlg.c:365 msgid "_Title" msgstr "" #: src/editDlg.c:382 msgid "Project description" msgstr "" #: src/editDlg.c:392 msgid "_Description" msgstr "" #: src/stdIirDesignDlg.c:49 src/linFirDesignDlg.c:56 msgid "fCenter" msgstr "" #: src/stdIirDesignDlg.c:53 src/linFirDesignDlg.c:60 msgid "fCutoff" msgstr "" #: src/stdIirDesignDlg.c:82 msgid "Butterworth" msgstr "" #: src/stdIirDesignDlg.c:83 msgid "Chebyshev" msgstr "" #: src/stdIirDesignDlg.c:84 msgid "Chebyshev Inv." msgstr "" #: src/stdIirDesignDlg.c:85 msgid "Cauer (Case I)" msgstr "" #: src/stdIirDesignDlg.c:86 msgid "Cauer (Case II)" msgstr "" #: src/stdIirDesignDlg.c:87 msgid "Bessel" msgstr "" #: src/stdIirDesignDlg.c:241 src/linFirDesignDlg.c:251 msgid "Characteristic" msgstr "" #: src/stdIirDesignDlg.c:278 src/linFirDesignDlg.c:285 msgid "Transform" msgstr "" #: src/stdIirDesignDlg.c:296 src/linFirDesignDlg.c:303 msgid "Type of frequency transformation" msgstr "" #: src/stdIirDesignDlg.c:298 src/linFirDesignDlg.c:305 msgid "_Type" msgstr "" #: src/stdIirDesignDlg.c:306 src/linFirDesignDlg.c:99 #: src/linFirDesignDlg.c:313 msgid "None" msgstr "" #: src/stdIirDesignDlg.c:307 src/linFirDesignDlg.c:314 msgid "Highpass" msgstr "" #: src/stdIirDesignDlg.c:308 src/linFirDesignDlg.c:315 msgid "Bandpass" msgstr "" #: src/stdIirDesignDlg.c:309 src/linFirDesignDlg.c:316 msgid "Bandstop" msgstr "" #: src/stdIirDesignDlg.c:319 src/linFirDesignDlg.c:326 msgid "Bandwidth" msgstr "" #: src/stdIirDesignDlg.c:324 src/linFirDesignDlg.c:331 msgid "fBandw." msgstr "" #: src/stdIirDesignDlg.c:343 src/linFirDesignDlg.c:350 msgid "Cutoff frequency (highpass) or center frequency (bandpass, bandstop)" msgstr "" #: src/stdIirDesignDlg.c:364 src/linFirDesignDlg.c:371 msgid "_Geometric" msgstr "" #: src/stdIirDesignDlg.c:369 src/linFirDesignDlg.c:376 msgid "" "Check this if the center frequency shall be the geometric mean between both " "cutoff frequencies (otherwise it is the arithmetic mean)." msgstr "" #: src/stdIirDesignDlg.c:383 src/linFirDesignDlg.c:390 msgid "Lowpass" msgstr "" #: src/stdIirDesignDlg.c:402 src/linFirDesignDlg.c:409 msgid "Cutoff frequency" msgstr "" #: src/stdIirDesignDlg.c:425 src/miscDesignDlg.c:165 src/linFirDesignDlg.c:432 msgid "Sample frequency" msgstr "" #: src/stdIirDesignDlg.c:430 src/miscDesignDlg.c:153 src/linFirDesignDlg.c:437 msgid "f_Sample" msgstr "" #: src/stdIirDesignDlg.c:452 src/linFirDesignDlg.c:459 msgid "Degree of filter" msgstr "" #: src/stdIirDesignDlg.c:456 src/miscDesignDlg.c:177 src/linFirDesignDlg.c:463 msgid "_Degree" msgstr "" #: src/stdIirDesignDlg.c:472 msgid "Parameters" msgstr "" #: src/stdIirDesignDlg.c:509 msgid "Passband ripple in dB" msgstr "" #: src/stdIirDesignDlg.c:514 msgid "Ripple" msgstr "" #: src/stdIirDesignDlg.c:526 msgid "Stopband attenuation in dB" msgstr "" #: src/stdIirDesignDlg.c:544 msgid "Modular angle in degree" msgstr "" #: src/stdIirDesignDlg.c:549 msgid "Angle" msgstr "" #: src/miscDesignDlg.c:58 msgid "Hilbert transformer (FIR)" msgstr "" #: src/miscDesignDlg.c:59 msgid "" "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:\n" "H(f)=-j sgn(f)." msgstr "" #: src/miscDesignDlg.c:62 msgid "Perfect Integrator (FIR)" msgstr "" #: src/miscDesignDlg.c:63 msgid "" "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:\n" "H(f)=½δ(f)+1/j2Ï–f." msgstr "" #: src/miscDesignDlg.c:66 msgid "Perfect Differentiator (FIR)" msgstr "" #: src/miscDesignDlg.c:67 msgid "" "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:\n" "H(f)=j2Ï–f." msgstr "" #: src/miscDesignDlg.c:70 msgid "Comb filter (FIR)" msgstr "" #: src/miscDesignDlg.c:71 msgid "" "The comb filter is a computational physical model of a single discrete echo. " "It has the transfer function:\n" "H(z)=1-z-n\n" "and thus a linear phase." msgstr "" #: src/miscDesignDlg.c:74 msgid "Moving average (FIR)" msgstr "" #: src/miscDesignDlg.c:75 msgid "" "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:\n" "H(z)=1+z-1+z-2+...+z-n." msgstr "" #: src/miscDesignDlg.c:78 msgid "Moving average (IIR)" msgstr "" #: src/miscDesignDlg.c:79 msgid "" "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:\n" "H(z)=(1-z-n)/(1-z-1)." msgstr "" #: src/miscDesignDlg.c:82 msgid "Exponential average (IIR)" msgstr "" #: src/miscDesignDlg.c:83 msgid "" "The exponential average lowpass approximates a first order (analog RC-) " "lowpass. The transfer function is:\n" "H(z)=1/[n-(n-1)z-1]." msgstr "" #: src/miscDesignDlg.c:148 msgid "_Type" msgstr "" #: src/miscDesignDlg.c:189 msgid "Degree of system" msgstr "" #: src/miscDesignDlg.c:210 msgid "Description" msgstr "" #: src/miscDesignDlg.c:431 #, c-format msgid "Could not load predefined filter(s) from '%s'" msgstr "" #: src/miscDesignDlg.c:491 msgid "" "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)." msgstr "" #: src/miscDesignDlg.c:637 #, c-format msgid "Could not load predefined filter from '%s'" msgstr "" #: src/projectFile.c:707 #, c-format msgid "Unexpected tag '%s'" msgstr "" #: src/projectFile.c:774 #, c-format msgid "Syntax error at line %d" msgstr "" #: src/projectFile.c:1148 #, c-format msgid "Mandatory tag '%s' missing" msgstr "" #: src/projectFile.c:1523 #, c-format msgid "Something seems wrong with the project in '%s'" msgstr "" #: src/dialogSupport.c:72 #, c-format msgid "Input \"%s\" is invalid for %s (min. %G, max. %G)." msgstr "" #: src/linFirDesignDlg.c:87 msgid "Rectangular (perfect)" msgstr "" #: src/linFirDesignDlg.c:88 msgid "Cosine" msgstr "" #: src/linFirDesignDlg.c:89 msgid "Squared cosine" msgstr "" #: src/linFirDesignDlg.c:90 msgid "Gaussian" msgstr "" #: src/linFirDesignDlg.c:91 msgid "Squared 1st order" msgstr "" #: src/linFirDesignDlg.c:100 msgid "Hamming" msgstr "" #: src/linFirDesignDlg.c:101 msgid "Hanning" msgstr "" #: src/linFirDesignDlg.c:102 msgid "Blackman" msgstr "" #: src/linFirDesignDlg.c:103 msgid "Kaiser" msgstr "" #: src/linFirDesignDlg.c:480 msgid "Window" msgstr "" #: src/linFirDesignDlg.c:516 msgid "Parameter of Kaiser window" msgstr "" #: src/linFirDesignDlg.c:521 msgid "α=" msgstr "" #: src/rootsPlot.c:299 msgid "Re(z)" msgstr "" #: src/rootsPlot.c:300 msgid "Im(z)" msgstr "" #: src/filterPrint.c:162 #, c-format msgid "Page %d / %d" msgstr "" #: src/filterPrint.c:191 #, c-format msgid "Title: %s" msgstr "" #: src/filterPrint.c:201 #, c-format msgid "Author: %s" msgstr "" #: src/filterPrint.c:211 #, c-format msgid "Description: %s" msgstr "" #: src/filterPrint.c:227 msgid "Coefficients:" msgstr "" #: src/filterPrint.c:232 #, c-format msgid "Numerator (%d)" msgstr "" #: src/filterPrint.c:237 #, c-format msgid "Denominator (%d)" msgstr "" #: src/filterPrint.c:278 #, c-format msgid "Error printing: %s" msgstr "" dfcgen-gtk-0.4/po/insert-header.sin0000644000175000017500000000124011702543377014200 00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } dfcgen-gtk-0.4/po/stamp-po0000644000175000017500000000001211765424102012403 00000000000000timestamp dfcgen-gtk-0.4/po/LINGUAS0000644000175000017500000000004011702543377011755 00000000000000# Set of available languages de dfcgen-gtk-0.4/po/de.gmo0000644000175000017500000004353311767117442012043 00000000000000Þ•Ï” ` a k u “២—: O[n …‘ ± à ÐÝõ "A R ` n{ „ œ¥¸äÇŬïr bpv‡ ŸL«øý  )- <HaPm²P q€—Oª ú…:™Ôæ #5*<-g•,´áòDHYj{B”×ñ =^q‘«*¿[êÀF(09?DLTYb|>‚ÁÈÏ áì þ  2 @ X m G‚ Ê )Ó ý !!'!>! P!]!x!Ž!«! Ä! Ñ!ß! ø!"" -";"-?"m"s"‰"›"¢"¨"¿"Ð"Ø"ë"ý" #.%#§T#ü#$ $*$0$I$b$g$‚$‘$©$™­$GG%Š%&÷'K(*b(#( ±(Ò(æ( ì(ù()) ")/)5)=)E)K) [) f)s)y) ‹)—)«)°)À) Ï)Ú)á)ç)í)**&*:*M* V*c*Zg* Â+Ð+ ß+ë+ ü+,-¸5-î- . .. 7.C.S.b.s. ‚.Ž.¦.¾.!Ï.ñ.// -/9/ B/ N/Z/c/w/èˆ/¶q0à(1 22 212K2I[2¥2«2 ´2 ¿2Ê2Ñ2Ú2á2 ó2ÿ2¯3·3fG4®4½4Í4Õ4Né4 85F5 Y5Dú5?6 O6 \6h6x6~665—64Í6"7H%7n7 ~7CŒ7Ð7á7 ò7þ7I8%\8‚8˜8*®8(Ù89,9%G9m9-‡9ʵ9æ€:3g; ›;¦;¬;±;¹;Á;Ç;Ð;ì;Dò;7<><Q< h<s< †< ”< ¡< Â<Ï<ã<÷<X =d=5s=©=Â= È=Õ=ê= ý= >$)>N>c>|> Œ>™> ª>¶>Ê> ß>ì>6ð>'?-?>? U?`?g?? ?œ?±?È?Û?=à?§@Æ@Ý@ ó@AAA4A9AWAfA€A¢†AU)BŸB Cü)D>&E=eE/£EÓEòE F FF %F1F 7F EFQFYFaFhF zF‡F˜FŸF ®F¼FÌF ÑFÝF ìFúFGGG G!G *G 4G ?G IGWGaÆ/ÀKʰJQ|ž6ƒÅC&Áq´‹V”ŽrtA©›xj¤*oŸ™ÌP?[$b_ d0^Lº]RЍE»²«šÂ‚¾"¥HÏ@'9m¡‰ Oz—- Tl)§„B%5;+~S’¸–:<4 pv‘MZǘ¶Ueªœf£3G Y{`¹¬Éh swÍ.>2³yug…cFË(Œi=“¼7·†1 ½DX®,­•\Ãı€¿‡!¯kÎnWN¢¦}#IˆµÈ8 Settings%d PointsA(f)Author: %sB(f)Cannot draw the plot. 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.CharacteristicChoose the file extension according to your preferred format: *.txt -> plain text *.c -> "C" language *.m -> MATLAB scriptCoefficients:D(f)DenominatorDescription: %sH(f)LowpassNumeratorParametersRootsStyleTg(f)Tp(f)Title: %sTitle: %s Author: %sTransformWindow_Class_Typefg(t)h(t)tDescriptionUnknownA 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: H(f)=-j sgn(f).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: H(f)=j2Ï–f.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: H(f)=½δ(f)+1/j2Ï–f.All files (*)AngleApply input dataAuthor of filter/systemAutoscalingAutoscaling of y-axis with respect to minimum and maximum values in intervalAxisBandpassBandstopBandwidthBesselBlackmanBoxBox (discrete)ButterworthC (*.c)Cannot generate such a filter. Please check sample frequency, degree and other design parameters.Cannot implement such a filter. Maybe the result of such an operation leads to vanishing coefficients at all.Cannot perform the desired operation. It seems that all the memory is exhausted.Cauer (Case I)Cauer (Case II)ChangeChange coefficientChanges coefficient of tap z-%d in the selected list to a new value.ChebyshevChebyshev Inv.Check this if the center frequency shall be the geometric mean between both cutoff frequencies (otherwise it is the arithmetic mean).Choose the color item to be changed, then modify the colorCircle (discrete)Class of filter (or system)CoefficientCoefficient(s)ColorComb filter (FIR)CosineCould not load predefined filter from '%s'Could not load predefined filter(s) from '%s'Couldn't find pixmap file '%s'Couldn't locate package sub-directory no. %dCross (discrete)Cutoff frequencyCutoff frequency (highpass) or center frequency (bandpass, bandstop)Degree of filterDegree of systemDenominator (%d)Denominator coefficientsDo you really want to round all coefficients in the selected list?Edit a single coefficientEnd of x-axis intervalEnd of y-axis intervalError exporting to file '%s'.Error loading project file '%s'.Error printing: %sError saving project file '%s'.Exponential average (IIR)Export coefficientsFailed to create pixbuf from file '%s': %sFilter generation has dropped some (near zero) coefficients, but the filter is still valid.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).Frequency unit to be used for in-/outputGaussianGraphGridHammingHanningHelpHighpassHilbert transformer (FIR)Im(z)Input "%s" is invalid for %s (min. %G, max. %G).KaiserLabelsLine (continuous)Linear FIRLoad project fileLogarithmicMATLAB (*.m)Mandatory tag '%s' missingMiscellaneousModular angle in degreeMoving average (FIR)Moving average (IIR)Multiplies all coefficients in the selected list with the given factor.MultiplyMultiply all coefficients with a constantMultiply coefficientsNoneNumerator (%d)Numerator coefficientsOutput _PrecisionPage %d / %dParameter of Kaiser windowPassband ripple in dBPerfect Differentiator (FIR)Perfect Integrator (FIR)Phase _DelayPlain (*.txt)Print this response plotProject InfoProject descriptionProject files (*%s)Project titleRFURange (start, stop) for axis '%s' is invalid.Re(z)Rectangular (perfect)Response SettingsRippleRoundRound all coefficientsSample frequencySamplesSamples (discrete)Save project fileSet response plot preferencesShow GridSomething seems wrong with the project in '%s'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?Squared 1st orderSquared cosineStandard IIRStartStart of x-axis intervalStart of y-axis intervalStopStopband attenuation in dBStyle of graphSyntax error at line %dTapThe comb filter is a computational physical model of a single discrete echo. It has the transfer function: H(z)=1-z-n and thus a linear phase.The current filter/system has not been saved. Are you sure to quit now?The exponential average lowpass approximates a first order (analog RC-) lowpass. The transfer function is: H(z)=1/[n-(n-1)z-1].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: H(z)=1+z-1+z-2+...+z-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: H(z)=(1-z-n)/(1-z-1).The number of digits following the decimal point of a floating point numberThe number of samples to be used (0 = all)Time unit to be used for in-/outputType of frequency transformationUnexpected tag '%s'Units_Attenuation_Author_Characteristic Function_Degree_Description_Edit_Export_Factor_File_Frequency Unit_Geometric_Group Delay_Help_Impulse Response_In-/Output_Magnitude Response_New_Phase Response_Step Response_Time Unit_Title_Type_ViewfBandw.fCenterfCutofff_Sampletranslator-creditsuntitleduntitled.txtα=Project-Id-Version: dfcgen-gtk 0.4 Report-Msgid-Bugs-To: ralf.hoppe@ieee.org POT-Creation-Date: 2012-06-11 19:17+0200 PO-Revision-Date: 2012-06-16 15:35+0200 Last-Translator: Ralf Hoppe Language-Team: Ralf Hoppe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: de_DE.UTF-8 Einstellungen%d StützwerteA(f)Autor: %sB(f)Kann Diagramm nicht zeichnen. Möglicherweise ist der Speicherplatz ausgegangen, es sind zu viele Stützwerte oder eine math. Operation konnte nicht erfolgreich abgeschlossen werden. Ändern Sie das Anzeigeintervall der Ordinate um das Problem zu beheben.CharakteristikWählen Sie eine Dateinamenserweiterung nach dem gewünschten Format: *.txt -> einfacher Text *.c -> Programmiersprache "C" *.m -> MATLAB ScriptKoeffizienten: D(f)NennerBeschreibung: %sH(f)TiefpaßZählerParameterWurzelnStilTg(f)Tp(f)Titel: %sTitel: %s Autor: %sTransformationFensterfunktion_Klasse_Typfg(t)h(t)tBeschreibungUnbekanntDer Hilbert-Transformator ist ein 90° Phasenschieber mit der Impulsantwort g(t)=1/Ï–t. Die Approximation basiert auf Fourier-Reihenentwicklung des (periodischen) Amplitudenganges: H(f)=-j sgn(f).Der ideale Differenziererhat den Dirac-Stoß als Impulsantwort. Die Approximation basiert auf Fourier-Reihenentwicklung des (periodischen) Amplitudenganges: H(f)=j2Ï–f.Ein idealer Integrator hat die Heaviside-Spungfunktion als Impulsantwort. Die Approximation basiert auf Fourier-Reihenentwicklung des (periodischen) Amplitudenganges: H(f)=½δ(f)+1/j2Ï–f.Alle Dateien (*)ModulEingabe anwendenAutor des Filters/SystemsAuto-SkalierungAutomatische Skalierung der y-Achse entsprechend Maximal- und MinimalwertAchseBandpaßBandsperreBandbreiteBesselBlackmanRahmenViereck (diskret)ButterworthC (*.c)Kann die Filterkoeffizienten für ein Filter mit diesen Parametern nicht erzeugen. Bitte prüfen Sie die Werte für den Grad, die Abtastfrequenz sowie alle weiteren Parameter.Kann ein solches Filter nicht erzeugen. Möglicherweise führt die Operation zu einem Ergebnis, in dem alle Koeffizienten annähernd Null sind.Kann die gewünschte Operation nicht ausführen. Es scheint, als ob Ihr Hauptspeicher nicht ausreicht.Cauer (Fall I)Cauer (Fall II)ÄndernKoeffizient ändernÄndert den Koeffizient von Abzweig z-%d in der ausgewählten ListeTschebyscheffTschebyscheff Inv.Hier markieren, falls die Mittenfrequenz als geometrisches Mittel zwischen unterer und oberer Grenzfrequenz angesehen werden soll (sonst arithmetisches Mittel).Wählen Sie das Objekt, für welches die Farbe geändert werden sollKreis (diskret)FilterklasseKoeffizientKoeffizient(en)FarbeKammfilter (FIR)CosinusKonnte das vor definierte Filter nicht von '%s' ladenKonnte das vordefinierte Filter von '%s' nicht ladenKonnte Bilddatei '%s' nicht findenKonnte Unterverzeichnis der Installation mit der Nummer %d nicht finden.Kreuz (diskret)GrenzfrequenzGrenzfrequenz (Hochpaß) oder Mittenfrequenz (Bandpaß, Bandsperre)Grad des FiltersGrad des SystemsNenner (%d)NennerkoeffizientenWollen Sie wirklich alle Koeffizienten in der ausgewählten Liste runden?Einen einzelnen Koeffizienten ändernEndepunkt der x-AchseEndepunkt der y-AchseFehler beim Exportieren in die Datei '%s'.Fehler beim Laden der Projektdatei '%s'.Fehler beim Drucken: %sFehler beim Speichern der Projektdatei '%s'.Exponentielles Mittelwertfilter (IIR)Koeffizienten exportierenKonnte Bild nicht aus Datei '%s' erzeugen: %sBei der Berechnung der Filterkoeffizienten hat sich herausgestellt, dass ein oder mehrere nahezu Null sind. Diese wurden auf Null gesetzt, wobei sich der Grad des Filters möglicherweise verringert hat.Für dieses Filter/System ist nur ein beschränkter Satz von Design-Daten verfügbar. Aus diesem Grund werden die Eingabefelder Typ und Beschreibung nicht aktualisiert (natürlich aber die angezeigten Koeffizienten).Einheit von Frequenzwerten bei der Ein- und AusgabeGaußkurveKurveGridHammingHanningHilfeHochpaßHilbert Transformator (FIR)Im(z)Eingabe "%s" für %s ist ungültig (Min. %G, Max. %G).KaiserAchsenbeschriftungLinie (kontinuierlich)Linear FIRProjektdatei ladenLogarithmischMATLAB (*.m)Pflicht-Tag '%s' nicht gefunden.VerschiedeneModulwinkel in GradSpalttiefpaß (FIR)Spalttiefpaß (IIR)Multipliziert alle Koeffizienten in der ausgewählten Liste mit dem eingegebenen Faktor.MultiplizierenAlle Koeffizienten mit einer Konstante multiplizierenKoeffizient modifizierenKeineZähler (%d)ZählerkoeffizientenAusgabe_präzisionSeite %d / %dParameter des Kaiser-FenstersWelligkeit im Durchlaßbereich in dBDifferenzierer (FIR)Idealer Integrator (FIR)Phasen_laufzeitText (*.txt)Diagramm druckenProjektinfoProjektbeschreibungProjektdateien (*%s)ProjekttitelRFUIntervall (Start, Stop) für Achse '%s' ist ungültig.Re(z)Rechteck (ideal)Diagramm-EinstellungenWelligkeitRundenAlle Koeffizienten rundenAbtastfrequenzStützwerteAbtastwert (diskret)Projektdatei speichernPlot EinstellungenGridIrgendetwas scheint mit dem Projekt in '%s' nicht in Ordnung.Irgendwann haben Sie einmal Filterkoeffizienten händisch geändert. Wollen Sie diese Änderungen wirklich verwerfen und alle Filterkoeffizienten jetzt neu generieren?Quadratisch 1. OrdnungQuadratischer CosinusStandard IIRStartStartpunkt der x-AchseStartpunkt der y-AchseStopMinimale Sperrdämpfung in dBStil der KurveSyntaxfehler in Zeile %d.Abzw.Das Kammfilter bildet das physikalische Modell eines einzelnen Echos nach. Es hat die Übertragungsfunktion: H(z)=1-z-n und deshalb eine lineare Phase.Das aktuelle Filter/System wurde noch nicht gespeichert. Wollen Sie trotzdem beenden?Das exponentielle Mittelwertfilter approximiert einen (analogen RC-) Tiefpaß erster Ordnung. Die Übertragungsfunktion lautet: H(z)=1/[n-(n-1)z-1].Das gleitende Mittelwertfilter (auch digitaler Fensterintegrator oder sinc-Filter genannt) ist eine Approximation der Impulsantwort des idealen Tiefpaß. Als FIR-Realisierung hat es die Übertragungsfunktion: H(z)=1+z-1+z-2+...+z-n.Das gleitende Mittelwertfilter (auch digitaler Fensterintegrator oder sinc-Filter genannt) ist eine Approximation der Impulsantwort des idealen Tiefpaß. Als IIR-Realisierung hat es die Übertragungsfunktion: H(z)=(1-z-n)/(1-z-1).Die Anzahl der signifikaten Ziffern bei der Ausgabe von ZahlenDie Anzahl der zu verwendenden Stützwerte (0 = Anzahl Pixel)Einheit von Zeitwerten bei der Ein- und AusgabeArt der FrequenztransformationUnerwartetes Tag '%s'.Einheiten_Dämpfung_AutorD_rosselung_Grad_Beschreibung_Bearbeiten_Export_Faktor_DateiEinheit _Frequenz_Geometrisch_Gruppenlaufzeit_Hilfe_Impulsantwort_Ein-/Ausgabe_Amplitudengang_Neu_Phasengang_SprungantwortEinheit _Zeit_Titel_Typ_AnsichtBandbr.Mittenfr.Grenzfr.Abtastfr.Ralf Hoppeunbenanntunbenannt.txtα=dfcgen-gtk-0.4/po/quot.sed0000644000175000017500000000023111702543377012417 00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g dfcgen-gtk-0.4/po/boldquot.sed0000644000175000017500000000033111702543377013261 00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g dfcgen-gtk-0.4/po/POTFILES.in0000644000175000017500000000115211753722411012504 00000000000000# List of source files containing translatable strings. # Copyright (C) 2006, 2011-2012 Ralf Hoppe # Source files src/support.c src/main.c src/designDlg.c src/mainDlg.c src/dfcProject.c src/filterResponse.c src/filterSupport.c src/mathPoly.c src/stdIirFilter.c src/helpDlg.c src/responseWin.c src/mathMisc.c src/mathFuncs.c src/cairoPlot.c src/fileDlg.c src/cfgSettings.c src/responseDlg.c src/editDlg.c src/stdIirDesignDlg.c src/miscDesignDlg.c src/projectFile.c src/miscFilter.c src/dialogSupport.c src/responsePlot.c src/linFirDesignDlg.c src/linFirFilter.c src/rootsPlot.c src/filterPrint.c dfcgen-gtk-0.4/aclocal.m40000644000175000017500000012630611767302610012162 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # 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. # 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # intlmacosx.m4 serial 1 (gettext-0.17) dnl Copyright (C) 2004-2007 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 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 package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [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 MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#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 MacOS 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]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [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 ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # 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. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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'. 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_$1_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 m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [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 8's {/usr,}/bin/sh. touch 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 ;; 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_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 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")` 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"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # 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. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _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"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != 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 AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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 AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # 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. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [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. AC_MSG_CHECKING([for style of include used by $am_make]) 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 AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl 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 --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # 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. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 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 ( 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 rm -f conftest.file 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # 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. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) dfcgen-gtk-0.4/configure0000755000175000017500000076574511767302611012252 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for Digital Filter Coefficients Generator (GTK+) 0.4. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. 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 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" 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 : # 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. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 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@ieee.org 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_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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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; } # 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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, 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.4' PACKAGE_STRING='Digital Filter Coefficients Generator (GTK+) 0.4' PACKAGE_BUGREPORT='ralf.hoppe@ieee.org' 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 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 GETTEXT_PACKAGE EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE 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__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 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_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 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' 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=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 ;; -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 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 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 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.4 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] --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.4:";; 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-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-debug enable debugging (default=no) --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --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 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.4 generated by GNU Autoconf 2.65 Copyright (C) 2009 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; } >/dev/null && { 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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.$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;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to ralf.hoppe@ieee.org ## ## ---------------------------------- ## _ASBOX ) | 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 || $as_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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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.4, which was generated by GNU Autoconf 2.65. 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX 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 cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX 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 ac_site_file1=$CONFIG_SITE 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" 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-aux "$srcdir"/build-aux; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$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/win32/Makefile" am__api_version='1.11' # 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 test "${ac_cv_path_install+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; } # Just in case sleep 1 echo timestamp > conftest.file # 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 ( 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 rm -f conftest.file 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 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; } 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 --run true"; then am_missing_run="$MISSING --run " 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}" != 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 test "${ac_cv_prog_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_path_mkdir+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 test "${ac_cv_prog_AWK+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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 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.4' 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $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 \ -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" CFLAGS_NDEBUG="-O3 -funroll-loops -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.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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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_set_status 77 as_fn_error "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 test "${ac_cv_objext+set}" = set; 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 test "${ac_cv_c_compiler_gnu+set}" = set; 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 test "${ac_cv_prog_cc_g+set}" = set; 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 #include #include /* 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 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='\' 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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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'. 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 8's {/usr,}/bin/sh. touch 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 ;; 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 test "${ac_cv_prog_CPP+set}" = set; 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 test "${ac_cv_path_GREP+set}" = set; 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" { test -f "$ac_path_GREP" && $as_test_x "$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 test "${ac_cv_path_EGREP+set}" = set; 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" { test -f "$ac_path_EGREP" && $as_test_x "$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 test "${ac_cv_header_stdc+set}" = set; 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 " eval as_val=\$$as_ac_Header if test "x$as_val" = 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" = x""yes; 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 test "${ac_cv_safe_to_define___extensions__+set}" = set; 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 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.17 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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 test "${ac_cv_path_MSGFMT+set}" = set; 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 test "${ac_cv_path_GMSGFMT+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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 test "${ac_cv_path_XGETTEXT+set}" = set; 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 echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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 test "${ac_cv_path_MSGMERGE+set}" = set; 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 test "${ac_cv_build+set}" = set; 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 test "${ac_cv_host+set}" = set; 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 echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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 GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&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. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path 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 test "${acl_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do 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 GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&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 test "${acl_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's 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 test "${acl_cv_rpath+set}" = set; 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 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 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" 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-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" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= 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"; 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/"'*$,,'` LIBICONV_PREFIX="$basedir" 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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; 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 test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; 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 { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; 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 test "${am_cv_func_iconv+set}" = set; 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 test "${am_cv_func_iconv_works+set}" = set; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi 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 int main () { /* 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 const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; 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, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #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 const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; 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, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #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)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi 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" fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= 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"; 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/"'*$,,'` LIBINTL_PREFIX="$basedir" 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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; 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 test "${ac_cv_prog_WINDRES+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 "$PKG_CONFIG"; then if test -n "$PKGCONF_CFLAGS"; then pkg_cv_PKGCONF_CFLAGS="$PKGCONF_CFLAGS" else 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` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PKGCONF_LIBS"; then pkg_cv_PKGCONF_LIBS="$PKGCONF_LIBS" else 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` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 --errors-to-stdout --print-errors "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10"` else PKGCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-2.0 gtk+-2.0 >= 2.12 gsl >= 1.10"` 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}: 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 test "${ac_cv_header_stdc+set}" = set; 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" = x""yes; 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 test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* 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. */ char *t; 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 saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; 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 test "${ac_cv_c_restrict+set}" = set; 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 test "${ac_cv_c_inline+set}" = set; 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" = x""yes; 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" = x""yes; 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" = x""yes; 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" = x""yes; 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" = x""yes; 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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file 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= 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 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. 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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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.4, which was generated by GNU Autoconf 2.65. 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.4 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 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=$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"` ;; 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/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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # 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 {' >"$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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$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 $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// 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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; 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="$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 "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 >"$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 "$tmp/subs.awk" >$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' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$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 "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$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 "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$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"" || { # Autoconf 2.62 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"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/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 assigment 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 assigment 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 $? 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.4/build-aux/0000755000175000017500000000000011767305162012271 500000000000000dfcgen-gtk-0.4/build-aux/config.sub0000755000175000017500000010242511702543376014200 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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. # 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) 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) 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*) 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 \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | 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 \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | 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 \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-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-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | 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-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | 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-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | 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 ;; 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 ;; 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) 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'm not sure what "Sysv32" means. Should this be sysv3.2? 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 ;; 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 ;; mingw32) basic_machine=i386-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 ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; 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 ;; 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) basic_machine=powerpc-unknown ;; ppc-*) 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) 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 ;; 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 ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-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 ;; 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. -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* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -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* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -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*) # 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 ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -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 ;; # 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 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; 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.4/build-aux/config.rpath0000755000175000017500000004364711702543376014537 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-2007 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 AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; 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 AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # 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 aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # 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 ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-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 ;; aix4* | aix5*) 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].*|aix5*) 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*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # 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 test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) 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=: ;; 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 AC_LIBTOOL_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' ;; aix4* | aix5*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) 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' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) 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) 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' ;; 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=/' <&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done 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 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 trap '(exit $?); exit' 1 2 13 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 starting with `-'. 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 # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # 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 -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` 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. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 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 eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && 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` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob 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.4/build-aux/missing0000755000175000017500000002623311702543376013616 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally 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 run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] 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 # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # 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.4/build-aux/config.guess0000755000175000017500000013105411702543376014535 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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 Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 # 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 tupples: *-*-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=`(/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 ;; *) 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*|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 # 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/[-_].*/\./'` ;; 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}" 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 ;; 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'` exit ;; 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: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:*:[456]) 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/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` 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:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) 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-gnu`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/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix 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-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu 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-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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 ;; 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 case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac 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 ;; 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 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi 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.4/build-aux/depcomp0000755000175000017500000004426711702543376013603 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac 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" # 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 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## 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). ## - 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## 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. tr ' ' ' ' < "$tmpdepfile" | ## 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. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then : else 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 ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # 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.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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:: \1 \\:p' >> "$depfile" echo " " >> "$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.4/TODO0000644000175000017500000000451611766157003011013 00000000000000* User interface The following improvements shall ensure similiar GUI features as are available in old Win3.x version. - Function: cairoPlot2d Think about transition to double coordinates in all functions below cairoPlot2d. Make axisX.start and axisX.stop positions dependent of precision - Function: createAxisLabel Parametrize margin by precision - Function: treeSelectionCallback Process double-clicks (see the tree-view tutorial on how to make this) - Function: responseWinCreate Restore size of drawing area from last session - Function: filterResponseTimeNew Allow user break - Feature: Predefined filters Improve description (and translation) of predefined filters - Feature: GTK-Help Implement GTK help, based on DocBook 5 * Filter design Improvements on algorithms currently implemented - Function: linFirFilterGen Correct the lowpass design cutoff frequency (see Bessel lowpass) when performing frequency transformations (depends on characteristic too, significant on perfect lowpass). - Function: ftrHighpass Handle odd degree * Stability - Function: linFirFilterGen Implement semantic checks on bandwidth, center and cutoff frequency - Function: stdIirFilterGen Implement sematic checks on bandwidth, center and cutoff frequency - Function: linFirFilterGen Use fpsetround()? - File: mathMisc.c Implement a generic math. error handler - Function: ftrBandstop Handle GSL_POSINF for call to filterResponsePoly() - Function: plotPhase Check phase response of linear FIR filters and improve the graph layout * Maintainability - Function: mathPolyCoeffs2Roots Try to avoid mixing error codes from gsl_errno.h and errno.h - Function: linFirDesignDlgApply Share code with IIR design dialog * Source style/comments - Function: genCosine2System Give formula - Function: chebyT Improve function description by the help of LaTeX - Function: timeResponseProcNext Describe algo used here * Optimization - Function: responseWidget Try to move some of these data into responsePlot.c * New features - Feature: New filter class ARBITRARY Support of arbitrary frequency specification by Parks-McClellan algorithm - Feature: Response Plot Display coordinate when mouse moves over graph area dfcgen-gtk-0.4/Makefile.in0000644000175000017500000007047611767302613012400 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL TODO \ build-aux/config.guess build-aux/config.rpath \ build-aux/config.sub build-aux/depcomp build-aux/install-sh \ build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive 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__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(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 distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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 a Debian package 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: @: $(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 .PRECIOUS: 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 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi 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) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ 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|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__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.lzma*) \ lzma -dc $(distdir).tar.lzma | $(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 a+w $(distdir) mkdir $(distdir)/_build mkdir $(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 \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(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__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: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma 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-recursive uninstall uninstall-am \ uninstall-docDATA uninstall-local # Remove doc directory on uninstall uninstall-local: -rm -r $(docdir) dist-debian: dist svn2cl -r 'HEAD:1' --linelen=80 --group-by-day --separate-daylogs \ --reparagraph --authors=".svn-authors" --output=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) rm -Rf $(dist_debian_dir)/debian/.svn 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.4/ChangeLog0000644000175000017500000007513211767303073012100 000000000000002012-06-17 Ralf Hoppe * ChangeLog, Makefile.in, config.h.in, configure, data/Makefile.in, data/filters/Makefile.in, data/pixmaps/Makefile.in, data/templates/Makefile.in, dist/dfcgen-gtk-0.4.tar.gz, dist/dfcgen-gtk_0.4-1.dsc, dist/dfcgen-gtk_0.4-1.tar.gz, dist/dfcgen-gtk_0.4-1_i386.changes dist/dfcgen-gtk_0.4-1_i386.deb, dist/dfcgen-gtk212-0.4.zip, dist/dfcgen-gtk220-0.4.zip, dist/debian/Makefile.in, dist/debian/changelog, dist/win32/Makefile.in, doc/Doxyfile, doc/Makefile.in, include/Makefile.in, po/de.gmo, po/de.po, po/dfcgen-gtk.pot, src/Makefile.in: dfcgen-gtk release 0.4 * dist/dfcgen-gtk-0.3.tar.gz, dist/dfcgen-gtk_0.3-1.dsc, dist/dfcgen-gtk_0.3-1.tar.gz, dist/dfcgen-gtk_0.3-1_i386.changes, dist/dfcgen-gtk_0.3-1_i386.deb: Removed in preparation of release 0.4 * Makefile.am (dist-win32): Missing zlib1.dll added to Win32 package. 2012-06-15 Ralf Hoppe * Makefile.am (dist-win32): Bugfix in for loop, in case copying a DLL fails. 2012-06-14 Ralf Hoppe * .svn-authors, Makefile.am (dist-debian): Create a ChangeLog file from SVN logs. 2012-06-13 Ralf Hoppe * TODO: Todo associated with mainDlgCreate() completed. 2012-06-11 Ralf Hoppe * include/designDlg.h, src/designDlg.c, src/mainDlg.c: Some internal cleanup of variable usage in mainDlgCreate(). 2012-06-10 Ralf Hoppe * Makefile.am: GTK 2.20 requires to copy more DLLs (MinGW). * src/responseWin.c (responseWinRedraw): Enable print button after creation of a valid filter/system. * dist/debian/Makefile.am, dist/win32/Makefile.am: Some build files not installed anymore. * include/doxygen.h: Automated Win32 distribution (MinGW) build by Makefile rule 'dist-win32'. * Makefile.am, configure.ac, src/Makefile.am: Automated Win32 distribution build by Makefile rule 'dist-win32'. * src/mainDlg.c (mainDlgCreate): Do not set a main window icon from PNG file, if running on Win32. * dist/Makefile.in, dist/win32/Makefile.in, dist/debian/Makefile.in: initial revision * README, COPYING, .project, dist/win32/dfcgen-gtk.rc, dist/debian/control, dist/debian/dfcgen-gtk.desktop, data/templates/export.c, data/templates/export.m: Name DFCGEN changed to DFCGen. 2012-06-08 Ralf Hoppe * src/editDlg.c, src/responseDlg.c, src/responseWin.c, src/dialogSupport.c: Defines used for GTK buttons. * src/main.c: Build on MinGW now is working, inclusive Win32 resource file processing and gettext support. * include/support.h, src/miscDesignDlg.c, src/projectFile.c, src/support.c: Build on MinGW now is working, inclusive Win32 resource file processing and gettext support. * data/filters/Makefile.am, data/pixmaps/Makefile.am, data/templates/Makefile.am, dist/win32/Makefile.am, dist/win32/dfcgen-gtk.rc, src/Makefile.am: Build on MinGW now is working, inclusive Win32 resource file processing and gettext support. * configure.ac: Build on MinGW now is working, inclusive Win32 resource file processing and gettext support. 2012-06-07 Ralf Hoppe * include/base.h: DEBUG_LOG() macro conditionals changed. * src/fileDlg.c: FIXME comment removed. * include/doxygen.h: Typo (related to po directory) corrected. * COPYING, data/templates/export.c, data/templates/export.m: Name of dfcgen-gtk package corrected. 2012-06-03 Ralf Hoppe * src/mainDlg.c: Make help button inactive, because no help available so far. * dist/win32, dist/win32/Makefile.am, dist/Makefile.am, dist/win32/dfcgen-gtk.rc, dist/win32/dfcgen.ico: Win32 specific files added. * dist/debian/Makefile.am: Directory 'dist' added to distribution package. * dfcgen-gtk.desktop: Moved to sub-directory 'dist/debian'. * configure.ac, Makefile.am: Directory 'dist' added to distribution package. * dist/debian/dfcgen-gtk.desktop: Moved into debian sub-directory. 2012-06-02 Ralf Hoppe * include/base.h, src/cairoPlot.c, src/cfgSettings.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterPrint.c, src/filterResponse.c, src/mainDlg.c, src/mathPoly.c, src/miscDesignDlg.c, src/projectFile.c, src/responseDlg.c, src/support.c: MALLOC() and FREE() replaced by g_malloc() and g_free(). * src/editDlg.c, src/helpDlg.c, src/main.c, src/mainDlg.c, src/miscDesignDlg.c, src/projectFile.c, src/responseWin.c, src/support.c: Handling of sub-directories in pkgdatadir made compatible with Win32 port. * src/filterPrint.c (filterPrintPageHeader): Avoid GLib critical warning in case project title, author or description is not defined. * src/Makefile.am, include/support.h: Handling of sub-directories in pkgdatadir made compatible with Win32 port. * include/gui.h: Redefinition of PACKAGE_ICON avoided. * data/filters/Makefile.am, data/pixmaps/Makefile.am, data/templates/Makefile.am: New defines PACKAGE_FILTERS_DIR, PACKAGE_PIXMAPS_DIR, PACKAGE_TEMPLATES_DIR used. * dfcgen-gtk.desktop: Menu application name changed to DFCGEN (GTK+). * configure.ac: New defines PACKAGE_FILTERS_DIR, PACKAGE_PIXMAPS_DIR, PACKAGE_TEMPLATES_DIR created. CFLAGS_MACHINE removed. AC_INIT() changed to new style. 2012-05-29 Ralf Hoppe * configure.ac: Added -DGDK_DISABLE_DEPRECATED and -DGTK_DISABLE_DEPRECATED to CFLAGS_LANG. All AC_CHECK_LIB() macros removed because work done by PKG_CHECK_MODULES(). * include/gui.h (GLADE_HOOKUP_OBJECT): gtk_widget_ref() replaced by g_object_unref() and gtk_widget_ref() replaced by g_object_ref(), because both functions are deprecated. * include/mathFuncs.h: Functions hypot() and pow10() renamed to uppercase letters, because both are macros now. * src/Makefile.am: PACKAGE_LIBS moved away from AM_LDFLAGS into dfcgen_gtk_LDADD, else does not compile under Win32. * src/designDlg.c (designDlgBoxRealize): Deprecated macro GTK_WIDGET_TOPLEVEL() conditionally replaced by function gtk_widget_is_toplevel(), which is available since GTK 2.18. * src/dfcProject.c (dfcPrjExport): Error number ENOTSUP (unsupported in MinGW) changed to EINVAL. * src/cairoPlot.c, src/linFirFilter.c, src/mathFuncs.c, src/stdIirFilter.c: Functions hypot() and pow10() renamed to uppercase letters, because both are macros now. 2012-05-20 Ralf Hoppe * .: config.log added to property "svn:ignore" * dist/dfcgen-gtk-0.2.tar.gz, dist/dfcgen-gtk-0.3.tar.gz, dist/dfcgen-gtk_0.2-1.dsc, dist/dfcgen-gtk_0.2-1.tar.gz, dist/dfcgen-gtk_0.2-1_i386.changes, dist/dfcgen-gtk_0.2-1_i386.deb, dist/dfcgen-gtk_0.3-1.dsc, dist/dfcgen-gtk_0.3-1.tar.gz, dist/dfcgen-gtk_0.3-1_i386.changes, dist/dfcgen-gtk_0.3-1_i386.deb: dfcgen-gtk release 0.3 * dist/dfcgen-gtk-0.1.tar.gz, dist/dfcgen-gtk-0.2.tar.gz, dist/dfcgen-gtk_0.1-1.dsc, dist/dfcgen-gtk_0.1-1.tar.gz, dist/dfcgen-gtk_0.1-1_i386.changes, dist/dfcgen-gtk_0.1-1_i386.deb, dist/dfcgen-gtk_0.2-1.dsc, dist/dfcgen-gtk_0.2-1.tar.gz, dist/dfcgen-gtk_0.2-1_i386.changes, dist/dfcgen-gtk_0.2-1_i386.deb: dfcgen-gtk release 0.2 * dist/dfcgen-gtk-0.1.tar.gz, dist/dfcgen-gtk_0.1-1.dsc, dist/dfcgen-gtk_0.1-1.tar.gz, dist/dfcgen-gtk_0.1-1_i386.changes, dist/dfcgen-gtk_0.1-1_i386.deb: dfcgen-gtk release 0.1 * COPYING, ChangeLog, Makefile.in, README, TODO, config.h.in, configure, data/Makefile.in, data/filters/Makefile.in, data/pixmaps/Makefile.in, dist/debian/changelog, doc/Doxyfile, doc/Makefile.in, include/Makefile.in, po/de.gmo, po/de.po, po/dfcgen-gtk.pot, src/Makefile.in: Release of version 0.3 on Ubuntu 10.04 Lucid Lynx. * po/POTFILES.in: Copyright string updated. * include/Makefile.am: Copyright string updated. 2012-05-19 Ralf Hoppe * include/editDlg.h, include/fileDlg.h, include/mainDlg.h: Copyright string updated. * src/support.c, include/support.h: Some format changes. * include/projectFile.h: Export of coefficients, using template files, implemented. * include/doxygen.h: New option --enable-debug for configure script, inclusive CFLAGS. * data/templates/Makefile.in, data/templates/export.c, data/templates/export.txt, include/dfcProject.h, src/Makefile.am, src/dfcProject.c, src/fileDlg.c, src/mainDlg.c: Export of coefficients, using template files, implemented. * src/dialogSupport.c, src/filterResponse.c, src/mathPoly.c: Doxygen comments corrected. * dist/debian/control, dist/debian/copyright: Homepage changed to www.dfcgen.de. * src/main.c, src/projectFile.c: GTK versions before 2.12 not supported anymore. * src/miscDesignDlg.c: Conditional define for path now associated with TEST, not DEBUG. No use of GtkTooltips, because obsolete since 2.12. * src/editDlg.c, src/linFirDesignDlg.c, src/responseDlg.c, src/responseWin.c, src/stdIirDesignDlg.c: No use of GtkTooltips, because obsolete since 2.12. * include/filterPrint.h, src/cfgSettings.c, src/filterPrint.c, src/helpDlg.c: GTK versions before 2.12 not supported anymore. * configure.ac, Makefile.am: Pixmaps moved to sub-directory data/pixmaps. * data/Makefile.am, data/templates/Makefile.am: Export of coefficients, using template files, implemented. 2012-05-13 Ralf Hoppe * .cproject, .project: Build path corrected. 2012-05-05 Ralf Hoppe * data/filters/Makefile.in, data/templates/Makefile.in, data/templates/Makefile.am, data/templates/export.c, data/templates/export.m, data/templates/export.txt: Initial revision. 2012-04-28 Ralf Hoppe * pixmaps: Pixmaps moved into a subdirectory below pkgdatadir. * data/pixmaps: Pixmaps move to datatdir. * data/Makefile.am, data/Makefile.in, data/differentiator1.dfc, data/differentiator2.dfc, data/filters, data/filters/Makefile.am, data/filters/differentiator1.dfc, data/filters/differentiator2.dfc, data/filters/fitting15_poly2.dfc, data/filters/fitting21_poly2.dfc, data/filters/fitting5_poly2.dfc, data/filters/fitting7_poly2.dfc, data/filters/fitting7_poly4.dfc, data/filters/fitting9_poly2.dfc, data/filters/fitting9_poly4.dfc, data/filters/integrator_38rule.dfc, data/filters/integrator_rect.dfc, data/filters/integrator_simpson.dfc, data/filters/integrator_trapez.dfc, data/fitting15_poly2.dfc, data/fitting21_poly2.dfc, data/fitting5_poly2.dfc, data/fitting7_poly2.dfc, data/fitting7_poly4.dfc, data/fitting9_poly2.dfc, data/fitting9_poly4.dfc, data/integrator_38rule.dfc, data/integrator_rect.dfc, data/integrator_simpson.dfc, data/integrator_trapez.dfc, data/templates: Predefined filters moved into a subdirectory. 2012-01-11 Ralf Hoppe * .cproject, .project: Eclipse project file(s) added. 2012-01-06 Ralf Hoppe * doc/Doxyfile: LaTeX generation turned on for embedded formulas. 2012-01-03 Ralf Hoppe * ChangeLog, Makefile.in, po/de.gmo, po/de.po: Last minute changes before 0.2 release. * Makefile.am: File dfcgen-gtk.desktop added to doc directory. * dist/debian/control: Section changed and Homepage added. * src/helpDlg.c: Changed gtk_about_dialog_set_name() to gtk_about_dialog_set_program_name() because this function is obsolete. * dfcgen-gtk.desktop: Initial revision of Gnome desktop file. * dist/debian/postinst, dist/debian/prerm: Added post-install and pre-rm script for Gnome desktop files. 2012-01-01 Ralf Hoppe * README, TODO, aclocal.m4, config.h.in, configure, dfcgen-gtk.glade, dist/debian/changelog, data/Makefile.in, Makefile.in, ChangeLog, COPYING, po/de.gmo, po/de.po, po/dfcgen-gtk.pot, pixmaps/Makefile.in, doc/Makefile.in: Release of version 0.2 on Ubuntu 10.04 Lucid Lynx. * include/Makefile.am, include/Makefile.in, include/editDlg.h, include/fileDlg.h, include/filterPrint.h, include/mainDlg.h, src/mainDlg.c, src/responseWin.c, src/fileDlg.c, src/filterPrint.c, src/Makefile.in: Support for coefficients and response plot printing. * src/helpDlg.c: Emacs mode/coding added. * src/cairoPlot.c (cairoPlot2d): Bugfix with respect to the position of y-axis name. * doc/Doxyfile: Doxygen 1.7 update. * src/support.c: base.h added to include files. * include/dfcProject.h: Doxygen comments corrected. * include/doxygen.h: "make dist-debian" added to developers documentation section. * include/base.h: Version/Id keyword corrected. 2011-10-16 Ralf Hoppe * src/dialogSupport.c (dlgGetDouble): Function g_strtod() used instead of strtod(). * include/dfcgen.h: minor (Doxygen) comment changes * src/dfcProject.c, src/filterResponse.c, src/filterSupport.c, src/mathMisc.c, src/mathPoly.c: minor (Doxygen) comment changes * src/support.c: String functions of GLib used, instead of . Macro FREE() used instead of g_free(). * src/responseDlg.c: Macro FREE() used instead of g_free() * src/mainDlg.c: Macro FREE() used instead of g_free(). Defines for GTK stock items used. * src/cairoPlot.c: Macro FREE() used instead of g_free() * src/cfgSettings.c, src/miscDesignDlg.c, src/projectFile.c: String functions of GLib used, instead of . Macro FREE() used instead of g_free(). * src/editDlg.c: String functions of GLib used, instead of . Scrolling policy of project description GtkTextView widget changed to GTK_POLICY_ALWAYS in y-direction. Macro FREE() used instead of g_free() * include/filterPrint.h, src/filterPrint.c: Project info and coefficients printing implemented (supported starting with GTK 2.10), inclusive German translations. * include/fileDlg.h, po/POTFILES.in, po/de.gmo, po/de.po, po/dfcgen-gtk.pot, src/Makefile.am, src/fileDlg.c (fileDlgPrintActivate): Project info and coefficients printing implemented (supported starting with GTK 2.10), inclusive German translations. 2011-09-24 Ralf Hoppe * src/cfgSettings.c (cfgFlushSettings): Added a comment to configuration file, which forces Emacs conf-mode. 2011-09-03 Ralf Hoppe * src/editDlg.c (createSettingsDlg), src/linFirDesignDlg.c (linFirDesignDlgCreate), src/miscDesignDlg.c (createDialog), src/responseDlg.c (responseDlgCreate), src/stdIirDesignDlg.c (stdIirDesignDlgCreate): Warning regarding a non-zero page size within gtk_adjustment_new() for a GtkSpinButton fixed. * src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterResponse.c, src/helpDlg.c: Copyright in file header corrected. 2011-08-28 Ralf Hoppe * dist/debian/control: Version field removed * Makefile.am (dist-debian): call to dpkg-parsechangelog added * dist/debian/control: Update of dependencies and version numbers. More comments. * dist/debian/rules: simplified for debhelper V7 * dist/debian/docs: NEWS and AUTHORS removed (not part of dist) * dist/debian/dirs: directory /usr/sbin removed * dist/debian/copyright: introduction extended * dist/debian/compat: debhelper version 7 used * Makefile.am: dist-debian target for Debian package build added. * COPYING: Introduction added. * README: Package dependies and compile preconditions removed. 2011-08-21 Ralf Hoppe * data/Makefile.am: Installation directory corrected. Header keyword changed to Id. * Makefile.am, configure.ac, doc/Makefile.am, include/Makefile.am, pixmaps/Makefile.am, src/Makefile.am: Header keyword changed to Id * include/base.h, include/cairoPlot.h, include/cfgSettings.h, include/designDlg.h, include/dfcProject.h, include/dfcgen.h, include/dialogSupport.h, include/doxygen.h, include/editDlg.h, include/fileDlg.h, include/filterResponse.h, include/filterSupport.h, include/gui.h, include/helpDlg.h, include/linFirDesignDlg.h, include/linFirFilter.h, include/mainDlg.h, include/mathFuncs.h, include/mathMisc.h, include/mathPoly.h, include/miscDesignDlg.h, include/miscFilter.h, include/projectFile.h, include/responseDlg.h, include/responsePlot.h, include/responseWin.h, include/rootsPlot.h, include/stdIirDesignDlg.h, include/stdIirFilter.h: Header keyword changed to Id * src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterResponse.c, src/filterSupport.c, src/helpDlg.c, src/linFirDesignDlg.c, src/linFirFilter.c, src/mainDlg.c, src/mathFuncs.c, src/mathMisc.c, src/mathPoly.c, src/miscDesignDlg.c, src/miscFilter.c, src/projectFile.c, src/responseDlg.c, src/responsePlot.c, src/responseWin.c, src/rootsPlot.c, src/stdIirDesignDlg.c, src/stdIirFilter.c: Header keyword changed to Id * configure.ac: property svn:keywords set to "Id Revision Date Author" * po/stamp-po: part of distribution, so must be under version control * doc/Makefile.am, doc/dfcgen.sty: property svn:keywords set to "Id Revision Date Author" * data/Makefile.am: property svn:keywords set to "Id Revision Date Author" * pixmaps/Makefile.am: property svn:keywords set to "Id Revision Date Author" * po/de.po, po/dfcgen-gtk.pot: property svn:keywords set to "Id Revision Date Author" * include/Makefile.am, include/base.h, include/cairoPlot.h, include/cfgSettings.h, include/designDlg.h, include/dfcProject.h, include/dfcgen.h, include/dialogSupport.h, include/doxygen.h, include/editDlg.h, include/fileDlg.h, include/filterResponse.h, include/filterSupport.h, include/gui.h, include/helpDlg.h, include/linFirDesignDlg.h, include/linFirFilter.h, include/mainDlg.h, include/mathFuncs.h, include/mathMisc.h, include/mathPoly.h, include/miscDesignDlg.h, include/miscFilter.h, include/projectFile.h, include/responseDlg.h, include/responsePlot.h, include/responseWin.h, include/rootsPlot.h, include/stdIirDesignDlg.h, include/stdIirFilter.h, include/support.h: property svn:keywords set to "Id Revision Date Author" * src/Makefile.am, src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterResponse.c, src/filterSupport.c, src/helpDlg.c, src/linFirDesignDlg.c, src/linFirFilter.c, src/main.c, src/mainDlg.c, src/mathFuncs.c, src/mathMisc.c, src/mathPoly.c, src/miscDesignDlg.c, src/miscFilter.c, src/projectFile.c, src/responseDlg.c, src/responsePlot.c, src/responseWin.c, src/rootsPlot.c, src/stdIirDesignDlg.c, src/stdIirFilter.c, src/support.c: property "svn:keywords set to "Id Revision Date Author" * COPYING, INSTALL, Makefile.am, README, TODO: property "svn:keywords set to "Id Revision Date Author" * configure.ac: comment on AM_INIT_AUTOMAKE() added 2011-08-20 Ralf Hoppe * po/de.po: Update of line numbers and file header. * src/support.c: glade_set_atk_action_description() commented out, because unused. * configure.ac: AC_CONFIG_AUX_DIR() used. * Makefile.am, data/Makefile.am, doc/Makefile.am, include/Makefile.am, pixmaps/Makefile.am, src/Makefile.am: Migration from Anjuta Version 1 structure to a regular Automake structure. 2011-08-16 Ralf Hoppe * m4/gettext.m4, m4/iconv.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/nls.m4, m4/po.m4, m4/progtest.m4: Added gettext M4 macros * m4: Added M4 macros (most from gettext) * AUTHORS, NEWS: Removed (Automake strictness 'foreign' does not require this file) * AUTHORS, NEWS: Added again (else 'make check' does not work) * AUTHORS: Removed (Automake strictness 'foreign' does not require this file) * build-aux/config.guess, build-aux/config.rpath, build-aux/config.sub, build-aux/depcomp, build-aux/install-sh, build-aux/missing: moved from root directory into a sub-directory * build-aux: Autoconf/Automake aux files moved to this directory * ltmain.sh: Removed (libtool not used by this project) * NEWS: Removed (Automake strictness 'foreign' does not require this file) * config.guess, config.rpath, config.sub, depcomp, install-sh, missing: Removed (moved to build-aux directory) * config.guess, config.sub, depcomp, install-sh, missing: commit before delete resp. move to build-aux directory 2011-08-14 Ralf Hoppe * include/base.h, include/cairoPlot.h, include/cfgSettings.h, include/designDlg.h, include/dfcProject.h, include/dfcgen.h, include/dialogSupport.h, include/doxygen.h, include/editDlg.h, include/fileDlg.h, include/filterResponse.h, include/filterSupport.h, include/gui.h, include/helpDlg.h, include/linFirDesignDlg.h, include/linFirFilter.h, include/mainDlg.h, include/mathFuncs.h, include/mathMisc.h, include/mathPoly.h, include/miscDesignDlg.h, include/miscFilter.h, include/projectFile.h, include/responseDlg.h, include/responsePlot.h, include/responseWin.h, include/rootsPlot.h, include/stdIirDesignDlg.h, include/stdIirFilter.h: Update of file header (cvs2svn, copyright). * src/stdIirFilter.c: Update of file header (cvs2svn, copyright). * src/stdIirDesignDlg.c: Update of file header (cvs2svn, copyright). * src/rootsPlot.c: Update of file header (cvs2svn, copyright). * src/responsePlot.c: Update of file header (cvs2svn, copyright). * src/responseDlg.c: Update of file header (cvs2svn, copyright). * src/projectFile.c: Update of file header (cvs2svn, copyright). * src/miscFilter.c: Update of file header (cvs2svn, copyright). * src/miscDesignDlg.c: Update of file header (cvs2svn, copyright). * src/mathPoly.c: Update of file header (cvs2svn, copyright). * src/mathMisc.c: Update of file header (cvs2svn, copyright). * src/mathFuncs.c: Update of file header (cvs2svn, copyright). * src/mainDlg.c: * Bugfix for conditional compile of print support. * Update of file header (cvs2svn, copyright). * src/linFirFilter.c: Update of file header (cvs2svn, copyright). * src/linFirDesignDlg.c: Update of file header (cvs2svn, copyright). * src/helpDlg.c: * Define PACKAGE_WEBSITE renamed to (more common) PACKAGE_URL. * Update of file header (cvs2svn, copyright). * src/filterSupport.c: Update of file header (cvs2svn, copyright). * src/filterResponse.c: Update of file header (cvs2svn, copyright). * src/fileDlg.c: * Bugfix for conditional compile of print support. * Update of file header (cvs2svn, copyright). * src/editDlg.c: Update of file header (cvs2svn, copyright). * src/dialogSupport.c: Update of file header (cvs2svn, copyright). * src/dfcProject.c: Update of file header (cvs2svn, copyright). * src/designDlg.c: Update of file header (cvs2svn, copyright). * src/responseWin.c: * Bugfix for conditional compile of print support * Update of file header (cvs2svn, copyright) * src/cfgSettings.c: Update of file header (cvs2svn, copyright) * src/cairoPlot.c: Update of file header (cvs2svn, copyright) * configure.ac: AC_PROG_LIBTOOL removed. AC_PREREQ(2.65) added for Ubuntu 10.04 LTS (Lucid Lynx). Some minor comment changes. * po/POTFILES.in: New file (with gettext-0.17) * src/Makefile: Removed (generated by configure) 2011-08-13 Ralf Hoppe * po/LINGUAS: New file (from gettext-0.17) * po/Makevars, po/Rules-quot, po/boldquot.sed, po/en@boldquot.header, po/en@quot.header, po/insert-header.sin, po/quot.sed, po/remove-potcdate.sin: New file, from gettext-0.17 * po/Makefile.in.in: Upgrade to gettext-0.17 * po/Makefile, po/Makefile.in, po/POTFILES: Removed (generated by configure). * po/ChangeLog: Removed (merged with ChangeLog at root). * pixmaps/Makefile, include/Makefile, doc/Makefile, data/Makefile: Removed (generated by configure). 2011-08-12 Ralf Hoppe * Makefile, config.h, config.log, config.status, libtool, stamp-h1: Removed (generated by configure). * dfcgen-gtk.prj: Removed (Anjuta version 1, obsolete). * acconfig.h: Removed (not really needed, see GNU Autoconf manual). * setup-gettext: Removed (not needed anymore by gettext). * config.rpath: Added (needed by the AM_GNU_GETTEXT autoconf macro). * autogen.sh: Removed (performed by autoreconf). * description-pak: Removed (because only Debian packaging supported, but this was for RPM's). * mkinstalldirs: Removed (not needed anymore, was only for old gettext versions). * acinclude.m4: Removed (should not be used for new packages, see GNU Automake manual). 2011-08-07 Ralf Hoppe * configure.in: Removed. * Makefile.am: Upgrade to automake-1.11 and autoconf-2.65 * configure.ac: Upgrade to automake-1.11 and autoconf-2.65 2010-10-13 Ralf Hoppe * description-pak: Added. 2007-09-22 Ralf Hoppe * include/designDlg.h: *** empty log message *** 2006-11-18 Ralf Hoppe * doc/Makefile: Prefix directory changed. 2006-11-11 Ralf Hoppe * dist, dist/debian, dist/debian/changelog, dist/debian/compat, dist/debian/control, dist/debian/copyright, dist/debian/dirs, dist/debian/docs, dist/debian/rules: Initial revision * dfcgen-gtk.prj: Directories tmp, debian, DEBIAN excluded from project * TODO: Some todos added. * Makefile, Makefile.am, Makefile.in, config.h, config.log, config.status, configure, configure.in, data/Makefile, include/Makefile, include/Makefile.am, include/Makefile.in, pixmaps/Makefile, src/Makefile: PACKAGE_DATA_DIR and PACKAGE_DOC_DIR corrected. 2006-11-09 Ralf Hoppe * README: Some capitalized words made lowercase. * COPYING: Now it is GPL. 2006-11-08 Ralf Hoppe * Makefile.am, include/Makefile, include/Makefile.in: New generated. * po/de.gmo, po/de.po: Some strings corrected. * TODO: New todo for response plots added. * doc/dfcgen.sty: Now requires amsmath. * include/Makefile, include/Makefile.am, include/Makefile.in, include/cairoPlot.h, include/dfcProject.h, include/filterResponse.h, include/filterSupport.h, include/linFirFilter.h, include/responsePlot.h, include/rootsPlot.h, include/stdIirFilter.h: Last changes before release 0.1. * pixmaps/amplitude.png: Initial revision. * config.h, config.h.in, config.log, config.status, configure, configure.in, dfcgen-gtk.prj, dfcgen-gtk.pws, libtool, pixmaps/Makefile, pixmaps/Makefile.am, pixmaps/Makefile.in: Newly generated by Anjuta before release 0.1 * po/Makefile, po/de.gmo, po/de.po, po/dfcgen-gtk.pot: Final translations before release 0.1 * src/Makefile, src/Makefile.am, src/Makefile.in, src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/fileDlg.c, src/filterResponse.c, src/filterSupport.c, src/linFirFilter.c, src/mainDlg.c, src/miscFilter.c, src/responseDlg.c, src/responsePlot.c, src/responseWin.c, src/rootsPlot.c, src/stdIirFilter.c: Last changes before release 0.1 * AUTHORS, NEWS, README, TODO: First usuable revision. * Makefile, Makefile.am, Makefile.in: Newly generated by Anjuta. * COPYING, INSTALL, depcomp, dfcgen-gtk.glade, dfcgen-gtk.gladep, install-sh, missing: Initial revision. 2006-11-04 Ralf Hoppe * include/doxygen.h, include/editDlg.h, include/linFirDesignDlg.h, include/rootsPlot.h, pixmaps, pixmaps/Makefile, pixmaps/Makefile.am, pixmaps/Makefile.in, pixmaps/attenuation.png, pixmaps/charfunc.png, pixmaps/dfcgen.png, pixmaps/grpdelay.png, pixmaps/impulse.png, pixmaps/phase.png, pixmaps/phasedelay.png, pixmaps/step.png, src/linFirDesignDlg.c, src/linFirFilter.c, src/rootsPlot.c: Initial revision. * po/Makefile, po/POTFILES, po/POTFILES.in, po/de.gmo, po/de.po, po/dfcgen-gtk.pot: First german translation. * include/base.h, include/cairoPlot.h, include/cfgSettings.h, include/dfcProject.h, include/dfcgen.h, include/dialogSupport.h, include/filterResponse.h, include/filterSupport.h, include/gui.h, include/linFirFilter.h, include/mainDlg.h, include/mathFuncs.h, include/mathMisc.h, include/mathPoly.h, include/miscDesignDlg.h, include/projectFile.h, include/responseDlg.h, include/stdIirDesignDlg.h, include/stdIirFilter.h, src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterResponse.c, src/filterSupport.c, src/main.c, src/mainDlg.c, src/mathFuncs.c, src/mathMisc.c, src/mathPoly.c, src/miscDesignDlg.c, src/miscFilter.c, src/projectFile.c, src/responseDlg.c, src/responsePlot.c, src/responseWin.c, src/stdIirDesignDlg.c, src/stdIirFilter.c: Further work (near 0.1 now). 2006-09-11 Ralf Hoppe * Makefile, config.h, config.log, config.status, data/Makefile, doc/Makefile, include/Makefile, libtool, po/Makefile, po/Makefile.in, po/POTFILES, src/Makefile, stamp-h1: Initial revision * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, README, TODO, acconfig.h, acinclude.m4, aclocal.m4, autogen.sh, config.guess, config.h.in, config.sub, configure, configure.in, data, data/Makefile.am, data/Makefile.in, data/differentiator1.dfc, data/differentiator2.dfc, data/fitting15_poly2.dfc, data/fitting21_poly2.dfc, data/fitting5_poly2.dfc, data/fitting7_poly2.dfc, data/fitting7_poly4.dfc, data/fitting9_poly2.dfc, data/fitting9_poly4.dfc, data/integrator_38rule.dfc, data/integrator_rect.dfc, data/integrator_simpson.dfc, data/integrator_trapez.dfc, dfcgen-gtk.prj, dfcgen-gtk.pws, doc, doc/Doxyfile, doc/Makefile.am, doc/Makefile.in, doc/dfcgen.sty, include, include/Makefile.am, include/Makefile.in, include/base.h, include/cairoPlot.h, include/cfgSettings.h, include/designDlg.h, include/dfcProject.h, include/dfcgen.h, include/dialogSupport.h, include/fileDlg.h, include/filterResponse.h, include/filterSupport.h, include/gui.h, include/helpDlg.h, include/linFirFilter.h, include/mainDlg.h, include/mathFuncs.h, include/mathMisc.h, include/mathPoly.h, include/miscDesignDlg.h, include/miscFilter.h, include/projectFile.h, include/responseDlg.h, include/responsePlot.h, include/responseWin.h, include/stdIirDesignDlg.h, include/stdIirFilter.h, include/support.h, ltmain.sh, mkinstalldirs, po, po/ChangeLog, po/Makefile.in.in, po/POTFILES.in, po/de.gmo, po/de.po, po/dfcgen-gtk.pot, setup-gettext, src, src/Makefile.am, src/Makefile.in, src/cairoPlot.c, src/cfgSettings.c, src/designDlg.c, src/dfcProject.c, src/dialogSupport.c, src/editDlg.c, src/fileDlg.c, src/filterResponse.c, src/filterSupport.c, src/helpDlg.c, src/main.c, src/mainDlg.c, src/mathFuncs.c, src/mathMisc.c, src/mathPoly.c, src/miscDesignDlg.c, src/miscFilter.c, src/projectFile.c, src/responseDlg.c, src/responsePlot.c, src/responseWin.c, src/stdIirDesignDlg.c, src/stdIirFilter.c, src/support.c, stamp-h.in: Initial CVS import. 2006-09-11 Ralf Hoppe * : Standard project directories initialized by cvs2svn. dfcgen-gtk-0.4/README0000644000175000017500000000271311765037447011210 00000000000000What is dfcgen-gtk? DFCGen, the Digital Filter Coefficients Generator, is a FREEWARE tool/program, which may assist you 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. It supports: * Linear FIR systems of various characteristics with windowing functions as Hamming, Hanning, Blackman or Kaiser window * Standard IIR filters like Cauer, Chebyshev, Butterworth and Bessel * Various systems of free degree as e.g. Integrator, Hilbert transformer, Comb filter etc. * Predefined systems with determined coefficients (and degree) as fitting filters, differentiators * Frequency transformation into high-pass, band-pass and band-stop * Edit of coefficients (change, delete, round) * Pole/Zero analysis * Graphical visualisation of system characteristics (plots) as magnitude response, phase response, attenuation, characteristic function, group delay, phase delay, impulse response and step response * In plots: zoom, lin./log. and auto-scaling * Printing of coefficients and response plots * Save and load of the defined filter * Export of coefficients to plain text, "C" language and MATLAB scripts dfcgen-gtk-0.4/src/0000755000175000017500000000000011767305164011170 500000000000000dfcgen-gtk-0.4/src/dfcProject.c0000644000175000017500000002453111761226245013340 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * \e 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 Ralf Hoppe * \version $Id: dfcProject.c 203 2012-05-29 20:08:04Z ralf $ * ******************************************************************************/ /* 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.4/src/fileDlg.c0000644000175000017500000003773711764057607012646 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file fileDlg.c * \brief File menu dialogs. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: fileDlg.c 230 2012-06-07 08:00:07Z ralf $ * ******************************************************************************/ /* 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.4/src/mathFuncs.c0000644000175000017500000001417411761226173013207 00000000000000/******************************************************************************/ /** * \file * Mathematical functions. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: mathFuncs.c 201 2012-05-29 20:07:23Z ralf $ * ******************************************************************************/ /* 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) || (x > 1)) { return 0; } /* if */ return 1; } /* 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) || (x > 1)) { return 0; } /* if */ return 0.53836 - 0.46164 * cos (2 * M_PI * x); } /* mathFuncHamming() */ /* FUNCTION *******************************************************************/ /** \e Hanning 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 mathFuncHanning (double x) { if ((x < 0) || (x > 1)) { return 0; } /* if */ return 0.5 - 0.5 * cos (2 * M_PI * x); } /* mathFuncHanning() */ /* 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) || (x > 1)) { return 0; } /* if */ return 0.42 - 0.5 * cos (2 * M_PI * x) + 0.08 * cos(4 * 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.4/src/mainDlg.c0000644000175000017500000013772211765424753012647 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file mainDlg.c * \brief Main dialog elements (right, bottom of window) handling. * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * * \version $Id: mainDlg.c 256 2012-06-11 17:24:58Z ralf $ * * \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) (GtkWidget *top, 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 (GtkWidget *widget, FLTCOEFF *pFilter, MATHPOLY *poly, int index); static BOOL mainDlgCoeffsRound (GtkWidget *widget, FLTCOEFF *pFilter, MATHPOLY *poly, int index); static BOOL mainDlgCoeffsFactor (GtkWidget *widget, 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* createCoeffListTreeView (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 fillCoeffListTreeView (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 widget Widget that has emitted the "activate" signal. * \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 (GtkWidget *widget, 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 widget Widget that has emitted the "activate" signal. * \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 (GtkWidget *widget, 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). * * \attention If the "activate" signal comes from a \c GtkButton * then the reference in \p widget cannot be passed to * gtk_message_dialog_new(), because this reference must * be of type GTK_WINDOW (but GTK_BUTTON is not inherited * from GTK_WINDOW). * * \param widget Widget that has emitted the "activate" signal. * \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 (GtkWidget *widget, 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 \c GtkButton that was clicked. * \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 (widget, &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). * * \todo Process double-clicks (see the tree-view tutorial on how to make this) ******************************************************************************/ 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 *******************************************************************/ /** 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* createCoeffListTreeView (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" signal */ g_signal_connect_after ((gpointer) gtk_tree_view_get_selection (tree), "changed", G_CALLBACK (treeSelectionCallback), pOther); return tree; } /* createCoeffListTreeView() */ /* 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 fillCoeffListTreeView (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 */ } /* fillCoeffListTreeView() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* FUNCTION *******************************************************************/ /** \e 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. * \todo Reduce number of variables used (optimize the function) ******************************************************************************/ 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); gdk_pixbuf_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 = createCoeffListTreeView (&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 = createCoeffListTreeView (&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) { GtkListStore *storeNum, *storeDen; 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); storeNum = GTK_LIST_STORE (gtk_tree_view_get_model (treeNumerator)); storeDen = GTK_LIST_STORE (gtk_tree_view_get_model (treeDenominator)); gtk_list_store_clear (storeNum); gtk_list_store_clear (storeDen); if (valid) { fillCoeffListTreeView (treeNumerator, storeNum, &pFilter->num); fillCoeffListTreeView (treeDenominator, storeDen, &pFilter->den); } /* if */ responseWinRedraw (RESPONSE_TYPE_SIZE); rootsPlotUpdate (pFilter); return TRUE; } /* if */ return FALSE; } /* mainDlgUpdateFilter() */ /* 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.4/src/stdIirDesignDlg.c0000644000175000017500000010771311755741235014304 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter dialog functions. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: stdIirDesignDlg.c 179 2012-05-19 15:56:13Z ralf $ * ******************************************************************************/ /* 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][4] = { /* entryCutF, entryCenterF, entryBandwidth, checkGeometric */ {TRUE, FALSE, FALSE, FALSE}, /* FTR_NON */ {FALSE, TRUE, FALSE, FALSE}, /* FTR_HIGHPASS */ {FALSE, TRUE, TRUE, TRUE}, /* FTR_BANDPASS */ {FALSE, TRUE, TRUE, TRUE}, /* FTR_BANDSTOP */ }; /* 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][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.4/src/cairoPlot.c0000644000175000017500000015207511762432560013216 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 Ralf Hoppe * \version $Id: cairoPlot.c 218 2012-06-02 15:46:55Z ralf $ * ******************************************************************************/ /* 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 (0.5) /**< 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.4/src/responseDlg.c0000644000175000017500000007353411764417656013564 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file responseDlg.c * \brief Response settings/properties dialog. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: responseDlg.c 240 2012-06-08 15:52:14Z ralf $ * ******************************************************************************/ /* 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_spin_button_set_value (GTK_SPIN_BUTTON (widget), pDiag->num); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); 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.4/src/linFirDesignDlg.c0000644000175000017500000010161711755741235014266 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter dialog functions. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: linFirDesignDlg.c 179 2012-05-19 15:56:13Z ralf $ * ******************************************************************************/ /* 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, NULL, N_("Rectangular (perfect)")}, {LINFIR_TYPE_COS, NULL, N_("Cosine")}, {LINFIR_TYPE_COS2, NULL, N_("Squared cosine")}, {LINFIR_TYPE_GAUSS, NULL, N_("Gaussian")}, {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, NULL, N_("None")}, /* LINFIR_DSPWIN_RECT */ {LINFIR_DSPWIN_HAMMING, NULL, N_("Hamming")}, /* LINFIR_DSPWIN_HAMMING */ {LINFIR_DSPWIN_HANNING, NULL, N_("Hanning")}, /* LINFIR_DSPWIN_HANNING */ {LINFIR_DSPWIN_BLACKMAN, NULL, N_("Blackman")}, /* LINFIR_DSPWIN_BLACKMAN */ {LINFIR_DSPWIN_KAISER, NULL, N_("Kaiser")}, /* LINFIR_DSPWIN_KAISER */ }; static const gboolean ftrEntry[FTR_SIZE][4] = { /* entryCutF, entryCenterF, entryBandwidth, checkGeometric */ {TRUE, FALSE, FALSE, FALSE}, /* FTR_NON */ {FALSE, TRUE, FALSE, FALSE}, /* FTR_HIGHPASS */ {FALSE, TRUE, TRUE, TRUE}, /* FTR_BANDPASS */ {FALSE, TRUE, TRUE, TRUE}, /* FTR_BANDSTOP */ }; /* 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. * \todo Share code with IIR design dialog. ******************************************************************************/ 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][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.4/src/cfgSettings.c0000644000175000017500000006334711762432560013545 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file cfgSettings.c * \brief \e 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 Ralf Hoppe * \version $Id: cfgSettings.c 218 2012-06-02 15:46:55Z ralf $ * ******************************************************************************/ /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ }, { /* 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 /* style, num, flags */ } }; /* 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 \e 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 \e 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.4/src/editDlg.c0000644000175000017500000005107011764417656012642 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file editDlg.c * \brief \e Edit dialog(s). * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: editDlg.c 240 2012-06-08 15:52:14Z ralf $ * ******************************************************************************/ /* 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 */ responseWinRedraw (RESPONSE_TYPE_SIZE); /* redraw all plots */ rootsPlotRedraw (); 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); gdk_pixbuf_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.4/src/helpDlg.c0000644000175000017500000000614411762431155012633 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Dialogs from the Help menu. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: helpDlg.c 217 2012-06-02 15:34:04Z ralf $ * ******************************************************************************/ /* 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); gdk_pixbuf_unref (pixbuf); } /* if */ (void) gtk_dialog_run (GTK_DIALOG (dialogAbout)); gtk_widget_destroy (dialogAbout); } /* helpDlgMenuActivate() */ /******************************************************************************/ /* END OF FILE */ /******************************************************************************/ dfcgen-gtk-0.4/src/responseWin.c0000644000175000017500000010271711765146055013600 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response window creation and callbacks. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: responseWin.c 254 2012-06-10 16:32:45Z ralf $ * ******************************************************************************/ /* 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 window (top-level widget) */ GtkWidget* draw; /**< \e GtkDrawingArea widget */ GtkWidget* label; /**< Label which shows the number of points */ } RESPONSE_WIN; /* LOCAL CONSTANT DEFINITIONS *************************************************/ #define RESPONSE_WIN_GRAPH_THICKNESS (1.5) /**< 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 responseWinDrawAreaMapped (GtkWidget* widget, gpointer user_data); static void responseWinDrawAreaDestroy (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, /* 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, "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, "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, "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, "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, "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, "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, "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_skip_taskbar_hint (GTK_WINDOW (pDesc->topWidget), TRUE); /* added */ gtk_window_set_skip_pager_hint (GTK_WINDOW (pDesc->topWidget), TRUE); /* added */ 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); gdk_pixbuf_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 (responseWinDrawAreaDestroy), pDesc); g_signal_connect ((gpointer) pDesc->draw, "map", G_CALLBACK (responseWinDrawAreaMapped), 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 responseWinDrawAreaDestroy(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 */ } /* responseWinDrawAreaDestroy() */ /* 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 responseWinDrawAreaMapped (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 */ } /* responseWinDrawAreaMapped() */ /* 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++) { gtk_widget_set_sensitive (responseWidget[type].btnPrint, filterValid); (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.4/src/dialogSupport.c0000644000175000017500000003010711764415436014112 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file dialogSupport.c * \brief Dialog helper functions. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: dialogSupport.c 235 2012-06-08 15:32:46Z ralf $ * ******************************************************************************/ /* 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, 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.4/src/miscDesignDlg.c0000644000175000017500000006743711764415421014004 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 Ralf Hoppe * \version $Id: miscDesignDlg.c 234 2012-06-08 15:32:33Z ralf $ * ******************************************************************************/ /* 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.4/src/filterSupport.c0000644000175000017500000003001411702543376014132 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Filter support functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: filterSupport.c 131 2011-10-16 15:35:22Z ralf $ * ******************************************************************************/ /* 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.4/src/main.c0000644000175000017500000000300411764415513012172 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 Ralf Hoppe * \version $Id: main.c 237 2012-06-08 15:33:31Z ralf $ * ******************************************************************************/ #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.4/src/mathPoly.c0000644000175000017500000004516711762432560013062 00000000000000/******************************************************************************/ /** * \file mathPoly.c * \brief Polynomial functions. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: mathPoly.c 218 2012-06-02 15:46:55Z ralf $ * ******************************************************************************/ /* 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 : T(x) = cos(n*arcos(x)) * if x >= 1 use : T(x) = cosh(n*arcosh(x)) because cosh(jx) = cos(x) * if x < -1 you get a little problem, because cosh(x+j*Pi) = - cosh(x) * and therfore arcosh(-x) = arcosh(|x|) + j*Pi , * then use T(x) = (-1)^n * cosh(n*arcosh(|x|)) * * \param degree Degree \f$n\f$ of \e Chebyshev polynomial. * \param x Argument. * * \return Value of \e Chebyshev polynomial \f$\chebyT_n(x)\f$. * \todo Improve description by the help of LaTeX ******************************************************************************/ 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.4/src/filterResponse.c0000644000175000017500000005201211762432560014254 00000000000000/******************************************************************************/ /** * \file filterResponse.c * \brief Filter response functions. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: filterResponse.c 218 2012-06-02 15:46:55Z ralf $ * ******************************************************************************/ /* 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(). * \todo Describe algo used here ******************************************************************************/ 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.4/src/stdIirFilter.c0000644000175000017500000012311511761226154013656 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Standard IIR filter coefficients generator. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: stdIirFilter.c 200 2012-05-29 20:07:08Z ralf $ * ******************************************************************************/ /* 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 *******************************************************************/ /** Generates an IIR filter from standard approximations. The cutoff frequency * always is assumed to be the 3dB point of magnitude response. * * \note gsl_error_handler_t * gsl_set_error_handler (gsl_error_handler_t new_handler) * fpsetround() * * \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). * \todo Implement sematic checks on bandwidth, center and cutoff * frequency wrt. sample frequency. ******************************************************************************/ 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; 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); 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.4/src/support.c0000644000175000017500000001165111764415421012767 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 Ralf Hoppe * \version $Id: support.c 234 2012-06-08 15:32:33Z ralf $ * ******************************************************************************/ #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.4/src/projectFile.c0000644000175000017500000016743611764415421013536 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file projectFile.c * \brief Project file handling. * * \note The \e 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 \e dfcgen project file are formated * in the \e C locale for LC_CTYPE. * * \author Copyright (C) 2006, 2011-2012 Ralf Hoppe * \version $Id: projectFile.c 234 2012-06-08 15:32:33Z ralf $ * ******************************************************************************/ /* 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 \e 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. * * \attention Do not change because used as index. */ 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. * * \attention Do not change because used as index. */ 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 \e 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 \e 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 \e 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 \e 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 \e 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 \e 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 \e 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 \e 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 \e 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 \e 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 *******************************************************************/ /** 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); 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 */ } /* 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 \e 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.4/src/Makefile.in0000644000175000017500000004607211767302613013162 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(dfcgen_gtk_SOURCES) DIST_SOURCES = $(dfcgen_gtk_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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 .PRECIOUS: 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) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 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) @rm -f dfcgen-gtk$(EXEEXT) $(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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 all all-am all-local check check-am clean \ clean-binPROGRAMS clean-generic ctags 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 uninstall uninstall-am uninstall-binPROGRAMS # 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.4/src/responsePlot.c0000644000175000017500000004253411702543376013757 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Digital filter response plotter. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: responsePlot.c 105 2011-08-21 15:23:11Z ralf $ * ******************************************************************************/ /* 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 */ plotMagnitude, /* sampleFunc */ }, { RESPONSE_TYPE_ATTENUATION, plotAttenuation, }, { RESPONSE_TYPE_CHAR, plotChar, }, { RESPONSE_TYPE_PHASE, plotPhase, }, { RESPONSE_TYPE_DELAY, plotPhaseDelay, }, { RESPONSE_TYPE_GROUP, plotGroupDelay, }, { RESPONSE_TYPE_IMPULSE, timeResponse, /* sampleFunc */ plotImpulseInit, /* initFunc */ timeResponseEnd, /* endFunc */ }, { RESPONSE_TYPE_STEP, timeResponse, /* sampleFunc */ plotStepInit, /* initFunc */ timeResponseEnd, /* endFunc */ } }; /* 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.4/src/linFirFilter.c0000644000175000017500000005513211761226211013640 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Linear FIR filter coefficients generator. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: linFirFilter.c 202 2012-05-29 20:07:37Z ralf $ * ******************************************************************************/ /* 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); /* FUNCTION *******************************************************************/ /** Mathematical function \f$y=f(x;a)\f$ with parameter \f$a\f$. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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)(double x, double parameter); /* 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 firWinKaiser (double x, double parameter); static double firWinRectangle (double x, double parameter); static double firWinHamming (double x, double parameter); static double firWinHanning (double x, double parameter); static double firWinBlackman (double x, double parameter); 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[ c_i=\frac{\sin\left[2\pi x\,(i-n/2)\right]}{2\pi x\,(i-n/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 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[ c_i=\frac{}{} \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). * \todo Give formula ******************************************************************************/ 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 ((i - deg2)), &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() */ /* FUNCTION *******************************************************************/ /** Rectangular window function. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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 (double x, double parameter) { return mathFuncRectangle (x); } /* firWinRectangle() */ /* FUNCTION *******************************************************************/ /** \e Hamming window function. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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 (double x, double parameter) { return mathFuncHamming (x); } /* firWinHamming() */ /* FUNCTION *******************************************************************/ /** \e Hanning window function. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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 firWinHanning (double x, double parameter) { return mathFuncHanning (x); } /* firWinHanning() */ /* FUNCTION *******************************************************************/ /** \e Blackman window function. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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 (double x, double parameter) { return mathFuncBlackman (x); } /* firWinBlackman() */ /* FUNCTION *******************************************************************/ /** \e Blackman window function. * * \param x Argument \f$x\f$ between 0 and 1. * \param parameter 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 (double x, double parameter) { return mathFuncKaiser (x, parameter); } /* 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] * * \param pFilter Pointer to linear FIR lowpass that coefficients shall * transformed. * * \return The frequency where the magnitude response has it's * maximum. * \todo Handle odd degree ******************************************************************************/ static double ftrHighpass (FLTCOEFF *pFilter) { MATHPOLY *poly = &pFilter->num; double magnitude = gsl_poly_eval (poly->coeff, poly->degree + 1, 1.0); if (GSL_IS_EVEN (poly->degree)) { poly->coeff[poly->degree / 2] -= magnitude; } /* if */ 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$. * * * \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 */ if (geometric) { fc = HYPOT (fc, 0.5 * bw); } /* if */ factor = 2 * 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. * * \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; fc = ftrBandpass (pFilter, fc, bw, geometric); magnitude = filterResponsePoly (2 * M_PI * fc / pFilter->f0, poly); if (GSL_IS_EVEN (poly->degree)) { poly->coeff[poly->degree / 2] -= magnitude; } /* if */ return pFilter->f0 / 2.0 - DBL_EPSILON; } /* ftrBandstop() */ /* EXPORTED FUNCTION DEFINITIONS **********************************************/ /* 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 is allocated * in the function linFirFilterGen(). * * \return Zero on success, else an error number (see errno.h or * gsl_errno.h for predefined codes). * \todo Implement semantic checks on bandwidth, center and cutoff * frequency wrt. sample frequency. * \todo Correct the lowpass design cutoff frequency (see Bessel * lowpass) when performing frequency transformations * (depends on characteristic too, significant on perfect * lowpass). * \todo Use fpsetround()? ******************************************************************************/ int linFirFilterGen (LINFIR_DESIGN *pDesign, FLTCOEFF *pFilter) { static const LINFIR_SYSGEN_FUNC genFuncs[LINFIR_TYPE_SIZE] = { genRectangularSystem, /* LINFIR_TYPE_RECT */ genCosineSystem, /* LINFIR_TYPE_COS */ genCosine2System, /* LINFIR_TYPE_COS2 */ genSquaredSystem, /* LINFIR_TYPE_GAUSS */ genGaussianSystem /* LINFIR_TYPE_SQR */ }; static const LINFIR_WINDOW_FUNC winFuncs[LINFIR_DSPWIN_SIZE] = { firWinRectangle, /* LINFIR_DSPWIN_RECT */ firWinHamming, /* LINFIR_DSPWIN_HAMMING */ firWinHanning, /* LINFIR_DSPWIN_HANNING */ firWinBlackman, /* LINFIR_DSPWIN_BLACKMAN */ firWinKaiser /* LINFIR_DSPWIN_KAISER */ }; int i, err; gsl_error_handler_t *oldHandler; double fnorm; /* unity normation frequency */ 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 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: pDesign->cutoff = 0.5 * pDesign->ftr.bw; break; /* FTR_BANDPASS, FTR_BANDSTOP */ case FTR_HIGHPASS : pDesign->cutoff = pDesign->ftr.fc; break; /* FTR_HIGHPASS */ case FTR_NON: /* LOWPASS */ break; /* FTR_NON */ default: ASSERT(0); } /* switch */ ASSERT (pDesign->type < LINFIR_TYPE_SIZE); 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] ((double)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.4/src/miscFilter.c0000644000175000017500000002142211702543376013354 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 Ralf Hoppe * \version $Id: miscFilter.c 105 2011-08-21 15:23:11Z ralf $ * ******************************************************************************/ /* 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.4/src/mathMisc.c0000644000175000017500000000566311702543376013031 00000000000000/******************************************************************************/ /** * \file * Miscellaneous mathematical functions and macros. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: mathMisc.c 131 2011-10-16 15:35:22Z ralf $ * * \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.4/src/Makefile.am0000644000175000017500000000344511765103345013145 00000000000000## -*- Makefile -*- ## ## Copyright (c) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 251 2012-06-10 11:37:09Z ralf $ ## ## Process this file with automake to produce Makefile.in ## 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.4/src/rootsPlot.c0000644000175000017500000004533211702543376013266 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Roots plot functions. * * \author Copyright (C) 2006, 2011 Ralf Hoppe * \version $Id: rootsPlot.c 105 2011-08-21 15:23:11Z ralf $ * ******************************************************************************/ /* 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 */ 0.5, PLOT_STYLE_LINE_ONLY, 0, /* thickness, style, num */ NULL, NULL, /* progressFunc, initFunc */ plotUnitCircleTop, NULL, /* sampleFunc, endFunc */ circleColor, /* colors */ }, { /* stability boundary circle (top) */ {realText}, {imagText}, NULL, /* x, y, pData */ 0.5, 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 */ 1.5, 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 */ 1.5, 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 */ 1.5, 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.4/src/filterPrint.c0000644000175000017500000005420611762432560013561 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file filterPrint.c * \brief Filter print functions. * * \author Copyright (C) 2011-2012 Ralf Hoppe * \version $Id: filterPrint.c 218 2012-06-02 15:46:55Z ralf $ * ******************************************************************************/ /* 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.4/src/designDlg.c0000644000175000017500000002453711765424753013173 00000000000000/********************* -*- mode: C; coding: utf-8 -*- *************************/ /** * \file * Design dialogs management. * * \author Copyright (C) 2006, 2011, 2012 Ralf Hoppe * \version $Id: designDlg.c 256 2012-06-11 17:24:58Z ralf $ * ******************************************************************************/ /* 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.4/m4/0000755000175000017500000000000011767305161010716 500000000000000dfcgen-gtk-0.4/m4/po.m40000644000175000017500000004460611702543373011526 00000000000000# po.m4 serial 15 (gettext-0.17) dnl Copyright (C) 1995-2007 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 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 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) 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([AM_PROG_MKDIR_P])dnl defined by automake 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.17]) 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" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/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 assigment 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 assigment 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" 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" <, 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 echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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.4/m4/gettext.m40000644000175000017500000003457011702543373012573 00000000000000# gettext.m4 serial 60 (gettext-0.17) dnl Copyright (C) 1995-2007 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 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 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. 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([$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 MacOS 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_TRY_LINK([#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_TRY_LINK([#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_TRY_LINK([#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], []) dfcgen-gtk-0.4/m4/nls.m40000644000175000017500000000226611702543373011700 00000000000000# nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 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 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 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.4/m4/lib-link.m40000644000175000017500000007205511702543373012610 00000000000000# lib-link.m4 serial 13 (gettext-0.17) dnl Copyright (C) 2001-2007 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_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 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_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]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) 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]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 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 ]) 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= 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"; 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/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" 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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 ]) 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"; 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"; 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.4/m4/lib-ld.m40000644000175000017500000000653111702543373012246 00000000000000# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 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/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.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 ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh 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 GCC]) 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. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path 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 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do 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 GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) dfcgen-gtk-0.4/m4/lib-prefix.m40000644000175000017500000001503611702543373013144 00000000000000# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 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 a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib 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 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) dfcgen-gtk-0.4/m4/iconv.m40000644000175000017500000001375311702543373012225 00000000000000# iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 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_TRY_LINK will then fail, the second AC_TRY_LINK 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_TRY_LINK([#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_TRY_LINK([#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 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* 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 const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; 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, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #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 const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; 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, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #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)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) 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) ]) 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_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || 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([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) dfcgen-gtk-0.4/dist/0000755000175000017500000000000011767305165011345 500000000000000dfcgen-gtk-0.4/dist/win32/0000755000175000017500000000000011767305165012307 500000000000000dfcgen-gtk-0.4/dist/win32/dfcgen.ico0000644000175000017500000000207606457226346014161 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.4/dist/win32/Makefile.in0000644000175000017500000002333411767302613014274 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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 .PRECIOUS: 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 TAGS: ctags: CTAGS CTAGS: 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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 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 uninstall uninstall-am # 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.4/dist/win32/dfcgen-gtk.rc0000644000175000017500000000252411765037447014574 00000000000000/***************************************************************************** * dfcgen-gtk windows resource file, to be compiled with RC (Microsoft) or * WINDRES (MinGW) * * Author: Copyright (C) 2011-2012 Ralf Hoppe * Version: $Id$ * ******************************************************************************/ #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.4\000" VALUE "InternalName", PACKAGE "\000" VALUE "OriginalFilename", PACKAGE ".exe\000" VALUE "ProductName", PACKAGE " für Windows\000" VALUE "E-Mail", "ralf.hoppe@ieee.org" END END END DFCGen ICON "dfcgen.ico" dfcgen-gtk-0.4/dist/win32/Makefile.am0000644000175000017500000000040111765130205014243 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 253 2012-06-10 14:34:44Z ralf $ ## ## Process this file with automake to produce Makefile.in ## EXTRA_DIST = dfcgen-gtk.rc dfcgen.ico dfcgen-gtk-0.4/dist/debian/0000755000175000017500000000000011767305165012567 500000000000000dfcgen-gtk-0.4/dist/debian/dirs0000644000175000017500000000001011702543376013357 00000000000000usr/bin dfcgen-gtk-0.4/dist/debian/postinst0000755000175000017500000000074011702543376014316 00000000000000#!/bin/sh # -*- mode: shell-script -*- # # Copyright (C) 2012 Ralf Hoppe # # post installation script the dfcgen-gtk Debian package # installs icon and desktop files on Ubuntu # set +e if [ -n $XDG_DATA_DIRS ]; then xdg-icon-resource install --mode system --size 32 /usr/share/dfcgen-gtk/pixmaps/dfcgen.png dfcgen-gtk xdg-desktop-menu install --mode system /usr/share/doc/dfcgen-gtk/dfcgen-gtk.desktop fi # do not indicate any error set -e exit 0 dfcgen-gtk-0.4/dist/debian/docs0000644000175000017500000000003411702543376013354 00000000000000README TODO COPYING INSTALL dfcgen-gtk-0.4/dist/debian/prerm0000755000175000017500000000057611702543376013567 00000000000000#!/bin/sh # -*- mode: shell-script -*- # # Copyright (C) 2012 Ralf Hoppe # # post deinstallation script of the dfcgen-gtk Debian package # set +e if [ -n $XDG_DATA_DIRS ]; then xdg-icon-resource uninstall --mode system --size 32 dfcgen-gtk.png xdg-desktop-menu uninstall --mode system dfcgen-gtk.desktop fi # do not indicate any error set -e exit 0 dfcgen-gtk-0.4/dist/debian/control0000644000175000017500000000336711765037447014126 00000000000000# # Debian Control File # Note: Build a Debian package with 'dpkg-buildpackage -rfakeroot' # # Copyright (C) 2006, 2011, 2012 Ralf Hoppe # Source: dfcgen-gtk Section: electronics Priority: extra Maintainer: Ralf Hoppe Build-Depends: debhelper (>= 7), autotools-dev, libc6-dev, libgsl0-dev (>= 1.10), libgtk2.0-dev (>= 2.12) Standards-Version: 3.8.3 # Now the Debian policy standard (see package debian-policy). The evolution of # Debian policy is described in file upgrading-checklist.txt. Notice that there # is also an Ubuntu policy standard (which is mostly equivalent). # # The policy package contains: # - Debian Policy Manual # - Linux Filesystem Hierarchy Standard (FHS) # - Authoritative list of virtual package names # - Paper about libc6 migration # - Policy checklist for upgrading your packages # # Ubuntu 5.10 => Debian-Policy 3.6.1 # Ubuntu 10.04 => Debian-Policy 3.8.4 # Ubuntu 11.04 => Debian-Policy 3.9.1 Package: dfcgen-gtk Architecture: i386 # # (deprecated) Ubuntu 5.10 => libgtk2.0-0 2.8, libgsl0 1.6 # Ubuntu 8.04 (Hardy) => libgtk2.0-0 2.12, libgsl0ldbl 1.10 # Ubuntu 10.04 (Lucid) => libgtk2.0-0 2.20, libgsl0ldbl 1.13 Depends: libc6, libgsl0ldbl (>= 1.10), libgtk2.0-0 (>= 2.12) Homepage: http://www.dfcgen.de Description: Digital Filter Coefficients Generator (DFCGen) GTK+ DFCGen, the Digital Filter Coefficients Generator, is a free program, which 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.4/dist/debian/copyright0000644000175000017500000005154411753715514014451 00000000000000This work was packaged for Debian by: Ralf Hoppe on Sun, 21 Aug 2011 15:28:26 +0200 It was downloaded from: http://www.dfcgen.de Upstream Author(s): Ralf Hoppe Copyright: Copyright (C) 2006, 2011-2012 Ralf Hoppe License: 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; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright (C) 2006, 2011 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.4/dist/debian/dfcgen-gtk.desktop0000644000175000017500000000076411765037447016125 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=GNOME;Electronics; StartupNotify=false dfcgen-gtk-0.4/dist/debian/Makefile.in0000644000175000017500000002742411767302612014557 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = 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__installdirs = "$(DESTDIR)$(docdir)" DATA = $(dist_doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ POSUB = @POSUB@ 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@ 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@ dist_doc_DATA = dfcgen-gtk.desktop EXTRA_DIST = \ changelog \ compat \ control \ copyright \ dirs \ docs \ rules \ postinst \ prerm 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/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dist/debian/Makefile .PRECIOUS: 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_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ 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-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: 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)$(docdir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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_docDATA 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_docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_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 maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-dist_docDATA # 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.4/dist/debian/rules0000755000175000017500000000066311702543376013571 00000000000000#!/usr/bin/make -f # -*- makefile -*- # debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ dfcgen-gtk-0.4/dist/debian/compat0000644000175000017500000000000211702543376013702 000000000000007 dfcgen-gtk-0.4/dist/debian/Makefile.am0000644000175000017500000000055411765130205014534 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 253 2012-06-10 14:34:44Z ralf $ ## ## Process this file with automake to produce Makefile.in ## dist_doc_DATA = dfcgen-gtk.desktop EXTRA_DIST = \ changelog \ compat \ control \ copyright \ dirs \ docs \ rules \ postinst \ prerm dfcgen-gtk-0.4/dist/debian/changelog0000644000175000017500000000145211766713440014361 00000000000000dfcgen-gtk (0.4-1) unstable; urgency=medium * Win32/MinGW platform support * Bugfixes -- Ralf Hoppe Fri, 15 Jun 2012 22:12:03 +0200 dfcgen-gtk (0.3-1) unstable; urgency=medium * Export of coefficients to MATLAB, C and plain text * Predefined filters moved into a subdirectory * Bugfixes -- Ralf Hoppe Sat, 01 Jan 2012 18:26:00 +0200 dfcgen-gtk (0.2-1) unstable; urgency=medium * Migration to Ubuntu 10.04 (Lucid Lynx) respective Debian 5.0 * Coefficients and response plot printing implemented (supported from GTK 2.10 upward) -- Ralf Hoppe Sat, 01 Jan 2012 18:26:00 +0200 dfcgen-gtk (0.1-1) unstable; urgency=low * Initial release. -- Ralf Hoppe Fri, 10 Nov 2006 21:25:10 +0100 dfcgen-gtk-0.4/dist/Makefile.in0000644000175000017500000004141111767302612013325 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ 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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.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/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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@ 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@ POSUB = @POSUB@ 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@ 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 .PRECIOUS: 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" 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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 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: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive 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-recursive uninstall uninstall-am # 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.4/dist/Makefile.am0000644000175000017500000000036311762633304013315 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 223 2012-06-03 10:04:52Z ralf $ ## ## Process this file with automake to produce Makefile.in ## SUBDIRS = debian win32 dfcgen-gtk-0.4/INSTALL0000644000175000017500000003633211702543377011360 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. dfcgen-gtk-0.4/Makefile.am0000644000175000017500000000674411767303140012360 00000000000000## -*- Makefile -*- ## ## Copyright (C) 2006, 2011-2012 Ralf Hoppe ## ## Version: $Id: Makefile.am 265 2012-06-17 07:25:20Z ralf $ ## ## Process this file with automake to produce Makefile.in ## ACLOCAL_AMFLAGS = -I m4 SUBDIRS = po include src data doc dist doc_DATA = \ README\ COPYING\ ChangeLog\ INSTALL EXTRA_DIST = $(doc_DATA) # Remove doc directory on uninstall uninstall-local: -rm -r $(docdir) # Maintainer rule for building a Debian package dist_debian_dir="dist/$(distdir)" dist-debian: dist svn2cl -r 'HEAD:1' --linelen=80 --group-by-day --separate-daylogs \ --reparagraph --authors=".svn-authors" --output=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) rm -Rf $(dist_debian_dir)/debian/.svn cd $(dist_debian_dir) && dpkg-buildpackage -rfakeroot @echo '--------------------------------------------------------------------' @dpkg-parsechangelog -l./dist/debian/changelog @echo '--------------------------------------------------------------------' -rm -Rf $(dist_debian_dir) # maintainer rule for "package" build on MinGW if BUILD_OS_MINGW32 GTK_VERSION = $(shell $(PKG_CONFIG) --modversion "gtk+-2.0" | \ sed -n 's/^\([0-9]\+\)\.\([0-9]\+\)\(\.[0-9]*\)\?/\1\2/p') dist_win32_dir = ./dist/$(PACKAGE)$(GTK_VERSION)-$(VERSION) # all GTK/GDK DLLs needed by dfcgen-gtk (heuristically determined) GTK_DLL_COMMON = libgio-2.0-0.dll libatk-1.0-0.dll libcairo-2.dll libgdk_pixbuf-2.0-0.dll \ libgdk-win32-2.0-0.dll libglib-2.0-0.dll libgmodule-2.0-0.dll \ libgobject-2.0-0.dll libgsl-0.dll libgslcblas-0.dll \ libgtk-win32-2.0-0.dll libiconv-2.dll libintl-8.dll \ libpango-1.0-0.dll libpangocairo-1.0-0.dll libpangowin32-1.0-0.dll \ libpng*.dll libgthread-2.0-0.dll libpangoft2-1.0-0.dll zlib1.dll GTK212_DLL_ADDONS = intl.dll libssp-0.dll GTK220_DLL_ADDONS = freetype6.dll libexpat-1.dll libfontconfig-1.dll GTK_DLL_LIST = $(GTK_DLL_COMMON) $(GTK212_DLL_ADDONS) $(GTK220_DLL_ADDONS) dist-win32: all @echo "Building Win32 distribution in $(dist_win32_dir) ..." rm -fR $(dist_win32_dir) mkdir $(dist_win32_dir) cp ./src/$(PACKAGE)$(EXEEXT) $(dist_win32_dir) mkdir $(dist_win32_dir)/share cp -R ./data/pixmaps $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/pixmaps/Makefile* $(dist_win32_dir)/share/pixmaps/.svn cp -R ./data/filters $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/filters/Makefile* $(dist_win32_dir)/share/filters/.svn cp -R ./data/templates $(dist_win32_dir)/share && rm -fR $(dist_win32_dir)/share/templates/Makefile* $(dist_win32_dir)/share/templates/.svn mkdir $(dist_win32_dir)/share/locale cp -R /mingw/share/locale/de $(dist_win32_dir)/share/locale cp -R ./$(POSUB)/de.gmo $(dist_win32_dir)/share/locale/de/LC_MESSAGES/dfcgen-gtk.mo cp -R /mingw/etc $(dist_win32_dir) mkdir $(dist_win32_dir)/lib cp -R /mingw/lib/gtk-2.0 $(dist_win32_dir)/lib && rm -fR $(dist_win32_dir)/lib/gtk-2.0/include for f in $(GTK_DLL_LIST); do \ echo -e "\tPackaging $(dist_win32_dir)/$$f"; \ cp -t $(dist_win32_dir) /mingw/bin/$$f 2>/dev/null; \ true; \ done @echo @echo '--------------------------------------------------------------------' @echo "Win32 package in $(dist_win32_dir) ready for upload" @echo '--------------------------------------------------------------------' endif maintainer-clean-local: -rm -Rf $(dist_debiandir) .PHONY: dist-debian dist-win32 dfcgen-gtk-0.4/COPYING0000644000175000017500000005066411765037445011371 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, 2011-2012 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.4/config.h.in0000644000175000017500000001063111767302612012340 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 MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS 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