fractgen-2.1.5/0000755000175000017500000000000013516643246011424 5ustar hlehlefractgen-2.1.5/website.config0000644000175000017500000000011113225107134014232 0ustar hlehleWEBSITE_DIRECTORY=~/public_html/fractalgenerator WEBSITE_PAGE=index.html fractgen-2.1.5/NEWS0000644000175000017500000000000013010617013012067 0ustar hlehlefractgen-2.1.5/README0000644000175000017500000000000013010617013012250 0ustar hlehlefractgen-2.1.5/BUGS0000644000175000017500000000000013010617013012053 0ustar hlehlefractgen-2.1.5/freebsd/0000755000175000017500000000000013471010227013021 5ustar hlehlefractgen-2.1.5/freebsd/fractgen/0000755000175000017500000000000013471010227014612 5ustar hlehlefractgen-2.1.5/freebsd/fractgen/make-diff0000755000175000017500000000346213371245156016402 0ustar hlehle#!/bin/sh # # Free Packaging Test Script # Copyright (C) 2010-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de PACKAGE=`cat Makefile | grep PORTNAME= | sed -e "s/PORTNAME=//g" | tr -d "\t"` UPSTREAM_VERSION=`cat Makefile | grep PORTVERSION= | sed -e "s/PORTVERSION=//g" | tr -d "\t"` CATEGORY=`cat Makefile | grep CATEGORIES= | sed -e "s/CATEGORIES=//g" | tr -d "\t"` echo "######################################################################" echo "PACKAGE: $PACKAGE" echo "UPSTREAM_VERSION: $UPSTREAM_VERSION" echo "CATEGORY: $CATEGORY" echo "######################################################################" PACKAGING_FILES="Makefile distinfo pkg-descr pkg-plist" if [ -e $PACKAGE.diff ] ; then rm $PACKAGE.diff fi for file in $PACKAGING_FILES ; do if [ -e /usr/ports/$CATEGORY/$PACKAGE/$file -a -e $file ] ; then diff -uN /usr/ports/$CATEGORY/$PACKAGE/$file $file >>$PACKAGE.diff else if [ -e /usr/ports/$CATEGORY/$PACKAGE/$file ] ; then echo >&2 "ERROR: Unable to compare /usr/ports/$CATEGORY/$PACKAGE/$file and $file" exit 1 fi fi done colordiff <$PACKAGE.diff echo "" echo "Results written to $PACKAGE.diff" fractgen-2.1.5/freebsd/fractgen/test-packaging0000755000175000017500000000567613371245156017471 0ustar hlehle#!/bin/sh # # Free Packaging Test Script # Copyright (C) 2010-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de PACKAGE=`cat Makefile | grep PORTNAME= | sed -e "s/^PORTNAME=//g" | tr -d " \t"` UPSTREAM_VERSION=`cat Makefile | grep PORTVERSION= | sed -e "s/^PORTVERSION=//g" | tr -d " \t"` PORTREVISION=`cat Makefile | grep PORTREVISION= | sed -e "s/^PORTREVISION=//g" | tr -d " \t"` CATEGORY=`cat Makefile | grep CATEGORIES= | sed -e "s/^CATEGORIES=//g" | tr -d " \t"` PACKAGE_VERSION="${UPSTREAM_VERSION}" if [ "$PORTREVISION" != "" ] ; then PACKAGE_VERSION="${UPSTREAM_VERSION}_${PORTREVISION}" fi echo "######################################################################" echo "PACKAGE: $PACKAGE" echo "UPSTREAM_VERSION: $UPSTREAM_VERSION" echo "PACKAGE_VERSION: $PACKAGE_VERSION" echo "CATEGORY: $CATEGORY" echo "######################################################################" if [ -e work ] ; then rm -rf work fi rm -f ${PACKAGE}-${PACKAGE_VERSION}.txz find /usr/ports/packages -name "${PACKAGE}*.txz" | xargs rm -f echo "1. ###### make deinstall ##############################################" && \ make deinstall && \ echo "2. ###### make install ################################################" && \ make install && \ echo "3. ###### make package ################################################" && \ make package && \ echo "4. ###### make deinstall ##############################################" && \ make deinstall && \ echo "5. ###### pkg add #####################################################" && \ if [ -e ${PACKAGE}-${PACKAGE_VERSION}.txz ] ; then mkdir /usr/ports/packages /usr/ports/packages/All cp ${PACKAGE}-${PACKAGE_VERSION}.txz /usr/ports/packages/All fi pkg add /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.txz && \ echo "6. ###### make deinstall ##############################################" && \ make deinstall && \ echo "7. ###### make reinstall ##############################################" && \ make reinstall && \ echo "8. ###### make package ################################################" && \ make package && \ echo "9. ###### tar tzvf *.txz ##############################################" && \ tar tzvf /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.txz && \ echo "Running portlint ..." && \ portlint && \ echo "====== Successfully completed! ======" fractgen-2.1.5/freebsd/fractgen/make-shar0000755000175000017500000000007313225107134016411 0ustar hlehle#!/bin/sh shar Makefile distinfo pkg-descr >fractgen.shar fractgen-2.1.5/freebsd/fractgen/pkg-plist0000644000175000017500000000004413362333521016451 0ustar hlehlebin/fractgen man/man1/fractgen.1.gz fractgen-2.1.5/freebsd/fractgen/distinfo0000644000175000017500000000023613362333521016361 0ustar hlehleTIMESTAMP = 1539795247 SHA256 (fractgen-2.1.4.tar.gz) = 3baac9d28a1feecca1230f6251e29098b3d7f2f91ee325bd4bddfe3e01653b6d SIZE (fractgen-2.1.4.tar.gz) = 66271 fractgen-2.1.5/freebsd/fractgen/pkg-descr0000644000175000017500000000072013225107134016414 0ustar hlehleRSerPool client/server API library for load distribution and Reliable Server Pooling (RSerPool) is the IETF's standard (RFC 5351 to RFC 5356) for a lightweight server pool and session management framework. It provides highly available pool management (that is registration handling and load distribution/balancing) by components called Registrar and a client-side/server-side API for accessing the service of a pool. WWW: https://www.uni-due.de/~be0001/rserpool/ fractgen-2.1.5/build-rpm0000755000175000017500000000705013423341537013242 0ustar hlehle#!/bin/bash -e # # Packaging Scripts # Copyright (C) 2017-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de # --------------------------------------------------------------------------- # USAGE: # ./make-rpm => Use current distribution and architecture # ./make-rpm fedora-30-x86_64 => F30, amd64 # ./make-rpm fedora-rawhide-i386 => F30, i386 # ... # --------------------------------------------------------------------------- DISTRIBUTIONS=`\ ( \ while [ x$1 != "x" ] ; do \ echo $1 shift done \ ) | sort -u` if [ "${DISTRIBUTIONS}" == "" ] ; then release=`cat /etc/fedora-release | sed -e "s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g"` arch=`uname -m` DISTRIBUTIONS="fedora-${release}-${arch}" fi PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` echo -e "\x1b[34m###########################################\x1b[0m" echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" echo -e "\x1b[34mPACKAGE_VERSION: ${PACKAGE_VERSION}\x1b[0m" echo -e "\x1b[34m###########################################\x1b[0m" # ====== Create source RPM ================================================== ./make-srpm PACKAGE_SRPM=`find $HOME/rpmbuild/SRPMS/ -name "${PACKAGE}-*${PACKAGE_VERSION}*-*.src.rpm"` if [ ! -e "${PACKAGE_SRPM}" ] ; then echo >&2 "ERROR: Cannot find SRPM ${PACKAGE}-*${PACKAGE_VERSION}*-*.src.rpm in $HOME/rpmbuild/SRPMS!" exit 1 fi # ====== Build binary RPMs ================================================== # Create binary RPMs for DISTRIBUTION in ${DISTRIBUTIONS} ; do echo -e "" echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating binary RPM for ${DISTRIBUTION} ==========\x1b[0m" echo -e "" # NOTE: DISTRIBUTION may point to another directory (e.g. "rawhide" instead of "30")! if [ ! -e "/etc/mock/${DISTRIBUTION}.cfg" ] ; then echo >&2 "ERROR: Cannot find /etc/mock/${DISTRIBUTION}.cfg!" exit 1 fi distribution=`grep "config_opts..root.. =" /etc/mock/${DISTRIBUTION}.cfg | sed -e "s/^.* = //g" -e "s/'//g"` # Remove old files find /var/lib/mock/${DISTRIBUTION}/result -name "${PACKAGE}-*.rpm" | xargs --no-run-if-empty rm -f # Build the binary RPM # NOTE: using old chroot instead of container, to allow running it inside a container! mock -r ${DISTRIBUTION} --old-chroot --init mock -r ${DISTRIBUTION} --old-chroot --installdeps ${PACKAGE_SRPM} mock -r ${DISTRIBUTION} --old-chroot --install openssl pesign mock -r ${DISTRIBUTION} --old-chroot --no-clean --rebuild ${PACKAGE_SRPM} # Check whether files are at the right location PACKAGE_RPMS=`find /var/lib/mock/${distribution}/result -name "${PACKAGE}-*${PACKAGE_VERSION}*-*.rpm" | grep -v "${PACKAGE}-*${PACKAGE_VERSION}*-*.src.rpm" || true` if [ "${PACKAGE_RPMS}" == "" ] ; then echo >&2 "ERROR: Cannot find RPMs!" exit 1 fi done fractgen-2.1.5/UpdateDocFiles0000755000175000017500000000155413371245156014207 0ustar hlehle#!/bin/sh # $Id$ # # SED Script # Copyright (C) 2002-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de while [ "$1" != "" ] ; do sed -f UpdateDoc1.sed $1 >/tmp/sedtemp && cp /tmp/sedtemp $1 && rm -f /tmp/sedtemp shift done fractgen-2.1.5/ci/0000755000175000017500000000000013471010227012002 5ustar hlehlefractgen-2.1.5/ci/test0000755000175000017500000001246613453164231012725 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de . `dirname $0`/get-container # ###### Linux ############################################################## if [ "${TRAVIS_OS_NAME}" == "linux" ] ; then # ====== Docker ========================================================== if [ "${DOCKER}" != "" ] ; then # ====== pbuilder environment ========================================= if [ "$TOOL" == "pbuilder" ] ; then CHANGELOG_HEADER="`head -n1 debian/changelog`" PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` PACKAGE_VERSION=`echo ${CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` OUTPUT_VERSION=`echo ${PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` DEBIAN_VERSION=`echo ${OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` packages="" if [ $# -eq 0 ] ; then echo "Looking for *${DEBIAN_VERSION}*.deb in /var/cache/pbuilder/result ..." packages="`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/cache/pbuilder/result -name "*${DEBIAN_VERSION}*.deb"`" fi while [ $# -gt 0 ] ; do echo "Looking for $1*${DEBIAN_VERSION}*.deb in /var/cache/pbuilder/result ..." packages="${packages} `sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/cache/pbuilder/result -name "$1*${DEBIAN_VERSION}*.deb"`" shift done packages=`echo "${packages}" | xargs -n1 | sort -u | xargs` if [ "${packages}" == "" ] ; then echo >&2 "ERROR: No packages have been found!" exit 1 fi echo "Installing ${packages} ..." sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -fy ${packages} || { echo "NOTE: apt-get failed -> trying dpkg instead of apt-get for local file!" # NOTE: Older "apt-get" versions do not handle local files! if ! sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive dpkg -i ${packages} ; then echo "There may be some dependencies missing. Trying to install them ..." sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -fy -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" --no-install-recommends echo "Retrying to install ${packages} ..." sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive dpkg -i ${packages} fi } echo "Done!" # ====== mock environment ============================================= elif [ "$TOOL" == "mock" ] ; then PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` release=`sudo docker exec ${CONTAINER} bash -c "LANG=C.UTF-8 ; cat /etc/fedora-release | sed -e \"s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g\"" | sed -e "s/[^0-9]//g"` arch=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_-+]//g"` if ! sudo docker exec ${CONTAINER} cd /var/lib/mock/fedora-${release}-${arch}/result ; then if sudo docker exec ${CONTAINER} cd /var/lib/mock/fedora-rawhide-${arch}/result ; then release="rawhide" else echo >&2 "ERROR: No results have been found!" exit 1 fi fi packages="" if [ $# -eq 0 ] ; then echo "Looking for *${PACKAGE_VERSION}*.rpm in /var/lib/mock/fedora-${release}-${arch}/result ..." packages="`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/lib/mock/fedora-${release}-${arch}/result -name "*${PACKAGE_VERSION}*.rpm" | grep -v "\.src\.rpm$"`" fi while [ $# -gt 0 ] ; do echo "Looking for $1*${PACKAGE_VERSION}*.rpm in /var/lib/mock/fedora-${release}-${arch}/result ..." packages="${packages} `sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/lib/mock/fedora-${release}-${arch}/result -name "$1*${PACKAGE_VERSION}*.rpm" | grep -v "\.src\.rpm$"`" shift done packages=`echo "${packages}" | xargs -n1 | sort -u | xargs` if [ "${packages}" == "" ] ; then echo >&2 "ERROR: No packages have been found!" exit 1 fi echo "Installing ${packages} ..." sudo docker exec ${CONTAINER} env LANG=C.UTF-8 dnf install -y --allowerasing ${packages} echo "Done!" fi fi fi fractgen-2.1.5/ci/get-dependencies0000755000175000017500000001124213453164231015140 0ustar hlehle#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de import glob import os import re import subprocess import sys # ###### Write dependency ################################################### dep = re.compile(r'^([a-zA-Z0-9-+\.]+)[\s]*(|\|.*|\(.*)[\s]*$') def extractDependencies(line, variant): dependencies = [] # Remove "build-depends:", etc.: m = re.match(r'^(.*:)(.*$)', line) if m != None: line = m.group(2) line = line.strip() # Split into segments for l in line.split(','): l = l.strip() m = dep.match(l) if m != None: dependency = m.group(1) # ------ Ugly work-around for cmake -------------------------------- # We need cmake >= 3.0! if ((dependency == 'cmake') or (dependency == 'cmake3')): if ((variant == 'debian') or (variant == 'ubuntu')): try: distribution = subprocess.check_output( ["lsb_release", "-cs"] ).decode('utf-8').strip() # print("distribution=", distribution, ".") if distribution in [ 'precise', 'trusty' ]: dependency = 'cmake3' except: pass dependencies.append(dependency) return dependencies # ###### Main program ####################################################### # ====== Check arguments ==================================================== if len(sys.argv) < 2: sys.stderr.write('Usage: ' + sys.argv[0] + ' debian|ubuntu|fedora [-i|--install]\n') sys.exit(1) variant = sys.argv[1] runInstall = False for i in range(2, len(sys.argv)): if sys.argv[i] == '-i' or sys.argv[i] == '--install': runInstall = True else: sys.stderr.write('ERROR: Bad parameter ' + sys.argv[i] + '!') sys.exit(1) # ====== Debian/Ubuntu ====================================================== dependencies = [ ] if ((variant == 'debian') or (variant == 'ubuntu')): if os.path.exists('debian/control'): with open('debian/control', 'r') as fp: inside = False for line in fp: if not line: break line_lower = line.lower() if inside: if line.startswith((' ', "\t")): dependencies = dependencies + extractDependencies(line, variant) continue elif line.startswith('#'): continue inside = False if line_lower.startswith(('build-depends:', 'build-depends-indep:')): dependencies = dependencies + extractDependencies(line, variant) inside = True for dependency in sorted(dependencies): sys.stdout.write(dependency + ' ') sys.stdout.write('\n') if runInstall == True: subprocess.call([ 'apt-get', 'install', '-y' ] + dependencies) # ====== Fedora ============================================================= elif variant == 'fedora': specFiles = glob.glob('rpm/*.spec') if len(specFiles) > 0: with open(specFiles[0], 'r') as fp: inside = False for line in fp: if not line: break line_lower = line.lower() if inside: if line.startswith((' ', "\t")): dependencies = dependencies + extractDependencies(line, variant) continue elif line.startswith('#'): continue inside = False if line_lower.startswith('buildrequires:'): dependencies = dependencies + extractDependencies(line, variant) inside = True for dependency in sorted(dependencies): sys.stdout.write(dependency + ' ') sys.stdout.write('\n') if runInstall == True: subprocess.call([ 'dnf', 'install', '-y' ] + dependencies) # ====== Error ============================================================== else: sys.stderr.write('ERROR: Invalid variant ' + variant + '!\n') sys.exit(1) fractgen-2.1.5/ci/build0000755000175000017500000001435713453164231013046 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de . `dirname $0`/get-container # ###### Linux ############################################################## if [ "${TRAVIS_OS_NAME}" == "linux" ] ; then # ====== Docker ========================================================== if [ "${DOCKER}" != "" ] ; then if [ "${TOOL}" == "compile" ] ; then echo "###### Compiling ... ##################################################" if [ -e CMakeLists.txt ] ; then sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} cmake . $@ elif [ -e configure.ac -o -e configure.in ] ; then if [ -e bootstrap ] ; then sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./bootstrap sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ elif [ -e autogen.sh ] ; then sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./autogen.sh else sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ fi else echo >&2 "WARNING: No build system detected. Trying to just call \"make\" ..." fi cores=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 getconf _NPROCESSORS_ONLN 2>/dev/null || true` if [ $cores -gt 1 ] ; then MAKEFLAGS="-j${cores}" fi sudo docker exec ${CONTAINER} env LANG=C.UTF-8 MAKEFLAGS=${MAKEFLAGS} make # VERBOSE=1 elif [ "${TOOL}" == "pbuilder" ] ; then echo "###### Running pbuilder ... ###########################################" sudo docker exec ${CONTAINER} env LANG=C.UTF-8 sed -e 's/SKIP_PACKAGE_SIGNING=0/SKIP_PACKAGE_SIGNING=1/g' -i packaging.conf sudo docker exec ${CONTAINER} env LANG=C.UTF-8 eatmydata ./build-deb elif [ "${TOOL}" == "mock" ] ; then echo "###### Running mock ... ###############################################" release=`sudo docker exec -t ${CONTAINER} bash -c "LANG=C.UTF-8 ; cat /etc/fedora-release | sed -e \"s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g\"" | sed -e "s/[^0-9]//g"` arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_-+]//g"` sudo docker exec ${CONTAINER} env LANG=C.UTF-8 sed -e 's/SKIP_PACKAGE_SIGNING=0/SKIP_PACKAGE_SIGNING=1/g' -i packaging.conf sudo docker exec ${CONTAINER} env LANG=C.UTF-8 ./build-rpm fedora-${release}-${arch} else echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}" exit 1 fi # ====== Travis CI standard Ubuntu Linux machine ========================= # That is: not using Docker else # ====== Configure ==================================================== if [ -e CMakeLists.txt ] ; then env CC=${COMPILER_C} CXX=${COMPILER_CXX} cmake . $@ elif [ -e configure.ac -o -e configure.in ] ; then if [ -e bootstrap ] ; then env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./bootstrap env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ elif [ -e autogen.sh ] ; then env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./autogen.sh else env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ fi else echo >&2 "WARNING: No build system detected. Trying to just call \"make\" ..." fi cores=`getconf _NPROCESSORS_ONLN 2>/dev/null || true` if [ $cores -gt 1 ] ; then MAKEFLAGS="-j${cores}" fi # ====== Compile ====================================================== if [ "${TOOL}" == "compile" ] ; then env MAKEFLAGS=${MAKEFLAGS} make # VERBOSE=1 # ====== Coverity Scan ================================================ elif [ "${TOOL}" == "coverity" ] ; then # ------ Build ----------------------------------------------------- cd coverity export PATH="coverity/$(ls -d cov*)/bin:$PATH" cd .. env MAKEFLAGS=${MAKEFLAGS} cov-build --dir cov-int make tar czf coverity-results.tar.gz cov-int ls -l coverity-results.tar.gz # ------ Upload results -------------------------------------------- if [ "${TRAVIS_BRANCH}" == "${COVERITY_SCAN_BRANCH}" ] ; then curl --form token=${COVERITY_SCAN_TOKEN} \ --form email=${COVERITY_SCAN_NOTIFICATION_EMAIL} \ --form file=@coverity-results.tar.gz \ --form version="master branch head" \ --form description="$(git log -1|head -1)" \ https://scan.coverity.com/builds?project=${COVERITY_PROJECT} CURL_RESULT=$? echo "curl returned ${CURL_RESULT}" if [ $CURL_RESULT -ne 0 ]; then echo >&2 "ERROR: Upload to Coverity Scan failed; curl returned ${CURL_RESULT}!" exit 1 fi else echo >&2 "###### NOTE: This branch \"${TRAVIS_BRANCH}\" is not the scan branch \"${COVERITY_SCAN_BRANCH}\"! Skipping upload! ######" fi else echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}" exit 1 fi fi # ###### Other ############################################################## elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then cmake . $@ make VERBOSE=1 # ###### Error ############################################################## else echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}" exit 1 fi fractgen-2.1.5/ci/before-install0000755000175000017500000000342313453164231014645 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de . `dirname $0`/get-container # ###### Linux ############################################################## if [ "${TRAVIS_OS_NAME}" == "linux" ] ; then if [ "${DOCKER}" != "" ] ; then # NOTE: Using tmpfs for pbuilder and mock! # The build machine therefore needs a sufficient amount of RAM! sudo docker rm -f ${CONTAINER} || true sudo docker run -d \ --name ${CONTAINER} \ --tmpfs /var/cache/pbuilder:rw,exec,dev,size=4g \ --tmpfs /var/lib/mock:rw,exec,dev,size=4g \ --cap-add=SYS_ADMIN --cap-add=NET_ADMIN \ --security-opt apparmor:unconfined \ -v $(pwd):/travis -w /travis \ $DOCKER tail -f /dev/null sudo docker ps fi # ###### Other ############################################################## elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then echo "Nothing to be done here." # ###### Error ############################################################## else echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}" exit 1 fi fractgen-2.1.5/ci/get-container0000755000175000017500000000315313453164231014476 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de if [ "${DOCKER}" != "" ] ; then # ====== Check configuration ============================================= if [ "${VARIANT}" == "" ] ; then echo >&2 "ERROR: VARIANT is not set!" exit 1 fi if [ "${TOOL}" == "" ] ; then echo >&2 "ERROR: TOOL is not set!" exit 1 fi # ====== Get name of package ============================================= CHANGELOG_HEADER="`head -n1 debian/changelog`" PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` # ====== Set container name ============================================== CONTAINER=`echo "${PACKAGE}-${DOCKER}-${TOOL}" | sed -e "s/:/_/g"` if [ "${COMPILER_C}" != "" ] ; then CONTAINER="${CONTAINER}-${COMPILER_C}" fi export CONTAINER # echo "###### Using container ${CONTAINER} ######" else export CONTAINER="" # Not using docker -> no container! fi fractgen-2.1.5/ci/install0000755000175000017500000002671413453164231013415 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de . `dirname $0`/get-container UBUNTU_MIRROR="archive.ubuntu.com" RETRY_MAXTRIALS=5 RETRY_PAUSE=60 # ###### Linux ############################################################## if [ "${TRAVIS_OS_NAME}" == "linux" ] ; then # ====== Docker ========================================================== if [ "${DOCKER}" != "" ] ; then # ====== Ubuntu Linux ================================================= if [ "${VARIANT}" == "ubuntu" -o "${VARIANT}" == "debian" ] ; then APT_UPDATE='env LANG=C.UTF-8 apt-get update -o Acquire::GzipIndexes=false' APT_INSTALL="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends" APT_UPGRADE="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends" APT_ADD_REPOSITORY="env LANG=C.UTF-8 apt-add-repository -y" # ====== Prepare container ========================================= echo "###### Preparing container ... ########################################" # Use uncompressed package lists. Necessary to work around # "apt-show-version" problems due to usage of compressed lists in # Docker containers: # https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ sed -e "s#http://archive.ubuntu.com/ubuntu/#http://${UBUNTU_MIRROR}/ubuntu/#g" -i /etc/apt/sources.list sudo docker exec ${CONTAINER} bash -c "find /var/lib/apt/lists/ -maxdepth 1 -type f | xargs rm -f" sudo docker exec ${CONTAINER} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- ${APT_UPDATE} echo "Installing eatmydata ..." sudo docker exec ${CONTAINER} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- ${APT_INSTALL} eatmydata python3 software-properties-common distribution=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 lsb_release -cs | sed -e "s/[^0-9a-zA-Z]//g"` if [ "${VARIANT}" == "debian" ] ; then if [[ "$DOCKER" =~ ^(debian:)(.*)$ ]] ; then distribution="${BASH_REMATCH[2]}" fi fi echo "distribution=$distribution" if [ "${VARIANT}" == "ubuntu" ] ; then mirror="http://${UBUNTU_MIRROR}/ubuntu/" else mirror="http://deb.debian.org/debian" fi echo "mirror=$mirror" # ====== Ubuntu/Debian: add repositories (dreibh:ppa, backports, updates) echo "###### Adding dreibh:ppa, backports, updates to container ... ###############" if [ "${VARIANT}" == "ubuntu" ] ; then echo "Ubuntu: adding adding ppa:dreibh/ppa and ${distribution}-backports ..." ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} ppa:dreibh/ppa ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPDATE} fi if [ "${VARIANT}" == "ubuntu" -o "${VARIANT}" == "debian" ] ; then echo "Ubuntu/Debian: adding ${distribution}-backports ..." # NOTE: backports may be unavailable -> ignore error on apt-get update! ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} "\"deb ${mirror} ${distribution}-updates main universe\"" ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} "\"deb ${mirror} ${distribution}-backports main universe\"" ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPDATE} || true ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPGRADE} fi # ====== Ubuntu/Debian: extract dependencies ======================= echo "###### Obtaining build dependencies ... ###############################" echo "Extracting dependencies ..." UBUNTU_DEPS=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 ci/get-dependencies ${VARIANT}` echo "Dependencies: ${UBUNTU_DEPS}" # ====== Ubuntu/Debian: set up compiler ============================ if [ "${TOOL}" == "compile" ] ; then echo "###### Installing compile environment ... #############################" eatmydata ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_INSTALL} build-essential joe clang ${UBUNTU_DEPS} # ====== Ubuntu/Debian: set up pbuilder ============================ elif [ "${TOOL}" == "pbuilder" ] ; then echo "###### Installing pbuilder environment ... ############################" ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_INSTALL} \ joe build-essential devscripts fakeroot lintian pbuilder python3-debian sudo ${UBUNTU_DEPS} # ====== pbuilder environment =================================== echo "###### Setting up pbuilder ... ########################################" sudo docker exec ${CONTAINER} bash -c "env LANG=C.UTF-8 cat >/etc/pbuilderrc < ignore error on apt-get update! ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} bash -c "\"env LANG=C.UTF-8 eatmydata pbuilder login --save-after-login <&2 "ERROR: Invalid setting of TOOL=${TOOL}" exit 1 fi echo "###### Finished setup of build environment ############################" # ======Fedora Core Linux ============================================= elif [ "${VARIANT}" == "fedora" ] ; then FEDORA_DEPS="`ci/get-dependencies ${VARIANT}`" # ====== Fedora: set up compiler =================================== if [ "${TOOL}" == "compile" ] ; then ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ dnf install -y --allowerasing make clang dnf-plugins-core ${FEDORA_DEPS} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ dnf copr enable -y dreibh/ppa # ====== Fedora: set up mock ======================================= elif [ "${TOOL}" == "mock" ] ; then ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ dnf install -y --allowerasing make findutils fedora-release mock rpmdevtools dnf-plugins-core ${FEDORA_DEPS} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ dnf copr enable -y dreibh/ppa else echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}" exit 1 fi # ======Fedora Core Linux ================================================ else echo >&2 "ERROR: Invalid setting of VARIANT=${VARIANT}" exit 1 fi # ====== Travis CI standard Ubuntu Linux machine ========================= # That is: not using Docker else # Travis CI only supports Ubuntu: env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-get install -y software-properties-common env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-add-repository -y ppa:dreibh/ppa env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-get update env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo ci/get-dependencies ubuntu --install # ====== Coverity Scan ================================================ if [ "${TOOL}" == "coverity" ] ; then rm -rf coverity mkdir coverity cd coverity ../ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- wget --no-verbose https://scan.coverity.com/download/linux64 --post-data "\"token=${COVERITY_SCAN_TOKEN}&project=${COVERITY_PROJECT}\"" -O coverity_tool.tar.gz if [ $? -ne 0 ] ; then echo 2>&1 "ERROR: Download of Coverity Scan analysis tool failed!" exit 1 fi tar xzf coverity_tool.tar.gz rm -f coverity_tool.tar.gz cd .. fi fi # ###### Other ############################################################## elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then brew update brew install $@ # ###### Error ############################################################## else echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}" exit 1 fi fractgen-2.1.5/ci/run-test0000755000175000017500000000536613464070611013530 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de # ====== Get settings ======================================================= export TRAVIS_OS_NAME="linux" if [[ "$1" =~ ^(debian|ubuntu|fedora)_([a-z]*|[0-9]*)-(pbuilder|mock|compile)(|-gcc|-clang)$ ]] ; then export DOCKER="${BASH_REMATCH[1]}:${BASH_REMATCH[2]}" export VARIANT="${BASH_REMATCH[1]}" export TOOL="${BASH_REMATCH[3]}" COMPILER="${BASH_REMATCH[4]}" echo "DOCKER=${DOCKER}" echo "VARIANT=${VARIANT}" echo "TOOL=${TOOL}" if [ "${TOOL}" == "compile" -a "${COMPILER}" != "" ] ; then if [ "${COMPILER}" == "-gcc" ] ; then export COMPILER_C=gcc export COMPILER_CXX=g++ elif [ "${COMPILER}" == "-clang" ] ; then export COMPILER_C=clang export COMPILER_CXX=clang++ else echo >&2 "ERROR: Bad compiler setting!" exit 1 fi echo "COMPILER_C=${COMPILER_C}" echo "COMPILER_CXX=${COMPILER_CXX}" fi elif [ "$1" == "" ] ; then # ------ Use defaults ---------------------------------- export DOCKER="ubuntu:bionic" export VARIANT="ubuntu" export TOOL="pbuilder" else echo >&2 "Usage: $0 [ubuntu|fedora]_[release]-[pbuilder|mock|compile-[gcc|clang]]" exit 1 fi # ====== Run test =========================================================== SCRIPTS="before-install install build test" # SCRIPTS="test" for script in $SCRIPTS ; do echo "###### Running $script ... ######" sudo env \ TRAVIS_OS_NAME="$TRAVIS_OS_NAME" \ DOCKER="$DOCKER" \ VARIANT="$VARIANT" \ TOOL="$TOOL" \ COMPILER_C="$COMPILER_C" \ COMPILER_CXX="$COMPILER_CXX" \ ci/${script} \ || { echo "" echo "====== Something went wrong! Getting shell into the container! ======" echo "" sudo env \ TRAVIS_OS_NAME="$TRAVIS_OS_NAME" \ DOCKER="$DOCKER" \ VARIANT="$VARIANT" \ TOOL="$TOOL" \ COMPILER_C="$COMPILER_C" \ COMPILER_CXX="$COMPILER_CXX" \ ci/enter exit 1 } done echo "###### Build test completed! ######" fractgen-2.1.5/ci/enter0000755000175000017500000000152513453164231013055 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de . `dirname $0`/get-container sudo docker exec -it ${CONTAINER} env LANG=C.UTF-8 /bin/bash exit 1 fractgen-2.1.5/ci/retry0000755000175000017500000000321613453164231013104 0ustar hlehle#!/bin/bash -e # # Travis CI Scripts # Copyright (C) 2018-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de maxTrials=3 pause=10 while [ $# -gt 0 ] ; do case "$1" in -t|--tries) maxTrials="$2" shift 2 ;; -p|--pause) pause="$2" shift 2 ;; --) shift break ;; *) echo >&2 "Usage: $0 [-t|--trials max_trials] [-p|--pause seconds] -- command ..." exit 1 ;; esac done attempts=1 result=1 command="$@" while [[ ${result} -ne 0 && ${attempts} -le ${maxTrials} ]] ; do if [ ${attempts} -gt 1 ] ; then echo "Sleeping ${pause}s ..." sleep ${pause} fi echo "Trying ${attempts}/${maxTrials}: ${command}" bash -c "${command}" && result=$? || result=$? if [ ${result} -eq 127 ] ; then # Command not found => no need for a retry! exit ${result} elif [ ${result} -ne 0 ] ; then # Attempt failed let attempts=${attempts}+1 fi done exit ${result} fractgen-2.1.5/UpdateDoc1.sed0000644000175000017500000000026113374565510014050 0ustar hlehles/http:\/\/www.iem.uni-due.de\/~dreibh/https:\/\/www.uni-due.de\/~be0001/g s/2019 Thomas Dreibholz/2019 Thomas Dreibholz/g s/2019 by Thomas Dreibholz/2019 by Thomas Dreibholz/g fractgen-2.1.5/debian/0000755000175000017500000000000013471010227012631 5ustar hlehlefractgen-2.1.5/.travis.yml0000644000175000017500000002343313467770343013546 0ustar hlehlelanguage: c++ sudo: required env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "whrqh1CrPLp+ssfVIDFwzAr705sGQixrubDa5+3laQY3Mi4vNfr5N+vPFHjdBjKusavRjAb8d9OiPuREhg/LTDV0Ntzj0M9D9uK3k5WvExMde7fkWoUVp5WjDesPQc2GhNlUowwsJN5saXK4HJ9yWN5oWL+emj9wa0TzlIDdC9YoaQHFL10EqqugW04XwZprV+YIKZA4y3GKySWNZKKoyc9y3w7BOGRl6deYnGhZNucgTEfcl5TdJL2d2V2q3TCEvxLkGMtz20VoVHOx5kSV6mFNUi7e5gExiZk6kNFjD2vgNl3EpGELpMd1wdxPFS5x/V7FezQgCS9vwaCWMe1FKzHrANvDxOAw4l4kIG5xBABPLUDELKkrXaiftWhFCnHeTA3ebyq4IyuoBWy1X7NmfdXdY3+dbB63xkHXAfcy4V9aj8vA2Yt79w/SJWwT5eJmNqgqL6Oq10lvy+YR69LKvKV2yQxe0yiDiMg/d4n1eAWgSa3frvbGwI2NvLHk4vtouc7agksvYmBFJ4T9VClltWQU8u2tN+okFczsPgISbz1T/L2Xfs0rxDIiLP1R5ARKLR1a3W/kq8hpv+g9M7XmIhg3ne/RKsZFghZrH/HTVx3FgHcQoTEOKbb77qoxBA0QNlPJrkZjHEsL9lXp19MZqBfW35yM/4gBv8ZAVDLrekk=" matrix: include: # ###### Ubuntu Linux #################################################### # ====== Ubuntu 19.04 (Disco Dingo) ====================================== - name: "Ubuntu 19.04 (Disco Dingo) with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Ubuntu 19.04 (Disco Dingo) with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Ubuntu 19.04 (Disco Dingo) packaging with pbuilder" dist: xenial group: travis_latest env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="pbuilder" # ====== Ubuntu 18.10 (Cosmic Cuttlefish) ================================ - name: "Ubuntu 18.10 (Cosmic Cuttlefish) with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:cosmic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Ubuntu 18.10 (Cosmic Cuttlefish) with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:cosmic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Ubuntu 18.10 (Cosmic Cuttlefish) packaging with pbuilder" dist: xenial group: travis_latest env: DOCKER="ubuntu:cosmic" VARIANT="ubuntu" TOOL="pbuilder" # ====== Ubuntu 18.04 (Bionic Beaver) ==================================== - name: "Ubuntu 18.04 (Bionic Beaver) with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Ubuntu 18.04 (Bionic Beaver) with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Ubuntu 18.04 (Bionic Beaver) packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="pbuilder" # ====== Ubuntu 16.04 (Xenial Xerus) ===================================== - name: "Ubuntu 16.04 (Xenial Xerus) with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Ubuntu 16.04 (Xenial Xerus) with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Ubuntu 16.04 (Xenial Xerus) packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="pbuilder" # ###### Debian Linux ################################################### # ====== Debian Testing ================================================= - name: "Debian Testing with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="debian:testing" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Debian Testing with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="debian:testing" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Debian Testing packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="debian:testing" VARIANT="debian" TOOL="pbuilder" # ====== Debian Sid ====================================================== - name: "Debian Sid with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="debian:sid" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Debian Sid with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="debian:sid" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Debian Sid packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="debian:sid" VARIANT="debian" TOOL="pbuilder" # ====== Debian Buster =================================================== - name: "Debian Buster with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="debian:buster" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Debian Buster with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="debian:buster" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Debian Buster packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="debian:buster" VARIANT="debian" TOOL="pbuilder" # ====== Debian Stretch ================================================== - name: "Debian Stretch with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="debian:stretch" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Debian Stretch with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="debian:stretch" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Debian Stretch packaging with pbuilder" os: linux dist: xenial group: travis_latest env: DOCKER="debian:stretch" VARIANT="debian" TOOL="pbuilder" # ###### Fedora Linux ################################################### # ====== Fedora 30 ======================================================= - name: "Fedora 30 with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Fedora 30 with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Fedora 30 packaging with mock" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:30" VARIANT="fedora" TOOL="mock" # ====== Fedora 29 ======================================================= - name: "Fedora 29 with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Fedora 29 with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Fedora 29 packaging with mock" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:29" VARIANT="fedora" TOOL="mock" # ====== Fedora 28 ======================================================= - name: "Fedora 28 with GCC" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:28" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - name: "Fedora 28 with Clang" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:28" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - name: "Fedora 28 packaging with mock" os: linux dist: xenial group: travis_latest env: DOCKER="fedora:28" VARIANT="fedora" TOOL="mock" # ====== Fedora Rawhide ================================================== # - name: "Fedora Rawhide with GCC" # os: linux # dist: xenial # group: travis_latest # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" # - name: "Fedora Rawhide with Clang" # os: linux # dist: xenial # group: travis_latest # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" # - name: "Fedora Rawhide packaging with mock" # os: linux # dist: xenial # group: travis_latest # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="mock" # ###### Other ########################################################### # ====== MacOS X ======================================================== # - name: "MacOS X" # os: osx # osx_image: xcode9.4 # compiler: clang # group: travis_latest # ###### Special ######################################################### - name: "Default Build" os: linux dist: xenial group: travis_latest env: TOOL="compile" - name: "Coverity Scan" os: linux dist: xenial group: travis_latest env: - TOOL="coverity" - VARIANT="ubuntu" - COVERITY_PROJECT="dreibh%2Ffractgen" - COVERITY_SCAN_NOTIFICATION_EMAIL="dreibh@simula.no" - COVERITY_SCAN_BRANCH="coverity_scan" before_install: - travis_wait 60 ci/before-install install: - travis_wait 60 ci/install script: - travis_wait 60 ci/build - travis_wait 60 ci/test fractgen-2.1.5/make-upstream-package0000755000175000017500000000665513433302320015511 0ustar hlehle#!/bin/bash -e # # Packaging Scripts # Copyright (C) 2017-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de # --------------------------------------------------------------------------- # USAGE: # ./make-upstream-package package_name version [-skip-signing] # --------------------------------------------------------------------------- # ====== Check arguments ==================================================== if [ $# -lt 3 ] ; then echo >&2 "Usage: $0 package_name version make_dist [-skip-signing]" exit 1 fi PACKAGE="$1" UPSTREAM_VERSION="$2" MAKE_DIST="$3" SKIP_PACKAGE_SIGNING=0 shift ; shift ; shift while [ $# -gt 0 ] ; do if [ "$1" == "-skip-signing" ] ; then SKIP_PACKAGE_SIGNING=1 else echo >&2 "ERROR: Bad argument $0!" exit 1 fi shift done # ====== Create upstream source package ===================================== echo -e "" echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating upstream package ======================================\x1b[0m" echo -e "" for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do echo -n "Looking for ${PACKAGE}-${UPSTREAM_VERSION}.tar.${UPSTREAM_PACKAGE_TYPE} ... " UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-${UPSTREAM_VERSION}.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" if [ -e "${UPSTREAM_PACKAGE}" ] ; then echo "found!" break else echo "not found" fi done if [ ! -e "${UPSTREAM_PACKAGE}" ]; then rm -f ${PACKAGE}-*.gz ${PACKAGE}"_"*.gz ${PACKAGE}-*.bz2 ${PACKAGE}"_"*.bz2 ${PACKAGE}-*.xz ${PACKAGE}"_"*.xz echo -e "\x1b[34m------ Running MAKE_DIST ... ------\x1b[0m" echo "\$ $MAKE_DIST" eval "$MAKE_DIST" echo -e "\x1b[34m------ Looking for upstream package ... ------\x1b[0m" for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-${UPSTREAM_VERSION}.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" if [ -e "${UPSTREAM_PACKAGE}" ] ; then break fi done if [ ! -e "${UPSTREAM_PACKAGE}" ] ; then echo -e "\x1b[34mERROR: No upstream package (${PACKAGE}-${UPSTREAM_VERSION}.tar.*) found!\x1b[0m" exit 1 fi rm -f "${UPSTREAM_PACKAGE}.asc" # Ensure that old signature file is removed! echo -e "" fi echo -e "\x1b[34m==> Upstream package is ${UPSTREAM_PACKAGE} (type is ${UPSTREAM_PACKAGE_TYPE})\x1b[0m" echo -e "" # ====== Sign upstream source package ======================================= if [ ! -e "${UPSTREAM_PACKAGE}.asc" ] ; then if [ "${SKIP_PACKAGE_SIGNING}" != "" -a ! ${SKIP_PACKAGE_SIGNING} -eq 1 ] ; then echo -e "" echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Sign upstream package ==========================================\x1b[0m" echo -e "" echo -e "\x1b[34mSigning upstream package ${UPSTREAM_PACKAGE} ...\x1b[0m" gpg -sab "${UPSTREAM_PACKAGE}" fi fi fractgen-2.1.5/ChangeLog0000644000175000017500000012362413471010160013165 0ustar hlehlecommit 9cd60cbd1942145effd9dae515fbc8bf5d035a6f Author: Thomas Dreibholz Date: Tue May 21 16:40:24 2019 +0200 Updated ChangeLog. commit c61a89c3e77e748afe825a02b3b28c47a84731f0 Author: Thomas Dreibholz Date: Wed May 15 16:24:18 2019 +0200 Updated Travis CI configuration. commit 4ed4cebd9f30b07aec9a382691939fc1059da093 Author: Thomas Dreibholz Date: Mon May 6 13:31:53 2019 +0200 Updated script. commit e18aeef5be074e95b5ea92368b09ce6e6d914cae Author: Thomas Dreibholz Date: Mon May 6 13:25:47 2019 +0200 Updated build script. commit cd75f4c9fde250f7b841d5752869a19d41e090cf Author: Thomas Dreibholz Date: Tue Apr 9 13:59:07 2019 +0200 A fix. commit 48b0fc3a9aa1efc6b049f44ffa494af8bc7a846d Author: Thomas Dreibholz Date: Tue Apr 9 12:53:12 2019 +0200 Improved CI scripts. commit cbbfe7af270913f72a38a6ed7142feb407908d44 Author: Thomas Dreibholz Date: Fri Mar 8 10:47:06 2019 +0100 Added missing manpage. commit 450203b0ed655508388b0c80b8cc668b1a45f44c Author: Thomas Dreibholz Date: Tue Mar 5 16:51:43 2019 +0100 Updated CI script. commit 01656ecdac71dde124a1f5974076b09232981494 Author: Thomas Dreibholz Date: Wed Feb 27 15:41:48 2019 +0100 Updated packaging files. commit 66b2d9dfababc72eb43791dd7b3108e18762cd49 Author: Thomas Dreibholz Date: Fri Feb 22 15:57:15 2019 +0100 Improved CI script. commit 3bcfa3f8b381f908b7affb0deff791008f716f81 Author: Thomas Dreibholz Date: Wed Feb 20 17:20:08 2019 +0100 Updated CI scripts. commit 3a825e8c9dbb4de6ee2ac7fa994b54a9faf17cfe Author: Thomas Dreibholz Date: Wed Feb 20 16:46:25 2019 +0100 Build script updates. commit 5dfcc2d5cc2c1f20c76fe84eed0d9a2457a2fc77 Author: Thomas Dreibholz Date: Sun Jan 27 16:24:24 2019 +0100 Updated build scripts. commit 85430e84020c5c890473f55449c63ae2068e05af Author: Thomas Dreibholz Date: Wed Jan 16 15:30:05 2019 +0100 Updated build scripts. commit ef5d5456153d3e78daf4dbdc2087909fd53eb4e9 Author: Thomas Dreibholz Date: Mon Dec 17 10:01:07 2018 +0100 Improved Travis CI configuration. commit 4a1355a93c02c2266e3e0fa034523f56f128f13d Author: Thomas Dreibholz Date: Sat Dec 15 12:41:23 2018 +0100 Build script fix. commit 874a1a137d1c71e6941f69d7c5c1961d06bf88af Author: Thomas Dreibholz Date: Fri Dec 14 17:05:13 2018 +0100 Improved Travis CI configuration. commit 303221a689c16969bc48c96b39aa6aac252b31ff Author: Thomas Dreibholz Date: Fri Dec 14 16:34:33 2018 +0100 Minor update. commit 17410d46fd5f4248b1ecf38d9042b303aed235c3 Author: Thomas Dreibholz Date: Fri Dec 14 16:32:46 2018 +0100 A fix. commit fa32aaa2e97cab02caf33f7507c5e01d0f05264e Author: Thomas Dreibholz Date: Fri Dec 14 13:16:16 2018 +0100 Updated build scripts. commit 7e263f49192fe86a15221e23896a2fa4ba36c043 Author: Thomas Dreibholz Date: Fri Dec 14 13:14:12 2018 +0100 Updated Travis CI configuration. commit 4695927af4306e4d60f82d9e978fe1d92c2d662c Author: Thomas Dreibholz Date: Thu Dec 13 09:59:39 2018 +0100 A fix. commit 827b41e67f100847d8e2994b39cb9cd45d2a3407 Author: Thomas Dreibholz Date: Wed Dec 12 12:16:30 2018 +0100 Updated Travis CI configuration. commit c373bf68a0efeb4d33276dec315ad6d015a924d2 Author: Thomas Dreibholz Date: Wed Dec 12 12:14:04 2018 +0100 Updated Travis CI configuration. commit 350d6f3a59011261bae079aa425d8e6544e10d25 Author: Thomas Dreibholz Date: Wed Dec 12 11:10:27 2018 +0100 Updated Travis CI configuration. commit 0f502a1603447912d9e36ebc1750316f305b4222 Author: Thomas Dreibholz Date: Wed Dec 12 10:42:22 2018 +0100 Updated build scripts. commit 1f64a2192e9a28ccff26d072bd3244d222400660 Author: Thomas Dreibholz Date: Tue Dec 11 21:12:04 2018 +0100 Updated Travis CI configuration. commit b9a4361dd5a33813fe2b76d07bfd29c616c246ab Author: Thomas Dreibholz Date: Tue Dec 11 20:59:14 2018 +0100 Updated Travis CI configuration. commit 6afd471ef9a0a3bbfaad49cae6ac48cc5383db3e Author: Thomas Dreibholz Date: Tue Dec 11 20:50:46 2018 +0100 Improved build scripts. commit e28a1f7bd4b39e18cba018707df5f25d8b0cffab Author: Thomas Dreibholz Date: Wed Dec 5 23:40:50 2018 +0100 Build script updates. commit 85e9104523442b2bdd74e4b9acb1a2469cc4b717 Author: Thomas Dreibholz Date: Mon Dec 3 21:12:34 2018 +0100 Updated build scripts. commit 7d9a138e8acbbb8b81baf7a33d008bd9fcaa6c6e Author: Thomas Dreibholz Date: Wed Nov 28 23:16:22 2018 +0100 Build script update. commit 84910a3b3ab0b87280ebe62de93f0368cd3ba127 Author: Thomas Dreibholz Date: Tue Nov 27 21:24:55 2018 +0100 Improved build script. commit f7e4d27835bbb39876332c0bb38c7965f68f36c8 Author: Thomas Dreibholz Date: Tue Nov 27 17:15:49 2018 +0100 Updated build scripts. commit 37e8b28db0a178b176edbb0b55a362ce9ce3062b Author: Thomas Dreibholz Date: Sat Nov 24 10:30:57 2018 +0100 Updated build script. commit df72b54e05a6000b8efa7d71a51e5399b0c18b66 Author: Thomas Dreibholz Date: Wed Nov 21 21:19:20 2018 +0100 Build script updates. commit a3edeb2d9e26a18667f360d91dc8f10df5f15293 Author: Thomas Dreibholz Date: Tue Nov 20 17:30:17 2018 +0100 Added script. commit 887dff4344d9f9711ef7c7517c889418a9185d23 Author: Thomas Dreibholz Date: Tue Nov 20 14:45:44 2018 +0100 Updated build scripts. commit bba8a8ebbe50e34177330b2698447177eb63452b Author: Thomas Dreibholz Date: Tue Nov 20 10:39:22 2018 +0100 Another build script update. commit 106f4da981f55ee86e78dd1da534c8e4a788a063 Author: Thomas Dreibholz Date: Tue Nov 20 10:37:28 2018 +0100 Updated build scripts. commit 6832c0349b66ebc1eb2663a82740345ce7fc9236 Author: Thomas Dreibholz Date: Mon Nov 19 19:18:44 2018 +0100 A fix. commit 144ad279eab72a3cde7ad8717034ae4e30b037b3 Author: Thomas Dreibholz Date: Mon Nov 19 18:01:41 2018 +0100 Added missing file. commit 449dd4ce450c8a5bb2f32db4d94b0d067b034a70 Author: Thomas Dreibholz Date: Mon Nov 19 17:11:04 2018 +0100 Another fix. commit a9d1de72f8153bf4561ea987e4f2a39c9e1691ed Author: Thomas Dreibholz Date: Mon Nov 19 16:35:33 2018 +0100 Build script updates. commit 4a4308775ca14d4a380da27b1a95942bd721c8d1 Author: Thomas Dreibholz Date: Mon Nov 19 10:50:52 2018 +0100 Dependency update. commit 6f8266a60c312d90c363331ccee11bed02dd93e9 Author: Thomas Dreibholz Date: Mon Nov 19 10:28:37 2018 +0100 Require CMake 3.0.2, to avoid inconsistent CMake behaviour in old versions. commit d58251b1623f5bd77ae35abe051efe039949d2a6 Author: Thomas Dreibholz Date: Sun Nov 18 15:53:34 2018 +0100 Setting language in CMakeLists.txt. commit a83fdd2e5084fe0a81e4f3a998075f6640100d7d Author: Thomas Dreibholz Date: Fri Nov 16 21:54:38 2018 +0100 Updated build scripts. commit 58825cce07e3c115dabcf62f65575c51abc6016d Author: Thomas Dreibholz Date: Wed Nov 14 17:56:39 2018 +0100 Improved build scripts. commit a4f0b4039965dbaf98354321e12ce8645897c729 Author: Thomas Dreibholz Date: Tue Nov 13 13:09:13 2018 +0100 Updated build script. commit 59dee717218dc472abb3671e38682dab33ed50b5 Author: Thomas Dreibholz Date: Tue Nov 13 11:48:37 2018 +0100 Updated packaging file. commit 0ef9b236b1db39516e4609f142514428f5c1a24a Author: Thomas Dreibholz Date: Tue Nov 13 11:48:33 2018 +0100 Updated script. commit 17cf0a5ea2d6cf58e5237c8a3ecf2e8e65e7fd64 Author: Thomas Dreibholz Date: Tue Nov 13 11:23:53 2018 +0100 Updated scripts. commit e9c3984ad0f62058d6684d9b7928b744edf7cd7c Author: Thomas Dreibholz Date: Mon Nov 12 10:03:22 2018 +0100 A fix. commit 1ebb31d25d44fc9e927dce630895e00cea17cceb Author: Thomas Dreibholz Date: Sun Nov 11 21:48:13 2018 +0100 A fix. commit 5ac1540c9403cad991ac931b3f4dac9d285f7fa0 Author: Thomas Dreibholz Date: Sun Nov 11 21:10:30 2018 +0100 A fix. commit f8ba79df4edbefe635d23778d7824879202dd749 Author: Thomas Dreibholz Date: Sun Nov 11 20:41:22 2018 +0100 Updated Travis CI configuration. commit 8e15c4773fd54e5cf615b30ad207165a898c3c33 Merge: 807bf8b 8d18006 Author: Thomas Dreibholz Date: Sun Nov 11 19:33:54 2018 +0100 Merge branch 'master' into dreibh/travis-ci commit 807bf8bd9a93b8a1d892db1cdb5292f010818808 Author: Thomas Dreibholz Date: Fri Nov 9 14:36:59 2018 +0100 A fix. commit 45c6490143f5a3d3131e91a4ab0b274dd28cebad Author: Thomas Dreibholz Date: Fri Nov 9 14:27:38 2018 +0100 Updated packaging files. commit 765220d57481bc9b537fedb1d10f21d08cd5c97b Author: Thomas Dreibholz Date: Fri Nov 9 13:39:11 2018 +0100 Build script updates. commit a387e7a5c585e77f0b12a6160479f2dfaf437fe0 Author: Thomas Dreibholz Date: Fri Nov 9 12:57:01 2018 +0100 Improved CMakeLists.txt. commit 3d8f445a029779eacbeda203866466fed8d8b537 Author: Thomas Dreibholz Date: Fri Nov 9 11:10:49 2018 +0100 NULL -> nullptr. commit 0c8aa04d9fc24d215a66de7e8b42e4f44c8df71e Author: Thomas Dreibholz Date: Sun Nov 4 16:31:01 2018 +0100 Another fix. commit a8121ce788467dd4a6dd704b07a59d0b1a827550 Author: Thomas Dreibholz Date: Sun Nov 4 16:26:51 2018 +0100 A fix. commit a096c0a7ef48cf7bae2390d7f2a80a5b10e03625 Author: Thomas Dreibholz Date: Sun Nov 4 16:11:17 2018 +0100 Updated Travis CI configuration. commit 8d18006b28677ea9d0257d4c814398998ea624dd Merge: 7b1f638 375a9c4 Author: Thomas Dreibholz Date: Sun Nov 4 14:07:34 2018 +0100 Merge branch 'dreibh/kde' commit 375a9c4c544ee943adebcb85cd49c3464979fdb5 Author: Thomas Dreibholz Date: Sun Nov 4 14:05:06 2018 +0100 Updated packaging files. commit 858956e9864a39e52836cf5c4165bad71214a2d1 Author: Thomas Dreibholz Date: Sun Nov 4 14:04:56 2018 +0100 Using KLed in KDE. commit 9cf1894739717d69205e4e27457248aa8dc04539 Author: Thomas Dreibholz Date: Sun Nov 4 13:36:20 2018 +0100 Now building with KDE. commit 6ea6ffab1440599774820599009188bc6a582c71 Author: Thomas Dreibholz Date: Sun Nov 4 13:36:12 2018 +0100 Some fixes. commit 9951cd4f2464bc320aa3dc205cc86fee5f63805d Author: Thomas Dreibholz Date: Sun Nov 4 13:21:55 2018 +0100 Fixed some more compiler warnings with KDE options. commit 7b1f638cd0df0a94bbe8271b2ea0191f0bca7d71 Author: Thomas Dreibholz Date: Sun Nov 4 13:16:42 2018 +0100 A fix. commit 09cf85635ed75127ac14c559f25a1977dbdf877a Author: Thomas Dreibholz Date: Sun Nov 4 13:12:22 2018 +0100 Fixed typo. commit 8d971f9f11a6b5f9aba13ca6be3e4bf7664a15f7 Author: Thomas Dreibholz Date: Sun Nov 4 13:12:22 2018 +0100 Fixed typo. commit d29ccbc681568881274e7b921d5b7ded46144f08 Author: Thomas Dreibholz Date: Sun Nov 4 13:10:53 2018 +0100 Fixed compiler warnings with KDE options. commit 23d2fa42c5c9d3a354d6a9e0f57fb4f417b1a144 Merge: fa60ab7 9d3a802 Author: Thomas Dreibholz Date: Sun Nov 4 12:11:33 2018 +0100 Merge branch 'master' into dreibh/kde commit 9d3a802f6f51cf40f3ad9cec8df6eafc63b12149 Author: Thomas Dreibholz Date: Sun Nov 4 12:10:51 2018 +0100 Removed unused code. commit bccdb89cd563c66fde02743b75afc839358ea2fe Author: Thomas Dreibholz Date: Sun Nov 4 12:08:43 2018 +0100 Header updates. commit 6544584d839021e6f1179d092a951af359077e17 Author: Thomas Dreibholz Date: Sun Nov 4 12:03:25 2018 +0100 Updated build scripts. commit fa60ab7afba5ceda06ec6fc2b8d1a125f4eecf15 Author: Thomas Dreibholz Date: Sun Nov 4 12:03:58 2018 +0100 Script update. commit 28c1491ee3935aec3bed30a71ce4a17f006fc564 Author: Thomas Dreibholz Date: Sun Nov 4 12:03:25 2018 +0100 Updated build scripts. commit da3be86af8f4a14699ee975c7d97dd494d013cd1 Author: Thomas Dreibholz Date: Sat Oct 20 13:21:43 2018 +0200 Removed unnecessary dependency. commit 176a654b63e7645ae1b1090041747d7dbdcecd07 Author: Thomas Dreibholz Date: Wed Oct 17 19:14:36 2018 +0200 Updated FreeBSD packaging files. commit 357b1ccdde410ca361ee49f2b98c5da0e2041ccc Author: Thomas Dreibholz Date: Wed Oct 17 17:32:07 2018 +0200 Updated ChangeLog. commit b029f4366610683de133125191371afc8bd5c2ca Author: Thomas Dreibholz Date: Wed Oct 17 17:29:12 2018 +0200 Updated LSM entry. commit 0b1469ab7beb06c707dc1e18a27c589afc7c81e2 Author: Thomas Dreibholz Date: Wed Oct 17 17:24:20 2018 +0200 Updated FreeBSD packaging files. commit 84eac5dccf6c2802f82d6e41b3e644e33ef49f99 Author: Thomas Dreibholz Date: Wed Oct 17 15:39:06 2018 +0200 Version bump. commit f6e716aeef00d8fe665f8071249ff54bec582ad2 Author: Thomas Dreibholz Date: Wed Oct 17 15:20:06 2018 +0200 Minor clean-ups. commit 45f480814e682787c01ea733798ee55063c7118f Author: Thomas Dreibholz Date: Wed Oct 17 15:09:37 2018 +0200 Added tests control file. commit b3b25ea45cd1da563f8180cb835000b597f99b07 Author: Thomas Dreibholz Date: Wed Oct 17 15:07:27 2018 +0200 Added metadata file. commit 04bc23f0ddbca39b28ee54365522a8daf99308b3 Author: Thomas Dreibholz Date: Wed Oct 17 14:41:49 2018 +0200 Updated helper script. commit b4c835b6c471974a7f9ccd338d052b0efe6607cc Author: Thomas Dreibholz Date: Wed Oct 17 14:38:33 2018 +0200 Packaging script updates. commit 4447096d8d8167a3b9306df8ea4acd5bfd73ab20 Author: Thomas Dreibholz Date: Wed Oct 17 14:33:53 2018 +0200 More clean-ups for CMakeLists.txt. commit cd4eb1f500bdc7149d15eba95f0d1a4f71352d95 Author: Thomas Dreibholz Date: Wed Oct 17 14:25:28 2018 +0200 Cleaned up CMakeLists.txt. commit 975263a191ad7ff2d3547d43d213cbde46866e4b Author: Thomas Dreibholz Date: Fri Oct 5 12:56:56 2018 +0100 Removed declaration of unused variable. commit 42822258d542032d20ecc261b2a44dcdbd81218b Author: Thomas Dreibholz Date: Fri Oct 5 12:35:58 2018 +0100 Minor fixes. commit 95c49ea9d6841c4cb90b618382c584e36624a545 Author: Thomas Dreibholz Date: Fri Oct 5 11:56:14 2018 +0100 Packaging updates. commit f8b819311fc93abd0242afa696ed189aadf8737e Author: Thomas Dreibholz Date: Fri Oct 5 12:31:55 2018 +0200 Updated RPM spec file. commit cdd7a9d201867a5a6dd7a4ca2aaa3fdc8c9375e9 Author: Thomas Dreibholz Date: Fri Oct 5 10:56:28 2018 +0100 Updated RPM packaging files. commit 372f372d60b93d009442e52e05bd7e9f5e0ab9e0 Author: Thomas Dreibholz Date: Fri Oct 5 10:55:00 2018 +0100 Updated Ubuntu packaging files. commit eb9cfd1da98b5cda6166836f80c3cb8f68c8f90d Author: Thomas Dreibholz Date: Fri Oct 5 10:48:18 2018 +0100 Changed the build system to CMake. commit 50a459957942aa1bcde2fa3fd0a3af5e3d1f2ac6 Author: Thomas Dreibholz Date: Fri Oct 5 09:18:55 2018 +0100 Updated ChangeLog. commit e4033eec61680ecb7ade46442f86abfbfb04ef8c Author: Thomas Dreibholz Date: Thu Oct 4 18:06:24 2018 +0100 Added Travis CI configuration. commit f2b0039422e279b8af829e032ee52fb3e1c841d1 Author: Thomas Dreibholz Date: Mon Jun 11 13:12:43 2018 +0200 Updated LSM entry. commit 12dc8a9d5016bab9aad584571ed47332bb474d6f Author: Thomas Dreibholz Date: Wed Jun 6 15:51:18 2018 +0200 Version bump commit 943798d5708a1cb083ba9144cff82ff1eea864ca Author: Thomas Dreibholz Date: Wed Jun 6 15:27:56 2018 +0200 Updated build scripts. commit 6c34a17f10880c9eff0aeab1ab550a19933cec8d Author: Thomas Dreibholz Date: Wed Jun 6 15:27:19 2018 +0200 Updated packaging files. commit 57e9884bc119958742e543dc8f953666773b4acf Author: Thomas Dreibholz Date: Thu Nov 16 23:16:23 2017 +0100 Minor update. commit f4f31753fa0a38fd0619862b630e114a88d6838a Merge: 3bfac15 01b5b5e Author: Thomas Dreibholz Date: Thu Nov 16 22:53:36 2017 +0100 Merge branch 'master' of https://github.com/dreibh/fractgen commit 3bfac15096dcfb0d5178b9c621b15b4929c9d6d4 Author: Thomas Dreibholz Date: Thu Nov 16 22:52:15 2017 +0100 Updated FreeBSD packaging files. commit 203239a7f361a9786d8e971f2705e02e2109f887 Author: Thomas Dreibholz Date: Thu Nov 16 22:36:30 2017 +0100 Added FreeBSD packaging files. commit 01b5b5ed3fd9e40a7988d8cca027ba7a09b4b403 Author: Thomas Dreibholz Date: Sun Nov 5 15:50:33 2017 +0100 Updated LSM entry. commit f558ef088b65c6c4ba00e6b8bc658d3d713102c2 Author: Thomas Dreibholz Date: Sun Nov 5 15:48:21 2017 +0100 Version bump. commit d65911fcbfd010a58da9d716ab6faf7eaed31879 Author: Thomas Dreibholz Date: Sun Nov 5 15:34:37 2017 +0100 Improved build script. commit 7124f03ecd937d3b5a9e5d142b7a33d43c7b7f6d Author: Thomas Dreibholz Date: Sun Nov 5 15:34:26 2017 +0100 Added configuration file. commit 511bc7c3b2faafa5a7f000eb6c172071b2d0dbfb Author: Thomas Dreibholz Date: Sun Nov 5 14:31:02 2017 +0100 Got rid of obsolete SVN Id tag. commit 3d859ef94fb2fe594b66005e6165de780b0f249c Author: Thomas Dreibholz Date: Sun Nov 5 14:28:14 2017 +0100 Build script updates. commit 49ef91b8a78de919bd68a309f3c9bce069281db6 Author: Thomas Dreibholz Date: Sun Nov 5 14:23:10 2017 +0100 Header updates. commit 3da4671ac368caef251d74b9dc12ef8a5676b310 Merge: 2389d9e f581f8c Author: Thomas Dreibholz Date: Wed Aug 9 14:49:17 2017 +0200 Merge branch 'master' of https://github.com/dreibh/fractgen commit 2389d9e82b59c80fb24e38889541f5b298c0c1c8 Author: Thomas Dreibholz Date: Wed Aug 9 14:48:47 2017 +0200 RPM fix. commit f581f8cc55d6d418ce81e36825a0ce81e5ba0a8a Author: Thomas Dreibholz Date: Wed Aug 9 11:40:42 2017 +0200 Script update. commit 623630a025de09247183b8a9d835b35004f1224b Author: Thomas Dreibholz Date: Wed Aug 9 11:13:51 2017 +0200 Script updates. commit 203698dfbf9506339272ee982c7ba3b399e4c88d Author: Thomas Dreibholz Date: Wed Aug 9 11:07:19 2017 +0200 Versionb bump. commit 3afb20b8b3648b6839c9ef3da4ac1785f7598878 Author: Thomas Dreibholz Date: Wed Aug 9 11:00:04 2017 +0200 Version bump. commit bc990b5d456429ca91b355c7494f4c6e3f2f1e15 Author: Thomas Dreibholz Date: Wed Aug 9 10:55:21 2017 +0200 Updated ChangeLog. commit 064e22316ff2f35df3397f23ab0cff5e44dd11d2 Author: Thomas Dreibholz Date: Wed Aug 9 10:55:08 2017 +0200 Header updates. commit 003d7e896ff49702ba775b735c30f6612074c6b6 Merge: 3f7774d c354f8e Author: Thomas Dreibholz Date: Wed Aug 9 10:52:30 2017 +0200 Merge remote-tracking branch 'origin/master' into qt5 commit c354f8e62607866086102d9714dd018fcdb420fc Author: Thomas Dreibholz Date: Wed Aug 9 10:52:11 2017 +0200 A fix. commit 3f7774d509029fafe684d1ff29c500c09955a5d9 Author: Thomas Dreibholz Date: Wed Nov 23 13:52:49 2016 +0100 New release. commit 6fad5b9031690a95e439f94cd039204090ce4941 Author: Thomas Dreibholz Date: Thu Nov 17 11:06:25 2016 +0100 Using qmake via qtchooser now. commit af1b7a9a983e36684ac35f039fc6ec2faeaffad1 Author: Thomas Dreibholz Date: Thu Nov 17 11:00:19 2016 +0100 Bugfix: correctly set checked algorithm name on startup. commit 8f5698798b46685286ae2253b1e18bc2238eccbb Author: Thomas Dreibholz Date: Thu Nov 17 11:00:14 2016 +0100 Added test file. commit 315c9ddb9d0dde24f5e42e1d59517b641ac1968d Author: Priv.-Doz. Dr. Thomas Dreibholz Date: Fri Nov 4 23:14:05 2016 +0100 Renamed file. commit 7aff774b3dc59d08aa39e2692fd386e5561642c6 Author: Priv.-Doz. Dr. Thomas Dreibholz Date: Fri Nov 4 23:09:56 2016 +0100 Added bootstrap script and example file. commit 0262d84295f5bc7b4f1b19f2bac8a4b5bdd44a70 Author: Thomas Dreibholz Date: Fri Nov 4 17:20:35 2016 +0100 Updated dependencies. commit b045cb308c899290a9d805637ce83d017b06897f Author: Thomas Dreibholz Date: Fri Nov 4 17:14:00 2016 +0100 Bugfix: need to set LastOffsetUpdate on mouse press event. commit f845fdbb8c50788d8708a21187b98362c7894819 Author: Thomas Dreibholz Date: Fri Nov 4 16:46:25 2016 +0100 Also linking now. commit cc3a33c9d57876e136e34ce263891f12033a70a0 Author: Thomas Dreibholz Date: Fri Nov 4 16:42:31 2016 +0100 Compiling with Qt5. Not linking yet. commit 7637c886cf273764a1713cacec99d810dc1560fd Author: Thomas Dreibholz Date: Fri Nov 4 12:08:04 2016 +0100 Script update. commit a36b153bbe9f7b8068c3a8dc812add9910f57f38 Author: Thomas Dreibholz Date: Wed May 18 15:49:26 2016 +0200 RPM version update. commit e8b80c03147a8f774e5a257b72c104547348602a Author: Thomas Dreibholz Date: Wed Apr 6 14:36:42 2016 +0200 Updated LSM entry. commit c9f801d3066f013b3539dce32dd5d1bfcfac5567 Author: Priv.-Doz. Dr. Thomas Dreibholz Date: Wed Apr 6 14:35:08 2016 +0200 Packaging file updates. commit 1e7b8a1d639b8875253fc12cc8dffc38517d780d Author: dreibh Date: Tue Oct 27 09:24:22 2015 +0000 A small fix. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@2041 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit ef17e097b93444745366a1baca7f40dfe817bc05 Author: dreibh Date: Tue Oct 27 09:17:42 2015 +0000 Packaging file updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@2040 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 4fe8c20e3dc24cf6e83b814b3fd97ff9ccefa625 Author: dreibh Date: Tue Oct 27 09:13:21 2015 +0000 Added example input files. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@2039 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f8b89e2e1c26b06dff53c9a806ad46550f06c964 Author: dreibh Date: Sun Mar 1 15:23:28 2015 +0000 Typo fixes. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1986 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 2a02326fdebbcc7391b367a443672dde0d59c7af Author: dreibh Date: Sun Mar 1 12:49:16 2015 +0000 Version bump. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1982 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 801ada06ebd2f69693fb592c0393926588bf6ec2 Author: dreibh Date: Sun Mar 1 12:31:41 2015 +0000 Packaging updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1980 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7993d48e741564a3d8d3633a37885d426dac710c Author: dreibh Date: Sun Mar 1 12:13:24 2015 +0000 Packaging updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1978 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 9251f362ffbdeb179d93bedb659046b3ee26a261 Author: dreibh Date: Fri Jul 4 16:38:55 2014 +0000 F20 build script updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1867 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 2ff4f10d6c3e57384889d7a014e4d36da47c3f2f Author: dreibh Date: Tue Jun 24 09:54:13 2014 +0000 Removed debug output. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1849 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 8359578b620ef0c9ec573f0559350c497941341d Author: dreibh Date: Fri Nov 15 19:47:33 2013 +0000 Build script updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1747 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 16e0eb61f9144709017dea62cedd67c34f15623f Author: dreibh Date: Mon Nov 11 08:44:44 2013 +0000 Updated make-rpm. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1743 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit d7efd579ec1a0a4d8aeb19c3c7120e0203ed4048 Author: dreibh Date: Tue Nov 5 15:42:50 2013 +0000 Improved RPM packaging. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1735 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7cc7774fb2c0406a820b5e5d1da888b0f341d513 Author: dreibh Date: Tue Nov 5 12:18:43 2013 +0000 Updated spec file. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1729 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f680569b36e5f953e7af78562e944cc71823a389 Author: dreibh Date: Tue Nov 5 11:17:51 2013 +0000 Added RPM spec file. Not working yet. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1728 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit ef0886984341a9c4ddf700d4b566b29b3b02ad3f Author: dreibh Date: Thu Oct 24 20:43:05 2013 +0000 Packaging file update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1702 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f7032f47cfc908d79b3247c7893a8f463e8c1a2e Author: dreibh Date: Thu Oct 24 20:29:08 2013 +0000 Updated LSM entry. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1700 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 5daa3f056b4b1bd56bc59403ff301aef62eaf5c5 Author: dreibh Date: Thu Oct 24 20:11:03 2013 +0000 Updated make-ppa. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1699 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 5653484e08a1be6cb4319a6d31bcccf3c6cf973e Author: dreibh Date: Thu Oct 24 19:56:20 2013 +0000 Version update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1695 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 761416192ab73e9f91c31da7009457a67bedad40 Author: dreibh Date: Wed Oct 23 11:32:30 2013 +0000 Updated ChangeLog. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1684 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit e6405f322eb64171066cade78afcc85cb9d0566e Author: dreibh Date: Wed Oct 23 11:31:08 2013 +0000 Packaging file updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1683 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 2d376f876f7159e7dc75929d5e836cd7dabc6ae9 Author: dreibh Date: Fri Oct 18 21:52:07 2013 +0000 Updated make-ppa. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1671 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 3f36599efbf669657223b37d2de59f8c26a9458d Author: dreibh Date: Thu May 30 12:34:44 2013 +0000 Build script updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1651 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7adc8b40ed2fd94f4e8a63ea1225bbdbae60d336 Author: dreibh Date: Sat Oct 20 21:50:30 2012 +0000 Build script updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1525 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0e46a982494fc394c87995b90a2102c200b84d03 Author: dreibh Date: Sat Aug 25 19:45:17 2012 +0000 Updated build scripts. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1500 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7a47ecbe108d48fbeaa5741375f54e713d2f848d Author: dreibh Date: Sat Apr 21 19:21:13 2012 +0000 Packaging update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1365 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 80977d1f30525706eb6086264073974cf0bcb0b2 Author: dreibh Date: Sat Apr 21 18:26:51 2012 +0000 Version updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1363 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 535692d85ab52c7d94209c3a4c0ed896798736a3 Author: dreibh Date: Fri May 13 15:58:52 2011 +0000 Script fix. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1046 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f1118d06a7016afd060a1f5b605fa4b170ced3fd Author: dreibh Date: Wed May 4 06:40:35 2011 +0000 - Version update. - Updated manpage, added some code comments. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1034 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 829877ddfdcb1171ca129271325d9ed3b14ebee4 Author: dreibh Date: Wed May 4 05:50:40 2011 +0000 Version update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1032 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit deff74881b3120c37f26335630de18f64c1dda91 Author: dreibh Date: Tue May 3 17:47:13 2011 +0000 Updated packaging scripts. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1029 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 5f65bb60cf7ab1806f6a68c9b306c0a317cfd526 Author: dreibh Date: Wed Mar 23 04:21:29 2011 +0000 Updated packaging files. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1013 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 12ac06193e076a548b6ffcf6c050ae2586383e48 Author: dreibh Date: Wed Mar 23 04:08:50 2011 +0000 Updated Ubuntu packaging files. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@1012 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f50964bd27e61e52a5ecddbd0f8e56ba15c9b37f Author: dreibh Date: Fri Feb 11 22:34:41 2011 +0000 Updated packaging files. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@989 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 5a48677228a13d7b47bca2c3a34439ca03d0fce0 Author: dreibh Date: Wed Feb 2 14:19:25 2011 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@985 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 339b7145a87a51b9d4d5c56bd0de8759b1e0e6bd Author: dreibh Date: Wed Feb 2 14:18:50 2011 +0000 make-deb update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@982 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit a0d5f381ec8f5bb3c2bd1fe76e6c7ba34e72682d Author: dreibh Date: Tue Feb 1 14:24:59 2011 +0000 Packaging update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@977 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0c2ae4cc5cfe0d3a8287f10d22b5f13b4e8754b7 Author: dreibh Date: Tue Feb 1 12:07:15 2011 +0000 Updated Debian control file. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@968 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 1fc8b04323fe107bf146b3c0d6783d099811f896 Author: dreibh Date: Tue Feb 1 07:46:46 2011 +0000 Debian packaging update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@962 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 1a9db85e1b5ac6e9fc5693724b657e81892dd03b Author: dreibh Date: Tue Feb 1 07:27:03 2011 +0000 Updated make-deb script. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@957 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 3439fa89b8a870f8a2f6ce3d19790ecada845d30 Author: dreibh Date: Sat Jan 22 15:13:14 2011 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@932 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit b0b40fd7e0dd96118e0cfa8038a380860fa250a6 Author: dreibh Date: Sat Jan 22 14:56:22 2011 +0000 Header updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@930 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit dd4a9221780caec502f0cd93eac00cabeed6785d Author: dreibh Date: Sat Jan 22 14:53:31 2011 +0000 Updated packaging script to include GPL file. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@929 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7ff667b5fe59214967be16fb04966624d7f243df Author: dreibh Date: Sat Jan 22 14:30:12 2011 +0000 make-deb updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@928 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7af8f38aead4e3be7b99c6e37a5578f780bc6894 Author: dreibh Date: Sat Jan 22 10:40:19 2011 +0000 Packaging script update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@922 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0057a328e002fc36a1591cc8f246194c6dc65f67 Author: dreibh Date: Fri Jan 21 23:40:28 2011 +0000 Updated clean-deb. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@915 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit abdf6119aee8fa9f39b41a6696b59a869cc5b420 Author: dreibh Date: Fri Jan 21 23:06:51 2011 +0000 Fix for building unstable/default distribution packages. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@908 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 60bc5332c05c182a80a797ffedcc6e35d50bc735 Author: dreibh Date: Fri Jan 21 21:26:09 2011 +0000 Made Debian packaging compatible to format "3.0 (quilt)". git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@899 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 297ab9a24ffae0155dfb13c86819da19e9893071 Author: dreibh Date: Wed Jan 12 10:29:02 2011 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@881 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 097d4ecfdf61372046772c1412173d8d14d98d5a Author: dreibh Date: Sat Jun 19 11:37:22 2010 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@579 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 42f249c67c6833c2d73bddba4bbf3478348dbaab Author: dreibh Date: Sat Jun 19 11:19:40 2010 +0000 Scripts updates. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@578 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0273bff016db24de908b196e5fe3cedc45f64990 Author: dreibh Date: Mon May 31 09:53:52 2010 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@561 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 34c7e38e55059a9338803e964a7bd16dc509a7b0 Author: dreibh Date: Mon May 31 09:49:24 2010 +0000 Version update. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@557 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit e894bc5dcff1389aafdc21541da2f5a6dd5fce91 Author: dreibh Date: Sat Sep 12 09:00:23 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@465 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0a9557c6baa49a88ea1704e67045a06f125be91f Author: dreibh Date: Wed Jun 3 09:47:34 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@253 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 9871d644f2c03ec4cdc95f77cd78d6c6e8530827 Author: dreibh Date: Wed Jun 3 09:45:52 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@252 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit c7cee801db7f24b3fb2b5b28a0d3b34d320605c0 Author: dreibh Date: Wed Jun 3 09:45:24 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@251 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 7cfd3c13e88d30142ae0dec64181beefb0fbcbc5 Author: dreibh Date: Sat May 2 08:17:45 2009 +0000 Update to Karmic Koala. git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@182 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 75b20a9b8be931f5412fcb8f69e957400bc28d98 Author: dreibh Date: Sat Apr 25 10:21:03 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@174 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 511061c0009594950adb997f8792c1b984fb1c73 Author: dreibh Date: Sat Feb 21 15:02:36 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@173 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 165d7fcd5adad1324ddd1f8f151e3aa04be81ceb Author: dreibh Date: Sat Feb 21 14:38:03 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@172 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit c4f0a1233372750cef1a1071d3b4530c552dd591 Author: dreibh Date: Wed Feb 18 08:38:19 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@170 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 0c04a307d4d1f3ebd06ab8068f8b918c104d74eb Author: dreibh Date: Tue Feb 17 09:30:35 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@169 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f1966553e6fdd894d3116e938a38e573b9cda24f Author: dreibh Date: Fri Feb 6 10:26:44 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@159 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 4643955636a94e0895b2d54a57113b05999a0f44 Author: dreibh Date: Fri Feb 6 09:30:08 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@158 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit 5661606165700aefeb533c5bee5a847976f8732c Author: dreibh Date: Fri Feb 6 08:53:00 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@157 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a commit f1a4e302df2af1d0c258010d6d7352e7c812e7de Author: dreibh Date: Fri Feb 6 08:36:57 2009 +0000 git-svn-id: https://svn.tdr.iem.uni-due.de:8443/svn/sctp-misc/trunk/fractgen2@155 acdd8558-d4fd-0310-b0a5-8cf3c1ec824a fractgen-2.1.5/update-changelog0000755000175000017500000000011713423341537014553 0ustar hlehle#!/bin/sh -e LANG=C git log -v . >ChangeLog.new && mv ChangeLog.new ChangeLog fractgen-2.1.5/AUTHORS0000644000175000017500000000005113010617013012446 0ustar hlehleThomas Dreibholz fractgen-2.1.5/CMakeLists.txt0000644000175000017500000001123213471010150014141 0ustar hlehleCMAKE_MINIMUM_REQUIRED(VERSION 3.0.2) PROJECT(fractgen LANGUAGES C CXX) SET(BUILD_MAJOR "2") SET(BUILD_MINOR "1") SET(BUILD_PATCH "5") SET(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) ############################################################################# # INSTALLATION_DIRECTORIES ############################################################################# # See: https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html INCLUDE(GNUInstallDirs) ############################################################################# # PACKAGING ############################################################################# SET(CPACK_SOURCE_GENERATOR "TGZ") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}") SET(CPACK_SOURCE_IGNORE_FILES "${PROJECT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}-*;${PROJECT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}_*;/build/;/.git/;/config.log;/CMakeFiles/;CMakeCache.txt$;.cmake$;.tar.gz$;/_CPack_Packages;/Makefile$;~$;/build-deb;/clean-deb;/filter-empty-entries;/make-symbols;/make-ppa;/make-deb;/debian.conf;/make-rpm;/rpm.conf;${CPACK_SOURCE_IGNORE_FILES}") INCLUDE(CPack) ADD_CUSTOM_TARGET(dist COMMAND ${CMAKE_MAKE_PROGRAM} clean package_source) INCLUDE(CheckIncludeFile) INCLUDE(CheckStructHasMember) ############################################################################# # OS-DEPENDENT ############################################################################# IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") MESSAGE(STATUS ${CMAKE_SYSTEM_NAME} " supported") ADD_DEFINITIONS("-D_DEFAULT_SOURCE -DLINUX") ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") MESSAGE(STATUS ${CMAKE_SYSTEM_NAME} " supported") SET(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include") SET(CMAKE_LIBRARY_PATH "/usr/local/lib") INCLUDE_DIRECTORIES("/usr/local/include") ADD_DEFINITIONS("-DFreeBSD") ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") MESSAGE(STATUS ${CMAKE_SYSTEM_NAME} " supported") SET(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include" "/usr/local/opt/openssl/include") SET(CMAKE_LIBRARY_PATH "/usr/local/lib") INCLUDE_DIRECTORIES("/usr/local/include" "/usr/local/opt/openssl/include") ADD_DEFINITIONS("-DDARWIN") ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") MESSAGE(STATUS ${CMAKE_SYSTEM_NAME} " supported") LIST(APPEND neat_headers neat_bsd.h) LIST(APPEND neat_sources neat_bsd.c) SET(CMAKE_REQUIRED_INCLUDES "/usr/pkg/include" "/usr/include" "/usr/local/include") SET(CMAKE_LIBRARY_PATH "/usr/local/lib") INCLUDE_DIRECTORIES("/usr/pkg/include" "/usr/local/include") ADD_DEFINITIONS("-DNetBSD") ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") MESSAGE(STATUS ${CMAKE_SYSTEM_NAME} " supported") ADD_DEFINITIONS("-DSOLARIS") ELSE() MESSAGE(FATAL_ERROR ${CMAKE_SYSTEM_NAME} " not supported (yet?)") ENDIF() ############################################################################# # REQUIREMENTS ############################################################################# # ###### Qt ################################################################# SET(CMAKE_AUTOMOC ON) FIND_PACKAGE(Qt5 COMPONENTS Core Xml Widgets PrintSupport REQUIRED) # ###### KDE ################################################################ OPTION(ENABLE_KDE "Include KDE version" 0) IF (ENABLE_KDE) FIND_PACKAGE(ECM "1.0.0" NO_MODULE REQUIRED) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) INCLUDE(KDEInstallDirs) INCLUDE(KDECMakeSettings) INCLUDE(KDECompilerSettings NO_POLICY_SCOPE) INCLUDE(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) FIND_PACKAGE(KF5 "5.2.0" REQUIRED COMPONENTS CoreAddons WidgetsAddons XmlGui) ENDIF() INCLUDE(FeatureSummary) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) ############################################################################# # COMPILER FLAGS ############################################################################# SET(CMAKE_CXX_STANDARD 14) SET(CMAKE_CXX_STANDARD_REQUIRED ON) SET(CMAKE_CXX_EXTENSIONS OFF) SET(CMAKE_C_STANDARD 11) SET(CMAKE_C_STANDARD_REQUIRED ON) SET(CMAKE_C_EXTENSIONS OFF) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror") IF (CMAKE_BUILD_TYPE MATCHES DEBUG) MESSAGE(STATUS "Building in DEBUG mode") # _FORTIFY_SOURCE requires compiling with optimization SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O") ENDIF() ############################################################################# # SUBDIRECTORIES ############################################################################# ADD_SUBDIRECTORY(src) fractgen-2.1.5/rpm/0000755000175000017500000000000013471010227012205 5ustar hlehlefractgen-2.1.5/rpm/fractgen.spec0000644000175000017500000000240413471010150014645 0ustar hlehleName: fractgen Version: 2.1.5 Release: 1 Summary: Fractal Generator Group: Applications/Multimedia License: GPLv3 URL: https://www.uni-due.de/~be0001/fractalgenerator/ Source: https://www.uni-due.de/~be0001/fractalgenerator/download/%{name}-%{version}.tar.gz AutoReqProv: on BuildRequires: cmake BuildRequires: qt5-qtbase-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %description FractGen is a simple Qt-based fractal generator program for Mandelbrot fractals. The image size is only limited by virtual memory. It is possible to zoom into images. Image parameters can be saved in XML files and loaded from XML files. Calculated images can be exported as PNG files. The intention of this program is to generate graphics to be post-processed by other image tools, e.g. in order to generate nice screen backgrounds or book covers. %global debug_package %{nil} %prep %setup -q %build %cmake -DCMAKE_INSTALL_PREFIX=/usr . make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %files %{_bindir}/fractgen %{_datadir}/fractgen/examples/*.fsf %{_mandir}/man1/fractgen.1.gz %changelog * Tue May 21 2019 Thomas Dreibholz - 2.1.5 - New upstream release. * Wed Aug 09 2018 Thomas Dreibholz 2.0.16 - Created RPM package. fractgen-2.1.5/autogen.sh0000755000175000017500000000073313361621010013407 0ustar hlehle#!/bin/bash -e rm -f CMakeCache.txt # ------ Obtain number of cores --------------------------------------------- # Try Linux cores=`getconf _NPROCESSORS_ONLN 2>/dev/null || true` if [ "$cores" == "" ] ; then # Try FreeBSD cores=`sysctl -a | grep 'hw.ncpu' | cut -d ':' -f2 | tr -d ' '` fi if [ "$cores" == "" ] ; then cores="1" fi # ------ Configure and build ------------------------------------------------ cmake -DCMAKE_INSTALL_PREFIX=/usr $@ . make -j$cores fractgen-2.1.5/make-srpm0000755000175000017500000001204213433302320013224 0ustar hlehle#!/bin/bash -e # # Packaging Scripts # Copyright (C) 2017-2019 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Contact: dreibh@iem.uni-due.de # --------------------------------------------------------------------------- # USAGE: # ./make-srpm # --------------------------------------------------------------------------- # ====== Obtain package and version information ============================= PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` PACKAGE_RELEASE=`grep "^Release:" rpm/*.spec | head -n1 | sed -e "s/Release://g" -e "s/[ \t]*//g"` echo -e "\x1b[34m###########################################\x1b[0m" echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" echo -e "\x1b[34mPACKAGE_VERSION: ${PACKAGE_VERSION}\x1b[0m" echo -e "\x1b[34mPACKAGE_RELEASE: ${PACKAGE}_RELEASE\x1b[0m" echo -e "\x1b[34m###########################################\x1b[0m" # ====== Check with Debian package's version ================================ if [ -e debian/changelog ] ; then DEBIAN_CHANGELOG_HEADER="`head -n1 debian/changelog`" # The package name, e.g. MyApplication DEBIAN_PACKAGE=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` # The package distribution, e.g. precise, raring, ... DEBIAN_PACKAGE_DISTRIBUTION=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/[^)]*)//" -e "s/;.*//g" -e "s/ //g"` # The package's version, e.g. 1.2.3-1ubuntu1 DEBIAN_PACKAGE_VERSION=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` # The package's output version, e.g. 1.2.3-1ubuntu DEBIAN_OUTPUT_VERSION=`echo ${DEBIAN_PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` # The package's Debian version, e.g. 1.2.3-1 DEBIAN_VERSION=`echo ${DEBIAN_OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` # The package's upstream version, e.g. 1.2.3 DEBIAN_UPSTREAM_VERSION=`echo ${DEBIAN_VERSION} | sed -e "s/-[0-9]*$//"` if [ "${PACKAGE}-${PACKAGE_VERSION}" != "${DEBIAN_PACKAGE}-${DEBIAN_UPSTREAM_VERSION}" ] ; then echo >&2 "ERROR: RPM version and Debian version do not match -> ${PACKAGE}-${PACKAGE_VERSION} vs. ${DEBIAN_PACKAGE}-${DEBIAN_UPSTREAM_VERSION}!" exit 1 fi fi if [ -e packaging.conf ] ; then . ./packaging.conf fi # ====== Create upstream source package ===================================== echo -e "" echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating upstream package ======================================\x1b[0m" echo -e "" if [ "${SKIP_PACKAGE_SIGNING}" != "" -a ${SKIP_PACKAGE_SIGNING} -eq 1 ] ; then ./make-upstream-package ${PACKAGE} ${PACKAGE_VERSION} "${MAKE_DIST}" -skip-signing else ./make-upstream-package ${PACKAGE} ${PACKAGE_VERSION} "${MAKE_DIST}" fi for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-${PACKAGE_VERSION}.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" if [ -e "${UPSTREAM_PACKAGE}" ] ; then break fi done if [ ! -e "${UPSTREAM_PACKAGE}" ] ; then echo -e "\x1b[34mERROR: No upstream package (${PACKAGE}-${PACKAGE_VERSION}.tar.*) found!\x1b[0m" exit 1 fi # ====== Create source RPM ================================================== echo -e "" echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating source RPM ============================\x1b[0m" echo -e "" # ------ Initialise RPM build directories ----------------------------------- for subdir in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS ; do mkdir -p ${HOME}/rpmbuild/${subdir} done find ${HOME}/rpmbuild/SRPMS -name "${PACKAGE}*.rpm" | xargs --no-run-if-empty rm -f find ${HOME}/rpmbuild/RPMS -name "${PACKAGE}*.rpm" | xargs --no-run-if-empty rm -f # Copy upstream sources cp ${UPSTREAM_PACKAGE} ${HOME}/rpmbuild/SOURCES/ # Patches if [ -e original ] ; then find original -name "*" -type f | grep -v "~$" | grep -v ".spec$" | xargs -n1 -i§ cp "§" ${HOME}/rpmbuild/SOURCES/ fi # Further patches find rpm -name "*" -type f | grep -v "~$" | grep -v ".spec$" | xargs -n1 -i§ cp "§" ${HOME}/rpmbuild/SOURCES/ # The .spec file cp rpm/${PACKAGE}.spec ${HOME}/rpmbuild/SPECS/ # ------ Create source RPM -------------------------------------------------- rpmbuild -bs rpm/${PACKAGE}.spec PACKAGE_SRPM=`find ${HOME}/rpmbuild/SRPMS/ -name "${PACKAGE}-*${PACKAGE_VERSION}*-*.src.rpm"` if [ ! -e "${PACKAGE_SRPM}" ] ; then echo >&2 "ERROR: Cannot find SRPM ${PACKAGE_SRPM}!" exit 1 fi fractgen-2.1.5/COPYING0000644000175000017500000010451313010617013012441 0ustar hlehle GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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 copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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 CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . fractgen-2.1.5/src/0000755000175000017500000000000013471010227012176 5ustar hlehlefractgen-2.1.5/src/mandelbrot.h0000644000175000017500000000311613371245156014511 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef MANDELBROT_H #define MANDELBROT_H #include /** *@author Thomas Dreibholz */ class Mandelbrot : public FractalAlgorithmInterface { public: Mandelbrot(const char* identifier = "Mandelbrot", const char* name = "Mandelbrot z[i+1]=z[i]^2-c"); ~Mandelbrot(); virtual std::complex defaultC1() const override; virtual std::complex defaultC2() const override; virtual unsigned int calculatePoint(const unsigned int x, const unsigned int y) override; private: static Mandelbrot* Registration; }; #endif fractgen-2.1.5/src/simplehsv.cc0000644000175000017500000000252713371245156014537 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "simplehsv.h" #include SimpleHSV* SimpleHSV::Registration = new SimpleHSV(); SimpleHSV::SimpleHSV(const char* identifier, const char* name) : ColorSchemeInterface(identifier, name) { } SimpleHSV::~SimpleHSV() { } unsigned int SimpleHSV::getColor(const unsigned int value) { QColor color; color.setHsv((value % 72) * 5, 255, 255); return(color.rgb()); } fractgen-2.1.5/src/fractalgeneratorview.cc0000644000175000017500000003370613374565510016750 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalgeneratorview.h" #include "fractalgeneratordoc.h" #include "fractalgenerator.h" #include #include #include #include #include #include #include #define INITIAL_WIDTH 640 #define INITIAL_HEIGHT 480 // ###### Constructor ####################################################### FractalGeneratorView::FractalGeneratorView(QWidget* parent) : QWidget(parent) { Thread = nullptr; installEventFilter(this); Buffer = new FractalBuffer(); Q_CHECK_PTR(Buffer); Display = new ImageDisplay(this); Q_CHECK_PTR(Display); connect(Display, SIGNAL(offsetUpdate(int, int)), this, SLOT(slotOffsetUpdate(int, int))); connect(Display, SIGNAL(zoom()), this, SLOT(zoomIn())); connect(Display, SIGNAL(selection(unsigned int, unsigned int, unsigned int, unsigned int)), this, SLOT(slotSelectionUpdate(unsigned int, unsigned int, unsigned int, unsigned int))); XScrollBar = new QScrollBar(Qt::Horizontal, this); Q_CHECK_PTR(XScrollBar); connect(XScrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotXScrollBarChange(int))); YScrollBar = new QScrollBar(Qt::Vertical, this); Q_CHECK_PTR(YScrollBar); connect(YScrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotYScrollBarChange(int))); #ifndef WITH_KDE ControlLED = new QLabel(this); Q_CHECK_PTR(ControlLED); ControlLED->setFrameStyle(QFrame::Panel|QFrame::Sunken); #else ControlLED = new KLed(QColor(Qt::red), KLed::State::Off, KLed::Look::Raised, KLed::Shape::Circular, this); Q_CHECK_PTR(ControlLED); #endif QGridLayout* layout = new QGridLayout(this); Q_CHECK_PTR(layout); layout->addWidget(Display, 0, 0); layout->addWidget(XScrollBar, 1, 0); layout->addWidget(YScrollBar, 0, 1); layout->addWidget(ControlLED, 1, 1); SizeX = INITIAL_WIDTH; SizeY = INITIAL_HEIGHT; Display->reset(SizeX, SizeY); Display->setMinimumSize(SizeX, SizeY); Buffer->reset(Display->imageWidth(), Display->imageHeight()); Algorithm = FractalAlgorithmInterface::getAlgorithmByIdentifier("Mandelbrot"); Q_CHECK_PTR(Algorithm); ColorScheme = ColorSchemeInterface::getColorSchemeByIdentifier("SimpleHSV"); Q_CHECK_PTR(ColorScheme); C1 = Algorithm->defaultC1(); C2 = Algorithm->defaultC2(); Selection = false; ProgStep = 8; Algorithm->configure(Display->imageWidth(), Display->imageHeight(), C1, C2, Algorithm->defaultMaxIterations()); ColorScheme->configure(Algorithm->getMaxIterations()); startCalculation(); updateScrollBars(); } // ###### Destructor ######################################################## FractalGeneratorView::~FractalGeneratorView() { delete Buffer; Buffer = nullptr; } // ###### Resize ############################################################ void FractalGeneratorView::resizeEvent(QResizeEvent*) { updateScrollBars(); } // ###### Vertical scollbar update ########################################## void FractalGeneratorView::slotXScrollBarChange(int value) { int newOffset = value; if(newOffset + Display->width() >= (int)Display->imageWidth()) { newOffset = Display->imageWidth() - Display->width(); } if(newOffset < 0) { newOffset = 0; } if(Display->offsetX() != (unsigned int)newOffset) { Display->setOffsetX((unsigned int)newOffset); Display->update(); } } // ###### Horizontal scollbar update ######################################## void FractalGeneratorView::slotYScrollBarChange(int value) { int newOffset = value; if(newOffset + Display->height() >= (int)Display->imageHeight()) { newOffset = Display->imageHeight() - Display->height(); } if(newOffset < 0) { newOffset = 0; } if(Display->offsetY() != (unsigned int)newOffset) { Display->setOffsetY((unsigned int)newOffset); Display->update(); } } // ###### Offset update ##################################################### void FractalGeneratorView::slotOffsetUpdate(int newOffsetX, int newOffsetY) { XScrollBar->setValue(newOffsetX); YScrollBar->setValue(newOffsetY); } // ###### Selection update ################################################### void FractalGeneratorView::slotSelectionUpdate(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) { SelectionC1 = std::complex(C1.real() + x1 * ((C2.real() - C1.real()) / Display->imageWidth()), C1.imag() + y1 * ((C2.imag() - C1.imag()) / Display->imageHeight())); SelectionC2 = std::complex(C1.real() + x2 * ((C2.real() - C1.real()) / Display->imageWidth()), C1.imag() + y2 * ((C2.imag() - C1.imag()) / Display->imageHeight())); // printf("Selected: %d %d - %d %d\n",x1,y1,x2,y2); if((x1 != x2) && (y1 != y2)) { Selection = true; } else { Selection = false; } emit updateZoomInPossible(); } // ###### Change image size ################################################# void FractalGeneratorView::changeSize(int X, int Y) { if(Thread != nullptr) { stopCalculation(); } SizeX = X; SizeY = Y; Display->reset(SizeX, SizeY); Buffer->reset(Display->imageWidth(), Display->imageHeight()); Selection = false; Algorithm->changeSize(Display->imageWidth(), Display->imageHeight()); updateScrollBars(); } // ###### Change C1 and C2 ################################################## void FractalGeneratorView::changeC1C2(std::complex NewC1, std::complex NewC2) { if(Thread != nullptr) { stopCalculation(); } C1 = NewC1; C2 = NewC2; } // ###### Update scroll bars ################################################ void FractalGeneratorView::updateScrollBars() { XScrollBar->setMaximum(std::max(0, Display->imageWidth() - Display->width())); XScrollBar->setPageStep(std::min(Display->width(), Display->imageWidth()) / 4); YScrollBar->setMaximum(std::max(0, Display->imageHeight() - Display->height())); YScrollBar->setPageStep(std::min(Display->height(), Display->imageHeight()) / 4); } // ###### Update status LED ################################################# void FractalGeneratorView::updateLED(const bool busy) { #ifndef WITH_KDE QPixmap pixmap(16, 16); pixmap.fill((busy == true) ? Qt::red : Qt::green); ControlLED->setPixmap(pixmap); #else ControlLED->setState((busy == true) ? KLed::State::On : KLed::State::Off); #endif } // ###### Print image ####################################################### void FractalGeneratorView::print(QPrinter* printer) { int width = Display->imageWidth(); int height = Display->imageHeight(); char titleString[512]; snprintf((char*)&titleString, sizeof(titleString), "%s - c1=%f - %fi; c2=%f - %fi; %d iterations", Algorithm->getName(), C1.real(), C1.imag(), C2.real(), C2.imag(), *Algorithm->getMaxIterations()); const QString title = QString::fromLocal8Bit(titleString); QFont font(QStringLiteral("Times"), 9); font.setBold(true); QFontMetrics fontMetrics(font); QRect boundingRect = fontMetrics.boundingRect(title); const int textwidth = boundingRect.width(); const int textheight = boundingRect.height(); printer->setDocName(title); printer->setCreator(QStringLiteral("Thomas Dreibholz's Fractal Generator II")); int pagesx = 1; int pagesy = 1; QPainter p; p.begin(printer); const int xstep = width / pagesx; const int ystep = height / pagesy; for(int y = 0;y < pagesy;y++) { for(int x = 0;x < pagesx;x++) { p.setWindow(0, 0, xstep, ystep); p.drawImage(0, 0, *(Display->image()), x * xstep, y * ystep, xstep, ystep); if((x == pagesx - 1) && (y == pagesy - 1)) { p.setWindow(0, 0, (int)(1.1 * textwidth), textheight * 50); p.setPen(Qt::black); p.setFont(font); p.drawText(0, textheight * 48, (int)(1.1 * textwidth), textheight, Qt::AlignHCenter|Qt::AlignVCenter, title); } else { printer->newPage(); } /* p.setWindow(0, 0, width, height); p.setPen(Qt::red); p.drawLine(0, 0, Display->imageWidth() - 1, Display->imageHeight() - 1); p.drawLine(0, Display->imageHeight() - 1, Display->imageWidth() - 1, 0); p.setPen(Qt::black); char str[16]; snprintf((char*)&str,sizeof(str),"x=%d y=%d\n",x,y); p.drawText(0, 0, str); p.drawRect(0, 0, Display->imageWidth() - 1, Display->imageHeight() - 1); */ } } p.end(); } // ###### Start calculation ################################################# void FractalGeneratorView::startCalculation() { if(Thread == nullptr) { Thread = new FractalCalculationThread(this, Algorithm, ColorScheme, Buffer, Display->image(), ProgStep); Q_CHECK_PTR(Thread); Thread->start(); updateLED(true); } } // ###### Stop calculation ################################################## void FractalGeneratorView::stopCalculation() { if(Thread != nullptr) { Thread->stop(); while(Thread != nullptr) { qApp->processEvents(); } } } // ###### Handle events ##################################################### bool FractalGeneratorView::eventFilter(QObject*, QEvent* event) { if(Thread) { if(event->type() == QEvent::User) { Display->update(); } else if(event->type() == (QEvent::Type)(QEvent::User + 1)) { Display->update(); Thread->stop(); delete Thread; Thread = nullptr; updateLED(false); } } return(false); } // ###### Change fractal algorithm ########################################## void FractalGeneratorView::changeAlgorithm(int index) { if(Thread != nullptr) { stopCalculation(); } Algorithm = FractalAlgorithmInterface::getAlgorithm(index); C1 = Algorithm->defaultC1(); C2 = Algorithm->defaultC2(); Selection = false; Algorithm->configure(Display->imageWidth(), Display->imageHeight(), C1, C2, Algorithm->defaultMaxIterations()); ColorScheme->configure(Algorithm->getMaxIterations()); zoomList.clear(); emit updateFractalAlgorithm(); } // ###### Change color scheme ############################################### void FractalGeneratorView::changeColorScheme(int index) { if(Thread != nullptr) { stopCalculation(); } ColorScheme = ColorSchemeInterface::getColorScheme(index); ColorScheme->configure(Algorithm->getMaxIterations()); emit updateColorScheme(); } // ###### Configuration update -> restart calculation ####################### void FractalGeneratorView::configChanged() { if(Thread != nullptr) { stopCalculation(); } Buffer->clear(); Display->reset(Display->imageWidth(), Display->imageHeight()); emit updateZoomInPossible(); emit updateZoomBackPossible(); startCalculation(); } // ###### Reset zoom ######################################################## void FractalGeneratorView::zoomReset() { if(Thread != nullptr) { stopCalculation(); } C1 = Algorithm->defaultC1(); C2 = Algorithm->defaultC2(); Algorithm->configure(Display->imageWidth(), Display->imageHeight(), C1, C2, *Algorithm->getMaxIterations()); zoomList.clear(); configChanged(); } // ###### Zoom in ########################################################### void FractalGeneratorView::zoomIn() { if(Selection) { if(Thread != nullptr) { stopCalculation(); } zoomList.push_back(std::pair, std::complex >(C1, C2)); const double halfWidth = (SelectionC2.real() - SelectionC1.real()) / 2.0; const double halfHeight = (SelectionC2.imag() - SelectionC1.imag()) / 2.0; const std::complex center = std::complex(SelectionC1.real() + halfWidth, SelectionC1.imag() + halfHeight); const double newHalfHeight = halfWidth * ((double)Display->imageHeight() / (double)Display->imageWidth()); C1 = std::complex(center.real() - halfWidth, center.imag() + newHalfHeight); C2 = std::complex(center.real() + halfWidth, center.imag() - newHalfHeight); Selection = false; Buffer->clear(); Display->reset(Display->imageWidth(), Display->imageHeight()); Algorithm->configure(Display->imageWidth(), Display->imageHeight(), C1, C2, *Algorithm->getMaxIterations()); configChanged(); } } // ###### Zoom back ######################################################### void FractalGeneratorView::zoomBack() { if(Thread != nullptr) { stopCalculation(); } if(zoomList.size() > 0) { C1 = zoomList.back().first; C2 = zoomList.back().second; zoomList.pop_back(); Algorithm->configure(Display->imageWidth(), Display->imageHeight(), C1, C2, *Algorithm->getMaxIterations()); configChanged(); } } fractgen-2.1.5/src/fractalgenerator.cc0000644000175000017500000003347313371245156016054 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalgenerator.h" #include "fractalgeneratorview.h" #include "fractalgeneratordoc.h" #include "fractalalgorithminterface.h" #include "colorschemeinterface.h" #include "optionsdialog.h" #include #include #include #include #include #include #include #include #include #include // ###### Constructor ####################################################### FractalGeneratorApp::FractalGeneratorApp(QWidget* parent, const QString& fileName) #ifndef WITH_KDE : QMainWindow(parent) #else : KXmlGuiWindow(parent) #endif { View = new FractalGeneratorView(this); Q_CHECK_PTR(View); setCentralWidget(View); connect(View, SIGNAL(updateFractalAlgorithm()), this, SLOT(slotUpdateFractalAlgorithm())); connect(View, SIGNAL(updateColorScheme()), this, SLOT(slotUpdateColorScheme())); connect(View, SIGNAL(updateZoomBackPossible()), this, SLOT(slotUpdateZoomBackPossible())); connect(View, SIGNAL(updateZoomInPossible()), this, SLOT(slotUpdateZoomInPossible())); Document = new FractalGeneratorDoc(this, View); Q_CHECK_PTR(Document); connect(Document, SIGNAL(updateFileName(const QString&)), this, SLOT(slotUpdateFileName(const QString&))); Document->newDocument(); QMenu* fileMenu = menuBar()->addMenu(tr("&File")); Q_CHECK_PTR(fileMenu); fileMenu->addAction(tr("&Open"), this, SLOT(slotFileOpen()), QKeySequence(QKeySequence::Open)); fileMenu->addAction(tr("&Save"), this, SLOT(slotFileSave()), QKeySequence(QKeySequence::Save)); fileMenu->addAction(tr("Save As"), this, SLOT(slotFileSaveAs())); fileMenu->addSeparator(); fileMenu->addAction(tr("&Export Image"), this, SLOT(slotFileExportImage()), QKeySequence(Qt::CTRL + Qt::Key_X)); fileMenu->addAction(tr("Print &Image"), this, SLOT(slotFilePrint()), QKeySequence(QKeySequence::Print)); fileMenu->addSeparator(); fileMenu->addAction(tr("&Close"), this, SLOT(slotFileClose()), QKeySequence(QKeySequence::Close)); fileMenu->addAction(tr("&Quit"), this, SLOT(slotFileQuit()), QKeySequence(Qt::CTRL + Qt::Key_Q)); QMenu* viewMenu = menuBar()->addMenu(tr("&View")); Q_CHECK_PTR(viewMenu); ViewZoomIn = viewMenu->addAction(tr("Zoom &In"), View, SLOT(zoomIn()), QKeySequence(Qt::CTRL + Qt::Key_I)); ViewZoomIn->setEnabled(false); ViewZoomBack = viewMenu->addAction(tr("Zoom &Back"), View, SLOT(zoomBack()), QKeySequence(QKeySequence::Undo)); ViewZoomBack->setEnabled(false); viewMenu->addAction(tr("&Reset Zoom"), View, SLOT(zoomReset()), QKeySequence(Qt::CTRL + Qt::Key_R)); viewMenu->addSeparator(); viewMenu->addAction(tr("Image Size"), this, SLOT(slotViewSetImageSize()), QKeySequence(Qt::Key_F3)); QMenu* fractalAlgorithmMenu = menuBar()->addMenu(tr("&Algorithm")); Q_CHECK_PTR(fractalAlgorithmMenu); QAction* configureAlgorithmAction = fractalAlgorithmMenu->addAction(tr("Configure Algorithm"), this, SLOT(slotViewConfigureAlgorithm()), QKeySequence(Qt::Key_F2)); configureAlgorithmAction->setData(1000000); fractalAlgorithmMenu->addSeparator(); QActionGroup* fractalAlgorithmGroup = new QActionGroup(this); Q_CHECK_PTR(fractalAlgorithmGroup); FractalAlgorithmInterface* fractalAlgorithm; QStringList fractalAlgorithmList; unsigned int fractalAlgorithmID = 0; while((fractalAlgorithm = FractalAlgorithmInterface::getAlgorithm(fractalAlgorithmID))) { QAction* item = fractalAlgorithmMenu->addAction(QString::fromLocal8Bit(fractalAlgorithm->getName())); Q_CHECK_PTR(item); fractalAlgorithmGroup->addAction(item); item->setData(fractalAlgorithmID); item->setCheckable(true); item->setChecked((fractalAlgorithm == View->getAlgorithm())); FractalAlgorithmActionList.append(item); fractalAlgorithmID++; } connect(fractalAlgorithmMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotViewSetFractalAlgorithm(QAction*))); QMenu* colorSchemeMenu = menuBar()->addMenu(tr("&Color Scheme")); Q_CHECK_PTR(colorSchemeMenu); QActionGroup* colorSchemeGroup = new QActionGroup(this); ColorSchemeInterface* colorScheme; QStringList colorSchemeList; unsigned int colorSchemeID = 0; while((colorScheme = ColorSchemeInterface::getColorScheme(colorSchemeID))) { QAction* item = colorSchemeMenu->addAction(QString::fromLocal8Bit(colorScheme->getName())); Q_CHECK_PTR(item); colorSchemeGroup->addAction(item); item->setData(colorSchemeID); item->setCheckable(true); item->setChecked((colorScheme == View->getColorScheme())); ColorSchemeActionList.append(item); colorSchemeID++; } connect(colorSchemeMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotViewSetColorScheme(QAction*))); QMenu* helpMenu = menuBar()->addMenu(tr("&Help")); Q_CHECK_PTR(helpMenu); helpMenu->addAction(tr("&About"), this, SLOT(slotHelpAbout())); Printer.setColorMode(QPrinter::Color); Printer.setOrientation(QPrinter::Landscape); Printer.setOutputFileName(tr("Fractal.pdf")); statusBar()->showMessage(tr("Welcome to Fractal Generator!"), 3000); if(!fileName.isEmpty()) { Document->openDocument(fileName); } show(); } // ###### Destructor ######################################################## FractalGeneratorApp::~FractalGeneratorApp() { } // ###### Open ############################################################## void FractalGeneratorApp::slotFileOpen() { statusBar()->showMessage(tr("Opening file...")); const QString fileName = QFileDialog::getOpenFileName( this, tr("Open File ..."), QDir::currentPath(), tr("Fractal Settings File (*.fsf)")); if(!fileName.isEmpty()) { Document->openDocument(fileName); } statusBar()->showMessage(tr("Ready.")); } // ###### Save ############################################################## void FractalGeneratorApp::slotFileSaveAs() { statusBar()->showMessage(tr("Saving file as ...")); const QString fileName = QFileDialog::getSaveFileName( this, tr("Save File ..."), QDir::currentPath(), tr("Fractal Settings File (*.fsf)")); if(!fileName.isEmpty()) { Document->saveDocument(fileName); } statusBar()->showMessage(tr("Ready.")); } // ###### Save as ########################################################### void FractalGeneratorApp::slotFileSave() { statusBar()->showMessage(tr("Saving file...")); bool overwrite = true; if(QFile::exists(Document->getFileName())) { if(QMessageBox::warning(this, tr("Fractal Generator II"), tr("Overwrite existing file ") + Document->getFileName() + tr("?"), QMessageBox::Save|QMessageBox::Cancel, QMessageBox::Save) == QMessageBox::Cancel) { overwrite = false; } } if(overwrite) { Document->saveDocument(Document->getFileName()); } statusBar()->showMessage(tr("Ready.")); } // ###### Export ############################################################ void FractalGeneratorApp::slotFileExportImage() { statusBar()->showMessage(tr("Exporting Image ...")); QString name = QFileDialog::getSaveFileName(this, tr("Export Image"), QDir::currentPath(), tr("*.png")); if(!name.isEmpty()) { if(name.right(4).toLower() != tr(".png")) name += tr(".png"); View->getDisplay()->saveImage(name, "PNG"); } statusBar()->showMessage(tr("Ready.")); } // ###### Close ############################################################# void FractalGeneratorApp::slotFileClose() { close(); } // ###### Print ############################################################# void FractalGeneratorApp::slotFilePrint() { statusBar()->showMessage(tr("Printing...")); QPrintDialog printDialog(&Printer, this); if(printDialog.exec() == QDialog::Accepted) { View->print(&Printer); } statusBar()->showMessage(tr("Ready.")); } // ###### Quit ############################################################## void FractalGeneratorApp::slotFileQuit() { exit(0); } // ###### About ############################################################# void FractalGeneratorApp::slotHelpAbout() { QMessageBox::information(this, tr("FractalGenerator II"), tr("FractalGenerator II\n") + QStringLiteral("Copyright (C) 2003-2019 by Thomas Dreibholz"), tr("Okay")); } // ###### Set picture size ################################################## void FractalGeneratorApp::slotViewSetImageSize() { statusBar()->showMessage(tr("Changing Image Size ...")); QString CurrentSize; CurrentSize += QString().setNum(View->getSizeX()); CurrentSize += tr("*"); CurrentSize += QString().setNum(View->getSizeY()); bool ok; QString text = QInputDialog::getText( this, tr("Image Size"), tr("Please enter new size in the format x*y:"), QLineEdit::Normal, CurrentSize, &ok); if((ok) || (!text.isEmpty())) { const unsigned int newX = text.section(QStringLiteral("*"), 0, 0).toUInt(); const unsigned int newY = text.section(QStringLiteral("*"), 1, 1).toUInt(); if((0 < newX) && (0 < newY)) { View->changeSize(newX, newY); View->configChanged(); } else { QMessageBox::information( this, tr("Image Size"), tr("Change to ") + QString().setNum(newX) + QStringLiteral("*") + QString().setNum(newY) + tr(" failed!")); } ViewZoomBack->setEnabled(View->isZoomBackPossible()); } statusBar()->showMessage(tr("Ready.")); } // ###### Configure algorithm ############################################### void FractalGeneratorApp::slotViewConfigureAlgorithm() { statusBar()->showMessage(tr("Changing Options ...")); OptionsDialog dialog(this, View->getAlgorithm()->getConfigEntries()); dialog.exec(); View->configChanged(); statusBar()->showMessage(tr("Ready.")); } // ###### Update algorithm ################################################## void FractalGeneratorApp::slotUpdateFractalAlgorithm() { const FractalAlgorithmInterface* currentAlgorithm = View->getAlgorithm(); unsigned int i = 0; QListIterator iterator(FractalAlgorithmActionList); while(iterator.hasNext()) { QAction* item = iterator.next(); const FractalAlgorithmInterface* algorithm = FractalAlgorithmInterface::getAlgorithm(i); Q_CHECK_PTR(algorithm); item->setChecked( (algorithm == currentAlgorithm) ); i++; } } // ###### Update color scheme ############################################### void FractalGeneratorApp::slotUpdateColorScheme() { const ColorSchemeInterface* currentColorScheme = View->getColorScheme(); unsigned int i = 0; QListIterator iterator(ColorSchemeActionList); while(iterator.hasNext()) { QAction* item = iterator.next(); const ColorSchemeInterface* colorScheme = ColorSchemeInterface::getColorScheme(i); Q_CHECK_PTR(colorScheme); item->setChecked( (colorScheme == currentColorScheme) ); i++; } } // ###### Update file name ################################################## void FractalGeneratorApp::slotUpdateFileName(const QString& fileName) { setWindowTitle(fileName + QStringLiteral(" - ") + tr("Fractal Generator II")); } // ###### Update Zoon In menu item ########################################## void FractalGeneratorApp::slotUpdateZoomInPossible() { const bool zoomInPossible = View->isZoomInPossible(); ViewZoomIn->setEnabled(zoomInPossible); if(zoomInPossible) { statusBar()->showMessage(tr("Click middle mouse button or choose \"View -> Zoom In\" to magnify selected area!")); } else { statusBar()->showMessage(tr("Ready.")); } } // ###### Update Zoon Back menu item ######################################## void FractalGeneratorApp::slotUpdateZoomBackPossible() { ViewZoomBack->setEnabled(View->isZoomBackPossible()); } // ###### Set algorithm ##################################################### void FractalGeneratorApp::slotViewSetFractalAlgorithm(QAction* action) { const int algorithmID = action->data().toInt(); if(algorithmID < 1000000) { View->changeAlgorithm(algorithmID); View->configChanged(); ViewZoomBack->setEnabled(View->isZoomBackPossible()); } } // ###### Set color scheme ################################################## void FractalGeneratorApp::slotViewSetColorScheme(QAction* action) { const int colorSchemeID = action->data().toInt(); if(colorSchemeID < 1000000) { View->changeColorScheme(colorSchemeID); View->configChanged(); ViewZoomBack->setEnabled(View->isZoomBackPossible()); } } fractgen-2.1.5/src/doubleconfigentry.h0000644000175000017500000000270513371245156016107 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef DOUBLECONFIGENTRY_H #define DOUBLECONFIGENTRY_H #include /** * @author Thomas Dreibholz */ class DoubleConfigEntry : public ConfigEntry { public: DoubleConfigEntry(double* valuePtr, const char* name); ~DoubleConfigEntry(); virtual QString getName() const override; virtual QString getValueAsString() const override; virtual void setValueFromString(const QString& valueString) override; private: QString EntryName; double* ValuePtr; }; #endif fractgen-2.1.5/src/optionsdialog.h0000644000175000017500000000271113371245156015235 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef OPTIONSDIALOG_H #define OPTIONSDIALOG_H #include #include #include #include "configentry.h" class OptionsDialog : public QDialog { Q_OBJECT public: OptionsDialog(QWidget* parent = NULL, QList* configEntries = NULL); ~OptionsDialog(); private: QTableWidget* TableWidget; QList* ConfigEntries; public Q_SLOTS: void slotItemChanged(QTableWidgetItem* item); }; #endif fractgen-2.1.5/src/fractalalgorithminterface.h0000644000175000017500000000556313371245156017576 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALALGORITHMINTERFACE_H #define FRACTALALGORITHMINTERFACE_H #include "configentry.h" #include #include /** *@author Thomas Dreibholz */ class FractalAlgorithmInterface { public: FractalAlgorithmInterface(const char* identifier, const char* name); virtual ~FractalAlgorithmInterface(); inline const char* getIdentifier() { return(Identifier); } inline const char* getName() const { return(Name); } virtual std::complex defaultC1() const = 0; virtual std::complex defaultC2() const = 0; virtual int defaultMaxIterations() const; inline const std::complex getC1() { return(C1); } inline const std::complex getC2() { return(C2); } virtual void configure(unsigned int width, unsigned int height, std::complex c1, std::complex c2, unsigned int maxIterations); inline unsigned int* getMaxIterations() { return(&MaxIterations); } inline QList* getConfigEntries() { return(&ConfigEntries); } virtual void changeSize(int X, int Y); virtual unsigned int calculatePoint(const unsigned int x, const unsigned int y) = 0; static FractalAlgorithmInterface* getAlgorithm(const unsigned int index); static FractalAlgorithmInterface* getAlgorithmByIdentifier(const char* name); protected: const char* Name; const char* Identifier; unsigned int Width; unsigned int Height; unsigned int MaxIterations; std::complex C1; std::complex C2; double StepX; double StepY; QList ConfigEntries; private: static QList* AlgorithmList; static bool Updated; }; #endif fractgen-2.1.5/src/dreibholz1.h0000644000175000017500000000312613371245156014426 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef DREIBHOLZ1_H #define DREIBHOLZ1_H #include #include /** *@author Thomas Dreibholz */ class Dreibholz1 : public FractalAlgorithmInterface { public: Dreibholz1(const char* identifier = "Dreibholz1", const char* name = "Dreibholz1 Test"); ~Dreibholz1(); virtual std::complex defaultC1() const override; virtual std::complex defaultC2() const override; virtual unsigned int calculatePoint(const unsigned int x, const unsigned int y) override; private: static Dreibholz1* Registration; }; #endif fractgen-2.1.5/src/fractgen.cc0000644000175000017500000000356713374565510014325 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalgenerator.h" #include #include // ###### Main program ###################################################### int main(int argc, char *argv[]) { QApplication application(argc, argv); FractalGeneratorApp* fractalGeneratorApp = nullptr; for(int i = 1;i < argc;i++) { const QString fileName = QString::fromLocal8Bit(argv[i]); if( (fractalGeneratorApp == nullptr) && (fileName.right(4) == QStringLiteral(".fsf")) && (QFile::exists(fileName)) ) { // Open file provided by argument ... fractalGeneratorApp = new FractalGeneratorApp(nullptr, fileName); fractalGeneratorApp->show(); } } if(fractalGeneratorApp == nullptr) { // Start new image, if no file has been opened. fractalGeneratorApp = new FractalGeneratorApp(nullptr); fractalGeneratorApp->show(); } return application.exec(); } fractgen-2.1.5/src/fractgen.10000644000175000017500000000354613371245156014073 0ustar hlehle.\" Fractal Generator .\" Copyright (C) 2003-2019 by Thomas Dreibholz .\" .\" This program is free software: you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation, either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program. If not, see . .\" .\" Contact: dreibh@iem.uni-due.de .\" .\" ###### Setup ############################################################ .Dd April 20, 2012 .Dt fractgen 1 .Os fractgen .\" ###### Name ############################################################# .Sh NAME .Nm fractgen .Nd Fractal Generator .\" ###### Synopsis ######################################################### .Sh SYNOPSIS .Nm fractgen .\" ###### Description ###################################################### .Sh DESCRIPTION .Nm fractgen FractGen is a simple Qt-based fractal generator program for Mandelbrot fractals. The image size is only limited by virtual memory. It is possible to zoom into images. Image parameters can be saved in XML files and loaded from XML files. Calculated images can be exported as PNG files. .br The intention of this program is to generate graphics to be post-processed by other image tools, e.g. in order to generate nice screen backgrounds or book covers. .Pp .\" ###### Authors ########################################################## .Sh AUTHORS Thomas Dreibholz .br https://www.uni-due.de/~be0001/fractalgenerator .br mailto://dreibh@iem.uni-due.de .br fractgen-2.1.5/src/uintconfigentry.h0000644000175000017500000000271513371245156015615 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef UINTCONFIGENTRY_H #define UINTCONFIGENTRY_H #include /** * @author Thomas Dreibholz */ class UIntConfigEntry : public ConfigEntry { public: UIntConfigEntry(unsigned int* valuePtr, const char* name); ~UIntConfigEntry(); virtual QString getName() const override; virtual QString getValueAsString() const override; virtual void setValueFromString(const QString& valueString) override; private: QString EntryName; unsigned int* ValuePtr; }; #endif fractgen-2.1.5/src/dreibholz1.cc0000644000175000017500000001274413371245156014572 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "dreibholz1.h" // #include Dreibholz1* Dreibholz1::Registration = new Dreibholz1(); /* ---- Tests ---- Start: z = c 01. z = z*z - pow(z, c) - c; 02. z = z*z - pow(c, (double)i); 03. z = pow(z, (double)i) - c; 04. z = pow(z, 2.0) - exp(c); 05. z = pow(z, 2.0) - log(d*c); 06. z = pow(z, 2.0) - log(c); 07. z = pow(z, 2.0) - sin(c); 08. z = sin(pow(z, 2.0)) - c; 09. z = cos(pow(z, 2.0)) - c; 10. z = z*z*z + z*z + (pow(z, log(z))) - c; 11. z = pow(z, 3) - pow(z, 5) + pow(z, 7) - pow(z, 11) + pow(z, 13) - c; 12. z = cos(pow(z, 3.0)) - c; 13. z = c; z2 = (z.real(), -z.imag()); for(i = 0;i < MaxIterations;i++) { z = z2*z2 - c; z2 = z*z*z - c; 14. z = 0.5*z*z + 0.333*z*z*z + 0.25*z*z*z*z - c; 15. for(int j = 2;j <= 7;j++) { if((j % 2) == 0) z += pow(z, (double)j) / (double)j; else z -= pow(z, (double)j) / (double)j; } z -= c; 16. z2 = z; for(int j = 2;j <= 7;j++) { if((j % 2) == 0) z += pow(z2, (double)j) / (double)j; else z -= pow(z2, (double)j) / (double)j; } z -= c; 17. z2 = z; for(int j = 2;j <= 23;j++) { if((j % 2) == 0) z += pow(z2, (double)j) / (double)j; else z -= pow(z2, (double)j) / (double)j; } z -= c; 18. z2 = z; for(int j = 2;j <= 5;j++) { if((j % 2) == 0) z += sin(pow(z2, (double)j) / (double)j); else z -= cos(pow(z2, (double)j) / (double)j); } z -= c; 19. z = pow(z, 2.5) - std::complex(0.75, -0.34); 20. z = pow(z, 2.5 + c) - c; 21. z = z + pow(z, 2.0) + pow(z, 3.0) - c - c*c - c*c*c; 22. z2 = z; c2 = c; z3 = 0.0; for(int j = 2;j <= 11;j++) { z3 += z2 - c2; z2 *= z; c2 *= c; } z = z3; 23. z2 = z; c2 = c; z3 = 0.0; for(int j = 1;j <= 4;j++) { z3 += (z2 - c2) / (double)j; z2 *= z; c2 *= c; } z = z3; 24. z2 = z; c2 = c; z3 = 0.0; for(int j = 2;j <= 11;j++) { z3 += (z2 - c2); z2 *= z; c2 *= c; } z = z3; 25. z2 = z; c2 = c; z3 = 0.0; for(int j = 2;j <= 5;j++) { z3 += (z2 - c2); z2 *= z; c2 *= c/(double)j; } z = z3; 26. z2 = 1.0; c2 = 1.0; z3 = 0.0; for(int j = 1;j <= 4;j++) { z2 *= z; c2 *= c / (double)j; z3 += (z2 - c2); } z = z3; 27. z2 = 1.0; c2 = 1.0; z3 = 0.0; for(int j = 1;j <= 4;j++) { z2 *= z; c2 *= c / (double)j; z3 += (z2 - c2); } z = sin(z3); 28. ... z = tan(z3); 29. ... z = cos(exp(z3)); 30. ... z = sin(exp(z3)); */ // ###### Constructor ####################################################### Dreibholz1::Dreibholz1(const char* identifier, const char* name) : FractalAlgorithmInterface(identifier, name) { // ConfigEntries.append(new DoubleConfigEntry(&N, "N")); } // ###### Destructor ######################################################## Dreibholz1::~Dreibholz1() { } // ###### Get default for C1 ################################################ std::complex Dreibholz1::defaultC1() const { return(std::complex(-3.5, 3.5)); } // ###### Get default for C2 ################################################ std::complex Dreibholz1::defaultC2() const { return(std::complex(3.5, -3.5)); } // ###### Calculate graphics point (x,y) #################################### unsigned int Dreibholz1::calculatePoint(const unsigned int x, const unsigned int y) { const std::complex c = std::complex(C1.real() + ((double)x * StepX), C1.imag() + ((double)y * StepY)); std::complex z(0.0, 0.0); std::complex z2(0.0, 0.0); std::complex z3(0.0, 0.0); // std::complex c2; unsigned int i; // const double d = abs(c); z = c; z2 = (z.real(), -z.imag()); for(i = 0;i < MaxIterations;i++) { /* z2 = 1.0; c2 = 1.0; z3 = 0.0; for(int j = 1;j <= 4;j++) { z2 *= z; c2 *= c / (double)j; z3 += (z2 - c2); } */ z3 = z*z-c; z = cos(exp(z3)); if(z.real() * z.real() + z.imag() * z.imag() >= 2.0) { return(i); } } return(i); } fractgen-2.1.5/src/fractalbuffer.cc0000644000175000017500000000401713374565510015331 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalbuffer.h" #include // ###### Constructor ####################################################### FractalBuffer::FractalBuffer() { Buffer = nullptr; BufferSize = 0; Width = 0; Height = 0; } // ###### Desstructor ######################################################## FractalBuffer::~FractalBuffer() { reset(0,0); } // ###### Reset FractalBuffer ############################################### bool FractalBuffer::reset(const unsigned int width, const unsigned int height) { if(Buffer) { delete Buffer; } Width = width; Height = height; BufferSize = width * height; if(BufferSize > 0) { Buffer = new unsigned int[BufferSize]; if(Buffer == nullptr) { reset(0,0); return(false); } clear(); } else { Buffer = nullptr; } return(true); } // ###### Clear FractalBuffer ############################################### void FractalBuffer::clear() { for(unsigned int i = 0;i < BufferSize;i++) { Buffer[i] = (unsigned int)~0; } } fractgen-2.1.5/src/mandelbrotn.h0000644000175000017500000000273313371245156014673 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef MANDELBROTN_H #define MANDELBROTN_H #include /** *@author Thomas Dreibholz */ class MandelbrotN : public Mandelbrot { public: MandelbrotN(const char* identifier = "MandelbrotN", const char* name = "MandelbrotN z[i+1]=z[i]^N-c"); ~MandelbrotN(); virtual unsigned int calculatePoint(const unsigned int x, const unsigned int y) override; private: static MandelbrotN* Registration; double N; }; #endif fractgen-2.1.5/src/simplergb.h0000644000175000017500000000276313371245156014355 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef SIMPLERGB_H #define SIMPLERGB_H #include /** *@author Thomas Dreibholz */ class SimpleRGB : public ColorSchemeInterface { public: SimpleRGB(const char* identifier = "SimpleRGB", const char* name = "Simple RGB"); ~SimpleRGB(); virtual unsigned int getColor(const unsigned int value) override; private: static unsigned int rgbFromWaveLength(const double wave); static SimpleRGB* Registration; unsigned int* ColorMap; unsigned int ColorMapSize; }; #endif fractgen-2.1.5/src/doubleconfigentry.cc0000644000175000017500000000357413371245156016252 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "doubleconfigentry.h" // ###### Constructor ####################################################### DoubleConfigEntry::DoubleConfigEntry(double* valuePtr, const char* name) { EntryName = QString::fromLocal8Bit(name); ValuePtr = valuePtr; } // ###### Destructor ######################################################## DoubleConfigEntry::~DoubleConfigEntry() { } // ###### Get name ########################################################## QString DoubleConfigEntry::getName() const { return(EntryName); } // ###### Get value as string ############################################### QString DoubleConfigEntry::getValueAsString() const { QString valueString; valueString.setNum(*ValuePtr); return(valueString); } // ###### Set value from string ############################################# void DoubleConfigEntry::setValueFromString(const QString& valueString) { *ValuePtr = valueString.toDouble(); } fractgen-2.1.5/src/imagedisplay.cc0000644000175000017500000001464213371245156015176 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "imagedisplay.h" #include #include #include // ###### Constructor ####################################################### ImageDisplay::ImageDisplay(QWidget* parent) : QWidget(parent) { Image = new QImage(); Q_CHECK_PTR(Image); OffsetX = 0; OffsetY = 0; MarkX1 = 0; MarkY1 = 0; MarkX2 = 0; MarkY2 = 0; Marking = false; } // ###### Destructor ####################################################### ImageDisplay::~ImageDisplay() { delete Image; } // ###### Reset image ####################################################### bool ImageDisplay::reset(const unsigned int width, const unsigned int height) { if(Image) { delete Image; } Image = new QImage(width, height, QImage::Format_RGB32); Q_CHECK_PTR(Image); for(int y = 0;y < Image->height();y++) { for(int x = 0;x < Image->width();x++) { Image->setPixel(x, y, qRgb(255, 255, 255)); } } OffsetX = 0; OffsetY = 0; MarkX1 = 0; MarkY1 = 0; MarkX2 = 0; MarkY2 = 0; Marking = false; return(true); } // ###### Draw marking rect ################################################# void ImageDisplay::drawMarkerRect(QPainter* painter, int x1, int y1, int x2, int y2, bool draw) { const int x = std::min(x1, x2) - OffsetX; const int y = std::min(y1, y2) - OffsetY; const int w = (std::max(x1, x2) - OffsetX) - x; const int h = (std::max(y1, y2) - OffsetY) - y; const int bw = std::min(w / 2, 5); const int bh = std::min(h / 2, 5); if(draw) { painter->fillRect(x - bw, y - bh, w + 2 * bw, bh, Qt::blue); painter->fillRect(x - bw, y + h + 1, w + 2 * bw, bh, Qt::blue); painter->fillRect(x - bw, y, bw, h + 1, Qt::blue); painter->fillRect(x + w, y, bw, h + 1, Qt::blue); } else { painter->drawImage(x - bw, y - bh, *Image, x - bw + (int)OffsetX, y - bh + (int)OffsetY, w + 2 * bw, bh); painter->drawImage(x - bw, y + h + 1, *Image, x - bw + (int)OffsetX, y + h + 1 + (int)OffsetY, w + 2 * bw, bh); painter->drawImage(x - bw, y, *Image, x - bw + (int)OffsetX, y + (int)OffsetY, bw, h + 1); painter->drawImage(x + w, y, *Image, x + w + (int)OffsetX, y + (int)OffsetY, bw, h + 1); } } // ###### Resize ############################################################ void ImageDisplay::resizeEvent(QResizeEvent*) { update(); } // ###### Repaint ########################################################### void ImageDisplay::paintEvent(QPaintEvent* paintEvent) { QPainter p; p.begin(this); p.drawImage(paintEvent->rect().left(), paintEvent->rect().top(), *Image, paintEvent->rect().left() + OffsetX, paintEvent->rect().top() + OffsetY, paintEvent->rect().width(), paintEvent->rect().height()); if(Marking) { drawMarkerRect(&p, MarkX1, MarkY1, MarkX2, MarkY2); } p.end(); } // ###### Handle mouse press for marking #################################### void ImageDisplay::mousePressEvent(QMouseEvent* mouseEvent) { if(mouseEvent->button() & Qt::LeftButton) { selection(0, 0, 0, 0); // Unmark getMarkPosition(mouseEvent, MarkX1, MarkY1); MarkX2 = MarkX1; MarkY2 = MarkY1; Marking = true; LastOffsetUpdate = QTime::currentTime(); update(); } } // ###### Handle mouse release for marking ################################## void ImageDisplay::mouseReleaseEvent(QMouseEvent* mouseEvent) { LastOffsetUpdate = QTime(); mouseMoveEvent(mouseEvent); if((mouseEvent->button() & Qt::LeftButton) && (Marking)) { getMarkPosition(mouseEvent, MarkX2, MarkY2); if((MarkX1 != MarkX2) && (MarkY1 != MarkY2)) { selection(MarkX1, MarkY1, MarkX2, MarkY2); } update(); } else if((mouseEvent->button() & Qt::RightButton) && (Marking)) { Marking = false; selection(0, 0, 0, 0); // Unmark update(); } if(mouseEvent->button() & Qt::MidButton) { zoom(); } } // ###### Handle mouse movement for marking ################################# void ImageDisplay::mouseMoveEvent(QMouseEvent* mouseEvent) { if((Marking) && (LastOffsetUpdate.elapsed() >= 50)) { int movex = 0; int movey = 0; if(mouseEvent->x() < 0) { movex = std::max(mouseEvent->x(), -((int)OffsetX)); } else if(mouseEvent->x() >= width()) { movex = std::min(mouseEvent->x() - width(), Image->width() - width() - (int)OffsetX); } if(mouseEvent->y() < 0) { movey = std::max(mouseEvent->y(), -((int)OffsetY)); } else if(mouseEvent->y() >= height()) { movey = std::min(mouseEvent->y() - height(), Image->height() - height() - (int)OffsetY); } if((movex != 0) || (movey != 0)) { offsetUpdate((int)OffsetX + movex, (int)OffsetY + movey); LastOffsetUpdate = QTime::currentTime(); } getMarkPosition(mouseEvent, MarkX2, MarkY2); update(); } } // ###### Get (x,y)-position for marking rect ############################### void ImageDisplay::getMarkPosition(QMouseEvent* mouseEvent, int& x, int& y) { x = mouseEvent->x() + (int)OffsetX; if(x < 0) { x = 0; } if(x >= Image->width()) { x = Image->width() - 1; } y = mouseEvent->y() + (int)OffsetY; if(y < 0) { y = 0; } if(y >= Image->height()) { y = Image->height() - 1; } } fractgen-2.1.5/src/fractalcalculationthread.h0000644000175000017500000000410513371245156017404 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALCALCULATIONTHREAD_H #define FRACTALCALCULATIONTHREAD_H #include "fractalalgorithminterface.h" #include "colorschemeinterface.h" #include "fractalbuffer.h" #include #include #include /** * @author Thomas Dreibholz */ class FractalCalculationThread : public QThread { public: FractalCalculationThread(QObject* parent, FractalAlgorithmInterface* algorithm, ColorSchemeInterface* colorScheme, FractalBuffer* buffer, QImage* image, unsigned int progStep); ~FractalCalculationThread(); void stop(); private: void run() override; private: QObject* Parent; FractalAlgorithmInterface* Algorithm; ColorSchemeInterface* ColorScheme; FractalBuffer* Buffer; QImage* Image; unsigned int MaxIterations; unsigned int ProgStep; bool Stop; }; #endif fractgen-2.1.5/src/fractalgeneratordoc.h0000644000175000017500000000377013371245156016401 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALGENERATORDOC_H #define FRACTALGENERATORDOC_H #include #include #include class FractalGeneratorView; class FractalGeneratorApp; class FractalGeneratorDoc : public QObject { Q_OBJECT public: FractalGeneratorDoc(QWidget* parent, FractalGeneratorView* view); ~FractalGeneratorDoc(); inline const QString& getFileName() const { return(FileName); } inline void setFileName(const QString& fileName) { FileName = fileName; emit updateFileName(FileName); } inline void setModified(bool modified) { Modified = modified; }; inline bool isModified() { return Modified; }; void newDocument(); bool openDocument(const QString& fileName); bool saveDocument(const QString& fileName); bool saveModified(); void closeDocument(); Q_SIGNALS: void updateFileName(const QString& fileName); private: bool Modified; QString FileName; FractalGeneratorApp* Application; FractalGeneratorView* View; }; #endif // FRACTALGENERATORDOC_H fractgen-2.1.5/src/mandelbrotn.cc0000644000175000017500000000407613371245156015033 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "mandelbrotn.h" #include "doubleconfigentry.h" #include MandelbrotN* MandelbrotN::Registration = new MandelbrotN(); // ###### Constructor ####################################################### MandelbrotN::MandelbrotN(const char* identifier, const char* name) : Mandelbrot(identifier, name) { N = 4.0; ConfigEntries.append(new DoubleConfigEntry(&N, "N")); } // ###### Destructor ######################################################## MandelbrotN::~MandelbrotN() { } // ###### Calculate graphics point (x,y) #################################### unsigned int MandelbrotN::calculatePoint(const unsigned int x, const unsigned int y) { const std::complex c = std::complex(C1.real() + ((double)x * StepX), C1.imag() + ((double)y * StepY)); std::complex z(0.0, 0.0); unsigned int i; for(i = 0;i < MaxIterations;i++) { z = pow(z, (int)rint(N)) - c; if(z.real() * z.real() + z.imag() * z.imag() >= 2.0) { return(i); } } return(i); } fractgen-2.1.5/src/examples/0000755000175000017500000000000013471010227014014 5ustar hlehlefractgen-2.1.5/src/examples/test1.fsf0000644000175000017500000000122513151750737015570 0ustar hlehle Dreibholz1 5.8515600299835168751627634264877997338771820068359375000000000000e-1 6.0815045313040416719019276570179499685764312744140625000000000000e-1 5.8886473274230921592931053965003229677677154541015625000000000000e-1 6.0536890582243596536926588669302873313426971435546875000000000000e-1 250 SimpleRGB 640*480 fractgen-2.1.5/src/examples/alpha02.fsf0000644000175000017500000000124713010617013015742 0ustar hlehle MandelbrotN 6.0170140912536629329565585067030042409896850585937500000000000000e-01 6.6122014423103336877574065510998480021953582763671875000000000000e-01 6.0171967580566398936525729368440806865692138671875000000000000000e-01 6.6120644422080998570123711033375002443790435791015625000000000000e-01 1000 3 SimpleHSV 800*600 fractgen-2.1.5/src/examples/alpha06.fsf0000644000175000017500000000125013010617013015740 0ustar hlehle MandelbrotN 9.1714295654296926901816178201443108264356851577758789062500000000e-03 8.8286855146789555703890073345974087715148925781250000000000000000e-01 9.2064089941406301864645911336992867290973663330078125000000000000e-03 8.8284231689636227802253642948926426470279693603515625000000000000e-01 1000 12 SimpleHSV 800*600 fractgen-2.1.5/src/examples/alpha01.fsf0000644000175000017500000000124713010617013015741 0ustar hlehle MandelbrotN 1.2051932340603803417433681488546426407992839813232421875000000000e-01 1.0614469954703931175998832259210757911205291748046875000000000000e+00 1.2051932340634355367292585015093209221959114074707031250000000000e-01 1.0614469954701639675676005936111323535442352294921875000000000000e+00 1000 7 SimpleHSV 800*600 fractgen-2.1.5/src/examples/test2.fsf0000644000175000017500000000123213151750737015567 0ustar hlehle Mandelbrot 1.8880079188257670175232760811923071742057800292968750000000000000e-01 8.2172110207080684141089932381873950362205505371093750000000000000e-01 1.8882347045376707272978933360718656331300735473632812500000000000e-01 8.2170409314241399378886399063048884272575378417968750000000000000e-01 1000 SimpleRGB 640*480 fractgen-2.1.5/src/examples/alpha08.fsf0000644000175000017500000000125013010617013015742 0ustar hlehle MandelbrotN 9.1840566069877980354130286855252052191644906997680664062500000000e-03 8.8285672401226811256691462403978221118450164794921875000000000000e-01 9.1844592892146494772509512927172181662172079086303710937500000000e-03 8.8285642200059799566957963179447688162326812744140625000000000000e-01 1000 12 SimpleHSV 800*600 fractgen-2.1.5/src/examples/alpha07.fsf0000644000175000017500000000125013010617013015741 0ustar hlehle MandelbrotN 9.1832892314234210867640584297078021336346864700317382812500000000e-03 8.8285725427384820207521443080622702836990356445312500000000000000e-01 9.1853153055207869409626297851900744717568159103393554687500000000e-03 8.8285573471827527569644189497921615839004516601562500000000000000e-01 1000 12 SimpleHSV 800*600 fractgen-2.1.5/src/examples/demo-fractal.fsf0000644000175000017500000000125213010617013017045 0ustar hlehle MandelbrotN -3.3137187052975297651968844547809567302465438842773437500000000000e-01 7.8274861619479341179328457656083628535270690917968750000000000000e-01 -3.3136892090510233765954239970596972852945327758789062500000000000e-01 7.8274640397630546040375065786065533757209777832031250000000000000e-01 2500 5 SimpleHSV 1024*768 fractgen-2.1.5/src/examples/alpha04.fsf0000644000175000017500000000124713010617013015744 0ustar hlehle MandelbrotN 6.0171635143182389260374520745244808495044708251953125000000000000e-01 6.6121726820090920284656021976843476295471191406250000000000000000e-01 6.0171636896212865597277641427353955805301666259765625000000000000e-01 6.6121725505318074134208927716827020049095153808593750000000000000e-01 1000 3 SimpleHSV 800*600 fractgen-2.1.5/src/examples/alpha03.fsf0000644000175000017500000000124713010617013015743 0ustar hlehle MandelbrotN 6.0171604530295486057411835645325481891632080078125000000000000000e-01 6.6121779525011370459708359703654423356056213378906250000000000000e-01 6.0171794047103555058697565982583910226821899414062500000000000000e-01 6.6121637387405318708744061950710602104663848876953125000000000000e-01 1000 3 SimpleHSV 800*600 fractgen-2.1.5/src/examples/alpha05.fsf0000644000175000017500000000124713010617013015745 0ustar hlehle MandelbrotN 6.0171636259506711130740086446166969835758209228515625000000000000e-01 6.6121725695422584045957137277582660317420959472656250000000000000e-01 6.0171636297881647692520346026867628097534179687500000000000000000e-01 6.6121725666641384400179504154948517680168151855468750000000000000e-01 1000 3 SimpleHSV 800*600 fractgen-2.1.5/src/fractalalgorithminterface.cc0000644000175000017500000001020013374565510017716 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalalgorithminterface.h" #include "uintconfigentry.h" QList* FractalAlgorithmInterface::AlgorithmList = nullptr; bool FractalAlgorithmInterface::Updated = false; // ###### Constructor ####################################################### FractalAlgorithmInterface::FractalAlgorithmInterface(const char* identifier, const char* name) { Updated = true; Identifier = identifier; Name = name; if(AlgorithmList == nullptr) { AlgorithmList = new QList; } AlgorithmList->append(this); // When using this mechanism to allow configuration of own variables // in derived classes you need to make sure the string could be used in // well-formed xml as a tag (i.e. no whitespaces) ConfigEntries.append(new UIntConfigEntry(&MaxIterations, "MaxIterations")); } // ###### Destructor ######################################################## FractalAlgorithmInterface::~FractalAlgorithmInterface() { AlgorithmList->removeAll(this); } // ###### Get default number of iterations ################################## int FractalAlgorithmInterface::defaultMaxIterations() const { return(250); } // ###### Configure algorithm ############################################### void FractalAlgorithmInterface::configure(unsigned int width, unsigned int height, std::complex c1, std::complex c2, unsigned int maxIterations) { Width = width; Height = height; MaxIterations = maxIterations; C1 = c1; C2 = c2; StepX = (c2.real() - c1.real()) / Width; StepY = (c2.imag() - c1.imag()) / Height; } // ###### Change image size ################################################## void FractalAlgorithmInterface::changeSize(int X, int Y) { Width = X; Height = Y; StepX = (C2.real() - C1.real()) / Width; StepY = (C2.imag() - C1.imag()) / Height; } // ###### Comparison function for names ###################################### static bool lessThan(const FractalAlgorithmInterface* f1, const FractalAlgorithmInterface* f2) { return(strcmp(f1->getName(), f2->getName()) < 0); } // ###### Get algorithm by number ############################################# FractalAlgorithmInterface* FractalAlgorithmInterface::getAlgorithm(const unsigned int index) { if(Updated) { qSort(AlgorithmList->begin(), AlgorithmList->end(), lessThan); Updated = false; } return(AlgorithmList->value(index, nullptr)); } // ###### Get algorithm by identifier ####################################### FractalAlgorithmInterface* FractalAlgorithmInterface::getAlgorithmByIdentifier(const char* identifier) { QListIterator iterator(*AlgorithmList); while(iterator.hasNext()) { FractalAlgorithmInterface* algorithm = iterator.next(); if(strcmp(identifier, algorithm->getIdentifier()) == 0) { return(algorithm); } } return(nullptr); } fractgen-2.1.5/src/fractalbuffer.h0000644000175000017500000000410013371245156015162 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALBUFFER_H #define FRACTALBUFFER_H // #include // #include /** *@author Thomas Dreibholz */ class FractalBuffer { public: FractalBuffer(); ~FractalBuffer(); bool reset(const unsigned int width, const unsigned int height); void clear(); inline unsigned int getPoint(const unsigned int x, const unsigned int y) { unsigned int pos = y * Width + x; if(pos < BufferSize) { return(Buffer[pos]); } // printf("ERROR: FractalBuffer::getPoint() - Illegal position: x=%d y=%d in w=%d h=%d\n", x, y, Width, Height); // abort(); return(~0); } inline void setPoint(const unsigned int x, const unsigned int y, const unsigned int value) { unsigned int pos = y * Width + x; if(pos < BufferSize) { Buffer[pos] = value; } // else { // printf("ERROR: FractalBuffer::setPoint() - Illegal position: x=%d y=%d in w=%d h=%d\n",x,y,Width,Height); // abort(); // } } private: unsigned int* Buffer; unsigned int BufferSize; unsigned int Width; unsigned int Height; }; #endif fractgen-2.1.5/src/imagedisplay.h0000644000175000017500000000563013371245156015035 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef IMAGEDISPLAY_H #define IMAGEDISPLAY_H #include #include #include #include #include #include #include class ImageDisplay : public QWidget { Q_OBJECT public: ImageDisplay(QWidget* parent); ~ImageDisplay(); bool reset(const unsigned int width, const unsigned int height); inline void setPoint(const unsigned int x, const unsigned int y, const QRgb color) { Image->setPixel(x, y, color); } inline QImage* image() { return(Image); } inline int imageWidth() { return(Image->width()); } inline int imageHeight() { return(Image->height()); } inline unsigned int offsetX() { return(OffsetX); } inline unsigned int offsetY() { return(OffsetY); } inline void setOffsetX(const unsigned int offsetX) { OffsetX = offsetX; } inline void setOffsetY(const unsigned int offsetY) { OffsetY = offsetY; } inline bool saveImage(QString &path, const char *format) { return Image->save(path, format); } Q_SIGNALS: void offsetUpdate(int newOffsetX, int newOffsetY); void selection(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2); void zoom(); protected: void resizeEvent(QResizeEvent* resizeEvent) override; void paintEvent(QPaintEvent* paintEvent) override; void mousePressEvent(QMouseEvent* mouseEvent) override; void mouseReleaseEvent(QMouseEvent* mouseEvent) override; void mouseMoveEvent(QMouseEvent* mouseEvent) override; private: void getMarkPosition(QMouseEvent* mouseEvent, int& x, int& y); void drawMarkerRect(QPainter* painter, int x1, int y1, int x2, int y2, bool draw = true); QImage* Image; unsigned int OffsetX; unsigned int OffsetY; QTime LastOffsetUpdate; int MarkX1; int MarkY1; int MarkX2; int MarkY2; bool Marking; }; #endif fractgen-2.1.5/src/fractalcalculationthread.cc0000644000175000017500000000650213371245156017545 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalcalculationthread.h" #include #include // ###### Constructor ####################################################### FractalCalculationThread::FractalCalculationThread(QObject* parent, FractalAlgorithmInterface* algorithm, ColorSchemeInterface* colorScheme, FractalBuffer* buffer, QImage* image, unsigned int progStep) { Parent = parent; Algorithm = algorithm; ColorScheme = colorScheme; Buffer = buffer; Image = image; ProgStep = progStep; MaxIterations = *Algorithm->getMaxIterations(); Stop = false; } // ###### Destructor ######################################################## FractalCalculationThread::~FractalCalculationThread() { wait(); } // ###### Thread main function ############################################## void FractalCalculationThread::run() { const unsigned int width = Image->width(); const unsigned int height = Image->height(); for(unsigned int step = ProgStep;step >= 1;step /= 2) { for(unsigned int y = 0;y < height;y += step) { for(unsigned int x = 0;x < width;x += step) { if(Buffer->getPoint(x, y) == (unsigned int)~0) { const unsigned int value = Algorithm->calculatePoint(x, y); Buffer->setPoint(x, y, value); const unsigned int rgb = ColorScheme->getColor(value); for(unsigned int vy = y;vy < std::min(y + step, height);vy++) { for(unsigned int vx = x;vx < std::min(x + step, width);vx++) { Image->setPixel(vx, vy, rgb); } } if(Stop) { goto finished; } } } } QCoreApplication::postEvent(Parent, new QEvent(QEvent::User)); } finished: QCoreApplication::postEvent(Parent, new QEvent((QEvent::Type)(QEvent::User + 1))); } // ###### Stop thread and wait until it has really finished ################# void FractalCalculationThread::stop() { Stop = true; wait(); Stop = false; } fractgen-2.1.5/src/fractalgeneratordoc.cc0000644000175000017500000002325013371245156016532 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "fractalgeneratordoc.h" #include "fractalgenerator.h" #include "fractalgenerator.h" #include "fractalgeneratorview.h" #include #include #include #include #include // ###### Constructor ####################################################### FractalGeneratorDoc::FractalGeneratorDoc(QWidget* parent, FractalGeneratorView* view) : QObject(parent) { View = view; Application = static_cast(parent); } // ###### Destructor ######################################################## FractalGeneratorDoc::~FractalGeneratorDoc() { closeDocument(); } // ###### Close document #################################################### void FractalGeneratorDoc::closeDocument() { } // ###### New document ###################################################### void FractalGeneratorDoc::newDocument() { Modified = false; setFileName(tr("Unnamed.fsf")); } // ###### Open document ##################################################### bool FractalGeneratorDoc::openDocument(const QString& fileName) { // ====== Open file ====================================================== QFile file(fileName); if(!file.open(QIODevice::ReadOnly)) { return(false); } // ====== Parse XML document ============================================= QDomDocument doc(QStringLiteral("XMLFractalSave")); QString errorText; int line, column; if(!doc.setContent(&file, false, &errorText, &line, &column)) { QMessageBox::warning(Application, tr("Open File Failure"), errorText + tr(" in line ") + QString().setNum(line) + tr(", column ") + QString().setNum(column)); return(false); } // ====== Get fractal configuration ====================================== // ------ Get algorithm -------------------------------------------------- const QDomElement algorithmNameField = doc.elementsByTagName(QStringLiteral("AlgorithmName")).item(0).toElement(); const QString algorithmName = algorithmNameField.firstChild().toText().data(); unsigned int algorithmID = 0; FractalAlgorithmInterface* fractalAlgorithm; while( (fractalAlgorithm = FractalAlgorithmInterface::getAlgorithm(algorithmID)) != NULL ) { if(QString::fromLocal8Bit(fractalAlgorithm->getIdentifier()) == algorithmName) { break; } algorithmID++; } if(fractalAlgorithm == NULL) { QMessageBox::warning(Application, tr("Open File Failure"), tr("Invalid AlgorithmName entry:") + algorithmName); return(false); } // ------ Get color scheme ----------------------------------------------- const QDomElement colorSchemeField = doc.elementsByTagName(QStringLiteral("ColorSchemeName")).item(0).toElement(); const QString colorSchemeName = colorSchemeField.firstChild().toText().data(); unsigned int colorSchemeID = 0; ColorSchemeInterface* colorScheme; while((colorScheme = ColorSchemeInterface::getColorScheme(colorSchemeID))) { if(QString::fromLocal8Bit(colorScheme->getIdentifier()) == colorSchemeName) { break; } colorSchemeID++; } if(colorScheme == NULL) { QMessageBox::warning(Application, tr("Open File Failure"), tr("Invalid ColorSchemeName entry:") + colorSchemeName); return(false); } // ------ Get C1 and C2 -------------------------------------------------- const double c1real = doc.elementsByTagName(QStringLiteral("C1Real")).item(0).firstChild().toText().data().toDouble(); const double c1imag = doc.elementsByTagName(QStringLiteral("C1Imag")).item(0).firstChild().toText().data().toDouble(); const double c2real = doc.elementsByTagName(QStringLiteral("C2Real")).item(0).firstChild().toText().data().toDouble(); const double c2imag = doc.elementsByTagName(QStringLiteral("C2Imag")).item(0).firstChild().toText().data().toDouble(); const std::complex C1(c1real, c1imag); const std::complex C2(c2real, c2imag); View->changeC1C2(C1, C2); // ------ Activate settings ---------------------------------------------- View->changeAlgorithm(algorithmID); View->changeColorScheme(colorSchemeID); View->getAlgorithm()->configure(View->getSizeX(), View->getSizeY(), C1, C2,*(View->getAlgorithm()->getMaxIterations())); // ------ Set user options ----------------------------------------------- QDomElement userOptionsBranch = doc.elementsByTagName(QStringLiteral("Useroptions")).item(0).toElement(); QDomNode userOptionsChild = userOptionsBranch.firstChild(); while(!userOptionsChild.isNull()) { QListIterator iterator(*(View->getAlgorithm()->getConfigEntries())); const QString name = userOptionsChild.nodeName(); const QString value = userOptionsChild.firstChild().toText().data(); bool found = false; while(iterator.hasNext()) { ConfigEntry* configEntry = iterator.next(); if(configEntry->getName() == name) { configEntry->setValueFromString(value); found = true; break; } } if(!found) { QMessageBox::warning(Application, tr("Open File Warning"), tr("Skipping unknown entry:") + name); } userOptionsChild = userOptionsChild.nextSibling(); } // ------ Show new configuration ----------------------------------------- setFileName(fileName); View->configChanged(); Modified = false; return(true); } // ###### Save document ##################################################### bool FractalGeneratorDoc::saveDocument(const QString& fileName) { QDomDocument doc(QStringLiteral("XMLFractalSave")); QDomElement root = doc.createElement(QStringLiteral("FractalV1")); doc.appendChild(root); // Create Algorithm branch QDomElement algorithm = doc.createElement(QStringLiteral("Algorithm")); root.appendChild(algorithm); // Algorithm Name QDomElement tag = doc.createElement(QStringLiteral("AlgorithmName")); algorithm.appendChild(tag); QDomText text = doc.createTextNode(QString::fromLocal8Bit(View->getAlgorithm()->getIdentifier())); tag.appendChild(text); // Algorithm C1Real QDomElement C = doc.createElement(QStringLiteral("C1Real")); algorithm.appendChild(C); text = doc.createTextNode(QString().setNum(View->getAlgorithm()->getC1().real(), 'e', 64)); C.appendChild(text); // Algorithm C1Imag C = doc.createElement(QStringLiteral("C1Imag")); algorithm.appendChild(C); text = doc.createTextNode(QString().setNum(View->getAlgorithm()->getC1().imag(), 'e', 64)); C.appendChild(text); // Algorithm C2Real C = doc.createElement(QStringLiteral("C2Real")); algorithm.appendChild(C); text = doc.createTextNode(QString().setNum(View->getAlgorithm()->getC2().real(), 'e', 64)); C.appendChild(text); // Algorithm C2Imag C = doc.createElement(QStringLiteral("C2Imag")); algorithm.appendChild(C); text = doc.createTextNode(QString().setNum(View->getAlgorithm()->getC2().imag(), 'e', 64)); C.appendChild(text); // Create UserOptions branch QDomElement optionRoot = doc.createElement(QStringLiteral("Useroptions")); algorithm.appendChild(optionRoot); QDomElement option; QListIterator iterator(*View->getAlgorithm()->getConfigEntries()); while(iterator.hasNext()) { ConfigEntry* configEntry = iterator.next(); option = doc.createElement(configEntry->getName()); optionRoot.appendChild(option); text = doc.createTextNode(configEntry->getValueAsString()); option.appendChild(text); } // Create ColorScheme branch QDomElement colorScheme = doc.createElement(QStringLiteral("ColorScheme")); root.appendChild(colorScheme); tag = doc.createElement(QStringLiteral("ColorSchemeName")); colorScheme.appendChild(tag); text = doc.createTextNode(QString::fromLocal8Bit(View->getColorScheme()->getIdentifier())); tag.appendChild(text); // Resolution QDomElement resolution = doc.createElement(QStringLiteral("Resolution")); root.appendChild( resolution ); QString CurrentSize; CurrentSize += QString().setNum(View->getSizeX()); CurrentSize += tr("*"); CurrentSize += QString().setNum(View->getSizeY()); text = doc.createTextNode( CurrentSize ); resolution.appendChild(text); // Write XML document to file QString newFileName = fileName; if(newFileName.right(4) != QStringLiteral(".fsf")) { newFileName += QStringLiteral(".fsf"); } QFile file(newFileName); file.open(QIODevice::WriteOnly); file.write(doc.toString().toLocal8Bit()); setFileName(newFileName); Modified = false; return(true); } fractgen-2.1.5/src/simplehsv.h0000644000175000017500000000256413371245156014402 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef SIMPLEHSV_H #define SIMPLEHSV_H #include /** *@author Thomas Dreibholz */ class SimpleHSV : public ColorSchemeInterface { public: SimpleHSV(const char* identifier = "SimpleHSV", const char* name = "Simple HSV"); ~SimpleHSV(); virtual unsigned int getColor(const unsigned int value) override; private: static SimpleHSV* Registration; }; #endif fractgen-2.1.5/src/colorschemeinterface.cc0000644000175000017500000000567313374565510016720 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "colorschemeinterface.h" #include QList* ColorSchemeInterface::ColorSchemeList = nullptr; bool ColorSchemeInterface::Updated = false; // ###### Constructor ####################################################### ColorSchemeInterface::ColorSchemeInterface(const char* identifier, const char* name) { Updated = true; Identifier = identifier; Name = name; if(ColorSchemeInterface::ColorSchemeList == nullptr) { ColorSchemeInterface::ColorSchemeList = new QList; } ColorSchemeList->append(this); } // ###### Constructor ####################################################### ColorSchemeInterface::~ColorSchemeInterface() { ColorSchemeList->removeAll(this); } // ###### Destructor ######################################################## void ColorSchemeInterface::configure(unsigned int* maxIterations) { MaxIterations = maxIterations; } // ###### Comparison function for names ##################################### static bool lessThan(const ColorSchemeInterface* c1, const ColorSchemeInterface* c2) { return(strcmp(c1->getName(), c2->getName()) < 0); } // ###### Get color scheme by number ######################################## ColorSchemeInterface* ColorSchemeInterface::getColorScheme(const unsigned int index) { if(Updated) { qSort(ColorSchemeList->begin(), ColorSchemeList->end(), lessThan); Updated = false; } return(ColorSchemeList->value(index, nullptr)); } // ###### Get color scheme by ID ############################################ ColorSchemeInterface* ColorSchemeInterface::getColorSchemeByIdentifier(const char* identifier) { QListIterator iterator(*ColorSchemeList); while(iterator.hasNext()) { ColorSchemeInterface* colorScheme = iterator.next(); if(strcmp(identifier, colorScheme->getIdentifier()) == 0) { return(colorScheme); } } return(nullptr); } fractgen-2.1.5/src/simplergb.cc0000644000175000017500000000526013374565510014510 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "simplergb.h" #include #include SimpleRGB* SimpleRGB::Registration = new SimpleRGB(); #define INITAL_COLORMAP_SIZE 256 SimpleRGB::SimpleRGB(const char* identifier, const char* name) : ColorSchemeInterface(identifier, name) { ColorMapSize = INITAL_COLORMAP_SIZE; ColorMap = new unsigned int[ColorMapSize]; Q_CHECK_PTR(ColorMap); for(unsigned int i = 0;i < ColorMapSize;i++) { ColorMap[i] = rgbFromWaveLength(380.0 + (i * 400.0 / ColorMapSize)); } } SimpleRGB::~SimpleRGB() { delete [] ColorMap; ColorMap = nullptr; } unsigned int SimpleRGB::rgbFromWaveLength(const double wave) { double r = 0.0; double g = 0.0; double b = 0.0; if (wave >= 380.0 && wave <= 440.0) { r = -1.0 * (wave - 440.0) / (440.0 - 380.0); b = 1.0; } else if (wave >= 440.0 && wave <= 490.0) { g = (wave - 440.0) / (490.0 - 440.0); b = 1.0; } else if (wave >= 490.0 && wave <= 510.0) { g = 1.0; b = -1.0 * (wave - 510.0) / (510.0 - 490.0); } else if (wave >= 510.0 && wave <= 580.0) { r = (wave - 510.0) / (580.0 - 510.0); g = 1.0; } else if (wave >= 580.0 && wave <= 645.0) { r = 1.0; g = -1.0 * (wave - 645.0) / (645.0 - 580.0); } else if (wave >= 645.0 && wave <= 780.0) { r = 1.0; } double s = 1.0; if (wave > 700.0) { s = 0.3 + 0.7 * (780.0 - wave) / (780.0 - 700.0); } else if (wave < 420.0) { s = 0.3 + 0.7 * (wave - 380.0) / (420.0 - 380.0); } r = pow(r * s, 0.8); g = pow(g * s, 0.8); b = pow(b * s, 0.8); return qRgb(int(r * 255), int(g * 255), int(b * 255)); } unsigned int SimpleRGB::getColor(const unsigned int value) { return(ColorMap[value % ColorMapSize]); } fractgen-2.1.5/src/mandelbrot.cc0000644000175000017500000000444213371245156014652 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "mandelbrot.h" Mandelbrot* Mandelbrot::Registration = new Mandelbrot(); // ###### Constructor ####################################################### Mandelbrot::Mandelbrot(const char* identifier, const char* name) : FractalAlgorithmInterface(identifier, name) { } // ###### Destructor ######################################################## Mandelbrot::~Mandelbrot() { } // ###### Get default for C1 ################################################ std::complex Mandelbrot::defaultC1() const { return(std::complex(-1.5, 1.5)); } // ###### Get default for C2 ################################################ std::complex Mandelbrot::defaultC2() const { return(std::complex(1.5, -1.5)); } // ###### Calculate graphics point (x,y) #################################### unsigned int Mandelbrot::calculatePoint(const unsigned int x, const unsigned int y) { const std::complex c = std::complex(C1.real() + ((double)x * StepX), C1.imag() + ((double)y * StepY)); std::complex z(0.0, 0.0); unsigned int i; for(i = 0;i < MaxIterations;i++) { z = z*z - c; if(z.real() * z.real() + z.imag() * z.imag() >= 2.0) { return(i); } } return(i); } fractgen-2.1.5/src/fractalgeneratorview.h0000644000175000017500000000750413371245156016605 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALGENERATORVIEW_H #define FRACTALGENERATORVIEW_H #include "imagedisplay.h" #include "fractalbuffer.h" #include "fractalalgorithminterface.h" #include "fractalcalculationthread.h" #include "colorschemeinterface.h" #include #include #include #include #include #include #include #ifdef WITH_KDE #include #endif class FractalGeneratorDoc; class FractalGeneratorApp; class FractalGeneratorView : public QWidget { Q_OBJECT public: FractalGeneratorView(QWidget* parent); ~FractalGeneratorView(); inline ImageDisplay* getDisplay() const { return(Display); } inline FractalAlgorithmInterface* getAlgorithm() const { return(Algorithm); } inline ColorSchemeInterface* getColorScheme() const { return(ColorScheme); } inline int getSizeX() { return(SizeX); } inline int getSizeY() { return(SizeY); } inline bool isZoomInPossible() { return(Selection); } inline bool isZoomBackPossible() { return(zoomList.size() > 0); } void print(QPrinter *printer); void configChanged(); void changeSize(int X, int Y); void changeAlgorithm(int index); void changeColorScheme(int index); void changeC1C2(std::complex newC1, std::complex newC2); public Q_SLOTS: void slotXScrollBarChange(int value); void slotYScrollBarChange(int value); void slotOffsetUpdate(int newOffsetX, int newOffsetY); void slotSelectionUpdate(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2); void zoomIn(); void zoomBack(); void zoomReset(); Q_SIGNALS: void updateZoomInPossible(); void updateZoomBackPossible(); void updateFractalAlgorithm(); void updateColorScheme(); protected: void resizeEvent(QResizeEvent* resizeEvent) override; bool eventFilter(QObject* object, QEvent* event) override; private: void updateScrollBars(); void updateLED(const bool busy); void updateView(); void startCalculation(); void stopCalculation(); QScrollBar* XScrollBar; QScrollBar* YScrollBar; #ifndef WITH_KDE QLabel* ControlLED; #else KLed* ControlLED; #endif ImageDisplay* Display; FractalBuffer* Buffer; FractalCalculationThread* Thread; FractalAlgorithmInterface* Algorithm; ColorSchemeInterface* ColorScheme; unsigned int ProgStep; std::complex C1; std::complex C2; std::complex SelectionC1; std::complex SelectionC2; bool Selection; int SizeX; int SizeY; std::list, std::complex > > zoomList; }; #endif // FRACTALGENERATORVIEW_H fractgen-2.1.5/src/CMakeLists.txt0000644000175000017500000000354413371245156014756 0ustar hlehleSET(CMAKE_INCLUDE_CURRENT_DIR ON) ############################################################################# # PROGRAMS ############################################################################# ADD_EXECUTABLE(fractgen colorschemeinterface.cc doubleconfigentry.cc dreibholz1.cc fractalalgorithminterface.cc fractalbuffer.cc fractalcalculationthread.cc fractgen.cc imagedisplay.cc fractalgenerator.cc fractalgeneratordoc.cc fractalgeneratorview.cc mandelbrot.cc mandelbrotn.cc optionsdialog.cc simplehsv.cc simplergb.cc uintconfigentry.cc) TARGET_LINK_LIBRARIES(fractgen Qt5::Widgets Qt5::Xml Qt5::Core Qt5::PrintSupport) INSTALL(TARGETS fractgen RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) INSTALL(FILES fractgen.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) IF (ENABLE_KDE) ADD_EXECUTABLE(kfractgen colorschemeinterface.cc doubleconfigentry.cc dreibholz1.cc fractalalgorithminterface.cc fractalbuffer.cc fractalcalculationthread.cc fractgen.cc imagedisplay.cc fractalgenerator.cc fractalgeneratordoc.cc fractalgeneratorview.cc mandelbrot.cc mandelbrotn.cc optionsdialog.cc simplehsv.cc simplergb.cc uintconfigentry.cc) SET_TARGET_PROPERTIES(kfractgen PROPERTIES COMPILE_FLAGS "-DWITH_KDE") TARGET_LINK_LIBRARIES(kfractgen Qt5::Widgets Qt5::Xml Qt5::Core Qt5::PrintSupport KF5::CoreAddons KF5::WidgetsAddons KF5::XmlGui) INSTALL(TARGETS kfractgen RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) ENDIF() # ###### Examples ########################################################### FILE(GLOB fractgen_examples "examples/*.fsf") INSTALL(FILES ${fractgen_examples} DESTINATION ${CMAKE_INSTALL_DATADIR}/fractgen/examples) fractgen-2.1.5/src/fractalgenerator.h0000644000175000017500000000476313371245156015716 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef FRACTALGENERATOR_H #define FRACTALGENERATOR_H #include #include #include #ifdef WITH_KDE #include #endif class FractalGeneratorDoc; class FractalGeneratorView; class FractalGeneratorApp #ifndef WITH_KDE : public QMainWindow #else : public KXmlGuiWindow #endif { Q_OBJECT friend class FractalGeneratorView; public: FractalGeneratorApp(QWidget* parent, const QString& fileName = QString()); ~FractalGeneratorApp(); protected: void initActions(); void initStatusBar(); void initDocument(); void initView(); public Q_SLOTS: void slotFileOpen(); void slotFileSave(); void slotFileExportImage(); void slotFileSaveAs(); void slotFileClose(); void slotFilePrint(); void slotFileQuit(); void slotHelpAbout(); void slotViewSetImageSize(); void slotViewConfigureAlgorithm(); void slotViewSetFractalAlgorithm(QAction* action); void slotViewSetColorScheme(QAction* action); void slotUpdateFileName(const QString& fileName); void slotUpdateFractalAlgorithm(); void slotUpdateColorScheme(); void slotUpdateZoomBackPossible(); void slotUpdateZoomInPossible(); private: FractalGeneratorView* View; FractalGeneratorDoc* Document; QAction* ViewZoomIn; QAction* ViewZoomBack; QList FractalAlgorithmActionList; QList ColorSchemeActionList; QPrinter Printer; }; #endif // FRACTALGENERATOR_H fractgen-2.1.5/src/colorschemeinterface.h0000644000175000017500000000351013371245156016544 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef COLORSCHEMEINTERFACE_H #define COLORSCHEMEINTERFACE_H #include /** *@author Thomas Dreibholz */ class ColorSchemeInterface { public: ColorSchemeInterface(const char* identifier, const char* name); virtual ~ColorSchemeInterface(); inline const char* getIdentifier() { return(Identifier); } inline const char* getName() const { return(Name); } virtual void configure(unsigned int* maxIterations); virtual unsigned int getColor(const unsigned int value) = 0; static ColorSchemeInterface* getColorScheme(const unsigned int index); static ColorSchemeInterface* getColorSchemeByIdentifier(const char* identifier); protected: const char* Name; const char* Identifier; unsigned int* MaxIterations; private: static QList* ColorSchemeList; static bool Updated; }; #endif fractgen-2.1.5/src/optionsdialog.cc0000644000175000017500000000737513371245156015406 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "optionsdialog.h" #include #include #include // ###### Constructor ####################################################### OptionsDialog::OptionsDialog(QWidget* parent, QList* configEntries) : QDialog(parent) { setWindowTitle(tr("Fractal Algorithm Options")); ConfigEntries = configEntries; QVBoxLayout* layout = new QVBoxLayout(this); Q_CHECK_PTR(layout); TableWidget = new QTableWidget(configEntries->size(), 2, this); Q_CHECK_PTR(TableWidget); QTableWidgetItem* parameterName = new QTableWidgetItem(tr("Parameter Name")); Q_CHECK_PTR(parameterName); parameterName->setTextAlignment(Qt::AlignLeft); TableWidget->setHorizontalHeaderItem(0, parameterName); QTableWidgetItem* parameterValue = new QTableWidgetItem(tr("Parameter Value")); Q_CHECK_PTR(parameterValue); parameterValue->setTextAlignment(Qt::AlignLeft); TableWidget->setHorizontalHeaderItem(1, parameterValue); QListIterator iterator(*configEntries); int row = 0; while(iterator.hasNext()) { ConfigEntry* configEntry = iterator.next(); QTableWidgetItem* parameterName = new QTableWidgetItem(configEntry->getName()); Q_CHECK_PTR(parameterName); parameterName->setFlags(Qt::ItemIsEnabled); QTableWidgetItem* parameterValue = new QTableWidgetItem(configEntry->getValueAsString()); Q_CHECK_PTR(parameterValue); TableWidget->setItem(row, 0, parameterName); TableWidget->setItem(row, 1, parameterValue); row++; } connect(TableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), SLOT(slotItemChanged(QTableWidgetItem*))); TableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); TableWidget->setMinimumSize(560,420); layout->addWidget(TableWidget); QPushButton* button = new QPushButton(tr("&Okay")); connect(button, SIGNAL(clicked()), SLOT(accept())); layout->addWidget(button); } // ###### Destructor ######################################################## OptionsDialog::~OptionsDialog() { } // ###### Update value ###################################################### void OptionsDialog::slotItemChanged(QTableWidgetItem* item) { const int row = item->row(); const int column = item->column(); const QTableWidgetItem* parameterName = item->tableWidget()->item(row, column - 1); Q_CHECK_PTR(parameterName); const QString parameterNameString = parameterName->text(); const QString parameterValueString = item->text(); QListIterator iterator(*ConfigEntries); while(iterator.hasNext()) { ConfigEntry* configEntry = iterator.next(); if(configEntry->getName() == parameterNameString) { configEntry->setValueFromString(parameterValueString); break; } } } fractgen-2.1.5/src/configentry.h0000644000175000017500000000244413371245156014714 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #ifndef CONFIGENTRY_H #define CONFIGENTRY_H #include class ConfigEntry { public: virtual ~ConfigEntry() {}; virtual QString getName() const = 0; virtual QString getValueAsString() const = 0; virtual void setValueFromString(const QString& valueString) = 0; }; #endif fractgen-2.1.5/src/uintconfigentry.cc0000644000175000017500000000356013371245156015752 0ustar hlehle/* ========================================================================== * ==== FRACTAL GRAPHICS GENERATOR ==== * ========================================================================== * * Copyright (C) 2003-2019 by Thomas Dreibholz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Contact: dreibh@iem.uni-due.de */ #include "uintconfigentry.h" // ###### Constructor ####################################################### UIntConfigEntry::UIntConfigEntry(unsigned int* valuePtr, const char* name) { EntryName = QString::fromLocal8Bit(name); ValuePtr = valuePtr; } // ###### Destructor ######################################################## UIntConfigEntry::~UIntConfigEntry() { } // ###### Get name ########################################################## QString UIntConfigEntry::getName() const { return(EntryName); } // ###### Get value as string ############################################### QString UIntConfigEntry::getValueAsString() const { QString valueString; valueString.setNum(*ValuePtr); return(valueString); } // ###### Set value from string ############################################# void UIntConfigEntry::setValueFromString(const QString& valueString) { *ValuePtr = valueString.toUInt(); } fractgen-2.1.5/packaging.conf0000644000175000017500000000074013433302320014177 0ustar hlehle#!/bin/bash # --------------------------------------------------------- MAKE_DIST="cmake -DCMAKE_INSTALL_PREFIX=/usr . && make dist" NOT_TARGET_DISTRIBUTIONS="lucid precise trusty" # <<-- Distrubutions which are *not* supported! MAINTAINER="Thomas Dreibholz " DEBIAN_LAST_ENTRY="" UBUNTU_LAST_ENTRY="04 May 2011 07:14:21" SKIP_PACKAGE_SIGNING=0 # <<-- Must be set to 0 (=off) for PPA upload! # ---------------------------------------------------------