Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f7ae3eaa1 |
+1
-1
@@ -16,7 +16,7 @@ addons:
|
||||
apt:
|
||||
packages:
|
||||
- automake
|
||||
- autoconf-archive
|
||||
- autoconf
|
||||
- imagemagick
|
||||
- intltool
|
||||
- libcanberra-dev
|
||||
|
||||
+3
-22
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([HexChat],[2.12.0])
|
||||
AC_INIT([HexChat],[2.11.0])
|
||||
|
||||
AC_PREREQ([2.64])
|
||||
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
|
||||
@@ -13,13 +13,9 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-xz no-dist-gzip subdir-objects no-define foreign])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
AC_DEFUN([HEX_CHECK_MACRO], [m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined. Is ]$2[ installed?])])])
|
||||
|
||||
HEX_CHECK_MACRO([AX_APPEND_COMPILE_FLAGS], [autoconf-archive])
|
||||
HEX_CHECK_MACRO([PKG_PROG_PKG_CONFIG], [pkg-config])
|
||||
|
||||
AX_IS_RELEASE([minor-version])
|
||||
AX_CHECK_ENABLE_DEBUG([yes])
|
||||
AX_REQUIRE_DEFINED([PKG_PROG_PKG_CONFIG])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
@@ -580,33 +576,18 @@ dnl *********************************************************************
|
||||
dnl ** CFLAGS ***********************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([\
|
||||
CC_CHECK_FLAGS_APPEND([CFLAGS], [CFLAGS], [ \
|
||||
-pipe \
|
||||
-funsigned-char \
|
||||
-fstack-protector-strong \
|
||||
-fPIE \
|
||||
-fPIC \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wstrict-prototypes \
|
||||
-Wno-unused-parameter \
|
||||
-Wno-sign-compare \
|
||||
-Wno-pointer-sign \
|
||||
-Wno-missing-field-initializers \
|
||||
-Wno-unused-result \
|
||||
-Werror=format-security \
|
||||
-Werror=init-self \
|
||||
-Werror=declaration-after-statement \
|
||||
-Werror=missing-include-dirs \
|
||||
-Werror=date-time \
|
||||
-Werror=implicit-function-declaration \
|
||||
-Werror=pointer-arith \
|
||||
])
|
||||
|
||||
AX_APPEND_LINK_FLAGS([ \
|
||||
-pie \
|
||||
-Wl,-z,relro \
|
||||
-Wl,-z,now \
|
||||
])
|
||||
|
||||
dnl *********************************************************************
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
dnl Macros to check the presence of generic (non-typed) symbols.
|
||||
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
|
||||
dnl Copyright (c) 2006-2008 xine project
|
||||
dnl Copyright (c) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
|
||||
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, or (at your option)
|
||||
dnl any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU 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., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
dnl 02110-1301, USA.
|
||||
dnl
|
||||
dnl As a special exception, the copyright owners of the
|
||||
dnl macro gives unlimited permission to copy, distribute and modify the
|
||||
dnl configure scripts that are the output of Autoconf when processing the
|
||||
dnl Macro. You need not follow the terms of the GNU General Public
|
||||
dnl License when using or distributing such scripts, even though portions
|
||||
dnl of the text of the Macro appear in them. The GNU General Public
|
||||
dnl License (GPL) does govern all other use of the material that
|
||||
dnl constitutes the Autoconf Macro.
|
||||
dnl
|
||||
dnl This special exception to the GPL applies to versions of the
|
||||
dnl Autoconf Macro released by this project. When you make and
|
||||
dnl distribute a modified version of the Autoconf Macro, you may extend
|
||||
dnl this special exception to the GPL to apply to your modified version as
|
||||
dnl well.
|
||||
|
||||
dnl Check if FLAG in ENV-VAR is supported by compiler and append it
|
||||
dnl to WHERE-TO-APPEND variable
|
||||
dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG])
|
||||
|
||||
AC_DEFUN([CC_CHECK_FLAG_APPEND], [
|
||||
AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
|
||||
AS_TR_SH([cc_cv_$2_$3]),
|
||||
[eval "AS_TR_SH([cc_save_$2])='${$2}'"
|
||||
eval "AS_TR_SH([$2])='$3'"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
|
||||
[eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
|
||||
[eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
|
||||
eval "AS_TR_SH([$2])='$cc_save_$2'"])
|
||||
|
||||
AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes],
|
||||
[eval "$1='${$1} $3'"])
|
||||
])
|
||||
|
||||
dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2])
|
||||
AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
|
||||
for flag in $3; do
|
||||
CC_CHECK_FLAG_APPEND($1, $2, $flag)
|
||||
done
|
||||
])
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_perl_ext_flags.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PERL_EXT_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [EXTRA-MODULES])
|
||||
# AX_PERL_EXT_CFLAGS([CFLAGS-VARIABLE])
|
||||
# AX_PERL_EXT_LDFLAGS([LDFLAGS-VARIABLE], [EXTRA-MODULES])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Fetches the linker flags and C compiler flags for compiling and linking
|
||||
# programs that embed a Perl interpreter. If the EXTRA-MODULES argument is
|
||||
# submitted, it is a space separated list of extra modules to link. The
|
||||
# flags will be stored in the provided variables.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# AX_PERL_EXT_FLAGS([PERLXS_CFLAGS], [PERLXS_LDFLAGS])
|
||||
# AC_SUBST([PERLXS_CFLAGS])
|
||||
# AC_SUBST([PERLXS_LDFLAGS])
|
||||
#
|
||||
# AX_PERL_EXT_CFLAGS([PERLXS_CFLAGS])
|
||||
# AC_SUBST([PERLXS_CFLAGS])
|
||||
#
|
||||
# AX_PERL_EXT_LDFLAGS([PERLXS_LDFLAGS], [-std Socket])
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Mats Kindahl of Sun Microsystems <mats@sun.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
#serial 5
|
||||
|
||||
AC_DEFUN([AX_PERL_EXT_CFLAGS],
|
||||
[AC_CHECK_PROG(PERL,perl,perl)
|
||||
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||
[have_embed=no])
|
||||
AS_IF([test $have_embed = no],
|
||||
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||
_AX_PERL_EXT_EMBED_CHECK([$1],[ccopts])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([AX_PERL_EXT_LDFLAGS],
|
||||
[AC_CHECK_PROG(PERL,perl,perl)
|
||||
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||
[have_embed=no])
|
||||
AS_IF([test $have_embed = no],
|
||||
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||
_AX_PERL_EXT_EMBED_CHECK([$1],[ldopts],[$2])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([AX_PERL_EXT_FLAGS],
|
||||
[AC_CHECK_PROG(PERL,perl,perl)
|
||||
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||
[have_embed=no])
|
||||
AS_IF([test $have_embed = no],
|
||||
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||
_AX_PERL_EXT_EMBED_CHECK([$1],[ccopts])
|
||||
_AX_PERL_EXT_EMBED_CHECK([$2],[ldopts],[$3])
|
||||
])
|
||||
|
||||
|
||||
dnl _AX_PERL_EXT_MODULE_CHECK(MODULE-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
|
||||
dnl
|
||||
dnl Check for the existance of the perl module given by MODULE-NAME.
|
||||
dnl
|
||||
AC_DEFUN([_AX_PERL_EXT_MODULE_CHECK],
|
||||
[AC_MSG_CHECKING([for perl module $1])
|
||||
$PERL "-M$1" -e exit > /dev/null 2>&1
|
||||
AS_IF([test $? -eq 0],
|
||||
[AC_MSG_RESULT(yes)
|
||||
$2],
|
||||
[AC_MSG_RESULT(no)
|
||||
$3])
|
||||
])
|
||||
|
||||
dnl _AX_PERL_EXT_EMBED_CHECK(VARIABLE, COMMAND, [EXTRA-FLAGS]) Use
|
||||
dnl
|
||||
dnl ExtUtils::Embed fetch flags for embedding Perl in a C/C++
|
||||
dnl application
|
||||
dnl
|
||||
AC_DEFUN([_AX_PERL_EXT_EMBED_CHECK],
|
||||
[AC_MSG_CHECKING([for perl $2 embed flags])
|
||||
ax_c_perlxs_extras="$3"
|
||||
$1=`$PERL -MExtUtils::Embed -e $2 ${ax_c_perlxs_extras:+"-- $3"}`
|
||||
AC_MSG_RESULT($$1)
|
||||
])
|
||||
@@ -0,0 +1,327 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PYTHON_DEVEL([version])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
|
||||
# in your configure.ac.
|
||||
#
|
||||
# This macro checks for Python and tries to get the include path to
|
||||
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
|
||||
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
||||
# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
|
||||
#
|
||||
# You can search for some particular version of Python by passing a
|
||||
# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
|
||||
# note that you *have* to pass also an operator along with the version to
|
||||
# match, and pay special attention to the single quotes surrounding the
|
||||
# version number. Don't use "PYTHON_VERSION" for this: that environment
|
||||
# variable is declared as precious and thus reserved for the end-user.
|
||||
#
|
||||
# This macro should work for all versions of Python >= 2.1.0. As an end
|
||||
# user, you can disable the check for the python version by setting the
|
||||
# PYTHON_NOVERSIONCHECK environment variable to something else than the
|
||||
# empty string.
|
||||
#
|
||||
# If you need to use this macro for an older Python version, please
|
||||
# contact the authors. We're always open for feedback.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
|
||||
# Copyright (c) 2009 Alan W. Irwin
|
||||
# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
|
||||
# Copyright (c) 2009 Andrew Collier
|
||||
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
|
||||
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
|
||||
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 18
|
||||
|
||||
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||
#
|
||||
# Allow the use of a (user set) custom python version
|
||||
#
|
||||
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
|
||||
version to use, for example '2.3'. This string
|
||||
will be appended to the Python interpreter
|
||||
canonical name.])
|
||||
|
||||
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
|
||||
if test -z "$PYTHON"; then
|
||||
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for a version of Python >= 2.1.0
|
||||
#
|
||||
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
|
||||
ac_supports_python_ver=`$PYTHON -c "import sys; \
|
||||
ver = sys.version.split ()[[0]]; \
|
||||
print (ver >= '2.1.0')"`
|
||||
if test "$ac_supports_python_ver" != "True"; then
|
||||
if test -z "$PYTHON_NOVERSIONCHECK"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([
|
||||
This version of the AC@&t@_PYTHON_DEVEL macro
|
||||
doesn't work properly with versions of Python before
|
||||
2.1.0. You may need to re-run configure, setting the
|
||||
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
|
||||
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
||||
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||
to something else than an empty string.
|
||||
])
|
||||
else
|
||||
AC_MSG_RESULT([skip at user request])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
#
|
||||
# if the macro parameter ``version'' is set, honour it
|
||||
#
|
||||
if test -n "$1"; then
|
||||
AC_MSG_CHECKING([for a version of Python $1])
|
||||
ac_supports_python_ver=`$PYTHON -c "import sys; \
|
||||
ver = sys.version.split ()[[0]]; \
|
||||
print (ver $1)"`
|
||||
if test "$ac_supports_python_ver" = "True"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([this package requires Python $1.
|
||||
If you have it installed, but it isn't the default Python
|
||||
interpreter in your system path, please pass the PYTHON_VERSION
|
||||
variable to configure. See ``configure --help'' for reference.
|
||||
])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if you have distutils, else fail
|
||||
#
|
||||
AC_MSG_CHECKING([for the distutils Python package])
|
||||
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||
if test -z "$ac_distutils_result"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([cannot import Python module "distutils".
|
||||
Please check your Python installation. The error was:
|
||||
$ac_distutils_result])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for Python include path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python include path])
|
||||
if test -z "$PYTHON_CPPFLAGS"; then
|
||||
python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc ());"`
|
||||
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
|
||||
if test -n "${python_path}"; then
|
||||
if test "${plat_python_path}" != "${python_path}"; then
|
||||
python_path="-I$python_path -I$plat_python_path"
|
||||
else
|
||||
python_path="-I$python_path"
|
||||
fi
|
||||
fi
|
||||
PYTHON_CPPFLAGS=$python_path
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
|
||||
AC_SUBST([PYTHON_CPPFLAGS])
|
||||
|
||||
#
|
||||
# Check for Python library path
|
||||
#
|
||||
AC_MSG_CHECKING([for Python library path])
|
||||
if test -z "$PYTHON_LIBS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
ac_python_version=`cat<<EOD | $PYTHON -
|
||||
|
||||
# join all versioning strings, on some systems
|
||||
# major/minor numbers could be in different list elements
|
||||
from distutils.sysconfig import *
|
||||
e = get_config_var('VERSION')
|
||||
if e is not None:
|
||||
print(e)
|
||||
EOD`
|
||||
|
||||
if test -z "$ac_python_version"; then
|
||||
if test -n "$PYTHON_VERSION"; then
|
||||
ac_python_version=$PYTHON_VERSION
|
||||
else
|
||||
ac_python_version=`$PYTHON -c "import sys; \
|
||||
print (sys.version[[:3]])"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make the versioning information available to the compiler
|
||||
AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
|
||||
[If available, contains the Python version number currently in use.])
|
||||
|
||||
# First, the library directory:
|
||||
ac_python_libdir=`cat<<EOD | $PYTHON -
|
||||
|
||||
# There should be only one
|
||||
import distutils.sysconfig
|
||||
e = distutils.sysconfig.get_config_var('LIBDIR')
|
||||
if e is not None:
|
||||
print (e)
|
||||
EOD`
|
||||
|
||||
# Now, for the library:
|
||||
ac_python_library=`cat<<EOD | $PYTHON -
|
||||
|
||||
import distutils.sysconfig
|
||||
c = distutils.sysconfig.get_config_vars()
|
||||
if 'LDVERSION' in c:
|
||||
print ('python'+c[['LDVERSION']])
|
||||
else:
|
||||
print ('python'+c[['VERSION']])
|
||||
EOD`
|
||||
|
||||
# This small piece shamelessly adapted from PostgreSQL python macro;
|
||||
# credits goes to momjian, I think. I'd like to put the right name
|
||||
# in the credits, if someone can point me in the right direction... ?
|
||||
#
|
||||
if test -n "$ac_python_libdir" -a -n "$ac_python_library"
|
||||
then
|
||||
# use the official shared library
|
||||
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||
PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
|
||||
else
|
||||
# old way: use libpython from python_configdir
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"from distutils.sysconfig import get_python_lib as f; \
|
||||
import os; \
|
||||
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
fi
|
||||
|
||||
if test -z "PYTHON_LIBS"; then
|
||||
AC_MSG_ERROR([
|
||||
Cannot determine location of your Python DSO. Please check it was installed with
|
||||
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_LIBS])
|
||||
AC_SUBST([PYTHON_LIBS])
|
||||
|
||||
#
|
||||
# Check for site packages
|
||||
#
|
||||
AC_MSG_CHECKING([for Python site-packages path])
|
||||
if test -z "$PYTHON_SITE_PKG"; then
|
||||
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_lib(0,0));"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
||||
AC_SUBST([PYTHON_SITE_PKG])
|
||||
|
||||
#
|
||||
# libraries which must be linked in when embedding
|
||||
#
|
||||
AC_MSG_CHECKING(python extra libraries)
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
||||
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
|
||||
|
||||
#
|
||||
# linking flags needed when embedding
|
||||
#
|
||||
AC_MSG_CHECKING(python extra linking flags)
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LINKFORSHARED'))"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
|
||||
AC_SUBST(PYTHON_EXTRA_LIBS)
|
||||
|
||||
#
|
||||
# final check to see if everything compiles alright
|
||||
#
|
||||
AC_MSG_CHECKING([consistency of all components of python development environment])
|
||||
# save current global flags
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
|
||||
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[#include <Python.h>]],
|
||||
[[Py_Initialize();]])
|
||||
],[pythonexists=yes],[pythonexists=no])
|
||||
AC_LANG_POP([C])
|
||||
# turn back to default flags
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
|
||||
AC_MSG_RESULT([$pythonexists])
|
||||
|
||||
if test ! "x$pythonexists" = "xyes"; then
|
||||
AC_MSG_FAILURE([
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
via the LIBS environment variable.
|
||||
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
|
||||
============================================================================
|
||||
ERROR!
|
||||
You probably have to install the development version of the Python package
|
||||
for your distribution. The exact name of this package varies among them.
|
||||
============================================================================
|
||||
])
|
||||
PYTHON_VERSION=""
|
||||
fi
|
||||
|
||||
#
|
||||
# all done!
|
||||
#
|
||||
])
|
||||
@@ -0,0 +1,37 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_REQUIRE_DEFINED(MACRO)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
||||
# been defined and thus are available for use. This avoids random issues
|
||||
# where a macro isn't expanded. Instead the configure script emits a
|
||||
# non-fatal:
|
||||
#
|
||||
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
||||
#
|
||||
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
||||
#
|
||||
# Here's an example:
|
||||
#
|
||||
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
||||
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
||||
])dnl AX_REQUIRE_DEFINED
|
||||
@@ -58,7 +58,7 @@ set_limit (char *size)
|
||||
}
|
||||
|
||||
static int
|
||||
get_limit (void)
|
||||
get_limit ()
|
||||
{
|
||||
int size = hexchat_pluginpref_get_int (ph, "limit");
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ static char *keystore_password = NULL;
|
||||
/**
|
||||
* Opens the key store file: ~/.config/hexchat/addon_fishlim.conf
|
||||
*/
|
||||
static GKeyFile *getConfigFile(void) {
|
||||
static GKeyFile *getConfigFile() {
|
||||
gchar *filename = get_config_filename();
|
||||
|
||||
GKeyFile *keyfile = g_key_file_new();
|
||||
@@ -55,7 +55,7 @@ static GKeyFile *getConfigFile(void) {
|
||||
/**
|
||||
* Returns the key store password, or the default.
|
||||
*/
|
||||
static const char *get_keystore_password(void) {
|
||||
static const char *get_keystore_password() {
|
||||
return (keystore_password != NULL ?
|
||||
keystore_password :
|
||||
/* Silly default value... */
|
||||
|
||||
@@ -48,7 +48,7 @@ static hexchat_plugin *ph;
|
||||
/**
|
||||
* Returns the path to the key store file.
|
||||
*/
|
||||
gchar *get_config_filename(void) {
|
||||
gchar *get_config_filename() {
|
||||
char *filename_fs, *filename_utf8;
|
||||
|
||||
filename_utf8 = g_build_filename(hexchat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef PLUGIN_HEXCHAT_H
|
||||
#define PLUGIN_HEXCHAT_H
|
||||
|
||||
gchar *get_config_filename(void);
|
||||
gchar *get_config_filename();
|
||||
int irc_nick_cmp (const char *, const char *);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(HexChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -49,7 +49,7 @@ move hexchat.pm.h "$(IntDir)"</Command>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(HexChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -273,7 +273,7 @@ typedef struct {
|
||||
|
||||
static PyObject *Util_BuildList(char *word[]);
|
||||
static PyObject *Util_BuildEOLList(char *word[]);
|
||||
static void Util_Autoload(void);
|
||||
static void Util_Autoload();
|
||||
static char *Util_Expand(char *filename);
|
||||
|
||||
static int Callback_Server(char *word[], char *word_eol[], hexchat_event_attrs *attrs, void *userdata);
|
||||
@@ -283,7 +283,7 @@ static int Callback_Print(char *word[], void *userdata);
|
||||
static int Callback_Timer(void *userdata);
|
||||
static int Callback_ThreadTimer(void *userdata);
|
||||
|
||||
static PyObject *XChatOut_New(void);
|
||||
static PyObject *XChatOut_New();
|
||||
static PyObject *XChatOut_write(PyObject *self, PyObject *args);
|
||||
static void XChatOut_dealloc(PyObject *self);
|
||||
|
||||
@@ -300,7 +300,7 @@ static PyObject *Context_FromContext(hexchat_context *context);
|
||||
static PyObject *Context_FromServerAndChannel(char *server, char *channel);
|
||||
|
||||
static PyObject *Plugin_New(char *filename, PyObject *xcoobj);
|
||||
static PyObject *Plugin_GetCurrent(void);
|
||||
static PyObject *Plugin_GetCurrent();
|
||||
static PluginObject *Plugin_ByString(char *str);
|
||||
static Hook *Plugin_AddHook(int type, PyObject *plugin, PyObject *callback,
|
||||
PyObject *userdata, char *name, void *data);
|
||||
@@ -336,11 +336,11 @@ static PyObject *Module_hexchat_pluginpref_list(PyObject *self, PyObject *args);
|
||||
static void IInterp_Exec(char *command);
|
||||
static int IInterp_Cmd(char *word[], char *word_eol[], void *userdata);
|
||||
|
||||
static void Command_PyList(void);
|
||||
static void Command_PyList();
|
||||
static void Command_PyLoad(char *filename);
|
||||
static void Command_PyUnload(char *name);
|
||||
static void Command_PyReload(char *name);
|
||||
static void Command_PyAbout(void);
|
||||
static void Command_PyAbout();
|
||||
static int Command_Py(char *word[], char *word_eol[], void *userdata);
|
||||
|
||||
/* ===================================================================== */
|
||||
@@ -1726,7 +1726,7 @@ Module_hexchat_get_info(PyObject *self, PyObject *args)
|
||||
if (info == NULL) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
if (strcmp (name, "gtkwin_ptr") == 0 || strcmp (name, "win_ptr") == 0)
|
||||
if (strcmp (name, "gtkwin_ptr") == 0)
|
||||
return PyUnicode_FromFormat("%p", info); /* format as pointer */
|
||||
else
|
||||
return PyUnicode_FromString(info);
|
||||
@@ -2518,7 +2518,7 @@ IInterp_Cmd(char *word[], char *word_eol[], void *userdata)
|
||||
/* Python command handling */
|
||||
|
||||
static void
|
||||
Command_PyList(void)
|
||||
Command_PyList()
|
||||
{
|
||||
GSList *list;
|
||||
list = plugin_list;
|
||||
@@ -2585,7 +2585,7 @@ Command_PyReload(char *name)
|
||||
}
|
||||
|
||||
static void
|
||||
Command_PyAbout(void)
|
||||
Command_PyAbout()
|
||||
{
|
||||
hexchat_print(ph, about);
|
||||
}
|
||||
@@ -2777,7 +2777,7 @@ hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
||||
}
|
||||
|
||||
int
|
||||
hexchat_plugin_deinit(void)
|
||||
hexchat_plugin_deinit()
|
||||
{
|
||||
GSList *list;
|
||||
|
||||
|
||||
@@ -40,37 +40,32 @@ int xs_parse_cpu(char *model, char *vendor, double *freq)
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__alpha__) || defined(__ia64__) || defined(__parisc__) || defined(__sparc__)
|
||||
char buffer[bsize];
|
||||
#endif
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen("/proc/cpuinfo", "r");
|
||||
#if defined(__powerpc__)
|
||||
char *pos = NULL;
|
||||
#endif
|
||||
FILE *fp = fopen("/proc/cpuinfo", "r");
|
||||
if(fp == NULL)
|
||||
return 1;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "model name", model);
|
||||
find_match_char(buffer, "vendor_id", vendor);
|
||||
find_match_double(buffer, "cpu MHz", freq);
|
||||
}
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
#endif
|
||||
#ifdef __powerpc__
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
char *pos;
|
||||
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "cpu", model);
|
||||
find_match_char(buffer, "machine", vendor);
|
||||
find_match_double(buffer, "clock", freq);
|
||||
}
|
||||
pos = strstr(model, ",");
|
||||
if (pos != NULL)
|
||||
*pos = '\0';
|
||||
find_match_char(buffer, "cpu", model);
|
||||
find_match_char(buffer, "machine", vendor);
|
||||
find_match_double(buffer, "clock", freq);
|
||||
}
|
||||
#elif defined( __alpha__)
|
||||
|
||||
pos = strstr(model, ",");
|
||||
if (pos != NULL) *pos = '\0';
|
||||
#endif
|
||||
#ifdef __alpha__
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "cpu model", model);
|
||||
@@ -78,47 +73,37 @@ int xs_parse_cpu(char *model, char *vendor, double *freq)
|
||||
find_match_double(buffer, "cycle frequency [Hz]", freq);
|
||||
}
|
||||
*freq = *freq / 1000000;
|
||||
|
||||
#elif defined(__ia64__)
|
||||
|
||||
#endif
|
||||
#ifdef __ia64__
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "model", model);
|
||||
find_match_char(buffer, "vendor", vendor);
|
||||
find_match_double(buffer, "cpu MHz", freq);
|
||||
}
|
||||
|
||||
#elif defined(__parisc__)
|
||||
|
||||
#endif
|
||||
#ifdef __parisc__
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "cpu ", model);
|
||||
find_match_char(buffer, "cpu family", vendor);
|
||||
find_match_double(buffer, "cpu MHz", freq);
|
||||
}
|
||||
|
||||
#elif defined(__sparc__)
|
||||
{
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
FILE *fp2;
|
||||
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "cpu ", model);
|
||||
find_match_char(buffer, "type ", vendor);
|
||||
find_match_double_hex(buffer, "Cpu0ClkTck", freq);
|
||||
}
|
||||
*freq = *freq / 1000000;
|
||||
}
|
||||
#else
|
||||
|
||||
fclose(fp);
|
||||
return 1; /* Unsupported */
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifdef __sparc__
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
FILE *fp2;
|
||||
while(fgets(buffer, bsize, fp) != NULL)
|
||||
{
|
||||
find_match_char(buffer, "cpu ", model);
|
||||
find_match_char(buffer, "type ", vendor);
|
||||
find_match_double_hex(buffer, "Cpu0ClkTck", freq);
|
||||
}
|
||||
*freq = *freq / 1000000;
|
||||
#endif
|
||||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+1242
-1374
File diff suppressed because it is too large
Load Diff
+1545
-1682
File diff suppressed because it is too large
Load Diff
+2815
-2949
File diff suppressed because it is too large
Load Diff
+1230
-1362
File diff suppressed because it is too large
Load Diff
+1267
-1401
File diff suppressed because it is too large
Load Diff
+1228
-1360
File diff suppressed because it is too large
Load Diff
@@ -373,9 +373,7 @@ const struct prefs vars[] =
|
||||
{"dcc_blocksize", P_OFFINT (hex_dcc_blocksize), TYPE_INT},
|
||||
{"dcc_completed_dir", P_OFFSET (hex_dcc_completed_dir), TYPE_STR},
|
||||
{"dcc_dir", P_OFFSET (hex_dcc_dir), TYPE_STR},
|
||||
#ifndef WIN32
|
||||
{"dcc_fast_send", P_OFFINT (hex_dcc_fast_send), TYPE_BOOL},
|
||||
#endif
|
||||
{"dcc_global_max_get_cps", P_OFFINT (hex_dcc_global_max_get_cps), TYPE_INT},
|
||||
{"dcc_global_max_send_cps", P_OFFINT (hex_dcc_global_max_send_cps), TYPE_INT},
|
||||
{"dcc_ip", P_OFFSET (hex_dcc_ip), TYPE_STR},
|
||||
@@ -741,9 +739,7 @@ load_default_config(void)
|
||||
prefs.hex_away_show_once = 1;
|
||||
prefs.hex_away_track = 1;
|
||||
prefs.hex_dcc_auto_resume = 1;
|
||||
#ifndef WIN32
|
||||
prefs.hex_dcc_fast_send = 1;
|
||||
#endif
|
||||
prefs.hex_gui_autoopen_chat = 1;
|
||||
prefs.hex_gui_autoopen_dialog = 1;
|
||||
prefs.hex_gui_autoopen_recv = 1;
|
||||
|
||||
+90
-78
@@ -83,7 +83,7 @@ static gboolean dcc_send_data (GIOChannel *, GIOCondition, struct DCC *);
|
||||
static gboolean dcc_read (GIOChannel *, GIOCondition, struct DCC *);
|
||||
static gboolean dcc_read_ack (GIOChannel *source, GIOCondition condition, struct DCC *dcc);
|
||||
|
||||
static int new_id(void)
|
||||
static int new_id()
|
||||
{
|
||||
static int id = 0;
|
||||
if (id == 0)
|
||||
@@ -328,15 +328,16 @@ dcc_lookup_proxy (char *host, struct sockaddr_in *addr)
|
||||
|
||||
#define DCC_USE_PROXY() (prefs.hex_net_proxy_host[0] && prefs.hex_net_proxy_type>0 && prefs.hex_net_proxy_type<5 && prefs.hex_net_proxy_use!=1)
|
||||
|
||||
static int
|
||||
static void
|
||||
dcc_connect_sok (struct DCC *dcc)
|
||||
{
|
||||
int sok;
|
||||
struct sockaddr_in addr;
|
||||
|
||||
sok = socket (AF_INET, SOCK_STREAM, 0);
|
||||
if (sok == -1)
|
||||
return -1;
|
||||
dcc->sok = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (dcc->sok == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&addr, 0, sizeof (addr));
|
||||
addr.sin_family = AF_INET;
|
||||
@@ -344,8 +345,9 @@ dcc_connect_sok (struct DCC *dcc)
|
||||
{
|
||||
if (!dcc_lookup_proxy (prefs.hex_net_proxy_host, &addr))
|
||||
{
|
||||
closesocket (sok);
|
||||
return -1;
|
||||
closesocket (dcc->sok);
|
||||
dcc->sok = - 1;
|
||||
return;
|
||||
}
|
||||
addr.sin_port = htons (prefs.hex_net_proxy_port);
|
||||
}
|
||||
@@ -355,10 +357,14 @@ dcc_connect_sok (struct DCC *dcc)
|
||||
addr.sin_addr.s_addr = htonl (dcc->addr);
|
||||
}
|
||||
|
||||
set_nonblocking (sok);
|
||||
connect (sok, (struct sockaddr *) &addr, sizeof (addr));
|
||||
set_nonblocking (dcc->sok);
|
||||
connect (dcc->sok, (struct sockaddr *) &addr, sizeof (addr));
|
||||
|
||||
return sok;
|
||||
#ifdef WIN32
|
||||
dcc->channel = g_io_channel_win32_new_socket (dcc->sok);
|
||||
#else
|
||||
dcc->channel = g_io_channel_unix_new (dcc->sok);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -366,16 +372,22 @@ dcc_close (struct DCC *dcc, int dccstat, int destroy)
|
||||
{
|
||||
if (dcc->wiotag)
|
||||
{
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
}
|
||||
|
||||
if (dcc->iotag)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
}
|
||||
|
||||
if (dcc->channel != NULL)
|
||||
{
|
||||
g_io_channel_unref (dcc->channel);
|
||||
dcc->channel = NULL;
|
||||
}
|
||||
|
||||
if (dcc->sok != -1)
|
||||
{
|
||||
closesocket (dcc->sok);
|
||||
@@ -569,13 +581,15 @@ dcc_read_chat (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
{
|
||||
if (dcc->throttled)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dcc->iotag)
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
||||
{
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||
}
|
||||
|
||||
len = recv (dcc->sok, lbuf, sizeof (lbuf) - 2, 0);
|
||||
if (len < 1)
|
||||
@@ -708,13 +722,15 @@ dcc_read (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
if (need_ack)
|
||||
dcc_send_ack (dcc);
|
||||
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dcc->iotag)
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read, dcc);
|
||||
{
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read, dcc);
|
||||
}
|
||||
|
||||
n = recv (dcc->sok, buf, sizeof (buf), 0);
|
||||
if (n < 1)
|
||||
@@ -828,7 +844,7 @@ dcc_connect_finished (GIOChannel *source, GIOCondition condition, struct DCC *dc
|
||||
|
||||
if (dcc->iotag)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
}
|
||||
|
||||
@@ -841,24 +857,22 @@ dcc_connect_finished (GIOChannel *source, GIOCondition condition, struct DCC *dc
|
||||
switch (dcc->type)
|
||||
{
|
||||
case TYPE_RECV:
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read, dcc);
|
||||
EMIT_SIGNAL (XP_TE_DCCCONRECV, dcc->serv->front_session,
|
||||
dcc->nick, host, dcc->file, NULL, 0);
|
||||
break;
|
||||
case TYPE_SEND:
|
||||
/* passive send */
|
||||
dcc->fastsend = prefs.hex_dcc_fast_send;
|
||||
if (dcc->fastsend)
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE, dcc_send_data, dcc);
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_ack, dcc);
|
||||
dcc_send_data (NULL, 0, (gpointer)dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_ack, dcc);
|
||||
dcc_send_data (NULL, 0, (gpointer) dcc);
|
||||
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
||||
dcc->nick, host, dcc->file, NULL, 0);
|
||||
break;
|
||||
case TYPE_CHATSEND: /* pchat */
|
||||
dcc_open_query (dcc->serv, dcc->nick);
|
||||
case TYPE_CHATRECV: /* normal chat */
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
||||
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
||||
dcc->nick, host, NULL, NULL, 0);
|
||||
@@ -891,7 +905,7 @@ read_proxy (struct DCC *dcc)
|
||||
fe_dcc_update (dcc);
|
||||
if (dcc->iotag)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -921,7 +935,7 @@ write_proxy (struct DCC *dcc)
|
||||
fe_dcc_update (dcc);
|
||||
if (dcc->wiotag)
|
||||
{
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -959,15 +973,14 @@ dcc_wingate_proxy_traverse (GIOChannel *source, GIOCondition condition, struct D
|
||||
"%s %d\r\n", net_ip(dcc->addr),
|
||||
dcc->port);
|
||||
proxy->bufferused = 0;
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_wingate_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_wingate_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
if (proxy->phase == 1)
|
||||
{
|
||||
if (!read_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
dcc_connect_finished (source, 0, dcc);
|
||||
}
|
||||
@@ -998,8 +1011,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
memcpy (proxy->buffer, &sc, sizeof (sc));
|
||||
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
||||
proxy->bufferused = 0;
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_socks_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1007,12 +1019,11 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
{
|
||||
if (!write_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
proxy->bufferused = 0;
|
||||
proxy->buffersize = 8;
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
||||
dcc_socks_proxy_traverse, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1020,7 +1031,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
{
|
||||
if (!read_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
if (proxy->buffer[1] == 90)
|
||||
dcc_connect_finished (source, 0, dcc);
|
||||
@@ -1058,8 +1069,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
memcpy (proxy->buffer, &sc1, 3);
|
||||
proxy->buffersize = 3;
|
||||
proxy->bufferused = 0;
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1067,12 +1077,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
{
|
||||
if (!write_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
proxy->bufferused = 0;
|
||||
proxy->buffersize = 2;
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1080,7 +1089,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
{
|
||||
if (!read_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
|
||||
/* did the server say no auth required? */
|
||||
@@ -1114,8 +1123,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
|
||||
proxy->buffersize = 3 + len_u + len_p;
|
||||
proxy->bufferused = 0;
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
else
|
||||
@@ -1135,12 +1143,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
{
|
||||
if (!write_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
proxy->buffersize = 2;
|
||||
proxy->bufferused = 0;
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1150,7 +1157,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
return TRUE;
|
||||
if (dcc->iotag)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
}
|
||||
if (proxy->buffer[1] != 0)
|
||||
@@ -1178,8 +1185,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
proxy->buffer[9] = (dcc->port & 0xFF);
|
||||
proxy->buffersize = 10;
|
||||
proxy->bufferused = 0;
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1187,12 +1193,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
{
|
||||
if (!write_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
proxy->buffersize = 4;
|
||||
proxy->bufferused = 0;
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
||||
dcc_socks5_proxy_traverse, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1202,7 +1207,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
return TRUE;
|
||||
if (proxy->buffer[0] != 5 || proxy->buffer[1] != 0)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
if (proxy->buffer[1] == 2)
|
||||
PrintText (dcc->serv->front_session, "SOCKS\tProxy refused to connect to host (not allowed).\n");
|
||||
@@ -1233,7 +1238,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
/* everything done? */
|
||||
if (proxy->bufferused == proxy->buffersize)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
dcc_connect_finished (source, 0, dcc);
|
||||
}
|
||||
@@ -1266,8 +1271,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
proxy->buffersize = n;
|
||||
proxy->bufferused = 0;
|
||||
memcpy (proxy->buffer, buf, proxy->buffersize);
|
||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
||||
dcc_http_proxy_traverse, dcc);
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_http_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1275,11 +1279,10 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
{
|
||||
if (!write_proxy (dcc))
|
||||
return TRUE;
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
proxy->bufferused = 0;
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
||||
dcc_http_proxy_traverse, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_http_proxy_traverse, dcc);
|
||||
++proxy->phase;
|
||||
}
|
||||
|
||||
@@ -1291,7 +1294,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
if (proxy->bufferused < 12 ||
|
||||
memcmp (proxy->buffer, "HTTP/", 5) || memcmp (proxy->buffer + 9, "200", 3))
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
PrintText (dcc->serv->front_session, proxy->buffer);
|
||||
dcc->dccstat = STAT_FAILED;
|
||||
@@ -1321,7 +1324,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
dcc_connect_finished (source, 0, dcc);
|
||||
}
|
||||
@@ -1332,7 +1335,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
static gboolean
|
||||
dcc_proxy_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
{
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
|
||||
if (!dcc_did_connect (source, condition, dcc))
|
||||
@@ -1384,7 +1387,7 @@ dcc_connect (struct DCC *dcc)
|
||||
}
|
||||
else
|
||||
{
|
||||
dcc->sok = dcc_connect_sok (dcc);
|
||||
dcc_connect_sok (dcc);
|
||||
if (dcc->sok == -1)
|
||||
{
|
||||
dcc->dccstat = STAT_FAILED;
|
||||
@@ -1392,9 +1395,13 @@ dcc_connect (struct DCC *dcc)
|
||||
return;
|
||||
}
|
||||
if (DCC_USE_PROXY ())
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX, dcc_proxy_connect, dcc);
|
||||
{
|
||||
g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_proxy_connect, dcc);
|
||||
}
|
||||
else
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX, dcc_connect_finished, dcc);
|
||||
{
|
||||
g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_connect_finished, dcc);
|
||||
}
|
||||
}
|
||||
|
||||
fe_dcc_update (dcc);
|
||||
@@ -1414,7 +1421,7 @@ dcc_send_data (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
|
||||
if (dcc->throttled)
|
||||
{
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1424,8 +1431,6 @@ dcc_send_data (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
if (dcc->ack < (dcc->pos & 0xFFFFFFFF))
|
||||
return TRUE;
|
||||
}
|
||||
else if (!dcc->wiotag)
|
||||
dcc->wiotag = fe_input_add (sok, FIA_WRITE, dcc_send_data, dcc);
|
||||
|
||||
buf = g_malloc (prefs.hex_dcc_blocksize);
|
||||
|
||||
@@ -1451,13 +1456,18 @@ abortit:
|
||||
dcc->lasttime = time (0);
|
||||
}
|
||||
|
||||
/* have we sent it all yet? */
|
||||
if (dcc->pos >= dcc->size)
|
||||
if (dcc->pos < dcc->size)
|
||||
{
|
||||
if (!dcc->wiotag)
|
||||
{
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_HUP | G_IO_ERR, dcc_send_data, dcc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* it's all sent now, so remove the WRITE/SEND handler */
|
||||
if (dcc->wiotag)
|
||||
{
|
||||
fe_input_remove (dcc->wiotag);
|
||||
g_source_remove (dcc->wiotag);
|
||||
dcc->wiotag = 0;
|
||||
}
|
||||
}
|
||||
@@ -1556,7 +1566,7 @@ dcc_accept (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
|
||||
len = sizeof (CAddr);
|
||||
sok = accept (dcc->sok, (struct sockaddr *) &CAddr, &len);
|
||||
fe_input_remove (dcc->iotag);
|
||||
g_source_remove (dcc->iotag);
|
||||
dcc->iotag = 0;
|
||||
closesocket (dcc->sok);
|
||||
if (sok < 0)
|
||||
@@ -1582,16 +1592,18 @@ dcc_accept (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
{
|
||||
case TYPE_SEND:
|
||||
if (dcc->fastsend)
|
||||
dcc->wiotag = fe_input_add (sok, FIA_WRITE, dcc_send_data, dcc);
|
||||
dcc->iotag = fe_input_add (sok, FIA_READ|FIA_EX, dcc_read_ack, dcc);
|
||||
dcc_send_data (NULL, 0, (gpointer)dcc);
|
||||
{
|
||||
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR, dcc_send_data, dcc);
|
||||
}
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_ack, dcc);
|
||||
dcc_send_data (NULL, 0, (gpointer) dcc);
|
||||
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
||||
dcc->nick, host, dcc->file, NULL, 0);
|
||||
break;
|
||||
|
||||
case TYPE_CHATSEND:
|
||||
dcc_open_query (dcc->serv, dcc->nick);
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
||||
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
||||
dcc->nick, host, NULL, NULL, 0);
|
||||
@@ -1708,7 +1720,7 @@ dcc_listen_init (struct DCC *dcc, session *sess)
|
||||
listen (dcc->sok, 1);
|
||||
set_blocking (dcc->sok);
|
||||
|
||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_accept, dcc);
|
||||
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_accept, dcc);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ struct DCC
|
||||
guint32 addr; /* the 32bit IP number, host byte order */
|
||||
int fp; /* file pointer */
|
||||
int sok;
|
||||
GIOChannel* channel;
|
||||
int iotag; /* reading io tag */
|
||||
int wiotag; /* writing/sending io tag */
|
||||
int port;
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ void fe_message (char *msg, int flags);
|
||||
#define FIA_WRITE 2
|
||||
#define FIA_EX 4
|
||||
#define FIA_FD 8
|
||||
int fe_input_add (int sok, int flags, void *func, void *data);
|
||||
int fe_input_add (int sok, int flags, GIOFunc func, void *data);
|
||||
void fe_input_remove (int tag);
|
||||
void fe_idle_add (void *func, void *data);
|
||||
void fe_set_topic (struct session *sess, char *topic, char *stripped_topic);
|
||||
@@ -179,6 +179,6 @@ typedef enum
|
||||
void fe_tray_set_icon (feicon icon);
|
||||
void fe_tray_set_tooltip (const char *text);
|
||||
void fe_open_chan_list (server *serv, char *filter, int do_refresh);
|
||||
const char *fe_get_default_font (void);
|
||||
const char *fe_get_default_font ();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -447,6 +447,7 @@ session_new (server *serv, char *from, int type, int focus)
|
||||
|
||||
sess->server = serv;
|
||||
sess->logfd = -1;
|
||||
sess->scrollfd = -1;
|
||||
sess->type = type;
|
||||
|
||||
sess->alert_beep = SET_DEFAULT;
|
||||
|
||||
@@ -377,8 +377,7 @@ typedef struct session
|
||||
char channelkey[64]; /* XXX correct max length? */
|
||||
int limit; /* channel user limit */
|
||||
int logfd;
|
||||
|
||||
GFile *scrollfile; /* scrollback file */
|
||||
int scrollfd; /* scrollback filedes */
|
||||
int scrollwritten; /* number of lines written */
|
||||
|
||||
char lastnick[NICKLEN]; /* last nick you /msg'ed */
|
||||
|
||||
@@ -3439,9 +3439,10 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
}
|
||||
|
||||
/* try to associate this connection with a listed network */
|
||||
/* may return NULL, but that's OK */
|
||||
if ((serv->network = servlist_net_find_from_server (server_name)))
|
||||
server_set_encoding (serv, ((ircnet*)serv->network)->encoding);
|
||||
if (!serv->network)
|
||||
/* search for this hostname in the entire server list */
|
||||
serv->network = servlist_net_find_from_server (server_name);
|
||||
/* may return NULL, but that's OK */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,6 @@ identd_start_server (void)
|
||||
{
|
||||
hexchat_printf (ph, _("*\tError starting identd server: %s"), error->message);
|
||||
|
||||
g_error_free (error);
|
||||
g_clear_object (&service);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
int identd_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
|
||||
char **plugin_desc, char **plugin_version, char *arg);
|
||||
|
||||
int identd_plugin_deinit (void);
|
||||
int identd_plugin_deinit ();
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -427,7 +427,7 @@ plugin_auto_load_cb (char *filename)
|
||||
}
|
||||
|
||||
static char *
|
||||
plugin_get_libdir (void)
|
||||
plugin_get_libdir ()
|
||||
{
|
||||
const char *libdir;
|
||||
|
||||
|
||||
+5
-5
@@ -484,7 +484,7 @@ ssl_cb_verify (int ok, X509_STORE_CTX * ctx)
|
||||
static int
|
||||
ssl_do_connect (server * serv)
|
||||
{
|
||||
char buf[256]; // ERR_error_string() MUST have this size
|
||||
char buf[128];
|
||||
|
||||
g_sess = serv->server_session;
|
||||
|
||||
@@ -569,8 +569,9 @@ ssl_do_connect (server * serv)
|
||||
NULL, 0);
|
||||
} else
|
||||
{
|
||||
g_snprintf (buf, sizeof (buf), "No Certificate");
|
||||
goto conn_fail;
|
||||
g_snprintf (buf, sizeof (buf), " * No Certificate");
|
||||
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
|
||||
NULL, 0);
|
||||
}
|
||||
|
||||
chiper_info = _SSL_get_cipher_info (serv->ssl); /* static buffer */
|
||||
@@ -1728,8 +1729,7 @@ server_set_defaults (server *serv)
|
||||
serv->nick_modes = g_strdup ("ohv");
|
||||
serv->sasl_mech = MECH_PLAIN;
|
||||
|
||||
if (!serv->encoding)
|
||||
server_set_encoding (serv, "UTF-8");
|
||||
server_set_encoding (serv, "UTF-8");
|
||||
|
||||
serv->nickcount = 1;
|
||||
serv->end_of_motd = FALSE;
|
||||
|
||||
+65
-78
@@ -51,7 +51,6 @@ struct defaultserver
|
||||
static const struct defaultserver def[] =
|
||||
{
|
||||
{"2600net", 0},
|
||||
/* Invalid hostname in cert */
|
||||
{0, "irc.2600.net"},
|
||||
|
||||
{"2ch", 0, 0, "iso-2022-jp", 0, 0},
|
||||
@@ -60,10 +59,9 @@ static const struct defaultserver def[] =
|
||||
{0, "irc.juggler.jp"},
|
||||
|
||||
{"AccessIRC", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.accessirc.net"},
|
||||
|
||||
{"AfterNET", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{"AfterNET", 0},
|
||||
{0, "irc.afternet.org"},
|
||||
|
||||
{"Aitvaras", 0},
|
||||
@@ -86,58 +84,60 @@ static const struct defaultserver def[] =
|
||||
{"ARCNet", 0},
|
||||
{0, "arcnet-irc.org"},
|
||||
|
||||
{"AthemeNet", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.atheme.org"},
|
||||
|
||||
{"AustNet", 0},
|
||||
{0, "irc.austnet.org"},
|
||||
|
||||
{"AzzurraNet", 0},
|
||||
{0, "irc.azzurra.org"},
|
||||
|
||||
{"BetaChat", 0, 0, 0, LOGIN_SASL},
|
||||
{0, "irc.betachat.net"},
|
||||
|
||||
{"Canternet", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.canternet.org"},
|
||||
|
||||
{"Chat4all", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.chat4all.org"},
|
||||
|
||||
{"ChattingAway", 0},
|
||||
{0, "irc.chattingaway.com"},
|
||||
|
||||
{"ChatJunkies", 0},
|
||||
{0, "irc.chatjunkies.org"},
|
||||
|
||||
{"ChatNet", 0},
|
||||
{0, "irc.chatnet.org"},
|
||||
|
||||
{"ChatSpike", 0, 0, 0, LOGIN_SASL},
|
||||
{"ChatSpike", 0},
|
||||
{0, "irc.chatspike.net"},
|
||||
|
||||
{"ChattingAway", 0},
|
||||
{0, "irc.chattingaway.com"},
|
||||
|
||||
{"Criten", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.criten.net"},
|
||||
|
||||
{"DALnet", 0},
|
||||
/* Self signed */
|
||||
{0, "us.dal.net"},
|
||||
|
||||
{"DarkMyst", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.darkmyst.org"},
|
||||
{0, "irc.dal.net"},
|
||||
|
||||
{"Dark-Tou-Net", 0},
|
||||
{0, "irc.d-t-net.de"},
|
||||
|
||||
{"DarkMyst", 0, 0, 0, LOGIN_SASL},
|
||||
{0, "irc.darkmyst.org"},
|
||||
|
||||
{"DeepIRC", 0},
|
||||
{0, "irc.deepirc.net"},
|
||||
|
||||
{"DeltaAnime", 0},
|
||||
{0, "irc.deltaanime.net"},
|
||||
|
||||
{"EFnet", 0},
|
||||
{0, "irc.choopa.net"},
|
||||
{0, "irc.paraphysics.net"},
|
||||
{0, "efnet.port80.se"},
|
||||
{0, "irc.underworld.no"},
|
||||
{0, "irc.inet.tele.dk"},
|
||||
{0, "irc.blackened.com"},
|
||||
{0, "irc.Prison.NET"},
|
||||
{0, "irc.Qeast.net"},
|
||||
{0, "irc.efnet.pl"},
|
||||
{0, "irc.lightning.net"},
|
||||
{0, "irc.servercentral.net"},
|
||||
|
||||
{"ElectroCode", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{"ElectroCode", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.electrocode.net"},
|
||||
|
||||
{"EnterTheGame", 0},
|
||||
@@ -153,13 +153,14 @@ static const struct defaultserver def[] =
|
||||
{0, "irc.euirc.net"},
|
||||
|
||||
{"EuropNet", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.europnet.org"},
|
||||
|
||||
{"FDFNet", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.fdfnet.net"},
|
||||
|
||||
{"FEFNet", 0, 0, 0, LOGIN_SASL},
|
||||
{0, "irc.fef.net"},
|
||||
|
||||
{"freenode", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "chat.freenode.net"},
|
||||
/* irc. points to chat. but many users and urls still reference it */
|
||||
@@ -174,18 +175,16 @@ static const struct defaultserver def[] =
|
||||
{"GameSurge", 0},
|
||||
{0, "irc.gamesurge.net"},
|
||||
|
||||
{"GeeksIRC", 0, 0, 0, LOGIN_SASL},
|
||||
/* Self signed */
|
||||
{"GeeksIRC", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.geeksirc.net"},
|
||||
|
||||
{"GeekShed", 0, 0, 0, 0, 0, TRUE},
|
||||
{"GeekShed", 0},
|
||||
{0, "irc.geekshed.net"},
|
||||
|
||||
{"German-Elite", 0, 0, "CP1252"},
|
||||
{"German-Elite", 0},
|
||||
{0, "irc.german-elite.net"},
|
||||
|
||||
{"GIMPNet", 0},
|
||||
/* Invalid hostname in cert */
|
||||
{0, "irc.gimp.org"},
|
||||
{0, "irc.gnome.org"},
|
||||
|
||||
@@ -195,8 +194,7 @@ static const struct defaultserver def[] =
|
||||
{"IdleMonkeys", 0},
|
||||
{0, "irc.idlemonkeys.net"},
|
||||
|
||||
{"IndirectIRC", 0, 0, 0, LOGIN_SASL},
|
||||
/* Self signed */
|
||||
{"IndirectIRC", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.indirectirc.com"},
|
||||
|
||||
{"Interlinked", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
@@ -205,53 +203,48 @@ static const struct defaultserver def[] =
|
||||
{"IRC4Fun", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.irc4fun.net"},
|
||||
|
||||
{"IRCHighWay", 0, 0, 0, 0, 0, TRUE},
|
||||
{"IRCHighWay", 0},
|
||||
#ifdef USE_OPENSSL
|
||||
{0, "irc.irchighway.net/+9999"},
|
||||
#endif
|
||||
{0, "irc.irchighway.net"},
|
||||
|
||||
{"IrcLink", 0},
|
||||
{0, "irc.irclink.net"},
|
||||
|
||||
{"IRCNet", 0},
|
||||
{0, "open.ircnet.net"},
|
||||
|
||||
{"Irctoo.net", 0},
|
||||
{0, "irc.irctoo.net"},
|
||||
|
||||
{"iZ-smart.net", 0, 0, "CP1252"},
|
||||
{"iZ-smart.net", 0},
|
||||
{0, "irc.iz-smart.net"},
|
||||
|
||||
{"KBFail", 0},
|
||||
/* SSL is self-signed */
|
||||
{0, "irc.kbfail.net"},
|
||||
|
||||
{"Krstarica", 0},
|
||||
{0, "irc.krstarica.com"},
|
||||
|
||||
{"LibraIRC", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.librairc.net"},
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
{"LinkNet", 0},
|
||||
{0, "irc.link-net.org/+7000"},
|
||||
#endif
|
||||
|
||||
{"MindForge", 0, 0, 0, LOGIN_SASL},
|
||||
{"MindForge", 0},
|
||||
{0, "irc.mindforge.org"},
|
||||
|
||||
{"MIXXnet", 0},
|
||||
{0, "irc.mixxnet.net"},
|
||||
|
||||
{"Moznet", 0, 0, 0, 0, 0, TRUE},
|
||||
{"Moznet", 0},
|
||||
{0, "irc.mozilla.org"},
|
||||
|
||||
{"ObsidianIRC", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.obsidianirc.net"},
|
||||
|
||||
{"Oceanius", 0, 0, 0, LOGIN_SASL},
|
||||
/* Self signed */
|
||||
{0, "irc.oceanius.com"},
|
||||
|
||||
{"OFTC", 0},
|
||||
/* Uncommon CA? */
|
||||
{0, "irc.oftc.net"},
|
||||
|
||||
{"OtherNet", 0},
|
||||
@@ -260,24 +253,22 @@ static const struct defaultserver def[] =
|
||||
{"OzNet", 0},
|
||||
{0, "irc.oz.org"},
|
||||
|
||||
{"PIRC.PL", 0, 0, 0, 0, 0, TRUE},
|
||||
{"PIRC.PL", 0},
|
||||
{0, "irc.pirc.pl"},
|
||||
|
||||
{"PonyChat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.ponychat.net"},
|
||||
|
||||
{"PTNet.org", 0, 0, "ISO-8859-1"},
|
||||
{0, "uevora.ptnet.org"},
|
||||
{0, "vianetworks.ptnet.org"},
|
||||
{"PTNet.org", 0},
|
||||
{0, "irc.ptnet.org"},
|
||||
|
||||
{"QuakeNet", 0, 0, 0, LOGIN_CHALLENGEAUTH},
|
||||
{0, "irc.quakenet.org"},
|
||||
|
||||
{"Rizon", 0, 0, 0, 0, 0, TRUE},
|
||||
{"Rizon", 0},
|
||||
{0, "irc.rizon.net"},
|
||||
|
||||
{"RusNet", 0, 0, "KOI8-R (Cyrillic)"},
|
||||
/* Self signed */
|
||||
{0, "irc.tomsk.net"},
|
||||
{0, "irc.run.net"},
|
||||
{0, "irc.ru"},
|
||||
@@ -286,28 +277,28 @@ static const struct defaultserver def[] =
|
||||
{"SceneNet", 0},
|
||||
{0, "irc.scene.org"},
|
||||
|
||||
{"SeilEn.de", 0, 0, "CP1252"},
|
||||
{"SeilEn.de", 0},
|
||||
{0, "irc.seilen.de"},
|
||||
|
||||
{"Serenity-IRC", 0},
|
||||
{0, "irc.serenity-irc.net"},
|
||||
|
||||
{"SlashNET", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.slashnet.org"},
|
||||
|
||||
{"Snoonet", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.snoonet.org"},
|
||||
|
||||
{"Sohbet.Net", 0, 0, "CP1254"},
|
||||
{"Snyde", 0},
|
||||
{0, "irc.snyde.net"},
|
||||
|
||||
{"Sohbet.Net", 0},
|
||||
{0, "irc.sohbet.net"},
|
||||
|
||||
{"SolidIRC", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.solidirc.com"},
|
||||
|
||||
{"SorceryNet", 0, 0, 0, LOGIN_SASL},
|
||||
/* Self signed */
|
||||
{0, "irc.sorcery.net"},
|
||||
|
||||
{"SpotChat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
@@ -316,39 +307,46 @@ static const struct defaultserver def[] =
|
||||
{"StarChat", 0},
|
||||
{0, "irc.starchat.net"},
|
||||
|
||||
{"Station51", 0},
|
||||
/* Self signed */
|
||||
{"Station51", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.station51.net"},
|
||||
|
||||
{"StormBit", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.stormbit.net"},
|
||||
|
||||
{"SwiftIRC", 0},
|
||||
/* Expired cert */
|
||||
{"SwiftIRC", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.swiftirc.net"},
|
||||
|
||||
{"synIRC", 0},
|
||||
/* Self signed */
|
||||
{"synIRC", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.synirc.net"},
|
||||
|
||||
{"Techtronix", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.techtronix.net"},
|
||||
|
||||
{"TURLINet", 0, 0, 0, 0, 0, TRUE},
|
||||
/* Other servers use CP1251 and invalid certs */
|
||||
{"TinyCrab", 0, 0, 0, LOGIN_SASL},
|
||||
{0, "irc.tinycrab.net"},
|
||||
|
||||
{"TURLINet", 0},
|
||||
{0, "irc.turli.net"},
|
||||
{0, "irc.servx.ru"},
|
||||
{0, "irc.gavnos.ru"},
|
||||
|
||||
{"UnderNet", 0, 0, 0, LOGIN_CUSTOM, "MSG x@channels.undernet.org login %u %p"},
|
||||
{0, "us.undernet.org"},
|
||||
|
||||
{"UniBG", 0, 0, "CP1251", LOGIN_CUSTOM, "MSG NS IDENTIFY %p"},
|
||||
{"UniBG", 0, 0, 0, LOGIN_CUSTOM, "MSG NS IDENTIFY %p"},
|
||||
{0, "irc.lirex.com"},
|
||||
{0, "irc.naturella.com"},
|
||||
{0, "irc.techno-link.com"},
|
||||
|
||||
{"ValleyNode", 0, 0, 0, LOGIN_SASL},
|
||||
{0, "irc.valleynode.net"},
|
||||
|
||||
{"Worldnet", 0},
|
||||
{0, "irc.worldnet.net"},
|
||||
|
||||
{"Windfyre", 0, 0, 0, 0, 0, TRUE},
|
||||
{0, "irc.windfyre.net"},
|
||||
|
||||
{"Xertion", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.xertion.org"},
|
||||
|
||||
@@ -714,19 +712,8 @@ servlist_net_find_from_server (char *server_name)
|
||||
slist = net->servlist;
|
||||
while (slist)
|
||||
{
|
||||
gsize hostname_len;
|
||||
const char *hostname, *p;
|
||||
|
||||
serv = slist->data;
|
||||
hostname = serv->hostname;
|
||||
|
||||
/* Ignore port when comparing */
|
||||
if ((p = strchr (hostname, '/')))
|
||||
hostname_len = p - hostname;
|
||||
else
|
||||
hostname_len = strlen (hostname);
|
||||
|
||||
if (g_ascii_strncasecmp (hostname, server_name, hostname_len) == 0)
|
||||
if (g_ascii_strcasecmp (serv->hostname, server_name) == 0)
|
||||
return net;
|
||||
slist = slist->next;
|
||||
}
|
||||
|
||||
+121
-112
@@ -65,15 +65,13 @@ struct pevt_stage1
|
||||
static ca_context *ca_con;
|
||||
#endif
|
||||
|
||||
#define SCROLLBACK_MAX 32000
|
||||
|
||||
static void mkdir_p (char *filename);
|
||||
static char *log_create_filename (char *channame);
|
||||
|
||||
static char *
|
||||
scrollback_get_filename (session *sess)
|
||||
{
|
||||
char *net, *chan, *buf, *ret = NULL;
|
||||
char *net, *chan, *buf;
|
||||
|
||||
net = server_get_network (sess->server, FALSE);
|
||||
if (!net)
|
||||
@@ -90,19 +88,54 @@ scrollback_get_filename (session *sess)
|
||||
buf = NULL;
|
||||
g_free (chan);
|
||||
|
||||
if (buf)
|
||||
{
|
||||
ret = g_filename_from_utf8 (buf, -1, NULL, NULL, NULL);
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static void
|
||||
scrollback_unlock (session *sess)
|
||||
{
|
||||
char buf[1024];
|
||||
|
||||
if (scrollback_get_filename (sess, buf, sizeof (buf) - 6) == NULL)
|
||||
return;
|
||||
|
||||
strcat (buf, ".lock");
|
||||
unlink (buf);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
scrollback_lock (session *sess)
|
||||
{
|
||||
char buf[1024];
|
||||
int fh;
|
||||
|
||||
if (scrollback_get_filename (sess, buf, sizeof (buf) - 6) == NULL)
|
||||
return FALSE;
|
||||
|
||||
strcat (buf, ".lock");
|
||||
|
||||
if (access (buf, F_OK) == 0)
|
||||
return FALSE; /* can't get lock */
|
||||
|
||||
fh = open (buf, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY, 0644);
|
||||
if (fh == -1)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
scrollback_close (session *sess)
|
||||
{
|
||||
g_clear_object (&sess->scrollfile);
|
||||
if (sess->scrollfd != -1)
|
||||
{
|
||||
close (sess->scrollfd);
|
||||
sess->scrollfd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* shrink the file to roughly prefs.hex_text_max_lines */
|
||||
@@ -110,13 +143,29 @@ scrollback_close (session *sess)
|
||||
static void
|
||||
scrollback_shrink (session *sess)
|
||||
{
|
||||
char *buf, *p;
|
||||
char *file;
|
||||
char *buf;
|
||||
int fh;
|
||||
int lines;
|
||||
int line;
|
||||
gsize len;
|
||||
gint offset, lines = 0;
|
||||
const gint max_lines = MIN(prefs.hex_text_max_lines, SCROLLBACK_MAX);
|
||||
char *p;
|
||||
|
||||
if (!g_file_load_contents (sess->scrollfile, NULL, &buf, &len, NULL, NULL))
|
||||
scrollback_close (sess);
|
||||
sess->scrollwritten = 0;
|
||||
lines = 0;
|
||||
|
||||
if ((file = scrollback_get_filename (sess)) == NULL)
|
||||
{
|
||||
g_free (file);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_file_get_contents (file, &buf, &len, NULL))
|
||||
{
|
||||
g_free (file);
|
||||
return;
|
||||
}
|
||||
|
||||
/* count all lines */
|
||||
p = buf;
|
||||
@@ -127,37 +176,41 @@ scrollback_shrink (session *sess)
|
||||
p++;
|
||||
}
|
||||
|
||||
offset = lines - max_lines;
|
||||
fh = g_open (file, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | OFLAGS, 0644);
|
||||
g_free (file);
|
||||
if (fh == -1)
|
||||
{
|
||||
g_free (buf);
|
||||
return;
|
||||
}
|
||||
|
||||
/* now just go back to where we want to start the file */
|
||||
line = 0;
|
||||
p = buf;
|
||||
lines = 0;
|
||||
while (p != buf + len)
|
||||
{
|
||||
if (*p == '\n')
|
||||
{
|
||||
lines++;
|
||||
if (lines == offset)
|
||||
line++;
|
||||
if (line >= lines - prefs.hex_text_max_lines &&
|
||||
p + 1 != buf + len)
|
||||
{
|
||||
p++;
|
||||
write (fh, p, len - (p - buf));
|
||||
break;
|
||||
}
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
if (g_file_replace_contents (sess->scrollfile, p, strlen(p), NULL, FALSE,
|
||||
G_FILE_CREATE_PRIVATE, NULL, NULL, NULL))
|
||||
sess->scrollwritten = lines;
|
||||
|
||||
close (fh);
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
static void
|
||||
scrollback_save (session *sess, char *text, time_t stamp)
|
||||
{
|
||||
GOutputStream *ostream;
|
||||
char *buf;
|
||||
int len;
|
||||
|
||||
if (sess->type == SESS_SERVER && prefs.hex_gui_tab_server == 1)
|
||||
return;
|
||||
@@ -173,25 +226,16 @@ scrollback_save (session *sess, char *text, time_t stamp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sess->scrollfile)
|
||||
if (sess->scrollfd == -1)
|
||||
{
|
||||
if ((buf = scrollback_get_filename (sess)) == NULL)
|
||||
return;
|
||||
|
||||
sess->scrollfile = g_file_new_for_path (buf);
|
||||
sess->scrollfd = g_open (buf, O_CREAT | O_APPEND | O_WRONLY | OFLAGS, 0644);
|
||||
g_free (buf);
|
||||
if (sess->scrollfd == -1)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Users can delete the folder after it's created... */
|
||||
GFile *parent = g_file_get_parent (sess->scrollfile);
|
||||
g_file_make_directory_with_parents (parent, NULL, NULL);
|
||||
g_object_unref (parent);
|
||||
}
|
||||
|
||||
ostream = G_OUTPUT_STREAM(g_file_append_to (sess->scrollfile, G_FILE_CREATE_PRIVATE, NULL, NULL));
|
||||
if (!ostream)
|
||||
return;
|
||||
|
||||
if (!stamp)
|
||||
stamp = time(0);
|
||||
@@ -199,30 +243,31 @@ scrollback_save (session *sess, char *text, time_t stamp)
|
||||
buf = g_strdup_printf ("T %d ", (int) stamp);
|
||||
else
|
||||
buf = g_strdup_printf ("T %" G_GINT64_FORMAT " ", (gint64)stamp);
|
||||
|
||||
g_output_stream_write (ostream, buf, strlen (buf), NULL, NULL);
|
||||
g_output_stream_write (ostream, text, strlen (text), NULL, NULL);
|
||||
if (!g_str_has_suffix (text, "\n"))
|
||||
g_output_stream_write (ostream, "\n", 1, NULL, NULL);
|
||||
|
||||
write (sess->scrollfd, buf, strlen (buf));
|
||||
g_free (buf);
|
||||
g_object_unref (ostream);
|
||||
|
||||
len = strlen (text);
|
||||
write (sess->scrollfd, text, len);
|
||||
if (len && text[len - 1] != '\n')
|
||||
write (sess->scrollfd, "\n", 1);
|
||||
|
||||
sess->scrollwritten++;
|
||||
|
||||
if ((sess->scrollwritten > prefs.hex_text_max_lines && prefs.hex_text_max_lines > 0) ||
|
||||
sess->scrollwritten > SCROLLBACK_MAX)
|
||||
if ((sess->scrollwritten * 2 > prefs.hex_text_max_lines && prefs.hex_text_max_lines > 0) ||
|
||||
sess->scrollwritten > 32000)
|
||||
scrollback_shrink (sess);
|
||||
}
|
||||
|
||||
void
|
||||
scrollback_load (session *sess)
|
||||
{
|
||||
GInputStream *stream;
|
||||
GDataInputStream *istream;
|
||||
gchar *buf, *text;
|
||||
gint lines = 0;
|
||||
char *buf;
|
||||
char *text;
|
||||
time_t stamp;
|
||||
int lines;
|
||||
GIOChannel *io;
|
||||
GError *file_error = NULL;
|
||||
GError *io_err = NULL;
|
||||
|
||||
if (sess->text_scrollback == SET_DEFAULT)
|
||||
{
|
||||
@@ -235,37 +280,32 @@ scrollback_load (session *sess)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sess->scrollfile)
|
||||
{
|
||||
if ((buf = scrollback_get_filename (sess)) == NULL)
|
||||
return;
|
||||
|
||||
sess->scrollfile = g_file_new_for_path (buf);
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
stream = G_INPUT_STREAM(g_file_read (sess->scrollfile, NULL, NULL));
|
||||
if (!stream)
|
||||
if ((buf = scrollback_get_filename (sess)) == NULL)
|
||||
return;
|
||||
|
||||
istream = g_data_input_stream_new (stream);
|
||||
/*
|
||||
* This is to avoid any issues moving between windows/unix
|
||||
* but the docs mention an invalid \r without a following \n
|
||||
* can lock up the program... (Our write() always adds \n)
|
||||
*/
|
||||
g_data_input_stream_set_newline_type (istream, G_DATA_STREAM_NEWLINE_TYPE_ANY);
|
||||
g_object_unref (stream);
|
||||
io = g_io_channel_new_file (buf, "r", &file_error);
|
||||
g_free (buf);
|
||||
if (!io)
|
||||
return;
|
||||
|
||||
lines = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
GError *err = NULL;
|
||||
gsize n_bytes;
|
||||
GIOStatus io_status;
|
||||
|
||||
buf = g_data_input_stream_read_line_utf8 (istream, &n_bytes, NULL, &err);
|
||||
|
||||
if (!err && buf)
|
||||
io_status = g_io_channel_read_line (io, &buf, &n_bytes, NULL, &io_err);
|
||||
|
||||
if (io_status == G_IO_STATUS_NORMAL)
|
||||
{
|
||||
char *buf_tmp;
|
||||
|
||||
n_bytes--;
|
||||
buf_tmp = buf;
|
||||
buf = g_strndup (buf_tmp, n_bytes);
|
||||
g_free (buf_tmp);
|
||||
|
||||
/*
|
||||
* Some scrollback lines have three blanks after the timestamp and a newline
|
||||
* Some have only one blank and a newline
|
||||
@@ -309,27 +349,12 @@ scrollback_load (session *sess)
|
||||
|
||||
g_free (buf);
|
||||
}
|
||||
else if (err)
|
||||
{
|
||||
/* If its only an encoding error it may be specific to the line */
|
||||
if (g_error_matches (err, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE))
|
||||
{
|
||||
g_warning ("Invalid utf8 in scrollback file\n");
|
||||
g_clear_error (&err);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* For general errors just give up */
|
||||
g_clear_error (&err);
|
||||
else
|
||||
break;
|
||||
}
|
||||
else /* No new line */
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (istream);
|
||||
g_io_channel_unref (io);
|
||||
|
||||
sess->scrollwritten = lines;
|
||||
|
||||
@@ -361,30 +386,14 @@ log_close (session *sess)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* filename should be in utf8 encoding and will be
|
||||
* converted to filesystem encoding automatically.
|
||||
*/
|
||||
static void
|
||||
mkdir_p (char *filename)
|
||||
{
|
||||
char *dirname, *dirname_fs;
|
||||
GError *err = NULL;
|
||||
|
||||
dirname = g_path_get_dirname (filename);
|
||||
dirname_fs = g_filename_from_utf8 (dirname, -1, NULL, NULL, &err);
|
||||
if (!dirname_fs)
|
||||
{
|
||||
g_warning ("%s", err->message);
|
||||
g_error_free (err);
|
||||
g_free (dirname);
|
||||
return;
|
||||
}
|
||||
char *dirname = g_path_get_dirname (filename);
|
||||
|
||||
g_mkdir_with_parents (dirname_fs, 0700);
|
||||
g_mkdir_with_parents (dirname, 0700);
|
||||
|
||||
g_free (dirname);
|
||||
g_free (dirname_fs);
|
||||
}
|
||||
|
||||
static char *
|
||||
@@ -1478,7 +1487,7 @@ static char * const pevt_discon_help[] = {
|
||||
#include "textevents.h"
|
||||
|
||||
static void
|
||||
pevent_load_defaults (void)
|
||||
pevent_load_defaults ()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1495,7 +1504,7 @@ pevent_load_defaults (void)
|
||||
}
|
||||
|
||||
void
|
||||
pevent_make_pntevts (void)
|
||||
pevent_make_pntevts ()
|
||||
{
|
||||
int i, m;
|
||||
char out[1024];
|
||||
@@ -1637,7 +1646,7 @@ pevent_load (char *filename)
|
||||
}
|
||||
|
||||
static void
|
||||
pevent_check_all_loaded (void)
|
||||
pevent_check_all_loaded ()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ extern const gchar* arbitrary_encoding_fallback_string;
|
||||
void sound_play (const char *file, gboolean quiet);
|
||||
void sound_play_event (int i);
|
||||
void sound_beep (session *);
|
||||
void sound_load (void);
|
||||
void sound_save (void);
|
||||
void sound_load ();
|
||||
void sound_save ();
|
||||
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -468,7 +468,7 @@ fe_input_remove (int tag)
|
||||
}
|
||||
|
||||
int
|
||||
fe_input_add (int sok, int flags, void *func, void *data)
|
||||
fe_input_add (int sok, int flags, GIOFunc func, void *data)
|
||||
{
|
||||
int tag, type = 0;
|
||||
GIOChannel *channel;
|
||||
@@ -489,7 +489,7 @@ fe_input_add (int sok, int flags, void *func, void *data)
|
||||
if (flags & FIA_EX)
|
||||
type |= G_IO_PRI;
|
||||
|
||||
tag = g_io_add_watch (channel, type, (GIOFunc) func, data);
|
||||
tag = g_io_add_watch (channel, type, func, data);
|
||||
g_io_channel_unref (channel);
|
||||
|
||||
return tag;
|
||||
|
||||
+2
-2
@@ -94,8 +94,8 @@ struct gcomp_data
|
||||
int elen;
|
||||
};
|
||||
|
||||
static int key_load_kbs (void);
|
||||
static int key_save_kbs (void);
|
||||
static int key_load_kbs ();
|
||||
static int key_save_kbs ();
|
||||
static int key_action_handle_command (GtkWidget * wid, GdkEventKey * evt,
|
||||
char *d1, char *d2,
|
||||
struct session *sess);
|
||||
|
||||
@@ -306,7 +306,7 @@ ignore_new_entry_clicked (GtkWidget * wid, struct session *sess)
|
||||
}
|
||||
|
||||
static void
|
||||
close_ignore_gui_callback (void)
|
||||
close_ignore_gui_callback ()
|
||||
{
|
||||
ignore_save ();
|
||||
ignorewin = 0;
|
||||
|
||||
+2
-2
@@ -375,7 +375,7 @@ menu_quick_sub (char *name, GtkWidget *menu, GtkWidget **sub_item_ret, int flags
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
menu_quick_endsub (void)
|
||||
menu_quick_endsub ()
|
||||
{
|
||||
/* Just delete the first element in the linked list pointed to by first */
|
||||
if (submenu_list)
|
||||
@@ -1259,7 +1259,7 @@ menu_quit (GtkWidget * wid, gpointer none)
|
||||
}
|
||||
|
||||
static void
|
||||
menu_search (void)
|
||||
menu_search ()
|
||||
{
|
||||
mg_search_toggle (current_sess);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ static int tray_restore_timer = 0;
|
||||
|
||||
|
||||
void tray_apply_setup (void);
|
||||
static gboolean tray_menu_try_restore (void);
|
||||
static gboolean tray_menu_try_restore ();
|
||||
static void tray_cleanup (void);
|
||||
static void tray_init (void);
|
||||
|
||||
@@ -391,7 +391,7 @@ tray_menu_notify_cb (GObject *tray, GParamSpec *pspec, gpointer user_data)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
tray_menu_try_restore (void)
|
||||
tray_menu_try_restore ()
|
||||
{
|
||||
tray_cleanup();
|
||||
tray_init();
|
||||
|
||||
@@ -155,7 +155,7 @@ spell_accumulator(GSignalInvocationHint *hint, GValue *return_accu, const GValue
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_enchant (void)
|
||||
initialize_enchant ()
|
||||
{
|
||||
GModule *enchant;
|
||||
gpointer funcptr;
|
||||
|
||||
@@ -422,7 +422,7 @@ fe_input_remove (int tag)
|
||||
}
|
||||
|
||||
int
|
||||
fe_input_add (int sok, int flags, void *func, void *data)
|
||||
fe_input_add (int sok, int flags, GIOFunc func, void *data)
|
||||
{
|
||||
int tag, type = 0;
|
||||
GIOChannel *channel;
|
||||
@@ -443,7 +443,7 @@ fe_input_add (int sok, int flags, void *func, void *data)
|
||||
if (flags & FIA_EX)
|
||||
type |= G_IO_PRI;
|
||||
|
||||
tag = g_io_add_watch (channel, type, (GIOFunc) func, data);
|
||||
tag = g_io_add_watch (channel, type, func, data);
|
||||
g_io_channel_unref (channel);
|
||||
|
||||
return tag;
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<None Include="changelog.url" />
|
||||
<None Include="readme.url" />
|
||||
|
||||
<Engines Include="$(DepsRoot)\lib\gtk-2.0\i686-pc-vs14\engines\**\*" />
|
||||
<Engines Include="$(DepsRoot)\lib\gtk-2.0\i686-pc-vs10\engines\**\*" />
|
||||
|
||||
<Share Include="share\**\*" />
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Target Name="Build">
|
||||
<Copy SourceFiles="@(None)" DestinationFolder="$(HexChatRel)" />
|
||||
<Copy SourceFiles="@(Engines)" DestinationFiles="@(Engines->'$(HexChatRel)\lib\gtk-2.0\i686-pc-vs14\engines\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(Engines)" DestinationFiles="@(Engines->'$(HexChatRel)\lib\gtk-2.0\i686-pc-vs10\engines\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(Share)" DestinationFiles="@(Share->'$(HexChatRel)\share\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(DepsRootDocs)" DestinationFiles="@(DepsRootDocs->'$(HexChatRel)\share\doc\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="..\..\COPYING" DestinationFolder="$(HexChatRel)\share\doc\hexchat" />
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
<YourMsgfmtPath>c:\gtk-build\msgfmt</YourMsgfmtPath>
|
||||
<YourPerlPath>c:\gtk-build\perl-5.20</YourPerlPath>
|
||||
<YourPython2Path>c:\gtk-build\python-2.7</YourPython2Path>
|
||||
<YourPython3Path>c:\gtk-build\python-3.5</YourPython3Path>
|
||||
<YourPython3Path>c:\gtk-build\python-3.4</YourPython3Path>
|
||||
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
|
||||
|
||||
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
||||
@@ -27,7 +27,7 @@
|
||||
<Python2Lib>python27</Python2Lib>
|
||||
<Python2Output>hcpython2</Python2Output>
|
||||
<Python3Path>$(YourPython3Path)\$(PlatformName)</Python3Path>
|
||||
<Python3Lib>python35</Python3Lib>
|
||||
<Python3Lib>python34</Python3Lib>
|
||||
<Python3Output>hcpython3</Python3Output>
|
||||
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
|
||||
<Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>
|
||||
|
||||
@@ -75,7 +75,7 @@ Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disable
|
||||
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\python"; Description: "Python Interface"; Types: custom; Flags: disablenouninstallwarning
|
||||
Name: "langs\python\python2"; Description: "Python (requires Python 2.7)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
||||
Name: "langs\python\python3"; Description: "Python (requires Python 3.5)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
||||
Name: "langs\python\python3"; Description: "Python (requires Python 3.4)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
||||
|
||||
[Tasks]
|
||||
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
||||
@@ -102,7 +102,6 @@ Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; Status
|
||||
Filename: "{tmp}\dotnet4.exe"; Parameters: "/q /norestart"; StatusMsg: "Installing .NET"; Components: xtm; Flags: skipifdoesntexist; Tasks: not portable
|
||||
Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||
Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||
Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
||||
Filename: "{tmp}\spelling-dicts.exe"; Parameters: "/verysilent"; StatusMsg: "Installing Spelling Dictionaries"; Components: spell; Flags: skipifdoesntexist; Tasks: not portable
|
||||
|
||||
[Files]
|
||||
@@ -153,7 +152,7 @@ Source: "plugins\hcnotifications-winrt.dll"; DestDir: "{app}\plugins"; Flags: ig
|
||||
|
||||
Source: "lib\enchant\*"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs
|
||||
|
||||
Source: "lib\gtk-2.0\i686-pc-vs14\engines\*"; DestDir: "{app}\lib\gtk-2.0\i686-pc-vs14\engines"; Flags: ignoreversion; Components: libs
|
||||
Source: "lib\gtk-2.0\i686-pc-vs10\engines\*"; DestDir: "{app}\lib\gtk-2.0\i686-pc-vs10\engines"; Flags: ignoreversion; Components: libs
|
||||
|
||||
Source: "plugins\hcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum
|
||||
Source: "plugins\hcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat
|
||||
@@ -271,13 +270,13 @@ begin
|
||||
#if APPARCH == "x64"
|
||||
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x64.exe';
|
||||
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x64.msi';
|
||||
PY2 := 'http://python.org/ftp/python/2.7.10/python-2.7.10.amd64.msi';
|
||||
PY3 := 'http://python.org/ftp/python/3.5.1/python-3.5.1-amd64.exe';
|
||||
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.amd64.msi';
|
||||
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi';
|
||||
#else
|
||||
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x86.exe';
|
||||
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x86.msi';
|
||||
PY2 := 'http://python.org/ftp/python/2.7.10/python-2.7.10.msi';
|
||||
PY3 := 'http://python.org/ftp/python/3.5.1/python-3.5.1.exe';
|
||||
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.msi';
|
||||
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.msi';
|
||||
#endif
|
||||
DOTNET := 'https://dl.hexchat.net/misc/dotnet_40.exe';
|
||||
SPELL := 'https://dl.hexchat.net/hexchat/HexChat%20Spelling%20Dictionaries%20r2.exe';
|
||||
@@ -299,8 +298,8 @@ begin
|
||||
if IsComponentSelected('langs\python\python2') and not CheckDLL('python27.dll') then
|
||||
idpAddFile(PY2, ExpandConstant('{tmp}\python.msi'));
|
||||
|
||||
if IsComponentSelected('langs\python\python3') and not CheckDLL('python35.dll') then
|
||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
||||
if IsComponentSelected('langs\python\python3') and not CheckDLL('python34.dll') then
|
||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.msi'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user