diff -Nru gtkterm-0.99.7~rc1/aclocal.m4 gtkterm-0.99.7+git9d63182/aclocal.m4 --- gtkterm-0.99.7~rc1/aclocal.m4 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/aclocal.m4 2017-11-17 16:09:57.000000000 +0000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,450 +11,18 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, -[m4_warning([this file was generated for autoconf 2.66. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 1995-2002 Free Software Foundation, Inc. -# Copyright (C) 2001-2003,2004 Red Hat, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# -# Macro to add for using GNU gettext. -# Ulrich Drepper , 1995, 1996 -# -# Modified to never use included libintl. -# Owen Taylor , 12/15/1998 -# -# Major rework to remove unused code -# Owen Taylor , 12/11/2002 -# -# Added better handling of ALL_LINGUAS from GNU gettext version -# written by Bruno Haible, Owen Taylor 5/30/3002 -# -# Modified to require ngettext -# Matthias Clasen 08/06/2004 -# -# We need this here as well, since someone might use autoconf-2.5x -# to configure GLib then an older version to configure a package -# using AM_GLIB_GNU_GETTEXT -AC_PREREQ(2.53) - -dnl -dnl We go to great lengths to make sure that aclocal won't -dnl try to pull in the installed version of these macros -dnl when running aclocal in the glib directory. -dnl -m4_copy([AC_DEFUN],[glib_DEFUN]) -m4_copy([AC_REQUIRE],[glib_REQUIRE]) -dnl -dnl At the end, if we're not within glib, we'll define the public -dnl definitions in terms of our private definitions. -dnl - -# GLIB_LC_MESSAGES -#-------------------- -glib_DEFUN([GLIB_LC_MESSAGES], - [AC_CHECK_HEADERS([locale.h]) - if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi - fi]) - -# GLIB_PATH_PROG_WITH_TEST -#---------------------------- -dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# GLIB_WITH_NLS -#----------------- -glib_DEFUN([GLIB_WITH_NLS], - dnl NLS is obligatory - [USE_NLS=yes - AC_SUBST(USE_NLS) - - gt_cv_have_gettext=no - - CATOBJEXT=NONE - XGETTEXT=: - INTLLIBS= - - AC_CHECK_HEADER(libintl.h, - [gt_cv_func_dgettext_libintl="no" - libintl_extra_libs="" - - # - # First check in libc - # - AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, - [AC_TRY_LINK([ -#include -], - [return !ngettext ("","", 1)], - gt_cv_func_ngettext_libc=yes, - gt_cv_func_ngettext_libc=no) - ]) - - if test "$gt_cv_func_ngettext_libc" = "yes" ; then - AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, - [AC_TRY_LINK([ -#include -], - [return !dgettext ("","")], - gt_cv_func_dgettext_libc=yes, - gt_cv_func_dgettext_libc=no) - ]) - fi - - if test "$gt_cv_func_ngettext_libc" = "yes" ; then - AC_CHECK_FUNCS(bind_textdomain_codeset) - fi - - # - # If we don't have everything we want, check in libintl - # - if test "$gt_cv_func_dgettext_libc" != "yes" \ - || test "$gt_cv_func_ngettext_libc" != "yes" \ - || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then - - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CHECK_LIB(intl, ngettext, - [AC_CHECK_LIB(intl, dgettext, - gt_cv_func_dgettext_libintl=yes)])]) - - if test "$gt_cv_func_dgettext_libintl" != "yes" ; then - AC_MSG_CHECKING([if -liconv is needed to use gettext]) - AC_MSG_RESULT([]) - AC_CHECK_LIB(intl, ngettext, - [AC_CHECK_LIB(intl, dcgettext, - [gt_cv_func_dgettext_libintl=yes - libintl_extra_libs=-liconv], - :,-liconv)], - :,-liconv) - fi - - # - # If we found libintl, then check in it for bind_textdomain_codeset(); - # we'll prefer libc if neither have bind_textdomain_codeset(), - # and both have dgettext and ngettext - # - if test "$gt_cv_func_dgettext_libintl" = "yes" ; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS -lintl $libintl_extra_libs" - unset ac_cv_func_bind_textdomain_codeset - AC_CHECK_FUNCS(bind_textdomain_codeset) - LIBS="$glib_save_LIBS" - - if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then - gt_cv_func_dgettext_libc=no - else - if test "$gt_cv_func_dgettext_libc" = "yes" \ - && test "$gt_cv_func_ngettext_libc" = "yes"; then - gt_cv_func_dgettext_libintl=no - fi - fi - fi - fi - - if test "$gt_cv_func_dgettext_libc" = "yes" \ - || test "$gt_cv_func_dgettext_libintl" = "yes"; then - gt_cv_have_gettext=yes - fi - - if test "$gt_cv_func_dgettext_libintl" = "yes"; then - INTLLIBS="-lintl $libintl_extra_libs" - fi - - if test "$gt_cv_have_gettext" = "yes"; then - AC_DEFINE(HAVE_GETTEXT,1, - [Define if the GNU gettext() function is already present or preinstalled.]) - GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS $INTLLIBS" - AC_CHECK_FUNCS(dcgettext) - MSGFMT_OPTS= - AC_MSG_CHECKING([if msgfmt accepts -c]) - GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: test 1.0\n" -"PO-Revision-Date: 2007-02-15 12:01+0100\n" -"Last-Translator: test \n" -"Language-Team: C \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) - AC_SUBST(MSGFMT_OPTS) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [case $host in - *-*-solaris*) - dnl On Solaris, if bind_textdomain_codeset is in libc, - dnl GNU format message catalog is always supported, - dnl since both are added to the libc all together. - dnl Hence, we'd like to go with DATADIRNAME=share and - dnl and CATOBJEXT=.gmo in this case. - AC_CHECK_FUNC(bind_textdomain_codeset, - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - ;; - *) - CATOBJEXT=.mo - DATADIRNAME=lib - ;; - esac]) - LIBS="$glib_save_LIBS" - INSTOBJEXT=.mo - else - gt_cv_have_gettext=no - fi - fi - ]) - - if test "$gt_cv_have_gettext" = "yes" ; then - AC_DEFINE(ENABLE_NLS, 1, - [always defined to indicate that i18n is enabled]) - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is not GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - - AC_OUTPUT_COMMANDS( - [case "$CONFIG_FILES" in *po/Makefile.in*) - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile - esac]) - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.ac. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLLIBS) - AC_SUBST(PO_IN_DATADIR_TRUE) - AC_SUBST(PO_IN_DATADIR_FALSE) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -# AM_GLIB_GNU_GETTEXT -# ------------------- -# Do checks necessary for use of gettext. If a suitable implementation -# of gettext is found in either in libintl or in the C library, -# it will set INTLLIBS to the libraries needed for use of gettext -# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable -# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() -# on various variables needed by the Makefile.in.in installed by -# glib-gettextize. -dnl -glib_DEFUN([GLIB_GNU_GETTEXT], - [AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - - GLIB_LC_MESSAGES - GLIB_WITH_NLS - - if test "$gt_cv_have_gettext" = "yes"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - NEW_LINGUAS="$NEW_LINGUAS $presentlang" - fi - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but ($top_srcdir). - dnl Try to locate is. - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - AC_SUBST(MKINSTALLDIRS) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - ]) - -# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) -# ------------------------------- -# Define VARIABLE to the location where catalog files will -# be installed by po/Makefile. -glib_DEFUN([GLIB_DEFINE_LOCALEDIR], -[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl -glib_save_prefix="$prefix" -glib_save_exec_prefix="$exec_prefix" -glib_save_datarootdir="$datarootdir" -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix=$prefix -datarootdir=`eval echo "${datarootdir}"` -if test "x$CATOBJEXT" = "x.mo" ; then - localedir=`eval echo "${libdir}/locale"` -else - localedir=`eval echo "${datadir}/locale"` -fi -prefix="$glib_save_prefix" -exec_prefix="$glib_save_exec_prefix" -datarootdir="$glib_save_datarootdir" -AC_DEFINE_UNQUOTED($1, "$localedir", - [Define the location where the catalogs will be installed]) -]) - -dnl -dnl Now the definitions that aclocal will find -dnl -ifdef(glib_configure_ac,[],[ -AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) -AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) -])dnl - -# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) -# -# Create a temporary file with TEST-FILE as its contents and pass the -# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with -# 0 and perform ACTION-IF-FAIL for any other exit status. -AC_DEFUN([GLIB_RUN_PROG], -[cat >conftest.foo <<_ACEOF -$2 -_ACEOF -if AC_RUN_LOG([$1 conftest.foo]); then - m4_ifval([$3], [$3], [:]) -m4_ifvaln([$4], [else $4])dnl -echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD -sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD -fi]) - +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 40 IT_PROG_INTLTOOL +# serial 42 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ AC_PREREQ([2.50])dnl AC_REQUIRE([AM_NLS])dnl @@ -467,13 +35,11 @@ ;; esac +INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` +INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) - - INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` - [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) @@ -486,25 +52,48 @@ AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) fi - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 +fi +AC_SUBST([AM_DEFAULT_VERBOSITY]) + +INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' +INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' +INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' +AC_SUBST(INTLTOOL_V_MERGE) +AC_SUBST(INTLTOOL__v_MERGE_) +AC_SUBST(INTLTOOL__v_MERGE_0) + +INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' +intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' +intltool__v_merge_options_0='-q' +AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) +AC_SUBST(intltool__v_merge_options_) +AC_SUBST(intltool__v_merge_options_0) + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' +else + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' +fi + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' _IT_SUBST(INTLTOOL_DESKTOP_RULE) _IT_SUBST(INTLTOOL_DIRECTORY_RULE) @@ -550,7 +139,7 @@ if test $? -ne 0; then AC_MSG_ERROR([perl 5.8.1 is required for intltool]) else - IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` AC_MSG_RESULT([$IT_PERL_VERSION]) fi if test "x$2" != "xno-xml"; then @@ -565,31 +154,6 @@ # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) -# Set DATADIRNAME correctly if it is not set yet -# (copied from glib-gettext.m4) -if test -z "$DATADIRNAME"; then - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]], - [[extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr]])], - [DATADIRNAME=share], - [case $host in - *-*-solaris*) - dnl On Solaris, if bind_textdomain_codeset is in libc, - dnl GNU format message catalog is always supported, - dnl since both are added to the libc all together. - dnl Hence, we'd like to go with DATADIRNAME=share - dnl in this case. - AC_CHECK_FUNC(bind_textdomain_codeset, - [DATADIRNAME=share], [DATADIRNAME=lib]) - ;; - *) - [DATADIRNAME=lib] - ;; - esac]) -fi -AC_SUBST(DATADIRNAME) - IT_PO_SUBDIR([po]) ]) @@ -647,19 +211,19 @@ # nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, -dnl Inc. +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software +dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under +dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: @@ -679,35 +243,67 @@ AC_SUBST([USE_NLS]) ]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -725,18 +321,19 @@ PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -746,22 +343,26 @@ $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -769,19 +370,17 @@ else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -801,9 +400,9 @@ AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -816,7 +415,7 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT]) +_PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -827,7 +426,7 @@ _PKG_TEXT -To get pkg-config, see .]) +To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -835,9 +434,92 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES + + +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_INSTALLDIR + + +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -849,10 +531,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -868,22 +550,22 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -902,7 +584,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -920,30 +602,26 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -962,16 +640,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -981,7 +657,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -994,12 +670,13 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -1007,8 +684,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -1047,16 +725,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -1065,16 +743,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -1122,7 +800,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -1132,34 +810,39 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -1172,7 +855,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -1184,21 +867,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -1216,7 +897,7 @@ # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -1224,32 +905,23 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -1262,7 +934,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -1291,33 +963,42 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -1326,34 +1007,82 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -1375,7 +1104,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1386,7 +1115,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -1394,16 +1123,14 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -1419,14 +1146,12 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -1444,7 +1169,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -1471,15 +1196,12 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -1487,11 +1209,10 @@ $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -1504,100 +1225,35 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Obsolete Automake macros. - -# We put here only the macros whose substitution is not an Automake -# macro; otherwise including this file would trigger dependencies for -# all the substitutions. Generally, obsolete Automake macros are -# better AU_DEFUNed in the same file as their replacement, or alone in -# a separate file (see obsol-gt.m4 or obsol-lt.m4 for instance). - -AU_DEFUN([AC_FEATURE_CTYPE], [AC_HEADER_STDC]) -AU_DEFUN([AC_FEATURE_ERRNO], [AC_REPLACE_FUNCS([strerror])]) -AU_DEFUN([AM_CYGWIN32], [AC_CYGWIN]) -AU_DEFUN([AM_EXEEXT], [AC_EXEEXT]) -AU_DEFUN([AM_FUNC_MKTIME], [AC_FUNC_MKTIME]) -AU_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL], - [AC_HEADER_TIOCGWINSZ]) -AU_DEFUN([AM_MINGW32], [AC_MINGW32]) -AU_DEFUN([AM_PROG_INSTALL], [AC_PROG_INSTALL]) -AU_DEFUN([AM_SANITY_CHECK_CC], [AC_PROG_CC]) -AU_DEFUN([AM_SYS_POSIX_TERMIOS], [AC_SYS_POSIX_TERMIOS]) -AU_DEFUN([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH]) -AU_DEFUN([fp_PROG_INSTALL], [AC_PROG_INSTALL]) -AU_DEFUN([md_TYPE_PTRDIFF_T], [AC_CHECK_TYPES([ptrdiff_t])]) - -# Don't know how to translate these. -# If used, Autoconf will complain that they are possibly unexpended; -# this seems a good enough error message. -# AC_FEATURE_EXIT -# AC_SYSTEM_HEADER - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1608,24 +1264,82 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1636,32 +1350,40 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1671,36 +1393,85 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1708,34 +1479,32 @@ # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1743,24 +1512,22 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1770,75 +1537,114 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -Nru gtkterm-0.99.7~rc1/autogen.sh gtkterm-0.99.7+git9d63182/autogen.sh --- gtkterm-0.99.7~rc1/autogen.sh 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/autogen.sh 2017-11-17 16:09:57.000000000 +0000 @@ -1,1491 +1,22 @@ #!/bin/sh -# a u t o g e n . s h -# -# Copyright (c) 2005-2007 United States Government as represented by -# the U.S. Army Research Laboratory. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# 3. The name of the author may not be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -### -# -# Script for automatically preparing the sources for compilation by -# performing the myrid of necessary steps. The script attempts to -# detect proper version support, and outputs warnings about particular -# systems that have autotool peculiarities. -# -# Basically, if everything is set up and installed correctly, the -# script will validate that minimum versions of the GNU Build System -# tools are installed, account for several common configuration -# issues, and then simply run autoreconf for you. -# -# If autoreconf fails, which can happen for many valid configurations, -# this script proceeds to run manual preparation steps effectively -# providing a POSIX shell script (mostly complete) reimplementation of -# autoreconf. -# -# The AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER -# environment variables and corresponding _OPTIONS variables (e.g. -# AUTORECONF_OPTIONS) may be used to override the default automatic -# detection behaviors. Similarly the _VERSION variables will override -# the minimum required version numbers. -# -# Examples: -# -# To obtain help on usage: -# ./autogen.sh --help -# -# To obtain verbose output: -# ./autogen.sh --verbose -# -# To skip autoreconf and prepare manually: -# AUTORECONF=false ./autogen.sh -# -# To verbosely try running with an older (unsupported) autoconf: -# AUTOCONF_VERSION=2.50 ./autogen.sh --verbose -# -# Author: Christopher Sean Morrison -# -###################################################################### +# Run this to generate all the initial makefiles, etc. -# set to minimum acceptible version of autoconf -if [ "x$AUTOCONF_VERSION" = "x" ] ; then - AUTOCONF_VERSION=2.52 -fi -# set to minimum acceptible version of automake -if [ "x$AUTOMAKE_VERSION" = "x" ] ; then - AUTOMAKE_VERSION=1.6.0 -fi -# set to minimum acceptible version of libtool -if [ "x$LIBTOOL_VERSION" = "x" ] ; then - LIBTOOL_VERSION=1.4.2 -fi +topdir=`dirname $0` +test -z "$topdir" && topdir=. +PKG_NAME="GtkTerm" -################## -# ident function # -################## -ident ( ) { - # extract copyright from header - __copyright="`grep Copyright $AUTOGEN_SH | head -${HEAD_N}1 | awk '{print $4}'`" - if [ "x$__copyright" = "x" ] ; then - __copyright="`date +%Y`" - fi - - # extract version from CVS Id string - __id="$Id: autogen.sh,v 14.97 2007/06/18 22:25:02 brlcad Exp $" - __version="`echo $__id | sed 's/.*\([0-9][0-9][0-9][0-9]\)[-\/]\([0-9][0-9]\)[-\/]\([0-9][0-9]\).*/\1\2\3/'`" - if [ "x$__version" = "x" ] ; then - __version="" - fi - - echo "autogen.sh build preparation script by Christopher Sean Morrison" - echo "revised 3-clause BSD-style license, copyright (c) $__copyright" - echo "script version $__version, ISO/IEC 9945 POSIX shell script" -} - - -################## -# USAGE FUNCTION # -################## -usage ( ) { - echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [--version]" - echo " --help Help on $NAME_OF_AUTOGEN usage" - echo " --verbose Verbose progress output" - echo " --quiet Quiet suppressed progress output" - echo " --version Only perform GNU Build System version checks" - echo - echo "Description: This script will validate that minimum versions of the" - echo "GNU Build System tools are installed and then run autoreconf for you." - echo "Should autoreconf fail, manual preparation steps will be run" - echo "potentially accounting for several common preparation issues. The" - - echo "AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER," - echo "PROJECT, & CONFIGURE environment variables and corresponding _OPTIONS" - echo "variables (e.g. AUTORECONF_OPTIONS) may be used to override the" - echo "default automatic detection behavior." - echo - - ident - - return 0 -} - - -########################## -# VERSION_ERROR FUNCTION # -########################## -version_error ( ) { - if [ "x$1" = "x" ] ; then - echo "INTERNAL ERROR: version_error was not provided a version" - exit 1 - fi - if [ "x$2" = "x" ] ; then - echo "INTERNAL ERROR: version_error was not provided an application name" - exit 1 - fi - $ECHO - $ECHO "ERROR: To prepare the ${PROJECT} build system from scratch," - $ECHO " at least version $1 of $2 must be installed." - $ECHO - $ECHO "$NAME_OF_AUTOGEN does not need to be run on the same machine that will" - $ECHO "run configure or make. Either the GNU Autotools will need to be installed" - $ECHO "or upgraded on this system, or $NAME_OF_AUTOGEN must be run on the source" - $ECHO "code on another system and then transferred to here. -- Cheers!" - $ECHO -} - -########################## -# VERSION_CHECK FUNCTION # -########################## -version_check ( ) { - if [ "x$1" = "x" ] ; then - echo "INTERNAL ERROR: version_check was not provided a minimum version" - exit 1 - fi - _min="$1" - if [ "x$2" = "x" ] ; then - echo "INTERNAL ERROR: version check was not provided a comparison version" - exit 1 - fi - _cur="$2" - - # needed to handle versions like 1.10 and 1.4-p6 - _min="`echo ${_min}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" - _cur="`echo ${_cur}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" - - _min_major="`echo $_min | cut -d. -f1`" - _min_minor="`echo $_min | cut -d. -f2`" - _min_patch="`echo $_min | cut -d. -f3`" - - _cur_major="`echo $_cur | cut -d. -f1`" - _cur_minor="`echo $_cur | cut -d. -f2`" - _cur_patch="`echo $_cur | cut -d. -f3`" - - if [ "x$_min_major" = "x" ] ; then - _min_major=0 - fi - if [ "x$_min_minor" = "x" ] ; then - _min_minor=0 - fi - if [ "x$_min_patch" = "x" ] ; then - _min_patch=0 - fi - if [ "x$_cur_minor" = "x" ] ; then - _cur_major=0 - fi - if [ "x$_cur_minor" = "x" ] ; then - _cur_minor=0 - fi - if [ "x$_cur_patch" = "x" ] ; then - _cur_patch=0 - fi - - $VERBOSE_ECHO "Checking if ${_cur_major}.${_cur_minor}.${_cur_patch} is greater than ${_min_major}.${_min_minor}.${_min_patch}" - - if [ $_min_major -lt $_cur_major ] ; then - return 0 - elif [ $_min_major -eq $_cur_major ] ; then - if [ $_min_minor -lt $_cur_minor ] ; then - return 0 - elif [ $_min_minor -eq $_cur_minor ] ; then - if [ $_min_patch -lt $_cur_patch ] ; then - return 0 - elif [ $_min_patch -eq $_cur_patch ] ; then - return 0 - fi - fi - fi - return 1 -} - - -###################################### -# LOCATE_CONFIGURE_TEMPLATE FUNCTION # -###################################### -locate_configure_template ( ) { - _pwd="`pwd`" - if test -f "./configure.ac" ; then - echo "./configure.ac" - elif test -f "./configure.in" ; then - echo "./configure.in" - elif test -f "$_pwd/configure.ac" ; then - echo "$_pwd/configure.ac" - elif test -f "$_pwd/configure.in" ; then - echo "$_pwd/configure.in" - elif test -f "$PATH_TO_AUTOGEN/configure.ac" ; then - echo "$PATH_TO_AUTOGEN/configure.ac" - elif test -f "$PATH_TO_AUTOGEN/configure.in" ; then - echo "$PATH_TO_AUTOGEN/configure.in" - fi -} - - -################## -# argument check # -################## -ARGS="$*" -PATH_TO_AUTOGEN="`dirname $0`" -NAME_OF_AUTOGEN="`basename $0`" -AUTOGEN_SH="$PATH_TO_AUTOGEN/$NAME_OF_AUTOGEN" - -LIBTOOL_M4="${PATH_TO_AUTOGEN}/misc/libtool.m4" - -if [ "x$HELP" = "x" ] ; then - HELP=no -fi -if [ "x$QUIET" = "x" ] ; then - QUIET=no -fi -if [ "x$VERBOSE" = "x" ] ; then - VERBOSE=no -fi -if [ "x$VERSION_ONLY" = "x" ] ; then - VERSION_ONLY=no -fi -if [ "x$AUTORECONF_OPTIONS" = "x" ] ; then - AUTORECONF_OPTIONS="-i -f" -fi -if [ "x$AUTOCONF_OPTIONS" = "x" ] ; then - AUTOCONF_OPTIONS="-f" -fi -if [ "x$AUTOMAKE_OPTIONS" = "x" ] ; then - AUTOMAKE_OPTIONS="-a -c -f" -fi -ALT_AUTOMAKE_OPTIONS="-a -c" -if [ "x$LIBTOOLIZE_OPTIONS" = "x" ] ; then - LIBTOOLIZE_OPTIONS="--automake -c -f" -fi -ALT_LIBTOOLIZE_OPTIONS="--automake --copy --force" -if [ "x$ACLOCAL_OPTIONS" = "x" ] ; then - ACLOCAL_OPTIONS="" -fi -if [ "x$AUTOHEADER_OPTIONS" = "x" ] ; then - AUTOHEADER_OPTIONS="" -fi -for arg in $ARGS ; do - case "x$arg" in - x--help) HELP=yes ;; - x-[hH]) HELP=yes ;; - x--quiet) QUIET=yes ;; - x-[qQ]) QUIET=yes ;; - x--verbose) VERBOSE=yes ;; - x-[vV]) VERBOSE=yes ;; - x--version) VERSION_ONLY=yes ;; - *) - echo "Unknown option: $arg" - echo - usage - exit 1 - ;; - esac -done - - -##################### -# environment check # -##################### - -# sanity check before recursions potentially begin -if [ ! -f "$AUTOGEN_SH" ] ; then - echo "INTERNAL ERROR: $AUTOGEN_SH does not exist" - if [ ! "x$0" = "x$AUTOGEN_SH" ] ; then - echo "INTERNAL ERROR: dirname/basename inconsistency: $0 != $AUTOGEN_SH" - fi - exit 1 -fi - -# force locale setting to C so things like date output as expected -LC_ALL=C - -# commands that this script expects -for __cmd in echo head tail pwd ; do - echo "test" | $__cmd > /dev/null 2>&1 - if [ $? != 0 ] ; then - echo "INTERNAL ERROR: '${__cmd}' command is required" - exit 2 - fi -done -echo "test" | grep "test" > /dev/null 2>&1 -if test ! x$? = x0 ; then - echo "INTERNAL ERROR: grep command is required" - exit 1 -fi -echo "test" | sed "s/test/test/" > /dev/null 2>&1 -if test ! x$? = x0 ; then - echo "INTERNAL ERROR: sed command is required" +(test -f $topdir/src/gtkterm.c) || { + echo -n "**Error**: Directory "\`$topdir\'" does not look like the" + echo " top-level $PKG_NAME directory" exit 1 -fi - - -# determine the behavior of echo -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -# determine the behavior of head -case "x`echo 'head' | head -n 1 2>&1`" in - *xhead*) HEAD_N="n " ;; - *) HEAD_N="" ;; -esac - -# determine the behavior of tail -case "x`echo 'tail' | tail -n 1 2>&1`" in - *xtail*) TAIL_N="n " ;; - *) TAIL_N="" ;; -esac - -VERBOSE_ECHO=: -ECHO=: -if [ "x$QUIET" = "xyes" ] ; then - if [ "x$VERBOSE" = "xyes" ] ; then - echo "Verbose output quelled by quiet option. Further output disabled." - fi -else - ECHO=echo - if [ "x$VERBOSE" = "xyes" ] ; then - echo "Verbose output enabled" - VERBOSE_ECHO=echo - fi -fi - - -# allow a recursive run to disable further recursions -if [ "x$RUN_RECURSIVE" = "x" ] ; then - RUN_RECURSIVE=yes -fi - - -################################################ -# check for help arg and bypass version checks # -################################################ -if [ "x`echo $ARGS | sed 's/.*[hH][eE][lL][pP].*/help/'`" = "xhelp" ] ; then - HELP=yes -fi -if [ "x$HELP" = "xyes" ] ; then - usage - $ECHO "---" - $ECHO "Help was requested. No preparation or configuration will be performed." - exit 0 -fi - - -####################### -# set up signal traps # -####################### -untrap_abnormal ( ) { - for sig in 1 2 13 15; do - trap - $sig - done } -# do this cleanup whenever we exit. -trap ' - # start from the root - if test -d "$START_PATH" ; then - cd "$START_PATH" - fi - - # restore/delete backup files - if test "x$PFC_INIT" = "x1" ; then - recursive_restore - fi -' 0 - -# trap SIGHUP (1), SIGINT (2), SIGPIPE (13), SIGTERM (15) -for sig in 1 2 13 15; do - trap ' - $ECHO "" - $ECHO "Aborting $NAME_OF_AUTOGEN: caught signal '$sig'" - - # start from the root - if test -d "$START_PATH" ; then - cd "$START_PATH" - fi - - # clean up on abnormal exit - $VERBOSE_ECHO "rm -rf autom4te.cache" - rm -rf autom4te.cache - - if test -f "acinclude.m4.$$.backup" ; then - $VERBOSE_ECHO "cat acinclude.m4.$$.backup > acinclude.m4" - chmod u+w acinclude.m4 - cat acinclude.m4.$$.backup > acinclude.m4 - - $VERBOSE_ECHO "rm -f acinclude.m4.$$.backup" - rm -f acinclude.m4.$$.backup - fi - - { (exit 1); exit 1; } -' $sig -done - - -############################# -# look for a configure file # -############################# -if [ "x$CONFIGURE" = "x" ] ; then - CONFIGURE="`locate_configure_template`" - if [ ! "x$CONFIGURE" = "x" ] ; then - $VERBOSE_ECHO "Found a configure template: $CONFIGURE" - fi -else - $ECHO "Using CONFIGURE environment variable override: $CONFIGURE" -fi -if [ "x$CONFIGURE" = "x" ] ; then - if [ "x$VERSION_ONLY" = "xyes" ] ; then - CONFIGURE=/dev/null - else - $ECHO - $ECHO "A configure.ac or configure.in file could not be located implying" - $ECHO "that the GNU Build System is at least not used in this directory. In" - $ECHO "any case, there is nothing to do here without one of those files." - $ECHO - $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" - exit 1 - fi -fi - -#################### -# get project name # -#################### -if [ "x$PROJECT" = "x" ] ; then - PROJECT="`grep AC_INIT $CONFIGURE | grep -v '.*#.*AC_INIT' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_INIT(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - if [ "x$PROJECT" = "xAC_INIT" ] ; then - # projects might be using the older/deprecated arg-less AC_INIT .. look for AM_INIT_AUTOMAKE instead - PROJECT="`grep AM_INIT_AUTOMAKE $CONFIGURE | grep -v '.*#.*AM_INIT_AUTOMAKE' | tail -${TAIL_N}1 | sed 's/^[ ]*AM_INIT_AUTOMAKE(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - fi - if [ "x$PROJECT" = "xAM_INIT_AUTOMAKE" ] ; then - PROJECT="project" - fi - if [ "x$PROJECT" = "x" ] ; then - PROJECT="project" - fi -else - $ECHO "Using PROJECT environment variable override: $PROJECT" -fi -$ECHO "Preparing the $PROJECT build system...please wait" -$ECHO - - -######################## -# check for autoreconf # -######################## -HAVE_AUTORECONF=no -if [ "x$AUTORECONF" = "x" ] ; then - for AUTORECONF in autoreconf ; do - $VERBOSE_ECHO "Checking autoreconf version: $AUTORECONF --version" - $AUTORECONF --version > /dev/null 2>&1 - if [ $? = 0 ] ; then - HAVE_AUTORECONF=yes - break - fi - done -else - HAVE_AUTORECONF=yes - $ECHO "Using AUTORECONF environment variable override: $AUTORECONF" -fi - - -########################## -# autoconf version check # -########################## -_acfound=no -if [ "x$AUTOCONF" = "x" ] ; then - for AUTOCONF in autoconf ; do - $VERBOSE_ECHO "Checking autoconf version: $AUTOCONF --version" - $AUTOCONF --version > /dev/null 2>&1 - if [ $? = 0 ] ; then - _acfound=yes - break - fi - done -else - _acfound=yes - $ECHO "Using AUTOCONF environment variable override: $AUTOCONF" -fi - -_report_error=no -if [ ! "x$_acfound" = "xyes" ] ; then - $ECHO "ERROR: Unable to locate GNU Autoconf." - _report_error=yes -else - _version="`$AUTOCONF --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" - if [ "x$_version" = "x" ] ; then - _version="0.0.0" - fi - $ECHO "Found GNU Autoconf version $_version" - version_check "$AUTOCONF_VERSION" "$_version" - if [ $? -ne 0 ] ; then - _report_error=yes - fi -fi -if [ "x$_report_error" = "xyes" ] ; then - version_error "$AUTOCONF_VERSION" "GNU Autoconf" +# Check for gnome-autogen.sh existance +which gnome-autogen.sh || { + echo "You need to install gnome-common from GNOME Git (or from" + echo "your OS vendor's package manager)." exit 1 -fi - - -########################## -# automake version check # -########################## -_amfound=no -if [ "x$AUTOMAKE" = "x" ] ; then - for AUTOMAKE in automake ; do - $VERBOSE_ECHO "Checking automake version: $AUTOMAKE --version" - $AUTOMAKE --version > /dev/null 2>&1 - if [ $? = 0 ] ; then - _amfound=yes - break - fi - done -else - _amfound=yes - $ECHO "Using AUTOMAKE environment variable override: $AUTOMAKE" -fi - - -_report_error=no -if [ ! "x$_amfound" = "xyes" ] ; then - $ECHO - $ECHO "ERROR: Unable to locate GNU Automake." - _report_error=yes -else - _version="`$AUTOMAKE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" - if [ "x$_version" = "x" ] ; then - _version="0.0.0" - fi - $ECHO "Found GNU Automake version $_version" - version_check "$AUTOMAKE_VERSION" "$_version" - if [ $? -ne 0 ] ; then - _report_error=yes - fi -fi -if [ "x$_report_error" = "xyes" ] ; then - version_error "$AUTOMAKE_VERSION" "GNU Automake" - exit 1 -fi - - -######################## -# check for libtoolize # -######################## -HAVE_LIBTOOLIZE=yes -HAVE_ALT_LIBTOOLIZE=no -_ltfound=no -if [ "x$LIBTOOLIZE" = "x" ] ; then - LIBTOOLIZE=libtoolize - $VERBOSE_ECHO "Checking libtoolize version: $LIBTOOLIZE --version" - $LIBTOOLIZE --version > /dev/null 2>&1 - if [ ! $? = 0 ] ; then - HAVE_LIBTOOLIZE=no - $ECHO - if [ "x$HAVE_AUTORECONF" = "xno" ] ; then - $ECHO "Warning: libtoolize does not appear to be available." - else - $ECHO "Warning: libtoolize does not appear to be available. This means that" - $ECHO "the automatic build preparation via autoreconf will probably not work." - $ECHO "Preparing the build by running each step individually, however, should" - $ECHO "work and will be done automatically for you if autoreconf fails." - fi - - # look for some alternates - for tool in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do - $VERBOSE_ECHO "Checking libtoolize alternate: $tool --version" - _glibtoolize="`$tool --version > /dev/null 2>&1`" - if [ $? = 0 ] ; then - $VERBOSE_ECHO "Found $tool --version" - _glti="`which $tool`" - if [ "x$_glti" = "x" ] ; then - $VERBOSE_ECHO "Cannot find $tool with which" - continue; - fi - if test ! -f "$_glti" ; then - $VERBOSE_ECHO "Cannot use $tool, $_glti is not a file" - continue; - fi - _gltidir="`dirname $_glti`" - if [ "x$_gltidir" = "x" ] ; then - $VERBOSE_ECHO "Cannot find $tool path with dirname of $_glti" - continue; - fi - if test ! -d "$_gltidir" ; then - $VERBOSE_ECHO "Cannot use $tool, $_gltidir is not a directory" - continue; - fi - HAVE_ALT_LIBTOOLIZE=yes - LIBTOOLIZE="$tool" - $ECHO - $ECHO "Fortunately, $tool was found which means that your system may simply" - $ECHO "have a non-standard or incomplete GNU Autotools install. If you have" - $ECHO "sufficient system access, it may be possible to quell this warning by" - $ECHO "running:" - $ECHO - sudo -V > /dev/null 2>&1 - if [ $? = 0 ] ; then - $ECHO " sudo ln -s $_glti $_gltidir/libtoolize" - $ECHO - else - $ECHO " ln -s $_glti $_gltidir/libtoolize" - $ECHO - $ECHO "Run that as root or with proper permissions to the $_gltidir directory" - $ECHO - fi - _ltfound=yes - break - fi - done - else - _ltfound=yes - fi -else - _ltfound=yes - $ECHO "Using LIBTOOLIZE environment variable override: $LIBTOOLIZE" -fi - - -############################ -# libtoolize version check # -############################ -_report_error=no -if [ ! "x$_ltfound" = "xyes" ] ; then - $ECHO - $ECHO "ERROR: Unable to locate GNU Libtool." - _report_error=yes -else - _version="`$LIBTOOLIZE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" - if [ "x$_version" = "x" ] ; then - _version="0.0.0" - fi - $ECHO "Found GNU Libtool version $_version" - version_check "$LIBTOOL_VERSION" "$_version" - if [ $? -ne 0 ] ; then - _report_error=yes - fi -fi -if [ "x$_report_error" = "xyes" ] ; then - version_error "$LIBTOOL_VERSION" "GNU Libtool" - exit 1 -fi - - -##################### -# check for aclocal # -##################### -if [ "x$ACLOCAL" = "x" ] ; then - for ACLOCAL in aclocal ; do - $VERBOSE_ECHO "Checking aclocal version: $ACLOCAL --version" - $ACLOCAL --version > /dev/null 2>&1 - if [ $? = 0 ] ; then - break - fi - done -else - $ECHO "Using ACLOCAL environment variable override: $ACLOCAL" -fi - - -######################## -# check for autoheader # -######################## -if [ "x$AUTOHEADER" = "x" ] ; then - for AUTOHEADER in autoheader ; do - $VERBOSE_ECHO "Checking autoheader version: $AUTOHEADER --version" - $AUTOHEADER --version > /dev/null 2>&1 - if [ $? = 0 ] ; then - break - fi - done -else - $ECHO "Using AUTOHEADER environment variable override: $AUTOHEADER" -fi - - -######################### -# check if version only # -######################### -$VERBOSE_ECHO "Checking whether to only output version information" -if [ "x$VERSION_ONLY" = "xyes" ] ; then - $ECHO - ident - $ECHO "---" - $ECHO "Version requested. No preparation or configuration will be performed." - exit 0 -fi - - -################################# -# PROTECT_FROM_CLOBBER FUNCTION # -################################# -protect_from_clobber ( ) { - PFC_INIT=1 - - # protect COPYING & INSTALL from overwrite by automake. the - # automake force option will (inappropriately) ignore the existing - # contents of a COPYING and/or INSTALL files (depending on the - # version) instead of just forcing *missing* files like it does - # for AUTHORS, NEWS, and README. this is broken but extremely - # prevalent behavior, so we protect against it by keeping a backup - # of the file that can later be restored. - - if test -f COPYING ; then - if test -f COPYING.$$.protect_from_automake.backup ; then - $VERBOSE_ECHO "Already backed up COPYING in `pwd`" - else - $VERBOSE_ECHO "Backing up COPYING in `pwd`" - $VERBOSE_ECHO "cp -p COPYING COPYING.$$.protect_from_automake.backup" - cp -p COPYING COPYING.$$.protect_from_automake.backup - fi - fi - if test -f INSTALL ; then - if test -f INSTALL.$$.protect_from_automake.backup ; then - $VERBOSE_ECHO "Already backed up INSTALL in `pwd`" - else - $VERBOSE_ECHO "Backing up INSTALL in `pwd`" - $VERBOSE_ECHO "cp -p INSTALL INSTALL.$$.protect_from_automake.backup" - cp -p INSTALL INSTALL.$$.protect_from_automake.backup - fi - fi } - -############################## -# RECURSIVE_PROTECT FUNCTION # -############################## -recursive_protect ( ) { - - # for projects using recursive configure, run the build - # preparation steps for the subdirectories. this function assumes - # START_PATH was set to pwd before recursion begins so that - # relative paths work. - - # git 'r done, protect COPYING and INSTALL from being clobbered - protect_from_clobber - - if test -d autom4te.cache ; then - $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" - $VERBOSE_ECHO "rm -rf autom4te.cache" - rm -rf autom4te.cache - fi - - # find configure template - _configure="`locate_configure_template`" - if [ "x$_configure" = "x" ] ; then - return - fi - # $VERBOSE_ECHO "Looking for configure template found `pwd`/$_configure" - - # look for subdirs - # $VERBOSE_ECHO "Looking for subdirs in `pwd`" - _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - CHECK_DIRS="" - for dir in $_det_config_subdirs ; do - if test -d "`pwd`/$dir" ; then - CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" - fi - done - - # process subdirs - if [ ! "x$CHECK_DIRS" = "x" ] ; then - $VERBOSE_ECHO "Recursively scanning the following directories:" - $VERBOSE_ECHO " $CHECK_DIRS" - for dir in $CHECK_DIRS ; do - $VERBOSE_ECHO "Protecting files from automake in $dir" - cd "$START_PATH" - eval "cd $dir" - - # recursively git 'r done - recursive_protect - done - fi -} # end of recursive_protect - - -############################# -# RESTORE_CLOBBERED FUNCION # -############################# -restore_clobbered ( ) { - - # The automake (and autoreconf by extension) -f/--force-missing - # option may overwrite COPYING and INSTALL even if they do exist. - # Here we restore the files if necessary. - - spacer=no - - # COPYING - if test -f COPYING.$$.protect_from_automake.backup ; then - if test -f COPYING ; then - # compare entire content, restore if needed - if test "x`cat COPYING`" != "x`cat COPYING.$$.protect_from_automake.backup`" ; then - if test "x$spacer" = "xno" ; then - $VERBOSE_ECHO - spacer=yes - fi - # restore the backup - $VERBOSE_ECHO "Restoring COPYING from backup (automake -f likely clobbered it)" - $VERBOSE_ECHO "rm -f COPYING" - rm -f COPYING - $VERBOSE_ECHO "mv COPYING.$$.protect_from_automake.backup COPYING" - mv COPYING.$$.protect_from_automake.backup COPYING - fi # check contents - elif test -f COPYING.$$.protect_from_automake.backup ; then - $VERBOSE_ECHO "mv COPYING.$$.protect_from_automake.backup COPYING" - mv COPYING.$$.protect_from_automake.backup COPYING - fi # -f COPYING - - # just in case - $VERBOSE_ECHO "rm -f COPYING.$$.protect_from_automake.backup" - rm -f COPYING.$$.protect_from_automake.backup - fi # -f COPYING.$$.protect_from_automake.backup - - # INSTALL - if test -f INSTALL.$$.protect_from_automake.backup ; then - if test -f INSTALL ; then - # compare entire content, restore if needed - if test "x`cat INSTALL`" != "x`cat INSTALL.$$.protect_from_automake.backup`" ; then - if test "x$spacer" = "xno" ; then - $VERBOSE_ECHO - spacer=yes - fi - # restore the backup - $VERBOSE_ECHO "Restoring INSTALL from backup (automake -f likely clobbered it)" - $VERBOSE_ECHO "rm -f INSTALL" - rm -f INSTALL - $VERBOSE_ECHO "mv INSTALL.$$.protect_from_automake.backup INSTALL" - mv INSTALL.$$.protect_from_automake.backup INSTALL - fi # check contents - elif test -f INSTALL.$$.protect_from_automake.backup ; then - $VERBOSE_ECHO "mv INSTALL.$$.protect_from_automake.backup INSTALL" - mv INSTALL.$$.protect_from_automake.backup INSTALL - fi # -f INSTALL - - # just in case - $VERBOSE_ECHO "rm -f INSTALL.$$.protect_from_automake.backup" - rm -f INSTALL.$$.protect_from_automake.backup - fi # -f INSTALL.$$.protect_from_automake.backup - - CONFIGURE="`locate_configure_template`" - if [ "x$CONFIGURE" = "x" ] ; then - return - fi - - _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - if test ! -d "$_aux_dir" ; then - _aux_dir=. - fi - - for file in config.guess config.sub ltmain.sh ; do - if test -f "${_aux_dir}/${file}" ; then - $VERBOSE_ECHO "rm -f \"${_aux_dir}/${file}.backup\"" - rm -f "${_aux_dir}/${file}.backup" - fi - done -} # end of restore_clobbered - - -############################## -# RECURSIVE_RESTORE FUNCTION # -############################## -recursive_restore ( ) { - - # restore COPYING and INSTALL from backup if they were clobbered - # for each directory recursively. - - # git 'r undone - restore_clobbered - - # find configure template - _configure="`locate_configure_template`" - if [ "x$_configure" = "x" ] ; then - return - fi - - # look for subdirs - _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - CHECK_DIRS="" - for dir in $_det_config_subdirs ; do - if test -d "`pwd`/$dir" ; then - CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" - fi - done - - # process subdirs - if [ ! "x$CHECK_DIRS" = "x" ] ; then - $VERBOSE_ECHO "Recursively scanning the following directories:" - $VERBOSE_ECHO " $CHECK_DIRS" - for dir in $CHECK_DIRS ; do - $VERBOSE_ECHO "Checking files for automake damage in $dir" - cd "$START_PATH" - eval "cd $dir" - - # recursively git 'r undone - recursive_restore - done - fi -} # end of recursive_restore - - -####################### -# INITIALIZE FUNCTION # -####################### -initialize ( ) { - - # this routine performs a variety of directory-specific - # initializations. some are sanity checks, some are preventive, - # and some are necessary setup detection. - # - # this function sets: - # CONFIGURE - # SEARCH_DIRS - # CONFIG_SUBDIRS - - ################################## - # check for a configure template # - ################################## - CONFIGURE="`locate_configure_template`" - if [ "x$CONFIGURE" = "x" ] ; then - $ECHO - $ECHO "A configure.ac or configure.in file could not be located implying" - $ECHO "that the GNU Build System is at least not used in this directory. In" - $ECHO "any case, there is nothing to do here without one of those files." - $ECHO - $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" - exit 1 - fi - - ##################### - # detect an aux dir # - ##################### - _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - if test ! -d "$_aux_dir" ; then - _aux_dir=. - else - $VERBOSE_ECHO "Detected auxillary directory: $_aux_dir" - fi - - ################################ - # detect a recursive configure # - ################################ - CONFIG_SUBDIRS="" - _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $CONFIGURE | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" - for dir in $_det_config_subdirs ; do - if test -d "`pwd`/$dir" ; then - $VERBOSE_ECHO "Detected recursive configure directory: `pwd`/$dir" - CONFIG_SUBDIRS="$CONFIG_SUBDIRS `pwd`/$dir" - fi - done - - ########################################## - # make sure certain required files exist # - ########################################## - for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do - if test ! -f $file ; then - $VERBOSE_ECHO "Touching ${file} since it does not exist" - touch $file - fi - done - - ################################################## - # make sure certain generated files do not exist # - ################################################## - for file in config.guess config.sub ltmain.sh ; do - if test -f "${_aux_dir}/${file}" ; then - $VERBOSE_ECHO "mv -f \"${_aux_dir}/${file}\" \"${_aux_dir}/${file}.backup\"" - mv -f "${_aux_dir}/${file}" "${_aux_dir}/${file}.backup" - fi - done - - ############################ - # search alternate m4 dirs # - ############################ - SEARCH_DIRS="" - for dir in m4 ; do - if [ -d $dir ] ; then - $VERBOSE_ECHO "Found extra aclocal search directory: $dir" - SEARCH_DIRS="$SEARCH_DIRS -I $dir" - fi - done - - ###################################### - # remove any previous build products # - ###################################### - if test -d autom4te.cache ; then - $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" - $VERBOSE_ECHO "rm -rf autom4te.cache" - rm -rf autom4te.cache - fi -# tcl/tk (and probably others) have a customized aclocal.m4, so can't delete it -# if test -f aclocal.m4 ; then -# $VERBOSE_ECHO "Found an aclocal.m4 file, deleting it" -# $VERBOSE_ECHO "rm -f aclocal.m4" -# rm -f aclocal.m4 -# fi - -} # end of initialize() - - -############## -# initialize # -############## - -# stash path -START_PATH="`pwd`" - -# Before running autoreconf or manual steps, some prep detection work -# is necessary or useful. Only needs to occur once per directory, but -# does need to traverse the entire subconfigure hierarchy to protect -# files from being clobbered even by autoreconf. -recursive_protect - -# start from where we started -cd "$START_PATH" - -# get ready to process -initialize - - -############################################ -# prepare build via autoreconf or manually # -############################################ -reconfigure_manually=no -if [ "x$HAVE_AUTORECONF" = "xyes" ] ; then - $ECHO - $ECHO $ECHO_N "Automatically preparing build ... $ECHO_C" - - $VERBOSE_ECHO "$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS" - autoreconf_output="`$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$autoreconf_output" - - if [ ! $ret = 0 ] ; then - if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then - if [ ! "x`echo \"$autoreconf_output\" | grep libtoolize | grep \"No such file or directory\"`" = "x" ] ; then - $ECHO - $ECHO "Warning: autoreconf failed but due to what is usually a common libtool" - $ECHO "misconfiguration issue. This problem is encountered on systems that" - $ECHO "have installed libtoolize under a different name without providing a" - $ECHO "symbolic link or without setting the LIBTOOLIZE environment variable." - $ECHO - $ECHO "Restarting the preparation steps with LIBTOOLIZE set to $LIBTOOLIZE" - - export LIBTOOLIZE - RUN_RECURSIVE=no - export RUN_RECURSIVE - untrap_abnormal - - $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" - sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" - exit $? - fi - fi - - $ECHO "Warning: $AUTORECONF failed" - - if test -f ltmain.sh ; then - $ECHO "libtoolize being run by autoreconf is not creating ltmain.sh in the auxillary directory like it should" - fi - - $ECHO "Attempting to run the preparation steps individually" - reconfigure_manually=yes - fi -else - reconfigure_manually=yes -fi - - -############################ -# LIBTOOL_FAILURE FUNCTION # -############################ -libtool_failure ( ) { - - # libtool is rather error-prone in comparison to the other - # autotools and this routine attempts to compensate for some - # common failures. the output after a libtoolize failure is - # parsed for an error related to AC_PROG_LIBTOOL and if found, we - # attempt to inject a project-provided libtool.m4 file. - - _autoconf_output="$1" - - if [ "x$RUN_RECURSIVE" = "xno" ] ; then - # we already tried the libtool.m4, don't try again - return 1 - fi - - if test -f "$LIBTOOL_M4" ; then - found_libtool="`$ECHO $_autoconf_output | grep AC_PROG_LIBTOOL`" - if test ! "x$found_libtool" = "x" ; then - if test -f acinclude.m4 ; then - rm -f acinclude.m4.$$.backup - $VERBOSE_ECHO "cat acinclude.m4 > acinclude.m4.$$.backup" - cat acinclude.m4 > acinclude.m4.$$.backup - fi - $VERBOSE_ECHO "cat \"$LIBTOOL_M4\" >> acinclude.m4" - chmod u+w acinclude.m4 - cat "$LIBTOOL_M4" >> acinclude.m4 - - # don't keep doing this - RUN_RECURSIVE=no - export RUN_RECURSIVE - untrap_abnormal - - $ECHO - $ECHO "Restarting the preparation steps with libtool macros in acinclude.m4" - $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" - sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" - exit $? - fi - fi -} - - -########################### -# MANUAL_AUTOGEN FUNCTION # -########################### -manual_autogen ( ) { - - ################################################## - # Manual preparation steps taken are as follows: # - # aclocal [-I m4] # - # libtoolize --automake -c -f # - # aclocal [-I m4] # - # autoconf -f # - # autoheader # - # automake -a -c -f # - ################################################## - - ########### - # aclocal # - ########### - $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" - aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$aclocal_output" - if [ ! $ret = 0 ] ; then $ECHO "ERROR: $ACLOCAL failed" && exit 2 ; fi - - ############## - # libtoolize # - ############## - need_libtoolize=no - for feature in AC_PROG_LIBTOOL LT_INIT ; do - $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" - found="`grep \"^$feature.*\" $CONFIGURE`" - if [ ! "x$found" = "x" ] ; then - need_libtoolize=yes - break - fi - done - if [ "x$need_libtoolize" = "xyes" ] ; then - if [ "x$HAVE_LIBTOOLIZE" = "xyes" ] ; then - $VERBOSE_ECHO "$LIBTOOLIZE $LIBTOOLIZE_OPTIONS" - libtoolize_output="`$LIBTOOLIZE $LIBTOOLIZE_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$libtoolize_output" - - if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi - else - if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then - $VERBOSE_ECHO "$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS" - libtoolize_output="`$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$libtoolize_output" - - if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi - fi - fi - - ########### - # aclocal # - ########### - # re-run again as instructed by libtoolize - $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" - aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$aclocal_output" - - # libtoolize might put ltmain.sh in the wrong place - if test -f ltmain.sh ; then - if test ! -f "${_aux_dir}/ltmain.sh" ; then - $ECHO - $ECHO "Warning: $LIBTOOLIZE is creating ltmain.sh in the wrong directory" - $ECHO - $ECHO "Fortunately, the problem can be worked around by simply copying the" - $ECHO "file to the appropriate location (${_aux_dir}/). This has been done for you." - $ECHO - $VERBOSE_ECHO "cp -p ltmain.sh \"${_aux_dir}/ltmain.sh\"" - cp -p ltmain.sh "${_aux_dir}/ltmain.sh" - $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C" - fi - fi # ltmain.sh - fi # need_libtoolize - - ############ - # autoconf # - ############ - $VERBOSE_ECHO - $VERBOSE_ECHO "$AUTOCONF $AUTOCONF_OPTIONS" - autoconf_output="`$AUTOCONF $AUTOCONF_OPTIONS 2>&1`" - ret=$? - $VERBOSE_ECHO "$autoconf_output" - - if [ ! $ret = 0 ] ; then - # retry without the -f and check for usage of macros that are too new - ac2_59_macros="AC_C_RESTRICT AC_INCLUDES_DEFAULT AC_LANG_ASSERT AC_LANG_WERROR AS_SET_CATFILE" - ac2_55_macros="AC_COMPILER_IFELSE AC_FUNC_MBRTOWC AC_HEADER_STDBOOL AC_LANG_CONFTEST AC_LANG_SOURCE AC_LANG_PROGRAM AC_LANG_CALL AC_LANG_FUNC_TRY_LINK AC_MSG_FAILURE AC_PREPROC_IFELSE" - ac2_54_macros="AC_C_BACKSLASH_A AC_CONFIG_LIBOBJ_DIR AC_GNU_SOURCE AC_PROG_EGREP AC_PROG_FGREP AC_REPLACE_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_REALLOC AC_TYPE_MBSTATE_T" - - macros_to_search="" - ac_major="`echo ${AUTOCONF_VERSION}. | cut -d. -f1 | sed 's/[^0-9]//g'`" - ac_minor="`echo ${AUTOCONF_VERSION}. | cut -d. -f2 | sed 's/[^0-9]//g'`" - - if [ $ac_major -lt 2 ] ; then - macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" - else - if [ $ac_minor -lt 54 ] ; then - macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" - elif [ $ac_minor -lt 55 ] ; then - macros_to_search="$ac2_59_macros $ac2_55_macros" - elif [ $ac_minor -lt 59 ] ; then - macros_to_search="$ac2_59_macros" - fi - fi - - configure_ac_macros=__none__ - for feature in $macros_to_search ; do - $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" - found="`grep \"^$feature.*\" $CONFIGURE`" - if [ ! "x$found" = "x" ] ; then - if [ "x$configure_ac_macros" = "x__none__" ] ; then - configure_ac_macros="$feature" - else - configure_ac_macros="$feature $configure_ac_macros" - fi - fi - done - if [ ! "x$configure_ac_macros" = "x__none__" ] ; then - $ECHO - $ECHO "Warning: Unsupported macros were found in $CONFIGURE" - $ECHO - $ECHO "The `echo $CONFIGURE | basename` file was scanned in order to determine if any" - $ECHO "unsupported macros are used that exceed the minimum version" - $ECHO "settings specified within this file. As such, the following macros" - $ECHO "should be removed from configure.ac or the version numbers in this" - $ECHO "file should be increased:" - $ECHO - $ECHO "$configure_ac_macros" - $ECHO - $ECHO $ECHO_N "Ignorantly continuing build preparation ... $ECHO_C" - fi - - ################### - # autoconf, retry # - ################### - $VERBOSE_ECHO - $VERBOSE_ECHO "$AUTOCONF" - autoconf_output="`$AUTOCONF 2>&1`" - ret=$? - $VERBOSE_ECHO "$autoconf_output" - - if [ ! $ret = 0 ] ; then - # test if libtool is busted - libtool_failure "$autoconf_output" - - # let the user know what went wrong - cat < - * Released gtkterm 0.99.7-rc1 30-oct-2011 + * Released gtkterm 0.99.7 **-&&&-2011 Added software support for RS485 - see README (thanks to Marc Le Douarain) Updated many of the GTK widgets Cleaned up auto-crlf stuff diff -Nru gtkterm-0.99.7~rc1/compile gtkterm-0.99.7+git9d63182/compile --- gtkterm-0.99.7~rc1/compile 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/compile 2017-11-17 16:09:57.000000000 +0000 @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -Nru gtkterm-0.99.7~rc1/config.h.in gtkterm-0.99.7+git9d63182/config.h.in --- gtkterm-0.99.7~rc1/config.h.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/config.h.in 2017-11-17 16:09:57.000000000 +0000 @@ -1,31 +1,13 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* always defined to indicate that i18n is enabled */ -#undef ENABLE_NLS +/* config.h.in. Generated from configure.ac by autoheader. */ /* GETTEXT package name */ #undef GETTEXT_PACKAGE -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ -#undef HAVE_BIND_TEXTDOMAIN_CODESET - -/* Define to 1 if you have the `dcgettext' function. */ -#undef HAVE_DCGETTEXT - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#undef HAVE_GETTEXT - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SERIAL_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff -Nru gtkterm-0.99.7~rc1/configure gtkterm-0.99.7+git9d63182/configure --- gtkterm-0.99.7~rc1/configure 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/configure 2017-11-17 16:09:57.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for gtkterm 0.99.7-rc1. +# Generated by GNU Autoconf 2.69 for GtkTerm 1.0. # -# Report bugs to . +# Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -91,6 +89,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -135,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -168,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -213,14 +238,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -231,7 +267,7 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://fedorahosted.org/gtkterm/ about your system, +$0: https://github.com/Jeija/gtkterm about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -323,6 +359,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -444,6 +488,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -478,16 +526,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -499,28 +547,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -550,13 +578,14 @@ MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='gtkterm' +PACKAGE_NAME='GtkTerm' PACKAGE_TARNAME='gtkterm' -PACKAGE_VERSION='0.99.7-rc1' -PACKAGE_STRING='gtkterm 0.99.7-rc1' -PACKAGE_BUGREPORT='https://fedorahosted.org/gtkterm/' +PACKAGE_VERSION='1.0' +PACKAGE_STRING='GtkTerm 1.0' +PACKAGE_BUGREPORT='https://github.com/Jeija/gtkterm' PACKAGE_URL='' +ac_header_list= # Factoring default headers for most tests. ac_includes_default="\ #include @@ -597,26 +626,18 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +EGREP +GREP +CPP +GLIB_COMPILE_RESOURCES GNUCFLAGS -GTK_LIBS -GTK_CFLAGS -VTE_LIBS -VTE_CFLAGS +vte_LIBS +vte_CFLAGS +gtk_LIBS +gtk_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG -MKINSTALLDIRS -POSUB -POFILES -PO_IN_DATADIR_FALSE -PO_IN_DATADIR_TRUE -INTLLIBS -INSTOBJEXT -GMOFILES -CATOBJEXT -CATALOGS -MSGFMT_OPTS -DATADIRNAME ALL_LINGUAS INTLTOOL_PERL GMSGFMT @@ -642,17 +663,21 @@ INTLTOOL_KEYS_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_DESKTOP_RULE +intltool__v_merge_options_0 +intltool__v_merge_options_ +INTLTOOL_V_MERGE_OPTIONS +INTLTOOL__v_MERGE_0 +INTLTOOL__v_MERGE_ +INTLTOOL_V_MERGE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS GETTEXT_PACKAGE -EGREP -GREP -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -668,6 +693,8 @@ CC AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -710,6 +737,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -744,14 +772,14 @@ LDFLAGS LIBS CPPFLAGS -CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -VTE_CFLAGS -VTE_LIBS -GTK_CFLAGS -GTK_LIBS' +gtk_CFLAGS +gtk_LIBS +vte_CFLAGS +vte_LIBS +CPP' # Initialize some variables set by options. @@ -790,6 +818,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -814,8 +843,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1041,6 +1071,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1155,7 +1194,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1178,7 +1217,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1206,8 +1245,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1293,7 +1330,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gtkterm 0.99.7-rc1 to adapt to many kinds of systems. +\`configure' configures GtkTerm 1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1333,6 +1370,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1359,7 +1397,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gtkterm 0.99.7-rc1:";; + short | recursive ) echo "Configuration of GtkTerm 1.0:";; esac cat <<\_ACEOF @@ -1367,10 +1405,12 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-nls do not use Native Language Support Some influential environment variables: @@ -1381,21 +1421,21 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - VTE_CFLAGS C compiler flags for VTE, overriding pkg-config - VTE_LIBS linker flags for VTE, overriding pkg-config - GTK_CFLAGS C compiler flags for GTK, overriding pkg-config - GTK_LIBS linker flags for GTK, overriding pkg-config + gtk_CFLAGS C compiler flags for gtk, overriding pkg-config + gtk_LIBS linker flags for gtk, overriding pkg-config + vte_CFLAGS C compiler flags for vte, overriding pkg-config + vte_LIBS linker flags for vte, overriding pkg-config + CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1458,10 +1498,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gtkterm configure 0.99.7-rc1 -generated by GNU Autoconf 2.66 +GtkTerm configure 1.0 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1505,11 +1545,42 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1531,7 +1602,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1542,7 +1613,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1584,251 +1655,16 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------ ## -## Report this to https://fedorahosted.org/gtkterm/ ## -## ------------------------------------------------ ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gtkterm $as_me 0.99.7-rc1, which was -generated by GNU Autoconf 2.66. Invocation command line was +It was created by GtkTerm $as_me 1.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2107,6 +1943,7 @@ >$cache_file fi +as_fn_append ac_header_list " linux/serial.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2175,7 +2012,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.11' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2223,7 +2060,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2243,7 +2080,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2301,9 +2138,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2314,32 +2148,40 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2351,6 +2193,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2361,8 +2213,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2373,15 +2225,15 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2390,17 +2242,17 @@ esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2412,7 +2264,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2440,7 +2292,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2452,7 +2304,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2493,7 +2345,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2503,7 +2355,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2532,19 +2384,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2556,7 +2402,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2584,7 +2430,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2620,6 +2466,45 @@ fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -2641,8 +2526,8 @@ # Define the identity of the package. - PACKAGE=gtkterm - VERSION=0.99.7-rc1 + PACKAGE='gtkterm' + VERSION='1.0' cat >>confdefs.h <<_ACEOF @@ -2670,34 +2555,70 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' -AMTAR=${AMTAR-"${am_missing_run}tar"} +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -ac_config_headers="$ac_config_headers config.h" -# Use AM_SILENT_RULES if present -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2709,7 +2630,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2721,7 +2642,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2749,7 +2670,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2761,7 +2682,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2802,7 +2723,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2814,7 +2735,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2842,7 +2763,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2855,7 +2776,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2901,7 +2822,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2913,7 +2834,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2945,7 +2866,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2957,7 +2878,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3228,7 +3149,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3279,7 +3200,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3316,7 +3237,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3394,7 +3315,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3403,8 +3324,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3488,26 +3408,85 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" -ac_config_commands="$ac_config_commands depfiles" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3540,6 +3519,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3555,15 +3535,16 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3597,16 +3578,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3615,16 +3596,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -3678,641 +3659,218 @@ fi +ac_config_headers="$ac_config_headers config.h" +GETTEXT_PACKAGE="gtkterm" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +cat >>confdefs.h <<_ACEOF +#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval else - # Passes both tests. -ac_preproc_ok=: -break + USE_NLS=yes fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } - done - ac_cv_prog_CPP=$CPP + + +case "$am__api_version" in + 1.01234) + as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + ;; + *) + ;; +esac + +INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.40.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` +INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +if test -n "0.40.0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.40.0" >&5 +$as_echo_n "checking for intltool >= 0.40.0... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 +$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + as_fn_error $? "Your intltool is too old. You need intltool 0.40.0 or later." "$LINENO" 5 fi - CPP=$ac_cv_prog_CPP + +# Extract the first word of "intltool-update", so it can be a program name with args. +set dummy intltool-update; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes + case $INTLTOOL_UPDATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue + ;; +esac fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE +if test -n "$INTLTOOL_UPDATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 +$as_echo "$INTLTOOL_UPDATE" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_ext + +# Extract the first word of "intltool-merge", so it can be a program name with args. +set dummy intltool-merge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_MERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_MERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + done +IFS=$as_save_IFS + ;; +esac +fi +INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE +if test -n "$INTLTOOL_MERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 +$as_echo "$INTLTOOL_MERGE" >&6; } else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +# Extract the first word of "intltool-extract", so it can be a program name with args. +set dummy intltool-extract; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST + case $INTLTOOL_EXTRACT in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. + ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi + + ;; +esac +fi +INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT +if test -n "$INTLTOOL_EXTRACT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 +$as_echo "$INTLTOOL_EXTRACT" >&6; } else - ac_cv_path_GREP=$GREP + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" +if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi +INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' +INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' +INTLTOOL__v_MERGE_0='@echo " ITMRG " $@;' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ +INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' +intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' +intltool__v_merge_options_0='-q' - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@' else - ac_cv_header_stdc=no + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir' fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in fcntl.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5 -$as_echo_n "checking POSIX termios... " >&6; } -if test "${ac_cv_sys_posix_termios+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -/* SunOS 4.0.3 has termios.h but not the library calls. */ - tcgetattr(0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_posix_termios=yes -else - ac_cv_sys_posix_termios=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5 -$as_echo "$ac_cv_sys_posix_termios" >&6; } - - - -GETTEXT_PACKAGE=gtkterm - - -cat >>confdefs.h <<_ACEOF -#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -$as_echo_n "checking whether NLS is requested... " >&6; } - # Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then : - enableval=$enable_nls; USE_NLS=$enableval -else - USE_NLS=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } - - - - -case "$am__api_version" in - 1.01234) - as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 - ;; - *) - ;; -esac - -if test -n "0.40.0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.40.0" >&5 -$as_echo_n "checking for intltool >= 0.40.0... " >&6; } - - INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.40.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` - INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 -$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } - test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - as_fn_error $? "Your intltool is too old. You need intltool 0.40.0 or later." "$LINENO" 5 -fi - -# Extract the first word of "intltool-update", so it can be a program name with args. -set dummy intltool-update; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $INTLTOOL_UPDATE in - [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE -if test -n "$INTLTOOL_UPDATE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 -$as_echo "$INTLTOOL_UPDATE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "intltool-merge", so it can be a program name with args. -set dummy intltool-merge; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $INTLTOOL_MERGE in - [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE -if test -n "$INTLTOOL_MERGE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 -$as_echo "$INTLTOOL_MERGE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "intltool-extract", so it can be a program name with args. -set dummy intltool-extract; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $INTLTOOL_EXTRACT in - [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT -if test -n "$INTLTOOL_EXTRACT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 -$as_echo "$INTLTOOL_EXTRACT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then - as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 -fi - - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' @@ -4415,7 +3973,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in @@ -4429,7 +3987,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4455,7 +4013,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in @@ -4469,7 +4027,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4495,7 +4053,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in @@ -4509,7 +4067,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4535,7 +4093,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -4549,7 +4107,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4586,7 +4144,7 @@ set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : +if ${ac_cv_path_INTLTOOL_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in @@ -4600,7 +4158,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4631,7 +4189,7 @@ if test $? -ne 0; then as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 else - IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 $as_echo "$IT_PERL_VERSION" >&6; } fi @@ -4649,537 +4207,371 @@ # Substitute ALL_LINGUAS so we can use it in po/Makefile -# Set DATADIRNAME correctly if it is not set yet -# (copied from glib-gettext.m4) -if test -z "$DATADIRNAME"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - DATADIRNAME=share -else - case $host in - *-*-solaris*) - ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : - DATADIRNAME=share -else - DATADIRNAME=lib -fi - - ;; - *) - DATADIRNAME=lib - ;; - esac -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - +AM_GLIB_GNU_GETTEXT - for ac_header in locale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF - +# Use AM_SILENT_RULES if present +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; fi -done - - if test $ac_cv_header_locale_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 -$as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${am_cv_val_LC_MESSAGES+set}" = set; then : +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return LC_MESSAGES - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_val_LC_MESSAGES=yes + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes else - am_cv_val_LC_MESSAGES=no + am_cv_make_support_nested_variables=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 -$as_echo "$am_cv_val_LC_MESSAGES" >&6; } - if test $am_cv_val_LC_MESSAGES = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' -$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h - fi - fi - USE_NLS=yes - gt_cv_have_gettext=no - CATOBJEXT=NONE - XGETTEXT=: - INTLLIBS= - - ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = x""yes; then : - gt_cv_func_dgettext_libintl="no" - libintl_extra_libs="" - - # - # First check in libc - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 -$as_echo_n "checking for ngettext in libc... " >&6; } -if test "${gt_cv_func_ngettext_libc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return !ngettext ("","", 1) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_ngettext_libc=yes -else - gt_cv_func_ngettext_libc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 -$as_echo "$gt_cv_func_ngettext_libc" >&6; } - if test "$gt_cv_func_ngettext_libc" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 -$as_echo_n "checking for dgettext in libc... " >&6; } -if test "${gt_cv_func_dgettext_libc+set}" = set; then : +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -int -main () -{ -return !dgettext ("","") - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_dgettext_libc=yes -else - gt_cv_func_dgettext_libc=no + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 -$as_echo "$gt_cv_func_dgettext_libc" >&6; } - fi - if test "$gt_cv_func_ngettext_libc" = "yes" ; then - for ac_func in bind_textdomain_codeset -do : - ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BIND_TEXTDOMAIN_CODESET 1 -_ACEOF fi -done - - fi - - # - # If we don't have everything we want, check in libintl - # - if test "$gt_cv_func_dgettext_libc" != "yes" \ - || test "$gt_cv_func_ngettext_libc" != "yes" \ - || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 -$as_echo_n "checking for bindtextdomain in -lintl... " >&6; } -if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bindtextdomain (); -int -main () -{ -return bindtextdomain (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_bindtextdomain=yes -else - ac_cv_lib_intl_bindtextdomain=no + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 -$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } -if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 -$as_echo_n "checking for ngettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_ngettext+set}" = set; then : - $as_echo_n "(cached) " >&6 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ngettext (); -int -main () -{ -return ngettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_ngettext=yes + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi else - ac_cv_lib_intl_ngettext=no + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 -$as_echo "$ac_cv_lib_intl_ngettext" >&6; } -if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 -$as_echo_n "checking for dgettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_dgettext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgettext (); -int -main () -{ -return dgettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_dgettext=yes +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk" >&5 +$as_echo_n "checking for gtk... " >&6; } + +if test -n "$gtk_CFLAGS"; then + pkg_cv_gtk_CFLAGS="$gtk_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.12.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.12.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtk_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 3.12.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - ac_cv_lib_intl_dgettext=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test -n "$gtk_LIBS"; then + pkg_cv_gtk_LIBS="$gtk_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= 3.12.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= 3.12.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_gtk_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 3.12.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 -$as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : - gt_cv_func_dgettext_libintl=yes + else + pkg_failed=untried fi -fi -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - if test "$gt_cv_func_dgettext_libintl" != "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 -$as_echo_n "checking if -liconv is needed to use gettext... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 -$as_echo_n "checking for ngettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_ngettext+set}" = set; then : - $as_echo_n "(cached) " >&6 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl -liconv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + gtk_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= 3.12.0" 2>&1` + else + gtk_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= 3.12.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$gtk_PKG_ERRORS" >&5 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ngettext (); -int -main () -{ -return ngettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_ngettext=yes + as_fn_error $? "Package requirements (gtk+-3.0 >= 3.12.0) were not met: + +$gtk_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables gtk_CFLAGS +and gtk_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables gtk_CFLAGS +and gtk_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_lib_intl_ngettext=no + gtk_CFLAGS=$pkg_cv_gtk_CFLAGS + gtk_LIBS=$pkg_cv_gtk_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 -$as_echo "$ac_cv_lib_intl_ngettext" >&6; } -if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 -$as_echo_n "checking for dcgettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl -liconv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dcgettext (); -int -main () -{ -return dcgettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_dcgettext=yes +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vte" >&5 +$as_echo_n "checking for vte... " >&6; } + +if test -n "$vte_CFLAGS"; then + pkg_cv_vte_CFLAGS="$vte_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte-2.91 >= 0.40.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "vte-2.91 >= 0.40.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_vte_CFLAGS=`$PKG_CONFIG --cflags "vte-2.91 >= 0.40.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - ac_cv_lib_intl_dcgettext=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 -$as_echo "$ac_cv_lib_intl_dcgettext" >&6; } -if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : - gt_cv_func_dgettext_libintl=yes - libintl_extra_libs=-liconv +if test -n "$vte_LIBS"; then + pkg_cv_vte_LIBS="$vte_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte-2.91 >= 0.40.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "vte-2.91 >= 0.40.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_vte_LIBS=`$PKG_CONFIG --libs "vte-2.91 >= 0.40.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - : + pkg_failed=yes +fi + else + pkg_failed=untried fi + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - : + _pkg_short_errors_supported=no fi - + if test $_pkg_short_errors_supported = yes; then + vte_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "vte-2.91 >= 0.40.0" 2>&1` + else + vte_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "vte-2.91 >= 0.40.0" 2>&1` fi + # Put the nasty error message in config.log where it belongs + echo "$vte_PKG_ERRORS" >&5 - # - # If we found libintl, then check in it for bind_textdomain_codeset(); - # we'll prefer libc if neither have bind_textdomain_codeset(), - # and both have dgettext and ngettext - # - if test "$gt_cv_func_dgettext_libintl" = "yes" ; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS -lintl $libintl_extra_libs" - unset ac_cv_func_bind_textdomain_codeset - for ac_func in bind_textdomain_codeset -do : - ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BIND_TEXTDOMAIN_CODESET 1 -_ACEOF + as_fn_error $? "Package requirements (vte-2.91 >= 0.40.0) were not met: -fi -done +$vte_PKG_ERRORS - LIBS="$glib_save_LIBS" +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then - gt_cv_func_dgettext_libc=no - else - if test "$gt_cv_func_dgettext_libc" = "yes" \ - && test "$gt_cv_func_ngettext_libc" = "yes"; then - gt_cv_func_dgettext_libintl=no - fi - fi - fi - fi +Alternatively, you may set the environment variables vte_CFLAGS +and vte_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables vte_CFLAGS +and vte_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - if test "$gt_cv_func_dgettext_libc" = "yes" \ - || test "$gt_cv_func_dgettext_libintl" = "yes"; then - gt_cv_have_gettext=yes - fi +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + vte_CFLAGS=$pkg_cv_vte_CFLAGS + vte_LIBS=$pkg_cv_vte_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - if test "$gt_cv_func_dgettext_libintl" = "yes"; then - INTLLIBS="-lintl $libintl_extra_libs" - fi +fi - if test "$gt_cv_have_gettext" = "yes"; then +if test "$CC" = "gcc" ; then + GNUCFLAGS="-Wall -fno-omit-frame-pointer -fno-strict-aliasing -O2" +fi -$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h - # Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 +# Bundle GTK ui files with gresource +# Extract the first word of "glib-compile-resources", so it can be a program name with args. +set dummy glib-compile-resources; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then : $as_echo_n "(cached) " >&6 else - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" - ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "$MSGFMT" != "no"; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS $INTLLIBS" - for ac_func in dcgettext -do : - ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" -if test "x$ac_cv_func_dcgettext" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DCGETTEXT 1 -_ACEOF - -fi -done - - MSGFMT_OPTS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 -$as_echo_n "checking if msgfmt accepts -c... " >&6; } - cat >conftest.foo <<_ACEOF - -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: test 1.0\n" -"PO-Revision-Date: 2007-02-15 12:01+0100\n" -"Last-Translator: test \n" -"Language-Team: C \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" - -_ACEOF -if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 - ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -echo "$as_me: failed input was:" >&5 -sed 's/^/| /' conftest.foo >&5 -fi - - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $GMSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + case $GLIB_COMPILE_RESOURCES in + [\\/]* | ?:[\\/]*) + ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5188,8 +4580,8 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5197,475 +4589,443 @@ done IFS=$as_save_IFS - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no" ;; esac fi -GMSGFMT=$ac_cv_path_GMSGFMT -if test -n "$GMSGFMT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -$as_echo "$GMSGFMT" >&6; } +GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES +if test -n "$GLIB_COMPILE_RESOURCES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5 +$as_echo "$GLIB_COMPILE_RESOURCES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - # Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if test x$GLIB_COMPILE_RESOURCES = xno; then + as_fn_error $? "Could not find glib-compile-resources in your PATH" "$LINENO" 5 +fi + +# Linux is required for arbitrary baud rates + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test "$XGETTEXT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -$as_echo "$XGETTEXT" >&6; } + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -int -main () -{ -extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - CATOBJEXT=.gmo - DATADIRNAME=share -else - case $host in - *-*-solaris*) - ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : - CATOBJEXT=.gmo - DATADIRNAME=share +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - CATOBJEXT=.mo - DATADIRNAME=lib -fi - - ;; - *) - CATOBJEXT=.mo - DATADIRNAME=lib - ;; - esac + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$glib_save_LIBS" - INSTOBJEXT=.mo - else - gt_cv_have_gettext=no - fi - fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi - - - if test "$gt_cv_have_gettext" = "yes" ; then - -$as_echo "#define ENABLE_NLS 1" >>confdefs.h - - fi - - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 -$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - - ac_config_commands="$ac_config_commands default-1" - - - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" done + ac_cv_prog_CPP=$CPP +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - if test "$gt_cv_have_gettext" = "yes"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 -$as_echo_n "checking for catalogs to be installed... " >&6; } - NEW_LINGUAS= - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - NEW_LINGUAS="$NEW_LINGUAS $presentlang" - fi - done - LINGUAS=$NEW_LINGUAS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 -$as_echo "$LINGUAS" >&6; } - fi - - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - - - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - - - - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - - ;; + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_GREP=$GREP fi - fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - - ;; + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + ac_cv_path_EGREP=$EGREP fi + fi fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VTE" >&5 -$as_echo_n "checking for VTE... " >&6; } -if test -n "$VTE_CFLAGS"; then - pkg_cv_VTE_CFLAGS="$VTE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte >= 0.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "vte >= 0.20") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_VTE_CFLAGS=`$PKG_CONFIG --cflags "vte >= 0.20" 2>/dev/null` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$VTE_LIBS"; then - pkg_cv_VTE_LIBS="$VTE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte >= 0.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "vte >= 0.20") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_VTE_LIBS=`$PKG_CONFIG --libs "vte >= 0.20" 2>/dev/null` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - pkg_failed=yes -fi - else - pkg_failed=untried + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes else - _pkg_short_errors_supported=no + ac_cv_header_stdc=no fi - if test $_pkg_short_errors_supported = yes; then - VTE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "vte >= 0.20" 2>&1` - else - VTE_PKG_ERRORS=`$PKG_CONFIG --print-errors "vte >= 0.20" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$VTE_PKG_ERRORS" >&5 - - as_fn_error $? "*** vte >= 0.20 not installed ***" "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "*** vte >= 0.20 not installed ***" "$LINENO" 5 -else - VTE_CFLAGS=$pkg_cv_VTE_CFLAGS - VTE_LIBS=$pkg_cv_VTE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +rm -f conftest* fi +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 -$as_echo_n "checking for GTK... " >&6; } +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : -if test -n "$GTK_CFLAGS"; then - pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.16\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.16") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.16" 2>/dev/null` else - pkg_failed=yes + ac_cv_header_stdc=no fi - else - pkg_failed=untried +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test -n "$GTK_LIBS"; then - pkg_cv_GTK_LIBS="$GTK_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.16\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.16") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.16" 2>/dev/null` -else - pkg_failed=yes + fi - else - pkg_failed=untried fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= 2.16" 2>&1` - else - GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= 2.16" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GTK_PKG_ERRORS" >&5 - as_fn_error $? "*** GTK >= 2.16 not installed ***" "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "*** GTK >= 2.16 not installed ***" "$LINENO" 5 -else - GTK_CFLAGS=$pkg_cv_GTK_CFLAGS - GTK_LIBS=$pkg_cv_GTK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +done -fi -if test "$CC" = "gcc" ; then - GNUCFLAGS="-Wall -fno-omit-frame-pointer -fno-strict-aliasing -O2" + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done + + + + ac_config_files="$ac_config_files Makefile src/Makefile po/Makefile.in" @@ -5734,10 +5094,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -5768,6 +5139,14 @@ LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -5789,7 +5168,7 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -5890,6 +5269,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6085,16 +5465,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -6154,28 +5534,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6196,8 +5564,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gtkterm $as_me 0.99.7-rc1, which was -generated by GNU Autoconf 2.66. Invocation command line was +This file was extended by GtkTerm $as_me 1.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6256,17 +5624,17 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gtkterm config.status 0.99.7-rc1 -configured by $0, generated by GNU Autoconf 2.66, +GtkTerm config.status 1.0 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -6284,11 +5652,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -6310,6 +5683,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -6351,7 +5725,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -6377,7 +5751,6 @@ # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -6386,9 +5759,8 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; @@ -6417,9 +5789,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -6427,12 +5800,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -6454,7 +5828,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -6482,7 +5856,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -6530,7 +5904,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -6562,7 +5936,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -6596,7 +5970,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -6608,8 +5982,8 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -6729,7 +6103,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6764,7 +6138,7 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ + *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; @@ -6901,21 +6275,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -6926,20 +6301,20 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -6986,7 +6361,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -6999,7 +6374,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -7033,21 +6408,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -7080,9 +6453,6 @@ done } ;; - "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile - esac ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 diff -Nru gtkterm-0.99.7~rc1/configure.ac gtkterm-0.99.7+git9d63182/configure.ac --- gtkterm-0.99.7~rc1/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/configure.ac 2017-11-17 16:09:57.000000000 +0000 @@ -0,0 +1,36 @@ +# GtkTerm autoconf script + +AC_INIT([GtkTerm], [1.0], [https://github.com/Jeija/gtkterm]) +AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-portability]) +AC_PROG_CC +AC_CONFIG_HEADERS([config.h]) + +GETTEXT_PACKAGE="gtkterm" +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) +IT_PROG_INTLTOOL([0.40.0]) +AM_GLIB_GNU_GETTEXT + +# Use AM_SILENT_RULES if present +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +PKG_CHECK_MODULES([gtk], [gtk+-3.0 >= 3.12.0]) +PKG_CHECK_MODULES([vte], [vte-2.91 >= 0.40.0]) + +if test "$CC" = "gcc" ; then + GNUCFLAGS="-Wall -fno-omit-frame-pointer -fno-strict-aliasing -O2" +fi +AC_SUBST(GNUCFLAGS) + +# Bundle GTK ui files with gresource +AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources, no) +if test x$GLIB_COMPILE_RESOURCES = xno; then + AC_MSG_ERROR(Could not find glib-compile-resources in your PATH) +fi + +# Linux is required for arbitrary baud rates +AC_CHECK_HEADERS_ONCE([linux/serial.h]) + +AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in]) + +AC_OUTPUT diff -Nru gtkterm-0.99.7~rc1/configure.in gtkterm-0.99.7+git9d63182/configure.in --- gtkterm-0.99.7~rc1/configure.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/configure.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT([gtkterm], [0.99.7-rc1], [https://fedorahosted.org/gtkterm/]) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AM_CONFIG_HEADER(config.h) - -# Use AM_SILENT_RULES if present -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -AC_PROG_CC - -dnl Checks for programs. - -dnl Checks for libraries. - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h) -AM_SYS_POSIX_TERMIOS - -dnl Initialize intltool - -GETTEXT_PACKAGE=AC_PACKAGE_NAME -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) -IT_PROG_INTLTOOL([0.40.0]) -AM_GLIB_GNU_GETTEXT - -dnl Checks for typedefs, structures, and compiler characteristics. - -dnl Checks for library functions. - -dnl Checks for GTK+ and Imlib and libvte -PKG_CHECK_MODULES(VTE, vte >= 0.20, , AC_MSG_ERROR([*** vte >= 0.20 not installed ***])) - -AC_SUBST(VTE_CFLAGS) -AC_SUBST(VTE_LIBS) - -PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16, , AC_MSG_ERROR([*** GTK >= 2.16 not installed ***])) - -AC_SUBST(GTK_CFLAGS) -AC_SUBST(GTK_LIBS) - -if test "$CC" = "gcc" ; then - GNUCFLAGS="-Wall -fno-omit-frame-pointer -fno-strict-aliasing -O2" -fi -AC_SUBST(GNUCFLAGS) - -AC_CONFIG_FILES([ -Makefile -src/Makefile -po/Makefile.in -]) - -AC_OUTPUT diff -Nru gtkterm-0.99.7~rc1/debian/changelog gtkterm-0.99.7+git9d63182/debian/changelog --- gtkterm-0.99.7~rc1/debian/changelog 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/changelog 2017-11-21 21:39:46.000000000 +0000 @@ -1,15 +1,28 @@ -gtkterm (0.99.7~rc1-0.3ubuntu1) artful; urgency=medium +gtkterm (0.99.7+git9d63182-1) unstable; urgency=low - * Merge from Debian unstable. Remaining changes: - - debian/gtkterm.xpm: Add icon. - - debian/rules: Install icon. - - debian/gtkterm.desktop: - + Capitalize first word in Name field. - + Add Italian translations. - + Change categories in accordance with the Desktop Menu. - - debian/watch: Add. + * New maintainer (Closes: #857476). + * New upstream release (Closes: #601916). + - add Russian translation. Thanks to Sergey Alyoshin (Closes: #548945). + - add German translation. Thanks to Chris Leick (Closes: #574971). + - add more baudrates (Closes: #460747). + - migrate to GTK3 and vte-2.91 (Closes: #790177). + * debian/copyright + - add icon/*.png. + - make dep5. + * debian/control + - bump to standards-version 4.1.1.1. + - add Homepage field (Closes: #615330). + * debian/install + - add file. + * debian/gtkterm.desktop + - add icon. + - fix Menu entry (Closes: #400796). + * debian/rules + - migrate from cdbs to dh. + * debian/watch + - add file. - -- Bhavani Shankar Fri, 26 May 2017 21:57:26 +0530 + -- Willem van den Akker Fri, 17 Nov 2017 17:31:28 +0100 gtkterm (0.99.7~rc1-0.3) unstable; urgency=medium @@ -20,20 +33,6 @@ -- Andrey Rahmatullin Thu, 24 Nov 2016 01:13:00 +0500 -gtkterm (0.99.7~rc1-0.2ubuntu1) raring; urgency=low - - * Merge from Debian unstable. Remaining changes: - - debian/gtkterm.xpm: Add icon. - - debian/rules: Install icon. - - debian/gtkterm.desktop: - + Capitalize first word in Name field. - + Add Italian translations. - + Change categories in accordance with the Desktop Menu. - - debian/watch: Add. - - debian/compat: Bump level to 5. - - -- Logan Rosen Thu, 06 Dec 2012 15:21:42 -0500 - gtkterm (0.99.7~rc1-0.2) unstable; urgency=low * Non-maintainer upload. @@ -47,84 +46,19 @@ * Non-Maintainer upload * New upstream release - - fix "config.c:38:21: fatal error: vte/vte.h: No such file or directory" + - fix "config.c:38:21: fatal error: vte/vte.h: No such file or directory" (Closes: #634537) * debian/control - add "Build-Depends: intltool" -- Hideki Yamane Thu, 24 May 2012 08:23:44 +0900 -gtkterm (0.99.7~rc1-0ubuntu1) precise; urgency=low - - * New upstream release (LP: #819992) - * drop all patches, included upstream - * debian/rules: drop simple-patchsys - - -- Andreas Moog Sun, 12 Feb 2012 20:53:19 +0100 - -gtkterm (0.99.5-1ubuntu6) maverick; urgency=low - - * 03_ubuntu_configure.in.patch: - adjusted to provide diffs against new automake/autotools versions - - -- Stephan Hermann Mon, 27 Sep 2010 20:02:29 +0000 - -gtkterm (0.99.5-1ubuntu5) maverick; urgency=low - - * 03_ubuntu_configure.in.patch: - Add $TERMINAL_WIDGET_CLFAGS to the standard CFLAGS, - to find the VTE include files - - -- Stephan Hermann Mon, 27 Sep 2010 11:27:46 +0000 - -gtkterm (0.99.5-1ubuntu4) lucid; urgency=low - - * 02_ubuntu_segfault.patch: fix the length of the written buffer in - src/widget.c to include the null termination of the string iand fix a - segfault (LP: #60400). Thanks to sdaau (https://launchpad.net/~sd-imi) for - the patch. - - -- Fabrice Coutadeur Sat, 12 Dec 2009 05:31:20 +0000 - -gtkterm (0.99.5-1ubuntu3) karmic; urgency=low - - * Don't print lots of warnings if the serial port doesn't have all the lines, - e.g. if emulated. (LP: #132393) - - -- Joseph Smidt Thu, 20 Nov 2008 22:30:49 -0800 - -gtkterm (0.99.5-1ubuntu2) feisty; urgency=low - - * added icon (LP: #93755) - * corrected .desktop file (LP: #93755) - * changed categories field in .desktop file in accordance to the Desktop Menu Specification - * added italian translation to .desktop file - * changed maintainer field (https://wiki.ubuntu.com/DebianMaintainerField) - - -- Cesare Tirabassi Wed, 21 Mar 2007 23:26:37 +0100 - -gtkterm (0.99.5-1ubuntu1) feisty; urgency=low - - * added 01_ubuntu_segfault.patch for fixing segfault when sending - empty hexadecimal data. - - Fix was created by Elie De Brauwer - - Closes malone #60400 - * Added simple-patchsys.mk - - -- ville palo Fri, 19 Jan 2007 19:21:00 +0200 - -gtkterm (0.99.5-1build1) edgy; urgency=low - - * Rebuild against libvte9 (Malone: #53823) - - -- Gauvain Pocentek Thu, 27 Jul 2006 06:29:30 -0400 - gtkterm (0.99.5-1) unstable; urgency=low * New upstream version: - - Backspace key now works and sends \b - - Print all messages in UTF8 format - - Fixed segfault in case of local buffer overflow + - Backspace key now works and sends \b. + - Print all messages in UTF8 format. + - Fixed segfault in case of local buffer overflow. - Added hungarian translation - Allow user to change the port manually to an unlisted port device (Closes: #223825). @@ -146,7 +80,6 @@ * Upgrade Standards-Version to 3.6.1.0. * Update Build-Depends. - -- Sebastien Bacher Sat, 6 Sep 2003 13:57:46 +0200 gtkterm (0.99.3-1) unstable; urgency=low @@ -172,19 +105,19 @@ gtkterm (0.99.1-1) unstable; urgency=low - * New upstream release. + * New upstream release. -- Sebastien Bacher Fri, 21 Feb 2003 20:39:30 +0100 gtkterm (0.99.0-1) unstable; urgency=low - * New upstream release (Closes: #165852). + * New upstream release (Closes: #165852). -- Sebastien Bacher Sun, 16 Feb 2003 21:24:38 +0100 gtkterm (0.98.5-1) unstable; urgency=low - * New upstream release. + * New upstream release. -- Sebastien Bacher Wed, 5 Feb 2003 00:50:14 +0100 @@ -222,7 +155,7 @@ gtkterm (0.98.2-1) unstable; urgency=low * New upstream release. - * Added local echo in configuration menu and in command line + * Added local echo in configuration menu and in command line (Closes: #165853). -- Sebastien Bacher Fri, 15 Nov 2002 01:25:08 +0100 diff -Nru gtkterm-0.99.7~rc1/debian/control gtkterm-0.99.7+git9d63182/debian/control --- gtkterm-0.99.7~rc1/debian/control 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/control 2017-11-21 21:39:46.000000000 +0000 @@ -1,16 +1,16 @@ Source: gtkterm Section: comm Priority: optional -Maintainer: Ubuntu MOTU Developers -XSBC-Original-Maintainer: Sebastien Bacher -Build-Depends: cdbs, debhelper (>= 10), libgtk2.0-dev, libvte-dev, intltool -Standards-Version: 3.6.1.0 +Maintainer: Willem van den Akker +Build-Depends: debhelper (>= 10), libgtk-3-dev, libvte-2.91-dev, intltool, libxml2-utils +Standards-Version: 4.1.1.1 +Homepage: https://github.com/Jeija/gtkterm Package: gtkterm Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: A simple GTK+ serial port terminal - gtkterm is a simple GTK+ terminal used to communicate with the serial port. +Description: simple GTK+ serial port terminal + gtkterm is a simple GTK+ terminal used to communicate with the serial port. . Its features : . @@ -24,5 +24,4 @@ * Also reads the state of control lines (RTS, CD, DSR, RI) . Author: Julien Schmitt - Homepage: http://www.jls-info.com/julien/linux/ diff -Nru gtkterm-0.99.7~rc1/debian/copyright gtkterm-0.99.7+git9d63182/debian/copyright --- gtkterm-0.99.7~rc1/debian/copyright 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/copyright 2017-11-21 21:39:46.000000000 +0000 @@ -1,56 +1,185 @@ -This package was debianized by Sebastien Bacher on -Tue, 17 Sep 2002 15:59:09 +0200. - -It was downloaded from http://www.jls-info.com/julien/linux/ - -Upstream authors: - - Julien Schmitt - Zach Davis - -Copyright: - - Original Code by: (c) Julien Schmitt - -License: - - 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 . - -On Debian systems, the complete text of the GNU General Public License -version 3 can be found at /usr/share/common-licenses/GPL-3. - -The files src/parsecfg.c and src/parsecfg.h have this copyright and license : - - Copyright (C) 1999-2001 Yuuki NINOMIYA - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the - Free Software Foundation, Inc. - -The address of the Free Software Foundation, Inc. is 51 Franklin St, Fifth -Floor, Boston, MA 02110-1301, USA. - -On Debian systems, the complete text of the GNU General Public License -version 2 can be found at /usr/share/common-licenses/GPL-2. - +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: gtkterm +Source: https://www.github.com/Jeija/gtkterm + +Files: * +Copyright: Julien Schmitt + Zach Davis +License: GPL-3+ + +Files: src/parsecfg.c and src/parsecfg.h +Copyright: 1999-2001 Yuuki NINOMIYA +License: GPL-2+ + +Files: debian/* +Copyright: 2002-2017 Sebastien Bacher + 2017 Willem van den Akker +License: GPL-2+ + +Files: icon/*.png +Copyright: Openclipart.org +License: CC0 + +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + +License: GPL-3+ + 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 . + +License: CC0 + The person who associated a work with this deed has dedicated the work + to the public domain by waiving all of his or her rights to the work + worldwide under copyright law, including all related and neighboring + rights, to the extent allowed by law. + . + You can copy, modify, distribute and perform the work, even for + commercial purposes, all without asking permission. + . + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL + SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT + RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" + BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS + DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS + LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE + INFORMATION OR WORKS PROVIDED HEREUNDER. + . + Statement of Purpose + . + The laws of most jurisdictions throughout the world automatically confer + exclusive Copyright and Related Rights (defined below) upon the creator and + subsequent owner(s) (each and all, an "owner") of an original work of + authorship and/or a database (each, a "Work"). + . + Certain owners wish to permanently relinquish those rights to a Work for the + purpose of contributing to a commons of creative, cultural and scientific + works ("Commons") that the public can reliably and without fear of later + claims of infringement build upon, modify, incorporate in other works, reuse + and redistribute as freely as possible in any form whatsoever and for any + purposes, including without limitation commercial purposes. These owners may + contribute to the Commons to promote the ideal of a free culture and the + further production of creative, cultural and scientific works, or to gain + reputation or greater distribution for their Work in part through the use + and efforts of others. + . + For these and/or other purposes and motivations, and without any expectation + of additional consideration or compensation, the person associating CC0 with + a Work (the "Affirmer"), to the extent that he or she is an owner of + Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to + the Work and publicly distribute the Work under its terms, with knowledge of + his or her Copyright and Related Rights in the Work and the meaning and + intended legal effect of CC0 on those rights. + . + 1. Copyright and Related Rights. A Work made available under CC0 may be + protected by copyright and related or neighboring rights ("Copyright and + Related Rights"). Copyright and Related Rights include, but are not limited + to, the following: + . + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); + iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of + data in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of + the European Parliament and of the Council of 11 March 1996 on the + legal protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and + vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + . + 2. Waiver. To the greatest extent permitted by, but not in contravention of, + applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and + unconditionally waives, abandons, and surrenders all of Affirmer's Copyright + and Related Rights and associated claims and causes of action, whether now + known or unknown (including existing as well as future claims and causes of + action), in the Work (i) in all territories worldwide, (ii) for the maximum + duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the "Waiver"). Affirmer + makes the Waiver for the benefit of each member of the public at large and + to the detriment of Affirmer's heirs and successors, fully intending that + such Waiver shall not be subject to revocation, rescission, cancellation, + termination, or any other legal or equitable action to disrupt the quiet + enjoyment of the Work by the public as contemplated by Affirmer's express + Statement of Purpose. + . + 3. Public License Fallback. Should any part of the Waiver for any reason be + judged legally invalid or ineffective under applicable law, then the Waiver + shall be preserved to the maximum extent permitted taking into account + Affirmer's express Statement of Purpose. In addition, to the extent the + Waiver is so judged Affirmer hereby grants to each affected person a + royalty-free, non transferable, non sublicensable, non exclusive, + irrevocable and unconditional license to exercise Affirmer's Copyright and + Related Rights in the Work (i) in all territories worldwide, (ii) for the + maximum duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the "License"). The License + shall be deemed effective as of the date CC0 was applied by Affirmer to the + Work. Should any part of the License for any reason be judged legally + invalid or ineffective under applicable law, such partial invalidity or + ineffectiveness shall not invalidate the remainder of the License, and in + such case Affirmer hereby affirms that he or she will not (i) exercise any + of his or her remaining Copyright and Related Rights in the Work or (ii) + assert any associated claims and causes of action with respect to the Work, + in either case contrary to Affirmer's express Statement of Purpose. + . + 4. Limitations and Disclaimers. + . + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. + . + License text also available at + http://creativecommons.org/publicdomain/zero/1.0/ diff -Nru gtkterm-0.99.7~rc1/debian/gtkterm.desktop gtkterm-0.99.7+git9d63182/debian/gtkterm.desktop --- gtkterm-0.99.7~rc1/debian/gtkterm.desktop 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/gtkterm.desktop 2017-11-21 21:39:46.000000000 +0000 @@ -2,12 +2,10 @@ Encoding=UTF-8 Name=Serial port terminal Name[fr]=Terminal pour port série -Name[it]=Terminale per porta seriale Comment=Communicate with the serial port Comment[fr]=Communique avec le port série -Comment[it]=Comunica con la porta seriale Exec=gtkterm -Icon=gtkterm.xpm Terminal=false Type=Application -Categories=GTK;Utility; +Icon=gtkterm.png +Categories=GNOME;Application;Utility; diff -Nru gtkterm-0.99.7~rc1/debian/gtkterm.xpm gtkterm-0.99.7+git9d63182/debian/gtkterm.xpm --- gtkterm-0.99.7~rc1/debian/gtkterm.xpm 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/gtkterm.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,746 +0,0 @@ -/* XPM */ -static char * gtkterm_xpm[] = { -"48 48 695 2", -". c None", -"+ c #080808", -"@ c #121212", -"# c #1A1A1A", -"$ c #232323", -"% c #545454", -"& c #767676", -"* c #878787", -"= c #838383", -"- c #808080", -"; c #797878", -"> c #737272", -", c #717070", -"' c #737171", -") c #757575", -"! c #767575", -"~ c #787778", -"{ c #8B8B8B", -"] c #949494", -"^ c #A0A0A0", -"/ c #A7A5A6", -"( c #AAA8A8", -"_ c #AAAAAA", -": c #ABABAB", -"< c #ABA7A8", -"[ c #AAA6A7", -"} c #AAA8A9", -"| c #A8A8A8", -"1 c #3E3E3E", -"2 c #838182", -"3 c #C2C0C1", -"4 c #C1BFBF", -"5 c #C1BFC0", -"6 c #C0BFC0", -"7 c #BEBDBD", -"8 c #BEBEBE", -"9 c #C1C1C1", -"0 c #C5C4C4", -"a c #C9C9C9", -"b c #CAC9C9", -"c c #CCCBCC", -"d c #CDCDCD", -"e c #D8D7D8", -"f c #E1E0E1", -"g c #E9E8E9", -"h c #EBEBEB", -"i c #EAEAEA", -"j c #E8E5E6", -"k c #DFDDDE", -"l c #D7D6D6", -"m c #D5D5D5", -"n c #D4D4D4", -"o c #DCDBDC", -"p c #E0DFE0", -"q c #E5E5E5", -"r c #F0F0F0", -"s c #FEFEFE", -"t c #FFFFFF", -"u c #848484", -"v c #8D8D8D", -"w c #6B6B6B", -"x c #ADADAD", -"y c #BDBDBD", -"z c #B9B7B7", -"A c #9E9F9F", -"B c #809892", -"C c #839C95", -"D c #87A099", -"E c #8EA69F", -"F c #93AA9F", -"G c #91AD9E", -"H c #90AD9E", -"I c #93B0A0", -"J c #93B1A1", -"K c #8DA59E", -"L c #8B9F99", -"M c #899B95", -"N c #889995", -"O c #7F918C", -"P c #7D8983", -"Q c #77807B", -"R c #6F7371", -"S c #6B696A", -"T c #6A6A6B", -"U c #6E7272", -"V c #77807A", -"W c #7C8D88", -"X c #859791", -"Y c #8EA29A", -"Z c #95ADA5", -"` c #9EBCB0", -" . c #DDDFDF", -".. c #C2C1C1", -"+. c #6C6D6D", -"@. c #A6A6A6", -"#. c #B1B1B1", -"$. c #B9B9B9", -"%. c #646364", -"&. c #D3D1D1", -"*. c #E1E1E1", -"=. c #94A8A0", -"-. c #248060", -";. c #258F64", -">. c #248464", -",. c #228464", -"'. c #228564", -"). c #1F8864", -"!. c #218D64", -"~. c #238C63", -"{. c #208C65", -"]. c #1F8765", -"^. c #1F8362", -"/. c #1F785B", -"(. c #1D7255", -"_. c #196D51", -":. c #146145", -"<. c #115840", -"[. c #104F3D", -"}. c #114B3B", -"|. c #114E3C", -"1. c #155A42", -"2. c #156848", -"3. c #1B6F50", -"4. c #1C7C5A", -"5. c #228463", -"6. c #2B936A", -"7. c #378164", -"8. c #D8DFDC", -"9. c #CCCACB", -"0. c #403F3F", -"a. c #4F4E4E", -"b. c #3F3F3F", -"c. c #686969", -"d. c #464646", -"e. c #828282", -"f. c #C8C7C7", -"g. c #C8C8C8", -"h. c #DEDDDE", -"i. c #EDEBEB", -"j. c #829A92", -"k. c #0E7957", -"l. c #0C8D64", -"m. c #118D62", -"n. c #0D8D62", -"o. c #108D65", -"p. c #0F8E66", -"q. c #118E67", -"r. c #138C64", -"s. c #108E68", -"t. c #0F8E64", -"u. c #118B64", -"v. c #108B63", -"w. c #0E8A62", -"x. c #0C8A60", -"y. c #0C8960", -"z. c #108C61", -"A. c #0E8D5E", -"B. c #0E8D5F", -"C. c #0C8A62", -"D. c #0F905D", -"E. c #0E8C63", -"F. c #108B69", -"G. c #138C68", -"H. c #2D8666", -"I. c #CDD7D2", -"J. c #F8F8F8", -"K. c #E4E4E4", -"L. c #D1D1D1", -"M. c #7E7F7F", -"N. c #535353", -"O. c #474747", -"P. c #A4A4A4", -"Q. c #DCDCDC", -"R. c #CDCCCC", -"S. c #DCD9D9", -"T. c #DFDEDE", -"U. c #DEDEDE", -"V. c #E2E2E2", -"W. c #90A49C", -"X. c #0D6F4C", -"Y. c #128F65", -"Z. c #158E65", -"`. c #149168", -" + c #148E68", -".+ c #148D67", -"++ c #129367", -"@+ c #169266", -"#+ c #159065", -"$+ c #139366", -"%+ c #129266", -"&+ c #149065", -"*+ c #148E66", -"=+ c #139167", -"-+ c #109167", -";+ c #129268", -">+ c #199267", -",+ c #169065", -"'+ c #118F64", -")+ c #138F64", -"!+ c #148F66", -"~+ c #109066", -"{+ c #0C8F66", -"]+ c #0E8D67", -"^+ c #388E6E", -"/+ c #D9E2E0", -"(+ c #EEEEEE", -"_+ c #FAFAFA", -":+ c #9C9C9C", -"<+ c #5B5B5B", -"[+ c #B9B7B8", -"}+ c #CFCCCD", -"|+ c #C1BEBF", -"1+ c #C6C6C6", -"2+ c #E0E0E0", -"3+ c #B0B9B6", -"4+ c #186E4F", -"5+ c #0C9064", -"6+ c #0B9066", -"7+ c #549173", -"8+ c #678979", -"9+ c #138D64", -"0+ c #129368", -"a+ c #0F9068", -"b+ c #548D75", -"c+ c #618872", -"d+ c #119366", -"e+ c #109168", -"f+ c #138F67", -"g+ c #638E74", -"h+ c #498B70", -"i+ c #148C62", -"j+ c #148D63", -"k+ c #0E9265", -"l+ c #6F8872", -"m+ c #42876E", -"n+ c #129064", -"o+ c #159166", -"p+ c #1B8D66", -"q+ c #738C77", -"r+ c #428B6D", -"s+ c #178C67", -"t+ c #54957A", -"u+ c #ECEFEF", -"v+ c #FBFBFB", -"w+ c #DADADA", -"x+ c #D8D8D8", -"y+ c #E4E3E4", -"z+ c #727272", -"A+ c #646464", -"B+ c #A4A3A4", -"C+ c #C4C4C4", -"D+ c #BCBCBC", -"E+ c #ACACAC", -"F+ c #D5D4D4", -"G+ c #C9D0CD", -"H+ c #2A7960", -"I+ c #148C63", -"J+ c #129168", -"K+ c #2A8967", -"L+ c #547262", -"M+ c #1C8961", -"N+ c #159068", -"O+ c #128F67", -"P+ c #318064", -"Q+ c #497461", -"R+ c #169368", -"S+ c #139168", -"T+ c #437B61", -"U+ c #338062", -"V+ c #119563", -"W+ c #179065", -"X+ c #139365", -"Y+ c #506A5F", -"Z+ c #268A65", -"`+ c #119168", -" @ c #129265", -".@ c #228364", -"+@ c #51725E", -"@@ c #218B65", -"#@ c #0F9168", -"$@ c #128D63", -"%@ c #7BAA98", -"&@ c #F9F9F9", -"*@ c #E8E6E7", -"=@ c #DBDADA", -"-@ c #D9D7D8", -";@ c #E4E3E3", -">@ c #CACACA", -",@ c #C2C2C2", -"'@ c #3B3B3B", -")@ c #686868", -"!@ c #A1A0A0", -"~@ c #D8D6D6", -"{@ c #E3E0E0", -"]@ c #D0CFD0", -"^@ c #B1B0B0", -"/@ c #9A9A9A", -"(@ c #E0E0DF", -"_@ c #5FA289", -":@ c #0F8863", -"<@ c #169068", -"[@ c #169168", -"}@ c #189266", -"|@ c #159165", -"1@ c #139367", -"2@ c #129467", -"3@ c #149367", -"4@ c #189166", -"5@ c #159368", -"6@ c #169265", -"7@ c #179566", -"8@ c #139364", -"9@ c #139465", -"0@ c #139567", -"a@ c #1A9266", -"b@ c #169567", -"c@ c #159365", -"d@ c #149465", -"e@ c #179567", -"f@ c #159265", -"g@ c #159164", -"h@ c #159066", -"i@ c #1A8B62", -"j@ c #AEC8C1", -"k@ c #F6F6F6", -"l@ c #E2E1E1", -"m@ c #E3E2E3", -"n@ c #DDDADB", -"o@ c #CCCCCC", -"p@ c #CAC8C9", -"q@ c #C3C3C3", -"r@ c #6E6E6E", -"s@ c #817E7E", -"t@ c #989898", -"u@ c #BCBABB", -"v@ c #CECECE", -"w@ c #D0D0D0", -"x@ c #9D9C9C", -"y@ c #E8E8E8", -"z@ c #F4F2F2", -"A@ c #8EC5AC", -"B@ c #108E60", -"C@ c #1B9265", -"D@ c #1A9567", -"E@ c #179367", -"F@ c #169867", -"G@ c #189866", -"H@ c #189766", -"I@ c #169366", -"J@ c #189667", -"K@ c #179666", -"L@ c #199965", -"M@ c #199A65", -"N@ c #179764", -"O@ c #199966", -"P@ c #199866", -"Q@ c #169767", -"R@ c #189465", -"S@ c #189767", -"T@ c #169667", -"U@ c #189466", -"V@ c #258863", -"W@ c #CAD9D4", -"X@ c #E6E6E6", -"Y@ c #D9D9D9", -"Z@ c #E3E3E3", -"`@ c #D3D3D3", -" # c #EAE9EA", -".# c #A7A7A7", -"+# c #817D7D", -"@# c #959494", -"## c #BAB7B8", -"$# c #BFBDBE", -"%# c #C1C0C1", -"&# c #B2B2B2", -"*# c #878686", -"=# c #EAE8E9", -"-# c #B7B7B7", -";# c #AED8C6", -"># c #0F8E61", -",# c #199366", -"'# c #169564", -")# c #179664", -"!# c #179A66", -"~# c #159565", -"{# c #179767", -"]# c #308667", -"^# c #A1A1A1", -"/# c #CBC8CA", -"(# c #D4D2D3", -"_# c #EFEEEE", -":# c #ECECEC", -"<# c #F3F3F3", -"[# c #CCCACA", -"}# c #B6B6B6", -"|# c #8C8788", -"1# c #999898", -"2# c #B3B2B2", -"3# c #C5C4C5", -"4# c #D6D5D5", -"5# c #CDCBCC", -"6# c #C7C7C7", -"7# c #7E7E7E", -"8# c #F2F2F2", -"9# c #B3C9C3", -"0# c #127F5B", -"a# c #189966", -"b# c #169964", -"c# c #169A64", -"d# c #189A65", -"e# c #179964", -"f# c #169566", -"g# c #3D7267", -"h# c #CBCBCB", -"i# c #C1C0C0", -"j# c #585858", -"k# c #A5A5A5", -"l# c #C3C2C2", -"m# c #DBD8D9", -"n# c #CFCECE", -"o# c #B3B1B1", -"p# c #9C9F9D", -"q# c #7E7B7C", -"r# c #D4D1D1", -"s# c #B8B5B6", -"t# c #B5B3B4", -"u# c #777676", -"v# c #D7D7D7", -"w# c #C4CDCA", -"x# c #167453", -"y# c #149667", -"z# c #189865", -"A# c #1E9765", -"B# c #639677", -"C# c #2B9468", -"D# c #249566", -"E# c #579576", -"F# c #249768", -"G# c #1A9A65", -"H# c #2A9567", -"I# c #579477", -"J# c #1E9766", -"K# c #319068", -"L# c #539178", -"M# c #199964", -"N# c #189965", -"O# c #169064", -"P# c #477463", -"Q# c #BDBEBD", -"R# c #B6B5B5", -"S# c #959495", -"T# c #515151", -"U# c #6C6C6C", -"V# c #CBC9CA", -"W# c #D9D8D8", -"X# c #656565", -"Y# c #DBDADB", -"Z# c #C3C2C3", -"`# c #9F9F9F", -" $ c #737373", -".$ c #878687", -"+$ c #B9B8B8", -"@$ c #EFEFEF", -"#$ c #D9E0DE", -"$$ c #237859", -"%$ c #179467", -"&$ c #249565", -"*$ c #768576", -"=$ c #398667", -"-$ c #1C9A66", -";$ c #1B9965", -">$ c #2F9469", -",$ c #6D8172", -"'$ c #2B8E66", -")$ c #1B9A65", -"!$ c #1D9965", -"~$ c #388967", -"{$ c #6B8276", -"]$ c #229465", -"^$ c #1A9965", -"/$ c #4A8067", -"($ c #708674", -"_$ c #1C8864", -":$ c #567268", -"<$ c #777877", -"[$ c #797979", -"}$ c #A6A5A5", -"|$ c #B8B8B8", -"1$ c #454545", -"2$ c #727575", -"3$ c #8C8D8D", -"4$ c #D7D6D7", -"5$ c #BDBBBB", -"6$ c #CAC9CA", -"7$ c #DAD9DA", -"8$ c #DDE1E0", -"9$ c #36735C", -"0$ c #1C9A65", -"a$ c #1C9865", -"b$ c #1B9966", -"c$ c #1C9866", -"d$ c #1D9A65", -"e$ c #1E7F5F", -"f$ c #67746D", -"g$ c #AEACAC", -"h$ c #B0AFAF", -"i$ c #B0B0B0", -"j$ c #5E5E5E", -"k$ c #818181", -"l$ c #7F7F7F", -"m$ c #939393", -"n$ c #CDCCCD", -"o$ c #647870", -"p$ c #0E7C54", -"q$ c #1C9A67", -"r$ c #1E9965", -"s$ c #219965", -"t$ c #209965", -"u$ c #1F9865", -"v$ c #199664", -"w$ c #256550", -"x$ c #656B67", -"y$ c #7B7B7B", -"z$ c #707070", -"A$ c #8C8C8C", -"B$ c #A9A5A7", -"C$ c #A9ABAB", -"D$ c #376557", -"E$ c #25835F", -"F$ c #238E63", -"G$ c #228F63", -"H$ c #248F63", -"I$ c #239164", -"J$ c #259265", -"K$ c #219164", -"L$ c #229063", -"M$ c #208F63", -"N$ c #268F65", -"O$ c #238F65", -"P$ c #228F64", -"Q$ c #248E61", -"R$ c #218A62", -"S$ c #228B61", -"T$ c #227254", -"U$ c #3D4947", -"V$ c #646060", -"W$ c #625F5F", -"X$ c #595959", -"Y$ c #525252", -"Z$ c #505050", -"`$ c #424041", -" % c #BFBCBD", -".% c #C4C3C3", -"+% c #A2A7A5", -"@% c #8C9492", -"#% c #8B9693", -"$% c #929B99", -"%% c #99A2A0", -"&% c #A0AFAA", -"*% c #A8B2AF", -"=% c #A6B2AE", -"-% c #99A9A5", -";% c #939D9B", -">% c #909B98", -",% c #889490", -"'% c #87918E", -")% c #868D8B", -"!% c #838B89", -"~% c #818886", -"{% c #7A8682", -"]% c #727E7A", -"^% c #697671", -"/% c #616B6A", -"(% c #55615D", -"_% c #5A5B5B", -":% c #575757", -"<% c #4C4C4C", -"[% c #3C3C3C", -"}% c #616161", -"|% c #555656", -"1% c #B8B7B7", -"2% c #C0BFBF", -"3% c #C7C6C6", -"4% c #C9C6C8", -"5% c #C0BEBF", -"6% c #C3C1C2", -"7% c #D2D0D1", -"8% c #E6E4E5", -"9% c #FDFDFD", -"0% c #DDDDDD", -"a% c #C0C0C0", -"b% c #B5B5B5", -"c% c #AEAEAE", -"d% c #A3A1A1", -"e% c #999999", -"f% c #636363", -"g% c #5B5858", -"h% c #5A5757", -"i% c #424242", -"j% c #777777", -"k% c #949292", -"l% c #BEBCBD", -"m% c #B7B6B7", -"n% c #DCDBDB", -"o% c #EDECEC", -"p% c #D1CFCF", -"q% c #CCCBCB", -"r% c #C9C8C8", -"s% c #C0BEBE", -"t% c #AFAFAF", -"u% c #AAA9A9", -"v% c #A3A2A2", -"w% c #8C8B8B", -"x% c #5F5F5F", -"y% c #959595", -"z% c #A2A2A2", -"A% c #A3A3A3", -"B% c #BFBFBF", -"C% c #B4B3B3", -"D% c #B3B3B3", -"E% c #A09F9F", -"F% c #9D9D9D", -"G% c #F3C5C5", -"H% c #E16666", -"I% c #D32222", -"J% c #D94242", -"K% c #F2C0C0", -"L% c #F6D3D3", -"M% c #DC5050", -"N% c #F8DDDD", -"O% c #F9DFDF", -"P% c #F9E3E3", -"Q% c #D52D2D", -"R% c #EC9E9E", -"S% c #FAE6E6", -"T% c #F5CACA", -"U% c #F7D7D7", -"V% c #DC4E4E", -"W% c #F8DBDB", -"X% c #EDA4A4", -"Y% c #F3C3C3", -"Z% c #F1B9B9", -"`% c #F5CDCD", -" & c #F9E1E1", -".& c #E68282", -"+& c #E68080", -"@& c #EA9393", -"#& c #F8DEDE", -"$& c #EA9696", -"%& c #E06161", -"&& c #DE5B5B", -"*& c #DB4A4A", -"=& c #DA4747", -"-& c #D63232", -";& c #E99292", -">& c #DA4343", -",& c #E57B7B", -"'& c #DD5353", -")& c #D83C3C", -"!& c #DF5D5D", -"~& c #D42727", -"{& c #EEABAB", -"]& c #ECA0A0", -"^& c #F3C1C1", -"/& c #D42626", -"(& c #D32424", -"_& c #E68181", -":& c #F0B4B4", -"<& c #DE5858", -"[& c #F4C7C7", -"}& c #E26D6D", -"|& c #F5CCCC", -"1& c #FAE5E5", -"2& c #E88C8C", -"3& c #EFAEAE", -"4& c #DB4C4C", -"5& c #F5CFCF", -"6& c #F8DADA", -"7& c #211F1F", -"8& c #DD5454", -"9& c #F2BEBE", -"0& c #EDA6A6", -"a& c #F7D9D9", -"b& c #E47979", -"c& c #DC4F4F", -"d& c #DF5F5F", -"e& c #F8DCDC", -"f& c #F2BFBF", -"g& c #D73535", -"h& c #DD5757", -"i& c #E47676", -"j& c #ECA1A1", -"k& c #FAE4E4", -"l& c #F4C9C9", -"m& c #F2BCBC", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . % & * = - ; > , ' ) ! ~ - { ] ^ / ( _ _ : : : : : < [ [ } _ _ | = 1 . . . . . . . ", -". . . . . . * 2 3 4 5 6 7 8 9 0 a b c d e f g h i i j k l m n o p q h r s t t s u v . . . . . . ", -". . . . . . w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ` .s t ..+.. . . . . . ", -". . . @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.{.6.7.8.t 9.0.a.b.c.. . . ", -". . d.e...f.g.h.i.j.k.l.m.n.n.o.p.q.r.s.s.t.u.v.v.w.x.y.z.A.B.C.D.n.E.F.G.H.I.t J.K.q L.M.N.. . ", -". O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +`..+++@+#+$+%+&+*+=+-+-+;+>+,+'+Y.)+!+~+{+]+^+/+t t s J.(+_+:+d.. ", -"<+{ g.[+}+|+1+2+U.3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+a+s+t+u+t v+V.w+U.x+y+z+A+", -"1 B+C+x+x+D+E+C+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+@+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@x+>@,@C+'@", -")@!@~@w+{@]@^@U./@(@_@:@<@[@}@|@1@2@3@@+4@5@6@7@8@9@}@0@a@b@c@d@e@f@g@h@i@j@k@1+l@m@n@o@g.p@q@r@", -"s@t@u@6 v@w@x@y@r z@A@B@C@D@e@E@F@G@H@I@J@K@L@M@N@O@P@P@Q@R@M@S@S@b@T@U@V@W@&@X@Y@Z@`@d n@ #d .#", -"+#@###$#%#&#*#=#-#_+;#>#,#M@'#N@M@M@M@M@M@M@M@M@)#M@M@M@P@P@!#M@M@~#{#P@]#8.X@^#Y@/#(#_#:#<#[#}#", -"|#1#2#3#4#5#6#.#7#8#9#0#a#O@N@M@b#M@M@M@M@c#d#M@M@M@e#M@M@M@M@c#M@M@M@f#g#h#i#j#k#$.l#m#n#o#6#p#", -"q#r#s#t#x+$.z+u#v#8#w#x#y#O@z#A#B#C#M@M@D#E#F#G#G#H#I#J#M@M@K#L#M#M@N#O#P#Q#R#S#T#U#$.V#-#l#W#X#", -"N.2+Y#Z#`# $.$+$K.@$#$$$%$M@M@&$*$=$-$;$>$,$'$)$!$~${$]$M@^$/$($M#M@L@_$:$3#g.+$:+<$[$}$8 a |$1$", -"2$3$4$f.y z 5$6$7$K.8$9$O#M@0$0$^$a$a$a$b$c$a$)$d$)$d$d$d$d$)$)$)$M@L@e$f$g$h$i$i$i$E+.#.#@.j$k$", -". l$m$1+>@>@n$o@d d n$o$p$q$G#)$0$)$)$r$s$r$r$t$0$r$r$t$)$0$!$G#u$M@v$w$x$u - - 7#y$& z+z$N.= . ", -". . A$z$B$2#i$g.o@o@a C$D$E$F$G$H$H$I$J$J$K$L$H$M$M$G$N$O$P$M$Q$R$S$T$U$A+V$W$j$X$Y$N.Z$N.{ . . ", -". . . . . A+`$ %o@o@o@h#.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%:%% Y$Y$Y$<%[%}%. . . . . ", -". . . . . . |%1%2%2%q@3%4%q@5%6%7%8%r 9%<#q 0%`@6#a%y y b%c%E+d%e%* y$r@f%g%h%h%Z$i%. . . . . . ", -". . . . . . j%k%l%$.}#m%$.-#-#8 c n%o%J.8#q w+p%q%>@r%s%-#&#&#&#t%u%v%1#v w%w%w%x%. . . . . . . ", -". . . . . . . y$y%^#^#z%A%A%P.| x b%$.B%q@9 B%[+C%D%t%: P.A%A%A%@.| A%E%F%F%F%A$. . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; diff -Nru gtkterm-0.99.7~rc1/debian/install gtkterm-0.99.7+git9d63182/debian/install --- gtkterm-0.99.7~rc1/debian/install 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/install 2017-11-21 21:39:46.000000000 +0000 @@ -0,0 +1,2 @@ +icon/gtkterm.png usr/share/pixmaps +debian/gtkterm.desktop usr/share/applications diff -Nru gtkterm-0.99.7~rc1/debian/rules gtkterm-0.99.7+git9d63182/debian/rules --- gtkterm-0.99.7~rc1/debian/rules 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/rules 2017-11-21 21:39:46.000000000 +0000 @@ -1,11 +1,8 @@ #!/usr/bin/make -f -# -*- mode: makefile; coding: utf-8 -*- +# -*- makefile -*- -include /usr/share/cdbs/1/class/autotools.mk -include /usr/share/cdbs/1/rules/debhelper.mk +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 -binary-install/gtkterm:: - mkdir -p debian/gtkterm/usr/share/applications - cp debian/gtkterm.desktop debian/gtkterm/usr/share/applications - mkdir -p debian/gtkterm/usr/share/pixmaps - cp debian/gtkterm.xpm debian/gtkterm/usr/share/pixmaps +%: + dh $@ diff -Nru gtkterm-0.99.7~rc1/debian/watch gtkterm-0.99.7+git9d63182/debian/watch --- gtkterm-0.99.7~rc1/debian/watch 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/debian/watch 2017-11-21 21:39:46.000000000 +0000 @@ -1,3 +1,3 @@ -version=3 -https://fedorahosted.org/released/gtkterm/gtkterm-(.+)\.tar\.gz - +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/gtkterm-$1\.tar\.gz/ \ + https://github.com/Jeija/gtkterm/tags .*/?(\d{1,2}\.\d{1,2}.\d{0,2})\.tar\.gz \ No newline at end of file diff -Nru gtkterm-0.99.7~rc1/depcomp gtkterm-0.99.7+git9d63182/depcomp --- gtkterm-0.99.7~rc1/depcomp 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/depcomp 2017-11-17 16:09:57.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -90,10 +90,18 @@ # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -158,10 +166,12 @@ ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -405,6 +415,52 @@ rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -503,7 +559,9 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation diff -Nru gtkterm-0.99.7~rc1/icon/COPYING gtkterm-0.99.7+git9d63182/icon/COPYING --- gtkterm-0.99.7~rc1/icon/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/icon/COPYING 2017-11-17 16:09:57.000000000 +0000 @@ -0,0 +1,122 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. + Binary files /tmp/tmpipOH0W/uleirqyjiL/gtkterm-0.99.7~rc1/icon/gtkterm.png and /tmp/tmpipOH0W/6_RhVHEPWM/gtkterm-0.99.7+git9d63182/icon/gtkterm.png differ Binary files /tmp/tmpipOH0W/uleirqyjiL/gtkterm-0.99.7~rc1/icon/gtkterm_small.png and /tmp/tmpipOH0W/6_RhVHEPWM/gtkterm-0.99.7+git9d63182/icon/gtkterm_small.png differ Binary files /tmp/tmpipOH0W/uleirqyjiL/gtkterm-0.99.7~rc1/icon/Serial-port-300px.png and /tmp/tmpipOH0W/6_RhVHEPWM/gtkterm-0.99.7+git9d63182/icon/Serial-port-300px.png differ diff -Nru gtkterm-0.99.7~rc1/install-sh gtkterm-0.99.7+git9d63182/install-sh --- gtkterm-0.99.7~rc1/install-sh 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/install-sh 2017-11-17 16:09:57.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru gtkterm-0.99.7~rc1/Makefile.am gtkterm-0.99.7+git9d63182/Makefile.am --- gtkterm-0.99.7~rc1/Makefile.am 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/Makefile.am 2017-11-17 16:09:56.000000000 +0000 @@ -1,3 +1,6 @@ +# GtkTerm Makefile.am + SUBDIRS = src po man_MANS = gtkterm.1 EXTRA_DIST = TODO $(man_MANS) + diff -Nru gtkterm-0.99.7~rc1/Makefile.in gtkterm-0.99.7+git9d63182/Makefile.in --- gtkterm-0.99.7~rc1/Makefile.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/Makefile.in 2017-11-17 16:09:56.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,7 +13,64 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +# GtkTerm Makefile.am VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -32,35 +88,45 @@ PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - TODO depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -82,25 +148,59 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ + COPYING ChangeLog INSTALL NEWS TODO compile depcomp install-sh \ + missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -128,7 +228,10 @@ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -138,15 +241,12 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ @@ -155,32 +255,30 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMOFILES = @GMOFILES@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GMSGFMT = @GMSGFMT@ GNUCFLAGS = @GNUCFLAGS@ GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -194,17 +292,11 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ -VTE_CFLAGS = @VTE_CFLAGS@ -VTE_LIBS = @VTE_LIBS@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -224,11 +316,15 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -240,6 +336,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -248,6 +345,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +vte_CFLAGS = @vte_CFLAGS@ +vte_LIBS = @vte_LIBS@ SUBDIRS = src po man_MANS = gtkterm.1 EXTRA_DIST = TODO $(man_MANS) @@ -255,22 +354,21 @@ $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile + $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -291,10 +389,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -308,11 +404,18 @@ -rm -f config.h stamp-h1 install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -341,27 +444,28 @@ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -376,57 +480,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -442,12 +501,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -459,15 +513,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -476,24 +526,33 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -527,13 +586,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -561,37 +617,43 @@ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -599,31 +661,33 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -646,13 +710,21 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -686,10 +758,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -772,24 +849,25 @@ uninstall-man: uninstall-man1 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-am uninstall uninstall-am uninstall-man uninstall-man1 -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-generic distclean-hdr distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-man uninstall-man1 +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru gtkterm-0.99.7~rc1/missing gtkterm-0.99.7+git9d63182/missing --- gtkterm-0.99.7~rc1/missing 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/missing 2017-11-17 16:09:57.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff -Nru gtkterm-0.99.7~rc1/NEWS gtkterm-0.99.7+git9d63182/NEWS --- gtkterm-0.99.7~rc1/NEWS 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/NEWS 2017-11-17 16:09:56.000000000 +0000 @@ -1,5 +1,3 @@ -0.99.7 : Numerous bug fixes and updates - 0.99.6 : Change of maintainership handfull of existing patches applied diff -Nru gtkterm-0.99.7~rc1/po/de.po gtkterm-0.99.7+git9d63182/po/de.po --- gtkterm-0.99.7~rc1/po/de.po 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/de.po 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,691 @@ +# Translation of gtkterm to German +# Copyright (C) 2002 Sebastien Bacher. +# This file is distributed under the same license as the gtkterm package. +# Chris Leick , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: gtkterm 0.99.5-1\n" +"Report-Msgid-Bugs-To: Julien Schmitt \n" +"POT-Creation-Date: 2005-11-14 20:44+0100\n" +"PO-Revision-Date: 2010-03-21 19:17+GMT\n" +"Last-Translator: Chris Leick \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + + +#: src/buffer.c:92 +msgid "ERROR : Buffer is not initialized !\n" +msgstr "FEHLER: Puffer ist nicht initialisiert!\n" + +#: src/cmdline.c:36 +#, c-format +msgid "" +"\n" +"GTKTerm version %s\n" +msgstr "" +"\n" +"GTKTerm-Version %s\n" + +#: src/cmdline.c:37 +msgid "\t (c) Julien Schmitt - julien@jls-info.com\n" +msgstr "\t (c) Julien Schmitt - julien@jls-info.com\n" + +#: src/cmdline.c:38 +msgid "\t http://www.jls-info.com/julien/linux\n" +msgstr "\t http://www.jls-info.com/julien/linux\n" + +#: src/cmdline.c:39 +msgid "" +"\n" +"This program is released under the terms of the GPL V.2\n" +msgstr "" +"\n" +"Dieses Programm wurde unter den Bedingungen der GPL v2 veröffentlicht\n" + +#: src/cmdline.c:40 +msgid "\t ** Use at your own risks ! **\n" +msgstr "\t ** Benutzung auf eigenes Risiko! **\n" + +#: src/cmdline.c:41 +msgid "" +"\n" +"Command line options\n" +msgstr "" +"\n" +"Befehlszeilenoptionen\n" + +#: src/cmdline.c:42 +msgid "--help or -h : this help screen\n" +msgstr "--help oder -h: Diesen Hilfebildschirm anzeigen\n" + +#: src/cmdline.c:43 +msgid "--config or -c : load configuration\n" +msgstr "--config oder -c: Konfiguration laden\n" + +#: src/cmdline.c:44 +msgid "--port or -p : serial port device (default /dev/ttyS0)\n" +msgstr "--port oder -p: Serielles Port-Gerät (Vorgabe /dev/ttyS0)\n" + +#: src/cmdline.c:45 +msgid "--speed or -s : serial port speed (default 9600)\n" +msgstr "" +"--speed oder -s: Geschwindigkeit des seriellen Ports\n" +"(Vorgabe 9600)\n" + +#: src/cmdline.c:46 +msgid "--bits or -b : number of bits (default 8)\n" +msgstr "--bits oder -b: Anzahl der Bits (Vorgabe 8)\n" + +#: src/cmdline.c:47 +msgid "--stopbits or -t : number of stopbits (default 1)\n" +msgstr "--stopbits oder -t: Anzahl der Stoppbits (Vorgabe 1)\n" + +#: src/cmdline.c:48 +# FIXME s/partity/parity +msgid "--parity or -a : partity (default none)\n" +msgstr "--parity oder -a: Parität (Vorgabe keine)\n" + +#: src/cmdline.c:49 +msgid "--flow or -w : flow control (default none)\n" +msgstr "--flow oder -w: Flusssteuerung (Vorgabe keine)\n" + +#: src/cmdline.c:50 +msgid "--delay or -d : end of line delay in ms (default none)\n" +msgstr "" +"--delay oder -d: Ende der Zeilenverzögerung in ms (Vorgabe keine)\n" + +#: src/cmdline.c:51 +msgid "" +"--char or -r : wait for a special char at end of line (default none)\n" +msgstr "" +"--char oder -r: Auf ein Sonderzeichen am Zeilenende warten\n" +"(Vorgabe keine)\n" + +#: src/cmdline.c:52 +msgid "--file or -f : default file to send (default none)\n" +msgstr "" +"--file oder -f: Zu sendende Vorgabedatei (Vorgabe keine)\n" + +#: src/cmdline.c:53 +msgid "--echo or -e : switch on local echo\n" +msgstr "--echo oder -e: Lokales Echo anschalten\n" + +#: src/cmdline.c:144 +msgid "Misunderstood command line option\n" +msgstr "Missverstandene Befehlszeilenoption\n" + +#: src/config.c:173 +msgid "" +"No valid serial device found in /dev, sorry !\n" +"You should have at least one of these :\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" +msgstr "" +"In /dev wurde kein gültiges serielles Gerät gefunden, Entschuldigung.\n" +"Sie sollten mindestens eines der folgenden haben:\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" + +#: src/config.c:178 +msgid "Configuration" +msgstr "Konfiguration" + +#: src/config.c:181 +msgid "Serial port" +msgstr "Serieller Port" + +#: src/config.c:187 +msgid "Port :" +msgstr "Port:" + +#: src/config.c:189 +msgid "Speed :" +msgstr "Geschwindigkeit:" + +#: src/config.c:191 +msgid "Parity :" +msgstr "Parität:" + +#: src/config.c:252 +msgid "Bits :" +msgstr "Bits:" + +#: src/config.c:254 +msgid "Stopbits :" +msgstr "Stoppbits:" + +#: src/config.c:256 +msgid "Flow control :" +msgstr "Flusssteuerung:" + +#: src/config.c:317 +msgid "ASCII file transfer" +msgstr "ASCII-Dateiübertragung" + +#: src/config.c:323 +msgid "End of line delay (milliseconds) :" +msgstr "Ende der Zeilenverzögerung (Millisekunden):" + +#: src/config.c:337 +msgid "Wait for this special character before passing to next line :" +msgstr "Auf dieses Sonderzeichen warten, bevor es zur nächsten Zeile geht:" + +#: src/config.c:395 src/config.c:715 +msgid "No open port" +msgstr "Kein offener Port" + +#: src/config.c:421 +msgid "Font selection" +msgstr "Schriftauswahl" + +#: src/config.c:464 +msgid "Load configuration" +msgstr "Konfiguration laden" + +#: src/config.c:470 +msgid "Delete configuration" +msgstr "Konfiguration löschen" + +#: src/config.c:501 +msgid "Cannot read configuration file !\n" +msgstr "Konfigurationsdatei kann nicht gelesen werden.\n" + +#: src/config.c:507 +msgid "Configurations" +msgstr "Konfigurationen" + +#: src/config.c:572 +msgid "Save configuration" +msgstr "Konfiguration speichern" + +#: src/config.c:581 +msgid "Configuration name : " +msgstr "Konfigurationsname: " + +#: src/config.c:626 +msgid "Cannot overwrite section !" +msgstr "Abschnitt kann nicht überschrieben werden." + +#: src/config.c:631 +msgid "Cannot read configuration file !" +msgstr "Konfigurationsdatei kann nicht gelesen werden." + +#: src/config.c:641 +#, c-format +msgid "Configuration [%s] saved\n" +msgstr "Konfiguration [%s] gespeichert\n" + +#: src/config.c:667 +msgid "Warning !" +msgstr "Warnung!" + +#: src/config.c:676 +#, c-format +msgid "" +"\n" +"Section [%s] already exists\n" +"Do you want to overwrite it ?\n" +msgstr "" +"\n" +"Abschnitt [%s] existiert bereits\n" +"Möchten Sie ihn überschreiben?\n" + +#: src/config.c:734 +msgid "Cannot delete section !" +msgstr "Abschnitt kann nicht gelöscht werden." + +#: src/config.c:905 +#, c-format +msgid "No section \"%s\" in configuration file\n" +msgstr "Kein Abschnitt »%s« in Konfigurationsdatei\n" + +#: src/config.c:942 +#, c-format +msgid "" +"Unknown speed : %d bauds\n" +"Falling back to default speed : %d bauds\n" +msgstr "" +"Unbekannte Geschwindigkeit: %d Baud\n" +"Es wird auf Vorgabegeschwindigkeit zurückgesetzt: %d Baud\n" + +#: src/config.c:950 +#, c-format +msgid "" +"Impossible stopbits number : %d\n" +"Falling back to default stop bits number : %d\n" +msgstr "" +"Unmögliche Stoppbit-Anzahl: %d\n" +"Es wird auf Vorgabe-Stoppbit-Anzahl zurückgesetzt: %d\n" + +#: src/config.c:958 +#, c-format +msgid "" +"Impossible bits number : %d\n" +"Falling back to default stop bits : %d\n" +msgstr "" +"Unmögliche Bit-Anzahl: %d\n" +"Es wird auf Vorgabe-Bits zurückgesetzt: %d\n" + +#: src/config.c:966 +#, c-format +msgid "" +"Impossible delay : %d ms\n" +"Falling back to default delay : %d ms\n" +msgstr "" +"Unmögliche Verzögerung: %d ms\n" +"Es wird auf Vorgabeverzögerung zurückgesetzt: %d ms\n" + +#: src/config.c:996 +#, c-format +msgid "" +"Configuration file (%s) with\n" +"[default] configuration has been created.\n" +msgstr "" +"Konfigurationsdatei (%s) mit\n" +"[Vorgabe]-Konfigurationsdatei wurde erstellt.\n" + +#: src/config.c:1228 +#, c-format +msgid "Cannot find section %s\n" +msgstr "Abschnitt %s kann nicht gefunden werden\n" + +#: src/config.c:1265 +msgid "Terminal configuration" +msgstr "Terminal-Konfiguration" + +#: src/fichier.c:74 +msgid "File selection" +msgstr "Dateiabschnitt" + +#: src/fichier.c:104 +msgid "Error opening file\n" +msgstr "Fehler beim Öffnen der Datei\n" + +#: src/fichier.c:112 +#, c-format +msgid "%s : transfer in progress..." +msgstr "%s: Übertragung im Gang ..." + +#: src/fichier.c:129 +msgid "%v / %u Kb (%p %%)" +msgstr "%v / %u Kb (%p %%)" + +#: src/fichier.c:135 +msgid "%v / %u bytes (%p %%)" +msgstr "%v / %u Bytes (%p %%)" + +#: src/fichier.c:140 +msgid "Cancel" +msgstr "Abbruch" + +#: src/fichier.c:156 +#, c-format +msgid "Cannot read file %s : %s\n" +msgstr "Datei kann nicht gelesen werden: %s\n" + +#: src/fichier.c:205 +#, c-format +msgid "Cannot write file %s\n" +msgstr "Datei kann nicht geschrieben werden: %s\n" + +#: src/fichier.c:293 +msgid "File error\n" +msgstr "Dateifehler\n" + +#: src/fichier.c:301 +#, c-format +msgid "Cannot open file %s : %s\n" +msgstr "Datei kann nicht geöffnet werden: %s\n" + +#: src/macros.c:143 +#, c-format +msgid "Macro \"%s\" sent !" +msgstr "Makro »%s« gesendet" + +#: src/macros.c:274 +msgid "Shortcut" +msgstr "Kürzel" + +#: src/macros.c:426 +msgid "Help on macros" +msgstr "Hilfe über Makros" + +#: src/macros.c:433 +msgid "" +"The \"action\" field of a macro is the data to be sent on the port. Text can " +"be entered, but also special chars, like \\n, \\t, \\r, etc. You can also " +"enter hexadecimal data preceded by a '\\'. The hexadecimal data should not " +"begin with a letter (eg. use \\0FF and not \\FF)\n" +"Examples :\n" +"\t\"Hello\\n\" sends \"Hello\" followed by a Line Feed\n" +"\t\"Hello\\0A\" does the same thing but the LF is entered in hexadecimal" +msgstr "" +"Das »action«-Feld eines Makros enthält die Daten, die an den Port gesandt " +"werden. Es kann Text eingegeben werden, aber auch Sonderzeichen wie \\n, " +"\\t, \\r, etc. Sie können außerdem hexadezimale Daten mit vorangestelltem " +"»\\« eingeben. Die hexadezimalen Daten sollten nicht mit einem Buchstaben " +"beginnen (benutzen Sie z.B. \\0FF und nicht \\FF)\n" +"Beispiele:\n" +"\t»Hallo\\n« sendet »Hallo« gefolgt von einem Zeilenumbruch\n" +"\t\"Hallo\\OA« tut das Gleiche, aber der Zeilenumbruch ist hexadezimal" + +#: src/macros.c:460 +msgid "Configure Macros" +msgstr "Makros konfigurieren" + +#: src/macros.c:496 +msgid "_Add" +msgstr "_Hinzufügen" + +#: src/macros.c:500 +msgid "_Delete" +msgstr "_Löschen" + +#: src/macros.c:504 +msgid "_Capture Shortcut" +msgstr "Kürzel _erfassen" + +#: src/parsecfg.c:335 +#, c-format +msgid "Cannot open configuration file `%s'.\n" +msgstr "Die Konfigurationsdatei »%s« kann nicht geöffnet werden.\n" + +#: src/parsecfg.c:338 +#, c-format +msgid "Cannot create configuration file `%s'.\n" +msgstr "Konfigurationsdatei »%s« kann nicht erstellt werden.\n" + +#: src/parsecfg.c:341 +#, c-format +msgid "" +"%s(%d): %s\n" +"Syntax error\n" +msgstr "" +"%s(%d): %s\n" +"Syntax-Fehler\n" + +#: src/parsecfg.c:344 +#, c-format +msgid "" +"%s(%d): %s\n" +"Unrecognized parameter\n" +msgstr "" +"%s(%d): %s\n" +"Parameter nicht erkannt\n" + +#: src/parsecfg.c:347 +#, c-format +msgid "" +"%s(%d): %s\n" +"Internal error\n" +msgstr "" +"%s(%d): %s\n" +"Interner Fehler\n" + +#: src/parsecfg.c:350 +#, c-format +msgid "" +"%s(%d): %s\n" +"Invalid number\n" +msgstr "" +"%s(%d): %s\n" +"Ungültige Nummer\n" + +#: src/parsecfg.c:353 +#, c-format +msgid "" +"%s(%d): %s\n" +"Out of range\n" +msgstr "" +"%s(%d): %s\n" +"Außerhalb des Bereichs\n" + +#: src/parsecfg.c:356 +#, c-format +msgid "" +"%s(%d): %s\n" +"Cannot allocate memory.\n" +msgstr "" +"%s(%d): %s\n" +"Speicher kann nicht reserviert werden.\n" + +#: src/parsecfg.c:359 +#, c-format +msgid "" +"%s(%d): %s\n" +"It must be specified TRUE or FALSE.\n" +msgstr "" +"%s(%d): %s\n" +"Es muss TRUE oder FALSE angegeben werden.\n" + +#: src/parsecfg.c:362 +#, c-format +msgid "" +"%s(%d): %s\n" +"The section name is already used.\n" +msgstr "" +"%s(%d): %s\n" +"Der Abschnittsname wird bereits benutzt.\n" + +#: src/parsecfg.c:365 +#, c-format +msgid "" +"%s(%d)\n" +"There is no closing brace.\n" +msgstr "" +"%s(%d)\n" +"Die schließende Klammer fehlt.\n" + +#: src/parsecfg.c:370 +#, c-format +msgid "" +"%s(%d): %s\n" +"Unexplained error\n" +msgstr "" +"%s(%d): %s\n" +"Ungeklärter Fehler\n" + +#: src/serie.c:212 +#, c-format +msgid "Cannot open %s : %s\n" +msgstr "%s kann nicht geöffnet werden: %s\n" + +#: src/serie.c:357 src/serie.c:392 +msgid "Control signals read" +msgstr "Steuersignale gelesen" + +#: src/serie.c:369 +msgid "DTR write" +msgstr "DTR schreiben" + +#: src/serie.c:379 +msgid "RTS write" +msgstr "RTS schreiben" + +#: src/serie.c:470 +msgid "Lockfile is stale. Overriding it..\n" +msgstr "Sperrdatei ist abgelaufen: Wird überschrieben ...\n" + +#: src/serie.c:480 +#, c-format +msgid "Device %s is locked.\n" +msgstr "Gerät %s ist gesperrt.\n" + +#: src/serie.c:492 +msgid "Cannot create lockfile. Sorry.\n" +msgstr "Sperrdatei kann nicht erstellt werden. Entschuldigung.\n" + +#: src/widgets.c:122 +msgid "/_File" +msgstr "/_Datei" + +#: src/widgets.c:123 +msgid "/File/Clear screen" +msgstr "/Datei/Bildschirm leeren" + +#: src/widgets.c:124 +msgid "/File/Send _raw file" +msgstr "/Datei/_rohe Datei senden" + +#: src/widgets.c:125 +msgid "/File/_Save raw file" +msgstr "/Datei/rohe Datei _speichern" + +#: src/widgets.c:126 +msgid "/File/Separator" +msgstr "/Datei/Trenner" + +#: src/widgets.c:127 +msgid "/File/E_xit" +msgstr "/Datei/_Beenden" + +#: src/widgets.c:128 +msgid "/_Configuration" +msgstr "/_Konfiguration" + +#: src/widgets.c:129 +msgid "/Configuration/_Port" +msgstr "/Konfiguration/_Port" + +#: src/widgets.c:130 +msgid "/Configuration/_Main window" +msgstr "/Konfiguration/_Hauptfenster" + +#: src/widgets.c:131 +msgid "/Configuration/Local _echo" +msgstr "/Konfiguration/Lokales _Echo" + +#: src/widgets.c:132 +msgid "/Configuration/_CR LF auto" +msgstr "/Konfiguration/_CR LF automatisch" + +#: src/widgets.c:133 +msgid "/Configuration/_Macros" +msgstr "/Konfiguration/_Makros" + +#: src/widgets.c:134 +msgid "/Configuration/Separator" +msgstr "/Konfiguration/Trenner" + +#: src/widgets.c:135 +msgid "/Configuration/_Load configuration" +msgstr "/Konfiguration/Konfiguration laden" + +#: src/widgets.c:136 +msgid "/Configuration/_Save configuration" +msgstr "/Konfiguration/Konfigu_ration sichern" + +#: src/widgets.c:137 +msgid "/Configuration/_Delete configuration" +msgstr "/Konfiguration/Konfiguration l_öschen" + +#: src/widgets.c:138 +msgid "/Control _signals" +msgstr "/Steuers_ignale" + +#: src/widgets.c:139 +msgid "/Control signals/Send break" +msgstr "/Steuersignale/Unterbrechung senden" + +#: src/widgets.c:140 +msgid "/Control signals/Toggle DTR" +msgstr "/Steuersignale/DTR umschalten" + +#: src/widgets.c:141 +msgid "/Control signals/Toggle RTS" +msgstr "/Steuersignale/RTS umschalten" + +#: src/widgets.c:142 +msgid "/_View" +msgstr "/_Ansicht" + +#: src/widgets.c:143 +msgid "/View/_ASCII" +msgstr "/Ansicht/AS_CII" + +#: src/widgets.c:144 +msgid "/View/_Hexadecimal" +msgstr "/Ansicht/He_xadezimal" + +#: src/widgets.c:145 +msgid "/View/Hexadecimal _chars" +msgstr "/Ansicht/Hexadezimale _Zeichen" + +#: src/widgets.c:146 +msgid "/View/Hexadecimal chars/_8" +msgstr "/Ansicht/Hexadezimale _Zeichen/_8" + +#: src/widgets.c:147 +msgid "/View/Hexadecimal chars/1_0" +msgstr "/Ansicht/Hexadezimale _Zeichen/1_0" + +#: src/widgets.c:148 +msgid "/View/Hexadecimal chars/_16" +msgstr "/Ansicht/Hexadezimale _Zeichen/_16" + +#: src/widgets.c:149 +msgid "/View/Hexadecimal chars/_24" +msgstr "/Ansicht/Hexadezimale _Zeichen/_24" + +#: src/widgets.c:150 +msgid "/View/Hexadecimal chars/_32" +msgstr "/Ansicht/Hexadezimale _Zeichen/_32" + +#: src/widgets.c:151 +msgid "/View/Show _index" +msgstr "/Ansicht/Zei_ge Index" + +#: src/widgets.c:152 +msgid "/View/Separator" +msgstr "/Ansicht/Trenner" + +#: src/widgets.c:153 +msgid "/View/_Send hexadecimal data" +msgstr "/Ansicht/Hexadezimale Daten sen_den" + +#: src/widgets.c:154 +msgid "/_Help" +msgstr "/Hil_fe" + +#: src/widgets.c:155 +msgid "/Help/_About..." +msgstr "/Hilfe/_Über ..." + +#: src/widgets.c:307 +msgid "Hexadecimal data to send (separator : ';' or space) : " +msgstr "Zu sendende hexadezimale Daten (Trenner: »;« oder Leerzeichen): " + +#: src/widgets.c:502 +msgid "About..." +msgstr "Über ..." + +#: src/widgets.c:510 +#, c-format +msgid "" +"\n" +" GTKTerm V. %s \n" +"\n" +"\t(c) Julien Schmitt : julien@jls-info.com \n" +"\thttp://www.jls-info.com/julien/linux\n" +msgstr "" +"\n" +" GTKTerm V. %s \n" +"\n" +"\t(c) Julien Schmitt : julien@jls-info.com\n" +"\thttp://www.jls-info.com/julien/linux\n" + +#: src/widgets.c:554 +msgid "Break signal sent !" +msgstr "Unterbrechungssignal gesandt!" + +#: src/widgets.c:636 +#, c-format +msgid "\"%s\" : %d byte(s) sent !" +msgstr "»%s«: %d Byte(s) gesandt!" diff -Nru gtkterm-0.99.7~rc1/po/fr.po gtkterm-0.99.7+git9d63182/po/fr.po --- gtkterm-0.99.7~rc1/po/fr.po 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/fr.po 2017-11-17 16:09:58.000000000 +0000 @@ -2,26 +2,27 @@ # Traduction anglaise du package gtkterm. # Copyright (C) 2003 Julien Schmitt # This file is distributed under the same license as the gtkterm package. -# Julien Schmitt , 2003. +# Julien Schmitt , 2003, 2011. # msgid "" msgstr "" "Project-Id-Version: gtkterm 0.99.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-11-14 20:44+0100\n" -"PO-Revision-Date: 2003-03-08 00:47+0100\n" +"POT-Creation-Date: 2011-07-21 22:56+0200\n" +"PO-Revision-Date: 2011-07-25 16:06+0200\n" "Last-Translator: Julien Schmitt \n" "Language-Team: French \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/buffer.c:92 +#: ../src/buffer.c:111 msgid "ERROR : Buffer is not initialized !\n" msgstr "ERREUR : buffer non initialisé !\n" -#: src/cmdline.c:36 +#: ../src/cmdline.c:37 #, c-format msgid "" "\n" @@ -30,15 +31,11 @@ "\n" "GTKTerm version %s\n" -#: src/cmdline.c:37 -msgid "\t (c) Julien Schmitt - julien@jls-info.com\n" -msgstr "\t (c) Julien Schmitt - julien@jls-info.com\n" - -#: src/cmdline.c:38 -msgid "\t http://www.jls-info.com/julien/linux\n" -msgstr "\t http://www.jls-info.com/julien/linux/index_fr.html\n" +#: ../src/cmdline.c:38 +msgid "\t (c) Julien Schmitt\n" +msgstr "\t (c) Julien Schmitt\n" -#: src/cmdline.c:39 +#: ../src/cmdline.c:39 msgid "" "\n" "This program is released under the terms of the GPL V.2\n" @@ -46,11 +43,11 @@ "\n" "Ce programme est distribué selon les termes de la license GPL V.2\n" -#: src/cmdline.c:40 +#: ../src/cmdline.c:40 msgid "\t ** Use at your own risks ! **\n" msgstr "\t ** Livré sans aucune garantie ! **\n" -#: src/cmdline.c:41 +#: ../src/cmdline.c:41 msgid "" "\n" "Command line options\n" @@ -58,304 +55,135 @@ "\n" "Options de la ligne de commande\n" -#: src/cmdline.c:42 +#: ../src/cmdline.c:42 msgid "--help or -h : this help screen\n" msgstr "--help or -h : cet écran d'aide\n" -#: src/cmdline.c:43 +#: ../src/cmdline.c:43 msgid "--config or -c : load configuration\n" msgstr "--config ou -c : charger une configuration\n" -#: src/cmdline.c:44 +#: ../src/cmdline.c:44 msgid "--port or -p : serial port device (default /dev/ttyS0)\n" msgstr "--port ou -p : device du port série (/dev/ttyS0 par défaut)\n" -#: src/cmdline.c:45 +#: ../src/cmdline.c:45 msgid "--speed or -s : serial port speed (default 9600)\n" msgstr "--speed ou -s : vitesse du port série (9600 par défaut)\n" -#: src/cmdline.c:46 +#: ../src/cmdline.c:46 msgid "--bits or -b : number of bits (default 8)\n" msgstr "--bits ou -b : nombre de bits (8 par défaut)\n" -#: src/cmdline.c:47 +#: ../src/cmdline.c:47 msgid "--stopbits or -t : number of stopbits (default 1)\n" msgstr "--stopbits ou -t : nombre de bits de stop (1 par défaut)\n" -#: src/cmdline.c:48 +#: ../src/cmdline.c:48 msgid "--parity or -a : partity (default none)\n" msgstr "--parity ou -a : partité (aucune par défaut)\n" -#: src/cmdline.c:49 -msgid "--flow or -w : flow control (default none)\n" -msgstr "--flow ou -w : contrôle de flux (aucun par défaut)\n" +#: ../src/cmdline.c:49 +msgid "--flow or -w : flow control (default none)\n" +msgstr "" +"--flow ou -w : contrôle de flux (aucun par défaut)\n" -#: src/cmdline.c:50 +#: ../src/cmdline.c:50 msgid "--delay or -d : end of line delay in ms (default none)\n" msgstr "--delay ou -d : délai de fin de ligne en ms (aucun par défaut)\n" -#: src/cmdline.c:51 +#: ../src/cmdline.c:51 msgid "" "--char or -r : wait for a special char at end of line (default none)\n" msgstr "" "--char ou -r : caractère spécial à attendre en fin de ligne (aucun " "par défaut)\n" -#: src/cmdline.c:52 +#: ../src/cmdline.c:52 msgid "--file or -f : default file to send (default none)\n" msgstr "" "--file ou -f : fichier par défaut à envoyer (aucun par défaut)\n" -#: src/cmdline.c:53 -msgid "--echo or -e : switch on local echo\n" -msgstr "--echo ou -e : écho local\n" - -#: src/cmdline.c:144 -msgid "Misunderstood command line option\n" -msgstr "Ligne de commande inconnue\n" - -#: src/config.c:173 +#: ../src/cmdline.c:53 msgid "" -"No valid serial device found in /dev, sorry !\n" -"You should have at least one of these :\n" -"/dev/ttyS*\n" -"/dev/tts/*\n" -"/dev/ttyUSB*\n" -"/dev/usb/tts/*\n" +"--rts_time_before or -x : for rs485, time in ms before transmit with " +"rts on\n" msgstr "" -"Aucun device de port série valide trouvé dans /dev, désolé !\n" -"Vous devez au moins avoir un des device suivant :\n" -"/dev/ttyS*\n" -"/dev/tts/*\n" -"/dev/ttyUSB*\n" -"/dev/usb/tts/*\n" - -#: src/config.c:178 -msgid "Configuration" -msgstr "Configuration" - -#: src/config.c:181 -msgid "Serial port" -msgstr "Port série" - -#: src/config.c:187 -msgid "Port :" -msgstr "Port :" - -#: src/config.c:189 -msgid "Speed :" -msgstr "Vitesse :" - -#: src/config.c:191 -msgid "Parity :" -msgstr "Parité :" - -#: src/config.c:252 -msgid "Bits :" -msgstr "Bits :" - -#: src/config.c:254 -msgid "Stopbits :" -msgstr "Bits de stop:" - -#: src/config.c:256 -msgid "Flow control :" -msgstr "Contrôle de flux :" - -#: src/config.c:317 -msgid "ASCII file transfer" -msgstr "Transfert de fichier ASCII" +"--rts_time_before ou -x : pour rs485, temps en ms avant transmission " +"avec rts activé\n" -#: src/config.c:323 -msgid "End of line delay (milliseconds) :" -msgstr "Délai de fin de ligne en millisecondes :" - -#: src/config.c:337 -msgid "Wait for this special character before passing to next line :" -msgstr "Attendre le caractère suivant avant de passer à la ligne suivante :" - -#: src/config.c:395 src/config.c:715 -msgid "No open port" -msgstr "Aucun port ouvert" - -#: src/config.c:421 -msgid "Font selection" -msgstr "Sélection de la police" - -#: src/config.c:464 -msgid "Load configuration" -msgstr "Charger une configuration" - -#: src/config.c:470 -msgid "Delete configuration" -msgstr "Supprimer une configuration" - -#: src/config.c:501 -msgid "Cannot read configuration file !\n" -msgstr "Impossible de lire le fichier de configuration !\n" - -#: src/config.c:507 -msgid "Configurations" -msgstr "Configurations" - -#: src/config.c:572 -msgid "Save configuration" -msgstr "Sauvegarde de la configuration" - -#: src/config.c:581 -msgid "Configuration name : " -msgstr "Nom de la configuration : " - -#: src/config.c:626 -msgid "Cannot overwrite section !" -msgstr "Impossible d'écraser la section !" - -#: src/config.c:631 -msgid "Cannot read configuration file !" -msgstr "Impossible de lire le fichier de configuration !" - -#: src/config.c:641 -#, c-format -msgid "Configuration [%s] saved\n" -msgstr "Configuration [%s] sauvée\n" - -#: src/config.c:667 -msgid "Warning !" -msgstr "Attention !" - -#: src/config.c:676 -#, c-format +#: ../src/cmdline.c:54 msgid "" -"\n" -"Section [%s] already exists\n" -"Do you want to overwrite it ?\n" +"--rts_time_after or -y : for rs485, time in ms after transmit with rts " +"on\n" msgstr "" -"\n" -"La section [%s] existe déjà.\n" -"Voulez vous l'écraser ?\n" +"--rts_time_after ou -x : pour rs485, temps en ms après transmission " +"avec rts activé\n" -#: src/config.c:734 -msgid "Cannot delete section !" -msgstr "Impossible de supprimer la section !" - -#: src/config.c:905 -#, c-format -msgid "No section \"%s\" in configuration file\n" -msgstr "Pas de section \"%s\" dans le fichier de configuration\n" - -#: src/config.c:942 -#, c-format -msgid "" -"Unknown speed : %d bauds\n" -"Falling back to default speed : %d bauds\n" -msgstr "" -"Vitesse inconnue : %d bauds\n" -"Sélection de la vitesse par défaut : %d bauds\n" +#: ../src/cmdline.c:55 +msgid "--echo or -e : switch on local echo\n" +msgstr "--echo ou -e : écho local\n" -#: src/config.c:950 -#, c-format -msgid "" -"Impossible stopbits number : %d\n" -"Falling back to default stop bits number : %d\n" -msgstr "" -"Nombre de bits de stop impossible : %d\n" -"Sélection du nombre de bits de stop par défaut : %d\n" +#: ../src/cmdline.c:158 +msgid "Misunderstood command line option\n" +msgstr "Ligne de commande inconnue\n" -#: src/config.c:958 -#, c-format -msgid "" -"Impossible bits number : %d\n" -"Falling back to default stop bits : %d\n" -msgstr "" -"Nombre de bits impossible : %d\n" -"Sélection du nombre de bits par défaut : %d\n" +#: ../src/fichier.c:77 +msgid "File selection" +msgstr "Sélection de fichier" -#: src/config.c:966 -#, c-format -msgid "" -"Impossible delay : %d ms\n" -"Falling back to default delay : %d ms\n" -msgstr "" -"Délai impossible : %d ms\n" -"Sélection du délai par défaut : %d ms\n" +#: ../src/fichier.c:79 ../src/fichier.c:140 ../src/logging.c:88 +msgid "Cancel" +msgstr "Annuler" -#: src/config.c:996 -#, c-format -msgid "" -"Configuration file (%s) with\n" -"[default] configuration has been created.\n" -msgstr "" -"Le fichier de configuration %s a été créÂé\n" -"avec une configuration [default].\n" +#: ../src/fichier.c:80 ../src/logging.c:89 +msgid "OK" +msgstr "Ok" -#: src/config.c:1228 +#: ../src/fichier.c:112 #, c-format -msgid "Cannot find section %s\n" -msgstr "Impossible de trouver la section %s\n" - -#: src/config.c:1265 -#, fuzzy -msgid "Terminal configuration" -msgstr "Supprimer une configuration" - -#: src/fichier.c:74 -msgid "File selection" -msgstr "Sélection de fichier" - -#: src/fichier.c:104 msgid "Error opening file\n" msgstr "Erreur d'ouverture du fichier\n" -#: src/fichier.c:112 +#: ../src/fichier.c:122 #, c-format msgid "%s : transfer in progress..." msgstr "%s : transfert en cours..." -#: src/fichier.c:129 -msgid "%v / %u Kb (%p %%)" -msgstr "%v / %u Ko (%p %%)" - -#: src/fichier.c:135 -msgid "%v / %u bytes (%p %%)" -msgstr "%v / %u octets (%p %%)" - -#: src/fichier.c:140 -msgid "Cancel" -msgstr "Annuler" - -#: src/fichier.c:156 +#: ../src/fichier.c:155 #, c-format -msgid "Cannot read file %s : %s\n" +msgid "Cannot read file %s: %s\n" msgstr "Impossible de lire le fichier %s : %s\n" -#: src/fichier.c:205 +#: ../src/fichier.c:207 #, c-format msgid "Cannot write file %s\n" msgstr "Impossible d'écrire le fichier %s\n" -#: src/fichier.c:293 +#: ../src/fichier.c:291 +#, c-format msgid "File error\n" msgstr "Erreur de fichier\n" -#: src/fichier.c:301 +#: ../src/fichier.c:300 ../src/logging.c:68 ../src/logging.c:123 #, c-format -msgid "Cannot open file %s : %s\n" +msgid "Cannot open file %s: %s\n" msgstr "Impossible d'ouvrir le fichier %s : %s\n" -#: src/macros.c:143 +#: ../src/macros.c:144 #, c-format msgid "Macro \"%s\" sent !" msgstr "Macro \"%s\" envoyée !" -#: src/macros.c:274 +#: ../src/macros.c:275 msgid "Shortcut" msgstr "Raccourci" -#: src/macros.c:426 +#: ../src/macros.c:427 msgid "Help on macros" msgstr "Aide sur les macros" -#: src/macros.c:433 +#: ../src/macros.c:434 msgid "" "The \"action\" field of a macro is the data to be sent on the port. Text can " "be entered, but also special chars, like \\n, \\t, \\r, etc. You can also " @@ -374,33 +202,33 @@ "\t\"Bonjour\\n\" envoie \"Bonjour\" suivi d'un retour à la ligne (LF)\n" "\t\"Bonjour\\0A\" fait la même chose..." -#: src/macros.c:460 +#: ../src/macros.c:461 msgid "Configure Macros" msgstr "Configuration des Macros" -#: src/macros.c:496 +#: ../src/macros.c:497 msgid "_Add" msgstr "_Ajouter" -#: src/macros.c:500 +#: ../src/macros.c:501 msgid "_Delete" msgstr "_Supprimer" -#: src/macros.c:504 +#: ../src/macros.c:505 msgid "_Capture Shortcut" msgstr "_Capture le raccourci" -#: src/parsecfg.c:335 +#: ../src/parsecfg.c:337 #, c-format msgid "Cannot open configuration file `%s'.\n" msgstr "Ne peut ouvrir le fichier de configuration `%s'.\n" -#: src/parsecfg.c:338 +#: ../src/parsecfg.c:340 #, c-format msgid "Cannot create configuration file `%s'.\n" msgstr "Ne peut créer le fichier de configuration `%s'.\n" -#: src/parsecfg.c:341 +#: ../src/parsecfg.c:343 #, c-format msgid "" "%s(%d): %s\n" @@ -409,7 +237,7 @@ "%s(%d): %s\n" "Erreur de syntaxe\n" -#: src/parsecfg.c:344 +#: ../src/parsecfg.c:346 #, c-format msgid "" "%s(%d): %s\n" @@ -418,7 +246,7 @@ "%s(%d): %s\n" "Paramètre inconnu\n" -#: src/parsecfg.c:347 +#: ../src/parsecfg.c:349 #, c-format msgid "" "%s(%d): %s\n" @@ -427,7 +255,7 @@ "%s(%d): %s\n" "Erreur interne\n" -#: src/parsecfg.c:350 +#: ../src/parsecfg.c:352 #, c-format msgid "" "%s(%d): %s\n" @@ -436,7 +264,7 @@ "%s(%d): %s\n" "Nombre invalide\n" -#: src/parsecfg.c:353 +#: ../src/parsecfg.c:355 #, c-format msgid "" "%s(%d): %s\n" @@ -445,7 +273,7 @@ "%s(%d): %s\n" "En dehors des limites\n" -#: src/parsecfg.c:356 +#: ../src/parsecfg.c:358 #, c-format msgid "" "%s(%d): %s\n" @@ -454,7 +282,7 @@ "%s(%d): %s\n" "Ne peut allouer la mémoire\n" -#: src/parsecfg.c:359 +#: ../src/parsecfg.c:361 #, c-format msgid "" "%s(%d): %s\n" @@ -463,7 +291,7 @@ "%s(%d): %s\n" "Il faut spécifier TRUE ou FALSE.\n" -#: src/parsecfg.c:362 +#: ../src/parsecfg.c:364 #, c-format msgid "" "%s(%d): %s\n" @@ -472,7 +300,7 @@ "%s(%d): %s\n" "Le nom de section est déjà utilisé\n" -#: src/parsecfg.c:365 +#: ../src/parsecfg.c:367 #, c-format msgid "" "%s(%d)\n" @@ -481,7 +309,7 @@ "%s(%d)\n" "Il n'y a pas de crochet pour fermer l'expression.\n" -#: src/parsecfg.c:370 +#: ../src/parsecfg.c:372 #, c-format msgid "" "%s(%d): %s\n" @@ -490,206 +318,493 @@ "%s(%d): %s\n" "Erreur inconnue\n" -#: src/serie.c:212 +#: ../src/serie.c:163 #, c-format -msgid "Cannot open %s : %s\n" -msgstr "Ne peut ouvrir %s : %s\n" +msgid "Cannot open %s: %s\n" +msgstr "Impossible d'ouvrir %s : %s\n" -#: src/serie.c:357 src/serie.c:392 +#: ../src/serie.c:332 ../src/serie.c:378 msgid "Control signals read" msgstr "Lecture des signaux de contrôle" -#: src/serie.c:369 +#: ../src/serie.c:344 msgid "DTR write" msgstr "Ecriture de DTR" -#: src/serie.c:379 +#: ../src/serie.c:354 msgid "RTS write" msgstr "Ecriture de RTS" -#: src/serie.c:470 +#: ../src/serie.c:460 msgid "Lockfile is stale. Overriding it..\n" msgstr "Le fichier de lock est orphelin. Ecrasement...\n" -#: src/serie.c:480 +#: ../src/serie.c:470 #, c-format msgid "Device %s is locked.\n" msgstr "Le device %s est vérouillé.\n" -#: src/serie.c:492 +#: ../src/serie.c:482 msgid "Cannot create lockfile. Sorry.\n" msgstr "Ne peut créer le fichier de lock, désolé\n" -#: src/widgets.c:122 +#: ../src/serie.c:543 ../src/term_config.c:462 ../src/term_config.c:789 +#, c-format +msgid "No open port" +msgstr "Aucun port ouvert" + +#: ../src/widgets.c:134 msgid "/_File" msgstr "_Fichier" -#: src/widgets.c:123 +#: ../src/widgets.c:135 msgid "/File/Clear screen" msgstr "/Fichier/Effacer l'écran" -#: src/widgets.c:124 +#: ../src/widgets.c:136 msgid "/File/Send _raw file" msgstr "/Fichier/Envoi de _fichier brut" -#: src/widgets.c:125 +#: ../src/widgets.c:137 msgid "/File/_Save raw file" msgstr "/Fichier/_Sauvegarde en fichier brut" -#: src/widgets.c:126 +#: ../src/widgets.c:138 msgid "/File/Separator" msgstr "/Fichier/Separateur" -#: src/widgets.c:127 +#: ../src/widgets.c:139 msgid "/File/E_xit" msgstr "/Fichier/_Quitter" -#: src/widgets.c:128 +#: ../src/widgets.c:140 +msgid "/Edit/_Paste" +msgstr "/Édition/C_oller" + +#: ../src/widgets.c:141 +msgid "/Edit/_Copy" +msgstr "/Édition/_Copier" + +#: ../src/widgets.c:142 +msgid "/Edit/Copy _All" +msgstr "/Édition/Copier _tout" + +#: ../src/widgets.c:143 +msgid "/_Log" +msgstr "/_Log" + +#: ../src/widgets.c:144 +msgid "/Log/To File..." +msgstr "/Log/Dans le fichier..." + +#: ../src/widgets.c:145 +msgid "/Log/Pause" +msgstr "/Log/Pause" + +#: ../src/widgets.c:146 +msgid "/Log/Stop" +msgstr "/Log/Stop" + +#: ../src/widgets.c:147 +msgid "/Log/Clear" +msgstr "/Log/Effacer" + +#: ../src/widgets.c:148 msgid "/_Configuration" msgstr "/_Configuration" -#: src/widgets.c:129 +#: ../src/widgets.c:149 msgid "/Configuration/_Port" msgstr "/Configuration/_Port" -#: src/widgets.c:130 -#, fuzzy +#: ../src/widgets.c:150 msgid "/Configuration/_Main window" -msgstr "/Configuration/_Macros" +msgstr "/Configuration/_Fenêtre prncipale" -#: src/widgets.c:131 +#: ../src/widgets.c:151 msgid "/Configuration/Local _echo" msgstr "/Configuration/_Echo local" -#: src/widgets.c:132 -#, fuzzy +#: ../src/widgets.c:152 msgid "/Configuration/_CR LF auto" -msgstr "/Configuration/_Police" +msgstr "/Configuration/_CR LF auto" -#: src/widgets.c:133 +#: ../src/widgets.c:153 msgid "/Configuration/_Macros" msgstr "/Configuration/_Macros" -#: src/widgets.c:134 +#: ../src/widgets.c:154 msgid "/Configuration/Separator" msgstr "/Configuration/Separateur" -#: src/widgets.c:135 +#: ../src/widgets.c:155 msgid "/Configuration/_Load configuration" msgstr "/Configuration/_Charger une configuration" -#: src/widgets.c:136 +#: ../src/widgets.c:156 msgid "/Configuration/_Save configuration" -msgstr "/Configuration/_Sauve la configuration" +msgstr "/Configuration/_Enregistrer la configuration" -#: src/widgets.c:137 +#: ../src/widgets.c:157 msgid "/Configuration/_Delete configuration" -msgstr "/Configuration/_Supprime la configuration" +msgstr "/Configuration/_Supprimer la configuration" -#: src/widgets.c:138 +#: ../src/widgets.c:158 msgid "/Control _signals" msgstr "/_Signaux de contrôle" -#: src/widgets.c:139 +#: ../src/widgets.c:159 msgid "/Control signals/Send break" msgstr "/Signaux de contrôle/Envoyer un break" -#: src/widgets.c:140 +#: ../src/widgets.c:160 msgid "/Control signals/Toggle DTR" msgstr "/Signaux de contrôle/Complémente DTR" -#: src/widgets.c:141 +#: ../src/widgets.c:161 msgid "/Control signals/Toggle RTS" msgstr "/Signaux de contrôle/Complémente RTS" -#: src/widgets.c:142 +#: ../src/widgets.c:162 msgid "/_View" msgstr "/_Vue" -#: src/widgets.c:143 +#: ../src/widgets.c:163 msgid "/View/_ASCII" msgstr "/Vue/_ASCII" -#: src/widgets.c:144 +#: ../src/widgets.c:164 msgid "/View/_Hexadecimal" msgstr "/Vue/_Hexadécimal" -#: src/widgets.c:145 +#: ../src/widgets.c:165 msgid "/View/Hexadecimal _chars" msgstr "/Vue/_Largeur affichage hexadécimal" -#: src/widgets.c:146 +#: ../src/widgets.c:166 msgid "/View/Hexadecimal chars/_8" msgstr "/Vue/Largeur affichage hexadécimal/_8" -#: src/widgets.c:147 +#: ../src/widgets.c:167 msgid "/View/Hexadecimal chars/1_0" msgstr "/Vue/Largeur affichage hexadécimal/1_0" -#: src/widgets.c:148 +#: ../src/widgets.c:168 msgid "/View/Hexadecimal chars/_16" msgstr "/Vue/Largeur affichage hexadécimal/_16" -#: src/widgets.c:149 +#: ../src/widgets.c:169 msgid "/View/Hexadecimal chars/_24" msgstr "/Vue/Largeur affichage hexadécimal/_24" -#: src/widgets.c:150 +#: ../src/widgets.c:170 msgid "/View/Hexadecimal chars/_32" msgstr "/Vue/Largeur affichage hexadécimal/_32" -#: src/widgets.c:151 +#: ../src/widgets.c:171 msgid "/View/Show _index" -msgstr "/Vue/Affichage de l'index" +msgstr "/Vue/Afficher l'index" -#: src/widgets.c:152 +#: ../src/widgets.c:172 msgid "/View/Separator" msgstr "/Vue/Separateur" -#: src/widgets.c:153 +#: ../src/widgets.c:173 msgid "/View/_Send hexadecimal data" msgstr "/Vue/_Envoi d'hexadécimal" -#: src/widgets.c:154 +#: ../src/widgets.c:174 msgid "/_Help" msgstr "_Aide" -#: src/widgets.c:155 +#: ../src/widgets.c:175 msgid "/Help/_About..." -msgstr "/Aide/A propos..." +msgstr "/Aide/À _propos..." + +#: ../src/widgets.c:277 +msgid "Pause" +msgstr "Pause" -#: src/widgets.c:307 +#: ../src/widgets.c:281 +msgid "Resume" +msgstr "Reprendre" + +#: ../src/widgets.c:367 msgid "Hexadecimal data to send (separator : ';' or space) : " msgstr "Donnée hexadécimale à envoyer (séparateur : ';' ou espace) : " -#: src/widgets.c:502 +#: ../src/widgets.c:541 msgid "About..." msgstr "à propos..." -#: src/widgets.c:510 +#: ../src/widgets.c:549 #, c-format msgid "" "\n" " GTKTerm V. %s \n" "\n" -"\t(c) Julien Schmitt : julien@jls-info.com \n" +"\t(c) Julien Schmitt\n" "\thttp://www.jls-info.com/julien/linux\n" +"\n" +"\tLatest Version Available on:\n" +"\thttps://fedorahosted.org/gtkterm/" msgstr "" "\n" " GTKTerm V. %s \n" "\n" -"\t(c) Julien Schmitt : julien@jls-info.com \n" +"\t(c) Julien Schmitt\n" "\thttp://www.jls-info.com/julien/linux/index_fr.html\n" +"\n" +"\tDernière version disponible sur :\n" +"\thttps://fedorahosted.org/gtkterm/" -#: src/widgets.c:554 -msgid "Break signal sent !" +#: ../src/widgets.c:593 +msgid "Break signal sent!" msgstr "Signal break envoyé !" -#: src/widgets.c:636 +#: ../src/widgets.c:665 +#, c-format +msgid "0 byte(s) sent!" +msgstr "0 octet(s) envoyé(s) !" + +#: ../src/widgets.c:696 #, c-format -msgid "\"%s\" : %d byte(s) sent !" +msgid "\"%s\" : %d byte(s) sent!" msgstr "\"%s\" : %d octet(s) envoyé(s) !" +#: ../src/logging.c:49 +#, c-format +msgid "Filename error\n" +msgstr "Erreur du nom du fichier\n" + +#: ../src/logging.c:86 +msgid "Log file selection" +msgstr "Sélection du fichier de log" + +#: ../src/logging.c:178 +msgid "Failed to log data\n" +msgstr "Échec du log des données\n" + +#: ../src/term_config.c:181 +msgid "" +"No serial devices found!\n" +"\n" +"Search all of these devices:\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" +"\n" +"Enter a different device in the 'Port' box.\n" +msgstr "" +"Aucun périphérique série trouvé !\n" +"\n" +"Recherche parmi les périphériques suivants :\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" +"\n" +"Saisissez un autre périphérique dans la boîte 'Port'.\n" + +#: ../src/term_config.c:188 +msgid "Configuration" +msgstr "Configuration" + +#: ../src/term_config.c:191 +msgid "Serial port" +msgstr "Port série" + +#: ../src/term_config.c:197 +msgid "Port:" +msgstr "Port :" + +#: ../src/term_config.c:199 +msgid "Baud Rate:" +msgstr "" + +#: ../src/term_config.c:201 +msgid "Parity:" +msgstr "Parité :" + +#: ../src/term_config.c:272 +msgid "Bits:" +msgstr "Bits :" + +#: ../src/term_config.c:274 +msgid "Stopbits:" +msgstr "Bits de stop :" + +#: ../src/term_config.c:276 +msgid "Flow control:" +msgstr "Contrôle de flux :" + +#. create an expander widget to hide the 'Advanced features' +#: ../src/term_config.c:327 +msgid "Advanced Configuration Options" +msgstr "Options de configurations avancées" + +#: ../src/term_config.c:332 +msgid "ASCII file transfer" +msgstr "Transfert de fichier ASCII" + +#: ../src/term_config.c:338 +msgid "End of line delay (milliseconds):" +msgstr "Délai de fin de ligne (millisecondes) :" + +#: ../src/term_config.c:354 +msgid "Wait for this special character before passing to next line:" +msgstr "Attendre le caractère suivant avant de passer à la ligne suivante :" + +#: ../src/term_config.c:367 +msgid "RS485 half-duplex parameters (RTS signal used to send)" +msgstr "" + +#: ../src/term_config.c:374 +msgid "Time with RTS 'on' before transmit (milliseconds):" +msgstr "" + +#: ../src/term_config.c:376 +msgid "Time with RTS 'on' after transmit (milliseconds):" +msgstr "" + +#: ../src/term_config.c:492 +msgid "Font selection" +msgstr "Sélection de la police" + +#: ../src/term_config.c:535 +msgid "Load configuration" +msgstr "Charger une configuration" + +#: ../src/term_config.c:541 +msgid "Delete configuration" +msgstr "Supprimer une configuration" + +#: ../src/term_config.c:572 +msgid "Cannot read configuration file!\n" +msgstr "Impossible de lire le fichier de configuration !\n" + +#: ../src/term_config.c:578 +msgid "Configurations" +msgstr "Configurations" + +#: ../src/term_config.c:643 +msgid "Save configuration" +msgstr "Sauvegarde de la configuration" + +#: ../src/term_config.c:653 +msgid "Configuration name: " +msgstr "Nom de la configuration : " + +#: ../src/term_config.c:700 +msgid "Cannot overwrite section!" +msgstr "Impossible d'écraser la section !" + +#: ../src/term_config.c:705 +msgid "Cannot read configuration file!" +msgstr "Impossible de lire le fichier de configuration !" + +#: ../src/term_config.c:715 +#, c-format +msgid "Configuration [%s] saved\n" +msgstr "Configuration [%s] sauvée\n" + +#. section already exists +#: ../src/term_config.c:741 +msgid "Warning!" +msgstr "Attention !" + +#: ../src/term_config.c:750 +#, c-format +msgid "" +"\n" +"Section [%s] already exists\n" +"Do you want to overwrite it ?\n" +msgstr "" +"\n" +"La section [%s] existe déjà.\n" +"Voulez vous l'écraser ?\n" + +#: ../src/term_config.c:812 +msgid "Cannot delete section!" +msgstr "Impossible de supprimer la section !" + +#: ../src/term_config.c:992 +#, c-format +msgid "No section \"%s\" in configuration file\n" +msgstr "Pas de section \"%s\" dans le fichier de configuration\n" + +#: ../src/term_config.c:1030 +#, c-format +msgid "" +"Unknown rate: %d baud\n" +"May not be supported by all hardware" +msgstr "" + +#: ../src/term_config.c:1037 +#, c-format +msgid "" +"Invalid number of stop-bits: %d\n" +"Falling back to default number of stop-bits number: %d\n" +msgstr "" +"Nombre de bits de stop impossible : %d\n" +"Retour au nombre de bits de stop par défaut : %d\n" + +#: ../src/term_config.c:1045 +#, c-format +msgid "" +"Invalid number of bits: %d\n" +"Falling back to default number of bits: %d\n" +msgstr "" +"Nombre de bits impossible : %d\n" +"Retour au nombre de bits par défaut : %d\n" + +#: ../src/term_config.c:1053 +#, c-format +msgid "" +"Invalid delay: %d ms\n" +"Falling back to default delay: %d ms\n" +msgstr "" +"Délai impossible : %d ms\n" +"Retour au délai par défaut : %d ms\n" + +#: ../src/term_config.c:1083 +#, c-format +msgid "" +"Configuration file (%s) with\n" +"[default] configuration has been created.\n" +msgstr "" +"Le fichier de configuration %s a été créÂé\n" +"avec une configuration [default].\n" + +#: ../src/term_config.c:1337 +#, c-format +msgid "Cannot find section %s\n" +msgstr "Impossible de trouver la section %s\n" + +#: ../src/term_config.c:1374 +msgid "Terminal configuration" +msgstr "Configuration du Terminal" + +#~ msgid "\t http://www.jls-info.com/julien/linux\n" +#~ msgstr "\t http://www.jls-info.com/julien/linux/index_fr.html\n" + +#~ msgid "Speed :" +#~ msgstr "Vitesse :" + +#~ msgid "" +#~ "Unknown speed : %d bauds\n" +#~ "Falling back to default speed : %d bauds\n" +#~ msgstr "" +#~ "Vitesse inconnue : %d bauds\n" +#~ "Sélection de la vitesse par défaut : %d bauds\n" + +#~ msgid "%v / %u Kb (%p %%)" +#~ msgstr "%v / %u Ko (%p %%)" + +#~ msgid "%v / %u bytes (%p %%)" +#~ msgstr "%v / %u octets (%p %%)" + #~ msgid "/Configuration/Local echo" #~ msgstr "/Configuration/_Echo local" diff -Nru gtkterm-0.99.7~rc1/po/LANGUAGES gtkterm-0.99.7+git9d63182/po/LANGUAGES --- gtkterm-0.99.7~rc1/po/LANGUAGES 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/LANGUAGES 2017-11-17 16:09:57.000000000 +0000 @@ -0,0 +1,2 @@ +fr hu ru de + diff -Nru gtkterm-0.99.7~rc1/po/LINGUAS gtkterm-0.99.7+git9d63182/po/LINGUAS --- gtkterm-0.99.7~rc1/po/LINGUAS 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/LINGUAS 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -fr hu diff -Nru gtkterm-0.99.7~rc1/po/Makefile.in.in gtkterm-0.99.7+git9d63182/po/Makefile.in.in --- gtkterm-0.99.7~rc1/po/Makefile.in.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/Makefile.in.in 2017-11-17 16:09:57.000000000 +0000 @@ -52,23 +52,23 @@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot -ALL_LINGUAS = @ALL_LINGUAS@ +ALL_LANGUAGES = @ALL_LANGUAGES@ -PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) +PO_LANGUAGES=$(shell if test -r $(srcdir)/LANGUAGES; then grep -v "^\#" $(srcdir)/LANGUAGES; else echo "$(ALL_LANGUAGES)"; fi) -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) +USER_LANGUAGES=$(shell if test -n "$(LANGUAGES)"; then LLANGUAGES="$(LANGUAGES)"; ALANGUAGES="$(ALL_LANGUAGES)"; for lang in $$LLANGUAGES; do if test -n "`grep \^$$lang$$ $(srcdir)/LANGUAGES 2>/dev/null`" -o -n "`echo $$ALANGUAGES|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) -USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) +USE_LANGUAGES=$(shell if test -n "$(USER_LANGUAGES)" -o -n "$(LANGUAGES)"; then LLANGUAGES="$(USER_LANGUAGES)"; else if test -n "$(PO_LANGUAGES)"; then LLANGUAGES="$(PO_LANGUAGES)"; else LLANGUAGES="$(ALL_LANGUAGES)"; fi; fi; for lang in $$LLANGUAGES; do printf "$$lang "; done) -POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) +POFILES=$(shell LANGUAGES="$(PO_LANGUAGES)"; for lang in $$LANGUAGES; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) -EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS +EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LANGUAGES POTFILES = \ # This comment gets stripped out -CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) +CATALOGS=$(shell LANGUAGES="$(USE_LANGUAGES)"; for lang in $$LANGUAGES; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat @@ -101,8 +101,8 @@ install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ + LANGUAGES="$(USE_LANGUAGES)"; \ + for lang in $$LANGUAGES; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ @@ -135,8 +135,8 @@ install-exec installcheck: uninstall: - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ + LANGUAGES="$(USE_LANGUAGES)"; \ + for lang in $$LANGUAGES; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done @@ -179,8 +179,8 @@ update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ + LANGUAGES="$(USE_LANGUAGES)"; \ + for lang in $$LANGUAGES; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ diff -Nru gtkterm-0.99.7~rc1/po/POTFILES.in gtkterm-0.99.7+git9d63182/po/POTFILES.in --- gtkterm-0.99.7~rc1/po/POTFILES.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/POTFILES.in 2017-11-17 16:09:57.000000000 +0000 @@ -4,10 +4,11 @@ # Package source files src/buffer.c src/cmdline.c -src/fichier.c +src/config_terminal_dialog.ui +src/files.c +src/interface.c +src/logging.c src/macros.c src/parsecfg.c -src/serie.c -src/widgets.c -src/logging.c -src/term_config.c \ No newline at end of file +src/serial.c +src/term_config.c diff -Nru gtkterm-0.99.7~rc1/po/ru.po gtkterm-0.99.7+git9d63182/po/ru.po --- gtkterm-0.99.7~rc1/po/ru.po 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/po/ru.po 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,725 @@ +# Russian translation for gtkterm package. +# +# Copyright (C) 2009 Julien Schmitt +# This file is distributed under the same license as the gtkterm package. +# +# Sergey Alyoshin , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: gtkterm 0.99.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-21 16:12+0400\n" +"PO-Revision-Date: 2009-08-21 11:34+0400\n" +"Last-Translator: Sergey Alyoshin \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; \tplural=n%10==1 && n%100!=11 ? 0 : \tn%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: src/buffer.c:92 +msgid "ERROR : Buffer is not initialized !\n" +msgstr "ОШИБКА: буфер не инициализирован!\n" + +#: src/cmdline.c:36 +#, c-format +msgid "" +"\n" +"GTKTerm version %s\n" +msgstr "" +"\n" +"GTKTerm версии %s\n" + +#: src/cmdline.c:37 +msgid "\t (c) Julien Schmitt - julien@jls-info.com\n" +msgstr "\t (c) Julien Schmitt - julien@jls-info.com\n" + +#: src/cmdline.c:38 +msgid "\t http://www.jls-info.com/julien/linux\n" +msgstr "\t http://www.jls-info.com/julien/linux\n" + +#: src/cmdline.c:39 +msgid "" +"\n" +"This program is released under the terms of the GPL V.2\n" +msgstr "" +"\n" +"Эта программа выпущена под лицензией GPL v.2\n" + +#: src/cmdline.c:40 +msgid "\t ** Use at your own risks ! **\n" +msgstr "\t ** Используйте на свой риск! **\n" + +#: src/cmdline.c:41 +msgid "" +"\n" +"Command line options\n" +msgstr "" +"\n" +"Параметры командной строки:\n" + +#: src/cmdline.c:42 +msgid "--help or -h : this help screen\n" +msgstr "--help или -h: это сообщение помощи\n" + +#: src/cmdline.c:43 +msgid "--config or -c : load configuration\n" +msgstr "--config <настройка> или -c: загрузка настройки\n" + +#: src/cmdline.c:44 +msgid "--port or -p : serial port device (default /dev/ttyS0)\n" +msgstr "" +"--port <устройство> или -p: устройство последовательного порта\n" +" (по умолчанию /dev/ttyS0)\n" + +#: src/cmdline.c:45 +msgid "--speed or -s : serial port speed (default 9600)\n" +msgstr "" +"--speed <скорость> или -s: скорость последовательного порта\n" +" (по умолчанию 9600)\n" + +#: src/cmdline.c:46 +msgid "--bits or -b : number of bits (default 8)\n" +msgstr "--bits <биты> или -b: количество бит (по умолчанию 8)\n" + +#: src/cmdline.c:47 +msgid "--stopbits or -t : number of stopbits (default 1)\n" +msgstr "--stopbits <стоп-бит> или -t: количество стоп-битов (по умолчанию 1)\n" + +#: src/cmdline.c:48 +msgid "--parity or -a : partity (default none)\n" +msgstr "--partity или -a: проверка чётности (по умолчанию none)\n" + +#: src/cmdline.c:49 +msgid "--flow or -w : flow control (default none)\n" +msgstr "--flow или -w: управление потоком (по умолчанию none)\n" + +#: src/cmdline.c:50 +msgid "--delay or -d : end of line delay in ms (default none)\n" +msgstr "--delay <мс> или -d: задержка конца строки, мс (по умолчанию нет)\n" + +#: src/cmdline.c:51 +msgid "" +"--char or -r : wait for a special char at end of line (default none)\n" +msgstr "" +"--char <символ> или -r: ожидать специальный символ в конце строки\n" +" (по умолчанию нет)\n" + +#: src/cmdline.c:52 +msgid "--file or -f : default file to send (default none)\n" +msgstr "" +"--file <имя_файла> или -f: задать имя файла для отправки (по умолчанию нет)\n" + +#: src/cmdline.c:53 +msgid "--echo or -e : switch on local echo\n" +msgstr "--echo или -e: включить локальный вывод\n" + +#: src/cmdline.c:144 +msgid "Misunderstood command line option\n" +msgstr "Неверный параметр командной строки\n" + +#: src/config.c:173 +msgid "" +"No valid serial device found in /dev, sorry !\n" +"You should have at least one of these :\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" +msgstr "" +"Устройство последовательного порта не найдено в /dev!\n" +"Должно быть хотя бы одно из следующих:\n" +"/dev/ttyS*\n" +"/dev/tts/*\n" +"/dev/ttyUSB*\n" +"/dev/usb/tts/*\n" + +#: src/config.c:178 +msgid "Configuration" +msgstr "Настройка" + +#: src/config.c:181 +msgid "Serial port" +msgstr "Последовательный порт" + +#: src/config.c:187 +msgid "Port :" +msgstr "Порт:" + +#: src/config.c:189 +msgid "Speed :" +msgstr "Скорость:" + +#: src/config.c:191 +msgid "Parity :" +msgstr "Проверка чётности:" + +#: src/config.c:252 +msgid "Bits :" +msgstr "Биты:" + +#: src/config.c:254 +msgid "Stopbits :" +msgstr "Стоп-бит:" + +#: src/config.c:256 +msgid "Flow control :" +msgstr "Управление потоком:" + +#: src/config.c:317 +msgid "ASCII file transfer" +msgstr "Передача ASCII-файла" + +#: src/config.c:323 +msgid "End of line delay (milliseconds) :" +msgstr "Задержка конца строки, мс:" + +#: src/config.c:337 +msgid "Wait for this special character before passing to next line :" +msgstr "Ожидать специальный символ до передачи следующей строки:" + +#: src/config.c:395 src/config.c:715 +msgid "No open port" +msgstr "Порт не открыт" + +#: src/config.c:421 +msgid "Font selection" +msgstr "Выбор шрифта" + +#: src/config.c:464 +msgid "Load configuration" +msgstr "Загрузить настройку" + +#: src/config.c:470 +msgid "Delete configuration" +msgstr "Удалить настройку" + +#: src/config.c:501 +msgid "Cannot read configuration file !\n" +msgstr "Невозможно прочитать файл настройки!\n" + +#: src/config.c:507 +msgid "Configurations" +msgstr "Настройки" + +#: src/config.c:572 +msgid "Save configuration" +msgstr "Сохранить настройку" + +#: src/config.c:581 +msgid "Configuration name : " +msgstr "Название настройки: " + +#: src/config.c:626 +msgid "Cannot overwrite section !" +msgstr "Невозможно перезаписать раздел!" + +#: src/config.c:631 +msgid "Cannot read configuration file !" +msgstr "Невозможно прочитать файл настройки!" + +#: src/config.c:641 +#, c-format +msgid "Configuration [%s] saved\n" +msgstr "Настройка [%s] сохранена\n" + +#: src/config.c:667 src/fichier.c:334 +msgid "Warning !" +msgstr "Предупреждение!" + +#: src/config.c:676 +#, c-format +msgid "" +"\n" +"Section [%s] already exists\n" +"Do you want to overwrite it ?\n" +msgstr "" +"\n" +"Раздел [%s] уже существует.\n" +"Хотите перезаписать его?\n" + +#: src/config.c:734 +msgid "Cannot delete section !" +msgstr "Невозможно удалить раздел!" + +#: src/config.c:905 +#, c-format +msgid "No section \"%s\" in configuration file\n" +msgstr "Раздела \"%s\" нет в файле настроек\n" + +#: src/config.c:942 +#, c-format +msgid "" +"Unknown speed : %d bauds\n" +"Falling back to default speed : %d bauds\n" +msgstr "" +"Неизвестная скорость: %d бод\n" +"Используется скорость по умолчанию: %d бод\n" + +#: src/config.c:950 +#, c-format +msgid "" +"Impossible stopbits number : %d\n" +"Falling back to default stop bits number : %d\n" +msgstr "" +"Невозможное количество стоп-бит: %d\n" +"Используется количество стоп-бит по умолчанию: %d\n" + +#: src/config.c:958 +#, c-format +msgid "" +"Impossible bits number : %d\n" +"Falling back to default stop bits : %d\n" +msgstr "" +"Невозможное количество бит: %d\n" +"Используется количество бит по умолчанию: %d\n" + +#: src/config.c:966 +#, c-format +msgid "" +"Impossible delay : %d ms\n" +"Falling back to default delay : %d ms\n" +msgstr "" +"Невозможная задержка: %d мс\n" +"Используется задержка по умолчанию: %d мс\n" + +#: src/config.c:996 +#, c-format +msgid "" +"Configuration file (%s) with\n" +"[default] configuration has been created.\n" +msgstr "" +"Создан файл настроек (%s)\n" +"с настройкой по умолчанию [default].\n" + +#: src/config.c:1228 +#, c-format +msgid "Cannot find section %s\n" +msgstr "Невозможно найти раздел %s\n" + +#: src/config.c:1265 +msgid "Terminal configuration" +msgstr "Настройка терминала" + +#: src/config.c:1279 +msgid "Font selection : " +msgstr "Шрифт: " + +#: src/config.c:1287 +msgid "Show cursor" +msgstr "Отображать курсор" + +#: src/config.c:1300 +msgid "Text color :" +msgstr "Цвет текста: " + +#: src/config.c:1304 +msgid "Background color :" +msgstr "Цвет фона: " + +#: src/config.c:1328 +msgid "Transparency : " +msgstr "Прозрачность: " + +#: src/config.c:1331 +msgid "Transparency enable" +msgstr "Включить прозрачность" + +#: src/config.c:1372 +msgid "Changing text color" +msgstr "Выбор цвета текста" + +#: src/config.c:1413 +msgid "Changing background color" +msgstr "Выбор цвета фона" + +#: src/fichier.c:75 +msgid "File selection" +msgstr "Выбор файла" + +#: src/fichier.c:105 +msgid "Error opening file\n" +msgstr "Ошибка открытия файла\n" + +#: src/fichier.c:113 +#, c-format +msgid "%s : transfer in progress..." +msgstr "%s: выполняется передача..." + +#: src/fichier.c:130 +msgid "%v / %u Kb (%p %%)" +msgstr "%v / %u Кб (%p %%)" + +#: src/fichier.c:136 +msgid "%v / %u bytes (%p %%)" +msgstr "%v / %u байт (%p %%)" + +#: src/fichier.c:141 +msgid "Cancel" +msgstr "Отмена" + +#: src/fichier.c:157 +#, c-format +msgid "Cannot read file %s : %s\n" +msgstr "Невозможно прочитать файл %s: %s\n" + +#: src/fichier.c:206 +#, c-format +msgid "Cannot write file %s\n" +msgstr "Невозможно записать файл %s\n" + +#: src/fichier.c:298 +#, c-format +msgid "Cannot open file %s : %s\n" +msgstr "Невозможно открыть файл %s: %s\n" + +#: src/fichier.c:321 +msgid "File error\n" +msgstr "Ошибка файла\n" + +#: src/fichier.c:340 +#, c-format +msgid "" +"\n" +"File \"%s\" already exists.\n" +"Do you want to overwrite it ?\n" +msgstr "" +"\n" +"Файл \"%s\" уже существует.\n" +"Хотите перезаписать его?\n" + +#: src/macros.c:143 +#, c-format +msgid "Macro \"%s\" sent !" +msgstr "Макрос \"%s\" отправлен!" + +#: src/macros.c:274 +msgid "Shortcut" +msgstr "Комбинация клавиш" + +#: src/macros.c:426 +msgid "Help on macros" +msgstr "Помощь по макросам" + +#: src/macros.c:433 +msgid "" +"The \"action\" field of a macro is the data to be sent on the port. Text can " +"be entered, but also special chars, like \\n, \\t, \\r, etc. You can also " +"enter hexadecimal data preceded by a '\\'. The hexadecimal data should not " +"begin with a letter (eg. use \\0FF and not \\FF)\n" +"Examples :\n" +"\t\"Hello\\n\" sends \"Hello\" followed by a Line Feed\n" +"\t\"Hello\\0A\" does the same thing but the LF is entered in hexadecimal" +msgstr "" +"Поле \"действие\" макроса -- это данные отправляемые в порт. Может содержать " +"текст и специальные символы, такие как \\n, \\t, \\r и пр. Также можно " +"вводить шестнадцатеричные данные после '\\'. Шестнадцатеричные данные не " +"должны начинаться с буквы (используйте \\0FF вместо \\FF)\n" +"Примеры:\n" +"\t\"Hello\\n\" отправляет \"Hello\" и последующий символ новой строки\n" +"\t\"Hello\\0A\" делает тоже самое, но символ новой строки указан " +"шестнадцатеричным кодом" + +#: src/macros.c:460 +msgid "Configure Macros" +msgstr "Настройка макросов" + +#: src/macros.c:496 +msgid "_Add" +msgstr "Доб_авить" + +#: src/macros.c:500 +msgid "_Delete" +msgstr "У_далить" + +#: src/macros.c:504 +msgid "_Capture Shortcut" +msgstr "_Захватить комбинацию клавиш" + +#: src/parsecfg.c:335 +#, c-format +msgid "Cannot open configuration file `%s'.\n" +msgstr "Невозможно открыть файл настроек \"%s\".\n" + +#: src/parsecfg.c:338 +#, c-format +msgid "Cannot create configuration file `%s'.\n" +msgstr "Невозможно создать файл настроек \"%s\".\n" + +#: src/parsecfg.c:341 +#, c-format +msgid "" +"%s(%d): %s\n" +"Syntax error\n" +msgstr "" +"%s(%d): %s\n" +"Синтаксическая ошибка\n" + +#: src/parsecfg.c:344 +#, c-format +msgid "" +"%s(%d): %s\n" +"Unrecognized parameter\n" +msgstr "" +"%s(%d): %s\n" +"Нераспознанный параметр\n" + +#: src/parsecfg.c:347 +#, c-format +msgid "" +"%s(%d): %s\n" +"Internal error\n" +msgstr "" +"%s(%d): %s\n" +"Внутренняя ошибка\n" + +#: src/parsecfg.c:350 +#, c-format +msgid "" +"%s(%d): %s\n" +"Invalid number\n" +msgstr "" +"%s(%d): %s\n" +"Неверный номер\n" + +#: src/parsecfg.c:353 +#, c-format +msgid "" +"%s(%d): %s\n" +"Out of range\n" +msgstr "" +"%s(%d): %s\n" +"Вне диапазона\n" + +#: src/parsecfg.c:356 +#, c-format +msgid "" +"%s(%d): %s\n" +"Cannot allocate memory.\n" +msgstr "" +"%s(%d): %s\n" +"Невозможно выделить память.\n" + +#: src/parsecfg.c:359 +#, c-format +msgid "" +"%s(%d): %s\n" +"It must be specified TRUE or FALSE.\n" +msgstr "" +"%s(%d): %s\n" +"Должно быть указано TRUE или FALSE.\n" + +#: src/parsecfg.c:362 +#, c-format +msgid "" +"%s(%d): %s\n" +"The section name is already used.\n" +msgstr "" +"%s(%d): %s\n" +"Название раздела уже используется.\n" + +#: src/parsecfg.c:365 +#, c-format +msgid "" +"%s(%d)\n" +"There is no closing brace.\n" +msgstr "" +"%s(%d)\n" +"Нет закрывающей скобки.\n" + +#: src/parsecfg.c:370 +#, c-format +msgid "" +"%s(%d): %s\n" +"Unexplained error\n" +msgstr "" +"%s(%d): %s\n" +"Необъяснимая ошибка\n" + +#: src/serie.c:212 +#, c-format +msgid "Cannot open %s : %s\n" +msgstr "Невозможно открыть %s: %s\n" + +#: src/serie.c:357 src/serie.c:392 +msgid "Control signals read" +msgstr "Получен управляющий сигнал" + +#: src/serie.c:369 +msgid "DTR write" +msgstr "DTR записан" + +#: src/serie.c:379 +msgid "RTS write" +msgstr "RTS записан" + +#: src/serie.c:470 +msgid "Lockfile is stale. Overriding it..\n" +msgstr "Файл блокировки устарел. Аннулирован...\n" + +#: src/serie.c:480 +#, c-format +msgid "Device %s is locked.\n" +msgstr "Устройство %s заблокировано.\n" + +#: src/serie.c:492 +msgid "Cannot create lockfile. Sorry.\n" +msgstr "Невозможно создать файл блокировки.\n" + +#: src/widgets.c:122 +msgid "/_File" +msgstr "/_Файл" + +#: src/widgets.c:123 +msgid "/File/Clear screen" +msgstr "/Файл/Очистить экран" + +#: src/widgets.c:124 +msgid "/File/Send _raw file" +msgstr "/Файл/_Отправить файл" + +#: src/widgets.c:125 +msgid "/File/_Save raw file" +msgstr "/Файл/_Сохранить файл" + +#: src/widgets.c:127 +msgid "/File/E_xit" +msgstr "/Файл/В_ыйти" + +#: src/widgets.c:128 +msgid "/_Configuration" +msgstr "/_Настройка" + +#: src/widgets.c:129 +msgid "/Configuration/_Port" +msgstr "/Настройка/_Порт" + +#: src/widgets.c:130 +msgid "/Configuration/_Main window" +msgstr "/Настройка/_Основное окно" + +#: src/widgets.c:131 +msgid "/Configuration/Local _echo" +msgstr "/Настройка/Локальный _вывод" + +#: src/widgets.c:132 +msgid "/Configuration/_CR LF auto" +msgstr "/Configuration/_Авто CR LF" + +#: src/widgets.c:133 +msgid "/Configuration/_Macros" +msgstr "/Настройка/_Макросы" + +#: src/widgets.c:135 +msgid "/Configuration/_Load configuration" +msgstr "/Настройка/_Загрузить настройку" + +#: src/widgets.c:136 +msgid "/Configuration/_Save configuration" +msgstr "/Настройка/_Сохранить настройку" + +#: src/widgets.c:137 +msgid "/Configuration/_Delete configuration" +msgstr "/Настройка/У_далить настройку" + +#: src/widgets.c:138 +msgid "/Control _signals" +msgstr "/Сигналы _управления" + +#: src/widgets.c:139 +msgid "/Control signals/Send break" +msgstr "/Сигналы управления/Отправить break" + +#: src/widgets.c:140 +msgid "/Control signals/Toggle DTR" +msgstr "/Сигналы управления/Переключить DTR" + +#: src/widgets.c:141 +msgid "/Control signals/Toggle RTS" +msgstr "/Сигналы управления/Переключить RTS" + +#: src/widgets.c:142 +msgid "/_View" +msgstr "/_Вид" + +#: src/widgets.c:143 +msgid "/View/_ASCII" +msgstr "/Вид/_ASCII" + +#: src/widgets.c:144 +msgid "/View/_Hexadecimal" +msgstr "/Вид/_Шестнадцатеричный" + +#: src/widgets.c:145 +msgid "/View/Hexadecimal _chars" +msgstr "/Вид/Шестнадцатеричные _символы" + +#: src/widgets.c:146 +msgid "/View/Hexadecimal chars/_8" +msgstr "/Вид/Шестнадцатеричные символы/_8" + +#: src/widgets.c:147 +msgid "/View/Hexadecimal chars/1_0" +msgstr "/Вид/Шестнадцатеричные символы/1_0" + +#: src/widgets.c:148 +msgid "/View/Hexadecimal chars/_16" +msgstr "/Вид/Шестнадцатеричные символы/_16" + +#: src/widgets.c:149 +msgid "/View/Hexadecimal chars/_24" +msgstr "/Вид/Шестнадцатеричные символы/_24" + +#: src/widgets.c:150 +msgid "/View/Hexadecimal chars/_32" +msgstr "/Вид/Шестнадцатеричные символы/_32" + +#: src/widgets.c:151 +msgid "/View/Show _index" +msgstr "/Вид/Показать _индекс" + +#: src/widgets.c:153 +msgid "/View/_Send hexadecimal data" +msgstr "/Вид/Отправить шестнадцатеричные данные" + +#: src/widgets.c:154 +msgid "/_Help" +msgstr "/_Помощь" + +#: src/widgets.c:155 +msgid "/Help/_About..." +msgstr "/Помощь/_О программе..." + +#: src/widgets.c:307 +msgid "Hexadecimal data to send (separator : ';' or space) : " +msgstr "Шестнадцатеричные данные для отправки (разделитель: ';' или пробел): " + +#: src/widgets.c:502 +msgid "About..." +msgstr "О программе..." + +#: src/widgets.c:510 +#, c-format +msgid "" +"\n" +" GTKTerm V. %s \n" +"\n" +"\t(c) Julien Schmitt : julien@jls-info.com \n" +"\thttp://www.jls-info.com/julien/linux\n" +msgstr "" +"\n" +" GTKTerm версии %s \n" +"\n" +"\t(c) Julien Schmitt: julien@jls-info.com \n" +"\thttp://www.jls-info.com/julien/linux\n" + +#: src/widgets.c:554 +msgid "Break signal sent !" +msgstr "Отравлен сигнал break!" + +#: src/widgets.c:636 +#, c-format +msgid "\"%s\" : %d byte(s) sent !" +msgstr "\"%s\": %d байт(а) отправлено!" diff -Nru gtkterm-0.99.7~rc1/README gtkterm-0.99.7+git9d63182/README --- gtkterm-0.99.7~rc1/README 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ - GTKTerm : a GTK+ serial port terminal - ===================================== - - Original Code by: - (c) Julien Schmitt - http://www.jls-info.com/julien/linux - - Currently Maintained At: - https://fedorahosted.org/gtkterm/ - By Zach Davis zdavkeos -at- gmail.com - -Version 0.99.7 - -Notice: - 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 . - - -Command line options - --help or -h : this help screen - --config or -c : load configuration - --port or -p : serial port device (default /dev/ttyS0) - --speed or -s : serial port speed (default 9600) - --bits or -b : number of bits (default 8) - --stopbits or -t : number of stopbits (default 1) - --parity or -a : parity (default none) - --flow or -w : flow control (default none) - --delay or -d : end of line delay in ms (default none) - --char or -r : wait for a special char at end of line (default none) - --file or -f : default file to send (default none) - --echo or -e : switch on local echo - -Keyboard shortcuts - As Gtkterm is often used like a terminal emulator, - the shortcut keys are assigned to , rather than just - . This allows the user to send keystrokes of the form X - and not have Gtkterm intercept them. - - L -- Clear screen - R -- Send file - Q -- Quit - S -- Configure port - V -- Paste - C -- Copy - B -- Send break - -NOTES on RS485: - The RS485 flow control is a software user-space emulation and therefore -may not work for all configurations (won't respond quickly enough). If this is -the case for your setup, you will need to either use a dedicated RS232 to -RS485 converter, or look for a kernel level driver. This is an inherent -limitation to user space programs. - - -Building: - GtkTerm has a few dependencies- -* Gtk+2.0 (version 2.6 or higher) -* vte (version 0.20 or higher) -* intltool (version 0.40.0 or higher) - - Once these dependencies are installed, most people should simply run: - ./configure - make - - And to install: - make install - - If you wish to install Gtkterm someplace other than the default directory, use: - ./configure --prefix=/install/directory - Then build and install as usual. - - See INSTALL for more detailed build and install options. diff -Nru gtkterm-0.99.7~rc1/README.md gtkterm-0.99.7+git9d63182/README.md --- gtkterm-0.99.7~rc1/README.md 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/README.md 2017-11-17 16:09:56.000000000 +0000 @@ -0,0 +1,71 @@ +# GTKTerm : a GTK+ serial port terminal +Original Code by: Julien Schmitt + + 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 . + + +### Command line options + + --help or -h : this help screen + --config or -c : load configuration + --port or -p : serial port device (default /dev/ttyS0) + --speed or -s : serial port speed (default 9600) + --bits or -b : number of bits (default 8) + --stopbits or -t : number of stopbits (default 1) + --parity or -a : parity (default none) + --flow or -w : flow control (default none) + --delay or -d : end of line delay in ms (default none) + --char or -r : wait for a special char at end of line (default none) + --file or -f : default file to send (default none) + --echo or -e : switch on local echo + +### Keyboard shortcuts +As Gtkterm is often used like a terminal emulator, +the shortcut keys are assigned to ``, rather than just ``. This allows the user to send keystrokes of the form `X` and not have Gtkterm intercept them. + + L -- Clear screen + R -- Send file + Q -- Quit + S -- Configure port + V -- Paste + C -- Copy + B -- Send break + F5 -- Open Port + F6 -- Close Port + F7 -- Toggle DTR + F8 -- Toggle RTS + +#### NOTES on RS485: +The RS485 flow control is a software user-space emulation and therefore may not work for all configurations (won't respond quickly enough). If this is the case for your setup, you will need to either use a dedicated RS232 to RS485 converter, or look for a kernel level driver. This is an inherent limitation to user space programs. + +### Building: +GtkTerm has a few dependencies- +* Gtk+3.0 (version 3.12 or higher) +* vte (version 0.40 or higher) +* intltool (version 0.40.0 or higher) + +Once these dependencies are installed, most people should simply run: + + ./configure + make + # And to install: + make install + +If you wish to install Gtkterm someplace other than the default directory, use: + + ./configure --prefix=/install/directory + +Then build and install as usual. + + See `INSTALL` for more detailed build and install options. diff -Nru gtkterm-0.99.7~rc1/src/buffer.c gtkterm-0.99.7+git9d63182/src/buffer.c --- gtkterm-0.99.7~rc1/src/buffer.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/buffer.c 2017-11-17 16:09:58.000000000 +0000 @@ -22,7 +22,7 @@ #include #include "buffer.h" #include "i18n.h" -#include "serie.h" +#include "serial.h" #include #include @@ -38,164 +38,164 @@ void create_buffer(void) { - if(buffer == NULL) - { - buffer = malloc(BUFFER_SIZE); - clear_buffer(); - } - return; + if(buffer == NULL) + { + buffer = malloc(BUFFER_SIZE); + clear_buffer(); + } + return; } void delete_buffer(void) { - if(buffer != NULL) - free(buffer); - return; + if(buffer != NULL) + free(buffer); + return; } void put_chars(char *chars, unsigned int size, gboolean crlf_auto) { - char *characters; - - /* If the auto CR LF mode on, read the buffer to add \r before \n */ - if(crlf_auto) - { - /* BUFFER_RECEPTION*2 for worst case scenario, all \n or \r chars */ - char out_buffer[BUFFER_RECEPTION*2]; - int i, out_size = 0; - - for (i=0; i BUFFER_SIZE) - { - characters = chars + (size - BUFFER_SIZE); - size = BUFFER_SIZE; - } - else - characters = chars; - - if((size + pointer) >= BUFFER_SIZE) - { - memcpy(current_buffer, characters, BUFFER_SIZE - pointer); - chars = characters + BUFFER_SIZE - pointer; - pointer = size - (BUFFER_SIZE - pointer); - memcpy(buffer, chars, pointer); - current_buffer = buffer + pointer; - overlapped = 1; - } - else - { - memcpy(current_buffer, characters, size); - pointer += size; - current_buffer += size; - } - - if(write_func != NULL) - write_func(characters, size); + } + chars = out_buffer; + size = out_size; + } + + if(buffer == NULL) + { + i18n_printf(_("ERROR : Buffer is not initialized !\n")); + return; + } + + if(size > BUFFER_SIZE) + { + characters = chars + (size - BUFFER_SIZE); + size = BUFFER_SIZE; + } + else + characters = chars; + + if((size + pointer) >= BUFFER_SIZE) + { + memcpy(current_buffer, characters, BUFFER_SIZE - pointer); + chars = characters + BUFFER_SIZE - pointer; + pointer = size - (BUFFER_SIZE - pointer); + memcpy(buffer, chars, pointer); + current_buffer = buffer + pointer; + overlapped = 1; + } + else + { + memcpy(current_buffer, characters, size); + pointer += size; + current_buffer += size; + } + + if(write_func != NULL) + write_func(characters, size); } void write_buffer(void) { - if(write_func == NULL) - return; + if(write_func == NULL) + return; - if(overlapped == 0) - write_func(buffer, pointer); - else - { - write_func(current_buffer, BUFFER_SIZE - pointer); - write_func(buffer, pointer); - } + if(overlapped == 0) + write_func(buffer, pointer); + else + { + write_func(current_buffer, BUFFER_SIZE - pointer); + write_func(buffer, pointer); + } } void write_buffer_with_func(void (*func)(char *, unsigned int)) { - void (*write_func_backup)(char *, unsigned int); + void (*write_func_backup)(char *, unsigned int); - write_func_backup = write_func; - write_func = func; - write_buffer(); - write_func = write_func_backup; + write_func_backup = write_func; + write_func = func; + write_buffer(); + write_func = write_func_backup; } void clear_buffer(void) { - if(clear_func != NULL) - clear_func(); + if(clear_func != NULL) + clear_func(); - if(buffer == NULL) - return; + if(buffer == NULL) + return; - overlapped = 0; - memset(buffer, 0, BUFFER_SIZE); - current_buffer = buffer; - pointer = 0; - cr_received = 0; + overlapped = 0; + memset(buffer, 0, BUFFER_SIZE); + current_buffer = buffer; + pointer = 0; + cr_received = 0; } void set_clear_func(void (*func)(void)) { - clear_func = func; + clear_func = func; } void unset_clear_func(void (*func)(void)) { - clear_func = NULL; + clear_func = NULL; } void set_display_func(void (*func)(char *, unsigned int)) { - write_func = func; + write_func = func; } void unset_display_func(void (*func)(char *, unsigned int)) { - write_func = NULL; + write_func = NULL; } diff -Nru gtkterm-0.99.7~rc1/src/cmdline.c gtkterm-0.99.7+git9d63182/src/cmdline.c --- gtkterm-0.99.7~rc1/src/cmdline.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/cmdline.c 2017-11-17 16:09:58.000000000 +0000 @@ -23,7 +23,7 @@ #include #include "term_config.h" -#include "fichier.h" +#include "files.h" #include "auto_config.h" #include "i18n.h" @@ -34,132 +34,134 @@ void display_help(void) { - i18n_printf(_("\nGTKTerm version %s\n"), VERSION); - i18n_printf(_("\t (c) Julien Schmitt\n")); - i18n_printf(_("\nThis program is released under the terms of the GPL V.2\n")); - i18n_printf(_("\t ** Use at your own risks ! **\n")); - i18n_printf(_("\nCommand line options\n")); - i18n_printf(_("--help or -h : this help screen\n")); - i18n_printf(_("--config or -c : load configuration\n")); - i18n_printf(_("--port or -p : serial port device (default /dev/ttyS0)\n")); - i18n_printf(_("--speed or -s : serial port speed (default 9600)\n")); - i18n_printf(_("--bits or -b : number of bits (default 8)\n")); - i18n_printf(_("--stopbits or -t : number of stopbits (default 1)\n")); - i18n_printf(_("--parity or -a : partity (default none)\n")); - i18n_printf(_("--flow or -w : flow control (default none)\n")); - i18n_printf(_("--delay or -d : end of line delay in ms (default none)\n")); - i18n_printf(_("--char or -r : wait for a special char at end of line (default none)\n")); - i18n_printf(_("--file or -f : default file to send (default none)\n")); - i18n_printf(_("--rts_time_before or -x : for rs485, time in ms before transmit with rts on\n")); - i18n_printf(_("--rts_time_after or -y : for rs485, time in ms after transmit with rts on\n")); - i18n_printf(_("--echo or -e : switch on local echo\n")); - i18n_printf("\n"); + i18n_printf(_("\nGTKTerm version %s\n"), VERSION); + i18n_printf(_("\t (c) Julien Schmitt\n")); + i18n_printf(_("\nThis program is released under the terms of the GPL V.2\n")); + i18n_printf(_("\t ** Use at your own risks ! **\n")); + i18n_printf(_("\nCommand line options\n")); + i18n_printf(_("--help or -h : this help screen\n")); + i18n_printf(_("--config or -c : load configuration\n")); + i18n_printf(_("--port or -p : serial port device (default /dev/ttyS0)\n")); + i18n_printf(_("--speed or -s : serial port speed (default 9600)\n")); + i18n_printf(_("--bits or -b : number of bits (default 8)\n")); + i18n_printf(_("--stopbits or -t : number of stopbits (default 1)\n")); + i18n_printf(_("--parity or -a : partity (default none)\n")); + i18n_printf(_("--flow or -w : flow control (default none)\n")); + i18n_printf(_("--delay or -d : end of line delay in ms (default none)\n")); + i18n_printf(_("--char or -r : wait for a special char at end of line (default none)\n")); + i18n_printf(_("--file or -f : default file to send (default none)\n")); + i18n_printf(_("--rts_time_before or -x : for rs485, time in ms before transmit with rts on\n")); + i18n_printf(_("--rts_time_after or -y : for rs485, time in ms after transmit with rts on\n")); + i18n_printf(_("--echo or -e : switch on local echo\n")); + i18n_printf("\n"); } int read_command_line(int argc, char **argv, gchar *configuration_to_read) { - int c; - int option_index = 0; + int c; + int option_index = 0; - static struct option long_options[] = { - {"speed", 1, 0, 's'}, - {"parity", 1, 0, 'a'}, - {"stopbits", 1, 0, 't'}, - {"bits", 1, 0, 'b'}, - {"file", 1, 0, 'f'}, - {"port", 1, 0, 'p'}, - {"flow", 1, 0, 'w'}, - {"delay", 1, 0, 'd'}, - {"char", 1, 0, 'r'}, - {"help", 0, 0, 'h'}, - {"echo", 0, 0, 'e'}, - {"rts_time_before", 1, 0, 'x'}, - {"rts_time_after", 1, 0, 'y'}, - {"config", 1, 0, 'c'}, - {0, 0, 0, 0} - }; - - /* need a working configuration file ! */ - Check_configuration_file(); - - while(1) { - c = getopt_long (argc, argv, "s:a:t:b:f:p:w:d:r:hec:x:y:", long_options, &option_index); - - if(c == -1) - break; - - switch(c) - { - case 'c': - Load_configuration_from_file(optarg); - break; - - case 's': - config.vitesse = atoi(optarg); - break; - - case 'a': - if(!strcmp(optarg, "odd")) - config.parite = 1; - else if(!strcmp(optarg, "even")) - config.parite = 2; - break; - - case 't': - config.stops = atoi(optarg); - break; - - case 'b': - config.bits = atoi(optarg); - break; - - case 'f': - fic_defaut = g_strdup(optarg); - break; - - case 'p': - strcpy(config.port, optarg); - break; - - case 'w': - if(!strcmp(optarg, "Xon")) - config.flux = 1; - else if(!strcmp(optarg, "RTS")) - config.flux = 2; - else if(!strcmp(optarg, "RS485")) - config.flux = 3; - break; - - case 'd': - config.delai = atoi(optarg); - break; - - case 'r': - config.car = *optarg; - break; - - case 'e': - config.echo = TRUE; - break; - - case 'x': - config.rs485_rts_time_before_transmit = atoi(optarg); - break; - - case 'y': - config.rs485_rts_time_after_transmit = atoi(optarg); - break; - - case 'h': - display_help(); - return -1; - - default: - i18n_printf(_("Misunderstood command line option\n")); - return -1; - } - } - Verify_configuration(); - return 0; + static struct option long_options[] = + { + {"speed", 1, 0, 's'}, + {"parity", 1, 0, 'a'}, + {"stopbits", 1, 0, 't'}, + {"bits", 1, 0, 'b'}, + {"file", 1, 0, 'f'}, + {"port", 1, 0, 'p'}, + {"flow", 1, 0, 'w'}, + {"delay", 1, 0, 'd'}, + {"char", 1, 0, 'r'}, + {"help", 0, 0, 'h'}, + {"echo", 0, 0, 'e'}, + {"rts_time_before", 1, 0, 'x'}, + {"rts_time_after", 1, 0, 'y'}, + {"config", 1, 0, 'c'}, + {0, 0, 0, 0} + }; + + /* need a working configuration file ! */ + Check_configuration_file(); + + while(1) + { + c = getopt_long (argc, argv, "s:a:t:b:f:p:w:d:r:hec:x:y:", long_options, &option_index); + + if(c == -1) + break; + + switch(c) + { + case 'c': + Load_configuration_from_file(optarg); + break; + + case 's': + config.vitesse = atoi(optarg); + break; + + case 'a': + if(!strcmp(optarg, "odd")) + config.parite = 1; + else if(!strcmp(optarg, "even")) + config.parite = 2; + break; + + case 't': + config.stops = atoi(optarg); + break; + + case 'b': + config.bits = atoi(optarg); + break; + + case 'f': + fic_defaut = g_strdup(optarg); + break; + + case 'p': + strcpy(config.port, optarg); + break; + + case 'w': + if(!strcmp(optarg, "Xon")) + config.flux = 1; + else if(!strcmp(optarg, "RTS")) + config.flux = 2; + else if(!strcmp(optarg, "RS485")) + config.flux = 3; + break; + + case 'd': + config.delai = atoi(optarg); + break; + + case 'r': + config.car = *optarg; + break; + + case 'e': + config.echo = TRUE; + break; + + case 'x': + config.rs485_rts_time_before_transmit = atoi(optarg); + break; + + case 'y': + config.rs485_rts_time_after_transmit = atoi(optarg); + break; + + case 'h': + display_help(); + return -1; + + default: + i18n_printf(_("Misunderstood command line option\n")); + return -1; + } + } + Verify_configuration(); + return 0; } diff -Nru gtkterm-0.99.7~rc1/src/config_terminal_dialog.ui gtkterm-0.99.7+git9d63182/src/config_terminal_dialog.ui --- gtkterm-0.99.7~rc1/src/config_terminal_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/config_terminal_dialog.ui 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,216 @@ + + + + + + 100 + 3000 + 200 + 1 + 10 + + + 290 + 245 + False + False + True + center-on-parent + True + dialog + center + + + False + center + center + vertical + 2 + + + False + + + Close + True + True + True + bottom + + + True + True + 0 + + + + + False + False + 1 + + + + + True + False + center + start + 5 + 6 + 12 + True + + + True + False + Terminal Font + 0.01 + 1 + + + + + + 0 + 0 + + + + + True + True + True + Sans 12 + + + + 1 + 0 + + + + + True + False + Scrollback Lines + 1 + + + + + + 0 + 1 + + + + + True + True + 5 + cfg_scrollback_lines + 100 + + + 1 + 1 + + + + + True + False + Background color + 1 + + + + + + 0 + 4 + + + + + True + True + True + start + Background color + + + 1 + 4 + + + + + True + False + Text color + 1 + + + + + + 0 + 3 + + + + + True + True + True + start + Text color + + + 1 + 3 + + + + + True + False + Block cursor + end + 1 + + + + + + 0 + 2 + + + + + True + True + start + center + True + True + + + 1 + 2 + + + + + False + True + 0 + + + + + + diff -Nru gtkterm-0.99.7~rc1/src/fichier.c gtkterm-0.99.7+git9d63182/src/fichier.c --- gtkterm-0.99.7~rc1/src/fichier.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/fichier.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,314 +0,0 @@ -/***********************************************************************/ -/* fichier.c */ -/* --------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Raw / text file transfer management */ -/* */ -/* ChangeLog */ -/* (All changes by Julien Schmitt except when explicitly written) */ -/* */ -/* - 0.99.5 : changed all calls to strerror() by strerror_utf8() */ -/* - 0.99.4 : added auto CR LF function by Sebastien */ -/* modified ecriture() to use send_serial() */ -/* - 0.99.2 : Internationalization */ -/* - 0.98.4 : modified to use new buffer */ -/* - 0.98 : file transfer completely rewritten / optimized */ -/* */ -/***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "term_config.h" -#include "widgets.h" -#include "serie.h" -#include "buffer.h" - -#include -#include - -/* Global variables */ -gint nb_car; -gint car_written; -gint current_buffer_position; -gint bytes_read; -GtkAdjustment *adj; -GtkWidget *ProgressBar; -gint Fichier; -guint callback_handler; -gchar *fic_defaut = NULL; -GtkWidget *Window; -gboolean waiting_for_char = FALSE; -gboolean waiting_for_timer = FALSE; -gboolean input_running = FALSE; -gchar *str = NULL; -FILE *Fic; - -/* Local functions prototype */ -gint Envoie_fichier(GtkFileChooser *FS); -gint Sauve_fichier(GtkFileChooser *FS); -gint close_all(void); -void ecriture(gpointer data, gint source, GdkInputCondition condition); -gboolean timer(gpointer pointer); -gboolean idle(gpointer pointer); -void remove_input(void); -void add_input(void); -void write_file(char *, unsigned int); - -extern struct configuration_port config; - -gint fichier(GtkWidget *widget, guint param) -{ - GtkWidget *file_select; - gint retval; - - file_select = gtk_file_chooser_dialog_new(_("File selection"), GTK_WINDOW(Fenetre), - GTK_FILE_CHOOSER_ACTION_SAVE, - _("Cancel"), GTK_RESPONSE_CANCEL, - _("OK"), GTK_RESPONSE_OK, NULL); - if(fic_defaut != NULL) - gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_select), fic_defaut); - - retval = gtk_dialog_run(GTK_DIALOG(file_select)); - if (retval == GTK_RESPONSE_OK) - { - switch(param) - { - case 1: - Envoie_fichier(GTK_FILE_CHOOSER(file_select)); - break; - case 2: - Sauve_fichier(GTK_FILE_CHOOSER(file_select)); - break; - } - } - - gtk_widget_destroy(file_select); - return FALSE; -} - -gint Envoie_fichier(GtkFileChooser *FS) -{ - gchar *NomFichier; - gchar *msg; - GtkWidget *Bouton_annuler, *Box; - - NomFichier = gtk_file_chooser_get_filename(FS); - - if(!g_file_test(NomFichier, G_FILE_TEST_IS_REGULAR)) - { - str = g_strdup_printf(_("Error opening file\n")); - show_message(str, MSG_ERR); - g_free(NomFichier); - g_free(str); - return FALSE; - } - Fichier = open(NomFichier, O_RDONLY); - if(Fichier != -1) - { - fic_defaut = g_strdup(NomFichier); - msg = g_strdup_printf(_("%s : transfer in progress..."), NomFichier); - - gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, msg); - car_written = 0; - current_buffer_position = 0; - bytes_read = 0; - nb_car = lseek(Fichier, 0L, SEEK_END); - lseek(Fichier, 0L, SEEK_SET); - - Window = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(Window), msg); - g_free(msg); - Box = gtk_vbox_new(TRUE, 10); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Window)->vbox), Box); - ProgressBar = gtk_progress_bar_new(); - - gtk_box_pack_start(GTK_BOX(Box), ProgressBar, FALSE, FALSE, 5); - - Bouton_annuler = gtk_button_new_with_label(_("Cancel")); - gtk_signal_connect_object(GTK_OBJECT(Bouton_annuler), "clicked", GTK_SIGNAL_FUNC(close_all), NULL); - - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Window)->action_area), Bouton_annuler); - - gtk_signal_connect_object(GTK_OBJECT(Window), "delete_event", GTK_SIGNAL_FUNC(close_all), NULL); - - gtk_window_set_default_size(GTK_WINDOW(Window), 250, 100); - gtk_window_set_modal(GTK_WINDOW(Window), TRUE); - gtk_widget_show_all(Window); - - add_input(); - } - else - { - str = g_strdup_printf(_("Cannot read file %s: %s\n"), NomFichier, strerror(errno)); - show_message(str, MSG_ERR); - g_free(str); - } - g_free(NomFichier); - return FALSE; -} - -void ecriture(gpointer data, gint source, GdkInputCondition condition) -{ - static gchar buffer[BUFFER_EMISSION]; - static gchar *current_buffer; - static gint bytes_to_write; - gint bytes_written; - gchar *car; - - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), (gfloat)car_written/(gfloat)nb_car ); - - if(car_written < nb_car) - { - /* Read the file only if buffer totally sent or if buffer empty */ - if(current_buffer_position == bytes_read) - { - bytes_read = read(Fichier, buffer, BUFFER_EMISSION); - - current_buffer_position = 0; - current_buffer = buffer; - bytes_to_write = bytes_read; - } - - car = current_buffer; - - if(config.delai != 0 || config.car != -1) - { - /* search for next LF */ - bytes_to_write = current_buffer_position; - while(*car != LINE_FEED && bytes_to_write < bytes_read) - { - car++; - bytes_to_write++; - } - if(*car == LINE_FEED) - bytes_to_write++; - } - - /* write to serial port */ - bytes_written = send_serial(current_buffer, bytes_to_write - current_buffer_position); - - if(bytes_written == -1) - { - /* Problem while writing, stop file transfer */ - g_free(str); - str = g_strdup_printf(_("Cannot write file %s\n"), strerror(errno)); - show_message(str, MSG_ERR); - close_all(); - return; - } - - car_written += bytes_written; - current_buffer_position += bytes_written; - current_buffer += bytes_written; - - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), (gfloat)car_written/(gfloat)nb_car ); - - if(config.delai != 0 && *car == LINE_FEED) - { - remove_input(); - g_timeout_add(config.delai, (GSourceFunc)timer, NULL); - waiting_for_timer = TRUE; - } - else if(config.car != -1 && *car == LINE_FEED) - { - remove_input(); - waiting_for_char = TRUE; - } - } - else - { - close_all(); - return; - } - return; -} - -gboolean timer(gpointer pointer) -{ - if(waiting_for_timer == TRUE) - { - add_input(); - waiting_for_timer = FALSE; - } - return FALSE; -} - -void add_input(void) -{ - if(input_running == FALSE) - { - input_running = TRUE; - callback_handler = gtk_input_add_full(serial_port_fd, GDK_INPUT_WRITE, (GdkInputFunction)ecriture, NULL, NULL, NULL); - } -} - -void remove_input(void) -{ - if(input_running == TRUE) - { - gtk_input_remove(callback_handler); - input_running = FALSE; - } -} - -gint close_all(void) -{ - remove_input(); - waiting_for_char = FALSE; - waiting_for_timer = FALSE; - gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); - close(Fichier); - gtk_widget_destroy(Window); - - return FALSE; -} - -void write_file(char *data, unsigned int size) -{ - fwrite(data, size, 1, Fic); -} - -gint Sauve_fichier(GtkFileChooser *FS) -{ - gchar *NomFichier; - - NomFichier = gtk_file_chooser_get_filename(FS); - if ((!NomFichier || (strcmp(NomFichier, ""))) == 0) - { - str = g_strdup_printf(_("File error\n")); - show_message(str, MSG_ERR); - g_free(str); - g_free(NomFichier); - return FALSE; - } - Fic = fopen(NomFichier, "w"); - if(Fic == NULL) - { - str = g_strdup_printf(_("Cannot open file %s: %s\n"), NomFichier, strerror(errno)); - show_message(str, MSG_ERR); - g_free(str); - } - else - { - fic_defaut = g_strdup(NomFichier); - - write_buffer_with_func(write_file); - - fclose(Fic); - } - g_free(NomFichier); - return FALSE; -} diff -Nru gtkterm-0.99.7~rc1/src/fichier.h gtkterm-0.99.7+git9d63182/src/fichier.h --- gtkterm-0.99.7~rc1/src/fichier.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/fichier.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/***********************************************************************/ -/* fichier.h */ -/* --------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Raw / text file transfer management */ -/* - Header file - */ -/* */ -/***********************************************************************/ - -#ifndef FICHIER_H_ -#define FICHIER_H_ - -gint fichier(GtkWidget *widget, guint param); -void add_input(void); - -extern gboolean waiting_for_char; -extern gchar *fic_defaut; - - -#endif diff -Nru gtkterm-0.99.7~rc1/src/files.c gtkterm-0.99.7+git9d63182/src/files.c --- gtkterm-0.99.7~rc1/src/files.c 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/files.c 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,338 @@ +/***********************************************************************/ +/* fichier.c */ +/* --------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Raw / text file transfer management */ +/* */ +/* ChangeLog */ +/* (All changes by Julien Schmitt except when explicitly written) */ +/* */ +/* - 0.99.5 : changed all calls to strerror() by strerror_utf8() */ +/* - 0.99.4 : added auto CR LF function by Sebastien */ +/* modified ecriture() to use send_serial() */ +/* - 0.99.2 : Internationalization */ +/* - 0.98.4 : modified to use new buffer */ +/* - 0.98 : file transfer completely rewritten / optimized */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "term_config.h" +#include "interface.h" +#include "serial.h" +#include "buffer.h" + +#include +#include + +/* Global variables */ +gint nb_car; +gint car_written; +gint current_buffer_position; +gint bytes_read; +GtkAdjustment *adj; +GtkWidget *ProgressBar; +gint Fichier; +guint callback_handler; +gchar *fic_defaut = NULL; +GtkWidget *Window; +gboolean waiting_for_char = FALSE; +gboolean waiting_for_timer = FALSE; +gboolean input_running = FALSE; +gchar *str = NULL; +FILE *Fic; + +/* Local functions prototype */ +gint Envoie_fichier(GtkFileChooser *FS); +gint Sauve_fichier(GtkFileChooser *FS); +gint close_all(void); +void ecriture(gpointer data, gint source); +gboolean timer(gpointer pointer); +gboolean idle(gpointer pointer); +void remove_input(void); +void add_input(void); +void write_file(char *, unsigned int); + +extern struct configuration_port config; + + +void send_raw_file(GtkAction *action, gpointer data) +{ + GtkWidget *file_select; + + file_select = gtk_file_chooser_dialog_new(_("Send RAW File"), + GTK_WINDOW(Fenetre), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + NULL); + + if(fic_defaut != NULL) + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_select), fic_defaut); + + if(gtk_dialog_run(GTK_DIALOG(file_select)) == GTK_RESPONSE_ACCEPT) + { + gchar *fileName; + gchar *msg; + + fileName = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_select)); + + if(!g_file_test(fileName, G_FILE_TEST_IS_REGULAR)) + { + msg = g_strdup_printf(_("Error opening file\n")); + show_message(msg, MSG_ERR); + g_free(msg); + g_free(fileName); + gtk_widget_destroy(file_select); + return; + } + + Fichier = open(fileName, O_RDONLY); + if(Fichier != -1) + { + GtkWidget *Bouton_annuler, *Box; + + fic_defaut = g_strdup(fileName); + msg = g_strdup_printf(_("%s : transfer in progress..."), fileName); + + gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, msg); + car_written = 0; + current_buffer_position = 0; + bytes_read = 0; + nb_car = lseek(Fichier, 0L, SEEK_END); + lseek(Fichier, 0L, SEEK_SET); + + Window = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(Window), msg); + g_free(msg); + Box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10); + gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(Window))), Box); + ProgressBar = gtk_progress_bar_new(); + + gtk_box_pack_start(GTK_BOX(Box), ProgressBar, FALSE, FALSE, 5); + + Bouton_annuler = gtk_button_new_with_label(_("Cancel")); + g_signal_connect(GTK_WIDGET(Bouton_annuler), "clicked", G_CALLBACK(close_all), NULL); + + gtk_container_add(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(Window))), Bouton_annuler); + + g_signal_connect(GTK_WIDGET(Window), "delete_event", G_CALLBACK(close_all), NULL); + + gtk_window_set_default_size(GTK_WINDOW(Window), 250, 100); + gtk_window_set_modal(GTK_WINDOW(Window), TRUE); + gtk_widget_show_all(Window); + + add_input(); + } + else + { + msg = g_strdup_printf(_("Cannot read file %s: %s\n"), fileName, strerror(errno)); + show_message(msg, MSG_ERR); + g_free(msg); + } + g_free(fileName); + } + gtk_widget_destroy(file_select); +} + +void ecriture(gpointer data, gint source) +{ + static gchar buffer[BUFFER_EMISSION]; + static gchar *current_buffer; + static gint bytes_to_write; + gint bytes_written; + gchar *car; + + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), (gfloat)car_written/(gfloat)nb_car ); + + if(car_written < nb_car) + { + /* Read the file only if buffer totally sent or if buffer empty */ + if(current_buffer_position == bytes_read) + { + bytes_read = read(Fichier, buffer, BUFFER_EMISSION); + + current_buffer_position = 0; + current_buffer = buffer; + bytes_to_write = bytes_read; + } + + if(current_buffer == NULL) + { + /* something went wrong... */ + g_free(str); + str = g_strdup_printf(_("Error sending file\n")); + show_message(str, MSG_ERR); + close_all(); + return; + } + + car = current_buffer; + + if(config.delai != 0 || config.car != -1) + { + /* search for next LF */ + bytes_to_write = current_buffer_position; + while(*car != LINE_FEED && bytes_to_write < bytes_read) + { + car++; + bytes_to_write++; + } + if(*car == LINE_FEED) + bytes_to_write++; + } + + /* write to serial port */ + bytes_written = send_serial(current_buffer, bytes_to_write - current_buffer_position); + + if(bytes_written == -1) + { + /* Problem while writing, stop file transfer */ + g_free(str); + str = g_strdup_printf(_("Error sending file: %s\n"), strerror(errno)); + show_message(str, MSG_ERR); + close_all(); + return; + } + + car_written += bytes_written; + current_buffer_position += bytes_written; + current_buffer += bytes_written; + + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), (gfloat)car_written/(gfloat)nb_car ); + + if(config.delai != 0 && *car == LINE_FEED) + { + remove_input(); + g_timeout_add(config.delai, (GSourceFunc)timer, NULL); + waiting_for_timer = TRUE; + } + else if(config.car != -1 && *car == LINE_FEED) + { + remove_input(); + waiting_for_char = TRUE; + } + } + else + { + close_all(); + return; + } + return; +} + +gboolean timer(gpointer pointer) +{ + if(waiting_for_timer == TRUE) + { + add_input(); + waiting_for_timer = FALSE; + } + return FALSE; +} + +void add_input(void) +{ + if(input_running == FALSE) + { + input_running = TRUE; + callback_handler = g_io_add_watch_full(g_io_channel_unix_new(serial_port_fd), + 10, + G_IO_OUT, + (GIOFunc)ecriture, + NULL, NULL); + + } +} + +void remove_input(void) +{ + if(input_running == TRUE) + { + g_source_remove(callback_handler); + input_running = FALSE; + } +} + +gint close_all(void) +{ + remove_input(); + waiting_for_char = FALSE; + waiting_for_timer = FALSE; + gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); + close(Fichier); + gtk_widget_destroy(Window); + + return FALSE; +} + +void write_file(char *data, unsigned int size) +{ + fwrite(data, size, 1, Fic); +} + +void save_raw_file(GtkAction *action, gpointer data) +{ + GtkWidget *file_select; + + file_select = gtk_file_chooser_dialog_new(_("Save RAW File"), + GTK_WINDOW(Fenetre), + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, + NULL); + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_select), TRUE); + + if(fic_defaut != NULL) + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_select), fic_defaut); + + if(gtk_dialog_run(GTK_DIALOG(file_select)) == GTK_RESPONSE_ACCEPT) + { + gchar *fileName; + gchar *msg; + + fileName = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_select)); + if ((!fileName || (strcmp(fileName, ""))) == 0) + { + msg = g_strdup_printf(_("File error\n")); + show_message(msg, MSG_ERR); + g_free(msg); + g_free(fileName); + gtk_widget_destroy(file_select); + return; + } + + Fic = fopen(fileName, "w"); + if(Fic == NULL) + { + msg = g_strdup_printf(_("Cannot open file %s: %s\n"), fileName, strerror(errno)); + show_message(msg, MSG_ERR); + g_free(msg); + } + else + { + fic_defaut = g_strdup(fileName); + + write_buffer_with_func(write_file); + + fclose(Fic); + } + g_free(fileName); + } + gtk_widget_destroy(file_select); +} + diff -Nru gtkterm-0.99.7~rc1/src/files.h gtkterm-0.99.7+git9d63182/src/files.h --- gtkterm-0.99.7~rc1/src/files.h 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/files.h 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,26 @@ +/***********************************************************************/ +/* files.h */ +/* --------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Raw / text file transfer management */ +/* - Header file - */ +/* */ +/***********************************************************************/ + +#ifndef FICHIER_H_ +#define FICHIER_H_ + +void send_raw_file(GtkAction *action, gpointer data); +void save_raw_file(GtkAction *action, gpointer data); +void add_input(void); + +extern gboolean waiting_for_char; +extern gchar *fic_defaut; + + +#endif diff -Nru gtkterm-0.99.7~rc1/src/gicon.xml gtkterm-0.99.7+git9d63182/src/gicon.xml --- gtkterm-0.99.7~rc1/src/gicon.xml 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/gicon.xml 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,6 @@ + + + + ../icon/gtkterm_small.png + + diff -Nru gtkterm-0.99.7~rc1/src/gresource.xml gtkterm-0.99.7+git9d63182/src/gresource.xml --- gtkterm-0.99.7~rc1/src/gresource.xml 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/gresource.xml 2017-11-17 16:09:58.000000000 +0000 @@ -0,0 +1,6 @@ + + + + config_terminal_dialog.ui + + diff -Nru gtkterm-0.99.7~rc1/src/gtkterm.c gtkterm-0.99.7+git9d63182/src/gtkterm.c --- gtkterm-0.99.7~rc1/src/gtkterm.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/gtkterm.c 2017-11-17 16:09:58.000000000 +0000 @@ -20,8 +20,8 @@ #include #include -#include "widgets.h" -#include "serie.h" +#include "interface.h" +#include "serial.h" #include "term_config.h" #include "cmdline.h" #include "parsecfg.h" @@ -34,45 +34,42 @@ int main(int argc, char *argv[]) { - gchar *message; + gchar *message; - config_file = g_strdup_printf("%s/.gtktermrc", getenv("HOME")); + config_file = g_strdup_printf("%s/.gtktermrc", getenv("HOME")); - bindtextdomain(PACKAGE, LOCALEDIR); - bind_textdomain_codeset(PACKAGE, "UTF-8"); - textdomain(PACKAGE); + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); - gtk_init(&argc, &argv); + gtk_init(&argc, &argv); - create_buffer(); + create_buffer(); - create_main_window(); + create_main_window(); - if(read_command_line(argc, argv) < 0) - { - delete_buffer(); - exit(1); - } + if(read_command_line(argc, argv) < 0) + { + delete_buffer(); + exit(1); + } - message = Config_port(); - if(message == NULL) - message = g_strdup_printf("No open port"); + Config_port(); - message = get_port_string(); - Set_window_title(message); - Set_status_message(message); - g_free(message); + message = get_port_string(); + Set_window_title(message); + Set_status_message(message); + g_free(message); - Set_Font(); - add_shortcuts(); + add_shortcuts(); - set_view(ASCII_VIEW); + set_view(ASCII_VIEW); - gtk_main(); + gtk_main(); - delete_buffer(); + delete_buffer(); - Close_port_and_remove_lockfile(); + Close_port(); - return 0; + return 0; } diff -Nru gtkterm-0.99.7~rc1/src/i18n.c gtkterm-0.99.7+git9d63182/src/i18n.c --- gtkterm-0.99.7~rc1/src/i18n.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/i18n.c 2017-11-17 16:09:58.000000000 +0000 @@ -31,136 +31,136 @@ static char *iconv_from_utf8_to_locale(const char *str, const char *fallback_string) { - const char *charset; + const char *charset; - iconv_t cd; - size_t nconv; + iconv_t cd; + size_t nconv; - char *buffer, *old_buffer; - char *buffer_ptr; - char *string_ptr; - char *string; - - const size_t buffer_inc = 80; // Increment buffer size in 80 bytes step - size_t buffer_size; - size_t buffer_size_left; - size_t string_size; - - // Get the current charset - charset = nl_langinfo(CODESET); - - if(strcmp(charset, "UTF-8") == 0) - return g_strdup(str); - - // Open iconv descriptor - cd = iconv_open(charset, "UTF-8"); - if (cd == (iconv_t) -1) - return g_strdup(fallback_string); - - // Set up the buffer - buffer_size = buffer_size_left = buffer_inc; - buffer = (char *) malloc(buffer_size + 1); - if (buffer == NULL) - return g_strdup(fallback_string); - buffer_ptr = buffer; - string = g_strdup(str); - string_ptr = string; - string_size = strlen(string); - // Do the conversion - while (string_size != 0) - { - nconv = iconv(cd, &string_ptr, &string_size, &buffer_ptr, &buffer_size_left); - if (nconv == (size_t) -1) - { - if (errno != E2BIG) // if translation error - { - iconv_close(cd); // close descriptor - free(buffer); // free buffer - free(string); - return g_strdup(fallback_string); // and return fallback string - } - // increase buffer size - buffer_size += buffer_inc; - buffer_size_left = buffer_inc; - old_buffer = buffer; - buffer = (char *) realloc(buffer, buffer_size + 1); - if (buffer == NULL) + char *buffer, *old_buffer; + char *buffer_ptr; + char *string_ptr; + char *string; + + const size_t buffer_inc = 80; // Increment buffer size in 80 bytes step + size_t buffer_size; + size_t buffer_size_left; + size_t string_size; + + // Get the current charset + charset = nl_langinfo(CODESET); + + if(strcmp(charset, "UTF-8") == 0) + return g_strdup(str); + + // Open iconv descriptor + cd = iconv_open(charset, "UTF-8"); + if (cd == (iconv_t) -1) + return g_strdup(fallback_string); + + // Set up the buffer + buffer_size = buffer_size_left = buffer_inc; + buffer = (char *) malloc(buffer_size + 1); + if (buffer == NULL) + return g_strdup(fallback_string); + buffer_ptr = buffer; + string = g_strdup(str); + string_ptr = string; + string_size = strlen(string); + // Do the conversion + while (string_size != 0) { - free(string); - return g_strdup(fallback_string); + nconv = iconv(cd, &string_ptr, &string_size, &buffer_ptr, &buffer_size_left); + if (nconv == (size_t) -1) + { + if (errno != E2BIG) // if translation error + { + iconv_close(cd); // close descriptor + free(buffer); // free buffer + free(string); + return g_strdup(fallback_string); // and return fallback string + } + // increase buffer size + buffer_size += buffer_inc; + buffer_size_left = buffer_inc; + old_buffer = buffer; + buffer = (char *) realloc(buffer, buffer_size + 1); + if (buffer == NULL) + { + free(string); + return g_strdup(fallback_string); + } + buffer_ptr = (buffer_ptr - old_buffer) + buffer; + } } - buffer_ptr = (buffer_ptr - old_buffer) + buffer; - } - } - *buffer_ptr = '\0'; - iconv_close(cd); - free(string); + *buffer_ptr = '\0'; + iconv_close(cd); + free(string); - return buffer; + return buffer; } int i18n_printf(const char *format, ...) { - char *new_format; - int return_value; - va_list args; - - new_format = iconv_from_utf8_to_locale(format, ""); - - if(new_format != NULL) - { - va_start(args, format); - return_value = vprintf(new_format, args); - va_end(args); - free(new_format); - } - else - return_value = 0; + char *new_format; + int return_value; + va_list args; - return return_value; + new_format = iconv_from_utf8_to_locale(format, ""); + + if(new_format != NULL) + { + va_start(args, format); + return_value = vprintf(new_format, args); + va_end(args); + free(new_format); + } + else + return_value = 0; + + return return_value; } int i18n_fprintf(FILE *stream, const char *format, ...) { - char *new_format; - int return_value; - va_list args; - - new_format = iconv_from_utf8_to_locale(format, ""); - - if(new_format != NULL) - { - va_start(args, format); - return_value = vfprintf(stream, new_format, args); - va_end(args); - free(new_format); - } - else - return_value = 0; + char *new_format; + int return_value; + va_list args; + + new_format = iconv_from_utf8_to_locale(format, ""); - return return_value; + if(new_format != NULL) + { + va_start(args, format); + return_value = vfprintf(stream, new_format, args); + va_end(args); + free(new_format); + } + else + return_value = 0; + + return return_value; } void i18n_perror(const char *s) { - char *conv_string; - int errno_backup; + char *conv_string; + int errno_backup; - errno_backup = errno; + errno_backup = errno; - conv_string = iconv_from_utf8_to_locale(s, ""); - if(conv_string != NULL) - { - fprintf(stderr, "%s: %s\n", conv_string, strerror_utf8(errno_backup)); - free(conv_string); - } + conv_string = iconv_from_utf8_to_locale(s, ""); + if(conv_string != NULL) + { + fprintf(stderr, "%s: %s\n", conv_string, strerror_utf8(errno_backup)); + free(conv_string); + } } char *strerror_utf8(int errornum) { - char *utf8error; - - utf8error = g_locale_to_utf8(strerror(errornum), -1, NULL, NULL, NULL); + char *utf8error; + + utf8error = g_locale_to_utf8(strerror(errornum), -1, NULL, NULL, NULL); - return utf8error; + return utf8error; } diff -Nru gtkterm-0.99.7~rc1/src/interface.c gtkterm-0.99.7+git9d63182/src/interface.c --- gtkterm-0.99.7~rc1/src/interface.c 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/interface.c 2017-11-17 16:09:59.000000000 +0000 @@ -0,0 +1,927 @@ +/***********************************************************************/ +/* widgets.c */ +/* --------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Functions for the management of the GUI for the main window */ +/* */ +/* ChangeLog */ +/* (All changes by Julien Schmitt except when explicitly written) */ +/* */ +/* - 0.99.7 : Changed keyboard shortcuts to */ +/* (Ken Peek) */ +/* - 0.99.6 : Added scrollbar and copy/paste (Zach Davis) */ +/* */ +/* - 0.99.5 : Make package buildable on pure *BSD by changing the */ +/* include to asm/termios.h by sys/ttycom.h */ +/* Print message without converting it into the locale */ +/* in show_message() */ +/* Set backspace key binding to backspace so that the */ +/* backspace works. It would even be nicer if the */ +/* behaviour of this key could be configured ! */ +/* - 0.99.4 : - Sebastien Bacher - */ +/* Added functions for CR LF auto mode */ +/* Fixed put_text() to have \r\n for the VTE Widget */ +/* Rewritten put_hexadecimal() function */ +/* - Julien - */ +/* Modified send_serial to return the actual number of */ +/* bytes written, and also only display exactly what */ +/* is written */ +/* - 0.99.3 : Modified to use a VTE terminal */ +/* - 0.99.2 : Internationalization */ +/* - 0.99.0 : \b byte now handled correctly by the ascii widget */ +/* SUPPR (0x7F) also prints correctly */ +/* adapted for macros */ +/* modified "about" dialog */ +/* - 0.98.6 : fixed possible buffer overrun in hex send */ +/* new "Send break" option */ +/* - 0.98.5 : icons in the menu */ +/* bug fixed with local echo and hexadecimal */ +/* modified hexadecimal send separator, and bug fixed */ +/* - 0.98.4 : new hexadecimal display / send */ +/* - 0.98.3 : put_text() modified to fit with 0x0D 0x0A */ +/* - 0.98.2 : added local echo by Julien */ +/* - 0.98 : file creation by Julien */ +/* */ +/***********************************************************************/ + +#include +#if defined (__linux__) +# include /* For control signals */ +#endif +#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) \ + || defined (__NetBSD__) || defined (__NetBSD_kernel__) \ + || defined (__OpenBSD__) || defined (__OpenBSD_kernel__) +# include /* For control signals */ +#endif +#include +#include +#include +#include + +#include "term_config.h" +#include "files.h" +#include "serial.h" +#include "interface.h" +#include "buffer.h" +#include "macros.h" +#include "auto_config.h" +#include "logging.h" + +#include +#include + +guint id; +gboolean echo_on; +gboolean crlfauto_on; +GtkWidget *StatusBar; +GtkWidget *signals[6]; +static GtkWidget *Hex_Box; +static GtkWidget *log_pause_resume_menu = NULL; +static GtkWidget *log_start_menu = NULL; +static GtkWidget *log_stop_menu = NULL; +static GtkWidget *log_clear_menu = NULL; +GtkWidget *scrolled_window; +GtkWidget *Fenetre; +GtkWidget *popup_menu; +GtkUIManager *ui_manager; +GtkAccelGroup *shortcuts; +GtkActionGroup *action_group; +GtkWidget *display = NULL; + +GtkWidget *Text; +GtkTextBuffer *buffer; +GtkTextIter iter; + +/* Variables for hexadecimal display */ +static gint bytes_per_line = 16; +static gchar blank_data[128]; +static guint total_bytes; +static gboolean show_index = FALSE; + +/* Local functions prototype */ +void signals_send_break_callback(GtkAction *action, gpointer data); +void signals_toggle_DTR_callback(GtkAction *action, gpointer data); +void signals_toggle_RTS_callback(GtkAction *action, gpointer data); +void signals_close_port(GtkAction *action, gpointer data); +void signals_open_port(GtkAction *action, gpointer data); +void help_about_callback(GtkAction *action, gpointer data); +gboolean Envoie_car(GtkWidget *, GdkEventKey *, gpointer); +gboolean control_signals_read(void); +void echo_toggled_callback(GtkAction *action, gpointer data); +void CR_LF_auto_toggled_callback(GtkAction *action, gpointer data); +void view_radio_callback(GtkAction *action, gpointer data); +void view_hexadecimal_chars_radio_callback(GtkAction* action, gpointer data); +void view_index_toggled_callback(GtkAction *action, gpointer data); +void view_send_hex_toggled_callback(GtkAction *action, gpointer data); +void initialize_hexadecimal_display(void); +gboolean Send_Hexadecimal(GtkWidget *, GdkEventKey *, gpointer); +gboolean pop_message(void); +static gchar *translate_menu(const gchar *, gpointer); +static void Got_Input(VteTerminal *, gchar *, guint, gpointer); +void edit_copy_callback(GtkAction *action, gpointer data); +void update_copy_sensivity(VteTerminal *terminal, gpointer data); +void edit_paste_callback(GtkAction *action, gpointer data); +void edit_select_all_callback(GtkAction *action, gpointer data); + + +/* Menu */ +const GtkActionEntry menu_entries[] = +{ + /* Toplevel */ + {"File", NULL, N_("_File")}, + {"Edit", NULL, N_("_Edit")}, + {"Log", NULL, N_("_Log")}, + {"Configuration", NULL, N_("_Configuration")}, + {"Signals", NULL, N_("Control _signals")}, + {"View", NULL, N_("_View")}, + {"ViewHexadecimalChars", NULL, N_("Hexadecimal _chars")}, + {"Help", NULL, N_("_Help")}, + + /* File menu */ + {"FileExit", GTK_STOCK_QUIT, NULL, "Q", NULL, gtk_main_quit}, + {"ClearScreen", GTK_STOCK_CLEAR, N_("_Clear screen"), "L", NULL, G_CALLBACK(clear_buffer)}, + {"SendFile", GTK_STOCK_JUMP_TO, N_("Send _RAW file"), "R", NULL, G_CALLBACK(send_raw_file)}, + {"SaveFile", GTK_STOCK_SAVE_AS, N_("_Save RAW file"), "", NULL, G_CALLBACK(save_raw_file)}, + + /* Edit menu */ + {"EditCopy", GTK_STOCK_COPY, NULL, "C", NULL, G_CALLBACK(edit_copy_callback)}, + {"EditPaste", GTK_STOCK_PASTE, NULL, "V", NULL, G_CALLBACK(edit_paste_callback)}, + {"EditSelectAll", GTK_STOCK_SELECT_ALL, NULL, "A", NULL, G_CALLBACK(edit_select_all_callback)}, + + /* Log Menu */ + {"LogToFile", GTK_STOCK_MEDIA_RECORD, N_("To file..."), "", NULL, G_CALLBACK(logging_start)}, + {"LogPauseResume", GTK_STOCK_MEDIA_PAUSE, NULL, "", NULL, G_CALLBACK(logging_pause_resume)}, + {"LogStop", GTK_STOCK_MEDIA_STOP, NULL, "", NULL, G_CALLBACK(logging_stop)}, + {"LogClear", GTK_STOCK_CLEAR, NULL, "", NULL, G_CALLBACK(logging_clear)}, + + /* Confuguration Menu */ + {"ConfigPort", GTK_STOCK_PROPERTIES, N_("_Port"), "S", NULL, G_CALLBACK(Config_Port_Fenetre)}, + {"ConfigTerminal", GTK_STOCK_PREFERENCES, N_("_Main window"), "", NULL, G_CALLBACK(Config_Terminal)}, + {"Macros", NULL, N_("_Macros"), NULL, NULL, G_CALLBACK(Config_macros)}, + {"SelectConfig", GTK_STOCK_OPEN, N_("_Load configuration"), "", NULL, G_CALLBACK(select_config_callback)}, + {"SaveConfig", GTK_STOCK_SAVE_AS, N_("_Save configuration"), "", NULL, G_CALLBACK(save_config_callback)}, + {"DeleteConfig", GTK_STOCK_DELETE, N_("_Delete configuration"), "", NULL, G_CALLBACK(delete_config_callback)}, + + /* Signals Menu */ + {"SignalsSendBreak", NULL, N_("Send break"), "B", NULL, G_CALLBACK(signals_send_break_callback)}, + {"SignalsOpenPort", GTK_STOCK_OPEN, N_("_Open Port"), "F5", NULL, G_CALLBACK(signals_open_port)}, + {"SignalsClosePort", GTK_STOCK_CLOSE, N_("_Close Port"), "F6", NULL, G_CALLBACK(signals_close_port)}, + {"SignalsDTR", NULL, N_("Toggle DTR"), "F7", NULL, G_CALLBACK(signals_toggle_DTR_callback)}, + {"SignalsRTS", NULL, N_("Toggle RTS"), "F8", NULL, G_CALLBACK(signals_toggle_RTS_callback)}, + + /* About menu */ + {"HelpAbout", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK(help_about_callback)} +}; + +const GtkToggleActionEntry menu_toggle_entries[] = +{ + /* Configuration Menu */ + {"LocalEcho", NULL, N_("Local _echo"), NULL, NULL, G_CALLBACK(echo_toggled_callback), FALSE}, + {"CRLFauto", NULL, N_("_CR LF auto"), NULL, NULL, G_CALLBACK(CR_LF_auto_toggled_callback), FALSE}, + + /* View Menu */ + {"ViewIndex", NULL, N_("Show _index"), NULL, NULL, G_CALLBACK(view_index_toggled_callback), FALSE}, + {"ViewSendHexData", NULL, N_("_Send hexadecimal data"), NULL, NULL, G_CALLBACK(view_send_hex_toggled_callback), FALSE} +}; + +const GtkRadioActionEntry menu_view_radio_entries[] = +{ + {"ViewASCII", NULL, N_("_ASCII"), NULL, NULL, ASCII_VIEW}, + {"ViewHexadecimal", NULL, N_("_Hexadecimal"), NULL, NULL, HEXADECIMAL_VIEW} +}; + +const GtkRadioActionEntry menu_hex_chars_length_radio_entries[] = +{ + {"ViewHex8", NULL, "_8", NULL, NULL, 8}, + {"ViewHex10", NULL, "1_0", NULL, NULL, 10}, + {"ViewHex16", NULL, "_16", NULL, NULL, 16}, + {"ViewHex24", NULL, "_24", NULL, NULL, 24}, + {"ViewHex32", NULL, "_32", NULL, NULL, 32} +}; + +static const char *ui_description = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + +static gchar *translate_menu(const gchar *path, gpointer data) +{ + return _(path); +} + +void view_send_hex_toggled_callback(GtkAction *action, gpointer data) +{ + if(gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))) + gtk_widget_show(GTK_WIDGET(Hex_Box)); + else + gtk_widget_hide(GTK_WIDGET(Hex_Box)); +} + +void view_index_toggled_callback(GtkAction *action, gpointer data) +{ + show_index = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); + set_view(HEXADECIMAL_VIEW); +} + +void view_hexadecimal_chars_radio_callback(GtkAction* action, gpointer data) +{ + gint current_value; + current_value = gtk_radio_action_get_current_value(GTK_RADIO_ACTION(action)); + + bytes_per_line = current_value; + set_view(HEXADECIMAL_VIEW); +} + +void set_view(guint type) +{ + GtkAction *action; + GtkAction *show_index_action; + GtkAction *hex_chars_action; + + show_index_action = gtk_action_group_get_action(action_group, "ViewIndex"); + hex_chars_action = gtk_action_group_get_action(action_group, "ViewHexadecimalChars"); + + clear_display(); + set_clear_func(clear_display); + switch(type) + { + case ASCII_VIEW: + action = gtk_action_group_get_action(action_group, "ViewASCII"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE); + gtk_action_set_sensitive(show_index_action, FALSE); + gtk_action_set_sensitive(hex_chars_action, FALSE); + total_bytes = 0; + set_display_func(put_text); + break; + case HEXADECIMAL_VIEW: + action = gtk_action_group_get_action(action_group, "ViewHexadecimal"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE); + gtk_action_set_sensitive(show_index_action, TRUE); + gtk_action_set_sensitive(hex_chars_action, TRUE); + total_bytes = 0; + set_display_func(put_hexadecimal); + break; + default: + set_display_func(NULL); + } + write_buffer(); +} + +void view_radio_callback(GtkAction *action, gpointer data) +{ + gint current_value; + current_value = gtk_radio_action_get_current_value(GTK_RADIO_ACTION(action)); + + set_view(current_value); +} + +void Set_local_echo(gboolean echo) +{ + GtkAction *action; + + echo_on = echo; + + action = gtk_action_group_get_action(action_group, "LocalEcho"); + if(action) + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), echo_on); +} + +void echo_toggled_callback(GtkAction *action, gpointer data) +{ + echo_on = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(action)); + configure_echo(echo_on); +} + +void Set_crlfauto(gboolean crlfauto) +{ + GtkAction *action; + + crlfauto_on = crlfauto; + + action = gtk_action_group_get_action(action_group, "CRLFauto"); + if(action) + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), crlfauto_on); +} + +void CR_LF_auto_toggled_callback(GtkAction *action, gpointer data) +{ + crlfauto_on = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(action)); + configure_crlfauto(crlfauto_on); +} + +void toggle_logging_pause_resume(gboolean currentlyLogging) +{ + GtkAction *action; + + action = gtk_action_group_get_action(action_group, "LogPauseResume"); + + if (currentlyLogging) + { + gtk_action_set_label(action, NULL); + gtk_action_set_stock_id(action, GTK_STOCK_MEDIA_PAUSE); + } + else + { + gtk_action_set_label(action, _("Resume")); + gtk_action_set_stock_id(action, GTK_STOCK_MEDIA_PLAY); + } +} + +void toggle_logging_sensitivity(gboolean currentlyLogging) +{ + GtkAction *action; + + action = gtk_action_group_get_action(action_group, "LogToFile"); + gtk_action_set_sensitive(action, !currentlyLogging); + action = gtk_action_group_get_action(action_group, "LogPauseResume"); + gtk_action_set_sensitive(action, currentlyLogging); + action = gtk_action_group_get_action(action_group, "LogStop"); + gtk_action_set_sensitive(action, currentlyLogging); + action = gtk_action_group_get_action(action_group, "LogClear"); + gtk_action_set_sensitive(action, currentlyLogging); +} + +gboolean terminal_button_press_callback(GtkWidget *widget, + GdkEventButton *event, + gpointer *data) +{ + + if(event->type == GDK_BUTTON_PRESS && + event->button == 3 && + (event->state & gtk_accelerator_get_default_mod_mask()) == 0) + { + gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, + event->button, event->time); + return TRUE; + } + + return FALSE; +} + +void terminal_popup_menu_callback(GtkWidget *widget, gpointer data) +{ + gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, + 0, gtk_get_current_event_time()); +} + +void create_main_window(void) +{ + GtkWidget *menu, *main_vbox, *label; + GtkWidget *hex_send_entry; + GtkAccelGroup *accel_group; + GError *error; + + Fenetre = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + shortcuts = gtk_accel_group_new(); + gtk_window_add_accel_group(GTK_WINDOW(Fenetre), GTK_ACCEL_GROUP(shortcuts)); + + g_signal_connect(GTK_WIDGET(Fenetre), "destroy", (GCallback)gtk_main_quit, NULL); + g_signal_connect(GTK_WIDGET(Fenetre), "delete_event", (GCallback)gtk_main_quit, NULL); + + Set_window_title("GtkTerm"); + + main_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + gtk_container_add(GTK_CONTAINER(Fenetre), main_vbox); + + /* Create the UIManager */ + ui_manager = gtk_ui_manager_new(); + + accel_group = gtk_ui_manager_get_accel_group (ui_manager); + gtk_window_add_accel_group (GTK_WINDOW (Fenetre), accel_group); + + /* Create the actions */ + action_group = gtk_action_group_new("MenuActions"); + gtk_action_group_set_translate_func(action_group, translate_menu, NULL, NULL); + + gtk_action_group_add_actions(action_group, menu_entries, + G_N_ELEMENTS (menu_entries), + Fenetre); + gtk_action_group_add_toggle_actions(action_group, menu_toggle_entries, + G_N_ELEMENTS (menu_toggle_entries), + Fenetre); + gtk_action_group_add_radio_actions(action_group, menu_view_radio_entries, + G_N_ELEMENTS (menu_view_radio_entries), + -1, G_CALLBACK(view_radio_callback), + Fenetre); + gtk_action_group_add_radio_actions(action_group, menu_hex_chars_length_radio_entries, + G_N_ELEMENTS (menu_hex_chars_length_radio_entries), + 16, G_CALLBACK(view_hexadecimal_chars_radio_callback), + Fenetre); + + gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); + + /* Load the UI */ + error = NULL; + if(!gtk_ui_manager_add_ui_from_string(ui_manager, ui_description, -1, &error)) + { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + exit (EXIT_FAILURE); + } + + menu = gtk_ui_manager_get_widget (ui_manager, "/MenuBar"); + gtk_box_pack_start(GTK_BOX(main_vbox), menu, FALSE, TRUE, 0); + + /* create vte window */ + display = vte_terminal_new(); + + /* set terminal properties, these could probably be made user configurable */ + vte_terminal_set_scroll_on_output(VTE_TERMINAL(display), FALSE); + vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(display), TRUE); + vte_terminal_set_mouse_autohide(VTE_TERMINAL(display), TRUE); + vte_terminal_set_backspace_binding(VTE_TERMINAL(display), + VTE_ERASE_ASCII_BACKSPACE); + + clear_display(); + + /* make vte window scrollable - inspired by gnome-terminal package */ + scrolled_window = gtk_scrolled_window_new(NULL, gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (display))); + + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), + GTK_SHADOW_NONE); + + gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(display)); + + gtk_box_pack_start(GTK_BOX(main_vbox), scrolled_window, TRUE, TRUE, 0); + + g_signal_connect(G_OBJECT(display), "button-press-event", + G_CALLBACK(terminal_button_press_callback), NULL); + + g_signal_connect(G_OBJECT(display), "popup-menu", + G_CALLBACK(terminal_popup_menu_callback), NULL); + + g_signal_connect(G_OBJECT(display), "selection-changed", + G_CALLBACK(update_copy_sensivity), NULL); + update_copy_sensivity(VTE_TERMINAL(display), NULL); + + popup_menu = gtk_ui_manager_get_widget(ui_manager, "/PopupMenu"); + + /* set up logging buttons availability */ + toggle_logging_pause_resume(FALSE); + toggle_logging_sensitivity(FALSE); + + /* send hex char box (hidden when not in use) */ + Hex_Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + label = gtk_label_new(_("Hexadecimal data to send (separator : ';' or space) : ")); + gtk_box_pack_start(GTK_BOX(Hex_Box), label, FALSE, FALSE, 5); + hex_send_entry = gtk_entry_new(); + g_signal_connect(GTK_WIDGET(hex_send_entry), "activate", (GCallback)Send_Hexadecimal, NULL); + gtk_box_pack_start(GTK_BOX(Hex_Box), hex_send_entry, TRUE, TRUE, 5); + gtk_box_pack_start(GTK_BOX(main_vbox), Hex_Box, FALSE, TRUE, 2); + + /* status bar */ + StatusBar = gtk_statusbar_new(); + gtk_box_pack_start(GTK_BOX(main_vbox), StatusBar, FALSE, FALSE, 0); + id = gtk_statusbar_get_context_id(GTK_STATUSBAR(StatusBar), "Messages"); + + label = gtk_label_new("RI"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); + signals[0] = label; + + label = gtk_label_new("DSR"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + signals[1] = label; + + label = gtk_label_new("CD"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + signals[2] = label; + + label = gtk_label_new("CTS"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + signals[3] = label; + + label = gtk_label_new("RTS"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + signals[4] = label; + + label = gtk_label_new("DTR"); + gtk_box_pack_end(GTK_BOX(StatusBar), label, FALSE, TRUE, 5); + signals[5] = label; + + g_signal_connect_after(GTK_WIDGET(display), "commit", G_CALLBACK(Got_Input), NULL); + + g_timeout_add(POLL_DELAY, (GSourceFunc)control_signals_read, NULL); + + gtk_window_set_default_size(GTK_WINDOW(Fenetre), 750, 550); + gtk_widget_show_all(Fenetre); + gtk_widget_hide(GTK_WIDGET(Hex_Box)); +} + +void initialize_hexadecimal_display(void) +{ + total_bytes = 0; + memset(blank_data, ' ', 128); + blank_data[bytes_per_line * 3 + 5] = 0; +} + +void put_hexadecimal(gchar *string, guint size) +{ + static gchar data[128]; + static gchar data_byte[6]; + static guint bytes; + glong column, row; + + gint i = 0; + + if(size == 0) + return; + + while(i < size) + { + while(gtk_events_pending()) gtk_main_iteration(); + vte_terminal_get_cursor_position(VTE_TERMINAL(display), &column, &row); + + if(show_index) + { + if(column == 0) + /* First byte on line */ + { + sprintf(data, "%6d: ", total_bytes); + vte_terminal_feed(VTE_TERMINAL(display), data, strlen(data)); + bytes = 0; + } + } + else + { + if(column == 0) + bytes = 0; + } + + /* Print hexadecimal characters */ + data[0] = 0; + + while(bytes < bytes_per_line && i < size) + { + gint avance=0; + gchar ascii[1]; + + sprintf(data_byte, "%02X ", (guchar)string[i]); + log_chars(data_byte, 3); + vte_terminal_feed(VTE_TERMINAL(display), data_byte, 3); + + avance = (bytes_per_line - bytes) * 3 + bytes + 2; + + /* Move forward */ + sprintf(data_byte, "%c[%dC", 27, avance); + vte_terminal_feed(VTE_TERMINAL(display), data_byte, strlen(data_byte)); + + /* Print ascii characters */ + ascii[0] = (string[i] > 0x1F) ? string[i] : '.'; + vte_terminal_feed(VTE_TERMINAL(display), ascii, 1); + + /* Move backward */ + sprintf(data_byte, "%c[%dD", 27, avance + 1); + vte_terminal_feed(VTE_TERMINAL(display), data_byte, strlen(data_byte)); + + if(bytes == bytes_per_line / 2 - 1) + vte_terminal_feed(VTE_TERMINAL(display), "- ", strlen("- ")); + + bytes++; + i++; + + /* End of line ? */ + if(bytes == bytes_per_line) + { + vte_terminal_feed(VTE_TERMINAL(display), "\r\n", 2); + total_bytes += bytes; + } + + } + + } +} + +void put_text(gchar *string, guint size) +{ + log_chars(string, size); + vte_terminal_feed(VTE_TERMINAL(display), string, size); +} + +gint send_serial(gchar *string, gint len) +{ + gint bytes_written; + + bytes_written = Send_chars(string, len); + if(bytes_written > 0) + { + if(echo_on) + put_chars(string, bytes_written, crlfauto_on); + } + + return bytes_written; +} + + +static void Got_Input(VteTerminal *widget, gchar *text, guint length, gpointer ptr) +{ + send_serial(text, length); +} + +gboolean Envoie_car(GtkWidget *widget, GdkEventKey *event, gpointer pointer) +{ + if(g_utf8_validate(event->string, 1, NULL)) + send_serial(event->string, 1); + + return FALSE; +} + + +void help_about_callback(GtkAction *action, gpointer data) +{ + gchar *authors[] = {"Julien Schimtt", "Zach Davis", NULL}; + GError *error = NULL; + GdkPixbuf *logo = NULL; + + logo = gdk_pixbuf_new_from_resource ("/org/gtk/gtkterm/gtkterm_small.png", &error); + + gtk_show_about_dialog(GTK_WINDOW(Fenetre), + "program-name", "GTKTerm", + "logo", logo, + "version", VERSION, + "comments", _("GTKTerm is a simple GTK+ terminal used to communicate with the serial port."), + "copyright", "Copyright © Julien Schimtt", + "authors", authors, + "website", "https://github.com/Jeija/gtkterm", + "website-label", "https://github.com/Jeija/gtkterm", + "license-type", GTK_LICENSE_LGPL_3_0, + NULL); +} + +void show_control_signals(int stat) +{ + if(stat & TIOCM_RI) + gtk_widget_set_sensitive(GTK_WIDGET(signals[0]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[0]), FALSE); + if(stat & TIOCM_DSR) + gtk_widget_set_sensitive(GTK_WIDGET(signals[1]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[1]), FALSE); + if(stat & TIOCM_CD) + gtk_widget_set_sensitive(GTK_WIDGET(signals[2]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[2]), FALSE); + if(stat & TIOCM_CTS) + gtk_widget_set_sensitive(GTK_WIDGET(signals[3]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[3]), FALSE); + if(stat & TIOCM_RTS) + gtk_widget_set_sensitive(GTK_WIDGET(signals[4]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[4]), FALSE); + if(stat & TIOCM_DTR) + gtk_widget_set_sensitive(GTK_WIDGET(signals[5]), TRUE); + else + gtk_widget_set_sensitive(GTK_WIDGET(signals[5]), FALSE); +} + +void signals_send_break_callback(GtkAction *action, gpointer data) +{ + sendbreak(); + Put_temp_message(_("Break signal sent!"), 800); +} + +void signals_toggle_DTR_callback(GtkAction *action, gpointer data) +{ + Set_signals(0); +} + +void signals_toggle_RTS_callback(GtkAction *action, gpointer data) +{ + Set_signals(1); +} + +void signals_close_port(GtkAction *action, gpointer data) +{ + Close_port(); + + gchar *message; + message = get_port_string(); + Set_status_message(message); + Set_window_title(message); + g_free(message); +} + +void signals_open_port(GtkAction *action, gpointer data) +{ + Config_port(); + + gchar *message; + message = get_port_string(); + Set_status_message(message); + Set_window_title(message); + g_free(message); +} + +gboolean control_signals_read(void) +{ + int state; + + state = lis_sig(); + if(state >= 0) + show_control_signals(state); + + return TRUE; +} + +void Set_status_message(gchar *msg) +{ + gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); + gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, msg); +} + +void Set_window_title(gchar *msg) +{ + gchar* header = g_strdup_printf("GtkTerm - %s", msg); + gtk_window_set_title(GTK_WINDOW(Fenetre), header); + g_free(header); +} + +void show_message(gchar *message, gint type_msg) +{ + GtkWidget *Fenetre_msg; + + if(type_msg==MSG_ERR) + { + Fenetre_msg = gtk_message_dialog_new(GTK_WINDOW(Fenetre), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + message, NULL); + } + else if(type_msg==MSG_WRN) + { + Fenetre_msg = gtk_message_dialog_new(GTK_WINDOW(Fenetre), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + message, NULL); + } + else + return; + + gtk_dialog_run(GTK_DIALOG(Fenetre_msg)); + gtk_widget_destroy(Fenetre_msg); +} + +gboolean Send_Hexadecimal(GtkWidget *widget, GdkEventKey *event, gpointer pointer) +{ + guint i; + gchar *text, *message, **tokens, *buff; + guint scan_val; + + text = (gchar *)gtk_entry_get_text(GTK_ENTRY(widget)); + + if(strlen(text) == 0) + { + message = g_strdup_printf(_("0 byte(s) sent!")); + Put_temp_message(message, 1500); + gtk_entry_set_text(GTK_ENTRY(widget), ""); + g_free(message); + return FALSE; + } + + tokens = g_strsplit_set(text, " ;", -1); + buff = g_malloc(g_strv_length(tokens)); + + for(i = 0; tokens[i] != NULL; i++) + { + if(sscanf(tokens[i], "%02X", &scan_val) != 1) + { + Put_temp_message(_("Improper formatted hex input, 0 bytes sent!"), + 1500); + g_free(buff); + return FALSE; + } + buff[i] = scan_val; + } + + send_serial(buff, i); + g_free(buff); + + message = g_strdup_printf(_("%d byte(s) sent!"), i); + Put_temp_message(message, 2000); + gtk_entry_set_text(GTK_ENTRY(widget), ""); + g_strfreev(tokens); + + return FALSE; +} + +void Put_temp_message(const gchar *text, gint time) +{ + /* time in ms */ + gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, text); + g_timeout_add(time, (GSourceFunc)pop_message, NULL); +} + +gboolean pop_message(void) +{ + gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); + + return FALSE; +} + +void clear_display(void) +{ + initialize_hexadecimal_display(); + if(display) + vte_terminal_reset(VTE_TERMINAL(display), TRUE, TRUE); +} + +void edit_copy_callback(GtkAction *action, gpointer data) +{ + vte_terminal_copy_clipboard(VTE_TERMINAL(display)); +} + +void update_copy_sensivity(VteTerminal *terminal, gpointer data) +{ + GtkAction *action; + gboolean can_copy; + + can_copy = vte_terminal_get_has_selection(VTE_TERMINAL(terminal)); + + action = gtk_action_group_get_action(action_group, "EditCopy"); + gtk_action_set_sensitive(action, can_copy); +} + +void edit_paste_callback(GtkAction *action, gpointer data) +{ + vte_terminal_paste_clipboard(VTE_TERMINAL(display)); +} + +void edit_select_all_callback(GtkAction *action, gpointer data) +{ + vte_terminal_select_all(VTE_TERMINAL(display)); +} diff -Nru gtkterm-0.99.7~rc1/src/interface.h gtkterm-0.99.7+git9d63182/src/interface.h --- gtkterm-0.99.7~rc1/src/interface.h 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/interface.h 2017-11-17 16:09:59.000000000 +0000 @@ -0,0 +1,45 @@ +/***********************************************************************/ +/* interface.h */ +/* --------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Functions for the management of the GUI for the main window */ +/* - Header file - */ +/* */ +/***********************************************************************/ + +#ifndef WIDGETS_H_ +#define WIDGETS_H_ + +#define MSG_WRN 0 +#define MSG_ERR 1 + +#define ASCII_VIEW 0 +#define HEXADECIMAL_VIEW 1 + +void create_main_window(void); +void Set_status_message(gchar *); +void put_text(gchar *, guint); +void put_hexadecimal(gchar *, guint); +void Set_local_echo(gboolean); +void show_message(gchar *, gint); +void clear_display(void); +void set_view(guint); +gint send_serial(gchar *, gint); +void Put_temp_message(const gchar *, gint); +void Set_window_title(gchar *msg); + +void toggle_logging_pause_resume(gboolean currentlyLogging); +void toggle_logging_sensitivity(gboolean currentlyLogging); + +extern GtkWidget *Fenetre; +extern GtkWidget *StatusBar; +extern guint id; +extern GtkWidget *Text; +extern GtkAccelGroup *shortcuts; + +#endif diff -Nru gtkterm-0.99.7~rc1/src/logging.c gtkterm-0.99.7+git9d63182/src/logging.c --- gtkterm-0.99.7~rc1/src/logging.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/logging.c 2017-11-17 16:09:59.000000000 +0000 @@ -24,8 +24,8 @@ #include #include -#include "widgets.h" -#include "serie.h" +#include "interface.h" +#include "serial.h" #include "buffer.h" #include "logging.h" @@ -41,144 +41,150 @@ static gint OpenLogFile(gchar *filename) { - gchar *str; + gchar *str; - // open file and start logging - if(!filename || (strcmp(filename, "") == 0)) - { - str = g_strdup_printf(_("Filename error\n")); - show_message(str, MSG_ERR); - g_free(str); - g_free(filename); - return FALSE; - } - - if(LoggingFile != NULL) - { - fclose(LoggingFile); - LoggingFile = NULL; - Logging = FALSE; - } + // open file and start logging + if(!filename || (strcmp(filename, "") == 0)) + { + str = g_strdup_printf(_("Filename error\n")); + show_message(str, MSG_ERR); + g_free(str); + g_free(filename); + return FALSE; + } + + if(LoggingFile != NULL) + { + fclose(LoggingFile); + LoggingFile = NULL; + Logging = FALSE; + } + + LoggingFileName = filename; + + LoggingFile = fopen(LoggingFileName, "a"); + if(LoggingFile == NULL) + { + str = g_strdup_printf(_("Cannot open file %s: %s\n"), LoggingFileName, strerror(errno)); + + show_message(str, MSG_ERR); + g_free(str); + g_free(LoggingFileName); + } + else + { + logfile_default = g_strdup(LoggingFileName); + Logging = TRUE; + } - LoggingFileName = filename; - - LoggingFile = fopen(LoggingFileName, "a"); - if(LoggingFile == NULL) - { - str = g_strdup_printf(_("Cannot open file %s: %s\n"), LoggingFileName, strerror(errno)); - - show_message(str, MSG_ERR); - g_free(str); - g_free(LoggingFileName); - } else { - logfile_default = g_strdup(LoggingFileName); - Logging = TRUE; - } - - return FALSE; + return FALSE; } -gint logging_start(GtkWidget *widget) +void logging_start(GtkAction *action, gpointer data) { - GtkWidget *file_select; - gint retval; + GtkWidget *file_select; + gint retval; - file_select = gtk_file_chooser_dialog_new(_("Log file selection"), GTK_WINDOW(Fenetre), - GTK_FILE_CHOOSER_ACTION_OPEN, - _("Cancel"), GTK_RESPONSE_CANCEL, - _("OK"), GTK_RESPONSE_OK, NULL); - gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_select), TRUE); + file_select = gtk_file_chooser_dialog_new(_("Log file selection"), GTK_WINDOW(Fenetre), + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_select), TRUE); + + if(logfile_default != NULL) + { + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_select), logfile_default); + } + + retval = gtk_dialog_run(GTK_DIALOG(file_select)); + if(retval == GTK_RESPONSE_OK) + { + OpenLogFile(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_select))); + } - if(logfile_default != NULL) - { - gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_select), logfile_default); - } + gtk_widget_destroy(file_select); - retval = gtk_dialog_run(GTK_DIALOG(file_select)); - if(retval == GTK_RESPONSE_OK) - { - OpenLogFile(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_select))); - } - - gtk_widget_destroy(file_select); - - toggle_logging_sensitivity(Logging); - toggle_logging_pause_resume(Logging); - - return FALSE; + toggle_logging_sensitivity(Logging); + toggle_logging_pause_resume(Logging); } void logging_clear(void) { - if(LoggingFile == NULL) - { - return; - } - - //Reopening with "w" will truncate the file - LoggingFile = freopen(LoggingFileName, "w", LoggingFile); - - if (LoggingFile == NULL) - { - gchar *str = g_strdup_printf(_("Cannot open file %s: %s\n"), LoggingFileName, strerror(errno)); - show_message(str, MSG_ERR); - g_free(str); - g_free(LoggingFileName); - } + if(LoggingFile == NULL) + { + return; + } + + //Reopening with "w" will truncate the file + LoggingFile = freopen(LoggingFileName, "w", LoggingFile); + + if (LoggingFile == NULL) + { + gchar *str = g_strdup_printf(_("Cannot open file %s: %s\n"), LoggingFileName, strerror(errno)); + show_message(str, MSG_ERR); + g_free(str); + g_free(LoggingFileName); + } } void logging_pause_resume(void) { - if(LoggingFile == NULL) { - return; - } - if(Logging == TRUE) { - Logging = FALSE; - } else { - Logging = TRUE; - } - toggle_logging_pause_resume(Logging); + if(LoggingFile == NULL) + { + return; + } + if(Logging == TRUE) + { + Logging = FALSE; + } + else + { + Logging = TRUE; + } + toggle_logging_pause_resume(Logging); } void logging_stop(void) { - if(LoggingFile == NULL) { - return; - } - - fclose(LoggingFile); - LoggingFile = NULL; - Logging = FALSE; - g_free(LoggingFileName); - LoggingFileName = NULL; + if(LoggingFile == NULL) + { + return; + } + + fclose(LoggingFile); + LoggingFile = NULL; + Logging = FALSE; + g_free(LoggingFileName); + LoggingFileName = NULL; - toggle_logging_sensitivity(Logging); - toggle_logging_pause_resume(Logging); + toggle_logging_sensitivity(Logging); + toggle_logging_pause_resume(Logging); } void log_chars(gchar *chars, guint size) { - guint writeAttempts = 0; - guint bytesWritten = 0; + guint writeAttempts = 0; + guint bytesWritten = 0; - /* if we are not logging exit */ - if(LoggingFile == NULL || Logging == FALSE) { - return; - } - - while (bytesWritten < size) - { - if (writeAttempts < MAX_WRITE_ATTEMPTS) - { - bytesWritten += fwrite(&chars[bytesWritten], 1, - size-bytesWritten, LoggingFile); - } - else - { - show_message(_("Failed to log data\n"), MSG_ERR); - return; - } - } + /* if we are not logging exit */ + if(LoggingFile == NULL || Logging == FALSE) + { + return; + } + + while (bytesWritten < size) + { + if (writeAttempts < MAX_WRITE_ATTEMPTS) + { + bytesWritten += fwrite(&chars[bytesWritten], 1, + size-bytesWritten, LoggingFile); + } + else + { + show_message(_("Failed to log data\n"), MSG_ERR); + return; + } + } - fflush(LoggingFile); + fflush(LoggingFile); } diff -Nru gtkterm-0.99.7~rc1/src/logging.h gtkterm-0.99.7+git9d63182/src/logging.h --- gtkterm-0.99.7~rc1/src/logging.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/logging.h 2017-11-17 16:09:59.000000000 +0000 @@ -14,7 +14,7 @@ #ifndef LOGGING_H_ #define LOGGING_H_ -gint logging_start(GtkWidget *); +void logging_start(GtkAction *action, gpointer data); void logging_pause_resume(void); void logging_stop(void); void logging_clear(void); diff -Nru gtkterm-0.99.7~rc1/src/macros.c gtkterm-0.99.7+git9d63182/src/macros.c --- gtkterm-0.99.7~rc1/src/macros.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/macros.c 2017-11-17 16:09:59.000000000 +0000 @@ -22,513 +22,504 @@ #include #include -#include "widgets.h" +#include "interface.h" #include "macros.h" #include #include enum - { - COLUMN_SHORTCUT, - COLUMN_ACTION, - NUM_COLUMNS - }; +{ + COLUMN_SHORTCUT, + COLUMN_ACTION, + NUM_COLUMNS +}; macro_t *macros = NULL; static GtkWidget *window = NULL; macro_t *get_shortcuts(gint *size) { - gint i = 0; + gint i = 0; - if(macros != NULL) - { - while(macros[i].shortcut != NULL) - i++; - } - *size = i; - return macros; + if(macros != NULL) + { + while(macros[i].shortcut != NULL) + i++; + } + *size = i; + return macros; } static void shortcut_callback(gpointer *number) { - gchar *string; - gchar *str; - gint i, length; - guchar a; - guint val_read; - - string = macros[(long)number].action; - length = strlen(string); - - for(i = 0; i < length; i++) - { - if(string[i] == '\\') - { - if(g_unichar_isdigit((gunichar)string[i + 1])) - { - if((string[i + 1] == '0') && (string[i + 2] != 0)) - { - if(g_unichar_isxdigit((gunichar)string[i + 3])) - { - str = &string[i + 2]; - i += 3; - } - else - { - str = &string[i + 1]; - if(g_unichar_isxdigit((gunichar)string[i + 2])) - i += 2; - else - i++; - } - } - else + gchar *string; + gchar *str; + gint i, length; + guchar a; + guint val_read; + + string = macros[(long)number].action; + length = strlen(string); + + for(i = 0; i < length; i++) + { + if(string[i] == '\\') { - str = &string[i + 1]; - if(g_unichar_isxdigit((gunichar)string[i + 2])) - i += 2; - else - i++; + if(g_unichar_isdigit((gunichar)string[i + 1])) + { + if((string[i + 1] == '0') && (string[i + 2] != 0)) + { + if(g_unichar_isxdigit((gunichar)string[i + 3])) + { + str = &string[i + 2]; + i += 3; + } + else + { + str = &string[i + 1]; + if(g_unichar_isxdigit((gunichar)string[i + 2])) + i += 2; + else + i++; + } + } + else + { + str = &string[i + 1]; + if(g_unichar_isxdigit((gunichar)string[i + 2])) + i += 2; + else + i++; + } + if(sscanf(str, "%02X", &val_read) == 1) + a = (guchar)val_read; + else + a = '\\'; + } + else + { + switch(string[i + 1]) + { + case 'a': + a = '\a'; + break; + case 'b': + a = '\b'; + break; + case 't': + a = '\t'; + break; + case 'n': + a = '\n'; + break; + case 'v': + a = '\v'; + break; + case 'f': + a = '\f'; + break; + case 'r': + a = '\r'; + break; + case '\\': + a = '\\'; + break; + default: + a = '\\'; + i--; + break; + } + i++; + } + send_serial((gchar*)&a, 1); } - if(sscanf(str, "%02X", &val_read) == 1) - a = (guchar)val_read; - else - a = '\\'; - } - else - { - switch(string[i + 1]) + else { - case 'a': - a = '\a'; - break; - case 'b': - a = '\b'; - break; - case 't': - a = '\t'; - break; - case 'n': - a = '\n'; - break; - case 'v': - a = '\v'; - break; - case 'f': - a = '\f'; - break; - case 'r': - a = '\r'; - break; - case '\\': - a = '\\'; - break; - default: - a = '\\'; - i--; - break; + send_serial(&string[i], 1); } - i++; - } - send_serial((gchar*)&a, 1); } - else - { - send_serial(&string[i], 1); - } - } - str = g_strdup_printf(_("Macro \"%s\" sent !"), macros[(long)number].shortcut); - Put_temp_message(str, 800); - g_free(str); + str = g_strdup_printf(_("Macro \"%s\" sent !"), macros[(long)number].shortcut); + Put_temp_message(str, 800); + g_free(str); } void create_shortcuts(macro_t *macro, gint size) { - macros = g_malloc((size + 1) * sizeof(macro_t)); - if(macros != NULL) - { - memcpy(macros, macro, size * sizeof(macro_t)); - macros[size].shortcut = NULL; - macros[size].action = NULL; - } - else - perror("malloc"); + macros = g_malloc((size + 1) * sizeof(macro_t)); + if(macros != NULL) + { + memcpy(macros, macro, size * sizeof(macro_t)); + macros[size].shortcut = NULL; + macros[size].action = NULL; + } + else + perror("malloc"); } void add_shortcuts(void) { - long i = 0; - guint acc_key; - GdkModifierType mod; - - if(macros == NULL) - return; - - while(macros[i].shortcut != NULL) - { - macros[i].closure = g_cclosure_new_swap(G_CALLBACK(shortcut_callback), (gpointer)i, NULL); - gtk_accelerator_parse(macros[i].shortcut, &acc_key, &mod); - if(acc_key != 0) - gtk_accel_group_connect(shortcuts, acc_key, mod, GTK_ACCEL_MASK, macros[i].closure); - i++; - } + long i = 0; + guint acc_key; + GdkModifierType mod; + + if(macros == NULL) + return; + + while(macros[i].shortcut != NULL) + { + macros[i].closure = g_cclosure_new_swap(G_CALLBACK(shortcut_callback), (gpointer)i, NULL); + gtk_accelerator_parse(macros[i].shortcut, &acc_key, &mod); + if(acc_key != 0) + gtk_accel_group_connect(shortcuts, acc_key, mod, GTK_ACCEL_MASK, macros[i].closure); + i++; + } } static void macros_destroy(void) { - gint i = 0; + gint i = 0; - if(macros == NULL) - return; + if(macros == NULL) + return; - while(macros[i].shortcut != NULL) - { - g_free(macros[i].shortcut); - g_free(macros[i].action); - /* - g_closure_unref(macros[i].closure); - */ - i++; - } - g_free(macros); - macros = NULL; + while(macros[i].shortcut != NULL) + { + g_free(macros[i].shortcut); + g_free(macros[i].action); + /* + g_closure_unref(macros[i].closure); + */ + i++; + } + g_free(macros); + macros = NULL; } void remove_shortcuts(void) { - gint i = 0; + gint i = 0; - if(macros == NULL) - return; + if(macros == NULL) + return; - while(macros[i].shortcut != NULL) - { - gtk_accel_group_disconnect(shortcuts, macros[i].closure); - i++; - } + while(macros[i].shortcut != NULL) + { + gtk_accel_group_disconnect(shortcuts, macros[i].closure); + i++; + } - macros_destroy(); + macros_destroy(); } static GtkTreeModel *create_model(void) { - gint i = 0; - GtkListStore *store; - GtkTreeIter iter; - - /* create list store */ - store = gtk_list_store_new (NUM_COLUMNS, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_BOOLEAN, - G_TYPE_BOOLEAN); - - /* add data to the list store */ - if(macros != NULL) - { - while(1) - { - if(macros[i].shortcut == NULL) - break; - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - COLUMN_SHORTCUT, macros[i].shortcut, - COLUMN_ACTION, macros[i].action, - -1); - i++; + gint i = 0; + GtkListStore *store; + GtkTreeIter iter; + + /* create list store */ + store = gtk_list_store_new (NUM_COLUMNS, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); + + /* add data to the list store */ + if(macros != NULL) + { + while(1) + { + if(macros[i].shortcut == NULL) + break; + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + COLUMN_SHORTCUT, macros[i].shortcut, + COLUMN_ACTION, macros[i].action, + -1); + i++; + } } - } - return GTK_TREE_MODEL(store); + return GTK_TREE_MODEL(store); } static gboolean shortcut_edited (GtkCellRendererText *cell, - const gchar *path_string, - const gchar *new_text, - gpointer data) + const gchar *path_string, + const gchar *new_text, + gpointer data) { - GtkTreeModel *model = (GtkTreeModel *)data; - GtkTreePath *path = gtk_tree_path_new_from_string (path_string); - GtkTreeIter iter; + GtkTreeModel *model = (GtkTreeModel *)data; + GtkTreePath *path = gtk_tree_path_new_from_string (path_string); + GtkTreeIter iter; - gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get_iter(model, &iter, path); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_ACTION, new_text, -1); - gtk_tree_path_free (path); + gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_ACTION, new_text, -1); + gtk_tree_path_free (path); - return TRUE; + return TRUE; } static void add_columns (GtkTreeView *treeview) { - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - GtkTreeModel *model = gtk_tree_view_get_model (treeview); - - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), - renderer, - "text", - COLUMN_SHORTCUT, - NULL); - gtk_tree_view_column_set_sort_column_id (column, COLUMN_SHORTCUT); - gtk_tree_view_append_column (treeview, column); - - renderer = gtk_cell_renderer_text_new (); - g_signal_connect (renderer, "edited", G_CALLBACK(shortcut_edited), model); - column = gtk_tree_view_column_new_with_attributes ("Action", renderer, "text", COLUMN_ACTION, NULL); - g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL); - gtk_tree_view_column_set_sort_column_id (column, COLUMN_ACTION); - gtk_tree_view_append_column (treeview, column); + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeModel *model = gtk_tree_view_get_model (treeview); + + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), + renderer, + "text", + COLUMN_SHORTCUT, + NULL); + gtk_tree_view_column_set_sort_column_id (column, COLUMN_SHORTCUT); + gtk_tree_view_append_column (treeview, column); + + renderer = gtk_cell_renderer_text_new (); + g_signal_connect (renderer, "edited", G_CALLBACK(shortcut_edited), model); + column = gtk_tree_view_column_new_with_attributes ("Action", renderer, "text", COLUMN_ACTION, NULL); + g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL); + gtk_tree_view_column_set_sort_column_id (column, COLUMN_ACTION); + gtk_tree_view_append_column (treeview, column); } static gint Add_shortcut(GtkWidget *button, gpointer pointer) { - GtkTreeIter iter; - GtkTreeModel *model = (GtkTreeModel *)pointer; + GtkTreeIter iter; + GtkTreeModel *model = (GtkTreeModel *)pointer; - gtk_list_store_append(GTK_LIST_STORE(model), &iter); + gtk_list_store_append(GTK_LIST_STORE(model), &iter); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_SHORTCUT, "None", -1); + gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_SHORTCUT, "None", -1); - return FALSE; + return FALSE; } static gboolean Delete_shortcut(GtkWidget *button, gpointer pointer) { - GtkTreeIter iter; - GtkTreeView *treeview = (GtkTreeView *)pointer; - GtkTreeModel *model = gtk_tree_view_get_model (treeview); - GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); - - if (gtk_tree_selection_get_selected (selection, NULL, &iter)) - { - gint i; - GtkTreePath *path; - - path = gtk_tree_model_get_path(model, &iter); - i = gtk_tree_path_get_indices(path)[0]; - gtk_list_store_remove (GTK_LIST_STORE (model), &iter); + GtkTreeIter iter; + GtkTreeView *treeview = (GtkTreeView *)pointer; + GtkTreeModel *model = gtk_tree_view_get_model (treeview); + GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); + + if (gtk_tree_selection_get_selected (selection, NULL, &iter)) + { + gint i; + GtkTreePath *path; + + path = gtk_tree_model_get_path(model, &iter); + i = gtk_tree_path_get_indices(path)[0]; + gtk_list_store_remove (GTK_LIST_STORE (model), &iter); - gtk_tree_path_free (path); - } + gtk_tree_path_free (path); + } - return FALSE; + return FALSE; } static gboolean Save_shortcuts(GtkWidget *button, gpointer pointer) { - GtkTreeIter iter; - GtkTreeView *treeview = (GtkTreeView *)pointer; - GtkTreeModel *model = gtk_tree_view_get_model (treeview); - gint i = 0; + GtkTreeIter iter; + GtkTreeView *treeview = (GtkTreeView *)pointer; + GtkTreeModel *model = gtk_tree_view_get_model (treeview); + gint i = 0; - remove_shortcuts(); + remove_shortcuts(); - if(gtk_tree_model_get_iter_first(model, &iter)) - { - do + if(gtk_tree_model_get_iter_first(model, &iter)) { - i++; - } while(gtk_tree_model_iter_next(model, &iter)); + do + { + i++; + } + while(gtk_tree_model_iter_next(model, &iter)); - gtk_tree_model_get_iter_first(model, &iter); + gtk_tree_model_get_iter_first(model, &iter); - macros = g_malloc((i + 1) * sizeof(macro_t)); - i = 0; - if(macros != NULL) - { - do - { - gtk_tree_model_get(model, &iter, COLUMN_SHORTCUT, &(macros[i].shortcut), \ - COLUMN_ACTION, &(macros[i].action), \ - -1); - i++; - } while(gtk_tree_model_iter_next(model, &iter)); + macros = g_malloc((i + 1) * sizeof(macro_t)); + i = 0; + if(macros != NULL) + { + do + { + gtk_tree_model_get(model, &iter, COLUMN_SHORTCUT, &(macros[i].shortcut), \ + COLUMN_ACTION, &(macros[i].action), \ + -1); + i++; + } + while(gtk_tree_model_iter_next(model, &iter)); - macros[i].shortcut = NULL; - macros[i].action = NULL; + macros[i].shortcut = NULL; + macros[i].action = NULL; + } } - } - add_shortcuts(); + add_shortcuts(); - return FALSE; + return FALSE; } static gboolean key_pressed(GtkWidget *window, GdkEventKey *key, gpointer pointer) { - GtkTreeIter iter; - GtkTreeView *treeview = (GtkTreeView *)pointer; - GtkTreeModel *model = gtk_tree_view_get_model (treeview); - GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); - gchar *str = NULL; - - switch(key->keyval) - { - case GDK_Shift_L: - case GDK_Shift_R: - case GDK_Control_L: - case GDK_Control_R: - case GDK_Caps_Lock: - case GDK_Shift_Lock: - case GDK_Meta_L: - case GDK_Meta_R: - case GDK_Alt_L: - case GDK_Alt_R: - case GDK_Super_L: - case GDK_Super_R: - case GDK_Hyper_L: - case GDK_Hyper_R: - case GDK_Mode_switch: - return FALSE; - default: - break; - } - - if(gtk_tree_selection_get_selected(selection, NULL, &iter)) - { - gint i; - GtkTreePath *path; - - path = gtk_tree_model_get_path(model, &iter); - i = gtk_tree_path_get_indices(path)[0]; - str = gtk_accelerator_name(key->keyval, key->state & ~GDK_MOD2_MASK); - gtk_list_store_set(GTK_LIST_STORE (model), &iter, COLUMN_SHORTCUT, str, -1); - - gtk_tree_path_free(path); - g_free(str); - - g_signal_handlers_disconnect_by_func(window, G_CALLBACK(key_pressed), pointer); - } - return FALSE; + GtkTreeIter iter; + GtkTreeView *treeview = (GtkTreeView *)pointer; + GtkTreeModel *model = gtk_tree_view_get_model (treeview); + GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); + gchar *str = NULL; + + switch(key->keyval) + { + case GDK_KEY_Shift_L: + case GDK_KEY_Shift_R: + case GDK_KEY_Control_L: + case GDK_KEY_Control_R: + case GDK_KEY_Caps_Lock: + case GDK_KEY_Shift_Lock: + case GDK_KEY_Meta_L: + case GDK_KEY_Meta_R: + case GDK_KEY_Alt_L: + case GDK_KEY_Alt_R: + case GDK_KEY_Super_L: + case GDK_KEY_Super_R: + case GDK_KEY_Hyper_L: + case GDK_KEY_Hyper_R: + case GDK_KEY_Mode_switch: + return FALSE; + default: + break; + } + + if(gtk_tree_selection_get_selected(selection, NULL, &iter)) + { + gint i; + GtkTreePath *path; + + path = gtk_tree_model_get_path(model, &iter); + i = gtk_tree_path_get_indices(path)[0]; + str = gtk_accelerator_name(key->keyval, key->state & ~GDK_MOD2_MASK); + gtk_list_store_set(GTK_LIST_STORE (model), &iter, COLUMN_SHORTCUT, str, -1); + + gtk_tree_path_free(path); + g_free(str); + + g_signal_handlers_disconnect_by_func(window, G_CALLBACK(key_pressed), pointer); + } + return FALSE; } static gboolean Capture_shortcut(GtkWidget *button, gpointer pointer) { - g_signal_connect_after(window, "key_press_event", G_CALLBACK(key_pressed), pointer); + g_signal_connect_after(window, "key_press_event", G_CALLBACK(key_pressed), pointer); - return FALSE; + return FALSE; } static gboolean Help_screen(GtkWidget *button, gpointer pointer) { - GtkWidget *Dialogue, *Label, *Bouton, *Frame; + GtkWidget *Dialog; - Dialogue = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(Dialogue), _("Help on macros")); - Bouton = gtk_button_new_from_stock (GTK_STOCK_OK); - gtk_signal_connect_object(GTK_OBJECT(Bouton), "clicked", (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(Dialogue)); - gtk_signal_connect(GTK_OBJECT(Dialogue), "destroy", (GtkSignalFunc)gtk_widget_destroy, NULL); - gtk_signal_connect(GTK_OBJECT(Dialogue), "delete_event", (GtkSignalFunc)gtk_widget_destroy, NULL); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Dialogue)->action_area), Bouton, TRUE, TRUE, 0); + Dialog = gtk_message_dialog_new(pointer, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, + _("The \"action\" field of a macro is the data to be sent on the port. Text can be entered, but also special chars, like \\n, \\t, \\r, etc. You can also enter hexadecimal data preceded by a '\\'. The hexadecimal data should not begin with a letter (eg. use \\0FF and not \\FF)\nExamples :\n\t\"Hello\\n\" sends \"Hello\" followed by a Line Feed\n\t\"Hello\\0A\" does the same thing but the LF is entered in hexadecimal")); - Label = gtk_label_new(_("The \"action\" field of a macro is the data to be sent on the port. Text can be entered, but also special chars, like \\n, \\t, \\r, etc. You can also enter hexadecimal data preceded by a '\\'. The hexadecimal data should not begin with a letter (eg. use \\0FF and not \\FF)\nExamples :\n\t\"Hello\\n\" sends \"Hello\" followed by a Line Feed\n\t\"Hello\\0A\" does the same thing but the LF is entered in hexadecimal")); - gtk_label_set_line_wrap(GTK_LABEL (Label), TRUE); - gtk_label_set_selectable(GTK_LABEL(Label), TRUE); - gtk_misc_set_padding(GTK_MISC(Label), 10, 10); + gtk_dialog_run(GTK_DIALOG (Dialog)); + gtk_widget_destroy(Dialog); - Frame = gtk_frame_new(NULL); - gtk_container_set_border_width(GTK_CONTAINER(Frame), 5); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Dialogue)->vbox), Frame, FALSE, FALSE, 0); - gtk_container_add(GTK_CONTAINER(Frame), Label); - - gtk_widget_show_all(Dialogue); - - return FALSE; + return FALSE; } -gint Config_macros(GtkWidget *wid, guint param) +void Config_macros(GtkAction *action, gpointer data) { - GtkWidget *vbox, *hbox; - GtkWidget *sw; - GtkTreeModel *model; - GtkWidget *treeview; - GtkWidget *button; - GtkWidget *separator; - - /* create window, etc */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), _("Configure Macros")); + GtkWidget *vbox, *hbox; + GtkWidget *sw; + GtkTreeModel *model; + GtkWidget *treeview; + GtkWidget *button; + GtkWidget *separator; - g_signal_connect (window, "destroy", - G_CALLBACK (gtk_widget_destroyed), &window); - gtk_container_set_border_width (GTK_CONTAINER (window), 8); + /* create window, etc */ + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (window), _("Configure Macros")); - vbox = gtk_vbox_new (FALSE, 8); - gtk_container_add (GTK_CONTAINER (window), vbox); + g_signal_connect (window, "destroy", + G_CALLBACK (gtk_widget_destroyed), &window); + gtk_container_set_border_width (GTK_CONTAINER (window), 8); - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), - GTK_SHADOW_ETCHED_IN); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); + gtk_container_add (GTK_CONTAINER (window), vbox); - /* create tree model */ - model = create_model (); + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), + GTK_SHADOW_ETCHED_IN); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0); - /* create tree view */ - treeview = gtk_tree_view_new_with_model (model); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); - gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview), - COLUMN_SHORTCUT); + /* create tree model */ + model = create_model (); - g_object_unref (model); + /* create tree view */ + treeview = gtk_tree_view_new_with_model (model); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); + gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview), + COLUMN_SHORTCUT); - gtk_container_add (GTK_CONTAINER (sw), treeview); + g_object_unref (model); - /* add columns to the tree view */ - add_columns (GTK_TREE_VIEW (treeview)); + gtk_container_add (GTK_CONTAINER (sw), treeview); - hbox = gtk_hbox_new (TRUE, 4); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + /* add columns to the tree view */ + add_columns (GTK_TREE_VIEW (treeview)); - button = gtk_button_new_with_mnemonic (_("_Add")); - g_signal_connect(button, "clicked", G_CALLBACK(Add_shortcut), (gpointer)model); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); + gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - button = gtk_button_new_with_mnemonic (_("_Delete")); - g_signal_connect(button, "clicked", G_CALLBACK(Delete_shortcut), (gpointer)treeview); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); + button = gtk_button_new_with_mnemonic (_("_Add")); + g_signal_connect(button, "clicked", G_CALLBACK(Add_shortcut), (gpointer)model); + gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); - button = gtk_button_new_with_mnemonic (_("_Capture Shortcut")); - g_signal_connect(button, "clicked", G_CALLBACK(Capture_shortcut), (gpointer)treeview); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); + button = gtk_button_new_with_mnemonic (_("_Delete")); + g_signal_connect(button, "clicked", G_CALLBACK(Delete_shortcut), (gpointer)treeview); + gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); - separator = gtk_hseparator_new(); - gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0); + button = gtk_button_new_with_mnemonic (_("_Capture Shortcut")); + g_signal_connect(button, "clicked", G_CALLBACK(Capture_shortcut), (gpointer)treeview); + gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); - hbox = gtk_hbox_new (TRUE, 4); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); + gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0); - button = gtk_button_new_from_stock (GTK_STOCK_HELP); - g_signal_connect(button, "clicked", G_CALLBACK(Help_screen), NULL); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); + gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - button = gtk_button_new_from_stock (GTK_STOCK_OK); - g_signal_connect(button, "clicked", G_CALLBACK(Save_shortcuts), (gpointer)treeview); - g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)window); - gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0); + button = gtk_button_new_from_stock (GTK_STOCK_HELP); + g_signal_connect(button, "clicked", G_CALLBACK(Help_screen), (gpointer)window); + gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); - button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); - g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)window); - gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0); + button = gtk_button_new_from_stock (GTK_STOCK_OK); + g_signal_connect(button, "clicked", G_CALLBACK(Save_shortcuts), (gpointer)treeview); + g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)window); + gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0); - gtk_window_set_default_size (GTK_WINDOW(window), 300, 400); + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)window); + gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0); - gtk_widget_show_all(window); + gtk_window_set_default_size (GTK_WINDOW(window), 300, 400); - return FALSE; + gtk_widget_show_all(window); } diff -Nru gtkterm-0.99.7~rc1/src/macros.h gtkterm-0.99.7+git9d63182/src/macros.h --- gtkterm-0.99.7~rc1/src/macros.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/macros.h 2017-11-17 16:09:59.000000000 +0000 @@ -17,13 +17,13 @@ typedef struct { - gchar *shortcut; - gchar *action; - GClosure *closure; + gchar *shortcut; + gchar *action; + GClosure *closure; } macro_t; -gint Config_macros(GtkWidget *, guint); +void Config_macros(GtkAction *action, gpointer data); void remove_shortcuts(void); void add_shortcuts(void); void create_shortcuts(macro_t *, gint); diff -Nru gtkterm-0.99.7~rc1/src/Makefile.am gtkterm-0.99.7+git9d63182/src/Makefile.am --- gtkterm-0.99.7~rc1/src/Makefile.am 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/Makefile.am 2017-11-17 16:09:58.000000000 +0000 @@ -1,17 +1,33 @@ +# GtkTerm src/Makefile.am + +AM_CFLAGS = $(gtk_CFLAGS) $(vte_CFLAGS) + bin_PROGRAMS = gtkterm -AM_CFLAGS = @GTK_CFLAGS@ @VTE_CFLAGS@ @GNUCFLAGS@ +# Rules to compile GResources +resources=$(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gresource.xml) +gresource.c: gresource.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-source --target=$@ gresource.xml + +gresource.h: gresource.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-header --target=$@ gresource.xml + +gicon.c: gicon.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-source --target=$@ gicon.xml + +gicon.h: gicon.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-header --target=$@ gicon.xml gtkterm_SOURCES = \ - term_config.c \ - fichier.c \ + term_config.c \ + files.c \ gtkterm.c \ - serie.c \ + serial.c \ config.h \ - fichier.h \ - serie.h \ - widgets.c \ - widgets.h \ + files.h \ + serial.h \ + interface.c \ + interface.h \ cmdline.c \ cmdline.h \ parsecfg.c \ @@ -24,11 +40,21 @@ i18n.h \ auto_config.h \ logging.c \ - logging.h + logging.h \ + gresource.c \ + gresource.h \ + gicon.c \ + gicon.h + +BUILT_SOURCES = \ + gresource.c \ + gresource.h \ + gicon.c \ + gicon.h -gtkterm_LDADD = @GTK_LIBS@ @VTE_LIBS@ +gtkterm_LDADD = $(gtk_LIBS) $(vte_LIBS) -CLEANFILES = *~ +CLEANFILES = $(BUILT_SOURCES) *~ -INCLUDES = -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = -DLOCALEDIR=\""$(localedir)"\" diff -Nru gtkterm-0.99.7~rc1/src/Makefile.in gtkterm-0.99.7+git9d63182/src/Makefile.in --- gtkterm-0.99.7~rc1/src/Makefile.in 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/Makefile.in 2017-11-17 16:09:58.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,7 +14,64 @@ @SET_MAKE@ +# GtkTerm src/Makefile.am + VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,47 +90,80 @@ POST_UNINSTALL = : bin_PROGRAMS = gtkterm$(EXEEXT) subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_gtkterm_OBJECTS = term_config.$(OBJEXT) fichier.$(OBJEXT) \ - gtkterm.$(OBJEXT) serie.$(OBJEXT) widgets.$(OBJEXT) \ +am_gtkterm_OBJECTS = term_config.$(OBJEXT) files.$(OBJEXT) \ + gtkterm.$(OBJEXT) serial.$(OBJEXT) interface.$(OBJEXT) \ cmdline.$(OBJEXT) parsecfg.$(OBJEXT) buffer.$(OBJEXT) \ - macros.$(OBJEXT) i18n.$(OBJEXT) logging.$(OBJEXT) + macros.$(OBJEXT) i18n.$(OBJEXT) logging.$(OBJEXT) \ + gresource.$(OBJEXT) gicon.$(OBJEXT) gtkterm_OBJECTS = $(am_gtkterm_OBJECTS) -gtkterm_DEPENDENCIES = +am__DEPENDENCIES_1 = +gtkterm_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(gtkterm_SOURCES) DIST_SOURCES = $(gtkterm_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -84,15 +173,12 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ @@ -101,32 +187,30 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMOFILES = @GMOFILES@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GMSGFMT = @GMSGFMT@ GNUCFLAGS = @GNUCFLAGS@ GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -140,17 +224,11 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ -VTE_CFLAGS = @VTE_CFLAGS@ -VTE_LIBS = @VTE_LIBS@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -170,11 +248,15 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +gtk_CFLAGS = @gtk_CFLAGS@ +gtk_LIBS = @gtk_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -186,6 +268,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -194,17 +277,22 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CFLAGS = @GTK_CFLAGS@ @VTE_CFLAGS@ @GNUCFLAGS@ +vte_CFLAGS = @vte_CFLAGS@ +vte_LIBS = @vte_LIBS@ +AM_CFLAGS = $(gtk_CFLAGS) $(vte_CFLAGS) + +# Rules to compile GResources +resources = $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gresource.xml) gtkterm_SOURCES = \ - term_config.c \ - fichier.c \ + term_config.c \ + files.c \ gtkterm.c \ - serie.c \ + serial.c \ config.h \ - fichier.h \ - serie.h \ - widgets.c \ - widgets.h \ + files.h \ + serial.h \ + interface.c \ + interface.h \ cmdline.c \ cmdline.h \ parsecfg.c \ @@ -217,12 +305,23 @@ i18n.h \ auto_config.h \ logging.c \ - logging.h - -gtkterm_LDADD = @GTK_LIBS@ @VTE_LIBS@ -CLEANFILES = *~ -INCLUDES = -DLOCALEDIR=\""$(localedir)"\" -all: all-am + logging.h \ + gresource.c \ + gresource.h \ + gicon.c \ + gicon.h + +BUILT_SOURCES = \ + gresource.c \ + gresource.h \ + gicon.c \ + gicon.h + +gtkterm_LDADD = $(gtk_LIBS) $(vte_LIBS) +CLEANFILES = $(BUILT_SOURCES) *~ +AM_CPPFLAGS = -DLOCALEDIR=\""$(localedir)"\" +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj @@ -235,10 +334,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile + $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -258,14 +356,18 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -286,14 +388,16 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -gtkterm$(EXEEXT): $(gtkterm_OBJECTS) $(gtkterm_DEPENDENCIES) + +gtkterm$(EXEEXT): $(gtkterm_OBJECTS) $(gtkterm_DEPENDENCIES) $(EXTRA_gtkterm_DEPENDENCIES) @rm -f gtkterm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gtkterm_OBJECTS) $(gtkterm_LDADD) $(LIBS) @@ -305,52 +409,41 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fichier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gicon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gresource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkterm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i18n.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macros.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsecfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serie.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term_config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgets.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -362,15 +455,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -379,6 +468,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -414,13 +518,15 @@ fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -430,10 +536,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -446,6 +557,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am @@ -515,21 +627,35 @@ uninstall-am: uninstall-binPROGRAMS -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS + +.PRECIOUS: Makefile + +gresource.c: gresource.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-source --target=$@ gresource.xml + +gresource.h: gresource.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-header --target=$@ gresource.xml -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS +gicon.c: gicon.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-source --target=$@ gicon.xml +gicon.h: gicon.xml $(resources) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --generate-header --target=$@ gicon.xml # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gtkterm-0.99.7~rc1/src/parsecfg.c gtkterm-0.99.7+git9d63182/src/parsecfg.c --- gtkterm-0.99.7~rc1/src/parsecfg.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/parsecfg.c 2017-11-17 16:09:59.000000000 +0000 @@ -108,22 +108,27 @@ int max_cfg = -1; fp = fopen(file, "r"); - if (fp == NULL) { + if (fp == NULL) + { cfgFatal(CFG_OPEN_FAIL, file, 0, NULL); return (-1); } - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) { - switch (type) { + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) + { + switch (type) + { case CFG_SIMPLE: - if ((error_code = parse_simple(file, fp, ptr, cfg, &line)) != CFG_NO_ERROR) { + if ((error_code = parse_simple(file, fp, ptr, cfg, &line)) != CFG_NO_ERROR) + { fclose(fp); cfgFatal(error_code, file, line, line_buf); return (-1); } break; case CFG_INI: - if ((error_code = parse_ini(file, fp, ptr, cfg, &line, &max_cfg)) != CFG_NO_ERROR) { + if ((error_code = parse_ini(file, fp, ptr, cfg, &line, &max_cfg)) != CFG_NO_ERROR) + { fclose(fp); cfgFatal(error_code, file, line, line_buf); return (-1); @@ -160,12 +165,14 @@ int retcode; fp = fopen(file, "w"); - if (fp == NULL) { + if (fp == NULL) + { cfgFatal(CFG_CREATE_FAIL, file, 0, NULL); return (-1); } - switch (type) { + switch (type) + { case CFG_SIMPLE: retcode = dump_simple(fp, cfg, type); break; @@ -202,20 +209,24 @@ FILE *fp; fp = fopen(file, "r"); - if (fp == NULL) { + if (fp == NULL) + { cfgFatal(CFG_OPEN_FAIL, file, 0, NULL); return (-1); } - switch (file_type) { + switch (file_type) + { case CFG_SIMPLE: - if (fetch_simple(file, fp, parameter_name, result_value, value_type) == 0) { + if (fetch_simple(file, fp, parameter_name, result_value, value_type) == 0) + { fclose(fp); return (0); } break; case CFG_INI: - if (fetch_ini(file, fp, parameter_name, result_value, value_type, section_num, section_name) == 0) { + if (fetch_ini(file, fp, parameter_name, result_value, value_type, section_num, section_name) == 0) + { fclose(fp); return (0); } @@ -241,8 +252,10 @@ { int i; - for (i = 0; i < parsecfg_maximum_section; i++) { - if (strcasecmp(name, parsecfg_section_name[i]) == 0) { + for (i = 0; i < parsecfg_maximum_section; i++) + { + if (strcasecmp(name, parsecfg_section_name[i]) == 0) + { return (i); } } @@ -259,7 +272,8 @@ -------------------------------------------------- */ char *cfgSectionNumberToName(int num) { - if (num > parsecfg_maximum_section - 1 || num < 0) { + if (num > parsecfg_maximum_section - 1 || num < 0) + { return (NULL); } return (parsecfg_section_name[num]); @@ -282,7 +296,8 @@ section = parsecfg_maximum_section - 1; result = alloc_for_new_section(cfg, §ion); - if (result != CFG_NO_ERROR) { + if (result != CFG_NO_ERROR) + { cfgFatalFunc(result, "unknown", 0, ""); return (-1); } @@ -309,7 +324,8 @@ int result; result = store_value(cfg, parameter, value, type, section); - if (result != CFG_NO_ERROR) { + if (result != CFG_NO_ERROR) + { cfgFatalFunc(result, "unknown", 0, ""); return (-1); } @@ -332,7 +348,8 @@ -------------------------------------------------- */ static void cfgFatalFunc(cfgErrorCode error_code, const char *file, int line, const char *str) { - switch (error_code) { + switch (error_code) + { case CFG_OPEN_FAIL: i18n_fprintf(stderr, _("Cannot open configuration file `%s'.\n"), file); break; @@ -395,24 +412,32 @@ parameter_buf = ptr; parameter_line = *line; - if ((ptr = parse_word(ptr, ¶meter, CFG_PARAMETER)) == NULL) { /* malloc parameter */ + if ((ptr = parse_word(ptr, ¶meter, CFG_PARAMETER)) == NULL) /* malloc parameter */ + { return (CFG_SYNTAX_ERROR); } - if (*ptr == '{') { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { free(parameter); return (CFG_SYNTAX_ERROR); } - if (parse_values_between_braces(file, fp, parameter, cfg, line, CFG_SIMPLE, 0, parameter_buf, parameter_line) != CFG_NO_ERROR) { + if (parse_values_between_braces(file, fp, parameter, cfg, line, CFG_SIMPLE, 0, parameter_buf, parameter_line) != CFG_NO_ERROR) + { return (CFG_JUST_RETURN_WITHOUT_MSG); /* error handling has already done */ } - } else { - if ((ptr = parse_word(ptr, &value, CFG_VALUE)) == NULL) { /* malloc value */ + } + else + { + if ((ptr = parse_word(ptr, &value, CFG_VALUE)) == NULL) /* malloc value */ + { free(parameter); return (CFG_SYNTAX_ERROR); } - if ((error_code = store_value(cfg, parameter, value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) { + if ((error_code = store_value(cfg, parameter, value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) + { free(parameter); free(value); return (error_code); @@ -441,7 +466,8 @@ int len = 0; cfgQuote quote_flag; - switch (*ptr) { + switch (*ptr) + { case '\"': quote_flag = CFG_DOUBLE_QUOTE; ptr++; @@ -454,26 +480,37 @@ quote_flag = CFG_NO_QUOTE; } - for (;;) { - if (quote_flag == CFG_NO_QUOTE) { - if (*(ptr + len) == ' ' || *(ptr + len) == '\t' || *(ptr + len) == '\0' || *(ptr + len) == '#' || (*(ptr + len) == '=' && word_type == CFG_PARAMETER) || (*(ptr + len) == ']' && word_type == CFG_SECTION)) { + for (;;) + { + if (quote_flag == CFG_NO_QUOTE) + { + if (*(ptr + len) == ' ' || *(ptr + len) == '\t' || *(ptr + len) == '\0' || *(ptr + len) == '#' || (*(ptr + len) == '=' && word_type == CFG_PARAMETER) || (*(ptr + len) == ']' && word_type == CFG_SECTION)) + { break; } - } else if (quote_flag == CFG_DOUBLE_QUOTE) { - if (*(ptr + len) == '\"') { + } + else if (quote_flag == CFG_DOUBLE_QUOTE) + { + if (*(ptr + len) == '\"') + { break; } - } else if (quote_flag == CFG_SINGLE_QUOTE) { - if (*(ptr + len) == '\'') { + } + else if (quote_flag == CFG_SINGLE_QUOTE) + { + if (*(ptr + len) == '\'') + { break; } } - if (*(ptr + len) == '\0') { + if (*(ptr + len) == '\0') + { return (NULL); } len++; } - if ((*word = malloc(len + 1)) == NULL) { + if ((*word = malloc(len + 1)) == NULL) + { cfgFatalFunc(CFG_MEM_ALLOC_FAIL, "unknown", 0, ""); return (NULL); } @@ -484,9 +521,11 @@ ptr = rm_first_spaces(ptr); - switch (word_type) { + switch (word_type) + { case CFG_PARAMETER: - if (*ptr != '=') { + if (*ptr != '=') + { free(*word); return (NULL); } @@ -494,13 +533,15 @@ ptr = rm_first_spaces(ptr); break; case CFG_VALUE: - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { free(*word); return (NULL); } break; case CFG_SECTION: - if (*ptr != ']') { + if (*ptr != ']') + { free(*word); return (NULL); } @@ -535,22 +576,34 @@ cfgList *listptr; - for (num = 0; cfg[num].type != CFG_END; num++) { - if (strcasecmp(parameter, cfg[num].parameterName) == 0) { + for (num = 0; cfg[num].type != CFG_END; num++) + { + if (strcasecmp(parameter, cfg[num].parameterName) == 0) + { errno = 0; - switch (cfg[num].type) { + switch (cfg[num].type) + { case CFG_BOOL: - if (strcasecmp(value, "TRUE") == 0 || strcasecmp(value, "YES") == 0 || strcasecmp(value, "T") == 0 || strcasecmp(value, "Y") == 0 || strcasecmp(value, "1") == 0) { - if (type == CFG_INI) { + if (strcasecmp(value, "TRUE") == 0 || strcasecmp(value, "YES") == 0 || strcasecmp(value, "T") == 0 || strcasecmp(value, "Y") == 0 || strcasecmp(value, "1") == 0) + { + if (type == CFG_INI) + { *(*(int **) (cfg[num].value) + section) = 1; - } else { + } + else + { *(int *) (cfg[num].value) = 1; } return (CFG_NO_ERROR); - } else if (strcasecmp(value, "FALSE") == 0 || strcasecmp(value, "NO") == 0 || strcasecmp(value, "F") == 0 || strcasecmp(value, "N") == 0 || strcasecmp(value, "0") == 0) { - if (type == CFG_INI) { + } + else if (strcasecmp(value, "FALSE") == 0 || strcasecmp(value, "NO") == 0 || strcasecmp(value, "F") == 0 || strcasecmp(value, "N") == 0 || strcasecmp(value, "0") == 0) + { + if (type == CFG_INI) + { *(*(int **) (cfg[num].value) + section) = 0; - } else { + } + else + { *(int *) (cfg[num].value) = 0; } return (CFG_NO_ERROR); @@ -558,101 +611,138 @@ return (CFG_BOOL_ERROR); case CFG_STRING: - if ((strptr = malloc(strlen(value) + 1)) == NULL) { + if ((strptr = malloc(strlen(value) + 1)) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } strcpy(strptr, value); - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(char ***) (cfg[num].value) + section) = strptr; - } else { + } + else + { *(char **) (cfg[num].value) = strptr; } return (CFG_NO_ERROR); case CFG_INT: tmp = strtol(value, &endptr, 0); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE || tmp > INT_MAX || tmp < INT_MIN) { + if (errno == ERANGE || tmp > INT_MAX || tmp < INT_MIN) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(int **) (cfg[num].value) + section) = tmp; - } else { + } + else + { *(int *) (cfg[num].value) = tmp; } return (CFG_NO_ERROR); case CFG_UINT: utmp = strtoul(value, &endptr, 0); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE || utmp > UINT_MAX) { + if (errno == ERANGE || utmp > UINT_MAX) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(unsigned int **) (cfg[num].value) + section) = utmp; - } else { + } + else + { *(unsigned int *) (cfg[num].value) = utmp; } return (CFG_NO_ERROR); case CFG_LONG: tmp = strtol(value, &endptr, 0); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE) { + if (errno == ERANGE) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(long **) (cfg[num].value) + section) = tmp; - } else { + } + else + { *(long *) (cfg[num].value) = tmp; } return (CFG_NO_ERROR); case CFG_ULONG: utmp = strtoul(value, &endptr, 0); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE) { + if (errno == ERANGE) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(unsigned long **) (cfg[num].value) + section) = utmp; - } else { + } + else + { *(unsigned long *) (cfg[num].value) = utmp; } return (CFG_NO_ERROR); case CFG_STRING_LIST: - if (type == CFG_INI) { + if (type == CFG_INI) + { listptr = *(*(cfgList ***) (cfg[num].value) + section); - } else { + } + else + { listptr = *(cfgList **) (cfg[num].value); } - if (listptr != NULL) { - while (listptr->next != NULL) { + if (listptr != NULL) + { + while (listptr->next != NULL) + { listptr = listptr->next; } - if ((listptr = listptr->next = malloc(sizeof(cfgList))) == NULL) { + if ((listptr = listptr->next = malloc(sizeof(cfgList))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } - } else { - if ((listptr = malloc(sizeof(cfgList))) == NULL) { + } + else + { + if ((listptr = malloc(sizeof(cfgList))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(cfgList ***) (cfg[num].value) + section) = listptr; - } else { + } + else + { *(cfgList **) (cfg[num].value) = listptr; } } - if ((strptr = malloc(strlen(value) + 1)) == NULL) { + if ((strptr = malloc(strlen(value) + 1)) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } strcpy(strptr, value); @@ -662,30 +752,40 @@ case CFG_FLOAT: ftmp = strtod(value, &endptr); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE) { + if (errno == ERANGE) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(float **) (cfg[num].value) + section) = ftmp; - } else { + } + else + { *(float *) (cfg[num].value) = ftmp; } return (CFG_NO_ERROR); case CFG_DOUBLE: dtmp = strtod(value, &endptr); - if (*endptr) { + if (*endptr) + { return (CFG_INVALID_NUMBER); } - if (errno == ERANGE) { + if (errno == ERANGE) + { return (CFG_OUT_OF_RANGE); } - if (type == CFG_INI) { + if (type == CFG_INI) + { *(*(double **) (cfg[num].value) + section) = dtmp; - } else { + } + else + { *(double *) (cfg[num].value) = dtmp; } return (CFG_NO_ERROR); @@ -720,22 +820,28 @@ char *ptr; int error_code; - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, line)) != NULL) { - if (*ptr == '}') { + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, line)) != NULL) + { + if (*ptr == '}') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, *line, line_buf); return (CFG_JUST_RETURN_WITHOUT_MSG); } free(line_buf); return (CFG_NO_ERROR); } - if (parse_word(ptr, &value, CFG_VALUE) == NULL) { + if (parse_word(ptr, &value, CFG_VALUE) == NULL) + { cfgFatal(CFG_SYNTAX_ERROR, file, *line, line_buf); return (CFG_JUST_RETURN_WITHOUT_MSG); } - if ((error_code = store_value(cfg, parameter, value, type, section)) != CFG_NO_ERROR) { - if (error_code == CFG_WRONG_PARAMETER) { + if ((error_code = store_value(cfg, parameter, value, type, section)) != CFG_NO_ERROR) + { + if (error_code == CFG_WRONG_PARAMETER) + { cfgFatal(error_code, file, parameter_line, parameter_buf); return (CFG_JUST_RETURN_WITHOUT_MSG); } @@ -770,51 +876,67 @@ int error_code; int i; - if (*ptr == '[') { - if ((error_code = alloc_for_new_section(cfg, section)) != CFG_NO_ERROR) { + if (*ptr == '[') + { + if ((error_code = alloc_for_new_section(cfg, section)) != CFG_NO_ERROR) + { return (error_code); } ptr = rm_first_spaces(ptr + 1); parsecfg_section_name = realloc(parsecfg_section_name, sizeof(char *) * (*section + 1)); - if ((ptr = parse_word(ptr, &parsecfg_section_name[*section], CFG_SECTION)) == NULL) { + if ((ptr = parse_word(ptr, &parsecfg_section_name[*section], CFG_SECTION)) == NULL) + { return (CFG_SYNTAX_ERROR); } - for (i = 0; i < *section; i++) { - if (strcasecmp(parsecfg_section_name[*section], parsecfg_section_name[i]) == 0) { + for (i = 0; i < *section; i++) + { + if (strcasecmp(parsecfg_section_name[*section], parsecfg_section_name[i]) == 0) + { return (CFG_USED_SECTION); } } ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { return (CFG_SYNTAX_ERROR); } return (CFG_NO_ERROR); - } else if (*section == -1) { + } + else if (*section == -1) + { return (CFG_SYNTAX_ERROR); } parameter_buf = ptr; parameter_line = *line; - if ((ptr = parse_word(ptr, ¶meter, CFG_PARAMETER)) == NULL) { + if ((ptr = parse_word(ptr, ¶meter, CFG_PARAMETER)) == NULL) + { return (CFG_SYNTAX_ERROR); } - if (*ptr == '{') { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { return (CFG_SYNTAX_ERROR); } - if (parse_values_between_braces(file, fp, parameter, cfg, line, CFG_INI, *section, parameter_buf, parameter_line) != CFG_NO_ERROR) { + if (parse_values_between_braces(file, fp, parameter, cfg, line, CFG_INI, *section, parameter_buf, parameter_line) != CFG_NO_ERROR) + { return (CFG_JUST_RETURN_WITHOUT_MSG); /* error handling has already done */ } free(parameter); - } else { - if ((ptr = parse_word(ptr, &value, CFG_VALUE)) == NULL) { + } + else + { + if ((ptr = parse_word(ptr, &value, CFG_VALUE)) == NULL) + { return (CFG_SYNTAX_ERROR); } - if ((error_code = store_value(cfg, parameter, value, CFG_INI, *section)) != CFG_NO_ERROR) { + if ((error_code = store_value(cfg, parameter, value, CFG_INI, *section)) != CFG_NO_ERROR) + { return (error_code); } free(parameter); @@ -837,31 +959,40 @@ void *ptr; (*section)++; - for (num = 0; cfg[num].type != CFG_END; num++) { - switch (cfg[num].type) { + for (num = 0; cfg[num].type != CFG_END; num++) + { + switch (cfg[num].type) + { case CFG_BOOL: case CFG_INT: case CFG_UINT: - if (*section == 0) { + if (*section == 0) + { *(int **) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(int **) (cfg[num].value), sizeof(int) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(int **) (cfg[num].value), sizeof(int) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(int **) (cfg[num].value) = ptr; - if (cfg[num].type == CFG_BOOL) { + if (cfg[num].type == CFG_BOOL) + { *(*((int **) (cfg[num].value)) + *section) = -1; - } else { + } + else + { *(*((int **) (cfg[num].value)) + *section) = 0; } break; case CFG_LONG: case CFG_ULONG: - if (*section == 0) { + if (*section == 0) + { *(long **) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(long **) (cfg[num].value), sizeof(long) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(long **) (cfg[num].value), sizeof(long) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(long **) (cfg[num].value) = ptr; @@ -869,10 +1000,12 @@ break; case CFG_STRING: - if (*section == 0) { + if (*section == 0) + { *(char ***) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(char ***) (cfg[num].value), sizeof(char *) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(char ***) (cfg[num].value), sizeof(char *) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(char ***) (cfg[num].value) = ptr; @@ -880,10 +1013,12 @@ break; case CFG_STRING_LIST: - if (*section == 0) { + if (*section == 0) + { *(cfgList ***) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(cfgList ***) (cfg[num].value), sizeof(cfgList *) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(cfgList ***) (cfg[num].value), sizeof(cfgList *) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(cfgList ***) (cfg[num].value) = ptr; @@ -891,10 +1026,12 @@ break; case CFG_FLOAT: - if (*section == 0) { + if (*section == 0) + { *(float **) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(float **) (cfg[num].value), sizeof(float) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(float **) (cfg[num].value), sizeof(float) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(float **) (cfg[num].value) = ptr; @@ -902,10 +1039,12 @@ break; case CFG_DOUBLE: - if (*section == 0) { + if (*section == 0) + { *(double **) (cfg[num].value) = NULL; } - if ((ptr = realloc(*(double **) (cfg[num].value), sizeof(double) * (*section + 1))) == NULL) { + if ((ptr = realloc(*(double **) (cfg[num].value), sizeof(double) * (*section + 1))) == NULL) + { return (CFG_MEM_ALLOC_FAIL); } *(double **) (cfg[num].value) = ptr; @@ -928,7 +1067,8 @@ -------------------------------------------------- */ static char *rm_first_spaces(char *ptr) { - while (*ptr == ' ' || *ptr == '\t') { + while (*ptr == ' ' || *ptr == '\t') + { ptr++; } return (ptr); @@ -948,13 +1088,16 @@ { char *ptr; - for (;;) { - if ((*gotstr = dynamic_fgets(fp)) == NULL) { + for (;;) + { + if ((*gotstr = dynamic_fgets(fp)) == NULL) + { return (NULL); } (*line)++; ptr = rm_first_spaces(*gotstr); - if (*ptr != '#' && *ptr != '\0') { + if (*ptr != '#' && *ptr != '\0') + { return (ptr); } free(*gotstr); @@ -976,26 +1119,32 @@ int i; ptr = malloc(1); - if (ptr == NULL) { + if (ptr == NULL) + { cfgFatalFunc(CFG_MEM_ALLOC_FAIL, "unknown", 0, ""); return (NULL); } *ptr = '\0'; - for (i = 0;; i++) { - if (fgets(temp, 128, fp) == NULL) { - if (ferror(fp) != 0 || i == 0) { + for (i = 0;; i++) + { + if (fgets(temp, 128, fp) == NULL) + { + if (ferror(fp) != 0 || i == 0) + { free(ptr); return (NULL); } return (ptr); } ptr = realloc(ptr, 127 * (i + 1) + 1); - if (ptr == NULL) { + if (ptr == NULL) + { cfgFatalFunc(CFG_MEM_ALLOC_FAIL, "unknown", 0, ""); return (NULL); } strcat(ptr, temp); - if (strchr(temp, '\n') != NULL) { + if (strchr(temp, '\n') != NULL) + { *strchr(ptr, '\n') = '\0'; return (ptr); } @@ -1015,8 +1164,10 @@ char c[2]; cfgList *l; - for (i = 0; cfg[i].type != CFG_END; i++) { - switch (cfg[i].type) { + for (i = 0; cfg[i].type != CFG_END; i++) + { + switch (cfg[i].type) + { case CFG_BOOL: fprintf(fp, "%s\t= %s\n", cfg[i].parameterName, (*(int *) (cfg[i].value)) ? "True" : "False"); break; @@ -1033,14 +1184,16 @@ fprintf(fp, "%s\t= %lu\n", cfg[i].parameterName, *(unsigned long *) (cfg[i].value)); break; case CFG_STRING: - if (*(char **) (cfg[i].value) == NULL) { + if (*(char **) (cfg[i].value) == NULL) + { break; } single_or_double_quote(*(char **) (cfg[i].value), c); fprintf(fp, "%s\t= %s%s%s\n", cfg[i].parameterName, c, *(char **) (cfg[i].value), c); break; case CFG_STRING_LIST: - for (l = *(cfgList **) (cfg[i].value); l != NULL; l = l->next) { + for (l = *(cfgList **) (cfg[i].value); l != NULL; l = l->next) + { single_or_double_quote(l->str, c); fprintf(fp, "%s\t= %s%s%s\n", cfg[i].parameterName, c, l->str, c); } @@ -1072,12 +1225,15 @@ char c[2]; cfgList *l; - for (j = 0; j < max; j++) { + for (j = 0; j < max; j++) + { single_or_double_quote(cfgSectionNumberToName(j), c); fprintf(fp, "[%s%s%s]\n", c, cfgSectionNumberToName(j), c); - for (i = 0; cfg[i].type != CFG_END; i++) { - switch (cfg[i].type) { + for (i = 0; cfg[i].type != CFG_END; i++) + { + switch (cfg[i].type) + { case CFG_BOOL: fprintf(fp, "%s\t= %s\n", cfg[i].parameterName, (*(int **) (cfg[i].value))[j] ? "True" : "False"); break; @@ -1094,14 +1250,16 @@ fprintf(fp, "%s\t= %lu\n", cfg[i].parameterName, (*(unsigned long **) (cfg[i].value))[j]); break; case CFG_STRING: - if ((*(char ***) (cfg[i].value))[j] == NULL) { + if ((*(char ***) (cfg[i].value))[j] == NULL) + { break; } single_or_double_quote((*(char ***) (cfg[i].value))[j], c); fprintf(fp, "%s\t= %s%s%s\n", cfg[i].parameterName, c, (*(char ***) (cfg[i].value))[j], c); break; case CFG_STRING_LIST: - for (l = (*(cfgList ***) (cfg[i].value))[j]; l != NULL; l = l->next) { + for (l = (*(cfgList ***) (cfg[i].value))[j]; l != NULL; l = l->next) + { single_or_double_quote(l->str, c); fprintf(fp, "%s\t= %s%s%s\n", cfg[i].parameterName, c, l->str, c); } @@ -1133,11 +1291,16 @@ { ret[1] = '\0'; - if (strchr(str, '\"') != NULL) { + if (strchr(str, '\"') != NULL) + { ret[0] = '\''; - } else if (strchr(str, '\'') != NULL || strchr(str, '#') != NULL || strchr(str, '\t') != NULL || strchr(str, ' ') != NULL) { + } + else if (strchr(str, '\'') != NULL || strchr(str, '#') != NULL || strchr(str, '\t') != NULL || strchr(str, ' ') != NULL) + { ret[0] = '\"'; - } else { + } + else + { ret[0] = '\0'; } } @@ -1158,39 +1321,50 @@ char *ptr; char *read_parameter; char *read_value; - cfgStruct fetch_cfg[] = { + cfgStruct fetch_cfg[] = + { {parameter_name, value_type, result_value}, {NULL, CFG_END, NULL} }; - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) { /* malloc line_buf */ - if ((ptr = parse_word(ptr, &read_parameter, CFG_PARAMETER)) == NULL) { /* malloc read_parameter */ + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) /* malloc line_buf */ + { + if ((ptr = parse_word(ptr, &read_parameter, CFG_PARAMETER)) == NULL) /* malloc read_parameter */ + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); return (-1); } - if (strcasecmp(read_parameter, parameter_name) == 0) { - if (*ptr == '{') { + if (strcasecmp(read_parameter, parameter_name) == 0) + { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } - if (parse_values_between_braces(file, fp, parameter_name, fetch_cfg, &line, CFG_SIMPLE, 0, line_buf, line) != CFG_NO_ERROR) { + if (parse_values_between_braces(file, fp, parameter_name, fetch_cfg, &line, CFG_SIMPLE, 0, line_buf, line) != CFG_NO_ERROR) + { free(line_buf); free(read_parameter); return (-1); } - } else { - if ((ptr = parse_word(ptr, &read_value, CFG_VALUE)) == NULL) { /* malloc read_value */ + } + else + { + if ((ptr = parse_word(ptr, &read_value, CFG_VALUE)) == NULL) /* malloc read_value */ + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } - if ((error_code = store_value(fetch_cfg, parameter_name, read_value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) { + if ((error_code = store_value(fetch_cfg, parameter_name, read_value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) + { cfgFatal(error_code, file, line, line_buf); free(read_value); free(line_buf); @@ -1201,20 +1375,27 @@ } store_flag = 0; free(line_buf); - } else { - if (*ptr == '{') { + } + else + { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } free(line_buf); - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) { /* malloc line_buf */ - if (*ptr == '}') { + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) /* malloc line_buf */ + { + if (*ptr == '}') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); @@ -1251,30 +1432,37 @@ char *read_section_name; int current_section_number = 0; - cfgStruct fetch_cfg[] = { + cfgStruct fetch_cfg[] = + { {parameter_name, value_type, result_value}, {NULL, CFG_END, NULL} }; - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) { /* malloc line_buf */ - if (*ptr == '[') { - if (section_flag == 0) { + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) /* malloc line_buf */ + { + if (*ptr == '[') + { + if (section_flag == 0) + { free(line_buf); return (store_flag); } ptr = rm_first_spaces(ptr + 1); - if ((ptr = parse_word(ptr, &read_section_name, CFG_SECTION)) == NULL) { /* malloc read_section_name */ + if ((ptr = parse_word(ptr, &read_section_name, CFG_SECTION)) == NULL) /* malloc read_section_name */ + { free(line_buf); return (CFG_SYNTAX_ERROR); } ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { free(line_buf); free(read_section_name); return (CFG_SYNTAX_ERROR); } current_section_number++; - if ((section_num > 0 && current_section_number == section_num) || (section_num <= 0 && strcasecmp(read_section_name, section_name) == 0)) { + if ((section_num > 0 && current_section_number == section_num) || (section_num <= 0 && strcasecmp(read_section_name, section_name) == 0)) + { section_flag = 0; free(line_buf); free(read_section_name); @@ -1282,38 +1470,48 @@ } free(read_section_name); } - if (section_flag == -1) { + if (section_flag == -1) + { free(line_buf); continue; } - if ((ptr = parse_word(ptr, &read_parameter, CFG_PARAMETER)) == NULL) { /* malloc read_parameter */ + if ((ptr = parse_word(ptr, &read_parameter, CFG_PARAMETER)) == NULL) /* malloc read_parameter */ + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); return (-1); } - if (strcasecmp(read_parameter, parameter_name) == 0) { - if (*ptr == '{') { + if (strcasecmp(read_parameter, parameter_name) == 0) + { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } - if (parse_values_between_braces(file, fp, parameter_name, fetch_cfg, &line, CFG_SIMPLE, 0, line_buf, line) != CFG_NO_ERROR) { + if (parse_values_between_braces(file, fp, parameter_name, fetch_cfg, &line, CFG_SIMPLE, 0, line_buf, line) != CFG_NO_ERROR) + { free(line_buf); free(read_parameter); return (-1); } - } else { - if ((ptr = parse_word(ptr, &read_value, CFG_VALUE)) == NULL) { /* malloc read_value */ + } + else + { + if ((ptr = parse_word(ptr, &read_value, CFG_VALUE)) == NULL) /* malloc read_value */ + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } - if ((error_code = store_value(fetch_cfg, parameter_name, read_value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) { + if ((error_code = store_value(fetch_cfg, parameter_name, read_value, CFG_SIMPLE, 0)) != CFG_NO_ERROR) + { cfgFatal(error_code, file, line, line_buf); free(line_buf); free(read_parameter); @@ -1324,20 +1522,27 @@ } store_flag = 0; free(line_buf); - } else { - if (*ptr == '{') { + } + else + { + if (*ptr == '{') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); return (-1); } free(line_buf); - while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) { - if (*ptr == '}') { + while ((ptr = get_single_line_without_first_spaces(fp, &line_buf, &line)) != NULL) + { + if (*ptr == '}') + { ptr = rm_first_spaces(ptr + 1); - if (*ptr != '\0' && *ptr != '#') { + if (*ptr != '\0' && *ptr != '#') + { cfgFatal(CFG_SYNTAX_ERROR, file, line, line_buf); free(line_buf); free(read_parameter); diff -Nru gtkterm-0.99.7~rc1/src/parsecfg.h gtkterm-0.99.7+git9d63182/src/parsecfg.h --- gtkterm-0.99.7~rc1/src/parsecfg.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/parsecfg.h 2017-11-17 16:09:59.000000000 +0000 @@ -30,7 +30,8 @@ #define PARSECFG_VERSION "3.6.7" /* error code */ -typedef enum { +typedef enum +{ CFG_NO_ERROR, CFG_OPEN_FAIL, CFG_CREATE_FAIL, @@ -47,13 +48,15 @@ } cfgErrorCode; /* type of the configuration file */ -typedef enum { +typedef enum +{ CFG_SIMPLE, CFG_INI } cfgFileType; /* constants for recognized value types */ -typedef enum { +typedef enum +{ CFG_END, CFG_BOOL, CFG_STRING, @@ -66,26 +69,30 @@ CFG_DOUBLE } cfgValueType; -typedef enum { +typedef enum +{ CFG_PARAMETER, CFG_VALUE, CFG_SECTION } cfgKeywordValue; -typedef enum { +typedef enum +{ CFG_NO_QUOTE, CFG_SINGLE_QUOTE, CFG_DOUBLE_QUOTE } cfgQuote; -typedef struct { +typedef struct +{ char *parameterName; cfgValueType type; void *value; } cfgStruct; -typedef struct cfgList_tag { +typedef struct cfgList_tag +{ char *str; struct cfgList_tag *next; } cfgList; diff -Nru gtkterm-0.99.7~rc1/src/serial.c gtkterm-0.99.7+git9d63182/src/serial.c --- gtkterm-0.99.7~rc1/src/serial.c 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/serial.c 2017-11-17 16:09:59.000000000 +0000 @@ -0,0 +1,477 @@ +/***********************************************************************/ +/* serie.c */ +/* ------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Serial port access functions */ +/* */ +/* ChangeLog */ +/* - 0.99.7 : Removed auto crlf stuff - (use macros instead) */ +/* - 0.99.5 : changed all calls to strerror() by strerror_utf8() */ +/* - 0.99.2 : Internationalization */ +/* - 0.98.6 : new sendbreak() function */ +/* - 0.98.1 : lockfile implementation (based on minicom) */ +/* - 0.98 : removed IOChannel */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "term_config.h" +#include "serial.h" +#include "interface.h" +#include "files.h" +#include "buffer.h" +#include "i18n.h" + +#include +#include + +#ifdef HAVE_LINUX_SERIAL_H +#include +#endif + + +struct termios termios_save; +int serial_port_fd = -1; + +guint callback_handler_in, callback_handler_err; +gboolean callback_activated = FALSE; + +extern struct configuration_port config; + +gboolean Lis_port(GIOChannel* src, GIOCondition cond, gpointer data) +{ + gint bytes_read; + static gchar c[BUFFER_RECEPTION]; + guint i; + + bytes_read = BUFFER_RECEPTION; + + while(bytes_read == BUFFER_RECEPTION) + { + bytes_read = read(serial_port_fd, c, BUFFER_RECEPTION); + if(bytes_read > 0) + { + put_chars(c, bytes_read, config.crlfauto); + + if(config.car != -1 && waiting_for_char == TRUE) + { + i = 0; + while(i < bytes_read) + { + if(c[i] == config.car) + { + waiting_for_char = FALSE; + add_input(); + i = bytes_read; + } + i++; + } + } + } + else if(bytes_read == -1) + { + if(errno != EAGAIN) + perror(config.port); + } + } + + return TRUE; +} + +gboolean io_err(GIOChannel* src, GIOCondition cond, gpointer data) +{ + Close_port(); + return TRUE; +} + +int Send_chars(char *string, int length) +{ + int bytes_written = 0; + + if(serial_port_fd == -1) + return 0; + + /* Normally it never happens, but it is better not to segfault ;) */ + if(length == 0) + return 0; + + /* RS485 half-duplex mode ? */ + if( config.flux==3 ) + { + /* set RTS (start to send) */ + Set_signals( 1 ); + if( config.rs485_rts_time_before_transmit>0 ) + usleep(config.rs485_rts_time_before_transmit*1000); + } + + bytes_written = write(serial_port_fd, string, length); + + /* RS485 half-duplex mode ? */ + if( config.flux==3 ) + { + /* wait all chars are send */ + tcdrain( serial_port_fd ); + if( config.rs485_rts_time_after_transmit>0 ) + usleep(config.rs485_rts_time_after_transmit*1000); + /* reset RTS (end of send, now receiving back) */ + Set_signals( 1 ); + } + + return bytes_written; +} + +gboolean Config_port(void) +{ + struct termios termios_p; + gchar *msg = NULL; + + Close_port(); + + serial_port_fd = open(config.port, O_RDWR | O_NOCTTY | O_NDELAY); + + if(serial_port_fd == -1) + { + msg = g_strdup_printf(_("Cannot open %s: %s\n"), + config.port, strerror_utf8(errno)); + show_message(msg, MSG_ERR); + g_free(msg); + + return FALSE; + } + + if(flock(serial_port_fd, LOCK_EX | LOCK_NB) == -1) + { + Close_port(); + msg = g_strdup_printf(_("Cannot lock port! The serial port may currently be in use by another program.\n")); + show_message(msg, MSG_ERR); + g_free(msg); + + return FALSE; + } + + tcgetattr(serial_port_fd, &termios_p); + memcpy(&termios_save, &termios_p, sizeof(struct termios)); + + switch(config.vitesse) + { + case 300: + termios_p.c_cflag = B300; + break; + case 600: + termios_p.c_cflag = B600; + break; + case 1200: + termios_p.c_cflag = B1200; + break; + case 2400: + termios_p.c_cflag = B2400; + break; + case 4800: + termios_p.c_cflag = B4800; + break; + case 9600: + termios_p.c_cflag = B9600; + break; + case 19200: + termios_p.c_cflag = B19200; + break; + case 38400: + termios_p.c_cflag = B38400; + break; + case 57600: + termios_p.c_cflag = B57600; + break; + case 115200: + termios_p.c_cflag = B115200; + break; + case 230400: + termios_p.c_cflag = B230400; + break; + case 460800: + termios_p.c_cflag = B460800; + break; + case 576000: + termios_p.c_cflag = B576000; + break; + case 921600: + termios_p.c_cflag = B921600; + break; + case 1000000: + termios_p.c_cflag = B1000000; + break; + case 2000000: + termios_p.c_cflag = B2000000; + break; + + default: +#ifdef HAVE_LINUX_SERIAL_H + set_custom_speed(config.vitesse, serial_port_fd); + termios_p.c_cflag |= B38400; +#else + Close_port(); + msg = g_strdup_printf(_("Arbitrary baud rates not supported")); + show_message(msg, MSG_ERR); + g_free(msg); + return FALSE; +#endif + } + + switch(config.bits) + { + case 5: + termios_p.c_cflag |= CS5; + break; + case 6: + termios_p.c_cflag |= CS6; + break; + case 7: + termios_p.c_cflag |= CS7; + break; + case 8: + termios_p.c_cflag |= CS8; + break; + } + switch(config.parite) + { + case 1: + termios_p.c_cflag |= PARODD | PARENB; + break; + case 2: + termios_p.c_cflag |= PARENB; + break; + default: + break; + } + if(config.stops == 2) + termios_p.c_cflag |= CSTOPB; + termios_p.c_cflag |= CREAD; + termios_p.c_iflag = IGNPAR | IGNBRK; + switch(config.flux) + { + case 1: + termios_p.c_iflag |= IXON | IXOFF; + break; + case 2: + termios_p.c_cflag |= CRTSCTS; + break; + default: + termios_p.c_cflag |= CLOCAL; + break; + } + termios_p.c_oflag = 0; + termios_p.c_lflag = 0; + termios_p.c_cc[VTIME] = 0; + termios_p.c_cc[VMIN] = 1; + tcsetattr(serial_port_fd, TCSANOW, &termios_p); + tcflush(serial_port_fd, TCOFLUSH); + tcflush(serial_port_fd, TCIFLUSH); + + callback_handler_in = g_io_add_watch_full(g_io_channel_unix_new(serial_port_fd), + 10, + G_IO_IN, + (GIOFunc)Lis_port, + NULL, NULL); + + callback_handler_err = g_io_add_watch_full(g_io_channel_unix_new(serial_port_fd), + 10, + G_IO_ERR, + (GIOFunc)io_err, + NULL, NULL); + + callback_activated = TRUE; + + Set_local_echo(config.echo); + + return TRUE; +} + +void configure_echo(gboolean echo) +{ + config.echo = echo; +} + +void configure_crlfauto(gboolean crlfauto) +{ + config.crlfauto = crlfauto; +} + +void Close_port(void) +{ + if(serial_port_fd != -1) + { + if(callback_activated == TRUE) + { + g_source_remove(callback_handler_in); + g_source_remove(callback_handler_err); + callback_activated = FALSE; + } + tcsetattr(serial_port_fd, TCSANOW, &termios_save); + tcflush(serial_port_fd, TCOFLUSH); + tcflush(serial_port_fd, TCIFLUSH); + flock(serial_port_fd, LOCK_UN); + close(serial_port_fd); + serial_port_fd = -1; + } +} + +void Set_signals(guint param) +{ + int stat_; + + if(serial_port_fd == -1) + return; + + if(ioctl(serial_port_fd, TIOCMGET, &stat_) == -1) + { + i18n_perror(_("Control signals read")); + return; + } + + /* DTR */ + if(param == 0) + { + if(stat_ & TIOCM_DTR) + stat_ &= ~TIOCM_DTR; + else + stat_ |= TIOCM_DTR; + if(ioctl(serial_port_fd, TIOCMSET, &stat_) == -1) + i18n_perror(_("DTR write")); + } + /* RTS */ + else if(param == 1) + { + if(stat_ & TIOCM_RTS) + stat_ &= ~TIOCM_RTS; + else + stat_ |= TIOCM_RTS; + if(ioctl(serial_port_fd, TIOCMSET, &stat_) == -1) + i18n_perror(_("RTS write")); + } +} + +int lis_sig(void) +{ + static int stat = 0; + int stat_read; + + if ( config.flux==3 ) + { + //reset RTS (default = receive) + Set_signals( 1 ); + } + + if(serial_port_fd != -1) + { + if(ioctl(serial_port_fd, TIOCMGET, &stat_read) == -1) + { + /* Ignore EINVAL, as some serial ports + genuinely lack these lines */ + /* Thanks to Elie De Brauwer on ubuntu launchpad */ + if (errno != EINVAL) + { + i18n_perror(_("Control signals read")); + Close_port(); + } + + return -2; + } + + if(stat_read == stat) + return -1; + + stat = stat_read; + + return stat; + } + return -1; +} + +void sendbreak(void) +{ + if(serial_port_fd == -1) + return; + else + tcsendbreak(serial_port_fd, 0); +} + +#ifdef HAVE_LINUX_SERIAL_H +gint set_custom_speed(int speed, int port_fd) +{ + + struct serial_struct ser; + int arby; + + ioctl(port_fd, TIOCGSERIAL, &ser); + ser.custom_divisor = ser.baud_base / speed; + if(!(ser.custom_divisor)) + ser.custom_divisor = 1; + + arby = ser.baud_base / ser.custom_divisor; + ser.flags &= ~ASYNC_SPD_MASK; + ser.flags |= ASYNC_SPD_CUST; + + ioctl(port_fd, TIOCSSERIAL, &ser); + + return 0; +} +#endif + +gchar* get_port_string(void) +{ + gchar* msg; + gchar parity; + + if(serial_port_fd == -1) + { + msg = g_strdup(_("No open port")); + } + else + { + // 0: none, 1: odd, 2: even + switch(config.parite) + { + case 0: + parity = 'N'; + break; + case 1: + parity = 'O'; + break; + case 2: + parity = 'E'; + break; + default: + parity = 'N'; + } + + /* "GtkTerm: device baud-bits-parity-stops" */ + msg = g_strdup_printf("%.15s %d-%d-%c-%d", + config.port, + config.vitesse, + config.bits, + parity, + config.stops + ); + } + + return msg; +} diff -Nru gtkterm-0.99.7~rc1/src/serial.h gtkterm-0.99.7+git9d63182/src/serial.h --- gtkterm-0.99.7~rc1/src/serial.h 1970-01-01 00:00:00.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/serial.h 2017-11-17 16:09:59.000000000 +0000 @@ -0,0 +1,36 @@ +/***********************************************************************/ +/* serie.c */ +/* ------- */ +/* GTKTerm Software */ +/* (c) Julien Schmitt */ +/* */ +/* ------------------------------------------------------------------- */ +/* */ +/* Purpose */ +/* Serial port access functions */ +/* - Header file - */ +/* */ +/***********************************************************************/ + +#ifndef SERIE_H_ +#define SERIE_H_ + +extern int serial_port_fd; + +int Send_chars(char *, int); +gboolean Config_port(void); +void Set_signals(guint); +int lis_sig(void); +void Close_port(void); +void configure_echo(gboolean); +void configure_crlfauto(gboolean); +void sendbreak(void); +gint set_custom_speed(int, int); +gchar* get_port_string(void); + +#define BUFFER_RECEPTION 8192 +#define BUFFER_EMISSION 4096 +#define LINE_FEED 0x0A +#define POLL_DELAY 100 /* in ms (for control signals) */ + +#endif diff -Nru gtkterm-0.99.7~rc1/src/serie.c gtkterm-0.99.7+git9d63182/src/serie.c --- gtkterm-0.99.7~rc1/src/serie.c 2017-11-21 21:39:46.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/serie.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,588 +0,0 @@ -/***********************************************************************/ -/* serie.c */ -/* ------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Serial port access functions */ -/* */ -/* ChangeLog */ -/* - 0.99.7 : Removed auto crlf stuff - (use macros instead) */ -/* - 0.99.5 : changed all calls to strerror() by strerror_utf8() */ -/* - 0.99.2 : Internationalization */ -/* - 0.98.6 : new sendbreak() function */ -/* - 0.98.1 : lockfile implementation (based on minicom) */ -/* - 0.98 : removed IOChannel */ -/* */ -/***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#ifdef __linux__ -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#include "term_config.h" -#include "serie.h" -#include "widgets.h" -#include "fichier.h" -#include "buffer.h" -#include "i18n.h" - -#include -#include - -struct termios termios_save; -int serial_port_fd = -1; - -guint callback_handler_in, callback_handler_err; -gboolean callback_activated = FALSE; -char lockfile[128] = {0}; - -gchar *str_err = NULL; - -extern struct configuration_port config; - -/* Local functions prototype */ -gint create_lockfile(char *); -void remove_lockfile(void); -void Ferme_Port(void); -void Ouvre_Port(char *); - -gboolean Lis_port(GIOChannel* src, GIOCondition cond, gpointer data) -{ - gint bytes_read; - static gchar c[BUFFER_RECEPTION]; - guint i; - - bytes_read = BUFFER_RECEPTION; - - while(bytes_read == BUFFER_RECEPTION) - { - bytes_read = read(serial_port_fd, c, BUFFER_RECEPTION); - if(bytes_read > 0) - { - put_chars(c, bytes_read, config.crlfauto); - - if(config.car != -1 && waiting_for_char == TRUE) - { - i = 0; - while(i < bytes_read) - { - if(c[i] == config.car) - { - waiting_for_char = FALSE; - add_input(); - i = bytes_read; - } - i++; - } - } - } - else if(bytes_read == -1) - { - if(errno != EAGAIN) - perror(config.port); - } - } - - return TRUE; -} - -gboolean io_err(GIOChannel* src, GIOCondition cond, gpointer data) -{ - Ferme_Port(); - return TRUE; -} - -int Send_chars(char *string, int length) -{ - int bytes_written = 0; - - /* Normally it never happens, but it is better not to segfault ;) */ - if(length == 0) - return 0; - - if(serial_port_fd == -1) - return 0; - - /* RS485 half-duplex mode ? */ - if( config.flux==3 ) - { - /* set RTS (start to send) */ - Set_signals( 1 ); - if( config.rs485_rts_time_before_transmit>0 ) - usleep(config.rs485_rts_time_before_transmit*1000); - } - - bytes_written = write(serial_port_fd, string, length); - - /* RS485 half-duplex mode ? */ - if( config.flux==3 ) - { - /* wait all chars are send */ - tcdrain( serial_port_fd ); - if( config.rs485_rts_time_after_transmit>0 ) - usleep(config.rs485_rts_time_after_transmit*1000); - /* reset RTS (end of send, now receiving back) */ - Set_signals( 1 ); - } - - return bytes_written; -} - -void Ouvre_Port(char *port) -{ - serial_port_fd = open(port, O_RDWR | O_NOCTTY | O_NDELAY); -} - -gchar *Config_port(void) -{ - struct termios termios_p; - gchar *msg = NULL; - - Ferme_Port(); - remove_lockfile(); - - Ouvre_Port(config.port); - - - if(serial_port_fd == -1) - { - g_free(str_err); - str_err = g_strdup_printf(_("Cannot open %s: %s\n"), config.port, strerror_utf8(errno)); - show_message(str_err, MSG_ERR); - return NULL; - } - - if(create_lockfile(config.port) == -1) - { - Ferme_Port(); - return NULL; - } - - msg = g_strdup_printf("%s : %d,%d", - config.port, - config.vitesse, - config.bits); - tcgetattr(serial_port_fd, &termios_p); - memcpy(&termios_save, &termios_p, sizeof(struct termios)); - - switch(config.vitesse) - { - case 300: - termios_p.c_cflag = B300; - break; - case 600: - termios_p.c_cflag = B600; - break; - case 1200: - termios_p.c_cflag = B1200; - break; - case 2400: - termios_p.c_cflag = B2400; - break; - case 4800: - termios_p.c_cflag = B4800; - break; - case 9600: - termios_p.c_cflag = B9600; - break; - case 19200: - termios_p.c_cflag = B19200; - break; - case 38400: - termios_p.c_cflag = B38400; - break; - case 57600: - termios_p.c_cflag = B57600; - break; - case 115200: - termios_p.c_cflag = B115200; - break; - - default: -#ifdef __linux__ - set_custom_speed(config.vitesse, serial_port_fd); - termios_p.c_cflag |= B38400; -#else - return NULL; -#endif - - } - - switch(config.bits) - { - case 5: - termios_p.c_cflag |= CS5; - break; - case 6: - termios_p.c_cflag |= CS6; - break; - case 7: - termios_p.c_cflag |= CS7; - break; - case 8: - termios_p.c_cflag |= CS8; - break; - } - switch(config.parite) - { - case 1: - termios_p.c_cflag |= PARODD | PARENB; - msg = g_strdup_printf("%s,O", msg); - break; - case 2: - termios_p.c_cflag |= PARENB; - msg = g_strdup_printf("%s,E", msg); - break; - default: - msg = g_strdup_printf("%s,N", msg); - break; - } - if(config.stops == 2) - termios_p.c_cflag |= CSTOPB; - termios_p.c_cflag |= CREAD; - msg = g_strdup_printf("%s,%d", msg, config.stops); - termios_p.c_iflag = IGNPAR | IGNBRK; - switch(config.flux) - { - case 1: - termios_p.c_iflag |= IXON | IXOFF; - msg = g_strdup_printf("%s - Xon/Xoff", msg); - break; - case 2: - termios_p.c_cflag |= CRTSCTS; - msg = g_strdup_printf("%s - RTS/CTS", msg); - break; - default: - termios_p.c_cflag |= CLOCAL; - break; - } - termios_p.c_oflag = 0; - termios_p.c_lflag = 0; - termios_p.c_cc[VTIME] = 0; - termios_p.c_cc[VMIN] = 1; - tcsetattr(serial_port_fd, TCSANOW, &termios_p); - tcflush(serial_port_fd, TCOFLUSH); - tcflush(serial_port_fd, TCIFLUSH); - - callback_handler_in = g_io_add_watch_full(g_io_channel_unix_new(serial_port_fd), - 10, - G_IO_IN, - (GIOFunc)Lis_port, - NULL, NULL); - - callback_handler_err = g_io_add_watch_full(g_io_channel_unix_new(serial_port_fd), - 10, - G_IO_ERR, - (GIOFunc)io_err, - NULL, NULL); - - callback_activated = TRUE; - - Set_local_echo(config.echo); - - return msg; -} - -void configure_echo(gboolean echo) -{ - config.echo = echo; -} - -void configure_crlfauto(gboolean crlfauto) -{ - config.crlfauto = crlfauto; -} - -void Ferme_Port(void) -{ - if(serial_port_fd != -1) - { - if(callback_activated == TRUE) - { - g_source_remove(callback_handler_in); - g_source_remove(callback_handler_err); - callback_activated = FALSE; - } - tcsetattr(serial_port_fd, TCSANOW, &termios_save); - tcflush(serial_port_fd, TCOFLUSH); - tcflush(serial_port_fd, TCIFLUSH); - close(serial_port_fd); - serial_port_fd = -1; - } -} - -void Set_signals(guint param) -{ - int stat_; - - if(serial_port_fd == -1) - return; - - if(ioctl(serial_port_fd, TIOCMGET, &stat_) == -1) - { - i18n_perror(_("Control signals read")); - return; - } - - /* DTR */ - if(param == 0) - { - if(stat_ & TIOCM_DTR) - stat_ &= ~TIOCM_DTR; - else - stat_ |= TIOCM_DTR; - if(ioctl(serial_port_fd, TIOCMSET, &stat_) == -1) - i18n_perror(_("DTR write")); - } - /* RTS */ - else if(param == 1) - { - if(stat_ & TIOCM_RTS) - stat_ &= ~TIOCM_RTS; - else - stat_ |= TIOCM_RTS; - if(ioctl(serial_port_fd, TIOCMSET, &stat_) == -1) - i18n_perror(_("RTS write")); - } -} - -int lis_sig(void) -{ - static int stat = 0; - int stat_read; - - if ( config.flux==3 ) - { - //reset RTS (default = receive) - Set_signals( 1 ); - } - - if(serial_port_fd != -1) - { - if(ioctl(serial_port_fd, TIOCMGET, &stat_read) == -1) - { - /* Ignore EINVAL, as some serial ports - genuinely lack these lines */ - /* Thanks to Elie De Brauwer on ubuntu launchpad */ - if (errno != EINVAL) - { - i18n_perror(_("Control signals read")); - Ferme_Port(); - } - - return -2; - } - - if(stat_read == stat) - return -1; - - stat = stat_read; - - return stat; - } - return -1; -} - -/* - * Find out name to use for lockfile when locking tty. - */ -char *mbasename(char *s, char *res, int reslen) -{ - char *p; - - if (strncmp(s, "/dev/", 5) == 0) { - /* In /dev */ - strncpy(res, s + 5, reslen - 1); - res[reslen-1] = 0; - for (p = res; *p; p++) - if (*p == '/') *p = '_'; - } else { - /* Outside of /dev. Do something sensible. */ - if ((p = strrchr(s, '/')) == NULL) - p = s; - else - p++; - strncpy(res, p, reslen - 1); - res[reslen-1] = 0; - } - - return res; -} - -gint create_lockfile(char *port) -{ - char buf[128]; - char *username; - struct stat stt; - int fd, n = 0; - int pid; - int mask; - int res; - uid_t real_uid; - gid_t real_gid; - - real_uid = getuid(); - real_gid = getgid(); - username = (getpwuid(real_uid))->pw_name; - - /* First see if the lock file directory is present. */ - if(P_LOCK[0] && stat(P_LOCK, &stt) == 0) { - snprintf(lockfile, sizeof(lockfile), "%s/LCK..%s", P_LOCK, mbasename(port, buf, sizeof(buf))); - } else { - lockfile[0] = 0; - } - - if(lockfile[0] && (fd = open(lockfile, O_RDONLY)) >= 0) - { - n = read(fd, buf, 127); - close(fd); - if(n > 0) - { - pid = -1; - if(n == 4) { - /* Kermit-style lockfile. */ - pid = *(int *)buf; - } else { - /* Ascii lockfile. */ - buf[n] = 0; - sscanf(buf, "%d", &pid); - } - if(pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) - { - i18n_fprintf(stderr, _("Lockfile is stale. Overriding it..\n")); - sleep(1); - unlink(lockfile); - } else { - n = 0; - } - } - - if(n == 0) - { - i18n_fprintf(stderr, _("Device %s is locked.\n"), port); - lockfile[0] = 0; - return -1; - } - } - - if(lockfile[0]) - { - /* Create lockfile compatible with UUCP-1.2 */ - mask = umask(022); - if((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) - { - i18n_fprintf(stderr, - _("Cannot create lockfile: %s\n"), - strerror_utf8(errno)); - - lockfile[0] = 0; - return -1; - } - - (void)umask(mask); - res = chown(lockfile, real_uid, real_gid); - snprintf(buf, sizeof(buf), "%10ld gtkterm %.20s\n", (long)getpid(), username); - res = write(fd, buf, strlen(buf)); - close(fd); - } - - return 0; -} - -void remove_lockfile(void) -{ - if(lockfile[0]) - unlink(lockfile); -} - -void Close_port_and_remove_lockfile(void) -{ - Ferme_Port(); - remove_lockfile(); -} - -void sendbreak(void) -{ - if(serial_port_fd == -1) - return; - else - tcsendbreak(serial_port_fd, 0); -} - -#ifdef __linux__ -gint set_custom_speed(int speed, int port_fd) -{ - - struct serial_struct ser; - int arby; - - ioctl(port_fd, TIOCGSERIAL, &ser); - ser.custom_divisor = ser.baud_base / speed; - if(!(ser.custom_divisor)) - ser.custom_divisor = 1; - - arby = ser.baud_base / ser.custom_divisor; - ser.flags &= ~ASYNC_SPD_MASK; - ser.flags |= ASYNC_SPD_CUST; - - ioctl(port_fd, TIOCSSERIAL, &ser); - - return 0; -} -#endif - -gchar* get_port_string(void) -{ - gchar* msg; - gchar parity; - - if(serial_port_fd == -1) - { - msg = g_strdup(_("No open port")); - } else { - // 0: none, 1: odd, 2: even - switch(config.parite) - { - case 0: - parity = 'N'; - break; - case 1: - parity = 'O'; - break; - case 2: - parity = 'E'; - break; - default: - parity = 'N'; - } - - /* "GtkTerm: device baud-bits-parity-stops" */ - msg = g_strdup_printf("%.15s %d-%d-%c-%d", - config.port, - config.vitesse, - config.bits, - parity, - config.stops - ); - } - - return msg; -} diff -Nru gtkterm-0.99.7~rc1/src/serie.h gtkterm-0.99.7+git9d63182/src/serie.h --- gtkterm-0.99.7~rc1/src/serie.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/serie.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/***********************************************************************/ -/* serie.c */ -/* ------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Serial port access functions */ -/* - Header file - */ -/* */ -/***********************************************************************/ - -#ifndef SERIE_H_ -#define SERIE_H_ - -extern int serial_port_fd; - -int Send_chars(char *, int); -gchar *Config_port(void); -void Set_signals(guint); -int lis_sig(void); -void Close_port_and_remove_lockfile(void); -void configure_echo(gboolean); -void configure_crlfauto(gboolean); -void sendbreak(void); -gint set_custom_speed(int, int); -gchar* get_port_string(void); - - -#define BUFFER_RECEPTION 8192 -#define BUFFER_EMISSION 4096 -#define LINE_FEED 0x0A -#define POLL_DELAY 100 /* in ms (for control signals) */ -#define P_LOCK "/var/lock" /* lock file location */ - - -#endif diff -Nru gtkterm-0.99.7~rc1/src/term_config.c gtkterm-0.99.7+git9d63182/src/term_config.c --- gtkterm-0.99.7~rc1/src/term_config.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/term_config.c 2017-11-17 16:09:59.000000000 +0000 @@ -42,9 +42,10 @@ #include #include -#include "serie.h" +#include "serial.h" #include "term_config.h" -#include "widgets.h" +#include "interface.h" +#include "gresource.h" #include "parsecfg.h" #include "macros.h" #include "i18n.h" @@ -53,13 +54,14 @@ #define DEVICE_NUMBERS_TO_CHECK 12 -gchar *devices_to_check[] = { - "/dev/ttyS%d", - "/dev/tts/%d", - "/dev/ttyUSB%d", - "/dev/ttyACM%d", - "/dev/usb/tts/%d", - NULL +gchar *devices_to_check[] = +{ + "/dev/ttyS%d", + "/dev/tts/%d", + "/dev/ttyUSB%d", + "/dev/ttyACM%d", + "/dev/usb/tts/%d", + NULL }; /* Configuration file variables */ @@ -78,50 +80,51 @@ cfgList **macro_list = NULL; gchar **font; -gint *transparency; -gint *show_cursor; +gint *block_cursor; gint *rows; gint *columns; gint *scrollback; gint *visual_bell; -gint *foreground_red; -gint *foreground_blue; -gint *foreground_green; -gint *background_red; -gint *background_blue; -gint *background_green; -gdouble *background_saturation; - - -cfgStruct cfg[] = { - {"port", CFG_STRING, &port}, - {"speed", CFG_INT, &speed}, - {"bits", CFG_INT, &bits}, - {"stopbits", CFG_INT, &stopbits}, - {"parity", CFG_STRING, &parity}, - {"flow", CFG_STRING, &flow}, - {"wait_delay", CFG_INT, &wait_delay}, - {"wait_char", CFG_INT, &wait_char}, - {"rs485_rts_time_before_tx", CFG_INT, &rts_time_before_tx}, - {"rs485_rts_time_after_tx", CFG_INT, &rts_time_after_tx}, - {"echo", CFG_BOOL, &echo}, - {"crlfauto", CFG_BOOL, &crlfauto}, - {"font", CFG_STRING, &font}, - {"macros", CFG_STRING_LIST, ¯o_list}, - {"term_transparency", CFG_BOOL, &transparency}, - {"term_show_cursor", CFG_BOOL, &show_cursor}, - {"term_rows", CFG_INT, &rows}, - {"term_columns", CFG_INT, &columns}, - {"term_scrollback", CFG_INT, &scrollback}, - {"term_visual_bell", CFG_BOOL, &visual_bell}, - {"term_foreground_red", CFG_INT, &foreground_red}, - {"term_foreground_blue", CFG_INT, &foreground_blue}, - {"term_foreground_green", CFG_INT, &foreground_green}, - {"term_background_red", CFG_INT, &background_red}, - {"term_background_blue", CFG_INT, &background_blue}, - {"term_background_green", CFG_INT, &background_green}, - {"term_background_saturation", CFG_DOUBLE, &background_saturation}, - {NULL, CFG_END, NULL} +gfloat *foreground_red; +gfloat *foreground_blue; +gfloat *foreground_green; +gfloat *foreground_alpha; +gfloat *background_red; +gfloat *background_blue; +gfloat *background_green; +gfloat *background_alpha; + + +cfgStruct cfg[] = +{ + {"port", CFG_STRING, &port}, + {"speed", CFG_INT, &speed}, + {"bits", CFG_INT, &bits}, + {"stopbits", CFG_INT, &stopbits}, + {"parity", CFG_STRING, &parity}, + {"flow", CFG_STRING, &flow}, + {"wait_delay", CFG_INT, &wait_delay}, + {"wait_char", CFG_INT, &wait_char}, + {"rs485_rts_time_before_tx", CFG_INT, &rts_time_before_tx}, + {"rs485_rts_time_after_tx", CFG_INT, &rts_time_after_tx}, + {"echo", CFG_BOOL, &echo}, + {"crlfauto", CFG_BOOL, &crlfauto}, + {"font", CFG_STRING, &font}, + {"macros", CFG_STRING_LIST, ¯o_list}, + {"term_block_cursor", CFG_BOOL, &block_cursor}, + {"term_rows", CFG_INT, &rows}, + {"term_columns", CFG_INT, &columns}, + {"term_scrollback", CFG_INT, &scrollback}, + {"term_visual_bell", CFG_BOOL, &visual_bell}, + {"term_foreground_red", CFG_FLOAT, &foreground_red}, + {"term_foreground_blue", CFG_FLOAT, &foreground_blue}, + {"term_foreground_green", CFG_FLOAT, &foreground_green}, + {"term_foreground_alpha", CFG_FLOAT, &foreground_alpha}, + {"term_background_red", CFG_FLOAT, &background_red}, + {"term_background_blue", CFG_FLOAT, &background_blue}, + {"term_background_green", CFG_FLOAT, &background_green}, + {"term_background_alpha", CFG_FLOAT, &background_alpha}, + {NULL, CFG_END, NULL} }; gchar *config_file; @@ -129,10 +132,10 @@ struct configuration_port config; display_config_t term_conf; -GtkWidget *Entry, *Bouton_font = NULL; +GtkWidget *Entry; gint Grise_Degrise(GtkWidget *bouton, gpointer pointeur); -gint Lis_Font(GtkFontSelectionDialog *fontsel); +void read_font_button(GtkFontButton *fontButton); void Hard_default_configuration(void); void Copy_configuration(int); @@ -143,877 +146,914 @@ static void save_config(GtkDialog *, gint, GtkWidget *); static void really_save_config(GtkDialog *, gint, gpointer); static gint remove_section(gchar *, gchar *); -static void Curseur_OnOff(GtkWidget *, gpointer); -static void Selec_couleur(GdkColor *, gfloat, gfloat, gfloat); -static gint config_color_fg(GtkWidget *, gpointer); -static gint config_color_bg(GtkWidget *, gpointer); -static void Transparency_OnOff(GtkWidget *, gpointer); -static void change_scale(GtkRange *, gpointer); -static gint scrollback_set(GtkWidget *, GdkEventFocus *, gpointer); +static gboolean cursor_block(GtkSwitch *, gboolean, gpointer); +static void Selec_couleur(GdkRGBA *, gfloat, gfloat, gfloat, gfloat); +void config_fg_color(GtkWidget *button, gpointer data); +void config_bg_color(GtkWidget *button, gpointer data); +static void scrollback_set(GtkAdjustment *, gpointer); extern GtkWidget *display; -gint Config_Port_Fenetre(GtkWidget *widget, guint param) +void Config_Port_Fenetre(GtkAction *action, gpointer data) { - GtkWidget *Table, *Label, *Bouton_OK, *Bouton_annule, - *Combo, *Dialogue, *Frame, *CheckBouton, - *Spin, *Expander, *ExpanderVbox; - static GtkWidget *Combos[10]; - GList *liste = NULL; - gchar *chaine = NULL; - gchar **dev = NULL; - GtkObject *adj; - struct stat my_stat; - int i; - - for(dev = devices_to_check; *dev != NULL; dev++) - { - for(i = 0; i < DEVICE_NUMBERS_TO_CHECK; i++) - { - chaine = g_strdup_printf(*dev, i); - if(stat(chaine, &my_stat) == 0) - liste = g_list_append(liste, chaine); - } - } - - if(liste == NULL) - { - show_message(_("No serial devices found!\n\n" - "Search all of these devices:\n" - "/dev/ttyS*\n/dev/tts/*\n/dev/ttyUSB*\n/dev/usb/tts/*\n\n" - "Enter a different device in the 'Port' box.\n"), MSG_WRN); - } - - Dialogue = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(Dialogue), _("Configuration")); - gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(Dialogue)->vbox), 5); - - Frame = gtk_frame_new(_("Serial port")); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Dialogue)->vbox), Frame, FALSE, TRUE, 5); - - Table = gtk_table_new(4, 3, FALSE); - gtk_container_add(GTK_CONTAINER(Frame), Table); - - Label = gtk_label_new(_("Port:")); - gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 0, 1, 0, 0, 10, 5); - Label = gtk_label_new(_("Baud Rate:")); - gtk_table_attach(GTK_TABLE(Table), Label, 1, 2, 0, 1, 0, 0, 10, 5); - Label = gtk_label_new(_("Parity:")); - gtk_table_attach(GTK_TABLE(Table), Label, 2, 3, 0, 1, 0, 0, 10, 5); - - // create the devices combo box, and add device strings - Combo = gtk_combo_box_entry_new_text(); - - for(i = 0; i < g_list_length(liste); i++) - { - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), g_list_nth_data(liste, i)); - } - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); - chaine = g_strdup(config.port); - if(g_list_find_custom(liste, chaine, (GCompareFunc)strcmp) != NULL) - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), g_list_index(liste, chaine)); - - - // clean up devices strings - //g_list_free(liste, (GDestroyNotify)g_free); // only available in glib >= 2.28 - for(i = 0; i < g_list_length(liste); i++) - { - g_free(g_list_nth_data(liste, i)); - } - g_list_free(liste); - g_free(chaine); - - gtk_table_attach(GTK_TABLE(Table), Combo, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[0] = Combo; - - Combo = gtk_combo_box_entry_new_text(); - gtk_entry_set_max_length(GTK_ENTRY(GTK_BIN(Combo)->child), 10); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "300"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "600"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "1200"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "2400"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "4800"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "9600"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "19200"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "38400"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "57600"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "115200"); - - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 5); //default 9600 - - //validate input text (digits only) - g_signal_connect(GTK_ENTRY(GTK_BIN(Combo)->child), - "insert-text", - G_CALLBACK(check_text_input), NULL); - - gtk_table_attach(GTK_TABLE(Table), Combo, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[1] = Combo; - - Combo = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "none"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "odd"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "even"); + GtkWidget *Table, *Label, *Bouton_OK, *Bouton_annule, + *Combo, *Dialogue, *Frame, *CheckBouton, + *Spin, *Expander, *ExpanderVbox, + *content_area, *action_area; + + static GtkWidget *Combos[10]; + GList *liste = NULL; + gchar *chaine = NULL; + gchar **dev = NULL; + GtkAdjustment *adj; + struct stat my_stat; + gchar *string; + int i; + + for(dev = devices_to_check; *dev != NULL; dev++) + { + for(i = 0; i < DEVICE_NUMBERS_TO_CHECK; i++) + { + chaine = g_strdup_printf(*dev, i); + if(stat(chaine, &my_stat) == 0) + liste = g_list_append(liste, chaine); + } + } + + if(liste == NULL) + { + show_message(_("No serial devices found!\n\n" + "Searched the following paths:\n" + "\t/dev/ttyS*\n\t/dev/tts/*\n\t/dev/ttyUSB*\n\t/dev/usb/tts/*\n\n" + "Enter a different device path in the 'Port' box.\n"), MSG_WRN); + } + + Dialogue = gtk_dialog_new(); + content_area = gtk_dialog_get_content_area(GTK_DIALOG(Dialogue)); + action_area = gtk_dialog_get_action_area(GTK_DIALOG(Dialogue)); + gtk_window_set_title(GTK_WINDOW(Dialogue), _("Configuration")); + gtk_window_set_resizable(GTK_WINDOW(Dialogue), FALSE); + gtk_container_set_border_width(GTK_CONTAINER(content_area), 5); + + Frame = gtk_frame_new(_("Serial port")); + gtk_box_pack_start(GTK_BOX(content_area), Frame, FALSE, TRUE, 5); + + Table = gtk_table_new(4, 3, FALSE); + gtk_container_add(GTK_CONTAINER(Frame), Table); + + Label = gtk_label_new(_("Port:")); + gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 0, 1, 0, 0, 10, 5); + Label = gtk_label_new(_("Baud Rate:")); + gtk_table_attach(GTK_TABLE(Table), Label, 1, 2, 0, 1, 0, 0, 10, 5); + Label = gtk_label_new(_("Parity:")); + gtk_table_attach(GTK_TABLE(Table), Label, 2, 3, 0, 1, 0, 0, 10, 5); + + // create the devices combo box, and add device strings + Combo = gtk_combo_box_text_new_with_entry(); + + for(i = 0; i < g_list_length(liste); i++) + { + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), g_list_nth_data(liste, i)); + } + + // try to restore last selected port, if any + if(config.port != NULL && config.port[0] != '\0') + { + GtkWidget *tmp_entry; + tmp_entry = gtk_bin_get_child(GTK_BIN(Combo)); + + gtk_entry_set_text(GTK_ENTRY(tmp_entry), config.port); + + } + else + { + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + } + - switch(config.parite) - { + // clean up devices strings + //g_list_free(liste, (GDestroyNotify)g_free); // only available in glib >= 2.28 + for(i = 0; i < g_list_length(liste); i++) + { + g_free(g_list_nth_data(liste, i)); + } + g_list_free(liste); + g_free(chaine); + + gtk_table_attach(GTK_TABLE(Table), Combo, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[0] = Combo; + + Combo = gtk_combo_box_text_new_with_entry(); + gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child (GTK_BIN (Combo))), 10); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "300"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "600"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "1200"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "2400"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "4800"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "9600"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "19200"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "38400"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "57600"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "115200"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "230400"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "460800"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "576000"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "921600"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "1000000"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "2000000"); + + /* set the current choice to the previous setting */ + switch(config.vitesse) + { + case 300: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + break; + case 600: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 1); + break; + case 1200: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 2); + break; + case 2400: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 3); + break; + case 4800: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 4); + break; + case 9600: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 5); + break; + case 19200: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 6); + break; + case 38400: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 7); + break; + case 57600: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 8); + break; + case 115200: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 9); + break; + case 230400: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 10); + break; + case 460800: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 11); + break; + case 576000: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 12); + break; + case 921600: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 13); + break; + case 1000000: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 14); + break; + case 2000000: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 15); + break; case 0: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); - break; + /* no previous setting, use a default */ + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 5); + default: + /* custom baudrate */ + string = g_strdup_printf("%d", config.vitesse); + gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child (GTK_BIN (Combo))), string); + g_free(string); + } + + //validate input text (digits only) + g_signal_connect(GTK_ENTRY(gtk_bin_get_child (GTK_BIN (Combo))), + "insert-text", + G_CALLBACK(check_text_input), isdigit); + + gtk_table_attach(GTK_TABLE(Table), Combo, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[1] = Combo; + + Combo = gtk_combo_box_text_new(); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "none"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "odd"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "even"); + + switch(config.parite) + { + case 0: + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + break; case 1: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 1); - break; + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 1); + break; case 2: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 2); - break; - } - gtk_table_attach(GTK_TABLE(Table), Combo, 2, 3, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[2] = Combo; - - Label = gtk_label_new(_("Bits:")); - gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 2, 3, 0, 0, 10, 5); - Label = gtk_label_new(_("Stopbits:")); - gtk_table_attach(GTK_TABLE(Table), Label, 1, 2, 2, 3, 0, 0, 10, 5); - Label = gtk_label_new(_("Flow control:")); - gtk_table_attach(GTK_TABLE(Table), Label, 2, 3, 2, 3, 0, 0, 10, 5); - - Combo = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "5"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "6"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "7"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "8"); - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 3); - - if(config.bits >= 5 && config.bits <= 8) - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), config.bits - 5); - gtk_table_attach(GTK_TABLE(Table), Combo, 0, 1, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[3] = Combo; - - Combo = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "1"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "2"); - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); - - if(config.stops == 1 || config.stops == 2) - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), config.stops - 1); - gtk_table_attach(GTK_TABLE(Table), Combo, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[4] = Combo; - - Combo = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "none"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "RTS/CTS"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "Xon/Xoff"); - gtk_combo_box_append_text(GTK_COMBO_BOX(Combo), "RS485-HalfDuplex(RTS)"); - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 2); + break; + } + gtk_table_attach(GTK_TABLE(Table), Combo, 2, 3, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[2] = Combo; + + Label = gtk_label_new(_("Bits:")); + gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 2, 3, 0, 0, 10, 5); + Label = gtk_label_new(_("Stopbits:")); + gtk_table_attach(GTK_TABLE(Table), Label, 1, 2, 2, 3, 0, 0, 10, 5); + Label = gtk_label_new(_("Flow control:")); + gtk_table_attach(GTK_TABLE(Table), Label, 2, 3, 2, 3, 0, 0, 10, 5); + + Combo = gtk_combo_box_text_new(); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "5"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "6"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "7"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "8"); + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 3); + + if(config.bits >= 5 && config.bits <= 8) + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), config.bits - 5); + gtk_table_attach(GTK_TABLE(Table), Combo, 0, 1, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[3] = Combo; + + Combo = gtk_combo_box_text_new(); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "1"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "2"); + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + + if(config.stops == 1 || config.stops == 2) + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), config.stops - 1); + gtk_table_attach(GTK_TABLE(Table), Combo, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[4] = Combo; + + Combo = gtk_combo_box_text_new(); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "none"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "RTS/CTS"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "Xon/Xoff"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(Combo), "RS485-HalfDuplex(RTS)"); + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); - switch(config.flux) - { + switch(config.flux) + { case 0: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); - break; + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 0); + break; case 1: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 2); - break; + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 2); + break; case 2: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 1); - break; + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 1); + break; case 3: - gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 3); - break; - } - gtk_table_attach(GTK_TABLE(Table), Combo, 2, 3, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[5] = Combo; - - /* create an expander widget to hide the 'Advanced features' */ - Expander = gtk_expander_new_with_mnemonic(_("Advanced Configuration Options")); - ExpanderVbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(Expander), ExpanderVbox); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Dialogue)->vbox), Expander); - - Frame = gtk_frame_new(_("ASCII file transfer")); - gtk_container_add(GTK_CONTAINER(ExpanderVbox), Frame); - - Table = gtk_table_new(2, 2, FALSE); - gtk_container_add(GTK_CONTAINER(Frame), Table); - - Label = gtk_label_new(_("End of line delay (milliseconds):")); - gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 0, 1); - - adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); - Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.delai); - gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[6] = Spin; - - Entry = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(Entry), 1); - - gtk_widget_set_sensitive(GTK_WIDGET(Entry), FALSE); - gtk_table_attach(GTK_TABLE(Table), Entry, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - - CheckBouton = gtk_check_button_new_with_label(_("Wait for this special character before passing to next line:")); - - g_signal_connect(GTK_OBJECT(CheckBouton), "clicked", G_CALLBACK(Grise_Degrise), (gpointer)Spin); - - if(config.car != -1) - { - gtk_entry_set_text(GTK_ENTRY(Entry), &(config.car)); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CheckBouton), TRUE); - } - gtk_table_attach_defaults(GTK_TABLE(Table), CheckBouton, 0, 1, 1, 2); - Combos[7] = CheckBouton; - - - Frame = gtk_frame_new(_("RS485 half-duplex parameters (RTS signal used to send)")); - - gtk_container_add(GTK_CONTAINER(ExpanderVbox), Frame); - - Table = gtk_table_new(2, 2, FALSE); - gtk_container_add(GTK_CONTAINER(Frame), Table); - - Label = gtk_label_new(_("Time with RTS 'on' before transmit (milliseconds):")); - gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 0, 1); - Label = gtk_label_new(_("Time with RTS 'on' after transmit (milliseconds):")); - gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 1, 2); - - adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); - Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.rs485_rts_time_before_transmit); - gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[8] = Spin; - - adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); - Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.rs485_rts_time_after_transmit); - gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); - Combos[9] = Spin; - - - Bouton_OK = gtk_button_new_from_stock(GTK_STOCK_OK); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Dialogue)->action_area), Bouton_OK, FALSE, TRUE, 0); - g_signal_connect(GTK_OBJECT(Bouton_OK), "clicked", G_CALLBACK(Lis_Config), (gpointer)Combos); - g_signal_connect_swapped(GTK_OBJECT(Bouton_OK), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(Dialogue)); - Bouton_annule = gtk_button_new_from_stock(GTK_STOCK_CANCEL); - g_signal_connect_swapped(GTK_OBJECT(Bouton_annule), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(Dialogue)); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(Dialogue)->action_area), Bouton_annule, FALSE, TRUE, 0); + gtk_combo_box_set_active(GTK_COMBO_BOX(Combo), 3); + break; + } + gtk_table_attach(GTK_TABLE(Table), Combo, 2, 3, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[5] = Combo; + + /* create an expander widget to hide the 'Advanced features' */ + Expander = gtk_expander_new_with_mnemonic(_("Advanced Configuration Options")); + ExpanderVbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + gtk_container_add(GTK_CONTAINER(Expander), ExpanderVbox); + gtk_container_add(GTK_CONTAINER(content_area), Expander); + + Frame = gtk_frame_new(_("ASCII file transfer")); + gtk_container_add(GTK_CONTAINER(ExpanderVbox), Frame); + + Table = gtk_table_new(2, 2, FALSE); + gtk_container_add(GTK_CONTAINER(Frame), Table); + + Label = gtk_label_new(_("End of line delay (milliseconds):")); + gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 0, 1); + + adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); + Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); + gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.delai); + gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[6] = Spin; + + Entry = gtk_entry_new(); + gtk_entry_set_max_length(GTK_ENTRY(Entry), 1); + + gtk_widget_set_sensitive(GTK_WIDGET(Entry), FALSE); + gtk_table_attach(GTK_TABLE(Table), Entry, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + + CheckBouton = gtk_check_button_new_with_label(_("Wait for this special character before passing to next line:")); + + g_signal_connect(GTK_WIDGET(CheckBouton), "clicked", G_CALLBACK(Grise_Degrise), (gpointer)Spin); + + if(config.car != -1) + { + gtk_entry_set_text(GTK_ENTRY(Entry), &(config.car)); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(CheckBouton), TRUE); + } + gtk_table_attach_defaults(GTK_TABLE(Table), CheckBouton, 0, 1, 1, 2); + Combos[7] = CheckBouton; - gtk_widget_show_all(Dialogue); - return FALSE; + Frame = gtk_frame_new(_("RS485 half-duplex parameters (RTS signal used to send)")); + + gtk_container_add(GTK_CONTAINER(ExpanderVbox), Frame); + + Table = gtk_table_new(2, 2, FALSE); + gtk_container_add(GTK_CONTAINER(Frame), Table); + + Label = gtk_label_new(_("Time with RTS 'on' before transmit (milliseconds):")); + gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 0, 1); + Label = gtk_label_new(_("Time with RTS 'on' after transmit (milliseconds):")); + gtk_table_attach_defaults(GTK_TABLE(Table), Label, 0, 1, 1, 2); + + adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); + Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); + gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.rs485_rts_time_before_transmit); + gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[8] = Spin; + + adj = gtk_adjustment_new(0.0, 0.0, 500.0, 10.0, 20.0, 0.0); + Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); + gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(Spin), TRUE); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)config.rs485_rts_time_after_transmit); + gtk_table_attach(GTK_TABLE(Table), Spin, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); + Combos[9] = Spin; + + + Bouton_OK = gtk_button_new_from_stock(GTK_STOCK_OK); + gtk_box_pack_start(GTK_BOX(action_area), Bouton_OK, FALSE, TRUE, 0); + g_signal_connect(GTK_WIDGET(Bouton_OK), "clicked", G_CALLBACK(Lis_Config), (gpointer)Combos); + g_signal_connect_swapped(GTK_WIDGET(Bouton_OK), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(Dialogue)); + Bouton_annule = gtk_button_new_from_stock(GTK_STOCK_CANCEL); + g_signal_connect_swapped(GTK_WIDGET(Bouton_annule), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(Dialogue)); + gtk_box_pack_start(GTK_BOX(action_area), Bouton_annule, FALSE, TRUE, 0); + + gtk_widget_show_all(Dialogue); } gint Lis_Config(GtkWidget *bouton, GtkWidget **Combos) { - gchar *message; + gchar *message; + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[0])); + strcpy(config.port, message); + g_free(message); + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[1])); + config.vitesse = atoi(message); + g_free(message); + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[3])); + config.bits = atoi(message); + g_free(message); + + config.delai = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[6])); + config.rs485_rts_time_before_transmit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[8])); + config.rs485_rts_time_after_transmit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[9])); + + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[2])); + if(!strcmp(message, "odd")) + config.parite = 1; + else if(!strcmp(message, "even")) + config.parite = 2; + else + config.parite = 0; + g_free(message); + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[4])); + config.stops = atoi(message); + g_free(message); + + message = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(Combos[5])); + if(!strcmp(message, "Xon/Xoff")) + config.flux = 1; + else if(!strcmp(message, "RTS/CTS")) + config.flux = 2; + else if(!strncmp(message, "RS485",5)) + config.flux = 3; + else + config.flux = 0; + g_free(message); + + if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Combos[7]))) + { + config.car = *gtk_entry_get_text(GTK_ENTRY(Entry)); + config.delai = 0; + } + else + config.car = -1; - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[0])); - strcpy(config.port, message); - g_free(message); - - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[1])); - config.vitesse = atoi(message); - g_free(message); - - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[3])); - config.bits = atoi(message); - g_free(message); - - config.delai = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[6])); - config.rs485_rts_time_before_transmit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[8])); - config.rs485_rts_time_after_transmit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(Combos[9])); - - - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[2])); - if(!strcmp(message, "odd")) - config.parite = 1; - else if(!strcmp(message, "even")) - config.parite = 2; - else - config.parite = 0; - g_free(message); - - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[4])); - config.stops = atoi(message); - g_free(message); - - message = gtk_combo_box_get_active_text(GTK_COMBO_BOX(Combos[5])); - if(!strcmp(message, "Xon/Xoff")) - config.flux = 1; - else if(!strcmp(message, "RTS/CTS")) - config.flux = 2; - else if(!strncmp(message, "RS485",5)) - config.flux = 3; - else - config.flux = 0; - g_free(message); - - if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Combos[7]))) - { - config.car = *gtk_entry_get_text(GTK_ENTRY(Entry)); - config.delai = 0; - } - else - config.car = -1; - - message = Config_port(); - if(message == NULL) - message = g_strdup_printf(_("No open port")); - g_free(message); - - message = get_port_string(); - Set_status_message(message); - Set_window_title(message); - g_free(message); + Config_port(); - return FALSE; + message = get_port_string(); + Set_status_message(message); + Set_window_title(message); + g_free(message); + + return FALSE; } gint Grise_Degrise(GtkWidget *bouton, gpointer pointeur) { - if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(bouton))) - { - gtk_widget_set_sensitive(GTK_WIDGET(Entry), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(pointeur), FALSE); - } - else - { - gtk_widget_set_sensitive(GTK_WIDGET(Entry), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(pointeur), TRUE); - } - return FALSE; + if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(bouton))) + { + gtk_widget_set_sensitive(GTK_WIDGET(Entry), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(pointeur), FALSE); + } + else + { + gtk_widget_set_sensitive(GTK_WIDGET(Entry), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(pointeur), TRUE); + } + return FALSE; } -gint Config_Font(GtkWidget *widget, guint param) +void read_font_button(GtkFontButton *fontButton) { - GtkFontSelectionDialog *fontsel; - - fontsel = (GtkFontSelectionDialog *)gtk_font_selection_dialog_new(_("Font selection")); - g_signal_connect(GTK_OBJECT(fontsel), "delete-event", G_CALLBACK(gtk_widget_destroy), NULL); - g_signal_connect(GTK_OBJECT(fontsel), "destroy", G_CALLBACK(gtk_widget_destroy), NULL); - g_signal_connect_swapped(GTK_OBJECT(fontsel->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(fontsel)); - g_signal_connect_swapped(GTK_OBJECT(fontsel->ok_button), "clicked", G_CALLBACK(Lis_Font), GTK_OBJECT(fontsel)); - g_signal_connect_swapped(GTK_OBJECT(fontsel->ok_button), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(fontsel)); - gtk_font_selection_dialog_set_font_name(fontsel, term_conf.font); + g_free(term_conf.font); + term_conf.font = g_strdup(gtk_font_button_get_font_name(fontButton)); - gtk_widget_show(GTK_WIDGET(fontsel)); - return FALSE; + if(term_conf.font != NULL) + vte_terminal_set_font(VTE_TERMINAL(display), pango_font_description_from_string(term_conf.font)); } -void Set_Font(void) +void select_config_callback(GtkAction *action, gpointer data) { - if(Bouton_font != NULL) - { - gchar *string; - - gtk_button_set_label(GTK_BUTTON(Bouton_font), term_conf.font); - string = g_strdup(term_conf.font); - cfgStoreValue(cfg, "font", string, CFG_INI, 0); - g_free(string); - } - - if(term_conf.font != NULL) - vte_terminal_set_font_from_string(VTE_TERMINAL(display), term_conf.font); + Select_config(_("Load configuration"), G_CALLBACK(load_config)); } -gint Lis_Font(GtkFontSelectionDialog *fontsel) +void save_config_callback(GtkAction *action, gpointer data) { - g_free(term_conf.font); - term_conf.font = gtk_font_selection_dialog_get_font_name(fontsel); - Set_Font(); - - return FALSE; + Save_config_file(); } -gint config_window(gpointer *pointer, guint param) +void delete_config_callback(GtkAction *action, gpointer data) { - switch(param) - { - case 0: - Select_config(_("Load configuration"), G_CALLBACK(load_config)); - break; - case 1: - Save_config_file(); - break; - default: - Select_config(_("Delete configuration"), G_CALLBACK(delete_config)); - } - return 0; + Select_config(_("Delete configuration"), G_CALLBACK(delete_config)); } void Select_config(gchar *title, void *callback) { - GtkWidget *dialog; - gint i, max; + GtkWidget *dialog; + GtkWidget *content_area; + gint i, max; + + GtkWidget *Frame, *Scroll, *Liste, *Label; + gchar *texte_label; + + GtkListStore *Modele_Liste; + GtkTreeIter iter_Liste; + GtkCellRenderer *renderer; + GtkTreeViewColumn *Colonne; + GtkTreeSelection *Selection_Liste; - GtkWidget *Frame, *Scroll, *Liste, *Label; - gchar *texte_label; - - GtkListStore *Modele_Liste; - GtkTreeIter iter_Liste; - GtkCellRenderer *renderer; - GtkTreeViewColumn *Colonne; - GtkTreeSelection *Selection_Liste; + enum + { + N_texte, + N_COLONNES + }; - enum - { - N_texte, - N_COLONNES - }; + /* Parse the config file */ - /* Parse the config file */ + max = cfgParse(config_file, cfg, CFG_INI); - max = cfgParse(config_file, cfg, CFG_INI); + if(max == -1) + { + show_message(_("Cannot read configuration file!\n"), MSG_ERR); + return; + } - if(max == -1) - { - show_message(_("Cannot read configuration file!\n"), MSG_ERR); - return; - } + else + { + gchar *Titre[]= {_("Configurations")}; - else - { - gchar *Titre[]= {_("Configurations")}; + dialog = gtk_dialog_new_with_buttons (title, + NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_NONE, + GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + NULL); - dialog = gtk_dialog_new_with_buttons (title, - NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_NONE, - GTK_STOCK_OK, - GTK_RESPONSE_ACCEPT, - NULL); + content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); - Modele_Liste = gtk_list_store_new(N_COLONNES, G_TYPE_STRING); + Modele_Liste = gtk_list_store_new(N_COLONNES, G_TYPE_STRING); - Liste = gtk_tree_view_new_with_model(GTK_TREE_MODEL(Modele_Liste)); - gtk_tree_view_set_search_column(GTK_TREE_VIEW(Liste), N_texte); + Liste = gtk_tree_view_new_with_model(GTK_TREE_MODEL(Modele_Liste)); + gtk_tree_view_set_search_column(GTK_TREE_VIEW(Liste), N_texte); - Selection_Liste = gtk_tree_view_get_selection(GTK_TREE_VIEW(Liste)); - gtk_tree_selection_set_mode(Selection_Liste, GTK_SELECTION_SINGLE); + Selection_Liste = gtk_tree_view_get_selection(GTK_TREE_VIEW(Liste)); + gtk_tree_selection_set_mode(Selection_Liste, GTK_SELECTION_SINGLE); - Frame = gtk_frame_new(NULL); + Frame = gtk_frame_new(NULL); - Scroll = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(Scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(Frame), Scroll); - gtk_container_add(GTK_CONTAINER(Scroll), Liste); + Scroll = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(Scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(Frame), Scroll); + gtk_container_add(GTK_CONTAINER(Scroll), Liste); - renderer = gtk_cell_renderer_text_new(); + renderer = gtk_cell_renderer_text_new(); - g_object_set(G_OBJECT(renderer), "xalign", (gfloat)0.5, NULL); - Colonne = gtk_tree_view_column_new_with_attributes(Titre[0], renderer, "text", 0, NULL); - gtk_tree_view_column_set_sort_column_id(Colonne, 0); + g_object_set(G_OBJECT(renderer), "xalign", (gfloat)0.5, NULL); + Colonne = gtk_tree_view_column_new_with_attributes(Titre[0], renderer, "text", 0, NULL); + gtk_tree_view_column_set_sort_column_id(Colonne, 0); - Label=gtk_label_new(""); - texte_label = g_strdup_printf("%s", Titre[0]); - gtk_label_set_markup(GTK_LABEL(Label), texte_label); - g_free(texte_label); - gtk_tree_view_column_set_widget(GTK_TREE_VIEW_COLUMN(Colonne), Label); - gtk_widget_show(Label); + Label=gtk_label_new(""); + texte_label = g_strdup_printf("%s", Titre[0]); + gtk_label_set_markup(GTK_LABEL(Label), texte_label); + g_free(texte_label); + gtk_tree_view_column_set_widget(GTK_TREE_VIEW_COLUMN(Colonne), Label); + gtk_widget_show(Label); - gtk_tree_view_column_set_alignment(GTK_TREE_VIEW_COLUMN(Colonne), 0.5f); - gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(Colonne), FALSE); - gtk_tree_view_append_column(GTK_TREE_VIEW(Liste), Colonne); + gtk_tree_view_column_set_alignment(GTK_TREE_VIEW_COLUMN(Colonne), 0.5f); + gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(Colonne), FALSE); + gtk_tree_view_append_column(GTK_TREE_VIEW(Liste), Colonne); - for(i = 0; i < max; i++) - { - gtk_list_store_append(Modele_Liste, &iter_Liste); - gtk_list_store_set(Modele_Liste, &iter_Liste, N_texte, cfgSectionNumberToName(i), -1); - } + for(i = 0; i < max; i++) + { + gtk_list_store_append(Modele_Liste, &iter_Liste); + gtk_list_store_set(Modele_Liste, &iter_Liste, N_texte, cfgSectionNumberToName(i), -1); + } - gtk_widget_set_size_request(GTK_WIDGET(dialog), 200, 200); + gtk_widget_set_size_request(GTK_WIDGET(dialog), 200, 200); - g_signal_connect(GTK_OBJECT(dialog), "response", G_CALLBACK (callback), GTK_TREE_SELECTION(Selection_Liste)); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); + g_signal_connect(GTK_WIDGET(dialog), "response", G_CALLBACK (callback), GTK_TREE_SELECTION(Selection_Liste)); + g_signal_connect_swapped(GTK_WIDGET(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), Frame); + gtk_box_pack_start (GTK_BOX (content_area), Frame, TRUE, TRUE, 0); - gtk_widget_show_all (dialog); - } + gtk_widget_show_all (dialog); + } } void Save_config_file(void) { - GtkWidget *dialog, *label, *box, *entry; - - dialog = gtk_dialog_new_with_buttons (_("Save configuration"), - NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_NONE, - GTK_STOCK_OK, - GTK_RESPONSE_ACCEPT, - NULL); - gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); - - label=gtk_label_new(_("Configuration name: ")); - - box = gtk_hbox_new(FALSE, 0); - entry = gtk_entry_new(); - gtk_entry_set_text(GTK_ENTRY(entry), "default"); - gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); - gtk_box_pack_start(GTK_BOX(box), label, FALSE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(box), entry, FALSE, TRUE, 0); + GtkWidget *dialog, *content_area, *label, *box, *entry; - g_signal_connect(GTK_OBJECT(dialog), "response", G_CALLBACK(save_config), GTK_ENTRY(entry)); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); + dialog = gtk_dialog_new_with_buttons (_("Save configuration"), + NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_NONE, + GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + NULL); + content_area = gtk_dialog_get_content_area (GTK_DIALOG(dialog)); + + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); + + label = gtk_label_new(_("Configuration name: ")); + + box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + entry = gtk_entry_new(); + gtk_entry_set_text(GTK_ENTRY(entry), "default"); + gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(box), entry, TRUE, TRUE, 0); + + //validate input text (alpha-numeric only) + g_signal_connect(GTK_ENTRY(entry), + "insert-text", + G_CALLBACK(check_text_input), isalnum); + g_signal_connect(GTK_WIDGET(dialog), "response", G_CALLBACK(save_config), GTK_ENTRY(entry)); + g_signal_connect_swapped(GTK_WIDGET(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); - gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), box); + gtk_box_pack_start(GTK_BOX(content_area), box, TRUE, FALSE, 5); - gtk_widget_show_all (dialog); + gtk_widget_show_all (dialog); } void really_save_config(GtkDialog *Fenetre, gint id, gpointer data) { - int max, cfg_num, i; - gchar *string = NULL; + int max, cfg_num, i; + gchar *string = NULL; - cfg_num = -1; + cfg_num = -1; - if(id == GTK_RESPONSE_ACCEPT) - { - max = cfgParse(config_file, cfg, CFG_INI); + if(id == GTK_RESPONSE_ACCEPT) + { + max = cfgParse(config_file, cfg, CFG_INI); - if(max == -1) - return; + if(max == -1) + return; - for(i = 0; i < max; i++) - { - if(!strcmp((char *)data, cfgSectionNumberToName(i))) - cfg_num = i; - } + for(i = 0; i < max; i++) + { + if(!strcmp((char *)data, cfgSectionNumberToName(i))) + cfg_num = i; + } - /* not overwriting */ - if(cfg_num == -1) - { - max = cfgAllocForNewSection(cfg, (char *)data); - cfg_num = max - 1; - } - else - { - if(remove_section(config_file, (char *)data) == -1) - { - show_message(_("Cannot overwrite section!"), MSG_ERR); - return; - } - if(max == cfgParse(config_file, cfg, CFG_INI)) - { - show_message(_("Cannot read configuration file!"), MSG_ERR); - return; - } - max = cfgAllocForNewSection(cfg, (char *)data); - cfg_num = max - 1; - } + /* not overwriting */ + if(cfg_num == -1) + { + max = cfgAllocForNewSection(cfg, (char *)data); + cfg_num = max - 1; + } + else + { + if(remove_section(config_file, (char *)data) == -1) + { + show_message(_("Cannot overwrite section!"), MSG_ERR); + return; + } + if(max == cfgParse(config_file, cfg, CFG_INI)) + { + show_message(_("Cannot read configuration file!"), MSG_ERR); + return; + } + max = cfgAllocForNewSection(cfg, (char *)data); + cfg_num = max - 1; + } - Copy_configuration(cfg_num); - cfgDump(config_file, cfg, CFG_INI, max); + Copy_configuration(cfg_num); + cfgDump(config_file, cfg, CFG_INI, max); - string = g_strdup_printf(_("Configuration [%s] saved\n"), (char *)data); - show_message(string, MSG_WRN); - g_free(string); - } - else - Save_config_file(); + string = g_strdup_printf(_("Configuration [%s] saved\n"), (char *)data); + show_message(string, MSG_WRN); + g_free(string); + } + else + Save_config_file(); } void save_config(GtkDialog *Fenetre, gint id, GtkWidget *edit) { - int max, i; - GtkWidget *dialog, *label; - static gchar text[100]; + int max, i; + const gchar *config_name; - if(id == GTK_RESPONSE_ACCEPT) - { - max = cfgParse(config_file, cfg, CFG_INI); + if(id == GTK_RESPONSE_ACCEPT) + { + max = cfgParse(config_file, cfg, CFG_INI); - if(max == -1) - return; + if(max == -1) + return; - for(i = 0; i < max; i++) - { - if(!strcmp(gtk_entry_get_text(GTK_ENTRY(edit)), cfgSectionNumberToName(i))) - { - /* section already exists */ - dialog = gtk_dialog_new_with_buttons (_("Warning!"), - NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_NONE, - GTK_STOCK_OK, - GTK_RESPONSE_ACCEPT, - NULL); - - sprintf(text, _("\nSection [%s] already exists\nDo you want to overwrite it ?\n"), gtk_entry_get_text(GTK_ENTRY(edit))); - label=gtk_label_new(text); - strcpy(text, gtk_entry_get_text(GTK_ENTRY(edit))); - g_signal_connect(GTK_OBJECT(dialog), "response", G_CALLBACK(really_save_config), (gpointer)text); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); + config_name = gtk_entry_get_text(GTK_ENTRY(edit)); + + for(i = 0; i < max; i++) + { + if(!strcmp(config_name, cfgSectionNumberToName(i))) + { + GtkWidget *message_dialog; + message_dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(Fenetre), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_NONE, + _("Section [%s] already exists.\n\nDo you want to overwrite it ?"), + config_name); + + gtk_dialog_add_buttons(GTK_DIALOG(message_dialog), + GTK_STOCK_CANCEL, + GTK_RESPONSE_NONE, + GTK_STOCK_YES, + GTK_RESPONSE_ACCEPT, + NULL); - gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); + if (gtk_dialog_run(GTK_DIALOG(message_dialog)) == GTK_RESPONSE_ACCEPT) + really_save_config(Fenetre, GTK_RESPONSE_ACCEPT, (gpointer)config_name); - gtk_widget_show_all (dialog); + gtk_widget_destroy(message_dialog); - i = max + 1; - } - } - if(i == max) - /* Section does not exist */ - { - strcpy(text, gtk_entry_get_text(GTK_ENTRY(edit))); - really_save_config(Fenetre, GTK_RESPONSE_ACCEPT, (gpointer)text); + i = max + 1; + } + } + if(i == max) /* Section does not exist */ + really_save_config(Fenetre, GTK_RESPONSE_ACCEPT, (gpointer)config_name); } - } } void load_config(GtkDialog *Fenetre, gint id, GtkTreeSelection *Selection_Liste) { - GtkTreeIter iter; - GtkTreeModel *Modele; - gchar *txt, *message; - - if(id == GTK_RESPONSE_ACCEPT) - { - if(gtk_tree_selection_get_selected(Selection_Liste, &Modele, &iter)) - { - gtk_tree_model_get(GTK_TREE_MODEL(Modele), &iter, 0, (gint *)&txt, -1); - Load_configuration_from_file(txt); - Verify_configuration(); - message = Config_port(); - Set_Font(); - add_shortcuts(); - if(message == NULL) - message = g_strdup_printf(_("No open port")); - g_free(message); - - message = get_port_string(); - Set_status_message(message); - Set_window_title(message); - g_free(message); + GtkTreeIter iter; + GtkTreeModel *Modele; + gchar *txt, *message; + + if(id == GTK_RESPONSE_ACCEPT) + { + if(gtk_tree_selection_get_selected(Selection_Liste, &Modele, &iter)) + { + gtk_tree_model_get(GTK_TREE_MODEL(Modele), &iter, 0, (gint *)&txt, -1); + Load_configuration_from_file(txt); + Verify_configuration(); + Config_port(); + add_shortcuts(); + + message = get_port_string(); + Set_status_message(message); + Set_window_title(message); + g_free(message); + } } - } } void delete_config(GtkDialog *Fenetre, gint id, GtkTreeSelection *Selection_Liste) { - GtkTreeIter iter; - GtkTreeModel *Modele; - gchar *txt; - - if(id == GTK_RESPONSE_ACCEPT) - { - if(gtk_tree_selection_get_selected(Selection_Liste, &Modele, &iter)) - { - gtk_tree_model_get(GTK_TREE_MODEL(Modele), &iter, 0, (gint *)&txt, -1); - if(remove_section(config_file, txt) == -1) - show_message(_("Cannot delete section!"), MSG_ERR); - } - } -} + GtkTreeIter iter; + GtkTreeModel *Modele; + gchar *txt; -gint Load_configuration_from_file(gchar *config_name) -{ - int max, i, j, k, size; - gchar *string = NULL; - gchar *str; - macro_t *macros = NULL; - cfgList *t; - - max = cfgParse(config_file, cfg, CFG_INI); - - if(max == -1) - return -1; - - else - { - for(i = 0; i < max; i++) + if(id == GTK_RESPONSE_ACCEPT) { - if(!strcmp(config_name, cfgSectionNumberToName(i))) - { - Hard_default_configuration(); - - if(port[i] != NULL) - strcpy(config.port, port[i]); - if(speed[i] != 0) - config.vitesse = speed[i]; - if(bits[i] != 0) - config.bits = bits[i]; - if(stopbits[i] != 0) - config.stops = stopbits[i]; - if(parity[i] != NULL) - { - if(!g_ascii_strcasecmp(parity[i], "none")) - config.parite = 0; - else if(!g_ascii_strcasecmp(parity[i], "odd")) - config.parite = 1; - else if(!g_ascii_strcasecmp(parity[i], "even")) - config.parite = 2; - } - if(flow[i] != NULL) + if(gtk_tree_selection_get_selected(Selection_Liste, &Modele, &iter)) { - if(!g_ascii_strcasecmp(flow[i], "none")) - config.flux = 0; - else if(!g_ascii_strcasecmp(flow[i], "xon")) - config.flux = 1; - else if(!g_ascii_strcasecmp(flow[i], "rts")) - config.flux = 2; - else if(!g_ascii_strcasecmp(flow[i], "rs485")) - config.flux = 3; + gtk_tree_model_get(GTK_TREE_MODEL(Modele), &iter, 0, (gint *)&txt, -1); + if(remove_section(config_file, txt) == -1) + show_message(_("Cannot delete section!"), MSG_ERR); } + } +} - config.delai = wait_delay[i]; - - if(wait_char[i] != 0) - config.car = (signed char)wait_char[i]; - else - config.car = -1; +gint Load_configuration_from_file(gchar *config_name) +{ + int max, i, j, k, size; + gchar *string = NULL; + gchar *str; + macro_t *macros = NULL; + cfgList *t; - config.rs485_rts_time_before_transmit = rts_time_before_tx[i]; - config.rs485_rts_time_after_transmit = rts_time_after_tx[i]; + max = cfgParse(config_file, cfg, CFG_INI); - if(echo[i] != -1) - config.echo = (gboolean)echo[i]; - else - config.echo = FALSE; + if(max == -1) + return -1; - if(crlfauto[i] != -1) - config.crlfauto = (gboolean)crlfauto[i]; - else - config.crlfauto = FALSE; + else + { + for(i = 0; i < max; i++) + { + if(!strcmp(config_name, cfgSectionNumberToName(i))) + { + Hard_default_configuration(); - g_free(term_conf.font); - term_conf.font = g_strdup(font[i]); + if(port[i] != NULL) + strcpy(config.port, port[i]); + if(speed[i] != 0) + config.vitesse = speed[i]; + if(bits[i] != 0) + config.bits = bits[i]; + if(stopbits[i] != 0) + config.stops = stopbits[i]; + if(parity[i] != NULL) + { + if(!g_ascii_strcasecmp(parity[i], "none")) + config.parite = 0; + else if(!g_ascii_strcasecmp(parity[i], "odd")) + config.parite = 1; + else if(!g_ascii_strcasecmp(parity[i], "even")) + config.parite = 2; + } + if(flow[i] != NULL) + { + if(!g_ascii_strcasecmp(flow[i], "none")) + config.flux = 0; + else if(!g_ascii_strcasecmp(flow[i], "xon")) + config.flux = 1; + else if(!g_ascii_strcasecmp(flow[i], "rts")) + config.flux = 2; + else if(!g_ascii_strcasecmp(flow[i], "rs485")) + config.flux = 3; + } + + config.delai = wait_delay[i]; + + if(wait_char[i] != 0) + config.car = (signed char)wait_char[i]; + else + config.car = -1; + + config.rs485_rts_time_before_transmit = rts_time_before_tx[i]; + config.rs485_rts_time_after_transmit = rts_time_after_tx[i]; + + if(echo[i] != -1) + config.echo = (gboolean)echo[i]; + else + config.echo = FALSE; + + if(crlfauto[i] != -1) + config.crlfauto = (gboolean)crlfauto[i]; + else + config.crlfauto = FALSE; + + g_free(term_conf.font); + term_conf.font = g_strdup(font[i]); + + t = macro_list[i]; + size = 0; + if(t != NULL) + { + size++; + while(t->next != NULL) + { + t = t->next; + size++; + } + } + + if(size != 0) + { + t = macro_list[i]; + macros = g_malloc(size * sizeof(macro_t)); + if(macros == NULL) + { + perror("malloc"); + return -1; + } + for(j = 0; j < size; j++) + { + for(k = 0; k < (strlen(t->str) - 1); k++) + { + if((t->str[k] == ':') && (t->str[k + 1] == ':')) + break; + } + macros[j].shortcut = g_strndup(t->str, k); + str = &(t->str[k + 2]); + macros[j].action = g_strdup(str); + + t = t->next; + } + } + + remove_shortcuts(); + create_shortcuts(macros, size); + g_free(macros); + + if(block_cursor[i] != -1) + term_conf.block_cursor = (gboolean)block_cursor[i]; + else + term_conf.block_cursor = TRUE; + + if(rows[i] != 0) + term_conf.rows = rows[i]; + + if(columns[i] != 0) + term_conf.columns = columns[i]; + + if(scrollback[i] != 0) + term_conf.scrollback = scrollback[i]; + + if(visual_bell[i] != -1) + term_conf.visual_bell = (gboolean)visual_bell[i]; + else + term_conf.visual_bell = FALSE; + + term_conf.foreground_color.red = foreground_red[i]; + term_conf.foreground_color.green = foreground_green[i]; + term_conf.foreground_color.blue = foreground_blue[i]; + term_conf.foreground_color.alpha = foreground_alpha[i]; + + term_conf.background_color.red = background_red[i]; + term_conf.background_color.green = background_green[i]; + term_conf.background_color.blue = background_blue[i]; + term_conf.background_color.alpha = background_alpha[i]; + + /* rows and columns are empty when the conf is autogenerate in the + first save; so set term to default */ + if(rows[i] == 0 || columns[i] == 0) + { + term_conf.block_cursor = TRUE; + term_conf.rows = 80; + term_conf.columns = 25; + term_conf.scrollback = DEFAULT_SCROLLBACK; + term_conf.visual_bell = FALSE; + + term_conf.foreground_color.red = 0.66; + term_conf.foreground_color.green = 0.66; + term_conf.foreground_color.blue = 0.66; + term_conf.foreground_color.alpha = 1; + + term_conf.background_color.red = 0; + term_conf.background_color.green = 0; + term_conf.background_color.blue = 0; + term_conf.background_color.alpha = 1; + } - t = macro_list[i]; - size = 0; - if(t != NULL) - { - size++; - while(t->next != NULL) - { - t = t->next; - size++; - } + i = max + 1; + } } - - if(size != 0) + if(i == max) { - t = macro_list[i]; - macros = g_malloc(size * sizeof(macro_t)); - if(macros == NULL) - { - perror("malloc"); + string = g_strdup_printf(_("No section \"%s\" in configuration file\n"), config_name); + show_message(string, MSG_ERR); + g_free(string); return -1; - } - for(j = 0; j < size; j++) - { - for(k = 0; k < (strlen(t->str) - 1); k++) - { - if((t->str[k] == ':') && (t->str[k + 1] == ':')) - break; - } - macros[j].shortcut = g_strndup(t->str, k); - str = &(t->str[k + 2]); - macros[j].action = g_strdup(str); - - t = t->next; - } } + } - remove_shortcuts(); - create_shortcuts(macros, size); - g_free(macros); - - if(transparency[i] != -1) - term_conf.transparency = (gboolean)transparency[i]; - else - term_conf.transparency = FALSE; - - if(show_cursor[i] != -1) - term_conf.show_cursor = (gboolean)show_cursor[i]; - else - term_conf.show_cursor = FALSE; - - if(rows[i] != 0) - term_conf.rows = rows[i]; - - if(columns[i] != 0) - term_conf.columns = columns[i]; - - if(scrollback[i] != 0) - term_conf.scrollback = scrollback[i]; - - if(visual_bell[i] != -1) - term_conf.visual_bell = (gboolean)visual_bell[i]; - else - term_conf.visual_bell = FALSE; - - term_conf.foreground_color.red = foreground_red[i]; - term_conf.foreground_color.green = foreground_green[i]; - term_conf.foreground_color.blue = foreground_blue[i]; - - term_conf.background_color.red = background_red[i]; - term_conf.background_color.green = background_green[i]; - term_conf.background_color.blue = background_blue[i]; - - if(background_saturation[i] != 0) - term_conf.background_saturation = background_saturation[i]; - - /* rows and columns are empty when the conf is autogenerate in the - first save; so set term to default */ - if(rows[i] == 0 || columns[i] == 0) - { - term_conf.transparency = FALSE; - term_conf.show_cursor = TRUE; - term_conf.rows = 80; - term_conf.columns = 25; - term_conf.scrollback = DEFAULT_SCROLLBACK; - term_conf.visual_bell = FALSE; - - term_conf.foreground_color.red = 43253; - term_conf.foreground_color.green = 43253; - term_conf.foreground_color.blue = 43253; - - term_conf.background_color.red = 0; - term_conf.background_color.green = 0; - term_conf.background_color.blue = 0; - - term_conf.background_saturation = 0.5; - } + vte_terminal_set_font(VTE_TERMINAL(display), pango_font_description_from_string(term_conf.font)); - i = max + 1; - } - } - if(i == max) - { - string = g_strdup_printf(_("No section \"%s\" in configuration file\n"), config_name); - show_message(string, MSG_ERR); - g_free(string); - return -1; - } - } - vte_terminal_set_font_from_string(VTE_TERMINAL(display), term_conf.font); - - vte_terminal_set_background_transparent(VTE_TERMINAL(display), term_conf.transparency); - vte_terminal_set_size (VTE_TERMINAL(display), term_conf.rows, term_conf.columns); - vte_terminal_set_scrollback_lines (VTE_TERMINAL(display), term_conf.scrollback); - vte_terminal_set_color_foreground (VTE_TERMINAL(display), &term_conf.foreground_color); - vte_terminal_set_color_background (VTE_TERMINAL(display), &term_conf.background_color); - vte_terminal_set_background_saturation(VTE_TERMINAL(display), (gdouble)term_conf.background_saturation); - gtk_widget_queue_draw(display); + vte_terminal_set_size (VTE_TERMINAL(display), term_conf.rows, term_conf.columns); + vte_terminal_set_scrollback_lines (VTE_TERMINAL(display), term_conf.scrollback); + vte_terminal_set_color_foreground (VTE_TERMINAL(display), &term_conf.foreground_color); + vte_terminal_set_color_background (VTE_TERMINAL(display), &term_conf.background_color); + vte_terminal_set_color_background (VTE_TERMINAL(display), &term_conf.background_color); + vte_terminal_set_cursor_shape(VTE_TERMINAL(display), term_conf.block_cursor ? VTE_CURSOR_SHAPE_BLOCK : VTE_CURSOR_SHAPE_IBEAM); + gtk_widget_queue_draw(display); - return 0; + return 0; } void Verify_configuration(void) { - gchar *string = NULL; + gchar *string = NULL; - switch(config.vitesse) - { + switch(config.vitesse) + { case 300: case 600: case 1200: @@ -1024,619 +1064,496 @@ case 38400: case 57600: case 115200: - break; + case 230400: + case 460800: + case 576000: + case 921600: + case 1000000: + case 2000000: + break; default: - string = g_strdup_printf(_("Unknown rate: %d baud\nMay not be supported by all hardware"), config.vitesse); - show_message(string, MSG_ERR); - g_free(string); - } - - if(config.stops != 1 && config.stops != 2) - { - string = g_strdup_printf(_("Invalid number of stop-bits: %d\nFalling back to default number of stop-bits number: %d\n"), config.stops, DEFAULT_STOP); - show_message(string, MSG_ERR); - config.stops = DEFAULT_STOP; - g_free(string); - } + string = g_strdup_printf(_("Baudrate %d may not be supported by all hardware"), config.vitesse); + show_message(string, MSG_ERR); + g_free(string); + } - if(config.bits < 5 || config.bits > 8) - { - string = g_strdup_printf(_("Invalid number of bits: %d\nFalling back to default number of bits: %d\n"), config.bits, DEFAULT_BITS); - show_message(string, MSG_ERR); - config.bits = DEFAULT_BITS; - g_free(string); - } + if(config.stops != 1 && config.stops != 2) + { + string = g_strdup_printf(_("Invalid number of stop-bits: %d\nFalling back to default number of stop-bits number: %d\n"), config.stops, DEFAULT_STOP); + show_message(string, MSG_ERR); + config.stops = DEFAULT_STOP; + g_free(string); + } - if(config.delai < 0 || config.delai > 500) - { - string = g_strdup_printf(_("Invalid delay: %d ms\nFalling back to default delay: %d ms\n"), config.delai, DEFAULT_DELAY); - show_message(string, MSG_ERR); - config.delai = DEFAULT_DELAY; - g_free(string); - } + if(config.bits < 5 || config.bits > 8) + { + string = g_strdup_printf(_("Invalid number of bits: %d\nFalling back to default number of bits: %d\n"), config.bits, DEFAULT_BITS); + show_message(string, MSG_ERR); + config.bits = DEFAULT_BITS; + g_free(string); + } - if(term_conf.font == NULL) - term_conf.font = g_strdup_printf(DEFAULT_FONT); + if(config.delai < 0 || config.delai > 500) + { + string = g_strdup_printf(_("Invalid delay: %d ms\nFalling back to default delay: %d ms\n"), config.delai, DEFAULT_DELAY); + show_message(string, MSG_ERR); + config.delai = DEFAULT_DELAY; + g_free(string); + } + + if(term_conf.font == NULL) + term_conf.font = g_strdup_printf(DEFAULT_FONT); } gint Check_configuration_file(void) { - struct stat my_stat; - gchar *string = NULL; + struct stat my_stat; + gchar *string = NULL; - /* is configuration file present ? */ - if(stat(config_file, &my_stat) == 0) - { - /* If bad configuration file, fallback to _hardcoded_ defaults! */ - if(Load_configuration_from_file("default") == -1) - { - Hard_default_configuration(); - return -1; - } - } - - /* if not, create it, with the [default] section */ - else - { - string = g_strdup_printf(_("Configuration file (%s) with\n[default] configuration has been created.\n"), config_file); - show_message(string, MSG_WRN); - cfgAllocForNewSection(cfg, "default"); - Hard_default_configuration(); - Copy_configuration(0); - cfgDump(config_file, cfg, CFG_INI, 1); - g_free(string); - } - return 0; + /* is configuration file present ? */ + if(stat(config_file, &my_stat) == 0) + { + /* If bad configuration file, fallback to _hardcoded_ defaults! */ + if(Load_configuration_from_file("default") == -1) + { + Hard_default_configuration(); + return -1; + } + } + + /* if not, create it, with the [default] section */ + else + { + string = g_strdup_printf(_("Configuration file (%s) with\n[default] configuration has been created.\n"), config_file); + show_message(string, MSG_WRN); + cfgAllocForNewSection(cfg, "default"); + Hard_default_configuration(); + Copy_configuration(0); + cfgDump(config_file, cfg, CFG_INI, 1); + g_free(string); + } + return 0; } void Hard_default_configuration(void) { - strcpy(config.port, DEFAULT_PORT); - config.vitesse = DEFAULT_SPEED; - config.parite = DEFAULT_PARITY; - config.bits = DEFAULT_BITS; - config.stops = DEFAULT_STOP; - config.flux = DEFAULT_FLOW; - config.delai = DEFAULT_DELAY; - config.rs485_rts_time_before_transmit = DEFAULT_DELAY_RS485; - config.rs485_rts_time_after_transmit = DEFAULT_DELAY_RS485; - config.car = DEFAULT_CHAR; - config.echo = DEFAULT_ECHO; - config.crlfauto = FALSE; - - term_conf.font = g_strdup_printf(DEFAULT_FONT); - - term_conf.transparency = FALSE; - term_conf.show_cursor = TRUE; - term_conf.rows = 80; - term_conf.columns = 25; - term_conf.scrollback = DEFAULT_SCROLLBACK; - term_conf.visual_bell = TRUE; + strcpy(config.port, DEFAULT_PORT); + config.vitesse = DEFAULT_SPEED; + config.parite = DEFAULT_PARITY; + config.bits = DEFAULT_BITS; + config.stops = DEFAULT_STOP; + config.flux = DEFAULT_FLOW; + config.delai = DEFAULT_DELAY; + config.rs485_rts_time_before_transmit = DEFAULT_DELAY_RS485; + config.rs485_rts_time_after_transmit = DEFAULT_DELAY_RS485; + config.car = DEFAULT_CHAR; + config.echo = DEFAULT_ECHO; + config.crlfauto = FALSE; + + term_conf.font = g_strdup_printf(DEFAULT_FONT); - Selec_couleur(&term_conf.foreground_color, 0.66, 0.66, 0.66); - Selec_couleur(&term_conf.background_color, 0, 0, 0); + term_conf.block_cursor = TRUE; + term_conf.rows = 80; + term_conf.columns = 25; + term_conf.scrollback = DEFAULT_SCROLLBACK; + term_conf.visual_bell = TRUE; - term_conf.background_saturation = 0.50; + Selec_couleur(&term_conf.foreground_color, 0.66, 0.66, 0.66, 1.0); + Selec_couleur(&term_conf.background_color, 0, 0, 0, 1.0); } void Copy_configuration(int pos) { - gchar *string = NULL; - macro_t *macros = NULL; - gint size, i; - - string = g_strdup(config.port); - cfgStoreValue(cfg, "port", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", config.vitesse); - cfgStoreValue(cfg, "speed", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", config.bits); - cfgStoreValue(cfg, "bits", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", config.stops); - cfgStoreValue(cfg, "stopbits", string, CFG_INI, pos); - g_free(string); + gchar *string = NULL; + macro_t *macros = NULL; + gint size, i; - switch(config.parite) - { + string = g_strdup(config.port); + cfgStoreValue(cfg, "port", string, CFG_INI, pos); + g_free(string); + + string = g_strdup_printf("%d", config.vitesse); + cfgStoreValue(cfg, "speed", string, CFG_INI, pos); + g_free(string); + + string = g_strdup_printf("%d", config.bits); + cfgStoreValue(cfg, "bits", string, CFG_INI, pos); + g_free(string); + + string = g_strdup_printf("%d", config.stops); + cfgStoreValue(cfg, "stopbits", string, CFG_INI, pos); + g_free(string); + + switch(config.parite) + { case 0: - string = g_strdup_printf("none"); - break; + string = g_strdup_printf("none"); + break; case 1: - string = g_strdup_printf("odd"); - break; + string = g_strdup_printf("odd"); + break; case 2: - string = g_strdup_printf("even"); - break; + string = g_strdup_printf("even"); + break; default: - string = g_strdup_printf("none"); - } - cfgStoreValue(cfg, "parity", string, CFG_INI, pos); - g_free(string); + string = g_strdup_printf("none"); + } + cfgStoreValue(cfg, "parity", string, CFG_INI, pos); + g_free(string); - switch(config.flux) - { + switch(config.flux) + { case 0: - string = g_strdup_printf("none"); - break; + string = g_strdup_printf("none"); + break; case 1: - string = g_strdup_printf("xon"); - break; + string = g_strdup_printf("xon"); + break; case 2: - string = g_strdup_printf("rts"); - break; + string = g_strdup_printf("rts"); + break; case 3: - string = g_strdup_printf("rs485"); - break; + string = g_strdup_printf("rs485"); + break; default: - string = g_strdup_printf("none"); - } + string = g_strdup_printf("none"); + } - cfgStoreValue(cfg, "flow", string, CFG_INI, pos); - g_free(string); + cfgStoreValue(cfg, "flow", string, CFG_INI, pos); + g_free(string); - string = g_strdup_printf("%d", config.delai); - cfgStoreValue(cfg, "wait_delay", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", config.car); - cfgStoreValue(cfg, "wait_char", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", config.rs485_rts_time_before_transmit); - cfgStoreValue(cfg, "rs485_rts_time_before_tx", string, CFG_INI, pos); - g_free(string); - string = g_strdup_printf("%d", config.rs485_rts_time_after_transmit); - cfgStoreValue(cfg, "rs485_rts_time_after_tx", string, CFG_INI, pos); - g_free(string); - - if(config.echo == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - - cfgStoreValue(cfg, "echo", string, CFG_INI, pos); - g_free(string); - - if(config.crlfauto == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - - cfgStoreValue(cfg, "crlfauto", string, CFG_INI, pos); - g_free(string); - - string = g_strdup(term_conf.font); - cfgStoreValue(cfg, "font", string, CFG_INI, pos); - g_free(string); - - macros = get_shortcuts(&size); - for(i = 0; i < size; i++) - { - string = g_strdup_printf("%s::%s", macros[i].shortcut, macros[i].action); - cfgStoreValue(cfg, "macros", string, CFG_INI, pos); - g_free(string); - } - - if(term_conf.transparency == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - cfgStoreValue(cfg, "term_transparency", string, CFG_INI, pos); - g_free(string); - - if(term_conf.show_cursor == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - cfgStoreValue(cfg, "term_show_cursor", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", term_conf.rows); - cfgStoreValue(cfg, "term_rows", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", term_conf.columns); - cfgStoreValue(cfg, "term_columns", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", term_conf.scrollback); - cfgStoreValue(cfg, "term_scrollback", string, CFG_INI, pos); - g_free(string); - - if(term_conf.visual_bell == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - cfgStoreValue(cfg, "term_visual_bell", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", term_conf.foreground_color.red); - cfgStoreValue(cfg, "term_foreground_red", string, CFG_INI, pos); - g_free(string); - string = g_strdup_printf("%d", term_conf.foreground_color.green); - cfgStoreValue(cfg, "term_foreground_green", string, CFG_INI, pos); - g_free(string); - string = g_strdup_printf("%d", term_conf.foreground_color.blue); - cfgStoreValue(cfg, "term_foreground_blue", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%d", term_conf.background_color.red); - cfgStoreValue(cfg, "term_background_red", string, CFG_INI, pos); - g_free(string); - string = g_strdup_printf("%d", term_conf.background_color.green); - cfgStoreValue(cfg, "term_background_green", string, CFG_INI, pos); - g_free(string); - string = g_strdup_printf("%d", term_conf.background_color.blue); - cfgStoreValue(cfg, "term_background_blue", string, CFG_INI, pos); - g_free(string); - - string = g_strdup_printf("%g", term_conf.background_saturation); - cfgStoreValue(cfg, "term_background_saturation", string, CFG_INI, pos); - g_free(string); -} + string = g_strdup_printf("%d", config.delai); + cfgStoreValue(cfg, "wait_delay", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%d", config.car); + cfgStoreValue(cfg, "wait_char", string, CFG_INI, pos); + g_free(string); -gint remove_section(gchar *cfg_file, gchar *section) -{ - FILE *f = NULL; - char *buffer = NULL; - char *buf; - long size; - gchar *to_search; - long i, j, length, sect; - - f = fopen(cfg_file, "r"); - if(f == NULL) - { - perror(cfg_file); - return -1; - } - - fseek(f, 0L, SEEK_END); - size = ftell(f); - rewind(f); - - buffer = g_malloc(size); - if(buffer == NULL) - { - perror("malloc"); - return -1; - } - - if(fread(buffer, 1, size, f) != size) - { - perror(cfg_file); - fclose(f); - return -1; - } + string = g_strdup_printf("%d", config.rs485_rts_time_before_transmit); + cfgStoreValue(cfg, "rs485_rts_time_before_tx", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%d", config.rs485_rts_time_after_transmit); + cfgStoreValue(cfg, "rs485_rts_time_after_tx", string, CFG_INI, pos); + g_free(string); - to_search = g_strdup_printf("[%s]", section); - length = strlen(to_search); + if(config.echo == FALSE) + string = g_strdup_printf("False"); + else + string = g_strdup_printf("True"); + + cfgStoreValue(cfg, "echo", string, CFG_INI, pos); + g_free(string); - /* Search section */ - for(i = 0; i < size - length; i++) - { - for(j = 0; j < length; j++) + if(config.crlfauto == FALSE) + string = g_strdup_printf("False"); + else + string = g_strdup_printf("True"); + + cfgStoreValue(cfg, "crlfauto", string, CFG_INI, pos); + g_free(string); + + string = g_strdup(term_conf.font); + cfgStoreValue(cfg, "font", string, CFG_INI, pos); + g_free(string); + + macros = get_shortcuts(&size); + for(i = 0; i < size; i++) { - if(to_search[j] != buffer[i + j]) - break; + string = g_strdup_printf("%s::%s", macros[i].shortcut, macros[i].action); + cfgStoreValue(cfg, "macros", string, CFG_INI, pos); + g_free(string); } - if(j == length) - break; - } - if(i == size - length) - { - i18n_printf(_("Cannot find section %s\n"), to_search); - return -1; - } + if(term_conf.block_cursor == FALSE) + string = g_strdup_printf("False"); + else + string = g_strdup_printf("True"); + cfgStoreValue(cfg, "term_block_cursor", string, CFG_INI, pos); + g_free(string); - sect = i; + string = g_strdup_printf("%d", term_conf.rows); + cfgStoreValue(cfg, "term_rows", string, CFG_INI, pos); + g_free(string); - /* Search for next section */ - for(i = sect + length; i < size; i++) - { - if(buffer[i] == '[') - break; - } + string = g_strdup_printf("%d", term_conf.columns); + cfgStoreValue(cfg, "term_columns", string, CFG_INI, pos); + g_free(string); - f = fopen(cfg_file, "w"); - if(f == NULL) - { - perror(cfg_file); - return -1; - } + string = g_strdup_printf("%d", term_conf.scrollback); + cfgStoreValue(cfg, "term_scrollback", string, CFG_INI, pos); + g_free(string); - fwrite(buffer, 1, sect, f); - buf = buffer + i; - fwrite(buf, 1, size - i, f); - fclose(f); + if(term_conf.visual_bell == FALSE) + string = g_strdup_printf("False"); + else + string = g_strdup_printf("True"); + cfgStoreValue(cfg, "term_visual_bell", string, CFG_INI, pos); + g_free(string); - g_free(to_search); - g_free(buffer); + string = g_strdup_printf("%f", term_conf.foreground_color.red); + cfgStoreValue(cfg, "term_foreground_red", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.foreground_color.green); + cfgStoreValue(cfg, "term_foreground_green", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.foreground_color.blue); + cfgStoreValue(cfg, "term_foreground_blue", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.foreground_color.alpha); + cfgStoreValue(cfg, "term_foreground_alpha", string, CFG_INI, pos); + g_free(string); - return 0; + string = g_strdup_printf("%f", term_conf.background_color.red); + cfgStoreValue(cfg, "term_background_red", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.background_color.green); + cfgStoreValue(cfg, "term_background_green", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.background_color.blue); + cfgStoreValue(cfg, "term_background_blue", string, CFG_INI, pos); + g_free(string); + string = g_strdup_printf("%f", term_conf.background_color.alpha); + cfgStoreValue(cfg, "term_background_alpha", string, CFG_INI, pos); + g_free(string); } -gint Config_Terminal(GtkWidget *widget, guint param) +gint remove_section(gchar *cfg_file, gchar *section) { - GtkWidget *Dialog, *BoiteH, *BoiteV, *Label, *Check_Bouton, *Bouton, *Eventbox, *Table, *HScale, *Entry; - gchar *fonte, *scrollback; + FILE *f = NULL; + char *buffer = NULL; + char *buf; + long size; + gchar *to_search; + long i, j, length, sect; - Dialog = gtk_dialog_new_with_buttons (_("Terminal configuration"), - NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CLOSE, - GTK_RESPONSE_CLOSE, - NULL); - gtk_widget_set_size_request(GTK_WIDGET(Dialog), 400, 400); + f = fopen(cfg_file, "r"); + if(f == NULL) + { + perror(cfg_file); + return -1; + } + fseek(f, 0L, SEEK_END); + size = ftell(f); + rewind(f); - BoiteV = gtk_vbox_new(FALSE, 0); - gtk_container_set_border_width(GTK_CONTAINER(BoiteV), 10); + buffer = g_malloc(size); + if(buffer == NULL) + { + perror("malloc"); + return -1; + } - BoiteH = gtk_hbox_new(FALSE, 0); - Label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(Label), "Font selection: "); - gtk_box_pack_start(GTK_BOX(BoiteH), Label, FALSE, TRUE, 0); - fonte = g_strdup_printf("%s", term_conf.font); - Bouton_font = gtk_button_new_with_label(fonte); - gtk_box_pack_start(GTK_BOX(BoiteH), Bouton_font, FALSE, TRUE, 10); - g_signal_connect(GTK_OBJECT(Bouton_font), "clicked", G_CALLBACK(Config_Font), 0); - gtk_box_pack_start(GTK_BOX(BoiteV), BoiteH, FALSE, TRUE, 0); + if(fread(buffer, 1, size, f) != size) + { + perror(cfg_file); + fclose(f); + return -1; + } - Check_Bouton = gtk_check_button_new_with_label("Show cursor"); - g_signal_connect(GTK_OBJECT(Check_Bouton), "toggled", G_CALLBACK(Curseur_OnOff), 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Check_Bouton), term_conf.show_cursor); - gtk_box_pack_start(GTK_BOX(BoiteV), Check_Bouton, FALSE, TRUE, 5); + to_search = g_strdup_printf("[%s]", section); + length = strlen(to_search); - Label = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(Label), 0, 0); - gtk_label_set_markup(GTK_LABEL(Label), "Colors: "); - gtk_box_pack_start(GTK_BOX(BoiteV), Label, FALSE, TRUE, 10); + /* Search section */ + for(i = 0; i < size - length; i++) + { + for(j = 0; j < length; j++) + { + if(to_search[j] != buffer[i + j]) + break; + } + if(j == length) + break; + } + + if(i == size - length) + { + i18n_printf(_("Cannot find section %s\n"), to_search); + return -1; + } + sect = i; - Table = gtk_table_new(2, 2, FALSE); + /* Search for next section */ + for(i = sect + length; i < size; i++) + { + if(buffer[i] == '[') + break; + } - Label = gtk_label_new("Text color:"); - gtk_misc_set_alignment(GTK_MISC(Label), 0, 0); - gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 0, 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 10, 0); + f = fopen(cfg_file, "w"); + if(f == NULL) + { + perror(cfg_file); + return -1; + } - Label = gtk_label_new("Background color:"); - gtk_misc_set_alignment(GTK_MISC(Label), 0, 0); - gtk_table_attach(GTK_TABLE(Table), Label, 0, 1, 1, 2, GTK_SHRINK | GTK_FILL , GTK_SHRINK, 10, 0); + fwrite(buffer, 1, sect, f); + buf = buffer + i; + fwrite(buf, 1, size - i, f); + fclose(f); - Bouton = gtk_button_new(); - Eventbox = gtk_event_box_new(); - gtk_container_add(GTK_CONTAINER(Bouton), Eventbox); - gtk_widget_set_size_request(GTK_WIDGET(Bouton), 60, 25); - gtk_widget_modify_bg(GTK_WIDGET(Eventbox), GTK_STATE_NORMAL, &term_conf.foreground_color); - gtk_table_attach(GTK_TABLE(Table), Bouton, 1, 2, 0, 1, GTK_SHRINK, GTK_SHRINK, 10, 0); - g_signal_connect(GTK_OBJECT(Bouton), "clicked", G_CALLBACK(config_color_fg), Eventbox); + g_free(to_search); + g_free(buffer); - Bouton = gtk_button_new(); - Eventbox = gtk_event_box_new(); - gtk_container_add(GTK_CONTAINER(Bouton), Eventbox); - gtk_widget_set_size_request(GTK_WIDGET(Bouton), 60, 25); - gtk_widget_modify_bg(GTK_WIDGET(Eventbox), GTK_STATE_NORMAL, &term_conf.background_color); - gtk_table_attach(GTK_TABLE(Table), Bouton, 1, 2, 1, 2, GTK_SHRINK, GTK_SHRINK, 10, 0); - g_signal_connect(GTK_OBJECT(Bouton), "clicked", G_CALLBACK(config_color_bg), Eventbox); - gtk_box_pack_start(GTK_BOX(BoiteV), Table, FALSE, TRUE, 0); + return 0; +} - Label = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(Label), 0, 0); - gtk_label_set_markup(GTK_LABEL(Label), "Transparency: "); - gtk_box_pack_start(GTK_BOX(BoiteV), Label, FALSE, TRUE, 10); +void Config_Terminal(GtkAction *action, gpointer data) +{ + GtkBuilder *builder; + builder = gtk_builder_new_from_resource("/org/gtk/gtkterm/config_terminal_dialog.ui"); - Check_Bouton = gtk_check_button_new_with_label("Transparency enable"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Check_Bouton), term_conf.transparency); - gtk_box_pack_start(GTK_BOX(BoiteV), Check_Bouton, FALSE, TRUE, 0); + GtkWidget *dialog; + dialog = GTK_WIDGET(gtk_builder_get_object(builder, "dialog")); + gtk_window_set_transient_for(dialog, Fenetre); - HScale = gtk_hscale_new_with_range(0.0, 100.0, 1.0); - gtk_range_set_value(GTK_RANGE(HScale), term_conf.background_saturation*100.0); - g_signal_connect(GTK_OBJECT(Check_Bouton), "toggled", G_CALLBACK(Transparency_OnOff), HScale); - g_signal_connect(GTK_RANGE(HScale), "value-changed", G_CALLBACK(change_scale), 0); - gtk_widget_set_sensitive(GTK_WIDGET(HScale), term_conf.transparency); - gtk_box_pack_start(GTK_BOX(BoiteV), HScale, FALSE, TRUE, 0); + /** Connect signals **/ + // Font Selection Button + GtkWidget *cfg_terminal_font; + cfg_terminal_font = GTK_WIDGET(gtk_builder_get_object(builder, "cfg_terminal_font")); + g_signal_connect(cfg_terminal_font, "font-set", G_CALLBACK(read_font_button), 0); - Label = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(Label), 0, 0); - gtk_label_set_markup(GTK_LABEL(Label), "Screen: "); - gtk_box_pack_start(GTK_BOX(BoiteV), Label, FALSE, TRUE, 10); + // Scrollback Lines + GtkAdjustment *cfg_scrollback_lines; + cfg_scrollback_lines = GTK_ADJUSTMENT(gtk_builder_get_object(builder, "cfg_scrollback_lines")); + gtk_adjustment_set_value(cfg_scrollback_lines, term_conf.scrollback); + g_signal_connect(G_OBJECT(cfg_scrollback_lines), "value_changed", G_CALLBACK(scrollback_set), 0); - BoiteH = gtk_hbox_new(FALSE, 0); - Label = gtk_label_new("Scrollback lines:"); - gtk_box_pack_start(GTK_BOX(BoiteH), Label, FALSE, TRUE, 0); - Entry = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(Entry), 4); - scrollback = g_strdup_printf("%d", term_conf.scrollback); - gtk_entry_set_text(GTK_ENTRY(Entry), scrollback); - g_free(scrollback); - g_signal_connect(GTK_OBJECT(Entry), "focus-out-event", G_CALLBACK(scrollback_set), 0); - gtk_box_pack_start(GTK_BOX(BoiteH), Entry, FALSE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(BoiteV), BoiteH, FALSE, TRUE, 0); + // Show cursor + GtkWidget *cfg_block_cursor; + cfg_block_cursor = GTK_WIDGET(gtk_builder_get_object(builder, "cfg_block_cursor")); + gtk_switch_set_active(GTK_SWITCH(cfg_block_cursor), term_conf.block_cursor); + g_signal_connect(cfg_block_cursor, "state_set", G_CALLBACK(cursor_block), 0); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Dialog)->vbox), BoiteV); + // Text color + GtkWidget *cfg_text_color; + cfg_text_color = GTK_WIDGET(gtk_builder_get_object(builder, "cfg_text_color")); + gtk_color_button_set_rgba(GTK_COLOR_BUTTON(cfg_text_color), &term_conf.foreground_color); + g_signal_connect(cfg_text_color, "color-set", G_CALLBACK (config_fg_color), 0); - g_signal_connect_swapped(GTK_OBJECT(Dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(Dialog)); + // Background color + GtkWidget *cfg_background_color; + cfg_background_color = GTK_WIDGET(gtk_builder_get_object(builder, "cfg_background_color")); + gtk_color_button_set_rgba(GTK_COLOR_BUTTON(cfg_background_color), &term_conf.background_color); + g_signal_connect(cfg_background_color, "color-set", G_CALLBACK (config_bg_color), 0); - gtk_widget_show_all (Dialog); + // Close button + GtkWidget *close; + close = GTK_WIDGET(gtk_builder_get_object(builder, "close")); + g_signal_connect_swapped(close, "clicked", G_CALLBACK(gtk_widget_destroy), GTK_WIDGET(dialog)); - return FALSE; + gtk_widget_show_all(dialog); } -void Curseur_OnOff(GtkWidget *Check_Bouton, gpointer data) +gboolean cursor_block(GtkSwitch *ToggleSwitch, gboolean state, gpointer data) { - term_conf.show_cursor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check_Bouton)); + term_conf.block_cursor = state; + vte_terminal_set_cursor_shape(VTE_TERMINAL(display), term_conf.block_cursor ? VTE_CURSOR_SHAPE_BLOCK : VTE_CURSOR_SHAPE_IBEAM); + return FALSE; } -void Selec_couleur(GdkColor *Couleur, gfloat R, gfloat V, gfloat B) +void Selec_couleur(GdkRGBA *color, gfloat R, gfloat G, gfloat B, gfloat A) { - Couleur->red=(guint16)(R*65535); - Couleur->green=(guint16)(V*65535); - Couleur->blue=(guint16)(B*65535); + color->red = R; + color->green = G; + color->blue = B; + color->alpha = A; } -gint config_color_fg(GtkWidget *bouton, gpointer data) +void config_fg_color(GtkWidget *button, gpointer data) { - GtkWidget *Fenetre; - GtkColorSelection *colorsel; - gint response; - gchar *string; - - Fenetre = gtk_color_selection_dialog_new ("Changing text color"); - colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (Fenetre)->colorsel); - gtk_color_selection_set_previous_color (colorsel, &term_conf.foreground_color); - gtk_color_selection_set_current_color (colorsel, &term_conf.foreground_color); - - gtk_color_selection_set_has_palette (colorsel, TRUE); - gtk_widget_set_size_request(GTK_WIDGET(Fenetre), 465, 315); - gtk_window_set_position(GTK_WINDOW(Fenetre), GTK_WIN_POS_CENTER); + gchar *string; - response = gtk_dialog_run (GTK_DIALOG (Fenetre)); + gtk_color_button_get_rgba (GTK_COLOR_BUTTON (button), &term_conf.foreground_color); - if (response == GTK_RESPONSE_OK) - { - gtk_color_selection_get_current_color (colorsel, &term_conf.foreground_color); - gtk_widget_modify_bg(GTK_WIDGET(data), GTK_STATE_NORMAL, &term_conf.foreground_color); vte_terminal_set_color_foreground (VTE_TERMINAL(display), &term_conf.foreground_color); - gtk_widget_queue_draw(display); + gtk_widget_queue_draw (display); - string = g_strdup_printf("%d", term_conf.foreground_color.red); - cfgStoreValue(cfg, "term_foreground_red", string, CFG_INI, 0); - g_free(string); - string = g_strdup_printf("%d", term_conf.foreground_color.green); - cfgStoreValue(cfg, "term_foreground_green", string, CFG_INI, 0); - g_free(string); - string = g_strdup_printf("%d", term_conf.foreground_color.blue); - cfgStoreValue(cfg, "term_foreground_blue", string, CFG_INI, 0); - g_free(string); - } - - gtk_widget_destroy(Fenetre); - - return TRUE; + string = g_strdup_printf ("%d", term_conf.foreground_color.red); + cfgStoreValue (cfg, "term_foreground_red", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.foreground_color.green); + cfgStoreValue (cfg, "term_foreground_green", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.foreground_color.blue); + cfgStoreValue (cfg, "term_foreground_blue", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.foreground_color.alpha); + cfgStoreValue (cfg, "term_foreground_alpha", string, CFG_INI, 0); + g_free (string); } -gint config_color_bg(GtkWidget *bouton, gpointer data) +void config_bg_color(GtkWidget *button, gpointer data) { - GtkWidget *Fenetre; - GtkColorSelection *colorsel; - gint response; - gchar *string; - - Fenetre = gtk_color_selection_dialog_new ("Changing background color"); - colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (Fenetre)->colorsel); - gtk_color_selection_set_previous_color (colorsel, &term_conf.background_color); - gtk_color_selection_set_current_color (colorsel, &term_conf.background_color); - - gtk_color_selection_set_has_palette (colorsel, TRUE); - gtk_widget_set_size_request(GTK_WIDGET(Fenetre), 465, 315); - gtk_window_set_position(GTK_WINDOW(Fenetre), GTK_WIN_POS_CENTER); + gchar *string; - response = gtk_dialog_run (GTK_DIALOG (Fenetre)); + gtk_color_button_get_rgba (GTK_COLOR_BUTTON (button), &term_conf.background_color); - if (response == GTK_RESPONSE_OK) - { - gtk_color_selection_get_current_color (colorsel, &term_conf.background_color); - gtk_widget_modify_bg(GTK_WIDGET(data), GTK_STATE_NORMAL, &term_conf.background_color); vte_terminal_set_color_background (VTE_TERMINAL(display), &term_conf.background_color); - gtk_widget_queue_draw(display); - - string = g_strdup_printf("%d", term_conf.background_color.red); - cfgStoreValue(cfg, "term_background_red", string, CFG_INI, 0); - g_free(string); - string = g_strdup_printf("%d", term_conf.background_color.green); - cfgStoreValue(cfg, "term_background_green", string, CFG_INI, 0); - g_free(string); - string = g_strdup_printf("%d", term_conf.background_color.blue); - cfgStoreValue(cfg, "term_background_blue", string, CFG_INI, 0); - g_free(string); - } - - gtk_widget_destroy(Fenetre); - - return TRUE; -} - - -static void Transparency_OnOff(GtkWidget *Check_Bouton, gpointer data) -{ - gchar *string; - - term_conf.transparency = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check_Bouton)); - vte_terminal_set_background_transparent(VTE_TERMINAL(display), term_conf.transparency); - gtk_widget_set_sensitive(GTK_WIDGET(data), term_conf.transparency); - - if(term_conf.transparency == FALSE) - string = g_strdup_printf("False"); - else - string = g_strdup_printf("True"); - - cfgStoreValue(cfg, "term_transparency", string, CFG_INI, 1); - g_free(string); -} + gtk_widget_queue_draw (display); -static void change_scale(GtkRange *range, gpointer data) + string = g_strdup_printf ("%d", term_conf.background_color.red); + cfgStoreValue (cfg, "term_background_red", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.background_color.green); + cfgStoreValue (cfg, "term_background_green", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.background_color.blue); + cfgStoreValue (cfg, "term_background_blue", string, CFG_INI, 0); + g_free (string); + string = g_strdup_printf ("%d", term_conf.background_color.alpha); + cfgStoreValue (cfg, "term_background_alpha", string, CFG_INI, 0); + g_free (string); +} + +void scrollback_set(GtkAdjustment *Adjustment, gpointer data) +{ + gint scrollback = gtk_adjustment_get_value(Adjustment); + term_conf.scrollback = scrollback; + vte_terminal_set_scrollback_lines (VTE_TERMINAL(display), term_conf.scrollback); +} + +/** + * Filter user data entry on a GTK entry + * + * user_data must be a function that takes an int and returns an int + * != 0 if the input is valid. For instance, 'isdigit()'. + */ +void check_text_input(GtkEditable *editable, + gchar *new_text, + gint new_text_length, + gint *position, + gpointer user_data) { - gchar *string; - term_conf.background_saturation = gtk_range_get_value(GTK_RANGE(range))/100.0; - vte_terminal_set_background_saturation(VTE_TERMINAL(display), (gdouble)term_conf.background_saturation); + int i; + int (*check_func)(int) = NULL; - string = g_strdup_printf("%g", term_conf.background_saturation); - cfgStoreValue(cfg, "term_background_saturation", string, CFG_INI, 0); - g_free(string); -} + if(user_data == NULL) + { + return; + } -gint scrollback_set(GtkWidget *Entry, GdkEventFocus *event, gpointer data) -{ - const gchar *text; - gint scrollback; - - if (Entry) - { - text = gtk_entry_get_text(GTK_ENTRY(Entry)); - scrollback = (gint)g_ascii_strtoll(text, NULL, 10); - if (scrollback) - term_conf.scrollback = scrollback; - else - term_conf.scrollback = DEFAULT_SCROLLBACK; - vte_terminal_set_scrollback_lines (VTE_TERMINAL(display), term_conf.scrollback); - } - return FALSE; -} + g_signal_handlers_block_by_func(editable, + (gpointer)check_text_input, user_data); + check_func = (int (*)(int))user_data; -void check_text_input(GtkEditable *editable, - gchar *new_text, - gint new_text_length, - gint *position, - gpointer user_data) -{ - int i; - gchar *result = g_utf8_strup(new_text, new_text_length); - g_signal_handlers_block_by_func(editable, - (gpointer)check_text_input, user_data); - - for(i = 0; i < new_text_length; i++) - { - if(!isdigit(result[i])) - goto invalid_input; - } + for(i = 0; i < new_text_length; i++) + { + if(!check_func(new_text[i])) + goto invalid_input; + } - gtk_editable_insert_text(editable, result, new_text_length, position); + gtk_editable_insert_text(editable, new_text, new_text_length, position); invalid_input: - g_signal_handlers_unblock_by_func(editable, - (gpointer)check_text_input, user_data); - g_signal_stop_emission_by_name(editable, "insert-text"); - g_free(result); + g_signal_handlers_unblock_by_func(editable, + (gpointer)check_text_input, user_data); + g_signal_stop_emission_by_name(editable, "insert-text"); } + diff -Nru gtkterm-0.99.7~rc1/src/term_config.h gtkterm-0.99.7+git9d63182/src/term_config.h --- gtkterm-0.99.7~rc1/src/term_config.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/term_config.h 2017-11-17 16:09:59.000000000 +0000 @@ -15,50 +15,51 @@ #ifndef TERM_CONFIG_H_ #define TERM_CONFIG_H_ -gint Config_Port_Fenetre(GtkWidget *widget, guint param); +void Config_Port_Fenetre(GtkAction *action, gpointer data); gint Lis_Config(GtkWidget *bouton, GtkWidget **Combos); -gint Config_Terminal(GtkWidget *widget, guint param); -void Set_Font(void); -gint config_window(gpointer *, guint); +void Config_Terminal(GtkAction *action, gpointer data); +void select_config_callback(GtkAction *action, gpointer data); +void save_config_callback(GtkAction *action, gpointer data); +void delete_config_callback(GtkAction *action, gpointer data); void Verify_configuration(void); gint Load_configuration_from_file(gchar *); gint Check_configuration_file(void); void check_text_input(GtkEditable *editable, - gchar *new_text, - gint new_text_length, - gint *position, - gpointer user_data); - -struct configuration_port { - gchar port[1024]; - gint vitesse; // 300 - 600 - 1200 - ... - 115200 - gint bits; // 5 - 6 - 7 - 8 - gint stops; // 1 - 2 - gint parite; // 0 : None, 1 : Odd, 2 : Even - gint flux; // 0 : None, 1 : Xon/Xoff, 2 : RTS/CTS, 3 : RS485halfduplex - gint delai; // end of char delay: in ms - gint rs485_rts_time_before_transmit; - gint rs485_rts_time_after_transmit; - gchar car; // caractere attendre - gboolean echo; // echo local - gboolean crlfauto; // line feed auto + gchar *new_text, + gint new_text_length, + gint *position, + gpointer user_data); + +struct configuration_port +{ + gchar port[1024]; + gint vitesse; // 300 - 600 - 1200 - ... - 2000000 + gint bits; // 5 - 6 - 7 - 8 + gint stops; // 1 - 2 + gint parite; // 0 : None, 1 : Odd, 2 : Even + gint flux; // 0 : None, 1 : Xon/Xoff, 2 : RTS/CTS, 3 : RS485halfduplex + gint delai; // end of char delay: in ms + gint rs485_rts_time_before_transmit; + gint rs485_rts_time_after_transmit; + gchar car; // caractere attendre + gboolean echo; // echo local + gboolean crlfauto; // line feed auto }; -typedef struct { - gboolean transparency; - gboolean show_cursor; - gint rows; - gint columns; - gint scrollback; - gboolean visual_bell; - GdkColor foreground_color; - GdkColor background_color; - gdouble background_saturation; - gchar *font; +typedef struct +{ + gboolean block_cursor; + gint rows; + gint columns; + gint scrollback; + gboolean visual_bell; + GdkRGBA foreground_color; + GdkRGBA background_color; + gchar *font; } display_config_t; -#define DEFAULT_FONT "Nimbus Mono L, 14" +#define DEFAULT_FONT "Monospace 12" #define DEFAULT_SCROLLBACK 200 #define DEFAULT_PORT "/dev/ttyS0" diff -Nru gtkterm-0.99.7~rc1/src/widgets.c gtkterm-0.99.7+git9d63182/src/widgets.c --- gtkterm-0.99.7~rc1/src/widgets.c 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/widgets.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,738 +0,0 @@ -/***********************************************************************/ -/* widgets.c */ -/* --------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Functions for the management of the GUI for the main window */ -/* */ -/* ChangeLog */ -/* (All changes by Julien Schmitt except when explicitly written) */ -/* */ -/* - 0.99.7 : Changed keyboard shortcuts to */ -/* (Ken Peek) */ -/* - 0.99.6 : Added scrollbar and copy/paste (Zach Davis) */ -/* */ -/* - 0.99.5 : Make package buildable on pure *BSD by changing the */ -/* include to asm/termios.h by sys/ttycom.h */ -/* Print message without converting it into the locale */ -/* in show_message() */ -/* Set backspace key binding to backspace so that the */ -/* backspace works. It would even be nicer if the */ -/* behaviour of this key could be configured ! */ -/* - 0.99.4 : - Sebastien Bacher - */ -/* Added functions for CR LF auto mode */ -/* Fixed put_text() to have \r\n for the VTE Widget */ -/* Rewritten put_hexadecimal() function */ -/* - Julien - */ -/* Modified send_serial to return the actual number of */ -/* bytes written, and also only display exactly what */ -/* is written */ -/* - 0.99.3 : Modified to use a VTE terminal */ -/* - 0.99.2 : Internationalization */ -/* - 0.99.0 : \b byte now handled correctly by the ascii widget */ -/* SUPPR (0x7F) also prints correctly */ -/* adapted for macros */ -/* modified "about" dialog */ -/* - 0.98.6 : fixed possible buffer overrun in hex send */ -/* new "Send break" option */ -/* - 0.98.5 : icons in the menu */ -/* bug fixed with local echo and hexadecimal */ -/* modified hexadecimal send separator, and bug fixed */ -/* - 0.98.4 : new hexadecimal display / send */ -/* - 0.98.3 : put_text() modified to fit with 0x0D 0x0A */ -/* - 0.98.2 : added local echo by Julien */ -/* - 0.98 : file creation by Julien */ -/* */ -/***********************************************************************/ - -#include -#if defined (__linux__) -# include /* For control signals */ -#endif -#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) \ - || defined (__NetBSD__) || defined (__NetBSD_kernel__) \ - || defined (__OpenBSD__) || defined (__OpenBSD_kernel__) -# include /* For control signals */ -#endif -#include -#include -#include - -#include "term_config.h" -#include "fichier.h" -#include "serie.h" -#include "widgets.h" -#include "buffer.h" -#include "macros.h" -#include "auto_config.h" -#include "logging.h" - -#include -#include - -guint id; -gboolean echo_on; -gboolean crlfauto_on; -GtkWidget *StatusBar; -GtkWidget *signals[6]; -static GtkWidget *echo_menu = NULL; -static GtkWidget *crlfauto_menu = NULL; -static GtkWidget *ascii_menu = NULL; -static GtkWidget *hex_menu = NULL; -static GtkWidget *hex_len_menu = NULL; -static GtkWidget *hex_chars_menu = NULL; -static GtkWidget *show_index_menu = NULL; -static GtkWidget *Hex_Box; -static GtkWidget *log_pause_resume_menu = NULL; -static GtkWidget *log_start_menu = NULL; -static GtkWidget *log_stop_menu = NULL; -static GtkWidget *log_clear_menu = NULL; -GtkWidget *scrolled_window; -GtkWidget *Fenetre; -GtkAccelGroup *shortcuts; -GtkWidget *display = NULL; - -GtkWidget *Text; -GtkTextBuffer *buffer; -GtkTextIter iter; - -/* Variables for hexadecimal display */ -static gint bytes_per_line = 16; -static gchar blank_data[128]; -static guint total_bytes; -static gboolean show_index = FALSE; - -/* Local functions prototype */ -gint signaux(GtkWidget *, guint); -gint a_propos(GtkWidget *, guint); -gboolean Envoie_car(GtkWidget *, GdkEventKey *, gpointer); -gboolean control_signals_read(void); -gint Toggle_Echo(gpointer *, guint, GtkWidget *); -gint Toggle_Crlfauto(gpointer *, guint, GtkWidget *); -gint view(gpointer *, guint, GtkWidget *); -gint hexadecimal_chars_to_display(gpointer *, guint, GtkWidget *); -gint toggle_index(gpointer *, guint, GtkWidget *); -gint show_hide_hex(gpointer *, guint, GtkWidget *); -void initialize_hexadecimal_display(void); -gboolean Send_Hexadecimal(GtkWidget *, GdkEventKey *, gpointer); -gboolean pop_message(void); -static gchar *translate_menu(const gchar *, gpointer); -static void Got_Input(VteTerminal *, gchar *, guint, gpointer); -gint gui_paste(void); -gint gui_copy(void); -gint gui_copy_all_clipboard(void); - - -/* Menu */ -#define NUMBER_OF_ITEMS 42 - -static GtkItemFactoryEntry Tableau_Menu[] = { - {N_("/_File") , NULL, NULL, 0, ""}, - {N_("/File/Clear screen") , "L", (GtkItemFactoryCallback)clear_buffer, 0, "", GTK_STOCK_CLEAR}, - {N_("/File/Send _raw file") , "R", (GtkItemFactoryCallback)fichier, 1, "",GTK_STOCK_JUMP_TO}, - {N_("/File/_Save raw file") , NULL, (GtkItemFactoryCallback)fichier, 2, "", GTK_STOCK_SAVE_AS}, - {N_("/File/Separator") , NULL, NULL, 0, ""}, - {N_("/File/E_xit") , "Q", gtk_main_quit, 0, "", GTK_STOCK_QUIT}, - {N_("/Edit/_Paste") , "v", (GtkItemFactoryCallback)gui_paste, 0, "", GTK_STOCK_PASTE}, - {N_("/Edit/_Copy") , "c", (GtkItemFactoryCallback)gui_copy, 0, "", GTK_STOCK_COPY}, - {N_("/Edit/Copy _All") , NULL, (GtkItemFactoryCallback)gui_copy_all_clipboard, 0, "", GTK_STOCK_SELECT_ALL}, - {N_("/_Log") , NULL, NULL, 0, ""}, - {N_("/Log/To File...") , NULL, (GtkItemFactoryCallback)logging_start, 0, "", GTK_STOCK_MEDIA_RECORD}, - {N_("/Log/Pause") , NULL, (GtkItemFactoryCallback)logging_pause_resume, 0, "", GTK_STOCK_MEDIA_PAUSE}, - {N_("/Log/Stop") , NULL, (GtkItemFactoryCallback)logging_stop, 0, "", GTK_STOCK_MEDIA_STOP}, - {N_("/Log/Clear") , NULL, (GtkItemFactoryCallback)logging_clear, 0, "", GTK_STOCK_CLEAR}, - {N_("/_Configuration"), NULL, NULL, 0, ""}, - {N_("/Configuration/_Port"), "S", (GtkItemFactoryCallback)Config_Port_Fenetre, 0, "", GTK_STOCK_PREFERENCES}, - {N_("/Configuration/_Main window"), NULL, (GtkItemFactoryCallback)Config_Terminal, 0, "", GTK_STOCK_SELECT_FONT}, - {N_("/Configuration/Local _echo"), NULL, (GtkItemFactoryCallback)Toggle_Echo, 0, ""}, - {N_("/Configuration/_CR LF auto"), NULL, (GtkItemFactoryCallback)Toggle_Crlfauto, 0, ""}, - {N_("/Configuration/_Macros"), NULL, (GtkItemFactoryCallback)Config_macros, 0, ""}, - {N_("/Configuration/Separator") , NULL, NULL, 0, ""}, - {N_("/Configuration/_Load configuration"), NULL, (GtkItemFactoryCallback)config_window, 0, "", GTK_STOCK_OPEN}, - {N_("/Configuration/_Save configuration"), NULL, (GtkItemFactoryCallback)config_window, 1, "", GTK_STOCK_SAVE_AS}, - {N_("/Configuration/_Delete configuration"), NULL, (GtkItemFactoryCallback)config_window, 2, "", GTK_STOCK_DELETE}, - {N_("/Control _signals"), NULL, NULL, 0, ""}, - {N_("/Control signals/Send break"), "B", (GtkItemFactoryCallback)signaux, 2, ""}, - {N_("/Control signals/Toggle DTR"), "F7", (GtkItemFactoryCallback)signaux, 0, ""}, - {N_("/Control signals/Toggle RTS"), "F8", (GtkItemFactoryCallback)signaux, 1, ""}, - {N_("/_View"), NULL, NULL, 0, ""}, - {N_("/View/_ASCII"), NULL, (GtkItemFactoryCallback)view, ASCII_VIEW, ""}, - {N_("/View/_Hexadecimal"), NULL, (GtkItemFactoryCallback)view, HEXADECIMAL_VIEW, ""}, - {N_("/View/Hexadecimal _chars"), NULL, NULL, 0, ""}, - {N_("/View/Hexadecimal chars/_8"), NULL, (GtkItemFactoryCallback)hexadecimal_chars_to_display, 8, ""}, - {N_("/View/Hexadecimal chars/1_0"), NULL, (GtkItemFactoryCallback)hexadecimal_chars_to_display, 10, "/View/Hexadecimal chars/8"}, - {N_("/View/Hexadecimal chars/_16"), NULL, (GtkItemFactoryCallback)hexadecimal_chars_to_display, 16, "/View/Hexadecimal chars/8"}, - {N_("/View/Hexadecimal chars/_24"), NULL, (GtkItemFactoryCallback)hexadecimal_chars_to_display, 24, "/View/Hexadecimal chars/8"}, - {N_("/View/Hexadecimal chars/_32"), NULL, (GtkItemFactoryCallback)hexadecimal_chars_to_display, 32, "/View/Hexadecimal chars/8"}, - {N_("/View/Show _index"), NULL, (GtkItemFactoryCallback)toggle_index, 0, ""}, - {N_("/View/Separator") , NULL, NULL, 0, ""}, - {N_("/View/_Send hexadecimal data") , NULL, (GtkItemFactoryCallback)show_hide_hex, 0, ""}, - {N_("/_Help"), NULL, NULL, 0, ""}, - {N_("/Help/_About..."), NULL, (GtkItemFactoryCallback)a_propos, 0, "", GTK_STOCK_DIALOG_INFO} -}; - -static gchar *translate_menu(const gchar *path, gpointer data) -{ - return _(path); -} - -gint show_hide_hex(gpointer *pointer, guint param, GtkWidget *widget) -{ - if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) - gtk_widget_show(GTK_WIDGET(Hex_Box)); - else - gtk_widget_hide(GTK_WIDGET(Hex_Box)); - - return FALSE; -} - -gint toggle_index(gpointer *pointer, guint param, GtkWidget *widget) -{ - show_index = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); - set_view(HEXADECIMAL_VIEW); - return FALSE; -} - -gint hexadecimal_chars_to_display(gpointer *pointer, guint param, GtkWidget *widget) -{ - bytes_per_line = param; - set_view(HEXADECIMAL_VIEW); - return FALSE; -} - -void set_view(guint type) -{ - clear_display(); - set_clear_func(clear_display); - switch(type) - { - case ASCII_VIEW: - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(hex_menu), FALSE); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ascii_menu), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(show_index_menu), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(hex_chars_menu), FALSE); - total_bytes = 0; - set_display_func(put_text); - break; - case HEXADECIMAL_VIEW: - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(hex_menu), TRUE); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ascii_menu), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(show_index_menu), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(hex_chars_menu), TRUE); - total_bytes = 0; - set_display_func(put_hexadecimal); - break; - default: - set_display_func(NULL); - } - write_buffer(); -} - -gint view(gpointer *pointer, guint param, GtkWidget *widget) -{ - if(!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) - return FALSE; - - set_view(param); - - return FALSE; -} - -void Set_local_echo(gboolean echo) -{ - echo_on = echo; - if(echo_menu) - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(echo_menu), echo_on); -} - -gint Toggle_Echo(gpointer *pointer, guint param, GtkWidget *widget) -{ - echo_on = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); - configure_echo(echo_on); - return 0; -} - -void Set_crlfauto(gboolean crlfauto) -{ - crlfauto_on = crlfauto; - if(crlfauto_menu) - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(crlfauto_menu), crlfauto_on); -} - -gint Toggle_Crlfauto(gpointer *pointer, guint param, GtkWidget *widget) -{ - crlfauto_on = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); - configure_crlfauto(crlfauto_on); - return 0; -} - -void toggle_logging_pause_resume(gboolean currentlyLogging) -{ - if (currentlyLogging) - { - gtk_menu_item_set_label(GTK_MENU_ITEM(log_pause_resume_menu), _("Pause")); - } - else - { - gtk_menu_item_set_label(GTK_MENU_ITEM(log_pause_resume_menu), _("Resume")); - } -} - -void toggle_logging_sensitivity(gboolean currentlyLogging) -{ - gtk_widget_set_sensitive(GTK_WIDGET(log_start_menu), !currentlyLogging); - gtk_widget_set_sensitive(GTK_WIDGET(log_stop_menu), currentlyLogging); - gtk_widget_set_sensitive(GTK_WIDGET(log_pause_resume_menu), currentlyLogging); - gtk_widget_set_sensitive(GTK_WIDGET(log_clear_menu), currentlyLogging); -} - -void create_main_window(void) -{ - GtkWidget *Menu, *Boite, *BoiteH, *Label; - GtkWidget *Hex_Send_Entry; - GtkItemFactory *item_factory; - GtkAccelGroup *accel_group; - GSList *group; - - Fenetre = gtk_window_new(GTK_WINDOW_TOPLEVEL); - - shortcuts = gtk_accel_group_new(); - gtk_window_add_accel_group(GTK_WINDOW(Fenetre), GTK_ACCEL_GROUP(shortcuts)); - - gtk_signal_connect(GTK_OBJECT(Fenetre), "destroy", (GtkSignalFunc)gtk_main_quit, NULL); - gtk_signal_connect(GTK_OBJECT(Fenetre), "delete_event", (GtkSignalFunc)gtk_main_quit, NULL); - - Set_window_title("GtkTerm"); - - Boite = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(Fenetre), Boite); - - accel_group = gtk_accel_group_new(); - item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); - gtk_item_factory_set_translate_func(item_factory, translate_menu, "
", NULL); - gtk_window_add_accel_group(GTK_WINDOW(Fenetre), accel_group); - gtk_item_factory_create_items(item_factory, NUMBER_OF_ITEMS, Tableau_Menu, NULL); - Menu = gtk_item_factory_get_widget(item_factory, "
"); - log_pause_resume_menu = gtk_item_factory_get_item(item_factory, "/Log/Pause"); - log_start_menu = gtk_item_factory_get_item(item_factory, "/Log/To File..."); - log_stop_menu = gtk_item_factory_get_item(item_factory, "/Log/Stop"); - log_clear_menu = gtk_item_factory_get_item(item_factory, "/Log/Clear"); - echo_menu = gtk_item_factory_get_item(item_factory, "/Configuration/Local echo"); - crlfauto_menu = gtk_item_factory_get_item(item_factory, "/Configuration/LF auto"); - ascii_menu = gtk_item_factory_get_item(item_factory, "/View/ASCII"); - hex_menu = gtk_item_factory_get_item(item_factory, "/View/Hexadecimal"); - hex_chars_menu = gtk_item_factory_get_item(item_factory, "/View/Hexadecimal chars"); - show_index_menu = gtk_item_factory_get_item(item_factory, "/View/Show index"); - group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(ascii_menu)); - gtk_radio_menu_item_set_group(GTK_RADIO_MENU_ITEM(hex_menu), group); - - hex_len_menu = gtk_item_factory_get_item(item_factory, "/View/Hexadecimal chars/16"); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(hex_len_menu), TRUE); - - gtk_box_pack_start(GTK_BOX(Boite), Menu, FALSE, TRUE, 0); - - BoiteH = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(Boite), BoiteH, TRUE, TRUE, 0); - - /* create vte window */ - display = vte_terminal_new(); - - /* set terminal properties, these could probably be made user configurable */ - vte_terminal_set_scroll_on_output(VTE_TERMINAL(display), FALSE); - vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(display), TRUE); - vte_terminal_set_mouse_autohide(VTE_TERMINAL(display), TRUE); - vte_terminal_set_backspace_binding(VTE_TERMINAL(display), - VTE_ERASE_ASCII_BACKSPACE); - - clear_display(); - - /* make vte window scrollable - inspired by gnome-terminal package */ - scrolled_window = gtk_scrolled_window_new(NULL, - vte_terminal_get_adjustment(VTE_TERMINAL(display))); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), - GTK_SHADOW_NONE); - gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(display)); - - gtk_box_pack_start_defaults(GTK_BOX(BoiteH), scrolled_window); - - /* set up logging buttons availability */ - toggle_logging_pause_resume(FALSE); - toggle_logging_sensitivity(FALSE); - - /* hex box is hidden when not in use */ - Hex_Box = gtk_hbox_new(TRUE, 0); - Label = gtk_label_new(_("Hexadecimal data to send (separator : ';' or space) : ")); - gtk_box_pack_start_defaults(GTK_BOX(Hex_Box), Label); - Hex_Send_Entry = gtk_entry_new(); - gtk_signal_connect(GTK_OBJECT(Hex_Send_Entry), "activate", (GtkSignalFunc)Send_Hexadecimal, NULL); - gtk_box_pack_start(GTK_BOX(Hex_Box), Hex_Send_Entry, FALSE, TRUE, 5); - gtk_box_pack_start(GTK_BOX(Boite), Hex_Box, FALSE, TRUE, 2); - - /* status bar */ - StatusBar = gtk_statusbar_new(); - gtk_box_pack_start(GTK_BOX(Boite), StatusBar, FALSE, FALSE, 0); - id = gtk_statusbar_get_context_id(GTK_STATUSBAR(StatusBar), "Messages"); - - Label = gtk_label_new("RI"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - gtk_widget_set_sensitive(GTK_WIDGET(Label), FALSE); - signals[0] = Label; - - Label = gtk_label_new("DSR"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - signals[1] = Label; - - Label = gtk_label_new("CD"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - signals[2] = Label; - - Label = gtk_label_new("CTS"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - signals[3] = Label; - - Label = gtk_label_new("RTS"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - signals[4] = Label; - - Label = gtk_label_new("DTR"); - gtk_box_pack_end(GTK_BOX(StatusBar), Label, FALSE, TRUE, 5); - signals[5] = Label; - - g_signal_connect_after(GTK_OBJECT(display), "commit", G_CALLBACK(Got_Input), NULL); - - gtk_timeout_add(POLL_DELAY, (GtkFunction)control_signals_read, NULL); - - gtk_window_set_default_size(GTK_WINDOW(Fenetre), 750, 550); - gtk_widget_show_all(Fenetre); - gtk_widget_hide(GTK_WIDGET(Hex_Box)); - -} - -void initialize_hexadecimal_display(void) -{ - total_bytes = 0; - memset(blank_data, ' ', 128); - blank_data[bytes_per_line * 3 + 5] = 0; -} - -void put_hexadecimal(gchar *string, guint size) -{ - static gchar data[128]; - static gchar data_byte[6]; - static guint bytes; - glong column, row; - - gint i = 0; - - if(size == 0) - return; - - while(i < size) - { - while(gtk_events_pending()) gtk_main_iteration(); - vte_terminal_get_cursor_position(VTE_TERMINAL(display), &column, &row); - - if(show_index) - { - if(column == 0) - /* First byte on line */ - { - sprintf(data, "%6d: ", total_bytes); - vte_terminal_feed(VTE_TERMINAL(display), data, strlen(data)); - bytes = 0; - } - } - else - { - if(column == 0) - bytes = 0; - } - - /* Print hexadecimal characters */ - data[0] = 0; - - while(bytes < bytes_per_line && i < size) - { - gint avance=0; - gchar ascii[1]; - - sprintf(data_byte, "%02X ", (guchar)string[i]); - log_chars(data_byte, 3); - vte_terminal_feed(VTE_TERMINAL(display), data_byte, 3); - - avance = (bytes_per_line - bytes) * 3 + bytes + 2; - - /* Move forward */ - sprintf(data_byte, "%c[%dC", 27, avance); - vte_terminal_feed(VTE_TERMINAL(display), data_byte, strlen(data_byte)); - - /* Print ascii characters */ - ascii[0] = (string[i] > 0x1F) ? string[i] : '.'; - vte_terminal_feed(VTE_TERMINAL(display), ascii, 1); - - /* Move backward */ - sprintf(data_byte, "%c[%dD", 27, avance + 1); - vte_terminal_feed(VTE_TERMINAL(display), data_byte, strlen(data_byte)); - - if(bytes == bytes_per_line / 2 - 1) - vte_terminal_feed(VTE_TERMINAL(display), "- ", strlen("- ")); - - bytes++; - i++; - - /* End of line ? */ - if(bytes == bytes_per_line) - { - vte_terminal_feed(VTE_TERMINAL(display), "\r\n", 2); - total_bytes += bytes; - } - - } - - } -} - -void put_text(gchar *string, guint size) -{ - log_chars(string, size); - vte_terminal_feed(VTE_TERMINAL(display), string, size); -} - -gint send_serial(gchar *string, gint len) -{ - gint bytes_written; - - bytes_written = Send_chars(string, len); - if(bytes_written > 0) - { - if(echo_on) - put_chars(string, bytes_written, crlfauto_on); - } - - return bytes_written; -} - - -static void Got_Input(VteTerminal *widget, gchar *text, guint length, gpointer ptr) -{ - send_serial(text, length); -} - -gboolean Envoie_car(GtkWidget *widget, GdkEventKey *event, gpointer pointer) -{ - if(g_utf8_validate(event->string, 1, NULL)) - send_serial(event->string, 1); - - return FALSE; -} - - -gint a_propos(GtkWidget *widget, guint param) -{ - - gchar *authors[] = {"Julien Schmitt", "Zach Davis"}; - gtk_show_about_dialog(NULL, - "program-name", "GtkTerm", - "title", _("About GtkTerm"), - "authors", authors, - "version", VERSION, - "license", "GPL V.2", - "website", "https://fedorahosted.org/gtkterm/", - "website-label", "GtkTerm Homepage", NULL); - - return FALSE; -} - -void show_control_signals(int stat) -{ - if(stat & TIOCM_RI) - gtk_widget_set_sensitive(GTK_WIDGET(signals[0]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[0]), FALSE); - if(stat & TIOCM_DSR) - gtk_widget_set_sensitive(GTK_WIDGET(signals[1]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[1]), FALSE); - if(stat & TIOCM_CD) - gtk_widget_set_sensitive(GTK_WIDGET(signals[2]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[2]), FALSE); - if(stat & TIOCM_CTS) - gtk_widget_set_sensitive(GTK_WIDGET(signals[3]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[3]), FALSE); - if(stat & TIOCM_RTS) - gtk_widget_set_sensitive(GTK_WIDGET(signals[4]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[4]), FALSE); - if(stat & TIOCM_DTR) - gtk_widget_set_sensitive(GTK_WIDGET(signals[5]), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(signals[5]), FALSE); -} - -gint signaux(GtkWidget *widget, guint param) -{ - if(param == 2) - { - sendbreak(); - Put_temp_message(_("Break signal sent!"), 800); - } - else - Set_signals(param); - return FALSE; -} - -gboolean control_signals_read(void) -{ - int state; - - state = lis_sig(); - if(state >= 0) - show_control_signals(state); - - return TRUE; -} - -void Set_status_message(gchar *msg) -{ - gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); - gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, msg); -} - -void Set_window_title(gchar *msg) -{ - gchar* header = g_strdup_printf("GtkTerm - %s", msg); - gtk_window_set_title(GTK_WINDOW(Fenetre), header); - g_free(header); -} - -void show_message(gchar *message, gint type_msg) -{ - GtkWidget *Fenetre_msg; - - if(type_msg==MSG_ERR) - { - Fenetre_msg = gtk_message_dialog_new(GTK_WINDOW(Fenetre), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - message, NULL); - } - else if(type_msg==MSG_WRN) - { - Fenetre_msg = gtk_message_dialog_new(GTK_WINDOW(Fenetre), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_OK, - message, NULL); - } - else - return; - - gtk_dialog_run(GTK_DIALOG(Fenetre_msg)); - gtk_widget_destroy(Fenetre_msg); -} - -gboolean Send_Hexadecimal(GtkWidget *widget, GdkEventKey *event, gpointer pointer) -{ - gint i; - gchar *text, *current; - gchar *message; - guchar val; - guint val_read; - guint sent = 0; - gchar written[4]; - gchar *all_written; - - text = (gchar *)gtk_entry_get_text(GTK_ENTRY(widget)); - - if(strlen(text) == 0){ - message = g_strdup_printf(_("0 byte(s) sent!")); - Put_temp_message(message, 1500); - gtk_entry_set_text(GTK_ENTRY(widget), ""); - g_free(message); - return FALSE; - } - - all_written = g_malloc(strlen(text) * 2 + 1); - all_written[0] = 0; - - current = text; - i = 0; - while(i < strlen(text)) - { - if(sscanf(current, "%02X", &val_read) == 1) - { - val = (guchar)val_read; - send_serial((gchar*)&val, 1); - sprintf(written, "%02X ", val); - strcat(all_written, written); - sent++; - } - while(i < strlen(text) && text[i] != ';' && text[i] != ' ') - i++; - if(text[i] == ';' || text[i] == ' ') - { - i++; - current = &text[i]; - } - } - all_written[strlen(all_written) - 1] = 0; - message = g_strdup_printf(_("\"%s\" : %d byte(s) sent!"), all_written, sent); - Put_temp_message(message, 1500); - gtk_entry_set_text(GTK_ENTRY(widget), ""); - g_free(message); - g_free(all_written); - - return FALSE; -} - -void Put_temp_message(const gchar *text, gint time) -{ - /* time in ms */ - gtk_statusbar_push(GTK_STATUSBAR(StatusBar), id, text); - gtk_timeout_add(time, (GtkFunction)pop_message, NULL); -} - -gboolean pop_message(void) -{ - gtk_statusbar_pop(GTK_STATUSBAR(StatusBar), id); - - return FALSE; -} - -void clear_display(void) -{ - initialize_hexadecimal_display(); - if(display) - vte_terminal_reset(VTE_TERMINAL(display), TRUE, TRUE); -} - -gint gui_paste(void) -{ - vte_terminal_paste_clipboard(VTE_TERMINAL(display)); - return 0; -} - -gint gui_copy(void) -{ - vte_terminal_copy_clipboard(VTE_TERMINAL(display)); - return 0; -} - -gint gui_copy_all_clipboard(void) -{ - vte_terminal_select_all(VTE_TERMINAL(display)); - gui_copy(); - vte_terminal_select_none(VTE_TERMINAL(display)); - - return 0; -} diff -Nru gtkterm-0.99.7~rc1/src/widgets.h gtkterm-0.99.7+git9d63182/src/widgets.h --- gtkterm-0.99.7~rc1/src/widgets.h 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/src/widgets.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/***********************************************************************/ -/* widgets.h */ -/* --------- */ -/* GTKTerm Software */ -/* (c) Julien Schmitt */ -/* */ -/* ------------------------------------------------------------------- */ -/* */ -/* Purpose */ -/* Functions for the management of the GUI for the main window */ -/* - Header file - */ -/* */ -/***********************************************************************/ - -#ifndef WIDGETS_H_ -#define WIDGETS_H_ - -#define MSG_WRN 0 -#define MSG_ERR 1 - -#define ASCII_VIEW 0 -#define HEXADECIMAL_VIEW 1 - -void create_main_window(void); -void Set_status_message(gchar *); -void put_text(gchar *, guint); -void put_hexadecimal(gchar *, guint); -void Set_local_echo(gboolean); -void show_message(gchar *, gint); -void clear_display(void); -void set_view(guint); -gint send_serial(gchar *, gint); -void Put_temp_message(const gchar *, gint); -void Set_window_title(gchar *msg); - -void toggle_logging_pause_resume(gboolean currentlyLogging); -void toggle_logging_sensitivity(gboolean currentlyLogging); - -extern GtkWidget *Fenetre; -extern GtkWidget *StatusBar; -extern guint id; -extern GtkWidget *Text; -extern GtkAccelGroup *shortcuts; - -#endif diff -Nru gtkterm-0.99.7~rc1/TODO gtkterm-0.99.7+git9d63182/TODO --- gtkterm-0.99.7~rc1/TODO 2011-10-31 00:50:22.000000000 +0000 +++ gtkterm-0.99.7+git9d63182/TODO 2017-11-17 16:09:57.000000000 +0000 @@ -1,6 +1,11 @@ -* Changes for 0.99.7 release (Sep. 2011) - - Update documentation and version info - - Test on all platforms - - Refactor the build to use gtk autogen +* Changes for 1.00 release (2012?) - Update translations + - Update documentation and version information + - Migrate completely to Gtk-3.0 + - Refactor the code from french to english + +* Possible features + - Add inter-char delay for slow devices + - Support for tabs + - Better profile support