From: ueno Date: Mon, 11 Feb 2002 09:33:13 +0000 (+0000) Subject: Synch up with liece-2_0. X-Git-Tag: liece-1_4_7~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2599350ceb499f7cc9e5ca23baaf1440397d2fd7;p=elisp%2Fliece.git Synch up with liece-2_0. --- diff --git a/Makefile.am b/Makefile.am index 457eb05..6a84bf9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,74 +1,6 @@ -SUBDIRS = . dcc doc etc lisp -EXTRA_DIST = sample.dot.emacs.in -DISTCLEANFILES = sample.dot.emacs +SUBDIRS = lisp dcc etc -CVSROOT = :pserver:anonymous@cvs.m17n.org:/cvs/root -if USE_TM -ALL_LOCAL_TARGET = all-tm -INSTALL_LOCAL_TARGET = install-tm -CLEAN_LOCAL_TARGET = clean-tm -else -ALL_LOCAL_TARGET = -INSTALL_LOCAL_TARGET = -CLEAN_LOCAL_TARGET = -endif - -if USE_PACKAGE -ALL_TM_TARGET = package -INSTALL_TM_TARGET = install-package -else -ALL_TM_TARGET = -INSTALL_TM_TARGET = install -endif - -CLEAN_TM_TARGET = clean - -if USE_CUSTOM_LISPDIR -INSTALL_TM_MAKEFLAGS = LISPDIR=$(lispdir) VERSION_SPECIFIC_LISPDIR=$(lispdir) -else -INSTALL_TM_MAKEFLAGS = -endif - -if USE_CUSTOM_PACKAGEDIR -INSTALL_TM_MAKEFLAGS = PACKAGEDIR=$(packagedir) -endif - -all-local: $(ALL_LOCAL_TARGET) - -sample.dot.emacs: sample.dot.emacs.in - sed -e 's!@pkgdatadir@!$(pkgdatadir)!g' $< > $@ - -install-data-local: $(INSTALL_LOCAL_TARGET) - -clean-local: $(CLEAN_LOCAL_TARGET) - -all-tm: - @if grep ${CVSROOT} ${HOME}/.cvspass; then :; else \ - echo "${CVSROOT} A" >> ${HOME}/.cvspass; fi; \ - target=`echo $@ | sed s/-recursive//`; \ - if test -d apel; then :; else \ - cvs -d ${CVSROOT} -z3 checkout apel; fi; \ - if test -d flim; then :; else \ - cvs -d ${CVSROOT} -z3 checkout -r flim-1_13 flim; fi; \ - list='apel flim'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - ( cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) $(ALL_TM_TARGET) ) ; \ - done - -install-tm: all-tm - @target=`echo $@ | sed s/-recursive//`; \ - list='apel flim'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - ( cd $$subdir && \ - $(MAKE) $(INSTALL_TM_MAKEFLAGS) $(INSTALL_TM_TARGET) ) ; \ +install-package package: + list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \ done - -clean-tm: - @target=`echo $@ | sed s/-recursive//`; \ - list='apel flim'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - ( cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) $(CLEAN_TM_TARGET) ) ; \ - done - diff --git a/acinclude.m4 b/acinclude.m4 index 90be5b4..720c918 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,85 +1,359 @@ -AC_DEFUN(AM_PATH_LISPDIR, - [dnl # - dnl # Check Emacs - dnl # +AC_DEFUN(AC_DEFINE_GNUS_PRODUCT_NAME, + [echo $ac_n "defining gnus product name... $ac_c" + AC_CACHE_VAL(EMACS_cv_GNUS_PRODUCT_NAME,[EMACS_cv_GNUS_PRODUCT_NAME=$1]) + GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME} + AC_MSG_RESULT(${GNUS_PRODUCT_NAME}) + AC_SUBST(GNUS_PRODUCT_NAME)]) + +AC_DEFUN(AC_CHECK_EMACS, + [dnl Check for Emacsen. + + dnl Apparently, if you run a shell window in Emacs, it sets the EMACS + dnl environment variable to 't'. Lets undo the damage. + test "$EMACS" = t && EMACS= + + dnl Ignore cache. + unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS; + AC_ARG_WITH(emacs, - [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, xemacs...]], - [case "${withval}" in - yes) EMACS= ;; - no) AC_MSG_ERROR([emacs is not available]) ;; - *) EMACS=${withval} ;; - esac], EMACS=) - if test "x$EMACS" = "xt" -o "x$EMACS" = x; then - AC_PATH_PROGS(EMACS, emacs xemacs mule, no) - else - AC_MSG_CHECKING(for emacs) - AC_MSG_RESULT($EMACS) + [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]], + [if test "$withval" = yes -o -z "$withval"; then + AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs) + else + AC_CHECK_PROG(EMACS, $withval, $withval, emacs) + fi]) + AC_ARG_WITH(xemacs, + [ --with-xemacs=XEMACS compile with XEMACS [XEMACS=xemacs]], + [if test "$withval" = yes -o -z "$withval"; then + AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs) + else + AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs) + fi + EMACS=$XEMACS], + [XEMACS=xemacs + test -z "$EMACS" && AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)]) + AC_SUBST(EMACS) + AC_SUBST(XEMACS)]) + +AC_DEFUN(AC_EMACS_LISP, [ +elisp="$2" +if test -z "$3"; then + AC_MSG_CHECKING(for $1) +fi +AC_CACHE_VAL(EMACS_cv_SYS_$1,[ + OUTPUT=./conftest-$$ + echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1 + eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1 + retval=`cat ${OUTPUT}` + echo "=> ${retval}" >& AC_FD_CC 2>&1 + rm -f ${OUTPUT} + EMACS_cv_SYS_$1=$retval +]) +$1=${EMACS_cv_SYS_$1} +if test -z "$3"; then + AC_MSG_RESULT($$1) +fi +]) + +AC_DEFUN(AC_CHECK_EMACS_FLAVOR, + [AC_MSG_CHECKING([what a flavor does $EMACS have]) + + dnl Ignore cache. + unset EMACS_cv_SYS_flavor; + + AC_EMACS_LISP(flavor, + (cond ((featurep (quote xemacs)) \"XEmacs\")\ + ((boundp (quote MULE)) \"MULE\")\ + (t \"FSF Emacs\")), + "noecho") + case $EMACS_cv_SYS_flavor in + XEmacs) + EMACS_FLAVOR=xemacs;; + MULE) + EMACS_FLAVOR=mule;; + *) + EMACS_FLAVOR=emacs;; + esac + AC_MSG_RESULT($EMACS_cv_SYS_flavor)]) + +AC_DEFUN(AC_PATH_LISPDIR, [ + AC_CHECK_EMACS_FLAVOR + if test "$prefix" = NONE; then + AC_MSG_CHECKING([prefix for your Emacs]) + AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho") + prefix=${EMACS_cv_SYS_prefix} + AC_MSG_RESULT($prefix) fi - dnl # - dnl # Check Emacs directories - dnl # - AC_ARG_WITH(emacsdir, - [ --with-emacsdir=EDIR Emacs program/data files in EDIR [guessed]], - [case "${withval}" in - yes) emacsdir=NONE ;; - no) AC_MSG_ERROR(emacsdir is not available) ;; - *) emacsdir=${withval} ;; - esac], emacsdir=NONE) - AC_MSG_CHECKING([where emacs files are in]) - AC_MSG_RESULT($emacsdir) - AC_SUBST(emacsdir) - dnl # - dnl # Check Emacs site-lisp directories - dnl # - ac_cv_lispdir=no AC_ARG_WITH(lispdir, - [ --with-lispdir=DIR emacs lisp files in DIR [EDIR/site-lisp]], - [case "${withval}" in - yes) lispdir=NONE ;; - no) AC_MSG_ERROR(lispdir is not available) ;; - *) lispdir=${withval} ; ac_cv_lispdir=yes ;; - esac], lispdir=NONE) - AC_MSG_CHECKING([where .elc files should go]) - AC_MSG_RESULT($lispdir) + [ --with-lispdir=DIR Where to install lisp files + (for XEmacs package, use --with-packagedir instead)], + lispdir=${withval}) + AC_MSG_CHECKING([where lisp files should go]) + if test -z "$lispdir"; then + dnl Set default value + theprefix=$prefix + if test "$theprefix" = NONE; then + theprefix=$ac_default_prefix + fi + lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}" + for thedir in share lib; do + potential= + if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then + lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}" + break + fi + done + fi + if test ${EMACS_FLAVOR} = xemacs; then + AC_MSG_RESULT([$lispdir + (it will be ignored when \"make install-package[[-ja]]\" is done)]) + else + AC_MSG_RESULT([$lispdir]) + fi AC_SUBST(lispdir) - AM_CONDITIONAL(USE_CUSTOM_LISPDIR, test x$ac_cv_lispdir = xyes) - dnl # - dnl # Check whether install as XEmacs package - dnl # - AC_ARG_ENABLE(package, - [ --enable-package install as XEmacs package [default=no]],, - enable_package=no) - AC_MSG_CHECKING([whether install as XEmacs package]) - if test "x$enable_package" = "xyes"; then - AC_MSG_RESULT(yes) - EMACS=xemacs - dnl # - dnl # Check XEmacs package directories - dnl # - ac_cv_packagedir=no +]) + +AC_DEFUN(AC_PATH_ETCDIR, [ + AC_ARG_WITH(etcdir,[ --with-etcdir=DIR Where to install etc files], etcdir=${withval}) + AC_MSG_CHECKING([where etc files should go]) + if test -z "$etcdir"; then + dnl Set default value + etcdir="\$(lispdir)/../etc" + fi + AC_MSG_RESULT($etcdir) + AC_SUBST(etcdir) +]) + +dnl +dnl Check whether a function exists in a library +dnl All '_' characters in the first argument are converted to '-' +dnl +AC_DEFUN(AC_EMACS_CHECK_LIB, [ +if test -z "$3"; then + AC_MSG_CHECKING(for $2 in $1) +fi +library=`echo $1 | tr _ -` +AC_EMACS_LISP($1,(progn (fmakunbound (quote $2)) (condition-case nil (progn (require (quote $library)) (fboundp (quote $2))) (error (prog1 nil (message \"$library not found\"))))),"noecho") +if test "${EMACS_cv_SYS_$1}" = nil; then + EMACS_cv_SYS_$1=no +fi +if test "${EMACS_cv_SYS_$1}" = t; then + EMACS_cv_SYS_$1=yes +fi +HAVE_$1=${EMACS_cv_SYS_$1} +AC_SUBST(HAVE_$1) +if test -z "$3"; then + AC_MSG_RESULT($HAVE_$1) +fi +]) + +dnl +dnl Perform sanity checking and try to locate the W3 package +dnl +AC_DEFUN(AC_CHECK_W3, [ +AC_MSG_CHECKING(for acceptable W3 version) + +dnl Ignore cache. +unset EMACS_cv_ACCEPTABLE_W3; +unset EMACS_cv_SYS_w3_dir; +unset EMACS_cv_SYS_w3_forms; + +AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[ +AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho") +if test "${HAVE_w3_forms}" = yes; then + EMACS_cv_ACCEPTABLE_W3=yes +else + EMACS_cv_ACCEPTABLE_W3= +fi + +if test "${EMACS_cv_ACCEPTABLE_W3}" = yes; then + AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho") + EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir +fi +]) + AC_ARG_WITH(w3,[ --with-w3=DIR Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ]) + W3=${EMACS_cv_ACCEPTABLE_W3} + AC_SUBST(W3) + if test -z "${EMACS_cv_ACCEPTABLE_W3}"; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT(${W3}) + fi +]) + +dnl +dnl Perform sanity checking and try to locate the W3 package +dnl +AC_DEFUN(AC_CHECK_URL, [ +AC_MSG_CHECKING(for acceptable URL version) + +dnl Ignore cache. +unset EMACS_cv_ACCEPTABLE_URL; +unset EMACS_cv_SYS_url_dir; +unset EMACS_cv_SYS_url; + +AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[ +AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho") +if test "${HAVE_url}" = yes; then + EMACS_cv_ACCEPTABLE_URL=yes +else + EMACS_cv_ACCEPTABLE_URL= +fi + +if test "${EMACS_cv_ACCEPTABLE_URL}" = yes; then + AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho") + EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir +fi +]) + AC_ARG_WITH(url,[ --with-url=DIR Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ]) + URL=${EMACS_cv_ACCEPTABLE_URL} + AC_SUBST(URL) + if test -z "${EMACS_cv_ACCEPTABLE_URL}"; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT("${URL}") + fi +]) + +dnl +dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and +dnl Bitstream Courier. +dnl + +AC_DEFUN(GNUS_CHECK_FONTS, [ +test "$LATEX" = t && LATEX= +test "$LATEX" || AC_PATH_PROGS(LATEX, latex, no) +AC_MSG_CHECKING(for available fonts) +AC_ARG_WITH(fonts,[ --with-fonts Assume all fonts required are available],[USE_FONTS="$withval"]) +WITH_FONTS_bembo='%' +WITHOUT_FONTS_bembo= +WITH_FONTS_pfu='%' +WITHOUT_FONTS_pfu= +WITH_FONTS_bcr='%' +WITHOUT_FONTS_bcr= +if test -z "${USE_FONTS}"; then + if test "${LATEX}" = no; then + : + else + OUTPUT=./conftest-$$ + echo '\nonstopmode\documentclass{article}\usepackage{bembo}\begin{document}\end{document}' > ${OUTPUT} + if ${LATEX} ${OUTPUT} & AC_FD_CC 2>&1 ; then + if test -z "${USE_FONTS}"; then + USE_FONTS="Adobe Bembo" + else + USE_FONTS="${USE_FONTS}, Adobe Bembo" + fi + WITH_FONTS_bembo= + WITHOUT_FONTS_bembo='%' + fi + echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT} + if retval=`${LATEX} ${OUTPUT} & AC_FD_CC`; then + if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then + : + else + if test -z "${USE_FONTS}"; then + USE_FONTS="Adobe Futura" + else + USE_FONTS="${USE_FONTS}, Adobe Futura" + fi + WITH_FONTS_pfu= + WITHOUT_FONTS_pfu='%' + fi + fi + echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{bcr}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT} + if retval=`${LATEX} ${OUTPUT} & AC_FD_CC`; then + if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then + : + else + if test -z "${USE_FONTS}"; then + USE_FONTS="Bitstream Courier" + else + USE_FONTS="${USE_FONTS}, Bitstream Courier" + fi + WITH_FONTS_bcr= + WITHOUT_FONTS_bcr='%' + fi + fi + rm -f ${OUTPUT} ${OUTPUT}.aux ${OUTPUT}.log ${OUTPUT}.dvi + fi +elif test "${USE_FONTS}" = yes ; then + WITH_FONTS_bembo= + WITHOUT_FONTS_bembo='%' + WITH_FONTS_pfu= + WITHOUT_FONTS_pfu='%' + WITH_FONTS_bcr= + WITHOUT_FONTS_bcr='%' +fi +AC_SUBST(WITH_FONTS_bembo) +AC_SUBST(WITHOUT_FONTS_bembo) +AC_SUBST(WITH_FONTS_pfu) +AC_SUBST(WITHOUT_FONTS_pfu) +AC_SUBST(WITH_FONTS_bcr) +AC_SUBST(WITHOUT_FONTS_bcr) +if test -z "${USE_FONTS}" ; then + USE_FONTS=no +fi +USE_FONTS=`echo "${USE_FONTS}" | sed 's/,\([[^,]]*\)$/ and\1/'` +AC_MSG_RESULT("${USE_FONTS}") +if test "${USE_FONTS}" = yes ; then + USE_FONTS='Set in Adobe Bembo, Adobe Futura and Bitstream Courier.' +elif test "${USE_FONTS}" = no ; then + USE_FONTS='' +else + USE_FONTS="Set in ${USE_FONTS}." +fi +AC_SUBST(USE_FONTS) +]) + +AC_DEFUN(AC_EXAMINE_PACKAGEDIR, + [dnl Examine PACKAGEDIR. + AC_EMACS_LISP(PACKAGEDIR, + (let (package-dir)\ + (if (boundp (quote early-packages))\ + (let ((dirs (delq nil (append (if early-package-load-path\ + early-packages)\ + (if late-package-load-path\ + late-packages)\ + (if last-package-load-path\ + last-packages)))))\ + (while (and dirs (not package-dir))\ + (if (file-directory-p (car dirs))\ + (setq package-dir (car dirs)\ + dirs (cdr dirs))))))\ + (or package-dir \"\")), + "noecho")]) + +AC_DEFUN(AC_PATH_PACKAGEDIR, + [dnl Check for PACKAGEDIR. + if test ${EMACS_FLAVOR} = xemacs; then + AC_MSG_CHECKING([where the XEmacs package is]) AC_ARG_WITH(packagedir, - [ --with-packagedir=DIR XEmacs package files in DIR [EDIR/packages]], - [case "${withval}" in - yes) packagedir=NONE ;; - no) AC_MSG_ERROR(packagedir is not available) ;; - *) packagedir=${withval} ; ac_cv_packagedir=yes ;; - esac], packagedir=NONE) - AC_MSG_CHECKING([where package files should go]) - if test "x$packagedir" = "xNONE"; then - eval `$EMACS -batch -q -no-site-file -l ./lisp/liece-make.el \ - -f config-liece-package-directory` - packagedir=$PACKAGEDIR + [ --with-packagedir=DIR package DIR for XEmacs], + [if test "$withval" != yes -a -n "$withval"; then + PACKAGEDIR=$withval + else + AC_EXAMINE_PACKAGEDIR + fi], + AC_EXAMINE_PACKAGEDIR) + if test -z "$PACKAGEDIR"; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT($PACKAGEDIR) fi - AC_MSG_RESULT($packagedir) - AC_SUBST(packagedir) - pkgdatadir=${packagedir}/etc/${PACKAGE} - infodir=${packagedir}/info - AM_CONDITIONAL(USE_CUSTOM_PACKAGEDIR, test x$ac_cv_packagedir = xyes) - else - AC_MSG_RESULT(no) + else + PACKAGEDIR= fi - AC_SUBST(icondir) - AC_SUBST(catalogdir) - AC_SUBST(styledir) - - AM_CONDITIONAL(USE_PACKAGE, test x$enable_package = xyes)]) + AC_SUBST(PACKAGEDIR)]) + +AC_DEFUN(AC_ADD_LOAD_PATH, + [dnl Check for additional load path. + AC_ARG_WITH(addpath, + [ --with-addpath=PATH search Emacs-Lisp libraries with PATH + use colons to separate directory names], + [if test "$withval" != yes -a -n "$withval"; then + AC_MSG_CHECKING([where to find the additional elisp libraries]) + ADDITIONAL_LOAD_PATH=$withval + AC_MSG_RESULT($ADDITIONAL_LOAD_PATH) + fi], + ADDITIONAL_LOAD_PATH=) + AC_SUBST(ADDITIONAL_LOAD_PATH)]) diff --git a/configure.in b/configure.in index b908cab..4efef19 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,5 @@ -AC_INIT(lisp/liece.el) +AC_INIT(configure.in) +AC_PREREQ(2.13) AM_INIT_AUTOMAKE(liece, 1.4.5) AM_PATH_LISPDIR @@ -9,55 +10,24 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB -AC_CHECK_HEADERS(sys/select.h libgen.h socks.h netinet6/in6.h) +AC_CHECK_HEADERS(sys/select.h libgen.h) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, socket) -AC_CHECK_FUNCS(strtoul memmove basename getaddrinfo) - -AC_CHECK_TYPE(fd_set, int) - -dnl checking if the system supports ipv6 address space or not -AC_CACHE_CHECK([for struct in6_addr], ac_cv_struct_in6_addr, -[AC_TRY_COMPILE([#include -#include -#include -#include ], [struct in6_addr v6; v6.s6_addr32[3];], -ac_cv_struct_in6_addr=yes, ac_cv_struct_in6_addr=no)]) -test "x$ac_cv_struct_in6_addr" = "xyes" && AC_DEFINE(HAVE_IN6_ADDR) - -dnl checking if the system supports tcp over ipv6 support or not -AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_struct_sockaddr_in6, -[AC_TRY_COMPILE([#include -#include -#include -#include ], [struct sockaddr_in6 v6; v6.sin6_addr;], -ac_cv_struct_sockaddr_in6=yes, ac_cv_struct_sockaddr_in6=no)]) -test "x$ac_cv_struct_sockaddr_in6" = "xyes" && AC_DEFINE(HAVE_SOCKADDR_IN6) - -# Check compile with IPv6 support -AC_MSG_CHECKING(whether we compile with IPv6) -AC_ARG_ENABLE(ipv6, \ - [ --enable-ipv6 compile with IPv6 [default=no]],, \ - enable_ipv6=no) -test "x$enable_ipv6" = "xyes" && AC_DEFINE(INET6) -AC_MSG_RESULT($enable_ipv6) - -# Check whether to retrieve APEL/FLIM distribution. -AC_MSG_CHECKING(whether we retrieve APEL/FLIM distribution via CVS) -AC_ARG_ENABLE(tm, \ - [ --enable-tm retrieve APEL/FLIM distribution via CVS [default=no]],, \ - enable_tm=no) -if test "x$enable_tm" = "xyes"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL(USE_TM, test x$enable_tm = xyes) +AC_CHECK_FUNCS(strtoul memmove getaddrinfo) +AC_CHECK_FUNC(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o") +AC_REPLACE_FUNCS(basename) +AC_CHECK_EMACS +AC_PATH_LISPDIR +AC_PATH_ETCDIR +AC_PATH_PACKAGEDIR AC_OUTPUT(Makefile \ lisp/Makefile \ dcc/Makefile \ -doc/Makefile \ -etc/Makefile) +dnl doc/Makefile \ +etc/Makefile \ +etc/icons/Makefile \ +etc/po/Makefile \ +etc/styles/Makefile) diff --git a/dcc/Makefile.am b/dcc/Makefile.am index 9c54399..270d34c 100644 --- a/dcc/Makefile.am +++ b/dcc/Makefile.am @@ -1,34 +1,12 @@ -## Process this file with automake to produce Makefile.in - DEFS = -I$(srcdir) -I$(top_srcdir) $(CFLAGS) @DEFS@ -LIBS = -L. -ldcc @LIBS@ +LIBS = @LIBOBJS@ +EXTRA_DIST = getopt.c getopt.h getopt1.c CLEANFILES = ldcc ltcp -noinst_LIBRARIES = libdcc.a bin_PROGRAMS = ldcc ltcp -libdcc_a_SOURCES = getopt1.c getopt.c getaddrinfo.c -noinst_HEADERS = getopt.h getaddrinfo.h - -ltcp_SOURCES = tcp.c +ltcp_SOURCES = tcp.c ldcc_SOURCES = dcc.c -#MLHDRS = naddr.mli -#MLSRCS = naddr.ml dcc.ml -#MLOBJS = $(MLSRCS:.ml=.cmo) -#MLINTF = $(MLHDRS:.mli=.cmi) -#EXTRA_ldcc_SOURCES = $(MLHDRS) $(MLSRCS) -#ldcc_SOURCES = $(MLSRCS) -#ldcc_COMPILE = @OCAMLC@ -#ldcc_LINK = $(OCAMLC) -custom unix.cma nums.cma str.cma -#ldcc_LDFLAGS = -cclib -lunix -cclib -lnums -cclib -lstr -o ldcc - -#SUFFIXES = .ml .mli .cmo .cmi - -#$(MLOBJS): $(MLINTF) - -#.mli.cmi: -# $(OCAMLC) -c $< - -#.ml.cmo: -# $(OCAMLC) -c $< +package: all +install-package: package install diff --git a/dcc/basename.c b/dcc/basename.c new file mode 100644 index 0000000..8fae497 --- /dev/null +++ b/dcc/basename.c @@ -0,0 +1,40 @@ +/* Return the name-within-directory of a file name. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#define _LIBC +#ifndef _LIBC +/* We cannot generally use the name `basename' since XPG defines an unusable + variant of the function but we cannot use it. */ +# define basename gnu_basename +#endif + + +char * +basename (filename) + const char *filename; +{ + char *p = strrchr (filename, '/'); + return p ? p + 1 : (char *) filename; +} diff --git a/dcc/dcc.c b/dcc/dcc.c index 7671cc0..cd0ccd6 100644 --- a/dcc/dcc.c +++ b/dcc/dcc.c @@ -1,28 +1,22 @@ -/* This file is part of Liece. - Copyright (C) 1998 Daiki Ueno - - Author: Daiki Ueno - Created: 1998-09-28 - Revised: 1999-01-28 - Keywords: IRC, liece, DCC - - This file is part of Liece. - - 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 GNU Emacs; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ +/* dcc.c + * Copyright (C) 1998-2002 Daiki Ueno + * + * This file is part of Liece. + * + * 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. + */ #include #include diff --git a/dcc/dcc.ml b/dcc/dcc.ml deleted file mode 100644 index 445b24d..0000000 --- a/dcc/dcc.ml +++ /dev/null @@ -1,234 +0,0 @@ -open Unix - -let usage prefix progname = - String.concat "\n" - (List.map (fun x -> (Printf.sprintf "%s: %s %s" prefix progname x)) - [ "send "; - "receive "; - "chat listen "; - "chat connect " ]) - -let buff = String.create 1024 - -let print_exc exc = - match exc with - Unix_error (err, fun_name, arg) -> - prerr_string "\""; - prerr_string fun_name; - prerr_string "\" failed"; - if String.length arg > 0 then - begin - prerr_string " on \""; prerr_string arg; prerr_string "\""; () - end; - prerr_string ": "; - prerr_endline (error_message err); - flush Pervasives.stderr; () - | _ -> - try Printexc.print raise exc with - _ -> () - -let accept_connection f s = - let (t, addr) = accept s in - f t; close t; () - -let write_file filename size t = - let fd = - try openfile filename [ O_RDONLY ] 0 with - _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1 - in - let (len, rlen) = ref 0, ref 0 in - while len := read fd buff 0 (String.length buff); !len <> 0 - do - let rec loop i = - let j = i + write t buff i (!len - i) in - if j == !len then () else loop j - in - loop 0; - flush (out_channel_of_descr t); - rlen := !rlen + !len; - Printf.printf "DCC %s %d%% (%d/%d bytes) sent.\n" - filename (100 * !rlen / size) !rlen size; - flush Pervasives.stdout - done; - close fd; close t; () - -let send_file port filename = - try - let host = gethostbyname (gethostname ()) in - let haddr = string_of_inet_addr host.h_addr_list.(0) in - let s = socket PF_INET SOCK_STREAM 0 in - setsockopt s SO_REUSEADDR true; - bind s (ADDR_INET (inet_addr_any, port)); - let port = - match (getsockname s) with - ADDR_INET (addr, port) -> port - | _ -> port - in - listen s 1; - let fd = - try openfile filename [ O_RDONLY ] 0 with - _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1 - in - let size = (fstat fd).st_size in - let hl = (Hostlong.of_address_string haddr) in - close fd; - Printf.printf "DCC send %s %d %s %d\n" - (Filename.basename filename) port (Hostlong.to_string hl) size; - flush Pervasives.stdout; - accept_connection (fun t -> write_file filename size t) s; - with - exc -> print_exc exc - -let read_file filename size t = - let fd = - try openfile filename [ O_WRONLY; O_CREAT ] 0o600 with - _ -> Printf.eprintf "Open failed.\n"; flush Pervasives.stderr; exit 1 - in - let (len, rlen) = ref 0, ref 0 in - while len := read t buff 0 (String.length buff); !len <> 0 - do - let _ = write fd buff 0 !len in - flush (out_channel_of_descr fd); - rlen := !rlen + !len; - Printf.printf "DCC %s %d%% (%d/%d bytes) received.\n" - filename (100 * !rlen / size) !rlen size; - flush Pervasives.stdout - done; - close fd; close t - -let receive_file host port size filename = - let s = socket PF_INET SOCK_STREAM 0 in - let hl = Hostlong.of_string host in - let inet_addr = - inet_addr_of_string (Hostlong.to_address_string hl) - in - connect s (ADDR_INET (inet_addr, port)); - read_file filename size s; () - -let chat_loop s = - let sel = ref [s; stdin] in - while !sel <> [] do - let (l, _, _) = - try - select !sel [] [] (-1.0) - with - _ -> exit 0 - in - List.iter - (fun x -> - let (rfd, wfd) = - if x == s then - (s, stdout) - else if x == stdin then - (stdin, s) - else - (stdin, stdout) - in - let len = ref 0 - in - len := read rfd buff 0 (String.length buff); - if !len == 0 then - begin try shutdown wfd SHUTDOWN_SEND; () with - _ -> exit 0 - end - else - begin - let rec loop i = - let j = i + write wfd buff i (!len - i) in - if j == !len then () else loop j - in - loop 0; - flush (out_channel_of_descr wfd) - end; - ()) - l - done - -let chat_listen port = - let host = gethostbyname (gethostname ()) in - let haddr = string_of_inet_addr host.h_addr_list.(0) in - let s = socket PF_INET SOCK_STREAM 0 in - setsockopt s SO_REUSEADDR true; - bind s (ADDR_INET (inet_addr_any, port)); - let port = - match (getsockname s) with - ADDR_INET (addr, port) -> port - | _ -> port - in - let hl = Hostlong.of_address_string haddr in - listen s 1; - Printf.printf "DCC chat %s %d\n" (Hostlong.to_string hl) port; - flush Pervasives.stdout; - accept_connection - (fun t -> - Printf.printf "DCC chat established\n"; - flush Pervasives.stdout; - chat_loop t) s; () - -let chat_connect host port = - let s = socket PF_INET SOCK_STREAM 0 in - let hl = Hostlong.of_string host in - let inet_addr = - inet_addr_of_string (Hostlong.to_address_string hl) - in - connect s (ADDR_INET (inet_addr, port)); - Printf.printf "DCC chat established\n"; - flush Pervasives.stdout; - chat_loop s; () - -let getaddr_ext server = - let addr = - try (gethostbyname server).h_addr_list.(0) with - _ -> inet_addr_of_string "198.41.0.4" - and port = 7 in - let s = socket PF_INET SOCK_DGRAM 0 in - connect s (ADDR_INET (addr, port)); - match (getsockname s) with - ADDR_INET (addr, port) -> addr - | _ -> raise Not_found - -let main () = - let a = ref [] in - let usage = usage "Usage" (Filename.basename Sys.argv.(0)) in - let speclist = [] in - Arg.parse speclist (fun x -> a := !a @ [x]) usage; - begin match !a with - "send" :: [ port; filename ] -> - let port = - try int_of_string port with - _ -> Arg.usage speclist usage; exit 1 - in - send_file port filename; - exit 0; () - | "receive" :: [ host; port; size; filename ] -> - let (port, size) = - try - int_of_string port, - int_of_string size - with - _ -> Arg.usage speclist usage; exit 1 - in - receive_file host port size filename; - exit 0; () - | "chat" :: [ "listen"; port ] -> - let port = - try - int_of_string port - with - _ -> Arg.usage speclist usage; exit 1 - in - chat_listen port; - exit 0; () - | "chat" :: [ "connect"; host; port ] -> - let port = - try - int_of_string port - with - _ -> Arg.usage speclist usage; exit 1 - in - chat_connect host port; - exit 0; () - | _ -> Arg.usage speclist usage; exit 1 - end - -let _ = Printexc.catch main () diff --git a/dcc/getaddrinfo.c b/dcc/getaddrinfo.c deleted file mode 100644 index 18eeccf..0000000 --- a/dcc/getaddrinfo.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * getaddrinfo(2) emulation. - * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. - - * Author: Daiki Ueno - -This file is not part of any package. - -GNU Emacs 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. - -GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. - */ - -#ifndef HAVE_GETADDRINFO - -#include -#include -#include -#include -#include - -#ifdef HAVE_NETINET6_IN6_H -# include -#endif /* HAVE_NETINET6_IN6_H */ - -#include "getaddrinfo.h" - -int getaddrinfo (hostname, servname, hints, res) - const char *hostname; - const char *servname; - const struct addrinfo *hints; - struct addrinfo **res; -{ - struct hostent *host = NULL; - struct servent *serv = NULL; - struct protoent *proto; - int port = 0; - -#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) - struct sockaddr_in6 *sin = - (struct sockaddr_in6 *) calloc (1, sizeof (struct sockaddr_in6)); -#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - struct sockaddr_in *sin = - (struct sockaddr_in *) calloc (1, sizeof (struct sockaddr_in)); -#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - - struct addrinfo *ai = *res = - (struct addrinfo *) calloc (1, sizeof (struct addrinfo)); - - if ((~ hints->ai_flags & AI_PASSIVE) && hostname && - (host = gethostbyname (hostname)) == NULL) { - perror ("gethostbyname"); - return EAI_NONAME; - } - - if (hints->ai_protocol && - (proto = getprotobynumber (hints->ai_protocol)) == NULL) { - perror ("getprotobynumber"); - return EAI_NONAME; - } - - if (servname) - if (isdigit (servname[0])) - port = atoi (servname); - else { - if ((serv = getservbyname (servname, proto->p_name)) == NULL) { - perror ("getservbyname"); - return EAI_NONAME; - } - port = serv->s_port; - } - -#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) - if (host) - memcpy (&sin->sin6_addr, host->h_addr, host->h_length); - sin->sin6_port = htons (port); -#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - if (host) - memcpy (&sin->sin_addr, host->h_addr, host->h_length); - sin->sin_port = htons (port); -#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - - if (hints->ai_family == AF_UNSPEC) - ai->ai_family = host->h_addrtype; - else - ai->ai_family = hints->ai_family; -#if (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) - sin->sin6_family = ai->ai_family; -#else /* (defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - sin->sin_family = ai->ai_family; -#endif /* !(defined (HAVE_SOCKADDR_IN6) && defined (INET6)) */ - - ai->ai_protocol = hints->ai_protocol; - ai->ai_socktype = hints->ai_socktype; - ai->ai_addrlen = sizeof (*sin); - ai->ai_addr = (struct sockaddr *)sin; - - return 0; -} - -void freeaddrinfo (ai) - struct addrinfo *ai; -{ - struct addrinfo *p; - - while (ai != NULL) { - p = ai; - ai = ai->ai_next; - free (p); - } -} - -#endif /* HAVE_GETADDRINFO */ diff --git a/dcc/getaddrinfo.h b/dcc/getaddrinfo.h deleted file mode 100644 index d88883f..0000000 --- a/dcc/getaddrinfo.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * getaddrinfo(2) emulation. - * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. - - * Author: Daiki Ueno - -This file is not part of any package. - -GNU Emacs 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. - -GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. - */ - -struct addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - char *ai_canonname; - struct sockaddr *ai_addr; - struct addrinfo *ai_next; -}; - -/* Possible values for `ai_flags' field in `addrinfo' structure. */ -# define AI_PASSIVE 1 /* Socket address is intended for `bind'. */ -# define AI_CANONNAME 2 /* Request for canonical name. */ -# define AI_NUMERICHOST 3 /* Don't use name resolution. */ - -/* Error values for `getaddrinfo' function. */ -#define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ -#define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ -#define EAI_AGAIN -3 /* Temporary failure in name resolution. */ -#define EAI_FAIL -4 /* Non-recoverable failure in name res. */ -#define EAI_NODATA -5 /* No address associated with NAME. */ -#define EAI_FAMILY -6 /* `ai_family' not supported. */ -#define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ -#define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ -#define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ -#define EAI_MEMORY -10 /* Memory allocation failure. */ -#define EAI_SYSTEM -11 /* System error returned in `errno'. */ - -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 - -#define NI_NUMERICHOST 1 /* Don't try to look up hostname. */ -#define NI_NUMERICSERV 2 /* Don't convert port number to name. */ -#define NI_NOFQDN 4 /* Only return nodename portion. */ -#define NI_NAMEREQD 8 /* Don't return numeric addresses. */ -#define NI_DGRAM 16 /* Look up UDP service rather than TCP. */ - -extern int getaddrinfo (const char *, const char *, const struct addrinfo *, - struct addrinfo **); - -extern void freeaddrinfo (struct addrinfo *ai); - - - diff --git a/dcc/hostlong.ml b/dcc/hostlong.ml deleted file mode 100644 index 33a89c3..0000000 --- a/dcc/hostlong.ml +++ /dev/null @@ -1,39 +0,0 @@ -type t = int32 - -let address_regexp = - let octet_regexp_string = "\([0-9][0-9]?[0-9]?\)" in - let address_regexp_string = - octet_regexp_string ^ "\." ^ octet_regexp_string ^ "\." ^ - octet_regexp_string ^ "\." ^ octet_regexp_string - in - Str.regexp ("^" ^ address_regexp_string ^ "$") - -let of_int32 = function n -> n - -let to_int32 = function n -> n - -let of_string = Int32.of_string - -let to_string = Int32.to_string - -let of_address_string string = - let n = ref Int32.zero in - if (Str.string_match address_regexp string 0) then - for i = 1 to 4 do - let octet = Int32.of_string (Str.matched_group i string) in - n := Int32.logor !n (Int32.shift_left octet (8 * (3 - i))) - done - else - failwith "hostlong_of_string"; - !n - -let to_address_string n = - let octets = ref [] in - let octet_mask = Int32.of_int 0xff in - for i = 0 to 3 do - let octet = - Int32.logand octet_mask (Int32.shift_right_logical n (i * 8)) - in - octets := (Int32.to_string octet) :: !octets - done; - String.concat "." !octets diff --git a/dcc/hostlong.mli b/dcc/hostlong.mli deleted file mode 100644 index 01ca030..0000000 --- a/dcc/hostlong.mli +++ /dev/null @@ -1,22 +0,0 @@ -type t - -val of_int32 : int32 -> t - (* Convert the given 32-bit integer (type [int32]) to a hostlong - (type [Hostlong.t]). *) -val to_int32 : t -> int32 - (* Convert the given hostlong (type [Hostlong.t]) to a 32-bit integer - (type [int32]). *) - -val of_string : string -> t - (* Convert the given string to a hostlong (type [Hostlong.t]). *) - -val to_string : t -> string - (* Return the string representation of its argument, - in signed decimal. *) - -val of_address_string : string -> t - (* Convert the given string to a hostlong (type [Hostlong.t]). *) - -val to_address_string : t -> string - (* Return the string representation of its argument, - in signed decimal. *) diff --git a/dcc/tcp.c b/dcc/tcp.c index 266b1ad..8ed67fe 100644 --- a/dcc/tcp.c +++ b/dcc/tcp.c @@ -1,27 +1,25 @@ -/* - * TCP/IP stream emulation for GNU Emacs. +/* tcp.c - TCP/IP stream emulation for GNU Emacs. * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. - - * Author: Masanobu Umeda - * Daiki Ueno - -This file is part of GNU Emacs. - -GNU Emacs 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. - -GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. + * Copyright (C) 1998-2002 Daiki Ueno + * + * This file is part of Liece. + * + * 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. */ +/* This program is based on `tcp' comming from old GNUS distribution + written by Masanobu Umeda . */ #include #include @@ -38,14 +36,6 @@ Boston, MA 02111-1307, USA. #define _GNU_SOURCE #include -#ifdef HAVE_SOCKS_H -#include -#endif - -#ifndef HAVE_GETADDRINFO -#include "getaddrinfo.h" -#endif /* !HAVE_GETADDRINFO */ - #ifdef HAVE_BASENAME # ifdef HAVE_LIBGEN_H # include @@ -82,11 +72,18 @@ main (argc, argv) char *argv[]; { struct protoent *proto; - + int family, socktype; + struct sockaddr *addr; + size_t addrlen; +#ifdef HAVE_GETADDRINFO struct addrinfo *in, hints; - +#else + struct hostent *host; + struct servent *serv; + struct sockaddr_in sin; +#endif char *hostname = NULL, *service = "ircd"; - int family, port; + int port; fd_set *readfds, *writefds; int server, emacsIn = fileno (stdin), emacsOut = fileno (stdout); char buffer[1024], *retry; @@ -95,32 +92,35 @@ main (argc, argv) progname = (char *) basename (argv[0]); - while (1) { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static struct option long_options[] = { - {"version", 0, 0, 'v'}, - {"help", 0, 0, 'h'}, - {0, 0, 0, 0} - }; + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"version", 0, 0, 'v'}, + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; - c = getopt_long (argc, argv, "vh", long_options, &option_index); - if (c == -1) - break; + c = getopt_long (argc, argv, "vh", long_options, &option_index); + if (c == -1) + break; - switch (c) { - case 'v': - version(); - exit(1); - break; - case 'h': - usage(); - exit(1); - break; - default: - break; + switch (c) + { + case 'v': + version (); + exit (1); + break; + case 'h': + usage (); + exit (1); + break; + default: + break; + } } - } if (argc < 2) { @@ -132,36 +132,61 @@ main (argc, argv) if (argc >= 3) service = argv[2]; - if ((proto = getprotobyname ("tcp")) == NULL) { - perror ("getprotobyname"); - exit (1); - } - + proto = getprotobyname ("tcp"); + if (!proto) + { + perror ("getprotobyname"); + exit (1); + } + +#ifdef HAVE_GETADDRINFO memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = proto->p_proto; - if (getaddrinfo (hostname, service, &hints, &in) < 0) { - perror ("getaddrinfo"); - exit (1); - } - - if ((server = socket (in->ai_family, in->ai_socktype, 0)) < 0) { - perror ("socket"); - exit (1); - } - - if (setsockopt (server, SOL_SOCKET, SO_REUSEADDR, - (const char *) &false, sizeof (false))) { - perror ("setsockopt"); - exit (1); - } - - if (connect (server, in->ai_addr, in->ai_addrlen) < 0) { - perror ("connect"); - close (server); - exit (1); - } + if (getaddrinfo (hostname, service, &hints, &in) < 0) + { + perror ("getaddrinfo"); + exit (1); + } + family = in->ai_family; + socktype = in->ai_socktype; + addr = in->ai_addr; + addrlen = in->ai_addrlen; + freeaddrinfo (in); +#else + memset (&sin, 0, sizeof (sin)); + host = gethostbyname (hostname); + if (!host) + return -1; + memcpy (&sin.sin_addr, host->h_addr, host->h_length); + serv = getservbyname (service, proto->p_name); + if (serv) + sin.sin_port = htons (serv->s_port); + else if (isdigit (service[0])) + sin.sin_port = htons (atoi (service)); + family = sin.sin_family = AF_INET; + socktype = SOCK_STREAM; + addr = (struct sockaddr *)&sin; + addrlen = sizeof (sin); +#endif + + server = socket (family, socktype, 0); + if (server == -1) + { + perror ("socket"); + exit (1); + } + + setsockopt (server, SOL_SOCKET, SO_REUSEADDR, + (const char *) &false, sizeof (false)); + + if (connect (server, addr, addrlen) < 0) + { + perror ("connect"); + close (server); + exit (1); + } #ifdef O_NDELAY fcntl (server, F_SETFL, O_NDELAY); diff --git a/etc/Emacs.ad b/etc/Emacs.ad index 7b7c309..2db34b8 100644 --- a/etc/Emacs.ad +++ b/etc/Emacs.ad @@ -35,7 +35,7 @@ *XlwMenu.partChannel.labelString: ¥Á¥ã¥ó¥Í¥ë¤òΥæ *XlwMenu.goToNextChannel.labelString: ¼¡¤Î¥Á¥ã¥ó¥Í¥ë *XlwMenu.goToPreviousChannel.labelString: Á°¤Î¥Á¥ã¥ó¥Í¥ë -*wMenu.goToUnreadChannel.labelString: ̤ÆÉ¥Á¥ã¥ó¥Í¥ë +*XlwMenu.goToUnreadChannel.labelString: ̤ÆÉ¥Á¥ã¥ó¥Í¥ë *XlwMenu.rotateLeftChannels.labelString: ¥Á¥ã¥ó¥Í¥ë°ìÍ÷¤òº¸²ó¤ê¤Ë²óž *XlwMenu.rotateRightChannels.labelString: ¥Á¥ã¥ó¥Í¥ë°ìÍ÷¤ò±¦²ó¤ê¤Ë²óž *XlwMenu.inviteToThisChannel.labelString: ¤³¤Î¥Á¥ã¥ó¥Í¥ë¤Ë¾·ÂÔ diff --git a/etc/Makefile.am b/etc/Makefile.am index 99cf0b3..ffb7083 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,91 +1,11 @@ -ICONS = \ - icons/back.xpm \ - icons/ball.blank.xpm \ - icons/ball.gray.xpm \ - icons/ball.red.xpm \ - icons/naruto.blank.xpm \ - icons/naruto.gray.xpm \ - icons/naruto.red.xpm \ - icons/crypt.xpm \ - icons/encrypt.xpm \ - icons/forward.xpm \ - icons/home.xpm \ - icons/icons.gif \ - icons/icons.xpm \ - icons/liece-pointer.xbm \ - icons/liece-pointer.xpm \ - icons/key.xpm \ - icons/location.xpm \ - icons/pindown.xpm \ - icons/print.xpm \ - icons/reload.xpm \ - icons/search.xpm \ - icons/stop.xpm \ - icons/balloon.xpm -CATALOGS = po/ja.po -STYLES = \ - styles/bottom \ - styles/middle \ - styles/top -TARGETS = $(ICONS) $(CATALOGS) $(STYLES) +SUBDIRS = icons po styles -if USE_PACKAGE -icondir = $(packagedir)/etc/$(PACKAGE)/icons -catalogdir = $(packagedir)/etc/$(PACKAGE)/po -styledir = $(packagedir)/etc/$(PACKAGE)/styles -else -icondir = $(pkgdatadir)/icons -catalogdir = $(pkgdatadir)/po -styledir = $(pkgdatadir)/styles -endif +EXTRA_DIST = sample.dot.emacs.in +DISTCLEANFILES = sample.dot.emacs +pkgdata_DATA = sample.dot.emacs +sample.dot.emacs: sample.dot.emacs.in + sed -e 's!@pkgdatadir@!$(pkgdatadir)!g' $< > $@ -disticondir = $(distdir)/icons -distcatalogdir = $(distdir)/po -diststyledir = $(distdir)/styles - -install-data-local: $(TARGETS) - for d in $(pkgdatadir) $(icondir) $(catalogdir) $(styledir); do \ - $(top_srcdir)/mkinstalldirs $$d; \ - done - @list="$(ICONS)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(icondir)/"; \ - $(INSTALL_DATA) $$p $(icondir)/; \ - else :; fi; \ - done - @list="$(CATALOGS)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(catalogdir)/"; \ - $(INSTALL_DATA) $$p $(catalogdir)/; \ - else :; fi; \ - done - @list="$(STYLES)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(styledir)/"; \ - $(INSTALL_DATA) $$p $(styledir)/; \ - else :; fi; \ - done - -dist-hook: - for d in $(distpkgdatadir) $(disticondir) $(distcatalogdir) \ - $(diststyledir); do \ - $(top_srcdir)/mkinstalldirs $$d; \ - done - @list="$(ICONS)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(disticondir)/"; \ - $(INSTALL_DATA) $$p $(disticondir)/; \ - else :; fi; \ - done - @list="$(CATALOGS)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(distcatalogdir)/"; \ - $(INSTALL_DATA) $$p $(distcatalogdir)/; \ - else :; fi; \ - done - @list="$(STYLES)"; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(diststyledir)/"; \ - $(INSTALL_DATA) $$p $(diststyledir)/; \ - else :; fi; \ - done +package: +install-package: package + $(MAKE) pkgdatadir=$(PACKAGEDIR)/etc/$(PACKAGE) install diff --git a/etc/icons/Makefile.am b/etc/icons/Makefile.am new file mode 100644 index 0000000..3aeeba7 --- /dev/null +++ b/etc/icons/Makefile.am @@ -0,0 +1,3 @@ +icondir = $(pkgdatadir)/icons +icon_DATA = $(wildcard *.xpm) +EXTRA_DIST = $(icon_DATA) \ No newline at end of file diff --git a/etc/po/Makefile.am b/etc/po/Makefile.am new file mode 100644 index 0000000..3077b4c --- /dev/null +++ b/etc/po/Makefile.am @@ -0,0 +1,3 @@ +podir = $(pkgdatadir)/po +po_DATA = $(wildcard *.po) +EXTRA_DIST = $(po_DATA) \ No newline at end of file diff --git a/etc/sample.dot.emacs.in b/etc/sample.dot.emacs.in new file mode 100644 index 0000000..817453d --- /dev/null +++ b/etc/sample.dot.emacs.in @@ -0,0 +1,5 @@ +;;; -*- emacs-lisp -*- + +(setq liece-intl-catalogue-directory "@pkgdatadir@/po" + liece-window-style-directory "@pkgdatadir@/styles" + liece-icon-directory "@pkgdatadir@/icons") diff --git a/etc/styles/Makefile.am b/etc/styles/Makefile.am new file mode 100644 index 0000000..dff3e4a --- /dev/null +++ b/etc/styles/Makefile.am @@ -0,0 +1,3 @@ +styledir = $(pkgdatadir)/styles +style_DATA = bottom top middle +EXTRA_DIST = $(style_DATA) \ No newline at end of file diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d405054..844e058 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-01-28 Daiki Ueno + + * liece-dcc.el (liece-dcc-start-process): New function. + (liece-command-dcc-send): Use it. + (liece-command-dcc-receive): Use it. + (liece-command-dcc-chat-listen): Use it. + (liece-command-dcc-chat-connect): Use it. + 2001-11-09 Yoichi NAKAYAMA * liece-vars.el (liece-truncate-partial-width-windows): Change diff --git a/lisp/Makefile b/lisp/Makefile index 40b7dd0..f27b9d7 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -1,49 +1,197 @@ -# -*- makefile -*- -# -# Makefile for liece -# -# +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am -PACKAGE = liece -VERSION = 1.4 +# Copyright (C) 1994, 1995-8, 1999 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. -EMACS = emacs -XEMACS = xemacs -FLAGS = -batch -q -no-site-file -TAR = tar +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. -PREFIX = NONE -LISPDIR = NONE -PACKAGEDIR = NONE -VERSION_SPECIFIC_LISPDIR = NONE -GOMI = liece-setup.el *.elc +SHELL = /bin/sh -all: elc +srcdir = . +top_srcdir = .. +prefix = /usr/local +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/liece +pkglibdir = $(libdir)/liece +pkgincludedir = $(includedir)/liece + +top_builddir = .. + +ACLOCAL = aclocal +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +ADDITIONAL_LOAD_PATH = @ADDITIONAL_LOAD_PATH@ +CC = gcc +EMACS = xemacs +GNUS_PRODUCT_NAME = @GNUS_PRODUCT_NAME@ +HAVE_ = @HAVE_@ +LATEX = @LATEX@ +MAKEINFO = makeinfo +PACKAGE = liece +PACKAGEDIR = /usr/local/lib/xemacs/mule-packages/ +RANLIB = ranlib +URL = @URL@ +USE_FONTS = @USE_FONTS@ +VERSION = 1.4.5 +W3 = @W3@ +WITHOUT_FONTS_bcr = @WITHOUT_FONTS_bcr@ +WITHOUT_FONTS_bembo = @WITHOUT_FONTS_bembo@ +WITHOUT_FONTS_pfu = @WITHOUT_FONTS_pfu@ +WITH_FONTS_bcr = @WITH_FONTS_bcr@ +WITH_FONTS_bembo = @WITH_FONTS_bembo@ +WITH_FONTS_pfu = @WITH_FONTS_pfu@ +XEMACS = xemacs +etcdir = $(lispdir)/../etc +lispdir = $(prefix)/share/emacs/site-lisp + +EXTRA_DIST = $(wildcard *.el) Makefile.lisp +DISTCLEANFILES = liece-setup.el +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +DIST_COMMON = ChangeLog Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu lisp/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -elc: - $(EMACS) $(FLAGS) -l ./liece-make.el -f autoload-liece \ - $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) - $(EMACS) $(FLAGS) -l ./liece-make.el -f compile-liece \ - $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) +subdir = lisp -install: elc - $(EMACS) $(FLAGS) -l ./liece-make.el -f install-liece \ - $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu lisp/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am -package: - $(XEMACS) $(FLAGS) -l ./liece-make.el -f autoload-liece \ - $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) - $(XEMACS) $(FLAGS) -l ./liece-make.el -f compile-liece-package \ - $(PACKAGEDIR) +install-data-am: +install-data: install-data-am -install-package: package - $(XEMACS) $(FLAGS) -l ./liece-make.el -f install-liece-package \ - $(PACKAGEDIR) +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +all: elc -tag: - sh -c 'cvs tag -RF liece-`echo $(VERSION) | \ - tr . _`-`date +%Y%m%d%H%m`' +elc package install install-package clean: + $(MAKE) $(AM_MAKEFLAGS) -f Makefile.lisp $@ -clean: - -rm -f $(GOMI) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lisp/Makefile.am b/lisp/Makefile.am index 749bd9e..d6d9ce2 100644 --- a/lisp/Makefile.am +++ b/lisp/Makefile.am @@ -1,69 +1,7 @@ -## Process this file with automake to produce Makefile.in -## We do not use automake's emacs-lisp support. +EXTRA_DIST = $(wildcard *.el) Makefile.lisp +DISTCLEANFILES = liece-setup.el -SOURCES = liece-clfns.el liece-handler.el gettext.el \ - liece-compat.el liece-version.el \ - liece-vars.el liece-globals.el liece-inlines.el \ - liece-filter.el liece-dcc.el liece-menu.el \ - liece-000.el liece-200.el liece-300.el liece-400.el liece-500.el \ - liece-nick.el liece-channel.el \ - liece-commands.el liece-ctcp.el \ - liece-handle.el liece-hilit.el liece-intl.el liece-mail.el \ - liece-minibuf.el liece-misc.el liece-url.el liece-message.el \ - liece-x-face.el liece-tcp.el liece-coding.el \ - queue-m.el liece.el \ - liece-window.el +all: elc -EXTRA_DIST = liece-make.el liece-config.el liece-modules.el \ - liece-emacs.el liece-xemacs.el \ - liece-q-ccl.el liece-q-el.el \ - bitmap-stipple.el \ - liece.xpm liece.xbm - -TARGETS = $(SOURCES:.el=.elc) - -if USE_CUSTOM_LISPDIR -LISPDIR = $(lispdir) -VERSION_SPECIFIC_LISPDIR = $(lispdir)/emu -else -LISPDIR = NONE -VERSION_SPECIFIC_LISPDIR = NONE -endif - -if USE_CUSTOM_PACKAGEDIR -PACKAGEDIR = $(packagedir) -else -PACKAGEDIR = NONE -endif - -EMACS_AUTOLOAD_FLAGS = -f autoload-liece - -if USE_PACKAGE -EMACS_COMPILE_FLAGS = -f compile-liece-package $(PACKAGEDIR) -EMACS_INSTALL_FLAGS = -f install-liece-package $(PACKAGEDIR) -else -EMACS_COMPILE_FLAGS = -f compile-liece \ - NONE $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) -EMACS_INSTALL_FLAGS = -f install-liece \ - NONE $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) -endif - - -all: $(TARGETS) - -$(TARGETS): liece-make.el liece-setup.el $(SOURCES) - $(EMACS) -batch -q -no-site-file -l ./liece-make.el \ - $(EMACS_COMPILE_FLAGS) - -liece-setup.el: - $(EMACS) -batch -q -no-site-file -l ./liece-make.el \ - $(EMACS_AUTOLOAD_FLAGS) - -install-exec-local: $(TARGETS) - $(EMACS) -batch -q -no-site-file -l ./liece-make.el \ - $(EMACS_INSTALL_FLAGS) - -clean-local: - -rm *.elc liece-setup.el - -.PHONY: update +elc package install install-package clean: + $(MAKE) $(AM_MAKEFLAGS) -f Makefile.lisp $@ diff --git a/lisp/liece-dcc.el b/lisp/liece-dcc.el index 4963610..ff384ba 100644 --- a/lisp/liece-dcc.el +++ b/lisp/liece-dcc.el @@ -48,6 +48,12 @@ (defstruct liece-dcc-object type from host port file size) +(defun liece-dcc-start-process (args) + (let ((program + (or (car-safe liece-dcc-program) + liece-dcc-program))) + (apply #'start-process " *DCC*" nil program args))) + (defun liece-dcc-enqueue-request (type &rest args) (let ((request (apply #'make-liece-dcc-object :type type args))) (inline (queue-enqueue liece-dcc-requests request)))) @@ -109,10 +115,9 @@ nil nil nil nil liece-privmsg-partner))) (setq liece-privmsg-partner towhom) - (let (process) - (setq process (start-process - liece-dcc-program nil liece-dcc-program - "send" (int-to-string liece-dcc-port) filename)) + (let ((process + (liece-dcc-start-process + (list "send" (int-to-string liece-dcc-port) filename)))) (set-process-filter process #'liece-dcc-send-filter) (set-process-sentinel process #'liece-dcc-sentinel)) (or (zerop liece-dcc-port) @@ -188,17 +193,15 @@ (expand-file-name (liece-dcc-object-file object) liece-dcc-directory)) - process) - (setq process - (start-process - liece-dcc-program nil liece-dcc-program - "receive" - (liece-dcc-object-host object) - (liece-dcc-object-port object) - (liece-dcc-object-size object) - (expand-file-name - (liece-dcc-object-file object) - liece-dcc-directory))) + (process + (liece-dcc-start-process + (list "receive" + (liece-dcc-object-host object) + (liece-dcc-object-port object) + (liece-dcc-object-size object) + (expand-file-name + (liece-dcc-object-file object) + liece-dcc-directory))))) (set-process-filter process #'liece-dcc-receive-filter) (set-process-sentinel process #'liece-dcc-sentinel) (liece-dcc-add-to-process-alist @@ -219,18 +222,15 @@ (append liece-nick-alist liece-channel-alist) nil nil nil nil liece-privmsg-partner))) (setq liece-privmsg-partner towhom) - (let (process) - (as-binary-process - (setq process - (start-process - liece-dcc-program nil - liece-dcc-program "chat" "listen" - (int-to-string liece-dcc-port))) - (set-process-buffer - process - (liece-get-buffer-create (format " DCC:%s" (process-id process)))) - (set-process-filter process 'liece-dcc-chat-listen-filter) - (set-process-sentinel process 'liece-dcc-sentinel))) + (let ((process + (as-binary-process + (liece-dcc-start-process + (list "chat" "listen" (int-to-string liece-dcc-port)))))) + (set-process-buffer + process + (liece-get-buffer-create (format " DCC:%s" (process-id process)))) + (set-process-filter process 'liece-dcc-chat-listen-filter) + (set-process-sentinel process 'liece-dcc-sentinel)) (unless (zerop liece-dcc-port) (setq liece-dcc-port (1+ liece-dcc-port)))) @@ -268,20 +268,20 @@ (liece-message (_ "DCC No chat request has been arrived.")) (liece-dcc-message (_ "Connecting to: %s") nick) (setq liece-privmsg-partner nick) - (as-binary-process - (setq process - (start-process liece-dcc-program nil - liece-dcc-program "chat" "connect" - (liece-dcc-object-host object) - (liece-dcc-object-port object))) - (set-process-buffer - process - (liece-get-buffer-create - (format " DCC:%s" (process-id process)))) - (set-process-filter process #'liece-dcc-chat-connect-filter) - (set-process-sentinel process #'liece-dcc-sentinel) - (liece-dcc-add-to-process-alist - process 'chat :from liece-privmsg-partner))))) + (setq process + (as-binary-process + (liece-dcc-start-process + (list "chat" "connect" + (liece-dcc-object-host object) + (liece-dcc-object-port object))))) + (set-process-buffer + process + (liece-get-buffer-create + (format " DCC:%s" (process-id process)))) + (set-process-filter process #'liece-dcc-chat-connect-filter) + (set-process-sentinel process #'liece-dcc-sentinel) + (liece-dcc-add-to-process-alist + process 'chat :from liece-privmsg-partner)))) (defun liece-dcc-chat-connect-filter (process output) (if (string-match "^DCC chat established" output) diff --git a/sample.dot.emacs.in b/sample.dot.emacs.in deleted file mode 100644 index 817453d..0000000 --- a/sample.dot.emacs.in +++ /dev/null @@ -1,5 +0,0 @@ -;;; -*- emacs-lisp -*- - -(setq liece-intl-catalogue-directory "@pkgdatadir@/po" - liece-window-style-directory "@pkgdatadir@/styles" - liece-icon-directory "@pkgdatadir@/icons")